@arkyn/components 1.3.139 → 1.3.140
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +1661 -1666
- package/dist/bundle.umd.cjs +15 -15
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/index.js +4 -8
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useAutomation.js +2 -9
- package/dist/provider/ToastProvider.d.ts.map +1 -1
- package/dist/provider/ToastProvider.js +1 -1
- package/package.json +1 -1
- package/src/components/Toast/index.tsx +4 -8
- package/src/hooks/useAutomation.ts +2 -9
- package/src/provider/ToastProvider.tsx +4 -1
package/dist/bundle.umd.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(fe,f){typeof exports=="object"&&typeof module<"u"?f(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"],f):(fe=typeof globalThis<"u"?globalThis:fe||self,f(fe["@arkyn/components"]={},fe.React$2,fe.lucideReact,fe.ReactDOM,fe.react,fe.mask,fe.framerMotion))})(this,function(fe,f,
|
1
|
+
(function(fe,f){typeof exports=="object"&&typeof module<"u"?f(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"],f):(fe=typeof globalThis<"u"?globalThis:fe||self,f(fe["@arkyn/components"]={},fe.React$2,fe.lucideReact,fe.ReactDOM,fe.react,fe.mask,fe.framerMotion))})(this,function(fe,f,Oe,ln,Ot,Dd,cn){"use strict";function Us(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 rt=Us(f),Hs=Us(ln);var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Or(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vi={exports:{}},Zn={};/**
|
2
2
|
* @license React
|
3
3
|
* react-jsx-runtime.production.min.js
|
4
4
|
*
|
@@ -15,21 +15,21 @@
|
|
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
17
|
*/var Vs;function bd(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&function(){var t=f,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function d(S){if(S===null||typeof S!="object")return null;var $=y&&S[y]||S[v];return typeof $=="function"?$:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(S){{for(var $=arguments.length,oe=new Array($>1?$-1:0),ye=1;ye<$;ye++)oe[ye-1]=arguments[ye];b("error",S,oe)}}function b(S,$,oe){{var ye=D.ReactDebugCurrentFrame,ke=ye.getStackAddendum();ke!==""&&($+="%s",oe=oe.concat([ke]));var je=oe.map(function(Me){return String(Me)});je.unshift("Warning: "+$),Function.prototype.apply.call(console[S],console,je)}}var O=!1,E=!1,w=!1,A=!1,F=!1,R;R=Symbol.for("react.module.reference");function P(S){return!!(typeof S=="string"||typeof S=="function"||S===r||S===o||F||S===i||S===l||S===c||A||S===g||O||E||w||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===R||S.getModuleId!==void 0))}function z(S,$,oe){var ye=S.displayName;if(ye)return ye;var ke=$.displayName||$.name||"";return ke!==""?oe+"("+ke+")":oe}function I(S){return S.displayName||"Context"}function j(S){if(S==null)return null;if(typeof S.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case a:var $=S;return I($)+".Consumer";case s:var oe=S;return I(oe._context)+".Provider";case u:return z(S,S.render,"ForwardRef");case p:var ye=S.displayName||null;return ye!==null?ye:j(S.type)||"Memo";case h:{var ke=S,je=ke._payload,Me=ke._init;try{return j(Me(je))}catch{return null}}}return null}var T=Object.assign,N=0,K,_,ie,re,k,H,J;function q(){}q.__reactDisabledLog=!0;function ee(){{if(N===0){K=console.log,_=console.info,ie=console.warn,re=console.error,k=console.group,H=console.groupCollapsed,J=console.groupEnd;var S={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}N++}}function Y(){{if(N--,N===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},S,{value:K}),info:T({},S,{value:_}),warn:T({},S,{value:ie}),error:T({},S,{value:re}),group:T({},S,{value:k}),groupCollapsed:T({},S,{value:H}),groupEnd:T({},S,{value:J})})}N<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var C=D.ReactCurrentDispatcher,W;function U(S,$,oe){{if(W===void 0)try{throw Error()}catch(ke){var ye=ke.stack.trim().match(/\n( *(at )?)/);W=ye&&ye[1]||""}return`
|
18
|
-
`+W+S}}var M=!1,X;{var te=typeof WeakMap=="function"?WeakMap:Map;X=new te}function G(S,$){if(!S||M)return"";{var oe=X.get(S);if(oe!==void 0)return oe}var ye;M=!0;var ke=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=C.current,C.current=null,ee();try{if($){var Me=function(){throw Error()};if(Object.defineProperty(Me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Me,[])}catch(nt){ye=nt}Reflect.construct(S,[],Me)}else{try{Me.call()}catch(nt){ye=nt}S.call(Me.prototype)}}else{try{throw Error()}catch(nt){ye=nt}S()}}catch(nt){if(nt&&ye&&typeof nt.stack=="string"){for(var
|
18
|
+
`+W+S}}var M=!1,X;{var te=typeof WeakMap=="function"?WeakMap:Map;X=new te}function G(S,$){if(!S||M)return"";{var oe=X.get(S);if(oe!==void 0)return oe}var ye;M=!0;var ke=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=C.current,C.current=null,ee();try{if($){var Me=function(){throw Error()};if(Object.defineProperty(Me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Me,[])}catch(nt){ye=nt}Reflect.construct(S,[],Me)}else{try{Me.call()}catch(nt){ye=nt}S.call(Me.prototype)}}else{try{throw Error()}catch(nt){ye=nt}S()}}catch(nt){if(nt&&ye&&typeof nt.stack=="string"){for(var Ae=nt.stack.split(`
|
19
19
|
`),tt=ye.stack.split(`
|
20
|
-
`),Ge=
|
21
|
-
`+
|
20
|
+
`),Ge=Ae.length-1,Je=tt.length-1;Ge>=1&&Je>=0&&Ae[Ge]!==tt[Je];)Je--;for(;Ge>=1&&Je>=0;Ge--,Je--)if(Ae[Ge]!==tt[Je]){if(Ge!==1||Je!==1)do if(Ge--,Je--,Je<0||Ae[Ge]!==tt[Je]){var at=`
|
21
|
+
`+Ae[Ge].replace(" at new "," at ");return S.displayName&&at.includes("<anonymous>")&&(at=at.replace("<anonymous>",S.displayName)),typeof S=="function"&&X.set(S,at),at}while(Ge>=1&&Je>=0);break}}}finally{M=!1,C.current=je,Y(),Error.prepareStackTrace=ke}var Ht=S?S.displayName||S.name:"",Rt=Ht?U(Ht):"";return typeof S=="function"&&X.set(S,Rt),Rt}function le(S,$,oe){return G(S,!1)}function se(S){var $=S.prototype;return!!($&&$.isReactComponent)}function pe(S,$,oe){if(S==null)return"";if(typeof S=="function")return G(S,se(S));if(typeof S=="string")return U(S);switch(S){case l:return U("Suspense");case c:return U("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case u:return le(S.render);case p:return pe(S.type,$,oe);case h:{var ye=S,ke=ye._payload,je=ye._init;try{return pe(je(ke),$,oe)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Ce={},me=D.ReactDebugCurrentFrame;function De(S){if(S){var $=S._owner,oe=pe(S.type,S._source,$?$.type:null);me.setExtraStackFrame(oe)}else me.setExtraStackFrame(null)}function ge(S,$,oe,ye,ke){{var je=Function.call.bind(ve);for(var Me in S)if(je(S,Me)){var Ae=void 0;try{if(typeof S[Me]!="function"){var tt=Error((ye||"React class")+": "+oe+" type `"+Me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[Me]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw tt.name="Invariant Violation",tt}Ae=S[Me]($,Me,ye,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){Ae=Ge}Ae&&!(Ae instanceof Error)&&(De(ke),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).",ye||"React class",oe,Me,typeof Ae),De(null)),Ae instanceof Error&&!(Ae.message in Ce)&&(Ce[Ae.message]=!0,De(ke),B("Failed %s type: %s",oe,Ae.message),De(null))}}}var Ne=Array.isArray;function ae(S){return Ne(S)}function Ue(S){{var $=typeof Symbol=="function"&&Symbol.toStringTag,oe=$&&S[Symbol.toStringTag]||S.constructor.name||"Object";return oe}}function de(S){try{return we(S),!1}catch{return!0}}function we(S){return""+S}function Te(S){if(de(S))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ue(S)),we(S)}var Xe=D.ReactCurrentOwner,$e={key:!0,ref:!0,__self:!0,__source:!0},xe,pt,st;st={};function an(S){if(ve.call(S,"ref")){var $=Object.getOwnPropertyDescriptor(S,"ref").get;if($&&$.isReactWarning)return!1}return S.ref!==void 0}function xt(S){if(ve.call(S,"key")){var $=Object.getOwnPropertyDescriptor(S,"key").get;if($&&$.isReactWarning)return!1}return S.key!==void 0}function Lt(S,$){if(typeof S.ref=="string"&&Xe.current&&$&&Xe.current.stateNode!==$){var oe=j(Xe.current.type);st[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(Xe.current.type),S.ref),st[oe]=!0)}}function _n(S,$){{var oe=function(){xe||(xe=!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)",$))};oe.isReactWarning=!0,Object.defineProperty(S,"key",{get:oe,configurable:!0})}}function zn(S,$){{var oe=function(){pt||(pt=!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)",$))};oe.isReactWarning=!0,Object.defineProperty(S,"ref",{get:oe,configurable:!0})}}var Wn=function(S,$,oe,ye,ke,je,Me){var Ae={$$typeof:e,type:S,key:$,ref:oe,props:Me,_owner:je};return Ae._store={},Object.defineProperty(Ae._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ae,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ye}),Object.defineProperty(Ae,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ke}),Object.freeze&&(Object.freeze(Ae.props),Object.freeze(Ae)),Ae};function Un(S,$,oe,ye,ke){{var je,Me={},Ae=null,tt=null;oe!==void 0&&(Te(oe),Ae=""+oe),xt($)&&(Te($.key),Ae=""+$.key),an($)&&(tt=$.ref,Lt($,ke));for(je in $)ve.call($,je)&&!$e.hasOwnProperty(je)&&(Me[je]=$[je]);if(S&&S.defaultProps){var Ge=S.defaultProps;for(je in Ge)Me[je]===void 0&&(Me[je]=Ge[je])}if(Ae||tt){var Je=typeof S=="function"?S.displayName||S.name||"Unknown":S;Ae&&_n(Me,Je),tt&&zn(Me,Je)}return Wn(S,Ae,tt,ke,ye,Xe.current,Me)}}var Tt=D.ReactCurrentOwner,An=D.ReactDebugCurrentFrame;function Ut(S){if(S){var $=S._owner,oe=pe(S.type,S._source,$?$.type:null);An.setExtraStackFrame(oe)}else An.setExtraStackFrame(null)}var un;un=!1;function Hn(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function Br(){{if(Tt.current){var S=j(Tt.current.type);if(S)return`
|
22
22
|
|
23
23
|
Check the render method of \``+S+"`."}return""}}function Rn(S){{if(S!==void 0){var $=S.fileName.replace(/^.*[\\\/]/,""),oe=S.lineNumber;return`
|
24
24
|
|
25
25
|
Check your code at `+$+":"+oe+"."}return""}}var xr={};function Wi(S){{var $=Br();if(!$){var oe=typeof S=="string"?S:S.displayName||S.name;oe&&($=`
|
26
26
|
|
27
|
-
Check the top-level render call using <`+oe+">.")}return $}}function Ln(S,$){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Wi($);if(xr[oe])return;xr[oe]=!0;var ye="";S&&S._owner&&S._owner!==Tt.current&&(ye=" It was passed a child from "+j(S._owner.type)+"."),Ut(S),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,ye),Ut(null)}}function Sr(S,$){{if(typeof S!="object")return;if(ae(S))for(var oe=0;oe<S.length;oe++){var ye=S[oe];Hn(ye)&&Ln(ye,$)}else if(Hn(S))S._store&&(S._store.validated=!0);else if(S){var ke=d(S);if(typeof ke=="function"&&ke!==S.entries)for(var je=ke.call(S),Me;!(Me=je.next()).done;)Hn(Me.value)&&Ln(Me.value,$)}}}function Ui(S){{var $=S.type;if($==null||typeof $=="string")return;var oe;if(typeof $=="function")oe=$.propTypes;else if(typeof $=="object"&&($.$$typeof===u||$.$$typeof===p))oe=$.propTypes;else return;if(oe){var ye=j($);ge(oe,S.props,"prop",ye,S)}else if($.PropTypes!==void 0&&!un){un=!0;var ke=j($);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ke||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vn(S){{for(var $=Object.keys(S.props),oe=0;oe<$.length;oe++){var ye=$[oe];if(ye!=="children"&&ye!=="key"){Ut(S),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ye),Ut(null);break}}S.ref!==null&&(Ut(S),B("Invalid attribute `ref` supplied to `React.Fragment`."),Ut(null))}}var Ar={};function Lr(S,$,oe,ye,ke,je){{var Me=P(S);if(!Me){var
|
27
|
+
Check the top-level render call using <`+oe+">.")}return $}}function Ln(S,$){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Wi($);if(xr[oe])return;xr[oe]=!0;var ye="";S&&S._owner&&S._owner!==Tt.current&&(ye=" It was passed a child from "+j(S._owner.type)+"."),Ut(S),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,ye),Ut(null)}}function Sr(S,$){{if(typeof S!="object")return;if(ae(S))for(var oe=0;oe<S.length;oe++){var ye=S[oe];Hn(ye)&&Ln(ye,$)}else if(Hn(S))S._store&&(S._store.validated=!0);else if(S){var ke=d(S);if(typeof ke=="function"&&ke!==S.entries)for(var je=ke.call(S),Me;!(Me=je.next()).done;)Hn(Me.value)&&Ln(Me.value,$)}}}function Ui(S){{var $=S.type;if($==null||typeof $=="string")return;var oe;if(typeof $=="function")oe=$.propTypes;else if(typeof $=="object"&&($.$$typeof===u||$.$$typeof===p))oe=$.propTypes;else return;if(oe){var ye=j($);ge(oe,S.props,"prop",ye,S)}else if($.PropTypes!==void 0&&!un){un=!0;var ke=j($);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ke||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vn(S){{for(var $=Object.keys(S.props),oe=0;oe<$.length;oe++){var ye=$[oe];if(ye!=="children"&&ye!=="key"){Ut(S),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ye),Ut(null);break}}S.ref!==null&&(Ut(S),B("Invalid attribute `ref` supplied to `React.Fragment`."),Ut(null))}}var Ar={};function Lr(S,$,oe,ye,ke,je){{var Me=P(S);if(!Me){var Ae="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var tt=Rn(ke);tt?Ae+=tt:Ae+=Br();var Ge;S===null?Ge="null":ae(S)?Ge="array":S!==void 0&&S.$$typeof===e?(Ge="<"+(j(S.type)||"Unknown")+" />",Ae=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof S,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,Ae)}var Je=Un(S,$,oe,ke,je);if(Je==null)return Je;if(Me){var at=$.children;if(at!==void 0)if(ye)if(ae(at)){for(var Ht=0;Ht<at.length;Ht++)Sr(at[Ht],S);Object.freeze&&Object.freeze(at)}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 Sr(at,S)}if(ve.call($,"key")){var Rt=j(S),nt=Object.keys($).filter(function(ew){return ew!=="key"}),Ee=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Ar[Rt+Ee]){var $1=nt.length>0?"{"+nt.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} />`,Ee,Rt,$1,Rt),Ar[Rt+Ee]=!0}}return S===r?Vn(Je):Ui(Je),Je}}function qn(S,$,oe){return Lr(S,$,oe,!0)}function Hi(S,$,oe){return Lr(S,$,oe,!1)}var Ri=Hi,Gn=qn;Yn.Fragment=r,Yn.jsx=Ri,Yn.jsxs=Gn}()),Yn}process.env.NODE_ENV==="production"?Vi.exports=Ed():Vi.exports=bd();var x=Vi.exports;function qs(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Gs=f.createContext({});function wd(){return f.useContext(Gs)}function Bd(t){const{schema:e,children:n,className:r,...i}=t,a=!(l=>{let c=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===qs?c=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),c})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${a} ${r}`;return x.jsx(Gs.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...i,children:n})})}function xd(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Sd(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Ad(t){const{className:e,...n}=t,{schema:r}=wd(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(
|
32
|
+
<%s key={someKey} {...props} />`,Ee,Rt,$1,Rt),Ar[Rt+Ee]=!0}}return S===r?Vn(Je):Ui(Je),Je}}function qn(S,$,oe){return Lr(S,$,oe,!0)}function Hi(S,$,oe){return Lr(S,$,oe,!1)}var Ri=Hi,Gn=qn;Yn.Fragment=r,Yn.jsx=Ri,Yn.jsxs=Gn}()),Yn}process.env.NODE_ENV==="production"?Vi.exports=Ed():Vi.exports=bd();var x=Vi.exports;function qs(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Gs=f.createContext({});function wd(){return f.useContext(Gs)}function Bd(t){const{schema:e,children:n,className:r,...i}=t,a=!(l=>{let c=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===qs?c=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),c})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${a} ${r}`;return x.jsx(Gs.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...i,children:n})})}function xd(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Sd(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Ad(t){const{className:e,...n}=t,{schema:r}=wd(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Oe.CheckCircle2,{className:i,...n});case"danger":return x.jsx(Oe.XCircle,{className:i,...n});case"warning":return x.jsx(Oe.AlertTriangle,{className:i,...n});case"info":return x.jsx(Oe.Info,{className:i,...n})}}function Pr(t,e){return e?x.jsx(e,{size:t,strokeWidth:2.5}):x.jsx(x.Fragment,{})}function Zs(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function Ld(t,e,n){return t>=n?[]:Zs(t,t+e)}function Od(t,e){return t<=1?[]:Zs(t-1-e,t-1)}function Pd(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 Fd(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:o,className:s="",children:a,...u}=t,c={md:12,lg:14}[r],p=`arkynBadge ${e} ${n} ${r} ${s}`;return x.jsxs("div",{className:p.trim(),...u,children:[Pr(c,i),a,Pr(c,i)]})}function Md(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function kd(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,7 +42,7 @@ 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 qi=function(t,e){return qi=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])},qi(t,e)};function He(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qi(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var he=function(){return he=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},he.apply(this,arguments)};function Gi(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 Td(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{l(r.next(c))}catch(p){s(p)}}function u(c){try{l(r.throw(c))}catch(p){s(p)}}function l(c){c.done?o(c.value):i(c.value).then(a,u)}l((r=r.apply(t,e||[])).next())})}function Id(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jd=process.env.NODE_ENV,Nd=function(t,e,n,r,i,o,s,a){if(jd!=="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 l=[n,r,i,o,s,a],c=0;u=new Error(e.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},_d=Nd,et=Ys(_d),Be=f.createContext(null);function zd(){et(!!f.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=f.useContext(Be);return et(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Wd(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Ud(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Hd(t,e,n,r){var i={},o=function(s,a){var u=n[a];u!==e[a]&&(i[a]=u,s(r,u))};return Ud(t,o),i}function Rd(t,e,n){var r=Wd(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Vd(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach(Vd)}function
|
45
|
+
***************************************************************************** */var qi=function(t,e){return qi=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])},qi(t,e)};function He(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qi(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var he=function(){return he=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},he.apply(this,arguments)};function Gi(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 Td(t,e,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{l(r.next(c))}catch(p){s(p)}}function u(c){try{l(r.throw(c))}catch(p){s(p)}}function l(c){c.done?o(c.value):i(c.value).then(a,u)}l((r=r.apply(t,e||[])).next())})}function Id(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jd=process.env.NODE_ENV,Nd=function(t,e,n,r,i,o,s,a){if(jd!=="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 l=[n,r,i,o,s,a],c=0;u=new Error(e.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},_d=Nd,et=Ys(_d),Be=f.createContext(null);function zd(){et(!!f.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=f.useContext(Be);return et(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Wd(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Ud(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Hd(t,e,n,r){var i={},o=function(s,a){var u=n[a];u!==e[a]&&(i[a]=u,s(r,u))};return Ud(t,o),i}function Rd(t,e,n){var r=Wd(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Vd(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach(Vd)}function Le(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=Rd(i,o,n);return Hd(e,r,i,o),s}var Ks={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"},Xs={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 qd(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,o=t.mapContainerClassName,s=t.center,a=t.onClick,u=t.onDblClick,l=t.onDrag,c=t.onDragEnd,p=t.onDragStart,h=t.onMouseMove,g=t.onMouseOut,y=t.onMouseOver,v=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,B=t.onCenterChanged,b=t.onLoad,O=t.onUnmount,E=f.useState(null),w=E[0],A=E[1],F=f.useRef(null),R=f.useState(null),P=R[0],z=R[1],I=f.useState(null),j=I[0],T=I[1],N=f.useState(null),K=N[0],_=N[1],ie=f.useState(null),re=ie[0],k=ie[1],H=f.useState(null),J=H[0],q=H[1],ee=f.useState(null),Y=ee[0],C=ee[1],W=f.useState(null),U=W[0],M=W[1],X=f.useState(null),te=X[0],G=X[1],le=f.useState(null),se=le[0],pe=le[1],ve=f.useState(null),Ce=ve[0],me=ve[1],De=f.useState(null),ge=De[0],Ne=De[1],ae=f.useState(null),Ue=ae[0],de=ae[1];return f.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),f.useEffect(function(){w!==null&&typeof s<"u"&&w.setCenter(s)},[w,s]),f.useEffect(function(){w&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(w,"dblclick",u)))},[u]),f.useEffect(function(){w&&c&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(w,"dragend",c)))},[c]),f.useEffect(function(){w&&p&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(w,"dragstart",p)))},[p]),f.useEffect(function(){w&&v&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(w,"mousedown",v)))},[v]),f.useEffect(function(){w&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(w,"mousemove",h)))},[h]),f.useEffect(function(){w&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(w,"mouseout",g)))},[g]),f.useEffect(function(){w&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(w,"mouseover",y)))},[y]),f.useEffect(function(){w&&d&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(w,"mouseup",d)))},[d]),f.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(w,"rightclick",D)))},[D]),f.useEffect(function(){w&&a&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(w,"click",a)))},[a]),f.useEffect(function(){w&&l&&(Ue!==null&&google.maps.event.removeListener(Ue),de(google.maps.event.addListener(w,"drag",l)))},[l]),f.useEffect(function(){w&&B&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(w,"center_changed",B)))},[a]),f.useEffect(function(){var we=F.current===null?null:new google.maps.Map(F.current,n);return A(we),we!==null&&b&&b(we),function(){we!==null&&O&&O(we)}},[]),x.jsx("div",{id:r,ref:F,style:i,className:o,children:x.jsx(Be.Provider,{value:w,children:w!==null?e:null})})}f.memo(qd);var Gd=function(t){He(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=Le({updaterMap:Xs,eventMap:Ks,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=Le({updaterMap:Xs,eventMap:Ks,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(Be.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(f.PureComponent),fn=typeof document<"u";function Js(t){var e=t.url,n=t.id,r=t.nonce;return fn?new Promise(function(o,s){var a=document.getElementById(n),u=window;if(a){var l=a.getAttribute("data-state");if(a.src===e&&l!=="error"){if(l==="ready")return o(n);var c=u.initMap,p=a.onerror;u.initMap=function(){c&&c(),o(n)},a.onerror=function(g){p&&p(g),s(g)};return}else a.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=e,h.id=n,h.async=!0,h.nonce=r||"",h.onerror=function(y){h.setAttribute("data-state","error"),s(y)},u.initMap=function(){h.setAttribute("data-state","ready"),o(n)},document.head.appendChild(h)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Qs(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
47
|
`,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function $s(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return Qs(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Qs(i)||Reflect.apply(n,t,[i]),i}}}function ea(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,o=t.language,s=t.region,a=t.libraries,u=t.channel,l=t.mapIds,c=t.authReferrerPolicy,p=[];return et(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?p.push("key=".concat(e)):n&&p.push("client=".concat(n)),i&&p.push("v=".concat(i)),o&&p.push("language=".concat(o)),s&&p.push("region=".concat(s)),a&&a.length&&p.push("libraries=".concat(a.sort().join(","))),u&&p.push("channel=".concat(u)),l&&l.length&&p.push("map_ids=".concat(l.join(","))),c&&p.push("auth_referrer_policy=".concat(c)),p.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(p.join("&"))}var Kn=!1;function ta(){return x.jsx("div",{children:"Loading..."})}var Zi={id:"script-loader",version:"weekly"},Zd=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=f.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return Td(n,void 0,void 0,function(){function r(i){if(!Kn)i();else if(fn)var o=window.setInterval(function(){Kn||(window.clearInterval(o),i())},1)}return Id(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){Kn=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(o){return typeof o.src=="string"&&o.src.includes("maps.googleapis")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(o){return o.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(o){return o.innerText!==void 0&&o.innerText.length>0&&o.innerText.includes(".gm-")}).forEach(function(o){o.parentNode&&o.parentNode.removeChild(o)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&$s(),et(!!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:ea(n.props)};Js(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 />
|
@@ -50,7 +50,7 @@ React keys must be passed directly to JSX without using spread:
|
|
50
50
|
`))})},n}return e.prototype.componentDidMount=function(){if(fn){if(window.google&&window.google.maps&&!Kn){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"),fn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(fn){this.cleanup();var r=function(){n.check.current||(delete window.google,Kn=!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(ta,{})]})},e.defaultProps=Zi,e}(f.PureComponent),na;function Yd(t){var e=t.id,n=e===void 0?Zi.id:e,r=t.version,i=r===void 0?Zi.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,u=t.language,l=t.region,c=t.libraries,p=t.preventGoogleFontsLoading,h=t.channel,g=t.mapIds,y=t.authReferrerPolicy,v=f.useRef(!1),d=f.useState(!1),D=d[0],B=d[1],b=f.useState(void 0),O=b[0],E=b[1];f.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),f.useEffect(function(){fn&&p&&$s()},[p]),f.useEffect(function(){D&&et(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var w=ea({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:u,region:l,libraries:c,channel:h,mapIds:g,authReferrerPolicy:y});f.useEffect(function(){if(!fn)return;function R(){v.current&&(B(!0),na=w)}if(window.google&&window.google.maps&&na===w){R();return}Js({id:n,url:w,nonce:o}).then(R).catch(function(z){v.current&&E(z),console.warn(`
|
51
51
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
52
52
|
Otherwise it is a Network issue.
|
53
|
-
`)),console.error(z)})},[n,w,o]);var A=f.useRef();return f.useEffect(function(){A.current&&c!==A.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"),A.current=c},[c]),{isLoaded:D,loadError:O,url:w}}var Kd=x.jsx(ta,{});function Xd(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Gi(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Yd(s),u=a.isLoaded,l=a.loadError;return f.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),f.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),f.useEffect(function(){return function(){i&&i()}},[i]),u?o:e||Kd}f.memo(Xd);var ra;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(ra||(ra={}));var ia={},oa={options:function(t,e){t.setOptions(e)}};function Jd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=f.useContext(Be),o=f.useState(null),s=o[0],a=o[1];return f.useEffect(function(){s!==null&&s.setMap(i)},[i]),f.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),f.useEffect(function(){var u=new google.maps.TrafficLayer(he(he({},e||{}),{map:i}));return a(u),n&&n(u),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}f.memo(Jd),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:oa,eventMap:ia,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=Oe({updaterMap:oa,eventMap:ia,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=Be,e}(f.PureComponent);function Qd(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}f.memo(Qd),function(t){He(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=Be,e}(f.PureComponent);function $d(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}f.memo($d),function(t){He(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=Be,e}(f.PureComponent);var sa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},aa={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function ep(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,u=t.onRectangleComplete,l=t.onLoad,c=t.onUnmount,p=f.useContext(Be),h=f.useState(null),g=h[0],y=h[1],v=f.useState(null),d=v[0],D=v[1],B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1];return f.useEffect(function(){g!==null&&g.setMap(p)},[p]),f.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),f.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),f.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),f.useEffect(function(){g&&i&&(b!==null&&google.maps.event.removeListener(b),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),f.useEffect(function(){g&&o&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",o)))},[g,o]),f.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(g,"polygoncomplete",s)))},[g,s]),f.useEffect(function(){g&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(g,"polylinecomplete",a)))},[g,a]),f.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),f.useEffect(function(){et(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(he(he({},e||{}),{map:p}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),i&&O(google.maps.event.addListener(_,"markercomplete",i)),o&&A(google.maps.event.addListener(_,"overlaycomplete",o)),s&&P(google.maps.event.addListener(_,"polygoncomplete",s)),a&&j(google.maps.event.addListener(_,"polylinecomplete",a)),u&&K(google.maps.event.addListener(_,"rectanglecomplete",u)),y(_),l&&l(_),function(){g!==null&&(d&&google.maps.event.removeListener(d),b&&google.maps.event.removeListener(b),w&&google.maps.event.removeListener(w),R&&google.maps.event.removeListener(R),I&&google.maps.event.removeListener(I),N&&google.maps.event.removeListener(N),c&&c(g),g.setMap(null))}},[]),null}f.memo(ep),function(t){He(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)},et(!!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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:aa,eventMap:sa,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=Oe({updaterMap:aa,eventMap:sa,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=Be,e}(f.PureComponent);var ua={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"},la={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)}},Fr={};function tp(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,u=t.animation,l=t.clickable,c=t.cursor,p=t.icon,h=t.label,g=t.opacity,y=t.shape,v=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,b=t.onDrag,O=t.onDragEnd,E=t.onDragStart,w=t.onMouseOut,A=t.onMouseOver,F=t.onMouseUp,R=t.onMouseDown,P=t.onRightClick,z=t.onClickableChanged,I=t.onCursorChanged,j=t.onAnimationChanged,T=t.onDraggableChanged,N=t.onFlatChanged,K=t.onIconChanged,_=t.onPositionChanged,ie=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,H=t.onZindexChanged,J=t.onLoad,q=t.onUnmount,ee=f.useContext(Be),Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1],xe=f.useState(null),pt=xe[0],st=xe[1],an=f.useState(null),xt=an[0],Lt=an[1],_n=f.useState(null),zn=_n[0],Wn=_n[1],Un=f.useState(null),Tt=Un[0],An=Un[1],Ut=f.useState(null),un=Ut[0],Hn=Ut[1],Br=f.useState(null),Rn=Br[0],xr=Br[1],Wi=f.useState(null),Ln=Wi[0],Sr=Wi[1],Ui=f.useState(null),Vn=Ui[0],Ar=Ui[1],Lr=f.useState(null),qn=Lr[0],Hi=Lr[1],Ri=f.useState(null),Gn=Ri[0],S=Ri[1],$=f.useState(null),oe=$[0],ye=$[1],ke=f.useState(null),je=ke[0],Me=ke[1],Le=f.useState(null),tt=Le[0],Ge=Le[1],Je=f.useState(null),at=Je[0],Ht=Je[1];f.useEffect(function(){C!==null&&C.setMap(ee)},[ee]),f.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),f.useEffect(function(){typeof s<"u"&&C!==null&&C.setDraggable(s)},[C,s]),f.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),f.useEffect(function(){typeof a<"u"&&C!==null&&C.setVisible(a)},[C,a]),f.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),f.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),f.useEffect(function(){C&&c!==void 0&&C.setCursor(c)},[C,c]),f.useEffect(function(){C&&p!==void 0&&C.setIcon(p)},[C,p]),f.useEffect(function(){C&&h!==void 0&&C.setLabel(h)},[C,h]),f.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),f.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),f.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),f.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),f.useEffect(function(){C&&B&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(C,"dblclick",B)))},[B]),f.useEffect(function(){C&&O&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(C,"dragend",O)))},[O]),f.useEffect(function(){C&&E&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(C,"dragstart",E)))},[E]),f.useEffect(function(){C&&R&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(C,"mousedown",R)))},[R]),f.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(C,"mouseout",w)))},[w]),f.useEffect(function(){C&&A&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),f.useEffect(function(){C&&F&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(C,"mouseup",F)))},[F]),f.useEffect(function(){C&&P&&(pt!==null&&google.maps.event.removeListener(pt),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),f.useEffect(function(){C&&D&&(xt!==null&&google.maps.event.removeListener(xt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),f.useEffect(function(){C&&b&&(zn!==null&&google.maps.event.removeListener(zn),Wn(google.maps.event.addListener(C,"drag",b)))},[b]),f.useEffect(function(){C&&z&&(Tt!==null&&google.maps.event.removeListener(Tt),An(google.maps.event.addListener(C,"clickable_changed",z)))},[z]),f.useEffect(function(){C&&I&&(un!==null&&google.maps.event.removeListener(un),Hn(google.maps.event.addListener(C,"cursor_changed",I)))},[I]),f.useEffect(function(){C&&j&&(Rn!==null&&google.maps.event.removeListener(Rn),xr(google.maps.event.addListener(C,"animation_changed",j)))},[j]),f.useEffect(function(){C&&T&&(Ln!==null&&google.maps.event.removeListener(Ln),Sr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),f.useEffect(function(){C&&N&&(Vn!==null&&google.maps.event.removeListener(Vn),Ar(google.maps.event.addListener(C,"flat_changed",N)))},[N]),f.useEffect(function(){C&&K&&(qn!==null&&google.maps.event.removeListener(qn),Hi(google.maps.event.addListener(C,"icon_changed",K)))},[K]),f.useEffect(function(){C&&_&&(Gn!==null&&google.maps.event.removeListener(Gn),S(google.maps.event.addListener(C,"position_changed",_)))},[_]),f.useEffect(function(){C&&ie&&(oe!==null&&google.maps.event.removeListener(oe),ye(google.maps.event.addListener(C,"shape_changed",ie)))},[ie]),f.useEffect(function(){C&&re&&(je!==null&&google.maps.event.removeListener(je),Me(google.maps.event.addListener(C,"title_changed",re)))},[re]),f.useEffect(function(){C&&k&&(tt!==null&&google.maps.event.removeListener(tt),Ge(google.maps.event.addListener(C,"visible_changed",k)))},[k]),f.useEffect(function(){C&&H&&(at!==null&&google.maps.event.removeListener(at),Ht(google.maps.event.addListener(C,"zindex_changed",H)))},[H]),f.useEffect(function(){var nt=he(he(he({},n||Fr),r?Fr:{map:ee}),{position:e}),Ee=new google.maps.Marker(nt);return r?r.addMarker(Ee,!!i):Ee.setMap(ee),e&&Ee.setPosition(e),typeof a<"u"&&Ee.setVisible(a),typeof s<"u"&&Ee.setDraggable(s),typeof l<"u"&&Ee.setClickable(l),typeof c=="string"&&Ee.setCursor(c),p&&Ee.setIcon(p),typeof h<"u"&&Ee.setLabel(h),typeof g<"u"&&Ee.setOpacity(g),y&&Ee.setShape(y),typeof v=="string"&&Ee.setTitle(v),typeof d=="number"&&Ee.setZIndex(d),B&&X(google.maps.event.addListener(Ee,"dblclick",B)),O&&le(google.maps.event.addListener(Ee,"dragend",O)),E&&ve(google.maps.event.addListener(Ee,"dragstart",E)),R&&De(google.maps.event.addListener(Ee,"mousedown",R)),w&&ae(google.maps.event.addListener(Ee,"mouseout",w)),A&&we(google.maps.event.addListener(Ee,"mouseover",A)),F&&$e(google.maps.event.addListener(Ee,"mouseup",F)),P&&st(google.maps.event.addListener(Ee,"rightclick",P)),D&&Lt(google.maps.event.addListener(Ee,"click",D)),b&&Wn(google.maps.event.addListener(Ee,"drag",b)),z&&An(google.maps.event.addListener(Ee,"clickable_changed",z)),I&&Hn(google.maps.event.addListener(Ee,"cursor_changed",I)),j&&xr(google.maps.event.addListener(Ee,"animation_changed",j)),T&&Sr(google.maps.event.addListener(Ee,"draggable_changed",T)),N&&Ar(google.maps.event.addListener(Ee,"flat_changed",N)),K&&Hi(google.maps.event.addListener(Ee,"icon_changed",K)),_&&S(google.maps.event.addListener(Ee,"position_changed",_)),ie&&ye(google.maps.event.addListener(Ee,"shape_changed",ie)),re&&Me(google.maps.event.addListener(Ee,"title_changed",re)),k&&Ge(google.maps.event.addListener(Ee,"visible_changed",k)),H&&Ht(google.maps.event.addListener(Ee,"zindex_changed",H)),W(Ee),J&&J(Ee),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),Ne!==null&&google.maps.event.removeListener(Ne),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),pt!==null&&google.maps.event.removeListener(pt),xt!==null&&google.maps.event.removeListener(xt),Tt!==null&&google.maps.event.removeListener(Tt),un!==null&&google.maps.event.removeListener(un),Rn!==null&&google.maps.event.removeListener(Rn),Ln!==null&&google.maps.event.removeListener(Ln),Vn!==null&&google.maps.event.removeListener(Vn),qn!==null&&google.maps.event.removeListener(qn),Gn!==null&&google.maps.event.removeListener(Gn),je!==null&&google.maps.event.removeListener(je),tt!==null&&google.maps.event.removeListener(tt),at!==null&&google.maps.event.removeListener(at),q&&q(Ee),r?r.removeMarker(Ee,!!i):Ee&&Ee.setMap(null)}},[]);var Rt=f.useMemo(function(){return o?f.Children.map(o,function(nt){if(!f.isValidElement(nt))return nt;var Ee=nt;return f.cloneElement(Ee,{anchor:C})}):null},[o,C]);return x.jsx(x.Fragment,{children:Rt})||null}f.memo(tp);var np=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=he(he(he({},this.props.options||Fr),this.props.clusterer?Fr:{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=Oe({updaterMap:la,eventMap:ua,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=Oe({updaterMap:la,eventMap:ua,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=f.Children.map(this.props.children,function(i){if(!f.isValidElement(i))return i;var o=i;return f.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=Be,e}(f.PureComponent),rp=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(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.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,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),c=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 h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(c,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(c,"px, -").concat(l+this.width,"px, -").concat(c+this.height,", -").concat(l,")"));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)),!((o=this.sums)===null||o===void 0)&&o.html&&(g.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(g),this.div.title=a,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}(),ip=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 rp(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 o=i[r],s=o.getPosition();s&&e.extend(s)}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 o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var c=l[u];c.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 op(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var sp=2e3,ap=500,up="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",lp="png",cp=[53,56,66,78,90],fp="cluster",ca=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||up,this.imageExtension=r.imageExtension||lp,this.imageSizes=r.imageSizes||cp,this.calculator=r.calculator||op,this.batchSize=r.batchSize||sp,this.batchSizeIE=r.batchSizeIE||ap,this.clusterClass=r.clusterClass||fp,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,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,u=this.listeners;a<u.length;a++){var l=u[a];google.maps.event.removeListener(l)}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 o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.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,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}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 o=i[r];o.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 o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}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 o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},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,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var u=n.getCenter(),l=e.getPosition();if(u&&l){var c=this.distanceBetweenPoints(u,l);c<r&&(r=c,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new ip(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,o=(r==null?void 0:r.getZoom())||0,s=o>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)),a=this.getExtendedBounds(s),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var c=this.markers[l];c&&!c.isAdded&&this.isMarkerInBounds(c,a)&&(!this.ignoreHidden||this.ignoreHidden&&c.getVisible())&&this.addToClosestCluster(c)}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,h=this.clusters;p<h.length;p++){var g=h[p];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ie={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)}},dp={};function pp(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,u=t.gridSize,l=t.ignoreHidden,c=t.imageExtension,p=t.imagePath,h=t.imageSizes,g=t.maxZoom,y=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,b=t.onClusteringBegin,O=t.onClusteringEnd,E=t.onMouseOver,w=t.onMouseOut,A=t.onLoad,F=t.onUnmount,R=f.useState(null),P=R[0],z=R[1],I=f.useContext(Be),j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1];return f.useEffect(function(){P&&w&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(P,bt.onMouseOut,w)))},[w]),f.useEffect(function(){P&&E&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(P,bt.onMouseOver,E)))},[E]),f.useEffect(function(){P&&B&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(P,bt.onClick,B)))},[B]),f.useEffect(function(){P&&b&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(P,bt.onClusteringBegin,b)))},[b]),f.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),ie(google.maps.event.addListener(P,bt.onClusteringEnd,O)))},[O]),f.useEffect(function(){typeof r<"u"&&P!==null&&Ie.averageCenter(P,r)},[P,r]),f.useEffect(function(){typeof i<"u"&&P!==null&&Ie.batchSizeIE(P,i)},[P,i]),f.useEffect(function(){typeof o<"u"&&P!==null&&Ie.calculator(P,o)},[P,o]),f.useEffect(function(){typeof s<"u"&&P!==null&&Ie.clusterClass(P,s)},[P,s]),f.useEffect(function(){typeof a<"u"&&P!==null&&Ie.enableRetinaIcons(P,a)},[P,a]),f.useEffect(function(){typeof u<"u"&&P!==null&&Ie.gridSize(P,u)},[P,u]),f.useEffect(function(){typeof l<"u"&&P!==null&&Ie.ignoreHidden(P,l)},[P,l]),f.useEffect(function(){typeof c<"u"&&P!==null&&Ie.imageExtension(P,c)},[P,c]),f.useEffect(function(){typeof p<"u"&&P!==null&&Ie.imagePath(P,p)},[P,p]),f.useEffect(function(){typeof h<"u"&&P!==null&&Ie.imageSizes(P,h)},[P,h]),f.useEffect(function(){typeof g<"u"&&P!==null&&Ie.maxZoom(P,g)},[P,g]),f.useEffect(function(){typeof y<"u"&&P!==null&&Ie.minimumClusterSize(P,y)},[P,y]),f.useEffect(function(){typeof v<"u"&&P!==null&&Ie.styles(P,v)},[P,v]),f.useEffect(function(){typeof d<"u"&&P!==null&&Ie.title(P,d)},[P,d]),f.useEffect(function(){typeof D<"u"&&P!==null&&Ie.zoomOnClick(P,D)},[P,D]),f.useEffect(function(){if(I){var U=he({},n||dp),M=new ca(I,[],U);return r&&Ie.averageCenter(M,r),i&&Ie.batchSizeIE(M,i),o&&Ie.calculator(M,o),s&&Ie.clusterClass(M,s),a&&Ie.enableRetinaIcons(M,a),u&&Ie.gridSize(M,u),l&&Ie.ignoreHidden(M,l),c&&Ie.imageExtension(M,c),p&&Ie.imagePath(M,p),h&&Ie.imageSizes(M,h),g&&Ie.maxZoom(M,g),y&&Ie.minimumClusterSize(M,y),v&&Ie.styles(M,v),d&&Ie.title(M,d),D&&Ie.zoomOnClick(M,D),w&&ee(google.maps.event.addListener(M,bt.onMouseOut,w)),E&&W(google.maps.event.addListener(M,bt.onMouseOver,E)),B&&N(google.maps.event.addListener(M,bt.onClick,B)),b&&ie(google.maps.event.addListener(M,bt.onClusteringBegin,b)),O&&H(google.maps.event.addListener(M,bt.onClusteringEnd,O)),z(M),A&&A(M),function(){q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),F&&F(M)}}},[]),P!==null&&e(P)||null}f.memo(pp),function(t){He(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 ca(this.context,[],this.props.options);this.registeredEvents=Oe({updaterMap:Ie,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=Oe({updaterMap:Ie,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=Be,e}(f.PureComponent);function fa(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var da=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(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),e.enableEventPropagation||fa(l)};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 o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var u=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,u,fa))}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,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,u=s.offsetHeight,l=this.pixelOffset.width,c=this.pixelOffset.height,p=this.div.offsetWidth,h=this.div.offsetHeight,g=this.infoBoxClearance.width,y=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+g?r=d.x+l-g:d.x+p+l+g>a&&(r=d.x+p+l+g-a),this.alignBottom?d.y<-c+y+h?i=d.y+c-y-h:d.y+c+y>u&&(i=d.y+c+y-u):d.y<-c+y?i=d.y+c-y:d.y+h+c+y>u&&(i=d.y+h+c+y-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 o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),pa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ha={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)}},hp={};function vp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){if(g){var _=r||hp,ie=_.position,re=Gi(_,["position"]),k=void 0;ie&&!(ie instanceof google.maps.LatLng)&&(k=new google.maps.LatLng(ie.lat,ie.lng));var H=new da(he(he({},re),k?{position:k}:{}));K.current=document.createElement("div"),d(H),s&&b(google.maps.event.addListener(H,"closeclick",s)),a&&w(google.maps.event.addListener(H,"domready",a)),u&&R(google.maps.event.addListener(H,"content_changed",u)),l&&I(google.maps.event.addListener(H,"position_changed",l)),c&&N(google.maps.event.addListener(H,"zindex_changed",c)),H.setContent(K.current),n?H.open(g,n):H.getPosition()?H.open(g):et(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(H)}return function(){v!==null&&(B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(v),v.close())}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(vp),function(t){He(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):et(!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=Gi(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new da(he(he({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Oe({updaterMap:ha,eventMap:pa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:ha,eventMap:pa,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?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var gp=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,o;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(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},va=Ys(gp);const ga=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Yi=1,Xn=8;class Ki{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!==Yi)throw new Error(`Got v${i} data when expected v${Yi}.`);const o=ga[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Ki(a,s,o,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 o=ga.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Xn+s+a+u),this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Yi<<4)+o]),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 Xi(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:o,coords:s,nodeSize:a}=this,u=[0,o.length-1,0],l=[];for(;u.length;){const c=u.pop()||0,p=u.pop()||0,h=u.pop()||0;if(p-h<=a){for(let d=h;d<=p;d++){const D=s[2*d],B=s[2*d+1];D>=e&&D<=r&&B>=n&&B<=i&&l.push(o[d])}continue}const g=h+p>>1,y=s[2*g],v=s[2*g+1];y>=e&&y<=r&&v>=n&&v<=i&&l.push(o[g]),(c===0?e<=y:n<=v)&&(u.push(h),u.push(g-1),u.push(1-c)),(c===0?r>=y:i>=v)&&(u.push(g+1),u.push(p),u.push(1-c))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],u=[],l=r*r;for(;a.length;){const c=a.pop()||0,p=a.pop()||0,h=a.pop()||0;if(p-h<=s){for(let d=h;d<=p;d++)ya(o[2*d],o[2*d+1],e,n)<=l&&u.push(i[d]);continue}const g=h+p>>1,y=o[2*g],v=o[2*g+1];ya(y,v,e,n)<=l&&u.push(i[g]),(c===0?e-r<=y:n-r<=v)&&(a.push(h),a.push(g-1),a.push(1-c)),(c===0?e+r>=y:n+r>=v)&&(a.push(g+1),a.push(p),a.push(1-c))}return u}}function Xi(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;ma(t,e,s,r,i,o),Xi(t,e,n,r,s-1,1-o),Xi(t,e,n,s+1,i,1-o)}function ma(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const l=i-r+1,c=n-r+1,p=Math.log(l),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(l-h)/l)*(c-l/2<0?-1:1),y=Math.max(r,Math.floor(n-c*h/l+g)),v=Math.min(i,Math.floor(n+(l-c)*h/l+g));ma(t,e,n,y,v,o)}const s=e[2*n+o];let a=r,u=i;for(Jn(t,e,r,n),e[2*i+o]>s&&Jn(t,e,r,i);a<u;){for(Jn(t,e,a,u),a++,u--;e[2*a+o]<s;)a++;for(;e[2*u+o]>s;)u--}e[2*r+o]===s?Jn(t,e,r,u):(u++,Jn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Jn(t,e,n,r){Ji(t,n,r),Ji(e,2*n,2*r),Ji(e,2*n+1,2*r+1)}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ya(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const mp={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ca=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),dn=2,Vt=3,Qi=4,qt=5,Da=6;class yp{constructor(e){this.options=Object.assign(Object.create(mp),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 o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let u=0;u<e.length;u++){const l=e[u];if(!l.geometry)continue;const[c,p]=l.geometry.coordinates,h=Ca(Mr(c)),g=Ca(kr(p));s.push(h,g,1/0,u,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let u=i;u>=r;u--){const l=+Date.now();a=this.trees[u]=this._createTree(this._cluster(a,u)),n&&console.log("z%d: %d clusters in %dms",u,a.numItems,+Date.now()-l)}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 o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const p=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return p.concat(h)}const a=this.trees[this._limitZoom(n)],u=a.range(Mr(r),kr(s),Mr(o),kr(i)),l=a.data,c=[];for(const p of u){const h=this.stride*p;c.push(l[h+qt]>1?Ea(l,h,this.clusterProps):this.points[l[h+Vt]])}return c}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=s[n*this.stride],l=s[n*this.stride+1],c=o.within(u,l,a),p=[];for(const h of c){const g=h*this.stride;s[g+Qi]===e&&p.push(s[g+qt]>1?Ea(s,g,this.clusterProps):this.points[s[g+Vt]])}if(p.length===0)throw new Error(i);return p}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)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,u=a/s,l=(r-u)/o,c=(r+1+u)/o,p={features:[]};return this._addTileFeatures(i.range((n-u)/o,l,(n+1+u)/o,c),i.data,n,r,o,p),n===0&&this._addTileFeatures(i.range(1-u/o,l,1,c),i.data,o,r,o,p),n===o-1&&this._addTileFeatures(i.range(0,l,u/o,c),i.data,-1,r,o,p),p.features.length?p: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,o){const s=this.getChildren(n);for(const a of s){const u=a.properties;if(u&&u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(e,u.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Ki(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,o,s){for(const a of e){const u=a*this.stride,l=n[u+qt]>1;let c,p,h;if(l)c=ba(n,u,this.clusterProps),p=n[u],h=n[u+1];else{const v=this.points[n[u+Vt]];c=v.properties;const[d,D]=v.geometry.coordinates;p=Mr(d),h=kr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(p*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:c};let y;l||this.options.generateId?y=n[u+Vt]:y=this.points[n[u+Vt]].id,y!==void 0&&(g.id=y),s.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:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),u=e.data,l=[],c=this.stride;for(let p=0;p<u.length;p+=c){if(u[p+dn]<=n)continue;u[p+dn]=n;const h=u[p],g=u[p+1],y=e.within(u[p],u[p+1],a),v=u[p+qt];let d=v;for(const D of y){const B=D*c;u[B+dn]>n&&(d+=u[B+qt])}if(d>v&&d>=s){let D=h*v,B=g*v,b,O=-1;const E=((p/c|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*c;if(u[A+dn]<=n)continue;u[A+dn]=n;const F=u[A+qt];D+=u[A]*F,B+=u[A+1]*F,u[A+Qi]=E,o&&(b||(b=this._map(u,p,!0),O=this.clusterProps.length,this.clusterProps.push(b)),o(b,this._map(u,A)))}u[p+Qi]=E,l.push(D/d,B/d,1/0,E,-1,d),o&&l.push(O)}else{for(let D=0;D<c;D++)l.push(u[p+D]);if(d>1)for(const D of y){const B=D*c;if(!(u[B+dn]<=n)){u[B+dn]=n;for(let b=0;b<c;b++)l.push(u[B+b])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+qt]>1){const s=this.clusterProps[e[n+Da]];return r?Object.assign({},s):s}const i=this.points[e[n+Vt]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Ea(t,e,n){return{type:"Feature",id:t[e+Vt],properties:ba(t,e,n),geometry:{type:"Point",coordinates:[Cp(t[e]),Dp(t[e+1])]}}}function ba(t,e,n){const r=t[e+qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Da],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Vt],point_count:r,point_count_abbreviated:i})}function Mr(t){return t/360+.5}function kr(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 Cp(t){return(t-.5)*360}function Dp(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
53
|
+
`)),console.error(z)})},[n,w,o]);var A=f.useRef();return f.useEffect(function(){A.current&&c!==A.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"),A.current=c},[c]),{isLoaded:D,loadError:O,url:w}}var Kd=x.jsx(ta,{});function Xd(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Gi(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Yd(s),u=a.isLoaded,l=a.loadError;return f.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),f.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),f.useEffect(function(){return function(){i&&i()}},[i]),u?o:e||Kd}f.memo(Xd);var ra;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(ra||(ra={}));var ia={},oa={options:function(t,e){t.setOptions(e)}};function Jd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=f.useContext(Be),o=f.useState(null),s=o[0],a=o[1];return f.useEffect(function(){s!==null&&s.setMap(i)},[i]),f.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),f.useEffect(function(){var u=new google.maps.TrafficLayer(he(he({},e||{}),{map:i}));return a(u),n&&n(u),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}f.memo(Jd),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:oa,eventMap:ia,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=Le({updaterMap:oa,eventMap:ia,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=Be,e}(f.PureComponent);function Qd(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}f.memo(Qd),function(t){He(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=Be,e}(f.PureComponent);function $d(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}f.memo($d),function(t){He(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=Be,e}(f.PureComponent);var sa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},aa={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function ep(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,u=t.onRectangleComplete,l=t.onLoad,c=t.onUnmount,p=f.useContext(Be),h=f.useState(null),g=h[0],y=h[1],v=f.useState(null),d=v[0],D=v[1],B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1];return f.useEffect(function(){g!==null&&g.setMap(p)},[p]),f.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),f.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),f.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),f.useEffect(function(){g&&i&&(b!==null&&google.maps.event.removeListener(b),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),f.useEffect(function(){g&&o&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",o)))},[g,o]),f.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(g,"polygoncomplete",s)))},[g,s]),f.useEffect(function(){g&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(g,"polylinecomplete",a)))},[g,a]),f.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),f.useEffect(function(){et(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(he(he({},e||{}),{map:p}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),i&&O(google.maps.event.addListener(_,"markercomplete",i)),o&&A(google.maps.event.addListener(_,"overlaycomplete",o)),s&&P(google.maps.event.addListener(_,"polygoncomplete",s)),a&&j(google.maps.event.addListener(_,"polylinecomplete",a)),u&&K(google.maps.event.addListener(_,"rectanglecomplete",u)),y(_),l&&l(_),function(){g!==null&&(d&&google.maps.event.removeListener(d),b&&google.maps.event.removeListener(b),w&&google.maps.event.removeListener(w),R&&google.maps.event.removeListener(R),I&&google.maps.event.removeListener(I),N&&google.maps.event.removeListener(N),c&&c(g),g.setMap(null))}},[]),null}f.memo(ep),function(t){He(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)},et(!!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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:aa,eventMap:sa,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=Le({updaterMap:aa,eventMap:sa,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=Be,e}(f.PureComponent);var ua={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"},la={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)}},Fr={};function tp(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,u=t.animation,l=t.clickable,c=t.cursor,p=t.icon,h=t.label,g=t.opacity,y=t.shape,v=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,b=t.onDrag,O=t.onDragEnd,E=t.onDragStart,w=t.onMouseOut,A=t.onMouseOver,F=t.onMouseUp,R=t.onMouseDown,P=t.onRightClick,z=t.onClickableChanged,I=t.onCursorChanged,j=t.onAnimationChanged,T=t.onDraggableChanged,N=t.onFlatChanged,K=t.onIconChanged,_=t.onPositionChanged,ie=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,H=t.onZindexChanged,J=t.onLoad,q=t.onUnmount,ee=f.useContext(Be),Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1],xe=f.useState(null),pt=xe[0],st=xe[1],an=f.useState(null),xt=an[0],Lt=an[1],_n=f.useState(null),zn=_n[0],Wn=_n[1],Un=f.useState(null),Tt=Un[0],An=Un[1],Ut=f.useState(null),un=Ut[0],Hn=Ut[1],Br=f.useState(null),Rn=Br[0],xr=Br[1],Wi=f.useState(null),Ln=Wi[0],Sr=Wi[1],Ui=f.useState(null),Vn=Ui[0],Ar=Ui[1],Lr=f.useState(null),qn=Lr[0],Hi=Lr[1],Ri=f.useState(null),Gn=Ri[0],S=Ri[1],$=f.useState(null),oe=$[0],ye=$[1],ke=f.useState(null),je=ke[0],Me=ke[1],Ae=f.useState(null),tt=Ae[0],Ge=Ae[1],Je=f.useState(null),at=Je[0],Ht=Je[1];f.useEffect(function(){C!==null&&C.setMap(ee)},[ee]),f.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),f.useEffect(function(){typeof s<"u"&&C!==null&&C.setDraggable(s)},[C,s]),f.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),f.useEffect(function(){typeof a<"u"&&C!==null&&C.setVisible(a)},[C,a]),f.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),f.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),f.useEffect(function(){C&&c!==void 0&&C.setCursor(c)},[C,c]),f.useEffect(function(){C&&p!==void 0&&C.setIcon(p)},[C,p]),f.useEffect(function(){C&&h!==void 0&&C.setLabel(h)},[C,h]),f.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),f.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),f.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),f.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),f.useEffect(function(){C&&B&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(C,"dblclick",B)))},[B]),f.useEffect(function(){C&&O&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(C,"dragend",O)))},[O]),f.useEffect(function(){C&&E&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(C,"dragstart",E)))},[E]),f.useEffect(function(){C&&R&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(C,"mousedown",R)))},[R]),f.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(C,"mouseout",w)))},[w]),f.useEffect(function(){C&&A&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),f.useEffect(function(){C&&F&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(C,"mouseup",F)))},[F]),f.useEffect(function(){C&&P&&(pt!==null&&google.maps.event.removeListener(pt),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),f.useEffect(function(){C&&D&&(xt!==null&&google.maps.event.removeListener(xt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),f.useEffect(function(){C&&b&&(zn!==null&&google.maps.event.removeListener(zn),Wn(google.maps.event.addListener(C,"drag",b)))},[b]),f.useEffect(function(){C&&z&&(Tt!==null&&google.maps.event.removeListener(Tt),An(google.maps.event.addListener(C,"clickable_changed",z)))},[z]),f.useEffect(function(){C&&I&&(un!==null&&google.maps.event.removeListener(un),Hn(google.maps.event.addListener(C,"cursor_changed",I)))},[I]),f.useEffect(function(){C&&j&&(Rn!==null&&google.maps.event.removeListener(Rn),xr(google.maps.event.addListener(C,"animation_changed",j)))},[j]),f.useEffect(function(){C&&T&&(Ln!==null&&google.maps.event.removeListener(Ln),Sr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),f.useEffect(function(){C&&N&&(Vn!==null&&google.maps.event.removeListener(Vn),Ar(google.maps.event.addListener(C,"flat_changed",N)))},[N]),f.useEffect(function(){C&&K&&(qn!==null&&google.maps.event.removeListener(qn),Hi(google.maps.event.addListener(C,"icon_changed",K)))},[K]),f.useEffect(function(){C&&_&&(Gn!==null&&google.maps.event.removeListener(Gn),S(google.maps.event.addListener(C,"position_changed",_)))},[_]),f.useEffect(function(){C&&ie&&(oe!==null&&google.maps.event.removeListener(oe),ye(google.maps.event.addListener(C,"shape_changed",ie)))},[ie]),f.useEffect(function(){C&&re&&(je!==null&&google.maps.event.removeListener(je),Me(google.maps.event.addListener(C,"title_changed",re)))},[re]),f.useEffect(function(){C&&k&&(tt!==null&&google.maps.event.removeListener(tt),Ge(google.maps.event.addListener(C,"visible_changed",k)))},[k]),f.useEffect(function(){C&&H&&(at!==null&&google.maps.event.removeListener(at),Ht(google.maps.event.addListener(C,"zindex_changed",H)))},[H]),f.useEffect(function(){var nt=he(he(he({},n||Fr),r?Fr:{map:ee}),{position:e}),Ee=new google.maps.Marker(nt);return r?r.addMarker(Ee,!!i):Ee.setMap(ee),e&&Ee.setPosition(e),typeof a<"u"&&Ee.setVisible(a),typeof s<"u"&&Ee.setDraggable(s),typeof l<"u"&&Ee.setClickable(l),typeof c=="string"&&Ee.setCursor(c),p&&Ee.setIcon(p),typeof h<"u"&&Ee.setLabel(h),typeof g<"u"&&Ee.setOpacity(g),y&&Ee.setShape(y),typeof v=="string"&&Ee.setTitle(v),typeof d=="number"&&Ee.setZIndex(d),B&&X(google.maps.event.addListener(Ee,"dblclick",B)),O&&le(google.maps.event.addListener(Ee,"dragend",O)),E&&ve(google.maps.event.addListener(Ee,"dragstart",E)),R&&De(google.maps.event.addListener(Ee,"mousedown",R)),w&&ae(google.maps.event.addListener(Ee,"mouseout",w)),A&&we(google.maps.event.addListener(Ee,"mouseover",A)),F&&$e(google.maps.event.addListener(Ee,"mouseup",F)),P&&st(google.maps.event.addListener(Ee,"rightclick",P)),D&&Lt(google.maps.event.addListener(Ee,"click",D)),b&&Wn(google.maps.event.addListener(Ee,"drag",b)),z&&An(google.maps.event.addListener(Ee,"clickable_changed",z)),I&&Hn(google.maps.event.addListener(Ee,"cursor_changed",I)),j&&xr(google.maps.event.addListener(Ee,"animation_changed",j)),T&&Sr(google.maps.event.addListener(Ee,"draggable_changed",T)),N&&Ar(google.maps.event.addListener(Ee,"flat_changed",N)),K&&Hi(google.maps.event.addListener(Ee,"icon_changed",K)),_&&S(google.maps.event.addListener(Ee,"position_changed",_)),ie&&ye(google.maps.event.addListener(Ee,"shape_changed",ie)),re&&Me(google.maps.event.addListener(Ee,"title_changed",re)),k&&Ge(google.maps.event.addListener(Ee,"visible_changed",k)),H&&Ht(google.maps.event.addListener(Ee,"zindex_changed",H)),W(Ee),J&&J(Ee),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),Ne!==null&&google.maps.event.removeListener(Ne),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),pt!==null&&google.maps.event.removeListener(pt),xt!==null&&google.maps.event.removeListener(xt),Tt!==null&&google.maps.event.removeListener(Tt),un!==null&&google.maps.event.removeListener(un),Rn!==null&&google.maps.event.removeListener(Rn),Ln!==null&&google.maps.event.removeListener(Ln),Vn!==null&&google.maps.event.removeListener(Vn),qn!==null&&google.maps.event.removeListener(qn),Gn!==null&&google.maps.event.removeListener(Gn),je!==null&&google.maps.event.removeListener(je),tt!==null&&google.maps.event.removeListener(tt),at!==null&&google.maps.event.removeListener(at),q&&q(Ee),r?r.removeMarker(Ee,!!i):Ee&&Ee.setMap(null)}},[]);var Rt=f.useMemo(function(){return o?f.Children.map(o,function(nt){if(!f.isValidElement(nt))return nt;var Ee=nt;return f.cloneElement(Ee,{anchor:C})}):null},[o,C]);return x.jsx(x.Fragment,{children:Rt})||null}f.memo(tp);var np=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=he(he(he({},this.props.options||Fr),this.props.clusterer?Fr:{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=Le({updaterMap:la,eventMap:ua,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=Le({updaterMap:la,eventMap:ua,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=f.Children.map(this.props.children,function(i){if(!f.isValidElement(i))return i;var o=i;return f.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=Be,e}(f.PureComponent),rp=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(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.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,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),c=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 h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(c,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(c,"px, -").concat(l+this.width,"px, -").concat(c+this.height,", -").concat(l,")"));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)),!((o=this.sums)===null||o===void 0)&&o.html&&(g.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(g),this.div.title=a,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}(),ip=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 rp(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 o=i[r],s=o.getPosition();s&&e.extend(s)}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 o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var c=l[u];c.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 op(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var sp=2e3,ap=500,up="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",lp="png",cp=[53,56,66,78,90],fp="cluster",ca=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||up,this.imageExtension=r.imageExtension||lp,this.imageSizes=r.imageSizes||cp,this.calculator=r.calculator||op,this.batchSize=r.batchSize||sp,this.batchSizeIE=r.batchSizeIE||ap,this.clusterClass=r.clusterClass||fp,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,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,u=this.listeners;a<u.length;a++){var l=u[a];google.maps.event.removeListener(l)}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 o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.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,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}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 o=i[r];o.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 o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}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 o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},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,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var u=n.getCenter(),l=e.getPosition();if(u&&l){var c=this.distanceBetweenPoints(u,l);c<r&&(r=c,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new ip(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,o=(r==null?void 0:r.getZoom())||0,s=o>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)),a=this.getExtendedBounds(s),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var c=this.markers[l];c&&!c.isAdded&&this.isMarkerInBounds(c,a)&&(!this.ignoreHidden||this.ignoreHidden&&c.getVisible())&&this.addToClosestCluster(c)}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,h=this.clusters;p<h.length;p++){var g=h[p];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ie={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)}},dp={};function pp(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,u=t.gridSize,l=t.ignoreHidden,c=t.imageExtension,p=t.imagePath,h=t.imageSizes,g=t.maxZoom,y=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,b=t.onClusteringBegin,O=t.onClusteringEnd,E=t.onMouseOver,w=t.onMouseOut,A=t.onLoad,F=t.onUnmount,R=f.useState(null),P=R[0],z=R[1],I=f.useContext(Be),j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1];return f.useEffect(function(){P&&w&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(P,bt.onMouseOut,w)))},[w]),f.useEffect(function(){P&&E&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(P,bt.onMouseOver,E)))},[E]),f.useEffect(function(){P&&B&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(P,bt.onClick,B)))},[B]),f.useEffect(function(){P&&b&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(P,bt.onClusteringBegin,b)))},[b]),f.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),ie(google.maps.event.addListener(P,bt.onClusteringEnd,O)))},[O]),f.useEffect(function(){typeof r<"u"&&P!==null&&Ie.averageCenter(P,r)},[P,r]),f.useEffect(function(){typeof i<"u"&&P!==null&&Ie.batchSizeIE(P,i)},[P,i]),f.useEffect(function(){typeof o<"u"&&P!==null&&Ie.calculator(P,o)},[P,o]),f.useEffect(function(){typeof s<"u"&&P!==null&&Ie.clusterClass(P,s)},[P,s]),f.useEffect(function(){typeof a<"u"&&P!==null&&Ie.enableRetinaIcons(P,a)},[P,a]),f.useEffect(function(){typeof u<"u"&&P!==null&&Ie.gridSize(P,u)},[P,u]),f.useEffect(function(){typeof l<"u"&&P!==null&&Ie.ignoreHidden(P,l)},[P,l]),f.useEffect(function(){typeof c<"u"&&P!==null&&Ie.imageExtension(P,c)},[P,c]),f.useEffect(function(){typeof p<"u"&&P!==null&&Ie.imagePath(P,p)},[P,p]),f.useEffect(function(){typeof h<"u"&&P!==null&&Ie.imageSizes(P,h)},[P,h]),f.useEffect(function(){typeof g<"u"&&P!==null&&Ie.maxZoom(P,g)},[P,g]),f.useEffect(function(){typeof y<"u"&&P!==null&&Ie.minimumClusterSize(P,y)},[P,y]),f.useEffect(function(){typeof v<"u"&&P!==null&&Ie.styles(P,v)},[P,v]),f.useEffect(function(){typeof d<"u"&&P!==null&&Ie.title(P,d)},[P,d]),f.useEffect(function(){typeof D<"u"&&P!==null&&Ie.zoomOnClick(P,D)},[P,D]),f.useEffect(function(){if(I){var U=he({},n||dp),M=new ca(I,[],U);return r&&Ie.averageCenter(M,r),i&&Ie.batchSizeIE(M,i),o&&Ie.calculator(M,o),s&&Ie.clusterClass(M,s),a&&Ie.enableRetinaIcons(M,a),u&&Ie.gridSize(M,u),l&&Ie.ignoreHidden(M,l),c&&Ie.imageExtension(M,c),p&&Ie.imagePath(M,p),h&&Ie.imageSizes(M,h),g&&Ie.maxZoom(M,g),y&&Ie.minimumClusterSize(M,y),v&&Ie.styles(M,v),d&&Ie.title(M,d),D&&Ie.zoomOnClick(M,D),w&&ee(google.maps.event.addListener(M,bt.onMouseOut,w)),E&&W(google.maps.event.addListener(M,bt.onMouseOver,E)),B&&N(google.maps.event.addListener(M,bt.onClick,B)),b&&ie(google.maps.event.addListener(M,bt.onClusteringBegin,b)),O&&H(google.maps.event.addListener(M,bt.onClusteringEnd,O)),z(M),A&&A(M),function(){q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),F&&F(M)}}},[]),P!==null&&e(P)||null}f.memo(pp),function(t){He(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 ca(this.context,[],this.props.options);this.registeredEvents=Le({updaterMap:Ie,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=Le({updaterMap:Ie,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=Be,e}(f.PureComponent);function fa(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var da=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(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),e.enableEventPropagation||fa(l)};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 o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var u=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,u,fa))}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,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,u=s.offsetHeight,l=this.pixelOffset.width,c=this.pixelOffset.height,p=this.div.offsetWidth,h=this.div.offsetHeight,g=this.infoBoxClearance.width,y=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+g?r=d.x+l-g:d.x+p+l+g>a&&(r=d.x+p+l+g-a),this.alignBottom?d.y<-c+y+h?i=d.y+c-y-h:d.y+c+y>u&&(i=d.y+c+y-u):d.y<-c+y?i=d.y+c-y:d.y+h+c+y>u&&(i=d.y+h+c+y-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 o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),pa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ha={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)}},hp={};function vp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){if(g){var _=r||hp,ie=_.position,re=Gi(_,["position"]),k=void 0;ie&&!(ie instanceof google.maps.LatLng)&&(k=new google.maps.LatLng(ie.lat,ie.lng));var H=new da(he(he({},re),k?{position:k}:{}));K.current=document.createElement("div"),d(H),s&&b(google.maps.event.addListener(H,"closeclick",s)),a&&w(google.maps.event.addListener(H,"domready",a)),u&&R(google.maps.event.addListener(H,"content_changed",u)),l&&I(google.maps.event.addListener(H,"position_changed",l)),c&&N(google.maps.event.addListener(H,"zindex_changed",c)),H.setContent(K.current),n?H.open(g,n):H.getPosition()?H.open(g):et(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(H)}return function(){v!==null&&(B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(v),v.close())}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(vp),function(t){He(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):et(!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=Gi(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new da(he(he({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Le({updaterMap:ha,eventMap:pa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:ha,eventMap:pa,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?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var gp=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,o;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(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},va=Ys(gp);const ga=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Yi=1,Xn=8;class Ki{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!==Yi)throw new Error(`Got v${i} data when expected v${Yi}.`);const o=ga[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Ki(a,s,o,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 o=ga.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Xn+s+a+u),this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Yi<<4)+o]),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 Xi(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:o,coords:s,nodeSize:a}=this,u=[0,o.length-1,0],l=[];for(;u.length;){const c=u.pop()||0,p=u.pop()||0,h=u.pop()||0;if(p-h<=a){for(let d=h;d<=p;d++){const D=s[2*d],B=s[2*d+1];D>=e&&D<=r&&B>=n&&B<=i&&l.push(o[d])}continue}const g=h+p>>1,y=s[2*g],v=s[2*g+1];y>=e&&y<=r&&v>=n&&v<=i&&l.push(o[g]),(c===0?e<=y:n<=v)&&(u.push(h),u.push(g-1),u.push(1-c)),(c===0?r>=y:i>=v)&&(u.push(g+1),u.push(p),u.push(1-c))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],u=[],l=r*r;for(;a.length;){const c=a.pop()||0,p=a.pop()||0,h=a.pop()||0;if(p-h<=s){for(let d=h;d<=p;d++)ya(o[2*d],o[2*d+1],e,n)<=l&&u.push(i[d]);continue}const g=h+p>>1,y=o[2*g],v=o[2*g+1];ya(y,v,e,n)<=l&&u.push(i[g]),(c===0?e-r<=y:n-r<=v)&&(a.push(h),a.push(g-1),a.push(1-c)),(c===0?e+r>=y:n+r>=v)&&(a.push(g+1),a.push(p),a.push(1-c))}return u}}function Xi(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;ma(t,e,s,r,i,o),Xi(t,e,n,r,s-1,1-o),Xi(t,e,n,s+1,i,1-o)}function ma(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const l=i-r+1,c=n-r+1,p=Math.log(l),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(l-h)/l)*(c-l/2<0?-1:1),y=Math.max(r,Math.floor(n-c*h/l+g)),v=Math.min(i,Math.floor(n+(l-c)*h/l+g));ma(t,e,n,y,v,o)}const s=e[2*n+o];let a=r,u=i;for(Jn(t,e,r,n),e[2*i+o]>s&&Jn(t,e,r,i);a<u;){for(Jn(t,e,a,u),a++,u--;e[2*a+o]<s;)a++;for(;e[2*u+o]>s;)u--}e[2*r+o]===s?Jn(t,e,r,u):(u++,Jn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Jn(t,e,n,r){Ji(t,n,r),Ji(e,2*n,2*r),Ji(e,2*n+1,2*r+1)}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ya(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const mp={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ca=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),dn=2,Vt=3,Qi=4,qt=5,Da=6;class yp{constructor(e){this.options=Object.assign(Object.create(mp),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 o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let u=0;u<e.length;u++){const l=e[u];if(!l.geometry)continue;const[c,p]=l.geometry.coordinates,h=Ca(Mr(c)),g=Ca(kr(p));s.push(h,g,1/0,u,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let u=i;u>=r;u--){const l=+Date.now();a=this.trees[u]=this._createTree(this._cluster(a,u)),n&&console.log("z%d: %d clusters in %dms",u,a.numItems,+Date.now()-l)}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 o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const p=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return p.concat(h)}const a=this.trees[this._limitZoom(n)],u=a.range(Mr(r),kr(s),Mr(o),kr(i)),l=a.data,c=[];for(const p of u){const h=this.stride*p;c.push(l[h+qt]>1?Ea(l,h,this.clusterProps):this.points[l[h+Vt]])}return c}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=s[n*this.stride],l=s[n*this.stride+1],c=o.within(u,l,a),p=[];for(const h of c){const g=h*this.stride;s[g+Qi]===e&&p.push(s[g+qt]>1?Ea(s,g,this.clusterProps):this.points[s[g+Vt]])}if(p.length===0)throw new Error(i);return p}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)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,u=a/s,l=(r-u)/o,c=(r+1+u)/o,p={features:[]};return this._addTileFeatures(i.range((n-u)/o,l,(n+1+u)/o,c),i.data,n,r,o,p),n===0&&this._addTileFeatures(i.range(1-u/o,l,1,c),i.data,o,r,o,p),n===o-1&&this._addTileFeatures(i.range(0,l,u/o,c),i.data,-1,r,o,p),p.features.length?p: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,o){const s=this.getChildren(n);for(const a of s){const u=a.properties;if(u&&u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(e,u.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Ki(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,o,s){for(const a of e){const u=a*this.stride,l=n[u+qt]>1;let c,p,h;if(l)c=ba(n,u,this.clusterProps),p=n[u],h=n[u+1];else{const v=this.points[n[u+Vt]];c=v.properties;const[d,D]=v.geometry.coordinates;p=Mr(d),h=kr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(p*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:c};let y;l||this.options.generateId?y=n[u+Vt]:y=this.points[n[u+Vt]].id,y!==void 0&&(g.id=y),s.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:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),u=e.data,l=[],c=this.stride;for(let p=0;p<u.length;p+=c){if(u[p+dn]<=n)continue;u[p+dn]=n;const h=u[p],g=u[p+1],y=e.within(u[p],u[p+1],a),v=u[p+qt];let d=v;for(const D of y){const B=D*c;u[B+dn]>n&&(d+=u[B+qt])}if(d>v&&d>=s){let D=h*v,B=g*v,b,O=-1;const E=((p/c|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*c;if(u[A+dn]<=n)continue;u[A+dn]=n;const F=u[A+qt];D+=u[A]*F,B+=u[A+1]*F,u[A+Qi]=E,o&&(b||(b=this._map(u,p,!0),O=this.clusterProps.length,this.clusterProps.push(b)),o(b,this._map(u,A)))}u[p+Qi]=E,l.push(D/d,B/d,1/0,E,-1,d),o&&l.push(O)}else{for(let D=0;D<c;D++)l.push(u[p+D]);if(d>1)for(const D of y){const B=D*c;if(!(u[B+dn]<=n)){u[B+dn]=n;for(let b=0;b<c;b++)l.push(u[B+b])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+qt]>1){const s=this.clusterProps[e[n+Da]];return r?Object.assign({},s):s}const i=this.points[e[n+Vt]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Ea(t,e,n){return{type:"Feature",id:t[e+Vt],properties:ba(t,e,n),geometry:{type:"Point",coordinates:[Cp(t[e]),Dp(t[e+1])]}}}function ba(t,e,n){const r=t[e+qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Da],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Vt],point_count:r,point_count_abbreviated:i})}function Mr(t){return t/360+.5}function kr(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 Cp(t){return(t-.5)*360}function Dp(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
|
@@ -68,12 +68,12 @@ React keys must be passed directly to JSX without using spread:
|
|
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>`,a=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const p=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:u,title:a,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:u,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function Ap(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Ap(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Lp=(t,e,n)=>{n.fitBounds(e.bounds)};class Op extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Bp(r),renderer:o=new Sp,onClusterClick:s=Lp}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,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:(mt.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,Qn.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 s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Qn.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new xp(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Qn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Pp(t){var e=zd(),n=f.useState(null),r=n[0],i=n[1];return f.useEffect(function(){if(e&&r===null){var o=new Op(he(he({},t),{map:e}));i(o)}},[e]),r}function Fp(t){var e=t.children,n=t.options,r=Pp(n);return r!==null?e(r):null}f.memo(Fp);var wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ba={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Mp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){var _=new google.maps.InfoWindow(he({},r||{}));return d(_),K.current=document.createElement("div"),s&&b(google.maps.event.addListener(_,"closeclick",s)),a&&w(google.maps.event.addListener(_,"domready",a)),u&&R(google.maps.event.addListener(_,"content_changed",u)),l&&I(google.maps.event.addListener(_,"position_changed",l)),c&&N(google.maps.event.addListener(_,"zindex_changed",c)),_.setContent(K.current),i&&_.setPosition(i),o&&_.setZIndex(o),n?_.open(g,n):_.getPosition()?_.open(g):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(_),_.close()}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(Mp),function(t){He(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):et(!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(he({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Oe({updaterMap:Ba,eventMap:wa,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=Oe({updaterMap:Ba,eventMap:wa,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?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Sa={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)}},kp={};function Tp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,b=f.useContext(Be),O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1];return f.useEffect(function(){E!==null&&E.setMap(b)},[b]),f.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),f.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),f.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),f.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),f.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),f.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),f.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),f.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),f.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),f.useEffect(function(){E&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",c)))},[c]),f.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),f.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),f.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),f.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),f.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),f.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),f.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||kp),{map:b}));return o&&ge.setPath(o),typeof i<"u"&&ge.setVisible(i),typeof r<"u"&&ge.setEditable(r),typeof n<"u"&&ge.setDraggable(n),s&&R(google.maps.event.addListener(ge,"dblclick",s)),a&&I(google.maps.event.addListener(ge,"dragend",a)),u&&N(google.maps.event.addListener(ge,"dragstart",u)),l&&ie(google.maps.event.addListener(ge,"mousedown",l)),c&&H(google.maps.event.addListener(ge,"mousemove",c)),p&&ee(google.maps.event.addListener(ge,"mouseout",p)),h&&W(google.maps.event.addListener(ge,"mouseover",h)),g&&X(google.maps.event.addListener(ge,"mouseup",g)),y&&le(google.maps.event.addListener(ge,"rightclick",y)),v&&ve(google.maps.event.addListener(ge,"click",v)),d&&De(google.maps.event.addListener(ge,"drag",d)),w(ge),D&&D(ge),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),B&&B(ge),ge.setMap(null)}},[]),null}f.memo(Tp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Sa,eventMap:xa,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=Oe({updaterMap:Sa,eventMap:xa,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=Be,e}(f.PureComponent);var Aa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},La={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 Ip(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,b=t.onUnmount,O=t.onEdit,E=f.useContext(Be),w=f.useState(null),A=w[0],F=w[1],R=f.useState(null),P=R[0],z=R[1],I=f.useState(null),j=I[0],T=I[1],N=f.useState(null),K=N[0],_=N[1],ie=f.useState(null),re=ie[0],k=ie[1],H=f.useState(null),J=H[0],q=H[1],ee=f.useState(null),Y=ee[0],C=ee[1],W=f.useState(null),U=W[0],M=W[1],X=f.useState(null),te=X[0],G=X[1],le=f.useState(null),se=le[0],pe=le[1],ve=f.useState(null),Ce=ve[0],me=ve[1],De=f.useState(null),ge=De[0],Ne=De[1];return f.useEffect(function(){A!==null&&A.setMap(E)},[E]),f.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),f.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),f.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),f.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),f.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),f.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),f.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),f.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),f.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),f.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),f.useEffect(function(){A&&c&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",c)))},[c]),f.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),f.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),f.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),f.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),f.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),f.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),f.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),f.useEffect(function(){var ae=new google.maps.Polygon(he(he({},e||{}),{map:E}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&z(google.maps.event.addListener(ae,"dblclick",a)),u&&T(google.maps.event.addListener(ae,"dragend",u)),l&&_(google.maps.event.addListener(ae,"dragstart",l)),c&&k(google.maps.event.addListener(ae,"mousedown",c)),p&&q(google.maps.event.addListener(ae,"mousemove",p)),h&&C(google.maps.event.addListener(ae,"mouseout",h)),g&&M(google.maps.event.addListener(ae,"mouseover",g)),y&&G(google.maps.event.addListener(ae,"mouseup",y)),v&&pe(google.maps.event.addListener(ae,"rightclick",v)),d&&me(google.maps.event.addListener(ae,"click",d)),D&&Ne(google.maps.event.addListener(ae,"drag",D)),F(ae),B&&B(ae),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),K!==null&&google.maps.event.removeListener(K),re!==null&&google.maps.event.removeListener(re),J!==null&&google.maps.event.removeListener(J),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),te!==null&&google.maps.event.removeListener(te),se!==null&&google.maps.event.removeListener(se),Ce!==null&&google.maps.event.removeListener(Ce),b&&b(ae),ae.setMap(null)}},[]),null}f.memo(Ip),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:La,eventMap:Aa,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=Oe({updaterMap:La,eventMap:Aa,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=Be,e}(f.PureComponent);var Oa={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"},Pa={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 jp(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,b=t.onUnmount,O=f.useContext(Be),E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){w!==null&&w.setMap(O)},[O]),f.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),f.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),f.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),f.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),f.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),f.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),f.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),f.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),f.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),f.useEffect(function(){w&&c&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",c)))},[c]),f.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),f.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),f.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),f.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),f.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),f.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),f.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),f.useEffect(function(){var de=new google.maps.Rectangle(he(he({},e||{}),{map:O}));return typeof o<"u"&&de.setVisible(o),typeof i<"u"&&de.setEditable(i),typeof r<"u"&&de.setDraggable(r),typeof n<"u"&&de.setBounds(n),s&&P(google.maps.event.addListener(de,"dblclick",s)),a&&j(google.maps.event.addListener(de,"dragend",a)),u&&K(google.maps.event.addListener(de,"dragstart",u)),l&&re(google.maps.event.addListener(de,"mousedown",l)),c&&J(google.maps.event.addListener(de,"mousemove",c)),p&&Y(google.maps.event.addListener(de,"mouseout",p)),h&&U(google.maps.event.addListener(de,"mouseover",h)),g&&te(google.maps.event.addListener(de,"mouseup",g)),y&&se(google.maps.event.addListener(de,"rightclick",y)),v&&Ce(google.maps.event.addListener(de,"click",v)),d&&ge(google.maps.event.addListener(de,"drag",d)),D&&Ue(google.maps.event.addListener(de,"bounds_changed",D)),A(de),B&&B(de),function(){R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),b&&b(de),de.setMap(null)}},[]),null}f.memo(jp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Pa,eventMap:Oa,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=Oe({updaterMap:Pa,eventMap:Oa,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=Be,e}(f.PureComponent);var Fa={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"},Ma={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)}},Np={};function _p(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,b=t.onRadiusChanged,O=t.onLoad,E=t.onUnmount,w=f.useContext(Be),A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1];return f.useEffect(function(){F!==null&&F.setMap(w)},[w]),f.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),f.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),f.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),f.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),f.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),f.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),f.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),f.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),f.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),f.useEffect(function(){F&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",c)))},[c]),f.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),f.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),f.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),f.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),f.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),f.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),f.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),f.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),f.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),f.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||Np),{map:w}));return typeof r=="number"&&xe.setRadius(r),typeof n<"u"&&xe.setCenter(n),typeof r=="number"&&xe.setRadius(r),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setEditable(o),typeof i<"u"&&xe.setDraggable(i),a&&I(google.maps.event.addListener(xe,"dblclick",a)),u&&N(google.maps.event.addListener(xe,"dragend",u)),l&&ie(google.maps.event.addListener(xe,"dragstart",l)),c&&H(google.maps.event.addListener(xe,"mousedown",c)),p&&ee(google.maps.event.addListener(xe,"mousemove",p)),h&&W(google.maps.event.addListener(xe,"mouseout",h)),g&&X(google.maps.event.addListener(xe,"mouseover",g)),y&&le(google.maps.event.addListener(xe,"mouseup",y)),v&&ve(google.maps.event.addListener(xe,"rightclick",v)),d&&De(google.maps.event.addListener(xe,"click",d)),D&&ae(google.maps.event.addListener(xe,"drag",D)),B&&we(google.maps.event.addListener(xe,"center_changed",B)),b&&$e(google.maps.event.addListener(xe,"radius_changed",b)),R(xe),O&&O(xe),function(){z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),E&&E(xe),xe.setMap(null)}},[]),null}f.memo(_p),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ma,eventMap:Fa,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=Oe({updaterMap:Ma,eventMap:Fa,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=Be,e}(f.PureComponent);var ka={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ta={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 zp(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,c=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=f.useContext(Be),B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){b!==null&&b.setMap(D)},[D]),f.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),f.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),f.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),f.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),f.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),f.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),f.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),f.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),f.useEffect(function(){b&&c&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",c)))},[c]),f.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),f.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),f.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),f.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),f.useEffect(function(){if(D!==null){var de=new google.maps.Data(he(he({},e||{}),{map:D}));r&&A(google.maps.event.addListener(de,"dblclick",r)),i&&P(google.maps.event.addListener(de,"mousedown",i)),o&&j(google.maps.event.addListener(de,"mousemove",o)),s&&K(google.maps.event.addListener(de,"mouseout",s)),a&&re(google.maps.event.addListener(de,"mouseover",a)),u&&J(google.maps.event.addListener(de,"mouseup",u)),l&&Y(google.maps.event.addListener(de,"rightclick",l)),n&&U(google.maps.event.addListener(de,"click",n)),c&&te(google.maps.event.addListener(de,"addfeature",c)),p&&se(google.maps.event.addListener(de,"removefeature",p)),h&&Ce(google.maps.event.addListener(de,"removeproperty",h)),g&&ge(google.maps.event.addListener(de,"setgeometry",g)),y&&Ue(google.maps.event.addListener(de,"setproperty",y)),O(de),v&&v(de)}return function(){b&&(w!==null&&google.maps.event.removeListener(w),R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),d&&d(b),b.setMap(null))}},[]),null}f.memo(zp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ta,eventMap:ka,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=Oe({updaterMap:Ta,eventMap:ka,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=Be,e}(f.PureComponent);var Ia={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ja={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){He(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(he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:ja,eventMap:Ia,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=Oe({updaterMap:ja,eventMap:Ia,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=Be,e})(f.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Wp(t,e){return new e(t.lat,t.lng)}function Up(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 Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(t,e,n){return t instanceof e?t:n(t,e)}function Vp(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 qp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _a(t,e,n,r){return n!==void 0?Vp(t,e,Rp(n,google.maps.LatLngBounds,Up)):qp(t,e,Hp(r,google.maps.LatLng,Wp))}function Gp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Zp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,c,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=c,h.bounds=p,h}return a.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},a.prototype.draw=function(){for(var u=this.getProjection(),l=he({},this.container?Na(this.container,i):{x:0,y:0}),c=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(c);p<h.length;p++){var g=h[p],y=g[0],v=g[1];this.container.style[y]=v}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function za(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Wa(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 Yp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,u=t.children,l=f.useContext(Be),c=f.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=f.useMemo(function(){return Zp(c,r,e,n,a)},[c,r,e,n]);return f.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),f.useEffect(function(){c.style.zIndex="".concat(i)},[i,c]),Hs.createPortal(u,c)}f.memo(Yp),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();et(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=he({x:0,y:0},r.containerRef.current?Na(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=_a(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,c=u.top,p=u.width,h=u.height;Gp(a,{left:l,top:c,width:p,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=f.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=za(n.position),i=za(this.props.position),o=Wa(n.bounds),s=Wa(this.props.bounds);(r!==i||o!==s)&&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?Hs.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:f.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=Be,e}(f.PureComponent);function Kp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Xp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=f.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=f.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),f.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),f.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"&&a!==null&&(a.set("bounds",u),a.setMap(o))},[a,n]),null}f.memo(Xp),function(t){He(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(){et(!!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,he(he({},this.props.options),{map:this.context}));this.registeredEvents=Oe({updaterMap:Ha,eventMap:Ua,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=Oe({updaterMap:Ha,eventMap:Ua,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:Kp},e.contextType=Be,e}(f.PureComponent);var Ra={},Va={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Jp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=f.useContext(Be),s=f.useState(null),a=s[0],u=s[1];return f.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),f.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),f.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(he(he({},i||{}),{data:e,map:o}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}f.memo(Jp),function(t){He(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(){et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),et(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(he(he({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Va,eventMap:Ra,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=Be,e}(f.PureComponent);var qa={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ga={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){He(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=Oe({updaterMap:Ga,eventMap:qa,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=Oe({updaterMap:Ga,eventMap:qa,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=Be,e})(f.PureComponent),function(t){He(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=Be,e}(f.PureComponent),function(t){He(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(){et(!!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}(f.PureComponent);var Za={onDirectionsChanged:"directions_changed"},Ya={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){He(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=Oe({updaterMap:Ya,eventMap:Za,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=Oe({updaterMap:Ya,eventMap:Za,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=Be,e})(f.PureComponent),function(t){He(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(){et(!!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}(f.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Qp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.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(et(!!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=Oe({updaterMap:Xa,eventMap:Ka,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=Oe({updaterMap:Xa,eventMap:Ka,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:f.Children.only(this.props.children)})},e.contextType=Be,e}(f.PureComponent),Ja={onPlaceChanged:"place_changed"},Qa={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){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.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;et(!!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=Oe({updaterMap:Qa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Oe({updaterMap:Qa,eventMap:Ja,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:f.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(f.PureComponent);function $p({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(Gd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(np,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function eh(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function th(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=f.Children.count(r)===0;return x.jsx("tbody",{className:o.trim(),...i,children:s?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function nh(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 rh(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 ih(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 oh(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 sh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:o="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:c,...p}=t,g={xs:12,sm:16,md:20,lg:24}[o],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${o} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return x.jsxs("button",{className:d,disabled:u||e,...p,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[Pr(g,s),c,Pr(g,a)]})]})}function $a(){const t=Ot.useActionData(),e=Ot.useNavigation(),n=Ot.useFetchers(),[r,i]=f.useState(null);function o(l,c){return JSON.stringify(l)===JSON.stringify(c)}function s(){r&&i(null)}f.useEffect(()=>{var c,p;let l=((p=(c=n[0])==null?void 0:c.data)==null?void 0:p.fieldErrors)||{};o(r,l)||Object.entries(l).length!==0&&i(l)},[n,t]),f.useEffect(()=>{var l;((l=n[0])==null?void 0:l.state)==="submitting"&&s()},[n,e]);const a=(t==null?void 0:t.fieldErrors)||r;let u={};return Object.entries(a||{}).forEach(([l,c])=>{typeof c=="string"&&typeof l=="string"&&(u[l]=c)}),u}const eu=f.createContext({});function ah(t){var p;const{children:e,className:n,id:r,...i}=t,o=$a(),s=f.useRef(null),a=((p=s.current)==null?void 0:p.name)||"",u=(o==null?void 0:o[a])||null,l=f.useId(),c=`arkynFormController ${n}`;return x.jsx(eu.Provider,{value:{error:u,id:l,inputRef:s},children:x.jsx("section",{id:r||a||void 0,className:c.trim(),...i,children:e})})}function yt(){return f.useContext(eu)}function uh(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:c,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=f.useState(o||!1),d=typeof s=="boolean"?s:y,b=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const E=y;v(!E),a&&a(E?"":u||"checked")}return x.jsxs("button",{id:c,type:"button",className:b,onClick:O,...l,children:[x.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function lh(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:o}=yt();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):o?x.jsx("strong",{className:i.trim(),...r,children:o}):x.jsx(x.Fragment,{})}function ch(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=yt(),s=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:s.trim(),htmlFor:i,...r})}function Gt(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 to(t){return t&&t.replace(/[^0-9]/g,"")}function tu(t,e){let n="",r=0;return Array.from(t).forEach((i,o)=>{e[o+r].match(/[0-9]/)||(n+=e[o+r],r++),n+=i}),n}function nu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},ru=to(no.CNPJ).length;function fh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=to(T);const K=nu(N);if(!(N.length>ru))return N=tu(N,no[K]),N}const E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,defaultValue:O(h||""),disabled:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...b}}function dh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,onChange:F,value:R,defaultValue:P,...z}=fh({...t,id:o,isError:u},e),[I,j]=f.useState(P),T=B&&!D,N=w&&!D,K=d==="left"&&D,_=d==="right"&&D;function ie(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function re(J){let q=to(J.target.value);const ee=nu(q);q.length>ru||(q=tu(q,no[ee]),J.target.value=q,j(q),F&&F(J))}function k(J){n(!0),O&&O(J)}function H(J){n(!1),E&&E(J)}return x.jsxs("section",{title:c,style:p,onClick:ie,className:h,children:[g,K&&A,T&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,value:R||I,onFocus:k,onChange:re,onBlur:H,...z}),N&&x.jsx(w,{size:v,strokeWidth:2.5}),_&&A,y]})}const ph=3,hh=(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?ph:0),Tr=2,iu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=iu(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),iu(e)/10**Tr},ou=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=hh(t,r,n);return[r,i]};function vh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:b="BRL",...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,locale:B,currency:b,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function gh(t){const[e,n]=f.useState(!1),[r,i]=f.useState("0"),o=f.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,c=t.isError||!!u,{disabled:p,title:h,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:b,LeftIcon:O,readOnly:E,onFocus:w,onBlur:A,RightIcon:F,Spinner:R,value:P,max:z,onChangeValue:I,onKeyPress:j,currency:T,locale:N,name:K,defaultValue:_,...ie}=vh({...t,id:a,isError:c},e),re=O&&!b,k=F&&!b,H=B==="left"&&b,J=B==="right"&&b;function q(){p||!(l!=null&&l.current)||(n(!0),l.current.focus())}function ee(M){n(!0),w&&w(M)}function Y(M){n(!1),A&&A(M)}const C=M=>{const[X,te]=ou(N,M,T);return!z||X<=z?(i(te),[X,te]):[ro(r),r]},W=M=>{M.preventDefault();const[X,te]=C(M.target.value);I(M,String(X),String(te))},U=M=>j&&j(M,M.key,M.key);return f.useEffect(()=>{const M=P||+_||void 0,[,X]=ou(N,M,T);i(X)},[T,_,P]),x.jsxs("section",{title:h,style:g,onClick:q,className:y,children:[v,H&&R,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:W,onBlur:Y,onFocus:ee,onKeyUp:U,disabled:p||b,readOnly:E,...ie}),x.jsx("input",{type:"hidden",ref:l,name:K,value:ro(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function mh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:j,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const yh=f.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Ch(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,...F}=mh({...t,id:o,isError:u},e),R=B&&!D,P=w&&!D,z=d==="left"&&D,I=d==="right"&&D;function j(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function T(K){n(!0),O&&O(K)}function N(K){n(!1),E&&E(K)}return x.jsxs("section",{title:c,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Dd.InputMask,{component:yh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Dh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=c?"right":"left",R=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,z={md:20,lg:20}[i];return{isLoading:n,className:R,prefix:Gt(a,z,"prefix"),sufix:Gt(u,z,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:z,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Eh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,type:A,Spinner:F,...R}=Dh({...t,id:o,isError:u},e),P=B&&!D,z=w&&!D,I=d==="left"&&D,j=d==="right"&&D;function T(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(_){n(!0),O&&O(_)}function K(_){n(!1),E&&E(_)}return A==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...R}):x.jsxs("section",{title:c,style:p,onClick:T,className:h,children:[g,I&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,onFocus:N,onBlur:K,type:A,...R}),z&&x.jsx(w,{size:v,strokeWidth:2.5}),j&&F,y]})}function su(t){return t.type==="currency"?x.jsx(gh,{...t}):t.type==="masked"?x.jsx(Ch,{...t}):t.type==="cpf-cnpj"?x.jsx(dh,{...t}):x.jsx(Eh,{...t})}function bh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=f.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],c=l==null?void 0:l.address_components;function p(D){const B=c.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=c.find(b=>b.types[0]===D);return B?B.short_name:""}if(l){const D=p("route"),B=p("street_number"),b=p("sublocality_level_1"),O=p("administrative_area_level_2"),E=p("administrative_area_level_1"),w=h("administrative_area_level_1"),A=p("postal_code"),F=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),R=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:E,district:b,cep:A,streetNumber:B,stateShortName:w,coordinates:{lat:F,lng:R}})}};return x.jsx(Qp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(su,{type:"text",onChange:u=>t(u.target.value),...r})})}function wh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:o,disabled:s,className:a="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${a}`;return x.jsxs("button",{disabled:s||e,className:p.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:l[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(o,{size:l[i],strokeWidth:2.5})})]})}const au=f.createContext({});function Bh(){return f.useContext(au)}function xh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=f.useState(e||""),{inputRef:c,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(au.Provider,{value:{onChange:h,value:r||u,size:o},children:[x.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:c,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function Sh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=Bh(),{error:c}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${c?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${o}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>a(e),onFocus:()=>a(e),...s}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Ah=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},uu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Ah?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},oo={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},Ir=1;Ir<20;Ir++)oo["f"+Ir]=111+Ir;function jr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(s){return lu(s,e)}),i=function(a){return r.some(function(u){return cu(u,a)})},o=n==null?i:i(n);return o}function Lh(t,e){return jr(t,e)}function Oh(t,e){return jr(t,{byKey:!0},e)}function lu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in io)r[io[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var c=i[Symbol.iterator](),p;!(a=(p=c.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=so(h),v=io[y];if(h.length>1&&!v&&!uu[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=fu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}return r}function cu(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 fu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=uu[t]||t,t}var Ph=It.default=jr,ao=It.isHotkey=jr;It.isCodeHotkey=Lh,It.isKeyHotkey=Oh,It.parseHotkey=lu,It.compareHotkey=cu,It.toKeyCode=fu,It.toKeyName=so;/*!
|
71
|
+
</svg>`,a=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const p=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:u,title:a,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:u,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function Ap(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Ap(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Lp=(t,e,n)=>{n.fitBounds(e.bounds)};class Op extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Bp(r),renderer:o=new Sp,onClusterClick:s=Lp}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,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:(mt.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,Qn.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 s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Qn.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=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new xp(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=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Qn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Pp(t){var e=zd(),n=f.useState(null),r=n[0],i=n[1];return f.useEffect(function(){if(e&&r===null){var o=new Op(he(he({},t),{map:e}));i(o)}},[e]),r}function Fp(t){var e=t.children,n=t.options,r=Pp(n);return r!==null?e(r):null}f.memo(Fp);var wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ba={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Mp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){var _=new google.maps.InfoWindow(he({},r||{}));return d(_),K.current=document.createElement("div"),s&&b(google.maps.event.addListener(_,"closeclick",s)),a&&w(google.maps.event.addListener(_,"domready",a)),u&&R(google.maps.event.addListener(_,"content_changed",u)),l&&I(google.maps.event.addListener(_,"position_changed",l)),c&&N(google.maps.event.addListener(_,"zindex_changed",c)),_.setContent(K.current),i&&_.setPosition(i),o&&_.setZIndex(o),n?_.open(g,n):_.getPosition()?_.open(g):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(_),_.close()}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(Mp),function(t){He(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):et(!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(he({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Le({updaterMap:Ba,eventMap:wa,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=Le({updaterMap:Ba,eventMap:wa,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?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Sa={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)}},kp={};function Tp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,b=f.useContext(Be),O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1];return f.useEffect(function(){E!==null&&E.setMap(b)},[b]),f.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),f.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),f.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),f.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),f.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),f.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),f.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),f.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),f.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),f.useEffect(function(){E&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",c)))},[c]),f.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),f.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),f.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),f.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),f.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),f.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),f.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||kp),{map:b}));return o&&ge.setPath(o),typeof i<"u"&&ge.setVisible(i),typeof r<"u"&&ge.setEditable(r),typeof n<"u"&&ge.setDraggable(n),s&&R(google.maps.event.addListener(ge,"dblclick",s)),a&&I(google.maps.event.addListener(ge,"dragend",a)),u&&N(google.maps.event.addListener(ge,"dragstart",u)),l&&ie(google.maps.event.addListener(ge,"mousedown",l)),c&&H(google.maps.event.addListener(ge,"mousemove",c)),p&&ee(google.maps.event.addListener(ge,"mouseout",p)),h&&W(google.maps.event.addListener(ge,"mouseover",h)),g&&X(google.maps.event.addListener(ge,"mouseup",g)),y&&le(google.maps.event.addListener(ge,"rightclick",y)),v&&ve(google.maps.event.addListener(ge,"click",v)),d&&De(google.maps.event.addListener(ge,"drag",d)),w(ge),D&&D(ge),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),B&&B(ge),ge.setMap(null)}},[]),null}f.memo(Tp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Sa,eventMap:xa,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=Le({updaterMap:Sa,eventMap:xa,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=Be,e}(f.PureComponent);var Aa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},La={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 Ip(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,b=t.onUnmount,O=t.onEdit,E=f.useContext(Be),w=f.useState(null),A=w[0],F=w[1],R=f.useState(null),P=R[0],z=R[1],I=f.useState(null),j=I[0],T=I[1],N=f.useState(null),K=N[0],_=N[1],ie=f.useState(null),re=ie[0],k=ie[1],H=f.useState(null),J=H[0],q=H[1],ee=f.useState(null),Y=ee[0],C=ee[1],W=f.useState(null),U=W[0],M=W[1],X=f.useState(null),te=X[0],G=X[1],le=f.useState(null),se=le[0],pe=le[1],ve=f.useState(null),Ce=ve[0],me=ve[1],De=f.useState(null),ge=De[0],Ne=De[1];return f.useEffect(function(){A!==null&&A.setMap(E)},[E]),f.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),f.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),f.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),f.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),f.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),f.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),f.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),f.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),f.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),f.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),f.useEffect(function(){A&&c&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",c)))},[c]),f.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),f.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),f.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),f.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),f.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),f.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),f.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),f.useEffect(function(){var ae=new google.maps.Polygon(he(he({},e||{}),{map:E}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&z(google.maps.event.addListener(ae,"dblclick",a)),u&&T(google.maps.event.addListener(ae,"dragend",u)),l&&_(google.maps.event.addListener(ae,"dragstart",l)),c&&k(google.maps.event.addListener(ae,"mousedown",c)),p&&q(google.maps.event.addListener(ae,"mousemove",p)),h&&C(google.maps.event.addListener(ae,"mouseout",h)),g&&M(google.maps.event.addListener(ae,"mouseover",g)),y&&G(google.maps.event.addListener(ae,"mouseup",y)),v&&pe(google.maps.event.addListener(ae,"rightclick",v)),d&&me(google.maps.event.addListener(ae,"click",d)),D&&Ne(google.maps.event.addListener(ae,"drag",D)),F(ae),B&&B(ae),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),K!==null&&google.maps.event.removeListener(K),re!==null&&google.maps.event.removeListener(re),J!==null&&google.maps.event.removeListener(J),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),te!==null&&google.maps.event.removeListener(te),se!==null&&google.maps.event.removeListener(se),Ce!==null&&google.maps.event.removeListener(Ce),b&&b(ae),ae.setMap(null)}},[]),null}f.memo(Ip),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:La,eventMap:Aa,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=Le({updaterMap:La,eventMap:Aa,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=Be,e}(f.PureComponent);var Oa={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"},Pa={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 jp(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,b=t.onUnmount,O=f.useContext(Be),E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){w!==null&&w.setMap(O)},[O]),f.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),f.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),f.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),f.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),f.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),f.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),f.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),f.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),f.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),f.useEffect(function(){w&&c&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",c)))},[c]),f.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),f.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),f.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),f.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),f.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),f.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),f.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),f.useEffect(function(){var de=new google.maps.Rectangle(he(he({},e||{}),{map:O}));return typeof o<"u"&&de.setVisible(o),typeof i<"u"&&de.setEditable(i),typeof r<"u"&&de.setDraggable(r),typeof n<"u"&&de.setBounds(n),s&&P(google.maps.event.addListener(de,"dblclick",s)),a&&j(google.maps.event.addListener(de,"dragend",a)),u&&K(google.maps.event.addListener(de,"dragstart",u)),l&&re(google.maps.event.addListener(de,"mousedown",l)),c&&J(google.maps.event.addListener(de,"mousemove",c)),p&&Y(google.maps.event.addListener(de,"mouseout",p)),h&&U(google.maps.event.addListener(de,"mouseover",h)),g&&te(google.maps.event.addListener(de,"mouseup",g)),y&&se(google.maps.event.addListener(de,"rightclick",y)),v&&Ce(google.maps.event.addListener(de,"click",v)),d&&ge(google.maps.event.addListener(de,"drag",d)),D&&Ue(google.maps.event.addListener(de,"bounds_changed",D)),A(de),B&&B(de),function(){R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),b&&b(de),de.setMap(null)}},[]),null}f.memo(jp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Pa,eventMap:Oa,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=Le({updaterMap:Pa,eventMap:Oa,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=Be,e}(f.PureComponent);var Fa={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"},Ma={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)}},Np={};function _p(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,b=t.onRadiusChanged,O=t.onLoad,E=t.onUnmount,w=f.useContext(Be),A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1];return f.useEffect(function(){F!==null&&F.setMap(w)},[w]),f.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),f.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),f.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),f.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),f.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),f.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),f.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),f.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),f.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),f.useEffect(function(){F&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",c)))},[c]),f.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),f.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),f.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),f.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),f.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),f.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),f.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),f.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),f.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),f.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||Np),{map:w}));return typeof r=="number"&&xe.setRadius(r),typeof n<"u"&&xe.setCenter(n),typeof r=="number"&&xe.setRadius(r),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setEditable(o),typeof i<"u"&&xe.setDraggable(i),a&&I(google.maps.event.addListener(xe,"dblclick",a)),u&&N(google.maps.event.addListener(xe,"dragend",u)),l&&ie(google.maps.event.addListener(xe,"dragstart",l)),c&&H(google.maps.event.addListener(xe,"mousedown",c)),p&&ee(google.maps.event.addListener(xe,"mousemove",p)),h&&W(google.maps.event.addListener(xe,"mouseout",h)),g&&X(google.maps.event.addListener(xe,"mouseover",g)),y&&le(google.maps.event.addListener(xe,"mouseup",y)),v&&ve(google.maps.event.addListener(xe,"rightclick",v)),d&&De(google.maps.event.addListener(xe,"click",d)),D&&ae(google.maps.event.addListener(xe,"drag",D)),B&&we(google.maps.event.addListener(xe,"center_changed",B)),b&&$e(google.maps.event.addListener(xe,"radius_changed",b)),R(xe),O&&O(xe),function(){z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),E&&E(xe),xe.setMap(null)}},[]),null}f.memo(_p),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Ma,eventMap:Fa,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=Le({updaterMap:Ma,eventMap:Fa,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=Be,e}(f.PureComponent);var ka={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ta={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 zp(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,c=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=f.useContext(Be),B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){b!==null&&b.setMap(D)},[D]),f.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),f.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),f.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),f.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),f.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),f.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),f.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),f.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),f.useEffect(function(){b&&c&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",c)))},[c]),f.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),f.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),f.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),f.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),f.useEffect(function(){if(D!==null){var de=new google.maps.Data(he(he({},e||{}),{map:D}));r&&A(google.maps.event.addListener(de,"dblclick",r)),i&&P(google.maps.event.addListener(de,"mousedown",i)),o&&j(google.maps.event.addListener(de,"mousemove",o)),s&&K(google.maps.event.addListener(de,"mouseout",s)),a&&re(google.maps.event.addListener(de,"mouseover",a)),u&&J(google.maps.event.addListener(de,"mouseup",u)),l&&Y(google.maps.event.addListener(de,"rightclick",l)),n&&U(google.maps.event.addListener(de,"click",n)),c&&te(google.maps.event.addListener(de,"addfeature",c)),p&&se(google.maps.event.addListener(de,"removefeature",p)),h&&Ce(google.maps.event.addListener(de,"removeproperty",h)),g&&ge(google.maps.event.addListener(de,"setgeometry",g)),y&&Ue(google.maps.event.addListener(de,"setproperty",y)),O(de),v&&v(de)}return function(){b&&(w!==null&&google.maps.event.removeListener(w),R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),d&&d(b),b.setMap(null))}},[]),null}f.memo(zp),function(t){He(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(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Ta,eventMap:ka,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=Le({updaterMap:Ta,eventMap:ka,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=Be,e}(f.PureComponent);var Ia={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ja={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){He(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(he(he({},this.props.options),{map:this.context}));this.registeredEvents=Le({updaterMap:ja,eventMap:Ia,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=Le({updaterMap:ja,eventMap:Ia,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=Be,e})(f.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Wp(t,e){return new e(t.lat,t.lng)}function Up(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 Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(t,e,n){return t instanceof e?t:n(t,e)}function Vp(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 qp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _a(t,e,n,r){return n!==void 0?Vp(t,e,Rp(n,google.maps.LatLngBounds,Up)):qp(t,e,Hp(r,google.maps.LatLng,Wp))}function Gp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Zp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,c,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=c,h.bounds=p,h}return a.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},a.prototype.draw=function(){for(var u=this.getProjection(),l=he({},this.container?Na(this.container,i):{x:0,y:0}),c=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(c);p<h.length;p++){var g=h[p],y=g[0],v=g[1];this.container.style[y]=v}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function za(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Wa(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 Yp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,u=t.children,l=f.useContext(Be),c=f.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=f.useMemo(function(){return Zp(c,r,e,n,a)},[c,r,e,n]);return f.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),f.useEffect(function(){c.style.zIndex="".concat(i)},[i,c]),Hs.createPortal(u,c)}f.memo(Yp),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();et(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=he({x:0,y:0},r.containerRef.current?Na(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=_a(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,c=u.top,p=u.width,h=u.height;Gp(a,{left:l,top:c,width:p,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=f.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=za(n.position),i=za(this.props.position),o=Wa(n.bounds),s=Wa(this.props.bounds);(r!==i||o!==s)&&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?Hs.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:f.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=Be,e}(f.PureComponent);function Kp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Xp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=f.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=f.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),f.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),f.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"&&a!==null&&(a.set("bounds",u),a.setMap(o))},[a,n]),null}f.memo(Xp),function(t){He(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(){et(!!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,he(he({},this.props.options),{map:this.context}));this.registeredEvents=Le({updaterMap:Ha,eventMap:Ua,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=Le({updaterMap:Ha,eventMap:Ua,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:Kp},e.contextType=Be,e}(f.PureComponent);var Ra={},Va={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Jp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=f.useContext(Be),s=f.useState(null),a=s[0],u=s[1];return f.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),f.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),f.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(he(he({},i||{}),{data:e,map:o}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}f.memo(Jp),function(t){He(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(){et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),et(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(he(he({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Le({updaterMap:Va,eventMap:Ra,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Va,eventMap:Ra,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=Be,e}(f.PureComponent);var qa={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ga={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){He(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=Le({updaterMap:Ga,eventMap:qa,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=Le({updaterMap:Ga,eventMap:qa,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=Be,e})(f.PureComponent),function(t){He(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=Be,e}(f.PureComponent),function(t){He(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(){et(!!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}(f.PureComponent);var Za={onDirectionsChanged:"directions_changed"},Ya={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){He(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=Le({updaterMap:Ya,eventMap:Za,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=Le({updaterMap:Ya,eventMap:Za,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=Be,e})(f.PureComponent),function(t){He(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(){et(!!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}(f.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Qp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.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(et(!!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=Le({updaterMap:Xa,eventMap:Ka,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=Le({updaterMap:Xa,eventMap:Ka,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:f.Children.only(this.props.children)})},e.contextType=Be,e}(f.PureComponent),Ja={onPlaceChanged:"place_changed"},Qa={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){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.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;et(!!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=Le({updaterMap:Qa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Qa,eventMap:Ja,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:f.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(f.PureComponent);function $p({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(Gd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(np,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Oe.MapPinned,{})})}function eh(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function th(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=f.Children.count(r)===0;return x.jsx("tbody",{className:o.trim(),...i,children:s?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function nh(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 rh(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 ih(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 oh(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 sh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:o="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:c,...p}=t,g={xs:12,sm:16,md:20,lg:24}[o],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${o} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return x.jsxs("button",{className:d,disabled:u||e,...p,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Oe.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[Pr(g,s),c,Pr(g,a)]})]})}function $a(){const t=Ot.useActionData(),e=Ot.useNavigation(),n=Ot.useFetchers(),[r,i]=f.useState(null);function o(l,c){return JSON.stringify(l)===JSON.stringify(c)}function s(){r&&i(null)}f.useEffect(()=>{var c,p;let l=((p=(c=n[0])==null?void 0:c.data)==null?void 0:p.fieldErrors)||{};o(r,l)||Object.entries(l).length!==0&&i(l)},[n,t]),f.useEffect(()=>{var l;((l=n[0])==null?void 0:l.state)==="submitting"&&s()},[n,e]);const a=(t==null?void 0:t.fieldErrors)||r;let u={};return Object.entries(a||{}).forEach(([l,c])=>{typeof c=="string"&&typeof l=="string"&&(u[l]=c)}),u}const eu=f.createContext({});function ah(t){var p;const{children:e,className:n,id:r,...i}=t,o=$a(),s=f.useRef(null),a=((p=s.current)==null?void 0:p.name)||"",u=(o==null?void 0:o[a])||null,l=f.useId(),c=`arkynFormController ${n}`;return x.jsx(eu.Provider,{value:{error:u,id:l,inputRef:s},children:x.jsx("section",{id:r||a||void 0,className:c.trim(),...i,children:e})})}function yt(){return f.useContext(eu)}function uh(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:c,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=f.useState(o||!1),d=typeof s=="boolean"?s:y,b=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const E=y;v(!E),a&&a(E?"":u||"checked")}return x.jsxs("button",{id:c,type:"button",className:b,onClick:O,...l,children:[x.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),x.jsx(Oe.Check,{})]})}function lh(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:o}=yt();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):o?x.jsx("strong",{className:i.trim(),...r,children:o}):x.jsx(x.Fragment,{})}function ch(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=yt(),s=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:s.trim(),htmlFor:i,...r})}function Gt(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 to(t){return t&&t.replace(/[^0-9]/g,"")}function tu(t,e){let n="",r=0;return Array.from(t).forEach((i,o)=>{e[o+r].match(/[0-9]/)||(n+=e[o+r],r++),n+=i}),n}function nu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},ru=to(no.CNPJ).length;function fh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=to(T);const K=nu(N);if(!(N.length>ru))return N=tu(N,no[K]),N}const E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,defaultValue:O(h||""),disabled:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,loadingPosition:E,iconSize:j,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...b}}function dh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,onChange:F,value:R,defaultValue:P,...z}=fh({...t,id:o,isError:u},e),[I,j]=f.useState(P),T=B&&!D,N=w&&!D,K=d==="left"&&D,_=d==="right"&&D;function ie(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function re(J){let q=to(J.target.value);const ee=nu(q);q.length>ru||(q=tu(q,no[ee]),J.target.value=q,j(q),F&&F(J))}function k(J){n(!0),O&&O(J)}function H(J){n(!1),E&&E(J)}return x.jsxs("section",{title:c,style:p,onClick:ie,className:h,children:[g,K&&A,T&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,value:R||I,onFocus:k,onChange:re,onBlur:H,...z}),N&&x.jsx(w,{size:v,strokeWidth:2.5}),_&&A,y]})}const ph=3,hh=(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?ph:0),Tr=2,iu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=iu(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),iu(e)/10**Tr},ou=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=hh(t,r,n);return[r,i]};function vh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:b="BRL",...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,locale:B,currency:b,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function gh(t){const[e,n]=f.useState(!1),[r,i]=f.useState("0"),o=f.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,c=t.isError||!!u,{disabled:p,title:h,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:b,LeftIcon:O,readOnly:E,onFocus:w,onBlur:A,RightIcon:F,Spinner:R,value:P,max:z,onChangeValue:I,onKeyPress:j,currency:T,locale:N,name:K,defaultValue:_,...ie}=vh({...t,id:a,isError:c},e),re=O&&!b,k=F&&!b,H=B==="left"&&b,J=B==="right"&&b;function q(){p||!(l!=null&&l.current)||(n(!0),l.current.focus())}function ee(M){n(!0),w&&w(M)}function Y(M){n(!1),A&&A(M)}const C=M=>{const[X,te]=ou(N,M,T);return!z||X<=z?(i(te),[X,te]):[ro(r),r]},W=M=>{M.preventDefault();const[X,te]=C(M.target.value);I(M,String(X),String(te))},U=M=>j&&j(M,M.key,M.key);return f.useEffect(()=>{const M=P||+_||void 0,[,X]=ou(N,M,T);i(X)},[T,_,P]),x.jsxs("section",{title:h,style:g,onClick:q,className:y,children:[v,H&&R,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:W,onBlur:Y,onFocus:ee,onKeyUp:U,disabled:p||b,readOnly:E,...ie}),x.jsx("input",{type:"hidden",ref:l,name:K,value:ro(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function mh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:j,showMask:B,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const yh=f.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Ch(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,...F}=mh({...t,id:o,isError:u},e),R=B&&!D,P=w&&!D,z=d==="left"&&D,I=d==="right"&&D;function j(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function T(K){n(!0),O&&O(K)}function N(K){n(!1),E&&E(K)}return x.jsxs("section",{title:c,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Dd.InputMask,{component:yh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Dh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=c?"right":"left",R=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,z={md:20,lg:20}[i];return{isLoading:n,className:R,prefix:Gt(a,z,"prefix"),sufix:Gt(u,z,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:z,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Eh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,type:A,Spinner:F,...R}=Dh({...t,id:o,isError:u},e),P=B&&!D,z=w&&!D,I=d==="left"&&D,j=d==="right"&&D;function T(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(_){n(!0),O&&O(_)}function K(_){n(!1),E&&E(_)}return A==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...R}):x.jsxs("section",{title:c,style:p,onClick:T,className:h,children:[g,I&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,onFocus:N,onBlur:K,type:A,...R}),z&&x.jsx(w,{size:v,strokeWidth:2.5}),j&&F,y]})}function su(t){return t.type==="currency"?x.jsx(gh,{...t}):t.type==="masked"?x.jsx(Ch,{...t}):t.type==="cpf-cnpj"?x.jsx(dh,{...t}):x.jsx(Eh,{...t})}function bh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=f.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],c=l==null?void 0:l.address_components;function p(D){const B=c.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=c.find(b=>b.types[0]===D);return B?B.short_name:""}if(l){const D=p("route"),B=p("street_number"),b=p("sublocality_level_1"),O=p("administrative_area_level_2"),E=p("administrative_area_level_1"),w=h("administrative_area_level_1"),A=p("postal_code"),F=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),R=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:E,district:b,cep:A,streetNumber:B,stateShortName:w,coordinates:{lat:F,lng:R}})}};return x.jsx(Qp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(su,{type:"text",onChange:u=>t(u.target.value),...r})})}function wh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:o,disabled:s,className:a="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${a}`;return x.jsxs("button",{disabled:s||e,className:p.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Oe.Loader2,{size:l[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(o,{size:l[i],strokeWidth:2.5})})]})}const au=f.createContext({});function Bh(){return f.useContext(au)}function xh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=f.useState(e||""),{inputRef:c,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(au.Provider,{value:{onChange:h,value:r||u,size:o},children:[x.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:c,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function Sh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=Bh(),{error:c}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${c?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${o}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>a(e),onFocus:()=>a(e),...s}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Ah=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},uu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Ah?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},oo={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},Ir=1;Ir<20;Ir++)oo["f"+Ir]=111+Ir;function jr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(s){return lu(s,e)}),i=function(a){return r.some(function(u){return cu(u,a)})},o=n==null?i:i(n);return o}function Lh(t,e){return jr(t,e)}function Oh(t,e){return jr(t,{byKey:!0},e)}function lu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in io)r[io[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var c=i[Symbol.iterator](),p;!(a=(p=c.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=so(h),v=io[y];if(h.length>1&&!v&&!uu[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=fu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}return r}function cu(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 fu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=uu[t]||t,t}var Ph=It.default=jr,ao=It.isHotkey=jr;It.isCodeHotkey=Lh,It.isKeyHotkey=Oh,It.parseHotkey=lu,It.compareHotkey=cu,It.toKeyCode=fu,It.toKeyName=so;/*!
|
72
72
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
73
73
|
*
|
74
74
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
75
75
|
* Released under the MIT License.
|
76
|
-
*/function du(t){return Object.prototype.toString.call(t)==="[object Object]"}function ut(t){var e,n;return du(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(du(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var pu=Symbol.for("immer-nothing"),hu=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state"),Fh=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 ht(t,...e){if(process.env.NODE_ENV!=="production"){const n=Fh[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 On=Object.getPrototypeOf;function pn(t){return!!t&&!!t[Ct]}function hn(t){var e;return t?vu(t)||Array.isArray(t)||!!t[hu]||!!((e=t.constructor)!=null&&e[hu])||zr(t)||Wr(t):!1}var Mh=Object.prototype.constructor.toString();function vu(t){if(!t||typeof t!="object")return!1;const e=On(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)===Mh}function Nr(t,e){_r(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function _r(t){const e=t[Ct];return e?e.type_:Array.isArray(t)?1:zr(t)?2:Wr(t)?3:0}function uo(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function gu(t,e,n){const r=_r(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function kh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function zr(t){return t instanceof Map}function Wr(t){return t instanceof Set}function vn(t){return t.copy_||t.base_}function lo(t,e){if(zr(t))return new Map(t);if(Wr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=vu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Ct];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function co(t,e=!1){return Ur(t)||pn(t)||!hn(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=Th),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>co(r,!0))),t}function Th(){ht(2)}function Ur(t){return Object.isFrozen(t)}var Ih={};function gn(t){const e=Ih[t];return e||ht(0,t),e}var $n;function mu(){return $n}function jh(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yu(t,e){e&&(gn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function fo(t){po(t),t.drafts_.forEach(Nh),t.drafts_=null}function po(t){t===$n&&($n=t.parent_)}function Cu(t){return $n=jh($n,t)}function Nh(t){const e=t[Ct];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Du(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Ct].modified_&&(fo(e),ht(4)),hn(t)&&(t=Hr(e,t),e.parent_||Rr(e,t)),e.patches_&&gn("Patches").generateReplacementPatches_(n[Ct].base_,t,e.patches_,e.inversePatches_)):t=Hr(e,n,[]),fo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==pu?t:void 0}function Hr(t,e,n){if(Ur(e))return e;const r=e[Ct];if(!r)return Nr(e,(i,o)=>Eu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Rr(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Nr(o,(a,u)=>Eu(t,r,i,a,u,n,s)),Rr(t,i,!1),n&&t.patches_&&gn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Eu(t,e,n,r,i,o,s){if(process.env.NODE_ENV!=="production"&&i===n&&ht(5),pn(i)){const a=o&&e&&e.type_!==3&&!uo(e.assigned_,r)?o.concat(r):void 0,u=Hr(t,i,a);if(gu(n,r,u),pn(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(hn(i)&&!Ur(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Hr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Rr(t,i)}}function Rr(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&co(e,n)}function _h(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:mu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=ho;n&&(i=[r],o=er);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var ho={get(t,e){if(e===Ct)return t;const n=vn(t);if(!uo(n,e))return zh(t,n,e);const r=n[e];return t.finalized_||!hn(r)?r:r===vo(t.base_,e)?(mo(t),t.copy_[e]=yo(r,t)):r},has(t,e){return e in vn(t)},ownKeys(t){return Reflect.ownKeys(vn(t))},set(t,e,n){const r=bu(vn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=vo(vn(t),e),o=i==null?void 0:i[Ct];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(kh(n,i)&&(n!==void 0||uo(t.base_,e)))return!0;mo(t),go(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 vo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,mo(t),go(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=vn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ht(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ht(12)}},er={};Nr(ho,(t,e)=>{er[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),er.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&ht(13),er.set.call(this,t,e,void 0)},er.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&ht(14),ho.set.call(this,t[0],e,n,t[0])};function vo(t,e){const n=t[Ct];return(n?vn(n):t)[e]}function zh(t,e,n){var i;const r=bu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function bu(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function go(t){t.modified_||(t.modified_=!0,t.parent_&&go(t.parent_))}function mo(t){t.copy_||(t.copy_=lo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Wh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(u=o,...l){return s.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let i;if(hn(e)){const o=Cu(this),s=yo(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?fo(o):po(o)}return yu(o,r),Du(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===pu&&(i=void 0),this.autoFreeze_&&co(i,!0),r){const o=[],s=[];gn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ht(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,u=>e(u,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),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){hn(t)||ht(8),pn(t)&&(t=Uh(t));const e=Cu(this),n=yo(t,void 0);return n[Ct].isManual_=!0,po(e),n}finishDraft(t,e){const n=t&&t[Ct];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return yu(r,e),Du(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=gn("Patches").applyPatches_;return pn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function yo(t,e){const n=zr(t)?gn("MapSet").proxyMap_(t,e):Wr(t)?gn("MapSet").proxySet_(t,e):_h(t,e);return(e?e.scope_:mu()).drafts_.push(n),n}function Uh(t){return pn(t)||ht(10,t),wu(t)}function wu(t){if(!hn(t)||Ur(t))return t;const e=t[Ct];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=lo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=lo(t,!0);return Nr(n,(r,i)=>{gu(n,r,wu(i))}),e&&(e.finalized_=!1),n}var Dt=new Wh,Co=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt);var Bu=Dt.createDraft.bind(Dt),xu=Dt.finishDraft.bind(Dt),Hh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=L.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Rh={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()}}},Vh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=V.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Vr=new WeakMap,qr=new WeakMap,tr=new WeakMap,Su=new WeakMap,Au=new WeakMap,Lu=new WeakMap,Ou=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=L.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],o=e[r];if(i!==o)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),o=t[n],s=e[n];return L.equals(r,i)&&o>s},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return L.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),o=t[n],s=e[n];return L.equals(r,i)&&o<s},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 L.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&L.compare(t,e)===0},isBefore(t,e){return L.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&L.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&L.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&L.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&L.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],o=e[e.length-1];return i!==o&&L.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(!L.isAncestor(e,t)&&!L.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:o}=e;(L.equals(o,r)||L.endsBefore(o,r)||L.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:s}=e;if(L.equals(s,r)||L.isAncestor(s,r))return null;L.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{var{path:a,position:u}=e;L.equals(a,r)||L.endsBefore(a,r)?r[a.length-1]-=1:L.isAncestor(a,r)&&(r[a.length-1]-=1,r[a.length]+=u);break}case"split_node":{var{path:l,position:c}=e;if(L.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,r)?r[l.length-1]+=1:L.isAncestor(l,r)&&t[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:p,newPath:h}=e;if(L.equals(p,h))return r;if(L.isAncestor(p,r)||L.equals(p,r)){var g=h.slice();return L.endsBefore(p,h)&&p.length<h.length&&(g[p.length-1]-=1),g.concat(r.slice(p.length))}else L.isSibling(p,h)&&(L.isAncestor(h,r)||L.equals(h,r))?L.endsBefore(p,r)?r[p.length-1]-=1:r[p.length-1]+=1:L.endsBefore(h,r)||L.equals(h,r)||L.isAncestor(h,r)?(L.endsBefore(p,r)&&(r[p.length-1]-=1),r[h.length-1]+=1):L.endsBefore(p,r)&&(L.equals(h,r)&&(r[h.length-1]+=1),r[p.length-1]-=1);break}}return r}};function nr(t){"@babel/helpers - typeof";return nr=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},nr(t)}function qh(t,e){if(nr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gh(t){var e=qh(t,"string");return nr(e)==="symbol"?e:String(e)}function lt(t,e,n){return e=Gh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pu(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 rr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zh=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=ne.parent(t,r),s=r[r.length-1];if(s>o.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(o.children.splice(s,0,i),e)for(var[a,u]of V.points(e))e[u]=Ae.transform(a,n);break}case"insert_text":{var{path:l,offset:c,text:p}=n;if(p.length===0)break;var h=ne.leaf(t,l),g=h.text.slice(0,c),y=h.text.slice(c);if(h.text=g+p+y,e)for(var[v,d]of V.points(e))e[d]=Ae.transform(v,n);break}case"merge_node":{var{path:D}=n,B=ne.get(t,D),b=L.previous(D),O=ne.get(t,b),E=ne.parent(t,D),w=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(it.stringify(B)," ").concat(it.stringify(O)));if(E.children.splice(w,1),e)for(var[A,F]of V.points(e))e[F]=Ae.transform(A,n);break}case"move_node":{var{path:R,newPath:P}=n;if(L.isAncestor(R,P))throw new Error("Cannot move a path [".concat(R,"] to new path [").concat(P,"] because the destination is inside itself."));var z=ne.get(t,R),I=ne.parent(t,R),j=R[R.length-1];I.children.splice(j,1);var T=L.transform(R,n),N=ne.get(t,L.parent(T)),K=T[T.length-1];if(N.children.splice(K,0,z),e)for(var[_,ie]of V.points(e))e[ie]=Ae.transform(_,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],H=ne.parent(t,re);if(H.children.splice(k,1),e)for(var[J,q]of V.points(e)){var ee=Ae.transform(J,n);if(e!=null&&ee!=null)e[q]=ee;else{var Y=void 0,C=void 0;for(var[W,U]of ne.texts(t))if(L.compare(U,re)===-1)Y=[W,U];else{C=[W,U];break}var M=!1;Y&&C&&(L.equals(C[1],re)?M=!L.hasPrevious(C[1]):M=L.common(Y[1],re).length<L.common(C[1],re).length),Y&&!M?(J.path=Y[1],J.offset=Y[0].text.length):C?(J.path=C[1],J.offset=0):e=null}}break}case"remove_text":{var{path:X,offset:te,text:G}=n;if(G.length===0)break;var le=ne.leaf(t,X),se=le.text.slice(0,te),pe=le.text.slice(te+G.length);if(le.text=se+pe,e)for(var[ve,Ce]of V.points(e))e[Ce]=Ae.transform(ve,n);break}case"set_node":{var{path:me,properties:De,newProperties:ge}=n;if(me.length===0)throw new Error("Cannot set properties on the root node!");var Ne=ne.get(t,me);for(var ae in ge){if(ae==="children"||ae==="text")throw new Error('Cannot set the "'.concat(ae,'" property of nodes!'));var Ue=ge[ae];Ue==null?delete Ne[ae]:Ne[ae]=Ue}for(var de in De)ge.hasOwnProperty(de)||delete Ne[de];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!V.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(it.stringify(we)," when there is no current selection."));e=rr({},we)}for(var Te in we){var Xe=we[Te];if(Xe==null){if(Te==="anchor"||Te==="focus")throw new Error('Cannot remove the "'.concat(Te,'" selection property'));delete e[Te]}else e[Te]=Xe}}break}case"split_node":{var{path:$e,position:xe,properties:pt}=n;if($e.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat($e,"] because the root node cannot be split."));var st=ne.get(t,$e),an=ne.parent(t,$e),xt=$e[$e.length-1],Lt;if(ce.isText(st)){var _n=st.text.slice(0,xe),zn=st.text.slice(xe);st.text=_n,Lt=rr(rr({},pt),{},{text:zn})}else{var Wn=st.children.slice(0,xe),Un=st.children.slice(xe);st.children=Wn,Lt=rr(rr({},pt),{},{children:Un})}if(an.children.splice(xt+1,0,Lt),e)for(var[Tt,An]of V.points(e))e[An]=Ae.transform(Tt,n);break}}return e},Yh={transform(t,e){t.children=Bu(t.children);var n=t.selection&&Bu(t.selection);try{n=Zh(t,n,e)}finally{t.children=xu(t.children),n?t.selection=pn(n)?xu(n):n:t.selection=null}}},Kh={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)}},Xh={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)}},Fu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ut(r)&&ut(i)){if(!Fu(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==i[o])return!1}else if(r!==i)return!1}for(var s in e)if(t[s]===void 0&&e[s]!==void 0)return!1;return!0};function Jh(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jt(t,e){if(t==null)return{};var n=Jh(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var Qh=["anchor","focus"];function Mu(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 $h(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var V={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return V.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=V.edges(t);return e},equals(t,e){return Ae.equals(t.anchor,e.anchor)&&Ae.equals(t.focus,e.focus)},includes(t,e){if(V.isRange(e)){if(V.includes(t,e.anchor)||V.includes(t,e.focus))return!0;var[n,r]=V.edges(t),[i,o]=V.edges(e);return Ae.isBefore(n,i)&&Ae.isAfter(r,o)}var[s,a]=V.edges(t),u=!1,l=!1;return Ae.isPoint(e)?(u=Ae.compare(e,s)>=0,l=Ae.compare(e,a)<=0):(u=L.compare(e,s.path)>=0,l=L.compare(e,a.path)<=0),u&&l},intersection(t,e){var n=jt(t,Qh),[r,i]=V.edges(t),[o,s]=V.edges(e),a=Ae.isBefore(r,o)?o:r,u=Ae.isBefore(i,s)?i:s;return Ae.isBefore(u,a)?null:$h({anchor:a,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!V.isCollapsed(t)},isForward(t){return!V.isBackward(t)},isRange(t){return ut(t)&&Ae.isPoint(t.anchor)&&Ae.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=V.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,s;if(i==="inward"){var a=V.isCollapsed(r);V.isForward(r)?(o="forward",s=a?o:"backward"):(o="backward",s=a?o:"forward")}else i==="outward"?V.isForward(r)?(o="backward",s="forward"):(o="forward",s="backward"):(o=i,s=i);var u=Ae.transform(r.anchor,e,{affinity:o}),l=Ae.transform(r.focus,e,{affinity:s});if(!u||!l)return null;r.anchor=u,r.focus=l})}},ku=t=>ut(t)&&ne.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return ut(t)&&ne.isNodeList(t.children)},isElement:ku,isElementList(t){return Array.isArray(t)&&t.every(e=>ue.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 ku(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},ev=["children"],tv=["text"],Tu=new WeakMap,ne={ancestor(t,e){var n=ne.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(it.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.ancestors(e,n)){var i=ne.ancestor(t,r),o=[i,r];yield o}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(it.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(it.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=ne.ancestor(t,e),{children:o}=i,s=r?o.length-1:0;r?s>=0:s<o.length;){var a=ne.child(i,s),u=e.concat(s);yield[a,u],s=r?s-1:s+1}}()},common(t,e,n){var r=L.common(e,n),i=ne.get(t,r);return[i,r]},descendant(t,e){var n=ne.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(it.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.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 ne.nodes(t,e))ue.isElement(n)&&(yield[n,r])}()},extractProps(t){if(ue.isAncestor(t)){var e=jt(t,ev);return e}else{var e=jt(t,tv);return e}},first(t,e){for(var n=e.slice(),r=ne.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(it.stringify(t)));var n=Co({children:t.children},r=>{var[i,o]=V.edges(e),s=ne.nodes(r,{reverse:!0,pass:h=>{var[,g]=h;return!V.includes(e,g)}});for(var[,a]of s){if(!V.includes(e,a)){var u=ne.parent(r,a),l=a[a.length-1];u.children.splice(l,1)}if(L.equals(a,o.path)){var c=ne.leaf(r,a);c.text=c.text.slice(0,o.offset)}if(L.equals(a,i.path)){var p=ne.leaf(r,a);p.text=p.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(it.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)||ue.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Tu.get(t);if(e!==void 0)return e;var n=t.every(r=>ne.isNode(r));return Tu.set(t,n),n},last(t,e){for(var n=e.slice(),r=ne.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=ne.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(it.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.levels(e,n)){var i=ne.get(t,r);yield[i,r]}}()},matches(t,e){return ue.isElement(t)&&ue.isElementProps(e)&&ue.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:o}=e,s=new Set,a=[],u=t;!(o&&(r?L.isBefore(a,o):L.isAfter(a,o)));){if(s.has(u)||(yield[u,a]),!s.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,a])===!1)){s.add(u);var l=r?u.children.length-1:0;L.isAncestor(a,i)&&(l=i[a.length]),a=a.concat(l),u=ne.get(t,a);continue}if(a.length===0)break;if(!r){var c=L.next(a);if(ne.has(t,c)){a=c,u=ne.get(t,a);continue}}if(r&&a[a.length-1]!==0){var p=L.previous(a);a=p,u=ne.get(t,a);continue}a=L.parent(a),u=ne.get(t,a),s.add(u)}}()},parent(t,e){var n=L.parent(e),r=ne.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(ne.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Iu(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 Re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Iu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Iu(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(!ut(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&ne.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"merge_node":return typeof t.position=="number"&&L.isPath(t.path)&&ut(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&ne.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"set_node":return L.isPath(t.path)&&ut(t.properties)&&ut(t.newProperties);case"set_selection":return t.properties===null&&V.isRange(t.newProperties)||t.newProperties===null&&V.isRange(t.properties)||ut(t.properties)&&ut(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&ut(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 Re(Re({},t),{},{type:"remove_node"});case"insert_text":return Re(Re({},t),{},{type:"remove_text"});case"merge_node":return Re(Re({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(L.equals(e,n))return t;if(L.isSibling(n,e))return Re(Re({},t),{},{path:e,newPath:n});var r=L.transform(n,t),i=L.transform(L.next(n),t);return Re(Re({},t),{},{path:r,newPath:i})}case"remove_node":return Re(Re({},t),{},{type:"insert_node"});case"remove_text":return Re(Re({},t),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:s}=t;return Re(Re({},t),{},{properties:s,newProperties:o})}case"set_selection":{var{properties:a,newProperties:u}=t;return a==null?Re(Re({},t),{},{properties:u,newProperties:null}):u==null?Re(Re({},t),{},{properties:null,newProperties:a}):Re(Re({},t),{},{properties:u,newProperties:a})}case"split_node":return Re(Re({},t),{},{type:"merge_node",path:L.next(t.path)})}}},ju=new WeakMap,nv=t=>{var e=ju.get(t);if(e!==void 0)return e;if(!ut(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||ut(t.marks))&&(t.selection===null||V.isRange(t.selection))&&ne.isNodeList(t.children)&&Zt.isOperationList(t.operations);return ju.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 nv(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)},rv={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function Nu(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 _u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ae={compare(t,e){var n=L.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&&L.equals(t.path,e.path)},isPoint(t){return ut(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:s}=r;switch(e.type){case"insert_node":case"move_node":{r.path=L.transform(o,e,n);break}case"insert_text":{L.equals(e.path,o)&&(e.offset<s||e.offset===s&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,o)&&(r.offset+=e.position),r.path=L.transform(o,e,n);break}case"remove_text":{L.equals(e.path,o)&&e.offset<=s&&(r.offset-=Math.min(s-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,o)||L.isAncestor(e.path,o))return null;r.path=L.transform(o,e,n);break}case"split_node":{if(L.equals(e.path,o)){if(e.position===s&&i==null)return null;(e.position<s||e.position===s&&i==="forward")&&(r.offset-=e.position,r.path=L.transform(o,e,_u(_u({},n),{},{affinity:"forward"})))}else r.path=L.transform(o,e,n);break}}})}},zu=void 0,it={setScrubber(t){zu=t},stringify(t){return JSON.stringify(t,zu)}},iv=["text"],ov=["anchor","focus"];function Wu(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 Nt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wu(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(o){var s=jt(o,iv);return s}return Fu(r?i(t):t,r?i(e):e)},isText(t){return ut(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=[Nt({},t)];for(var r of e){var i=jt(r,ov),[o,s]=V.edges(r),a=[],u=0,l=o.offset,c=s.offset;for(var p of n){var{length:h}=p.text,g=u;if(u+=h,l<=g&&u<=c){Object.assign(p,i),a.push(p);continue}if(l!==c&&(l===u||c===g)||l>u||c<g||c===g&&g!==0){a.push(p);continue}var y=p,v=void 0,d=void 0;if(c<u){var D=c-g;d=Nt(Nt({},y),{},{text:y.text.slice(D)}),y=Nt(Nt({},y),{},{text:y.text.slice(0,D)})}if(l>g){var B=l-g;v=Nt(Nt({},y),{},{text:y.text.slice(0,B)}),y=Nt(Nt({},y),{},{text:y.text.slice(B)})}Object.assign(y,i),v&&a.push(v),a.push(y),d&&a.push(d)}n=a}return n}},Do=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Pn=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Eo=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?fv(e):e,o=be.None,s=be.None,a=0,u=null,l=null;for(var c of i){var p=c.codePointAt(0);if(!p)break;var h=wv(c,p);if([o,s]=r?[s,h]:[h,o],Fn(o,be.ZWJ)&&Fn(s,be.ExtPict)&&(r?u=Uu(e.substring(0,a)):u=Uu(e.substring(0,e.length-a)),!u)||Fn(o,be.RI)&&Fn(s,be.RI)&&(l!==null?l=!l:r?l=!0:l=Lv(e.substring(0,e.length-a)),!l)||o!==be.None&&s!==be.None&&xv(o,s))break;a+=c.length}return a||1},sv=/\s/,av=/[\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]/,uv=/['\u2018\u2019]/,lv=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var o=Eo(e,n),[s,a]=bo(e,o,n);if(cv(s,a,n))i=!0,r+=o;else if(!i)r+=o;else break;e=a}return r},bo=(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)]},cv=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(sv.test(e))return!1;if(uv.test(e)){var i=Eo(n,r),[o,s]=bo(n,i,r);if(t(o,s,r))return!0}return!av.test(e)},fv=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(pv(i.charCodeAt(0))){var o=e.charAt(n-r-1);if(dv(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},dv=t=>t>=55296&&t<=56319,pv=t=>t>=56320&&t<=57343,be;(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"})(be||(be={}));var hv=/^(?:[\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])$/,vv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,gv=/^(?:[\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])$/,mv=/^[\u1100-\u115F\uA960-\uA97C]$/,yv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Cv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Dv=/^[\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]$/,Ev=/^[\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]$/,bv=/^(?:[\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])$/,wv=(t,e)=>{var n=be.Any;return t.search(hv)!==-1&&(n|=be.Extend),e===8205&&(n|=be.ZWJ),e>=127462&&e<=127487&&(n|=be.RI),t.search(vv)!==-1&&(n|=be.Prepend),t.search(gv)!==-1&&(n|=be.SpacingMark),t.search(mv)!==-1&&(n|=be.L),t.search(yv)!==-1&&(n|=be.V),t.search(Cv)!==-1&&(n|=be.T),t.search(Dv)!==-1&&(n|=be.LV),t.search(Ev)!==-1&&(n|=be.LVT),t.search(bv)!==-1&&(n|=be.ExtPict),n};function Fn(t,e){return(t&e)!==0}var Bv=[[be.L,be.L|be.V|be.LV|be.LVT],[be.LV|be.V,be.V|be.T],[be.LVT|be.T,be.T],[be.Any,be.Extend|be.ZWJ],[be.Any,be.SpacingMark],[be.Prepend,be.Any],[be.ZWJ,be.ExtPict],[be.RI,be.RI]];function xv(t,e){return Bv.findIndex(n=>Fn(t,n[0])&&Fn(e,n[1]))===-1}var Sv=/(?:[\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$/,Uu=t=>t.search(Sv)!==-1,Av=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Lv=t=>{var e=t.match(Av);if(e===null)return!1;var n=e[0].length/2;return n%2===1},Ov={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=Do(t)}=n;if(L.isPath(i)&&(i=m.range(t,i)),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var o=V.end(i);if(!r&&m.void(t,{at:o}))return;var s=V.start(i),a=m.pointRef(t,s),u=m.pointRef(t,o);Q.delete(t,{at:i,voids:r});var l=a.unref(),c=u.unref();i=l||c,Q.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:p,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:p,offset:h,text:e})}})}};function Hu(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 Gr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Q=Gr(Gr(Gr(Gr({},Yh),Kh),Xh),Ov),Zr=new WeakMap,Pv=t=>Zr.get(t)||!1,Fv=(t,e,n)=>{var r=Zr.get(t)||!1;Zr.set(t,!0);try{e(),n()}finally{Zr.set(t,r)}};function Ru(t,e,n){var r=Vr.get(t)||[],i=qr.get(t)||new Set,o,s,a=p=>{if(p){var h=p.join(",");s.has(h)||(s.add(h),o.push(p))}};if(n){o=[],s=new Set;for(var u of r){var l=n(u);a(l)}}else o=r,s=i;for(var c of e)a(c);Vr.set(t,o),qr.set(t,s)}var Mv=(t,e)=>{for(var n of m.pathRefs(t))Hh.transform(n,e);for(var r of m.pointRefs(t))Rh.transform(r,e);for(var i of m.rangeRefs(t))Vh.transform(i,e);if(!Pv(t)){var o=L.operationCanTransformPath(e)?s=>L.transform(s,e):void 0;Ru(t,t.getDirtyPaths(e),o)}Q.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),tr.get(t)||(tr.set(t,!0),Promise.resolve().then(()=>{tr.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},kv=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return L.levels(n)}case"insert_node":{var{node:r,path:i}=e,o=L.levels(i),s=ce.isText(r)?[]:Array.from(ne.nodes(r),P=>{var[,z]=P;return i.concat(z)});return[...o,...s]}case"merge_node":{var{path:a}=e,u=L.ancestors(a),l=L.previous(a);return[...u,l]}case"move_node":{var{path:c,newPath:p}=e;if(L.equals(c,p))return[];var h=[],g=[];for(var y of L.ancestors(c)){var v=L.transform(y,e);h.push(v)}for(var d of L.ancestors(p)){var D=L.transform(d,e);g.push(D)}var B=g[g.length-1],b=p[p.length-1],O=B.concat(b);return[...h,...g,O]}case"remove_node":{var{path:E}=e,w=L.ancestors(E);return[...w]}case"split_node":{var{path:A}=e,F=L.levels(A),R=L.next(A);return[...F,R]}default:return[]}},Tv=t=>{var{selection:e}=t;return e?ne.fragment(t,e):[]},Iv=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(ue.isElement(n)&&n.children.length===0){var i={text:""};Q.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var o=m.isEditor(n)?!1:ue.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),s=0,a=0;a<n.children.length;a++,s++){var u=ne.get(t,r);if(!ce.isText(u)){var l=u.children[s],c=u.children[s-1],p=a===n.children.length-1,h=ce.isText(l)||ue.isElement(l)&&t.isInline(l);if(h!==o)Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--;else if(ue.isElement(l)){if(t.isInline(l)){if(c==null||!ce.isText(c)){var g={text:""};Q.insertNodes(t,g,{at:r.concat(s),voids:!0}),s++}else if(p){var y={text:""};Q.insertNodes(t,y,{at:r.concat(s+1),voids:!0}),s++}}}else{if(!ce.isText(l)&&!("children"in l)){var v=l;v.children=[]}c!=null&&ce.isText(c)&&(ce.equals(l,c,{loose:!0})?(Q.mergeNodes(t,{at:r.concat(s),voids:!0}),s--):c.text===""?(Q.removeNodes(t,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--))}}}}},jv=(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},Nv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:o=e.selection,match:s}=n;if(o){var a=m.path(e,o),u=i==="lowest";for(var[l,c]of m.levels(e,{at:a,voids:r,match:s,reverse:u}))if(!ce.isText(l)){if(V.isRange(o)){if(L.isAncestor(c,o.anchor.path)&&L.isAncestor(c,o.focus.path))return[l,c]}else if(!L.equals(a,c))return[l,c]}}};function Vu(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 qu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _v=(t,e,n)=>{var{selection:r}=t;if(r){var i=(p,h)=>{if(!ce.isText(p))return!1;var[g,y]=m.parent(t,h);return!t.isVoid(g)||t.markableVoid(g)},o=V.isExpanded(r),s=!1;if(!o){var[a,u]=m.node(t,r);if(a&&i(a,u)){var[l]=m.parent(t,u);s=l&&t.markableVoid(l)}}if(o||s)Q.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var c=qu(qu({},m.marks(t)||{}),{},{[e]:n});t.marks=c,tr.get(t)||t.onChange()}}};function Gu(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 Zu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var zv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),o=m.end(e,[]),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Zu(Zu({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=c),u++}return l};function Yu(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 Ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),o=m.point(e,n,{edge:"start"}),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Ku(Ku({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=c),u++}return l},Uv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e,reverse:!0})},Hv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e})},Rv=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&V.isExpanded(r)&&Q.delete(e,{reverse:n==="backward"})},Vv=(t,e)=>[m.start(t,e),m.end(t,e)];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 Ju(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){lt(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 qv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ju(Ju({},n),{},{match:r=>ue.isElement(r)&&m.isElementReadOnly(e,r)}))},Gv=(t,e)=>m.point(t,e,{edge:"end"}),Zv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Yv=(t,e)=>{var n=m.range(t,e);return ne.fragment(t,n)};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 $u(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){lt(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 Kv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,$u($u({},n),{},{match:r=>ue.isElement(r)&&m.isVoid(e,r)}))},Xv=(t,e)=>e.children.some(n=>ue.isElement(n)&&m.isBlock(t,n)),Jv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Qv=(t,e)=>ne.has(t,e),$v=(t,e)=>e.children.every(n=>ce.isText(n)),eg=t=>{Q.splitNodes(t,{always:!0})},tg=(t,e,n)=>{Q.insertNodes(t,e,n)},ng=t=>{Q.splitNodes(t,{always:!0})};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 rg(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){lt(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 ig=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:o}=e;if(i){if(o){var s=rg({text:n},o);Q.insertNodes(e,s,{at:r.at,voids:r.voids})}else Q.insertText(e,n,r);e.marks=null}},og=(t,e)=>!t.isInline(e),sg=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),ag=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},ug=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},lg=t=>{var e=Su.get(t);return e===void 0?!0:e},cg=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},fg=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},dg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.leaf(e,i);return[o,i]};function pg(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:o}=e;if(o==null&&(o=()=>!0),!!n){var s=[],a=m.path(t,n);for(var[u,l]of ne.levels(t,a))if(o(u,l)&&(s.push([u,l]),!i&&ue.isElement(u)&&m.isVoid(t,u)))break;r&&s.reverse(),yield*s}}()}var hg=["text"],vg=["text"],gg=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:o}=r;if(n)return n;if(V.isExpanded(r)){var s=m.isEnd(e,i,i.path);if(s){var a=m.after(e,i);a&&(i=a)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:o}});if(u){var[l]=u,c=jt(l,hg);return c}else return{}}var{path:p}=i,[h]=m.leaf(e,p);if(i.offset===0){var g=m.previous(e,{at:p,match:ce.isText}),y=m.above(e,{match:O=>ue.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!y){var v=m.above(e,{match:O=>ue.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,B]=v;L.isAncestor(B,D)&&(h=d)}}}var b=jt(h,vg);return b},mg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.after(e,s,{voids:i});if(a){var[,u]=m.last(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{at:l,match:o,mode:r,voids:i});return p}}},yg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.get(e,i);return[o,i]};function Cg(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:o=!1,voids:s=!1,ignoreNonSelectable:a=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var l,c;if(rv.isSpan(n))l=n[0],c=n[1];else{var p=m.path(t,n,{edge:"start"}),h=m.path(t,n,{edge:"end"});l=o?h:p,c=o?p:h}var g=ne.nodes(t,{reverse:o,from:l,to:c,pass:O=>{var[E]=O;return ue.isElement(E)?!!(!s&&(m.isVoid(t,E)||m.isElementReadOnly(t,E))||a&&!m.isSelectable(t,E)):!1}}),y=[],v;for(var[d,D]of g)if(!(a&&ue.isElement(d)&&!m.isSelectable(t,d))){var B=v&&L.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 b=r==="lowest"?v:[d,D];b&&(i?y.push(b):yield b),v=[d,D]}}r==="lowest"&&v&&(i?y.push(v):yield v),i&&(yield*y)}}()}var Dg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,o=c=>Vr.get(c)||[],s=c=>qr.get(c)||new Set,a=c=>{var p=o(c).pop(),h=p.join(",");return s(c).delete(h),p};if(m.isNormalizing(e)){if(r){var u=Array.from(ne.nodes(e),c=>{var[,p]=c;return p}),l=new Set(u.map(c=>c.join(",")));Vr.set(e,u),qr.set(e,l)}o(e).length!==0&&m.withoutNormalizing(e,()=>{for(var c of o(e))if(ne.has(e,c)){var p=m.node(e,c),[h,g]=p;ue.isElement(h)&&h.children.length===0&&e.normalizeNode(p,{operation:i})}for(var y=o(e),v=y.length,d=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=a(e);if(ne.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:i})}d++,y=o(e)}})}},Eg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=L.parent(i),s=m.node(e,o);return s},bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pathRefs(e);return u.delete(o),o.current=null,a}},s=m.pathRefs(e);return s.add(o),o},wg=t=>{var e=Au.get(t);return e||(e=new Set,Au.set(t,e)),e},Bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:o}=r;if(L.isPath(n)){if(o==="start"){var[,s]=ne.first(e,n);n=s}else if(o==="end"){var[,a]=ne.last(e,n);n=a}}return V.isRange(n)&&(o==="start"?n=V.start(n):o==="end"?n=V.end(n):n=L.common(n.anchor.path,n.focus.path)),Ae.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},xg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pointRefs(e);return u.delete(o),o.current=null,a}},s=m.pointRefs(e);return s.add(o),o},Sg=t=>{var e=Lu.get(t);return e||(e=new Set,Lu.set(t,e)),e},Ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(L.isPath(n)){var o;if(i==="end"){var[,s]=ne.last(e,n);o=s}else{var[,a]=ne.first(e,n);o=a}var u=ne.get(e,o);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:o,offset:i==="end"?u.text.length:0}}if(V.isRange(n)){var[l,c]=V.edges(n);return i==="start"?l:c}return n};function Lg(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:o=!1,ignoreNonSelectable:s=!1}=e;if(!n)return;var a=m.range(t,n),[u,l]=V.edges(a),c=i?l:u,p=!1,h="",g=0,y=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:o,ignoreNonSelectable:s})){if(ue.isElement(d)){if(!o&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=L.isAncestor(D,l.path)?l:m.end(t,D),b=L.isAncestor(D,u.path)?u:m.start(t,D);h=m.string(t,{anchor:b,focus:B},{voids:o}),p=!0}}if(ce.isText(d)){var O=L.equals(D,c.path);for(O?(y=i?c.offset:d.text.length-c.offset,v=c.offset):(y=d.text.length,v=i?y:0),(O||p||r==="offset")&&(yield{path:D,offset:v},p=!1);;){if(g===0){if(h==="")break;g=E(h,r,i),h=bo(h,g,i)[1]}if(v=i?v-g:v+g,y=y-g,y<0){g=-y;break}g=0,yield{path:D,offset:v}}}}function E(w,A,F){return A==="character"?Eo(w,F):A==="word"?lv(w,F):A==="line"||A==="block"?w.length:1}}()}var Og=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.before(e,s,{voids:i});if(a){var[,u]=m.first(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:o,mode:r,voids:i});return p}}},Pg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.rangeRefs(e);return u.delete(o),o.current=null,a}},s=m.rangeRefs(e);return s.add(o),o},Fg=t=>{var e=Ou.get(t);return e||(e=new Set,Ou.set(t,e)),e},Mg=(t,e,n)=>{if(V.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function tl(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 kg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Tg=(t,e)=>{var{selection:n}=t;if(n){var r=(c,p)=>{if(!ce.isText(c))return!1;var[h,g]=m.parent(t,p);return!t.isVoid(h)||t.markableVoid(h)},i=V.isExpanded(n),o=!1;if(!i){var[s,a]=m.node(t,n);if(s&&r(s,a)){var[u]=m.parent(t,a);o=u&&t.markableVoid(u)}}if(i||o)Q.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var l=kg({},m.marks(t)||{});delete l[e],t.marks=l,tr.get(t)||t.onChange()}}},Ig=(t,e)=>{Su.set(t,e)},jg=(t,e)=>m.point(t,e,{edge:"start"}),Ng=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,o=m.range(e,n),[s,a]=V.edges(o),u="";for(var[l,c]of m.nodes(e,{at:o,match:ce.isText,voids:i})){var p=l.text;L.equals(c,a.path)&&(p=p.slice(0,a.offset)),L.equals(c,s.path)&&(p=p.slice(s.offset)),u+=p}return u},_g=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[o,s]=V.edges(n);if(o.offset!==0||s.offset!==0||V.isCollapsed(n)||L.hasPrevious(s.path))return n;var a=m.above(e,{at:s,match:y=>ue.isElement(y)&&m.isBlock(e,y),voids:i}),u=a?a[1]:[],l=m.start(e,o),c={anchor:l,focus:s},p=!0;for(var[h,g]of m.nodes(e,{at:c,match:ce.isText,reverse:!0,voids:i})){if(p){p=!1;continue}if(h.text!==""||L.isBefore(g,u)){s={path:g,offset:h.text.length};break}}return{anchor:o,focus:s}},zg=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Wg=(t,e,n)=>{var[r,i]=e;return ue.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Ug=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:o=!1,unit:s="character",distance:a=1,voids:u=!1}=n,{at:l=e.selection,hanging:c=!1}=n;if(l){var p=!1;if(V.isRange(l)&&V.isCollapsed(l)&&(p=!0,l=l.anchor),Ae.isPoint(l)){var h=m.void(e,{at:l,mode:"highest"});if(!u&&h){var[,g]=h;l=g}else{var y={unit:s,distance:a},v=o?m.before(e,l,y)||m.start(e,[]):m.after(e,l,y)||m.end(e,[]);l={anchor:l,focus:v},c=!0}}if(L.isPath(l)){Q.removeNodes(e,{at:l,voids:u});return}if(!V.isCollapsed(l)){if(!c){var[,d]=V.edges(l),D=m.end(e,[]);Ae.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[B,b]=V.edges(l),O=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:B,voids:u}),E=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:b,voids:u}),w=O&&E&&!L.equals(O[1],E[1]),A=L.equals(B.path,b.path),F=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),R=u?null:(i=m.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:b,mode:"highest"});if(F){var P=m.before(e,B);P&&O&&L.isAncestor(O[1],P.path)&&(B=P)}if(R){var z=m.after(e,b);z&&E&&L.isAncestor(E[1],z.path)&&(b=z)}var I=[],j;for(var T of m.nodes(e,{at:l,voids:u})){var[N,K]=T;j&&L.compare(K,j)===0||(!u&&ue.isElement(N)&&(m.isVoid(e,N)||m.isElementReadOnly(e,N))||!L.isCommon(K,B.path)&&!L.isCommon(K,b.path))&&(I.push(T),j=K)}var _=Array.from(I,se=>{var[,pe]=se;return m.pathRef(e,pe)}),ie=m.pointRef(e,B),re=m.pointRef(e,b),k="";if(!A&&!F){var H=ie.current,[J]=m.leaf(e,H),{path:q}=H,{offset:ee}=B,Y=J.text.slice(ee);Y.length>0&&(e.apply({type:"remove_text",path:q,offset:ee,text:Y}),k=Y)}if(_.reverse().map(se=>se.unref()).filter(se=>se!==null).forEach(se=>Q.removeNodes(e,{at:se,voids:u})),!R){var C=re.current,[W]=m.leaf(e,C),{path:U}=C,M=A?B.offset:0,X=W.text.slice(M,b.offset);X.length>0&&(e.apply({type:"remove_text",path:U,offset:M,text:X}),k=X)}!A&&w&&re.current&&ie.current&&Q.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),p&&o&&s==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&Q.insertText(e,k.slice(0,k.length-a));var te=ie.unref(),G=re.unref(),le=o?te||G:G||te;n.at==null&&le&&Q.select(e,le)}}})},Hg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1}=r,{at:s=Do(e),batchDirty:a=!0}=r;if(n.length){if(V.isRange(s))if(i||(s=m.unhangRange(e,s,{voids:o})),V.isCollapsed(s))s=s.anchor;else{var[,u]=V.edges(s);if(!o&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);Q.delete(e,{at:s}),s=l.unref()}else L.isPath(s)&&(s=m.start(e,s));if(!(!o&&m.void(e,{at:s}))){var c=m.above(e,{at:s,match:Y=>ue.isElement(Y)&&m.isInline(e,Y),mode:"highest",voids:o});if(c){var[,p]=c;if(m.isEnd(e,s,p)){var h=m.after(e,p);s=h}else if(m.isStart(e,s,p)){var g=m.before(e,p);s=g}}var y=m.above(e,{match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),at:s,voids:o}),[,v]=y,d=m.isStart(e,s,v),D=m.isEnd(e,s,v),B=d&&D,b=!d||d&&D,O=!D,[,E]=ne.first({children:n},[]),[,w]=ne.last({children:n},[]),A=[],F=Y=>{var[C,W]=Y,U=W.length===0;return U?!1:B?!0:!(b&&L.isAncestor(W,E)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C)||O&&L.isAncestor(W,w)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C))};for(var R of ne.nodes({children:n},{pass:F}))F(R)&&A.push(R);var P=[],z=[],I=[],j=!0,T=!1;for(var[N]of A)ue.isElement(N)&&!e.isInline(N)?(j=!1,T=!0,z.push(N)):j?P.push(N):I.push(N);var[K]=m.nodes(e,{at:s,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o}),[,_]=K,ie=m.isStart(e,s,_),re=m.isEnd(e,s,_),k=m.pathRef(e,D&&!I.length?L.next(v):v),H=m.pathRef(e,re?L.next(_):_);Q.splitNodes(e,{at:s,match:Y=>T?ue.isElement(Y)&&m.isBlock(e,Y):ce.isText(Y)||m.isInline(e,Y),mode:T?"lowest":"highest",always:T&&(!d||P.length>0)&&(!D||I.length>0),voids:o});var J=m.pathRef(e,!ie||ie&&re?L.next(_):_);if(Q.insertNodes(e,P,{at:J.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),B&&!P.length&&z.length&&!I.length&&Q.delete(e,{at:v,voids:o}),Q.insertNodes(e,z,{at:k.current,match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),mode:"lowest",voids:o,batchDirty:a}),Q.insertNodes(e,I,{at:H.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),!r.at){var q;if(I.length>0&&H.current?q=L.previous(H.current):z.length>0&&k.current?q=L.previous(k.current):J.current&&(q=L.previous(J.current)),q){var ee=m.end(e,q);Q.select(e,ee)}}J.unref(),k.unref(),H.unref()}}})},Rg=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")Q.select(e,i.anchor);else if(r==="focus")Q.select(e,i.focus);else if(r==="start"){var[o]=V.edges(i);Q.select(e,o)}else if(r==="end"){var[,s]=V.edges(i);Q.select(e,s)}}else return},Vg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},qg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:o="character",reverse:s=!1}=n,{edge:a=null}=n;if(r){a==="start"&&(a=V.isBackward(r)?"focus":"anchor"),a==="end"&&(a=V.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,c={distance:i,unit:o,ignoreNonSelectable:!0},p={};if(a==null||a==="anchor"){var h=s?m.before(e,u,c):m.after(e,u,c);h&&(p.anchor=h)}if(a==null||a==="focus"){var g=s?m.before(e,l,c):m.after(e,l,c);g&&(p.focus=g)}Q.setSelection(e,p)}},Gg=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){Q.setSelection(t,e);return}if(!V.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(it.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function nl(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 rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:o="both"}=r;if(i){o==="start"&&(o=V.isBackward(i)?"focus":"anchor"),o==="end"&&(o=V.isBackward(i)?"anchor":"focus");var{anchor:s,focus:a}=i,u=o==="anchor"?s:a;Q.setSelection(e,{[o==="anchor"?"anchor":"focus"]:rl(rl({},u),n)})}},Yg=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var o in e)(o==="anchor"&&e.anchor!=null&&!Ae.equals(e.anchor,n.anchor)||o==="focus"&&e.focus!=null&&!Ae.equals(e.focus,n.focus)||o!=="anchor"&&o!=="focus"&&e[o]!==n[o])&&(r[o]=n[o],i[o]=e[o]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},Kg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1,mode:s="lowest",batchDirty:a=!0}=r,{at:u,match:l,select:c}=r;if(ne.isNode(n)&&(n=[n]),n.length!==0){var[p]=n;if(u||(u=Do(e),c!==!1&&(c=!0)),c==null&&(c=!1),V.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:o})),V.isCollapsed(u))u=u.anchor;else{var[,h]=V.edges(u),g=m.pointRef(e,h);Q.delete(e,{at:u}),u=g.unref()}if(Ae.isPoint(u)){l==null&&(ce.isText(p)?l=P=>ce.isText(P):e.isInline(p)?l=P=>ce.isText(P)||m.isInline(e,P):l=P=>ue.isElement(P)&&m.isBlock(e,P));var[y]=m.nodes(e,{at:u.path,match:l,mode:s,voids:o});if(y){var[,v]=y,d=m.pathRef(e,v),D=m.isEnd(e,u,v);Q.splitNodes(e,{at:u,match:l,mode:s,voids:o});var B=d.unref();u=D?L.next(B):B}else return}var b=L.parent(u),O=u[u.length-1];if(!(!o&&m.void(e,{at:b}))){if(a){var E=[],w=L.levels(b);Fv(e,()=>{var P=function(){var j=b.concat(O);O++;var T={type:"insert_node",path:j,node:z};e.apply(T),u=L.next(u),E.push(T),ce.isText?w.push(...Array.from(ne.nodes(z),N=>{var[,K]=N;return j.concat(K)})):w.push(j)};for(var z of n)P()},()=>{Ru(e,w,P=>{var z=P;for(var I of E)if(L.operationCanTransformPath(I)&&(z=L.transform(z,I),!z))return null;return z})})}else for(var A of n){var F=b.concat(O);O++,e.apply({type:"insert_node",path:F,node:A}),u=L.next(u)}if(u=L.previous(u),c){var R=m.end(e,u);R&&Q.select(e,R)}}}})},Xg=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:o=!1}=n,{match:s}=n;if(s==null&&(s=L.isPath(r)?Pn(e,r):O=>ue.isElement(O)&&m.isBlock(e,O)),!!r){var a=m.nodes(e,{at:r,match:s,mode:i,voids:o}),u=Array.from(a,O=>{var[,E]=O;return m.pathRef(e,E)});for(var l of u){var c=l.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var p=m.node(e,L.parent(c)),[h,g]=p,y=c[c.length-1],{length:v}=h.children;if(v===1){var d=L.next(g);Q.moveNodes(e,{at:c,to:d,voids:o}),Q.removeNodes(e,{at:g,voids:o})}else if(y===0)Q.moveNodes(e,{at:c,to:g,voids:o});else if(y===v-1){var D=L.next(g);Q.moveNodes(e,{at:c,to:D,voids:o})}else{var B=L.next(c),b=L.next(g);Q.splitNodes(e,{at:B,voids:o}),Q.moveNodes(e,{at:c,to:b,voids:o})}}}})},Jg=["text"],Qg=["children"],il=(t,e)=>{if(ue.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?il(t,n.children[0]):!1}else return!m.isEditor(e)},$g=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:o=!1,voids:s=!1,mode:a="lowest"}=n;if(i){if(r==null)if(L.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>ue.isElement(P)&&m.isBlock(e,P);if(!o&&V.isRange(i)&&(i=m.unhangRange(e,i,{voids:s})),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var[,l]=V.edges(i),c=m.pointRef(e,l);Q.delete(e,{at:i}),i=c.unref(),n.at==null&&Q.select(e,i)}var[p]=m.nodes(e,{at:i,match:r,voids:s,mode:a}),h=m.previous(e,{at:i,match:r,voids:s,mode:a});if(!(!p||!h)){var[g,y]=p,[v,d]=h;if(!(y.length===0||d.length===0)){var D=L.next(d),B=L.common(y,d),b=L.isSibling(y,d),O=Array.from(m.levels(e,{at:y}),P=>{var[z]=P;return z}).slice(B.length).slice(0,-1),E=m.above(e,{at:y,mode:"highest",match:P=>O.includes(P)&&il(e,P)}),w=E&&m.pathRef(e,E[1]),A,F;if(ce.isText(g)&&ce.isText(v)){var R=jt(g,Jg);F=v.text.length,A=R}else if(ue.isElement(g)&&ue.isElement(v)){var R=jt(g,Qg);F=v.children.length,A=R}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(it.stringify(g)," ").concat(it.stringify(v)));b||Q.moveNodes(e,{at:y,to:D,voids:s}),w&&Q.removeNodes(e,{at:w.current,voids:s}),m.shouldMergeNodesRemovePrevNode(e,h,p)?Q.removeNodes(e,{at:d,voids:s}):e.apply({type:"merge_node",path:D,position:F,properties:A}),w&&w.unref()}}}})},em=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:o=!1}=e,{match:s}=e;if(r){s==null&&(s=L.isPath(r)?Pn(t,r):g=>ue.isElement(g)&&m.isBlock(t,g));var a=m.pathRef(t,n),u=m.nodes(t,{at:r,match:s,mode:i,voids:o}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(t,y)});for(var c of l){var p=c.unref(),h=a.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),a.current&&L.isSibling(h,p)&&L.isAfter(h,p)&&(a.current=L.next(a.current))}a.unref()}})},tm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),!r&&V.isRange(s)&&(s=m.unhangRange(e,s,{voids:i}));var u=m.nodes(e,{at:s,match:a,mode:o,voids:i}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(e,y)});for(var c of l){var p=c.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},nm=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:o=e.selection,compare:s,merge:a}=r,{hanging:u=!1,mode:l="lowest",split:c=!1,voids:p=!1}=r;if(o){if(i==null&&(i=L.isPath(o)?Pn(e,o):F=>ue.isElement(F)&&m.isBlock(e,F)),!u&&V.isRange(o)&&(o=m.unhangRange(e,o,{voids:p})),c&&V.isRange(o)){if(V.isCollapsed(o)&&m.leaf(e,o.anchor)[0].text.length>0)return;var h=m.rangeRef(e,o,{affinity:"inward"}),[g,y]=V.edges(o),v=l==="lowest"?"lowest":"highest",d=m.isEnd(e,y,y.path);Q.splitNodes(e,{at:y,match:i,mode:v,voids:p,always:!d});var D=m.isStart(e,g,g.path);Q.splitNodes(e,{at:g,match:i,mode:v,voids:p,always:!D}),o=h.unref(),r.at==null&&Q.select(e,o)}s||(s=(F,R)=>F!==R);for(var[B,b]of m.nodes(e,{at:o,match:i,mode:l,voids:p})){var O={},E={};if(b.length!==0){var w=!1;for(var A in n)A==="children"||A==="text"||s(n[A],B[A])&&(w=!0,B.hasOwnProperty(A)&&(O[A]=B[A]),a?n[A]!=null&&(E[A]=a(B[A],n[A])):n[A]!=null&&(E[A]=n[A]));w&&e.apply({type:"set_node",path:b,properties:O,newProperties:E})}}}})},rm=(t,e)=>{if(V.isCollapsed(e))return e.anchor;var[,n]=V.edges(e),r=m.pointRef(t,n);return Q.delete(t,{at:e}),r.unref()},im=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:o,at:s=e.selection,height:a=0,always:u=!1}=n;if(o==null&&(o=re=>ue.isElement(re)&&m.isBlock(e,re)),V.isRange(s)&&(s=rm(e,s)),L.isPath(s)){var l=s,c=m.point(e,l),[p]=m.parent(e,l);o=re=>re===p,a=c.path.length-l.length+1,s=c,u=!0}if(s){var h=m.pointRef(e,s,{affinity:"backward"}),g;try{var[y]=m.nodes(e,{at:s,match:o,mode:r,voids:i});if(!y)return;var v=m.void(e,{at:s,mode:"highest"}),d=0;if(!i&&v){var[D,B]=v;if(ue.isElement(D)&&e.isInline(D)){var b=m.after(e,B);if(!b){var O={text:""},E=L.next(B);Q.insertNodes(e,O,{at:E,voids:i}),b=m.point(e,E)}s=b,u=!0}var w=s.path.length-B.length;a=w+1,u=!0}g=m.pointRef(e,s);var A=s.path.length-a,[,F]=y,R=s.path.slice(0,A),P=a===0?s.offset:s.path[A]+d;for(var[z,I]of m.levels(e,{at:R,reverse:!0,voids:i})){var j=!1;if(I.length<F.length||I.length===0||!i&&ue.isElement(z)&&m.isVoid(e,z))break;var T=h.current,N=m.isEnd(e,T,I);if(u||!h||!m.isEdge(e,T,I)){j=!0;var K=ne.extractProps(z);e.apply({type:"split_node",path:I,position:P,properties:K})}P=I[I.length-1]+(j||N?1:0)}if(n.at==null){var _=g.current||m.end(e,[]);Q.select(e,_)}}finally{var ie;h.unref(),(ie=g)===null||ie===void 0||ie.unref()}}})},om=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var o of n)i[o]=null;Q.setNodes(e,i,r)},sm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),L.isPath(s)&&(s=m.range(e,s));var u=V.isRange(s)?m.rangeRef(e,s):null,l=m.nodes(e,{at:s,match:a,mode:r,voids:o}),c=Array.from(l,g=>{var[,y]=g;return m.pathRef(e,y)}).reverse(),p=function(){var y=h.unref(),[v]=m.node(e,y),d=m.range(e,y);i&&u&&(d=V.intersection(u.current,d)),Q.liftNodes(e,{at:d,match:D=>ue.isAncestor(v)&&v.children.includes(D),voids:o})};for(var h of c)p();u&&u.unref()}})};function ol(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 sl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ol(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var am=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:o=!1,voids:s=!1}=r,{match:a,at:u=e.selection}=r;if(u){if(a==null&&(L.isPath(u)?a=Pn(e,u):e.isInline(n)?a=d=>ue.isElement(d)&&m.isInline(e,d)||ce.isText(d):a=d=>ue.isElement(d)&&m.isBlock(e,d)),o&&V.isRange(u)){var[l,c]=V.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});Q.splitNodes(e,{at:c,match:a,voids:s}),Q.splitNodes(e,{at:l,match:a,voids:s}),u=p.unref(),r.at==null&&Q.select(e,u)}var h=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>ue.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:s})),g=function(){var D=V.isRange(u)?V.intersection(u,m.range(e,v)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:a,mode:i,voids:s}));if(B.length>0){var[b]=B,O=B[B.length-1],[,E]=b,[,w]=O;if(E.length===0&&w.length===0)return 0;var A=L.equals(E,w)?L.parent(E):L.common(E,w),F=m.range(e,E,w),R=m.node(e,A),[P]=R,z=A.length+1,I=L.next(w.slice(0,z)),j=sl(sl({},n),{},{children:[]});Q.insertNodes(e,j,{at:I,voids:s}),Q.moveNodes(e,{at:F,match:T=>ue.isAncestor(P)&&P.children.includes(T),to:I.concat(0),voids:s})}},y;for(var[,v]of h)y=g()}})},um=()=>{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 Mv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ng(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hg(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pg(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $g(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return em(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tm(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nm(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return im(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return om(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sm(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return am(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)}};return t};/*!
|
76
|
+
*/function du(t){return Object.prototype.toString.call(t)==="[object Object]"}function ut(t){var e,n;return du(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(du(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var pu=Symbol.for("immer-nothing"),hu=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state"),Fh=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 ht(t,...e){if(process.env.NODE_ENV!=="production"){const n=Fh[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 On=Object.getPrototypeOf;function pn(t){return!!t&&!!t[Ct]}function hn(t){var e;return t?vu(t)||Array.isArray(t)||!!t[hu]||!!((e=t.constructor)!=null&&e[hu])||zr(t)||Wr(t):!1}var Mh=Object.prototype.constructor.toString();function vu(t){if(!t||typeof t!="object")return!1;const e=On(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)===Mh}function Nr(t,e){_r(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function _r(t){const e=t[Ct];return e?e.type_:Array.isArray(t)?1:zr(t)?2:Wr(t)?3:0}function uo(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function gu(t,e,n){const r=_r(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function kh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function zr(t){return t instanceof Map}function Wr(t){return t instanceof Set}function vn(t){return t.copy_||t.base_}function lo(t,e){if(zr(t))return new Map(t);if(Wr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=vu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Ct];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function co(t,e=!1){return Ur(t)||pn(t)||!hn(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=Th),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>co(r,!0))),t}function Th(){ht(2)}function Ur(t){return Object.isFrozen(t)}var Ih={};function gn(t){const e=Ih[t];return e||ht(0,t),e}var $n;function mu(){return $n}function jh(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yu(t,e){e&&(gn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function fo(t){po(t),t.drafts_.forEach(Nh),t.drafts_=null}function po(t){t===$n&&($n=t.parent_)}function Cu(t){return $n=jh($n,t)}function Nh(t){const e=t[Ct];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Du(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Ct].modified_&&(fo(e),ht(4)),hn(t)&&(t=Hr(e,t),e.parent_||Rr(e,t)),e.patches_&&gn("Patches").generateReplacementPatches_(n[Ct].base_,t,e.patches_,e.inversePatches_)):t=Hr(e,n,[]),fo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==pu?t:void 0}function Hr(t,e,n){if(Ur(e))return e;const r=e[Ct];if(!r)return Nr(e,(i,o)=>Eu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Rr(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Nr(o,(a,u)=>Eu(t,r,i,a,u,n,s)),Rr(t,i,!1),n&&t.patches_&&gn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Eu(t,e,n,r,i,o,s){if(process.env.NODE_ENV!=="production"&&i===n&&ht(5),pn(i)){const a=o&&e&&e.type_!==3&&!uo(e.assigned_,r)?o.concat(r):void 0,u=Hr(t,i,a);if(gu(n,r,u),pn(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(hn(i)&&!Ur(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Hr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Rr(t,i)}}function Rr(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&co(e,n)}function _h(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:mu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=ho;n&&(i=[r],o=er);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var ho={get(t,e){if(e===Ct)return t;const n=vn(t);if(!uo(n,e))return zh(t,n,e);const r=n[e];return t.finalized_||!hn(r)?r:r===vo(t.base_,e)?(mo(t),t.copy_[e]=yo(r,t)):r},has(t,e){return e in vn(t)},ownKeys(t){return Reflect.ownKeys(vn(t))},set(t,e,n){const r=bu(vn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=vo(vn(t),e),o=i==null?void 0:i[Ct];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(kh(n,i)&&(n!==void 0||uo(t.base_,e)))return!0;mo(t),go(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 vo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,mo(t),go(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=vn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ht(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ht(12)}},er={};Nr(ho,(t,e)=>{er[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),er.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&ht(13),er.set.call(this,t,e,void 0)},er.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&ht(14),ho.set.call(this,t[0],e,n,t[0])};function vo(t,e){const n=t[Ct];return(n?vn(n):t)[e]}function zh(t,e,n){var i;const r=bu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function bu(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function go(t){t.modified_||(t.modified_=!0,t.parent_&&go(t.parent_))}function mo(t){t.copy_||(t.copy_=lo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Wh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(u=o,...l){return s.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let i;if(hn(e)){const o=Cu(this),s=yo(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?fo(o):po(o)}return yu(o,r),Du(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===pu&&(i=void 0),this.autoFreeze_&&co(i,!0),r){const o=[],s=[];gn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ht(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,u=>e(u,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),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){hn(t)||ht(8),pn(t)&&(t=Uh(t));const e=Cu(this),n=yo(t,void 0);return n[Ct].isManual_=!0,po(e),n}finishDraft(t,e){const n=t&&t[Ct];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return yu(r,e),Du(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=gn("Patches").applyPatches_;return pn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function yo(t,e){const n=zr(t)?gn("MapSet").proxyMap_(t,e):Wr(t)?gn("MapSet").proxySet_(t,e):_h(t,e);return(e?e.scope_:mu()).drafts_.push(n),n}function Uh(t){return pn(t)||ht(10,t),wu(t)}function wu(t){if(!hn(t)||Ur(t))return t;const e=t[Ct];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=lo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=lo(t,!0);return Nr(n,(r,i)=>{gu(n,r,wu(i))}),e&&(e.finalized_=!1),n}var Dt=new Wh,Co=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt);var Bu=Dt.createDraft.bind(Dt),xu=Dt.finishDraft.bind(Dt),Hh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=L.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Rh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Se.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Vh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=V.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Vr=new WeakMap,qr=new WeakMap,tr=new WeakMap,Su=new WeakMap,Au=new WeakMap,Lu=new WeakMap,Ou=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=L.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],o=e[r];if(i!==o)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),o=t[n],s=e[n];return L.equals(r,i)&&o>s},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return L.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),o=t[n],s=e[n];return L.equals(r,i)&&o<s},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 L.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&L.compare(t,e)===0},isBefore(t,e){return L.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&L.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&L.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&L.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&L.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],o=e[e.length-1];return i!==o&&L.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(!L.isAncestor(e,t)&&!L.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:o}=e;(L.equals(o,r)||L.endsBefore(o,r)||L.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:s}=e;if(L.equals(s,r)||L.isAncestor(s,r))return null;L.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{var{path:a,position:u}=e;L.equals(a,r)||L.endsBefore(a,r)?r[a.length-1]-=1:L.isAncestor(a,r)&&(r[a.length-1]-=1,r[a.length]+=u);break}case"split_node":{var{path:l,position:c}=e;if(L.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,r)?r[l.length-1]+=1:L.isAncestor(l,r)&&t[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:p,newPath:h}=e;if(L.equals(p,h))return r;if(L.isAncestor(p,r)||L.equals(p,r)){var g=h.slice();return L.endsBefore(p,h)&&p.length<h.length&&(g[p.length-1]-=1),g.concat(r.slice(p.length))}else L.isSibling(p,h)&&(L.isAncestor(h,r)||L.equals(h,r))?L.endsBefore(p,r)?r[p.length-1]-=1:r[p.length-1]+=1:L.endsBefore(h,r)||L.equals(h,r)||L.isAncestor(h,r)?(L.endsBefore(p,r)&&(r[p.length-1]-=1),r[h.length-1]+=1):L.endsBefore(p,r)&&(L.equals(h,r)&&(r[h.length-1]+=1),r[p.length-1]-=1);break}}return r}};function nr(t){"@babel/helpers - typeof";return nr=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},nr(t)}function qh(t,e){if(nr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gh(t){var e=qh(t,"string");return nr(e)==="symbol"?e:String(e)}function lt(t,e,n){return e=Gh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pu(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 rr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zh=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=ne.parent(t,r),s=r[r.length-1];if(s>o.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(o.children.splice(s,0,i),e)for(var[a,u]of V.points(e))e[u]=Se.transform(a,n);break}case"insert_text":{var{path:l,offset:c,text:p}=n;if(p.length===0)break;var h=ne.leaf(t,l),g=h.text.slice(0,c),y=h.text.slice(c);if(h.text=g+p+y,e)for(var[v,d]of V.points(e))e[d]=Se.transform(v,n);break}case"merge_node":{var{path:D}=n,B=ne.get(t,D),b=L.previous(D),O=ne.get(t,b),E=ne.parent(t,D),w=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(it.stringify(B)," ").concat(it.stringify(O)));if(E.children.splice(w,1),e)for(var[A,F]of V.points(e))e[F]=Se.transform(A,n);break}case"move_node":{var{path:R,newPath:P}=n;if(L.isAncestor(R,P))throw new Error("Cannot move a path [".concat(R,"] to new path [").concat(P,"] because the destination is inside itself."));var z=ne.get(t,R),I=ne.parent(t,R),j=R[R.length-1];I.children.splice(j,1);var T=L.transform(R,n),N=ne.get(t,L.parent(T)),K=T[T.length-1];if(N.children.splice(K,0,z),e)for(var[_,ie]of V.points(e))e[ie]=Se.transform(_,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],H=ne.parent(t,re);if(H.children.splice(k,1),e)for(var[J,q]of V.points(e)){var ee=Se.transform(J,n);if(e!=null&&ee!=null)e[q]=ee;else{var Y=void 0,C=void 0;for(var[W,U]of ne.texts(t))if(L.compare(U,re)===-1)Y=[W,U];else{C=[W,U];break}var M=!1;Y&&C&&(L.equals(C[1],re)?M=!L.hasPrevious(C[1]):M=L.common(Y[1],re).length<L.common(C[1],re).length),Y&&!M?(J.path=Y[1],J.offset=Y[0].text.length):C?(J.path=C[1],J.offset=0):e=null}}break}case"remove_text":{var{path:X,offset:te,text:G}=n;if(G.length===0)break;var le=ne.leaf(t,X),se=le.text.slice(0,te),pe=le.text.slice(te+G.length);if(le.text=se+pe,e)for(var[ve,Ce]of V.points(e))e[Ce]=Se.transform(ve,n);break}case"set_node":{var{path:me,properties:De,newProperties:ge}=n;if(me.length===0)throw new Error("Cannot set properties on the root node!");var Ne=ne.get(t,me);for(var ae in ge){if(ae==="children"||ae==="text")throw new Error('Cannot set the "'.concat(ae,'" property of nodes!'));var Ue=ge[ae];Ue==null?delete Ne[ae]:Ne[ae]=Ue}for(var de in De)ge.hasOwnProperty(de)||delete Ne[de];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!V.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(it.stringify(we)," when there is no current selection."));e=rr({},we)}for(var Te in we){var Xe=we[Te];if(Xe==null){if(Te==="anchor"||Te==="focus")throw new Error('Cannot remove the "'.concat(Te,'" selection property'));delete e[Te]}else e[Te]=Xe}}break}case"split_node":{var{path:$e,position:xe,properties:pt}=n;if($e.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat($e,"] because the root node cannot be split."));var st=ne.get(t,$e),an=ne.parent(t,$e),xt=$e[$e.length-1],Lt;if(ce.isText(st)){var _n=st.text.slice(0,xe),zn=st.text.slice(xe);st.text=_n,Lt=rr(rr({},pt),{},{text:zn})}else{var Wn=st.children.slice(0,xe),Un=st.children.slice(xe);st.children=Wn,Lt=rr(rr({},pt),{},{children:Un})}if(an.children.splice(xt+1,0,Lt),e)for(var[Tt,An]of V.points(e))e[An]=Se.transform(Tt,n);break}}return e},Yh={transform(t,e){t.children=Bu(t.children);var n=t.selection&&Bu(t.selection);try{n=Zh(t,n,e)}finally{t.children=xu(t.children),n?t.selection=pn(n)?xu(n):n:t.selection=null}}},Kh={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)}},Xh={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)}},Fu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ut(r)&&ut(i)){if(!Fu(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==i[o])return!1}else if(r!==i)return!1}for(var s in e)if(t[s]===void 0&&e[s]!==void 0)return!1;return!0};function Jh(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jt(t,e){if(t==null)return{};var n=Jh(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var Qh=["anchor","focus"];function Mu(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 $h(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var V={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return V.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=V.edges(t);return e},equals(t,e){return Se.equals(t.anchor,e.anchor)&&Se.equals(t.focus,e.focus)},includes(t,e){if(V.isRange(e)){if(V.includes(t,e.anchor)||V.includes(t,e.focus))return!0;var[n,r]=V.edges(t),[i,o]=V.edges(e);return Se.isBefore(n,i)&&Se.isAfter(r,o)}var[s,a]=V.edges(t),u=!1,l=!1;return Se.isPoint(e)?(u=Se.compare(e,s)>=0,l=Se.compare(e,a)<=0):(u=L.compare(e,s.path)>=0,l=L.compare(e,a.path)<=0),u&&l},intersection(t,e){var n=jt(t,Qh),[r,i]=V.edges(t),[o,s]=V.edges(e),a=Se.isBefore(r,o)?o:r,u=Se.isBefore(i,s)?i:s;return Se.isBefore(u,a)?null:$h({anchor:a,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Se.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Se.equals(e,n)},isExpanded(t){return!V.isCollapsed(t)},isForward(t){return!V.isBackward(t)},isRange(t){return ut(t)&&Se.isPoint(t.anchor)&&Se.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=V.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,s;if(i==="inward"){var a=V.isCollapsed(r);V.isForward(r)?(o="forward",s=a?o:"backward"):(o="backward",s=a?o:"forward")}else i==="outward"?V.isForward(r)?(o="backward",s="forward"):(o="forward",s="backward"):(o=i,s=i);var u=Se.transform(r.anchor,e,{affinity:o}),l=Se.transform(r.focus,e,{affinity:s});if(!u||!l)return null;r.anchor=u,r.focus=l})}},ku=t=>ut(t)&&ne.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return ut(t)&&ne.isNodeList(t.children)},isElement:ku,isElementList(t){return Array.isArray(t)&&t.every(e=>ue.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 ku(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},ev=["children"],tv=["text"],Tu=new WeakMap,ne={ancestor(t,e){var n=ne.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(it.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.ancestors(e,n)){var i=ne.ancestor(t,r),o=[i,r];yield o}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(it.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(it.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=ne.ancestor(t,e),{children:o}=i,s=r?o.length-1:0;r?s>=0:s<o.length;){var a=ne.child(i,s),u=e.concat(s);yield[a,u],s=r?s-1:s+1}}()},common(t,e,n){var r=L.common(e,n),i=ne.get(t,r);return[i,r]},descendant(t,e){var n=ne.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(it.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.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 ne.nodes(t,e))ue.isElement(n)&&(yield[n,r])}()},extractProps(t){if(ue.isAncestor(t)){var e=jt(t,ev);return e}else{var e=jt(t,tv);return e}},first(t,e){for(var n=e.slice(),r=ne.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(it.stringify(t)));var n=Co({children:t.children},r=>{var[i,o]=V.edges(e),s=ne.nodes(r,{reverse:!0,pass:h=>{var[,g]=h;return!V.includes(e,g)}});for(var[,a]of s){if(!V.includes(e,a)){var u=ne.parent(r,a),l=a[a.length-1];u.children.splice(l,1)}if(L.equals(a,o.path)){var c=ne.leaf(r,a);c.text=c.text.slice(0,o.offset)}if(L.equals(a,i.path)){var p=ne.leaf(r,a);p.text=p.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(it.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)||ue.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Tu.get(t);if(e!==void 0)return e;var n=t.every(r=>ne.isNode(r));return Tu.set(t,n),n},last(t,e){for(var n=e.slice(),r=ne.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=ne.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(it.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.levels(e,n)){var i=ne.get(t,r);yield[i,r]}}()},matches(t,e){return ue.isElement(t)&&ue.isElementProps(e)&&ue.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:o}=e,s=new Set,a=[],u=t;!(o&&(r?L.isBefore(a,o):L.isAfter(a,o)));){if(s.has(u)||(yield[u,a]),!s.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,a])===!1)){s.add(u);var l=r?u.children.length-1:0;L.isAncestor(a,i)&&(l=i[a.length]),a=a.concat(l),u=ne.get(t,a);continue}if(a.length===0)break;if(!r){var c=L.next(a);if(ne.has(t,c)){a=c,u=ne.get(t,a);continue}}if(r&&a[a.length-1]!==0){var p=L.previous(a);a=p,u=ne.get(t,a);continue}a=L.parent(a),u=ne.get(t,a),s.add(u)}}()},parent(t,e){var n=L.parent(e),r=ne.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(ne.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Iu(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 Re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Iu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Iu(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(!ut(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&ne.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"merge_node":return typeof t.position=="number"&&L.isPath(t.path)&&ut(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&ne.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"set_node":return L.isPath(t.path)&&ut(t.properties)&&ut(t.newProperties);case"set_selection":return t.properties===null&&V.isRange(t.newProperties)||t.newProperties===null&&V.isRange(t.properties)||ut(t.properties)&&ut(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&ut(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 Re(Re({},t),{},{type:"remove_node"});case"insert_text":return Re(Re({},t),{},{type:"remove_text"});case"merge_node":return Re(Re({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(L.equals(e,n))return t;if(L.isSibling(n,e))return Re(Re({},t),{},{path:e,newPath:n});var r=L.transform(n,t),i=L.transform(L.next(n),t);return Re(Re({},t),{},{path:r,newPath:i})}case"remove_node":return Re(Re({},t),{},{type:"insert_node"});case"remove_text":return Re(Re({},t),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:s}=t;return Re(Re({},t),{},{properties:s,newProperties:o})}case"set_selection":{var{properties:a,newProperties:u}=t;return a==null?Re(Re({},t),{},{properties:u,newProperties:null}):u==null?Re(Re({},t),{},{properties:null,newProperties:a}):Re(Re({},t),{},{properties:u,newProperties:a})}case"split_node":return Re(Re({},t),{},{type:"merge_node",path:L.next(t.path)})}}},ju=new WeakMap,nv=t=>{var e=ju.get(t);if(e!==void 0)return e;if(!ut(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||ut(t.marks))&&(t.selection===null||V.isRange(t.selection))&&ne.isNodeList(t.children)&&Zt.isOperationList(t.operations);return ju.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 nv(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)},rv={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function Nu(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 _u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Se={compare(t,e){var n=L.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Se.compare(t,e)===1},isBefore(t,e){return Se.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return ut(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:s}=r;switch(e.type){case"insert_node":case"move_node":{r.path=L.transform(o,e,n);break}case"insert_text":{L.equals(e.path,o)&&(e.offset<s||e.offset===s&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,o)&&(r.offset+=e.position),r.path=L.transform(o,e,n);break}case"remove_text":{L.equals(e.path,o)&&e.offset<=s&&(r.offset-=Math.min(s-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,o)||L.isAncestor(e.path,o))return null;r.path=L.transform(o,e,n);break}case"split_node":{if(L.equals(e.path,o)){if(e.position===s&&i==null)return null;(e.position<s||e.position===s&&i==="forward")&&(r.offset-=e.position,r.path=L.transform(o,e,_u(_u({},n),{},{affinity:"forward"})))}else r.path=L.transform(o,e,n);break}}})}},zu=void 0,it={setScrubber(t){zu=t},stringify(t){return JSON.stringify(t,zu)}},iv=["text"],ov=["anchor","focus"];function Wu(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 Nt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wu(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(o){var s=jt(o,iv);return s}return Fu(r?i(t):t,r?i(e):e)},isText(t){return ut(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=[Nt({},t)];for(var r of e){var i=jt(r,ov),[o,s]=V.edges(r),a=[],u=0,l=o.offset,c=s.offset;for(var p of n){var{length:h}=p.text,g=u;if(u+=h,l<=g&&u<=c){Object.assign(p,i),a.push(p);continue}if(l!==c&&(l===u||c===g)||l>u||c<g||c===g&&g!==0){a.push(p);continue}var y=p,v=void 0,d=void 0;if(c<u){var D=c-g;d=Nt(Nt({},y),{},{text:y.text.slice(D)}),y=Nt(Nt({},y),{},{text:y.text.slice(0,D)})}if(l>g){var B=l-g;v=Nt(Nt({},y),{},{text:y.text.slice(0,B)}),y=Nt(Nt({},y),{},{text:y.text.slice(B)})}Object.assign(y,i),v&&a.push(v),a.push(y),d&&a.push(d)}n=a}return n}},Do=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Pn=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Eo=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?fv(e):e,o=be.None,s=be.None,a=0,u=null,l=null;for(var c of i){var p=c.codePointAt(0);if(!p)break;var h=wv(c,p);if([o,s]=r?[s,h]:[h,o],Fn(o,be.ZWJ)&&Fn(s,be.ExtPict)&&(r?u=Uu(e.substring(0,a)):u=Uu(e.substring(0,e.length-a)),!u)||Fn(o,be.RI)&&Fn(s,be.RI)&&(l!==null?l=!l:r?l=!0:l=Lv(e.substring(0,e.length-a)),!l)||o!==be.None&&s!==be.None&&xv(o,s))break;a+=c.length}return a||1},sv=/\s/,av=/[\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]/,uv=/['\u2018\u2019]/,lv=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var o=Eo(e,n),[s,a]=bo(e,o,n);if(cv(s,a,n))i=!0,r+=o;else if(!i)r+=o;else break;e=a}return r},bo=(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)]},cv=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(sv.test(e))return!1;if(uv.test(e)){var i=Eo(n,r),[o,s]=bo(n,i,r);if(t(o,s,r))return!0}return!av.test(e)},fv=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(pv(i.charCodeAt(0))){var o=e.charAt(n-r-1);if(dv(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},dv=t=>t>=55296&&t<=56319,pv=t=>t>=56320&&t<=57343,be;(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"})(be||(be={}));var hv=/^(?:[\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])$/,vv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,gv=/^(?:[\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])$/,mv=/^[\u1100-\u115F\uA960-\uA97C]$/,yv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Cv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Dv=/^[\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]$/,Ev=/^[\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]$/,bv=/^(?:[\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])$/,wv=(t,e)=>{var n=be.Any;return t.search(hv)!==-1&&(n|=be.Extend),e===8205&&(n|=be.ZWJ),e>=127462&&e<=127487&&(n|=be.RI),t.search(vv)!==-1&&(n|=be.Prepend),t.search(gv)!==-1&&(n|=be.SpacingMark),t.search(mv)!==-1&&(n|=be.L),t.search(yv)!==-1&&(n|=be.V),t.search(Cv)!==-1&&(n|=be.T),t.search(Dv)!==-1&&(n|=be.LV),t.search(Ev)!==-1&&(n|=be.LVT),t.search(bv)!==-1&&(n|=be.ExtPict),n};function Fn(t,e){return(t&e)!==0}var Bv=[[be.L,be.L|be.V|be.LV|be.LVT],[be.LV|be.V,be.V|be.T],[be.LVT|be.T,be.T],[be.Any,be.Extend|be.ZWJ],[be.Any,be.SpacingMark],[be.Prepend,be.Any],[be.ZWJ,be.ExtPict],[be.RI,be.RI]];function xv(t,e){return Bv.findIndex(n=>Fn(t,n[0])&&Fn(e,n[1]))===-1}var Sv=/(?:[\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$/,Uu=t=>t.search(Sv)!==-1,Av=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Lv=t=>{var e=t.match(Av);if(e===null)return!1;var n=e[0].length/2;return n%2===1},Ov={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=Do(t)}=n;if(L.isPath(i)&&(i=m.range(t,i)),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var o=V.end(i);if(!r&&m.void(t,{at:o}))return;var s=V.start(i),a=m.pointRef(t,s),u=m.pointRef(t,o);Q.delete(t,{at:i,voids:r});var l=a.unref(),c=u.unref();i=l||c,Q.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:p,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:p,offset:h,text:e})}})}};function Hu(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 Gr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Q=Gr(Gr(Gr(Gr({},Yh),Kh),Xh),Ov),Zr=new WeakMap,Pv=t=>Zr.get(t)||!1,Fv=(t,e,n)=>{var r=Zr.get(t)||!1;Zr.set(t,!0);try{e(),n()}finally{Zr.set(t,r)}};function Ru(t,e,n){var r=Vr.get(t)||[],i=qr.get(t)||new Set,o,s,a=p=>{if(p){var h=p.join(",");s.has(h)||(s.add(h),o.push(p))}};if(n){o=[],s=new Set;for(var u of r){var l=n(u);a(l)}}else o=r,s=i;for(var c of e)a(c);Vr.set(t,o),qr.set(t,s)}var Mv=(t,e)=>{for(var n of m.pathRefs(t))Hh.transform(n,e);for(var r of m.pointRefs(t))Rh.transform(r,e);for(var i of m.rangeRefs(t))Vh.transform(i,e);if(!Pv(t)){var o=L.operationCanTransformPath(e)?s=>L.transform(s,e):void 0;Ru(t,t.getDirtyPaths(e),o)}Q.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),tr.get(t)||(tr.set(t,!0),Promise.resolve().then(()=>{tr.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},kv=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return L.levels(n)}case"insert_node":{var{node:r,path:i}=e,o=L.levels(i),s=ce.isText(r)?[]:Array.from(ne.nodes(r),P=>{var[,z]=P;return i.concat(z)});return[...o,...s]}case"merge_node":{var{path:a}=e,u=L.ancestors(a),l=L.previous(a);return[...u,l]}case"move_node":{var{path:c,newPath:p}=e;if(L.equals(c,p))return[];var h=[],g=[];for(var y of L.ancestors(c)){var v=L.transform(y,e);h.push(v)}for(var d of L.ancestors(p)){var D=L.transform(d,e);g.push(D)}var B=g[g.length-1],b=p[p.length-1],O=B.concat(b);return[...h,...g,O]}case"remove_node":{var{path:E}=e,w=L.ancestors(E);return[...w]}case"split_node":{var{path:A}=e,F=L.levels(A),R=L.next(A);return[...F,R]}default:return[]}},Tv=t=>{var{selection:e}=t;return e?ne.fragment(t,e):[]},Iv=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(ue.isElement(n)&&n.children.length===0){var i={text:""};Q.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var o=m.isEditor(n)?!1:ue.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),s=0,a=0;a<n.children.length;a++,s++){var u=ne.get(t,r);if(!ce.isText(u)){var l=u.children[s],c=u.children[s-1],p=a===n.children.length-1,h=ce.isText(l)||ue.isElement(l)&&t.isInline(l);if(h!==o)Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--;else if(ue.isElement(l)){if(t.isInline(l)){if(c==null||!ce.isText(c)){var g={text:""};Q.insertNodes(t,g,{at:r.concat(s),voids:!0}),s++}else if(p){var y={text:""};Q.insertNodes(t,y,{at:r.concat(s+1),voids:!0}),s++}}}else{if(!ce.isText(l)&&!("children"in l)){var v=l;v.children=[]}c!=null&&ce.isText(c)&&(ce.equals(l,c,{loose:!0})?(Q.mergeNodes(t,{at:r.concat(s),voids:!0}),s--):c.text===""?(Q.removeNodes(t,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--))}}}}},jv=(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},Nv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:o=e.selection,match:s}=n;if(o){var a=m.path(e,o),u=i==="lowest";for(var[l,c]of m.levels(e,{at:a,voids:r,match:s,reverse:u}))if(!ce.isText(l)){if(V.isRange(o)){if(L.isAncestor(c,o.anchor.path)&&L.isAncestor(c,o.focus.path))return[l,c]}else if(!L.equals(a,c))return[l,c]}}};function Vu(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 qu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _v=(t,e,n)=>{var{selection:r}=t;if(r){var i=(p,h)=>{if(!ce.isText(p))return!1;var[g,y]=m.parent(t,h);return!t.isVoid(g)||t.markableVoid(g)},o=V.isExpanded(r),s=!1;if(!o){var[a,u]=m.node(t,r);if(a&&i(a,u)){var[l]=m.parent(t,u);s=l&&t.markableVoid(l)}}if(o||s)Q.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var c=qu(qu({},m.marks(t)||{}),{},{[e]:n});t.marks=c,tr.get(t)||t.onChange()}}};function Gu(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 Zu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var zv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),o=m.end(e,[]),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Zu(Zu({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=c),u++}return l};function Yu(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 Ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),o=m.point(e,n,{edge:"start"}),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Ku(Ku({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=c),u++}return l},Uv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e,reverse:!0})},Hv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e})},Rv=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&V.isExpanded(r)&&Q.delete(e,{reverse:n==="backward"})},Vv=(t,e)=>[m.start(t,e),m.end(t,e)];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 Ju(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){lt(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 qv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ju(Ju({},n),{},{match:r=>ue.isElement(r)&&m.isElementReadOnly(e,r)}))},Gv=(t,e)=>m.point(t,e,{edge:"end"}),Zv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Yv=(t,e)=>{var n=m.range(t,e);return ne.fragment(t,n)};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 $u(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){lt(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 Kv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,$u($u({},n),{},{match:r=>ue.isElement(r)&&m.isVoid(e,r)}))},Xv=(t,e)=>e.children.some(n=>ue.isElement(n)&&m.isBlock(t,n)),Jv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Qv=(t,e)=>ne.has(t,e),$v=(t,e)=>e.children.every(n=>ce.isText(n)),eg=t=>{Q.splitNodes(t,{always:!0})},tg=(t,e,n)=>{Q.insertNodes(t,e,n)},ng=t=>{Q.splitNodes(t,{always:!0})};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 rg(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){lt(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 ig=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:o}=e;if(i){if(o){var s=rg({text:n},o);Q.insertNodes(e,s,{at:r.at,voids:r.voids})}else Q.insertText(e,n,r);e.marks=null}},og=(t,e)=>!t.isInline(e),sg=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),ag=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},ug=(t,e,n)=>{var r=m.end(t,n);return Se.equals(e,r)},lg=t=>{var e=Su.get(t);return e===void 0?!0:e},cg=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Se.equals(e,r)},fg=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},dg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.leaf(e,i);return[o,i]};function pg(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:o}=e;if(o==null&&(o=()=>!0),!!n){var s=[],a=m.path(t,n);for(var[u,l]of ne.levels(t,a))if(o(u,l)&&(s.push([u,l]),!i&&ue.isElement(u)&&m.isVoid(t,u)))break;r&&s.reverse(),yield*s}}()}var hg=["text"],vg=["text"],gg=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:o}=r;if(n)return n;if(V.isExpanded(r)){var s=m.isEnd(e,i,i.path);if(s){var a=m.after(e,i);a&&(i=a)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:o}});if(u){var[l]=u,c=jt(l,hg);return c}else return{}}var{path:p}=i,[h]=m.leaf(e,p);if(i.offset===0){var g=m.previous(e,{at:p,match:ce.isText}),y=m.above(e,{match:O=>ue.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!y){var v=m.above(e,{match:O=>ue.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,B]=v;L.isAncestor(B,D)&&(h=d)}}}var b=jt(h,vg);return b},mg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.after(e,s,{voids:i});if(a){var[,u]=m.last(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{at:l,match:o,mode:r,voids:i});return p}}},yg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.get(e,i);return[o,i]};function Cg(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:o=!1,voids:s=!1,ignoreNonSelectable:a=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var l,c;if(rv.isSpan(n))l=n[0],c=n[1];else{var p=m.path(t,n,{edge:"start"}),h=m.path(t,n,{edge:"end"});l=o?h:p,c=o?p:h}var g=ne.nodes(t,{reverse:o,from:l,to:c,pass:O=>{var[E]=O;return ue.isElement(E)?!!(!s&&(m.isVoid(t,E)||m.isElementReadOnly(t,E))||a&&!m.isSelectable(t,E)):!1}}),y=[],v;for(var[d,D]of g)if(!(a&&ue.isElement(d)&&!m.isSelectable(t,d))){var B=v&&L.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 b=r==="lowest"?v:[d,D];b&&(i?y.push(b):yield b),v=[d,D]}}r==="lowest"&&v&&(i?y.push(v):yield v),i&&(yield*y)}}()}var Dg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,o=c=>Vr.get(c)||[],s=c=>qr.get(c)||new Set,a=c=>{var p=o(c).pop(),h=p.join(",");return s(c).delete(h),p};if(m.isNormalizing(e)){if(r){var u=Array.from(ne.nodes(e),c=>{var[,p]=c;return p}),l=new Set(u.map(c=>c.join(",")));Vr.set(e,u),qr.set(e,l)}o(e).length!==0&&m.withoutNormalizing(e,()=>{for(var c of o(e))if(ne.has(e,c)){var p=m.node(e,c),[h,g]=p;ue.isElement(h)&&h.children.length===0&&e.normalizeNode(p,{operation:i})}for(var y=o(e),v=y.length,d=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=a(e);if(ne.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:i})}d++,y=o(e)}})}},Eg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=L.parent(i),s=m.node(e,o);return s},bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pathRefs(e);return u.delete(o),o.current=null,a}},s=m.pathRefs(e);return s.add(o),o},wg=t=>{var e=Au.get(t);return e||(e=new Set,Au.set(t,e)),e},Bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:o}=r;if(L.isPath(n)){if(o==="start"){var[,s]=ne.first(e,n);n=s}else if(o==="end"){var[,a]=ne.last(e,n);n=a}}return V.isRange(n)&&(o==="start"?n=V.start(n):o==="end"?n=V.end(n):n=L.common(n.anchor.path,n.focus.path)),Se.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},xg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pointRefs(e);return u.delete(o),o.current=null,a}},s=m.pointRefs(e);return s.add(o),o},Sg=t=>{var e=Lu.get(t);return e||(e=new Set,Lu.set(t,e)),e},Ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(L.isPath(n)){var o;if(i==="end"){var[,s]=ne.last(e,n);o=s}else{var[,a]=ne.first(e,n);o=a}var u=ne.get(e,o);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:o,offset:i==="end"?u.text.length:0}}if(V.isRange(n)){var[l,c]=V.edges(n);return i==="start"?l:c}return n};function Lg(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:o=!1,ignoreNonSelectable:s=!1}=e;if(!n)return;var a=m.range(t,n),[u,l]=V.edges(a),c=i?l:u,p=!1,h="",g=0,y=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:o,ignoreNonSelectable:s})){if(ue.isElement(d)){if(!o&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=L.isAncestor(D,l.path)?l:m.end(t,D),b=L.isAncestor(D,u.path)?u:m.start(t,D);h=m.string(t,{anchor:b,focus:B},{voids:o}),p=!0}}if(ce.isText(d)){var O=L.equals(D,c.path);for(O?(y=i?c.offset:d.text.length-c.offset,v=c.offset):(y=d.text.length,v=i?y:0),(O||p||r==="offset")&&(yield{path:D,offset:v},p=!1);;){if(g===0){if(h==="")break;g=E(h,r,i),h=bo(h,g,i)[1]}if(v=i?v-g:v+g,y=y-g,y<0){g=-y;break}g=0,yield{path:D,offset:v}}}}function E(w,A,F){return A==="character"?Eo(w,F):A==="word"?lv(w,F):A==="line"||A==="block"?w.length:1}}()}var Og=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.before(e,s,{voids:i});if(a){var[,u]=m.first(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:o,mode:r,voids:i});return p}}},Pg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.rangeRefs(e);return u.delete(o),o.current=null,a}},s=m.rangeRefs(e);return s.add(o),o},Fg=t=>{var e=Ou.get(t);return e||(e=new Set,Ou.set(t,e)),e},Mg=(t,e,n)=>{if(V.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function tl(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 kg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Tg=(t,e)=>{var{selection:n}=t;if(n){var r=(c,p)=>{if(!ce.isText(c))return!1;var[h,g]=m.parent(t,p);return!t.isVoid(h)||t.markableVoid(h)},i=V.isExpanded(n),o=!1;if(!i){var[s,a]=m.node(t,n);if(s&&r(s,a)){var[u]=m.parent(t,a);o=u&&t.markableVoid(u)}}if(i||o)Q.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var l=kg({},m.marks(t)||{});delete l[e],t.marks=l,tr.get(t)||t.onChange()}}},Ig=(t,e)=>{Su.set(t,e)},jg=(t,e)=>m.point(t,e,{edge:"start"}),Ng=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,o=m.range(e,n),[s,a]=V.edges(o),u="";for(var[l,c]of m.nodes(e,{at:o,match:ce.isText,voids:i})){var p=l.text;L.equals(c,a.path)&&(p=p.slice(0,a.offset)),L.equals(c,s.path)&&(p=p.slice(s.offset)),u+=p}return u},_g=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[o,s]=V.edges(n);if(o.offset!==0||s.offset!==0||V.isCollapsed(n)||L.hasPrevious(s.path))return n;var a=m.above(e,{at:s,match:y=>ue.isElement(y)&&m.isBlock(e,y),voids:i}),u=a?a[1]:[],l=m.start(e,o),c={anchor:l,focus:s},p=!0;for(var[h,g]of m.nodes(e,{at:c,match:ce.isText,reverse:!0,voids:i})){if(p){p=!1;continue}if(h.text!==""||L.isBefore(g,u)){s={path:g,offset:h.text.length};break}}return{anchor:o,focus:s}},zg=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Wg=(t,e,n)=>{var[r,i]=e;return ue.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Ug=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:o=!1,unit:s="character",distance:a=1,voids:u=!1}=n,{at:l=e.selection,hanging:c=!1}=n;if(l){var p=!1;if(V.isRange(l)&&V.isCollapsed(l)&&(p=!0,l=l.anchor),Se.isPoint(l)){var h=m.void(e,{at:l,mode:"highest"});if(!u&&h){var[,g]=h;l=g}else{var y={unit:s,distance:a},v=o?m.before(e,l,y)||m.start(e,[]):m.after(e,l,y)||m.end(e,[]);l={anchor:l,focus:v},c=!0}}if(L.isPath(l)){Q.removeNodes(e,{at:l,voids:u});return}if(!V.isCollapsed(l)){if(!c){var[,d]=V.edges(l),D=m.end(e,[]);Se.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[B,b]=V.edges(l),O=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:B,voids:u}),E=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:b,voids:u}),w=O&&E&&!L.equals(O[1],E[1]),A=L.equals(B.path,b.path),F=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),R=u?null:(i=m.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:b,mode:"highest"});if(F){var P=m.before(e,B);P&&O&&L.isAncestor(O[1],P.path)&&(B=P)}if(R){var z=m.after(e,b);z&&E&&L.isAncestor(E[1],z.path)&&(b=z)}var I=[],j;for(var T of m.nodes(e,{at:l,voids:u})){var[N,K]=T;j&&L.compare(K,j)===0||(!u&&ue.isElement(N)&&(m.isVoid(e,N)||m.isElementReadOnly(e,N))||!L.isCommon(K,B.path)&&!L.isCommon(K,b.path))&&(I.push(T),j=K)}var _=Array.from(I,se=>{var[,pe]=se;return m.pathRef(e,pe)}),ie=m.pointRef(e,B),re=m.pointRef(e,b),k="";if(!A&&!F){var H=ie.current,[J]=m.leaf(e,H),{path:q}=H,{offset:ee}=B,Y=J.text.slice(ee);Y.length>0&&(e.apply({type:"remove_text",path:q,offset:ee,text:Y}),k=Y)}if(_.reverse().map(se=>se.unref()).filter(se=>se!==null).forEach(se=>Q.removeNodes(e,{at:se,voids:u})),!R){var C=re.current,[W]=m.leaf(e,C),{path:U}=C,M=A?B.offset:0,X=W.text.slice(M,b.offset);X.length>0&&(e.apply({type:"remove_text",path:U,offset:M,text:X}),k=X)}!A&&w&&re.current&&ie.current&&Q.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),p&&o&&s==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&Q.insertText(e,k.slice(0,k.length-a));var te=ie.unref(),G=re.unref(),le=o?te||G:G||te;n.at==null&&le&&Q.select(e,le)}}})},Hg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1}=r,{at:s=Do(e),batchDirty:a=!0}=r;if(n.length){if(V.isRange(s))if(i||(s=m.unhangRange(e,s,{voids:o})),V.isCollapsed(s))s=s.anchor;else{var[,u]=V.edges(s);if(!o&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);Q.delete(e,{at:s}),s=l.unref()}else L.isPath(s)&&(s=m.start(e,s));if(!(!o&&m.void(e,{at:s}))){var c=m.above(e,{at:s,match:Y=>ue.isElement(Y)&&m.isInline(e,Y),mode:"highest",voids:o});if(c){var[,p]=c;if(m.isEnd(e,s,p)){var h=m.after(e,p);s=h}else if(m.isStart(e,s,p)){var g=m.before(e,p);s=g}}var y=m.above(e,{match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),at:s,voids:o}),[,v]=y,d=m.isStart(e,s,v),D=m.isEnd(e,s,v),B=d&&D,b=!d||d&&D,O=!D,[,E]=ne.first({children:n},[]),[,w]=ne.last({children:n},[]),A=[],F=Y=>{var[C,W]=Y,U=W.length===0;return U?!1:B?!0:!(b&&L.isAncestor(W,E)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C)||O&&L.isAncestor(W,w)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C))};for(var R of ne.nodes({children:n},{pass:F}))F(R)&&A.push(R);var P=[],z=[],I=[],j=!0,T=!1;for(var[N]of A)ue.isElement(N)&&!e.isInline(N)?(j=!1,T=!0,z.push(N)):j?P.push(N):I.push(N);var[K]=m.nodes(e,{at:s,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o}),[,_]=K,ie=m.isStart(e,s,_),re=m.isEnd(e,s,_),k=m.pathRef(e,D&&!I.length?L.next(v):v),H=m.pathRef(e,re?L.next(_):_);Q.splitNodes(e,{at:s,match:Y=>T?ue.isElement(Y)&&m.isBlock(e,Y):ce.isText(Y)||m.isInline(e,Y),mode:T?"lowest":"highest",always:T&&(!d||P.length>0)&&(!D||I.length>0),voids:o});var J=m.pathRef(e,!ie||ie&&re?L.next(_):_);if(Q.insertNodes(e,P,{at:J.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),B&&!P.length&&z.length&&!I.length&&Q.delete(e,{at:v,voids:o}),Q.insertNodes(e,z,{at:k.current,match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),mode:"lowest",voids:o,batchDirty:a}),Q.insertNodes(e,I,{at:H.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),!r.at){var q;if(I.length>0&&H.current?q=L.previous(H.current):z.length>0&&k.current?q=L.previous(k.current):J.current&&(q=L.previous(J.current)),q){var ee=m.end(e,q);Q.select(e,ee)}}J.unref(),k.unref(),H.unref()}}})},Rg=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")Q.select(e,i.anchor);else if(r==="focus")Q.select(e,i.focus);else if(r==="start"){var[o]=V.edges(i);Q.select(e,o)}else if(r==="end"){var[,s]=V.edges(i);Q.select(e,s)}}else return},Vg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},qg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:o="character",reverse:s=!1}=n,{edge:a=null}=n;if(r){a==="start"&&(a=V.isBackward(r)?"focus":"anchor"),a==="end"&&(a=V.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,c={distance:i,unit:o,ignoreNonSelectable:!0},p={};if(a==null||a==="anchor"){var h=s?m.before(e,u,c):m.after(e,u,c);h&&(p.anchor=h)}if(a==null||a==="focus"){var g=s?m.before(e,l,c):m.after(e,l,c);g&&(p.focus=g)}Q.setSelection(e,p)}},Gg=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){Q.setSelection(t,e);return}if(!V.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(it.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function nl(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 rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:o="both"}=r;if(i){o==="start"&&(o=V.isBackward(i)?"focus":"anchor"),o==="end"&&(o=V.isBackward(i)?"anchor":"focus");var{anchor:s,focus:a}=i,u=o==="anchor"?s:a;Q.setSelection(e,{[o==="anchor"?"anchor":"focus"]:rl(rl({},u),n)})}},Yg=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var o in e)(o==="anchor"&&e.anchor!=null&&!Se.equals(e.anchor,n.anchor)||o==="focus"&&e.focus!=null&&!Se.equals(e.focus,n.focus)||o!=="anchor"&&o!=="focus"&&e[o]!==n[o])&&(r[o]=n[o],i[o]=e[o]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},Kg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1,mode:s="lowest",batchDirty:a=!0}=r,{at:u,match:l,select:c}=r;if(ne.isNode(n)&&(n=[n]),n.length!==0){var[p]=n;if(u||(u=Do(e),c!==!1&&(c=!0)),c==null&&(c=!1),V.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:o})),V.isCollapsed(u))u=u.anchor;else{var[,h]=V.edges(u),g=m.pointRef(e,h);Q.delete(e,{at:u}),u=g.unref()}if(Se.isPoint(u)){l==null&&(ce.isText(p)?l=P=>ce.isText(P):e.isInline(p)?l=P=>ce.isText(P)||m.isInline(e,P):l=P=>ue.isElement(P)&&m.isBlock(e,P));var[y]=m.nodes(e,{at:u.path,match:l,mode:s,voids:o});if(y){var[,v]=y,d=m.pathRef(e,v),D=m.isEnd(e,u,v);Q.splitNodes(e,{at:u,match:l,mode:s,voids:o});var B=d.unref();u=D?L.next(B):B}else return}var b=L.parent(u),O=u[u.length-1];if(!(!o&&m.void(e,{at:b}))){if(a){var E=[],w=L.levels(b);Fv(e,()=>{var P=function(){var j=b.concat(O);O++;var T={type:"insert_node",path:j,node:z};e.apply(T),u=L.next(u),E.push(T),ce.isText?w.push(...Array.from(ne.nodes(z),N=>{var[,K]=N;return j.concat(K)})):w.push(j)};for(var z of n)P()},()=>{Ru(e,w,P=>{var z=P;for(var I of E)if(L.operationCanTransformPath(I)&&(z=L.transform(z,I),!z))return null;return z})})}else for(var A of n){var F=b.concat(O);O++,e.apply({type:"insert_node",path:F,node:A}),u=L.next(u)}if(u=L.previous(u),c){var R=m.end(e,u);R&&Q.select(e,R)}}}})},Xg=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:o=!1}=n,{match:s}=n;if(s==null&&(s=L.isPath(r)?Pn(e,r):O=>ue.isElement(O)&&m.isBlock(e,O)),!!r){var a=m.nodes(e,{at:r,match:s,mode:i,voids:o}),u=Array.from(a,O=>{var[,E]=O;return m.pathRef(e,E)});for(var l of u){var c=l.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var p=m.node(e,L.parent(c)),[h,g]=p,y=c[c.length-1],{length:v}=h.children;if(v===1){var d=L.next(g);Q.moveNodes(e,{at:c,to:d,voids:o}),Q.removeNodes(e,{at:g,voids:o})}else if(y===0)Q.moveNodes(e,{at:c,to:g,voids:o});else if(y===v-1){var D=L.next(g);Q.moveNodes(e,{at:c,to:D,voids:o})}else{var B=L.next(c),b=L.next(g);Q.splitNodes(e,{at:B,voids:o}),Q.moveNodes(e,{at:c,to:b,voids:o})}}}})},Jg=["text"],Qg=["children"],il=(t,e)=>{if(ue.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?il(t,n.children[0]):!1}else return!m.isEditor(e)},$g=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:o=!1,voids:s=!1,mode:a="lowest"}=n;if(i){if(r==null)if(L.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>ue.isElement(P)&&m.isBlock(e,P);if(!o&&V.isRange(i)&&(i=m.unhangRange(e,i,{voids:s})),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var[,l]=V.edges(i),c=m.pointRef(e,l);Q.delete(e,{at:i}),i=c.unref(),n.at==null&&Q.select(e,i)}var[p]=m.nodes(e,{at:i,match:r,voids:s,mode:a}),h=m.previous(e,{at:i,match:r,voids:s,mode:a});if(!(!p||!h)){var[g,y]=p,[v,d]=h;if(!(y.length===0||d.length===0)){var D=L.next(d),B=L.common(y,d),b=L.isSibling(y,d),O=Array.from(m.levels(e,{at:y}),P=>{var[z]=P;return z}).slice(B.length).slice(0,-1),E=m.above(e,{at:y,mode:"highest",match:P=>O.includes(P)&&il(e,P)}),w=E&&m.pathRef(e,E[1]),A,F;if(ce.isText(g)&&ce.isText(v)){var R=jt(g,Jg);F=v.text.length,A=R}else if(ue.isElement(g)&&ue.isElement(v)){var R=jt(g,Qg);F=v.children.length,A=R}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(it.stringify(g)," ").concat(it.stringify(v)));b||Q.moveNodes(e,{at:y,to:D,voids:s}),w&&Q.removeNodes(e,{at:w.current,voids:s}),m.shouldMergeNodesRemovePrevNode(e,h,p)?Q.removeNodes(e,{at:d,voids:s}):e.apply({type:"merge_node",path:D,position:F,properties:A}),w&&w.unref()}}}})},em=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:o=!1}=e,{match:s}=e;if(r){s==null&&(s=L.isPath(r)?Pn(t,r):g=>ue.isElement(g)&&m.isBlock(t,g));var a=m.pathRef(t,n),u=m.nodes(t,{at:r,match:s,mode:i,voids:o}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(t,y)});for(var c of l){var p=c.unref(),h=a.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),a.current&&L.isSibling(h,p)&&L.isAfter(h,p)&&(a.current=L.next(a.current))}a.unref()}})},tm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),!r&&V.isRange(s)&&(s=m.unhangRange(e,s,{voids:i}));var u=m.nodes(e,{at:s,match:a,mode:o,voids:i}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(e,y)});for(var c of l){var p=c.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},nm=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:o=e.selection,compare:s,merge:a}=r,{hanging:u=!1,mode:l="lowest",split:c=!1,voids:p=!1}=r;if(o){if(i==null&&(i=L.isPath(o)?Pn(e,o):F=>ue.isElement(F)&&m.isBlock(e,F)),!u&&V.isRange(o)&&(o=m.unhangRange(e,o,{voids:p})),c&&V.isRange(o)){if(V.isCollapsed(o)&&m.leaf(e,o.anchor)[0].text.length>0)return;var h=m.rangeRef(e,o,{affinity:"inward"}),[g,y]=V.edges(o),v=l==="lowest"?"lowest":"highest",d=m.isEnd(e,y,y.path);Q.splitNodes(e,{at:y,match:i,mode:v,voids:p,always:!d});var D=m.isStart(e,g,g.path);Q.splitNodes(e,{at:g,match:i,mode:v,voids:p,always:!D}),o=h.unref(),r.at==null&&Q.select(e,o)}s||(s=(F,R)=>F!==R);for(var[B,b]of m.nodes(e,{at:o,match:i,mode:l,voids:p})){var O={},E={};if(b.length!==0){var w=!1;for(var A in n)A==="children"||A==="text"||s(n[A],B[A])&&(w=!0,B.hasOwnProperty(A)&&(O[A]=B[A]),a?n[A]!=null&&(E[A]=a(B[A],n[A])):n[A]!=null&&(E[A]=n[A]));w&&e.apply({type:"set_node",path:b,properties:O,newProperties:E})}}}})},rm=(t,e)=>{if(V.isCollapsed(e))return e.anchor;var[,n]=V.edges(e),r=m.pointRef(t,n);return Q.delete(t,{at:e}),r.unref()},im=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:o,at:s=e.selection,height:a=0,always:u=!1}=n;if(o==null&&(o=re=>ue.isElement(re)&&m.isBlock(e,re)),V.isRange(s)&&(s=rm(e,s)),L.isPath(s)){var l=s,c=m.point(e,l),[p]=m.parent(e,l);o=re=>re===p,a=c.path.length-l.length+1,s=c,u=!0}if(s){var h=m.pointRef(e,s,{affinity:"backward"}),g;try{var[y]=m.nodes(e,{at:s,match:o,mode:r,voids:i});if(!y)return;var v=m.void(e,{at:s,mode:"highest"}),d=0;if(!i&&v){var[D,B]=v;if(ue.isElement(D)&&e.isInline(D)){var b=m.after(e,B);if(!b){var O={text:""},E=L.next(B);Q.insertNodes(e,O,{at:E,voids:i}),b=m.point(e,E)}s=b,u=!0}var w=s.path.length-B.length;a=w+1,u=!0}g=m.pointRef(e,s);var A=s.path.length-a,[,F]=y,R=s.path.slice(0,A),P=a===0?s.offset:s.path[A]+d;for(var[z,I]of m.levels(e,{at:R,reverse:!0,voids:i})){var j=!1;if(I.length<F.length||I.length===0||!i&&ue.isElement(z)&&m.isVoid(e,z))break;var T=h.current,N=m.isEnd(e,T,I);if(u||!h||!m.isEdge(e,T,I)){j=!0;var K=ne.extractProps(z);e.apply({type:"split_node",path:I,position:P,properties:K})}P=I[I.length-1]+(j||N?1:0)}if(n.at==null){var _=g.current||m.end(e,[]);Q.select(e,_)}}finally{var ie;h.unref(),(ie=g)===null||ie===void 0||ie.unref()}}})},om=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var o of n)i[o]=null;Q.setNodes(e,i,r)},sm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),L.isPath(s)&&(s=m.range(e,s));var u=V.isRange(s)?m.rangeRef(e,s):null,l=m.nodes(e,{at:s,match:a,mode:r,voids:o}),c=Array.from(l,g=>{var[,y]=g;return m.pathRef(e,y)}).reverse(),p=function(){var y=h.unref(),[v]=m.node(e,y),d=m.range(e,y);i&&u&&(d=V.intersection(u.current,d)),Q.liftNodes(e,{at:d,match:D=>ue.isAncestor(v)&&v.children.includes(D),voids:o})};for(var h of c)p();u&&u.unref()}})};function ol(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 sl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ol(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var am=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:o=!1,voids:s=!1}=r,{match:a,at:u=e.selection}=r;if(u){if(a==null&&(L.isPath(u)?a=Pn(e,u):e.isInline(n)?a=d=>ue.isElement(d)&&m.isInline(e,d)||ce.isText(d):a=d=>ue.isElement(d)&&m.isBlock(e,d)),o&&V.isRange(u)){var[l,c]=V.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});Q.splitNodes(e,{at:c,match:a,voids:s}),Q.splitNodes(e,{at:l,match:a,voids:s}),u=p.unref(),r.at==null&&Q.select(e,u)}var h=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>ue.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:s})),g=function(){var D=V.isRange(u)?V.intersection(u,m.range(e,v)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:a,mode:i,voids:s}));if(B.length>0){var[b]=B,O=B[B.length-1],[,E]=b,[,w]=O;if(E.length===0&&w.length===0)return 0;var A=L.equals(E,w)?L.parent(E):L.common(E,w),F=m.range(e,E,w),R=m.node(e,A),[P]=R,z=A.length+1,I=L.next(w.slice(0,z)),j=sl(sl({},n),{},{children:[]});Q.insertNodes(e,j,{at:I,voids:s}),Q.moveNodes(e,{at:F,match:T=>ue.isAncestor(P)&&P.children.includes(T),to:I.concat(0),voids:s})}},y;for(var[,v]of h)y=g()}})},um=()=>{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 Mv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ng(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hg(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pg(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $g(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return em(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tm(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nm(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return im(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return om(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sm(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return am(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)}};return t};/*!
|
77
77
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
78
78
|
*
|
79
79
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
@@ -83,13 +83,13 @@ React keys must be passed directly to JSX without using spread:
|
|
83
83
|
|
84
84
|
`))&&c--}if(ct&&!l&&!r){var _=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(_&&Z.hasDOMNode(t,_,{editable:!0})){var ie=Z.toSlateNode(t,_),{path:re,offset:k}=m.start(t,Z.findPath(t,ie));return _.querySelector("[data-slate-leaf]")||(k=a),{path:re,offset:k}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var H=Z.toSlateNode(t,l),J=Z.findPath(t,H);return{path:J,offset:c}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:o}=n,s=Uo(e)?e.anchorNode:e.startContainer,a,u,l,c,p;if(s)if(Uo(e)){if(Tn&&e.rangeCount>1){l=e.focusNode;var h=e.getRangeAt(0),g=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let w=function(A){return A.childElementCount>0?w(A.children[0]):A};var y=h.startContainer,v=g.startContainer,d=w(y.children[h.startOffset]),D=w(v.children[g.startOffset]);c=0,D.childNodes.length>0?a=D.childNodes[0]:a=D,d.childNodes.length>0?l=d.childNodes[0]:l=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else h.startContainer===l?(a=g.endContainer,u=g.endOffset,c=h.startOffset):(a=h.startContainer,u=h.endOffset,c=g.startOffset)}else a=e.anchorNode,u=e.anchorOffset,l=e.focusNode,c=e.focusOffset;Hl&&s0(a)||Tn?p=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:p=e.isCollapsed}else a=e.startContainer,u=e.startOffset,l=e.endContainer,c=e.endOffset,p=e.collapsed;if(a==null||l==null||u==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Tn&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
|
85
85
|
|
86
|
-
`)&&c===l.textContent.length&&c--;var B=Z.toSlatePoint(t,[a,u],{exactMatch:i,suppressThrow:o});if(!B)return null;var b=Xl(a,l)||a===l&&c<u,O=p?B:Z.toSlatePoint(t,[l,c],{exactMatch:i,suppressThrow:o,searchDirection:b?"forward":"backward"});if(!O)return null;var E={anchor:B,focus:O};return V.isExpanded(E)&&V.isForward(E)&&Bt(l)&&m.void(t,{at:E.focus,mode:"highest"})&&(E=m.unhangRange(t,E,{voids:!0})),E}};function h0(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ne.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 o=L.next(n);if(!m.hasPath(t,o))return!1;var s=ne.get(t,o);return ce.isText(s)&&s.text.startsWith(r.text)}function Jl(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,o)=>i.slice(0,o.start)+o.text+i.slice(o.end),t)}function v0(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 g0(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 Ql(t,e){var{start:n,end:r,text:i}=e,o=t.slice(n,r),s=v0(o,i),a=Math.min(o.length-s,i.length-s),u=g0(o,i,a),l={start:n+s,end:r-u,text:i.slice(s,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function m0(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),o=Jl(t,e,n),s=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),a=o.slice(r,s),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Ql(t,{start:r,end:u,text:a})}function y0(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function Ro(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ne.get(t,n);if(!ce.isText(i))return null;var o=m.above(t,{match:a=>ue.isElement(a)&&m.isBlock(t,a),at:n});if(!o)return null;for(;r>i.text.length;){var s=m.next(t,{at:n,match:ce.isText});if(!s||!L.isDescendant(s[1],o[1]))return null;r-=i.text.length,i=s[0],n=s[1]}return{path:n,offset:r}}function $l(t,e){var n=Ro(t,e.anchor);if(!n)return null;if(V.isCollapsed(e))return{anchor:n,focus:n};var r=Ro(t,e.focus);return r?{anchor:n,focus:r}:null}function Vo(t,e,n){var r=vt.get(t),i=r==null?void 0:r.find(c=>{var{path:p}=c;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return
|
86
|
+
`)&&c===l.textContent.length&&c--;var B=Z.toSlatePoint(t,[a,u],{exactMatch:i,suppressThrow:o});if(!B)return null;var b=Xl(a,l)||a===l&&c<u,O=p?B:Z.toSlatePoint(t,[l,c],{exactMatch:i,suppressThrow:o,searchDirection:b?"forward":"backward"});if(!O)return null;var E={anchor:B,focus:O};return V.isExpanded(E)&&V.isForward(E)&&Bt(l)&&m.void(t,{at:E.focus,mode:"highest"})&&(E=m.unhangRange(t,E,{voids:!0})),E}};function h0(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ne.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 o=L.next(n);if(!m.hasPath(t,o))return!1;var s=ne.get(t,o);return ce.isText(s)&&s.text.startsWith(r.text)}function Jl(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,o)=>i.slice(0,o.start)+o.text+i.slice(o.end),t)}function v0(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 g0(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 Ql(t,e){var{start:n,end:r,text:i}=e,o=t.slice(n,r),s=v0(o,i),a=Math.min(o.length-s,i.length-s),u=g0(o,i,a),l={start:n+s,end:r-u,text:i.slice(s,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function m0(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),o=Jl(t,e,n),s=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),a=o.slice(r,s),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Ql(t,{start:r,end:u,text:a})}function y0(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function Ro(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ne.get(t,n);if(!ce.isText(i))return null;var o=m.above(t,{match:a=>ue.isElement(a)&&m.isBlock(t,a),at:n});if(!o)return null;for(;r>i.text.length;){var s=m.next(t,{at:n,match:ce.isText});if(!s||!L.isDescendant(s[1],o[1]))return null;r-=i.text.length,i=s[0],n=s[1]}return{path:n,offset:r}}function $l(t,e){var n=Ro(t,e.anchor);if(!n)return null;if(V.isCollapsed(e))return{anchor:n,focus:n};var r=Ro(t,e.focus);return r?{anchor:n,focus:r}:null}function Vo(t,e,n){var r=vt.get(t),i=r==null?void 0:r.find(c=>{var{path:p}=c;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return Se.transform(e,n,{affinity:"backward"});var{diff:o}=i;if(e.offset<=o.start+o.text.length){var s={path:e.path,offset:o.start},a=Se.transform(s,n,{affinity:"backward"});return a?{path:a.path,offset:a.offset+e.offset-o.start}:null}var u={path:e.path,offset:e.offset-o.text.length+o.end-o.start},l=Se.transform(u,n,{affinity:"backward"});return l?n.type==="split_node"&&L.equals(n.path,e.path)&&u.offset<n.position&&o.start<n.position?l:{path:l.path,offset:l.offset+o.text.length-o.end+o.start}:null}function ec(t,e,n){var r=Vo(t,e.anchor,n);if(!r)return null;if(V.isCollapsed(e))return{anchor:r,focus:r};var i=Vo(t,e.focus,n);return i?{anchor:r,focus:i}:null}function C0(t,e){var{path:n,diff:r,id:i}=t;switch(e.type){case"insert_text":return!L.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!L.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!L.equals(e.path,n)||e.position>=r.end?{diff:r,id:i,path:L.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:L.transform(n,e,{affinity:"forward"})};case"merge_node":return L.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:i,path:L.transform(n,e)}:{diff:r,id:i,path:L.transform(n,e)}}var o=L.transform(n,e);return o?{diff:r,path:o,id:i}:null}function tc(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 ri(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var D0=25,E0=200,b0=function(){},w0=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function B0(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,o=null,s=null,a=null,u=0,l=!1,c=()=>{var I=Qt.get(e);if(Qt.delete(e),I){var{selection:j}=e,T=$l(e,I);T&&(!j||!V.equals(T,j))&&Q.select(e,T)}},p=()=>{var I=Jt.get(e);if(Jt.delete(e),!!I){if(I.at){var j=Se.isPoint(I.at)?Ro(e,I.at):$l(e,I.at);if(!j)return;var T=m.range(e,j);(!e.selection||!V.equals(e.selection,T))&&Q.select(e,j)}I.run()}},h=()=>{if(s&&(clearTimeout(s),s=null),a&&(clearTimeout(a),a=null),!O()&&!b()){c();return}i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var I=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});_t.set(e,e.marks),b0("flush",Jt.get(e),vt.get(e));for(var j=O(),T;T=(N=vt.get(e))===null||N===void 0?void 0:N[0];){var N,K,_=St.get(e);_!==void 0&&(St.delete(e),e.marks=_),_&&l===!1&&(l=null);var ie=y0(T);(!e.selection||!V.equals(e.selection,ie))&&Q.select(e,ie),T.diff.text?m.insertText(e,T.diff.text):m.deleteFragment(e),vt.set(e,(K=vt.get(e))===null||K===void 0?void 0:K.filter(H=>{var{id:J}=H;return J!==T.id})),h0(e,T)||(j=!1,Jt.delete(e),_t.delete(e),i="action",Qt.delete(e),n.cancel(),r.cancel(),I==null||I.unref())}var re=I==null?void 0:I.unref();if(re&&!Qt.get(e)&&(!e.selection||!V.equals(re,e.selection))&&Q.select(e,re),b()){p();return}j&&n(),n.flush(),r.flush(),c();var k=_t.get(e);_t.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=I=>{o&&clearTimeout(o),o=setTimeout(()=>{bn.set(e,!1),h()},D0)},y=I=>{bn.set(e,!0),o&&(clearTimeout(o),o=null)},v=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=jo.get(e);if(T){if(O()||j){T.style.display="none";return}T.style.removeProperty("display")}},d=(I,j)=>{var T,N=(T=vt.get(e))!==null&&T!==void 0?T:[];vt.set(e,N);var K=ne.leaf(e,I),_=N.findIndex(k=>L.equals(k.path,I));if(_<0){var ie=Ql(K.text,j);ie&&N.push({path:I,diff:j,id:u++}),v();return}var re=m0(K.text,N[_].diff,j);if(!re){N.splice(_,1),v();return}N[_]=ri(ri({},N[_]),{},{diff:re})},D=function(j){var{at:T}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,Qt.delete(e),n.cancel(),r.cancel(),b()&&h(),Jt.set(e,{at:T,run:j}),a=setTimeout(h)},B=I=>{var j;s&&(clearTimeout(s),s=null);var{inputType:T}=I,N=null,K=I.dataTransfer||I.data||void 0;l!==!1&&T!=="insertText"&&T!=="insertCompositionText"&&(l=!1);var[_]=I.getTargetRanges();_&&(N=Z.toSlateRange(e,_,{exactMatch:!1,suppressThrow:!0}));var ie=Z.getWindow(e),re=ie.getSelection();if(!N&&re&&(_=re,N=Z.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),N=(j=N)!==null&&j!==void 0?j:e.selection,!!N){var k=!0;if(T.startsWith("delete")){if(V.isExpanded(N)){var[H,J]=V.edges(N),q=ne.leaf(e,H.path);if(q.text.length===H.offset&&J.offset===0){var ee=m.next(e,{at:H.path,match:ce.isText});ee&&L.equals(ee[1],J.path)&&(N={anchor:J,focus:J})}}var Y=T.endsWith("Backward")?"backward":"forward",[C,W]=V.edges(N),[U,M]=m.leaf(e,C.path),X={text:"",start:C.offset,end:W.offset},te=vt.get(e),G=te==null?void 0:te.find($e=>L.equals($e.path,M)),le=G?[G.diff,X]:[X],se=Jl(U.text,...le);if(se.length===0&&(k=!1),V.isExpanded(N)){if(k&&L.equals(N.anchor.path,N.focus.path)){var pe={path:N.anchor.path,offset:C.offset},ve=m.range(e,pe,pe);return A(ve),d(N.anchor.path,{text:"",end:W.offset,start:C.offset})}return D(()=>m.deleteFragment(e,{direction:Y}),{at:N})}}switch(T){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:N});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=N;if(k&&V.isCollapsed(N)){var me=ne.leaf(e,Ce.path);if(Ce.offset<me.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:N})}case"deleteContentBackward":{var De,{anchor:ge}=N,Ne=Uo(_)?_.isCollapsed:!!((De=_)!==null&&De!==void 0&&De.collapsed);return k&&Ne&&V.isCollapsed(N)&&ge.offset>0?d(ge.path,{text:"",start:ge.offset-1,end:ge.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(w0(K))return D(()=>Z.insertData(e,K),{at:N});var ae=K??"";if(St.get(e)&&(ae=ae.replace("\uFEFF","")),T==="insertText"&&/.*\n.*\n$/.test(ae)&&(ae=ae.slice(0,-1)),ae.includes(`
|
87
87
|
`))return D(()=>{var $e=ae.split(`
|
88
88
|
`);$e.forEach((xe,pt)=>{xe&&m.insertText(e,xe),pt!==$e.length-1&&m.insertSoftBreak(e)})},{at:N});if(L.equals(N.anchor.path,N.focus.path)){var[Ue,de]=V.edges(N),we={start:Ue.offset,end:de.offset,text:ae};if(ae&&l&&T==="insertCompositionText"){var Te=l.start+l.text.search(/\S|$/),Xe=we.start+we.text.search(/\S|$/);Xe===Te+1&&we.end===l.start+l.text.length?(we.start-=1,l=null,P()):l=!1}else T==="insertText"?l===null?l=we:l&&V.isCollapsed(N)&&l.end+l.text.length===Ue.offset?l=ri(ri({},l),{},{text:l.text+ae}):l=!1:l=!1;if(k){d(Ue.path,we);return}}return D(()=>m.insertText(e,ae),{at:N})}}}},b=()=>!!Jt.get(e),O=()=>{var I;return!!((I=vt.get(e))!==null&&I!==void 0&&I.length)},E=()=>b()||O(),w=()=>i,A=I=>{Qt.set(e,I),s&&(clearTimeout(s),s=null);var{selection:j}=e;if(I){var T=!j||!L.equals(j.anchor.path,I.anchor.path),N=!j||!L.equals(j.anchor.path.slice(0,-1),I.anchor.path.slice(0,-1));(T&&l||N)&&(l=!1),(T||O())&&(s=setTimeout(h,E0))}},F=()=>{(b()||!O())&&h()},R=I=>{O()||(v(!0),setTimeout(v))},P=()=>{b()||(a=setTimeout(h))},z=I=>{if(!(O()||b())&&I.some(T=>Ho(e,T,I))){var j;(j=Vl.get(e))===null||j===void 0||j()}};return{flush:h,scheduleFlush:P,hasPendingDiffs:O,hasPendingAction:b,hasPendingChanges:E,isFlushing:w,handleUserSelect:A,handleCompositionEnd:g,handleCompositionStart:y,handleDOMBeforeInput:B,handleKeyDown:R,handleDomMutations:z,handleInput:F}}function x0(){var t=f.useRef(!1);return f.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var dr=$r?f.useLayoutEffect:f.useEffect;function S0(t,e,n){var[r]=f.useState(()=>new MutationObserver(e));dr(()=>{r.takeRecords()}),f.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 A0=["node"];function nc(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 L0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var O0={subtree:!0,childList:!0,characterData:!0},P0=ct?t=>{var{node:e}=t,n=kn(t,A0);if(!ct)return null;var r=Yt(),i=x0(),[o]=f.useState(()=>B0(L0({editor:r},n)));return S0(e,o.handleDomMutations,O0),zo.set(r,o.scheduleFlush),i&&o.flush(),o}:()=>null,F0=["anchor","focus"],M0=["anchor","focus"],k0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),rc=(t,e)=>{var n=kn(t,F0),r=kn(e,M0);return t[In]===e[In]&&k0(n,r)},T0=(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(!V.equals(r,i)||!rc(r,i))return!1}return!0},I0=(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||!rc(r,i))return!1}return!0};function ic(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 j0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ic(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ic(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var N0=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,o=Yt(),s=Z.findPath(o,i),a=L.parent(s),u=!!n[ql];return o.isVoid(r)?f.createElement(qo,{length:ne.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!o.isInline(r)&&m.string(o,a)===""?f.createElement(qo,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?f.createElement(qo,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
|
89
89
|
`?f.createElement(oc,{isTrailing:!0,text:n.text}):f.createElement(oc,{text:n.text})},oc=t=>{var{text:e,isTrailing:n=!1}=t,r=f.useRef(null),i=()=>"".concat(e??"").concat(n?`
|
90
|
-
`:""),[o]=f.useState(i);return dr(()=>{var s=i();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),f.createElement(_0,{ref:r},o)},_0=f.memo(f.forwardRef((t,e)=>f.createElement("span",{"data-slate-string":!0,ref:e},t.children))),qo=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),f.createElement("span",j0({},i),!(ct||Wl)||!n?"\uFEFF":null,n?f.createElement("br",null):null)};function sc(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 ac(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var z0=ct?300:0;function W0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function uc(t){t.current&&(clearTimeout(t.current),t.current=null)}var U0=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:s=B=>f.createElement(R0,ac({},B))}=t,a=Yt(),u=f.useRef(null),l=f.useRef(null),[c,p]=f.useState(!1),h=f.useRef(null),g=f.useCallback(B=>{if(W0(u,B==null),B==null){var b;jo.delete(a),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(jo.set(a,B),!u.current){var O=window.ResizeObserver||Gy;u.current=new O(()=>{var E;(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,B)})}u.current.observe(B),l.current=B}},[l,e,a]),y=f.createElement(N0,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[In];if(f.useEffect(()=>(v?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},z0)):(uc(h),p(!1)),()=>uc(h)),[v,p]),v&&c){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:Dn?"inherit":void 0},contentEditable:!1,ref:g}};y=f.createElement(f.Fragment,null,o(d),y)}var D={"data-slate-leaf":!0};return s({attributes:D,children:y,leaf:e,text:r})},H0=f.memo(U0,(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[In]===t.leaf[In]),R0=t=>{var{attributes:e,children:n}=t;return f.createElement("span",ac({},e),n)},V0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:s}=t,a=Yt(),u=f.useRef(null),l=ce.decorations(s,e),c=Z.findKey(a,s),p=[],h=0;h<l.length;h++){var g=l[h];p.push(f.createElement(H0,{isLast:n&&h===l.length-1,key:"".concat(c.id,"-").concat(h),renderPlaceholder:i,leaf:g,text:s,parent:r,renderLeaf:o}))}var y=f.useCallback(v=>{var d=ni.get(a);v?(d==null||d.set(c,v),En.set(s,v),lr.set(v,s)):(d==null||d.delete(c),En.delete(s),u.current&&lr.delete(u.current)),u.current=v},[u,a,c,s]);return f.createElement("span",{"data-slate-node":"text",ref:y},p)},lc=f.memo(V0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&I0(e.decorations,t.decorations));function cc(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 Go(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q0=t=>{var{decorations:e,element:n,renderElement:r=B=>f.createElement(Z0,Go({},B)),renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Yt(),u=X0(),l=a.isInline(n),c=Z.findKey(a,n),p=f.useCallback(B=>{var b=ni.get(a);B?(b==null||b.set(c,B),En.set(n,B),lr.set(B,n)):(b==null||b.delete(c),En.delete(n))},[a,c,n]),h=dc({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}),g={"data-slate-node":"element",ref:p};if(l&&(g["data-slate-inline"]=!0),!l&&m.hasInlines(a,n)){var y=ne.string(n),v=cl(y);v==="rtl"&&(g.dir=v)}if(m.isVoid(a,n)){g["data-slate-void"]=!0,!u&&l&&(g.contentEditable=!1);var d=l?"span":"div",[[D]]=ne.texts(n);h=f.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},f.createElement(lc,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),To.set(D,0),Io.set(D,n)}return r({attributes:g,children:h,element:n})},G0=f.memo(q0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&T0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&V.equals(t.selection,e.selection))),Z0=t=>{var{attributes:e,children:n,element:r}=t,i=Yt(),o=i.isInline(r)?"span":"div";return f.createElement(o,Go(Go({},e),{},{style:{position:"relative"}}),n)},fc=f.createContext(()=>[]),Y0=()=>f.useContext(fc),K0=f.createContext(!1),dc=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Y0(),u=Yt(),l=Z.findPath(u,n),c=[],p=ue.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),h=0;h<n.children.length;h++){var g=l.concat(h),y=n.children[h],v=Z.findKey(u,y),d=m.range(u,g),D=s&&V.intersection(d,s),B=a([y,g]);for(var b of e){var O=V.intersection(b,d);O&&B.push(O)}ue.isElement(y)?c.push(f.createElement(K0.Provider,{key:"provider-".concat(v.id),value:!!D},f.createElement(G0,{decorations:B,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:D}))):c.push(f.createElement(lc,{decorations:B,key:v.id,isLast:p&&h===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:o,text:y})),To.set(y,h),Io.set(y,n)}return c},pc=f.createContext(!1),X0=()=>f.useContext(pc),hc=f.createContext(null),Zo=()=>{var t=f.useContext(hc);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function J0(){var t=Yt(),e=f.useRef(!1),n=f.useRef(0),r=f.useCallback(()=>{if(!e.current){e.current=!0;var i=Z.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return f.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var Q0=3,$0={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"},eC={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"},tC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ve=t=>{var e=$0[t],n=eC[t],r=tC[t],i=e&&ao(e),o=n&&ao(n),s=r&&ao(r);return a=>!!(i&&i(a)||Ul&&o&&o(a)||!Ul&&s&&s(a))},Ze={isBold:Ve("bold"),isCompose:Ve("compose"),isMoveBackward:Ve("moveBackward"),isMoveForward:Ve("moveForward"),isDeleteBackward:Ve("deleteBackward"),isDeleteForward:Ve("deleteForward"),isDeleteLineBackward:Ve("deleteLineBackward"),isDeleteLineForward:Ve("deleteLineForward"),isDeleteWordBackward:Ve("deleteWordBackward"),isDeleteWordForward:Ve("deleteWordForward"),isExtendBackward:Ve("extendBackward"),isExtendForward:Ve("extendForward"),isExtendLineBackward:Ve("extendLineBackward"),isExtendLineForward:Ve("extendLineForward"),isItalic:Ve("italic"),isMoveLineBackward:Ve("moveLineBackward"),isMoveLineForward:Ve("moveLineForward"),isMoveWordBackward:Ve("moveWordBackward"),isMoveWordForward:Ve("moveWordForward"),isRedo:Ve("redo"),isSoftBreak:Ve("insertSoftBreak"),isSplitBlock:Ve("splitBlock"),isTransposeCharacter:Ve("transposeCharacter"),isUndo:Ve("undo")},nC=(t,e)=>{var n=[],r=()=>{n=[]},i=s=>{if(e.current){var a=s.filter(u=>Ho(t,u,s));n.push(...a)}};function o(){n.length>0&&(n.reverse().forEach(s=>{s.type!=="characterData"&&(s.removedNodes.forEach(a=>{s.target.insertBefore(a,s.nextSibling)}),s.addedNodes.forEach(a=>{s.target.removeChild(a)}))}),r())}return{registerMutations:i,restoreDOM:o,clear:r}},rC={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class vc extends f.Component{constructor(){super(...arguments),wt(this,"context",null),wt(this,"manager",null),wt(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,rC)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=nC(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 o;(o=this.manager)===null||o===void 0||o.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}}wt(vc,"contextType",Fo);var iC=ct?vc:t=>{var{children:e}=t;return f.createElement(f.Fragment,null,e)},oC=f.createContext(!1),sC=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],aC=["text"];function gc(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 Ft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var uC=t=>f.createElement(f.Fragment,null,dc(t)),lC=f.forwardRef((t,e)=>{var n=f.useCallback(C=>f.createElement(cC,Ft({},C)),[]),{autoFocus:r,decorate:i=fC,onDOMBeforeInput:o,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:c=n,scrollSelectionIntoView:p=dC,style:h={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,sC),d=Zo(),[D,B]=f.useState(!1),b=f.useRef(null),O=f.useRef([]),[E,w]=f.useState(),A=f.useRef(!1),{onUserInput:F,receivedUserInput:R}=J0(),[,P]=f.useReducer(C=>C+1,0);Vl.set(d,P),No.set(d,a);var z=f.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);f.useEffect(()=>{b.current&&r&&b.current.focus()},[r]);var I=f.useRef(),j=f.useMemo(()=>by(()=>{var C=Z.toDOMNode(d,d),W=C.getRootNode();if(!A.current&&Dn&&W instanceof ShadowRoot){A.current=!0;var U=c0();U?document.execCommand("indent"):Q.deselect(d),A.current=!1;return}var M=I.current;if((ct||!Z.isComposing(d))&&(!z.isUpdatingSelection||M!=null&&M.isFlushing())&&!z.isDraggingInternally){var X=Z.findDocumentOrShadowRoot(d),{activeElement:te}=X,G=Z.toDOMNode(d,d),le=fr(X);if(te===G?(z.latestElement=te,Xt.set(d,!0)):Xt.delete(d),!le)return Q.deselect(d);var{anchorNode:se,focusNode:pe}=le,ve=Z.hasEditableTarget(d,se)||Z.isTargetInsideNonReadonlyVoid(d,se),Ce=Z.hasTarget(d,pe);if(ve&&Ce){var me=Z.toSlateRange(d,le,{exactMatch:!1,suppressThrow:!0});me&&(!Z.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?Q.select(d,me):M==null||M.handleUserSelect(me))}a&&(!ve||!Ce)&&Q.deselect(d)}},100),[d,a,z]),T=f.useMemo(()=>gy(j,0),[j]);I.current=P0({node:b,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:T}),dr(()=>{var C,W,U;b.current&&(U=Wo(b.current))?(Rl.set(d,U),ei.set(d,b.current),En.set(d,b.current),lr.set(b.current,d)):En.delete(d);var{selection:M}=d,X=Z.findDocumentOrShadowRoot(d),te=fr(X);if(!(!te||!Z.isFocused(d)||(C=I.current)!==null&&C!==void 0&&C.hasPendingAction())){var G=ve=>{var Ce=te.type!=="None";if(!(!M&&!Ce)){var me=te.focusNode,De;if(Tn&&te.rangeCount>1){var ge=te.getRangeAt(0),Ne=te.getRangeAt(te.rangeCount-1);ge.startContainer===me?De=Ne.endContainer:De=ge.startContainer}else De=te.anchorNode;var ae=ei.get(d),Ue=!1;if(ae.contains(De)&&ae.contains(me)&&(Ue=!0),Ce&&Ue&&M&&!ve){var de=Z.toSlateRange(d,te,{exactMatch:!0,suppressThrow:!0});if(de&&V.equals(de,M)){var we;if(!z.hasMarkPlaceholder||(we=De)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Z.hasRange(d,M)){d.selection=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!0});return}z.isUpdatingSelection=!0;var Te=M&&Z.toDOMRange(d,M);return Te?(Z.isComposing(d)&&!ct?te.collapseToEnd():V.isBackward(M)?te.setBaseAndExtent(Te.endContainer,Te.endOffset,Te.startContainer,Te.startOffset):te.setBaseAndExtent(Te.startContainer,Te.startOffset,Te.endContainer,Te.endOffset),p(d,Te)):te.removeAllRanges(),Te}};te.rangeCount<=1&&G();var le=((W=I.current)===null||W===void 0?void 0:W.isFlushing())==="action";if(!ct||!le){setTimeout(()=>{z.isUpdatingSelection=!1});return}var se=null,pe=requestAnimationFrame(()=>{if(le){var ve=Ce=>{try{var me=Z.toDOMNode(d,d);me.focus(),G(Ce)}catch{}};ve(),se=setTimeout(()=>{ve(!0),z.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(pe),se&&clearTimeout(se)}}});var N=f.useCallback(C=>{var W=Z.toDOMNode(d,d),U=W.getRootNode();if(A!=null&&A.current&&Dn&&U instanceof ShadowRoot){var M=C.getTargetRanges(),X=M[0],te=new window.Range;te.setStart(X.startContainer,X.startOffset),te.setEnd(X.endContainer,X.endOffset);var G=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!1});Q.select(d,G),C.preventDefault(),C.stopImmediatePropagation();return}if(F(),!a&&Z.hasEditableTarget(d,C.target)&&!pC(C,o)){var le;if(I.current)return I.current.handleDOMBeforeInput(C);T.flush(),j.flush();var{selection:se}=d,{inputType:pe}=C,ve=C.dataTransfer||C.data||void 0,Ce=pe==="insertCompositionText"||pe==="deleteCompositionText";if(Ce&&Z.isComposing(d))return;var me=!1;if(pe==="insertText"&&se&&V.isCollapsed(se)&&C.data&&C.data.length===1&&/[a-z ]/i.test(C.data)&&se.anchor.offset!==0){var De,ge;me=!0,d.marks&&(me=!1);var{anchor:Ne}=se,[ae,Ue]=Z.toDOMPoint(d,Ne),de=(De=ae.parentElement)===null||De===void 0?void 0:De.closest("a"),we=Z.getWindow(d);if(me&&de&&Z.hasDOMNode(d,de)){var Te,Xe=we==null?void 0:we.document.createTreeWalker(de,NodeFilter.SHOW_TEXT).lastChild();Xe===ae&&((Te=Xe.textContent)===null||Te===void 0?void 0:Te.length)===Ue&&(me=!1)}if(me&&ae.parentElement&&(we==null||(ge=we.getComputedStyle(ae.parentElement))===null||ge===void 0?void 0:ge.whiteSpace)==="pre"){var $e=m.above(d,{at:Ne.path,match:Lt=>ue.isElement(Lt)&&m.isBlock(d,Lt)});$e&&ne.string($e[0]).includes(" ")&&(me=!1)}}if(!pe.startsWith("delete")||pe.startsWith("deleteBy")){var[xe]=C.getTargetRanges();if(xe){var pt=Z.toSlateRange(d,xe,{exactMatch:!1,suppressThrow:!1});if(!se||!V.equals(se,pt)){me=!1;var st=!Ce&&d.selection&&m.rangeRef(d,d.selection);Q.select(d,pt),st&&cr.set(d,st)}}}if(Ce)return;if(me||C.preventDefault(),se&&V.isExpanded(se)&&pe.startsWith("delete")){var an=pe.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:an});return}switch(pe){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":{pe==="insertFromComposition"&&Z.isComposing(d)&&(B(!1),bn.set(d,!1)),(ve==null?void 0:ve.constructor.name)==="DataTransfer"?Z.insertData(d,ve):typeof ve=="string"&&(me?O.current.push(()=>m.insertText(d,ve)):m.insertText(d,ve));break}}var xt=(le=cr.get(d))===null||le===void 0?void 0:le.unref();cr.delete(d),xt&&(!d.selection||!V.equals(d.selection,xt))&&Q.select(d,xt)}},[d,j,F,o,a,T]),K=f.useCallback(C=>{C==null?(j.cancel(),T.cancel(),ei.delete(d),En.delete(d),b.current&&Kt&&b.current.removeEventListener("beforeinput",N)):Kt&&C.addEventListener("beforeinput",N),b.current=C,typeof e=="function"?e(C):e&&(e.current=C)},[j,T,d,N,e]);dr(()=>{var C=Z.getWindow(d);C.document.addEventListener("selectionchange",T);var W=()=>{z.isDraggingInternally=!1};return C.document.addEventListener("dragend",W),C.document.addEventListener("drop",W),()=>{C.document.removeEventListener("selectionchange",T),C.document.removeEventListener("dragend",W),C.document.removeEventListener("drop",W)}},[T,z]);var _=i([d,[]]),ie=s&&d.children.length===1&&Array.from(ne.texts(d)).length===1&&ne.string(d)===""&&!D,re=f.useCallback(C=>{if(C&&ie){var W;w((W=C.getBoundingClientRect())===null||W===void 0?void 0:W.height)}else w(void 0)},[ie]);if(ie){var k=m.start(d,[]);_.push({[In]:!0,placeholder:s,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:H}=d;if(z.hasMarkPlaceholder=!1,d.selection&&V.isCollapsed(d.selection)&&H){var{anchor:J}=d.selection,q=ne.leaf(d,J.path),ee=kn(q,aC);if(!ce.equals(q,H,{loose:!0})){z.hasMarkPlaceholder=!0;var Y=Object.fromEntries(Object.keys(ee).map(C=>[C,null]));_.push(Ft(Ft(Ft({[ql]:!0},Y),H),{},{anchor:J,focus:J}))}}return f.useEffect(()=>{setTimeout(()=>{var{selection:C}=d;if(C){var{anchor:W}=C,U=ne.leaf(d,W.path);if(H&&!ce.equals(U,H,{loose:!0})){St.set(d,H);return}}St.delete(d)})}),f.createElement(pc.Provider,{value:a},f.createElement(oC.Provider,{value:D},f.createElement(fc.Provider,{value:i},f.createElement(iC,{node:b,receivedUserInput:R},f.createElement(g,Ft(Ft({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},v),{},{spellCheck:Kt||!$r?v.spellCheck:!1,autoCorrect:Kt||!$r?v.autoCorrect:"false",autoCapitalize:Kt||!$r?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:K,style:Ft(Ft({},y?{}:Ft({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),h),onBeforeInput:f.useCallback(C=>{if(!Kt&&!a&&!ft(C,v.onBeforeInput)&&Z.hasSelectableTarget(d,C.target)&&(C.preventDefault(),!Z.isComposing(d))){var W=C.data;m.insertText(d,W)}},[v.onBeforeInput,d,a]),onInput:f.useCallback(C=>{if(!ft(C,v.onInput)){if(I.current){I.current.handleInput();return}for(var W of O.current)W();O.current=[]}},[v.onInput]),onBlur:f.useCallback(C=>{if(!(a||z.isUpdatingSelection||!Z.hasSelectableTarget(d,C.target)||ft(C,v.onBlur))){var W=Z.findDocumentOrShadowRoot(d);if(z.latestElement!==W.activeElement){var{relatedTarget:U}=C,M=Z.toDOMNode(d,d);if(U!==M&&!(Bt(U)&&U.hasAttribute("data-slate-spacer"))){if(U!=null&&$t(U)&&Z.hasDOMNode(d,U)){var X=Z.toSlateNode(d,U);if(ue.isElement(X)&&!d.isVoid(X))return}if(Dn){var te=fr(W);te==null||te.removeAllRanges()}Xt.delete(d)}}}},[a,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onClick)&&$t(C.target)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W);if(!m.hasPath(d,U)||ne.get(d,U)!==W)return;if(C.detail===Q0&&U.length>=1){var M=U;if(!(ue.isElement(W)&&m.isBlock(d,W))){var X,te=m.above(d,{match:me=>ue.isElement(me)&&m.isBlock(d,me),at:U});M=(X=te==null?void 0:te[1])!==null&&X!==void 0?X:U.slice(0,1)}var G=m.range(d,M);Q.select(d,G);return}if(a)return;var le=m.start(d,U),se=m.end(d,U),pe=m.void(d,{at:le}),ve=m.void(d,{at:se});if(pe&&ve&&L.equals(pe[1],ve[1])){var Ce=m.range(d,le);Q.select(d,Ce)}}},[d,v.onClick,a]),onCompositionEnd:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if(Z.isComposing(d)&&Promise.resolve().then(()=>{B(!1),bn.set(d,!1)}),(W=I.current)===null||W===void 0||W.handleCompositionEnd(C),ft(C,v.onCompositionEnd)||ct)return;if(!Dn&&!$y&&!Wl&&!t0&&!e0&&C.data){var U=St.get(d);St.delete(d),U!==void 0&&(_t.set(d,d.marks),d.marks=U),m.insertText(d,C.data);var M=_t.get(d);_t.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(B(!0),bn.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if((W=I.current)===null||W===void 0||W.handleCompositionStart(C),ft(C,v.onCompositionStart)||ct)return;B(!0);var{selection:U}=d;if(U&&V.isExpanded(U)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCopy)&&!mc(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:f.useCallback(C=>{if(!a&&Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCut)&&!mc(C)){C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"cut");var{selection:W}=d;if(W)if(V.isExpanded(W))m.deleteFragment(d);else{var U=ne.parent(d,W.anchor.path);m.isVoid(d,U)&&Q.delete(d)}}},[a,d,v.onCut]),onDragOver:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onDragOver)){var W=Z.toSlateNode(d,C.target);ue.isElement(W)&&m.isVoid(d,W)&&C.preventDefault()}},[v.onDragOver,d]),onDragStart:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDragStart)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W),M=ue.isElement(W)&&m.isVoid(d,W)||m.void(d,{at:U,voids:!0});if(M){var X=m.range(d,U);Q.select(d,X)}z.isDraggingInternally=!0,Z.setFragmentData(d,C.dataTransfer,"drag")}},[a,d,v.onDragStart,z]),onDrop:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDrop)){C.preventDefault();var W=d.selection,U=Z.findEventRange(d,C),M=C.dataTransfer;Q.select(d,U),z.isDraggingInternally&&W&&!V.equals(W,U)&&!m.void(d,{at:U,voids:!0})&&Q.delete(d,{at:W}),Z.insertData(d,M),Z.isFocused(d)||Z.focus(d)}},[a,d,v.onDrop,z]),onDragEnd:f.useCallback(C=>{!a&&z.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[a,z,v,d]),onFocus:f.useCallback(C=>{if(!a&&!z.isUpdatingSelection&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onFocus)){var W=Z.toDOMNode(d,d),U=Z.findDocumentOrShadowRoot(d);if(z.latestElement=U.activeElement,Tn&&C.target!==W){W.focus();return}Xt.set(d,!0)}},[a,z,d,v.onFocus]),onKeyDown:f.useCallback(C=>{if(!a&&Z.hasEditableTarget(d,C.target)){var W;(W=I.current)===null||W===void 0||W.handleKeyDown(C);var{nativeEvent:U}=C;if(Z.isComposing(d)&&U.isComposing===!1&&(bn.set(d,!1),B(!1)),ft(C,v.onKeyDown)||Z.isComposing(d))return;var{selection:M}=d,X=d.children[M!==null?M.focus.path[0]:0],te=cl(ne.string(X))==="rtl";if(Ze.isRedo(U)){C.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Ze.isUndo(U)){C.preventDefault();var le=d;typeof le.undo=="function"&&le.undo();return}if(Ze.isMoveLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",reverse:!0});return}if(Ze.isMoveLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line"});return}if(Ze.isExtendLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Ze.isExtendLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus"});return}if(Ze.isMoveBackward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:!te}):Q.collapse(d,{edge:te?"end":"start"});return}if(Ze.isMoveForward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:te}):Q.collapse(d,{edge:te?"start":"end"});return}if(Ze.isMoveWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:!te});return}if(Ze.isMoveWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:te});return}if(Kt){if((Hl||Dn)&&M&&(Ze.isDeleteBackward(U)||Ze.isDeleteForward(U))&&V.isCollapsed(M)){var se=ne.parent(d,M.anchor.path);if(ue.isElement(se)&&m.isVoid(d,se)&&(m.isInline(d,se)||m.isBlock(d,se))){C.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Ze.isBold(U)||Ze.isItalic(U)||Ze.isTransposeCharacter(U)){C.preventDefault();return}if(Ze.isSoftBreak(U)){C.preventDefault(),m.insertSoftBreak(d);return}if(Ze.isSplitBlock(U)){C.preventDefault(),m.insertBreak(d);return}if(Ze.isDeleteBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Ze.isDeleteForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Ze.isDeleteLineBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Ze.isDeleteLineForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Ze.isDeleteWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Ze.isDeleteWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[a,d,v.onKeyDown]),onPaste:f.useCallback(C=>{!a&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onPaste)&&(!Kt||i0(C.nativeEvent)||Dn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[a,d,v.onPaste])}),f.createElement(uC,{decorations:_,node:d,renderElement:u,renderPlaceholder:c,renderLeaf:l,selection:d.selection}))))))}),cC=t=>{var{attributes:e,children:n}=t;return f.createElement("span",Ft({},e),n,ct&&f.createElement("br",null))},fC=()=>[],dC=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&V.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),xy(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},ft=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},mc=t=>$t(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),pC=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},hC=f.createContext(!1),vC=f.createContext({});function gC(t){var e=f.useRef([]).current,n=f.useRef({editor:t}).current,r=f.useCallback(o=>{n.editor=o,e.forEach(s=>s(o))},[e,n]),i=f.useMemo(()=>({getSlate:()=>n.editor,addEventListener:o=>(e.push(o),()=>{e.splice(e.indexOf(o),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var mC=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],yC=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:o,initialValue:s}=t,a=kn(t,mC),[u,l]=f.useState(()=>{if(!ne.isNodeList(s))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(it.stringify(s)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(it.stringify(e)));return e.children=s,Object.assign(e,a),{v:0,editor:e}}),{selectorContext:c,onChange:p}=gC(e),h=f.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:o==null||o(e.children)}l(D=>({v:D.v+1,editor:e})),p(e)},[e,p,r,i,o]);f.useEffect(()=>(_o.set(e,h),()=>{_o.set(e,()=>{})}),[e,h]);var[g,y]=f.useState(Z.isFocused(e));return f.useEffect(()=>{y(Z.isFocused(e))},[e]),dr(()=>{var v=()=>y(Z.isFocused(e));return zl>=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)})},[]),f.createElement(vC.Provider,{value:c},f.createElement(hc.Provider,{value:u},f.createElement(Fo.Provider,{value:u.editor},f.createElement(hC.Provider,{value:g},n))))},yc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Cc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return yc(r,i)&&yc(i,r)},CC=(t,e)=>{var n=m.range(t,V.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,o=r.length,s=Math.floor(o/2);if(Cc(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(;s!==r.length&&s!==i;)Cc(t,m.range(t,r[s]),n)?o=s:i=s,s=Math.floor((i+o)/2);return m.range(t,r[o],n)};function Dc(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 Ec(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var DC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:o,deleteBackward:s,addMark:a,removeMark:u}=r;return ni.set(r,new WeakMap),r.addMark=(l,c)=>{var p,h;(p=zo.get(r))===null||p===void 0||p(),!St.get(r)&&(h=vt.get(r))!==null&&h!==void 0&&h.length&&St.set(r,null),_t.delete(r),a(l,c)},r.removeMark=l=>{var c;!St.get(r)&&(c=vt.get(r))!==null&&c!==void 0&&c.length&&St.set(r,null),_t.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&V.isCollapsed(r.selection)){var c=m.above(r,{match:y=>ue.isElement(y)&&m.isBlock(r,y),at:r.selection});if(c){var[,p]=c,h=m.range(r,p,r.selection.anchor),g=CC(r,h);V.isCollapsed(g)||Q.delete(r,{at:g})}}},r.apply=l=>{var c=[],p=[],h=vt.get(r);if(h!=null&&h.length){var g=h.map(T=>C0(T,l)).filter(Boolean);vt.set(r,g)}var y=Qt.get(r);y&&Qt.set(r,ec(r,y,l));var v=Jt.get(r);if(v!=null&&v.at){var d=Ae.isPoint(v==null?void 0:v.at)?Vo(r,v.at,l):ec(r,v.at,l);Jt.set(r,d?Ec(Ec({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...jn(r,l.path));break}case"set_selection":{var D;(D=cr.get(r))===null||D===void 0||D.unref(),cr.delete(r);break}case"insert_node":case"remove_node":{c.push(...jn(r,L.parent(l.path)));break}case"merge_node":{var B=L.previous(l.path);c.push(...jn(r,B));break}case"move_node":{var b=L.common(L.parent(l.path),L.parent(l.newPath));c.push(...jn(r,b));var O;L.isBefore(l.path,l.newPath)?(c.push(...jn(r,L.parent(l.path))),O=l.newPath):(c.push(...jn(r,L.parent(l.newPath))),O=l.path);var E=ne.get(e,L.parent(O)),w=Z.findKey(r,E),A=m.pathRef(r,L.parent(O));p.push([A,w]);break}}i(l);for(var[F,R]of c){var[P]=m.node(r,F);ti.set(P,R)}for(var[z,I]of p)if(z.current){var[j]=m.node(r,z.current);ti.set(j,I)}},r.setFragmentData=l=>{var{selection:c}=r;if(c){var[p,h]=V.edges(c),g=m.void(r,{at:p.path}),y=m.void(r,{at:h.path});if(!(V.isCollapsed(c)&&!g)){var v=Z.toDOMRange(r,c),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),y){var[B]=y,b=v.cloneRange(),O=Z.toDOMNode(r,B);b.setEndAfter(O),d=b.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?`
|
90
|
+
`:""),[o]=f.useState(i);return dr(()=>{var s=i();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),f.createElement(_0,{ref:r},o)},_0=f.memo(f.forwardRef((t,e)=>f.createElement("span",{"data-slate-string":!0,ref:e},t.children))),qo=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),f.createElement("span",j0({},i),!(ct||Wl)||!n?"\uFEFF":null,n?f.createElement("br",null):null)};function sc(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 ac(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var z0=ct?300:0;function W0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function uc(t){t.current&&(clearTimeout(t.current),t.current=null)}var U0=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:s=B=>f.createElement(R0,ac({},B))}=t,a=Yt(),u=f.useRef(null),l=f.useRef(null),[c,p]=f.useState(!1),h=f.useRef(null),g=f.useCallback(B=>{if(W0(u,B==null),B==null){var b;jo.delete(a),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(jo.set(a,B),!u.current){var O=window.ResizeObserver||Gy;u.current=new O(()=>{var E;(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,B)})}u.current.observe(B),l.current=B}},[l,e,a]),y=f.createElement(N0,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[In];if(f.useEffect(()=>(v?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},z0)):(uc(h),p(!1)),()=>uc(h)),[v,p]),v&&c){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:Dn?"inherit":void 0},contentEditable:!1,ref:g}};y=f.createElement(f.Fragment,null,o(d),y)}var D={"data-slate-leaf":!0};return s({attributes:D,children:y,leaf:e,text:r})},H0=f.memo(U0,(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[In]===t.leaf[In]),R0=t=>{var{attributes:e,children:n}=t;return f.createElement("span",ac({},e),n)},V0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:s}=t,a=Yt(),u=f.useRef(null),l=ce.decorations(s,e),c=Z.findKey(a,s),p=[],h=0;h<l.length;h++){var g=l[h];p.push(f.createElement(H0,{isLast:n&&h===l.length-1,key:"".concat(c.id,"-").concat(h),renderPlaceholder:i,leaf:g,text:s,parent:r,renderLeaf:o}))}var y=f.useCallback(v=>{var d=ni.get(a);v?(d==null||d.set(c,v),En.set(s,v),lr.set(v,s)):(d==null||d.delete(c),En.delete(s),u.current&&lr.delete(u.current)),u.current=v},[u,a,c,s]);return f.createElement("span",{"data-slate-node":"text",ref:y},p)},lc=f.memo(V0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&I0(e.decorations,t.decorations));function cc(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 Go(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q0=t=>{var{decorations:e,element:n,renderElement:r=B=>f.createElement(Z0,Go({},B)),renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Yt(),u=X0(),l=a.isInline(n),c=Z.findKey(a,n),p=f.useCallback(B=>{var b=ni.get(a);B?(b==null||b.set(c,B),En.set(n,B),lr.set(B,n)):(b==null||b.delete(c),En.delete(n))},[a,c,n]),h=dc({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}),g={"data-slate-node":"element",ref:p};if(l&&(g["data-slate-inline"]=!0),!l&&m.hasInlines(a,n)){var y=ne.string(n),v=cl(y);v==="rtl"&&(g.dir=v)}if(m.isVoid(a,n)){g["data-slate-void"]=!0,!u&&l&&(g.contentEditable=!1);var d=l?"span":"div",[[D]]=ne.texts(n);h=f.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},f.createElement(lc,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),To.set(D,0),Io.set(D,n)}return r({attributes:g,children:h,element:n})},G0=f.memo(q0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&T0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&V.equals(t.selection,e.selection))),Z0=t=>{var{attributes:e,children:n,element:r}=t,i=Yt(),o=i.isInline(r)?"span":"div";return f.createElement(o,Go(Go({},e),{},{style:{position:"relative"}}),n)},fc=f.createContext(()=>[]),Y0=()=>f.useContext(fc),K0=f.createContext(!1),dc=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Y0(),u=Yt(),l=Z.findPath(u,n),c=[],p=ue.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),h=0;h<n.children.length;h++){var g=l.concat(h),y=n.children[h],v=Z.findKey(u,y),d=m.range(u,g),D=s&&V.intersection(d,s),B=a([y,g]);for(var b of e){var O=V.intersection(b,d);O&&B.push(O)}ue.isElement(y)?c.push(f.createElement(K0.Provider,{key:"provider-".concat(v.id),value:!!D},f.createElement(G0,{decorations:B,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:D}))):c.push(f.createElement(lc,{decorations:B,key:v.id,isLast:p&&h===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:o,text:y})),To.set(y,h),Io.set(y,n)}return c},pc=f.createContext(!1),X0=()=>f.useContext(pc),hc=f.createContext(null),Zo=()=>{var t=f.useContext(hc);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function J0(){var t=Yt(),e=f.useRef(!1),n=f.useRef(0),r=f.useCallback(()=>{if(!e.current){e.current=!0;var i=Z.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return f.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var Q0=3,$0={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"},eC={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"},tC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ve=t=>{var e=$0[t],n=eC[t],r=tC[t],i=e&&ao(e),o=n&&ao(n),s=r&&ao(r);return a=>!!(i&&i(a)||Ul&&o&&o(a)||!Ul&&s&&s(a))},Ze={isBold:Ve("bold"),isCompose:Ve("compose"),isMoveBackward:Ve("moveBackward"),isMoveForward:Ve("moveForward"),isDeleteBackward:Ve("deleteBackward"),isDeleteForward:Ve("deleteForward"),isDeleteLineBackward:Ve("deleteLineBackward"),isDeleteLineForward:Ve("deleteLineForward"),isDeleteWordBackward:Ve("deleteWordBackward"),isDeleteWordForward:Ve("deleteWordForward"),isExtendBackward:Ve("extendBackward"),isExtendForward:Ve("extendForward"),isExtendLineBackward:Ve("extendLineBackward"),isExtendLineForward:Ve("extendLineForward"),isItalic:Ve("italic"),isMoveLineBackward:Ve("moveLineBackward"),isMoveLineForward:Ve("moveLineForward"),isMoveWordBackward:Ve("moveWordBackward"),isMoveWordForward:Ve("moveWordForward"),isRedo:Ve("redo"),isSoftBreak:Ve("insertSoftBreak"),isSplitBlock:Ve("splitBlock"),isTransposeCharacter:Ve("transposeCharacter"),isUndo:Ve("undo")},nC=(t,e)=>{var n=[],r=()=>{n=[]},i=s=>{if(e.current){var a=s.filter(u=>Ho(t,u,s));n.push(...a)}};function o(){n.length>0&&(n.reverse().forEach(s=>{s.type!=="characterData"&&(s.removedNodes.forEach(a=>{s.target.insertBefore(a,s.nextSibling)}),s.addedNodes.forEach(a=>{s.target.removeChild(a)}))}),r())}return{registerMutations:i,restoreDOM:o,clear:r}},rC={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class vc extends f.Component{constructor(){super(...arguments),wt(this,"context",null),wt(this,"manager",null),wt(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,rC)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=nC(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 o;(o=this.manager)===null||o===void 0||o.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}}wt(vc,"contextType",Fo);var iC=ct?vc:t=>{var{children:e}=t;return f.createElement(f.Fragment,null,e)},oC=f.createContext(!1),sC=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],aC=["text"];function gc(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 Ft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var uC=t=>f.createElement(f.Fragment,null,dc(t)),lC=f.forwardRef((t,e)=>{var n=f.useCallback(C=>f.createElement(cC,Ft({},C)),[]),{autoFocus:r,decorate:i=fC,onDOMBeforeInput:o,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:c=n,scrollSelectionIntoView:p=dC,style:h={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,sC),d=Zo(),[D,B]=f.useState(!1),b=f.useRef(null),O=f.useRef([]),[E,w]=f.useState(),A=f.useRef(!1),{onUserInput:F,receivedUserInput:R}=J0(),[,P]=f.useReducer(C=>C+1,0);Vl.set(d,P),No.set(d,a);var z=f.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);f.useEffect(()=>{b.current&&r&&b.current.focus()},[r]);var I=f.useRef(),j=f.useMemo(()=>by(()=>{var C=Z.toDOMNode(d,d),W=C.getRootNode();if(!A.current&&Dn&&W instanceof ShadowRoot){A.current=!0;var U=c0();U?document.execCommand("indent"):Q.deselect(d),A.current=!1;return}var M=I.current;if((ct||!Z.isComposing(d))&&(!z.isUpdatingSelection||M!=null&&M.isFlushing())&&!z.isDraggingInternally){var X=Z.findDocumentOrShadowRoot(d),{activeElement:te}=X,G=Z.toDOMNode(d,d),le=fr(X);if(te===G?(z.latestElement=te,Xt.set(d,!0)):Xt.delete(d),!le)return Q.deselect(d);var{anchorNode:se,focusNode:pe}=le,ve=Z.hasEditableTarget(d,se)||Z.isTargetInsideNonReadonlyVoid(d,se),Ce=Z.hasTarget(d,pe);if(ve&&Ce){var me=Z.toSlateRange(d,le,{exactMatch:!1,suppressThrow:!0});me&&(!Z.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?Q.select(d,me):M==null||M.handleUserSelect(me))}a&&(!ve||!Ce)&&Q.deselect(d)}},100),[d,a,z]),T=f.useMemo(()=>gy(j,0),[j]);I.current=P0({node:b,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:T}),dr(()=>{var C,W,U;b.current&&(U=Wo(b.current))?(Rl.set(d,U),ei.set(d,b.current),En.set(d,b.current),lr.set(b.current,d)):En.delete(d);var{selection:M}=d,X=Z.findDocumentOrShadowRoot(d),te=fr(X);if(!(!te||!Z.isFocused(d)||(C=I.current)!==null&&C!==void 0&&C.hasPendingAction())){var G=ve=>{var Ce=te.type!=="None";if(!(!M&&!Ce)){var me=te.focusNode,De;if(Tn&&te.rangeCount>1){var ge=te.getRangeAt(0),Ne=te.getRangeAt(te.rangeCount-1);ge.startContainer===me?De=Ne.endContainer:De=ge.startContainer}else De=te.anchorNode;var ae=ei.get(d),Ue=!1;if(ae.contains(De)&&ae.contains(me)&&(Ue=!0),Ce&&Ue&&M&&!ve){var de=Z.toSlateRange(d,te,{exactMatch:!0,suppressThrow:!0});if(de&&V.equals(de,M)){var we;if(!z.hasMarkPlaceholder||(we=De)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Z.hasRange(d,M)){d.selection=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!0});return}z.isUpdatingSelection=!0;var Te=M&&Z.toDOMRange(d,M);return Te?(Z.isComposing(d)&&!ct?te.collapseToEnd():V.isBackward(M)?te.setBaseAndExtent(Te.endContainer,Te.endOffset,Te.startContainer,Te.startOffset):te.setBaseAndExtent(Te.startContainer,Te.startOffset,Te.endContainer,Te.endOffset),p(d,Te)):te.removeAllRanges(),Te}};te.rangeCount<=1&&G();var le=((W=I.current)===null||W===void 0?void 0:W.isFlushing())==="action";if(!ct||!le){setTimeout(()=>{z.isUpdatingSelection=!1});return}var se=null,pe=requestAnimationFrame(()=>{if(le){var ve=Ce=>{try{var me=Z.toDOMNode(d,d);me.focus(),G(Ce)}catch{}};ve(),se=setTimeout(()=>{ve(!0),z.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(pe),se&&clearTimeout(se)}}});var N=f.useCallback(C=>{var W=Z.toDOMNode(d,d),U=W.getRootNode();if(A!=null&&A.current&&Dn&&U instanceof ShadowRoot){var M=C.getTargetRanges(),X=M[0],te=new window.Range;te.setStart(X.startContainer,X.startOffset),te.setEnd(X.endContainer,X.endOffset);var G=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!1});Q.select(d,G),C.preventDefault(),C.stopImmediatePropagation();return}if(F(),!a&&Z.hasEditableTarget(d,C.target)&&!pC(C,o)){var le;if(I.current)return I.current.handleDOMBeforeInput(C);T.flush(),j.flush();var{selection:se}=d,{inputType:pe}=C,ve=C.dataTransfer||C.data||void 0,Ce=pe==="insertCompositionText"||pe==="deleteCompositionText";if(Ce&&Z.isComposing(d))return;var me=!1;if(pe==="insertText"&&se&&V.isCollapsed(se)&&C.data&&C.data.length===1&&/[a-z ]/i.test(C.data)&&se.anchor.offset!==0){var De,ge;me=!0,d.marks&&(me=!1);var{anchor:Ne}=se,[ae,Ue]=Z.toDOMPoint(d,Ne),de=(De=ae.parentElement)===null||De===void 0?void 0:De.closest("a"),we=Z.getWindow(d);if(me&&de&&Z.hasDOMNode(d,de)){var Te,Xe=we==null?void 0:we.document.createTreeWalker(de,NodeFilter.SHOW_TEXT).lastChild();Xe===ae&&((Te=Xe.textContent)===null||Te===void 0?void 0:Te.length)===Ue&&(me=!1)}if(me&&ae.parentElement&&(we==null||(ge=we.getComputedStyle(ae.parentElement))===null||ge===void 0?void 0:ge.whiteSpace)==="pre"){var $e=m.above(d,{at:Ne.path,match:Lt=>ue.isElement(Lt)&&m.isBlock(d,Lt)});$e&&ne.string($e[0]).includes(" ")&&(me=!1)}}if(!pe.startsWith("delete")||pe.startsWith("deleteBy")){var[xe]=C.getTargetRanges();if(xe){var pt=Z.toSlateRange(d,xe,{exactMatch:!1,suppressThrow:!1});if(!se||!V.equals(se,pt)){me=!1;var st=!Ce&&d.selection&&m.rangeRef(d,d.selection);Q.select(d,pt),st&&cr.set(d,st)}}}if(Ce)return;if(me||C.preventDefault(),se&&V.isExpanded(se)&&pe.startsWith("delete")){var an=pe.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:an});return}switch(pe){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":{pe==="insertFromComposition"&&Z.isComposing(d)&&(B(!1),bn.set(d,!1)),(ve==null?void 0:ve.constructor.name)==="DataTransfer"?Z.insertData(d,ve):typeof ve=="string"&&(me?O.current.push(()=>m.insertText(d,ve)):m.insertText(d,ve));break}}var xt=(le=cr.get(d))===null||le===void 0?void 0:le.unref();cr.delete(d),xt&&(!d.selection||!V.equals(d.selection,xt))&&Q.select(d,xt)}},[d,j,F,o,a,T]),K=f.useCallback(C=>{C==null?(j.cancel(),T.cancel(),ei.delete(d),En.delete(d),b.current&&Kt&&b.current.removeEventListener("beforeinput",N)):Kt&&C.addEventListener("beforeinput",N),b.current=C,typeof e=="function"?e(C):e&&(e.current=C)},[j,T,d,N,e]);dr(()=>{var C=Z.getWindow(d);C.document.addEventListener("selectionchange",T);var W=()=>{z.isDraggingInternally=!1};return C.document.addEventListener("dragend",W),C.document.addEventListener("drop",W),()=>{C.document.removeEventListener("selectionchange",T),C.document.removeEventListener("dragend",W),C.document.removeEventListener("drop",W)}},[T,z]);var _=i([d,[]]),ie=s&&d.children.length===1&&Array.from(ne.texts(d)).length===1&&ne.string(d)===""&&!D,re=f.useCallback(C=>{if(C&&ie){var W;w((W=C.getBoundingClientRect())===null||W===void 0?void 0:W.height)}else w(void 0)},[ie]);if(ie){var k=m.start(d,[]);_.push({[In]:!0,placeholder:s,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:H}=d;if(z.hasMarkPlaceholder=!1,d.selection&&V.isCollapsed(d.selection)&&H){var{anchor:J}=d.selection,q=ne.leaf(d,J.path),ee=kn(q,aC);if(!ce.equals(q,H,{loose:!0})){z.hasMarkPlaceholder=!0;var Y=Object.fromEntries(Object.keys(ee).map(C=>[C,null]));_.push(Ft(Ft(Ft({[ql]:!0},Y),H),{},{anchor:J,focus:J}))}}return f.useEffect(()=>{setTimeout(()=>{var{selection:C}=d;if(C){var{anchor:W}=C,U=ne.leaf(d,W.path);if(H&&!ce.equals(U,H,{loose:!0})){St.set(d,H);return}}St.delete(d)})}),f.createElement(pc.Provider,{value:a},f.createElement(oC.Provider,{value:D},f.createElement(fc.Provider,{value:i},f.createElement(iC,{node:b,receivedUserInput:R},f.createElement(g,Ft(Ft({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},v),{},{spellCheck:Kt||!$r?v.spellCheck:!1,autoCorrect:Kt||!$r?v.autoCorrect:"false",autoCapitalize:Kt||!$r?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:K,style:Ft(Ft({},y?{}:Ft({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),h),onBeforeInput:f.useCallback(C=>{if(!Kt&&!a&&!ft(C,v.onBeforeInput)&&Z.hasSelectableTarget(d,C.target)&&(C.preventDefault(),!Z.isComposing(d))){var W=C.data;m.insertText(d,W)}},[v.onBeforeInput,d,a]),onInput:f.useCallback(C=>{if(!ft(C,v.onInput)){if(I.current){I.current.handleInput();return}for(var W of O.current)W();O.current=[]}},[v.onInput]),onBlur:f.useCallback(C=>{if(!(a||z.isUpdatingSelection||!Z.hasSelectableTarget(d,C.target)||ft(C,v.onBlur))){var W=Z.findDocumentOrShadowRoot(d);if(z.latestElement!==W.activeElement){var{relatedTarget:U}=C,M=Z.toDOMNode(d,d);if(U!==M&&!(Bt(U)&&U.hasAttribute("data-slate-spacer"))){if(U!=null&&$t(U)&&Z.hasDOMNode(d,U)){var X=Z.toSlateNode(d,U);if(ue.isElement(X)&&!d.isVoid(X))return}if(Dn){var te=fr(W);te==null||te.removeAllRanges()}Xt.delete(d)}}}},[a,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onClick)&&$t(C.target)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W);if(!m.hasPath(d,U)||ne.get(d,U)!==W)return;if(C.detail===Q0&&U.length>=1){var M=U;if(!(ue.isElement(W)&&m.isBlock(d,W))){var X,te=m.above(d,{match:me=>ue.isElement(me)&&m.isBlock(d,me),at:U});M=(X=te==null?void 0:te[1])!==null&&X!==void 0?X:U.slice(0,1)}var G=m.range(d,M);Q.select(d,G);return}if(a)return;var le=m.start(d,U),se=m.end(d,U),pe=m.void(d,{at:le}),ve=m.void(d,{at:se});if(pe&&ve&&L.equals(pe[1],ve[1])){var Ce=m.range(d,le);Q.select(d,Ce)}}},[d,v.onClick,a]),onCompositionEnd:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if(Z.isComposing(d)&&Promise.resolve().then(()=>{B(!1),bn.set(d,!1)}),(W=I.current)===null||W===void 0||W.handleCompositionEnd(C),ft(C,v.onCompositionEnd)||ct)return;if(!Dn&&!$y&&!Wl&&!t0&&!e0&&C.data){var U=St.get(d);St.delete(d),U!==void 0&&(_t.set(d,d.marks),d.marks=U),m.insertText(d,C.data);var M=_t.get(d);_t.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(B(!0),bn.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if((W=I.current)===null||W===void 0||W.handleCompositionStart(C),ft(C,v.onCompositionStart)||ct)return;B(!0);var{selection:U}=d;if(U&&V.isExpanded(U)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCopy)&&!mc(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:f.useCallback(C=>{if(!a&&Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCut)&&!mc(C)){C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"cut");var{selection:W}=d;if(W)if(V.isExpanded(W))m.deleteFragment(d);else{var U=ne.parent(d,W.anchor.path);m.isVoid(d,U)&&Q.delete(d)}}},[a,d,v.onCut]),onDragOver:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onDragOver)){var W=Z.toSlateNode(d,C.target);ue.isElement(W)&&m.isVoid(d,W)&&C.preventDefault()}},[v.onDragOver,d]),onDragStart:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDragStart)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W),M=ue.isElement(W)&&m.isVoid(d,W)||m.void(d,{at:U,voids:!0});if(M){var X=m.range(d,U);Q.select(d,X)}z.isDraggingInternally=!0,Z.setFragmentData(d,C.dataTransfer,"drag")}},[a,d,v.onDragStart,z]),onDrop:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDrop)){C.preventDefault();var W=d.selection,U=Z.findEventRange(d,C),M=C.dataTransfer;Q.select(d,U),z.isDraggingInternally&&W&&!V.equals(W,U)&&!m.void(d,{at:U,voids:!0})&&Q.delete(d,{at:W}),Z.insertData(d,M),Z.isFocused(d)||Z.focus(d)}},[a,d,v.onDrop,z]),onDragEnd:f.useCallback(C=>{!a&&z.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[a,z,v,d]),onFocus:f.useCallback(C=>{if(!a&&!z.isUpdatingSelection&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onFocus)){var W=Z.toDOMNode(d,d),U=Z.findDocumentOrShadowRoot(d);if(z.latestElement=U.activeElement,Tn&&C.target!==W){W.focus();return}Xt.set(d,!0)}},[a,z,d,v.onFocus]),onKeyDown:f.useCallback(C=>{if(!a&&Z.hasEditableTarget(d,C.target)){var W;(W=I.current)===null||W===void 0||W.handleKeyDown(C);var{nativeEvent:U}=C;if(Z.isComposing(d)&&U.isComposing===!1&&(bn.set(d,!1),B(!1)),ft(C,v.onKeyDown)||Z.isComposing(d))return;var{selection:M}=d,X=d.children[M!==null?M.focus.path[0]:0],te=cl(ne.string(X))==="rtl";if(Ze.isRedo(U)){C.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Ze.isUndo(U)){C.preventDefault();var le=d;typeof le.undo=="function"&&le.undo();return}if(Ze.isMoveLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",reverse:!0});return}if(Ze.isMoveLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line"});return}if(Ze.isExtendLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Ze.isExtendLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus"});return}if(Ze.isMoveBackward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:!te}):Q.collapse(d,{edge:te?"end":"start"});return}if(Ze.isMoveForward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:te}):Q.collapse(d,{edge:te?"start":"end"});return}if(Ze.isMoveWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:!te});return}if(Ze.isMoveWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:te});return}if(Kt){if((Hl||Dn)&&M&&(Ze.isDeleteBackward(U)||Ze.isDeleteForward(U))&&V.isCollapsed(M)){var se=ne.parent(d,M.anchor.path);if(ue.isElement(se)&&m.isVoid(d,se)&&(m.isInline(d,se)||m.isBlock(d,se))){C.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Ze.isBold(U)||Ze.isItalic(U)||Ze.isTransposeCharacter(U)){C.preventDefault();return}if(Ze.isSoftBreak(U)){C.preventDefault(),m.insertSoftBreak(d);return}if(Ze.isSplitBlock(U)){C.preventDefault(),m.insertBreak(d);return}if(Ze.isDeleteBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Ze.isDeleteForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Ze.isDeleteLineBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Ze.isDeleteLineForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Ze.isDeleteWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Ze.isDeleteWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[a,d,v.onKeyDown]),onPaste:f.useCallback(C=>{!a&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onPaste)&&(!Kt||i0(C.nativeEvent)||Dn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[a,d,v.onPaste])}),f.createElement(uC,{decorations:_,node:d,renderElement:u,renderPlaceholder:c,renderLeaf:l,selection:d.selection}))))))}),cC=t=>{var{attributes:e,children:n}=t;return f.createElement("span",Ft({},e),n,ct&&f.createElement("br",null))},fC=()=>[],dC=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&V.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),xy(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},ft=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},mc=t=>$t(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),pC=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},hC=f.createContext(!1),vC=f.createContext({});function gC(t){var e=f.useRef([]).current,n=f.useRef({editor:t}).current,r=f.useCallback(o=>{n.editor=o,e.forEach(s=>s(o))},[e,n]),i=f.useMemo(()=>({getSlate:()=>n.editor,addEventListener:o=>(e.push(o),()=>{e.splice(e.indexOf(o),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var mC=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],yC=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:o,initialValue:s}=t,a=kn(t,mC),[u,l]=f.useState(()=>{if(!ne.isNodeList(s))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(it.stringify(s)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(it.stringify(e)));return e.children=s,Object.assign(e,a),{v:0,editor:e}}),{selectorContext:c,onChange:p}=gC(e),h=f.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:o==null||o(e.children)}l(D=>({v:D.v+1,editor:e})),p(e)},[e,p,r,i,o]);f.useEffect(()=>(_o.set(e,h),()=>{_o.set(e,()=>{})}),[e,h]);var[g,y]=f.useState(Z.isFocused(e));return f.useEffect(()=>{y(Z.isFocused(e))},[e]),dr(()=>{var v=()=>y(Z.isFocused(e));return zl>=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)})},[]),f.createElement(vC.Provider,{value:c},f.createElement(hc.Provider,{value:u},f.createElement(Fo.Provider,{value:u.editor},f.createElement(hC.Provider,{value:g},n))))},yc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Cc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return yc(r,i)&&yc(i,r)},CC=(t,e)=>{var n=m.range(t,V.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,o=r.length,s=Math.floor(o/2);if(Cc(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(;s!==r.length&&s!==i;)Cc(t,m.range(t,r[s]),n)?o=s:i=s,s=Math.floor((i+o)/2);return m.range(t,r[o],n)};function Dc(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 Ec(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var DC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:o,deleteBackward:s,addMark:a,removeMark:u}=r;return ni.set(r,new WeakMap),r.addMark=(l,c)=>{var p,h;(p=zo.get(r))===null||p===void 0||p(),!St.get(r)&&(h=vt.get(r))!==null&&h!==void 0&&h.length&&St.set(r,null),_t.delete(r),a(l,c)},r.removeMark=l=>{var c;!St.get(r)&&(c=vt.get(r))!==null&&c!==void 0&&c.length&&St.set(r,null),_t.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&V.isCollapsed(r.selection)){var c=m.above(r,{match:y=>ue.isElement(y)&&m.isBlock(r,y),at:r.selection});if(c){var[,p]=c,h=m.range(r,p,r.selection.anchor),g=CC(r,h);V.isCollapsed(g)||Q.delete(r,{at:g})}}},r.apply=l=>{var c=[],p=[],h=vt.get(r);if(h!=null&&h.length){var g=h.map(T=>C0(T,l)).filter(Boolean);vt.set(r,g)}var y=Qt.get(r);y&&Qt.set(r,ec(r,y,l));var v=Jt.get(r);if(v!=null&&v.at){var d=Se.isPoint(v==null?void 0:v.at)?Vo(r,v.at,l):ec(r,v.at,l);Jt.set(r,d?Ec(Ec({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...jn(r,l.path));break}case"set_selection":{var D;(D=cr.get(r))===null||D===void 0||D.unref(),cr.delete(r);break}case"insert_node":case"remove_node":{c.push(...jn(r,L.parent(l.path)));break}case"merge_node":{var B=L.previous(l.path);c.push(...jn(r,B));break}case"move_node":{var b=L.common(L.parent(l.path),L.parent(l.newPath));c.push(...jn(r,b));var O;L.isBefore(l.path,l.newPath)?(c.push(...jn(r,L.parent(l.path))),O=l.newPath):(c.push(...jn(r,L.parent(l.newPath))),O=l.path);var E=ne.get(e,L.parent(O)),w=Z.findKey(r,E),A=m.pathRef(r,L.parent(O));p.push([A,w]);break}}i(l);for(var[F,R]of c){var[P]=m.node(r,F);ti.set(P,R)}for(var[z,I]of p)if(z.current){var[j]=m.node(r,z.current);ti.set(j,I)}},r.setFragmentData=l=>{var{selection:c}=r;if(c){var[p,h]=V.edges(c),g=m.void(r,{at:p.path}),y=m.void(r,{at:h.path});if(!(V.isCollapsed(c)&&!g)){var v=Z.toDOMRange(r,c),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),y){var[B]=y,b=v.cloneRange(),O=Z.toDOMNode(r,B);b.setEndAfter(O),d=b.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?`
|
91
91
|
`:""}),Zl(D)){var E=D.ownerDocument.createElement("span");E.style.whiteSpace="pre",E.appendChild(D),d.appendChild(E),D=E}var w=r.getFragment(),A=JSON.stringify(w),F=window.btoa(encodeURIComponent(A));D.setAttribute("data-slate-fragment",F),l.setData("application/".concat(n),F);var R=d.ownerDocument.createElement("div");return R.appendChild(d),R.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(R),l.setData("text/html",R.innerHTML),l.setData("text/plain",Kl(R)),d.ownerDocument.body.removeChild(R),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||l0(l);if(c){var p=decodeURIComponent(window.atob(c)),h=JSON.parse(p);return r.insertFragment(h),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var p=c.split(/\r\n|\r|\n/),h=!1;for(var g of p)h&&Q.splitNodes(r,{always:!0}),r.insertText(g),h=!0;return!0}return!1},r.onChange=l=>{var c=zl<18?ln.unstable_batchedUpdates:p=>p();c(()=>{var p=_o.get(r);p&&p(l),o(l)})},r},jn=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var o=Z.findKey(t,r);n.push([i,o])}return n};function bc(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:o=>!m.isEditor(o)&&ue.isElement(o)&&o[n]===e}));return!!i}const wc=["listItem","numberedList"],ii=["left","center","right","justify"];function EC(t,e){const n=ii.includes(e)?"align":"type",r=bc(t,e,n),i=wc.includes(e);Q.unwrapNodes(t,{match:s=>!m.isEditor(s)&&ue.isElement(s)&&wc.includes(s.type)&&!ii.includes(e),split:!0});let o;if(ii.includes(e)?o={align:r?void 0:e}:o={type:r?"paragraph":i?"listItem":e},Q.setNodes(t,o),!r&&i){const s={type:e,children:[]};Q.wrapNodes(t,s)}}function wn({format:t,icon:e}){const n=Zo(),r=ii.includes(t)?"align":"type",o=bc(n,t,r)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),EC(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+o,onMouseDown:s,children:x.jsx(e,{})})}function bC({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 wC({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 Bc(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function xc(t,e){Bc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function oi({format:t,icon:e}){const n=Zo(),i=Bc(n,t)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),xc(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:o,children:x.jsx(e,{})})}function BC({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const Sc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},xC=[{type:"paragraph",children:[{text:""}]}];var Ac={},Yo={},Ko={};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=OC;var Lc="html",Oc="head",si="body",SC=/<([a-zA-Z]+[0-9]?)/,Pc=/<head[^]*>/i,Fc=/<body[^]*>/i,ai=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},Xo=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Mc=typeof window=="object"&&window.DOMParser;if(typeof Mc=="function"){var AC=new Mc,LC="text/html";Xo=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),AC.parseFromString(t,LC)},ai=Xo}if(typeof document=="object"&&document.implementation){var ui=document.implementation.createHTMLDocument();ai=function(t,e){if(e){var n=ui.documentElement.querySelector(e);return n&&(n.innerHTML=t),ui}return ui.documentElement.innerHTML=t,ui}}var li=typeof document=="object"&&document.createElement("template"),Jo;li&&li.content&&(Jo=function(t){return li.innerHTML=t,li.content.childNodes});function OC(t){var e,n,r=t.match(SC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case Lc:{var o=Xo(t);if(!Pc.test(t)){var s=o.querySelector(Oc);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.removeChild(s)}if(!Fc.test(t)){var s=o.querySelector(si);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return o.querySelectorAll(Lc)}case Oc:case si:{var a=ai(t).querySelectorAll(i);return Fc.test(t)&&Pc.test(t)?a[0].parentNode.childNodes:a}default:{if(Jo)return Jo(t);var s=ai(t,si).querySelector(si);return s.childNodes}}}var ci={},Qo={},$o={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})($o);var Fe={},en=We&&We.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pr=We&&We.__assign||function(){return pr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},pr.apply(this,arguments)};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.cloneNode=Fe.hasChildren=Fe.isDocument=Fe.isDirective=Fe.isComment=Fe.isText=Fe.isCDATA=Fe.isTag=Fe.Element=Fe.Document=Fe.CDATA=Fe.NodeWithChildren=Fe.ProcessingInstruction=Fe.Comment=Fe.Text=Fe.DataNode=Fe.Node=void 0;var gt=$o,es=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),ts(this,e)},t}();Fe.Node=es;var fi=function(t){en(e,t);function e(n){var r=t.call(this)||this;return r.data=n,r}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),e}(es);Fe.DataNode=fi;var kc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Text,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(fi);Fe.Text=kc;var Tc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Comment,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(fi);Fe.Comment=Tc;var Ic=function(t){en(e,t);function e(n,r){var i=t.call(this,r)||this;return i.name=n,i.type=gt.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(fi);Fe.ProcessingInstruction=Ic;var di=function(t){en(e,t);function e(n){var r=t.call(this)||this;return r.children=n,r}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),e}(es);Fe.NodeWithChildren=di;var jc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.CDATA,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(di);Fe.CDATA=jc;var Nc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Root,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(di);Fe.Document=Nc;var _c=function(t){en(e,t);function e(n,r,i,o){i===void 0&&(i=[]),o===void 0&&(o=n==="script"?gt.ElementType.Script:n==="style"?gt.ElementType.Style:gt.ElementType.Tag);var s=t.call(this,i)||this;return s.name=n,s.attribs=r,s.type=o,s}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var i,o;return{name:r,value:n.attribs[r],namespace:(i=n["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(o=n["x-attribsPrefix"])===null||o===void 0?void 0:o[r]}})},enumerable:!1,configurable:!0}),e}(di);Fe.Element=_c;function zc(t){return(0,gt.isTag)(t)}Fe.isTag=zc;function Wc(t){return t.type===gt.ElementType.CDATA}Fe.isCDATA=Wc;function Uc(t){return t.type===gt.ElementType.Text}Fe.isText=Uc;function Hc(t){return t.type===gt.ElementType.Comment}Fe.isComment=Hc;function Rc(t){return t.type===gt.ElementType.Directive}Fe.isDirective=Rc;function Vc(t){return t.type===gt.ElementType.Root}Fe.isDocument=Vc;function PC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=PC;function ts(t,e){e===void 0&&(e=!1);var n;if(Uc(t))n=new kc(t.data);else if(Hc(t))n=new Tc(t.data);else if(zc(t)){var r=e?ns(t.children):[],i=new _c(t.name,pr({},t.attribs),r);r.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=pr({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=pr({},t["x-attribsPrefix"])),n=i}else if(Wc(t)){var r=e?ns(t.children):[],o=new jc(r);r.forEach(function(l){return l.parent=o}),n=o}else if(Vc(t)){var r=e?ns(t.children):[],s=new Nc(r);r.forEach(function(l){return l.parent=s}),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),n=s}else if(Rc(t)){var a=new Ic(t.name,t.data);t["x-name"]!=null&&(a["x-name"]=t["x-name"],a["x-publicId"]=t["x-publicId"],a["x-systemId"]=t["x-systemId"]),n=a}else throw new Error("Not implemented yet: ".concat(t.type));return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}Fe.cloneNode=ts;function ns(t){for(var e=t.map(function(r){return ts(r,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}(function(t){var e=We&&We.__createBinding||(Object.create?function(a,u,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(u,l);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(a,c,p)}:function(a,u,l,c){c===void 0&&(c=l),a[c]=u[l]}),n=We&&We.__exportStar||function(a,u){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,a,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=$o,i=Fe;n(Fe,t);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function a(u,l,c){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(c=l,l=o),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??o,this.elementCB=c??null}return a.prototype.onparserinit=function(u){this.parser=u},a.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},a.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},a.prototype.onerror=function(u){this.handleCallback(u)},a.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},a.prototype.onopentag=function(u,l){var c=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,c);this.addNode(p),this.tagStack.push(p)},a.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===r.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var c=new i.Text(u);this.addNode(c),this.lastNode=c}},a.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},a.prototype.oncdataend=function(){this.lastNode=null},a.prototype.onprocessinginstruction=function(u,l){var c=new i.ProcessingInstruction(u,l);this.addNode(c)},a.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},a.prototype.addNode=function(u){var l=this.tagStack[this.tagStack.length-1],c=l.children[l.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),l.children.push(u),c&&(u.prev=c,c.next=u),u.parent=l,this.lastNode=null},a}();t.DomHandler=s,t.default=s})(Qo);var qc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,n){return e[n.toLowerCase()]=n,e},{})})(qc),Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatAttributes=Gc,ci.formatDOM=Zc;var pi=Qo,FC=qc;function MC(t){return FC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Gc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function kC(t){t=t.toLowerCase();var e=MC(t);return e||t}function Zc(t,e,n){e===void 0&&(e=null);for(var r=[],i,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.nodeType){case 1:{var u=kC(a.nodeName);i=new pi.Element(u,Gc(a.attributes)),i.children=Zc(u==="template"?a.content.childNodes:a.childNodes,i);break}case 3:i=new pi.Text(a.nodeValue);break;case 8:i=new pi.Comment(a.nodeValue);break;default:continue}var l=r[o-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,r.push(i)}return n&&(i=new pi.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),i.next=r[0]||null,i.parent=e,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var TC=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=_C;var IC=TC(Ko),jC=ci,NC=/<(![a-zA-Z\s]+)>/;function _C(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(NC),n=e?e[1]:void 0;return(0,jC.formatDOM)((0,IC.default)(t),null,n)}var hi={},At={},vi={},zC=0;vi.SAME=zC;var WC=1;vi.CAMELCASE=WC,vi.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const Yc=0,tn=1,gi=2,mi=3,rs=4,Kc=5,Xc=6;function UC(t){return ot.hasOwnProperty(t)?ot[t]:null}function dt(t,e,n,r,i,o,s){this.acceptsBooleans=e===gi||e===mi||e===rs,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}const ot={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{ot[t]=new dt(t,Yc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ot[t]=new dt(t,tn,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{ot[t]=new dt(t,gi,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{ot[t]=new dt(t,gi,!1,t,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(t=>{ot[t]=new dt(t,mi,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{ot[t]=new dt(t,mi,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{ot[t]=new dt(t,rs,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{ot[t]=new dt(t,Xc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ot[t]=new dt(t,Kc,!1,t.toLowerCase(),null,!1,!1)});const is=/[\-\:]([a-z])/g,os=t=>t[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ot[t]=new dt(t,tn,!1,t.toLowerCase(),null,!1,!1)});const HC="xlinkHref";ot[HC]=new dt("xlinkHref",tn,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ot[t]=new dt(t,tn,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:RC,SAME:VC,possibleStandardNames:Jc}=vi,qC=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",GC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+qC+"]*$")),ZC=Object.keys(Jc).reduce((t,e)=>{const n=Jc[e];return n===VC?t[e]=e:n===RC?t[e.toLowerCase()]=e:t[e]=n,t},{});At.BOOLEAN=mi,At.BOOLEANISH_STRING=gi,At.NUMERIC=Kc,At.OVERLOADED_BOOLEAN=rs,At.POSITIVE_NUMERIC=Xc,At.RESERVED=Yc,At.STRING=tn,At.getPropertyInfo=UC,At.isCustomAttribute=GC,At.possibleStandardNames=ZC;var ss={},as={},Qc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,YC=/\n/g,KC=/^\s*/,XC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,JC=/^:\s*/,QC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$C=/^[;\s]*/,eD=/^\s+|\s+$/g,tD=`
|
92
|
-
`,$c="/",ef="*",Bn="",nD="comment",rD="declaration",iD=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(y){var v=y.match(YC);v&&(n+=v.length);var d=y.lastIndexOf(tD);r=~d?y.length-d:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new s(y),l(),v}}function s(y){this.start=y,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;function a(y){var v=new Error(e.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=e.source,v.line=n,v.column=r,v.source=t,!e.silent)throw v}function u(y){var v=y.exec(t);if(v){var d=v[0];return i(d),t=t.slice(d.length),v}}function l(){u(KC)}function c(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!($c!=t.charAt(0)||ef!=t.charAt(1))){for(var v=2;Bn!=t.charAt(v)&&(ef!=t.charAt(v)||$c!=t.charAt(v+1));)++v;if(v+=2,Bn===t.charAt(v-1))return a("End of comment missing");var d=t.slice(2,v-2);return r+=2,i(d),t=t.slice(v),r+=2,y({type:nD,comment:d})}}function h(){var y=o(),v=u(XC);if(v){if(p(),!u(JC))return a("property missing ':'");var d=u(QC),D=y({type:rD,property:tf(v[0].replace(Qc,Bn)),value:d?tf(d[0].replace(Qc,Bn)):Bn});return u($C),D}}function g(){var y=[];c(y);for(var v;v=h();)v!==!1&&(y.push(v),c(y));return y}return l(),g()};function tf(t){return t?t.replace(eD,Bn):Bn}var oD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(as,"__esModule",{value:!0}),as.default=aD;var sD=oD(iD);function aD(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,sD.default)(t),i=typeof e=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var yi={};Object.defineProperty(yi,"__esModule",{value:!0}),yi.camelCase=void 0;var uD=/^--[a-zA-Z0-9-]+$/,lD=/-([a-z])/g,cD=/^[^-]+$/,fD=/^-(webkit|moz|ms|o|khtml)-/,dD=/^-(ms)-/,pD=function(t){return!t||cD.test(t)||uD.test(t)},hD=function(t,e){return e.toUpperCase()},nf=function(t,e){return"".concat(e,"-")},vD=function(t,e){return e===void 0&&(e={}),pD(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(dD,nf):t=t.replace(fD,nf),t.replace(lD,hD))};yi.camelCase=vD;var gD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},mD=gD(as),yD=yi;function us(t,e){var n={};return!t||typeof t!="string"||(0,mD.default)(t,function(r,i){r&&i&&(n[(0,yD.camelCase)(r,e)]=i)}),n}us.default=us;var CD=us;(function(t){var e=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=o,t.setStyleProp=a;var n=f,r=e(CD),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(c,p){return c.includes("-")?!i.has(c):!!(p&&typeof p.is=="string")}var s={reactCompat:!0};function a(c,p){if(typeof c=="string"){if(!c.trim()){p.style={};return}try{p.style=(0,r.default)(c,s)}catch{p.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(c){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(c.name)};t.canTextBeChildOfNode=u;var l=function(c){return c};t.returnFirstArg=l})(ss),Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=wD;var hr=At,rf=ss,DD=["checked","value"],ED=["input","select","textarea"],bD={reset:!0,submit:!0};function wD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&bD[t.type]);for(var i in t){var o=t[i];if((0,hr.isCustomAttribute)(i)){n[i]=o;continue}var s=i.toLowerCase(),a=of(s);if(a){var u=(0,hr.getPropertyInfo)(a);switch(DD.includes(a)&&ED.includes(e)&&!r&&(a=of("default"+s)),n[a]=o,u&&u.type){case hr.BOOLEAN:n[a]=!0;break;case hr.OVERLOADED_BOOLEAN:o===""&&(n[a]=!0);break}continue}rf.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=o)}return(0,rf.setStyleProp)(t.style,n),n}function of(t){return hr.possibleStandardNames[t]}var ls={},BD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=sf;var cs=f,xD=BD(hi),vr=ss,SD={cloneElement:cs.cloneElement,createElement:cs.createElement,isValidElement:cs.isValidElement};function sf(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||vr.returnFirstArg,o=e.library||SD,s=o.cloneElement,a=o.createElement,u=o.isValidElement,l=t.length,c=0;c<l;c++){var p=t[c];if(r){var h=e.replace(p,c);if(u(h)){l>1&&(h=s(h,{key:h.key||c})),n.push(i(h,p,c));continue}}if(p.type==="text"){var g=!p.data.trim().length;if(g&&p.parent&&!(0,vr.canTextBeChildOfNode)(p.parent)||e.trim&&g)continue;n.push(i(p.data,p,c));continue}var y=p,v={};AD(y)?((0,vr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,xD.default)(y.attribs,y.name));var d=void 0;switch(p.type){case"script":case"style":p.children[0]&&(v.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?v.defaultValue=p.children[0].data:p.children&&p.children.length&&(d=sf(p.children,e));break;default:continue}l>1&&(v.key=c),n.push(i(a(p.name,v,d),p,c))}return n.length===1?n[0]:n}function AD(t){return vr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,vr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=We&&We.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=a;var n=e(Yo);t.htmlToDOM=n.default;var r=e(hi);t.attributesToProps=r.default;var i=e(ls);t.domToReact=i.default;var o=Qo;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function a(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||s),l):[]}})(Ac);const af=Or(Ac),LD=af.default||af,fs=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(o=>fs(o))}const n=Array.isArray(t.props.children)?e(t.props.children):[{text:t.props.children}],r=typeof t.props.children=="string"?t.props.children:"";switch(t.type){case"p":return{type:"paragraph",children:n};case"blockquote":return{type:"blockQuote",children:n};case"ul":return{type:"bulletedList",children:n};case"h1":return{type:"headingOne",children:n};case"h2":return{type:"headingTwo",children:n};case"li":return{type:"listItem",children:n};case"ol":return{type:"numberedList",children:n};case"strong":return{type:"paragraph",text:r,bold:!0};case"code":return{text:r,code:!0};case"em":return{text:r,italic:!0};case"u":return{text:r,underline:!0};default:return{text:r}}},OD=t=>{const e=LD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:fs(n)):typeof e=="string"?[{text:e}]:[fs(e)]};function uf(t){return t.map(e=>ne.string(e)).join("")}const lf=t=>{if(ce.isText(t)){let e=t.text;return t.bold&&(e=`<strong>${e}</strong>`),t.code&&(e=`<code>${e}</code>`),t.italic&&(e=`<em>${e}</em>`),t.underline&&(e=`<u>${e}</u>`),e}if(ue.isElement(t)){const e=t.children.map(n=>lf(n)).join("");switch(t.type){case"paragraph":return`<p>${e}</p>`;case"blockQuote":return`<blockquote>${e}</blockquote>`;case"bulletedList":return`<ul>${e}</ul>`;case"headingOne":return`<h1>${e}</h1>`;case"headingTwo":return`<h2>${e}</h2>`;case"listItem":return`<li>${e}</li>`;case"numberedList":return`<ol>${e}</ol>`;default:return e}}return""},cf=t=>t.children.map(e=>lf(e)).join(""),ff=t=>/<\/?[a-z][\s\S]*>/i.test(t);function PD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:o,onChange:s,isError:a}){const u=f.useMemo(()=>fm(DC(um())),[]),{id:l,inputRef:c,error:p}=yt(),h=f.useRef(null),g=ff(e)?OD(e):xC,y=uf(g),[v,d]=f.useState(y.length),[D,B]=f.useState(ff(e)?e:""),[b,O]=f.useState(!1),E=c||h,w=a||!!p,A=f.useCallback(wC,[]),F=f.useCallback(bC,[]);function R(T){const N=uf(T);d(N.length),r&&r(N.length),!(n&&N.length>=i)&&(B(cf(u)),s&&s(T),o&&o(cf(u)),u.children=T,Q.setNodes(u,{children:T}))}const P=b?"focusTrue":"focusFalse",I=`arkynRichText ${w||i<v?"errorTrue":"errorFalse"} ${P}`,j=i-v;return x.jsxs(yC,{editor:u,initialValue:g,onChange:R,onValueChange:R,children:[x.jsxs("div",{className:I,children:[x.jsxs(BC,{children:[x.jsx(wn,{format:"headingOne",icon:Se.Heading1}),x.jsx(wn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(wn,{format:"blockQuote",icon:Se.Quote}),x.jsx(oi,{format:"bold",icon:Se.Bold}),x.jsx(oi,{format:"italic",icon:Se.Italic}),x.jsx(oi,{format:"underline",icon:Se.Underline}),x.jsx(oi,{format:"code",icon:Se.Code}),x.jsx(wn,{format:"left",icon:Se.AlignLeft}),x.jsx(wn,{format:"right",icon:Se.AlignRight}),x.jsx(wn,{format:"center",icon:Se.AlignCenter}),x.jsx(wn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(lC,{className:"editorContainer",renderElement:F,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const N in Sc)if(Ph(N,T)){T.preventDefault();const K=Sc[N];xc(u,K)}}}),j<0&&x.jsx("div",{className:"restatesCharacters",children:j})]}),x.jsx("input",{ref:E,type:"hidden",name:t,value:D}),x.jsx("input",{type:"hidden",name:`${t}Count`,value:v})]})}function FD(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:c,onFocus:p,onBlur:h,title:g,style:y,closeOnSelect:v=!0,...d}=t,E=`arkyn_select ${a?"hasPrefix":""} ${s} ${i} ${l||c||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,A={md:20,lg:20}[i];return{isLoading:n,className:E,prefix:Pd(a,A,"prefix"),LeftIcon:u,disabled:l||n||c,onFocus:p,onBlur:h,title:g,closeOnSelect:v,style:y,iconSize:A,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function MD(t){var J;const[e,n]=f.useState(!1),{inputRef:r,id:i,error:o}=yt(),s=f.useRef(null),a=r||s,u=t.isError||!!o,{disabled:l,title:c,style:p,className:h,prefix:g,iconSize:y,isLoading:v,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:b,onBlur:O,Spinner:E,name:w,placeholder:A,onSelect:F,options:R,optionMaxHeight:P,closeOnSelect:z,...I}=FD({...t,id:i,isError:u},e),[j,T]=f.useState(B);function N(){l||!(a!=null&&a.current)||e||(n(!0),a.current.focus())}function K(q){e||(n(!0),b&&b(q))}function _(){n(!1),O&&a.current&&a.current.blur()}function ie(q){const{label:ee,value:Y}=q;T(j!==Y?Y:""),F&&F({label:ee,value:Y}),z&&_()}const re=typeof D=="string"?D:j,k=((J=R.find(q=>q.value===re))==null?void 0:J.label)||"",H=()=>{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:c,style:p,onClick:N,className:`${h} placeholder_dark_${H()}`,children:[g,d&&x.jsx(d,{size:y,strokeWidth:2.5}),x.jsx("input",{disabled:l,readOnly:!0,placeholder:k||A,onFocus:K,...I}),x.jsx("input",{type:"hidden",ref:a,name:w,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[R.map(({label:q,value:ee})=>x.jsxs("div",{onClick:()=>ie({label:q,value:ee}),className:re===ee?"arkyn_select_option active":"arkyn_select_option",children:[q," ",x.jsx(Se.Check,{})]},ee)),R.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&x.jsx(Se.ChevronDown,{className:"arkyn_select_arrow",size:y,strokeWidth:2.5}),v&&E]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function kD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:o="",name:s,className:a="",onCheck:u,...l}=t,[c,p]=f.useState(n),{id:h,inputRef:g}=yt(),y=typeof r=="boolean"?r:c;function v(){p(!c),u&&u(y?o:i||"checked")}const D=`arkynSwitch ${y?"checkedTrue":"checkedFalse"} ${e} ${a}`;return x.jsx("button",{type:"button",onClick:v,className:D,...l,children:x.jsx("input",{id:h,type:"hidden",name:s,ref:g,onClick:v,value:y?i||"checked":o})})}function TD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:o=!1,onFocus:s,onBlur:a,title:u,style:l,...c}=t,[p,h]=f.useState(!1),{inputRef:g,id:y,error:v}=yt(),d=f.useRef(null),D=g||d,b=t.isError||!!v?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${i||o?"opacityTrue":"opacityFalse"} ${b} ${p?"focusedTrue":"focusedFalse"} ${r}`;function A(){i||!(D!=null&&D.current)||(h(!0),D.current.focus())}function F(P){h(!0),s&&s(P)}function R(P){h(!1),a&&a(P)}return x.jsx("section",{title:u,style:l,onClick:A,className:w,children:x.jsx("textarea",{id:y,disabled:i,readOnly:o,ref:D,onFocus:F,onBlur:R,...c})})}function ID(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function jD(t){const{pathname:e}=Ot.useLocation(),{className:n="",disabled:r=!1,children:i,to:o,...s}=t,u=`arkynBreadcrumbLink ${e===o?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]}):x.jsxs(Ot.Link,{to:o,className:u,...s,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ds(t=""){const e=Ot.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=o=>{Object.entries(o).forEach(([s,a])=>{a===void 0?n.delete(`${r}${s}`):n.set(`${r}${s}`,String(a))})};return{getParam:o=>n.get(`${r}${o}`),getScopedSearch:o=>{i(o);let s=n.toString();return s&&(s="?"+s),s}}}function ND(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:o=2,...s}=t,a=Ot.useNavigate(),{getParam:u,getScopedSearch:l}=ds(e),c=Number(u(i))||1,p=Number(u(r))||20,h=Math.ceil(n/p),g=Od(c,o),y=Ld(c,o,h);function v(d){a(l({page:d}))}return x.jsxs("div",{className:"arkynPagination",...s,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:c<=1,onClick:()=>v(c-1),children:x.jsx(Se.ChevronLeft,{})}),c>1+o&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),c>2+o&&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:c}),y.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),c+o<h&&x.jsxs(x.Fragment,{children:[c+1+o<h&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(h),children:h})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:c>=h,onClick:()=>v(c+1),children:x.jsx(Se.ChevronRight,{})})]})}const ps=f.createContext({});function _D(){if(!ps)throw new Error("useTabContext must be used within a TabProvider");return f.useContext(ps)}function zD(t){const{children:e,onClick:n,defaultActive:r,className:i,...o}=t,[s,a]=f.useState(r||""),[u,l]=f.useState(!0),c=f.useRef(null),p=`arkynTabContainer ${i||""}`,[h,g]=f.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const B=d.getBoundingClientRect(),b=c.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-b.left}px`})};f.useEffect(()=>{const d=c.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&y(D)},[]);const v=d=>{const D=d.target;D&&(a(D.value),D.classList.add("activeTrue"),y(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:c,className:p.trim(),...o,children:[x.jsx(ps.Provider,{value:{handleTabClick:v,showInitialTab:u,value:s},children:e}),x.jsx("div",{className:"activeLine",style:h})]})}function WD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:o,showInitialTab:s,handleTabClick:a}=_D(),u=o===i.value&&o?"activeTrue":"activeFalse",c=`arkynTabButton ${o===i.value&&s?"showBorderBottom":""} ${u} ${n}`;function p(h){a(h),r&&r(h)}return x.jsx("button",{onClick:p,className:c.trim(),...i,children:e})}const df=f.createContext({});function UD(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:o,...s}=t,a=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${o}`;return x.jsx(df.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:l.trim(),...s,children:[x.jsx(cn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:i})]})})})}function HD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(df),s=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:o,"aria-label":"Close drawer",children:x.jsx(Se.X,{size:24})})]})}const pf=f.createContext({});function RD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...o}=t,a=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(pf.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:a.trim(),...o,children:[x.jsx(cn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.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 VD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function qD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(pf),s=`arkynModalHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{type:"button",onClick:o,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Se.X,{size:24})})]})}function GD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[o,s]=f.useState(!1),u=`arkynPopover ${i} ${o?"visibleTrue":"visibleFalse"}`;function l(){o||s(!0)}return x.jsxs("div",{className:u,onClick:l,children:[n,x.jsx(cn.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&s(!1),className:"arkynPopoverContent",children:e}),o&&x.jsx("div",{onClick:()=>s(!1),className:"arkynPopoverOverlay"})]})}function ZD(t){const{message:e,title:n,type:r,size:i="lg"}=t,o=`arkynToast ${r} ${i}`;function s(){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("div",{className:o,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(s,{})]}),x.jsxs("p",{children:[x.jsx("strong",{title:n,children:n}),x.jsx("span",{children:e})]})]})}function YD(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:o="",...s}=t,a=`arkynTooltip ${n} ${i} ${o}`;return x.jsxs("div",{className:a.trim(),...s,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var Qe={},hs={},gr={},mr={},hf="Expected a function",vf=NaN,KD="[object Symbol]",XD=/^\s+|\s+$/g,JD=/^[-+]0x[0-9a-f]+$/i,QD=/^0b[01]+$/i,$D=/^0o[0-7]+$/i,eE=parseInt,tE=typeof We=="object"&&We&&We.Object===Object&&We,nE=typeof self=="object"&&self&&self.Object===Object&&self,rE=tE||nE||Function("return this")(),iE=Object.prototype,oE=iE.toString,sE=Math.max,aE=Math.min,vs=function(){return rE.Date.now()};function uE(t,e,n){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(hf);e=gf(e)||0,Ci(n)&&(c=!!n.leading,p="maxWait"in n,o=p?sE(gf(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function g(w){var A=r,F=i;return r=i=void 0,l=w,s=t.apply(F,A),s}function y(w){return l=w,a=setTimeout(D,e),c?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?aE(R,o-F):R}function d(w){var A=w-u,F=w-l;return u===void 0||A>=e||A<0||p&&F>=o}function D(){var w=vs();if(d(w))return B(w);a=setTimeout(D,v(w))}function B(w){return a=void 0,h&&r?g(w):(r=i=void 0,s)}function b(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function O(){return a===void 0?s:B(vs())}function E(){var w=vs(),A=d(w);if(r=arguments,i=this,u=w,A){if(a===void 0)return y(u);if(p)return a=setTimeout(D,e),g(u)}return a===void 0&&(a=setTimeout(D,e)),s}return E.cancel=b,E.flush=O,E}function lE(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(hf);return Ci(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),uE(t,e,{leading:r,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function cE(t){return!!t&&typeof t=="object"}function fE(t){return typeof t=="symbol"||cE(t)&&oE.call(t)==KD}function gf(t){if(typeof t=="number")return t;if(fE(t))return vf;if(Ci(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ci(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(XD,"");var n=QD.test(t);return n||$D.test(t)?eE(t.slice(2),n?2:8):JD.test(t)?vf:+t}var dE=lE,yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),Di.has(n)||Di.set(n,new Set);var o=Di.get(n);if(!o.has(i)){var s=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,u)}catch{}return a}();e.addEventListener(n,r,s?{passive:!0}:!1),o.add(i)}},yr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Di.get(n).delete(r.name||n)};var Di=new Map;Object.defineProperty(mr,"__esModule",{value:!0});var pE=dE,hE=gE(pE),vE=yr;function gE(t){return t&&t.__esModule?t:{default:t}}var mE=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,hE.default)(e,n)},Ye={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=mE(function(i){Ye.scrollHandler(e)},n);Ye.scrollSpyContainers.push(e),(0,vE.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Ye.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=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Ye.currentPositionX(e),Ye.currentPositionY(e))})},addStateHandler:function(e){Ye.spySetState.push(e)},addSpyHandler:function(e,n){var r=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Ye.currentPositionX(n),Ye.currentPositionY(n))},updateStates:function(){Ye.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Ye.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Ye.spySetState&&Ye.spySetState.length&&Ye.spySetState.indexOf(e)>-1&&Ye.spySetState.splice(Ye.spySetState.indexOf(e),1),document.removeEventListener("scroll",Ye.scrollHandler)},update:function(){return Ye.scrollSpyContainers.forEach(function(e){return Ye.scrollHandler(e)})}};mr.default=Ye;var Nn={},Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});var yE=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",o=window&&window.location,s=i?o.pathname+o.search+i:o.pathname+o.search;n?history.pushState(history.state,"",s):history.replaceState(history.state,"",s)},CE=function(){return window.location.hash.replace(/^#/,"")},DE=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},EE=function(e){return getComputedStyle(e).position!=="static"},gs=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}},bE=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(EE(e)){if(n.offsetParent!==e){var i=function(c){return c===e||c===document},o=gs(n,i),s=o.offsetTop,a=o.offsetParent;if(a!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return s}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(c){return c===document};return gs(n,u).offsetTop-gs(e,u).offsetTop};Cr.default={updateHash:yE,getHash:CE,filterElementInContainer:DE,scrollOffset:bE};var Ei={},ms={};Object.defineProperty(ms,"__esModule",{value:!0}),ms.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 ys={};Object.defineProperty(ys,"__esModule",{value:!0});var wE=yr,BE=["mousedown","mousewheel","touchmove","keydown"];ys.default={subscribe:function(e){return typeof document<"u"&&BE.forEach(function(n){return(0,wE.addPassiveEventListener)(document,n,e)})}};var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});var Cs={registered:{},scrollEvent:{register:function(e,n){Cs.registered[e]=n},remove:function(e){Cs.registered[e]=null}}};Dr.default=Cs,Object.defineProperty(Ei,"__esModule",{value:!0});var xE=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},SE=Cr;bi(SE);var AE=ms,mf=bi(AE),LE=ys,OE=bi(LE),PE=Dr,Mt=bi(PE);function bi(t){return t&&t.__esModule?t:{default:t}}var yf=function(e){return mf.default[e.smooth]||mf.default.defaultEasing},FE=function(e){return typeof e=="function"?e:function(){return e}},ME=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Ds=function(){return ME()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Cf=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}},Df=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},Ef=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},kE=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)},TE=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)},IE=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 o=t.bind(null,e,n);Ds.call(window,o);return}Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPosition)},Es=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},Er=function(e,n,r,i){n.data=n.data||Cf(),window.clearTimeout(n.data.delayTimeout);var o=function(){n.data.cancel=!0};if(OE.default.subscribe(o),Es(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Df(n):Ef(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=FE(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 s=yf(n),a=IE.bind(null,s,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),Ds.call(window,a)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},wi=function(e){return e=xE({},e),e.data=e.data||Cf(),e.absolute=!0,e},jE=function(e){Er(0,wi(e))},NE=function(e,n){Er(e,wi(n))},_E=function(e){e=wi(e),Es(e),Er(e.horizontal?kE(e):TE(e),e)},zE=function(e,n){n=wi(n),Es(n);var r=n.horizontal?Df(n):Ef(n);Er(e+r,n)};Ei.default={animateTopScroll:Er,getAnimationType:yf,scrollToTop:jE,scrollToBottom:_E,scrollTo:NE,scrollMore:zE},Object.defineProperty(Nn,"__esModule",{value:!0});var WE=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},UE=Cr,HE=bs(UE),RE=Ei,VE=bs(RE),qE=Dr,Bi=bs(qE);function bs(t){return t&&t.__esModule?t:{default:t}}var xi={},bf=void 0;Nn.default={unmount:function(){xi={}},register:function(e,n){xi[e]=n},unregister:function(e){delete xi[e]},get:function(e){return xi[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return bf=e},getActiveLink:function(){return bf},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=WE({},n,{absolute:!1});var i=n.containerId,o=n.container,s=void 0;i?s=document.getElementById(i):o&&o.nodeType?s=o:s=document,n.absolute=!0;var a=n.horizontal,u=HE.default.scrollOffset(s,r,a)+(n.offset||0);if(!n.smooth){Bi.default.registered.begin&&Bi.default.registered.begin(e,r),s===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):s.scrollTop=u,Bi.default.registered.end&&Bi.default.registered.end(e,r);return}VE.default.animateTopScroll(u,n,e,r)}};var ws={exports:{}},Si={exports:{}},_e={};/** @license React v16.13.1
|
92
|
+
`,$c="/",ef="*",Bn="",nD="comment",rD="declaration",iD=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(y){var v=y.match(YC);v&&(n+=v.length);var d=y.lastIndexOf(tD);r=~d?y.length-d:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new s(y),l(),v}}function s(y){this.start=y,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;function a(y){var v=new Error(e.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=e.source,v.line=n,v.column=r,v.source=t,!e.silent)throw v}function u(y){var v=y.exec(t);if(v){var d=v[0];return i(d),t=t.slice(d.length),v}}function l(){u(KC)}function c(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!($c!=t.charAt(0)||ef!=t.charAt(1))){for(var v=2;Bn!=t.charAt(v)&&(ef!=t.charAt(v)||$c!=t.charAt(v+1));)++v;if(v+=2,Bn===t.charAt(v-1))return a("End of comment missing");var d=t.slice(2,v-2);return r+=2,i(d),t=t.slice(v),r+=2,y({type:nD,comment:d})}}function h(){var y=o(),v=u(XC);if(v){if(p(),!u(JC))return a("property missing ':'");var d=u(QC),D=y({type:rD,property:tf(v[0].replace(Qc,Bn)),value:d?tf(d[0].replace(Qc,Bn)):Bn});return u($C),D}}function g(){var y=[];c(y);for(var v;v=h();)v!==!1&&(y.push(v),c(y));return y}return l(),g()};function tf(t){return t?t.replace(eD,Bn):Bn}var oD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(as,"__esModule",{value:!0}),as.default=aD;var sD=oD(iD);function aD(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,sD.default)(t),i=typeof e=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var yi={};Object.defineProperty(yi,"__esModule",{value:!0}),yi.camelCase=void 0;var uD=/^--[a-zA-Z0-9-]+$/,lD=/-([a-z])/g,cD=/^[^-]+$/,fD=/^-(webkit|moz|ms|o|khtml)-/,dD=/^-(ms)-/,pD=function(t){return!t||cD.test(t)||uD.test(t)},hD=function(t,e){return e.toUpperCase()},nf=function(t,e){return"".concat(e,"-")},vD=function(t,e){return e===void 0&&(e={}),pD(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(dD,nf):t=t.replace(fD,nf),t.replace(lD,hD))};yi.camelCase=vD;var gD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},mD=gD(as),yD=yi;function us(t,e){var n={};return!t||typeof t!="string"||(0,mD.default)(t,function(r,i){r&&i&&(n[(0,yD.camelCase)(r,e)]=i)}),n}us.default=us;var CD=us;(function(t){var e=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=o,t.setStyleProp=a;var n=f,r=e(CD),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(c,p){return c.includes("-")?!i.has(c):!!(p&&typeof p.is=="string")}var s={reactCompat:!0};function a(c,p){if(typeof c=="string"){if(!c.trim()){p.style={};return}try{p.style=(0,r.default)(c,s)}catch{p.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(c){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(c.name)};t.canTextBeChildOfNode=u;var l=function(c){return c};t.returnFirstArg=l})(ss),Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=wD;var hr=At,rf=ss,DD=["checked","value"],ED=["input","select","textarea"],bD={reset:!0,submit:!0};function wD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&bD[t.type]);for(var i in t){var o=t[i];if((0,hr.isCustomAttribute)(i)){n[i]=o;continue}var s=i.toLowerCase(),a=of(s);if(a){var u=(0,hr.getPropertyInfo)(a);switch(DD.includes(a)&&ED.includes(e)&&!r&&(a=of("default"+s)),n[a]=o,u&&u.type){case hr.BOOLEAN:n[a]=!0;break;case hr.OVERLOADED_BOOLEAN:o===""&&(n[a]=!0);break}continue}rf.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=o)}return(0,rf.setStyleProp)(t.style,n),n}function of(t){return hr.possibleStandardNames[t]}var ls={},BD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=sf;var cs=f,xD=BD(hi),vr=ss,SD={cloneElement:cs.cloneElement,createElement:cs.createElement,isValidElement:cs.isValidElement};function sf(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||vr.returnFirstArg,o=e.library||SD,s=o.cloneElement,a=o.createElement,u=o.isValidElement,l=t.length,c=0;c<l;c++){var p=t[c];if(r){var h=e.replace(p,c);if(u(h)){l>1&&(h=s(h,{key:h.key||c})),n.push(i(h,p,c));continue}}if(p.type==="text"){var g=!p.data.trim().length;if(g&&p.parent&&!(0,vr.canTextBeChildOfNode)(p.parent)||e.trim&&g)continue;n.push(i(p.data,p,c));continue}var y=p,v={};AD(y)?((0,vr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,xD.default)(y.attribs,y.name));var d=void 0;switch(p.type){case"script":case"style":p.children[0]&&(v.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?v.defaultValue=p.children[0].data:p.children&&p.children.length&&(d=sf(p.children,e));break;default:continue}l>1&&(v.key=c),n.push(i(a(p.name,v,d),p,c))}return n.length===1?n[0]:n}function AD(t){return vr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,vr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=We&&We.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=a;var n=e(Yo);t.htmlToDOM=n.default;var r=e(hi);t.attributesToProps=r.default;var i=e(ls);t.domToReact=i.default;var o=Qo;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function a(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||s),l):[]}})(Ac);const af=Or(Ac),LD=af.default||af,fs=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(o=>fs(o))}const n=Array.isArray(t.props.children)?e(t.props.children):[{text:t.props.children}],r=typeof t.props.children=="string"?t.props.children:"";switch(t.type){case"p":return{type:"paragraph",children:n};case"blockquote":return{type:"blockQuote",children:n};case"ul":return{type:"bulletedList",children:n};case"h1":return{type:"headingOne",children:n};case"h2":return{type:"headingTwo",children:n};case"li":return{type:"listItem",children:n};case"ol":return{type:"numberedList",children:n};case"strong":return{type:"paragraph",text:r,bold:!0};case"code":return{text:r,code:!0};case"em":return{text:r,italic:!0};case"u":return{text:r,underline:!0};default:return{text:r}}},OD=t=>{const e=LD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:fs(n)):typeof e=="string"?[{text:e}]:[fs(e)]};function uf(t){return t.map(e=>ne.string(e)).join("")}const lf=t=>{if(ce.isText(t)){let e=t.text;return t.bold&&(e=`<strong>${e}</strong>`),t.code&&(e=`<code>${e}</code>`),t.italic&&(e=`<em>${e}</em>`),t.underline&&(e=`<u>${e}</u>`),e}if(ue.isElement(t)){const e=t.children.map(n=>lf(n)).join("");switch(t.type){case"paragraph":return`<p>${e}</p>`;case"blockQuote":return`<blockquote>${e}</blockquote>`;case"bulletedList":return`<ul>${e}</ul>`;case"headingOne":return`<h1>${e}</h1>`;case"headingTwo":return`<h2>${e}</h2>`;case"listItem":return`<li>${e}</li>`;case"numberedList":return`<ol>${e}</ol>`;default:return e}}return""},cf=t=>t.children.map(e=>lf(e)).join(""),ff=t=>/<\/?[a-z][\s\S]*>/i.test(t);function PD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:o,onChange:s,isError:a}){const u=f.useMemo(()=>fm(DC(um())),[]),{id:l,inputRef:c,error:p}=yt(),h=f.useRef(null),g=ff(e)?OD(e):xC,y=uf(g),[v,d]=f.useState(y.length),[D,B]=f.useState(ff(e)?e:""),[b,O]=f.useState(!1),E=c||h,w=a||!!p,A=f.useCallback(wC,[]),F=f.useCallback(bC,[]);function R(T){const N=uf(T);d(N.length),r&&r(N.length),!(n&&N.length>=i)&&(B(cf(u)),s&&s(T),o&&o(cf(u)),u.children=T,Q.setNodes(u,{children:T}))}const P=b?"focusTrue":"focusFalse",I=`arkynRichText ${w||i<v?"errorTrue":"errorFalse"} ${P}`,j=i-v;return x.jsxs(yC,{editor:u,initialValue:g,onChange:R,onValueChange:R,children:[x.jsxs("div",{className:I,children:[x.jsxs(BC,{children:[x.jsx(wn,{format:"headingOne",icon:Oe.Heading1}),x.jsx(wn,{format:"headingTwo",icon:Oe.Heading2}),x.jsx(wn,{format:"blockQuote",icon:Oe.Quote}),x.jsx(oi,{format:"bold",icon:Oe.Bold}),x.jsx(oi,{format:"italic",icon:Oe.Italic}),x.jsx(oi,{format:"underline",icon:Oe.Underline}),x.jsx(oi,{format:"code",icon:Oe.Code}),x.jsx(wn,{format:"left",icon:Oe.AlignLeft}),x.jsx(wn,{format:"right",icon:Oe.AlignRight}),x.jsx(wn,{format:"center",icon:Oe.AlignCenter}),x.jsx(wn,{format:"justify",icon:Oe.AlignJustify})]}),x.jsx(lC,{className:"editorContainer",renderElement:F,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const N in Sc)if(Ph(N,T)){T.preventDefault();const K=Sc[N];xc(u,K)}}}),j<0&&x.jsx("div",{className:"restatesCharacters",children:j})]}),x.jsx("input",{ref:E,type:"hidden",name:t,value:D}),x.jsx("input",{type:"hidden",name:`${t}Count`,value:v})]})}function FD(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:c,onFocus:p,onBlur:h,title:g,style:y,closeOnSelect:v=!0,...d}=t,E=`arkyn_select ${a?"hasPrefix":""} ${s} ${i} ${l||c||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,A={md:20,lg:20}[i];return{isLoading:n,className:E,prefix:Pd(a,A,"prefix"),LeftIcon:u,disabled:l||n||c,onFocus:p,onBlur:h,title:g,closeOnSelect:v,style:y,iconSize:A,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function MD(t){var J;const[e,n]=f.useState(!1),{inputRef:r,id:i,error:o}=yt(),s=f.useRef(null),a=r||s,u=t.isError||!!o,{disabled:l,title:c,style:p,className:h,prefix:g,iconSize:y,isLoading:v,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:b,onBlur:O,Spinner:E,name:w,placeholder:A,onSelect:F,options:R,optionMaxHeight:P,closeOnSelect:z,...I}=FD({...t,id:i,isError:u},e),[j,T]=f.useState(B);function N(){l||!(a!=null&&a.current)||e||(n(!0),a.current.focus())}function K(q){e||(n(!0),b&&b(q))}function _(){n(!1),O&&a.current&&a.current.blur()}function ie(q){const{label:ee,value:Y}=q;T(j!==Y?Y:""),F&&F({label:ee,value:Y}),z&&_()}const re=typeof D=="string"?D:j,k=((J=R.find(q=>q.value===re))==null?void 0:J.label)||"",H=()=>{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:c,style:p,onClick:N,className:`${h} placeholder_dark_${H()}`,children:[g,d&&x.jsx(d,{size:y,strokeWidth:2.5}),x.jsx("input",{disabled:l,readOnly:!0,placeholder:k||A,onFocus:K,...I}),x.jsx("input",{type:"hidden",ref:a,name:w,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[R.map(({label:q,value:ee})=>x.jsxs("div",{onClick:()=>ie({label:q,value:ee}),className:re===ee?"arkyn_select_option active":"arkyn_select_option",children:[q," ",x.jsx(Oe.Check,{})]},ee)),R.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&x.jsx(Oe.ChevronDown,{className:"arkyn_select_arrow",size:y,strokeWidth:2.5}),v&&E]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function kD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:o="",name:s,className:a="",onCheck:u,...l}=t,[c,p]=f.useState(n),{id:h,inputRef:g}=yt(),y=typeof r=="boolean"?r:c;function v(){p(!c),u&&u(y?o:i||"checked")}const D=`arkynSwitch ${y?"checkedTrue":"checkedFalse"} ${e} ${a}`;return x.jsx("button",{type:"button",onClick:v,className:D,...l,children:x.jsx("input",{id:h,type:"hidden",name:s,ref:g,onClick:v,value:y?i||"checked":o})})}function TD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:o=!1,onFocus:s,onBlur:a,title:u,style:l,...c}=t,[p,h]=f.useState(!1),{inputRef:g,id:y,error:v}=yt(),d=f.useRef(null),D=g||d,b=t.isError||!!v?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${i||o?"opacityTrue":"opacityFalse"} ${b} ${p?"focusedTrue":"focusedFalse"} ${r}`;function A(){i||!(D!=null&&D.current)||(h(!0),D.current.focus())}function F(P){h(!0),s&&s(P)}function R(P){h(!1),a&&a(P)}return x.jsx("section",{title:u,style:l,onClick:A,className:w,children:x.jsx("textarea",{id:y,disabled:i,readOnly:o,ref:D,onFocus:F,onBlur:R,...c})})}function ID(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function jD(t){const{pathname:e}=Ot.useLocation(),{className:n="",disabled:r=!1,children:i,to:o,...s}=t,u=`arkynBreadcrumbLink ${e===o?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Oe.ChevronRight,{size:14,strokeWidth:2.5}),i]}):x.jsxs(Ot.Link,{to:o,className:u,...s,children:[x.jsx(Oe.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ds(t=""){const e=Ot.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=o=>{Object.entries(o).forEach(([s,a])=>{a===void 0?n.delete(`${r}${s}`):n.set(`${r}${s}`,String(a))})};return{getParam:o=>n.get(`${r}${o}`),getScopedSearch:o=>{i(o);let s=n.toString();return s&&(s="?"+s),s}}}function ND(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:o=2,...s}=t,a=Ot.useNavigate(),{getParam:u,getScopedSearch:l}=ds(e),c=Number(u(i))||1,p=Number(u(r))||20,h=Math.ceil(n/p),g=Od(c,o),y=Ld(c,o,h);function v(d){a(l({page:d}))}return x.jsxs("div",{className:"arkynPagination",...s,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:c<=1,onClick:()=>v(c-1),children:x.jsx(Oe.ChevronLeft,{})}),c>1+o&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),c>2+o&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Oe.Ellipsis,{})})]}),g.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),x.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:c}),y.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),c+o<h&&x.jsxs(x.Fragment,{children:[c+1+o<h&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Oe.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(h),children:h})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:c>=h,onClick:()=>v(c+1),children:x.jsx(Oe.ChevronRight,{})})]})}const ps=f.createContext({});function _D(){if(!ps)throw new Error("useTabContext must be used within a TabProvider");return f.useContext(ps)}function zD(t){const{children:e,onClick:n,defaultActive:r,className:i,...o}=t,[s,a]=f.useState(r||""),[u,l]=f.useState(!0),c=f.useRef(null),p=`arkynTabContainer ${i||""}`,[h,g]=f.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const B=d.getBoundingClientRect(),b=c.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-b.left}px`})};f.useEffect(()=>{const d=c.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&y(D)},[]);const v=d=>{const D=d.target;D&&(a(D.value),D.classList.add("activeTrue"),y(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:c,className:p.trim(),...o,children:[x.jsx(ps.Provider,{value:{handleTabClick:v,showInitialTab:u,value:s},children:e}),x.jsx("div",{className:"activeLine",style:h})]})}function WD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:o,showInitialTab:s,handleTabClick:a}=_D(),u=o===i.value&&o?"activeTrue":"activeFalse",c=`arkynTabButton ${o===i.value&&s?"showBorderBottom":""} ${u} ${n}`;function p(h){a(h),r&&r(h)}return x.jsx("button",{onClick:p,className:c.trim(),...i,children:e})}const df=f.createContext({});function UD(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:o,...s}=t,a=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${o}`;return x.jsx(df.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:l.trim(),...s,children:[x.jsx(cn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:i})]})})})}function HD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(df),s=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:o,"aria-label":"Close drawer",children:x.jsx(Oe.X,{size:24})})]})}const pf=f.createContext({});function RD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...o}=t,a=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(pf.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:a.trim(),...o,children:[x.jsx(cn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.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 VD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function qD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(pf),s=`arkynModalHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{type:"button",onClick:o,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Oe.X,{size:24})})]})}function GD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[o,s]=f.useState(!1),u=`arkynPopover ${i} ${o?"visibleTrue":"visibleFalse"}`;function l(){o||s(!0)}return x.jsxs("div",{className:u,onClick:l,children:[n,x.jsx(cn.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&s(!1),className:"arkynPopoverContent",children:e}),o&&x.jsx("div",{onClick:()=>s(!1),className:"arkynPopoverOverlay"})]})}function ZD(t){const{message:e,type:n}=t,r=`arkynToast ${n}}`;function i(){switch(n){case"success":return x.jsx(Oe.CheckCircle2,{});case"danger":return x.jsx(Oe.XCircle,{});default:return x.jsx(Oe.Info,{})}}return x.jsxs("div",{className:r,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(i,{})]}),x.jsx("p",{children:x.jsx("span",{children:e})})]})}function YD(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:o="",...s}=t,a=`arkynTooltip ${n} ${i} ${o}`;return x.jsxs("div",{className:a.trim(),...s,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var Qe={},hs={},gr={},mr={},hf="Expected a function",vf=NaN,KD="[object Symbol]",XD=/^\s+|\s+$/g,JD=/^[-+]0x[0-9a-f]+$/i,QD=/^0b[01]+$/i,$D=/^0o[0-7]+$/i,eE=parseInt,tE=typeof We=="object"&&We&&We.Object===Object&&We,nE=typeof self=="object"&&self&&self.Object===Object&&self,rE=tE||nE||Function("return this")(),iE=Object.prototype,oE=iE.toString,sE=Math.max,aE=Math.min,vs=function(){return rE.Date.now()};function uE(t,e,n){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(hf);e=gf(e)||0,Ci(n)&&(c=!!n.leading,p="maxWait"in n,o=p?sE(gf(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function g(w){var A=r,F=i;return r=i=void 0,l=w,s=t.apply(F,A),s}function y(w){return l=w,a=setTimeout(D,e),c?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?aE(R,o-F):R}function d(w){var A=w-u,F=w-l;return u===void 0||A>=e||A<0||p&&F>=o}function D(){var w=vs();if(d(w))return B(w);a=setTimeout(D,v(w))}function B(w){return a=void 0,h&&r?g(w):(r=i=void 0,s)}function b(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function O(){return a===void 0?s:B(vs())}function E(){var w=vs(),A=d(w);if(r=arguments,i=this,u=w,A){if(a===void 0)return y(u);if(p)return a=setTimeout(D,e),g(u)}return a===void 0&&(a=setTimeout(D,e)),s}return E.cancel=b,E.flush=O,E}function lE(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(hf);return Ci(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),uE(t,e,{leading:r,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function cE(t){return!!t&&typeof t=="object"}function fE(t){return typeof t=="symbol"||cE(t)&&oE.call(t)==KD}function gf(t){if(typeof t=="number")return t;if(fE(t))return vf;if(Ci(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ci(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(XD,"");var n=QD.test(t);return n||$D.test(t)?eE(t.slice(2),n?2:8):JD.test(t)?vf:+t}var dE=lE,yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),Di.has(n)||Di.set(n,new Set);var o=Di.get(n);if(!o.has(i)){var s=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,u)}catch{}return a}();e.addEventListener(n,r,s?{passive:!0}:!1),o.add(i)}},yr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Di.get(n).delete(r.name||n)};var Di=new Map;Object.defineProperty(mr,"__esModule",{value:!0});var pE=dE,hE=gE(pE),vE=yr;function gE(t){return t&&t.__esModule?t:{default:t}}var mE=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,hE.default)(e,n)},Ye={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=mE(function(i){Ye.scrollHandler(e)},n);Ye.scrollSpyContainers.push(e),(0,vE.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Ye.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=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Ye.currentPositionX(e),Ye.currentPositionY(e))})},addStateHandler:function(e){Ye.spySetState.push(e)},addSpyHandler:function(e,n){var r=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Ye.currentPositionX(n),Ye.currentPositionY(n))},updateStates:function(){Ye.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Ye.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Ye.spySetState&&Ye.spySetState.length&&Ye.spySetState.indexOf(e)>-1&&Ye.spySetState.splice(Ye.spySetState.indexOf(e),1),document.removeEventListener("scroll",Ye.scrollHandler)},update:function(){return Ye.scrollSpyContainers.forEach(function(e){return Ye.scrollHandler(e)})}};mr.default=Ye;var Nn={},Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});var yE=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",o=window&&window.location,s=i?o.pathname+o.search+i:o.pathname+o.search;n?history.pushState(history.state,"",s):history.replaceState(history.state,"",s)},CE=function(){return window.location.hash.replace(/^#/,"")},DE=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},EE=function(e){return getComputedStyle(e).position!=="static"},gs=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}},bE=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(EE(e)){if(n.offsetParent!==e){var i=function(c){return c===e||c===document},o=gs(n,i),s=o.offsetTop,a=o.offsetParent;if(a!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return s}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(c){return c===document};return gs(n,u).offsetTop-gs(e,u).offsetTop};Cr.default={updateHash:yE,getHash:CE,filterElementInContainer:DE,scrollOffset:bE};var Ei={},ms={};Object.defineProperty(ms,"__esModule",{value:!0}),ms.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 ys={};Object.defineProperty(ys,"__esModule",{value:!0});var wE=yr,BE=["mousedown","mousewheel","touchmove","keydown"];ys.default={subscribe:function(e){return typeof document<"u"&&BE.forEach(function(n){return(0,wE.addPassiveEventListener)(document,n,e)})}};var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});var Cs={registered:{},scrollEvent:{register:function(e,n){Cs.registered[e]=n},remove:function(e){Cs.registered[e]=null}}};Dr.default=Cs,Object.defineProperty(Ei,"__esModule",{value:!0});var xE=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},SE=Cr;bi(SE);var AE=ms,mf=bi(AE),LE=ys,OE=bi(LE),PE=Dr,Mt=bi(PE);function bi(t){return t&&t.__esModule?t:{default:t}}var yf=function(e){return mf.default[e.smooth]||mf.default.defaultEasing},FE=function(e){return typeof e=="function"?e:function(){return e}},ME=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Ds=function(){return ME()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Cf=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}},Df=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},Ef=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},kE=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)},TE=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)},IE=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 o=t.bind(null,e,n);Ds.call(window,o);return}Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPosition)},Es=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},Er=function(e,n,r,i){n.data=n.data||Cf(),window.clearTimeout(n.data.delayTimeout);var o=function(){n.data.cancel=!0};if(OE.default.subscribe(o),Es(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Df(n):Ef(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=FE(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 s=yf(n),a=IE.bind(null,s,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),Ds.call(window,a)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},wi=function(e){return e=xE({},e),e.data=e.data||Cf(),e.absolute=!0,e},jE=function(e){Er(0,wi(e))},NE=function(e,n){Er(e,wi(n))},_E=function(e){e=wi(e),Es(e),Er(e.horizontal?kE(e):TE(e),e)},zE=function(e,n){n=wi(n),Es(n);var r=n.horizontal?Df(n):Ef(n);Er(e+r,n)};Ei.default={animateTopScroll:Er,getAnimationType:yf,scrollToTop:jE,scrollToBottom:_E,scrollTo:NE,scrollMore:zE},Object.defineProperty(Nn,"__esModule",{value:!0});var WE=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},UE=Cr,HE=bs(UE),RE=Ei,VE=bs(RE),qE=Dr,Bi=bs(qE);function bs(t){return t&&t.__esModule?t:{default:t}}var xi={},bf=void 0;Nn.default={unmount:function(){xi={}},register:function(e,n){xi[e]=n},unregister:function(e){delete xi[e]},get:function(e){return xi[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return bf=e},getActiveLink:function(){return bf},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=WE({},n,{absolute:!1});var i=n.containerId,o=n.container,s=void 0;i?s=document.getElementById(i):o&&o.nodeType?s=o:s=document,n.absolute=!0;var a=n.horizontal,u=HE.default.scrollOffset(s,r,a)+(n.offset||0);if(!n.smooth){Bi.default.registered.begin&&Bi.default.registered.begin(e,r),s===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):s.scrollTop=u,Bi.default.registered.end&&Bi.default.registered.end(e,r);return}VE.default.animateTopScroll(u,n,e,r)}};var ws={exports:{}},Si={exports:{}},_e={};/** @license React v16.13.1
|
93
93
|
* react-is.production.min.js
|
94
94
|
*
|
95
95
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -108,7 +108,7 @@ object-assign
|
|
108
108
|
(c) Sindre Sorhus
|
109
109
|
@license MIT
|
110
110
|
*/var Bs,Af;function YE(){if(Af)return Bs;Af=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Bs=i()?Object.assign:function(o,s){for(var a,u=r(o),l,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var p in a)e.call(a,p)&&(u[p]=a[p]);if(t){l=t(a);for(var h=0;h<l.length;h++)n.call(a,l[h])&&(u[l[h]]=a[l[h]])}}return u},Bs}var xs,Lf;function Ss(){if(Lf)return xs;Lf=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xs=t,xs}var As,Of;function Pf(){return Of||(Of=1,As=Function.call.bind(Object.prototype.hasOwnProperty)),As}var Ls,Ff;function KE(){if(Ff)return Ls;Ff=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Ss(),n={},r=Pf();t=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,u,l){if(process.env.NODE_ENV!=="production"){for(var c in o)if(r(o,c)){var p;try{if(typeof o[c]!="function"){var h=Error((u||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=o[c](s,c,u,a,null,e)}catch(y){p=y}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in n)){n[p.message]=!0;var g=l?l():"";t("Failed "+a+" type: "+p.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ls=i,Ls}var Os,Mf;function XE(){if(Mf)return Os;Mf=1;var t=Sf(),e=YE(),n=Ss(),r=Pf(),i=KE(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Os=function(a,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function p(k){var H=k&&(l&&k[l]||k[c]);if(typeof H=="function")return H}var h="<<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:b,element:O(),elementType:E(),instanceOf:w,node:P(),objectOf:F,oneOf:A,oneOfType:R,shape:I,exact:j};function y(k,H){return k===H?k!==0||1/k===1/H:k!==k&&H!==H}function v(k,H){this.message=k,this.data=H&&typeof H=="object"?H:{},this.stack=""}v.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var H={},J=0;function q(Y,C,W,U,M,X,te){if(U=U||h,X=X||W,te!==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 le=U+":"+W;!H[le]&&J<3&&(o("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+U+"`. 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."),H[le]=!0,J++)}}return C[W]==null?Y?C[W]===null?new v("The "+M+" `"+X+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new v("The "+M+" `"+X+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:k(C,W,U,M,X)}var ee=q.bind(null,!1);return ee.isRequired=q.bind(null,!0),ee}function D(k){function H(J,q,ee,Y,C,W){var U=J[q],M=K(U);if(M!==k){var X=_(U);return new v("Invalid "+Y+" `"+C+"` of type "+("`"+X+"` supplied to `"+ee+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(H)}function B(){return d(s)}function b(k){function H(J,q,ee,Y,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var W=J[q];if(!Array.isArray(W)){var U=K(W);return new v("Invalid "+Y+" `"+C+"` of type "+("`"+U+"` supplied to `"+ee+"`, expected an array."))}for(var M=0;M<W.length;M++){var X=k(W,M,ee,Y,C+"["+M+"]",n);if(X instanceof Error)return X}return null}return d(H)}function O(){function k(H,J,q,ee,Y){var C=H[J];if(!a(C)){var W=K(C);return new v("Invalid "+ee+" `"+Y+"` of type "+("`"+W+"` supplied to `"+q+"`, expected a single ReactElement."))}return null}return d(k)}function E(){function k(H,J,q,ee,Y){var C=H[J];if(!t.isValidElementType(C)){var W=K(C);return new v("Invalid "+ee+" `"+Y+"` of type "+("`"+W+"` supplied to `"+q+"`, expected a single ReactElement type."))}return null}return d(k)}function w(k){function H(J,q,ee,Y,C){if(!(J[q]instanceof k)){var W=k.name||h,U=re(J[q]);return new v("Invalid "+Y+" `"+C+"` of type "+("`"+U+"` supplied to `"+ee+"`, expected ")+("instance of `"+W+"`."))}return null}return d(H)}function A(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function H(J,q,ee,Y,C){for(var W=J[q],U=0;U<k.length;U++)if(y(W,k[U]))return null;var M=JSON.stringify(k,function(te,G){var le=_(G);return le==="symbol"?String(G):G});return new v("Invalid "+Y+" `"+C+"` of value `"+String(W)+"` "+("supplied to `"+ee+"`, expected one of "+M+"."))}return d(H)}function F(k){function H(J,q,ee,Y,C){if(typeof k!="function")return new v("Property `"+C+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var W=J[q],U=K(W);if(U!=="object")return new v("Invalid "+Y+" `"+C+"` of type "+("`"+U+"` supplied to `"+ee+"`, expected an object."));for(var M in W)if(r(W,M)){var X=k(W,M,ee,Y,C+"."+M,n);if(X instanceof Error)return X}return null}return d(H)}function R(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var H=0;H<k.length;H++){var J=k[H];if(typeof J!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ie(J)+" at index "+H+"."),s}function q(ee,Y,C,W,U){for(var M=[],X=0;X<k.length;X++){var te=k[X],G=te(ee,Y,C,W,U,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&M.push(G.data.expectedType)}var le=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new v("Invalid "+W+" `"+U+"` supplied to "+("`"+C+"`"+le+"."))}return d(q)}function P(){function k(H,J,q,ee,Y){return T(H[J])?null:new v("Invalid "+ee+" `"+Y+"` supplied to "+("`"+q+"`, expected a ReactNode."))}return d(k)}function z(k,H,J,q,ee){return new v((k||"React class")+": "+H+" type `"+J+"."+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function I(k){function H(J,q,ee,Y,C){var W=J[q],U=K(W);if(U!=="object")return new v("Invalid "+Y+" `"+C+"` of type `"+U+"` "+("supplied to `"+ee+"`, expected `object`."));for(var M in k){var X=k[M];if(typeof X!="function")return z(ee,Y,C,M,_(X));var te=X(W,M,ee,Y,C+"."+M,n);if(te)return te}return null}return d(H)}function j(k){function H(J,q,ee,Y,C){var W=J[q],U=K(W);if(U!=="object")return new v("Invalid "+Y+" `"+C+"` of type `"+U+"` "+("supplied to `"+ee+"`, expected `object`."));var M=e({},J[q],k);for(var X in M){var te=k[X];if(r(k,X)&&typeof te!="function")return z(ee,Y,C,X,_(te));if(!te)return new v("Invalid "+Y+" `"+C+"` key `"+X+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(J[q],null," ")+`
|
111
|
-
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var G=te(W,X,ee,Y,C+"."+X,n);if(G)return G}return null}return d(H)}function T(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(T);if(k===null||a(k))return!0;var H=p(k);if(H){var J=H.call(k),q;if(H!==k.entries){for(;!(q=J.next()).done;)if(!T(q.value))return!1}else for(;!(q=J.next()).done;){var ee=q.value;if(ee&&!T(ee[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,H){return k==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function K(k){var H=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(H,k)?"symbol":H}function _(k){if(typeof k>"u"||k===null)return""+k;var H=K(k);if(H==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return H}function ie(k){var H=_(k);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function re(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Os}var Ps,kf;function JE(){if(kf)return Ps;kf=1;var t=Ss();function e(){}function n(){}return n.resetWarningCache=e,Ps=function(){function r(s,a,u,l,c,p){if(p!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var o={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 o.PropTypes=o,o},Ps}if(process.env.NODE_ENV!=="production"){var QE=Sf(),$E=!0;ws.exports=XE()(QE.isElement,$E)}else ws.exports=JE()();var Ai=ws.exports,Li={};Object.defineProperty(Li,"__esModule",{value:!0});var eb=Cr,Fs=tb(eb);function tb(t){return t&&t.__esModule?t:{default:t}}var nb={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 o=this.containers[e]||document;r.scrollTo(e,{container:o})}},getHash:function(){return Fs.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Fs.default.getHash()!==e&&Fs.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Li.default=nb,Object.defineProperty(gr,"__esModule",{value:!0});var Oi=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},rb=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}}(),ib=f,Tf=br(ib),ob=mr,Pi=br(ob),sb=Nn,ab=br(sb),ub=Ai,qe=br(ub),lb=Li,nn=br(lb);function br(t){return t&&t.__esModule?t:{default:t}}function cb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fb(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 db(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 If={to:qe.default.string.isRequired,containerId:qe.default.string,container:qe.default.object,activeClass:qe.default.string,activeStyle:qe.default.object,spy:qe.default.bool,horizontal:qe.default.bool,smooth:qe.default.oneOfType([qe.default.bool,qe.default.string]),offset:qe.default.number,delay:qe.default.number,isDynamic:qe.default.bool,onClick:qe.default.func,duration:qe.default.oneOfType([qe.default.number,qe.default.func]),absolute:qe.default.bool,onSetActive:qe.default.func,onSetInactive:qe.default.func,ignoreCancelEvents:qe.default.bool,hashSpy:qe.default.bool,saveHashHistory:qe.default.bool,spyThrottle:qe.default.number};gr.default=function(t,e){var n=e||ab.default,r=function(o){db(s,o);function s(a){cb(this,s);var u=fb(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return i.call(u),u.state={active:!1},u}return rb(s,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,l=this.props.container;return u&&!l?document.getElementById(u):l&&l.nodeType?l:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Pi.default.isMounted(u)||Pi.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(nn.default.isMounted()||nn.default.mount(n),nn.default.mapContainer(this.props.to,u)),Pi.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Pi.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 l={};this.state&&this.state.active?l=Oi({},this.props.style,this.props.activeStyle):l=Oi({},this.props.style);var c=Oi({},this.props);for(var p in If)c.hasOwnProperty(p)&&delete c[p];return c.className=u,c.style=l,c.onClick=this.handleClick,Tf.default.createElement(t,c)}}]),s}(Tf.default.PureComponent),i=function(){var s=this;this.scrollTo=function(a,u){n.scrollTo(a,Oi({},s.state,u))},this.handleClick=function(a){s.props.onClick&&s.props.onClick(a),a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),s.scrollTo(s.props.to,s.props)},this.spyHandler=function(a,u){var l=s.getScrollSpyContainer();if(!(nn.default.isMounted()&&!nn.default.isInitialized())){var c=s.props.horizontal,p=s.props.to,h=null,g=void 0,y=void 0;if(c){var v=0,d=0,D=0;if(l.getBoundingClientRect){var B=l.getBoundingClientRect();D=B.left}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var b=h.getBoundingClientRect();v=b.left-D+a,d=v+b.width}var O=a-s.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),y=O<Math.floor(v)||O>=Math.floor(d)}else{var E=0,w=0,A=0;if(l.getBoundingClientRect){var F=l.getBoundingClientRect();A=F.top}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var R=h.getBoundingClientRect();E=R.top-A+u,w=E+R.height}var P=u-s.props.offset;g=P>=Math.floor(E)&&P<Math.floor(w),y=P<Math.floor(E)||P>=Math.floor(w)}var z=n.getActiveLink();if(y){if(p===z&&n.setActiveLink(void 0),s.props.hashSpy&&nn.default.getHash()===p){var I=s.props.saveHashHistory,j=I===void 0?!1:I;nn.default.changeHash("",j)}s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive(p,h))}if(g&&(z!==p||s.state.active===!1)){n.setActiveLink(p);var T=s.props.saveHashHistory,N=T===void 0?!1:T;s.props.hashSpy&&nn.default.changeHash(p,N),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(p,h))}}}};return r.propTypes=If,r.defaultProps={offset:0},r},Object.defineProperty(hs,"__esModule",{value:!0});var pb=f,jf=Nf(pb),hb=gr,vb=Nf(hb);function Nf(t){return t&&t.__esModule?t:{default:t}}function gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _f(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 mb(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 yb=function(t){mb(e,t);function e(){var n,r,i,o;gb(this,e);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return o=(r=(i=_f(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.render=function(){return jf.default.createElement("a",i.props,i.props.children)},r),_f(i,o)}return e}(jf.default.Component);hs.default=(0,vb.default)(yb);var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});var Cb=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}}(),Db=f,zf=Wf(Db),Eb=gr,bb=Wf(Eb);function Wf(t){return t&&t.__esModule?t:{default:t}}function wb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bb(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 xb(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 Sb=function(t){xb(e,t);function e(){return wb(this,e),Bb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Cb(e,[{key:"render",value:function(){return zf.default.createElement("button",this.props,this.props.children)}}]),e}(zf.default.Component);Ms.default=(0,bb.default)(Sb);var ks={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var Ab=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},Lb=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}}(),Ob=f,Uf=Mi(Ob),Pb=ln;Mi(Pb);var Fb=Nn,Hf=Mi(Fb),Mb=Ai,Rf=Mi(Mb);function Mi(t){return t&&t.__esModule?t:{default:t}}function kb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tb(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 Ib(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)}Fi.default=function(t){var e=function(n){Ib(r,n);function r(i){kb(this,r);var o=Tb(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return o.childBindings={domNode:null},o}return Lb(r,[{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;Hf.default.unregister(this.props.name)}},{key:"registerElems",value:function(o){Hf.default.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return Uf.default.createElement(t,Ab({},this.props,{parentBindings:this.childBindings}))}}]),r}(Uf.default.Component);return e.propTypes={name:Rf.default.string,id:Rf.default.string},e},Object.defineProperty(ks,"__esModule",{value:!0});var Vf=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},jb=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}}(),Nb=f,qf=Ts(Nb),_b=Fi,zb=Ts(_b),Wb=Ai,Gf=Ts(Wb);function Ts(t){return t&&t.__esModule?t:{default:t}}function Ub(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hb(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 Rb(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 Zf=function(t){Rb(e,t);function e(){return Ub(this,e),Hb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return jb(e,[{key:"render",value:function(){var r=this,i=Vf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,qf.default.createElement("div",Vf({},i,{ref:function(s){r.props.parentBindings.domNode=s}}),this.props.children)}}]),e}(qf.default.Component);Zf.propTypes={name:Gf.default.string,id:Gf.default.string},ks.default=(0,zb.default)(Zf);var Is=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},Yf=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 Kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xf(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 Jf(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 ki=f,xn=mr,js=Nn,Ke=Ai,rn=Li,Qf={to:Ke.string.isRequired,containerId:Ke.string,container:Ke.object,activeClass:Ke.string,spy:Ke.bool,smooth:Ke.oneOfType([Ke.bool,Ke.string]),offset:Ke.number,delay:Ke.number,isDynamic:Ke.bool,onClick:Ke.func,duration:Ke.oneOfType([Ke.number,Ke.func]),absolute:Ke.bool,onSetActive:Ke.func,onSetInactive:Ke.func,ignoreCancelEvents:Ke.bool,hashSpy:Ke.bool,spyThrottle:Ke.number},Vb={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||js,i=function(s){Jf(a,s);function a(u){Kf(this,a);var l=Xf(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,u));return o.call(l),l.state={active:!1},l}return Yf(a,[{key:"getScrollSpyContainer",value:function(){var l=this.props.containerId,c=this.props.container;return l?document.getElementById(l):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();xn.isMounted(l)||xn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(rn.isMounted()||rn.mount(r),rn.mapContainer(this.props.to,l)),this.props.spy&&xn.addStateHandler(this.stateHandler),xn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){xn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var l="";this.state&&this.state.active?l=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():l=this.props.className;var c=Is({},this.props);for(var p in Qf)c.hasOwnProperty(p)&&delete c[p];return c.className=l,c.onClick=this.handleClick,ki.createElement(e,c)}}]),a}(ki.Component),o=function(){var a=this;this.scrollTo=function(u,l){r.scrollTo(u,Is({},a.state,l))},this.handleClick=function(u){a.props.onClick&&a.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),a.scrollTo(a.props.to,a.props)},this.stateHandler=function(){r.getActiveLink()!==a.props.to&&(a.state!==null&&a.state.active&&a.props.onSetInactive&&a.props.onSetInactive(),a.setState({active:!1}))},this.spyHandler=function(u){var l=a.getScrollSpyContainer();if(!(rn.isMounted()&&!rn.isInitialized())){var c=a.props.to,p=null,h=0,g=0,y=0;if(l.getBoundingClientRect){var v=l.getBoundingClientRect();y=v.top}if(!p||a.props.isDynamic){if(p=r.get(c),!p)return;var d=p.getBoundingClientRect();h=d.top-y+u,g=h+d.height}var D=u-a.props.offset,B=D>=Math.floor(h)&&D<Math.floor(g),b=D<Math.floor(h)||D>=Math.floor(g),O=r.getActiveLink();if(b)return c===O&&r.setActiveLink(void 0),a.props.hashSpy&&rn.getHash()===c&&rn.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),xn.updateStates();if(B&&O!==c)return r.setActiveLink(c),a.props.hashSpy&&rn.changeHash(c),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(c)),xn.updateStates()}}};return i.propTypes=Qf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){Jf(i,r);function i(o){Kf(this,i);var s=Xf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,o));return s.childBindings={domNode:null},s}return Yf(i,[{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;js.unregister(this.props.name)}},{key:"registerElems",value:function(s){js.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ki.createElement(e,Is({},this.props,{parentBindings:this.childBindings}))}}]),i}(ki.Component);return n.propTypes={name:Ke.string,id:Ke.string},n}},qb=Vb;Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.Helpers=Qe.ScrollElement=Qe.ScrollLink=ld=Qe.animateScroll=Qe.scrollSpy=Qe.Events=Qe.scroller=Qe.Element=Qe.Button=Qe.Link=void 0;var Gb=hs,$f=kt(Gb),Zb=Ms,ed=kt(Zb),Yb=ks,td=kt(Yb),Kb=Nn,nd=kt(Kb),Xb=Dr,rd=kt(Xb),Jb=mr,id=kt(Jb),Qb=Ei,od=kt(Qb),$b=gr,sd=kt($b),e1=Fi,ad=kt(e1),t1=qb,ud=kt(t1);function kt(t){return t&&t.__esModule?t:{default:t}}Qe.Link=$f.default,Qe.Button=ed.default,Qe.Element=td.default,Qe.scroller=nd.default,Qe.Events=rd.default,Qe.scrollSpy=id.default;var ld=Qe.animateScroll=od.default;Qe.ScrollLink=sd.default,Qe.ScrollElement=ad.default,Qe.Helpers=ud.default,Qe.default={Link:$f.default,Button:ed.default,Element:td.default,scroller:nd.default,Events:rd.default,scrollSpy:id.default,animateScroll:od.default,ScrollLink:sd.default,ScrollElement:ad.default,Helpers:ud.default};const Ns=f.createContext({}),cd=f.createContext({});function fd(){const t=f.useContext(cd);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function dd(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 n1(){const t=Ot.useActionData(),{closeModal:e,closeAll:n}=f.useContext(Ns),{showToast:r}=fd(),{getParam:i}=ds(),{pathname:o}=Ot.useLocation(),s=Ot.useNavigate(),a=i("closeAllModals");f.useEffect(()=>{a==="true"&&(n(),s(o))},[a]),f.useEffect(()=>{const u=t==null?void 0:t.closeModalKey;u&&e(u)},[t]),f.useEffect(()=>{const u=t==null?void 0:t.toast,l=t==null?void 0:t.message;dd(u)&&r(u),!dd(u)&&l&&r({message:l,title:"Atenção!",type:"warning"})},[t]),f.useEffect(()=>{var u,l;if(typeof((u=t==null?void 0:t.data)==null?void 0:u.scrollTo)=="string"){const c=document.getElementById((l=t==null?void 0:t.data)==null?void 0:l.scrollTo);c&&ld.scrollTo(c.offsetTop-200)}},[t])}const pd=f.createContext({});function r1(t){const e=f.useContext(pd);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:o}=e,s=r(t),a=n(t);return{drawerIsOpen:s,drawerData:a,openDrawer:c=>i(t,c),closeDrawer:()=>o(t)}}else return e}function i1(t){const e=f.useContext(Ns);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:o}=e,s=r(t),a=n(t);return{modalIsOpen:s,modalData:a,openModal:c=>i(t,c),closeModal:()=>o(t)}}else return e}function o1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(c=>c.key===u))==null?void 0:l.data}function s(u,l){const c=i(u);r(c?p=>[...p.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function a(u){r(n.filter(l=>l.key!==u))}return x.jsx(pd.Provider,{value:{drawerIsOpen:i,drawerData:o,openDrawer:s,closeDrawer:a},children:e})}function s1({googleMapsApiKey:t,children:e,...n}){return x.jsx(Zd,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function a1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(l){return!!n.some(c=>c.key===l)}function o(l){var c;return(c=n.find(p=>p.key===l))==null?void 0:c.data}function s(l,c){const p=i(l);r(p?h=>[...h.filter(y=>y.key!==l),{key:l,data:c}]:[...n,{key:l,data:c}])}function a(l){r(n.filter(c=>c.key!==l))}function u(){r([])}return x.jsx(Ns.Provider,{value:{modalIsOpen:i,modalData:o,openModal:s,closeModal:a,closeAll:u},children:e})}let u1={data:""},l1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||u1,c1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,f1=/\/\*[^]*?\*\/| +/g,hd=/\n+/g,on=(t,e)=>{let n="",r="",i="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?on(s,o):o+"{"+on(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=on(s,e?e.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=on.p?on.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},zt={},vd=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+vd(t[n]);return e}return t},d1=(t,e,n,r,i)=>{let o=vd(t),s=zt[o]||(zt[o]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(o));if(!zt[s]){let u=o!==t?t:(l=>{let c,p,h=[{}];for(;c=c1.exec(l.replace(f1,""));)c[4]?h.shift():c[3]?(p=c[3].replace(hd," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][c[1]]=c[2].replace(hd," ").trim();return h[0]})(t);zt[s]=on(i?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&zt.g?zt.g:null;return n&&(zt.g=zt[s]),((u,l,c,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(zt[s],e,r,a),s},p1=(t,e,n)=>t.reduce((r,i,o)=>{let s=e[o];if(s&&s.call){let a=s(n),u=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=u?"."+u:a&&typeof a=="object"?a.props?"":on(a,""):a===!1?"":a}return r+i+(s??"")},"");function Ti(t){let e=this||{},n=t.call?t(e.p):t;return d1(n.unshift?n.raw?p1(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,l1(e.target),e.g,e.o,e.k)}let gd,_s,zs;Ti.bind({g:1});let Wt=Ti.bind({k:1});function h1(t,e,n,r){on.p=e,gd=t,_s=n,zs=r}function sn(t,e){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),u=a.className||i.className;n.p=Object.assign({theme:_s&&_s()},a),n.o=/ *go\d+/.test(u),a.className=Ti.apply(n,r)+(u?" "+u:""),e&&(a.ref=s);let l=t;return t[0]&&(l=a.as||t,delete a.as),zs&&l[0]&&zs(a),gd(l,a)}return e?e(i):i}}var v1=t=>typeof t=="function",Ii=(t,e)=>v1(t)?t(e):t,g1=(()=>{let t=0;return()=>(++t).toString()})(),md=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),m1=20,ji=new Map,y1=1e3,yd=t=>{if(ji.has(t))return;let e=setTimeout(()=>{ji.delete(t),Sn({type:4,toastId:t})},y1);ji.set(t,e)},C1=t=>{let e=ji.get(t);e&&clearTimeout(e)},Ws=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,m1)};case 1:return e.toast.id&&C1(e.toast.id),{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:n}=e;return t.toasts.find(o=>o.id===n.id)?Ws(t,{type:1,toast:n}):Ws(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?yd(r):t.toasts.forEach(o=>{yd(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Ni=[],_i={toasts:[],pausedAt:void 0},Sn=t=>{_i=Ws(_i,t),Ni.forEach(e=>{e(_i)})},D1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},E1=(t={})=>{let[e,n]=f.useState(_i);f.useEffect(()=>(Ni.push(n),()=>{let i=Ni.indexOf(n);i>-1&&Ni.splice(i,1)}),[e]);let r=e.toasts.map(i=>{var o,s;return{...t,...t[i.type],...i,duration:i.duration||((o=t[i.type])==null?void 0:o.duration)||(t==null?void 0:t.duration)||D1[i.type],style:{...t.style,...(s=t[i.type])==null?void 0:s.style,...i.style}}});return{...e,toasts:r}},b1=(t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(n==null?void 0:n.id)||g1()}),wr=t=>(e,n)=>{let r=b1(e,t,n);return Sn({type:2,toast:r}),r.id},Et=(t,e)=>wr("blank")(t,e);Et.error=wr("error"),Et.success=wr("success"),Et.loading=wr("loading"),Et.custom=wr("custom"),Et.dismiss=t=>{Sn({type:3,toastId:t})},Et.remove=t=>Sn({type:4,toastId:t}),Et.promise=(t,e,n)=>{let r=Et.loading(e.loading,{...n,...n==null?void 0:n.loading});return t.then(i=>(Et.success(Ii(e.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Et.error(Ii(e.error,i),{id:r,...n,...n==null?void 0:n.error})}),t};var w1=(t,e)=>{Sn({type:1,toast:{id:t,height:e}})},B1=()=>{Sn({type:5,time:Date.now()})},x1=t=>{let{toasts:e,pausedAt:n}=E1(t);f.useEffect(()=>{if(n)return;let o=Date.now(),s=e.map(a=>{if(a.duration===1/0)return;let u=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(u<0){a.visible&&Et.dismiss(a.id);return}return setTimeout(()=>Et.dismiss(a.id),u)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[e,n]);let r=f.useCallback(()=>{n&&Sn({type:6,time:Date.now()})},[n]),i=f.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},c=e.filter(g=>(g.position||l)===(o.position||l)&&g.height),p=c.findIndex(g=>g.id===o.id),h=c.filter((g,y)=>y<p&&g.visible).length;return c.filter(g=>g.visible).slice(...a?[h+1]:[0,h]).reduce((g,y)=>g+(y.height||0)+u,0)},[e]);return{toasts:e,handlers:{updateHeight:w1,startPause:B1,endPause:r,calculateOffset:i}}},S1=Wt`
|
111
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var G=te(W,X,ee,Y,C+"."+X,n);if(G)return G}return null}return d(H)}function T(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(T);if(k===null||a(k))return!0;var H=p(k);if(H){var J=H.call(k),q;if(H!==k.entries){for(;!(q=J.next()).done;)if(!T(q.value))return!1}else for(;!(q=J.next()).done;){var ee=q.value;if(ee&&!T(ee[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,H){return k==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function K(k){var H=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(H,k)?"symbol":H}function _(k){if(typeof k>"u"||k===null)return""+k;var H=K(k);if(H==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return H}function ie(k){var H=_(k);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function re(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Os}var Ps,kf;function JE(){if(kf)return Ps;kf=1;var t=Ss();function e(){}function n(){}return n.resetWarningCache=e,Ps=function(){function r(s,a,u,l,c,p){if(p!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var o={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 o.PropTypes=o,o},Ps}if(process.env.NODE_ENV!=="production"){var QE=Sf(),$E=!0;ws.exports=XE()(QE.isElement,$E)}else ws.exports=JE()();var Ai=ws.exports,Li={};Object.defineProperty(Li,"__esModule",{value:!0});var eb=Cr,Fs=tb(eb);function tb(t){return t&&t.__esModule?t:{default:t}}var nb={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 o=this.containers[e]||document;r.scrollTo(e,{container:o})}},getHash:function(){return Fs.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Fs.default.getHash()!==e&&Fs.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Li.default=nb,Object.defineProperty(gr,"__esModule",{value:!0});var Oi=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},rb=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}}(),ib=f,Tf=br(ib),ob=mr,Pi=br(ob),sb=Nn,ab=br(sb),ub=Ai,qe=br(ub),lb=Li,nn=br(lb);function br(t){return t&&t.__esModule?t:{default:t}}function cb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fb(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 db(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 If={to:qe.default.string.isRequired,containerId:qe.default.string,container:qe.default.object,activeClass:qe.default.string,activeStyle:qe.default.object,spy:qe.default.bool,horizontal:qe.default.bool,smooth:qe.default.oneOfType([qe.default.bool,qe.default.string]),offset:qe.default.number,delay:qe.default.number,isDynamic:qe.default.bool,onClick:qe.default.func,duration:qe.default.oneOfType([qe.default.number,qe.default.func]),absolute:qe.default.bool,onSetActive:qe.default.func,onSetInactive:qe.default.func,ignoreCancelEvents:qe.default.bool,hashSpy:qe.default.bool,saveHashHistory:qe.default.bool,spyThrottle:qe.default.number};gr.default=function(t,e){var n=e||ab.default,r=function(o){db(s,o);function s(a){cb(this,s);var u=fb(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return i.call(u),u.state={active:!1},u}return rb(s,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,l=this.props.container;return u&&!l?document.getElementById(u):l&&l.nodeType?l:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Pi.default.isMounted(u)||Pi.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(nn.default.isMounted()||nn.default.mount(n),nn.default.mapContainer(this.props.to,u)),Pi.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Pi.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 l={};this.state&&this.state.active?l=Oi({},this.props.style,this.props.activeStyle):l=Oi({},this.props.style);var c=Oi({},this.props);for(var p in If)c.hasOwnProperty(p)&&delete c[p];return c.className=u,c.style=l,c.onClick=this.handleClick,Tf.default.createElement(t,c)}}]),s}(Tf.default.PureComponent),i=function(){var s=this;this.scrollTo=function(a,u){n.scrollTo(a,Oi({},s.state,u))},this.handleClick=function(a){s.props.onClick&&s.props.onClick(a),a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),s.scrollTo(s.props.to,s.props)},this.spyHandler=function(a,u){var l=s.getScrollSpyContainer();if(!(nn.default.isMounted()&&!nn.default.isInitialized())){var c=s.props.horizontal,p=s.props.to,h=null,g=void 0,y=void 0;if(c){var v=0,d=0,D=0;if(l.getBoundingClientRect){var B=l.getBoundingClientRect();D=B.left}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var b=h.getBoundingClientRect();v=b.left-D+a,d=v+b.width}var O=a-s.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),y=O<Math.floor(v)||O>=Math.floor(d)}else{var E=0,w=0,A=0;if(l.getBoundingClientRect){var F=l.getBoundingClientRect();A=F.top}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var R=h.getBoundingClientRect();E=R.top-A+u,w=E+R.height}var P=u-s.props.offset;g=P>=Math.floor(E)&&P<Math.floor(w),y=P<Math.floor(E)||P>=Math.floor(w)}var z=n.getActiveLink();if(y){if(p===z&&n.setActiveLink(void 0),s.props.hashSpy&&nn.default.getHash()===p){var I=s.props.saveHashHistory,j=I===void 0?!1:I;nn.default.changeHash("",j)}s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive(p,h))}if(g&&(z!==p||s.state.active===!1)){n.setActiveLink(p);var T=s.props.saveHashHistory,N=T===void 0?!1:T;s.props.hashSpy&&nn.default.changeHash(p,N),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(p,h))}}}};return r.propTypes=If,r.defaultProps={offset:0},r},Object.defineProperty(hs,"__esModule",{value:!0});var pb=f,jf=Nf(pb),hb=gr,vb=Nf(hb);function Nf(t){return t&&t.__esModule?t:{default:t}}function gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _f(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 mb(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 yb=function(t){mb(e,t);function e(){var n,r,i,o;gb(this,e);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return o=(r=(i=_f(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.render=function(){return jf.default.createElement("a",i.props,i.props.children)},r),_f(i,o)}return e}(jf.default.Component);hs.default=(0,vb.default)(yb);var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});var Cb=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}}(),Db=f,zf=Wf(Db),Eb=gr,bb=Wf(Eb);function Wf(t){return t&&t.__esModule?t:{default:t}}function wb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bb(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 xb(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 Sb=function(t){xb(e,t);function e(){return wb(this,e),Bb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Cb(e,[{key:"render",value:function(){return zf.default.createElement("button",this.props,this.props.children)}}]),e}(zf.default.Component);Ms.default=(0,bb.default)(Sb);var ks={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var Ab=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},Lb=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}}(),Ob=f,Uf=Mi(Ob),Pb=ln;Mi(Pb);var Fb=Nn,Hf=Mi(Fb),Mb=Ai,Rf=Mi(Mb);function Mi(t){return t&&t.__esModule?t:{default:t}}function kb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tb(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 Ib(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)}Fi.default=function(t){var e=function(n){Ib(r,n);function r(i){kb(this,r);var o=Tb(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return o.childBindings={domNode:null},o}return Lb(r,[{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;Hf.default.unregister(this.props.name)}},{key:"registerElems",value:function(o){Hf.default.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return Uf.default.createElement(t,Ab({},this.props,{parentBindings:this.childBindings}))}}]),r}(Uf.default.Component);return e.propTypes={name:Rf.default.string,id:Rf.default.string},e},Object.defineProperty(ks,"__esModule",{value:!0});var Vf=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},jb=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}}(),Nb=f,qf=Ts(Nb),_b=Fi,zb=Ts(_b),Wb=Ai,Gf=Ts(Wb);function Ts(t){return t&&t.__esModule?t:{default:t}}function Ub(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hb(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 Rb(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 Zf=function(t){Rb(e,t);function e(){return Ub(this,e),Hb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return jb(e,[{key:"render",value:function(){var r=this,i=Vf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,qf.default.createElement("div",Vf({},i,{ref:function(s){r.props.parentBindings.domNode=s}}),this.props.children)}}]),e}(qf.default.Component);Zf.propTypes={name:Gf.default.string,id:Gf.default.string},ks.default=(0,zb.default)(Zf);var Is=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},Yf=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 Kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xf(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 Jf(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 ki=f,xn=mr,js=Nn,Ke=Ai,rn=Li,Qf={to:Ke.string.isRequired,containerId:Ke.string,container:Ke.object,activeClass:Ke.string,spy:Ke.bool,smooth:Ke.oneOfType([Ke.bool,Ke.string]),offset:Ke.number,delay:Ke.number,isDynamic:Ke.bool,onClick:Ke.func,duration:Ke.oneOfType([Ke.number,Ke.func]),absolute:Ke.bool,onSetActive:Ke.func,onSetInactive:Ke.func,ignoreCancelEvents:Ke.bool,hashSpy:Ke.bool,spyThrottle:Ke.number},Vb={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||js,i=function(s){Jf(a,s);function a(u){Kf(this,a);var l=Xf(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,u));return o.call(l),l.state={active:!1},l}return Yf(a,[{key:"getScrollSpyContainer",value:function(){var l=this.props.containerId,c=this.props.container;return l?document.getElementById(l):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();xn.isMounted(l)||xn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(rn.isMounted()||rn.mount(r),rn.mapContainer(this.props.to,l)),this.props.spy&&xn.addStateHandler(this.stateHandler),xn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){xn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var l="";this.state&&this.state.active?l=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():l=this.props.className;var c=Is({},this.props);for(var p in Qf)c.hasOwnProperty(p)&&delete c[p];return c.className=l,c.onClick=this.handleClick,ki.createElement(e,c)}}]),a}(ki.Component),o=function(){var a=this;this.scrollTo=function(u,l){r.scrollTo(u,Is({},a.state,l))},this.handleClick=function(u){a.props.onClick&&a.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),a.scrollTo(a.props.to,a.props)},this.stateHandler=function(){r.getActiveLink()!==a.props.to&&(a.state!==null&&a.state.active&&a.props.onSetInactive&&a.props.onSetInactive(),a.setState({active:!1}))},this.spyHandler=function(u){var l=a.getScrollSpyContainer();if(!(rn.isMounted()&&!rn.isInitialized())){var c=a.props.to,p=null,h=0,g=0,y=0;if(l.getBoundingClientRect){var v=l.getBoundingClientRect();y=v.top}if(!p||a.props.isDynamic){if(p=r.get(c),!p)return;var d=p.getBoundingClientRect();h=d.top-y+u,g=h+d.height}var D=u-a.props.offset,B=D>=Math.floor(h)&&D<Math.floor(g),b=D<Math.floor(h)||D>=Math.floor(g),O=r.getActiveLink();if(b)return c===O&&r.setActiveLink(void 0),a.props.hashSpy&&rn.getHash()===c&&rn.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),xn.updateStates();if(B&&O!==c)return r.setActiveLink(c),a.props.hashSpy&&rn.changeHash(c),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(c)),xn.updateStates()}}};return i.propTypes=Qf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){Jf(i,r);function i(o){Kf(this,i);var s=Xf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,o));return s.childBindings={domNode:null},s}return Yf(i,[{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;js.unregister(this.props.name)}},{key:"registerElems",value:function(s){js.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ki.createElement(e,Is({},this.props,{parentBindings:this.childBindings}))}}]),i}(ki.Component);return n.propTypes={name:Ke.string,id:Ke.string},n}},qb=Vb;Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.Helpers=Qe.ScrollElement=Qe.ScrollLink=ld=Qe.animateScroll=Qe.scrollSpy=Qe.Events=Qe.scroller=Qe.Element=Qe.Button=Qe.Link=void 0;var Gb=hs,$f=kt(Gb),Zb=Ms,ed=kt(Zb),Yb=ks,td=kt(Yb),Kb=Nn,nd=kt(Kb),Xb=Dr,rd=kt(Xb),Jb=mr,id=kt(Jb),Qb=Ei,od=kt(Qb),$b=gr,sd=kt($b),e1=Fi,ad=kt(e1),t1=qb,ud=kt(t1);function kt(t){return t&&t.__esModule?t:{default:t}}Qe.Link=$f.default,Qe.Button=ed.default,Qe.Element=td.default,Qe.scroller=nd.default,Qe.Events=rd.default,Qe.scrollSpy=id.default;var ld=Qe.animateScroll=od.default;Qe.ScrollLink=sd.default,Qe.ScrollElement=ad.default,Qe.Helpers=ud.default,Qe.default={Link:$f.default,Button:ed.default,Element:td.default,scroller:nd.default,Events:rd.default,scrollSpy:id.default,animateScroll:od.default,ScrollLink:sd.default,ScrollElement:ad.default,Helpers:ud.default};const Ns=f.createContext({}),cd=f.createContext({});function fd(){const t=f.useContext(cd);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function dd(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="success"||t.type==="danger")}function n1(){const t=Ot.useActionData(),{closeModal:e,closeAll:n}=f.useContext(Ns),{showToast:r}=fd(),{getParam:i}=ds(),{pathname:o}=Ot.useLocation(),s=Ot.useNavigate(),a=i("closeAllModals");f.useEffect(()=>{a==="true"&&(n(),s(o))},[a]),f.useEffect(()=>{const u=t==null?void 0:t.closeModalKey;u&&e(u)},[t]),f.useEffect(()=>{const u=t==null?void 0:t.toast,l=t==null?void 0:t.message;dd(u)&&r(u),!dd(u)&&l&&r({message:l,type:"danger"})},[t]),f.useEffect(()=>{var u,l;if(typeof((u=t==null?void 0:t.data)==null?void 0:u.scrollTo)=="string"){const c=document.getElementById((l=t==null?void 0:t.data)==null?void 0:l.scrollTo);c&&ld.scrollTo(c.offsetTop-200)}},[t])}const pd=f.createContext({});function r1(t){const e=f.useContext(pd);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:o}=e,s=r(t),a=n(t);return{drawerIsOpen:s,drawerData:a,openDrawer:c=>i(t,c),closeDrawer:()=>o(t)}}else return e}function i1(t){const e=f.useContext(Ns);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:o}=e,s=r(t),a=n(t);return{modalIsOpen:s,modalData:a,openModal:c=>i(t,c),closeModal:()=>o(t)}}else return e}function o1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(c=>c.key===u))==null?void 0:l.data}function s(u,l){const c=i(u);r(c?p=>[...p.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function a(u){r(n.filter(l=>l.key!==u))}return x.jsx(pd.Provider,{value:{drawerIsOpen:i,drawerData:o,openDrawer:s,closeDrawer:a},children:e})}function s1({googleMapsApiKey:t,children:e,...n}){return x.jsx(Zd,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function a1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(l){return!!n.some(c=>c.key===l)}function o(l){var c;return(c=n.find(p=>p.key===l))==null?void 0:c.data}function s(l,c){const p=i(l);r(p?h=>[...h.filter(y=>y.key!==l),{key:l,data:c}]:[...n,{key:l,data:c}])}function a(l){r(n.filter(c=>c.key!==l))}function u(){r([])}return x.jsx(Ns.Provider,{value:{modalIsOpen:i,modalData:o,openModal:s,closeModal:a,closeAll:u},children:e})}let u1={data:""},l1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||u1,c1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,f1=/\/\*[^]*?\*\/| +/g,hd=/\n+/g,on=(t,e)=>{let n="",r="",i="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?on(s,o):o+"{"+on(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=on(s,e?e.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=on.p?on.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},zt={},vd=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+vd(t[n]);return e}return t},d1=(t,e,n,r,i)=>{let o=vd(t),s=zt[o]||(zt[o]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(o));if(!zt[s]){let u=o!==t?t:(l=>{let c,p,h=[{}];for(;c=c1.exec(l.replace(f1,""));)c[4]?h.shift():c[3]?(p=c[3].replace(hd," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][c[1]]=c[2].replace(hd," ").trim();return h[0]})(t);zt[s]=on(i?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&zt.g?zt.g:null;return n&&(zt.g=zt[s]),((u,l,c,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(zt[s],e,r,a),s},p1=(t,e,n)=>t.reduce((r,i,o)=>{let s=e[o];if(s&&s.call){let a=s(n),u=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=u?"."+u:a&&typeof a=="object"?a.props?"":on(a,""):a===!1?"":a}return r+i+(s??"")},"");function Ti(t){let e=this||{},n=t.call?t(e.p):t;return d1(n.unshift?n.raw?p1(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,l1(e.target),e.g,e.o,e.k)}let gd,_s,zs;Ti.bind({g:1});let Wt=Ti.bind({k:1});function h1(t,e,n,r){on.p=e,gd=t,_s=n,zs=r}function sn(t,e){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),u=a.className||i.className;n.p=Object.assign({theme:_s&&_s()},a),n.o=/ *go\d+/.test(u),a.className=Ti.apply(n,r)+(u?" "+u:""),e&&(a.ref=s);let l=t;return t[0]&&(l=a.as||t,delete a.as),zs&&l[0]&&zs(a),gd(l,a)}return e?e(i):i}}var v1=t=>typeof t=="function",Ii=(t,e)=>v1(t)?t(e):t,g1=(()=>{let t=0;return()=>(++t).toString()})(),md=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),m1=20,ji=new Map,y1=1e3,yd=t=>{if(ji.has(t))return;let e=setTimeout(()=>{ji.delete(t),Sn({type:4,toastId:t})},y1);ji.set(t,e)},C1=t=>{let e=ji.get(t);e&&clearTimeout(e)},Ws=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,m1)};case 1:return e.toast.id&&C1(e.toast.id),{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:n}=e;return t.toasts.find(o=>o.id===n.id)?Ws(t,{type:1,toast:n}):Ws(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?yd(r):t.toasts.forEach(o=>{yd(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Ni=[],_i={toasts:[],pausedAt:void 0},Sn=t=>{_i=Ws(_i,t),Ni.forEach(e=>{e(_i)})},D1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},E1=(t={})=>{let[e,n]=f.useState(_i);f.useEffect(()=>(Ni.push(n),()=>{let i=Ni.indexOf(n);i>-1&&Ni.splice(i,1)}),[e]);let r=e.toasts.map(i=>{var o,s;return{...t,...t[i.type],...i,duration:i.duration||((o=t[i.type])==null?void 0:o.duration)||(t==null?void 0:t.duration)||D1[i.type],style:{...t.style,...(s=t[i.type])==null?void 0:s.style,...i.style}}});return{...e,toasts:r}},b1=(t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(n==null?void 0:n.id)||g1()}),wr=t=>(e,n)=>{let r=b1(e,t,n);return Sn({type:2,toast:r}),r.id},Et=(t,e)=>wr("blank")(t,e);Et.error=wr("error"),Et.success=wr("success"),Et.loading=wr("loading"),Et.custom=wr("custom"),Et.dismiss=t=>{Sn({type:3,toastId:t})},Et.remove=t=>Sn({type:4,toastId:t}),Et.promise=(t,e,n)=>{let r=Et.loading(e.loading,{...n,...n==null?void 0:n.loading});return t.then(i=>(Et.success(Ii(e.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Et.error(Ii(e.error,i),{id:r,...n,...n==null?void 0:n.error})}),t};var w1=(t,e)=>{Sn({type:1,toast:{id:t,height:e}})},B1=()=>{Sn({type:5,time:Date.now()})},x1=t=>{let{toasts:e,pausedAt:n}=E1(t);f.useEffect(()=>{if(n)return;let o=Date.now(),s=e.map(a=>{if(a.duration===1/0)return;let u=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(u<0){a.visible&&Et.dismiss(a.id);return}return setTimeout(()=>Et.dismiss(a.id),u)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[e,n]);let r=f.useCallback(()=>{n&&Sn({type:6,time:Date.now()})},[n]),i=f.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},c=e.filter(g=>(g.position||l)===(o.position||l)&&g.height),p=c.findIndex(g=>g.id===o.id),h=c.filter((g,y)=>y<p&&g.visible).length;return c.filter(g=>g.visible).slice(...a?[h+1]:[0,h]).reduce((g,y)=>g+(y.height||0)+u,0)},[e]);return{toasts:e,handlers:{updateHeight:w1,startPause:B1,endPause:r,calculateOffset:i}}},S1=Wt`
|
112
112
|
from {
|
113
113
|
transform: scale(0) rotate(45deg);
|
114
114
|
opacity: 0;
|
@@ -284,4 +284,4 @@ to {
|
|
284
284
|
> * {
|
285
285
|
pointer-events: auto;
|
286
286
|
}
|
287
|
-
`,zi=16,J1=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:u}=x1(n);return rt.createElement("div",{style:{position:"fixed",zIndex:9999,top:zi,left:zi,right:zi,bottom:zi,pointerEvents:"none",...o},className:s,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(l=>{let c=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:r,defaultPosition:e}),h=K1(c,p);return rt.createElement(Y1,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?X1:"",style:h},l.type==="custom"?Ii(l.message,l):i?i(l):rt.createElement(Z1,{toast:l,position:c}))}))},Cd=Et;function Q1({children:t}){function e(n){switch(n.type){case"success":return Cd.success(n.message);case"danger":return Cd.error(n.message)}}return x.jsxs(cd.Provider,{value:{showToast:e},children:[x.jsx(J1,{position:"top-right"}),t]})}fe.AlertContainer=Bd,fe.AlertContent=xd,fe.AlertDescription=Sd,fe.AlertIcon=Ad,fe.AlertTitle=qs,fe.Badge=Fd,fe.BreadcrumbContainer=ID,fe.BreadcrumbLink=jD,fe.Button=sh,fe.Card=Md,fe.Checkbox=uh,fe.Divider=kd,fe.DrawerContainer=UD,fe.DrawerHeader=HD,fe.DrawerProvider=o1,fe.FormController=ah,fe.FormError=lh,fe.FormLabel=ch,fe.GoogleMap=$p,fe.GoogleProvider=s1,fe.GoogleSearchPlaces=bh,fe.IconButton=wh,fe.Input=su,fe.ModalContainer=RD,fe.ModalFooter=VD,fe.ModalHeader=qD,fe.ModalProvider=a1,fe.Pagination=ND,fe.Popover=GD,fe.RadioBox=Sh,fe.RadioGroup=xh,fe.RichText=PD,fe.Select=MD,fe.Skeleton=eh,fe.Switch=kD,fe.TabButton=WD,fe.TabContainer=zD,fe.TableBody=th,fe.TableCaption=nh,fe.TableContainer=rh,fe.TableFooter=ih,fe.TableHeader=oh,fe.Textarea=TD,fe.Toast=ZD,fe.ToastProvider=Q1,fe.Tooltip=YD,fe.useAutomation=n1,fe.useDrawer=r1,fe.useFieldErrors=$a,fe.useModal=i1,fe.useScopedParams=ds,fe.useToast=fd,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
|
287
|
+
`,zi=16,J1=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:u}=x1(n);return rt.createElement("div",{style:{position:"fixed",zIndex:9999,top:zi,left:zi,right:zi,bottom:zi,pointerEvents:"none",...o},className:s,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(l=>{let c=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:r,defaultPosition:e}),h=K1(c,p);return rt.createElement(Y1,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?X1:"",style:h},l.type==="custom"?Ii(l.message,l):i?i(l):rt.createElement(Z1,{toast:l,position:c}))}))},Cd=Et;function Q1({children:t}){function e(n){switch(n.type){case"success":return Cd.success(n.message);case"danger":return Cd.error(n.message)}}return x.jsxs(cd.Provider,{value:{showToast:e},children:[x.jsx(J1,{position:"top-right",containerStyle:{zIndex:999999999999999}}),t]})}fe.AlertContainer=Bd,fe.AlertContent=xd,fe.AlertDescription=Sd,fe.AlertIcon=Ad,fe.AlertTitle=qs,fe.Badge=Fd,fe.BreadcrumbContainer=ID,fe.BreadcrumbLink=jD,fe.Button=sh,fe.Card=Md,fe.Checkbox=uh,fe.Divider=kd,fe.DrawerContainer=UD,fe.DrawerHeader=HD,fe.DrawerProvider=o1,fe.FormController=ah,fe.FormError=lh,fe.FormLabel=ch,fe.GoogleMap=$p,fe.GoogleProvider=s1,fe.GoogleSearchPlaces=bh,fe.IconButton=wh,fe.Input=su,fe.ModalContainer=RD,fe.ModalFooter=VD,fe.ModalHeader=qD,fe.ModalProvider=a1,fe.Pagination=ND,fe.Popover=GD,fe.RadioBox=Sh,fe.RadioGroup=xh,fe.RichText=PD,fe.Select=MD,fe.Skeleton=eh,fe.Switch=kD,fe.TabButton=WD,fe.TabContainer=zD,fe.TableBody=th,fe.TableCaption=nh,fe.TableContainer=rh,fe.TableFooter=ih,fe.TableHeader=oh,fe.Textarea=TD,fe.Toast=ZD,fe.ToastProvider=Q1,fe.Tooltip=YD,fe.useAutomation=n1,fe.useDrawer=r1,fe.useFieldErrors=$a,fe.useModal=i1,fe.useScopedParams=ds,fe.useToast=fd,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
|