@arkyn/components 1.3.126 → 1.3.128

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- (function(fe,c){typeof exports=="object"&&typeof module<"u"?c(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"],c):(fe=typeof globalThis<"u"?globalThis:fe||self,c(fe["@arkyn/components"]={},fe.React$2,fe.lucideReact,fe.ReactDOM,fe.react,fe.mask,fe.framerMotion))})(this,function(fe,c,Se,un,Ln,Cd,ln){"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(c),Hs=Us(un);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 qi={exports:{}},Zn={};/**
1
+ (function(fe,c){typeof exports=="object"&&typeof module<"u"?c(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"],c):(fe=typeof globalThis<"u"?globalThis:fe||self,c(fe["@arkyn/components"]={},fe.React$2,fe.lucideReact,fe.ReactDOM,fe.react,fe.mask,fe.framerMotion))})(this,function(fe,c,Se,un,Ln,Cd,ln){"use strict";function Ws(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=Ws(c),Us=Ws(un);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
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Rs;function Dd(){if(Rs)return Zn;Rs=1;var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,l){var f,p={},h=null,g=null;l!==void 0&&(h=""+l),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(p[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:e,type:a,key:h,ref:g,props:p,_owner:i.current}}return Zn.Fragment=n,Zn.jsx=s,Zn.jsxs=s,Zn}var Yn={};/**
9
+ */var Hs;function Dd(){if(Hs)return Zn;Hs=1;var t=c,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,l){var f,p={},h=null,g=null;l!==void 0&&(h=""+l),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!o.hasOwnProperty(f)&&(p[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:e,type:a,key:h,ref:g,props:p,_owner:i.current}}return Zn.Fragment=n,Zn.jsx=s,Zn.jsxs=s,Zn}var Yn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Vs;function Ed(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&function(){var t=c,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"),f=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===f||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 f: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`
17
+ */var Rs;function Ed(){return Rs||(Rs=1,process.env.NODE_ENV!=="production"&&function(){var t=c,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"),f=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===f||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 f: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
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 Le=nt.stack.split(`
19
19
  `),tt=ye.stack.split(`
20
20
  `),Ge=Le.length-1,Je=tt.length-1;Ge>=1&&Je>=0&&Le[Ge]!==tt[Je];)Je--;for(;Ge>=1&&Je>=0;Ge--,Je--)if(Le[Ge]!==tt[Je]){if(Ge!==1||Je!==1)do if(Ge--,Je--,Je<0||Le[Ge]!==tt[Je]){var at=`
@@ -22,14 +22,14 @@
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
- Check your code at `+$+":"+oe+"."}return""}}var xr={};function Ui(S){{var $=Br();if(!$){var oe=typeof S=="string"?S:S.displayName||S.name;oe&&($=`
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 An(S,$){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Ui($);if(xr[oe])return;xr[oe]=!0;var ye="";S&&S._owner&&S._owner!==kt.current&&(ye=" It was passed a child from "+j(S._owner.type)+"."),Wt(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),Wt(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)&&An(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)&&An(Me.value,$)}}}function Hi(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&&!an){an=!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"){Wt(S),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ye),Wt(null);break}}S.ref!==null&&(Wt(S),B("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}var Ar={};function Lr(S,$,oe,ye,ke,je){{var Me=P(S);if(!Me){var Le="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Le+=" 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?Le+=tt:Le+=Br();var Ge;S===null?Ge="null":ae(S)?Ge="array":S!==void 0&&S.$$typeof===e?(Ge="<"+(j(S.type)||"Unknown")+" />",Le=" 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,Le)}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 Ut=0;Ut<at.length;Ut++)Sr(at[Ut],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 Ht=j(S),nt=Object.keys($).filter(function($1){return $1!=="key"}),Ee=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Ar[Ht+Ee]){var Q1=nt.length>0?"{"+nt.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+oe+">.")}return $}}function An(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!==kt.current&&(ye=" It was passed a child from "+j(S._owner.type)+"."),Wt(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),Wt(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)&&An(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)&&An(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&&!an){an=!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"){Wt(S),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ye),Wt(null);break}}S.ref!==null&&(Wt(S),B("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}var Ar={};function Lr(S,$,oe,ye,ke,je){{var Me=P(S);if(!Me){var Le="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Le+=" 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?Le+=tt:Le+=Br();var Ge;S===null?Ge="null":ae(S)?Ge="array":S!==void 0&&S.$$typeof===e?(Ge="<"+(j(S.type)||"Unknown")+" />",Le=" 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,Le)}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 Ut=0;Ut<at.length;Ut++)Sr(at[Ut],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 Ht=j(S),nt=Object.keys($).filter(function($1){return $1!=="key"}),Ee=nt.length>0?"{key: someKey, "+nt.join(": ..., ")+": ...}":"{key: someKey}";if(!Ar[Ht+Ee]){var Q1=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,Ht,Q1,Ht),Ar[Ht+Ee]=!0}}return S===r?Vn(Je):Hi(Je),Je}}function qn(S,$,oe){return Lr(S,$,oe,!0)}function Ri(S,$,oe){return Lr(S,$,oe,!1)}var Vi=Ri,Gn=qn;Yn.Fragment=r,Yn.jsx=Vi,Yn.jsxs=Gn}()),Yn}process.env.NODE_ENV==="production"?qi.exports=Dd():qi.exports=Ed();var x=qi.exports;function qs(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Gs=c.createContext({});function bd(){return c.useContext(Gs)}function wd(t){const{schema:e,children:n,className:r,...i}=t,a=!(l=>{let f=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===qs?f=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),f})(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 Bd(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function xd(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Sd(t){const{className:e,...n}=t,{schema:r}=bd(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Se.CheckCircle2,{className:i,...n});case"danger":return x.jsx(Se.XCircle,{className:i,...n});case"warning":return x.jsx(Se.AlertTriangle,{className:i,...n});case"info":return x.jsx(Se.Info,{className:i,...n})}}function 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 Ad(t,e,n){return t>=n?[]:Zs(t,t+e)}function Ld(t,e){return t<=1?[]:Zs(t-1-e,t-1)}function Od(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 Pd(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:o,className:s="",children:a,...u}=t,f={md:12,lg:14}[r],p=`arkynBadge ${e} ${n} ${r} ${s}`;return x.jsxs("div",{className:p.trim(),...u,children:[Pr(f,i),a,Pr(f,i)]})}function Fd(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Md(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return x.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
32
+ <%s key={someKey} {...props} />`,Ee,Ht,Q1,Ht),Ar[Ht+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=Dd():Vi.exports=Ed();var x=Vi.exports;function Vs(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const qs=c.createContext({});function bd(){return c.useContext(qs)}function wd(t){const{schema:e,children:n,className:r,...i}=t,a=!(l=>{let f=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===Vs?f=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${a} ${r}`;return x.jsx(qs.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...i,children:n})})}function Bd(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function xd(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Sd(t){const{className:e,...n}=t,{schema:r}=bd(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Se.CheckCircle2,{className:i,...n});case"danger":return x.jsx(Se.XCircle,{className:i,...n});case"warning":return x.jsx(Se.AlertTriangle,{className:i,...n});case"info":return x.jsx(Se.Info,{className:i,...n})}}function Pr(t,e){return e?x.jsx(e,{size:t,strokeWidth:2.5}):x.jsx(x.Fragment,{})}function Gs(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function Ad(t,e,n){return t>=n?[]:Gs(t,t+e)}function Ld(t,e){return t<=1?[]:Gs(t-1-e,t-1)}function Od(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 Pd(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:o,className:s="",children:a,...u}=t,f={md:12,lg:14}[r],p=`arkynBadge ${e} ${n} ${r} ${s}`;return x.jsxs("div",{className:p.trim(),...u,children:[Pr(f,i),a,Pr(f,i)]})}function Fd(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Md(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return x.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
33
33
  Copyright (c) Microsoft Corporation.
34
34
 
35
35
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,15 +42,15 @@ React keys must be passed directly to JSX without using spread:
42
42
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
43
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
44
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */var Gi=function(t,e){return Gi=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])},Gi(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");Gi(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 Zi(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 kd(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(f){try{l(r.next(f))}catch(p){s(p)}}function u(f){try{l(r.throw(f))}catch(p){s(p)}}function l(f){f.done?o(f.value):i(f.value).then(a,u)}l((r=r.apply(t,e||[])).next())})}function Td(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(f){return u([l,f])}}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(f){l=[6,f],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 Id=process.env.NODE_ENV,jd=function(t,e,n,r,i,o,s,a){if(Id!=="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],f=0;u=new Error(e.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Nd=jd,et=Ys(Nd),Be=c.createContext(null);function _d(){et(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(Be);return et(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function zd(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Wd(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Ud(t,e,n,r){var i={},o=function(s,a){var u=n[a];u!==e[a]&&(i[a]=u,s(r,u))};return Wd(t,o),i}function Hd(t,e,n){var r=zd(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Rd(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach(Rd)}function Oe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=Hd(i,o,n);return Ud(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 Vd(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,f=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=c.useState(null),w=E[0],A=E[1],F=c.useRef(null),R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1],ae=c.useState(null),Ue=ae[0],de=ae[1];return c.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),c.useEffect(function(){w!==null&&typeof s<"u"&&w.setCenter(s)},[w,s]),c.useEffect(function(){w&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&p&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(w,"dragstart",p)))},[p]),c.useEffect(function(){w&&v&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(w,"mousedown",v)))},[v]),c.useEffect(function(){w&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(w,"mousemove",h)))},[h]),c.useEffect(function(){w&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(w,"mouseout",g)))},[g]),c.useEffect(function(){w&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(w,"mouseover",y)))},[y]),c.useEffect(function(){w&&d&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(w,"mouseup",d)))},[d]),c.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(w,"rightclick",D)))},[D]),c.useEffect(function(){w&&a&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(w,"click",a)))},[a]),c.useEffect(function(){w&&l&&(Ue!==null&&google.maps.event.removeListener(Ue),de(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&B&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(w,"center_changed",B)))},[a]),c.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})})}c.memo(Vd);var qd=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=Oe({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=Oe({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}(c.PureComponent),cn=typeof document<"u";function Js(t){var e=t.url,n=t.id,r=t.nonce;return cn?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 f=u.initMap,p=a.onerror;u.initMap=function(){f&&f(),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
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 kd(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(f){try{l(r.next(f))}catch(p){s(p)}}function u(f){try{l(r.throw(f))}catch(p){s(p)}}function l(f){f.done?o(f.value):i(f.value).then(a,u)}l((r=r.apply(t,e||[])).next())})}function Td(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(f){return u([l,f])}}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(f){l=[6,f],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Zs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Id=process.env.NODE_ENV,jd=function(t,e,n,r,i,o,s,a){if(Id!=="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],f=0;u=new Error(e.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Nd=jd,et=Zs(Nd),Be=c.createContext(null);function _d(){et(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(Be);return et(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function zd(t,e,n){return Object.keys(t).reduce(function(i,o){return e(i,t[o],o)},n)}function Wd(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Ud(t,e,n,r){var i={},o=function(s,a){var u=n[a];u!==e[a]&&(i[a]=u,s(r,u))};return Wd(t,o),i}function Hd(t,e,n){var r=zd(n,function(o,s,a){return typeof t[a]=="function"&&o.push(google.maps.event.addListener(e,s,t[a])),o},[]);return r}function Rd(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach(Rd)}function Oe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,o=t.instance,s=Hd(i,o,n);return Ud(e,r,i,o),s}var Ys={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"},Ks={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 Vd(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,f=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=c.useState(null),w=E[0],A=E[1],F=c.useRef(null),R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1],ae=c.useState(null),Ue=ae[0],de=ae[1];return c.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),c.useEffect(function(){w!==null&&typeof s<"u"&&w.setCenter(s)},[w,s]),c.useEffect(function(){w&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&p&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(w,"dragstart",p)))},[p]),c.useEffect(function(){w&&v&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(w,"mousedown",v)))},[v]),c.useEffect(function(){w&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(w,"mousemove",h)))},[h]),c.useEffect(function(){w&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(w,"mouseout",g)))},[g]),c.useEffect(function(){w&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(w,"mouseover",y)))},[y]),c.useEffect(function(){w&&d&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(w,"mouseup",d)))},[d]),c.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(w,"rightclick",D)))},[D]),c.useEffect(function(){w&&a&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(w,"click",a)))},[a]),c.useEffect(function(){w&&l&&(Ue!==null&&google.maps.event.removeListener(Ue),de(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&B&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(w,"center_changed",B)))},[a]),c.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})})}c.memo(Vd);var qd=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=Oe({updaterMap:Ks,eventMap:Ys,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=Oe({updaterMap:Ks,eventMap:Ys,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}(c.PureComponent),cn=typeof document<"u";function Xs(t){var e=t.url,n=t.id,r=t.nonce;return cn?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 f=u.initMap,p=a.onerror;u.initMap=function(){f&&f(),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 Js(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
46
46
  `,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
47
- `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function $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,f=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(","))),f&&p.push("auth_referrer_policy=".concat(f)),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 Yi={id:"script-loader",version:"weekly"},Gd=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=c.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return kd(n,void 0,void 0,function(){function r(i){if(!Kn)i();else if(cn)var o=window.setInterval(function(){Kn||(window.clearInterval(o),i())},1)}return Td(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(`
47
+ `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Qs(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,o){return Js(i)||Reflect.apply(e,t,[i,o]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Js(i)||Reflect.apply(n,t,[i]),i}}}function $s(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,f=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(","))),f&&p.push("auth_referrer_policy=".concat(f)),p.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(p.join("&"))}var Kn=!1;function ea(){return x.jsx("div",{children:"Loading..."})}var Zi={id:"script-loader",version:"weekly"},Gd=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=c.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return kd(n,void 0,void 0,function(){function r(i){if(!Kn)i();else if(cn)var o=window.setInterval(function(){Kn||(window.clearInterval(o),i())},1)}return Td(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&&Qs(),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:$s(n.props)};Xs(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
48
48
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
49
49
  Otherwise it is a Network issue.
50
- `))})},n}return e.prototype.componentDidMount=function(){if(cn){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"),cn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(cn){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=Yi,e}(c.PureComponent),na;function Zd(t){var e=t.id,n=e===void 0?Yi.id:e,r=t.version,i=r===void 0?Yi.version:r,o=t.nonce,s=t.googleMapsApiKey,a=t.googleMapsClientId,u=t.language,l=t.region,f=t.libraries,p=t.preventGoogleFontsLoading,h=t.channel,g=t.mapIds,y=t.authReferrerPolicy,v=c.useRef(!1),d=c.useState(!1),D=d[0],B=d[1],b=c.useState(void 0),O=b[0],E=b[1];c.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),c.useEffect(function(){cn&&p&&$s()},[p]),c.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:f,channel:h,mapIds:g,authReferrerPolicy:y});c.useEffect(function(){if(!cn)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(`
50
+ `))})},n}return e.prototype.componentDidMount=function(){if(cn){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"),cn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(cn){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(ea,{})]})},e.defaultProps=Zi,e}(c.PureComponent),ta;function Zd(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,f=t.libraries,p=t.preventGoogleFontsLoading,h=t.channel,g=t.mapIds,y=t.authReferrerPolicy,v=c.useRef(!1),d=c.useState(!1),D=d[0],B=d[1],b=c.useState(void 0),O=b[0],E=b[1];c.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),c.useEffect(function(){cn&&p&&Qs()},[p]),c.useEffect(function(){D&&et(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var w=$s({version:i,googleMapsApiKey:s,googleMapsClientId:a,language:u,region:l,libraries:f,channel:h,mapIds:g,authReferrerPolicy:y});c.useEffect(function(){if(!cn)return;function R(){v.current&&(B(!0),ta=w)}if(window.google&&window.google.maps&&ta===w){R();return}Xs({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=c.useRef();return c.useEffect(function(){A.current&&f!==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=f},[f]),{isLoaded:D,loadError:O,url:w}}var Yd=x.jsx(ta,{});function Kd(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Zi(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Zd(s),u=a.isLoaded,l=a.loadError;return c.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),c.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),c.useEffect(function(){return function(){i&&i()}},[i]),u?o:e||Yd}c.memo(Kd);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 Xd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(Be),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.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}c.memo(Xd),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}(c.PureComponent);function Jd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Be),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.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}c.memo(Jd),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}(c.PureComponent);function Qd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Be),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.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}c.memo(Qd),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}(c.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 $d(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,f=t.onUnmount,p=c.useContext(Be),h=c.useState(null),g=h[0],y=h[1],v=c.useState(null),d=v[0],D=v[1],B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1];return c.useEffect(function(){g!==null&&g.setMap(p)},[p]),c.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),c.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),c.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),c.useEffect(function(){g&&i&&(b!==null&&google.maps.event.removeListener(b),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),c.useEffect(function(){g&&o&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",o)))},[g,o]),c.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(g,"polygoncomplete",s)))},[g,s]),c.useEffect(function(){g&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(g,"polylinecomplete",a)))},[g,a]),c.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),c.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),f&&f(g),g.setMap(null))}},[]),null}c.memo($d),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}(c.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 ep(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,f=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=c.useContext(Be),Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1],xe=c.useState(null),pt=xe[0],st=xe[1],sn=c.useState(null),xt=sn[0],Lt=sn[1],_n=c.useState(null),zn=_n[0],Wn=_n[1],Un=c.useState(null),kt=Un[0],Sn=Un[1],Wt=c.useState(null),an=Wt[0],Hn=Wt[1],Br=c.useState(null),Rn=Br[0],xr=Br[1],Ui=c.useState(null),An=Ui[0],Sr=Ui[1],Hi=c.useState(null),Vn=Hi[0],Ar=Hi[1],Lr=c.useState(null),qn=Lr[0],Ri=Lr[1],Vi=c.useState(null),Gn=Vi[0],S=Vi[1],$=c.useState(null),oe=$[0],ye=$[1],ke=c.useState(null),je=ke[0],Me=ke[1],Le=c.useState(null),tt=Le[0],Ge=Le[1],Je=c.useState(null),at=Je[0],Ut=Je[1];c.useEffect(function(){C!==null&&C.setMap(ee)},[ee]),c.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),c.useEffect(function(){typeof s<"u"&&C!==null&&C.setDraggable(s)},[C,s]),c.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),c.useEffect(function(){typeof a<"u"&&C!==null&&C.setVisible(a)},[C,a]),c.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),c.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),c.useEffect(function(){C&&f!==void 0&&C.setCursor(f)},[C,f]),c.useEffect(function(){C&&p!==void 0&&C.setIcon(p)},[C,p]),c.useEffect(function(){C&&h!==void 0&&C.setLabel(h)},[C,h]),c.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),c.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),c.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),c.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),c.useEffect(function(){C&&B&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(C,"dblclick",B)))},[B]),c.useEffect(function(){C&&O&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(C,"dragend",O)))},[O]),c.useEffect(function(){C&&E&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(C,"dragstart",E)))},[E]),c.useEffect(function(){C&&R&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(C,"mousedown",R)))},[R]),c.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(C,"mouseout",w)))},[w]),c.useEffect(function(){C&&A&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),c.useEffect(function(){C&&F&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(C,"mouseup",F)))},[F]),c.useEffect(function(){C&&P&&(pt!==null&&google.maps.event.removeListener(pt),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),c.useEffect(function(){C&&D&&(xt!==null&&google.maps.event.removeListener(xt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),c.useEffect(function(){C&&b&&(zn!==null&&google.maps.event.removeListener(zn),Wn(google.maps.event.addListener(C,"drag",b)))},[b]),c.useEffect(function(){C&&z&&(kt!==null&&google.maps.event.removeListener(kt),Sn(google.maps.event.addListener(C,"clickable_changed",z)))},[z]),c.useEffect(function(){C&&I&&(an!==null&&google.maps.event.removeListener(an),Hn(google.maps.event.addListener(C,"cursor_changed",I)))},[I]),c.useEffect(function(){C&&j&&(Rn!==null&&google.maps.event.removeListener(Rn),xr(google.maps.event.addListener(C,"animation_changed",j)))},[j]),c.useEffect(function(){C&&T&&(An!==null&&google.maps.event.removeListener(An),Sr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),c.useEffect(function(){C&&N&&(Vn!==null&&google.maps.event.removeListener(Vn),Ar(google.maps.event.addListener(C,"flat_changed",N)))},[N]),c.useEffect(function(){C&&K&&(qn!==null&&google.maps.event.removeListener(qn),Ri(google.maps.event.addListener(C,"icon_changed",K)))},[K]),c.useEffect(function(){C&&_&&(Gn!==null&&google.maps.event.removeListener(Gn),S(google.maps.event.addListener(C,"position_changed",_)))},[_]),c.useEffect(function(){C&&ie&&(oe!==null&&google.maps.event.removeListener(oe),ye(google.maps.event.addListener(C,"shape_changed",ie)))},[ie]),c.useEffect(function(){C&&re&&(je!==null&&google.maps.event.removeListener(je),Me(google.maps.event.addListener(C,"title_changed",re)))},[re]),c.useEffect(function(){C&&k&&(tt!==null&&google.maps.event.removeListener(tt),Ge(google.maps.event.addListener(C,"visible_changed",k)))},[k]),c.useEffect(function(){C&&H&&(at!==null&&google.maps.event.removeListener(at),Ut(google.maps.event.addListener(C,"zindex_changed",H)))},[H]),c.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 f=="string"&&Ee.setCursor(f),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&&Sn(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&&Ri(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&&Ut(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),kt!==null&&google.maps.event.removeListener(kt),an!==null&&google.maps.event.removeListener(an),Rn!==null&&google.maps.event.removeListener(Rn),An!==null&&google.maps.event.removeListener(An),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 Ht=c.useMemo(function(){return o?c.Children.map(o,function(nt){if(!c.isValidElement(nt))return nt;var Ee=nt;return c.cloneElement(Ee,{anchor:C})}):null},[o,C]);return x.jsx(x.Fragment,{children:Ht})||null}c.memo(ep);var tp=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=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=Be,e}(c.PureComponent),np=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),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(p!==null?"".concat(p.y,"px"):"0","; left: ").concat(p!==null?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var 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(f,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(l+this.width,"px, -").concat(f+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}(),rp=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 np(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 f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function ip(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var op=2e3,sp=500,ap="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",up="png",lp=[53,56,66,78,90],cp="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||ap,this.imageExtension=r.imageExtension||up,this.imageSizes=r.imageSizes||lp,this.calculator=r.calculator||ip,this.batchSize=r.batchSize||op,this.batchSizeIE=r.batchSizeIE||sp,this.clusterClass=r.clusterClass||cp,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 f=this.distanceBetweenPoints(u,l);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new rp(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 f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,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)}},fp={};function dp(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,f=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=c.useState(null),P=R[0],z=R[1],I=c.useContext(Be),j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1];return c.useEffect(function(){P&&w&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(P,bt.onMouseOut,w)))},[w]),c.useEffect(function(){P&&E&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(P,bt.onMouseOver,E)))},[E]),c.useEffect(function(){P&&B&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(P,bt.onClick,B)))},[B]),c.useEffect(function(){P&&b&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(P,bt.onClusteringBegin,b)))},[b]),c.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),ie(google.maps.event.addListener(P,bt.onClusteringEnd,O)))},[O]),c.useEffect(function(){typeof r<"u"&&P!==null&&Ie.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof i<"u"&&P!==null&&Ie.batchSizeIE(P,i)},[P,i]),c.useEffect(function(){typeof o<"u"&&P!==null&&Ie.calculator(P,o)},[P,o]),c.useEffect(function(){typeof s<"u"&&P!==null&&Ie.clusterClass(P,s)},[P,s]),c.useEffect(function(){typeof a<"u"&&P!==null&&Ie.enableRetinaIcons(P,a)},[P,a]),c.useEffect(function(){typeof u<"u"&&P!==null&&Ie.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&Ie.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&Ie.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof p<"u"&&P!==null&&Ie.imagePath(P,p)},[P,p]),c.useEffect(function(){typeof h<"u"&&P!==null&&Ie.imageSizes(P,h)},[P,h]),c.useEffect(function(){typeof g<"u"&&P!==null&&Ie.maxZoom(P,g)},[P,g]),c.useEffect(function(){typeof y<"u"&&P!==null&&Ie.minimumClusterSize(P,y)},[P,y]),c.useEffect(function(){typeof v<"u"&&P!==null&&Ie.styles(P,v)},[P,v]),c.useEffect(function(){typeof d<"u"&&P!==null&&Ie.title(P,d)},[P,d]),c.useEffect(function(){typeof D<"u"&&P!==null&&Ie.zoomOnClick(P,D)},[P,D]),c.useEffect(function(){if(I){var U=he({},n||fp),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),f&&Ie.imageExtension(M,f),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}c.memo(dp),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}(c.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,f=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<-f+y+h?i=d.y+f-y-h:d.y+f+y>u&&(i=d.y+f+y-u):d.y<-f+y?i=d.y+f-y:d.y+h+f+y>u&&(i=d.y+h+f+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)}},pp={};function hp(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,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){if(g){var _=r||pp,ie=_.position,re=Zi(_,["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)),f&&N(google.maps.event.addListener(H,"zindex_changed",f)),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?un.createPortal(c.Children.only(e),K.current):null}c.memo(hp),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=Zi(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?un.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.PureComponent);var vp=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(vp);const ga=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ki=1,Xn=8;class Xi{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!==Ki)throw new Error(`Got v${i} data when expected v${Ki}.`);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 Xi(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,(Ki<<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 Ji(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 f=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]),(f===0?e<=y:n<=v)&&(u.push(h),u.push(g-1),u.push(1-f)),(f===0?r>=y:i>=v)&&(u.push(g+1),u.push(p),u.push(1-f))}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 f=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]),(f===0?e-r<=y:n-r<=v)&&(a.push(h),a.push(g-1),a.push(1-f)),(f===0?e+r>=y:n+r>=v)&&(a.push(g+1),a.push(p),a.push(1-f))}return u}}function Ji(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;ma(t,e,s,r,i,o),Ji(t,e,n,r,s-1,1-o),Ji(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,f=n-r+1,p=Math.log(l),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(l-h)/l)*(f-l/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/l+g)),v=Math.min(i,Math.floor(n+(l-f)*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){Qi(t,n,r),Qi(e,2*n,2*r),Qi(e,2*n+1,2*r+1)}function Qi(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 gp={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)),fn=2,Rt=3,$i=4,Vt=5,Da=6;class mp{constructor(e){this.options=Object.assign(Object.create(gp),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[f,p]=l.geometry.coordinates,h=Ca(Mr(f)),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,f=[];for(const p of u){const h=this.stride*p;f.push(l[h+Vt]>1?Ea(l,h,this.clusterProps):this.points[l[h+Rt]])}return f}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],f=o.within(u,l,a),p=[];for(const h of f){const g=h*this.stride;s[g+$i]===e&&p.push(s[g+Vt]>1?Ea(s,g,this.clusterProps):this.points[s[g+Rt]])}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,f=(r+1+u)/o,p={features:[]};return this._addTileFeatures(i.range((n-u)/o,l,(n+1+u)/o,f),i.data,n,r,o,p),n===0&&this._addTileFeatures(i.range(1-u/o,l,1,f),i.data,o,r,o,p),n===o-1&&this._addTileFeatures(i.range(0,l,u/o,f),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 Xi(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+Vt]>1;let f,p,h;if(l)f=ba(n,u,this.clusterProps),p=n[u],h=n[u+1];else{const v=this.points[n[u+Rt]];f=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:f};let y;l||this.options.generateId?y=n[u+Rt]:y=this.points[n[u+Rt]].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=[],f=this.stride;for(let p=0;p<u.length;p+=f){if(u[p+fn]<=n)continue;u[p+fn]=n;const h=u[p],g=u[p+1],y=e.within(u[p],u[p+1],a),v=u[p+Vt];let d=v;for(const D of y){const B=D*f;u[B+fn]>n&&(d+=u[B+Vt])}if(d>v&&d>=s){let D=h*v,B=g*v,b,O=-1;const E=((p/f|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*f;if(u[A+fn]<=n)continue;u[A+fn]=n;const F=u[A+Vt];D+=u[A]*F,B+=u[A+1]*F,u[A+$i]=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+$i]=E,l.push(D/d,B/d,1/0,E,-1,d),o&&l.push(O)}else{for(let D=0;D<f;D++)l.push(u[p+D]);if(d>1)for(const D of y){const B=D*f;if(!(u[B+fn]<=n)){u[B+fn]=n;for(let b=0;b<f;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+Vt]>1){const s=this.clusterProps[e[n+Da]];return r?Object.assign({},s):s}const i=this.points[e[n+Rt]].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+Rt],properties:ba(t,e,n),geometry:{type:"Point",coordinates:[yp(t[e]),Cp(t[e+1])]}}}function ba(t,e,n){const r=t[e+Vt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Da],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Rt],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 yp(t){return(t-.5)*360}function Cp(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=c.useRef();return c.useEffect(function(){A.current&&f!==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=f},[f]),{isLoaded:D,loadError:O,url:w}}var Yd=x.jsx(ea,{});function Kd(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=Zd(s),u=a.isLoaded,l=a.loadError;return c.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),c.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),c.useEffect(function(){return function(){i&&i()}},[i]),u?o:e||Yd}c.memo(Kd);var na;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(na||(na={}));var ra={},ia={options:function(t,e){t.setOptions(e)}};function Xd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=c.useContext(Be),o=c.useState(null),s=o[0],a=o[1];return c.useEffect(function(){s!==null&&s.setMap(i)},[i]),c.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),c.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}c.memo(Xd),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:ia,eventMap:ra,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:ia,eventMap:ra,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}(c.PureComponent);function Jd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Be),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.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}c.memo(Jd),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}(c.PureComponent);function Qd(t){var e=t.onLoad,n=t.onUnmount,r=c.useContext(Be),i=c.useState(null),o=i[0],s=i[1];return c.useEffect(function(){o!==null&&o.setMap(r)},[r]),c.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}c.memo(Qd),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}(c.PureComponent);var oa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},sa={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function $d(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,f=t.onUnmount,p=c.useContext(Be),h=c.useState(null),g=h[0],y=h[1],v=c.useState(null),d=v[0],D=v[1],B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1];return c.useEffect(function(){g!==null&&g.setMap(p)},[p]),c.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),c.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),c.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),c.useEffect(function(){g&&i&&(b!==null&&google.maps.event.removeListener(b),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),c.useEffect(function(){g&&o&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",o)))},[g,o]),c.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(g,"polygoncomplete",s)))},[g,s]),c.useEffect(function(){g&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(g,"polylinecomplete",a)))},[g,a]),c.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),c.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),f&&f(g),g.setMap(null))}},[]),null}c.memo($d),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:sa,eventMap:oa,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:sa,eventMap:oa,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}(c.PureComponent);var aa={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"},ua={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 ep(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,f=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=c.useContext(Be),Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1],xe=c.useState(null),pt=xe[0],st=xe[1],sn=c.useState(null),xt=sn[0],Lt=sn[1],_n=c.useState(null),zn=_n[0],Wn=_n[1],Un=c.useState(null),kt=Un[0],Sn=Un[1],Wt=c.useState(null),an=Wt[0],Hn=Wt[1],Br=c.useState(null),Rn=Br[0],xr=Br[1],Wi=c.useState(null),An=Wi[0],Sr=Wi[1],Ui=c.useState(null),Vn=Ui[0],Ar=Ui[1],Lr=c.useState(null),qn=Lr[0],Hi=Lr[1],Ri=c.useState(null),Gn=Ri[0],S=Ri[1],$=c.useState(null),oe=$[0],ye=$[1],ke=c.useState(null),je=ke[0],Me=ke[1],Le=c.useState(null),tt=Le[0],Ge=Le[1],Je=c.useState(null),at=Je[0],Ut=Je[1];c.useEffect(function(){C!==null&&C.setMap(ee)},[ee]),c.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),c.useEffect(function(){typeof s<"u"&&C!==null&&C.setDraggable(s)},[C,s]),c.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),c.useEffect(function(){typeof a<"u"&&C!==null&&C.setVisible(a)},[C,a]),c.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),c.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),c.useEffect(function(){C&&f!==void 0&&C.setCursor(f)},[C,f]),c.useEffect(function(){C&&p!==void 0&&C.setIcon(p)},[C,p]),c.useEffect(function(){C&&h!==void 0&&C.setLabel(h)},[C,h]),c.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),c.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),c.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),c.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),c.useEffect(function(){C&&B&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(C,"dblclick",B)))},[B]),c.useEffect(function(){C&&O&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(C,"dragend",O)))},[O]),c.useEffect(function(){C&&E&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(C,"dragstart",E)))},[E]),c.useEffect(function(){C&&R&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(C,"mousedown",R)))},[R]),c.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(C,"mouseout",w)))},[w]),c.useEffect(function(){C&&A&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),c.useEffect(function(){C&&F&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(C,"mouseup",F)))},[F]),c.useEffect(function(){C&&P&&(pt!==null&&google.maps.event.removeListener(pt),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),c.useEffect(function(){C&&D&&(xt!==null&&google.maps.event.removeListener(xt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),c.useEffect(function(){C&&b&&(zn!==null&&google.maps.event.removeListener(zn),Wn(google.maps.event.addListener(C,"drag",b)))},[b]),c.useEffect(function(){C&&z&&(kt!==null&&google.maps.event.removeListener(kt),Sn(google.maps.event.addListener(C,"clickable_changed",z)))},[z]),c.useEffect(function(){C&&I&&(an!==null&&google.maps.event.removeListener(an),Hn(google.maps.event.addListener(C,"cursor_changed",I)))},[I]),c.useEffect(function(){C&&j&&(Rn!==null&&google.maps.event.removeListener(Rn),xr(google.maps.event.addListener(C,"animation_changed",j)))},[j]),c.useEffect(function(){C&&T&&(An!==null&&google.maps.event.removeListener(An),Sr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),c.useEffect(function(){C&&N&&(Vn!==null&&google.maps.event.removeListener(Vn),Ar(google.maps.event.addListener(C,"flat_changed",N)))},[N]),c.useEffect(function(){C&&K&&(qn!==null&&google.maps.event.removeListener(qn),Hi(google.maps.event.addListener(C,"icon_changed",K)))},[K]),c.useEffect(function(){C&&_&&(Gn!==null&&google.maps.event.removeListener(Gn),S(google.maps.event.addListener(C,"position_changed",_)))},[_]),c.useEffect(function(){C&&ie&&(oe!==null&&google.maps.event.removeListener(oe),ye(google.maps.event.addListener(C,"shape_changed",ie)))},[ie]),c.useEffect(function(){C&&re&&(je!==null&&google.maps.event.removeListener(je),Me(google.maps.event.addListener(C,"title_changed",re)))},[re]),c.useEffect(function(){C&&k&&(tt!==null&&google.maps.event.removeListener(tt),Ge(google.maps.event.addListener(C,"visible_changed",k)))},[k]),c.useEffect(function(){C&&H&&(at!==null&&google.maps.event.removeListener(at),Ut(google.maps.event.addListener(C,"zindex_changed",H)))},[H]),c.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 f=="string"&&Ee.setCursor(f),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&&Sn(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&&Ut(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),kt!==null&&google.maps.event.removeListener(kt),an!==null&&google.maps.event.removeListener(an),Rn!==null&&google.maps.event.removeListener(Rn),An!==null&&google.maps.event.removeListener(An),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 Ht=c.useMemo(function(){return o?c.Children.map(o,function(nt){if(!c.isValidElement(nt))return nt;var Ee=nt;return c.cloneElement(Ee,{anchor:C})}):null},[o,C]);return x.jsx(x.Fragment,{children:Ht})||null}c.memo(ep);var tp=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:ua,eventMap:aa,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:ua,eventMap:aa,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=c.Children.map(this.props.children,function(i){if(!c.isValidElement(i))return i;var o=i;return c.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=Be,e}(c.PureComponent),np=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),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(p!==null?"".concat(p.y,"px"):"0","; left: ").concat(p!==null?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var 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(f,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(f,"px, -").concat(l+this.width,"px, -").concat(f+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}(),rp=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 np(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 f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function ip(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var op=2e3,sp=500,ap="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",up="png",lp=[53,56,66,78,90],cp="cluster",la=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||ap,this.imageExtension=r.imageExtension||up,this.imageSizes=r.imageSizes||lp,this.calculator=r.calculator||ip,this.batchSize=r.batchSize||op,this.batchSizeIE=r.batchSizeIE||sp,this.clusterClass=r.clusterClass||cp,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 f=this.distanceBetweenPoints(u,l);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new rp(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 f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,a)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,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)}},fp={};function dp(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,f=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=c.useState(null),P=R[0],z=R[1],I=c.useContext(Be),j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1];return c.useEffect(function(){P&&w&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(P,bt.onMouseOut,w)))},[w]),c.useEffect(function(){P&&E&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(P,bt.onMouseOver,E)))},[E]),c.useEffect(function(){P&&B&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(P,bt.onClick,B)))},[B]),c.useEffect(function(){P&&b&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(P,bt.onClusteringBegin,b)))},[b]),c.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),ie(google.maps.event.addListener(P,bt.onClusteringEnd,O)))},[O]),c.useEffect(function(){typeof r<"u"&&P!==null&&Ie.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof i<"u"&&P!==null&&Ie.batchSizeIE(P,i)},[P,i]),c.useEffect(function(){typeof o<"u"&&P!==null&&Ie.calculator(P,o)},[P,o]),c.useEffect(function(){typeof s<"u"&&P!==null&&Ie.clusterClass(P,s)},[P,s]),c.useEffect(function(){typeof a<"u"&&P!==null&&Ie.enableRetinaIcons(P,a)},[P,a]),c.useEffect(function(){typeof u<"u"&&P!==null&&Ie.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&Ie.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&Ie.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof p<"u"&&P!==null&&Ie.imagePath(P,p)},[P,p]),c.useEffect(function(){typeof h<"u"&&P!==null&&Ie.imageSizes(P,h)},[P,h]),c.useEffect(function(){typeof g<"u"&&P!==null&&Ie.maxZoom(P,g)},[P,g]),c.useEffect(function(){typeof y<"u"&&P!==null&&Ie.minimumClusterSize(P,y)},[P,y]),c.useEffect(function(){typeof v<"u"&&P!==null&&Ie.styles(P,v)},[P,v]),c.useEffect(function(){typeof d<"u"&&P!==null&&Ie.title(P,d)},[P,d]),c.useEffect(function(){typeof D<"u"&&P!==null&&Ie.zoomOnClick(P,D)},[P,D]),c.useEffect(function(){if(I){var U=he({},n||fp),M=new la(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),f&&Ie.imageExtension(M,f),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}c.memo(dp),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 la(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}(c.PureComponent);function ca(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var fa=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||ca(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,ca))}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,f=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<-f+y+h?i=d.y+f-y-h:d.y+f+y>u&&(i=d.y+f+y-u):d.y<-f+y?i=d.y+f-y:d.y+h+f+y>u&&(i=d.y+h+f+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}(),da={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},pa={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)}},pp={};function hp(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,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(function(){if(g){var _=r||pp,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 fa(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)),f&&N(google.maps.event.addListener(H,"zindex_changed",f)),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?un.createPortal(c.Children.only(e),K.current):null}c.memo(hp),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 fa(he(he({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Oe({updaterMap:pa,eventMap:da,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:pa,eventMap:da,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?un.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.PureComponent);var vp=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},ha=Zs(vp);const va=[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=va[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=va.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 f=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]),(f===0?e<=y:n<=v)&&(u.push(h),u.push(g-1),u.push(1-f)),(f===0?r>=y:i>=v)&&(u.push(g+1),u.push(p),u.push(1-f))}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 f=a.pop()||0,p=a.pop()||0,h=a.pop()||0;if(p-h<=s){for(let d=h;d<=p;d++)ma(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];ma(y,v,e,n)<=l&&u.push(i[g]),(f===0?e-r<=y:n-r<=v)&&(a.push(h),a.push(g-1),a.push(1-f)),(f===0?e+r>=y:n+r>=v)&&(a.push(g+1),a.push(p),a.push(1-f))}return u}}function Xi(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;ga(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 ga(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const l=i-r+1,f=n-r+1,p=Math.log(l),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(l-h)/l)*(f-l/2<0?-1:1),y=Math.max(r,Math.floor(n-f*h/l+g)),v=Math.min(i,Math.floor(n+(l-f)*h/l+g));ga(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 ma(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const gp={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ya=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),fn=2,Rt=3,Qi=4,Vt=5,Ca=6;class mp{constructor(e){this.options=Object.assign(Object.create(gp),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[f,p]=l.geometry.coordinates,h=ya(Mr(f)),g=ya(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,f=[];for(const p of u){const h=this.stride*p;f.push(l[h+Vt]>1?Da(l,h,this.clusterProps):this.points[l[h+Rt]])}return f}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],f=o.within(u,l,a),p=[];for(const h of f){const g=h*this.stride;s[g+Qi]===e&&p.push(s[g+Vt]>1?Da(s,g,this.clusterProps):this.points[s[g+Rt]])}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,f=(r+1+u)/o,p={features:[]};return this._addTileFeatures(i.range((n-u)/o,l,(n+1+u)/o,f),i.data,n,r,o,p),n===0&&this._addTileFeatures(i.range(1-u/o,l,1,f),i.data,o,r,o,p),n===o-1&&this._addTileFeatures(i.range(0,l,u/o,f),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+Vt]>1;let f,p,h;if(l)f=Ea(n,u,this.clusterProps),p=n[u],h=n[u+1];else{const v=this.points[n[u+Rt]];f=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:f};let y;l||this.options.generateId?y=n[u+Rt]:y=this.points[n[u+Rt]].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=[],f=this.stride;for(let p=0;p<u.length;p+=f){if(u[p+fn]<=n)continue;u[p+fn]=n;const h=u[p],g=u[p+1],y=e.within(u[p],u[p+1],a),v=u[p+Vt];let d=v;for(const D of y){const B=D*f;u[B+fn]>n&&(d+=u[B+Vt])}if(d>v&&d>=s){let D=h*v,B=g*v,b,O=-1;const E=((p/f|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*f;if(u[A+fn]<=n)continue;u[A+fn]=n;const F=u[A+Vt];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<f;D++)l.push(u[p+D]);if(d>1)for(const D of y){const B=D*f;if(!(u[B+fn]<=n)){u[B+fn]=n;for(let b=0;b<f;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+Vt]>1){const s=this.clusterProps[e[n+Ca]];return r?Object.assign({},s):s}const i=this.points[e[n+Rt]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Da(t,e,n){return{type:"Feature",id:t[e+Rt],properties:Ea(t,e,n),geometry:{type:"Point",coordinates:[yp(t[e]),Cp(t[e+1])]}}}function Ea(t,e,n){const r=t[e+Vt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Ca],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Rt],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 yp(t){return(t-.5)*360}function Cp(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
54
54
  Copyright (c) Microsoft Corporation.
55
55
 
56
56
  Permission to use, copy, modify, and/or distribute this software for any
@@ -63,52 +63,52 @@ React keys must be passed directly to JSX without using spread:
63
63
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
64
64
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65
65
  PERFORMANCE OF THIS SOFTWARE.
66
- ***************************************************************************** */function Dp(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class mt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class eo{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(mt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>mt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(mt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Ep{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return bp(e)}}const bp=t=>t.map(n=>new eo({position:mt.getPosition(n),markers:[n]}));class wp extends Ep{constructor(e){var{maxZoom:n,radius:r=60}=e,i=Dp(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new mp(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!va(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=mt.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:o}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!va(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new eo({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new eo({markers:[i],position:mt.getPosition(i)})}}class Bp{constructor(e,n){this.markers={sum:e.length};const r=n.map(o=>o.count),i=r.reduce((o,s)=>o+s,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class xp{render({count:e,position:n},r,i){const s=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
66
+ ***************************************************************************** */function Dp(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class mt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class $i{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(mt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>mt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(mt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Ep{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return bp(e)}}const bp=t=>t.map(n=>new $i({position:mt.getPosition(n),markers:[n]}));class wp extends Ep{constructor(e){var{maxZoom:n,radius:r=60}=e,i=Dp(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new mp(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!ha(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(o=>{const s=mt.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:o}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!ha(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new $i({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new $i({markers:[i],position:mt.getPosition(i)})}}class Bp{constructor(e,n){this.markers={sum:e.length};const r=n.map(o=>o.count),i=r.reduce((o,s)=>o+s,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class xp{render({count:e,position:n},r,i){const s=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
67
67
  <circle cx="120" cy="120" opacity=".6" r="70" />
68
68
  <circle cx="120" cy="120" opacity=".3" r="90" />
69
69
  <circle cx="120" cy="120" opacity=".2" r="110" />
70
70
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
71
- </svg>`,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 Sp(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class to{constructor(){Sp(to,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Ap=(t,e,n)=>{n.fitBounds(e.bounds)};class Lp extends to{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new wp(r),renderer:o=new xp,onClusterClick:s=Ap}){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 Bp(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 Op(t){var e=_d(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new Lp(he(he({},t),{map:e}));i(o)}},[e]),r}function Pp(t){var e=t.children,n=t.options,r=Op(n);return r!==null?e(r):null}c.memo(Pp);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 Fp(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,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.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)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.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?un.createPortal(c.Children.only(e),K.current):null}c.memo(Fp),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?un.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.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)}},Mp={};function kp(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,f=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=c.useContext(Be),O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1];return c.useEffect(function(){E!==null&&E.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),c.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),c.useEffect(function(){E&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),c.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),c.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),c.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),c.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||Mp),{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)),f&&H(google.maps.event.addListener(ge,"mousemove",f)),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}c.memo(kp),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}(c.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 Tp(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,f=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=c.useContext(Be),w=c.useState(null),A=w[0],F=w[1],R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1];return c.useEffect(function(){A!==null&&A.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),c.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),c.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),c.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]),c.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),c.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),c.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.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)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),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}c.memo(Tp),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}(c.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 Ip(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,f=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=c.useContext(Be),E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.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)),f&&J(google.maps.event.addListener(de,"mousemove",f)),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}c.memo(Ip),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}(c.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)}},jp={};function Np(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,f=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=c.useContext(Be),A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1];return c.useEffect(function(){F!==null&&F.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),c.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),c.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),c.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),c.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),c.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),c.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),c.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),c.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),c.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",f)))},[f]),c.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),c.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),c.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),c.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),c.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),c.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),c.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),c.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),c.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),c.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||jp),{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)),f&&H(google.maps.event.addListener(xe,"mousedown",f)),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}c.memo(Np),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}(c.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 _p(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,f=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Be),B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),c.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),c.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),c.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),c.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),c.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),c.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),c.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),c.useEffect(function(){b&&f&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",f)))},[f]),c.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),c.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),c.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),c.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),c.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)),f&&te(google.maps.event.addListener(de,"addfeature",f)),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}c.memo(_p),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}(c.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})(c.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function zp(t,e){return new e(t.lat,t.lng)}function Wp(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 Up(t,e,n){return t instanceof e?t:n(t,e)}function Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(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 Vp(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?Rp(t,e,Hp(n,google.maps.LatLngBounds,Wp)):Vp(t,e,Up(r,google.maps.LatLng,zp))}function qp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Gp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,f,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,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}),f=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(f);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 Zp(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=c.useContext(Be),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(function(){return Gp(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Hs.createPortal(u,f)}c.memo(Zp),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,f=u.top,p=u.width,h=u.height;qp(a,{left:l,top:f,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=c.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:c.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}(c.PureComponent);function Yp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Kp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.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}c.memo(Kp),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:Yp},e.contextType=Be,e}(c.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 Xp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(Be),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.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}c.memo(Xp),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}(c.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})(c.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}(c.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}(c.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})(c.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}(c.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Jp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.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:c.Children.only(this.props.children)})},e.contextType=Be,e}(c.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=c.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:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(c.PureComponent);function Qp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(qd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(tp,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function $p(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function eh(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=c.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 th(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 nh(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 rh(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 ih(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 oh(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:f,...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),f,Pr(g,a)]})]})}const $a=c.createContext({});function sh(t){var p,h;const e=Ln.useActionData(),{children:n,className:r,id:i,...o}=t,s=c.useRef(null),a=((p=s.current)==null?void 0:p.name)||"",u=((h=e==null?void 0:e.fieldErrors)==null?void 0:h[a])||null,l=c.useId(),f=`arkynFormController ${r}`;return x.jsx($a.Provider,{value:{error:u,id:l,inputRef:s},children:x.jsx("section",{id:i||a||void 0,className:f.trim(),...o,children:n})})}function yt(){return c.useContext($a)}function ah(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:f,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=c.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:f,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 uh(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 lh(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 qt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function no(t){return t&&t.replace(/[^0-9]/g,"")}function eu(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 tu(t){return t.length>11?"CNPJ":"CPF"}const ro={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},nu=no(ro.CNPJ).length;function ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=no(T);const K=tu(N);if(!(N.length>nu))return N=eu(N,ro[K]),N}const E=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 fh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=ch({...t,id:o,isError:u},e),[I,j]=c.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=no(J.target.value);const ee=tu(q);q.length>nu||(q=eu(q,ro[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:f,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 dh=3,ph=(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?dh:0),Tr=2,ru=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),io=t=>{let e=t;return typeof t=="string"?(e=ru(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),ru(e)/10**Tr},iu=(t,e,n)=>{if(!e)return[0,""];const r=io(e),i=ph(t,r,n);return[r,i]};function hh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,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=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 vh(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),o=c.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,f=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}=hh({...t,id:a,isError:f},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]=iu(N,M,T);return!z||X<=z?(i(te),[X,te]):[io(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 c.useEffect(()=>{const M=P||+_||void 0,[,X]=iu(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:io(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function gh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 mh=c.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function yh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=gh({...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:f,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Cd.InputMask,{component:mh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=f?"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:qt(a,z,"prefix"),sufix:qt(u,z,"sufix"),LeftIcon:l,RightIcon:f,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 Dh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=Ch({...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:f,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 ou(t){return t.type==="currency"?x.jsx(vh,{...t}):t.type==="masked"?x.jsx(yh,{...t}):t.type==="cpf-cnpj"?x.jsx(fh,{...t}):x.jsx(Dh,{...t})}function Eh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=c.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const B=f.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=f.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(Jp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(ou,{type:"text",onChange:u=>t(u.target.value),...r})})}function bh(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 su=c.createContext({});function wh(){return c.useContext(su)}function Bh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(su.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:f,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function xh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=wh(),{error:f}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"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 Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});for(var Sh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),oo={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},au={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Sh?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},so={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++)so["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 uu(s,e)}),i=function(a){return r.some(function(u){return lu(u,a)})},o=n==null?i:i(n);return o}function Ah(t,e){return jr(t,e)}function Lh(t,e){return jr(t,{byKey:!0},e)}function uu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in oo)r[oo[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),p;!(a=(p=f.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=ao(h),v=oo[y];if(h.length>1&&!v&&!au[h]&&!so[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=cu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function lu(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 cu(t){t=ao(t);var e=so[t]||t.toUpperCase().charCodeAt(0);return e}function ao(t){return t=t.toLowerCase(),t=au[t]||t,t}var Oh=Tt.default=jr,uo=Tt.isHotkey=jr;Tt.isCodeHotkey=Ah,Tt.isKeyHotkey=Lh,Tt.parseHotkey=uu,Tt.compareHotkey=lu,Tt.toKeyCode=cu,Tt.toKeyName=ao;/*!
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 Sp(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Sp(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Ap=(t,e,n)=>{n.fitBounds(e.bounds)};class Lp extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new wp(r),renderer:o=new xp,onClusterClick:s=Ap}){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 Bp(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 Op(t){var e=_d(),n=c.useState(null),r=n[0],i=n[1];return c.useEffect(function(){if(e&&r===null){var o=new Lp(he(he({},t),{map:e}));i(o)}},[e]),r}function Pp(t){var e=t.children,n=t.options,r=Op(n);return r!==null?e(r):null}c.memo(Pp);var ba={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},wa={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Fp(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,f=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=c.useContext(Be),y=c.useState(null),v=y[0],d=y[1],D=c.useState(null),B=D[0],b=D[1],O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useRef(null);return c.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),c.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),c.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),c.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),c.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),c.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(function(){v&&f&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.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)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.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?un.createPortal(c.Children.only(e),K.current):null}c.memo(Fp),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:wa,eventMap:ba,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:wa,eventMap:ba,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?un.createPortal(c.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(c.PureComponent);var Ba={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},xa={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)}},Mp={};function kp(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,f=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=c.useContext(Be),O=c.useState(null),E=O[0],w=O[1],A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1];return c.useEffect(function(){E!==null&&E.setMap(b)},[b]),c.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),c.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),c.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),c.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),c.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),c.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),c.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),c.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),c.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),c.useEffect(function(){E&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",f)))},[f]),c.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),c.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),c.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),c.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),c.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),c.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),c.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||Mp),{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)),f&&H(google.maps.event.addListener(ge,"mousemove",f)),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}c.memo(kp),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:xa,eventMap:Ba,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:xa,eventMap:Ba,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}(c.PureComponent);var Sa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Aa={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 Tp(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,f=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=c.useContext(Be),w=c.useState(null),A=w[0],F=w[1],R=c.useState(null),P=R[0],z=R[1],I=c.useState(null),j=I[0],T=I[1],N=c.useState(null),K=N[0],_=N[1],ie=c.useState(null),re=ie[0],k=ie[1],H=c.useState(null),J=H[0],q=H[1],ee=c.useState(null),Y=ee[0],C=ee[1],W=c.useState(null),U=W[0],M=W[1],X=c.useState(null),te=X[0],G=X[1],le=c.useState(null),se=le[0],pe=le[1],ve=c.useState(null),Ce=ve[0],me=ve[1],De=c.useState(null),ge=De[0],Ne=De[1];return c.useEffect(function(){A!==null&&A.setMap(E)},[E]),c.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),c.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),c.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),c.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),c.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),c.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),c.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]),c.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(function(){A&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),c.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),c.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),c.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),c.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),c.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),c.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)),f&&k(google.maps.event.addListener(ae,"mousedown",f)),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}c.memo(Tp),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:Aa,eventMap:Sa,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:Aa,eventMap:Sa,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}(c.PureComponent);var La={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"},Oa={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 Ip(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,f=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=c.useContext(Be),E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){w!==null&&w.setMap(O)},[O]),c.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),c.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),c.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),c.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),c.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)),f&&J(google.maps.event.addListener(de,"mousemove",f)),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}c.memo(Ip),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:Oa,eventMap:La,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:Oa,eventMap:La,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}(c.PureComponent);var Pa={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"},Fa={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)}},jp={};function Np(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,f=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=c.useContext(Be),A=c.useState(null),F=A[0],R=A[1],P=c.useState(null),z=P[0],I=P[1],j=c.useState(null),T=j[0],N=j[1],K=c.useState(null),_=K[0],ie=K[1],re=c.useState(null),k=re[0],H=re[1],J=c.useState(null),q=J[0],ee=J[1],Y=c.useState(null),C=Y[0],W=Y[1],U=c.useState(null),M=U[0],X=U[1],te=c.useState(null),G=te[0],le=te[1],se=c.useState(null),pe=se[0],ve=se[1],Ce=c.useState(null),me=Ce[0],De=Ce[1],ge=c.useState(null),Ne=ge[0],ae=ge[1],Ue=c.useState(null),de=Ue[0],we=Ue[1],Te=c.useState(null),Xe=Te[0],$e=Te[1];return c.useEffect(function(){F!==null&&F.setMap(w)},[w]),c.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),c.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),c.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),c.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),c.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),c.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),c.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),c.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),c.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),c.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",f)))},[f]),c.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),c.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),c.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),c.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),c.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),c.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),c.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),c.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),c.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),c.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||jp),{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)),f&&H(google.maps.event.addListener(xe,"mousedown",f)),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}c.memo(Np),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:Fa,eventMap:Pa,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:Fa,eventMap:Pa,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}(c.PureComponent);var Ma={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},ka={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 _p(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,f=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=c.useContext(Be),B=c.useState(null),b=B[0],O=B[1],E=c.useState(null),w=E[0],A=E[1],F=c.useState(null),R=F[0],P=F[1],z=c.useState(null),I=z[0],j=z[1],T=c.useState(null),N=T[0],K=T[1],_=c.useState(null),ie=_[0],re=_[1],k=c.useState(null),H=k[0],J=k[1],q=c.useState(null),ee=q[0],Y=q[1],C=c.useState(null),W=C[0],U=C[1],M=c.useState(null),X=M[0],te=M[1],G=c.useState(null),le=G[0],se=G[1],pe=c.useState(null),ve=pe[0],Ce=pe[1],me=c.useState(null),De=me[0],ge=me[1],Ne=c.useState(null),ae=Ne[0],Ue=Ne[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),c.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),c.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),c.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),c.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),c.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),c.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),c.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),c.useEffect(function(){b&&f&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",f)))},[f]),c.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),c.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),c.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),c.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),c.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)),f&&te(google.maps.event.addListener(de,"addfeature",f)),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}c.memo(_p),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:ka,eventMap:Ma,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:ka,eventMap:Ma,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}(c.PureComponent);var Ta={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Ia={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:Ia,eventMap:Ta,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:Ia,eventMap:Ta,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})(c.PureComponent);function ja(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function zp(t,e){return new e(t.lat,t.lng)}function Wp(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 Up(t,e,n){return t instanceof e?t:n(t,e)}function Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(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 Vp(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 Na(t,e,n,r){return n!==void 0?Rp(t,e,Hp(n,google.maps.LatLngBounds,Wp)):Vp(t,e,Up(r,google.maps.LatLng,zp))}function qp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Gp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,f,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,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?ja(this.container,i):{x:0,y:0}),f=Na(u,l,this.bounds,this.position),p=0,h=Object.entries(f);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 _a(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function za(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 Zp(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=c.useContext(Be),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(function(){return Gp(f,r,e,n,a)},[f,r,e,n]);return c.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),c.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Us.createPortal(u,f)}c.memo(Zp),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?ja(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Na(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,p=u.width,h=u.height;qp(a,{left:l,top:f,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=c.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=_a(n.position),i=_a(this.props.position),o=za(n.bounds),s=za(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?Us.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.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}(c.PureComponent);function Yp(){}var Wa={onDblClick:"dblclick",onClick:"click"},Ua={opacity:function(t,e){t.setOpacity(e)}};function Kp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=c.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=c.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),c.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),c.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}c.memo(Kp),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:Ua,eventMap:Wa,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:Ua,eventMap:Wa,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:Yp},e.contextType=Be,e}(c.PureComponent);var Ha={},Ra={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Xp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=c.useContext(Be),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(function(){a!==null&&a.setMap(o)},[o]),c.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),c.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}c.memo(Xp),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:Ra,eventMap:Ha,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:Ra,eventMap:Ha,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}(c.PureComponent);var Va={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},qa={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:qa,eventMap:Va,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:qa,eventMap:Va,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})(c.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}(c.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}(c.PureComponent);var Ga={onDirectionsChanged:"directions_changed"},Za={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:Za,eventMap:Ga,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:Za,eventMap:Ga,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})(c.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}(c.PureComponent);var Ya={onPlacesChanged:"places_changed"},Ka={bounds:function(t,e){t.setBounds(e)}},Jp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=c.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:Ka,eventMap:Ya,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:Ka,eventMap:Ya,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:c.Children.only(this.props.children)})},e.contextType=Be,e}(c.PureComponent),Xa={onPlaceChanged:"place_changed"},Ja={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=c.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:Ja,eventMap:Xa,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:Ja,eventMap:Xa,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:c.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(c.PureComponent);function Qp({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(qd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(tp,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function $p(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function eh(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=c.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 th(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 nh(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 rh(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 ih(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 oh(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:f,...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),f,Pr(g,a)]})]})}const Qa=c.createContext({});function sh(t){var p,h;const e=Ln.useActionData(),{children:n,className:r,id:i,...o}=t,s=c.useRef(null),a=((p=s.current)==null?void 0:p.name)||"",u=((h=e==null?void 0:e.fieldErrors)==null?void 0:h[a])||null,l=c.useId(),f=`arkynFormController ${r}`;return x.jsx(Qa.Provider,{value:{error:u,id:l,inputRef:s},children:x.jsx("section",{id:i||a||void 0,className:f.trim(),...o,children:n})})}function yt(){return c.useContext(Qa)}function ah(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:f,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=c.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:f,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 uh(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 lh(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 qt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function to(t){return t&&t.replace(/[^0-9]/g,"")}function $a(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 eu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},tu=to(no.CNPJ).length;function ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,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=eu(N);if(!(N.length>tu))return N=$a(N,no[K]),N}const E=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 fh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=ch({...t,id:o,isError:u},e),[I,j]=c.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=eu(q);q.length>tu||(q=$a(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:f,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 dh=3,ph=(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?dh:0),Tr=2,nu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=nu(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),nu(e)/10**Tr},ru=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=ph(t,r,n);return[r,i]};function hh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,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=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 vh(t){const[e,n]=c.useState(!1),[r,i]=c.useState("0"),o=c.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,f=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}=hh({...t,id:a,isError:f},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]=ru(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 c.useEffect(()=>{const M=P||+_||void 0,[,X]=ru(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 gh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=f?"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:qt(a,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:l,RightIcon:f,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 mh=c.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function yh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=gh({...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:f,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Cd.InputMask,{component:mh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Ch(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=f?"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:qt(a,z,"prefix"),sufix:qt(u,z,"sufix"),LeftIcon:l,RightIcon:f,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 Dh(t){const[e,n]=c.useState(!1),r=c.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:f,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}=Ch({...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:f,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 iu(t){return t.type==="currency"?x.jsx(vh,{...t}):t.type==="masked"?x.jsx(yh,{...t}):t.type==="cpf-cnpj"?x.jsx(fh,{...t}):x.jsx(Dh,{...t})}function Eh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=c.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const B=f.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=f.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(Jp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(iu,{type:"text",onChange:u=>t(u.target.value),...r})})}function bh(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 ou=c.createContext({});function wh(){return c.useContext(ou)}function Bh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(ou.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:f,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function xh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=wh(),{error:f}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"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 Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});for(var Sh=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},su={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Sh?"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 au(s,e)}),i=function(a){return r.some(function(u){return uu(u,a)})},o=n==null?i:i(n);return o}function Ah(t,e){return jr(t,e)}function Lh(t,e){return jr(t,{byKey:!0},e)}function au(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 f=i[Symbol.iterator](),p;!(a=(p=f.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&&!su[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=lu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function uu(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 lu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=su[t]||t,t}var Oh=Tt.default=jr,ao=Tt.isHotkey=jr;Tt.isCodeHotkey=Ah,Tt.isKeyHotkey=Lh,Tt.parseHotkey=au,Tt.compareHotkey=uu,Tt.toKeyCode=lu,Tt.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 fu(t){return Object.prototype.toString.call(t)==="[object Object]"}function ut(t){var e,n;return fu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(fu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var du=Symbol.for("immer-nothing"),pu=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state"),Ph=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=Ph[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 dn(t){return!!t&&!!t[Ct]}function pn(t){var e;return t?hu(t)||Array.isArray(t)||!!t[pu]||!!((e=t.constructor)!=null&&e[pu])||zr(t)||Wr(t):!1}var Fh=Object.prototype.constructor.toString();function hu(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)===Fh}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 lo(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function vu(t,e,n){const r=_r(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Mh(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 hn(t){return t.copy_||t.base_}function co(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=hu(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 fo(t,e=!1){return Ur(t)||dn(t)||!pn(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=kh),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>fo(r,!0))),t}function kh(){ht(2)}function Ur(t){return Object.isFrozen(t)}var Th={};function vn(t){const e=Th[t];return e||ht(0,t),e}var $n;function gu(){return $n}function Ih(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mu(t,e){e&&(vn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function po(t){ho(t),t.drafts_.forEach(jh),t.drafts_=null}function ho(t){t===$n&&($n=t.parent_)}function yu(t){return $n=Ih($n,t)}function jh(t){const e=t[Ct];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Cu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Ct].modified_&&(po(e),ht(4)),pn(t)&&(t=Hr(e,t),e.parent_||Rr(e,t)),e.patches_&&vn("Patches").generateReplacementPatches_(n[Ct].base_,t,e.patches_,e.inversePatches_)):t=Hr(e,n,[]),po(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==du?t:void 0}function Hr(t,e,n){if(Ur(e))return e;const r=e[Ct];if(!r)return Nr(e,(i,o)=>Du(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)=>Du(t,r,i,a,u,n,s)),Rr(t,i,!1),n&&t.patches_&&vn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Du(t,e,n,r,i,o,s){if(process.env.NODE_ENV!=="production"&&i===n&&ht(5),dn(i)){const a=o&&e&&e.type_!==3&&!lo(e.assigned_,r)?o.concat(r):void 0,u=Hr(t,i,a);if(vu(n,r,u),dn(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(pn(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_&&fo(e,n)}function Nh(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:gu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=vo;n&&(i=[r],o=er);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var vo={get(t,e){if(e===Ct)return t;const n=hn(t);if(!lo(n,e))return _h(t,n,e);const r=n[e];return t.finalized_||!pn(r)?r:r===go(t.base_,e)?(yo(t),t.copy_[e]=Co(r,t)):r},has(t,e){return e in hn(t)},ownKeys(t){return Reflect.ownKeys(hn(t))},set(t,e,n){const r=Eu(hn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=go(hn(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(Mh(n,i)&&(n!==void 0||lo(t.base_,e)))return!0;yo(t),mo(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 go(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,yo(t),mo(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=hn(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(vo,(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),vo.set.call(this,t[0],e,n,t[0])};function go(t,e){const n=t[Ct];return(n?hn(n):t)[e]}function _h(t,e,n){var i;const r=Eu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Eu(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 mo(t){t.modified_||(t.modified_=!0,t.parent_&&mo(t.parent_))}function yo(t){t.copy_||(t.copy_=co(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var zh=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,f=>n.call(this,f,...l))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let i;if(pn(e)){const o=yu(this),s=Co(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?po(o):ho(o)}return mu(o,r),Cu(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===du&&(i=void 0),this.autoFreeze_&&fo(i,!0),r){const o=[],s=[];vn("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){pn(t)||ht(8),dn(t)&&(t=Wh(t));const e=yu(this),n=Co(t,void 0);return n[Ct].isManual_=!0,ho(e),n}finishDraft(t,e){const n=t&&t[Ct];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return mu(r,e),Cu(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=vn("Patches").applyPatches_;return dn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Co(t,e){const n=zr(t)?vn("MapSet").proxyMap_(t,e):Wr(t)?vn("MapSet").proxySet_(t,e):Nh(t,e);return(e?e.scope_:gu()).drafts_.push(n),n}function Wh(t){return dn(t)||ht(10,t),bu(t)}function bu(t){if(!pn(t)||Ur(t))return t;const e=t[Ct];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=co(t,e.scope_.immer_.useStrictShallowCopy_)}else n=co(t,!0);return Nr(n,(r,i)=>{vu(n,r,bu(i))}),e&&(e.finalized_=!1),n}var Dt=new zh,Do=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt);var wu=Dt.createDraft.bind(Dt),Bu=Dt.finishDraft.bind(Dt),Uh={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()}}},Hh={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()}}},Rh={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,xu=new WeakMap,Su=new WeakMap,Au=new WeakMap,Lu=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:f}=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]>=f&&(r[l.length-1]+=1,r[l.length]-=f);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 Vh(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 qh(t){var e=Vh(t,"string");return nr(e)==="symbol"?e:String(e)}function lt(t,e,n){return e=qh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ou(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?Ou(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gh=(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:f,text:p}=n;if(p.length===0)break;var h=ne.leaf(t,l),g=h.text.slice(0,f),y=h.text.slice(f);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),sn=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(sn.children.splice(xt+1,0,Lt),e)for(var[kt,Sn]of V.points(e))e[Sn]=Ae.transform(kt,n);break}}return e},Zh={transform(t,e){t.children=wu(t.children);var n=t.selection&&wu(t.selection);try{n=Gh(t,n,e)}finally{t.children=Bu(t.children),n?t.selection=dn(n)?Bu(n):n:t.selection=null}}},Yh={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)}},Kh={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)}},Pu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ut(r)&&ut(i)){if(!Pu(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 Xh(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 It(t,e){if(t==null)return{};var n=Xh(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 Jh=["anchor","focus"];function Fu(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 Qh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fu(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=It(t,Jh),[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:Qh({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 Do(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})}},Mu=t=>ut(t)&&ne.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return ut(t)&&ne.isNodeList(t.children)},isElement:Mu,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 Mu(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},$h=["children"],ev=["text"],ku=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=It(t,$h);return e}else{var e=It(t,ev);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=Do({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 f=ne.leaf(r,a);f.text=f.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=ku.get(t);if(e!==void 0)return e;var n=t.every(r=>ne.isNode(r));return ku.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 f=L.next(a);if(ne.has(t,f)){a=f,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 Tu(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?Tu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gt={isNodeOperation(t){return Gt.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=>Gt.isOperation(e))},isSelectionOperation(t){return Gt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Gt.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)})}}},Iu=new WeakMap,tv=t=>{var e=Iu.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)&&Gt.isOperationList(t.operations);return Iu.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 tv(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)},nv={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function ju(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 Nu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ju(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ju(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 Do(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,Nu(Nu({},n),{},{affinity:"forward"})))}else r.path=L.transform(o,e,n);break}}})}},_u=void 0,it={setScrubber(t){_u=t},stringify(t){return JSON.stringify(t,_u)}},rv=["text"],iv=["anchor","focus"];function zu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zu(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=It(o,rv);return s}return Pu(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=[jt({},t)];for(var r of e){var i=It(r,iv),[o,s]=V.edges(r),a=[],u=0,l=o.offset,f=s.offset;for(var p of n){var{length:h}=p.text,g=u;if(u+=h,l<=g&&u<=f){Object.assign(p,i),a.push(p);continue}if(l!==f&&(l===u||f===g)||l>u||f<g||f===g&&g!==0){a.push(p);continue}var y=p,v=void 0,d=void 0;if(f<u){var D=f-g;d=jt(jt({},y),{},{text:y.text.slice(D)}),y=jt(jt({},y),{},{text:y.text.slice(0,D)})}if(l>g){var B=l-g;v=jt(jt({},y),{},{text:y.text.slice(0,B)}),y=jt(jt({},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}},Eo=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},bo=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?cv(e):e,o=be.None,s=be.None,a=0,u=null,l=null;for(var f of i){var p=f.codePointAt(0);if(!p)break;var h=bv(f,p);if([o,s]=r?[s,h]:[h,o],Fn(o,be.ZWJ)&&Fn(s,be.ExtPict)&&(r?u=Wu(e.substring(0,a)):u=Wu(e.substring(0,e.length-a)),!u)||Fn(o,be.RI)&&Fn(s,be.RI)&&(l!==null?l=!l:r?l=!0:l=Av(e.substring(0,e.length-a)),!l)||o!==be.None&&s!==be.None&&Bv(o,s))break;a+=f.length}return a||1},ov=/\s/,sv=/[\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]/,av=/['\u2018\u2019]/,uv=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var o=bo(e,n),[s,a]=wo(e,o,n);if(lv(s,a,n))i=!0,r+=o;else if(!i)r+=o;else break;e=a}return r},wo=(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)]},lv=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(ov.test(e))return!1;if(av.test(e)){var i=bo(n,r),[o,s]=wo(n,i,r);if(t(o,s,r))return!0}return!sv.test(e)},cv=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(dv(i.charCodeAt(0))){var o=e.charAt(n-r-1);if(fv(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},fv=t=>t>=55296&&t<=56319,dv=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 pv=/^(?:[\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])$/,hv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,vv=/^(?:[\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])$/,gv=/^[\u1100-\u115F\uA960-\uA97C]$/,mv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,yv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Cv=/^[\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]$/,Dv=/^[\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]$/,Ev=/^(?:[\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])$/,bv=(t,e)=>{var n=be.Any;return t.search(pv)!==-1&&(n|=be.Extend),e===8205&&(n|=be.ZWJ),e>=127462&&e<=127487&&(n|=be.RI),t.search(hv)!==-1&&(n|=be.Prepend),t.search(vv)!==-1&&(n|=be.SpacingMark),t.search(gv)!==-1&&(n|=be.L),t.search(mv)!==-1&&(n|=be.V),t.search(yv)!==-1&&(n|=be.T),t.search(Cv)!==-1&&(n|=be.LV),t.search(Dv)!==-1&&(n|=be.LVT),t.search(Ev)!==-1&&(n|=be.ExtPict),n};function Fn(t,e){return(t&e)!==0}var wv=[[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 Bv(t,e){return wv.findIndex(n=>Fn(t,n[0])&&Fn(e,n[1]))===-1}var xv=/(?:[\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$/,Wu=t=>t.search(xv)!==-1,Sv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Av=t=>{var e=t.match(Sv);if(e===null)return!1;var n=e[0].length/2;return n%2===1},Lv={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=Eo(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(),f=u.unref();i=l||f,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 Uu(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?Uu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Uu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Q=Gr(Gr(Gr(Gr({},Zh),Yh),Kh),Lv),Zr=new WeakMap,Ov=t=>Zr.get(t)||!1,Pv=(t,e,n)=>{var r=Zr.get(t)||!1;Zr.set(t,!0);try{e(),n()}finally{Zr.set(t,r)}};function Hu(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 f of e)a(f);Vr.set(t,o),qr.set(t,s)}var Fv=(t,e)=>{for(var n of m.pathRefs(t))Uh.transform(n,e);for(var r of m.pointRefs(t))Hh.transform(r,e);for(var i of m.rangeRefs(t))Rh.transform(i,e);if(!Ov(t)){var o=L.operationCanTransformPath(e)?s=>L.transform(s,e):void 0;Hu(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=[]}))},Mv=(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:f,newPath:p}=e;if(L.equals(f,p))return[];var h=[],g=[];for(var y of L.ancestors(f)){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[]}},kv=t=>{var{selection:e}=t;return e?ne.fragment(t,e):[]},Tv=(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],f=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(f==null||!ce.isText(f)){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=[]}f!=null&&ce.isText(f)&&(ce.equals(l,f,{loose:!0})?(Q.mergeNodes(t,{at:r.concat(s),voids:!0}),s--):f.text===""?(Q.removeNodes(t,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--))}}}}},Iv=(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},jv=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,f]of m.levels(e,{at:a,voids:r,match:s,reverse:u}))if(!ce.isText(l)){if(V.isRange(o)){if(L.isAncestor(f,o.anchor.path)&&L.isAncestor(f,o.focus.path))return[l,f]}else if(!L.equals(a,f))return[l,f]}}};function Ru(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 Vu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ru(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Nv=(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 f=Vu(Vu({},m.marks(t)||{}),{},{[e]:n});t.marks=f,tr.get(t)||t.onChange()}}};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 Gu(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 _v=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 f of m.positions(e,Gu(Gu({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=f),u++}return l};function Zu(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 Yu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zu(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.start(e,[]),o=m.point(e,n,{edge:"start"}),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var f of m.positions(e,Yu(Yu({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=f),u++}return l},Wv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e,reverse:!0})},Uv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e})},Hv=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"})},Rv=(t,e)=>[m.start(t,e),m.end(t,e)];function Ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ku(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Vv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Xu(Xu({},n),{},{match:r=>ue.isElement(r)&&m.isElementReadOnly(e,r)}))},qv=(t,e)=>m.point(t,e,{edge:"end"}),Gv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Zv=(t,e)=>{var n=m.range(t,e);return ne.fragment(t,n)};function Ju(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?Ju(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Qu(Qu({},n),{},{match:r=>ue.isElement(r)&&m.isVoid(e,r)}))},Kv=(t,e)=>e.children.some(n=>ue.isElement(n)&&m.isBlock(t,n)),Xv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Jv=(t,e)=>ne.has(t,e),Qv=(t,e)=>e.children.every(n=>ce.isText(n)),$v=t=>{Q.splitNodes(t,{always:!0})},eg=(t,e,n)=>{Q.insertNodes(t,e,n)},tg=t=>{Q.splitNodes(t,{always:!0})};function $u(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 ng(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$u(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rg=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=ng({text:n},o);Q.insertNodes(e,s,{at:r.at,voids:r.voids})}else Q.insertText(e,n,r);e.marks=null}},ig=(t,e)=>!t.isInline(e),og=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),sg=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},ag=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},ug=t=>{var e=xu.get(t);return e===void 0?!0:e},lg=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},cg=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},fg=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 dg(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 pg=["text"],hg=["text"],vg=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,f=It(l,pg);return f}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=It(h,hg);return b},gg=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[f]=m.parent(e,s);o=h=>f.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{at:l,match:o,mode:r,voids:i});return p}}},mg=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 yg(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,f;if(nv.isSpan(n))l=n[0],f=n[1];else{var p=m.path(t,n,{edge:"start"}),h=m.path(t,n,{edge:"end"});l=o?h:p,f=o?p:h}var g=ne.nodes(t,{reverse:o,from:l,to:f,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 Cg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,o=f=>Vr.get(f)||[],s=f=>qr.get(f)||new Set,a=f=>{var p=o(f).pop(),h=p.join(",");return s(f).delete(h),p};if(m.isNormalizing(e)){if(r){var u=Array.from(ne.nodes(e),f=>{var[,p]=f;return p}),l=new Set(u.map(f=>f.join(",")));Vr.set(e,u),qr.set(e,l)}o(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of o(e))if(ne.has(e,f)){var p=m.node(e,f),[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)}})}},Dg=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},Eg=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},bg=t=>{var e=Su.get(t);return e||(e=new Set,Su.set(t,e)),e},wg=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},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.pointRefs(e);return u.delete(o),o.current=null,a}},s=m.pointRefs(e);return s.add(o),o},xg=t=>{var e=Au.get(t);return e||(e=new Set,Au.set(t,e)),e},Sg=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,f]=V.edges(n);return i==="start"?l:f}return n};function Ag(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),f=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,f.path);for(O?(y=i?f.offset:d.text.length-f.offset,v=f.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=wo(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"?bo(w,F):A==="word"?uv(w,F):A==="line"||A==="block"?w.length:1}}()}var Lg=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[f]=m.parent(e,s);o=h=>f.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:o,mode:r,voids:i});return p}}},Og=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},Pg=t=>{var e=Lu.get(t);return e||(e=new Set,Lu.set(t,e)),e},Fg=(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 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 Mg(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 kg=(t,e)=>{var{selection:n}=t;if(n){var r=(f,p)=>{if(!ce.isText(f))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=Mg({},m.marks(t)||{});delete l[e],t.marks=l,tr.get(t)||t.onChange()}}},Tg=(t,e)=>{xu.set(t,e)},Ig=(t,e)=>m.point(t,e,{edge:"start"}),jg=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,f]of m.nodes(e,{at:o,match:ce.isText,voids:i})){var p=l.text;L.equals(f,a.path)&&(p=p.slice(0,a.offset)),L.equals(f,s.path)&&(p=p.slice(s.offset)),u+=p}return u},Ng=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),f={anchor:l,focus:s},p=!0;for(var[h,g]of m.nodes(e,{at:f,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}},_g=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},zg=(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},Wg=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:f=!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},f=!0}}if(L.isPath(l)){Q.removeNodes(e,{at:l,voids:u});return}if(!V.isCollapsed(l)){if(!f){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)}}})},Ug=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=Eo(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 f=m.above(e,{at:s,match:Y=>ue.isElement(Y)&&m.isInline(e,Y),mode:"highest",voids:o});if(f){var[,p]=f;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()}}})},Hg=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},Rg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},Vg=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,f={distance:i,unit:o,ignoreNonSelectable:!0},p={};if(a==null||a==="anchor"){var h=s?m.before(e,u,f):m.after(e,u,f);h&&(p.anchor=h)}if(a==null||a==="focus"){var g=s?m.before(e,l,f):m.after(e,l,f);g&&(p.focus=g)}Q.setSelection(e,p)}},qg=(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 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 nl(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 Gg=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"]:nl(nl({},u),n)})}},Zg=(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})}},Yg=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:f}=r;if(ne.isNode(n)&&(n=[n]),n.length!==0){var[p]=n;if(u||(u=Eo(e),f!==!1&&(f=!0)),f==null&&(f=!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);Pv(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()},()=>{Hu(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),f){var R=m.end(e,u);R&&Q.select(e,R)}}}})},Kg=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 f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var p=m.node(e,L.parent(f)),[h,g]=p,y=f[f.length-1],{length:v}=h.children;if(v===1){var d=L.next(g);Q.moveNodes(e,{at:f,to:d,voids:o}),Q.removeNodes(e,{at:g,voids:o})}else if(y===0)Q.moveNodes(e,{at:f,to:g,voids:o});else if(y===v-1){var D=L.next(g);Q.moveNodes(e,{at:f,to:D,voids:o})}else{var B=L.next(f),b=L.next(g);Q.splitNodes(e,{at:B,voids:o}),Q.moveNodes(e,{at:f,to:b,voids:o})}}}})},Xg=["text"],Jg=["children"],rl=(t,e)=>{if(ue.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?rl(t,n.children[0]):!1}else return!m.isEditor(e)},Qg=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),f=m.pointRef(e,l);Q.delete(e,{at:i}),i=f.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)&&rl(e,P)}),w=E&&m.pathRef(e,E[1]),A,F;if(ce.isText(g)&&ce.isText(v)){var R=It(g,Xg);F=v.text.length,A=R}else if(ue.isElement(g)&&ue.isElement(v)){var R=It(g,Jg);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()}}}})},$g=(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 f of l){var p=f.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()}})},em=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 f of l){var p=f.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},tm=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:f=!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})),f&&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})}}}})},nm=(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()},rm=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=nm(e,s)),L.isPath(s)){var l=s,f=m.point(e,l),[p]=m.parent(e,l);o=re=>re===p,a=f.path.length-l.length+1,s=f,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()}}})},im=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)},om=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}),f=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 f)p();u&&u.unref()}})};function il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ol(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?il(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var sm=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,f]=V.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});Q.splitNodes(e,{at:f,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=ol(ol({},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()}})},am=()=>{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 Fv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rg(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vg(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qg(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $g(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return em(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tm(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rm(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return im(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return om(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sm(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)}};return t};/*!
76
+ */function cu(t){return Object.prototype.toString.call(t)==="[object Object]"}function ut(t){var e,n;return cu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(cu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var fu=Symbol.for("immer-nothing"),du=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state"),Ph=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=Ph[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 dn(t){return!!t&&!!t[Ct]}function pn(t){var e;return t?pu(t)||Array.isArray(t)||!!t[du]||!!((e=t.constructor)!=null&&e[du])||zr(t)||Wr(t):!1}var Fh=Object.prototype.constructor.toString();function pu(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)===Fh}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 hu(t,e,n){const r=_r(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Mh(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 hn(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=pu(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)||dn(t)||!pn(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=kh),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>co(r,!0))),t}function kh(){ht(2)}function Ur(t){return Object.isFrozen(t)}var Th={};function vn(t){const e=Th[t];return e||ht(0,t),e}var $n;function vu(){return $n}function Ih(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gu(t,e){e&&(vn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function fo(t){po(t),t.drafts_.forEach(jh),t.drafts_=null}function po(t){t===$n&&($n=t.parent_)}function mu(t){return $n=Ih($n,t)}function jh(t){const e=t[Ct];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function yu(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)),pn(t)&&(t=Hr(e,t),e.parent_||Rr(e,t)),e.patches_&&vn("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!==fu?t:void 0}function Hr(t,e,n){if(Ur(e))return e;const r=e[Ct];if(!r)return Nr(e,(i,o)=>Cu(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)=>Cu(t,r,i,a,u,n,s)),Rr(t,i,!1),n&&t.patches_&&vn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Cu(t,e,n,r,i,o,s){if(process.env.NODE_ENV!=="production"&&i===n&&ht(5),dn(i)){const a=o&&e&&e.type_!==3&&!uo(e.assigned_,r)?o.concat(r):void 0,u=Hr(t,i,a);if(hu(n,r,u),dn(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(pn(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 Nh(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:vu(),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=hn(t);if(!uo(n,e))return _h(t,n,e);const r=n[e];return t.finalized_||!pn(r)?r:r===vo(t.base_,e)?(mo(t),t.copy_[e]=yo(r,t)):r},has(t,e){return e in hn(t)},ownKeys(t){return Reflect.ownKeys(hn(t))},set(t,e,n){const r=Du(hn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=vo(hn(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(Mh(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=hn(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?hn(n):t)[e]}function _h(t,e,n){var i;const r=Du(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Du(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 zh=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,f=>n.call(this,f,...l))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let i;if(pn(e)){const o=mu(this),s=yo(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?fo(o):po(o)}return gu(o,r),yu(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===fu&&(i=void 0),this.autoFreeze_&&co(i,!0),r){const o=[],s=[];vn("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){pn(t)||ht(8),dn(t)&&(t=Wh(t));const e=mu(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 gu(r,e),yu(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=vn("Patches").applyPatches_;return dn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function yo(t,e){const n=zr(t)?vn("MapSet").proxyMap_(t,e):Wr(t)?vn("MapSet").proxySet_(t,e):Nh(t,e);return(e?e.scope_:vu()).drafts_.push(n),n}function Wh(t){return dn(t)||ht(10,t),Eu(t)}function Eu(t){if(!pn(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)=>{hu(n,r,Eu(i))}),e&&(e.finalized_=!1),n}var Dt=new zh,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),wu=Dt.finishDraft.bind(Dt),Uh={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()}}},Hh={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()}}},Rh={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,Bu=new WeakMap,xu=new WeakMap,Su=new WeakMap,Au=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:f}=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]>=f&&(r[l.length-1]+=1,r[l.length]-=f);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 Vh(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 qh(t){var e=Vh(t,"string");return nr(e)==="symbol"?e:String(e)}function lt(t,e,n){return e=qh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lu(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?Lu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gh=(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:f,text:p}=n;if(p.length===0)break;var h=ne.leaf(t,l),g=h.text.slice(0,f),y=h.text.slice(f);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),sn=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(sn.children.splice(xt+1,0,Lt),e)for(var[kt,Sn]of V.points(e))e[Sn]=Ae.transform(kt,n);break}}return e},Zh={transform(t,e){t.children=bu(t.children);var n=t.selection&&bu(t.selection);try{n=Gh(t,n,e)}finally{t.children=wu(t.children),n?t.selection=dn(n)?wu(n):n:t.selection=null}}},Yh={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)}},Kh={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)}},Ou=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ut(r)&&ut(i)){if(!Ou(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 Xh(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 It(t,e){if(t==null)return{};var n=Xh(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 Jh=["anchor","focus"];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 Qh(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 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=It(t,Jh),[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:Qh({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})}},Fu=t=>ut(t)&&ne.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return ut(t)&&ne.isNodeList(t.children)},isElement:Fu,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 Fu(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},$h=["children"],ev=["text"],Mu=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=It(t,$h);return e}else{var e=It(t,ev);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 f=ne.leaf(r,a);f.text=f.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=Mu.get(t);if(e!==void 0)return e;var n=t.every(r=>ne.isNode(r));return Mu.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 f=L.next(a);if(ne.has(t,f)){a=f,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 ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ku(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ku(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gt={isNodeOperation(t){return Gt.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=>Gt.isOperation(e))},isSelectionOperation(t){return Gt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Gt.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)})}}},Tu=new WeakMap,tv=t=>{var e=Tu.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)&&Gt.isOperationList(t.operations);return Tu.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 tv(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)},nv={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};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 ju(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 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,ju(ju({},n),{},{affinity:"forward"})))}else r.path=L.transform(o,e,n);break}}})}},Nu=void 0,it={setScrubber(t){Nu=t},stringify(t){return JSON.stringify(t,Nu)}},rv=["text"],iv=["anchor","focus"];function _u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_u(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_u(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=It(o,rv);return s}return Ou(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=[jt({},t)];for(var r of e){var i=It(r,iv),[o,s]=V.edges(r),a=[],u=0,l=o.offset,f=s.offset;for(var p of n){var{length:h}=p.text,g=u;if(u+=h,l<=g&&u<=f){Object.assign(p,i),a.push(p);continue}if(l!==f&&(l===u||f===g)||l>u||f<g||f===g&&g!==0){a.push(p);continue}var y=p,v=void 0,d=void 0;if(f<u){var D=f-g;d=jt(jt({},y),{},{text:y.text.slice(D)}),y=jt(jt({},y),{},{text:y.text.slice(0,D)})}if(l>g){var B=l-g;v=jt(jt({},y),{},{text:y.text.slice(0,B)}),y=jt(jt({},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?cv(e):e,o=be.None,s=be.None,a=0,u=null,l=null;for(var f of i){var p=f.codePointAt(0);if(!p)break;var h=bv(f,p);if([o,s]=r?[s,h]:[h,o],Fn(o,be.ZWJ)&&Fn(s,be.ExtPict)&&(r?u=zu(e.substring(0,a)):u=zu(e.substring(0,e.length-a)),!u)||Fn(o,be.RI)&&Fn(s,be.RI)&&(l!==null?l=!l:r?l=!0:l=Av(e.substring(0,e.length-a)),!l)||o!==be.None&&s!==be.None&&Bv(o,s))break;a+=f.length}return a||1},ov=/\s/,sv=/[\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]/,av=/['\u2018\u2019]/,uv=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(lv(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)]},lv=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(ov.test(e))return!1;if(av.test(e)){var i=Eo(n,r),[o,s]=bo(n,i,r);if(t(o,s,r))return!0}return!sv.test(e)},cv=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(dv(i.charCodeAt(0))){var o=e.charAt(n-r-1);if(fv(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},fv=t=>t>=55296&&t<=56319,dv=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 pv=/^(?:[\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])$/,hv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,vv=/^(?:[\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])$/,gv=/^[\u1100-\u115F\uA960-\uA97C]$/,mv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,yv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Cv=/^[\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]$/,Dv=/^[\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]$/,Ev=/^(?:[\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])$/,bv=(t,e)=>{var n=be.Any;return t.search(pv)!==-1&&(n|=be.Extend),e===8205&&(n|=be.ZWJ),e>=127462&&e<=127487&&(n|=be.RI),t.search(hv)!==-1&&(n|=be.Prepend),t.search(vv)!==-1&&(n|=be.SpacingMark),t.search(gv)!==-1&&(n|=be.L),t.search(mv)!==-1&&(n|=be.V),t.search(yv)!==-1&&(n|=be.T),t.search(Cv)!==-1&&(n|=be.LV),t.search(Dv)!==-1&&(n|=be.LVT),t.search(Ev)!==-1&&(n|=be.ExtPict),n};function Fn(t,e){return(t&e)!==0}var wv=[[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 Bv(t,e){return wv.findIndex(n=>Fn(t,n[0])&&Fn(e,n[1]))===-1}var xv=/(?:[\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$/,zu=t=>t.search(xv)!==-1,Sv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Av=t=>{var e=t.match(Sv);if(e===null)return!1;var n=e[0].length/2;return n%2===1},Lv={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(),f=u.unref();i=l||f,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 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 Gr(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 Q=Gr(Gr(Gr(Gr({},Zh),Yh),Kh),Lv),Zr=new WeakMap,Ov=t=>Zr.get(t)||!1,Pv=(t,e,n)=>{var r=Zr.get(t)||!1;Zr.set(t,!0);try{e(),n()}finally{Zr.set(t,r)}};function Uu(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 f of e)a(f);Vr.set(t,o),qr.set(t,s)}var Fv=(t,e)=>{for(var n of m.pathRefs(t))Uh.transform(n,e);for(var r of m.pointRefs(t))Hh.transform(r,e);for(var i of m.rangeRefs(t))Rh.transform(i,e);if(!Ov(t)){var o=L.operationCanTransformPath(e)?s=>L.transform(s,e):void 0;Uu(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=[]}))},Mv=(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:f,newPath:p}=e;if(L.equals(f,p))return[];var h=[],g=[];for(var y of L.ancestors(f)){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[]}},kv=t=>{var{selection:e}=t;return e?ne.fragment(t,e):[]},Tv=(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],f=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(f==null||!ce.isText(f)){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=[]}f!=null&&ce.isText(f)&&(ce.equals(l,f,{loose:!0})?(Q.mergeNodes(t,{at:r.concat(s),voids:!0}),s--):f.text===""?(Q.removeNodes(t,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--))}}}}},Iv=(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},jv=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,f]of m.levels(e,{at:a,voids:r,match:s,reverse:u}))if(!ce.isText(l)){if(V.isRange(o)){if(L.isAncestor(f,o.anchor.path)&&L.isAncestor(f,o.focus.path))return[l,f]}else if(!L.equals(a,f))return[l,f]}}};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 Ru(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 Nv=(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 f=Ru(Ru({},m.marks(t)||{}),{},{[e]:n});t.marks=f,tr.get(t)||t.onChange()}}};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=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 f of m.positions(e,qu(qu({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=f),u++}return l};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.start(e,[]),o=m.point(e,n,{edge:"start"}),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var f of m.positions(e,Zu(Zu({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=f),u++}return l},Wv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e,reverse:!0})},Uv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e})},Hv=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"})},Rv=(t,e)=>[m.start(t,e),m.end(t,e)];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 Vv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ku(Ku({},n),{},{match:r=>ue.isElement(r)&&m.isElementReadOnly(e,r)}))},qv=(t,e)=>m.point(t,e,{edge:"end"}),Gv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Zv=(t,e)=>{var n=m.range(t,e);return ne.fragment(t,n)};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 Yv=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.isVoid(e,r)}))},Kv=(t,e)=>e.children.some(n=>ue.isElement(n)&&m.isBlock(t,n)),Xv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Jv=(t,e)=>ne.has(t,e),Qv=(t,e)=>e.children.every(n=>ce.isText(n)),$v=t=>{Q.splitNodes(t,{always:!0})},eg=(t,e,n)=>{Q.insertNodes(t,e,n)},tg=t=>{Q.splitNodes(t,{always:!0})};function Qu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ng(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 rg=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=ng({text:n},o);Q.insertNodes(e,s,{at:r.at,voids:r.voids})}else Q.insertText(e,n,r);e.marks=null}},ig=(t,e)=>!t.isInline(e),og=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),sg=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},ag=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},ug=t=>{var e=Bu.get(t);return e===void 0?!0:e},lg=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},cg=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},fg=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 dg(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 pg=["text"],hg=["text"],vg=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,f=It(l,pg);return f}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=It(h,hg);return b},gg=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[f]=m.parent(e,s);o=h=>f.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{at:l,match:o,mode:r,voids:i});return p}}},mg=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 yg(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,f;if(nv.isSpan(n))l=n[0],f=n[1];else{var p=m.path(t,n,{edge:"start"}),h=m.path(t,n,{edge:"end"});l=o?h:p,f=o?p:h}var g=ne.nodes(t,{reverse:o,from:l,to:f,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 Cg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,o=f=>Vr.get(f)||[],s=f=>qr.get(f)||new Set,a=f=>{var p=o(f).pop(),h=p.join(",");return s(f).delete(h),p};if(m.isNormalizing(e)){if(r){var u=Array.from(ne.nodes(e),f=>{var[,p]=f;return p}),l=new Set(u.map(f=>f.join(",")));Vr.set(e,u),qr.set(e,l)}o(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of o(e))if(ne.has(e,f)){var p=m.node(e,f),[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)}})}},Dg=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},Eg=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},bg=t=>{var e=xu.get(t);return e||(e=new Set,xu.set(t,e)),e},wg=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},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.pointRefs(e);return u.delete(o),o.current=null,a}},s=m.pointRefs(e);return s.add(o),o},xg=t=>{var e=Su.get(t);return e||(e=new Set,Su.set(t,e)),e},Sg=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,f]=V.edges(n);return i==="start"?l:f}return n};function Ag(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),f=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,f.path);for(O?(y=i?f.offset:d.text.length-f.offset,v=f.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"?uv(w,F):A==="line"||A==="block"?w.length:1}}()}var Lg=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[f]=m.parent(e,s);o=h=>f.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:o,mode:r,voids:i});return p}}},Og=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},Pg=t=>{var e=Au.get(t);return e||(e=new Set,Au.set(t,e)),e},Fg=(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 $u(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 Mg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$u(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var kg=(t,e)=>{var{selection:n}=t;if(n){var r=(f,p)=>{if(!ce.isText(f))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=Mg({},m.marks(t)||{});delete l[e],t.marks=l,tr.get(t)||t.onChange()}}},Tg=(t,e)=>{Bu.set(t,e)},Ig=(t,e)=>m.point(t,e,{edge:"start"}),jg=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,f]of m.nodes(e,{at:o,match:ce.isText,voids:i})){var p=l.text;L.equals(f,a.path)&&(p=p.slice(0,a.offset)),L.equals(f,s.path)&&(p=p.slice(s.offset)),u+=p}return u},Ng=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),f={anchor:l,focus:s},p=!0;for(var[h,g]of m.nodes(e,{at:f,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}},_g=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},zg=(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},Wg=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:f=!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},f=!0}}if(L.isPath(l)){Q.removeNodes(e,{at:l,voids:u});return}if(!V.isCollapsed(l)){if(!f){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)}}})},Ug=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 f=m.above(e,{at:s,match:Y=>ue.isElement(Y)&&m.isInline(e,Y),mode:"highest",voids:o});if(f){var[,p]=f;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()}}})},Hg=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},Rg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},Vg=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,f={distance:i,unit:o,ignoreNonSelectable:!0},p={};if(a==null||a==="anchor"){var h=s?m.before(e,u,f):m.after(e,u,f);h&&(p.anchor=h)}if(a==null||a==="focus"){var g=s?m.before(e,l,f):m.after(e,l,f);g&&(p.focus=g)}Q.setSelection(e,p)}},qg=(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 el(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?el(Object(n),!0).forEach(function(r){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 Gg=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"]:tl(tl({},u),n)})}},Zg=(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})}},Yg=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:f}=r;if(ne.isNode(n)&&(n=[n]),n.length!==0){var[p]=n;if(u||(u=Do(e),f!==!1&&(f=!0)),f==null&&(f=!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);Pv(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()},()=>{Uu(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),f){var R=m.end(e,u);R&&Q.select(e,R)}}}})},Kg=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 f=l.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var p=m.node(e,L.parent(f)),[h,g]=p,y=f[f.length-1],{length:v}=h.children;if(v===1){var d=L.next(g);Q.moveNodes(e,{at:f,to:d,voids:o}),Q.removeNodes(e,{at:g,voids:o})}else if(y===0)Q.moveNodes(e,{at:f,to:g,voids:o});else if(y===v-1){var D=L.next(g);Q.moveNodes(e,{at:f,to:D,voids:o})}else{var B=L.next(f),b=L.next(g);Q.splitNodes(e,{at:B,voids:o}),Q.moveNodes(e,{at:f,to:b,voids:o})}}}})},Xg=["text"],Jg=["children"],nl=(t,e)=>{if(ue.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?nl(t,n.children[0]):!1}else return!m.isEditor(e)},Qg=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),f=m.pointRef(e,l);Q.delete(e,{at:i}),i=f.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)&&nl(e,P)}),w=E&&m.pathRef(e,E[1]),A,F;if(ce.isText(g)&&ce.isText(v)){var R=It(g,Xg);F=v.text.length,A=R}else if(ue.isElement(g)&&ue.isElement(v)){var R=It(g,Jg);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()}}}})},$g=(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 f of l){var p=f.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()}})},em=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 f of l){var p=f.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},tm=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:f=!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})),f&&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})}}}})},nm=(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()},rm=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=nm(e,s)),L.isPath(s)){var l=s,f=m.point(e,l),[p]=m.parent(e,l);o=re=>re===p,a=f.path.length-l.length+1,s=f,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()}}})},im=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)},om=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}),f=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 f)p();u&&u.unref()}})};function rl(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 il(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var sm=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,f]=V.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});Q.splitNodes(e,{at:f,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=il(il({},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()}})},am=()=>{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 Fv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rg(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vg(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qg(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $g(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return em(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tm(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rm(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return im(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return om(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sm(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(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.
80
80
  * Released under the MIT License.
81
- */function sl(t){return Object.prototype.toString.call(t)==="[object Object]"}function um(t){var e,n;return sl(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(sl(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var lm={isHistory(t){return um(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Gt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Gt.isOperationList(t.undos[0].operations))}},Bo=new WeakMap,ir=new WeakMap,gn={isHistoryEditor(t){return lm.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return ir.get(t)},isSaving(t){return Bo.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=gn.isMerging(t);ir.set(t,!0),e(),ir.set(t,n)},withoutMerging(t,e){var n=gn.isMerging(t);ir.set(t,!1),e(),ir.set(t,n)},withoutSaving(t,e){var n=gn.isSaving(t);Bo.set(t,!1),e(),Bo.set(t,n)}},cm=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var o=i[i.length-1];o.selectionBefore&&Q.setSelection(e,o.selectionBefore),gn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var s of o.operations)e.apply(s)})}),r.redos.pop(),e.writeHistory("undos",o)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var o=i[i.length-1];gn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var s=o.operations.map(Gt.inverse).reverse();for(var a of s)e.apply(a);o.selectionBefore&&Q.setSelection(e,o.selectionBefore)})}),e.writeHistory("redos",o),r.undos.pop()}},e.apply=r=>{var{operations:i,history:o}=e,{undos:s}=o,a=s[s.length-1],u=a&&a.operations[a.operations.length-1],l=gn.isSaving(e),f=gn.isMerging(e);if(l==null&&(l=dm(r)),l){if(f==null&&(a==null?f=!1:i.length!==0?f=!0:f=fm(r,u)),a&&f)a.operations.push(r);else{var p={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",p)}for(;s.length>100;)s.shift();o.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},fm=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&L.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&L.equals(t.path,e.path)),dm=(t,e)=>t.type!=="set_selection",pm=gm,al="֑-߿יִ-﷽ﹰ-ﻼ",ul="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hm=new RegExp("^[^"+ul+"]*["+al+"]"),vm=new RegExp("^[^"+al+"]*["+ul+"]");function gm(t){return t=String(t||""),hm.test(t)?"rtl":vm.test(t)?"ltr":"neutral"}const ll=Or(pm);function mm(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var xo=mm,ym=typeof We=="object"&&We&&We.Object===Object&&We,Cm=ym,Dm=Cm,Em=typeof self=="object"&&self&&self.Object===Object&&self,bm=Dm||Em||Function("return this")(),cl=bm,wm=cl,Bm=function(){return wm.Date.now()},xm=Bm,Sm=/\s/;function Am(t){for(var e=t.length;e--&&Sm.test(t.charAt(e)););return e}var Lm=Am,Om=Lm,Pm=/^\s+/;function Fm(t){return t&&t.slice(0,Om(t)+1).replace(Pm,"")}var Mm=Fm,km=cl,Tm=km.Symbol,fl=Tm,dl=fl,pl=Object.prototype,Im=pl.hasOwnProperty,jm=pl.toString,or=dl?dl.toStringTag:void 0;function Nm(t){var e=Im.call(t,or),n=t[or];try{t[or]=void 0;var r=!0}catch{}var i=jm.call(t);return r&&(e?t[or]=n:delete t[or]),i}var _m=Nm,zm=Object.prototype,Wm=zm.toString;function Um(t){return Wm.call(t)}var Hm=Um,hl=fl,Rm=_m,Vm=Hm,qm="[object Null]",Gm="[object Undefined]",vl=hl?hl.toStringTag:void 0;function Zm(t){return t==null?t===void 0?Gm:qm:vl&&vl in Object(t)?Rm(t):Vm(t)}var Ym=Zm;function Km(t){return t!=null&&typeof t=="object"}var Xm=Km,Jm=Ym,Qm=Xm,$m="[object Symbol]";function ey(t){return typeof t=="symbol"||Qm(t)&&Jm(t)==$m}var ty=ey,ny=Mm,gl=xo,ry=ty,ml=NaN,iy=/^[-+]0x[0-9a-f]+$/i,oy=/^0b[01]+$/i,sy=/^0o[0-7]+$/i,ay=parseInt;function uy(t){if(typeof t=="number")return t;if(ry(t))return ml;if(gl(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=gl(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ny(t);var n=oy.test(t);return n||sy.test(t)?ay(t.slice(2),n?2:8):iy.test(t)?ml:+t}var ly=uy,cy=xo,So=xm,yl=ly,fy="Expected a function",dy=Math.max,py=Math.min;function hy(t,e,n){var r,i,o,s,a,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(fy);e=yl(e)||0,cy(n)&&(f=!!n.leading,p="maxWait"in n,o=p?dy(yl(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),f?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?py(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=So();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(So())}function E(){var w=So(),A=d(w);if(r=arguments,i=this,u=w,A){if(a===void 0)return y(u);if(p)return clearTimeout(a),a=setTimeout(D,e),g(u)}return a===void 0&&(a=setTimeout(D,e)),s}return E.cancel=b,E.flush=O,E}var Cl=hy;const vy=Or(Cl);var gy=Cl,my=xo,yy="Expected a function";function Cy(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(yy);return my(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),gy(t,e,{leading:r,maxWait:e,trailing:i})}var Dy=Cy;const Ey=Or(Dy),Dl=t=>typeof t=="object"&&t!=null&&t.nodeType===1,El=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Ao=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return El(n.overflowY,e)||El(n.overflowX,e)||(r=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Yr=(t,e,n,r,i,o,s,a)=>o<t&&s>e||o>t&&s<e?0:o<=t&&a<=n||s>=e&&a>=n?o-t-r:s>e&&a<n||o<t&&a>n?s-e+i:0,by=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},bl=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,p=typeof l=="function"?l:K=>K!==l;if(!Dl(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,g=[];let y=t;for(;Dl(y)&&p(y);){if(y=by(y),y===h){g.push(y);break}y!=null&&y===document.body&&Ao(y)&&!Ao(document.documentElement)||y!=null&&Ao(y,f)&&g.push(y)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:D,scrollY:B}=window,{height:b,width:O,top:E,right:w,bottom:A,left:F}=t.getBoundingClientRect(),{top:R,right:P,bottom:z,left:I}=(K=>{const _=window.getComputedStyle(K);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(t);let j=a==="start"||a==="nearest"?E-R:a==="end"?A+z:E+b/2-R+z,T=u==="center"?F+O/2-I+P:u==="end"?w+P:F-I;const N=[];for(let K=0;K<g.length;K++){const _=g[K],{height:ie,width:re,top:k,right:H,bottom:J,left:q}=_.getBoundingClientRect();if(s==="if-needed"&&E>=0&&F>=0&&A<=d&&w<=v&&E>=k&&A<=J&&F>=q&&w<=H)return N;const ee=getComputedStyle(_),Y=parseInt(ee.borderLeftWidth,10),C=parseInt(ee.borderTopWidth,10),W=parseInt(ee.borderRightWidth,10),U=parseInt(ee.borderBottomWidth,10);let M=0,X=0;const te="offsetWidth"in _?_.offsetWidth-_.clientWidth-Y-W:0,G="offsetHeight"in _?_.offsetHeight-_.clientHeight-C-U:0,le="offsetWidth"in _?_.offsetWidth===0?0:re/_.offsetWidth:0,se="offsetHeight"in _?_.offsetHeight===0?0:ie/_.offsetHeight:0;if(h===_)M=a==="start"?j:a==="end"?j-d:a==="nearest"?Yr(B,B+d,d,C,U,B+j,B+j+b,b):j-d/2,X=u==="start"?T:u==="center"?T-v/2:u==="end"?T-v:Yr(D,D+v,v,Y,W,D+T,D+T+O,O),M=Math.max(0,M+B),X=Math.max(0,X+D);else{M=a==="start"?j-k-C:a==="end"?j-J+U+G:a==="nearest"?Yr(k,J,ie,C,U+G,j,j+b,b):j-(k+ie/2)+G/2,X=u==="start"?T-q-Y:u==="center"?T-(q+re/2)+te/2:u==="end"?T-H+W+te:Yr(q,H,re,Y,W+te,T,T+O,O);const{scrollLeft:pe,scrollTop:ve}=_;M=se===0?0:Math.max(0,Math.min(ve+M/se,_.scrollHeight-ie/se+G)),X=le===0?0:Math.max(0,Math.min(pe+X/le,_.scrollWidth-re/le+te)),j+=ve-M,T+=pe-X}N.push({el:_,top:M,left:X})}return N},wy=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function By(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(bl(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:s}of bl(t,wy(e))){const a=o-n.top+n.bottom,u=s-n.left+n.right;i.scroll({top:a,left:u,behavior:r})}}var mn=[],xy=function(){return mn.some(function(t){return t.activeTargets.length>0})},Sy=function(){return mn.some(function(t){return t.skippedTargets.length>0})},wl="ResizeObserver loop completed with undelivered notifications.",Ay=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:wl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=wl),window.dispatchEvent(t)},sr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(sr||(sr={}));var yn=function(t){return Object.freeze(t)},Ly=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,yn(this)}return t}(),Bl=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,yn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,u=e.width,l=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Lo=function(t){return t instanceof SVGElement&&"getBBox"in t},xl=function(t){if(Lo(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},Sl=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Oy=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ar=typeof window<"u"?window:{},Kr=new WeakMap,Al=/auto|scroll/,Py=/^tb|vertical/,Fy=/msie|trident/i.test(ar.navigator&&ar.navigator.userAgent),Ot=function(t){return parseFloat(t||"0")},Mn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Ly((n?e:t)||0,(n?t:e)||0)},Ll=yn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new Bl(0,0,0,0)}),Ol=function(t,e){if(e===void 0&&(e=!1),Kr.has(t)&&!e)return Kr.get(t);if(xl(t))return Kr.set(t,Ll),Ll;var n=getComputedStyle(t),r=Lo(t)&&t.ownerSVGElement&&t.getBBox(),i=!Fy&&n.boxSizing==="border-box",o=Py.test(n.writingMode||""),s=!r&&Al.test(n.overflowY||""),a=!r&&Al.test(n.overflowX||""),u=r?0:Ot(n.paddingTop),l=r?0:Ot(n.paddingRight),f=r?0:Ot(n.paddingBottom),p=r?0:Ot(n.paddingLeft),h=r?0:Ot(n.borderTopWidth),g=r?0:Ot(n.borderRightWidth),y=r?0:Ot(n.borderBottomWidth),v=r?0:Ot(n.borderLeftWidth),d=p+l,D=u+f,B=v+g,b=h+y,O=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-B-t.clientWidth:0,w=i?d+B:0,A=i?D+b:0,F=r?r.width:Ot(n.width)-w-E,R=r?r.height:Ot(n.height)-A-O,P=F+d+E+B,z=R+D+O+b,I=yn({devicePixelContentBoxSize:Mn(Math.round(F*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:Mn(P,z,o),contentBoxSize:Mn(F,R,o),contentRect:new Bl(p,u,F,R)});return Kr.set(t,I),I},Pl=function(t,e,n){var r=Ol(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case sr.DEVICE_PIXEL_CONTENT_BOX:return s;case sr.BORDER_BOX:return i;default:return o}},My=function(){function t(e){var n=Ol(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=yn([n.borderBoxSize]),this.contentBoxSize=yn([n.contentBoxSize]),this.devicePixelContentBoxSize=yn([n.devicePixelContentBoxSize])}return t}(),Fl=function(t){if(xl(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},ky=function(){var t=1/0,e=[];mn.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(l){var f=new My(l.target),p=Fl(l.target);a.push(f),l.lastReportedSize=Pl(l.target,l.observedBox),p<t&&(t=p)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Ml=function(t){mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Fl(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Ty=function(){var t=0;for(Ml(t);xy();)t=ky(),Ml(t);return Sy()&&Ay(),t>0},Oo,kl=[],Iy=function(){return kl.splice(0).forEach(function(t){return t()})},jy=function(t){if(!Oo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Iy()}).observe(n,r),Oo=function(){n.textContent="".concat(e?e--:e++)}}kl.push(t),Oo()},Ny=function(t){jy(function(){requestAnimationFrame(t)})},Xr=0,_y=function(){return!!Xr},zy=250,Wy={attributes:!0,characterData:!0,childList:!0,subtree:!0},Tl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Il=function(t){return t===void 0&&(t=0),Date.now()+t},Po=!1,Uy=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=zy),!Po){Po=!0;var r=Il(e);Ny(function(){var i=!1;try{i=Ty()}finally{if(Po=!1,e=r-Il(),!_y())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Wy)};document.body?n():ar.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Tl.forEach(function(n){return ar.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Tl.forEach(function(n){return ar.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Fo=new Uy,jl=function(t){!Xr&&t>0&&Fo.start(),Xr+=t,!Xr&&Fo.stop()},Hy=function(t){return!Lo(t)&&!Oy(t)&&getComputedStyle(t).display==="inline"},Ry=function(){function t(e,n){this.target=e,this.observedBox=n||sr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Pl(this.target,this.observedBox,!0);return Hy(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Vy=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Jr=new WeakMap,Nl=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Qr=function(){function t(){}return t.connect=function(e,n){var r=new Vy(e,n);Jr.set(e,r)},t.observe=function(e,n,r){var i=Jr.get(e),o=i.observationTargets.length===0;Nl(i.observationTargets,n)<0&&(o&&mn.push(i),i.observationTargets.push(new Ry(n,r&&r.box)),jl(1),Fo.schedule())},t.unobserve=function(e,n){var r=Jr.get(e),i=Nl(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&mn.splice(mn.indexOf(r),1),r.observationTargets.splice(i,1),jl(-1))},t.disconnect=function(e){var n=this,r=Jr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),qy=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Qr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Sl(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Qr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Sl(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Qr.unobserve(this,e)},t.prototype.disconnect=function(){Qr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function Gy(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 kn(t,e){if(t==null)return{};var n=Gy(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}function ur(t){"@babel/helpers - typeof";return ur=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},ur(t)}function Zy(t,e){if(ur(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ur(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yy(t){var e=Zy(t,"string");return ur(e)==="symbol"?e:String(e)}function wt(t,e,n){return e=Yy(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mo=c.createContext(null),Zt=()=>{var t=c.useContext(Mo);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},ko,To,_l=parseInt(c.version.split(".")[0],10),zl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Wl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),ct=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Tn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Cn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Ky=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ul=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Xy=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Jy=ct&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Qy=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),$y=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),e0=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),$r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((ko=navigator.userAgent.match(/Version\/(\d+)/))!==null&&ko!==void 0&&ko[1]&&parseInt((To=navigator.userAgent.match(/Version\/(\d+)/))===null||To===void 0?void 0:To[1],10)<17);var Yt=(!Xy||!Jy)&&!Ky&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Io=new WeakMap,jo=new WeakMap,Hl=new WeakMap,ei=new WeakMap,No=new WeakMap,lr=new WeakMap,Dn=new WeakMap,ti=new WeakMap,ni=new WeakMap,_o=new WeakMap,Kt=new WeakMap,En=new WeakMap,cr=new WeakMap,zo=new WeakMap,Wo=new WeakMap,St=new WeakMap,Nt=new WeakMap,vt=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Rl=new WeakMap,In=Symbol("placeholder"),Vl=Symbol("mark-placeholder"),ql=globalThis.Node,t0=globalThis.Text,Uo=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,n0=t=>Qt(t)&&t.nodeType===8,Bt=t=>Qt(t)&&t.nodeType===1,Qt=t=>{var e=Uo(t);return!!e&&t instanceof e.Node},Ho=t=>{var e=t&&t.anchorNode&&Uo(t.anchorNode);return!!e&&t instanceof e.Selection},Gl=t=>Qt(t)&&t.nodeType===3,r0=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,i0=t=>{var[e,n]=t;if(Bt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Zl(e,i,r?"backward":"forward"),r=i<n;Bt(e)&&e.childNodes.length;){var o=r?e.childNodes.length-1:0;e=s0(e,o,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},o0=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Zl=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],o=e,s=!1,a=!1;(n0(i)||Bt(i)&&i.childNodes.length===0||Bt(i)&&i.getAttribute("contenteditable")==="false")&&!(s&&a);){if(o>=r.length){s=!0,o=e-1,n="backward";continue}if(o<0){a=!0,o=e+1,n="forward";continue}i=r[o],e=o,o+=n==="forward"?1:-1}return[i,e]},s0=(t,e,n)=>{var[r]=Zl(t,e,n);return r},Yl=t=>{var e="";if(Gl(t)&&t.nodeValue)return t.nodeValue;if(Bt(t)){for(var n of Array.from(t.childNodes))e+=Yl(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
- `)}return e},a0=/data-slate-fragment="(.+?)"/m,u0=t=>{var e=t.getData("text/html"),[,n]=e.match(a0)||[];return n},fr=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Ro=(t,e,n)=>{var{target:r}=e;if(Bt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Z.getWindow(t);if(i.contains(r))return Z.hasDOMNode(t,r,{editable:!0});var o=n.find(s=>{var{addedNodes:a,removedNodes:u}=s;for(var l of a)if(l===r||l.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!o||o===e?!1:Ro(t,o,n)},l0=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},Kl=(t,e)=>!!(t.compareDocumentPosition(e)&ql.DOCUMENT_POSITION_PRECEDING),c0=(t,e)=>!!(t.compareDocumentPosition(e)&ql.DOCUMENT_POSITION_FOLLOWING),f0=0;class d0{constructor(){wt(this,"id",void 0),this.id="".concat(f0++)}}var Z={androidPendingDiffs:t=>vt.get(t),androidScheduleFlush:t=>{var e;(e=Wo.get(t))===null||e===void 0||e()},blur:t=>{var e=Z.toDOMNode(t,t),n=Z.findDocumentOrShadowRoot(t);Kt.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Z.findDocumentOrShadowRoot(t),r=fr(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&Q.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Z.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var o=Z.toSlateNode(t,e.target),s=Z.findPath(t,o);if(ue.isElement(o)&&m.isVoid(t,o)){var a=i.getBoundingClientRect(),u=t.isInline(o)?n-a.left<a.left+a.width-n:r-a.top<a.top+a.height-r,l=m.point(t,s,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var p=m.range(t,f);return p}}var h,{document:g}=Z.getWindow(t);if(g.caretRangeFromPoint)h=g.caretRangeFromPoint(n,r);else{var y=g.caretPositionFromPoint(n,r);y&&(h=g.createRange(),h.setStart(y.offsetNode,y.offset),h.setEnd(y.offsetNode,y.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Z.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=ti.get(e);return n||(n=new d0,ti.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=jo.get(r);if(i==null){if(m.isEditor(r))return n;break}var o=Io.get(r);if(o==null)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: ".concat(it.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Kt.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Z.focus(e,{retries:n.retries-1})},10);return}var r=Z.toDOMNode(e,e),i=Z.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var o=fr(i),s=Z.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(s)}e.selection||Q.select(e,m.start(e,[])),Kt.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Hl.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,o=Z.toDOMNode(e,e),s;try{s=Bt(n)?n:n.parentElement}catch(a){if(a instanceof Error&&!a.message.includes('Permission denied to access property "nodeType"'))throw a}return s?s.closest("[data-slate-editor]")===o&&(!i||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&s.closest('[contenteditable="false"]')===o||!!s.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Qt(e)&&Z.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Z.hasEditableTarget(t,e)||Z.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Qt(e)&&Z.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!En.get(t),isFocused:t=>!!Kt.get(t),isReadOnly:t=>!!_o.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(_o.get(t))return!1;var n=Z.hasTarget(t,e)&&Z.toSlateNode(t,e);return ue.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=ni.get(t),r=m.isEditor(e)?ei.get(t):n==null?void 0:n.get(Z.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(it.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Z.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var o="[data-slate-string], [data-slate-zero-width]",s=Array.from(r.querySelectorAll(o)),a=0,u=0;u<s.length;u++){var l=s[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:p}=f.textContent,h=l.getAttribute("data-slate-length"),g=h==null?p:parseInt(h,10),y=a+g,v=s[u+1];if(e.offset===y&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof t0?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=y){var B=Math.min(p,Math.max(0,e.offset-a));i=[f,B];break}a=y}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(it.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=V.isBackward(e),o=Z.toDOMPoint(t,n),s=V.isCollapsed(e)?o:Z.toDOMPoint(t,r),a=Z.getWindow(t),u=a.document.createRange(),[l,f]=i?s:o,[p,h]=i?o:s,g=Bt(l)?l:l.parentElement,y=!!g.getAttribute("data-slate-zero-width"),v=Bt(p)?p:p.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(l,y?1:f),u.setEnd(p,d?1:h),u},toSlateNode:(t,e)=>{var n=Bt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?lr.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:o="backward"}=n,[s,a]=r?e:i0(e),u=s.parentNode,l=null,f=0;if(u){var p,h,g=Z.toDOMNode(t,t),y=u.closest('[data-slate-void="true"]'),v=y&&g.contains(y)?y:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,B=u.closest("[data-slate-leaf]"),b=null;if(B){if(l=B.closest('[data-slate-node="text"]'),l){var O=Z.getWindow(t),E=O.document.createRange();E.setStart(l,0),E.setEnd(s,a);var w=E.cloneContents(),A=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];A.forEach(q=>{if(ct&&!r&&q.hasAttribute("data-slate-zero-width")&&q.textContent.length>0&&q.textContext!=="\uFEFF"){q.textContent.startsWith("\uFEFF")&&(q.textContent=q.textContent.slice(1));return}q.parentNode.removeChild(q)}),f=w.textContent.length,b=l}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),R=0;R<F.length;R++){var P=F[R];if(Z.hasDOMNode(t,P)){B=P;break}}B?(l=B.closest('[data-slate-node="text"]'),b=B,f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(q=>{f-=q.textContent.length})):f=1}else if(D){var z=q=>q?q.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],I=D.closest('[data-slate-node="element"]');if(o==="forward"){var j,T=[...z(I),...z(I==null?void 0:I.nextElementSibling)];B=(j=T.find(q=>c0(D,q)))!==null&&j!==void 0?j:null}else{var N,K=[...z(I==null?void 0:I.previousElementSibling),...z(I)];B=(N=K.findLast(q=>Kl(D,q)))!==null&&N!==void 0?N:null}B&&(l=B.closest('[data-slate-node="text"]'),b=B,o==="forward"?f=0:(f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(q=>{f-=q.textContent.length})))}b&&f===b.textContent.length&&ct&&b.getAttribute("data-slate-zero-width")==="z"&&(p=b.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Tn&&(h=b.textContent)!==null&&h!==void 0&&h.endsWith(`
81
+ */function ol(t){return Object.prototype.toString.call(t)==="[object Object]"}function um(t){var e,n;return ol(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(ol(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var lm={isHistory(t){return um(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Gt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Gt.isOperationList(t.undos[0].operations))}},wo=new WeakMap,ir=new WeakMap,gn={isHistoryEditor(t){return lm.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return ir.get(t)},isSaving(t){return wo.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=gn.isMerging(t);ir.set(t,!0),e(),ir.set(t,n)},withoutMerging(t,e){var n=gn.isMerging(t);ir.set(t,!1),e(),ir.set(t,n)},withoutSaving(t,e){var n=gn.isSaving(t);wo.set(t,!1),e(),wo.set(t,n)}},cm=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var o=i[i.length-1];o.selectionBefore&&Q.setSelection(e,o.selectionBefore),gn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var s of o.operations)e.apply(s)})}),r.redos.pop(),e.writeHistory("undos",o)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var o=i[i.length-1];gn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var s=o.operations.map(Gt.inverse).reverse();for(var a of s)e.apply(a);o.selectionBefore&&Q.setSelection(e,o.selectionBefore)})}),e.writeHistory("redos",o),r.undos.pop()}},e.apply=r=>{var{operations:i,history:o}=e,{undos:s}=o,a=s[s.length-1],u=a&&a.operations[a.operations.length-1],l=gn.isSaving(e),f=gn.isMerging(e);if(l==null&&(l=dm(r)),l){if(f==null&&(a==null?f=!1:i.length!==0?f=!0:f=fm(r,u)),a&&f)a.operations.push(r);else{var p={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",p)}for(;s.length>100;)s.shift();o.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},fm=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&L.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&L.equals(t.path,e.path)),dm=(t,e)=>t.type!=="set_selection",pm=gm,sl="֑-߿יִ-﷽ﹰ-ﻼ",al="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hm=new RegExp("^[^"+al+"]*["+sl+"]"),vm=new RegExp("^[^"+sl+"]*["+al+"]");function gm(t){return t=String(t||""),hm.test(t)?"rtl":vm.test(t)?"ltr":"neutral"}const ul=Or(pm);function mm(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bo=mm,ym=typeof We=="object"&&We&&We.Object===Object&&We,Cm=ym,Dm=Cm,Em=typeof self=="object"&&self&&self.Object===Object&&self,bm=Dm||Em||Function("return this")(),ll=bm,wm=ll,Bm=function(){return wm.Date.now()},xm=Bm,Sm=/\s/;function Am(t){for(var e=t.length;e--&&Sm.test(t.charAt(e)););return e}var Lm=Am,Om=Lm,Pm=/^\s+/;function Fm(t){return t&&t.slice(0,Om(t)+1).replace(Pm,"")}var Mm=Fm,km=ll,Tm=km.Symbol,cl=Tm,fl=cl,dl=Object.prototype,Im=dl.hasOwnProperty,jm=dl.toString,or=fl?fl.toStringTag:void 0;function Nm(t){var e=Im.call(t,or),n=t[or];try{t[or]=void 0;var r=!0}catch{}var i=jm.call(t);return r&&(e?t[or]=n:delete t[or]),i}var _m=Nm,zm=Object.prototype,Wm=zm.toString;function Um(t){return Wm.call(t)}var Hm=Um,pl=cl,Rm=_m,Vm=Hm,qm="[object Null]",Gm="[object Undefined]",hl=pl?pl.toStringTag:void 0;function Zm(t){return t==null?t===void 0?Gm:qm:hl&&hl in Object(t)?Rm(t):Vm(t)}var Ym=Zm;function Km(t){return t!=null&&typeof t=="object"}var Xm=Km,Jm=Ym,Qm=Xm,$m="[object Symbol]";function ey(t){return typeof t=="symbol"||Qm(t)&&Jm(t)==$m}var ty=ey,ny=Mm,vl=Bo,ry=ty,gl=NaN,iy=/^[-+]0x[0-9a-f]+$/i,oy=/^0b[01]+$/i,sy=/^0o[0-7]+$/i,ay=parseInt;function uy(t){if(typeof t=="number")return t;if(ry(t))return gl;if(vl(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=vl(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ny(t);var n=oy.test(t);return n||sy.test(t)?ay(t.slice(2),n?2:8):iy.test(t)?gl:+t}var ly=uy,cy=Bo,xo=xm,ml=ly,fy="Expected a function",dy=Math.max,py=Math.min;function hy(t,e,n){var r,i,o,s,a,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(fy);e=ml(e)||0,cy(n)&&(f=!!n.leading,p="maxWait"in n,o=p?dy(ml(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),f?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?py(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=xo();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(xo())}function E(){var w=xo(),A=d(w);if(r=arguments,i=this,u=w,A){if(a===void 0)return y(u);if(p)return clearTimeout(a),a=setTimeout(D,e),g(u)}return a===void 0&&(a=setTimeout(D,e)),s}return E.cancel=b,E.flush=O,E}var yl=hy;const vy=Or(yl);var gy=yl,my=Bo,yy="Expected a function";function Cy(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(yy);return my(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),gy(t,e,{leading:r,maxWait:e,trailing:i})}var Dy=Cy;const Ey=Or(Dy),Cl=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Dl=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",So=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Dl(n.overflowY,e)||Dl(n.overflowX,e)||(r=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Yr=(t,e,n,r,i,o,s,a)=>o<t&&s>e||o>t&&s<e?0:o<=t&&a<=n||s>=e&&a>=n?o-t-r:s>e&&a<n||o<t&&a>n?s-e+i:0,by=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},El=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,p=typeof l=="function"?l:K=>K!==l;if(!Cl(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,g=[];let y=t;for(;Cl(y)&&p(y);){if(y=by(y),y===h){g.push(y);break}y!=null&&y===document.body&&So(y)&&!So(document.documentElement)||y!=null&&So(y,f)&&g.push(y)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:D,scrollY:B}=window,{height:b,width:O,top:E,right:w,bottom:A,left:F}=t.getBoundingClientRect(),{top:R,right:P,bottom:z,left:I}=(K=>{const _=window.getComputedStyle(K);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(t);let j=a==="start"||a==="nearest"?E-R:a==="end"?A+z:E+b/2-R+z,T=u==="center"?F+O/2-I+P:u==="end"?w+P:F-I;const N=[];for(let K=0;K<g.length;K++){const _=g[K],{height:ie,width:re,top:k,right:H,bottom:J,left:q}=_.getBoundingClientRect();if(s==="if-needed"&&E>=0&&F>=0&&A<=d&&w<=v&&E>=k&&A<=J&&F>=q&&w<=H)return N;const ee=getComputedStyle(_),Y=parseInt(ee.borderLeftWidth,10),C=parseInt(ee.borderTopWidth,10),W=parseInt(ee.borderRightWidth,10),U=parseInt(ee.borderBottomWidth,10);let M=0,X=0;const te="offsetWidth"in _?_.offsetWidth-_.clientWidth-Y-W:0,G="offsetHeight"in _?_.offsetHeight-_.clientHeight-C-U:0,le="offsetWidth"in _?_.offsetWidth===0?0:re/_.offsetWidth:0,se="offsetHeight"in _?_.offsetHeight===0?0:ie/_.offsetHeight:0;if(h===_)M=a==="start"?j:a==="end"?j-d:a==="nearest"?Yr(B,B+d,d,C,U,B+j,B+j+b,b):j-d/2,X=u==="start"?T:u==="center"?T-v/2:u==="end"?T-v:Yr(D,D+v,v,Y,W,D+T,D+T+O,O),M=Math.max(0,M+B),X=Math.max(0,X+D);else{M=a==="start"?j-k-C:a==="end"?j-J+U+G:a==="nearest"?Yr(k,J,ie,C,U+G,j,j+b,b):j-(k+ie/2)+G/2,X=u==="start"?T-q-Y:u==="center"?T-(q+re/2)+te/2:u==="end"?T-H+W+te:Yr(q,H,re,Y,W+te,T,T+O,O);const{scrollLeft:pe,scrollTop:ve}=_;M=se===0?0:Math.max(0,Math.min(ve+M/se,_.scrollHeight-ie/se+G)),X=le===0?0:Math.max(0,Math.min(pe+X/le,_.scrollWidth-re/le+te)),j+=ve-M,T+=pe-X}N.push({el:_,top:M,left:X})}return N},wy=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function By(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(El(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:s}of El(t,wy(e))){const a=o-n.top+n.bottom,u=s-n.left+n.right;i.scroll({top:a,left:u,behavior:r})}}var mn=[],xy=function(){return mn.some(function(t){return t.activeTargets.length>0})},Sy=function(){return mn.some(function(t){return t.skippedTargets.length>0})},bl="ResizeObserver loop completed with undelivered notifications.",Ay=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:bl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=bl),window.dispatchEvent(t)},sr;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(sr||(sr={}));var yn=function(t){return Object.freeze(t)},Ly=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,yn(this)}return t}(),wl=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,yn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,s=e.bottom,a=e.left,u=e.width,l=e.height;return{x:n,y:r,top:i,right:o,bottom:s,left:a,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Ao=function(t){return t instanceof SVGElement&&"getBBox"in t},Bl=function(t){if(Ao(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},xl=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Oy=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ar=typeof window<"u"?window:{},Kr=new WeakMap,Sl=/auto|scroll/,Py=/^tb|vertical/,Fy=/msie|trident/i.test(ar.navigator&&ar.navigator.userAgent),Ot=function(t){return parseFloat(t||"0")},Mn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Ly((n?e:t)||0,(n?t:e)||0)},Al=yn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new wl(0,0,0,0)}),Ll=function(t,e){if(e===void 0&&(e=!1),Kr.has(t)&&!e)return Kr.get(t);if(Bl(t))return Kr.set(t,Al),Al;var n=getComputedStyle(t),r=Ao(t)&&t.ownerSVGElement&&t.getBBox(),i=!Fy&&n.boxSizing==="border-box",o=Py.test(n.writingMode||""),s=!r&&Sl.test(n.overflowY||""),a=!r&&Sl.test(n.overflowX||""),u=r?0:Ot(n.paddingTop),l=r?0:Ot(n.paddingRight),f=r?0:Ot(n.paddingBottom),p=r?0:Ot(n.paddingLeft),h=r?0:Ot(n.borderTopWidth),g=r?0:Ot(n.borderRightWidth),y=r?0:Ot(n.borderBottomWidth),v=r?0:Ot(n.borderLeftWidth),d=p+l,D=u+f,B=v+g,b=h+y,O=a?t.offsetHeight-b-t.clientHeight:0,E=s?t.offsetWidth-B-t.clientWidth:0,w=i?d+B:0,A=i?D+b:0,F=r?r.width:Ot(n.width)-w-E,R=r?r.height:Ot(n.height)-A-O,P=F+d+E+B,z=R+D+O+b,I=yn({devicePixelContentBoxSize:Mn(Math.round(F*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:Mn(P,z,o),contentBoxSize:Mn(F,R,o),contentRect:new wl(p,u,F,R)});return Kr.set(t,I),I},Ol=function(t,e,n){var r=Ll(t,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(e){case sr.DEVICE_PIXEL_CONTENT_BOX:return s;case sr.BORDER_BOX:return i;default:return o}},My=function(){function t(e){var n=Ll(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=yn([n.borderBoxSize]),this.contentBoxSize=yn([n.contentBoxSize]),this.devicePixelContentBoxSize=yn([n.devicePixelContentBoxSize])}return t}(),Pl=function(t){if(Bl(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},ky=function(){var t=1/0,e=[];mn.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(l){var f=new My(l.target),p=Pl(l.target);a.push(f),l.lastReportedSize=Ol(l.target,l.observedBox),p<t&&(t=p)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Fl=function(t){mn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Pl(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Ty=function(){var t=0;for(Fl(t);xy();)t=ky(),Fl(t);return Sy()&&Ay(),t>0},Lo,Ml=[],Iy=function(){return Ml.splice(0).forEach(function(t){return t()})},jy=function(t){if(!Lo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Iy()}).observe(n,r),Lo=function(){n.textContent="".concat(e?e--:e++)}}Ml.push(t),Lo()},Ny=function(t){jy(function(){requestAnimationFrame(t)})},Xr=0,_y=function(){return!!Xr},zy=250,Wy={attributes:!0,characterData:!0,childList:!0,subtree:!0},kl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Tl=function(t){return t===void 0&&(t=0),Date.now()+t},Oo=!1,Uy=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=zy),!Oo){Oo=!0;var r=Tl(e);Ny(function(){var i=!1;try{i=Ty()}finally{if(Oo=!1,e=r-Tl(),!_y())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Wy)};document.body?n():ar.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),kl.forEach(function(n){return ar.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),kl.forEach(function(n){return ar.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Po=new Uy,Il=function(t){!Xr&&t>0&&Po.start(),Xr+=t,!Xr&&Po.stop()},Hy=function(t){return!Ao(t)&&!Oy(t)&&getComputedStyle(t).display==="inline"},Ry=function(){function t(e,n){this.target=e,this.observedBox=n||sr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Ol(this.target,this.observedBox,!0);return Hy(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Vy=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Jr=new WeakMap,jl=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Qr=function(){function t(){}return t.connect=function(e,n){var r=new Vy(e,n);Jr.set(e,r)},t.observe=function(e,n,r){var i=Jr.get(e),o=i.observationTargets.length===0;jl(i.observationTargets,n)<0&&(o&&mn.push(i),i.observationTargets.push(new Ry(n,r&&r.box)),Il(1),Po.schedule())},t.unobserve=function(e,n){var r=Jr.get(e),i=jl(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&mn.splice(mn.indexOf(r),1),r.observationTargets.splice(i,1),Il(-1))},t.disconnect=function(e){var n=this,r=Jr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),qy=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Qr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!xl(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Qr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!xl(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Qr.unobserve(this,e)},t.prototype.disconnect=function(){Qr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function Gy(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 kn(t,e){if(t==null)return{};var n=Gy(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}function ur(t){"@babel/helpers - typeof";return ur=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},ur(t)}function Zy(t,e){if(ur(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ur(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yy(t){var e=Zy(t,"string");return ur(e)==="symbol"?e:String(e)}function wt(t,e,n){return e=Yy(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fo=c.createContext(null),Zt=()=>{var t=c.useContext(Fo);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Mo,ko,Nl=parseInt(c.version.split(".")[0],10),_l=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,zl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),ct=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Tn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Cn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Ky=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Wl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Xy=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Jy=ct&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Qy=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),$y=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),e0=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),$r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Mo=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Mo!==void 0&&Mo[1]&&parseInt((ko=navigator.userAgent.match(/Version\/(\d+)/))===null||ko===void 0?void 0:ko[1],10)<17);var Yt=(!Xy||!Jy)&&!Ky&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",To=new WeakMap,Io=new WeakMap,Ul=new WeakMap,ei=new WeakMap,jo=new WeakMap,lr=new WeakMap,Dn=new WeakMap,ti=new WeakMap,ni=new WeakMap,No=new WeakMap,Kt=new WeakMap,En=new WeakMap,cr=new WeakMap,_o=new WeakMap,zo=new WeakMap,St=new WeakMap,Nt=new WeakMap,vt=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,Hl=new WeakMap,In=Symbol("placeholder"),Rl=Symbol("mark-placeholder"),Vl=globalThis.Node,t0=globalThis.Text,Wo=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,n0=t=>Qt(t)&&t.nodeType===8,Bt=t=>Qt(t)&&t.nodeType===1,Qt=t=>{var e=Wo(t);return!!e&&t instanceof e.Node},Uo=t=>{var e=t&&t.anchorNode&&Wo(t.anchorNode);return!!e&&t instanceof e.Selection},ql=t=>Qt(t)&&t.nodeType===3,r0=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,i0=t=>{var[e,n]=t;if(Bt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Gl(e,i,r?"backward":"forward"),r=i<n;Bt(e)&&e.childNodes.length;){var o=r?e.childNodes.length-1:0;e=s0(e,o,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},o0=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Gl=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],o=e,s=!1,a=!1;(n0(i)||Bt(i)&&i.childNodes.length===0||Bt(i)&&i.getAttribute("contenteditable")==="false")&&!(s&&a);){if(o>=r.length){s=!0,o=e-1,n="backward";continue}if(o<0){a=!0,o=e+1,n="forward";continue}i=r[o],e=o,o+=n==="forward"?1:-1}return[i,e]},s0=(t,e,n)=>{var[r]=Gl(t,e,n);return r},Zl=t=>{var e="";if(ql(t)&&t.nodeValue)return t.nodeValue;if(Bt(t)){for(var n of Array.from(t.childNodes))e+=Zl(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
+ `)}return e},a0=/data-slate-fragment="(.+?)"/m,u0=t=>{var e=t.getData("text/html"),[,n]=e.match(a0)||[];return n},fr=t=>t.getSelection!=null?t.getSelection():document.getSelection(),Ho=(t,e,n)=>{var{target:r}=e;if(Bt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Z.getWindow(t);if(i.contains(r))return Z.hasDOMNode(t,r,{editable:!0});var o=n.find(s=>{var{addedNodes:a,removedNodes:u}=s;for(var l of a)if(l===r||l.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!o||o===e?!1:Ho(t,o,n)},l0=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},Yl=(t,e)=>!!(t.compareDocumentPosition(e)&Vl.DOCUMENT_POSITION_PRECEDING),c0=(t,e)=>!!(t.compareDocumentPosition(e)&Vl.DOCUMENT_POSITION_FOLLOWING),f0=0;class d0{constructor(){wt(this,"id",void 0),this.id="".concat(f0++)}}var Z={androidPendingDiffs:t=>vt.get(t),androidScheduleFlush:t=>{var e;(e=zo.get(t))===null||e===void 0||e()},blur:t=>{var e=Z.toDOMNode(t,t),n=Z.findDocumentOrShadowRoot(t);Kt.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Z.findDocumentOrShadowRoot(t),r=fr(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&Q.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Z.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var o=Z.toSlateNode(t,e.target),s=Z.findPath(t,o);if(ue.isElement(o)&&m.isVoid(t,o)){var a=i.getBoundingClientRect(),u=t.isInline(o)?n-a.left<a.left+a.width-n:r-a.top<a.top+a.height-r,l=m.point(t,s,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var p=m.range(t,f);return p}}var h,{document:g}=Z.getWindow(t);if(g.caretRangeFromPoint)h=g.caretRangeFromPoint(n,r);else{var y=g.caretPositionFromPoint(n,r);y&&(h=g.createRange(),h.setStart(y.offsetNode,y.offset),h.setEnd(y.offsetNode,y.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Z.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=ti.get(e);return n||(n=new d0,ti.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=Io.get(r);if(i==null){if(m.isEditor(r))return n;break}var o=To.get(r);if(o==null)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: ".concat(it.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Kt.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Z.focus(e,{retries:n.retries-1})},10);return}var r=Z.toDOMNode(e,e),i=Z.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var o=fr(i),s=Z.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(s)}e.selection||Q.select(e,m.start(e,[])),Kt.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Ul.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,o=Z.toDOMNode(e,e),s;try{s=Bt(n)?n:n.parentElement}catch(a){if(a instanceof Error&&!a.message.includes('Permission denied to access property "nodeType"'))throw a}return s?s.closest("[data-slate-editor]")===o&&(!i||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&s.closest('[contenteditable="false"]')===o||!!s.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Qt(e)&&Z.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Z.hasEditableTarget(t,e)||Z.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Qt(e)&&Z.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!En.get(t),isFocused:t=>!!Kt.get(t),isReadOnly:t=>!!No.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(No.get(t))return!1;var n=Z.hasTarget(t,e)&&Z.toSlateNode(t,e);return ue.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=ni.get(t),r=m.isEditor(e)?ei.get(t):n==null?void 0:n.get(Z.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(it.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Z.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var o="[data-slate-string], [data-slate-zero-width]",s=Array.from(r.querySelectorAll(o)),a=0,u=0;u<s.length;u++){var l=s[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:p}=f.textContent,h=l.getAttribute("data-slate-length"),g=h==null?p:parseInt(h,10),y=a+g,v=s[u+1];if(e.offset===y&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof t0?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=y){var B=Math.min(p,Math.max(0,e.offset-a));i=[f,B];break}a=y}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(it.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=V.isBackward(e),o=Z.toDOMPoint(t,n),s=V.isCollapsed(e)?o:Z.toDOMPoint(t,r),a=Z.getWindow(t),u=a.document.createRange(),[l,f]=i?s:o,[p,h]=i?o:s,g=Bt(l)?l:l.parentElement,y=!!g.getAttribute("data-slate-zero-width"),v=Bt(p)?p:p.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(l,y?1:f),u.setEnd(p,d?1:h),u},toSlateNode:(t,e)=>{var n=Bt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?lr.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:o="backward"}=n,[s,a]=r?e:i0(e),u=s.parentNode,l=null,f=0;if(u){var p,h,g=Z.toDOMNode(t,t),y=u.closest('[data-slate-void="true"]'),v=y&&g.contains(y)?y:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,B=u.closest("[data-slate-leaf]"),b=null;if(B){if(l=B.closest('[data-slate-node="text"]'),l){var O=Z.getWindow(t),E=O.document.createRange();E.setStart(l,0),E.setEnd(s,a);var w=E.cloneContents(),A=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];A.forEach(q=>{if(ct&&!r&&q.hasAttribute("data-slate-zero-width")&&q.textContent.length>0&&q.textContext!=="\uFEFF"){q.textContent.startsWith("\uFEFF")&&(q.textContent=q.textContent.slice(1));return}q.parentNode.removeChild(q)}),f=w.textContent.length,b=l}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),R=0;R<F.length;R++){var P=F[R];if(Z.hasDOMNode(t,P)){B=P;break}}B?(l=B.closest('[data-slate-node="text"]'),b=B,f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(q=>{f-=q.textContent.length})):f=1}else if(D){var z=q=>q?q.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],I=D.closest('[data-slate-node="element"]');if(o==="forward"){var j,T=[...z(I),...z(I==null?void 0:I.nextElementSibling)];B=(j=T.find(q=>c0(D,q)))!==null&&j!==void 0?j:null}else{var N,K=[...z(I==null?void 0:I.previousElementSibling),...z(I)];B=(N=K.findLast(q=>Yl(D,q)))!==null&&N!==void 0?N:null}B&&(l=B.closest('[data-slate-node="text"]'),b=B,o==="forward"?f=0:(f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(q=>{f-=q.textContent.length})))}b&&f===b.textContent.length&&ct&&b.getAttribute("data-slate-zero-width")==="z"&&(p=b.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Tn&&(h=b.textContent)!==null&&h!==void 0&&h.endsWith(`
83
83
 
84
- `))&&f--}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:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:o}=n,s=Ho(e)?e.anchorNode:e.startContainer,a,u,l,f,p;if(s)if(Ho(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]);f=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,f=h.startOffset):(a=h.startContainer,u=h.endOffset,f=g.startOffset)}else a=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Ul&&o0(a)||Tn?p=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:p=e.isCollapsed}else a=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,p=e.collapsed;if(a==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Tn&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
84
+ `))&&f--}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:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:o}=n,s=Uo(e)?e.anchorNode:e.startContainer,a,u,l,f,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]);f=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,f=h.startOffset):(a=h.startContainer,u=h.endOffset,f=g.startOffset)}else a=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Wl&&o0(a)||Tn?p=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:p=e.isCollapsed}else a=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,p=e.collapsed;if(a==null||l==null||u==null||f==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
- `)&&f===l.textContent.length&&f--;var B=Z.toSlatePoint(t,[a,u],{exactMatch:i,suppressThrow:o});if(!B)return null;var b=Kl(a,l)||a===l&&f<u,O=p?B:Z.toSlatePoint(t,[l,f],{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 p0(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 Xl(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 h0(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 v0(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 Jl(t,e){var{start:n,end:r,text:i}=e,o=t.slice(n,r),s=h0(o,i),a=Math.min(o.length-s,i.length-s),u=v0(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 g0(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=Xl(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 Jl(t,{start:r,end:u,text:a})}function m0(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function Vo(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 Ql(t,e){var n=Vo(t,e.anchor);if(!n)return null;if(V.isCollapsed(e))return{anchor:n,focus:n};var r=Vo(t,e.focus);return r?{anchor:n,focus:r}:null}function qo(t,e,n){var r=vt.get(t),i=r==null?void 0:r.find(f=>{var{path:p}=f;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return Ae.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=Ae.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=Ae.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 $l(t,e,n){var r=qo(t,e.anchor,n);if(!r)return null;if(V.isCollapsed(e))return{anchor:r,focus:r};var i=qo(t,e.focus,n);return i?{anchor:r,focus:i}:null}function y0(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 ec(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?ec(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var C0=25,D0=200,E0=function(){},b0=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function w0(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,o=null,s=null,a=null,u=0,l=!1,f=()=>{var I=Jt.get(e);if(Jt.delete(e),I){var{selection:j}=e,T=Ql(e,I);T&&(!j||!V.equals(T,j))&&Q.select(e,T)}},p=()=>{var I=Xt.get(e);if(Xt.delete(e),!!I){if(I.at){var j=Ae.isPoint(I.at)?Vo(e,I.at):Ql(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()){f();return}i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var I=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),E0("flush",Xt.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=m0(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})),p0(e,T)||(j=!1,Xt.delete(e),Nt.delete(e),i="action",Jt.delete(e),n.cancel(),r.cancel(),I==null||I.unref())}var re=I==null?void 0:I.unref();if(re&&!Jt.get(e)&&(!e.selection||!V.equals(re,e.selection))&&Q.select(e,re),b()){p();return}j&&n(),n.flush(),r.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=I=>{o&&clearTimeout(o),o=setTimeout(()=>{En.set(e,!1),h()},C0)},y=I=>{En.set(e,!0),o&&(clearTimeout(o),o=null)},v=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,T=No.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=Jl(K.text,j);ie&&N.push({path:I,diff:j,id:u++}),v();return}var re=g0(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,Jt.delete(e),n.cancel(),r.cancel(),b()&&h(),Xt.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=Xl(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=Ho(_)?_.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(b0(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(`
86
+ `)&&f===l.textContent.length&&f--;var B=Z.toSlatePoint(t,[a,u],{exactMatch:i,suppressThrow:o});if(!B)return null;var b=Yl(a,l)||a===l&&f<u,O=p?B:Z.toSlatePoint(t,[l,f],{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 p0(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 Kl(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 h0(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 v0(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 Xl(t,e){var{start:n,end:r,text:i}=e,o=t.slice(n,r),s=h0(o,i),a=Math.min(o.length-s,i.length-s),u=v0(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 g0(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=Kl(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 Xl(t,{start:r,end:u,text:a})}function m0(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 Jl(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(f=>{var{path:p}=f;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return Ae.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=Ae.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=Ae.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 Ql(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 y0(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 $l(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?$l(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var C0=25,D0=200,E0=function(){},b0=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function w0(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,o=null,s=null,a=null,u=0,l=!1,f=()=>{var I=Jt.get(e);if(Jt.delete(e),I){var{selection:j}=e,T=Jl(e,I);T&&(!j||!V.equals(T,j))&&Q.select(e,T)}},p=()=>{var I=Xt.get(e);if(Xt.delete(e),!!I){if(I.at){var j=Ae.isPoint(I.at)?Ro(e,I.at):Jl(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()){f();return}i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var I=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),E0("flush",Xt.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=m0(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})),p0(e,T)||(j=!1,Xt.delete(e),Nt.delete(e),i="action",Jt.delete(e),n.cancel(),r.cancel(),I==null||I.unref())}var re=I==null?void 0:I.unref();if(re&&!Jt.get(e)&&(!e.selection||!V.equals(re,e.selection))&&Q.select(e,re),b()){p();return}j&&n(),n.flush(),r.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=I=>{o&&clearTimeout(o),o=setTimeout(()=>{En.set(e,!1),h()},C0)},y=I=>{En.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=Xl(K.text,j);ie&&N.push({path:I,diff:j,id:u++}),v();return}var re=g0(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,Jt.delete(e),n.cancel(),r.cancel(),b()&&h(),Xt.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=Kl(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(b0(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
- `);$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=()=>!!Xt.get(e),O=()=>{var I;return!!((I=vt.get(e))!==null&&I!==void 0&&I.length)},E=()=>b()||O(),w=()=>i,A=I=>{Jt.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,D0))}},F=()=>{(b()||!O())&&h()},R=I=>{O()||(v(!0),setTimeout(v))},P=()=>{b()||(a=setTimeout(h))},z=I=>{if(!(O()||b())&&I.some(T=>Ro(e,T,I))){var j;(j=Rl.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 B0(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var dr=$r?c.useLayoutEffect:c.useEffect;function x0(t,e,n){var[r]=c.useState(()=>new MutationObserver(e));dr(()=>{r.takeRecords()}),c.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 S0=["node"];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 A0(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 L0={subtree:!0,childList:!0,characterData:!0},O0=ct?t=>{var{node:e}=t,n=kn(t,S0);if(!ct)return null;var r=Zt(),i=B0(),[o]=c.useState(()=>w0(A0({editor:r},n)));return x0(e,o.handleDomMutations,L0),Wo.set(r,o.scheduleFlush),i&&o.flush(),o}:()=>null,P0=["anchor","focus"],F0=["anchor","focus"],M0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),nc=(t,e)=>{var n=kn(t,P0),r=kn(e,F0);return t[In]===e[In]&&M0(n,r)},k0=(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)||!nc(r,i))return!1}return!0},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(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!nc(r,i))return!1}return!0};function rc(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 I0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var j0=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,o=Zt(),s=Z.findPath(o,i),a=L.parent(s),u=!!n[Vl];return o.isVoid(r)?c.createElement(Go,{length:ne.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!o.isInline(r)&&m.string(o,a)===""?c.createElement(Go,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?c.createElement(Go,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
89
- `?c.createElement(ic,{isTrailing:!0,text:n.text}):c.createElement(ic,{text:n.text})},ic=t=>{var{text:e,isTrailing:n=!1}=t,r=c.useRef(null),i=()=>"".concat(e??"").concat(n?`
90
- `:""),[o]=c.useState(i);return dr(()=>{var s=i();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),c.createElement(N0,{ref:r},o)},N0=c.memo(c.forwardRef((t,e)=>c.createElement("span",{"data-slate-string":!0,ref:e},t.children))),Go=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),c.createElement("span",I0({},i),!(ct||zl)||!n?"\uFEFF":null,n?c.createElement("br",null):null)};function oc(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 sc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _0=ct?300:0;function z0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function ac(t){t.current&&(clearTimeout(t.current),t.current=null)}var W0=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:s=B=>c.createElement(H0,sc({},B))}=t,a=Zt(),u=c.useRef(null),l=c.useRef(null),[f,p]=c.useState(!1),h=c.useRef(null),g=c.useCallback(B=>{if(z0(u,B==null),B==null){var b;No.delete(a),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(No.set(a,B),!u.current){var O=window.ResizeObserver||qy;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=c.createElement(j0,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[In];if(c.useEffect(()=>(v?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},_0)):(ac(h),p(!1)),()=>ac(h)),[v,p]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Cn?"inherit":void 0},contentEditable:!1,ref:g}};y=c.createElement(c.Fragment,null,o(d),y)}var D={"data-slate-leaf":!0};return s({attributes:D,children:y,leaf:e,text:r})},U0=c.memo(W0,(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]),H0=t=>{var{attributes:e,children:n}=t;return c.createElement("span",sc({},e),n)},R0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:s}=t,a=Zt(),u=c.useRef(null),l=ce.decorations(s,e),f=Z.findKey(a,s),p=[],h=0;h<l.length;h++){var g=l[h];p.push(c.createElement(U0,{isLast:n&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:g,text:s,parent:r,renderLeaf:o}))}var y=c.useCallback(v=>{var d=ni.get(a);v?(d==null||d.set(f,v),Dn.set(s,v),lr.set(v,s)):(d==null||d.delete(f),Dn.delete(s),u.current&&lr.delete(u.current)),u.current=v},[u,a,f,s]);return c.createElement("span",{"data-slate-node":"text",ref:y},p)},uc=c.memo(R0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&T0(e.decorations,t.decorations));function lc(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 Zo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var V0=t=>{var{decorations:e,element:n,renderElement:r=B=>c.createElement(G0,Zo({},B)),renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Zt(),u=K0(),l=a.isInline(n),f=Z.findKey(a,n),p=c.useCallback(B=>{var b=ni.get(a);B?(b==null||b.set(f,B),Dn.set(n,B),lr.set(B,n)):(b==null||b.delete(f),Dn.delete(n))},[a,f,n]),h=fc({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=ll(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=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(uc,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),Io.set(D,0),jo.set(D,n)}return r({attributes:g,children:h,element:n})},q0=c.memo(V0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&k0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&V.equals(t.selection,e.selection))),G0=t=>{var{attributes:e,children:n,element:r}=t,i=Zt(),o=i.isInline(r)?"span":"div";return c.createElement(o,Zo(Zo({},e),{},{style:{position:"relative"}}),n)},cc=c.createContext(()=>[]),Z0=()=>c.useContext(cc),Y0=c.createContext(!1),fc=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Z0(),u=Zt(),l=Z.findPath(u,n),f=[],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)?f.push(c.createElement(Y0.Provider,{key:"provider-".concat(v.id),value:!!D},c.createElement(q0,{decorations:B,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:D}))):f.push(c.createElement(uc,{decorations:B,key:v.id,isLast:p&&h===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:o,text:y})),Io.set(y,h),jo.set(y,n)}return f},dc=c.createContext(!1),K0=()=>c.useContext(dc),pc=c.createContext(null),Yo=()=>{var t=c.useContext(pc);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function X0(){var t=Zt(),e=c.useRef(!1),n=c.useRef(0),r=c.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 c.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var J0=3,Q0={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"},$0={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"},eC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ve=t=>{var e=Q0[t],n=$0[t],r=eC[t],i=e&&uo(e),o=n&&uo(n),s=r&&uo(r);return a=>!!(i&&i(a)||Wl&&o&&o(a)||!Wl&&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")},tC=(t,e)=>{var n=[],r=()=>{n=[]},i=s=>{if(e.current){var a=s.filter(u=>Ro(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}},nC={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class hc extends c.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,nC)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=tC(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(hc,"contextType",Mo);var rC=ct?hc:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},iC=c.createContext(!1),oC=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],sC=["text"];function vc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var aC=t=>c.createElement(c.Fragment,null,fc(t)),uC=c.forwardRef((t,e)=>{var n=c.useCallback(C=>c.createElement(lC,Pt({},C)),[]),{autoFocus:r,decorate:i=cC,onDOMBeforeInput:o,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=n,scrollSelectionIntoView:p=fC,style:h={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,oC),d=Yo(),[D,B]=c.useState(!1),b=c.useRef(null),O=c.useRef([]),[E,w]=c.useState(),A=c.useRef(!1),{onUserInput:F,receivedUserInput:R}=X0(),[,P]=c.useReducer(C=>C+1,0);Rl.set(d,P),_o.set(d,a);var z=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{b.current&&r&&b.current.focus()},[r]);var I=c.useRef(),j=c.useMemo(()=>Ey(()=>{var C=Z.toDOMNode(d,d),W=C.getRootNode();if(!A.current&&Cn&&W instanceof ShadowRoot){A.current=!0;var U=l0();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,Kt.set(d,!0)):Kt.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=c.useMemo(()=>vy(j,0),[j]);I.current=O0({node:b,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:T}),dr(()=>{var C,W,U;b.current&&(U=Uo(b.current))?(Hl.set(d,U),ei.set(d,b.current),Dn.set(d,b.current),lr.set(b.current,d)):Dn.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=c.useCallback(C=>{var W=Z.toDOMNode(d,d),U=W.getRootNode();if(A!=null&&A.current&&Cn&&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)&&!dC(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 sn=pe.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:sn});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),En.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=c.useCallback(C=>{C==null?(j.cancel(),T.cancel(),ei.delete(d),Dn.delete(d),b.current&&Yt&&b.current.removeEventListener("beforeinput",N)):Yt&&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=c.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,sC);if(!ce.equals(q,H,{loose:!0})){z.hasMarkPlaceholder=!0;var Y=Object.fromEntries(Object.keys(ee).map(C=>[C,null]));_.push(Pt(Pt(Pt({[Vl]:!0},Y),H),{},{anchor:J,focus:J}))}}return c.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)})}),c.createElement(dc.Provider,{value:a},c.createElement(iC.Provider,{value:D},c.createElement(cc.Provider,{value:i},c.createElement(rC,{node:b,receivedUserInput:R},c.createElement(g,Pt(Pt({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},v),{},{spellCheck:Yt||!$r?v.spellCheck:!1,autoCorrect:Yt||!$r?v.autoCorrect:"false",autoCapitalize:Yt||!$r?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:K,style:Pt(Pt({},y?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),h),onBeforeInput:c.useCallback(C=>{if(!Yt&&!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:c.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:c.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&&Qt(U)&&Z.hasDOMNode(d,U)){var X=Z.toSlateNode(d,U);if(ue.isElement(X)&&!d.isVoid(X))return}if(Cn){var te=fr(W);te==null||te.removeAllRanges()}Kt.delete(d)}}}},[a,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onClick)&&Qt(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===J0&&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:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if(Z.isComposing(d)&&Promise.resolve().then(()=>{B(!1),En.set(d,!1)}),(W=I.current)===null||W===void 0||W.handleCompositionEnd(C),ft(C,v.onCompositionEnd)||ct)return;if(!Cn&&!Qy&&!zl&&!e0&&!$y&&C.data){var U=St.get(d);St.delete(d),U!==void 0&&(Nt.set(d,d.marks),d.marks=U),m.insertText(d,C.data);var M=Nt.get(d);Nt.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(B(!0),En.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:c.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:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCopy)&&!gc(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:c.useCallback(C=>{if(!a&&Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCut)&&!gc(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:c.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:c.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:c.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:c.useCallback(C=>{!a&&z.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[a,z,v,d]),onFocus:c.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}Kt.set(d,!0)}},[a,z,d,v.onFocus]),onKeyDown:c.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&&(En.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=ll(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(Yt){if((Ul||Cn)&&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:c.useCallback(C=>{!a&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onPaste)&&(!Yt||r0(C.nativeEvent)||Cn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[a,d,v.onPaste])}),c.createElement(aC,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),lC=t=>{var{attributes:e,children:n}=t;return c.createElement("span",Pt({},e),n,ct&&c.createElement("br",null))},cC=()=>[],fC=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&V.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),By(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},ft=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},gc=t=>Qt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),dC=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},pC=c.createContext(!1),hC=c.createContext({});function vC(t){var e=c.useRef([]).current,n=c.useRef({editor:t}).current,r=c.useCallback(o=>{n.editor=o,e.forEach(s=>s(o))},[e,n]),i=c.useMemo(()=>({getSlate:()=>n.editor,addEventListener:o=>(e.push(o),()=>{e.splice(e.indexOf(o),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var gC=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],mC=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:o,initialValue:s}=t,a=kn(t,gC),[u,l]=c.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:f,onChange:p}=vC(e),h=c.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]);c.useEffect(()=>(zo.set(e,h),()=>{zo.set(e,()=>{})}),[e,h]);var[g,y]=c.useState(Z.isFocused(e));return c.useEffect(()=>{y(Z.isFocused(e))},[e]),dr(()=>{var v=()=>y(Z.isFocused(e));return _l>=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)})},[]),c.createElement(hC.Provider,{value:f},c.createElement(pc.Provider,{value:u},c.createElement(Mo.Provider,{value:u.editor},c.createElement(pC.Provider,{value:g},n))))},mc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},yc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return mc(r,i)&&mc(i,r)},yC=(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(yc(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;)yc(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 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 Dc(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 CC=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,f)=>{var p,h;(p=Wo.get(r))===null||p===void 0||p(),!St.get(r)&&(h=vt.get(r))!==null&&h!==void 0&&h.length&&St.set(r,null),Nt.delete(r),a(l,f)},r.removeMark=l=>{var f;!St.get(r)&&(f=vt.get(r))!==null&&f!==void 0&&f.length&&St.set(r,null),Nt.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&V.isCollapsed(r.selection)){var f=m.above(r,{match:y=>ue.isElement(y)&&m.isBlock(r,y),at:r.selection});if(f){var[,p]=f,h=m.range(r,p,r.selection.anchor),g=yC(r,h);V.isCollapsed(g)||Q.delete(r,{at:g})}}},r.apply=l=>{var f=[],p=[],h=vt.get(r);if(h!=null&&h.length){var g=h.map(T=>y0(T,l)).filter(Boolean);vt.set(r,g)}var y=Jt.get(r);y&&Jt.set(r,$l(r,y,l));var v=Xt.get(r);if(v!=null&&v.at){var d=Ae.isPoint(v==null?void 0:v.at)?qo(r,v.at,l):$l(r,v.at,l);Xt.set(r,d?Dc(Dc({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.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":{f.push(...jn(r,L.parent(l.path)));break}case"merge_node":{var B=L.previous(l.path);f.push(...jn(r,B));break}case"move_node":{var b=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...jn(r,b));var O;L.isBefore(l.path,l.newPath)?(f.push(...jn(r,L.parent(l.path))),O=l.newPath):(f.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 f){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:f}=r;if(f){var[p,h]=V.edges(f),g=m.void(r,{at:p.path}),y=m.void(r,{at:h.path});if(!(V.isCollapsed(f)&&!g)){var v=Z.toDOMRange(r,f),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
- `:""}),Gl(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",Yl(R)),d.ownerDocument.body.removeChild(R),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var f=l.getData("application/".concat(n))||u0(l);if(f){var p=decodeURIComponent(window.atob(f)),h=JSON.parse(p);return r.insertFragment(h),!0}return!1},r.insertTextData=l=>{var f=l.getData("text/plain");if(f){var p=f.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 f=_l<18?un.unstable_batchedUpdates:p=>p();f(()=>{var p=zo.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 Ec(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 bc=["listItem","numberedList"],ii=["left","center","right","justify"];function DC(t,e){const n=ii.includes(e)?"align":"type",r=Ec(t,e,n),i=bc.includes(e);Q.unwrapNodes(t,{match:s=>!m.isEditor(s)&&ue.isElement(s)&&bc.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 bn({format:t,icon:e}){const n=Yo(),r=ii.includes(t)?"align":"type",o=Ec(n,t,r)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),DC(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+o,onMouseDown:s,children:x.jsx(e,{})})}function EC({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 bC({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 wc(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function Bc(t,e){wc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function oi({format:t,icon:e}){const n=Yo(),i=wc(n,t)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),Bc(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:o,children:x.jsx(e,{})})}function wC({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const xc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},BC=[{type:"paragraph",children:[{text:""}]}];var Sc={},Ko={},Xo={};Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.default=LC;var Ac="html",Lc="head",si="body",xC=/<([a-zA-Z]+[0-9]?)/,Oc=/<head[^]*>/i,Pc=/<body[^]*>/i,ai=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},Jo=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Fc=typeof window=="object"&&window.DOMParser;if(typeof Fc=="function"){var SC=new Fc,AC="text/html";Jo=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),SC.parseFromString(t,AC)},ai=Jo}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"),Qo;li&&li.content&&(Qo=function(t){return li.innerHTML=t,li.content.childNodes});function LC(t){var e,n,r=t.match(xC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case Ac:{var o=Jo(t);if(!Oc.test(t)){var s=o.querySelector(Lc);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.removeChild(s)}if(!Pc.test(t)){var s=o.querySelector(si);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return o.querySelectorAll(Ac)}case Lc:case si:{var a=ai(t).querySelectorAll(i);return Pc.test(t)&&Oc.test(t)?a[0].parentNode.childNodes:a}default:{if(Qo)return Qo(t);var s=ai(t,si).querySelector(si);return s.childNodes}}}var ci={},$o={},es={};(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})(es);var Fe={},$t=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=es,ts=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),ns(this,e)},t}();Fe.Node=ts;var fi=function(t){$t(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}(ts);Fe.DataNode=fi;var Mc=function(t){$t(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=Mc;var kc=function(t){$t(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=kc;var Tc=function(t){$t(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=Tc;var di=function(t){$t(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}(ts);Fe.NodeWithChildren=di;var Ic=function(t){$t(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=Ic;var jc=function(t){$t(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=jc;var Nc=function(t){$t(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=Nc;function _c(t){return(0,gt.isTag)(t)}Fe.isTag=_c;function zc(t){return t.type===gt.ElementType.CDATA}Fe.isCDATA=zc;function Wc(t){return t.type===gt.ElementType.Text}Fe.isText=Wc;function Uc(t){return t.type===gt.ElementType.Comment}Fe.isComment=Uc;function Hc(t){return t.type===gt.ElementType.Directive}Fe.isDirective=Hc;function Rc(t){return t.type===gt.ElementType.Root}Fe.isDocument=Rc;function OC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=OC;function ns(t,e){e===void 0&&(e=!1);var n;if(Wc(t))n=new Mc(t.data);else if(Uc(t))n=new kc(t.data);else if(_c(t)){var r=e?rs(t.children):[],i=new Nc(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(zc(t)){var r=e?rs(t.children):[],o=new Ic(r);r.forEach(function(l){return l.parent=o}),n=o}else if(Rc(t)){var r=e?rs(t.children):[],s=new jc(r);r.forEach(function(l){return l.parent=s}),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),n=s}else if(Hc(t)){var a=new Tc(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=ns;function rs(t){for(var e=t.map(function(r){return ns(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,f){f===void 0&&(f=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,f,p)}:function(a,u,l,f){f===void 0&&(f=l),a[f]=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=es,i=Fe;n(Fe,t);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function a(u,l,f){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"&&(f=l,l=o),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??o,this.elementCB=f??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 f=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,f);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 f=new i.Text(u);this.addNode(f),this.lastNode=f}},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 f=new i.ProcessingInstruction(u,l);this.addNode(f)},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],f=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),f&&(u.prev=f,f.next=u),u.parent=l,this.lastNode=null},a}();t.DomHandler=s,t.default=s})($o);var Vc={};(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},{})})(Vc),Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatAttributes=qc,ci.formatDOM=Gc;var pi=$o,PC=Vc;function FC(t){return PC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function qc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function MC(t){t=t.toLowerCase();var e=FC(t);return e||t}function Gc(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=MC(a.nodeName);i=new pi.Element(u,qc(a.attributes)),i.children=Gc(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 kC=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=NC;var TC=kC(Xo),IC=ci,jC=/<(![a-zA-Z\s]+)>/;function NC(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(jC),n=e?e[1]:void 0;return(0,IC.formatDOM)((0,TC.default)(t),null,n)}var hi={},At={},vi={},_C=0;vi.SAME=_C;var zC=1;vi.CAMELCASE=zC,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 Zc=0,en=1,gi=2,mi=3,is=4,Yc=5,Kc=6;function WC(t){return ot.hasOwnProperty(t)?ot[t]:null}function dt(t,e,n,r,i,o,s){this.acceptsBooleans=e===gi||e===mi||e===is,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,Zc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ot[t]=new dt(t,en,!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,is,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{ot[t]=new dt(t,Kc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ot[t]=new dt(t,Yc,!1,t.toLowerCase(),null,!1,!1)});const os=/[\-\:]([a-z])/g,ss=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(os,ss);ot[e]=new dt(e,en,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(os,ss);ot[e]=new dt(e,en,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(os,ss);ot[e]=new dt(e,en,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ot[t]=new dt(t,en,!1,t.toLowerCase(),null,!1,!1)});const UC="xlinkHref";ot[UC]=new dt("xlinkHref",en,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ot[t]=new dt(t,en,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:HC,SAME:RC,possibleStandardNames:Xc}=vi,VC=":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",qC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+VC+"]*$")),GC=Object.keys(Xc).reduce((t,e)=>{const n=Xc[e];return n===RC?t[e]=e:n===HC?t[e.toLowerCase()]=e:t[e]=n,t},{});At.BOOLEAN=mi,At.BOOLEANISH_STRING=gi,At.NUMERIC=Yc,At.OVERLOADED_BOOLEAN=is,At.POSITIVE_NUMERIC=Kc,At.RESERVED=Zc,At.STRING=en,At.getPropertyInfo=WC,At.isCustomAttribute=qC,At.possibleStandardNames=GC;var as={},us={},Jc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ZC=/\n/g,YC=/^\s*/,KC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,XC=/^:\s*/,JC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,QC=/^[;\s]*/,$C=/^\s+|\s+$/g,eD=`
92
- `,Qc="/",$c="*",wn="",tD="comment",nD="declaration",rD=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(ZC);v&&(n+=v.length);var d=y.lastIndexOf(eD);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(YC)}function f(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(Qc!=t.charAt(0)||$c!=t.charAt(1))){for(var v=2;wn!=t.charAt(v)&&($c!=t.charAt(v)||Qc!=t.charAt(v+1));)++v;if(v+=2,wn===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:tD,comment:d})}}function h(){var y=o(),v=u(KC);if(v){if(p(),!u(XC))return a("property missing ':'");var d=u(JC),D=y({type:nD,property:ef(v[0].replace(Jc,wn)),value:d?ef(d[0].replace(Jc,wn)):wn});return u(QC),D}}function g(){var y=[];f(y);for(var v;v=h();)v!==!1&&(y.push(v),f(y));return y}return l(),g()};function ef(t){return t?t.replace($C,wn):wn}var iD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(us,"__esModule",{value:!0}),us.default=sD;var oD=iD(rD);function sD(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,oD.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 aD=/^--[a-zA-Z0-9-]+$/,uD=/-([a-z])/g,lD=/^[^-]+$/,cD=/^-(webkit|moz|ms|o|khtml)-/,fD=/^-(ms)-/,dD=function(t){return!t||lD.test(t)||aD.test(t)},pD=function(t,e){return e.toUpperCase()},tf=function(t,e){return"".concat(e,"-")},hD=function(t,e){return e===void 0&&(e={}),dD(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(fD,tf):t=t.replace(cD,tf),t.replace(uD,pD))};yi.camelCase=hD;var vD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},gD=vD(us),mD=yi;function ls(t,e){var n={};return!t||typeof t!="string"||(0,gD.default)(t,function(r,i){r&&i&&(n[(0,mD.camelCase)(r,e)]=i)}),n}ls.default=ls;var yD=ls;(function(t){var e=We&&We.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};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=c,r=e(yD),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(f,p){return f.includes("-")?!i.has(f):!!(p&&typeof p.is=="string")}var s={reactCompat:!0};function a(f,p){if(typeof f=="string"){if(!f.trim()){p.style={};return}try{p.style=(0,r.default)(f,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(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(as),Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=bD;var hr=At,nf=as,CD=["checked","value"],DD=["input","select","textarea"],ED={reset:!0,submit:!0};function bD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&ED[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=rf(s);if(a){var u=(0,hr.getPropertyInfo)(a);switch(CD.includes(a)&&DD.includes(e)&&!r&&(a=rf("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}nf.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=o)}return(0,nf.setStyleProp)(t.style,n),n}function rf(t){return hr.possibleStandardNames[t]}var cs={},wD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=of;var fs=c,BD=wD(hi),vr=as,xD={cloneElement:fs.cloneElement,createElement:fs.createElement,isValidElement:fs.isValidElement};function of(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||vr.returnFirstArg,o=e.library||xD,s=o.cloneElement,a=o.createElement,u=o.isValidElement,l=t.length,f=0;f<l;f++){var p=t[f];if(r){var h=e.replace(p,f);if(u(h)){l>1&&(h=s(h,{key:h.key||f})),n.push(i(h,p,f));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,f));continue}var y=p,v={};SD(y)?((0,vr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,BD.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=of(p.children,e));break;default:continue}l>1&&(v.key=f),n.push(i(a(p.name,v,d),p,f))}return n.length===1?n[0]:n}function SD(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(Ko);t.htmlToDOM=n.default;var r=e(hi);t.attributesToProps=r.default;var i=e(cs);t.domToReact=i.default;var o=$o;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):[]}})(Sc);const sf=Or(Sc),AD=sf.default||sf,ds=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(o=>ds(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}}},LD=t=>{const e=AD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:ds(n)):typeof e=="string"?[{text:e}]:[ds(e)]};function af(t){return t.map(e=>ne.string(e)).join("")}const uf=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=>uf(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""},lf=t=>t.children.map(e=>uf(e)).join(""),cf=t=>/<\/?[a-z][\s\S]*>/i.test(t);function OD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:o,onChange:s,isError:a}){const u=c.useMemo(()=>cm(CC(am())),[]),{id:l,inputRef:f,error:p}=yt(),h=c.useRef(null),g=cf(e)?LD(e):BC,y=af(g),[v,d]=c.useState(y.length),[D,B]=c.useState(cf(e)?e:""),[b,O]=c.useState(!1),E=f||h,w=a||!!p,A=c.useCallback(bC,[]),F=c.useCallback(EC,[]);function R(T){const N=af(T);d(N.length),r&&r(N.length),!(n&&N.length>=i)&&(B(lf(u)),s&&s(T),o&&o(lf(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(mC,{editor:u,initialValue:g,onChange:R,onValueChange:R,children:[x.jsxs("div",{className:I,children:[x.jsxs(wC,{children:[x.jsx(bn,{format:"headingOne",icon:Se.Heading1}),x.jsx(bn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(bn,{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(bn,{format:"left",icon:Se.AlignLeft}),x.jsx(bn,{format:"right",icon:Se.AlignRight}),x.jsx(bn,{format:"center",icon:Se.AlignCenter}),x.jsx(bn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(uC,{className:"editorContainer",renderElement:F,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const N in xc)if(Oh(N,T)){T.preventDefault();const K=xc[N];Bc(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 PD(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:f,onFocus:p,onBlur:h,title:g,style:y,closeOnSelect:v=!0,...d}=t,E=`arkyn_select ${a?"hasPrefix":""} ${s} ${i} ${l||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,A={md:20,lg:20}[i];return{isLoading:n,className:E,prefix:Od(a,A,"prefix"),LeftIcon:u,disabled:l||n||f,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 FD(t){var J;const[e,n]=c.useState(!1),{inputRef:r,id:i,error:o}=yt(),s=c.useRef(null),a=r||s,u=t.isError||!!o,{disabled:l,title:f,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}=PD({...t,id:i,isError:u},e),[j,T]=c.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:f,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 MD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:o="",name:s,className:a="",onCheck:u,...l}=t,[f,p]=c.useState(n),{id:h,inputRef:g}=yt(),y=typeof r=="boolean"?r:f;function v(){p(!f),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 kD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:o=!1,onFocus:s,onBlur:a,title:u,style:l,...f}=t,[p,h]=c.useState(!1),{inputRef:g,id:y,error:v}=yt(),d=c.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,...f})})}function TD(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function ID(t){const{pathname:e}=Ln.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(Ln.Link,{to:o,className:u,...s,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ff(t=""){const e=Ln.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 jD(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:o=2,...s}=t,a=Ln.useNavigate(),{getParam:u,getScopedSearch:l}=ff(e),f=Number(u(i))||1,p=Number(u(r))||20,h=Math.ceil(n/p),g=Ld(f,o),y=Ad(f,o,h);function v(d){a(l({page:d}))}return x.jsxs("div",{className:"arkynPagination",...s,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:x.jsx(Se.ChevronLeft,{})}),f>1+o&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>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:f}),y.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+o<h&&x.jsxs(x.Fragment,{children:[f+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:f>=h,onClick:()=>v(f+1),children:x.jsx(Se.ChevronRight,{})})]})}const ps=c.createContext({});function ND(){if(!ps)throw new Error("useTabContext must be used within a TabProvider");return c.useContext(ps)}function _D(t){const{children:e,onClick:n,defaultActive:r,className:i,...o}=t,[s,a]=c.useState(r||""),[u,l]=c.useState(!0),f=c.useRef(null),p=`arkynTabContainer ${i||""}`,[h,g]=c.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const B=d.getBoundingClientRect(),b=f.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-b.left}px`})};c.useEffect(()=>{const d=f.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:f,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 zD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:o,showInitialTab:s,handleTabClick:a}=ND(),u=o===i.value&&o?"activeTrue":"activeFalse",f=`arkynTabButton ${o===i.value&&s?"showBorderBottom":""} ${u} ${n}`;function p(h){a(h),r&&r(h)}return x.jsx("button",{onClick:p,className:f.trim(),...i,children:e})}const df=c.createContext({});function WD(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(ln.AnimatePresence,{children:e&&x.jsxs("aside",{className:l.trim(),...s,children:[x.jsx(ln.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(ln.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:i})]})})})}function UD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=c.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=c.createContext({});function HD(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(ln.AnimatePresence,{children:e&&x.jsxs("aside",{className:a.trim(),...o,children:[x.jsx(ln.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(ln.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 RD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function VD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=c.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 qD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[o,s]=c.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(ln.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 GD(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("aside",{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 ZD(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,YD="[object Symbol]",KD=/^\s+|\s+$/g,XD=/^[-+]0x[0-9a-f]+$/i,JD=/^0b[01]+$/i,QD=/^0o[0-7]+$/i,$D=parseInt,eE=typeof We=="object"&&We&&We.Object===Object&&We,tE=typeof self=="object"&&self&&self.Object===Object&&self,nE=eE||tE||Function("return this")(),rE=Object.prototype,iE=rE.toString,oE=Math.max,sE=Math.min,vs=function(){return nE.Date.now()};function aE(t,e,n){var r,i,o,s,a,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(hf);e=gf(e)||0,Ci(n)&&(f=!!n.leading,p="maxWait"in n,o=p?oE(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),f?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?sE(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 uE(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),aE(t,e,{leading:r,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function lE(t){return!!t&&typeof t=="object"}function cE(t){return typeof t=="symbol"||lE(t)&&iE.call(t)==YD}function gf(t){if(typeof t=="number")return t;if(cE(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(KD,"");var n=JD.test(t);return n||QD.test(t)?$D(t.slice(2),n?2:8):XD.test(t)?vf:+t}var fE=uE,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 dE=fE,pE=vE(dE),hE=yr;function vE(t){return t&&t.__esModule?t:{default:t}}var gE=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,pE.default)(e,n)},Ye={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=gE(function(i){Ye.scrollHandler(e)},n);Ye.scrollSpyContainers.push(e),(0,hE.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 mE=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)},yE=function(){return window.location.hash.replace(/^#/,"")},CE=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},DE=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}},EE=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(DE(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===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(f){return f===document};return gs(n,u).offsetTop-gs(e,u).offsetTop};Cr.default={updateHash:mE,getHash:yE,filterElementInContainer:CE,scrollOffset:EE};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 bE=yr,wE=["mousedown","mousewheel","touchmove","keydown"];ys.default={subscribe:function(e){return typeof document<"u"&&wE.forEach(function(n){return(0,bE.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 BE=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},xE=Cr;bi(xE);var SE=ms,mf=bi(SE),AE=ys,LE=bi(AE),OE=Dr,Ft=bi(OE);function bi(t){return t&&t.__esModule?t:{default:t}}var yf=function(e){return mf.default[e.smooth]||mf.default.defaultEasing},PE=function(e){return typeof e=="function"?e:function(){return e}},FE=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Ds=function(){return FE()||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},ME=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)},kE=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)},TE=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Ft.default.registered.end&&Ft.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}Ft.default.registered.end&&Ft.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(LE.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){Ft.default.registered.end&&Ft.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=PE(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=TE.bind(null,s,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Ft.default.registered.begin&&Ft.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},n.delay);return}Ft.default.registered.begin&&Ft.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},wi=function(e){return e=BE({},e),e.data=e.data||Cf(),e.absolute=!0,e},IE=function(e){Er(0,wi(e))},jE=function(e,n){Er(e,wi(n))},NE=function(e){e=wi(e),Es(e),Er(e.horizontal?ME(e):kE(e),e)},_E=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:IE,scrollToBottom:NE,scrollTo:jE,scrollMore:_E},Object.defineProperty(Nn,"__esModule",{value:!0});var zE=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},WE=Cr,UE=bs(WE),HE=Ei,RE=bs(HE),VE=Dr,Bi=bs(VE);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=zE({},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=UE.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}RE.default.animateTopScroll(u,n,e,r)}};var ws={exports:{}},Si={exports:{}},_e={};/** @license React v16.13.1
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=()=>!!Xt.get(e),O=()=>{var I;return!!((I=vt.get(e))!==null&&I!==void 0&&I.length)},E=()=>b()||O(),w=()=>i,A=I=>{Jt.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,D0))}},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=Hl.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 B0(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var dr=$r?c.useLayoutEffect:c.useEffect;function x0(t,e,n){var[r]=c.useState(()=>new MutationObserver(e));dr(()=>{r.takeRecords()}),c.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 S0=["node"];function ec(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 A0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ec(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var L0={subtree:!0,childList:!0,characterData:!0},O0=ct?t=>{var{node:e}=t,n=kn(t,S0);if(!ct)return null;var r=Zt(),i=B0(),[o]=c.useState(()=>w0(A0({editor:r},n)));return x0(e,o.handleDomMutations,L0),zo.set(r,o.scheduleFlush),i&&o.flush(),o}:()=>null,P0=["anchor","focus"],F0=["anchor","focus"],M0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),tc=(t,e)=>{var n=kn(t,P0),r=kn(e,F0);return t[In]===e[In]&&M0(n,r)},k0=(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)||!tc(r,i))return!1}return!0},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(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!tc(r,i))return!1}return!0};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 I0(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 j0=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,o=Zt(),s=Z.findPath(o,i),a=L.parent(s),u=!!n[Rl];return o.isVoid(r)?c.createElement(qo,{length:ne.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!o.isInline(r)&&m.string(o,a)===""?c.createElement(qo,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?c.createElement(qo,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
89
+ `?c.createElement(rc,{isTrailing:!0,text:n.text}):c.createElement(rc,{text:n.text})},rc=t=>{var{text:e,isTrailing:n=!1}=t,r=c.useRef(null),i=()=>"".concat(e??"").concat(n?`
90
+ `:""),[o]=c.useState(i);return dr(()=>{var s=i();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),c.createElement(N0,{ref:r},o)},N0=c.memo(c.forwardRef((t,e)=>c.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),c.createElement("span",I0({},i),!(ct||_l)||!n?"\uFEFF":null,n?c.createElement("br",null):null)};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 oc(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 _0=ct?300:0;function z0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function sc(t){t.current&&(clearTimeout(t.current),t.current=null)}var W0=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:s=B=>c.createElement(H0,oc({},B))}=t,a=Zt(),u=c.useRef(null),l=c.useRef(null),[f,p]=c.useState(!1),h=c.useRef(null),g=c.useCallback(B=>{if(z0(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||qy;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=c.createElement(j0,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[In];if(c.useEffect(()=>(v?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},_0)):(sc(h),p(!1)),()=>sc(h)),[v,p]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Cn?"inherit":void 0},contentEditable:!1,ref:g}};y=c.createElement(c.Fragment,null,o(d),y)}var D={"data-slate-leaf":!0};return s({attributes:D,children:y,leaf:e,text:r})},U0=c.memo(W0,(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]),H0=t=>{var{attributes:e,children:n}=t;return c.createElement("span",oc({},e),n)},R0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:s}=t,a=Zt(),u=c.useRef(null),l=ce.decorations(s,e),f=Z.findKey(a,s),p=[],h=0;h<l.length;h++){var g=l[h];p.push(c.createElement(U0,{isLast:n&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:g,text:s,parent:r,renderLeaf:o}))}var y=c.useCallback(v=>{var d=ni.get(a);v?(d==null||d.set(f,v),Dn.set(s,v),lr.set(v,s)):(d==null||d.delete(f),Dn.delete(s),u.current&&lr.delete(u.current)),u.current=v},[u,a,f,s]);return c.createElement("span",{"data-slate-node":"text",ref:y},p)},ac=c.memo(R0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&T0(e.decorations,t.decorations));function uc(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?uc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var V0=t=>{var{decorations:e,element:n,renderElement:r=B=>c.createElement(G0,Go({},B)),renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Zt(),u=K0(),l=a.isInline(n),f=Z.findKey(a,n),p=c.useCallback(B=>{var b=ni.get(a);B?(b==null||b.set(f,B),Dn.set(n,B),lr.set(B,n)):(b==null||b.delete(f),Dn.delete(n))},[a,f,n]),h=cc({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=ul(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=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(ac,{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})},q0=c.memo(V0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&k0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&V.equals(t.selection,e.selection))),G0=t=>{var{attributes:e,children:n,element:r}=t,i=Zt(),o=i.isInline(r)?"span":"div";return c.createElement(o,Go(Go({},e),{},{style:{position:"relative"}}),n)},lc=c.createContext(()=>[]),Z0=()=>c.useContext(lc),Y0=c.createContext(!1),cc=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Z0(),u=Zt(),l=Z.findPath(u,n),f=[],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)?f.push(c.createElement(Y0.Provider,{key:"provider-".concat(v.id),value:!!D},c.createElement(q0,{decorations:B,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:D}))):f.push(c.createElement(ac,{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 f},fc=c.createContext(!1),K0=()=>c.useContext(fc),dc=c.createContext(null),Zo=()=>{var t=c.useContext(dc);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function X0(){var t=Zt(),e=c.useRef(!1),n=c.useRef(0),r=c.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 c.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var J0=3,Q0={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"},$0={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"},eC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ve=t=>{var e=Q0[t],n=$0[t],r=eC[t],i=e&&ao(e),o=n&&ao(n),s=r&&ao(r);return a=>!!(i&&i(a)||zl&&o&&o(a)||!zl&&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")},tC=(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}},nC={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class pc extends c.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,nC)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=tC(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(pc,"contextType",Fo);var rC=ct?pc:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},iC=c.createContext(!1),oC=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],sC=["text"];function hc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var aC=t=>c.createElement(c.Fragment,null,cc(t)),uC=c.forwardRef((t,e)=>{var n=c.useCallback(C=>c.createElement(lC,Pt({},C)),[]),{autoFocus:r,decorate:i=cC,onDOMBeforeInput:o,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=n,scrollSelectionIntoView:p=fC,style:h={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,oC),d=Zo(),[D,B]=c.useState(!1),b=c.useRef(null),O=c.useRef([]),[E,w]=c.useState(),A=c.useRef(!1),{onUserInput:F,receivedUserInput:R}=X0(),[,P]=c.useReducer(C=>C+1,0);Hl.set(d,P),No.set(d,a);var z=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{b.current&&r&&b.current.focus()},[r]);var I=c.useRef(),j=c.useMemo(()=>Ey(()=>{var C=Z.toDOMNode(d,d),W=C.getRootNode();if(!A.current&&Cn&&W instanceof ShadowRoot){A.current=!0;var U=l0();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,Kt.set(d,!0)):Kt.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=c.useMemo(()=>vy(j,0),[j]);I.current=O0({node:b,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:T}),dr(()=>{var C,W,U;b.current&&(U=Wo(b.current))?(Ul.set(d,U),ei.set(d,b.current),Dn.set(d,b.current),lr.set(b.current,d)):Dn.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=c.useCallback(C=>{var W=Z.toDOMNode(d,d),U=W.getRootNode();if(A!=null&&A.current&&Cn&&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)&&!dC(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 sn=pe.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:sn});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),En.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=c.useCallback(C=>{C==null?(j.cancel(),T.cancel(),ei.delete(d),Dn.delete(d),b.current&&Yt&&b.current.removeEventListener("beforeinput",N)):Yt&&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=c.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,sC);if(!ce.equals(q,H,{loose:!0})){z.hasMarkPlaceholder=!0;var Y=Object.fromEntries(Object.keys(ee).map(C=>[C,null]));_.push(Pt(Pt(Pt({[Rl]:!0},Y),H),{},{anchor:J,focus:J}))}}return c.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)})}),c.createElement(fc.Provider,{value:a},c.createElement(iC.Provider,{value:D},c.createElement(lc.Provider,{value:i},c.createElement(rC,{node:b,receivedUserInput:R},c.createElement(g,Pt(Pt({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},v),{},{spellCheck:Yt||!$r?v.spellCheck:!1,autoCorrect:Yt||!$r?v.autoCorrect:"false",autoCapitalize:Yt||!$r?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:K,style:Pt(Pt({},y?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),h),onBeforeInput:c.useCallback(C=>{if(!Yt&&!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:c.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:c.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&&Qt(U)&&Z.hasDOMNode(d,U)){var X=Z.toSlateNode(d,U);if(ue.isElement(X)&&!d.isVoid(X))return}if(Cn){var te=fr(W);te==null||te.removeAllRanges()}Kt.delete(d)}}}},[a,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:c.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onClick)&&Qt(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===J0&&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:c.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if(Z.isComposing(d)&&Promise.resolve().then(()=>{B(!1),En.set(d,!1)}),(W=I.current)===null||W===void 0||W.handleCompositionEnd(C),ft(C,v.onCompositionEnd)||ct)return;if(!Cn&&!Qy&&!_l&&!e0&&!$y&&C.data){var U=St.get(d);St.delete(d),U!==void 0&&(Nt.set(d,d.marks),d.marks=U),m.insertText(d,C.data);var M=Nt.get(d);Nt.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(B(!0),En.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:c.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:c.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCopy)&&!vc(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:c.useCallback(C=>{if(!a&&Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCut)&&!vc(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:c.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:c.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:c.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:c.useCallback(C=>{!a&&z.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[a,z,v,d]),onFocus:c.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}Kt.set(d,!0)}},[a,z,d,v.onFocus]),onKeyDown:c.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&&(En.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=ul(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(Yt){if((Wl||Cn)&&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:c.useCallback(C=>{!a&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onPaste)&&(!Yt||r0(C.nativeEvent)||Cn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[a,d,v.onPaste])}),c.createElement(aC,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),lC=t=>{var{attributes:e,children:n}=t;return c.createElement("span",Pt({},e),n,ct&&c.createElement("br",null))},cC=()=>[],fC=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&V.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),By(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},ft=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},vc=t=>Qt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),dC=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},pC=c.createContext(!1),hC=c.createContext({});function vC(t){var e=c.useRef([]).current,n=c.useRef({editor:t}).current,r=c.useCallback(o=>{n.editor=o,e.forEach(s=>s(o))},[e,n]),i=c.useMemo(()=>({getSlate:()=>n.editor,addEventListener:o=>(e.push(o),()=>{e.splice(e.indexOf(o),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var gC=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],mC=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:o,initialValue:s}=t,a=kn(t,gC),[u,l]=c.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:f,onChange:p}=vC(e),h=c.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]);c.useEffect(()=>(_o.set(e,h),()=>{_o.set(e,()=>{})}),[e,h]);var[g,y]=c.useState(Z.isFocused(e));return c.useEffect(()=>{y(Z.isFocused(e))},[e]),dr(()=>{var v=()=>y(Z.isFocused(e));return Nl>=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)})},[]),c.createElement(hC.Provider,{value:f},c.createElement(dc.Provider,{value:u},c.createElement(Fo.Provider,{value:u.editor},c.createElement(pC.Provider,{value:g},n))))},gc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},mc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return gc(r,i)&&gc(i,r)},yC=(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(mc(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;)mc(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 yc(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 Cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var CC=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,f)=>{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),Nt.delete(r),a(l,f)},r.removeMark=l=>{var f;!St.get(r)&&(f=vt.get(r))!==null&&f!==void 0&&f.length&&St.set(r,null),Nt.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&V.isCollapsed(r.selection)){var f=m.above(r,{match:y=>ue.isElement(y)&&m.isBlock(r,y),at:r.selection});if(f){var[,p]=f,h=m.range(r,p,r.selection.anchor),g=yC(r,h);V.isCollapsed(g)||Q.delete(r,{at:g})}}},r.apply=l=>{var f=[],p=[],h=vt.get(r);if(h!=null&&h.length){var g=h.map(T=>y0(T,l)).filter(Boolean);vt.set(r,g)}var y=Jt.get(r);y&&Jt.set(r,Ql(r,y,l));var v=Xt.get(r);if(v!=null&&v.at){var d=Ae.isPoint(v==null?void 0:v.at)?Vo(r,v.at,l):Ql(r,v.at,l);Xt.set(r,d?Cc(Cc({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.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":{f.push(...jn(r,L.parent(l.path)));break}case"merge_node":{var B=L.previous(l.path);f.push(...jn(r,B));break}case"move_node":{var b=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...jn(r,b));var O;L.isBefore(l.path,l.newPath)?(f.push(...jn(r,L.parent(l.path))),O=l.newPath):(f.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 f){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:f}=r;if(f){var[p,h]=V.edges(f),g=m.void(r,{at:p.path}),y=m.void(r,{at:h.path});if(!(V.isCollapsed(f)&&!g)){var v=Z.toDOMRange(r,f),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
+ `:""}),ql(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",Zl(R)),d.ownerDocument.body.removeChild(R),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var f=l.getData("application/".concat(n))||u0(l);if(f){var p=decodeURIComponent(window.atob(f)),h=JSON.parse(p);return r.insertFragment(h),!0}return!1},r.insertTextData=l=>{var f=l.getData("text/plain");if(f){var p=f.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 f=Nl<18?un.unstable_batchedUpdates:p=>p();f(()=>{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 Dc(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 Ec=["listItem","numberedList"],ii=["left","center","right","justify"];function DC(t,e){const n=ii.includes(e)?"align":"type",r=Dc(t,e,n),i=Ec.includes(e);Q.unwrapNodes(t,{match:s=>!m.isEditor(s)&&ue.isElement(s)&&Ec.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 bn({format:t,icon:e}){const n=Zo(),r=ii.includes(t)?"align":"type",o=Dc(n,t,r)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),DC(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+o,onMouseDown:s,children:x.jsx(e,{})})}function EC({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 bC({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 wc(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(),wc(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:o,children:x.jsx(e,{})})}function wC({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const Bc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},BC=[{type:"paragraph",children:[{text:""}]}];var xc={},Yo={},Ko={};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=LC;var Sc="html",Ac="head",si="body",xC=/<([a-zA-Z]+[0-9]?)/,Lc=/<head[^]*>/i,Oc=/<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`")},Pc=typeof window=="object"&&window.DOMParser;if(typeof Pc=="function"){var SC=new Pc,AC="text/html";Xo=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),SC.parseFromString(t,AC)},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 LC(t){var e,n,r=t.match(xC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case Sc:{var o=Xo(t);if(!Lc.test(t)){var s=o.querySelector(Ac);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.removeChild(s)}if(!Oc.test(t)){var s=o.querySelector(si);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return o.querySelectorAll(Sc)}case Ac:case si:{var a=ai(t).querySelectorAll(i);return Oc.test(t)&&Lc.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={},$t=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){$t(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 Fc=function(t){$t(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=Fc;var Mc=function(t){$t(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=Mc;var kc=function(t){$t(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=kc;var di=function(t){$t(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 Tc=function(t){$t(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=Tc;var Ic=function(t){$t(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=Ic;var jc=function(t){$t(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=jc;function Nc(t){return(0,gt.isTag)(t)}Fe.isTag=Nc;function _c(t){return t.type===gt.ElementType.CDATA}Fe.isCDATA=_c;function zc(t){return t.type===gt.ElementType.Text}Fe.isText=zc;function Wc(t){return t.type===gt.ElementType.Comment}Fe.isComment=Wc;function Uc(t){return t.type===gt.ElementType.Directive}Fe.isDirective=Uc;function Hc(t){return t.type===gt.ElementType.Root}Fe.isDocument=Hc;function OC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=OC;function ts(t,e){e===void 0&&(e=!1);var n;if(zc(t))n=new Fc(t.data);else if(Wc(t))n=new Mc(t.data);else if(Nc(t)){var r=e?ns(t.children):[],i=new jc(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(_c(t)){var r=e?ns(t.children):[],o=new Tc(r);r.forEach(function(l){return l.parent=o}),n=o}else if(Hc(t)){var r=e?ns(t.children):[],s=new Ic(r);r.forEach(function(l){return l.parent=s}),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),n=s}else if(Uc(t)){var a=new kc(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,f){f===void 0&&(f=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,f,p)}:function(a,u,l,f){f===void 0&&(f=l),a[f]=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,f){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"&&(f=l,l=o),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??o,this.elementCB=f??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 f=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,f);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 f=new i.Text(u);this.addNode(f),this.lastNode=f}},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 f=new i.ProcessingInstruction(u,l);this.addNode(f)},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],f=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),f&&(u.prev=f,f.next=u),u.parent=l,this.lastNode=null},a}();t.DomHandler=s,t.default=s})(Qo);var Rc={};(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},{})})(Rc),Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatAttributes=Vc,ci.formatDOM=qc;var pi=Qo,PC=Rc;function FC(t){return PC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Vc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function MC(t){t=t.toLowerCase();var e=FC(t);return e||t}function qc(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=MC(a.nodeName);i=new pi.Element(u,Vc(a.attributes)),i.children=qc(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 kC=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=NC;var TC=kC(Ko),IC=ci,jC=/<(![a-zA-Z\s]+)>/;function NC(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(jC),n=e?e[1]:void 0;return(0,IC.formatDOM)((0,TC.default)(t),null,n)}var hi={},At={},vi={},_C=0;vi.SAME=_C;var zC=1;vi.CAMELCASE=zC,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 Gc=0,en=1,gi=2,mi=3,rs=4,Zc=5,Yc=6;function WC(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,Gc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ot[t]=new dt(t,en,!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,Yc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ot[t]=new dt(t,Zc,!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,en,!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,en,!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,en,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ot[t]=new dt(t,en,!1,t.toLowerCase(),null,!1,!1)});const UC="xlinkHref";ot[UC]=new dt("xlinkHref",en,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ot[t]=new dt(t,en,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:HC,SAME:RC,possibleStandardNames:Kc}=vi,VC=":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",qC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+VC+"]*$")),GC=Object.keys(Kc).reduce((t,e)=>{const n=Kc[e];return n===RC?t[e]=e:n===HC?t[e.toLowerCase()]=e:t[e]=n,t},{});At.BOOLEAN=mi,At.BOOLEANISH_STRING=gi,At.NUMERIC=Zc,At.OVERLOADED_BOOLEAN=rs,At.POSITIVE_NUMERIC=Yc,At.RESERVED=Gc,At.STRING=en,At.getPropertyInfo=WC,At.isCustomAttribute=qC,At.possibleStandardNames=GC;var ss={},as={},Xc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ZC=/\n/g,YC=/^\s*/,KC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,XC=/^:\s*/,JC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,QC=/^[;\s]*/,$C=/^\s+|\s+$/g,eD=`
92
+ `,Jc="/",Qc="*",wn="",tD="comment",nD="declaration",rD=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(ZC);v&&(n+=v.length);var d=y.lastIndexOf(eD);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(YC)}function f(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!(Jc!=t.charAt(0)||Qc!=t.charAt(1))){for(var v=2;wn!=t.charAt(v)&&(Qc!=t.charAt(v)||Jc!=t.charAt(v+1));)++v;if(v+=2,wn===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:tD,comment:d})}}function h(){var y=o(),v=u(KC);if(v){if(p(),!u(XC))return a("property missing ':'");var d=u(JC),D=y({type:nD,property:$c(v[0].replace(Xc,wn)),value:d?$c(d[0].replace(Xc,wn)):wn});return u(QC),D}}function g(){var y=[];f(y);for(var v;v=h();)v!==!1&&(y.push(v),f(y));return y}return l(),g()};function $c(t){return t?t.replace($C,wn):wn}var iD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(as,"__esModule",{value:!0}),as.default=sD;var oD=iD(rD);function sD(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,oD.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 aD=/^--[a-zA-Z0-9-]+$/,uD=/-([a-z])/g,lD=/^[^-]+$/,cD=/^-(webkit|moz|ms|o|khtml)-/,fD=/^-(ms)-/,dD=function(t){return!t||lD.test(t)||aD.test(t)},pD=function(t,e){return e.toUpperCase()},ef=function(t,e){return"".concat(e,"-")},hD=function(t,e){return e===void 0&&(e={}),dD(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(fD,ef):t=t.replace(cD,ef),t.replace(uD,pD))};yi.camelCase=hD;var vD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},gD=vD(as),mD=yi;function us(t,e){var n={};return!t||typeof t!="string"||(0,gD.default)(t,function(r,i){r&&i&&(n[(0,mD.camelCase)(r,e)]=i)}),n}us.default=us;var yD=us;(function(t){var e=We&&We.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};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=c,r=e(yD),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(f,p){return f.includes("-")?!i.has(f):!!(p&&typeof p.is=="string")}var s={reactCompat:!0};function a(f,p){if(typeof f=="string"){if(!f.trim()){p.style={};return}try{p.style=(0,r.default)(f,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(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(ss),Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=bD;var hr=At,tf=ss,CD=["checked","value"],DD=["input","select","textarea"],ED={reset:!0,submit:!0};function bD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&ED[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=nf(s);if(a){var u=(0,hr.getPropertyInfo)(a);switch(CD.includes(a)&&DD.includes(e)&&!r&&(a=nf("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}tf.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=o)}return(0,tf.setStyleProp)(t.style,n),n}function nf(t){return hr.possibleStandardNames[t]}var ls={},wD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=rf;var cs=c,BD=wD(hi),vr=ss,xD={cloneElement:cs.cloneElement,createElement:cs.createElement,isValidElement:cs.isValidElement};function rf(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||vr.returnFirstArg,o=e.library||xD,s=o.cloneElement,a=o.createElement,u=o.isValidElement,l=t.length,f=0;f<l;f++){var p=t[f];if(r){var h=e.replace(p,f);if(u(h)){l>1&&(h=s(h,{key:h.key||f})),n.push(i(h,p,f));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,f));continue}var y=p,v={};SD(y)?((0,vr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,BD.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=rf(p.children,e));break;default:continue}l>1&&(v.key=f),n.push(i(a(p.name,v,d),p,f))}return n.length===1?n[0]:n}function SD(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):[]}})(xc);const of=Or(xc),AD=of.default||of,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}}},LD=t=>{const e=AD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:fs(n)):typeof e=="string"?[{text:e}]:[fs(e)]};function sf(t){return t.map(e=>ne.string(e)).join("")}const af=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=>af(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""},uf=t=>t.children.map(e=>af(e)).join(""),lf=t=>/<\/?[a-z][\s\S]*>/i.test(t);function OD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:o,onChange:s,isError:a}){const u=c.useMemo(()=>cm(CC(am())),[]),{id:l,inputRef:f,error:p}=yt(),h=c.useRef(null),g=lf(e)?LD(e):BC,y=sf(g),[v,d]=c.useState(y.length),[D,B]=c.useState(lf(e)?e:""),[b,O]=c.useState(!1),E=f||h,w=a||!!p,A=c.useCallback(bC,[]),F=c.useCallback(EC,[]);function R(T){const N=sf(T);d(N.length),r&&r(N.length),!(n&&N.length>=i)&&(B(uf(u)),s&&s(T),o&&o(uf(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(mC,{editor:u,initialValue:g,onChange:R,onValueChange:R,children:[x.jsxs("div",{className:I,children:[x.jsxs(wC,{children:[x.jsx(bn,{format:"headingOne",icon:Se.Heading1}),x.jsx(bn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(bn,{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(bn,{format:"left",icon:Se.AlignLeft}),x.jsx(bn,{format:"right",icon:Se.AlignRight}),x.jsx(bn,{format:"center",icon:Se.AlignCenter}),x.jsx(bn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(uC,{className:"editorContainer",renderElement:F,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const N in Bc)if(Oh(N,T)){T.preventDefault();const K=Bc[N];wc(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 PD(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:f,onFocus:p,onBlur:h,title:g,style:y,closeOnSelect:v=!0,...d}=t,E=`arkyn_select ${a?"hasPrefix":""} ${s} ${i} ${l||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,A={md:20,lg:20}[i];return{isLoading:n,className:E,prefix:Od(a,A,"prefix"),LeftIcon:u,disabled:l||n||f,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 FD(t){var J;const[e,n]=c.useState(!1),{inputRef:r,id:i,error:o}=yt(),s=c.useRef(null),a=r||s,u=t.isError||!!o,{disabled:l,title:f,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}=PD({...t,id:i,isError:u},e),[j,T]=c.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:f,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 MD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:o="",name:s,className:a="",onCheck:u,...l}=t,[f,p]=c.useState(n),{id:h,inputRef:g}=yt(),y=typeof r=="boolean"?r:f;function v(){p(!f),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 kD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:o=!1,onFocus:s,onBlur:a,title:u,style:l,...f}=t,[p,h]=c.useState(!1),{inputRef:g,id:y,error:v}=yt(),d=c.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,...f})})}function TD(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function ID(t){const{pathname:e}=Ln.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(Ln.Link,{to:o,className:u,...s,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function cf(t=""){const e=Ln.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 jD(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:o=2,...s}=t,a=Ln.useNavigate(),{getParam:u,getScopedSearch:l}=cf(e),f=Number(u(i))||1,p=Number(u(r))||20,h=Math.ceil(n/p),g=Ld(f,o),y=Ad(f,o,h);function v(d){a(l({page:d}))}return x.jsxs("div",{className:"arkynPagination",...s,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:x.jsx(Se.ChevronLeft,{})}),f>1+o&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>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:f}),y.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+o<h&&x.jsxs(x.Fragment,{children:[f+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:f>=h,onClick:()=>v(f+1),children:x.jsx(Se.ChevronRight,{})})]})}const ds=c.createContext({});function ND(){if(!ds)throw new Error("useTabContext must be used within a TabProvider");return c.useContext(ds)}function _D(t){const{children:e,onClick:n,defaultActive:r,className:i,...o}=t,[s,a]=c.useState(r||""),[u,l]=c.useState(!0),f=c.useRef(null),p=`arkynTabContainer ${i||""}`,[h,g]=c.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const B=d.getBoundingClientRect(),b=f.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-b.left}px`})};c.useEffect(()=>{const d=f.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:f,className:p.trim(),...o,children:[x.jsx(ds.Provider,{value:{handleTabClick:v,showInitialTab:u,value:s},children:e}),x.jsx("div",{className:"activeLine",style:h})]})}function zD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:o,showInitialTab:s,handleTabClick:a}=ND(),u=o===i.value&&o?"activeTrue":"activeFalse",f=`arkynTabButton ${o===i.value&&s?"showBorderBottom":""} ${u} ${n}`;function p(h){a(h),r&&r(h)}return x.jsx("button",{onClick:p,className:f.trim(),...i,children:e})}const ff=c.createContext({});function WD(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(ff.Provider,{value:{makeInvisible:n},children:x.jsx(ln.AnimatePresence,{children:e&&x.jsxs("aside",{className:l.trim(),...s,children:[x.jsx(ln.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(ln.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:i})]})})})}function UD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=c.useContext(ff),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 df=c.createContext({});function HD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...o}=t,a=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(df.Provider,{value:{makeInvisible:n},children:x.jsx(ln.AnimatePresence,{children:e&&x.jsxs("aside",{className:a.trim(),...o,children:[x.jsx(ln.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(ln.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 RD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function VD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=c.useContext(df),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 qD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[o,s]=c.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(ln.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 pf(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 GD(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={},ps={},gr={},mr={},hf="Expected a function",vf=NaN,ZD="[object Symbol]",YD=/^\s+|\s+$/g,KD=/^[-+]0x[0-9a-f]+$/i,XD=/^0b[01]+$/i,JD=/^0o[0-7]+$/i,QD=parseInt,$D=typeof We=="object"&&We&&We.Object===Object&&We,eE=typeof self=="object"&&self&&self.Object===Object&&self,tE=$D||eE||Function("return this")(),nE=Object.prototype,rE=nE.toString,iE=Math.max,oE=Math.min,hs=function(){return tE.Date.now()};function sE(t,e,n){var r,i,o,s,a,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(hf);e=gf(e)||0,Ci(n)&&(f=!!n.leading,p="maxWait"in n,o=p?iE(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),f?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?oE(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=hs();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(hs())}function E(){var w=hs(),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 aE(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),sE(t,e,{leading:r,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function uE(t){return!!t&&typeof t=="object"}function lE(t){return typeof t=="symbol"||uE(t)&&rE.call(t)==ZD}function gf(t){if(typeof t=="number")return t;if(lE(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(YD,"");var n=XD.test(t);return n||JD.test(t)?QD(t.slice(2),n?2:8):KD.test(t)?vf:+t}var cE=aE,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 fE=cE,dE=hE(fE),pE=yr;function hE(t){return t&&t.__esModule?t:{default:t}}var vE=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,dE.default)(e,n)},Ye={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=vE(function(i){Ye.scrollHandler(e)},n);Ye.scrollSpyContainers.push(e),(0,pE.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 gE=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)},mE=function(){return window.location.hash.replace(/^#/,"")},yE=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},CE=function(e){return getComputedStyle(e).position!=="static"},vs=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}},DE=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(CE(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===document},o=vs(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(f){return f===document};return vs(n,u).offsetTop-vs(e,u).offsetTop};Cr.default={updateHash:gE,getHash:mE,filterElementInContainer:yE,scrollOffset:DE};var Ei={},gs={};Object.defineProperty(gs,"__esModule",{value:!0}),gs.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 ms={};Object.defineProperty(ms,"__esModule",{value:!0});var EE=yr,bE=["mousedown","mousewheel","touchmove","keydown"];ms.default={subscribe:function(e){return typeof document<"u"&&bE.forEach(function(n){return(0,EE.addPassiveEventListener)(document,n,e)})}};var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});var ys={registered:{},scrollEvent:{register:function(e,n){ys.registered[e]=n},remove:function(e){ys.registered[e]=null}}};Dr.default=ys,Object.defineProperty(Ei,"__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},BE=Cr;bi(BE);var xE=gs,mf=bi(xE),SE=ms,AE=bi(SE),LE=Dr,Ft=bi(LE);function bi(t){return t&&t.__esModule?t:{default:t}}var yf=function(e){return mf.default[e.smooth]||mf.default.defaultEasing},OE=function(e){return typeof e=="function"?e:function(){return e}},PE=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Cs=function(){return PE()||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},FE=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)},ME=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)},kE=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Ft.default.registered.end&&Ft.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);Cs.call(window,o);return}Ft.default.registered.end&&Ft.default.registered.end(i.to,i.target,i.currentPosition)},Ds=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(AE.default.subscribe(o),Ds(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){Ft.default.registered.end&&Ft.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=OE(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=kE.bind(null,s,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Ft.default.registered.begin&&Ft.default.registered.begin(n.data.to,n.data.target),Cs.call(window,a)},n.delay);return}Ft.default.registered.begin&&Ft.default.registered.begin(n.data.to,n.data.target),Cs.call(window,a)},wi=function(e){return e=wE({},e),e.data=e.data||Cf(),e.absolute=!0,e},TE=function(e){Er(0,wi(e))},IE=function(e,n){Er(e,wi(n))},jE=function(e){e=wi(e),Ds(e),Er(e.horizontal?FE(e):ME(e),e)},NE=function(e,n){n=wi(n),Ds(n);var r=n.horizontal?Df(n):Ef(n);Er(e+r,n)};Ei.default={animateTopScroll:Er,getAnimationType:yf,scrollToTop:TE,scrollToBottom:jE,scrollTo:IE,scrollMore:NE},Object.defineProperty(Nn,"__esModule",{value:!0});var _E=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},zE=Cr,WE=Es(zE),UE=Ei,HE=Es(UE),RE=Dr,Bi=Es(RE);function Es(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=_E({},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=WE.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}HE.default.animateTopScroll(u,n,e,r)}};var bs={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.
96
96
  *
97
97
  * This source code is licensed under the MIT license found in the
98
98
  * LICENSE file in the root directory of this source tree.
99
- */var wf;function qE(){if(wf)return _e;wf=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function b(E){if(typeof E=="object"&&E!==null){var w=E.$$typeof;switch(w){case e:switch(E=E.type,E){case u:case l:case r:case o:case i:case p:return E;default:switch(E=E&&E.$$typeof,E){case a:case f:case y:case g:case s:return E;default:return w}}case n:return w}}}function O(E){return b(E)===l}return _e.AsyncMode=u,_e.ConcurrentMode=l,_e.ContextConsumer=a,_e.ContextProvider=s,_e.Element=e,_e.ForwardRef=f,_e.Fragment=r,_e.Lazy=y,_e.Memo=g,_e.Portal=n,_e.Profiler=o,_e.StrictMode=i,_e.Suspense=p,_e.isAsyncMode=function(E){return O(E)||b(E)===u},_e.isConcurrentMode=O,_e.isContextConsumer=function(E){return b(E)===a},_e.isContextProvider=function(E){return b(E)===s},_e.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},_e.isForwardRef=function(E){return b(E)===f},_e.isFragment=function(E){return b(E)===r},_e.isLazy=function(E){return b(E)===y},_e.isMemo=function(E){return b(E)===g},_e.isPortal=function(E){return b(E)===n},_e.isProfiler=function(E){return b(E)===o},_e.isStrictMode=function(E){return b(E)===i},_e.isSuspense=function(E){return b(E)===p},_e.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===o||E===i||E===p||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===s||E.$$typeof===a||E.$$typeof===f||E.$$typeof===d||E.$$typeof===D||E.$$typeof===B||E.$$typeof===v)},_e.typeOf=b,_e}var ze={};/** @license React v16.13.1
99
+ */var wf;function VE(){if(wf)return _e;wf=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function b(E){if(typeof E=="object"&&E!==null){var w=E.$$typeof;switch(w){case e:switch(E=E.type,E){case u:case l:case r:case o:case i:case p:return E;default:switch(E=E&&E.$$typeof,E){case a:case f:case y:case g:case s:return E;default:return w}}case n:return w}}}function O(E){return b(E)===l}return _e.AsyncMode=u,_e.ConcurrentMode=l,_e.ContextConsumer=a,_e.ContextProvider=s,_e.Element=e,_e.ForwardRef=f,_e.Fragment=r,_e.Lazy=y,_e.Memo=g,_e.Portal=n,_e.Profiler=o,_e.StrictMode=i,_e.Suspense=p,_e.isAsyncMode=function(E){return O(E)||b(E)===u},_e.isConcurrentMode=O,_e.isContextConsumer=function(E){return b(E)===a},_e.isContextProvider=function(E){return b(E)===s},_e.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},_e.isForwardRef=function(E){return b(E)===f},_e.isFragment=function(E){return b(E)===r},_e.isLazy=function(E){return b(E)===y},_e.isMemo=function(E){return b(E)===g},_e.isPortal=function(E){return b(E)===n},_e.isProfiler=function(E){return b(E)===o},_e.isStrictMode=function(E){return b(E)===i},_e.isSuspense=function(E){return b(E)===p},_e.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===o||E===i||E===p||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===s||E.$$typeof===a||E.$$typeof===f||E.$$typeof===d||E.$$typeof===D||E.$$typeof===B||E.$$typeof===v)},_e.typeOf=b,_e}var ze={};/** @license React v16.13.1
100
100
  * react-is.development.js
101
101
  *
102
102
  * Copyright (c) Facebook, Inc. and its affiliates.
103
103
  *
104
104
  * This source code is licensed under the MIT license found in the
105
105
  * LICENSE file in the root directory of this source tree.
106
- */var Bf;function GE(){return Bf||(Bf=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function b(G){return typeof G=="string"||typeof G=="function"||G===r||G===l||G===o||G===i||G===p||G===h||typeof G=="object"&&G!==null&&(G.$$typeof===y||G.$$typeof===g||G.$$typeof===s||G.$$typeof===a||G.$$typeof===f||G.$$typeof===d||G.$$typeof===D||G.$$typeof===B||G.$$typeof===v)}function O(G){if(typeof G=="object"&&G!==null){var le=G.$$typeof;switch(le){case e:var se=G.type;switch(se){case u:case l:case r:case o:case i:case p:return se;default:var pe=se&&se.$$typeof;switch(pe){case a:case f:case y:case g:case s:return pe;default:return le}}case n:return le}}}var E=u,w=l,A=a,F=s,R=e,P=f,z=r,I=y,j=g,T=n,N=o,K=i,_=p,ie=!1;function re(G){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(G)||O(G)===u}function k(G){return O(G)===l}function H(G){return O(G)===a}function J(G){return O(G)===s}function q(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function ee(G){return O(G)===f}function Y(G){return O(G)===r}function C(G){return O(G)===y}function W(G){return O(G)===g}function U(G){return O(G)===n}function M(G){return O(G)===o}function X(G){return O(G)===i}function te(G){return O(G)===p}ze.AsyncMode=E,ze.ConcurrentMode=w,ze.ContextConsumer=A,ze.ContextProvider=F,ze.Element=R,ze.ForwardRef=P,ze.Fragment=z,ze.Lazy=I,ze.Memo=j,ze.Portal=T,ze.Profiler=N,ze.StrictMode=K,ze.Suspense=_,ze.isAsyncMode=re,ze.isConcurrentMode=k,ze.isContextConsumer=H,ze.isContextProvider=J,ze.isElement=q,ze.isForwardRef=ee,ze.isFragment=Y,ze.isLazy=C,ze.isMemo=W,ze.isPortal=U,ze.isProfiler=M,ze.isStrictMode=X,ze.isSuspense=te,ze.isValidElementType=b,ze.typeOf=O}()),ze}var xf;function Sf(){return xf||(xf=1,process.env.NODE_ENV==="production"?Si.exports=qE():Si.exports=GE()),Si.exports}/*
106
+ */var Bf;function qE(){return Bf||(Bf=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function b(G){return typeof G=="string"||typeof G=="function"||G===r||G===l||G===o||G===i||G===p||G===h||typeof G=="object"&&G!==null&&(G.$$typeof===y||G.$$typeof===g||G.$$typeof===s||G.$$typeof===a||G.$$typeof===f||G.$$typeof===d||G.$$typeof===D||G.$$typeof===B||G.$$typeof===v)}function O(G){if(typeof G=="object"&&G!==null){var le=G.$$typeof;switch(le){case e:var se=G.type;switch(se){case u:case l:case r:case o:case i:case p:return se;default:var pe=se&&se.$$typeof;switch(pe){case a:case f:case y:case g:case s:return pe;default:return le}}case n:return le}}}var E=u,w=l,A=a,F=s,R=e,P=f,z=r,I=y,j=g,T=n,N=o,K=i,_=p,ie=!1;function re(G){return ie||(ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(G)||O(G)===u}function k(G){return O(G)===l}function H(G){return O(G)===a}function J(G){return O(G)===s}function q(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function ee(G){return O(G)===f}function Y(G){return O(G)===r}function C(G){return O(G)===y}function W(G){return O(G)===g}function U(G){return O(G)===n}function M(G){return O(G)===o}function X(G){return O(G)===i}function te(G){return O(G)===p}ze.AsyncMode=E,ze.ConcurrentMode=w,ze.ContextConsumer=A,ze.ContextProvider=F,ze.Element=R,ze.ForwardRef=P,ze.Fragment=z,ze.Lazy=I,ze.Memo=j,ze.Portal=T,ze.Profiler=N,ze.StrictMode=K,ze.Suspense=_,ze.isAsyncMode=re,ze.isConcurrentMode=k,ze.isContextConsumer=H,ze.isContextProvider=J,ze.isElement=q,ze.isForwardRef=ee,ze.isFragment=Y,ze.isLazy=C,ze.isMemo=W,ze.isPortal=U,ze.isProfiler=M,ze.isStrictMode=X,ze.isSuspense=te,ze.isValidElementType=b,ze.typeOf=O}()),ze}var xf;function Sf(){return xf||(xf=1,process.env.NODE_ENV==="production"?Si.exports=VE():Si.exports=qE()),Si.exports}/*
107
107
  object-assign
108
108
  (c) Sindre Sorhus
109
109
  @license MIT
110
- */var Bs,Af;function ZE(){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(f){return s[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),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,f=1;f<arguments.length;f++){a=Object(arguments[f]);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 YE(){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 f in o)if(r(o,f)){var p;try{if(typeof o[f]!="function"){var h=Error((u||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=o[f](s,f,u,a,null,e)}catch(y){p=y}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+a+" `"+f+"` 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 KE(){if(Mf)return Os;Mf=1;var t=Sf(),e=ZE(),n=Ss(),r=Pf(),i=YE(),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,f="@@iterator";function p(k){var H=k&&(l&&k[l]||k[f]);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 XE(){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,f,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 JE=Sf(),QE=!0;ws.exports=KE()(JE.isElement,QE)}else ws.exports=XE()();var Ai=ws.exports,Li={};Object.defineProperty(Li,"__esModule",{value:!0});var $E=Cr,Fs=eb($E);function eb(t){return t&&t.__esModule?t:{default:t}}var tb={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=tb,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},nb=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}}(),rb=c,Tf=br(rb),ib=mr,Pi=br(ib),ob=Nn,sb=br(ob),ab=Ai,qe=br(ab),ub=Li,tn=br(ub);function br(t){return t&&t.__esModule?t:{default:t}}function lb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cb(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 fb(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||sb.default,r=function(o){fb(s,o);function s(a){lb(this,s);var u=cb(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return i.call(u),u.state={active:!1},u}return nb(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&&(tn.default.isMounted()||tn.default.mount(n),tn.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 f=Oi({},this.props);for(var p in If)f.hasOwnProperty(p)&&delete f[p];return f.className=u,f.style=l,f.onClick=this.handleClick,Tf.default.createElement(t,f)}}]),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(!(tn.default.isMounted()&&!tn.default.isInitialized())){var f=s.props.horizontal,p=s.props.to,h=null,g=void 0,y=void 0;if(f){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&&tn.default.getHash()===p){var I=s.props.saveHashHistory,j=I===void 0?!1:I;tn.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&&tn.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 db=c,jf=Nf(db),pb=gr,hb=Nf(pb);function Nf(t){return t&&t.__esModule?t:{default:t}}function vb(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 gb(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 mb=function(t){gb(e,t);function e(){var n,r,i,o;vb(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,hb.default)(mb);var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});var yb=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}}(),Cb=c,zf=Wf(Cb),Db=gr,Eb=Wf(Db);function Wf(t){return t&&t.__esModule?t:{default:t}}function bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wb(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 Bb(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 xb=function(t){Bb(e,t);function e(){return bb(this,e),wb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return yb(e,[{key:"render",value:function(){return zf.default.createElement("button",this.props,this.props.children)}}]),e}(zf.default.Component);Ms.default=(0,Eb.default)(xb);var ks={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var Sb=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},Ab=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}}(),Lb=c,Uf=Mi(Lb),Ob=un;Mi(Ob);var Pb=Nn,Hf=Mi(Pb),Fb=Ai,Rf=Mi(Fb);function Mi(t){return t&&t.__esModule?t:{default:t}}function Mb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kb(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 Tb(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){Tb(r,n);function r(i){Mb(this,r);var o=kb(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return o.childBindings={domNode:null},o}return Ab(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,Sb({},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},Ib=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}}(),jb=c,qf=Ts(jb),Nb=Fi,_b=Ts(Nb),zb=Ai,Gf=Ts(zb);function Ts(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 Ub(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 Hb(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){Hb(e,t);function e(){return Wb(this,e),Ub(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Ib(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,_b.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=c,Bn=mr,js=Nn,Ke=Ai,nn=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},Rb={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,f=this.props.container;return l?document.getElementById(l):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();Bn.isMounted(l)||Bn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(nn.isMounted()||nn.mount(r),nn.mapContainer(this.props.to,l)),this.props.spy&&Bn.addStateHandler(this.stateHandler),Bn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Bn.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 f=Is({},this.props);for(var p in Qf)f.hasOwnProperty(p)&&delete f[p];return f.className=l,f.onClick=this.handleClick,ki.createElement(e,f)}}]),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(!(nn.isMounted()&&!nn.isInitialized())){var f=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(f),!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 f===O&&r.setActiveLink(void 0),a.props.hashSpy&&nn.getHash()===f&&nn.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),Bn.updateStates();if(B&&O!==f)return r.setActiveLink(f),a.props.hashSpy&&nn.changeHash(f),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(f)),Bn.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}},Vb=Rb;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 qb=hs,$f=Mt(qb),Gb=Ms,ed=Mt(Gb),Zb=ks,td=Mt(Zb),Yb=Nn,nd=Mt(Yb),Kb=Dr,rd=Mt(Kb),Xb=mr,id=Mt(Xb),Jb=Ei,od=Mt(Jb),Qb=gr,sd=Mt(Qb),$b=Fi,ad=Mt($b),e1=Vb,ud=Mt(e1);function Mt(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=c.createContext({}),cd=c.createContext({});function fd(){const t=c.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 t1(){const t=Ln.useActionData(),{closeModal:e}=c.useContext(Ns),{showToast:n}=fd();c.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),c.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;dd(r)&&n(r),!dd(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),c.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const o=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);o&&ld.scrollTo(o.offsetTop-200)}},[t])}const pd=c.createContext({});function n1(t){const e=c.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:f=>i(t,f),closeDrawer:()=>o(t)}}else return e}function r1(t){const e=c.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:f=>i(t,f),closeModal:()=>o(t)}}else return e}function i1(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function s(u,l){const f=i(u);r(f?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 o1({googleMapsApiKey:t,children:e,...n}){return x.jsx(Gd,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function s1(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function s(u,l){const f=i(u);r(f?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(Ns.Provider,{value:{modalIsOpen:i,modalData:o,openModal:s,closeModal:a},children:e})}let a1={data:""},u1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||a1,l1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,c1=/\/\*[^]*?\*\/| +/g,hd=/\n+/g,rn=(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"?rn(s,o):o+"{"+rn(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=rn(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+=rn.p?rn.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},_t={},vd=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+vd(t[n]);return e}return t},f1=(t,e,n,r,i)=>{let o=vd(t),s=_t[o]||(_t[o]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(o));if(!_t[s]){let u=o!==t?t:(l=>{let f,p,h=[{}];for(;f=l1.exec(l.replace(c1,""));)f[4]?h.shift():f[3]?(p=f[3].replace(hd," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][f[1]]=f[2].replace(hd," ").trim();return h[0]})(t);_t[s]=rn(i?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&_t.g?_t.g:null;return n&&(_t.g=_t[s]),((u,l,f,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(_t[s],e,r,a),s},d1=(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?"":rn(a,""):a===!1?"":a}return r+i+(s??"")},"");function Ti(t){let e=this||{},n=t.call?t(e.p):t;return f1(n.unshift?n.raw?d1(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,u1(e.target),e.g,e.o,e.k)}let gd,_s,zs;Ti.bind({g:1});let zt=Ti.bind({k:1});function p1(t,e,n,r){rn.p=e,gd=t,_s=n,zs=r}function on(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 h1=t=>typeof t=="function",Ii=(t,e)=>h1(t)?t(e):t,v1=(()=>{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}})(),g1=20,ji=new Map,m1=1e3,yd=t=>{if(ji.has(t))return;let e=setTimeout(()=>{ji.delete(t),xn({type:4,toastId:t})},m1);ji.set(t,e)},y1=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,g1)};case 1:return e.toast.id&&y1(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},xn=t=>{_i=Ws(_i,t),Ni.forEach(e=>{e(_i)})},C1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},D1=(t={})=>{let[e,n]=c.useState(_i);c.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)||C1[i.type],style:{...t.style,...(s=t[i.type])==null?void 0:s.style,...i.style}}});return{...e,toasts:r}},E1=(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)||v1()}),wr=t=>(e,n)=>{let r=E1(e,t,n);return xn({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=>{xn({type:3,toastId:t})},Et.remove=t=>xn({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 b1=(t,e)=>{xn({type:1,toast:{id:t,height:e}})},w1=()=>{xn({type:5,time:Date.now()})},B1=t=>{let{toasts:e,pausedAt:n}=D1(t);c.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=c.useCallback(()=>{n&&xn({type:6,time:Date.now()})},[n]),i=c.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},f=e.filter(g=>(g.position||l)===(o.position||l)&&g.height),p=f.findIndex(g=>g.id===o.id),h=f.filter((g,y)=>y<p&&g.visible).length;return f.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:b1,startPause:w1,endPause:r,calculateOffset:i}}},x1=zt`
110
+ */var ws,Af;function GE(){if(Af)return ws;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(f){return s[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ws=i()?Object.assign:function(o,s){for(var a,u=r(o),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);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},ws}var Bs,Lf;function xs(){if(Lf)return Bs;Lf=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bs=t,Bs}var Ss,Of;function Pf(){return Of||(Of=1,Ss=Function.call.bind(Object.prototype.hasOwnProperty)),Ss}var As,Ff;function ZE(){if(Ff)return As;Ff=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=xs(),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 f in o)if(r(o,f)){var p;try{if(typeof o[f]!="function"){var h=Error((u||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=o[f](s,f,u,a,null,e)}catch(y){p=y}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+a+" `"+f+"` 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={})},As=i,As}var Ls,Mf;function YE(){if(Mf)return Ls;Mf=1;var t=Sf(),e=GE(),n=xs(),r=Pf(),i=ZE(),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 Ls=function(a,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(k){var H=k&&(l&&k[l]||k[f]);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},Ls}var Os,kf;function KE(){if(kf)return Os;kf=1;var t=xs();function e(){}function n(){}return n.resetWarningCache=e,Os=function(){function r(s,a,u,l,f,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},Os}if(process.env.NODE_ENV!=="production"){var XE=Sf(),JE=!0;bs.exports=YE()(XE.isElement,JE)}else bs.exports=KE()();var Ai=bs.exports,Li={};Object.defineProperty(Li,"__esModule",{value:!0});var QE=Cr,Ps=$E(QE);function $E(t){return t&&t.__esModule?t:{default:t}}var eb={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 Ps.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Ps.default.getHash()!==e&&Ps.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=eb,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},tb=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=c,Tf=br(nb),rb=mr,Pi=br(rb),ib=Nn,ob=br(ib),sb=Ai,qe=br(sb),ab=Li,tn=br(ab);function br(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 lb(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 cb(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||ob.default,r=function(o){cb(s,o);function s(a){ub(this,s);var u=lb(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return i.call(u),u.state={active:!1},u}return tb(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&&(tn.default.isMounted()||tn.default.mount(n),tn.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 f=Oi({},this.props);for(var p in If)f.hasOwnProperty(p)&&delete f[p];return f.className=u,f.style=l,f.onClick=this.handleClick,Tf.default.createElement(t,f)}}]),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(!(tn.default.isMounted()&&!tn.default.isInitialized())){var f=s.props.horizontal,p=s.props.to,h=null,g=void 0,y=void 0;if(f){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&&tn.default.getHash()===p){var I=s.props.saveHashHistory,j=I===void 0?!1:I;tn.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&&tn.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(ps,"__esModule",{value:!0});var fb=c,jf=Nf(fb),db=gr,pb=Nf(db);function Nf(t){return t&&t.__esModule?t:{default:t}}function hb(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 vb(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 gb=function(t){vb(e,t);function e(){var n,r,i,o;hb(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);ps.default=(0,pb.default)(gb);var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0});var mb=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}}(),yb=c,zf=Wf(yb),Cb=gr,Db=Wf(Cb);function Wf(t){return t&&t.__esModule?t:{default:t}}function Eb(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 wb(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 Bb=function(t){wb(e,t);function e(){return Eb(this,e),bb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return mb(e,[{key:"render",value:function(){return zf.default.createElement("button",this.props,this.props.children)}}]),e}(zf.default.Component);Fs.default=(0,Db.default)(Bb);var Ms={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var xb=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},Sb=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}}(),Ab=c,Uf=Mi(Ab),Lb=un;Mi(Lb);var Ob=Nn,Hf=Mi(Ob),Pb=Ai,Rf=Mi(Pb);function Mi(t){return t&&t.__esModule?t:{default:t}}function Fb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mb(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 kb(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){kb(r,n);function r(i){Fb(this,r);var o=Mb(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return o.childBindings={domNode:null},o}return Sb(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,xb({},this.props,{parentBindings:this.childBindings}))}}]),r}(Uf.default.Component);return e.propTypes={name:Rf.default.string,id:Rf.default.string},e},Object.defineProperty(Ms,"__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},Tb=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=c,qf=ks(Ib),jb=Fi,Nb=ks(jb),_b=Ai,Gf=ks(_b);function ks(t){return t&&t.__esModule?t:{default:t}}function zb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wb(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 Ub(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){Ub(e,t);function e(){return zb(this,e),Wb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Tb(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},Ms.default=(0,Nb.default)(Zf);var Ts=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=c,Bn=mr,Is=Nn,Ke=Ai,nn=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},Hb={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||Is,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,f=this.props.container;return l?document.getElementById(l):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();Bn.isMounted(l)||Bn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(nn.isMounted()||nn.mount(r),nn.mapContainer(this.props.to,l)),this.props.spy&&Bn.addStateHandler(this.stateHandler),Bn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Bn.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 f=Ts({},this.props);for(var p in Qf)f.hasOwnProperty(p)&&delete f[p];return f.className=l,f.onClick=this.handleClick,ki.createElement(e,f)}}]),a}(ki.Component),o=function(){var a=this;this.scrollTo=function(u,l){r.scrollTo(u,Ts({},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(!(nn.isMounted()&&!nn.isInitialized())){var f=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(f),!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 f===O&&r.setActiveLink(void 0),a.props.hashSpy&&nn.getHash()===f&&nn.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),Bn.updateStates();if(B&&O!==f)return r.setActiveLink(f),a.props.hashSpy&&nn.changeHash(f),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(f)),Bn.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;Is.unregister(this.props.name)}},{key:"registerElems",value:function(s){Is.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ki.createElement(e,Ts({},this.props,{parentBindings:this.childBindings}))}}]),i}(ki.Component);return n.propTypes={name:Ke.string,id:Ke.string},n}},Rb=Hb;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 Vb=ps,$f=Mt(Vb),qb=Fs,ed=Mt(qb),Gb=Ms,td=Mt(Gb),Zb=Nn,nd=Mt(Zb),Yb=Dr,rd=Mt(Yb),Kb=mr,id=Mt(Kb),Xb=Ei,od=Mt(Xb),Jb=gr,sd=Mt(Jb),Qb=Fi,ad=Mt(Qb),$b=Rb,ud=Mt($b);function Mt(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 js=c.createContext({}),cd=c.createContext({});function fd(){const t=c.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 e1(){const t=Ln.useActionData(),{closeModal:e}=c.useContext(js),{showToast:n}=fd();c.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),c.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;dd(r)&&n(r),!dd(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),c.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const o=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);o&&ld.scrollTo(o.offsetTop-200)}},[t])}const pd=c.createContext({});function t1(t){const e=c.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:f=>i(t,f),closeDrawer:()=>o(t)}}else return e}function n1(t){const e=c.useContext(js);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:f=>i(t,f),closeModal:()=>o(t)}}else return e}function r1(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function s(u,l){const f=i(u);r(f?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 i1({googleMapsApiKey:t,children:e,...n}){return x.jsx(Gd,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function o1(t){const{children:e=!1}=t,[n,r]=c.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function s(u,l){const f=i(u);r(f?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(js.Provider,{value:{modalIsOpen:i,modalData:o,openModal:s,closeModal:a},children:e})}let s1={data:""},a1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||s1,u1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l1=/\/\*[^]*?\*\/| +/g,hd=/\n+/g,rn=(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"?rn(s,o):o+"{"+rn(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=rn(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+=rn.p?rn.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},_t={},vd=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+vd(t[n]);return e}return t},c1=(t,e,n,r,i)=>{let o=vd(t),s=_t[o]||(_t[o]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(o));if(!_t[s]){let u=o!==t?t:(l=>{let f,p,h=[{}];for(;f=u1.exec(l.replace(l1,""));)f[4]?h.shift():f[3]?(p=f[3].replace(hd," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][f[1]]=f[2].replace(hd," ").trim();return h[0]})(t);_t[s]=rn(i?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&_t.g?_t.g:null;return n&&(_t.g=_t[s]),((u,l,f,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(_t[s],e,r,a),s},f1=(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?"":rn(a,""):a===!1?"":a}return r+i+(s??"")},"");function Ti(t){let e=this||{},n=t.call?t(e.p):t;return c1(n.unshift?n.raw?f1(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,a1(e.target),e.g,e.o,e.k)}let gd,Ns,_s;Ti.bind({g:1});let zt=Ti.bind({k:1});function d1(t,e,n,r){rn.p=e,gd=t,Ns=n,_s=r}function on(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:Ns&&Ns()},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),_s&&l[0]&&_s(a),gd(l,a)}return e?e(i):i}}var p1=t=>typeof t=="function",Ii=(t,e)=>p1(t)?t(e):t,h1=(()=>{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}})(),v1=20,ji=new Map,g1=1e3,yd=t=>{if(ji.has(t))return;let e=setTimeout(()=>{ji.delete(t),xn({type:4,toastId:t})},g1);ji.set(t,e)},m1=t=>{let e=ji.get(t);e&&clearTimeout(e)},zs=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,v1)};case 1:return e.toast.id&&m1(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)?zs(t,{type:1,toast:n}):zs(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},xn=t=>{_i=zs(_i,t),Ni.forEach(e=>{e(_i)})},y1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},C1=(t={})=>{let[e,n]=c.useState(_i);c.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)||y1[i.type],style:{...t.style,...(s=t[i.type])==null?void 0:s.style,...i.style}}});return{...e,toasts:r}},D1=(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)||h1()}),wr=t=>(e,n)=>{let r=D1(e,t,n);return xn({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=>{xn({type:3,toastId:t})},Et.remove=t=>xn({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 E1=(t,e)=>{xn({type:1,toast:{id:t,height:e}})},b1=()=>{xn({type:5,time:Date.now()})},w1=t=>{let{toasts:e,pausedAt:n}=C1(t);c.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=c.useCallback(()=>{n&&xn({type:6,time:Date.now()})},[n]),i=c.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},f=e.filter(g=>(g.position||l)===(o.position||l)&&g.height),p=f.findIndex(g=>g.id===o.id),h=f.filter((g,y)=>y<p&&g.visible).length;return f.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:E1,startPause:b1,endPause:r,calculateOffset:i}}},B1=zt`
112
112
  from {
113
113
  transform: scale(0) rotate(45deg);
114
114
  opacity: 0;
@@ -116,7 +116,7 @@ from {
116
116
  to {
117
117
  transform: scale(1) rotate(45deg);
118
118
  opacity: 1;
119
- }`,S1=zt`
119
+ }`,x1=zt`
120
120
  from {
121
121
  transform: scale(0);
122
122
  opacity: 0;
@@ -124,7 +124,7 @@ from {
124
124
  to {
125
125
  transform: scale(1);
126
126
  opacity: 1;
127
- }`,A1=zt`
127
+ }`,S1=zt`
128
128
  from {
129
129
  transform: scale(0) rotate(90deg);
130
130
  opacity: 0;
@@ -132,7 +132,7 @@ from {
132
132
  to {
133
133
  transform: scale(1) rotate(90deg);
134
134
  opacity: 1;
135
- }`,L1=on("div")`
135
+ }`,A1=on("div")`
136
136
  width: 20px;
137
137
  opacity: 0;
138
138
  height: 20px;
@@ -141,14 +141,14 @@ to {
141
141
  position: relative;
142
142
  transform: rotate(45deg);
143
143
 
144
- animation: ${x1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
144
+ animation: ${B1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
145
145
  forwards;
146
146
  animation-delay: 100ms;
147
147
 
148
148
  &:after,
149
149
  &:before {
150
150
  content: '';
151
- animation: ${S1} 0.15s ease-out forwards;
151
+ animation: ${x1} 0.15s ease-out forwards;
152
152
  animation-delay: 150ms;
153
153
  position: absolute;
154
154
  border-radius: 3px;
@@ -161,18 +161,18 @@ to {
161
161
  }
162
162
 
163
163
  &:before {
164
- animation: ${A1} 0.15s ease-out forwards;
164
+ animation: ${S1} 0.15s ease-out forwards;
165
165
  animation-delay: 180ms;
166
166
  transform: rotate(90deg);
167
167
  }
168
- `,O1=zt`
168
+ `,L1=zt`
169
169
  from {
170
170
  transform: rotate(0deg);
171
171
  }
172
172
  to {
173
173
  transform: rotate(360deg);
174
174
  }
175
- `,P1=on("div")`
175
+ `,O1=on("div")`
176
176
  width: 12px;
177
177
  height: 12px;
178
178
  box-sizing: border-box;
@@ -180,8 +180,8 @@ to {
180
180
  border-radius: 100%;
181
181
  border-color: ${t=>t.secondary||"#e0e0e0"};
182
182
  border-right-color: ${t=>t.primary||"#616161"};
183
- animation: ${O1} 1s linear infinite;
184
- `,F1=zt`
183
+ animation: ${L1} 1s linear infinite;
184
+ `,P1=zt`
185
185
  from {
186
186
  transform: scale(0) rotate(45deg);
187
187
  opacity: 0;
@@ -189,7 +189,7 @@ from {
189
189
  to {
190
190
  transform: scale(1) rotate(45deg);
191
191
  opacity: 1;
192
- }`,M1=zt`
192
+ }`,F1=zt`
193
193
  0% {
194
194
  height: 0;
195
195
  width: 0;
@@ -203,7 +203,7 @@ to {
203
203
  100% {
204
204
  opacity: 1;
205
205
  height: 10px;
206
- }`,k1=on("div")`
206
+ }`,M1=on("div")`
207
207
  width: 20px;
208
208
  opacity: 0;
209
209
  height: 20px;
@@ -212,13 +212,13 @@ to {
212
212
  position: relative;
213
213
  transform: rotate(45deg);
214
214
 
215
- animation: ${F1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
215
+ animation: ${P1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
216
216
  forwards;
217
217
  animation-delay: 100ms;
218
218
  &:after {
219
219
  content: '';
220
220
  box-sizing: border-box;
221
- animation: ${M1} 0.2s ease-out forwards;
221
+ animation: ${F1} 0.2s ease-out forwards;
222
222
  opacity: 0;
223
223
  animation-delay: 200ms;
224
224
  position: absolute;
@@ -230,16 +230,16 @@ to {
230
230
  height: 10px;
231
231
  width: 6px;
232
232
  }
233
- `,T1=on("div")`
233
+ `,k1=on("div")`
234
234
  position: absolute;
235
- `,I1=on("div")`
235
+ `,T1=on("div")`
236
236
  position: relative;
237
237
  display: flex;
238
238
  justify-content: center;
239
239
  align-items: center;
240
240
  min-width: 20px;
241
241
  min-height: 20px;
242
- `,j1=zt`
242
+ `,I1=zt`
243
243
  from {
244
244
  transform: scale(0.6);
245
245
  opacity: 0.4;
@@ -247,20 +247,20 @@ from {
247
247
  to {
248
248
  transform: scale(1);
249
249
  opacity: 1;
250
- }`,N1=on("div")`
250
+ }`,j1=on("div")`
251
251
  position: relative;
252
252
  transform: scale(0.6);
253
253
  opacity: 0.4;
254
254
  min-width: 20px;
255
- animation: ${j1} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
255
+ animation: ${I1} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
256
256
  forwards;
257
- `,_1=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return e!==void 0?typeof e=="string"?rt.createElement(N1,null,e):e:n==="blank"?null:rt.createElement(I1,null,rt.createElement(P1,{...r}),n!=="loading"&&rt.createElement(T1,null,n==="error"?rt.createElement(L1,{...r}):rt.createElement(k1,{...r})))},z1=t=>`
257
+ `,N1=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return e!==void 0?typeof e=="string"?rt.createElement(j1,null,e):e:n==="blank"?null:rt.createElement(T1,null,rt.createElement(O1,{...r}),n!=="loading"&&rt.createElement(k1,null,n==="error"?rt.createElement(A1,{...r}):rt.createElement(M1,{...r})))},_1=t=>`
258
258
  0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
259
259
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
260
- `,W1=t=>`
260
+ `,z1=t=>`
261
261
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
262
262
  100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
263
- `,U1="0%{opacity:0;} 100%{opacity:1;}",H1="0%{opacity:1;} 100%{opacity:0;}",R1=on("div")`
263
+ `,W1="0%{opacity:0;} 100%{opacity:1;}",U1="0%{opacity:1;} 100%{opacity:0;}",H1=on("div")`
264
264
  display: flex;
265
265
  align-items: center;
266
266
  background: #fff;
@@ -272,16 +272,16 @@ to {
272
272
  pointer-events: auto;
273
273
  padding: 8px 10px;
274
274
  border-radius: 8px;
275
- `,V1=on("div")`
275
+ `,R1=on("div")`
276
276
  display: flex;
277
277
  justify-content: center;
278
278
  margin: 4px 10px;
279
279
  color: inherit;
280
280
  flex: 1 1 auto;
281
281
  white-space: pre-line;
282
- `,q1=(t,e)=>{let n=t.includes("top")?1:-1,[r,i]=md()?[U1,H1]:[z1(n),W1(n)];return{animation:e?`${zt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},G1=rt.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?q1(t.position||e||"top-center",t.visible):{opacity:0},o=rt.createElement(_1,{toast:t}),s=rt.createElement(V1,{...t.ariaProps},Ii(t.message,t));return rt.createElement(R1,{className:t.className,style:{...i,...n,...t.style}},typeof r=="function"?r({icon:o,message:s}):rt.createElement(rt.Fragment,null,o,s))});p1(rt.createElement);var Z1=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let o=rt.useCallback(s=>{if(s){let a=()=>{let u=s.getBoundingClientRect().height;r(t,u)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return rt.createElement("div",{ref:o,className:e,style:n},i)},Y1=(t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:md()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}},K1=Ti`
282
+ `,V1=(t,e)=>{let n=t.includes("top")?1:-1,[r,i]=md()?[W1,U1]:[_1(n),z1(n)];return{animation:e?`${zt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},q1=rt.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?V1(t.position||e||"top-center",t.visible):{opacity:0},o=rt.createElement(N1,{toast:t}),s=rt.createElement(R1,{...t.ariaProps},Ii(t.message,t));return rt.createElement(H1,{className:t.className,style:{...i,...n,...t.style}},typeof r=="function"?r({icon:o,message:s}):rt.createElement(rt.Fragment,null,o,s))});d1(rt.createElement);var G1=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let o=rt.useCallback(s=>{if(s){let a=()=>{let u=s.getBoundingClientRect().height;r(t,u)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return rt.createElement("div",{ref:o,className:e,style:n},i)},Z1=(t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:md()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}},Y1=Ti`
283
283
  z-index: 9999;
284
284
  > * {
285
285
  pointer-events: auto;
286
286
  }
287
- `,zi=16,X1=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:u}=B1(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 f=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:r,defaultPosition:e}),h=Y1(f,p);return rt.createElement(Z1,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?K1:"",style:h},l.type==="custom"?Ii(l.message,l):i?i(l):rt.createElement(G1,{toast:l,position:f}))}))},Wi=Et;function J1({children:t}){function e({message:n,title:r,type:i,size:o}){switch(i){case"success":Wi.success(n,{style:{border:"1px solid rgba(var(--toast-success), 1)",background:"rgba(var(--toast-success), 0.2)",color:"var(--text-heading)"},iconTheme:{primary:"rgba(var(--toast-success), 1)",secondary:"#fff"}});break;case"danger":Wi.error(n);break;case"info":Wi(n);break;case"warning":Wi(n);break}}return x.jsxs(cd.Provider,{value:{showToast:e},children:[x.jsx(X1,{position:"bottom-right"}),t]})}fe.AlertContainer=wd,fe.AlertContent=Bd,fe.AlertDescription=xd,fe.AlertIcon=Sd,fe.AlertTitle=qs,fe.Badge=Pd,fe.BreadcrumbContainer=TD,fe.BreadcrumbLink=ID,fe.Button=oh,fe.Card=Fd,fe.Checkbox=ah,fe.Divider=Md,fe.DrawerContainer=WD,fe.DrawerHeader=UD,fe.DrawerProvider=i1,fe.FormController=sh,fe.FormError=uh,fe.FormLabel=lh,fe.GoogleMap=Qp,fe.GoogleProvider=o1,fe.GoogleSearchPlaces=Eh,fe.IconButton=bh,fe.Input=ou,fe.ModalContainer=HD,fe.ModalFooter=RD,fe.ModalHeader=VD,fe.ModalProvider=s1,fe.Pagination=jD,fe.Popover=qD,fe.RadioBox=xh,fe.RadioGroup=Bh,fe.RichText=OD,fe.Select=FD,fe.Skeleton=$p,fe.Switch=MD,fe.TabButton=zD,fe.TabContainer=_D,fe.TableBody=eh,fe.TableCaption=th,fe.TableContainer=nh,fe.TableFooter=rh,fe.TableHeader=ih,fe.Textarea=kD,fe.Toast=GD,fe.ToastProvider=J1,fe.Tooltip=ZD,fe.useAutomation=t1,fe.useDrawer=n1,fe.useModal=r1,fe.useScopedParams=ff,fe.useToast=fd,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});
287
+ `,zi=16,K1=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:r,children:i,containerStyle:o,containerClassName:s})=>{let{toasts:a,handlers:u}=w1(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 f=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:r,defaultPosition:e}),h=Z1(f,p);return rt.createElement(G1,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?Y1:"",style:h},l.type==="custom"?Ii(l.message,l):i?i(l):rt.createElement(q1,{toast:l,position:f}))}))},X1=Et;function J1({children:t}){function e(n){X1(r=>x.jsx(pf,{...n}))}return x.jsxs(cd.Provider,{value:{showToast:e},children:[x.jsx(K1,{position:"top-right"}),t]})}fe.AlertContainer=wd,fe.AlertContent=Bd,fe.AlertDescription=xd,fe.AlertIcon=Sd,fe.AlertTitle=Vs,fe.Badge=Pd,fe.BreadcrumbContainer=TD,fe.BreadcrumbLink=ID,fe.Button=oh,fe.Card=Fd,fe.Checkbox=ah,fe.Divider=Md,fe.DrawerContainer=WD,fe.DrawerHeader=UD,fe.DrawerProvider=r1,fe.FormController=sh,fe.FormError=uh,fe.FormLabel=lh,fe.GoogleMap=Qp,fe.GoogleProvider=i1,fe.GoogleSearchPlaces=Eh,fe.IconButton=bh,fe.Input=iu,fe.ModalContainer=HD,fe.ModalFooter=RD,fe.ModalHeader=VD,fe.ModalProvider=o1,fe.Pagination=jD,fe.Popover=qD,fe.RadioBox=xh,fe.RadioGroup=Bh,fe.RichText=OD,fe.Select=FD,fe.Skeleton=$p,fe.Switch=MD,fe.TabButton=zD,fe.TabContainer=_D,fe.TableBody=eh,fe.TableCaption=th,fe.TableContainer=nh,fe.TableFooter=rh,fe.TableHeader=ih,fe.Textarea=kD,fe.Toast=pf,fe.ToastProvider=J1,fe.Tooltip=GD,fe.useAutomation=e1,fe.useDrawer=t1,fe.useModal=n1,fe.useScopedParams=cf,fe.useToast=fd,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})});