@arkyn/components 1.3.142 → 1.3.143
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +21241 -9924
- package/dist/bundle.umd.cjs +342 -67
- package/dist/components/ImageUpload/HasFileContent/index.d.ts +5 -0
- package/dist/components/ImageUpload/HasFileContent/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/HasFileContent/index.js +20 -0
- package/dist/components/ImageUpload/ImageUploadError/index.d.ts +5 -0
- package/dist/components/ImageUpload/ImageUploadError/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUploadError/index.js +10 -0
- package/dist/components/ImageUpload/ImageUploadLabel/index.d.ts +5 -0
- package/dist/components/ImageUpload/ImageUploadLabel/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUploadLabel/index.js +9 -0
- package/dist/components/ImageUpload/NoFileContent/index.d.ts +5 -0
- package/dist/components/ImageUpload/NoFileContent/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/NoFileContent/index.js +25 -0
- package/dist/components/ImageUpload/index.d.ts +5 -0
- package/dist/components/ImageUpload/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/index.js +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/ImageUpload/HasFileContent/index.tsx +64 -0
- package/src/components/ImageUpload/HasFileContent/styles.css +17 -0
- package/src/components/ImageUpload/ImageUploadError/index.tsx +12 -0
- package/src/components/ImageUpload/ImageUploadError/styles.css +6 -0
- package/src/components/ImageUpload/ImageUploadLabel/index.tsx +13 -0
- package/src/components/ImageUpload/ImageUploadLabel/styles.css +15 -0
- package/src/components/ImageUpload/NoFileContent/index.tsx +53 -0
- package/src/components/ImageUpload/NoFileContent/styles.css +19 -0
- package/src/components/ImageUpload/index.tsx +106 -0
- package/src/components/ImageUpload/styles.css +29 -0
- package/src/index.ts +1 -0
package/dist/bundle.umd.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(
|
1
|
+
(function(Oe,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):(Oe=typeof globalThis<"u"?globalThis:Oe||self,c(Oe["@arkyn/components"]={},Oe.me,Oe.lucideReact,Oe.ReactDOM,Oe.react,Oe.mask,Oe.framerMotion))})(this,function(Oe,c,Ue,xn,on,V0,Pr){"use strict";function Fc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ot=Fc(c),pi=Fc(xn);var lt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ma={exports:{}},po={};/**
|
2
2
|
* @license React
|
3
3
|
* react-jsx-runtime.production.min.js
|
4
4
|
*
|
@@ -6,7 +6,7 @@
|
|
6
6
|
*
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
|
-
*/var
|
9
|
+
*/var Ic;function q0(){if(Ic)return po;Ic=1;var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,l){var f,d={},h=null,v=null;l!==void 0&&(h=""+l),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(d[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:a,key:h,ref:v,props:d,_owner:o.current}}return po.Fragment=n,po.jsx=s,po.jsxs=s,po}var ho={};/**
|
10
10
|
* @license React
|
11
11
|
* react-jsx-runtime.development.js
|
12
12
|
*
|
@@ -14,22 +14,22 @@
|
|
14
14
|
*
|
15
15
|
* This source code is licensed under the MIT license found in the
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
17
|
-
*/var
|
18
|
-
`+
|
19
|
-
`),
|
20
|
-
`),
|
21
|
-
`+
|
17
|
+
*/var _c;function Z0(){return _c||(_c=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=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"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function p(C){if(C===null||typeof C!="object")return null;var q=m&&C[m]||C[g];return typeof q=="function"?q:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(C){{for(var q=arguments.length,J=new Array(q>1?q-1:0),ce=1;ce<q;ce++)J[ce-1]=arguments[ce];D("error",C,J)}}function D(C,q,J){{var ce=E.ReactDebugCurrentFrame,we=ce.getStackAddendum();we!==""&&(q+="%s",J=J.concat([we]));var Le=J.map(function(Ee){return String(Ee)});Le.unshift("Warning: "+q),Function.prototype.apply.call(console[C],console,Le)}}var M=!1,b=!1,w=!1,L=!1,O=!1,H;H=Symbol.for("react.module.reference");function P(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===i||O||C===o||C===l||C===f||L||C===v||M||b||w||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===d||C.$$typeof===s||C.$$typeof===a||C.$$typeof===u||C.$$typeof===H||C.getModuleId!==void 0))}function V(C,q,J){var ce=C.displayName;if(ce)return ce;var we=q.displayName||q.name||"";return we!==""?J+"("+we+")":J}function _(C){return C.displayName||"Context"}function R(C){if(C==null)return null;if(typeof C.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case a:var q=C;return _(q)+".Consumer";case s:var J=C;return _(J._context)+".Provider";case u:return V(C,C.render,"ForwardRef");case d:var ce=C.displayName||null;return ce!==null?ce:R(C.type)||"Memo";case h:{var we=C,Le=we._payload,Ee=we._init;try{return R(Ee(Le))}catch{return null}}}return null}var F=Object.assign,N=0,Y,I,Q,ne,k,T,Z;function $(){}$.__reactDisabledLog=!0;function K(){{if(N===0){Y=console.log,I=console.info,Q=console.warn,ne=console.error,k=console.group,T=console.groupCollapsed,Z=console.groupEnd;var C={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}N++}}function G(){{if(N--,N===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},C,{value:Y}),info:F({},C,{value:I}),warn:F({},C,{value:Q}),error:F({},C,{value:ne}),group:F({},C,{value:k}),groupCollapsed:F({},C,{value:T}),groupEnd:F({},C,{value:Z})})}N<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=E.ReactCurrentDispatcher,z;function W(C,q,J){{if(z===void 0)try{throw Error()}catch(we){var ce=we.stack.trim().match(/\n( *(at )?)/);z=ce&&ce[1]||""}return`
|
18
|
+
`+z+C}}var B=!1,X;{var ee=typeof WeakMap=="function"?WeakMap:Map;X=new ee}function j(C,q){if(!C||B)return"";{var J=X.get(C);if(J!==void 0)return J}var ce;B=!0;var we=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=y.current,y.current=null,K();try{if(q){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch($e){ce=$e}Reflect.construct(C,[],Ee)}else{try{Ee.call()}catch($e){ce=$e}C.call(Ee.prototype)}}else{try{throw Error()}catch($e){ce=$e}C()}}catch($e){if($e&&ce&&typeof $e.stack=="string"){for(var ye=$e.stack.split(`
|
19
|
+
`),ze=ce.stack.split(`
|
20
|
+
`),Te=ye.length-1,Fe=ze.length-1;Te>=1&&Fe>=0&&ye[Te]!==ze[Fe];)Fe--;for(;Te>=1&&Fe>=0;Te--,Fe--)if(ye[Te]!==ze[Fe]){if(Te!==1||Fe!==1)do if(Te--,Fe--,Fe<0||ye[Te]!==ze[Fe]){var Qe=`
|
21
|
+
`+ye[Te].replace(" at new "," at ");return C.displayName&&Qe.includes("<anonymous>")&&(Qe=Qe.replace("<anonymous>",C.displayName)),typeof C=="function"&&X.set(C,Qe),Qe}while(Te>=1&&Fe>=0);break}}}finally{B=!1,y.current=Le,G(),Error.prepareStackTrace=we}var Rt=C?C.displayName||C.name:"",jt=Rt?W(Rt):"";return typeof C=="function"&&X.set(C,jt),jt}function se(C,q,J){return j(C,!1)}function ae(C){var q=C.prototype;return!!(q&&q.isReactComponent)}function fe(C,q,J){if(C==null)return"";if(typeof C=="function")return j(C,ae(C));if(typeof C=="string")return W(C);switch(C){case l:return W("Suspense");case f:return W("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case u:return se(C.render);case d:return fe(C.type,q,J);case h:{var ce=C,we=ce._payload,Le=ce._init;try{return fe(Le(we),q,J)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,be={},ve=E.ReactDebugCurrentFrame;function me(C){if(C){var q=C._owner,J=fe(C.type,C._source,q?q.type:null);ve.setExtraStackFrame(J)}else ve.setExtraStackFrame(null)}function le(C,q,J,ce,we){{var Le=Function.call.bind(he);for(var Ee in C)if(Le(C,Ee)){var ye=void 0;try{if(typeof C[Ee]!="function"){var ze=Error((ce||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ze.name="Invariant Violation",ze}ye=C[Ee](q,Ee,ce,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){ye=Te}ye&&!(ye instanceof Error)&&(me(we),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ce||"React class",J,Ee,typeof ye),me(null)),ye instanceof Error&&!(ye.message in be)&&(be[ye.message]=!0,me(we),S("Failed %s type: %s",J,ye.message),me(null))}}}var Me=Array.isArray;function oe(C){return Me(C)}function Ae(C){{var q=typeof Symbol=="function"&&Symbol.toStringTag,J=q&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J}}function ie(C){try{return Se(C),!1}catch{return!0}}function Se(C){return""+C}function Be(C){if(ie(C))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ae(C)),Se(C)}var Re=E.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},Ce,ht,rt;rt={};function Yt(C){if(he.call(C,"ref")){var q=Object.getOwnPropertyDescriptor(C,"ref").get;if(q&&q.isReactWarning)return!1}return C.ref!==void 0}function At(C){if(he.call(C,"key")){var q=Object.getOwnPropertyDescriptor(C,"key").get;if(q&&q.isReactWarning)return!1}return C.key!==void 0}function It(C,q){if(typeof C.ref=="string"&&Re.current&&q&&Re.current.stateNode!==q){var J=R(Re.current.type);rt[J]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(Re.current.type),C.ref),rt[J]=!0)}}function gn(C,q){{var J=function(){Ce||(Ce=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}}function vn(C,q){{var J=function(){ht||(ht=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};J.isReactWarning=!0,Object.defineProperty(C,"ref",{get:J,configurable:!0})}}var mn=function(C,q,J,ce,we,Le,Ee){var ye={$$typeof:t,type:C,key:q,ref:J,props:Ee,_owner:Le};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:we}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function yn(C,q,J,ce,we){{var Le,Ee={},ye=null,ze=null;J!==void 0&&(Be(J),ye=""+J),At(q)&&(Be(q.key),ye=""+q.key),Yt(q)&&(ze=q.ref,It(q,we));for(Le in q)he.call(q,Le)&&!Xe.hasOwnProperty(Le)&&(Ee[Le]=q[Le]);if(C&&C.defaultProps){var Te=C.defaultProps;for(Le in Te)Ee[Le]===void 0&&(Ee[Le]=Te[Le])}if(ye||ze){var Fe=typeof C=="function"?C.displayName||C.name||"Unknown":C;ye&&gn(Ee,Fe),ze&&vn(Ee,Fe)}return mn(C,ye,ze,we,ce,Re.current,Ee)}}var Ft=E.ReactCurrentOwner,Xt=E.ReactDebugCurrentFrame;function _t(C){if(C){var q=C._owner,J=fe(C.type,C._source,q?q.type:null);Xt.setExtraStackFrame(J)}else Xt.setExtraStackFrame(null)}var Ut;Ut=!1;function bn(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Tn(){{if(Ft.current){var C=R(Ft.current.type);if(C)return`
|
22
22
|
|
23
|
-
Check the render method of \``+
|
23
|
+
Check the render method of \``+C+"`."}return""}}function Cn(C){{if(C!==void 0){var q=C.fileName.replace(/^.*[\\\/]/,""),J=C.lineNumber;return`
|
24
24
|
|
25
|
-
Check your code at
|
25
|
+
Check your code at `+q+":"+J+"."}return""}}var An={};function tr(C){{var q=Tn();if(!q){var J=typeof C=="string"?C:C.displayName||C.name;J&&(q=`
|
26
26
|
|
27
|
-
Check the top-level render call using <`+
|
27
|
+
Check the top-level render call using <`+J+">.")}return q}}function Jt(C,q){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var J=tr(q);if(An[J])return;An[J]=!0;var ce="";C&&C._owner&&C._owner!==Ft.current&&(ce=" It was passed a child from "+R(C._owner.type)+"."),_t(C),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ce),_t(null)}}function Fn(C,q){{if(typeof C!="object")return;if(oe(C))for(var J=0;J<C.length;J++){var ce=C[J];bn(ce)&&Jt(ce,q)}else if(bn(C))C._store&&(C._store.validated=!0);else if(C){var we=p(C);if(typeof we=="function"&&we!==C.entries)for(var Le=we.call(C),Ee;!(Ee=Le.next()).done;)bn(Ee.value)&&Jt(Ee.value,q)}}}function nr(C){{var q=C.type;if(q==null||typeof q=="string")return;var J;if(typeof q=="function")J=q.propTypes;else if(typeof q=="object"&&(q.$$typeof===u||q.$$typeof===d))J=q.propTypes;else return;if(J){var ce=R(q);le(J,C.props,"prop",ce,C)}else if(q.PropTypes!==void 0&&!Ut){Ut=!0;var we=R(q);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",we||"Unknown")}typeof q.getDefaultProps=="function"&&!q.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(C){{for(var q=Object.keys(C.props),J=0;J<q.length;J++){var ce=q[J];if(ce!=="children"&&ce!=="key"){_t(C),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),_t(null);break}}C.ref!==null&&(_t(C),S("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var In={};function _n(C,q,J,ce,we,Le){{var Ee=P(C);if(!Ee){var ye="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(ye+=" 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 ze=Cn(we);ze?ye+=ze:ye+=Tn();var Te;C===null?Te="null":oe(C)?Te="array":C!==void 0&&C.$$typeof===t?(Te="<"+(R(C.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof C,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,ye)}var Fe=yn(C,q,J,we,Le);if(Fe==null)return Fe;if(Ee){var Qe=q.children;if(Qe!==void 0)if(ce)if(oe(Qe)){for(var Rt=0;Rt<Qe.length;Rt++)Fn(Qe[Rt],C);Object.freeze&&Object.freeze(Qe)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fn(Qe,C)}if(he.call(q,"key")){var jt=R(C),$e=Object.keys(q).filter(function(Ac){return Ac!=="key"}),pe=$e.length>0?"{key: someKey, "+$e.join(": ..., ")+": ...}":"{key: someKey}";if(!In[jt+pe]){var Tc=$e.length>0?"{"+$e.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
28
28
|
let props = %s;
|
29
29
|
<%s {...props} />
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
31
31
|
let props = %s;
|
32
|
-
<%s key={someKey} {...props} />`,
|
32
|
+
<%s key={someKey} {...props} />`,pe,jt,Tc,jt),In[jt+pe]=!0}}return C===r?En(Fe):nr(Fe),Fe}}function wn(C,q,J){return _n(C,q,J,!0)}function rr(C,q,J){return _n(C,q,J,!1)}var or=rr,Dn=wn;ho.Fragment=r,ho.jsx=or,ho.jsxs=Dn}()),ho}process.env.NODE_ENV==="production"?ma.exports=q0():ma.exports=Z0();var A=ma.exports;function Rc(e){const{className:t,...n}=e,r=`arkynAlertTitle ${t}`;return A.jsx("div",{className:r.trim(),...n})}const jc=c.createContext({});function G0(){return c.useContext(jc)}function K0(e){const{schema:t,children:n,className:r,...o}=e,a=!(l=>{let f=!1;const d=h=>{Array.isArray(h)?h.forEach(d):h&&typeof h=="object"&&"type"in h&&(h.type===Rc?f=!0:h.props&&h.props.children&&d(h.props.children))};return d(l),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${t} ${a} ${r}`;return A.jsx(jc.Provider,{value:e,children:A.jsx("div",{className:u.trim(),...o,children:n})})}function Y0(e){const{className:t,...n}=e,r=`arkynAlertContent ${t}`;return A.jsx("div",{className:r.trim(),...n})}function X0(e){const{className:t,...n}=e,r=`arkynAlertDescription ${t}`;return A.jsx("div",{className:r.trim(),...n})}function J0(e){const{className:t,...n}=e,{schema:r}=G0(),o=`arkynAlertIcon ${r} ${t}`;switch(r){case"success":return A.jsx(Ue.CheckCircle2,{className:o,...n});case"danger":return A.jsx(Ue.XCircle,{className:o,...n});case"warning":return A.jsx(Ue.AlertTriangle,{className:o,...n});case"info":return A.jsx(Ue.Info,{className:o,...n})}}function gi(e,t){return t?A.jsx(t,{size:e,strokeWidth:2.5}):A.jsx(A.Fragment,{})}function Nc(e,t){return[...new Array(t-e)].map((n,r)=>e+r+1).filter(n=>n>0)}function Q0(e,t,n){return e>=n?[]:Nc(e,e+t)}function eb(e,t){return e<=1?[]:Nc(e-1-t,e-1)}function tb(e,t,n){if(!e)return A.jsx(A.Fragment,{});if(typeof e=="string")return A.jsx("p",{className:n,children:e});const r=e;return A.jsx("p",{className:n,children:A.jsx(r,{color:"var(--secondary-600)",size:t,strokeWidth:2.5})})}function nb(e){const{variant:t="ghost",scheme:n="primary",size:r="md",leftIcon:o,rightIcon:i,className:s="",children:a,...u}=e,f={md:12,lg:14}[r],d=`arkynBadge ${t} ${n} ${r} ${s}`;return A.jsxs("div",{className:d.trim(),...u,children:[gi(f,o),a,gi(f,o)]})}function rb(e){const{className:t,...n}=e,r=`arkynCard ${t}`;return A.jsx("div",{className:r.trim(),...n})}function ob(e){const{className:t,orientation:n="horizontal",...r}=e,o=`arkynDivider ${n} ${t}`;return A.jsx("div",{className:o.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
|
46
|
-
`,"").indexOf(".gm-style")===0?(
|
47
|
-
`,"").indexOf(".gm-style")===0?(
|
45
|
+
***************************************************************************** */var ya=function(e,t){return ya=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},ya(e,t)};function dt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ya(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ke=function(){return ke=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ke.apply(this,arguments)};function ba(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ib(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(f){try{l(r.next(f))}catch(d){s(d)}}function u(f){try{l(r.throw(f))}catch(d){s(d)}}function l(f){f.done?i(f.value):o(f.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function sb(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function zc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ab=process.env.NODE_ENV,ub=function(e,t,n,r,o,i,s,a){if(ab!=="production"&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){var u;if(t===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,o,i,s,a],f=0;u=new Error(t.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},lb=ub,Bt=zc(lb),je=c.createContext(null);function cb(){Bt(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var e=c.useContext(je);return Bt(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}function fb(e,t,n){return Object.keys(e).reduce(function(o,i){return t(o,e[i],i)},n)}function db(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function pb(e,t,n,r){var o={},i=function(s,a){var u=n[a];u!==t[a]&&(o[a]=u,s(r,u))};return db(e,i),o}function hb(e,t,n){var r=fb(n,function(i,s,a){return typeof e[a]=="function"&&i.push(google.maps.event.addListener(t,s,e[a])),i},[]);return r}function gb(e){google.maps.event.removeListener(e)}function Ze(e){e===void 0&&(e=[]),e.forEach(gb)}function Ve(e){var t=e.updaterMap,n=e.eventMap,r=e.prevProps,o=e.nextProps,i=e.instance,s=hb(o,i,n);return pb(t,r,o,i),s}var $c={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"},Uc={extraMapTypes:function(e,t){t.forEach(function(r,o){e.mapTypes.set(String(o),r)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}};function vb(e){var t=e.children,n=e.options,r=e.id,o=e.mapContainerStyle,i=e.mapContainerClassName,s=e.center,a=e.onClick,u=e.onDblClick,l=e.onDrag,f=e.onDragEnd,d=e.onDragStart,h=e.onMouseMove,v=e.onMouseOut,m=e.onMouseOver,g=e.onMouseDown,p=e.onMouseUp,E=e.onRightClick,S=e.onCenterChanged,D=e.onLoad,M=e.onUnmount,b=c.useState(null),w=b[0],L=b[1],O=c.useRef(null),H=c.useState(null),P=H[0],V=H[1],_=c.useState(null),R=_[0],F=_[1],N=c.useState(null),Y=N[0],I=N[1],Q=c.useState(null),ne=Q[0],k=Q[1],T=c.useState(null),Z=T[0],$=T[1],K=c.useState(null),G=K[0],y=K[1],z=c.useState(null),W=z[0],B=z[1],X=c.useState(null),ee=X[0],j=X[1],se=c.useState(null),ae=se[0],fe=se[1],he=c.useState(null),be=he[0],ve=he[1],me=c.useState(null),le=me[0],Me=me[1],oe=c.useState(null),Ae=oe[0],ie=oe[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&&(R!==null&&google.maps.event.removeListener(R),F(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(Y!==null&&google.maps.event.removeListener(Y),I(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&d&&(ne!==null&&google.maps.event.removeListener(ne),k(google.maps.event.addListener(w,"dragstart",d)))},[d]),c.useEffect(function(){w&&g&&(Z!==null&&google.maps.event.removeListener(Z),$(google.maps.event.addListener(w,"mousedown",g)))},[g]),c.useEffect(function(){w&&h&&(G!==null&&google.maps.event.removeListener(G),y(google.maps.event.addListener(w,"mousemove",h)))},[h]),c.useEffect(function(){w&&v&&(W!==null&&google.maps.event.removeListener(W),B(google.maps.event.addListener(w,"mouseout",v)))},[v]),c.useEffect(function(){w&&m&&(ee!==null&&google.maps.event.removeListener(ee),j(google.maps.event.addListener(w,"mouseover",m)))},[m]),c.useEffect(function(){w&&p&&(ae!==null&&google.maps.event.removeListener(ae),fe(google.maps.event.addListener(w,"mouseup",p)))},[p]),c.useEffect(function(){w&&E&&(be!==null&&google.maps.event.removeListener(be),ve(google.maps.event.addListener(w,"rightclick",E)))},[E]),c.useEffect(function(){w&&a&&(le!==null&&google.maps.event.removeListener(le),Me(google.maps.event.addListener(w,"click",a)))},[a]),c.useEffect(function(){w&&l&&(Ae!==null&&google.maps.event.removeListener(Ae),ie(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&S&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(w,"center_changed",S)))},[a]),c.useEffect(function(){var Se=O.current===null?null:new google.maps.Map(O.current,n);return L(Se),Se!==null&&D&&D(Se),function(){Se!==null&&M&&M(Se)}},[]),A.jsx("div",{id:r,ref:O,style:o,className:i,children:A.jsx(je.Provider,{value:w,children:w!==null?t:null})})}c.memo(vb);var mb=function(e){dt(t,e);function t(){var n=e!==null&&e.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 o=n.getInstance();o&&o.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 t.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Ve({updaterMap:Uc,eventMap:$c,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},t.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Uc,eventMap:$c,prevProps:n,nextProps:this.props,instance:this.state.map}))},t.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Ze(this.registeredEvents))},t.prototype.render=function(){return A.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:A.jsx(je.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},t}(c.PureComponent),Mr=typeof document<"u";function Wc(e){var t=e.url,n=e.id,r=e.nonce;return Mr?new Promise(function(i,s){var a=document.getElementById(n),u=window;if(a){var l=a.getAttribute("data-state");if(a.src===t&&l!=="error"){if(l==="ready")return i(n);var f=u.initMap,d=a.onerror;u.initMap=function(){f&&f(),i(n)},a.onerror=function(v){d&&d(v),s(v)};return}else a.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=t,h.id=n,h.async=!0,h.nonce=r||"",h.onerror=function(m){h.setAttribute("data-state","error"),s(m)},u.initMap=function(){h.setAttribute("data-state","ready"),i(n)},document.head.appendChild(h)}).catch(function(o){throw console.error("injectScript error: ",o),o}):Promise.reject(new Error("document is undefined"))}function Hc(e){var t=e.href;return t&&(t.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:e.tagName.toLowerCase()==="style"&&e.styleSheet&&e.styleSheet.cssText&&e.styleSheet.cssText.replace(`\r
|
46
|
+
`,"").indexOf(".gm-style")===0?(e.styleSheet.cssText="",!0):e.tagName.toLowerCase()==="style"&&e.innerHTML&&e.innerHTML.replace(`\r
|
47
|
+
`,"").indexOf(".gm-style")===0?(e.innerHTML="",!0):e.tagName.toLowerCase()==="style"&&!e.styleSheet&&!e.innerHTML}function Vc(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(o,i){return Hc(o)||Reflect.apply(t,e,[o,i]),o};var n=e.appendChild.bind(e);e.appendChild=function(o){return Hc(o)||Reflect.apply(n,e,[o]),o}}}function qc(e){var t=e.googleMapsApiKey,n=e.googleMapsClientId,r=e.version,o=r===void 0?"weekly":r,i=e.language,s=e.region,a=e.libraries,u=e.channel,l=e.mapIds,f=e.authReferrerPolicy,d=[];return Bt(t&&n||!(t&&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."),t?d.push("key=".concat(t)):n&&d.push("client=".concat(n)),o&&d.push("v=".concat(o)),i&&d.push("language=".concat(i)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),u&&d.push("channel=".concat(u)),l&&l.length&&d.push("map_ids=".concat(l.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var go=!1;function Zc(){return A.jsx("div",{children:"Loading..."})}var Ca={id:"script-loader",version:"weekly"},yb=function(e){dt(t,e);function t(){var n=e!==null&&e.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 ib(n,void 0,void 0,function(){function r(o){if(!go)o();else if(Mr)var i=window.setInterval(function(){go||(window.clearInterval(i),o())},1)}return sb(this,function(o){return[2,new Promise(r)]})})},n.cleanup=function(){go=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(i){return typeof i.src=="string"&&i.src.includes("maps.googleapis")}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(i){return i.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(i){return i.innerText!==void 0&&i.innerText.length>0&&i.innerText.includes(".gm-")}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&Vc(),Bt(!!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:qc(n.props)};Wc(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(o){n.props.onError&&n.props.onError(o),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
|
50
|
+
`))})},n}return t.prototype.componentDidMount=function(){if(Mr){if(window.google&&window.google.maps&&!go){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)})}},t.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"),Mr&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},t.prototype.componentWillUnmount=function(){var n=this;if(Mr){this.cleanup();var r=function(){n.check.current||(delete window.google,go=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},t.prototype.render=function(){return A.jsxs(A.Fragment,{children:[A.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||A.jsx(Zc,{})]})},t.defaultProps=Ca,t}(c.PureComponent),Gc;function bb(e){var t=e.id,n=t===void 0?Ca.id:t,r=e.version,o=r===void 0?Ca.version:r,i=e.nonce,s=e.googleMapsApiKey,a=e.googleMapsClientId,u=e.language,l=e.region,f=e.libraries,d=e.preventGoogleFontsLoading,h=e.channel,v=e.mapIds,m=e.authReferrerPolicy,g=c.useRef(!1),p=c.useState(!1),E=p[0],S=p[1],D=c.useState(void 0),M=D[0],b=D[1];c.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),c.useEffect(function(){Mr&&d&&Vc()},[d]),c.useEffect(function(){E&&Bt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[E]);var w=qc({version:o,googleMapsApiKey:s,googleMapsClientId:a,language:u,region:l,libraries:f,channel:h,mapIds:v,authReferrerPolicy:m});c.useEffect(function(){if(!Mr)return;function H(){g.current&&(S(!0),Gc=w)}if(window.google&&window.google.maps&&Gc===w){H();return}Wc({id:n,url:w,nonce:i}).then(H).catch(function(V){g.current&&b(V),console.warn(`
|
51
51
|
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(s||"-",") or Client ID (").concat(a||"-",`)
|
52
52
|
Otherwise it is a Network issue.
|
53
|
-
`)),console.error(z)})},[n,w,o]);var A=f.useRef();return f.useEffect(function(){A.current&&c!==A.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),A.current=c},[c]),{isLoaded:D,loadError:O,url:w}}var Kd=x.jsx(ta,{});function Xd(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,o=t.children,s=Gi(t,["loadingElement","onLoad","onError","onUnmount","children"]),a=Yd(s),u=a.isLoaded,l=a.loadError;return f.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),f.useEffect(function(){l&&typeof r=="function"&&r(l)},[l,r]),f.useEffect(function(){return function(){i&&i()}},[i]),u?o:e||Kd}f.memo(Xd);var ra;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(ra||(ra={}));var ia={},oa={options:function(t,e){t.setOptions(e)}};function Jd(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=f.useContext(Be),o=f.useState(null),s=o[0],a=o[1];return f.useEffect(function(){s!==null&&s.setMap(i)},[i]),f.useEffect(function(){e&&s!==null&&s.setOptions(e)},[s,e]),f.useEffect(function(){var u=new google.maps.TrafficLayer(he(he({},e||{}),{map:i}));return a(u),n&&n(u),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}f.memo(Jd),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:oa,eventMap:ia,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:oa,eventMap:ia,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);function Qd(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),e&&e(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}f.memo(Qd),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);function $d(t){var e=t.onLoad,n=t.onUnmount,r=f.useContext(Be),i=f.useState(null),o=i[0],s=i[1];return f.useEffect(function(){o!==null&&o.setMap(r)},[r]),f.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),e&&e(a),function(){o!==null&&(n&&n(o),o.setMap(null))}},[]),null}f.memo($d),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var sa={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},aa={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function ep(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,o=t.onOverlayComplete,s=t.onPolygonComplete,a=t.onPolylineComplete,u=t.onRectangleComplete,l=t.onLoad,c=t.onUnmount,p=f.useContext(Be),h=f.useState(null),g=h[0],y=h[1],v=f.useState(null),d=v[0],D=v[1],B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1];return f.useEffect(function(){g!==null&&g.setMap(p)},[p]),f.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),f.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),f.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),f.useEffect(function(){g&&i&&(b!==null&&google.maps.event.removeListener(b),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),f.useEffect(function(){g&&o&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(g,"overlaycomplete",o)))},[g,o]),f.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(g,"polygoncomplete",s)))},[g,s]),f.useEffect(function(){g&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(g,"polylinecomplete",a)))},[g,a]),f.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),f.useEffect(function(){et(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(he(he({},e||{}),{map:p}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),i&&O(google.maps.event.addListener(_,"markercomplete",i)),o&&A(google.maps.event.addListener(_,"overlaycomplete",o)),s&&P(google.maps.event.addListener(_,"polygoncomplete",s)),a&&j(google.maps.event.addListener(_,"polylinecomplete",a)),u&&K(google.maps.event.addListener(_,"rectanglecomplete",u)),y(_),l&&l(_),function(){g!==null&&(d&&google.maps.event.removeListener(d),b&&google.maps.event.removeListener(b),w&&google.maps.event.removeListener(w),R&&google.maps.event.removeListener(R),I&&google.maps.event.removeListener(I),N&&google.maps.event.removeListener(N),c&&c(g),g.setMap(null))}},[]),null}f.memo(ep),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},et(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:aa,eventMap:sa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:aa,eventMap:sa,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var ua={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},la={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Fr={};function tp(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,o=t.children,s=t.draggable,a=t.visible,u=t.animation,l=t.clickable,c=t.cursor,p=t.icon,h=t.label,g=t.opacity,y=t.shape,v=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,b=t.onDrag,O=t.onDragEnd,E=t.onDragStart,w=t.onMouseOut,A=t.onMouseOver,F=t.onMouseUp,R=t.onMouseDown,P=t.onRightClick,z=t.onClickableChanged,I=t.onCursorChanged,j=t.onAnimationChanged,T=t.onDraggableChanged,N=t.onFlatChanged,K=t.onIconChanged,_=t.onPositionChanged,ie=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,H=t.onZindexChanged,J=t.onLoad,q=t.onUnmount,ee=f.useContext(Be),Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1],xe=f.useState(null),pt=xe[0],st=xe[1],an=f.useState(null),xt=an[0],Lt=an[1],_n=f.useState(null),zn=_n[0],Wn=_n[1],Un=f.useState(null),Tt=Un[0],An=Un[1],Ut=f.useState(null),un=Ut[0],Hn=Ut[1],Br=f.useState(null),Rn=Br[0],xr=Br[1],Wi=f.useState(null),Ln=Wi[0],Sr=Wi[1],Ui=f.useState(null),Vn=Ui[0],Ar=Ui[1],Lr=f.useState(null),qn=Lr[0],Hi=Lr[1],Ri=f.useState(null),Gn=Ri[0],S=Ri[1],$=f.useState(null),oe=$[0],ye=$[1],ke=f.useState(null),je=ke[0],Me=ke[1],Ae=f.useState(null),tt=Ae[0],Ge=Ae[1],Je=f.useState(null),at=Je[0],Ht=Je[1];f.useEffect(function(){C!==null&&C.setMap(ee)},[ee]),f.useEffect(function(){typeof n<"u"&&C!==null&&C.setOptions(n)},[C,n]),f.useEffect(function(){typeof s<"u"&&C!==null&&C.setDraggable(s)},[C,s]),f.useEffect(function(){e&&C!==null&&C.setPosition(e)},[C,e]),f.useEffect(function(){typeof a<"u"&&C!==null&&C.setVisible(a)},[C,a]),f.useEffect(function(){C==null||C.setAnimation(u)},[C,u]),f.useEffect(function(){C&&l!==void 0&&C.setClickable(l)},[C,l]),f.useEffect(function(){C&&c!==void 0&&C.setCursor(c)},[C,c]),f.useEffect(function(){C&&p!==void 0&&C.setIcon(p)},[C,p]),f.useEffect(function(){C&&h!==void 0&&C.setLabel(h)},[C,h]),f.useEffect(function(){C&&g!==void 0&&C.setOpacity(g)},[C,g]),f.useEffect(function(){C&&y!==void 0&&C.setShape(y)},[C,y]),f.useEffect(function(){C&&v!==void 0&&C.setTitle(v)},[C,v]),f.useEffect(function(){C&&d!==void 0&&C.setZIndex(d)},[C,d]),f.useEffect(function(){C&&B&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(C,"dblclick",B)))},[B]),f.useEffect(function(){C&&O&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(C,"dragend",O)))},[O]),f.useEffect(function(){C&&E&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(C,"dragstart",E)))},[E]),f.useEffect(function(){C&&R&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(C,"mousedown",R)))},[R]),f.useEffect(function(){C&&w&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(C,"mouseout",w)))},[w]),f.useEffect(function(){C&&A&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(C,"mouseover",A)))},[A]),f.useEffect(function(){C&&F&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(C,"mouseup",F)))},[F]),f.useEffect(function(){C&&P&&(pt!==null&&google.maps.event.removeListener(pt),st(google.maps.event.addListener(C,"rightclick",P)))},[P]),f.useEffect(function(){C&&D&&(xt!==null&&google.maps.event.removeListener(xt),Lt(google.maps.event.addListener(C,"click",D)))},[D]),f.useEffect(function(){C&&b&&(zn!==null&&google.maps.event.removeListener(zn),Wn(google.maps.event.addListener(C,"drag",b)))},[b]),f.useEffect(function(){C&&z&&(Tt!==null&&google.maps.event.removeListener(Tt),An(google.maps.event.addListener(C,"clickable_changed",z)))},[z]),f.useEffect(function(){C&&I&&(un!==null&&google.maps.event.removeListener(un),Hn(google.maps.event.addListener(C,"cursor_changed",I)))},[I]),f.useEffect(function(){C&&j&&(Rn!==null&&google.maps.event.removeListener(Rn),xr(google.maps.event.addListener(C,"animation_changed",j)))},[j]),f.useEffect(function(){C&&T&&(Ln!==null&&google.maps.event.removeListener(Ln),Sr(google.maps.event.addListener(C,"draggable_changed",T)))},[T]),f.useEffect(function(){C&&N&&(Vn!==null&&google.maps.event.removeListener(Vn),Ar(google.maps.event.addListener(C,"flat_changed",N)))},[N]),f.useEffect(function(){C&&K&&(qn!==null&&google.maps.event.removeListener(qn),Hi(google.maps.event.addListener(C,"icon_changed",K)))},[K]),f.useEffect(function(){C&&_&&(Gn!==null&&google.maps.event.removeListener(Gn),S(google.maps.event.addListener(C,"position_changed",_)))},[_]),f.useEffect(function(){C&&ie&&(oe!==null&&google.maps.event.removeListener(oe),ye(google.maps.event.addListener(C,"shape_changed",ie)))},[ie]),f.useEffect(function(){C&&re&&(je!==null&&google.maps.event.removeListener(je),Me(google.maps.event.addListener(C,"title_changed",re)))},[re]),f.useEffect(function(){C&&k&&(tt!==null&&google.maps.event.removeListener(tt),Ge(google.maps.event.addListener(C,"visible_changed",k)))},[k]),f.useEffect(function(){C&&H&&(at!==null&&google.maps.event.removeListener(at),Ht(google.maps.event.addListener(C,"zindex_changed",H)))},[H]),f.useEffect(function(){var nt=he(he(he({},n||Fr),r?Fr:{map:ee}),{position:e}),Ee=new google.maps.Marker(nt);return r?r.addMarker(Ee,!!i):Ee.setMap(ee),e&&Ee.setPosition(e),typeof a<"u"&&Ee.setVisible(a),typeof s<"u"&&Ee.setDraggable(s),typeof l<"u"&&Ee.setClickable(l),typeof c=="string"&&Ee.setCursor(c),p&&Ee.setIcon(p),typeof h<"u"&&Ee.setLabel(h),typeof g<"u"&&Ee.setOpacity(g),y&&Ee.setShape(y),typeof v=="string"&&Ee.setTitle(v),typeof d=="number"&&Ee.setZIndex(d),B&&X(google.maps.event.addListener(Ee,"dblclick",B)),O&&le(google.maps.event.addListener(Ee,"dragend",O)),E&&ve(google.maps.event.addListener(Ee,"dragstart",E)),R&&De(google.maps.event.addListener(Ee,"mousedown",R)),w&&ae(google.maps.event.addListener(Ee,"mouseout",w)),A&&we(google.maps.event.addListener(Ee,"mouseover",A)),F&&$e(google.maps.event.addListener(Ee,"mouseup",F)),P&&st(google.maps.event.addListener(Ee,"rightclick",P)),D&&Lt(google.maps.event.addListener(Ee,"click",D)),b&&Wn(google.maps.event.addListener(Ee,"drag",b)),z&&An(google.maps.event.addListener(Ee,"clickable_changed",z)),I&&Hn(google.maps.event.addListener(Ee,"cursor_changed",I)),j&&xr(google.maps.event.addListener(Ee,"animation_changed",j)),T&&Sr(google.maps.event.addListener(Ee,"draggable_changed",T)),N&&Ar(google.maps.event.addListener(Ee,"flat_changed",N)),K&&Hi(google.maps.event.addListener(Ee,"icon_changed",K)),_&&S(google.maps.event.addListener(Ee,"position_changed",_)),ie&&ye(google.maps.event.addListener(Ee,"shape_changed",ie)),re&&Me(google.maps.event.addListener(Ee,"title_changed",re)),k&&Ge(google.maps.event.addListener(Ee,"visible_changed",k)),H&&Ht(google.maps.event.addListener(Ee,"zindex_changed",H)),W(Ee),J&&J(Ee),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),Ne!==null&&google.maps.event.removeListener(Ne),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),pt!==null&&google.maps.event.removeListener(pt),xt!==null&&google.maps.event.removeListener(xt),Tt!==null&&google.maps.event.removeListener(Tt),un!==null&&google.maps.event.removeListener(un),Rn!==null&&google.maps.event.removeListener(Rn),Ln!==null&&google.maps.event.removeListener(Ln),Vn!==null&&google.maps.event.removeListener(Vn),qn!==null&&google.maps.event.removeListener(qn),Gn!==null&&google.maps.event.removeListener(Gn),je!==null&&google.maps.event.removeListener(je),tt!==null&&google.maps.event.removeListener(tt),at!==null&&google.maps.event.removeListener(at),q&&q(Ee),r?r.removeMarker(Ee,!!i):Ee&&Ee.setMap(null)}},[]);var Rt=f.useMemo(function(){return o?f.Children.map(o,function(nt){if(!f.isValidElement(nt))return nt;var Ee=nt;return f.cloneElement(Ee,{anchor:C})}):null},[o,C]);return x.jsx(x.Fragment,{children:Rt})||null}f.memo(tp);var np=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=he(he(he({},this.props.options||Fr),this.props.clusterer?Fr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Le({updaterMap:la,eventMap:ua,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:la,eventMap:ua,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=f.Children.map(this.props.children,function(i){if(!f.isValidElement(i))return i;var o=i;return f.cloneElement(o,{anchor:n.marker})})),r||null},e.contextType=Be,e}(f.PureComponent),rp=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),o=n.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(i),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(i);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,o,s;if(this.div&&this.center){var a=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),c=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),p=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(p!==null?"".concat(p.y,"px"):"0","; left: ").concat(p!==null?"".concat(p.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var h=document.createElement("img");h.alt=a,h.src=this.url,h.width=this.width,h.height=this.height,h.setAttribute("style","position: absolute; top: ".concat(c,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(h.style.clip="rect(-".concat(c,"px, -").concat(l+this.width,"px, -").concat(c+this.height,", -").concat(l,")"));var g=document.createElement("div");g.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(g.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((o=this.sums)===null||o===void 0)&&o.html&&(g.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(g),this.div.title=a,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),ip=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new rp(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var o=i[r],s=o.getPosition();s&&e.extend(s)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var o=this.markers.length,s=this.markerClusterer.getMaxZoom(),a=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(s!==null&&typeof a<"u"&&a>s)e.getMap()!==this.map&&e.setMap(this.map);else if(o<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(o===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var c=l[u];c.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function op(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var sp=2e3,ap=500,up="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",lp="png",cp=[53,56,66,78,90],fp="cluster",ca=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||up,this.imageExtension=r.imageExtension||lp,this.imageSizes=r.imageSizes||cp,this.calculator=r.calculator||op,this.batchSize=r.batchSize||sp,this.batchSizeIE=r.batchSizeIE||ap,this.clusterClass=r.clusterClass||fp,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,o=this.clusters;i<o.length;i++){var s=o[i];s.remove()}this.clusters=[];for(var a=0,u=this.listeners;a<u.length;a++){var l=u[a];google.maps.event.removeListener(l)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var o=i[r],s=o.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,o=e;i<o.length;i++){var s=o[i];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var o=i[r];o.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var o=n.fromDivPixelToLatLng(r);o!==null&&e.extend(o)}if(i!==null){var s=n.fromDivPixelToLatLng(i);s!==null&&e.extend(s)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var o=0,s=this.markers;o<s.length;o++){var a=s[o];a.isAdded=!1,e&&a.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,o=(n.lng()-e.lng())*Math.PI/180,s=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(o/2)*Math.sin(o/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,o=0,s=this.clusters;o<s.length;o++){var a=s[o];n=a;var u=n.getCenter(),l=e.getPosition();if(u&&l){var c=this.distanceBetweenPoints(u,l);c<r&&(r=c,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new ip(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,o=(r==null?void 0:r.getZoom())||0,s=o>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),a=this.getExtendedBounds(s),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var c=this.markers[l];c&&!c.isAdded&&this.isMarkerInBounds(c,a)&&(!this.ignoreHidden||this.ignoreHidden&&c.getVisible())&&this.addToClosestCluster(c)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,h=this.clusters;p<h.length;p++){var g=h[p];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype){var s=o;this.prototype[s]=i.prototype[s]}return this}).apply(e,[n])},t}(),bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Ie={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},dp={};function pp(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,o=t.calculator,s=t.clusterClass,a=t.enableRetinaIcons,u=t.gridSize,l=t.ignoreHidden,c=t.imageExtension,p=t.imagePath,h=t.imageSizes,g=t.maxZoom,y=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,b=t.onClusteringBegin,O=t.onClusteringEnd,E=t.onMouseOver,w=t.onMouseOut,A=t.onLoad,F=t.onUnmount,R=f.useState(null),P=R[0],z=R[1],I=f.useContext(Be),j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1];return f.useEffect(function(){P&&w&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(P,bt.onMouseOut,w)))},[w]),f.useEffect(function(){P&&E&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(P,bt.onMouseOver,E)))},[E]),f.useEffect(function(){P&&B&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(P,bt.onClick,B)))},[B]),f.useEffect(function(){P&&b&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(P,bt.onClusteringBegin,b)))},[b]),f.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),ie(google.maps.event.addListener(P,bt.onClusteringEnd,O)))},[O]),f.useEffect(function(){typeof r<"u"&&P!==null&&Ie.averageCenter(P,r)},[P,r]),f.useEffect(function(){typeof i<"u"&&P!==null&&Ie.batchSizeIE(P,i)},[P,i]),f.useEffect(function(){typeof o<"u"&&P!==null&&Ie.calculator(P,o)},[P,o]),f.useEffect(function(){typeof s<"u"&&P!==null&&Ie.clusterClass(P,s)},[P,s]),f.useEffect(function(){typeof a<"u"&&P!==null&&Ie.enableRetinaIcons(P,a)},[P,a]),f.useEffect(function(){typeof u<"u"&&P!==null&&Ie.gridSize(P,u)},[P,u]),f.useEffect(function(){typeof l<"u"&&P!==null&&Ie.ignoreHidden(P,l)},[P,l]),f.useEffect(function(){typeof c<"u"&&P!==null&&Ie.imageExtension(P,c)},[P,c]),f.useEffect(function(){typeof p<"u"&&P!==null&&Ie.imagePath(P,p)},[P,p]),f.useEffect(function(){typeof h<"u"&&P!==null&&Ie.imageSizes(P,h)},[P,h]),f.useEffect(function(){typeof g<"u"&&P!==null&&Ie.maxZoom(P,g)},[P,g]),f.useEffect(function(){typeof y<"u"&&P!==null&&Ie.minimumClusterSize(P,y)},[P,y]),f.useEffect(function(){typeof v<"u"&&P!==null&&Ie.styles(P,v)},[P,v]),f.useEffect(function(){typeof d<"u"&&P!==null&&Ie.title(P,d)},[P,d]),f.useEffect(function(){typeof D<"u"&&P!==null&&Ie.zoomOnClick(P,D)},[P,D]),f.useEffect(function(){if(I){var U=he({},n||dp),M=new ca(I,[],U);return r&&Ie.averageCenter(M,r),i&&Ie.batchSizeIE(M,i),o&&Ie.calculator(M,o),s&&Ie.clusterClass(M,s),a&&Ie.enableRetinaIcons(M,a),u&&Ie.gridSize(M,u),l&&Ie.ignoreHidden(M,l),c&&Ie.imageExtension(M,c),p&&Ie.imagePath(M,p),h&&Ie.imageSizes(M,h),g&&Ie.maxZoom(M,g),y&&Ie.minimumClusterSize(M,y),v&&Ie.styles(M,v),d&&Ie.title(M,d),D&&Ie.zoomOnClick(M,D),w&&ee(google.maps.event.addListener(M,bt.onMouseOut,w)),E&&W(google.maps.event.addListener(M,bt.onMouseOver,E)),B&&N(google.maps.event.addListener(M,bt.onClick,B)),b&&ie(google.maps.event.addListener(M,bt.onClusteringBegin,b)),O&&H(google.maps.event.addListener(M,bt.onClusteringEnd,O)),z(M),A&&A(M),function(){q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),F&&F(M)}}},[]),P!==null&&e(P)||null}f.memo(pp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new ca(this.context,[],this.props.options);this.registeredEvents=Le({updaterMap:Ie,eventMap:bt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ie,eventMap:bt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Be,e}(f.PureComponent);function fa(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var da=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),e.enableEventPropagation||fa(l)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var o=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=o;s<a.length;s++){var u=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,u,fa))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,o=n.getBounds();o&&!o.contains(this.position)&&n.setCenter(this.position);var s=n.getDiv(),a=s.offsetWidth,u=s.offsetHeight,l=this.pixelOffset.width,c=this.pixelOffset.height,p=this.div.offsetWidth,h=this.div.offsetHeight,g=this.infoBoxClearance.width,y=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+g?r=d.x+l-g:d.x+p+l+g>a&&(r=d.x+p+l+g-a),this.alignBottom?d.y<-c+y+h?i=d.y+c-y-h:d.y+c+y>u&&(i=d.y+c+y-u):d.y<-c+y?i=d.y+c-y:d.y+h+c+y>u&&(i=d.y+h+c+y-u)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var o in i.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=i.prototype[o]);return this}).apply(e,[n])},t}(),pa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},ha={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},hp={};function vp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){if(g){var _=r||hp,ie=_.position,re=Gi(_,["position"]),k=void 0;ie&&!(ie instanceof google.maps.LatLng)&&(k=new google.maps.LatLng(ie.lat,ie.lng));var H=new da(he(he({},re),k?{position:k}:{}));K.current=document.createElement("div"),d(H),s&&b(google.maps.event.addListener(H,"closeclick",s)),a&&w(google.maps.event.addListener(H,"domready",a)),u&&R(google.maps.event.addListener(H,"content_changed",u)),l&&I(google.maps.event.addListener(H,"position_changed",l)),c&&N(google.maps.event.addListener(H,"zindex_changed",c)),H.setContent(K.current),n?H.open(g,n):H.getPosition()?H.open(g):et(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(H)}return function(){v!==null&&(B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(v),v.close())}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(vp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):et(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=Gi(n,["position"]),o;r&&!(r instanceof google.maps.LatLng)&&(o=new google.maps.LatLng(r.lat,r.lng));var s=new da(he(he({},i),o?{position:o}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Le({updaterMap:ha,eventMap:pa,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:ha,eventMap:pa,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Pe(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var gp=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},va=Ys(gp);const ga=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Yi=1,Xn=8;class Ki{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==Yi)throw new Error(`Got v${i} data when expected v${Yi}.`);const o=ga[r&15];if(!o)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Ki(a,s,o,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=ga.indexOf(this.ArrayType),s=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Xn+s+a+u),this.ids=new this.IndexArrayType(this.data,Xn,e),this.coords=new this.ArrayType(this.data,Xn+a+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Yi<<4)+o]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Xi(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:a}=this,u=[0,o.length-1,0],l=[];for(;u.length;){const c=u.pop()||0,p=u.pop()||0,h=u.pop()||0;if(p-h<=a){for(let d=h;d<=p;d++){const D=s[2*d],B=s[2*d+1];D>=e&&D<=r&&B>=n&&B<=i&&l.push(o[d])}continue}const g=h+p>>1,y=s[2*g],v=s[2*g+1];y>=e&&y<=r&&v>=n&&v<=i&&l.push(o[g]),(c===0?e<=y:n<=v)&&(u.push(h),u.push(g-1),u.push(1-c)),(c===0?r>=y:i>=v)&&(u.push(g+1),u.push(p),u.push(1-c))}return l}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],u=[],l=r*r;for(;a.length;){const c=a.pop()||0,p=a.pop()||0,h=a.pop()||0;if(p-h<=s){for(let d=h;d<=p;d++)ya(o[2*d],o[2*d+1],e,n)<=l&&u.push(i[d]);continue}const g=h+p>>1,y=o[2*g],v=o[2*g+1];ya(y,v,e,n)<=l&&u.push(i[g]),(c===0?e-r<=y:n-r<=v)&&(a.push(h),a.push(g-1),a.push(1-c)),(c===0?e+r>=y:n+r>=v)&&(a.push(g+1),a.push(p),a.push(1-c))}return u}}function Xi(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;ma(t,e,s,r,i,o),Xi(t,e,n,r,s-1,1-o),Xi(t,e,n,s+1,i,1-o)}function ma(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const l=i-r+1,c=n-r+1,p=Math.log(l),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(l-h)/l)*(c-l/2<0?-1:1),y=Math.max(r,Math.floor(n-c*h/l+g)),v=Math.min(i,Math.floor(n+(l-c)*h/l+g));ma(t,e,n,y,v,o)}const s=e[2*n+o];let a=r,u=i;for(Jn(t,e,r,n),e[2*i+o]>s&&Jn(t,e,r,i);a<u;){for(Jn(t,e,a,u),a++,u--;e[2*a+o]<s;)a++;for(;e[2*u+o]>s;)u--}e[2*r+o]===s?Jn(t,e,r,u):(u++,Jn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Jn(t,e,n,r){Ji(t,n,r),Ji(e,2*n,2*r),Ji(e,2*n+1,2*r+1)}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ya(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const mp={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Ca=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),dn=2,Vt=3,Qi=4,qt=5,Da=6;class yp{constructor(e){this.options=Object.assign(Object.create(mp),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const o=`prepare ${e.length} points`;n&&console.time(o),this.points=e;const s=[];for(let u=0;u<e.length;u++){const l=e[u];if(!l.geometry)continue;const[c,p]=l.geometry.coordinates,h=Ca(Mr(c)),g=Ca(kr(p));s.push(h,g,1/0,u,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[i+1]=this._createTree(s);n&&console.timeEnd(o);for(let u=i;u>=r;u--){const l=+Date.now();a=this.trees[u]=this._createTree(this._cluster(a,u)),n&&console.log("z%d: %d clusters in %dms",u,a.numItems,+Date.now()-l)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const p=this.getClusters([r,i,180,s],n),h=this.getClusters([-180,i,o,s],n);return p.concat(h)}const a=this.trees[this._limitZoom(n)],u=a.range(Mr(r),kr(s),Mr(o),kr(i)),l=a.data,c=[];for(const p of u){const h=this.stride*p;c.push(l[h+qt]>1?Ea(l,h,this.clusterProps):this.points[l[h+Vt]])}return c}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(i);const s=o.data;if(n*this.stride>=s.length)throw new Error(i);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=s[n*this.stride],l=s[n*this.stride+1],c=o.within(u,l,a),p=[];for(const h of c){const g=h*this.stride;s[g+Qi]===e&&p.push(s[g+qt]>1?Ea(s,g,this.clusterProps):this.points[s[g+Vt]])}if(p.length===0)throw new Error(i);return p}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:s,radius:a}=this.options,u=a/s,l=(r-u)/o,c=(r+1+u)/o,p={features:[]};return this._addTileFeatures(i.range((n-u)/o,l,(n+1+u)/o,c),i.data,n,r,o,p),n===0&&this._addTileFeatures(i.range(1-u/o,l,1,c),i.data,o,r,o,p),n===o-1&&this._addTileFeatures(i.range(0,l,u/o,c),i.data,-1,r,o,p),p.features.length?p:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,o){const s=this.getChildren(n);for(const a of s){const u=a.properties;if(u&&u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(e,u.cluster_id,r,i,o):o<i?o++:e.push(a),e.length===r)break}return o}_createTree(e){const n=new Ki(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,o,s){for(const a of e){const u=a*this.stride,l=n[u+qt]>1;let c,p,h;if(l)c=ba(n,u,this.clusterProps),p=n[u],h=n[u+1];else{const v=this.points[n[u+Vt]];c=v.properties;const[d,D]=v.geometry.coordinates;p=Mr(d),h=kr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(p*o-r)),Math.round(this.options.extent*(h*o-i))]],tags:c};let y;l||this.options.generateId?y=n[u+Vt]:y=this.points[n[u+Vt]].id,y!==void 0&&(g.id=y),s.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:o,minPoints:s}=this.options,a=r/(i*Math.pow(2,n)),u=e.data,l=[],c=this.stride;for(let p=0;p<u.length;p+=c){if(u[p+dn]<=n)continue;u[p+dn]=n;const h=u[p],g=u[p+1],y=e.within(u[p],u[p+1],a),v=u[p+qt];let d=v;for(const D of y){const B=D*c;u[B+dn]>n&&(d+=u[B+qt])}if(d>v&&d>=s){let D=h*v,B=g*v,b,O=-1;const E=((p/c|0)<<5)+(n+1)+this.points.length;for(const w of y){const A=w*c;if(u[A+dn]<=n)continue;u[A+dn]=n;const F=u[A+qt];D+=u[A]*F,B+=u[A+1]*F,u[A+Qi]=E,o&&(b||(b=this._map(u,p,!0),O=this.clusterProps.length,this.clusterProps.push(b)),o(b,this._map(u,A)))}u[p+Qi]=E,l.push(D/d,B/d,1/0,E,-1,d),o&&l.push(O)}else{for(let D=0;D<c;D++)l.push(u[p+D]);if(d>1)for(const D of y){const B=D*c;if(!(u[B+dn]<=n)){u[B+dn]=n;for(let b=0;b<c;b++)l.push(u[B+b])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+qt]>1){const s=this.clusterProps[e[n+Da]];return r?Object.assign({},s):s}const i=this.points[e[n+Vt]].properties,o=this.options.map(i);return r&&o===i?Object.assign({},o):o}}function Ea(t,e,n){return{type:"Feature",id:t[e+Vt],properties:ba(t,e,n),geometry:{type:"Point",coordinates:[Cp(t[e]),Dp(t[e+1])]}}}function ba(t,e,n){const r=t[e+qt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=t[e+Da],s=o===-1?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+Vt],point_count:r,point_count_abbreviated:i})}function Mr(t){return t/360+.5}function kr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Cp(t){return(t-.5)*360}function Dp(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
|
53
|
+
`)),console.error(V)})},[n,w,i]);var L=c.useRef();return c.useEffect(function(){L.current&&f!==L.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"),L.current=f},[f]),{isLoaded:E,loadError:M,url:w}}var Cb=A.jsx(Zc,{});function Eb(e){var t=e.loadingElement,n=e.onLoad,r=e.onError,o=e.onUnmount,i=e.children,s=ba(e,["loadingElement","onLoad","onError","onUnmount","children"]),a=bb(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(){o&&o()}},[o]),u?i:t||Cb}c.memo(Eb);var Kc;(function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"})(Kc||(Kc={}));var Yc={},Xc={options:function(e,t){e.setOptions(t)}};function wb(e){var t=e.options,n=e.onLoad,r=e.onUnmount,o=c.useContext(je),i=c.useState(null),s=i[0],a=i[1];return c.useEffect(function(){s!==null&&s.setMap(o)},[o]),c.useEffect(function(){t&&s!==null&&s.setOptions(t)},[s,t]),c.useEffect(function(){var u=new google.maps.TrafficLayer(ke(ke({},t||{}),{map:o}));return a(u),n&&n(u),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(wb),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Xc,eventMap:Yc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},t.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Xc,eventMap:Yc,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},t.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Ze(this.registeredEvents),this.state.trafficLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);function Db(e){var t=e.onLoad,n=e.onUnmount,r=c.useContext(je),o=c.useState(null),i=o[0],s=o[1];return c.useEffect(function(){i!==null&&i.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),t&&t(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(Db),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},t.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);function xb(e){var t=e.onLoad,n=e.onUnmount,r=c.useContext(je),o=c.useState(null),i=o[0],s=o[1];return c.useEffect(function(){i!==null&&i.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),t&&t(a),function(){i!==null&&(n&&n(i),i.setMap(null))}},[]),null}c.memo(xb),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},t.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var Jc={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Qc={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}};function Sb(e){var t=e.options,n=e.drawingMode,r=e.onCircleComplete,o=e.onMarkerComplete,i=e.onOverlayComplete,s=e.onPolygonComplete,a=e.onPolylineComplete,u=e.onRectangleComplete,l=e.onLoad,f=e.onUnmount,d=c.useContext(je),h=c.useState(null),v=h[0],m=h[1],g=c.useState(null),p=g[0],E=g[1],S=c.useState(null),D=S[0],M=S[1],b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){t&&v!==null&&v.setOptions(t)},[v,t]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(p!==null&&google.maps.event.removeListener(p),E(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&o&&(D!==null&&google.maps.event.removeListener(D),M(google.maps.event.addListener(v,"markercomplete",o)))},[v,o]),c.useEffect(function(){v&&i&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(v,"overlaycomplete",i)))},[v,i]),c.useEffect(function(){v&&s&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&u&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(v,"rectanglecomplete",u)))},[v,u]),c.useEffect(function(){Bt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var I=new google.maps.drawing.DrawingManager(ke(ke({},t||{}),{map:d}));return n&&I.setDrawingMode(n),r&&E(google.maps.event.addListener(I,"circlecomplete",r)),o&&M(google.maps.event.addListener(I,"markercomplete",o)),i&&L(google.maps.event.addListener(I,"overlaycomplete",i)),s&&P(google.maps.event.addListener(I,"polygoncomplete",s)),a&&R(google.maps.event.addListener(I,"polylinecomplete",a)),u&&Y(google.maps.event.addListener(I,"rectanglecomplete",u)),m(I),l&&l(I),function(){v!==null&&(p&&google.maps.event.removeListener(p),D&&google.maps.event.removeListener(D),w&&google.maps.event.removeListener(w),H&&google.maps.event.removeListener(H),_&&google.maps.event.removeListener(_),N&&google.maps.event.removeListener(N),f&&f(v),v.setMap(null))}},[]),null}c.memo(Sb),function(e){dt(t,e);function t(n){var r=e.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)},Bt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return t.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Qc,eventMap:Jc,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},t.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Qc,eventMap:Jc,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},t.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Ze(this.registeredEvents),this.state.drawingManager.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var ef={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"},tf={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},vi={};function Lb(e){var t=e.position,n=e.options,r=e.clusterer,o=e.noClustererRedraw,i=e.children,s=e.draggable,a=e.visible,u=e.animation,l=e.clickable,f=e.cursor,d=e.icon,h=e.label,v=e.opacity,m=e.shape,g=e.title,p=e.zIndex,E=e.onClick,S=e.onDblClick,D=e.onDrag,M=e.onDragEnd,b=e.onDragStart,w=e.onMouseOut,L=e.onMouseOver,O=e.onMouseUp,H=e.onMouseDown,P=e.onRightClick,V=e.onClickableChanged,_=e.onCursorChanged,R=e.onAnimationChanged,F=e.onDraggableChanged,N=e.onFlatChanged,Y=e.onIconChanged,I=e.onPositionChanged,Q=e.onShapeChanged,ne=e.onTitleChanged,k=e.onVisibleChanged,T=e.onZindexChanged,Z=e.onLoad,$=e.onUnmount,K=c.useContext(je),G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1],le=c.useState(null),Me=le[0],oe=le[1],Ae=c.useState(null),ie=Ae[0],Se=Ae[1],Be=c.useState(null),Re=Be[0],Xe=Be[1],Ce=c.useState(null),ht=Ce[0],rt=Ce[1],Yt=c.useState(null),At=Yt[0],It=Yt[1],gn=c.useState(null),vn=gn[0],mn=gn[1],yn=c.useState(null),Ft=yn[0],Xt=yn[1],_t=c.useState(null),Ut=_t[0],bn=_t[1],Tn=c.useState(null),Cn=Tn[0],An=Tn[1],tr=c.useState(null),Jt=tr[0],Fn=tr[1],nr=c.useState(null),En=nr[0],In=nr[1],_n=c.useState(null),wn=_n[0],rr=_n[1],or=c.useState(null),Dn=or[0],C=or[1],q=c.useState(null),J=q[0],ce=q[1],we=c.useState(null),Le=we[0],Ee=we[1],ye=c.useState(null),ze=ye[0],Te=ye[1],Fe=c.useState(null),Qe=Fe[0],Rt=Fe[1];c.useEffect(function(){y!==null&&y.setMap(K)},[K]),c.useEffect(function(){typeof n<"u"&&y!==null&&y.setOptions(n)},[y,n]),c.useEffect(function(){typeof s<"u"&&y!==null&&y.setDraggable(s)},[y,s]),c.useEffect(function(){t&&y!==null&&y.setPosition(t)},[y,t]),c.useEffect(function(){typeof a<"u"&&y!==null&&y.setVisible(a)},[y,a]),c.useEffect(function(){y==null||y.setAnimation(u)},[y,u]),c.useEffect(function(){y&&l!==void 0&&y.setClickable(l)},[y,l]),c.useEffect(function(){y&&f!==void 0&&y.setCursor(f)},[y,f]),c.useEffect(function(){y&&d!==void 0&&y.setIcon(d)},[y,d]),c.useEffect(function(){y&&h!==void 0&&y.setLabel(h)},[y,h]),c.useEffect(function(){y&&v!==void 0&&y.setOpacity(v)},[y,v]),c.useEffect(function(){y&&m!==void 0&&y.setShape(m)},[y,m]),c.useEffect(function(){y&&g!==void 0&&y.setTitle(g)},[y,g]),c.useEffect(function(){y&&p!==void 0&&y.setZIndex(p)},[y,p]),c.useEffect(function(){y&&S&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(y,"dblclick",S)))},[S]),c.useEffect(function(){y&&M&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(y,"dragend",M)))},[M]),c.useEffect(function(){y&&b&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(y,"dragstart",b)))},[b]),c.useEffect(function(){y&&H&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(y,"mousedown",H)))},[H]),c.useEffect(function(){y&&w&&(Me!==null&&google.maps.event.removeListener(Me),oe(google.maps.event.addListener(y,"mouseout",w)))},[w]),c.useEffect(function(){y&&L&&(ie!==null&&google.maps.event.removeListener(ie),Se(google.maps.event.addListener(y,"mouseover",L)))},[L]),c.useEffect(function(){y&&O&&(Re!==null&&google.maps.event.removeListener(Re),Xe(google.maps.event.addListener(y,"mouseup",O)))},[O]),c.useEffect(function(){y&&P&&(ht!==null&&google.maps.event.removeListener(ht),rt(google.maps.event.addListener(y,"rightclick",P)))},[P]),c.useEffect(function(){y&&E&&(At!==null&&google.maps.event.removeListener(At),It(google.maps.event.addListener(y,"click",E)))},[E]),c.useEffect(function(){y&&D&&(vn!==null&&google.maps.event.removeListener(vn),mn(google.maps.event.addListener(y,"drag",D)))},[D]),c.useEffect(function(){y&&V&&(Ft!==null&&google.maps.event.removeListener(Ft),Xt(google.maps.event.addListener(y,"clickable_changed",V)))},[V]),c.useEffect(function(){y&&_&&(Ut!==null&&google.maps.event.removeListener(Ut),bn(google.maps.event.addListener(y,"cursor_changed",_)))},[_]),c.useEffect(function(){y&&R&&(Cn!==null&&google.maps.event.removeListener(Cn),An(google.maps.event.addListener(y,"animation_changed",R)))},[R]),c.useEffect(function(){y&&F&&(Jt!==null&&google.maps.event.removeListener(Jt),Fn(google.maps.event.addListener(y,"draggable_changed",F)))},[F]),c.useEffect(function(){y&&N&&(En!==null&&google.maps.event.removeListener(En),In(google.maps.event.addListener(y,"flat_changed",N)))},[N]),c.useEffect(function(){y&&Y&&(wn!==null&&google.maps.event.removeListener(wn),rr(google.maps.event.addListener(y,"icon_changed",Y)))},[Y]),c.useEffect(function(){y&&I&&(Dn!==null&&google.maps.event.removeListener(Dn),C(google.maps.event.addListener(y,"position_changed",I)))},[I]),c.useEffect(function(){y&&Q&&(J!==null&&google.maps.event.removeListener(J),ce(google.maps.event.addListener(y,"shape_changed",Q)))},[Q]),c.useEffect(function(){y&&ne&&(Le!==null&&google.maps.event.removeListener(Le),Ee(google.maps.event.addListener(y,"title_changed",ne)))},[ne]),c.useEffect(function(){y&&k&&(ze!==null&&google.maps.event.removeListener(ze),Te(google.maps.event.addListener(y,"visible_changed",k)))},[k]),c.useEffect(function(){y&&T&&(Qe!==null&&google.maps.event.removeListener(Qe),Rt(google.maps.event.addListener(y,"zindex_changed",T)))},[T]),c.useEffect(function(){var $e=ke(ke(ke({},n||vi),r?vi:{map:K}),{position:t}),pe=new google.maps.Marker($e);return r?r.addMarker(pe,!!o):pe.setMap(K),t&&pe.setPosition(t),typeof a<"u"&&pe.setVisible(a),typeof s<"u"&&pe.setDraggable(s),typeof l<"u"&&pe.setClickable(l),typeof f=="string"&&pe.setCursor(f),d&&pe.setIcon(d),typeof h<"u"&&pe.setLabel(h),typeof v<"u"&&pe.setOpacity(v),m&&pe.setShape(m),typeof g=="string"&&pe.setTitle(g),typeof p=="number"&&pe.setZIndex(p),S&&X(google.maps.event.addListener(pe,"dblclick",S)),M&&se(google.maps.event.addListener(pe,"dragend",M)),b&&he(google.maps.event.addListener(pe,"dragstart",b)),H&&me(google.maps.event.addListener(pe,"mousedown",H)),w&&oe(google.maps.event.addListener(pe,"mouseout",w)),L&&Se(google.maps.event.addListener(pe,"mouseover",L)),O&&Xe(google.maps.event.addListener(pe,"mouseup",O)),P&&rt(google.maps.event.addListener(pe,"rightclick",P)),E&&It(google.maps.event.addListener(pe,"click",E)),D&&mn(google.maps.event.addListener(pe,"drag",D)),V&&Xt(google.maps.event.addListener(pe,"clickable_changed",V)),_&&bn(google.maps.event.addListener(pe,"cursor_changed",_)),R&&An(google.maps.event.addListener(pe,"animation_changed",R)),F&&Fn(google.maps.event.addListener(pe,"draggable_changed",F)),N&&In(google.maps.event.addListener(pe,"flat_changed",N)),Y&&rr(google.maps.event.addListener(pe,"icon_changed",Y)),I&&C(google.maps.event.addListener(pe,"position_changed",I)),Q&&ce(google.maps.event.addListener(pe,"shape_changed",Q)),ne&&Ee(google.maps.event.addListener(pe,"title_changed",ne)),k&&Te(google.maps.event.addListener(pe,"visible_changed",k)),T&&Rt(google.maps.event.addListener(pe,"zindex_changed",T)),z(pe),Z&&Z(pe),function(){B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),ve!==null&&google.maps.event.removeListener(ve),Me!==null&&google.maps.event.removeListener(Me),ie!==null&&google.maps.event.removeListener(ie),Re!==null&&google.maps.event.removeListener(Re),ht!==null&&google.maps.event.removeListener(ht),At!==null&&google.maps.event.removeListener(At),Ft!==null&&google.maps.event.removeListener(Ft),Ut!==null&&google.maps.event.removeListener(Ut),Cn!==null&&google.maps.event.removeListener(Cn),Jt!==null&&google.maps.event.removeListener(Jt),En!==null&&google.maps.event.removeListener(En),wn!==null&&google.maps.event.removeListener(wn),Dn!==null&&google.maps.event.removeListener(Dn),Le!==null&&google.maps.event.removeListener(Le),ze!==null&&google.maps.event.removeListener(ze),Qe!==null&&google.maps.event.removeListener(Qe),$&&$(pe),r?r.removeMarker(pe,!!o):pe&&pe.setMap(null)}},[]);var jt=c.useMemo(function(){return i?c.Children.map(i,function($e){if(!c.isValidElement($e))return $e;var pe=$e;return c.cloneElement(pe,{anchor:y})}):null},[i,y]);return A.jsx(A.Fragment,{children:jt})||null}c.memo(Lb);var Ob=function(e){dt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n}return t.prototype.componentDidMount=function(){var n=ke(ke(ke({},this.props.options||vi),this.props.clusterer?vi:{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=Ve({updaterMap:tf,eventMap:ef,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},t.prototype.componentDidUpdate=function(n){this.marker&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:tf,eventMap:ef,prevProps:n,nextProps:this.props,instance:this.marker}))},t.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Ze(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},t.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(o){if(!c.isValidElement(o))return o;var i=o;return c.cloneElement(i,{anchor:n.marker})})),r||null},t.contextType=je,t}(c.PureComponent),kb=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,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(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(t){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var 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(),o=this.cluster.getBounds(),i=n.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(o),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(o);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var t;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(t=this.getPanes())===null||t===void 0||t.overlayMouseTarget.appendChild(this.div);var 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))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var t=this.getPosFromLatLng(this.center);this.div.style.top=t!==null?"".concat(t.y,"px"):"0",this.div.style.left=t!==null?"".concat(t.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var t,n,r,o,i,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(((t=u[0])===null||t===void 0?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.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 v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((o=this.sums)===null||o===void 0?void 0:o.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(t){this.sums=t;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,t.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")},e.prototype.setCenter=function(t){this.center=t},e.prototype.getPosFromLatLng=function(t){var n=this.getProjection().fromLatLngToDivPixel(t);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},e}(),Pb=function(){function e(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new kb(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,o=n;r<o.length;r++){var i=o[r],s=i.getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){var n;if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var r=t.getPosition();if(r){var o=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(o-1)+r.lat())/o,(this.center.lng()*(o-1)+r.lng())/o),this.calculateBounds()}}}else{var r=t.getPosition();r&&(this.center=r,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var i=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)t.getMap()!==this.map&&t.setMap(this.map);else if(i<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(this.bounds!==null){var n=t.getPosition();if(n)return this.bounds.contains(n)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=(t=this.map)===null||t===void 0?void 0:t.getZoom();if(r!==null&&typeof o<"u"&&o>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()},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var n=0;n<this.markers.length;n++)if(t===this.markers[n])return!0;return!1},e}();function Mb(e,t){var n=e.length,r=n.toString().length,o=Math.min(r,t);return{text:n.toString(),index:o,title:""}}var Bb=2e3,Tb=500,Ab="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Fb="png",Ib=[53,56,66,78,90],_b="cluster",nf=function(){function e(t,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(e,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||Ab,this.imageExtension=r.imageExtension||Fb,this.imageSizes=r.imageSizes||Ib,this.calculator=r.calculator||Mb,this.batchSize=r.batchSize||Bb,this.batchSizeIE=r.batchSizeIE||Tb,this.clusterClass=r.clusterClass||_b,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(t)}return e.prototype.onZoomChanged=function(){var t,n;this.resetViewport(!1),(((t=this.getMap())===null||t===void 0?void 0:t.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")},e.prototype.onIdle=function(){this.redraw()},e.prototype.onAdd=function(){var t=this.getMap();this.activeMap=t,this.ready=!0,this.repaint(),t!==null&&(this.listeners=[google.maps.event.addListener(t,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(t,"idle",this.onIdle)])},e.prototype.onRemove=function(){for(var t=0,n=this.markers;t<n.length;t++){var r=n[t];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var o=0,i=this.clusters;o<i.length;o++){var s=i[o];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},e.prototype.draw=function(){},e.prototype.getMap=function(){return null},e.prototype.getPanes=function(){return null},e.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},e.prototype.setMap=function(){},e.prototype.addListener=function(){return{remove:function(){}}},e.prototype.bindTo=function(){},e.prototype.get=function(){},e.prototype.notify=function(){},e.prototype.set=function(){},e.prototype.setValues=function(){},e.prototype.unbind=function(){},e.prototype.unbindAll=function(){},e.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:"".concat(this.imagePath+(t+1),".").concat(this.imageExtension),height:this.imageSizes[t]||0,width:this.imageSizes[t]||0})},e.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,o=t;r<o.length;r++){var i=o[r],s=i.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},e.prototype.getGridSize=function(){return this.gridSize},e.prototype.setGridSize=function(t){this.gridSize=t},e.prototype.getMinimumClusterSize=function(){return this.minClusterSize},e.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},e.prototype.getMaxZoom=function(){return this.maxZoom},e.prototype.setMaxZoom=function(t){this.maxZoom=t},e.prototype.getStyles=function(){return this.styles},e.prototype.setStyles=function(t){this.styles=t},e.prototype.getTitle=function(){return this.title},e.prototype.setTitle=function(t){this.title=t},e.prototype.getZoomOnClick=function(){return this.zoomOnClick},e.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},e.prototype.getAverageCenter=function(){return this.averageCenter},e.prototype.setAverageCenter=function(t){this.averageCenter=t},e.prototype.getIgnoreHidden=function(){return this.ignoreHidden},e.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},e.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},e.prototype.getImageExtension=function(){return this.imageExtension},e.prototype.setImageExtension=function(t){this.imageExtension=t},e.prototype.getImagePath=function(){return this.imagePath},e.prototype.setImagePath=function(t){this.imagePath=t},e.prototype.getImageSizes=function(){return this.imageSizes},e.prototype.setImageSizes=function(t){this.imageSizes=t},e.prototype.getCalculator=function(){return this.calculator},e.prototype.setCalculator=function(t){this.calculator=t},e.prototype.getBatchSizeIE=function(){return this.batchSizeIE},e.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},e.prototype.getClusterClass=function(){return this.clusterClass},e.prototype.setClusterClass=function(t){this.clusterClass=t},e.prototype.getMarkers=function(){return this.markers},e.prototype.getTotalMarkers=function(){return this.markers.length},e.prototype.getClusters=function(){return this.clusters},e.prototype.getTotalClusters=function(){return this.clusters.length},e.prototype.addMarker=function(t,n){this.pushMarkerTo(t),n||this.redraw()},e.prototype.addMarkers=function(t,n){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];o&&this.pushMarkerTo(o)}n||this.redraw()},e.prototype.pushMarkerTo=function(t){var n=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",function(){n.ready&&(t.isAdded=!1,n.repaint())}),t.isAdded=!1,this.markers.push(t)},e.prototype.removeMarker_=function(t){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(t);else for(var r=0;r<this.markers.length;r++)if(t===this.markers[r]){n=r;break}return n===-1?!1:(t.setMap(null),this.markers.splice(n,1),!0)},e.prototype.removeMarker=function(t,n){var r=this.removeMarker_(t);return!n&&r&&this.repaint(),r},e.prototype.removeMarkers=function(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var s=i[o];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},e.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},e.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,o=t;r<o.length;r++){var i=o[r];i.remove()}},0)},e.prototype.getExtendedBounds=function(t){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var o=n.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));if(o!==null&&(o.x-=this.gridSize,o.y+=this.gridSize),r!==null){var i=n.fromDivPixelToLatLng(r);i!==null&&t.extend(i)}if(o!==null){var s=n.fromDivPixelToLatLng(o);s!==null&&t.extend(s)}return t},e.prototype.redraw=function(){this.createClusters(0)},e.prototype.resetViewport=function(t){for(var n=0,r=this.clusters;n<r.length;n++){var o=r[n];o.remove()}this.clusters=[];for(var i=0,s=this.markers;i<s.length;i++){var a=s[i];a.isAdded=!1,t&&a.setMap(null)}},e.prototype.distanceBetweenPoints=function(t,n){var r=6371,o=(n.lat()-t.lat())*Math.PI/180,i=(n.lng()-t.lng())*Math.PI/180,s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},e.prototype.isMarkerInBounds=function(t,n){var r=t.getPosition();return r?n.contains(r):!1},e.prototype.addToClosestCluster=function(t){for(var n,r=4e4,o=null,i=0,s=this.clusters;i<s.length;i++){var a=s[i];n=a;var u=n.getCenter(),l=t.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<r&&(r=f,o=n)}}o&&o.isMarkerInClusterBounds(t)?o.addMarker(t):(n=new Pb(this),n.addMarker(t),this.clusters.push(n))},e.prototype.createClusters=function(t){var n=this;if(this.ready){t===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),o=r!==null&&("getBounds"in r)?r.getBounds():null,i=(r==null?void 0:r.getZoom())||0,s=i>3?new google.maps.LatLngBounds(o==null?void 0:o.getSouthWest(),o==null?void 0:o.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(t+this.batchSize,this.markers.length),l=t;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 d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},e.prototype.extend=function(t,n){return(function(o){for(var i in o.prototype){var s=i;this.prototype[s]=o.prototype[s]}return this}).apply(t,[n])},e}(),Sn={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},et={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},Rb={};function jb(e){var t=e.children,n=e.options,r=e.averageCenter,o=e.batchSizeIE,i=e.calculator,s=e.clusterClass,a=e.enableRetinaIcons,u=e.gridSize,l=e.ignoreHidden,f=e.imageExtension,d=e.imagePath,h=e.imageSizes,v=e.maxZoom,m=e.minimumClusterSize,g=e.styles,p=e.title,E=e.zoomOnClick,S=e.onClick,D=e.onClusteringBegin,M=e.onClusteringEnd,b=e.onMouseOver,w=e.onMouseOut,L=e.onLoad,O=e.onUnmount,H=c.useState(null),P=H[0],V=H[1],_=c.useContext(je),R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1];return c.useEffect(function(){P&&w&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(P,Sn.onMouseOut,w)))},[w]),c.useEffect(function(){P&&b&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(P,Sn.onMouseOver,b)))},[b]),c.useEffect(function(){P&&S&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(P,Sn.onClick,S)))},[S]),c.useEffect(function(){P&&D&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(P,Sn.onClusteringBegin,D)))},[D]),c.useEffect(function(){P&&M&&(k!==null&&google.maps.event.removeListener(k),Q(google.maps.event.addListener(P,Sn.onClusteringEnd,M)))},[M]),c.useEffect(function(){typeof r<"u"&&P!==null&&et.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof o<"u"&&P!==null&&et.batchSizeIE(P,o)},[P,o]),c.useEffect(function(){typeof i<"u"&&P!==null&&et.calculator(P,i)},[P,i]),c.useEffect(function(){typeof s<"u"&&P!==null&&et.clusterClass(P,s)},[P,s]),c.useEffect(function(){typeof a<"u"&&P!==null&&et.enableRetinaIcons(P,a)},[P,a]),c.useEffect(function(){typeof u<"u"&&P!==null&&et.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&et.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&et.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof d<"u"&&P!==null&&et.imagePath(P,d)},[P,d]),c.useEffect(function(){typeof h<"u"&&P!==null&&et.imageSizes(P,h)},[P,h]),c.useEffect(function(){typeof v<"u"&&P!==null&&et.maxZoom(P,v)},[P,v]),c.useEffect(function(){typeof m<"u"&&P!==null&&et.minimumClusterSize(P,m)},[P,m]),c.useEffect(function(){typeof g<"u"&&P!==null&&et.styles(P,g)},[P,g]),c.useEffect(function(){typeof p<"u"&&P!==null&&et.title(P,p)},[P,p]),c.useEffect(function(){typeof E<"u"&&P!==null&&et.zoomOnClick(P,E)},[P,E]),c.useEffect(function(){if(_){var W=ke({},n||Rb),B=new nf(_,[],W);return r&&et.averageCenter(B,r),o&&et.batchSizeIE(B,o),i&&et.calculator(B,i),s&&et.clusterClass(B,s),a&&et.enableRetinaIcons(B,a),u&&et.gridSize(B,u),l&&et.ignoreHidden(B,l),f&&et.imageExtension(B,f),d&&et.imagePath(B,d),h&&et.imageSizes(B,h),v&&et.maxZoom(B,v),m&&et.minimumClusterSize(B,m),g&&et.styles(B,g),p&&et.title(B,p),E&&et.zoomOnClick(B,E),w&&K(google.maps.event.addListener(B,Sn.onMouseOut,w)),b&&z(google.maps.event.addListener(B,Sn.onMouseOver,b)),S&&N(google.maps.event.addListener(B,Sn.onClick,S)),D&&Q(google.maps.event.addListener(B,Sn.onClusteringBegin,D)),M&&T(google.maps.event.addListener(B,Sn.onClusteringEnd,M)),V(B),L&&L(B),function(){$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),O&&O(B)}}},[]),P!==null&&t(P)||null}c.memo(jb),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(this.context){var n=new nf(this.context,[],this.props.options);this.registeredEvents=Ve({updaterMap:et,eventMap:Sn,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},t.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:et,eventMap:Sn,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},t.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Ze(this.registeredEvents),this.state.markerClusterer.setMap(null))},t.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},t.contextType=je,t}(c.PureComponent);function rf(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}var of=function(){function e(t){t===void 0&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",t.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),typeof t.visible>"u"&&(typeof t.isHidden>"u"?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var t=this,n=function(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),t.enableEventPropagation||rf(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 o=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-o.left-o.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=i;s<a.length;s++){var u=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,u,rf))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){t.div&&(t.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},e.prototype.getCloseBoxImg=function(){var t="";return this.closeBoxURL!==""&&(t='<img alt=""',t+=' aria-hidden="true"',t+=" src='"+this.closeBoxURL+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin+";",t+="'>"),t},e.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},e.prototype.closeClickHandler=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},e.prototype.getCloseClickHandler=function(){return this.closeClickHandler},e.prototype.panBox=function(t){if(this.div&&!t){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,o=0,i=n.getBounds();i&&!i.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,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,m=this.infoBoxClearance.height,g=this.getProjection(),p=g.fromLatLngToContainerPixel(this.position);p!==null&&(p.x<-l+v?r=p.x+l-v:p.x+d+l+v>a&&(r=p.x+d+l+v-a),this.alignBottom?p.y<-f+m+h?o=p.y+f-m-h:p.y+f+m>u&&(o=p.y+f+m-u):p.y<-f+m?o=p.y+f-m:p.y+h+f+m>u&&(o=p.y+h+f+m-u)),r===0&&o===0||n.panBy(r,o)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var t=this.boxStyle;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this.div.style[n]=t[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")}},e.prototype.getBoxWidths=function(){var t={top:0,bottom:0,left:0,right:0};if(!this.div)return t;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(t.top=parseInt(r.borderTopWidth||"",10)||0,t.bottom=parseInt(r.borderBottomWidth||"",10)||0,t.left=parseInt(r.borderLeftWidth||"",10)||0,t.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var o=this.div.currentStyle;o&&(t.top=parseInt(o.borderTopWidth||"",10)||0,t.bottom=parseInt(o.borderBottomWidth||"",10)||0,t.left=parseInt(o.borderLeftWidth||"",10)||0,t.right=parseInt(o.borderRightWidth||"",10)||0)}return t},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var t=this.getProjection(),n=t.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"}},e.prototype.setOptions=function(t){t===void 0&&(t={}),typeof t.boxClass<"u"&&(this.boxClass=t.boxClass,this.setBoxStyle()),typeof t.boxStyle<"u"&&(this.boxStyle=t.boxStyle,this.setBoxStyle()),typeof t.content<"u"&&this.setContent(t.content),typeof t.disableAutoPan<"u"&&(this.disableAutoPan=t.disableAutoPan),typeof t.maxWidth<"u"&&(this.maxWidth=t.maxWidth),typeof t.pixelOffset<"u"&&(this.pixelOffset=t.pixelOffset),typeof t.alignBottom<"u"&&(this.alignBottom=t.alignBottom),typeof t.position<"u"&&this.setPosition(t.position),typeof t.zIndex<"u"&&this.setZIndex(t.zIndex),typeof t.closeBoxMargin<"u"&&(this.closeBoxMargin=t.closeBoxMargin),typeof t.closeBoxURL<"u"&&(this.closeBoxURL=t.closeBoxURL),typeof t.infoBoxClearance<"u"&&(this.infoBoxClearance=t.infoBoxClearance),typeof t.isHidden<"u"&&(this.isHidden=t.isHidden),typeof t.visible<"u"&&(this.isHidden=!t.visible),typeof t.enableEventPropagation<"u"&&(this.enableEventPropagation=t.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(t){this.content=t,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(t){this.position=t,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(t){this.isHidden=!t,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(t){this.zIndex=t,this.div&&(this.div.style.zIndex=t+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var t=this.getMap();return typeof t>"u"||t===null?!1:!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(t,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var o=n.getPosition();r.setPosition(o)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(t),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var t=0,n=this.eventListeners;t<n.length;t++){var r=n[t];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)},e.prototype.extend=function(t,n){return(function(o){for(var i in o.prototype)Object.prototype.hasOwnProperty.call(this,i)||(this.prototype[i]=o.prototype[i]);return this}).apply(t,[n])},e}(),sf={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},af={options:function(e,t){e.setOptions(t)},position:function(e,t){t instanceof google.maps.LatLng?e.setPosition(t):e.setPosition(new google.maps.LatLng(t.lat,t.lng))},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},Nb={};function zb(e){var t=e.children,n=e.anchor,r=e.options,o=e.position,i=e.zIndex,s=e.onCloseClick,a=e.onDomReady,u=e.onContentChanged,l=e.onPositionChanged,f=e.onZindexChanged,d=e.onLoad,h=e.onUnmount,v=c.useContext(je),m=c.useState(null),g=m[0],p=m[1],E=c.useState(null),S=E[0],D=E[1],M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(o&&g!==null){var I=o instanceof google.maps.LatLng?o:new google.maps.LatLng(o.lat,o.lng);g.setPosition(I)}},[o]),c.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&u&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(function(){g&&l&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(g,"position_changed",l)))},[l]),c.useEffect(function(){g&&f&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var I=r||Nb,Q=I.position,ne=ba(I,["position"]),k=void 0;Q&&!(Q instanceof google.maps.LatLng)&&(k=new google.maps.LatLng(Q.lat,Q.lng));var T=new of(ke(ke({},ne),k?{position:k}:{}));Y.current=document.createElement("div"),p(T),s&&D(google.maps.event.addListener(T,"closeclick",s)),a&&w(google.maps.event.addListener(T,"domready",a)),u&&H(google.maps.event.addListener(T,"content_changed",u)),l&&_(google.maps.event.addListener(T,"position_changed",l)),f&&N(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(Y.current),n?T.open(v,n):T.getPosition()?T.open(v):Bt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(T)}return function(){g!==null&&(S&&google.maps.event.removeListener(S),O&&google.maps.event.removeListener(O),b&&google.maps.event.removeListener(b),V&&google.maps.event.removeListener(V),F&&google.maps.event.removeListener(F),h&&h(g),g.close())}},[]),Y.current?xn.createPortal(c.Children.only(t),Y.current):null}c.memo(zb),function(e){dt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,o){o?n.context!==null&&r.open(n.context,o):r.getPosition()?n.context!==null&&r.open(n.context):Bt(!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 t.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,o=ba(n,["position"]),i;r&&!(r instanceof google.maps.LatLng)&&(i=new google.maps.LatLng(r.lat,r.lng));var s=new of(ke(ke({},o),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Ve({updaterMap:af,eventMap:sf,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},t.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:af,eventMap:sf,prevProps:n,nextProps:this.props,instance:r}))},t.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Ze(this.registeredEvents),r.close())},t.prototype.render=function(){return this.containerElement?xn.createPortal(c.Children.only(this.props.children),this.containerElement):null},t.contextType=je,t}(c.PureComponent);var $b=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},uf=zc($b);const lf=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ea=1,vo=8;class wa{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==Ea)throw new Error(`Got v${o} data when expected v${Ea}.`);const i=lf[r&15];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new wa(a,s,i,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=lf.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-a%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,vo,t),this.coords=new this.ArrayType(this.data,vo+a+u,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(vo+s+a+u),this.ids=new this.IndexArrayType(this.data,vo,t),this.coords=new this.ArrayType(this.data,vo+a+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ea<<4)+i]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Da(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:a}=this,u=[0,i.length-1,0],l=[];for(;u.length;){const f=u.pop()||0,d=u.pop()||0,h=u.pop()||0;if(d-h<=a){for(let p=h;p<=d;p++){const E=s[2*p],S=s[2*p+1];E>=t&&E<=r&&S>=n&&S<=o&&l.push(i[p])}continue}const v=h+d>>1,m=s[2*v],g=s[2*v+1];m>=t&&m<=r&&g>=n&&g<=o&&l.push(i[v]),(f===0?t<=m:n<=g)&&(u.push(h),u.push(v-1),u.push(1-f)),(f===0?r>=m:o>=g)&&(u.push(v+1),u.push(d),u.push(1-f))}return l}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[],l=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let p=h;p<=d;p++)ff(i[2*p],i[2*p+1],t,n)<=l&&u.push(o[p]);continue}const v=h+d>>1,m=i[2*v],g=i[2*v+1];ff(m,g,t,n)<=l&&u.push(o[v]),(f===0?t-r<=m:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?t+r>=m:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return u}}function Da(e,t,n,r,o,i){if(o-r<=n)return;const s=r+o>>1;cf(e,t,s,r,o,i),Da(e,t,n,r,s-1,1-i),Da(e,t,n,s+1,o,1-i)}function cf(e,t,n,r,o,i){for(;o>r;){if(o-r>600){const l=o-r+1,f=n-r+1,d=Math.log(l),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(l-h)/l)*(f-l/2<0?-1:1),m=Math.max(r,Math.floor(n-f*h/l+v)),g=Math.min(o,Math.floor(n+(l-f)*h/l+v));cf(e,t,n,m,g,i)}const s=t[2*n+i];let a=r,u=o;for(mo(e,t,r,n),t[2*o+i]>s&&mo(e,t,r,o);a<u;){for(mo(e,t,a,u),a++,u--;t[2*a+i]<s;)a++;for(;t[2*u+i]>s;)u--}t[2*r+i]===s?mo(e,t,r,u):(u++,mo(e,t,u,o)),u<=n&&(r=u+1),n<=u&&(o=u-1)}}function mo(e,t,n,r){xa(e,n,r),xa(t,2*n,2*r),xa(t,2*n+1,2*r+1)}function xa(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ff(e,t,n,r){const o=e-n,i=t-r;return o*o+i*i}const Ub={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},df=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),Br=2,ir=3,Sa=4,sr=5,pf=6;class Wb{constructor(t){this.options=Object.assign(Object.create(Ub),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const i=`prepare ${t.length} points`;n&&console.time(i),this.points=t;const s=[];for(let u=0;u<t.length;u++){const l=t[u];if(!l.geometry)continue;const[f,d]=l.geometry.coordinates,h=df(mi(f)),v=df(yi(d));s.push(h,v,1/0,u,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);n&&console.timeEnd(i);for(let u=o;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(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let i=t[2]===180?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){const d=this.getClusters([r,o,180,s],n),h=this.getClusters([-180,o,i,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],u=a.range(mi(r),yi(s),mi(i),yi(o)),l=a.data,f=[];for(const d of u){const h=this.stride*d;f.push(l[h+sr]>1?hf(l,h,this.clusterProps):this.points[l[h+ir]])}return f}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(o);const s=i.data;if(n*this.stride>=s.length)throw new Error(o);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=i.within(u,l,a),d=[];for(const h of f){const v=h*this.stride;s[v+Sa]===t&&d.push(s[v+sr]>1?hf(s,v,this.clusterProps):this.points[s[v+ir]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:s,radius:a}=this.options,u=a/s,l=(r-u)/i,f=(r+1+u)/i,d={features:[]};return this._addTileFeatures(o.range((n-u)/i,l,(n+1+u)/i,f),o.data,n,r,i,d),n===0&&this._addTileFeatures(o.range(1-u/i,l,1,f),o.data,i,r,i,d),n===i-1&&this._addTileFeatures(o.range(0,l,u/i,f),o.data,-1,r,i,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,i){const s=this.getChildren(n);for(const a of s){const u=a.properties;if(u&&u.cluster?i+u.point_count<=o?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,r,o,i):i<o?i++:t.push(a),t.length===r)break}return i}_createTree(t){const n=new wa(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,i,s){for(const a of t){const u=a*this.stride,l=n[u+sr]>1;let f,d,h;if(l)f=gf(n,u,this.clusterProps),d=n[u],h=n[u+1];else{const g=this.points[n[u+ir]];f=g.properties;const[p,E]=g.geometry.coordinates;d=mi(p),h=yi(E)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*i-r)),Math.round(this.options.extent*(h*i-o))]],tags:f};let m;l||this.options.generateId?m=n[u+ir]:m=this.points[n[u+ir]].id,m!==void 0&&(v.id=m),s.features.push(v)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:i,minPoints:s}=this.options,a=r/(o*Math.pow(2,n)),u=t.data,l=[],f=this.stride;for(let d=0;d<u.length;d+=f){if(u[d+Br]<=n)continue;u[d+Br]=n;const h=u[d],v=u[d+1],m=t.within(u[d],u[d+1],a),g=u[d+sr];let p=g;for(const E of m){const S=E*f;u[S+Br]>n&&(p+=u[S+sr])}if(p>g&&p>=s){let E=h*g,S=v*g,D,M=-1;const b=((d/f|0)<<5)+(n+1)+this.points.length;for(const w of m){const L=w*f;if(u[L+Br]<=n)continue;u[L+Br]=n;const O=u[L+sr];E+=u[L]*O,S+=u[L+1]*O,u[L+Sa]=b,i&&(D||(D=this._map(u,d,!0),M=this.clusterProps.length,this.clusterProps.push(D)),i(D,this._map(u,L)))}u[d+Sa]=b,l.push(E/p,S/p,1/0,b,-1,p),i&&l.push(M)}else{for(let E=0;E<f;E++)l.push(u[d+E]);if(p>1)for(const E of m){const S=E*f;if(!(u[S+Br]<=n)){u[S+Br]=n;for(let D=0;D<f;D++)l.push(u[S+D])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+sr]>1){const s=this.clusterProps[t[n+pf]];return r?Object.assign({},s):s}const o=this.points[t[n+ir]].properties,i=this.options.map(o);return r&&i===o?Object.assign({},i):i}}function hf(e,t,n){return{type:"Feature",id:e[t+ir],properties:gf(e,t,n),geometry:{type:"Point",coordinates:[Hb(e[t]),Vb(e[t+1])]}}}function gf(e,t,n){const r=e[t+sr],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,i=e[t+pf],s=i===-1?{}:Object.assign({},n[i]);return Object.assign(s,{cluster:!0,cluster_id:e[t+ir],point_count:r,point_count_abbreviated:o})}function mi(e){return e/360+.5}function yi(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Hb(e){return(e-.5)*360}function Vb(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/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,327 @@ React keys must be passed directly to JSX without using spread:
|
|
63
63
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
64
64
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
65
65
|
PERFORMANCE OF THIS SOFTWARE.
|
66
|
-
***************************************************************************** */function
|
66
|
+
***************************************************************************** */function qb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}class sn{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,n){this.isAdvancedMarker(t)?t.map=n:t.setMap(n)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class La{constructor({markers:t,position:n}){this.markers=t,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 t=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)t.extend(sn.getPosition(n));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>sn.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(sn.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Zb{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return Gb(t)}}const Gb=e=>e.map(n=>new La({position:sn.getPosition(n),markers:[n]}));class Kb extends Zb{constructor(t){var{maxZoom:n,radius:r=60}=t,o=qb(t,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Wb(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let n=!1;const r={zoom:t.map.getZoom()};if(!uf(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const o=this.markers.map(i=>{const s=sn.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!uf(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:n}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[t,n]},properties:r}){if(r.cluster)return new La({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(i=>i.properties.marker),position:{lat:n,lng:t}});const o=r.marker;return new La({markers:[o],position:sn.getPosition(o)})}}class Yb{constructor(t,n){this.markers={sum:t.length};const r=n.map(i=>i.count),o=r.reduce((i,s)=>i+s,0);this.clusters={count:n.length,markers:{mean:o/n.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class Xb{render({count:t,position:n},r,o){const s=`<svg fill="${t>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
|
-
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${
|
71
|
-
</svg>`,a=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(mt.isAdvancedMarkerAvailable(i)){const p=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");const h={map:i,position:n,zIndex:u,title:a,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}const l={position:n,zIndex:u,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}function Ap(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class eo{constructor(){Ap(eo,google.maps.OverlayView)}}var Qn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(Qn||(Qn={}));const Lp=(t,e,n)=>{n.fitBounds(e.bounds)};class Op extends eo{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Bp(r),renderer:o=new Sp,onClusterClick:s=Lp}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=o,this.onClusterClick=s,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(mt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,Qn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const s of n)s.markers.length==1&&i.add(s.markers[0]);const o=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?i.has(s.marker)||mt.setMap(s.marker,null):o.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>o.forEach(s=>mt.setMap(s,null)))}google.maps.event.trigger(this,Qn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>mt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new xp(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>mt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,Qn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),mt.setMap(r.marker,n)})}}function Pp(t){var e=zd(),n=f.useState(null),r=n[0],i=n[1];return f.useEffect(function(){if(e&&r===null){var o=new Op(he(he({},t),{map:e}));i(o)}},[e]),r}function Fp(t){var e=t.children,n=t.options,r=Pp(n);return r!==null?e(r):null}f.memo(Fp);var wa={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ba={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Mp(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,o=t.zIndex,s=t.onCloseClick,a=t.onDomReady,u=t.onContentChanged,l=t.onPositionChanged,c=t.onZindexChanged,p=t.onLoad,h=t.onUnmount,g=f.useContext(Be),y=f.useState(null),v=y[0],d=y[1],D=f.useState(null),B=D[0],b=D[1],O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useRef(null);return f.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),f.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),f.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),f.useEffect(function(){typeof o=="number"&&v!==null&&v.setZIndex(o)},[o]),f.useEffect(function(){v&&s&&(B!==null&&google.maps.event.removeListener(B),b(google.maps.event.addListener(v,"closeclick",s)))},[s]),f.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),w(google.maps.event.addListener(v,"domready",a)))},[a]),f.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(v,"content_changed",u)))},[u]),f.useEffect(function(){v&&l&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(v,"position_changed",l)))},[l]),f.useEffect(function(){v&&c&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(v,"zindex_changed",c)))},[c]),f.useEffect(function(){var _=new google.maps.InfoWindow(he({},r||{}));return d(_),K.current=document.createElement("div"),s&&b(google.maps.event.addListener(_,"closeclick",s)),a&&w(google.maps.event.addListener(_,"domready",a)),u&&R(google.maps.event.addListener(_,"content_changed",u)),l&&I(google.maps.event.addListener(_,"position_changed",l)),c&&N(google.maps.event.addListener(_,"zindex_changed",c)),_.setContent(K.current),i&&_.setPosition(i),o&&_.setZIndex(o),n?_.open(g,n):_.getPosition()?_.open(g):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),E&&google.maps.event.removeListener(E),z&&google.maps.event.removeListener(z),T&&google.maps.event.removeListener(T),h&&h(_),_.close()}},[]),K.current?ln.createPortal(f.Children.only(e),K.current):null}f.memo(Mp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):et(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(he({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Le({updaterMap:Ba,eventMap:wa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ba,eventMap:wa,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?ln.createPortal(f.Children.only(this.props.children),this.containerElement):null},e.contextType=Be,e}(f.PureComponent);var xa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Sa={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},kp={};function Tp(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,b=f.useContext(Be),O=f.useState(null),E=O[0],w=O[1],A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1];return f.useEffect(function(){E!==null&&E.setMap(b)},[b]),f.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),f.useEffect(function(){typeof n<"u"&&E!==null&&E.setDraggable(n)},[E,n]),f.useEffect(function(){typeof r<"u"&&E!==null&&E.setEditable(r)},[E,r]),f.useEffect(function(){typeof i<"u"&&E!==null&&E.setVisible(i)},[E,i]),f.useEffect(function(){typeof o<"u"&&E!==null&&E.setPath(o)},[E,o]),f.useEffect(function(){E&&s&&(F!==null&&google.maps.event.removeListener(F),R(google.maps.event.addListener(E,"dblclick",s)))},[s]),f.useEffect(function(){E&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(E,"dragend",a)))},[a]),f.useEffect(function(){E&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(E,"dragstart",u)))},[u]),f.useEffect(function(){E&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(E,"mousedown",l)))},[l]),f.useEffect(function(){E&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(E,"mousemove",c)))},[c]),f.useEffect(function(){E&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(E,"mouseout",p)))},[p]),f.useEffect(function(){E&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(E,"mouseover",h)))},[h]),f.useEffect(function(){E&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(E,"mouseup",g)))},[g]),f.useEffect(function(){E&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(E,"rightclick",y)))},[y]),f.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(E,"click",v)))},[v]),f.useEffect(function(){E&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(E,"drag",d)))},[d]),f.useEffect(function(){var ge=new google.maps.Polyline(he(he({},e||kp),{map:b}));return o&&ge.setPath(o),typeof i<"u"&&ge.setVisible(i),typeof r<"u"&&ge.setEditable(r),typeof n<"u"&&ge.setDraggable(n),s&&R(google.maps.event.addListener(ge,"dblclick",s)),a&&I(google.maps.event.addListener(ge,"dragend",a)),u&&N(google.maps.event.addListener(ge,"dragstart",u)),l&&ie(google.maps.event.addListener(ge,"mousedown",l)),c&&H(google.maps.event.addListener(ge,"mousemove",c)),p&&ee(google.maps.event.addListener(ge,"mouseout",p)),h&&W(google.maps.event.addListener(ge,"mouseover",h)),g&&X(google.maps.event.addListener(ge,"mouseup",g)),y&&le(google.maps.event.addListener(ge,"rightclick",y)),v&&ve(google.maps.event.addListener(ge,"click",v)),d&&De(google.maps.event.addListener(ge,"drag",d)),w(ge),D&&D(ge),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),B&&B(ge),ge.setMap(null)}},[]),null}f.memo(Tp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Sa,eventMap:xa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Sa,eventMap:xa,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var Aa={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},La={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function Ip(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,o=t.path,s=t.paths,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,b=t.onUnmount,O=t.onEdit,E=f.useContext(Be),w=f.useState(null),A=w[0],F=w[1],R=f.useState(null),P=R[0],z=R[1],I=f.useState(null),j=I[0],T=I[1],N=f.useState(null),K=N[0],_=N[1],ie=f.useState(null),re=ie[0],k=ie[1],H=f.useState(null),J=H[0],q=H[1],ee=f.useState(null),Y=ee[0],C=ee[1],W=f.useState(null),U=W[0],M=W[1],X=f.useState(null),te=X[0],G=X[1],le=f.useState(null),se=le[0],pe=le[1],ve=f.useState(null),Ce=ve[0],me=ve[1],De=f.useState(null),ge=De[0],Ne=De[1];return f.useEffect(function(){A!==null&&A.setMap(E)},[E]),f.useEffect(function(){typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),f.useEffect(function(){typeof n<"u"&&A!==null&&A.setDraggable(n)},[A,n]),f.useEffect(function(){typeof r<"u"&&A!==null&&A.setEditable(r)},[A,r]),f.useEffect(function(){typeof i<"u"&&A!==null&&A.setVisible(i)},[A,i]),f.useEffect(function(){typeof o<"u"&&A!==null&&A.setPath(o)},[A,o]),f.useEffect(function(){typeof s<"u"&&A!==null&&A.setPaths(s)},[A,s]),f.useEffect(function(){A&&a&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(A,"dblclick",a)))},[a]),f.useEffect(function(){A&&(google.maps.event.addListener(A.getPath(),"insert_at",function(){O==null||O(A)}),google.maps.event.addListener(A.getPath(),"set_at",function(){O==null||O(A)}))},[A,O]),f.useEffect(function(){A&&u&&(j!==null&&google.maps.event.removeListener(j),T(google.maps.event.addListener(A,"dragend",u)))},[u]),f.useEffect(function(){A&&l&&(K!==null&&google.maps.event.removeListener(K),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),f.useEffect(function(){A&&c&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(A,"mousedown",c)))},[c]),f.useEffect(function(){A&&p&&(J!==null&&google.maps.event.removeListener(J),q(google.maps.event.addListener(A,"mousemove",p)))},[p]),f.useEffect(function(){A&&h&&(Y!==null&&google.maps.event.removeListener(Y),C(google.maps.event.addListener(A,"mouseout",h)))},[h]),f.useEffect(function(){A&&g&&(U!==null&&google.maps.event.removeListener(U),M(google.maps.event.addListener(A,"mouseover",g)))},[g]),f.useEffect(function(){A&&y&&(te!==null&&google.maps.event.removeListener(te),G(google.maps.event.addListener(A,"mouseup",y)))},[y]),f.useEffect(function(){A&&v&&(se!==null&&google.maps.event.removeListener(se),pe(google.maps.event.addListener(A,"rightclick",v)))},[v]),f.useEffect(function(){A&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),me(google.maps.event.addListener(A,"click",d)))},[d]),f.useEffect(function(){A&&D&&(ge!==null&&google.maps.event.removeListener(ge),Ne(google.maps.event.addListener(A,"drag",D)))},[D]),f.useEffect(function(){var ae=new google.maps.Polygon(he(he({},e||{}),{map:E}));return o&&ae.setPath(o),s&&ae.setPaths(s),typeof i<"u"&&ae.setVisible(i),typeof r<"u"&&ae.setEditable(r),typeof n<"u"&&ae.setDraggable(n),a&&z(google.maps.event.addListener(ae,"dblclick",a)),u&&T(google.maps.event.addListener(ae,"dragend",u)),l&&_(google.maps.event.addListener(ae,"dragstart",l)),c&&k(google.maps.event.addListener(ae,"mousedown",c)),p&&q(google.maps.event.addListener(ae,"mousemove",p)),h&&C(google.maps.event.addListener(ae,"mouseout",h)),g&&M(google.maps.event.addListener(ae,"mouseover",g)),y&&G(google.maps.event.addListener(ae,"mouseup",y)),v&&pe(google.maps.event.addListener(ae,"rightclick",v)),d&&me(google.maps.event.addListener(ae,"click",d)),D&&Ne(google.maps.event.addListener(ae,"drag",D)),F(ae),B&&B(ae),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),K!==null&&google.maps.event.removeListener(K),re!==null&&google.maps.event.removeListener(re),J!==null&&google.maps.event.removeListener(J),Y!==null&&google.maps.event.removeListener(Y),U!==null&&google.maps.event.removeListener(U),te!==null&&google.maps.event.removeListener(te),se!==null&&google.maps.event.removeListener(se),Ce!==null&&google.maps.event.removeListener(Ce),b&&b(ae),ae.setMap(null)}},[]),null}f.memo(Ip),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:La,eventMap:Aa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:La,eventMap:Aa,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var Oa={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Pa={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function jp(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,a=t.onDragEnd,u=t.onDragStart,l=t.onMouseDown,c=t.onMouseMove,p=t.onMouseOut,h=t.onMouseOver,g=t.onMouseUp,y=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,b=t.onUnmount,O=f.useContext(Be),E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){w!==null&&w.setMap(O)},[O]),f.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),f.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),f.useEffect(function(){typeof i<"u"&&w!==null&&w.setEditable(i)},[w,i]),f.useEffect(function(){typeof o<"u"&&w!==null&&w.setVisible(o)},[w,o]),f.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),f.useEffect(function(){w&&s&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),f.useEffect(function(){w&&a&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(w,"dragend",a)))},[a]),f.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(w,"dragstart",u)))},[u]),f.useEffect(function(){w&&l&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(w,"mousedown",l)))},[l]),f.useEffect(function(){w&&c&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(w,"mousemove",c)))},[c]),f.useEffect(function(){w&&p&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(w,"mouseout",p)))},[p]),f.useEffect(function(){w&&h&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(w,"mouseover",h)))},[h]),f.useEffect(function(){w&&g&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(w,"mouseup",g)))},[g]),f.useEffect(function(){w&&y&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(w,"rightclick",y)))},[y]),f.useEffect(function(){w&&v&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(w,"click",v)))},[v]),f.useEffect(function(){w&&d&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(w,"drag",d)))},[d]),f.useEffect(function(){w&&D&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),f.useEffect(function(){var de=new google.maps.Rectangle(he(he({},e||{}),{map:O}));return typeof o<"u"&&de.setVisible(o),typeof i<"u"&&de.setEditable(i),typeof r<"u"&&de.setDraggable(r),typeof n<"u"&&de.setBounds(n),s&&P(google.maps.event.addListener(de,"dblclick",s)),a&&j(google.maps.event.addListener(de,"dragend",a)),u&&K(google.maps.event.addListener(de,"dragstart",u)),l&&re(google.maps.event.addListener(de,"mousedown",l)),c&&J(google.maps.event.addListener(de,"mousemove",c)),p&&Y(google.maps.event.addListener(de,"mouseout",p)),h&&U(google.maps.event.addListener(de,"mouseover",h)),g&&te(google.maps.event.addListener(de,"mouseup",g)),y&&se(google.maps.event.addListener(de,"rightclick",y)),v&&Ce(google.maps.event.addListener(de,"click",v)),d&&ge(google.maps.event.addListener(de,"drag",d)),D&&Ue(google.maps.event.addListener(de,"bounds_changed",D)),A(de),B&&B(de),function(){R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),b&&b(de),de.setMap(null)}},[]),null}f.memo(jp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Pa,eventMap:Oa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Pa,eventMap:Oa,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var Fa={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ma={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Np={};function _p(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,o=t.editable,s=t.visible,a=t.onDblClick,u=t.onDragEnd,l=t.onDragStart,c=t.onMouseDown,p=t.onMouseMove,h=t.onMouseOut,g=t.onMouseOver,y=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,b=t.onRadiusChanged,O=t.onLoad,E=t.onUnmount,w=f.useContext(Be),A=f.useState(null),F=A[0],R=A[1],P=f.useState(null),z=P[0],I=P[1],j=f.useState(null),T=j[0],N=j[1],K=f.useState(null),_=K[0],ie=K[1],re=f.useState(null),k=re[0],H=re[1],J=f.useState(null),q=J[0],ee=J[1],Y=f.useState(null),C=Y[0],W=Y[1],U=f.useState(null),M=U[0],X=U[1],te=f.useState(null),G=te[0],le=te[1],se=f.useState(null),pe=se[0],ve=se[1],Ce=f.useState(null),me=Ce[0],De=Ce[1],ge=f.useState(null),Ne=ge[0],ae=ge[1],Ue=f.useState(null),de=Ue[0],we=Ue[1],Te=f.useState(null),Xe=Te[0],$e=Te[1];return f.useEffect(function(){F!==null&&F.setMap(w)},[w]),f.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),f.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),f.useEffect(function(){typeof o<"u"&&F!==null&&F.setEditable(o)},[F,o]),f.useEffect(function(){typeof s<"u"&&F!==null&&F.setVisible(s)},[F,s]),f.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),f.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),f.useEffect(function(){F&&a&&(z!==null&&google.maps.event.removeListener(z),I(google.maps.event.addListener(F,"dblclick",a)))},[a]),f.useEffect(function(){F&&u&&(T!==null&&google.maps.event.removeListener(T),N(google.maps.event.addListener(F,"dragend",u)))},[u]),f.useEffect(function(){F&&l&&(_!==null&&google.maps.event.removeListener(_),ie(google.maps.event.addListener(F,"dragstart",l)))},[l]),f.useEffect(function(){F&&c&&(k!==null&&google.maps.event.removeListener(k),H(google.maps.event.addListener(F,"mousedown",c)))},[c]),f.useEffect(function(){F&&p&&(q!==null&&google.maps.event.removeListener(q),ee(google.maps.event.addListener(F,"mousemove",p)))},[p]),f.useEffect(function(){F&&h&&(C!==null&&google.maps.event.removeListener(C),W(google.maps.event.addListener(F,"mouseout",h)))},[h]),f.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),X(google.maps.event.addListener(F,"mouseover",g)))},[g]),f.useEffect(function(){F&&y&&(G!==null&&google.maps.event.removeListener(G),le(google.maps.event.addListener(F,"mouseup",y)))},[y]),f.useEffect(function(){F&&v&&(pe!==null&&google.maps.event.removeListener(pe),ve(google.maps.event.addListener(F,"rightclick",v)))},[v]),f.useEffect(function(){F&&d&&(me!==null&&google.maps.event.removeListener(me),De(google.maps.event.addListener(F,"click",d)))},[d]),f.useEffect(function(){F&&D&&(Ne!==null&&google.maps.event.removeListener(Ne),ae(google.maps.event.addListener(F,"drag",D)))},[D]),f.useEffect(function(){F&&B&&(de!==null&&google.maps.event.removeListener(de),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),f.useEffect(function(){F&&b&&(Xe!==null&&google.maps.event.removeListener(Xe),$e(google.maps.event.addListener(F,"radius_changed",b)))},[b]),f.useEffect(function(){var xe=new google.maps.Circle(he(he({},e||Np),{map:w}));return typeof r=="number"&&xe.setRadius(r),typeof n<"u"&&xe.setCenter(n),typeof r=="number"&&xe.setRadius(r),typeof s<"u"&&xe.setVisible(s),typeof o<"u"&&xe.setEditable(o),typeof i<"u"&&xe.setDraggable(i),a&&I(google.maps.event.addListener(xe,"dblclick",a)),u&&N(google.maps.event.addListener(xe,"dragend",u)),l&&ie(google.maps.event.addListener(xe,"dragstart",l)),c&&H(google.maps.event.addListener(xe,"mousedown",c)),p&&ee(google.maps.event.addListener(xe,"mousemove",p)),h&&W(google.maps.event.addListener(xe,"mouseout",h)),g&&X(google.maps.event.addListener(xe,"mouseover",g)),y&&le(google.maps.event.addListener(xe,"mouseup",y)),v&&ve(google.maps.event.addListener(xe,"rightclick",v)),d&&De(google.maps.event.addListener(xe,"click",d)),D&&ae(google.maps.event.addListener(xe,"drag",D)),B&&we(google.maps.event.addListener(xe,"center_changed",B)),b&&$e(google.maps.event.addListener(xe,"radius_changed",b)),R(xe),O&&O(xe),function(){z!==null&&google.maps.event.removeListener(z),T!==null&&google.maps.event.removeListener(T),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),q!==null&&google.maps.event.removeListener(q),C!==null&&google.maps.event.removeListener(C),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),pe!==null&&google.maps.event.removeListener(pe),me!==null&&google.maps.event.removeListener(me),de!==null&&google.maps.event.removeListener(de),Xe!==null&&google.maps.event.removeListener(Xe),E&&E(xe),xe.setMap(null)}},[]),null}f.memo(_p),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Ma,eventMap:Fa,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ma,eventMap:Fa,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var ka={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Ta={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function zp(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,o=t.onMouseMove,s=t.onMouseOut,a=t.onMouseOver,u=t.onMouseUp,l=t.onRightClick,c=t.onAddFeature,p=t.onRemoveFeature,h=t.onRemoveProperty,g=t.onSetGeometry,y=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=f.useContext(Be),B=f.useState(null),b=B[0],O=B[1],E=f.useState(null),w=E[0],A=E[1],F=f.useState(null),R=F[0],P=F[1],z=f.useState(null),I=z[0],j=z[1],T=f.useState(null),N=T[0],K=T[1],_=f.useState(null),ie=_[0],re=_[1],k=f.useState(null),H=k[0],J=k[1],q=f.useState(null),ee=q[0],Y=q[1],C=f.useState(null),W=C[0],U=C[1],M=f.useState(null),X=M[0],te=M[1],G=f.useState(null),le=G[0],se=G[1],pe=f.useState(null),ve=pe[0],Ce=pe[1],me=f.useState(null),De=me[0],ge=me[1],Ne=f.useState(null),ae=Ne[0],Ue=Ne[1];return f.useEffect(function(){b!==null&&b.setMap(D)},[D]),f.useEffect(function(){b&&r&&(w!==null&&google.maps.event.removeListener(w),A(google.maps.event.addListener(b,"dblclick",r)))},[r]),f.useEffect(function(){b&&i&&(R!==null&&google.maps.event.removeListener(R),P(google.maps.event.addListener(b,"mousedown",i)))},[i]),f.useEffect(function(){b&&o&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(b,"mousemove",o)))},[o]),f.useEffect(function(){b&&s&&(N!==null&&google.maps.event.removeListener(N),K(google.maps.event.addListener(b,"mouseout",s)))},[s]),f.useEffect(function(){b&&a&&(ie!==null&&google.maps.event.removeListener(ie),re(google.maps.event.addListener(b,"mouseover",a)))},[a]),f.useEffect(function(){b&&u&&(H!==null&&google.maps.event.removeListener(H),J(google.maps.event.addListener(b,"mouseup",u)))},[u]),f.useEffect(function(){b&&l&&(ee!==null&&google.maps.event.removeListener(ee),Y(google.maps.event.addListener(b,"rightclick",l)))},[l]),f.useEffect(function(){b&&n&&(W!==null&&google.maps.event.removeListener(W),U(google.maps.event.addListener(b,"click",n)))},[n]),f.useEffect(function(){b&&c&&(X!==null&&google.maps.event.removeListener(X),te(google.maps.event.addListener(b,"addfeature",c)))},[c]),f.useEffect(function(){b&&p&&(le!==null&&google.maps.event.removeListener(le),se(google.maps.event.addListener(b,"removefeature",p)))},[p]),f.useEffect(function(){b&&h&&(ve!==null&&google.maps.event.removeListener(ve),Ce(google.maps.event.addListener(b,"removeproperty",h)))},[h]),f.useEffect(function(){b&&g&&(De!==null&&google.maps.event.removeListener(De),ge(google.maps.event.addListener(b,"setgeometry",g)))},[g]),f.useEffect(function(){b&&y&&(ae!==null&&google.maps.event.removeListener(ae),Ue(google.maps.event.addListener(b,"setproperty",y)))},[y]),f.useEffect(function(){if(D!==null){var de=new google.maps.Data(he(he({},e||{}),{map:D}));r&&A(google.maps.event.addListener(de,"dblclick",r)),i&&P(google.maps.event.addListener(de,"mousedown",i)),o&&j(google.maps.event.addListener(de,"mousemove",o)),s&&K(google.maps.event.addListener(de,"mouseout",s)),a&&re(google.maps.event.addListener(de,"mouseover",a)),u&&J(google.maps.event.addListener(de,"mouseup",u)),l&&Y(google.maps.event.addListener(de,"rightclick",l)),n&&U(google.maps.event.addListener(de,"click",n)),c&&te(google.maps.event.addListener(de,"addfeature",c)),p&&se(google.maps.event.addListener(de,"removefeature",p)),h&&Ce(google.maps.event.addListener(de,"removeproperty",h)),g&&ge(google.maps.event.addListener(de,"setgeometry",g)),y&&Ue(google.maps.event.addListener(de,"setproperty",y)),O(de),v&&v(de)}return function(){b&&(w!==null&&google.maps.event.removeListener(w),R!==null&&google.maps.event.removeListener(R),I!==null&&google.maps.event.removeListener(I),N!==null&&google.maps.event.removeListener(N),ie!==null&&google.maps.event.removeListener(ie),H!==null&&google.maps.event.removeListener(H),ee!==null&&google.maps.event.removeListener(ee),W!==null&&google.maps.event.removeListener(W),X!==null&&google.maps.event.removeListener(X),le!==null&&google.maps.event.removeListener(le),ve!==null&&google.maps.event.removeListener(ve),De!==null&&google.maps.event.removeListener(De),ae!==null&&google.maps.event.removeListener(ae),d&&d(b),b.setMap(null))}},[]),null}f.memo(zp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(he(he({},this.props.options||{}),{map:this.context}));this.registeredEvents=Le({updaterMap:Ta,eventMap:ka,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ta,eventMap:ka,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var Ia={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},ja={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(he(he({},this.props.options),{map:this.context}));this.registeredEvents=Le({updaterMap:ja,eventMap:Ia,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:ja,eventMap:Ia,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e})(f.PureComponent);function Na(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Wp(t,e){return new e(t.lat,t.lng)}function Up(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Hp(t,e,n){return t instanceof e?t:n(t,e)}function Rp(t,e,n){return t instanceof e?t:n(t,e)}function Vp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function qp(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,o=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(o+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _a(t,e,n,r){return n!==void 0?Vp(t,e,Rp(n,google.maps.LatLngBounds,Up)):qp(t,e,Hp(r,google.maps.LatLng,Wp))}function Gp(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function Zp(t,e,n,r,i){var o=function(s){He(a,s);function a(u,l,c,p){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=c,h.bounds=p,h}return a.prototype.onAdd=function(){var u,l=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];l==null||l.appendChild(this.container)},a.prototype.draw=function(){for(var u=this.getProjection(),l=he({},this.container?Na(this.container,i):{x:0,y:0}),c=_a(u,l,this.bounds,this.position),p=0,h=Object.entries(c);p<h.length;p++){var g=h[p],y=g[0],v=g[1];this.container.style[y]=v}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new o(t,e,n,r)}function za(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Wa(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function Yp(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,o=t.onLoad,s=t.onUnmount,a=t.getPixelPositionOffset,u=t.children,l=f.useContext(Be),c=f.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),p=f.useMemo(function(){return Zp(c,r,e,n,a)},[c,r,e,n]);return f.useEffect(function(){return o==null||o(p),p==null||p.setMap(l),function(){s==null||s(p),p==null||p.setMap(null)}},[l,p]),f.useEffect(function(){c.style.zIndex="".concat(i)},[i,c]),Hs.createPortal(u,c)}f.memo(Yp),function(t){He(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var o=r.props.mapPaneName,s=r.overlayView.getPanes();et(!!o,"OverlayView requires props.mapPaneName but got %s",o),s?r.setState({paneEl:s[o]}):r.setState({paneEl:null})},r.onAdd=function(){var o,s;r.updatePane(),(s=(o=r.props).onLoad)===null||s===void 0||s.call(o,r.overlayView)},r.onPositionElement=function(){var o=r.overlayView.getProjection(),s=he({x:0,y:0},r.containerRef.current?Na(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=_a(o,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,c=u.top,p=u.width,h=u.height;Gp(a,{left:l,top:c,width:p,height:h})||r.setState({containerStyle:{top:a.top||0,left:a.left||0,width:a.width||0,height:a.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var o,s;r.setState(function(){return{paneEl:null}}),(s=(o=r.props).onUnmount)===null||s===void 0||s.call(o,r.overlayView)},r.containerRef=f.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=za(n.position),i=za(this.props.position),o=Wa(n.bounds),s=Wa(this.props.bounds);(r!==i||o!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Hs.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:f.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Be,e}(f.PureComponent);function Kp(){}var Ua={onDblClick:"dblclick",onClick:"click"},Ha={opacity:function(t,e){t.setOpacity(e)}};function Xp(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,o=f.useContext(Be),s=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),a=f.useMemo(function(){var u=new google.maps.GroundOverlay(e,s,he({},r));return u},[]);return f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){typeof e<"u"&&a!==null&&(a.set("url",e),a.setMap(o))},[a,e]),f.useEffect(function(){typeof i<"u"&&a!==null&&a.setOpacity(i?1:0)},[a,i]),f.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&a!==null&&(a.set("bounds",u),a.setMap(o))},[a,n]),null}f.memo(Xp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){et(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,he(he({},this.props.options),{map:this.context}));this.registeredEvents=Le({updaterMap:Ha,eventMap:Ua,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ha,eventMap:Ua,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:Kp},e.contextType=Be,e}(f.PureComponent);var Ra={},Va={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function Jp(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,o=f.useContext(Be),s=f.useState(null),a=s[0],u=s[1];return f.useEffect(function(){google.maps.visualization||et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),f.useEffect(function(){et(!!e,"data property is required in HeatmapLayer %s",e)},[e]),f.useEffect(function(){a!==null&&a.setMap(o)},[o]),f.useEffect(function(){i&&a!==null&&a.setOptions(i)},[a,i]),f.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(he(he({},i||{}),{data:e,map:o}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}f.memo(Jp),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){et(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),et(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(he(he({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Le({updaterMap:Va,eventMap:Ra,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Va,eventMap:Ra,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent);var qa={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Ga={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Le({updaterMap:Ga,eventMap:qa,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ga,eventMap:qa,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Be,e})(f.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Be,e}(f.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(f.PureComponent);var Za={onDirectionsChanged:"directions_changed"},Ya={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Le({updaterMap:Ya,eventMap:Za,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Ya,eventMap:Za,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Be,e})(f.PureComponent),function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){et(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(f.PureComponent);var Ka={onPlacesChanged:"places_changed"},Xa={bounds:function(t,e){t.setBounds(e)}},Qp=function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Le({updaterMap:Xa,eventMap:Ka,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Xa,eventMap:Ka,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:f.Children.only(this.props.children)})},e.contextType=Be,e}(f.PureComponent),Ja={onPlaceChanged:"place_changed"},Qa={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){He(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=f.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;et(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Le({updaterMap:Qa,eventMap:Ja,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Le({updaterMap:Qa,eventMap:Ja,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:f.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Be,e})(f.PureComponent);function $p({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(Gd,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(np,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Oe.MapPinned,{})})}function eh(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function th(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,o=`arkynTableBody ${n}`,s=f.Children.count(r)===0;return x.jsx("tbody",{className:o.trim(),...i,children:s?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function nh(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return x.jsx("caption",{className:i.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function rh(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return x.jsx("div",{className:i.trim(),...r,children:x.jsx("table",{children:e})})}function ih(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:i.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function oh(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:i.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function sh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:o="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:c,...p}=t,g={xs:12,sm:16,md:20,lg:24}[o],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${o} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return x.jsxs("button",{className:d,disabled:u||e,...p,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Oe.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[Pr(g,s),c,Pr(g,a)]})]})}function $a(){const t=Ot.useActionData(),e=Ot.useNavigation(),n=Ot.useFetchers(),[r,i]=f.useState(null);function o(l,c){return JSON.stringify(l)===JSON.stringify(c)}function s(){r&&i(null)}f.useEffect(()=>{var c,p;let l=((p=(c=n[0])==null?void 0:c.data)==null?void 0:p.fieldErrors)||{};o(r,l)||Object.entries(l).length!==0&&i(l)},[n,t]),f.useEffect(()=>{var l;((l=n[0])==null?void 0:l.state)==="submitting"&&s()},[n,e]);const a=(t==null?void 0:t.fieldErrors)||r;let u={};return Object.entries(a||{}).forEach(([l,c])=>{typeof c=="string"&&typeof l=="string"&&(u[l]=c)}),u}const eu=f.createContext({});function ah(t){var p;const{children:e,className:n,id:r,...i}=t,o=$a(),s=f.useRef(null),a=((p=s.current)==null?void 0:p.name)||"",u=(o==null?void 0:o[a])||null,l=f.useId(),c=`arkynFormController ${n}`;return x.jsx(eu.Provider,{value:{error:u,id:l,inputRef:s},children:x.jsx("section",{id:r||a||void 0,className:c.trim(),...i,children:e})})}function yt(){return f.useContext(eu)}function uh(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:o=!1,checked:s=null,onCheck:a,value:u,...l}=t,{id:c,inputRef:p,error:h}=yt(),g=i||!!h,[y,v]=f.useState(o||!1),d=typeof s=="boolean"?s:y,b=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const E=y;v(!E),a&&a(E?"":u||"checked")}return x.jsxs("button",{id:c,type:"button",className:b,onClick:O,...l,children:[x.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),x.jsx(Oe.Check,{})]})}function lh(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:o}=yt();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):o?x.jsx("strong",{className:i.trim(),...r,children:o}):x.jsx(x.Fragment,{})}function ch(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=yt(),s=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:s.trim(),htmlFor:i,...r})}function Gt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function to(t){return t&&t.replace(/[^0-9]/g,"")}function tu(t,e){let n="",r=0;return Array.from(t).forEach((i,o)=>{e[o+r].match(/[0-9]/)||(n+=e[o+r],r++),n+=i}),n}function nu(t){return t.length>11?"CNPJ":"CPF"}const no={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},ru=to(no.CNPJ).length;function fh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,defaultValue:h,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,...b}=t;function O(T){let N=to(T);const K=nu(N);if(!(N.length>ru))return N=tu(N,no[K]),N}const E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,defaultValue:O(h||""),disabled:p,readOnly:g,onFocus:y,onBlur:v,title:d,style:D,onChange:B,loadingPosition:E,iconSize:j,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...b}}function dh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,onChange:F,value:R,defaultValue:P,...z}=fh({...t,id:o,isError:u},e),[I,j]=f.useState(P),T=B&&!D,N=w&&!D,K=d==="left"&&D,_=d==="right"&&D;function ie(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function re(J){let q=to(J.target.value);const ee=nu(q);q.length>ru||(q=tu(q,no[ee]),J.target.value=q,j(q),F&&F(J))}function k(J){n(!0),O&&O(J)}function H(J){n(!1),E&&E(J)}return x.jsxs("section",{title:c,style:p,onClick:ie,className:h,children:[g,K&&A,T&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,value:R||I,onFocus:k,onChange:re,onBlur:H,...z}),N&&x.jsx(w,{size:v,strokeWidth:2.5}),_&&A,y]})}const ph=3,hh=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?ph:0),Tr=2,iu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ro=t=>{let e=t;return typeof t=="string"?(e=iu(t),e%1!==0&&(e=e.toFixed(Tr))):e=Number.isInteger(t)?Number(t)*10**Tr:t.toFixed(Tr),iu(e)/10**Tr},ou=(t,e,n)=>{if(!e)return[0,""];const r=ro(e),i=hh(t,r,n);return[r,i]};function vh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:b="BRL",...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,locale:B,currency:b,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,max:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}function gh(t){const[e,n]=f.useState(!1),[r,i]=f.useState("0"),o=f.useRef(null),{inputRef:s,id:a,error:u}=yt(),l=s||o,c=t.isError||!!u,{disabled:p,title:h,style:g,className:y,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:b,LeftIcon:O,readOnly:E,onFocus:w,onBlur:A,RightIcon:F,Spinner:R,value:P,max:z,onChangeValue:I,onKeyPress:j,currency:T,locale:N,name:K,defaultValue:_,...ie}=vh({...t,id:a,isError:c},e),re=O&&!b,k=F&&!b,H=B==="left"&&b,J=B==="right"&&b;function q(){p||!(l!=null&&l.current)||(n(!0),l.current.focus())}function ee(M){n(!0),w&&w(M)}function Y(M){n(!1),A&&A(M)}const C=M=>{const[X,te]=ou(N,M,T);return!z||X<=z?(i(te),[X,te]):[ro(r),r]},W=M=>{M.preventDefault();const[X,te]=C(M.target.value);I(M,String(X),String(te))},U=M=>j&&j(M,M.key,M.key);return f.useEffect(()=>{const M=P||+_||void 0,[,X]=ou(N,M,T);i(X)},[T,_,P]),x.jsxs("section",{title:h,style:g,onClick:q,className:y,children:[v,H&&R,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:W,onBlur:Y,onFocus:ee,onKeyUp:U,disabled:p||b,readOnly:E,...ie}),x.jsx("input",{type:"hidden",ref:l,name:K,value:ro(r)}),J&&R,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function mh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,showMask:B=!1,type:b,...O}=t,E=c?"right":"left",z=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,j={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:Gt(a,j,"prefix"),sufix:Gt(u,j,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:E,iconSize:j,showMask:B,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...O}}const yh=f.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Ch(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,Spinner:A,...F}=mh({...t,id:o,isError:u},e),R=B&&!D,P=w&&!D,z=d==="left"&&D,I=d==="right"&&D;function j(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function T(K){n(!0),O&&O(K)}function N(K){n(!1),E&&E(K)}return x.jsxs("section",{title:c,style:p,onClick:j,className:h,children:[g,z&&A,R&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Dd.InputMask,{component:yh,ref:a,onFocus:T,onBlur:N,disabled:l,...F}),P&&x.jsx(w,{size:v,strokeWidth:2.5}),I&&A,y]})}function Dh(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,...B}=t,b=c?"right":"left",R=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${i} ${p||h||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,z={md:20,lg:20}[i];return{isLoading:n,className:R,prefix:Gt(a,z,"prefix"),sufix:Gt(u,z,"sufix"),LeftIcon:l,RightIcon:c,disabled:p,readOnly:h,onFocus:g,onBlur:y,title:v,style:d,onChange:D,loadingPosition:b,iconSize:z,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Eh(t){const[e,n]=f.useState(!1),r=f.useRef(null),{inputRef:i,id:o,error:s}=yt(),a=i||r,u=t.isError||!!s,{disabled:l,title:c,style:p,className:h,prefix:g,sufix:y,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:b,onFocus:O,onBlur:E,RightIcon:w,type:A,Spinner:F,...R}=Dh({...t,id:o,isError:u},e),P=B&&!D,z=w&&!D,I=d==="left"&&D,j=d==="right"&&D;function T(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(_){n(!0),O&&O(_)}function K(_){n(!1),E&&E(_)}return A==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...R}):x.jsxs("section",{title:c,style:p,onClick:T,className:h,children:[g,I&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:l||D,readOnly:b,ref:a,onFocus:N,onBlur:K,type:A,...R}),z&&x.jsx(w,{size:v,strokeWidth:2.5}),j&&F,y]})}function su(t){return t.type==="currency"?x.jsx(gh,{...t}):t.type==="masked"?x.jsx(Ch,{...t}):t.type==="cpf-cnpj"?x.jsx(dh,{...t}):x.jsx(Eh,{...t})}function bh({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,o]=f.useState(null),s=u=>o(u),a=()=>{var g,y,v,d;const l=i.getPlaces()[0],c=l==null?void 0:l.address_components;function p(D){const B=c.find(b=>b.types[0]===D);return B?B.long_name:""}function h(D){const B=c.find(b=>b.types[0]===D);return B?B.short_name:""}if(l){const D=p("route"),B=p("street_number"),b=p("sublocality_level_1"),O=p("administrative_area_level_2"),E=p("administrative_area_level_1"),w=h("administrative_area_level_1"),A=p("postal_code"),F=(y=(g=l.geometry)==null?void 0:g.location)==null?void 0:y.lat(),R=(d=(v=l.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:E,district:b,cep:A,streetNumber:B,stateShortName:w,coordinates:{lat:F,lng:R}})}};return x.jsx(Qp,{onLoad:s,onPlacesChanged:a,options:n,children:x.jsx(su,{type:"text",onChange:u=>t(u.target.value),...r})})}function wh(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:o,disabled:s,className:a="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${a}`;return x.jsxs("button",{disabled:s||e,className:p.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Oe.Loader2,{size:l[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(o,{size:l[i],strokeWidth:2.5})})]})}const au=f.createContext({});function Bh(){return f.useContext(au)}function xh(t){const{defaultValue:e,name:n,value:r,onChange:i,size:o="md",className:s="",...a}=t,[u,l]=f.useState(e||""),{inputRef:c,id:p}=yt();function h(y){l(y),i&&i(y)}const g=`arkynRadioGroup ${o} ${s}`;return x.jsxs(au.Provider,{value:{onChange:h,value:r||u,size:o},children:[x.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:n,ref:c,value:r||u}),x.jsx("div",{className:g.trim(),...a})]})}function Sh(t){const{value:e,size:n,disabled:r,children:i,className:o="",...s}=t,{onChange:a,size:u,value:l}=Bh(),{error:c}=yt(),v=`arkynRadioBox ${n||u} ${l===e?"checkedTrue":"checkedFalse"} ${c?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${o}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>a(e),onFocus:()=>a(e),...s}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Ah=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),io={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},uu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Ah?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},oo={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Ir=1;Ir<20;Ir++)oo["f"+Ir]=111+Ir;function jr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(s){return lu(s,e)}),i=function(a){return r.some(function(u){return cu(u,a)})},o=n==null?i:i(n);return o}function Lh(t,e){return jr(t,e)}function Oh(t,e){return jr(t,{byKey:!0},e)}function lu(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),o=i.length;for(var s in io)r[io[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var c=i[Symbol.iterator](),p;!(a=(p=c.next()).done);a=!0){var h=p.value,g=h.endsWith("?")&&h.length>1;g&&(h=h.slice(0,-1));var y=so(h),v=io[y];if(h.length>1&&!v&&!uu[h]&&!oo[y])throw new TypeError('Unknown modifier: "'+h+'"');(o===1||!v)&&(n?r.key=y:r.which=fu(h)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,l=d}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}return r}function cu(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function fu(t){t=so(t);var e=oo[t]||t.toUpperCase().charCodeAt(0);return e}function so(t){return t=t.toLowerCase(),t=uu[t]||t,t}var Ph=It.default=jr,ao=It.isHotkey=jr;It.isCodeHotkey=Lh,It.isKeyHotkey=Oh,It.parseHotkey=lu,It.compareHotkey=cu,It.toKeyCode=fu,It.toKeyName=so;/*!
|
70
|
+
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>
|
71
|
+
</svg>`,a=`Cluster of ${t} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+t;if(sn.isAdvancedMarkerAvailable(o)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const h={map:o,position:n,zIndex:u,title:a,content:d};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 Jb(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}class Oa{constructor(){Jb(Oa,google.maps.OverlayView)}}var yo;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"})(yo||(yo={}));const Qb=(e,t,n)=>{n.fitBounds(t.bounds)};class eC extends Oa{constructor({map:t,markers:n=[],algorithmOptions:r={},algorithm:o=new Kb(r),renderer:i=new Xb,onClusterClick:s=Qb}){super(),this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=s,t&&this.setMap(t)}addMarker(t,n){this.markers.includes(t)||(this.markers.push(t),n||this.render())}addMarkers(t,n){t.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(t,n){const r=this.markers.indexOf(t);return r===-1?!1:(sn.setMap(t,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(t,n){let r=!1;return t.forEach(o=>{r=this.removeMarker(o,!0)||r}),r&&!n&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,yo.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||r==null){const o=new Set;for(const s of n)s.markers.length==1&&o.add(s.markers[0]);const i=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?o.has(s.marker)||sn.setMap(s.marker,null):i.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>i.forEach(s=>sn.setMap(s,null)))}google.maps.event.trigger(this,yo.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>sn.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new Yb(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,t,n),r.markers.forEach(o=>sn.setMap(o,null)),this.onClusterClick&&r.marker.addListener("click",o=>{google.maps.event.trigger(this,yo.CLUSTER_CLICK,r),this.onClusterClick(o,r,n)})),sn.setMap(r.marker,n)})}}function tC(e){var t=cb(),n=c.useState(null),r=n[0],o=n[1];return c.useEffect(function(){if(t&&r===null){var i=new eC(ke(ke({},e),{map:t}));o(i)}},[t]),r}function nC(e){var t=e.children,n=e.options,r=tC(n);return r!==null?t(r):null}c.memo(nC);var vf={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},mf={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}};function rC(e){var t=e.children,n=e.anchor,r=e.options,o=e.position,i=e.zIndex,s=e.onCloseClick,a=e.onDomReady,u=e.onContentChanged,l=e.onPositionChanged,f=e.onZindexChanged,d=e.onLoad,h=e.onUnmount,v=c.useContext(je),m=c.useState(null),g=m[0],p=m[1],E=c.useState(null),S=E[0],D=E[1],M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){o&&g!==null&&g.setPosition(o)},[o]),c.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&u&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(function(){g&&l&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(g,"position_changed",l)))},[l]),c.useEffect(function(){g&&f&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var I=new google.maps.InfoWindow(ke({},r||{}));return p(I),Y.current=document.createElement("div"),s&&D(google.maps.event.addListener(I,"closeclick",s)),a&&w(google.maps.event.addListener(I,"domready",a)),u&&H(google.maps.event.addListener(I,"content_changed",u)),l&&_(google.maps.event.addListener(I,"position_changed",l)),f&&N(google.maps.event.addListener(I,"zindex_changed",f)),I.setContent(Y.current),o&&I.setPosition(o),i&&I.setZIndex(i),n?I.open(v,n):I.getPosition()?I.open(v):Bt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(I),function(){S&&google.maps.event.removeListener(S),O&&google.maps.event.removeListener(O),b&&google.maps.event.removeListener(b),V&&google.maps.event.removeListener(V),F&&google.maps.event.removeListener(F),h&&h(I),I.close()}},[]),Y.current?xn.createPortal(c.Children.only(t),Y.current):null}c.memo(rC),function(e){dt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,o){o?r.open(n.context,o):r.getPosition()?r.open(n.context):Bt(!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 t.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(ke({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Ve({updaterMap:mf,eventMap:vf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},t.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:mf,eventMap:vf,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},t.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Ze(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},t.prototype.render=function(){return this.containerElement?xn.createPortal(c.Children.only(this.props.children),this.containerElement):null},t.contextType=je,t}(c.PureComponent);var yf={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},bf={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},oC={};function iC(e){var t=e.options,n=e.draggable,r=e.editable,o=e.visible,i=e.path,s=e.onDblClick,a=e.onDragEnd,u=e.onDragStart,l=e.onMouseDown,f=e.onMouseMove,d=e.onMouseOut,h=e.onMouseOver,v=e.onMouseUp,m=e.onRightClick,g=e.onClick,p=e.onDrag,E=e.onLoad,S=e.onUnmount,D=c.useContext(je),M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){typeof t<"u"&&b!==null&&b.setOptions(t)},[b,t]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setVisible(o)},[b,o]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setPath(i)},[b,i]),c.useEffect(function(){b&&s&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(b,"dblclick",s)))},[s]),c.useEffect(function(){b&&a&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(b,"dragend",a)))},[a]),c.useEffect(function(){b&&u&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&l&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(function(){b&&d&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(b,"mouseout",d)))},[d]),c.useEffect(function(){b&&h&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(b,"mouseover",h)))},[h]),c.useEffect(function(){b&&v&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(b,"mouseup",v)))},[v]),c.useEffect(function(){b&&m&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(b,"rightclick",m)))},[m]),c.useEffect(function(){b&&g&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(b,"click",g)))},[g]),c.useEffect(function(){b&&p&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(b,"drag",p)))},[p]),c.useEffect(function(){var le=new google.maps.Polyline(ke(ke({},t||oC),{map:D}));return i&&le.setPath(i),typeof o<"u"&&le.setVisible(o),typeof r<"u"&&le.setEditable(r),typeof n<"u"&&le.setDraggable(n),s&&H(google.maps.event.addListener(le,"dblclick",s)),a&&_(google.maps.event.addListener(le,"dragend",a)),u&&N(google.maps.event.addListener(le,"dragstart",u)),l&&Q(google.maps.event.addListener(le,"mousedown",l)),f&&T(google.maps.event.addListener(le,"mousemove",f)),d&&K(google.maps.event.addListener(le,"mouseout",d)),h&&z(google.maps.event.addListener(le,"mouseover",h)),v&&X(google.maps.event.addListener(le,"mouseup",v)),m&&se(google.maps.event.addListener(le,"rightclick",m)),g&&he(google.maps.event.addListener(le,"click",g)),p&&me(google.maps.event.addListener(le,"drag",p)),w(le),E&&E(le),function(){O!==null&&google.maps.event.removeListener(O),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),S&&S(le),le.setMap(null)}},[]),null}c.memo(iC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Polyline(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:bf,eventMap:yf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},t.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:bf,eventMap:yf,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},t.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Ze(this.registeredEvents),this.state.polyline.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var Cf={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ef={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}};function sC(e){var t=e.options,n=e.draggable,r=e.editable,o=e.visible,i=e.path,s=e.paths,a=e.onDblClick,u=e.onDragEnd,l=e.onDragStart,f=e.onMouseDown,d=e.onMouseMove,h=e.onMouseOut,v=e.onMouseOver,m=e.onMouseUp,g=e.onRightClick,p=e.onClick,E=e.onDrag,S=e.onLoad,D=e.onUnmount,M=e.onEdit,b=c.useContext(je),w=c.useState(null),L=w[0],O=w[1],H=c.useState(null),P=H[0],V=H[1],_=c.useState(null),R=_[0],F=_[1],N=c.useState(null),Y=N[0],I=N[1],Q=c.useState(null),ne=Q[0],k=Q[1],T=c.useState(null),Z=T[0],$=T[1],K=c.useState(null),G=K[0],y=K[1],z=c.useState(null),W=z[0],B=z[1],X=c.useState(null),ee=X[0],j=X[1],se=c.useState(null),ae=se[0],fe=se[1],he=c.useState(null),be=he[0],ve=he[1],me=c.useState(null),le=me[0],Me=me[1];return c.useEffect(function(){L!==null&&L.setMap(b)},[b]),c.useEffect(function(){typeof t<"u"&&L!==null&&L.setOptions(t)},[L,t]),c.useEffect(function(){typeof n<"u"&&L!==null&&L.setDraggable(n)},[L,n]),c.useEffect(function(){typeof r<"u"&&L!==null&&L.setEditable(r)},[L,r]),c.useEffect(function(){typeof o<"u"&&L!==null&&L.setVisible(o)},[L,o]),c.useEffect(function(){typeof i<"u"&&L!==null&&L.setPath(i)},[L,i]),c.useEffect(function(){typeof s<"u"&&L!==null&&L.setPaths(s)},[L,s]),c.useEffect(function(){L&&a&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(L,"dblclick",a)))},[a]),c.useEffect(function(){L&&(google.maps.event.addListener(L.getPath(),"insert_at",function(){M==null||M(L)}),google.maps.event.addListener(L.getPath(),"set_at",function(){M==null||M(L)}))},[L,M]),c.useEffect(function(){L&&u&&(R!==null&&google.maps.event.removeListener(R),F(google.maps.event.addListener(L,"dragend",u)))},[u]),c.useEffect(function(){L&&l&&(Y!==null&&google.maps.event.removeListener(Y),I(google.maps.event.addListener(L,"dragstart",l)))},[l]),c.useEffect(function(){L&&f&&(ne!==null&&google.maps.event.removeListener(ne),k(google.maps.event.addListener(L,"mousedown",f)))},[f]),c.useEffect(function(){L&&d&&(Z!==null&&google.maps.event.removeListener(Z),$(google.maps.event.addListener(L,"mousemove",d)))},[d]),c.useEffect(function(){L&&h&&(G!==null&&google.maps.event.removeListener(G),y(google.maps.event.addListener(L,"mouseout",h)))},[h]),c.useEffect(function(){L&&v&&(W!==null&&google.maps.event.removeListener(W),B(google.maps.event.addListener(L,"mouseover",v)))},[v]),c.useEffect(function(){L&&m&&(ee!==null&&google.maps.event.removeListener(ee),j(google.maps.event.addListener(L,"mouseup",m)))},[m]),c.useEffect(function(){L&&g&&(ae!==null&&google.maps.event.removeListener(ae),fe(google.maps.event.addListener(L,"rightclick",g)))},[g]),c.useEffect(function(){L&&p&&(be!==null&&google.maps.event.removeListener(be),ve(google.maps.event.addListener(L,"click",p)))},[p]),c.useEffect(function(){L&&E&&(le!==null&&google.maps.event.removeListener(le),Me(google.maps.event.addListener(L,"drag",E)))},[E]),c.useEffect(function(){var oe=new google.maps.Polygon(ke(ke({},t||{}),{map:b}));return i&&oe.setPath(i),s&&oe.setPaths(s),typeof o<"u"&&oe.setVisible(o),typeof r<"u"&&oe.setEditable(r),typeof n<"u"&&oe.setDraggable(n),a&&V(google.maps.event.addListener(oe,"dblclick",a)),u&&F(google.maps.event.addListener(oe,"dragend",u)),l&&I(google.maps.event.addListener(oe,"dragstart",l)),f&&k(google.maps.event.addListener(oe,"mousedown",f)),d&&$(google.maps.event.addListener(oe,"mousemove",d)),h&&y(google.maps.event.addListener(oe,"mouseout",h)),v&&B(google.maps.event.addListener(oe,"mouseover",v)),m&&j(google.maps.event.addListener(oe,"mouseup",m)),g&&fe(google.maps.event.addListener(oe,"rightclick",g)),p&&ve(google.maps.event.addListener(oe,"click",p)),E&&Me(google.maps.event.addListener(oe,"drag",E)),O(oe),S&&S(oe),function(){P!==null&&google.maps.event.removeListener(P),R!==null&&google.maps.event.removeListener(R),Y!==null&&google.maps.event.removeListener(Y),ne!==null&&google.maps.event.removeListener(ne),Z!==null&&google.maps.event.removeListener(Z),G!==null&&google.maps.event.removeListener(G),W!==null&&google.maps.event.removeListener(W),ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),be!==null&&google.maps.event.removeListener(be),D&&D(oe),oe.setMap(null)}},[]),null}c.memo(sC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Polygon(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Ef,eventMap:Cf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},t.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Ef,eventMap:Cf,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},t.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Ze(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var wf={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"},Df={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}};function aC(e){var t=e.options,n=e.bounds,r=e.draggable,o=e.editable,i=e.visible,s=e.onDblClick,a=e.onDragEnd,u=e.onDragStart,l=e.onMouseDown,f=e.onMouseMove,d=e.onMouseOut,h=e.onMouseOver,v=e.onMouseUp,m=e.onRightClick,g=e.onClick,p=e.onDrag,E=e.onBoundsChanged,S=e.onLoad,D=e.onUnmount,M=c.useContext(je),b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1],I=c.useState(null),Q=I[0],ne=I[1],k=c.useState(null),T=k[0],Z=k[1],$=c.useState(null),K=$[0],G=$[1],y=c.useState(null),z=y[0],W=y[1],B=c.useState(null),X=B[0],ee=B[1],j=c.useState(null),se=j[0],ae=j[1],fe=c.useState(null),he=fe[0],be=fe[1],ve=c.useState(null),me=ve[0],le=ve[1],Me=c.useState(null),oe=Me[0],Ae=Me[1];return c.useEffect(function(){w!==null&&w.setMap(M)},[M]),c.useEffect(function(){typeof t<"u"&&w!==null&&w.setOptions(t)},[w,t]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setEditable(o)},[w,o]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setVisible(i)},[w,i]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(Q!==null&&google.maps.event.removeListener(Q),ne(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&d&&(K!==null&&google.maps.event.removeListener(K),G(google.maps.event.addListener(w,"mouseout",d)))},[d]),c.useEffect(function(){w&&h&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&v&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(w,"mouseup",v)))},[v]),c.useEffect(function(){w&&m&&(se!==null&&google.maps.event.removeListener(se),ae(google.maps.event.addListener(w,"rightclick",m)))},[m]),c.useEffect(function(){w&&g&&(he!==null&&google.maps.event.removeListener(he),be(google.maps.event.addListener(w,"click",g)))},[g]),c.useEffect(function(){w&&p&&(me!==null&&google.maps.event.removeListener(me),le(google.maps.event.addListener(w,"drag",p)))},[p]),c.useEffect(function(){w&&E&&(oe!==null&&google.maps.event.removeListener(oe),Ae(google.maps.event.addListener(w,"bounds_changed",E)))},[E]),c.useEffect(function(){var ie=new google.maps.Rectangle(ke(ke({},t||{}),{map:M}));return typeof i<"u"&&ie.setVisible(i),typeof o<"u"&&ie.setEditable(o),typeof r<"u"&&ie.setDraggable(r),typeof n<"u"&&ie.setBounds(n),s&&P(google.maps.event.addListener(ie,"dblclick",s)),a&&R(google.maps.event.addListener(ie,"dragend",a)),u&&Y(google.maps.event.addListener(ie,"dragstart",u)),l&&ne(google.maps.event.addListener(ie,"mousedown",l)),f&&Z(google.maps.event.addListener(ie,"mousemove",f)),d&&G(google.maps.event.addListener(ie,"mouseout",d)),h&&W(google.maps.event.addListener(ie,"mouseover",h)),v&&ee(google.maps.event.addListener(ie,"mouseup",v)),m&&ae(google.maps.event.addListener(ie,"rightclick",m)),g&&be(google.maps.event.addListener(ie,"click",g)),p&&le(google.maps.event.addListener(ie,"drag",p)),E&&Ae(google.maps.event.addListener(ie,"bounds_changed",E)),L(ie),S&&S(ie),function(){H!==null&&google.maps.event.removeListener(H),_!==null&&google.maps.event.removeListener(_),N!==null&&google.maps.event.removeListener(N),Q!==null&&google.maps.event.removeListener(Q),T!==null&&google.maps.event.removeListener(T),K!==null&&google.maps.event.removeListener(K),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),me!==null&&google.maps.event.removeListener(me),oe!==null&&google.maps.event.removeListener(oe),D&&D(ie),ie.setMap(null)}},[]),null}c.memo(aC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Df,eventMap:wf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},t.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Df,eventMap:wf,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},t.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Ze(this.registeredEvents),this.state.rectangle.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var xf={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"},Sf={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},uC={};function lC(e){var t=e.options,n=e.center,r=e.radius,o=e.draggable,i=e.editable,s=e.visible,a=e.onDblClick,u=e.onDragEnd,l=e.onDragStart,f=e.onMouseDown,d=e.onMouseMove,h=e.onMouseOut,v=e.onMouseOver,m=e.onMouseUp,g=e.onRightClick,p=e.onClick,E=e.onDrag,S=e.onCenterChanged,D=e.onRadiusChanged,M=e.onLoad,b=e.onUnmount,w=c.useContext(je),L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1],le=c.useState(null),Me=le[0],oe=le[1],Ae=c.useState(null),ie=Ae[0],Se=Ae[1],Be=c.useState(null),Re=Be[0],Xe=Be[1];return c.useEffect(function(){O!==null&&O.setMap(w)},[w]),c.useEffect(function(){typeof t<"u"&&O!==null&&O.setOptions(t)},[O,t]),c.useEffect(function(){typeof o<"u"&&O!==null&&O.setDraggable(o)},[O,o]),c.useEffect(function(){typeof i<"u"&&O!==null&&O.setEditable(i)},[O,i]),c.useEffect(function(){typeof s<"u"&&O!==null&&O.setVisible(s)},[O,s]),c.useEffect(function(){typeof r=="number"&&O!==null&&O.setRadius(r)},[O,r]),c.useEffect(function(){typeof n<"u"&&O!==null&&O.setCenter(n)},[O,n]),c.useEffect(function(){O&&a&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(O,"dblclick",a)))},[a]),c.useEffect(function(){O&&u&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(O,"dragend",u)))},[u]),c.useEffect(function(){O&&l&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(O,"dragstart",l)))},[l]),c.useEffect(function(){O&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(O,"mousedown",f)))},[f]),c.useEffect(function(){O&&d&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(O,"mousemove",d)))},[d]),c.useEffect(function(){O&&h&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(O,"mouseout",h)))},[h]),c.useEffect(function(){O&&v&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(O,"mouseover",v)))},[v]),c.useEffect(function(){O&&m&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(O,"mouseup",m)))},[m]),c.useEffect(function(){O&&g&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(O,"rightclick",g)))},[g]),c.useEffect(function(){O&&p&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(O,"click",p)))},[p]),c.useEffect(function(){O&&E&&(Me!==null&&google.maps.event.removeListener(Me),oe(google.maps.event.addListener(O,"drag",E)))},[E]),c.useEffect(function(){O&&S&&(ie!==null&&google.maps.event.removeListener(ie),Se(google.maps.event.addListener(O,"center_changed",S)))},[p]),c.useEffect(function(){O&&D&&(Re!==null&&google.maps.event.removeListener(Re),Xe(google.maps.event.addListener(O,"radius_changed",D)))},[D]),c.useEffect(function(){var Ce=new google.maps.Circle(ke(ke({},t||uC),{map:w}));return typeof r=="number"&&Ce.setRadius(r),typeof n<"u"&&Ce.setCenter(n),typeof r=="number"&&Ce.setRadius(r),typeof s<"u"&&Ce.setVisible(s),typeof i<"u"&&Ce.setEditable(i),typeof o<"u"&&Ce.setDraggable(o),a&&_(google.maps.event.addListener(Ce,"dblclick",a)),u&&N(google.maps.event.addListener(Ce,"dragend",u)),l&&Q(google.maps.event.addListener(Ce,"dragstart",l)),f&&T(google.maps.event.addListener(Ce,"mousedown",f)),d&&K(google.maps.event.addListener(Ce,"mousemove",d)),h&&z(google.maps.event.addListener(Ce,"mouseout",h)),v&&X(google.maps.event.addListener(Ce,"mouseover",v)),m&&se(google.maps.event.addListener(Ce,"mouseup",m)),g&&he(google.maps.event.addListener(Ce,"rightclick",g)),p&&me(google.maps.event.addListener(Ce,"click",p)),E&&oe(google.maps.event.addListener(Ce,"drag",E)),S&&Se(google.maps.event.addListener(Ce,"center_changed",S)),D&&Xe(google.maps.event.addListener(Ce,"radius_changed",D)),H(Ce),M&&M(Ce),function(){V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),ve!==null&&google.maps.event.removeListener(ve),ie!==null&&google.maps.event.removeListener(ie),Re!==null&&google.maps.event.removeListener(Re),b&&b(Ce),Ce.setMap(null)}},[]),null}c.memo(lC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Circle(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Sf,eventMap:xf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},t.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Sf,eventMap:xf,prevProps:n,nextProps:this.props,instance:this.state.circle}))},t.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Ze(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var Lf={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Of={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,r){e.loadGeoJson(t,n,r)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}};function cC(e){var t=e.options,n=e.onClick,r=e.onDblClick,o=e.onMouseDown,i=e.onMouseMove,s=e.onMouseOut,a=e.onMouseOver,u=e.onMouseUp,l=e.onRightClick,f=e.onAddFeature,d=e.onRemoveFeature,h=e.onRemoveProperty,v=e.onSetGeometry,m=e.onSetProperty,g=e.onLoad,p=e.onUnmount,E=c.useContext(je),S=c.useState(null),D=S[0],M=S[1],b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1],I=c.useState(null),Q=I[0],ne=I[1],k=c.useState(null),T=k[0],Z=k[1],$=c.useState(null),K=$[0],G=$[1],y=c.useState(null),z=y[0],W=y[1],B=c.useState(null),X=B[0],ee=B[1],j=c.useState(null),se=j[0],ae=j[1],fe=c.useState(null),he=fe[0],be=fe[1],ve=c.useState(null),me=ve[0],le=ve[1],Me=c.useState(null),oe=Me[0],Ae=Me[1];return c.useEffect(function(){D!==null&&D.setMap(E)},[E]),c.useEffect(function(){D&&r&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(D,"dblclick",r)))},[r]),c.useEffect(function(){D&&o&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(D,"mousedown",o)))},[o]),c.useEffect(function(){D&&i&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(D,"mousemove",i)))},[i]),c.useEffect(function(){D&&s&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(D,"mouseout",s)))},[s]),c.useEffect(function(){D&&a&&(Q!==null&&google.maps.event.removeListener(Q),ne(google.maps.event.addListener(D,"mouseover",a)))},[a]),c.useEffect(function(){D&&u&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(D,"mouseup",u)))},[u]),c.useEffect(function(){D&&l&&(K!==null&&google.maps.event.removeListener(K),G(google.maps.event.addListener(D,"rightclick",l)))},[l]),c.useEffect(function(){D&&n&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(D,"click",n)))},[n]),c.useEffect(function(){D&&f&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(D,"addfeature",f)))},[f]),c.useEffect(function(){D&&d&&(se!==null&&google.maps.event.removeListener(se),ae(google.maps.event.addListener(D,"removefeature",d)))},[d]),c.useEffect(function(){D&&h&&(he!==null&&google.maps.event.removeListener(he),be(google.maps.event.addListener(D,"removeproperty",h)))},[h]),c.useEffect(function(){D&&v&&(me!==null&&google.maps.event.removeListener(me),le(google.maps.event.addListener(D,"setgeometry",v)))},[v]),c.useEffect(function(){D&&m&&(oe!==null&&google.maps.event.removeListener(oe),Ae(google.maps.event.addListener(D,"setproperty",m)))},[m]),c.useEffect(function(){if(E!==null){var ie=new google.maps.Data(ke(ke({},t||{}),{map:E}));r&&L(google.maps.event.addListener(ie,"dblclick",r)),o&&P(google.maps.event.addListener(ie,"mousedown",o)),i&&R(google.maps.event.addListener(ie,"mousemove",i)),s&&Y(google.maps.event.addListener(ie,"mouseout",s)),a&&ne(google.maps.event.addListener(ie,"mouseover",a)),u&&Z(google.maps.event.addListener(ie,"mouseup",u)),l&&G(google.maps.event.addListener(ie,"rightclick",l)),n&&W(google.maps.event.addListener(ie,"click",n)),f&&ee(google.maps.event.addListener(ie,"addfeature",f)),d&&ae(google.maps.event.addListener(ie,"removefeature",d)),h&&be(google.maps.event.addListener(ie,"removeproperty",h)),v&&le(google.maps.event.addListener(ie,"setgeometry",v)),m&&Ae(google.maps.event.addListener(ie,"setproperty",m)),M(ie),g&&g(ie)}return function(){D&&(w!==null&&google.maps.event.removeListener(w),H!==null&&google.maps.event.removeListener(H),_!==null&&google.maps.event.removeListener(_),N!==null&&google.maps.event.removeListener(N),Q!==null&&google.maps.event.removeListener(Q),T!==null&&google.maps.event.removeListener(T),K!==null&&google.maps.event.removeListener(K),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),me!==null&&google.maps.event.removeListener(me),oe!==null&&google.maps.event.removeListener(oe),p&&p(D),D.setMap(null))}},[]),null}c.memo(cC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(ke(ke({},this.props.options||{}),{map:this.context}));this.registeredEvents=Ve({updaterMap:Of,eventMap:Lf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},t.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Of,eventMap:Lf,prevProps:n,nextProps:this.props,instance:this.state.data}))},t.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Ze(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var kf={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Pf={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}};(function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(ke(ke({},this.props.options),{map:this.context}));this.registeredEvents=Ve({updaterMap:Pf,eventMap:kf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},t.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Pf,eventMap:kf,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},t.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Ze(this.registeredEvents),this.state.kmlLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t})(c.PureComponent);function Mf(e,t){return typeof t=="function"?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function fC(e,t){return new t(e.lat,e.lng)}function dC(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function pC(e,t,n){return e instanceof t?e:n(e,t)}function hC(e,t,n){return e instanceof t?e:n(e,t)}function gC(e,t,n){var r=e&&e.fromLatLngToDivPixel(n.getNorthEast()),o=e&&e.fromLatLngToDivPixel(n.getSouthWest());return r&&o?{left:"".concat(o.x+t.x,"px"),top:"".concat(r.y+t.y,"px"),width:"".concat(r.x-o.x-t.x,"px"),height:"".concat(o.y-r.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}function vC(e,t,n){var r=e&&e.fromLatLngToDivPixel(n);if(r){var o=r.x,i=r.y;return{left:"".concat(o+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Bf(e,t,n,r){return n!==void 0?gC(e,t,hC(n,google.maps.LatLngBounds,dC)):vC(e,t,pC(r,google.maps.LatLng,fC))}function mC(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.height&&e.height===t.height}function yC(e,t,n,r,o){var i=function(s){dt(a,s);function a(u,l,f,d){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,h.bounds=d,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=ke({},this.container?Mf(this.container,o):{x:0,y:0}),f=Bf(u,l,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],m=v[0],g=v[1];this.container.style[m]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new i(e,t,n,r)}function Tf(e){if(!e)return"";var t=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng);return t+""}function Af(e){if(!e)return"";var t=e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west));return t+""}function bC(e){var t=e.position,n=e.bounds,r=e.mapPaneName,o=e.zIndex,i=e.onLoad,s=e.onUnmount,a=e.getPixelPositionOffset,u=e.children,l=c.useContext(je),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return yC(f,r,t,n,a)},[f,r,t,n]);return c.useEffect(function(){return i==null||i(d),d==null||d.setMap(l),function(){s==null||s(d),d==null||d.setMap(null)}},[l,d]),c.useEffect(function(){f.style.zIndex="".concat(o)},[o,f]),pi.createPortal(u,f)}c.memo(bC),function(e){dt(t,e);function t(n){var r=e.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var i=r.props.mapPaneName,s=r.overlayView.getPanes();Bt(!!i,"OverlayView requires props.mapPaneName but got %s",i),s?r.setState({paneEl:s[i]}):r.setState({paneEl:null})},r.onAdd=function(){var i,s;r.updatePane(),(s=(i=r.props).onLoad)===null||s===void 0||s.call(i,r.overlayView)},r.onPositionElement=function(){var i=r.overlayView.getProjection(),s=ke({x:0,y:0},r.containerRef.current?Mf(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Bf(i,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,d=u.width,h=u.height;mC(a,{left:l,top:f,width:d,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 i,s;r.setState(function(){return{paneEl:null}}),(s=(i=r.props).onUnmount)===null||s===void 0||s.call(i,r.overlayView)},r.containerRef=c.createRef();var o=new google.maps.OverlayView;return o.onAdd=r.onAdd,o.draw=r.draw,o.onRemove=r.onRemove,r.overlayView=o,r}return t.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},t.prototype.componentDidUpdate=function(n){var r=Tf(n.position),o=Tf(this.props.position),i=Af(n.bounds),s=Af(this.props.bounds);(r!==o||i!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},t.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},t.prototype.render=function(){var n=this.state.paneEl;return n?pi.createPortal(A.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},t.FLOAT_PANE="floatPane",t.MAP_PANE="mapPane",t.MARKER_LAYER="markerLayer",t.OVERLAY_LAYER="overlayLayer",t.OVERLAY_MOUSE_TARGET="overlayMouseTarget",t.contextType=je,t}(c.PureComponent);function CC(){}var Ff={onDblClick:"dblclick",onClick:"click"},If={opacity:function(e,t){e.setOpacity(t)}};function EC(e){var t=e.url,n=e.bounds,r=e.options,o=e.visible,i=c.useContext(je),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(t,s,ke({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(i)},[i]),c.useEffect(function(){typeof t<"u"&&a!==null&&(a.set("url",t),a.setMap(i))},[a,t]),c.useEffect(function(){typeof o<"u"&&a!==null&&a.setOpacity(o?1:0)},[a,o]),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(i))},[a,n]),null}c.memo(EC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Bt(!!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,ke(ke({},this.props.options),{map:this.context}));this.registeredEvents=Ve({updaterMap:If,eventMap:Ff,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},t.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:If,eventMap:Ff,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},t.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},t.prototype.render=function(){return null},t.defaultProps={onLoad:CC},t.contextType=je,t}(c.PureComponent);var _f={},Rf={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}};function wC(e){var t=e.data,n=e.onLoad,r=e.onUnmount,o=e.options,i=c.useContext(je),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||Bt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Bt(!!t,"data property is required in HeatmapLayer %s",t)},[t]),c.useEffect(function(){a!==null&&a.setMap(i)},[i]),c.useEffect(function(){o&&a!==null&&a.setOptions(o)},[a,o]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(ke(ke({},o||{}),{data:t,map:i}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(wC),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Bt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Bt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(ke(ke({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Ve({updaterMap:Rf,eventMap:_f,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},t.prototype.componentDidUpdate=function(n){Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Rf,eventMap:_f,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},t.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Ze(this.registeredEvents),this.state.heatmapLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent);var jf={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Nf={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}};(function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n,r,o=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Ve({updaterMap:Nf,eventMap:jf,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{streetViewPanorama:o}},this.setStreetViewPanoramaCallback)},t.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Nf,eventMap:jf,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},t.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Ze(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},t.prototype.render=function(){return null},t.contextType=je,t})(c.PureComponent),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},t.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},t.prototype.render=function(){return null},t.contextType=je,t}(c.PureComponent),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Bt(!!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)},t.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},t.prototype.render=function(){return null},t}(c.PureComponent);var zf={onDirectionsChanged:"directions_changed"},$f={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}};(function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Ve({updaterMap:$f,eventMap:zf,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},t.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:$f,eventMap:zf,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},t.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Ze(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},t.prototype.render=function(){return A.jsx(A.Fragment,{})},t.contextType=je,t})(c.PureComponent),function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Bt(!!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)},t.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},t.prototype.render=function(){return null},t}(c.PureComponent);var Uf={onPlacesChanged:"places_changed"},Wf={bounds:function(e,t){e.setBounds(t)}},DC=function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(Bt(!!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=Ve({updaterMap:Wf,eventMap:Uf,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},t.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Wf,eventMap:Uf,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},t.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Ze(this.registeredEvents))},t.prototype.render=function(){return A.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},t.contextType=je,t}(c.PureComponent),Hf={onPlaceChanged:"place_changed"},Vf={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}};(function(e){dt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n;Bt(!!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 o=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Ve({updaterMap:Vf,eventMap:Hf,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{autocomplete:o}},this.setAutocompleteCallback)}},t.prototype.componentDidUpdate=function(n){Ze(this.registeredEvents),this.registeredEvents=Ve({updaterMap:Vf,eventMap:Hf,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},t.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Ze(this.registeredEvents)},t.prototype.render=function(){return A.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},t.defaultProps={className:""},t.contextType=je,t})(c.PureComponent);function xC({coordinates:e,zoom:t=18,draggable:n=!1,className:r,...o}){return e?A.jsx("div",{className:"arkynGoogleMapPinned "+r,...o,children:A.jsx(mb,{zoom:t,center:e,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:A.jsx(Ob,{draggable:n,position:e})})}):A.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...o,children:A.jsx(Ue.MapPinned,{})})}function SC(e){const{className:t,...n}=e,r=`arkynSkeleton ${t}`;return A.jsx("aside",{className:r.trim(),...n})}function LC(e){const{emptyMessage:t="Nenhum dado adicionado.",className:n,children:r,...o}=e,i=`arkynTableBody ${n}`,s=c.Children.count(r)===0;return A.jsx("tbody",{className:i.trim(),...o,children:s?A.jsx("tr",{className:"arkynTableBodyEmptyLine",children:A.jsx("td",{colSpan:100,children:A.jsx("div",{children:t})})}):r})}function OC(e){const{className:t,children:n,...r}=e,o=`arkynTableCaption ${t}`;return A.jsx("caption",{className:o.trim(),...r,children:A.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function kC(e){const{children:t,className:n,...r}=e,o=`arkynTableContainer ${n}`;return A.jsx("div",{className:o.trim(),...r,children:A.jsx("table",{children:t})})}function PC(e){const{className:t,children:n,...r}=e,o=`arkynTableFooter ${t}`;return A.jsxs("tfoot",{className:o.trim(),...r,children:[A.jsx("tr",{className:"spacingRow"}),A.jsx("tr",{children:A.jsx("th",{colSpan:100,children:A.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function MC(e){const{className:t,children:n,...r}=e,o=`arkynTableHeader ${t}`;return A.jsxs("thead",{className:o.trim(),...r,children:[A.jsx("tr",{children:n}),A.jsx("tr",{className:"spacingRow"})]})}function BC(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:o,size:i="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:f,...d}=e,v={xs:12,sm:16,md:20,lg:24}[i],p=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${i} ${o?"loadingTextTrue":"loadingTextFalse"} ${l}`;return A.jsxs("button",{className:p,disabled:u||t,...d,children:[A.jsxs("div",{className:"arkynButtonSpinner",children:[A.jsx(Ue.Loader2,{size:v,strokeWidth:2.5}),o&&o]}),A.jsxs("div",{className:"arkynButtonContent",children:[gi(v,s),f,gi(v,a)]})]})}function qf(){const e=on.useActionData(),t=on.useNavigation(),n=on.useFetchers(),[r,o]=c.useState(null);function i(l,f){return JSON.stringify(l)===JSON.stringify(f)}function s(){r&&o(null)}c.useEffect(()=>{var f,d;let l=((d=(f=n[0])==null?void 0:f.data)==null?void 0:d.fieldErrors)||{};i(r,l)||Object.entries(l).length!==0&&o(l)},[n,e]),c.useEffect(()=>{var l;((l=n[0])==null?void 0:l.state)==="submitting"&&s()},[n,t]);const a=(e==null?void 0:e.fieldErrors)||r;let u={};return Object.entries(a||{}).forEach(([l,f])=>{typeof f=="string"&&typeof l=="string"&&(u[l]=f)}),u}const Zf=c.createContext({});function TC(e){var d;const{children:t,className:n,id:r,...o}=e,i=qf(),s=c.useRef(null),a=((d=s.current)==null?void 0:d.name)||"",u=(i==null?void 0:i[a])||null,l=c.useId(),f=`arkynFormController ${n}`;return A.jsx(Zf.Provider,{value:{error:u,id:l,inputRef:s},children:A.jsx("section",{id:r||a||void 0,className:f.trim(),...o,children:t})})}function an(){return c.useContext(Zf)}function AC(e){const{name:t,className:n="",size:r="md",isError:o,defaultChecked:i=!1,checked:s=null,onCheck:a,value:u,...l}=e,{id:f,inputRef:d,error:h}=an(),v=o||!!h,[m,g]=c.useState(i||!1),p=typeof s=="boolean"?s:m,D=`arkynCheckbox ${r} ${v?"errorTrue":"errorFalse"} ${p?"checkedTrue":"checkedFalse"} ${n}`;function M(){const b=m;g(!b),a&&a(b?"":u||"checked")}return A.jsxs("button",{id:f,type:"button",className:D,onClick:M,...l,children:[A.jsx("input",{type:"hidden",name:t,ref:d,value:p?u||"checked":""}),A.jsx(Ue.Check,{})]})}function FC(e){const{children:t,className:n,...r}=e,o=`arkynFormError ${n}`,{error:i}=an();return t?A.jsx("strong",{className:o.trim(),...r,children:t}):i?A.jsx("strong",{className:o.trim(),...r,children:i}):A.jsx(A.Fragment,{})}function IC(e){const{showAsterisk:t=!1,className:n="",...r}=e,{id:o}=an(),s=`arkynFormLabel ${t?"asteriskTrue":"asteriskFalse"} ${n}`;return A.jsx("label",{className:s.trim(),htmlFor:o,...r})}function ar(e,t,n){if(!e)return A.jsx(A.Fragment,{});if(typeof e=="string")return A.jsx("p",{className:n,children:e});const r=e;return A.jsx("p",{className:n,children:A.jsx(r,{color:"var(--secondary-600)",size:t,strokeWidth:2.5})})}function ka(e){return e&&e.replace(/[^0-9]/g,"")}function Gf(e,t){let n="",r=0;return Array.from(e).forEach((o,i)=>{t[i+r].match(/[0-9]/)||(n+=t[i+r],r++),n+=o}),n}function Kf(e){return e.length>11?"CNPJ":"CPF"}const Pa={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Yf=ka(Pa.CNPJ).length;function _C(e,t){const{isLoading:n,isError:r,size:o="md",className:i="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:d,defaultValue:h,readOnly:v,onFocus:m,onBlur:g,title:p,style:E,onChange:S,...D}=e;function M(F){let N=ka(F);const Y=Kf(N);if(!(N.length>Yf))return N=Gf(N,Pa[Y]),N}const b=f?"right":"left",V=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${o} ${d||v||n?"opacity":""} ${r?"errored":""} ${t?"focused":""} ${i}`,R={md:20,lg:20}[o];return{isLoading:n,className:V,prefix:ar(a,R,"prefix"),sufix:ar(u,R,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:M(h||""),disabled:d,readOnly:v,onFocus:m,onBlur:g,title:p,style:E,onChange:S,loadingPosition:b,iconSize:R,Spinner:A.jsx(Ue.Loader2,{className:"spinner",size:R,strokeWidth:2.5}),...D}}function RC(e){const[t,n]=c.useState(!1),r=c.useRef(null),{inputRef:o,id:i,error:s}=an(),a=o||r,u=e.isError||!!s,{disabled:l,title:f,style:d,className:h,prefix:v,sufix:m,iconSize:g,loadingPosition:p,isLoading:E,LeftIcon:S,readOnly:D,onFocus:M,onBlur:b,RightIcon:w,Spinner:L,onChange:O,value:H,defaultValue:P,...V}=_C({...e,id:i,isError:u},t),[_,R]=c.useState(P),F=S&&!E,N=w&&!E,Y=p==="left"&&E,I=p==="right"&&E;function Q(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function ne(Z){let $=ka(Z.target.value);const K=Kf($);$.length>Yf||($=Gf($,Pa[K]),Z.target.value=$,R($),O&&O(Z))}function k(Z){n(!0),M&&M(Z)}function T(Z){n(!1),b&&b(Z)}return A.jsxs("section",{title:f,style:d,onClick:Q,className:h,children:[v,Y&&L,F&&A.jsx(S,{size:g,strokeWidth:2.5}),A.jsx("input",{disabled:l||E,readOnly:D,ref:a,value:H||_,onFocus:k,onChange:ne,onBlur:T,...V}),N&&A.jsx(w,{size:g,strokeWidth:2.5}),I&&L,m]})}const jC=3,NC=(e="pt-BR",t,n="BRL",r=!0)=>new Intl.NumberFormat(e,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(t).slice(r?jC:0),bi=2,Xf=e=>typeof e=="number"?e:Number(e.toString().replace(/[^0-9-]/g,"")),Ma=e=>{let t=e;return typeof e=="string"?(t=Xf(e),t%1!==0&&(t=t.toFixed(bi))):t=Number.isInteger(e)?Number(e)*10**bi:e.toFixed(bi),Xf(t)/10**bi},Jf=(e,t,n)=>{if(!t)return[0,""];const r=Ma(t),o=NC(e,r,n);return[r,o]};function zC(e,t){const{isLoading:n,isError:r,size:o="md",className:i="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:d,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,max:E=1e9,locale:S="pt-BR",currency:D="BRL",...M}=e,b=f?"right":"left",V=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${o} ${d||h||n?"opacity":""} ${r?"errored":""} ${t?"focused":""} ${i}`,R={md:20,lg:20}[o];return{isLoading:n,className:V,prefix:ar(a,R,"prefix"),sufix:ar(u,R,"sufix"),LeftIcon:l,RightIcon:f,disabled:d,locale:S,currency:D,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,max:E,loadingPosition:b,iconSize:R,Spinner:A.jsx(Ue.Loader2,{className:"spinner",size:R,strokeWidth:2.5}),...M}}function $C(e){const[t,n]=c.useState(!1),[r,o]=c.useState("0"),i=c.useRef(null),{inputRef:s,id:a,error:u}=an(),l=s||i,f=e.isError||!!u,{disabled:d,title:h,style:v,className:m,prefix:g,sufix:p,iconSize:E,loadingPosition:S,isLoading:D,LeftIcon:M,readOnly:b,onFocus:w,onBlur:L,RightIcon:O,Spinner:H,value:P,max:V,onChangeValue:_,onKeyPress:R,currency:F,locale:N,name:Y,defaultValue:I,...Q}=zC({...e,id:a,isError:f},t),ne=M&&!D,k=O&&!D,T=S==="left"&&D,Z=S==="right"&&D;function $(){d||!(l!=null&&l.current)||(n(!0),l.current.focus())}function K(B){n(!0),w&&w(B)}function G(B){n(!1),L&&L(B)}const y=B=>{const[X,ee]=Jf(N,B,F);return!V||X<=V?(o(ee),[X,ee]):[Ma(r),r]},z=B=>{B.preventDefault();const[X,ee]=y(B.target.value);_(B,String(X),String(ee))},W=B=>R&&R(B,B.key,B.key);return c.useEffect(()=>{const B=P||+I||void 0,[,X]=Jf(N,B,F);o(X)},[F,I,P]),A.jsxs("section",{title:h,style:v,onClick:$,className:m,children:[g,T&&H,ne&&A.jsx(M,{size:E,strokeWidth:2.5}),A.jsx("input",{value:r,onChange:z,onBlur:G,onFocus:K,onKeyUp:W,disabled:d||D,readOnly:b,...Q}),A.jsx("input",{type:"hidden",ref:l,name:Y,value:Ma(r)}),Z&&H,k&&A.jsx(O,{size:E,strokeWidth:2.5}),p]})}function UC(e,t){const{isLoading:n,isError:r,size:o="md",className:i="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:d,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,onChange:E,showMask:S=!1,type:D,...M}=e,b=f?"right":"left",V=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${o} ${d||h||n?"opacity":""} ${r?"errored":""} ${t?"focused":""} ${i}`,R={md:20,lg:20}[o];return{isLoading:n,className:V,prefix:ar(a,R,"prefix"),sufix:ar(u,R,"sufix"),LeftIcon:l,RightIcon:f,disabled:d,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,onChange:E,loadingPosition:b,iconSize:R,showMask:S,Spinner:A.jsx(Ue.Loader2,{className:"spinner",size:R,strokeWidth:2.5}),...M}}const WC=c.forwardRef((e,t)=>A.jsx("input",{ref:t,...e}));function HC(e){const[t,n]=c.useState(!1),r=c.useRef(null),{inputRef:o,id:i,error:s}=an(),a=o||r,u=e.isError||!!s,{disabled:l,title:f,style:d,className:h,prefix:v,sufix:m,iconSize:g,loadingPosition:p,isLoading:E,LeftIcon:S,readOnly:D,onFocus:M,onBlur:b,RightIcon:w,Spinner:L,...O}=UC({...e,id:i,isError:u},t),H=S&&!E,P=w&&!E,V=p==="left"&&E,_=p==="right"&&E;function R(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function F(Y){n(!0),M&&M(Y)}function N(Y){n(!1),b&&b(Y)}return A.jsxs("section",{title:f,style:d,onClick:R,className:h,children:[v,V&&L,H&&A.jsx(S,{size:g,strokeWidth:2.5}),A.jsx(V0.InputMask,{component:WC,ref:a,onFocus:F,onBlur:N,disabled:l,...O}),P&&A.jsx(w,{size:g,strokeWidth:2.5}),_&&L,m]})}function VC(e,t){const{isLoading:n,isError:r,size:o="md",className:i="",variant:s="solid",prefix:a,sufix:u,leftIcon:l,rightIcon:f,disabled:d,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,onChange:E,...S}=e,D=f?"right":"left",H=`arkyn_input ${a?"hasPrefix":""} ${u?"hasSufix":""} ${s} ${o} ${d||h||n?"opacity":""} ${r?"errored":""} ${t?"focused":""} ${i}`,V={md:20,lg:20}[o];return{isLoading:n,className:H,prefix:ar(a,V,"prefix"),sufix:ar(u,V,"sufix"),LeftIcon:l,RightIcon:f,disabled:d,readOnly:h,onFocus:v,onBlur:m,title:g,style:p,onChange:E,loadingPosition:D,iconSize:V,Spinner:A.jsx(Ue.Loader2,{className:"spinner",size:V,strokeWidth:2.5}),...S}}function qC(e){const[t,n]=c.useState(!1),r=c.useRef(null),{inputRef:o,id:i,error:s}=an(),a=o||r,u=e.isError||!!s,{disabled:l,title:f,style:d,className:h,prefix:v,sufix:m,iconSize:g,loadingPosition:p,isLoading:E,LeftIcon:S,readOnly:D,onFocus:M,onBlur:b,RightIcon:w,type:L,Spinner:O,...H}=VC({...e,id:i,isError:u},t),P=S&&!E,V=w&&!E,_=p==="left"&&E,R=p==="right"&&E;function F(){l||!(a!=null&&a.current)||(n(!0),a.current.focus())}function N(I){n(!0),M&&M(I)}function Y(I){n(!1),b&&b(I)}return L==="hidden"?A.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:a,...H}):A.jsxs("section",{title:f,style:d,onClick:F,className:h,children:[v,_&&O,P&&A.jsx(S,{size:g,strokeWidth:2.5}),A.jsx("input",{disabled:l||E,readOnly:D,ref:a,onFocus:N,onBlur:Y,type:L,...H}),V&&A.jsx(w,{size:g,strokeWidth:2.5}),R&&O,m]})}function Qf(e){return e.type==="currency"?A.jsx($C,{...e}):e.type==="masked"?A.jsx(HC,{...e}):e.type==="cpf-cnpj"?A.jsx(RC,{...e}):A.jsx(qC,{...e})}function ZC({onChange:e,onPlaceChanged:t,options:n,...r}){const[o,i]=c.useState(null),s=u=>i(u),a=()=>{var v,m,g,p;const l=o.getPlaces()[0],f=l==null?void 0:l.address_components;function d(E){const S=f.find(D=>D.types[0]===E);return S?S.long_name:""}function h(E){const S=f.find(D=>D.types[0]===E);return S?S.short_name:""}if(l){const E=d("route"),S=d("street_number"),D=d("sublocality_level_1"),M=d("administrative_area_level_2"),b=d("administrative_area_level_1"),w=h("administrative_area_level_1"),L=d("postal_code"),O=(m=(v=l.geometry)==null?void 0:v.location)==null?void 0:m.lat(),H=(p=(g=l.geometry)==null?void 0:g.location)==null?void 0:p.lng();t&&t({street:E,city:M,state:b,district:D,cep:L,streetNumber:S,stateShortName:w,coordinates:{lat:O,lng:H}})}};return A.jsx(DC,{onLoad:s,onPlacesChanged:a,options:n,children:A.jsx(Qf,{type:"text",onChange:u=>e(u.target.value),...r})})}function GC(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:o="md",icon:i,disabled:s,className:a="",...u}=e,l={xs:12,sm:16,md:20,lg:24},d=`arkynIconButton ${r} ${n} ${o} ${t?"loadingTrue":"loadingFalse"} ${a}`;return A.jsxs("button",{disabled:s||t,className:d.trim(),...u,children:[A.jsx("div",{className:"arkynIconButtonSpinner",children:A.jsx(Ue.Loader2,{size:l[o],strokeWidth:2.5})}),A.jsx("div",{className:"arkynIconButtonContent",children:A.jsx(i,{size:l[o],strokeWidth:2.5})})]})}var ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function KC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ba={exports:{}},bo={};/**
|
72
|
+
* @license React
|
73
|
+
* react-jsx-runtime.production.min.js
|
74
|
+
*
|
75
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
76
|
+
*
|
77
|
+
* This source code is licensed under the MIT license found in the
|
78
|
+
* LICENSE file in the root directory of this source tree.
|
79
|
+
*/var ed;function YC(){if(ed)return bo;ed=1;var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,u,l){var f,d={},h=null,v=null;l!==void 0&&(h=""+l),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(d[f]=u[f]);if(a&&a.defaultProps)for(f in u=a.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:a,key:h,ref:v,props:d,_owner:o.current}}return bo.Fragment=n,bo.jsx=s,bo.jsxs=s,bo}var Ci={};/**
|
80
|
+
* @license React
|
81
|
+
* react-jsx-runtime.development.js
|
82
|
+
*
|
83
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
84
|
+
*
|
85
|
+
* This source code is licensed under the MIT license found in the
|
86
|
+
* LICENSE file in the root directory of this source tree.
|
87
|
+
*/var td;function XC(){return td||(td=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=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"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function p(C){if(C===null||typeof C!="object")return null;var q=m&&C[m]||C[g];return typeof q=="function"?q:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(C){{for(var q=arguments.length,J=new Array(q>1?q-1:0),ce=1;ce<q;ce++)J[ce-1]=arguments[ce];D("error",C,J)}}function D(C,q,J){{var ce=E.ReactDebugCurrentFrame,we=ce.getStackAddendum();we!==""&&(q+="%s",J=J.concat([we]));var Le=J.map(function(Ee){return String(Ee)});Le.unshift("Warning: "+q),Function.prototype.apply.call(console[C],console,Le)}}var M=!1,b=!1,w=!1,L=!1,O=!1,H;H=Symbol.for("react.module.reference");function P(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===i||O||C===o||C===l||C===f||L||C===v||M||b||w||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===d||C.$$typeof===s||C.$$typeof===a||C.$$typeof===u||C.$$typeof===H||C.getModuleId!==void 0))}function V(C,q,J){var ce=C.displayName;if(ce)return ce;var we=q.displayName||q.name||"";return we!==""?J+"("+we+")":J}function _(C){return C.displayName||"Context"}function R(C){if(C==null)return null;if(typeof C.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case a:var q=C;return _(q)+".Consumer";case s:var J=C;return _(J._context)+".Provider";case u:return V(C,C.render,"ForwardRef");case d:var ce=C.displayName||null;return ce!==null?ce:R(C.type)||"Memo";case h:{var we=C,Le=we._payload,Ee=we._init;try{return R(Ee(Le))}catch{return null}}}return null}var F=Object.assign,N=0,Y,I,Q,ne,k,T,Z;function $(){}$.__reactDisabledLog=!0;function K(){{if(N===0){Y=console.log,I=console.info,Q=console.warn,ne=console.error,k=console.group,T=console.groupCollapsed,Z=console.groupEnd;var C={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}N++}}function G(){{if(N--,N===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},C,{value:Y}),info:F({},C,{value:I}),warn:F({},C,{value:Q}),error:F({},C,{value:ne}),group:F({},C,{value:k}),groupCollapsed:F({},C,{value:T}),groupEnd:F({},C,{value:Z})})}N<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=E.ReactCurrentDispatcher,z;function W(C,q,J){{if(z===void 0)try{throw Error()}catch(we){var ce=we.stack.trim().match(/\n( *(at )?)/);z=ce&&ce[1]||""}return`
|
88
|
+
`+z+C}}var B=!1,X;{var ee=typeof WeakMap=="function"?WeakMap:Map;X=new ee}function j(C,q){if(!C||B)return"";{var J=X.get(C);if(J!==void 0)return J}var ce;B=!0;var we=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Le;Le=y.current,y.current=null,K();try{if(q){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch($e){ce=$e}Reflect.construct(C,[],Ee)}else{try{Ee.call()}catch($e){ce=$e}C.call(Ee.prototype)}}else{try{throw Error()}catch($e){ce=$e}C()}}catch($e){if($e&&ce&&typeof $e.stack=="string"){for(var ye=$e.stack.split(`
|
89
|
+
`),ze=ce.stack.split(`
|
90
|
+
`),Te=ye.length-1,Fe=ze.length-1;Te>=1&&Fe>=0&&ye[Te]!==ze[Fe];)Fe--;for(;Te>=1&&Fe>=0;Te--,Fe--)if(ye[Te]!==ze[Fe]){if(Te!==1||Fe!==1)do if(Te--,Fe--,Fe<0||ye[Te]!==ze[Fe]){var Qe=`
|
91
|
+
`+ye[Te].replace(" at new "," at ");return C.displayName&&Qe.includes("<anonymous>")&&(Qe=Qe.replace("<anonymous>",C.displayName)),typeof C=="function"&&X.set(C,Qe),Qe}while(Te>=1&&Fe>=0);break}}}finally{B=!1,y.current=Le,G(),Error.prepareStackTrace=we}var Rt=C?C.displayName||C.name:"",jt=Rt?W(Rt):"";return typeof C=="function"&&X.set(C,jt),jt}function se(C,q,J){return j(C,!1)}function ae(C){var q=C.prototype;return!!(q&&q.isReactComponent)}function fe(C,q,J){if(C==null)return"";if(typeof C=="function")return j(C,ae(C));if(typeof C=="string")return W(C);switch(C){case l:return W("Suspense");case f:return W("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case u:return se(C.render);case d:return fe(C.type,q,J);case h:{var ce=C,we=ce._payload,Le=ce._init;try{return fe(Le(we),q,J)}catch{}}}return""}var he=Object.prototype.hasOwnProperty,be={},ve=E.ReactDebugCurrentFrame;function me(C){if(C){var q=C._owner,J=fe(C.type,C._source,q?q.type:null);ve.setExtraStackFrame(J)}else ve.setExtraStackFrame(null)}function le(C,q,J,ce,we){{var Le=Function.call.bind(he);for(var Ee in C)if(Le(C,Ee)){var ye=void 0;try{if(typeof C[Ee]!="function"){var ze=Error((ce||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ze.name="Invariant Violation",ze}ye=C[Ee](q,Ee,ce,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){ye=Te}ye&&!(ye instanceof Error)&&(me(we),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ce||"React class",J,Ee,typeof ye),me(null)),ye instanceof Error&&!(ye.message in be)&&(be[ye.message]=!0,me(we),S("Failed %s type: %s",J,ye.message),me(null))}}}var Me=Array.isArray;function oe(C){return Me(C)}function Ae(C){{var q=typeof Symbol=="function"&&Symbol.toStringTag,J=q&&C[Symbol.toStringTag]||C.constructor.name||"Object";return J}}function ie(C){try{return Se(C),!1}catch{return!0}}function Se(C){return""+C}function Be(C){if(ie(C))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ae(C)),Se(C)}var Re=E.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},Ce,ht,rt;rt={};function Yt(C){if(he.call(C,"ref")){var q=Object.getOwnPropertyDescriptor(C,"ref").get;if(q&&q.isReactWarning)return!1}return C.ref!==void 0}function At(C){if(he.call(C,"key")){var q=Object.getOwnPropertyDescriptor(C,"key").get;if(q&&q.isReactWarning)return!1}return C.key!==void 0}function It(C,q){if(typeof C.ref=="string"&&Re.current&&q&&Re.current.stateNode!==q){var J=R(Re.current.type);rt[J]||(S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(Re.current.type),C.ref),rt[J]=!0)}}function gn(C,q){{var J=function(){Ce||(Ce=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};J.isReactWarning=!0,Object.defineProperty(C,"key",{get:J,configurable:!0})}}function vn(C,q){{var J=function(){ht||(ht=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};J.isReactWarning=!0,Object.defineProperty(C,"ref",{get:J,configurable:!0})}}var mn=function(C,q,J,ce,we,Le,Ee){var ye={$$typeof:t,type:C,key:q,ref:J,props:Ee,_owner:Le};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:we}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function yn(C,q,J,ce,we){{var Le,Ee={},ye=null,ze=null;J!==void 0&&(Be(J),ye=""+J),At(q)&&(Be(q.key),ye=""+q.key),Yt(q)&&(ze=q.ref,It(q,we));for(Le in q)he.call(q,Le)&&!Xe.hasOwnProperty(Le)&&(Ee[Le]=q[Le]);if(C&&C.defaultProps){var Te=C.defaultProps;for(Le in Te)Ee[Le]===void 0&&(Ee[Le]=Te[Le])}if(ye||ze){var Fe=typeof C=="function"?C.displayName||C.name||"Unknown":C;ye&&gn(Ee,Fe),ze&&vn(Ee,Fe)}return mn(C,ye,ze,we,ce,Re.current,Ee)}}var Ft=E.ReactCurrentOwner,Xt=E.ReactDebugCurrentFrame;function _t(C){if(C){var q=C._owner,J=fe(C.type,C._source,q?q.type:null);Xt.setExtraStackFrame(J)}else Xt.setExtraStackFrame(null)}var Ut;Ut=!1;function bn(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Tn(){{if(Ft.current){var C=R(Ft.current.type);if(C)return`
|
92
|
+
|
93
|
+
Check the render method of \``+C+"`."}return""}}function Cn(C){{if(C!==void 0){var q=C.fileName.replace(/^.*[\\\/]/,""),J=C.lineNumber;return`
|
94
|
+
|
95
|
+
Check your code at `+q+":"+J+"."}return""}}var An={};function tr(C){{var q=Tn();if(!q){var J=typeof C=="string"?C:C.displayName||C.name;J&&(q=`
|
96
|
+
|
97
|
+
Check the top-level render call using <`+J+">.")}return q}}function Jt(C,q){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var J=tr(q);if(An[J])return;An[J]=!0;var ce="";C&&C._owner&&C._owner!==Ft.current&&(ce=" It was passed a child from "+R(C._owner.type)+"."),_t(C),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ce),_t(null)}}function Fn(C,q){{if(typeof C!="object")return;if(oe(C))for(var J=0;J<C.length;J++){var ce=C[J];bn(ce)&&Jt(ce,q)}else if(bn(C))C._store&&(C._store.validated=!0);else if(C){var we=p(C);if(typeof we=="function"&&we!==C.entries)for(var Le=we.call(C),Ee;!(Ee=Le.next()).done;)bn(Ee.value)&&Jt(Ee.value,q)}}}function nr(C){{var q=C.type;if(q==null||typeof q=="string")return;var J;if(typeof q=="function")J=q.propTypes;else if(typeof q=="object"&&(q.$$typeof===u||q.$$typeof===d))J=q.propTypes;else return;if(J){var ce=R(q);le(J,C.props,"prop",ce,C)}else if(q.PropTypes!==void 0&&!Ut){Ut=!0;var we=R(q);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",we||"Unknown")}typeof q.getDefaultProps=="function"&&!q.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function En(C){{for(var q=Object.keys(C.props),J=0;J<q.length;J++){var ce=q[J];if(ce!=="children"&&ce!=="key"){_t(C),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),_t(null);break}}C.ref!==null&&(_t(C),S("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var In={};function _n(C,q,J,ce,we,Le){{var Ee=P(C);if(!Ee){var ye="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(ye+=" 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 ze=Cn(we);ze?ye+=ze:ye+=Tn();var Te;C===null?Te="null":oe(C)?Te="array":C!==void 0&&C.$$typeof===t?(Te="<"+(R(C.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof C,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,ye)}var Fe=yn(C,q,J,we,Le);if(Fe==null)return Fe;if(Ee){var Qe=q.children;if(Qe!==void 0)if(ce)if(oe(Qe)){for(var Rt=0;Rt<Qe.length;Rt++)Fn(Qe[Rt],C);Object.freeze&&Object.freeze(Qe)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fn(Qe,C)}if(he.call(q,"key")){var jt=R(C),$e=Object.keys(q).filter(function(Ac){return Ac!=="key"}),pe=$e.length>0?"{key: someKey, "+$e.join(": ..., ")+": ...}":"{key: someKey}";if(!In[jt+pe]){var Tc=$e.length>0?"{"+$e.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
98
|
+
let props = %s;
|
99
|
+
<%s {...props} />
|
100
|
+
React keys must be passed directly to JSX without using spread:
|
101
|
+
let props = %s;
|
102
|
+
<%s key={someKey} {...props} />`,pe,jt,Tc,jt),In[jt+pe]=!0}}return C===r?En(Fe):nr(Fe),Fe}}function wn(C,q,J){return _n(C,q,J,!0)}function rr(C,q,J){return _n(C,q,J,!1)}var or=rr,Dn=wn;Ci.Fragment=r,Ci.jsx=or,Ci.jsxs=Dn}()),Ci}process.env.NODE_ENV==="production"?Ba.exports=YC():Ba.exports=XC();var tt=Ba.exports;c.createContext({});function nd(e,t){return t?tt.jsx(t,{size:e,strokeWidth:2.5}):tt.jsx(tt.Fragment,{})}/*! *****************************************************************************
|
103
|
+
Copyright (c) Microsoft Corporation.
|
104
|
+
|
105
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
106
|
+
purpose with or without fee is hereby granted.
|
107
|
+
|
108
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
109
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
110
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
111
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
112
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
113
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
114
|
+
PERFORMANCE OF THIS SOFTWARE.
|
115
|
+
***************************************************************************** */var Ta=function(e,t){return Ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Ta(e,t)};function pt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ta(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pe=function(){return Pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Pe.apply(this,arguments)};function Aa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function JC(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(f){try{l(r.next(f))}catch(d){s(d)}}function u(f){try{l(r.throw(f))}catch(d){s(d)}}function l(f){f.done?i(f.value):o(f.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function QC(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eE=process.env.NODE_ENV,tE=function(e,t,n,r,o,i,s,a){if(eE!=="production"&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){var u;if(t===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,o,i,s,a],f=0;u=new Error(t.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},nE=tE,Tt=rd(nE),Ne=c.createContext(null);function rE(){Tt(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var e=c.useContext(Ne);return Tt(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}function oE(e,t,n){return Object.keys(e).reduce(function(r,o){return t(r,e[o],o)},n)}function iE(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function sE(e,t,n,r){var o={},i=function(s,a){var u=n[a];u!==t[a]&&(o[a]=u,s(r,u))};return iE(e,i),o}function aE(e,t,n){var r=oE(n,function(o,i,s){return typeof e[s]=="function"&&o.push(google.maps.event.addListener(t,i,e[s])),o},[]);return r}function uE(e){google.maps.event.removeListener(e)}function Ge(e){e===void 0&&(e=[]),e.forEach(uE)}function qe(e){var t=e.updaterMap,n=e.eventMap,r=e.prevProps,o=e.nextProps,i=e.instance,s=aE(o,i,n);return sE(t,r,o,i),s}var od={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"},id={extraMapTypes:function(e,t){t.forEach(function(n,r){e.mapTypes.set(String(r),n)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}};function lE(e){var t=e.children,n=e.options,r=e.id,o=e.mapContainerStyle,i=e.mapContainerClassName,s=e.center,a=e.onClick,u=e.onDblClick,l=e.onDrag,f=e.onDragEnd,d=e.onDragStart,h=e.onMouseMove,v=e.onMouseOut,m=e.onMouseOver,g=e.onMouseDown,p=e.onMouseUp,E=e.onRightClick,S=e.onCenterChanged,D=e.onLoad,M=e.onUnmount,b=c.useState(null),w=b[0],L=b[1],O=c.useRef(null),H=c.useState(null),P=H[0],V=H[1],_=c.useState(null),R=_[0],F=_[1],N=c.useState(null),Y=N[0],I=N[1],Q=c.useState(null),ne=Q[0],k=Q[1],T=c.useState(null),Z=T[0],$=T[1],K=c.useState(null),G=K[0],y=K[1],z=c.useState(null),W=z[0],B=z[1],X=c.useState(null),ee=X[0],j=X[1],se=c.useState(null),ae=se[0],fe=se[1],he=c.useState(null),be=he[0],ve=he[1],me=c.useState(null),le=me[0],Me=me[1],oe=c.useState(null),Ae=oe[0],ie=oe[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&&(R!==null&&google.maps.event.removeListener(R),F(google.maps.event.addListener(w,"dblclick",u)))},[u]),c.useEffect(function(){w&&f&&(Y!==null&&google.maps.event.removeListener(Y),I(google.maps.event.addListener(w,"dragend",f)))},[f]),c.useEffect(function(){w&&d&&(ne!==null&&google.maps.event.removeListener(ne),k(google.maps.event.addListener(w,"dragstart",d)))},[d]),c.useEffect(function(){w&&g&&(Z!==null&&google.maps.event.removeListener(Z),$(google.maps.event.addListener(w,"mousedown",g)))},[g]),c.useEffect(function(){w&&h&&(G!==null&&google.maps.event.removeListener(G),y(google.maps.event.addListener(w,"mousemove",h)))},[h]),c.useEffect(function(){w&&v&&(W!==null&&google.maps.event.removeListener(W),B(google.maps.event.addListener(w,"mouseout",v)))},[v]),c.useEffect(function(){w&&m&&(ee!==null&&google.maps.event.removeListener(ee),j(google.maps.event.addListener(w,"mouseover",m)))},[m]),c.useEffect(function(){w&&p&&(ae!==null&&google.maps.event.removeListener(ae),fe(google.maps.event.addListener(w,"mouseup",p)))},[p]),c.useEffect(function(){w&&E&&(be!==null&&google.maps.event.removeListener(be),ve(google.maps.event.addListener(w,"rightclick",E)))},[E]),c.useEffect(function(){w&&a&&(le!==null&&google.maps.event.removeListener(le),Me(google.maps.event.addListener(w,"click",a)))},[a]),c.useEffect(function(){w&&l&&(Ae!==null&&google.maps.event.removeListener(Ae),ie(google.maps.event.addListener(w,"drag",l)))},[l]),c.useEffect(function(){w&&S&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(w,"center_changed",S)))},[a]),c.useEffect(function(){var Se=O.current===null?null:new google.maps.Map(O.current,n);return L(Se),Se!==null&&D&&D(Se),function(){Se!==null&&M&&M(Se)}},[]),tt.jsx("div",{id:r,ref:O,style:o,className:i,children:tt.jsx(Ne.Provider,{value:w,children:w!==null?t:null})})}c.memo(lE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 o=n.getInstance();o&&o.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 t.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=qe({updaterMap:id,eventMap:od,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},t.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:id,eventMap:od,prevProps:n,nextProps:this.props,instance:this.state.map}))},t.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Ge(this.registeredEvents))},t.prototype.render=function(){return tt.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:tt.jsx(Ne.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},t}(c.PureComponent);var Tr=typeof document<"u";function sd(e){var t=e.url,n=e.id,r=e.nonce;return Tr?new Promise(function(o,i){var s=document.getElementById(n),a=window;if(s){var u=s.getAttribute("data-state");if(s.src===t&&u!=="error"){if(u==="ready")return o(n);var l=a.initMap,f=s.onerror;a.initMap=function(){l&&l(),o(n)},s.onerror=function(h){f&&f(h),i(h)};return}else s.remove()}var d=document.createElement("script");d.type="text/javascript",d.src=t,d.id=n,d.async=!0,d.nonce=r||"",d.onerror=function(h){d.setAttribute("data-state","error"),i(h)},a.initMap=function(){d.setAttribute("data-state","ready"),o(n)},document.head.appendChild(d)}).catch(function(o){throw console.error("injectScript error: ",o),o}):Promise.reject(new Error("document is undefined"))}function ad(e){var t=e.href;return t&&(t.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:e.tagName.toLowerCase()==="style"&&e.styleSheet&&e.styleSheet.cssText&&e.styleSheet.cssText.replace(`\r
|
116
|
+
`,"").indexOf(".gm-style")===0?(e.styleSheet.cssText="",!0):e.tagName.toLowerCase()==="style"&&e.innerHTML&&e.innerHTML.replace(`\r
|
117
|
+
`,"").indexOf(".gm-style")===0?(e.innerHTML="",!0):e.tagName.toLowerCase()==="style"&&!e.styleSheet&&!e.innerHTML}function ud(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(r,o){return ad(r)||Reflect.apply(t,e,[r,o]),r};var n=e.appendChild.bind(e);e.appendChild=function(r){return ad(r)||Reflect.apply(n,e,[r]),r}}}function ld(e){var t=e.googleMapsApiKey,n=e.googleMapsClientId,r=e.version,o=r===void 0?"weekly":r,i=e.language,s=e.region,a=e.libraries,u=e.channel,l=e.mapIds,f=e.authReferrerPolicy,d=[];return Tt(t&&n||!(t&&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."),t?d.push("key=".concat(t)):n&&d.push("client=".concat(n)),o&&d.push("v=".concat(o)),i&&d.push("language=".concat(i)),s&&d.push("region=".concat(s)),a&&a.length&&d.push("libraries=".concat(a.sort().join(","))),u&&d.push("channel=".concat(u)),l&&l.length&&d.push("map_ids=".concat(l.join(","))),f&&d.push("auth_referrer_policy=".concat(f)),d.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(d.join("&"))}var Co=!1;function cd(){return tt.jsx("div",{children:"Loading..."})}var Fa={id:"script-loader",version:"weekly"};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 JC(n,void 0,void 0,function(){function r(o){if(!Co)o();else if(Tr)var i=window.setInterval(function(){Co||(window.clearInterval(i),o())},1)}return QC(this,function(o){return[2,new Promise(r)]})})},n.cleanup=function(){Co=!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&&ud(),Tt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:ld(n.props)};sd(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(o){n.props.onError&&n.props.onError(o),console.error(`
|
118
|
+
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 />
|
119
|
+
Otherwise it is a Network issue.
|
120
|
+
`))})},n}return t.prototype.componentDidMount=function(){if(Tr){if(window.google&&window.google.maps&&!Co){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(n){console.error("Error at injecting script after cleaning up: ",n)})}},t.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"),Tr&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},t.prototype.componentWillUnmount=function(){var n=this;if(Tr){this.cleanup();var r=function(){n.check.current||(delete window.google,Co=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},t.prototype.render=function(){return tt.jsxs(tt.Fragment,{children:[tt.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||tt.jsx(cd,{})]})},t.defaultProps=Fa,t})(c.PureComponent);var fd;function cE(e){var t=e.id,n=t===void 0?Fa.id:t,r=e.version,o=r===void 0?Fa.version:r,i=e.nonce,s=e.googleMapsApiKey,a=e.googleMapsClientId,u=e.language,l=e.region,f=e.libraries,d=e.preventGoogleFontsLoading,h=e.channel,v=e.mapIds,m=e.authReferrerPolicy,g=c.useRef(!1),p=c.useState(!1),E=p[0],S=p[1],D=c.useState(void 0),M=D[0],b=D[1];c.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),c.useEffect(function(){Tr&&d&&ud()},[d]),c.useEffect(function(){E&&Tt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[E]);var w=ld({version:o,googleMapsApiKey:s,googleMapsClientId:a,language:u,region:l,libraries:f,channel:h,mapIds:v,authReferrerPolicy:m});c.useEffect(function(){if(!Tr)return;function O(){g.current&&(S(!0),fd=w)}if(window.google&&window.google.maps&&fd===w){O();return}sd({id:n,url:w,nonce:i}).then(O).catch(function(H){g.current&&b(H),console.warn(`
|
121
|
+
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||"-",`)
|
122
|
+
Otherwise it is a Network issue.
|
123
|
+
`)),console.error(H)})},[n,w,i]);var L=c.useRef();return c.useEffect(function(){L.current&&f!==L.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"),L.current=f},[f]),{isLoaded:E,loadError:M,url:w}}var fE=tt.jsx(cd,{});function dE(e){var t=e.loadingElement,n=e.onLoad,r=e.onError,o=e.onUnmount,i=e.children,s=Aa(e,["loadingElement","onLoad","onError","onUnmount","children"]),a=cE(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(){o&&o()}},[o]),u?i:t||fE}c.memo(dE);var dd;(function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"})(dd||(dd={}));var pd={},hd={options:function(e,t){e.setOptions(t)}};function pE(e){var t=e.options,n=e.onLoad,r=e.onUnmount,o=c.useContext(Ne),i=c.useState(null),s=i[0],a=i[1];return c.useEffect(function(){s!==null&&s.setMap(o)},[o]),c.useEffect(function(){t&&s!==null&&s.setOptions(t)},[s,t]),c.useEffect(function(){var u=new google.maps.TrafficLayer(Pe(Pe({},t||{}),{map:o}));return a(u),n&&n(u),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}c.memo(pE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:hd,eventMap:pd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},t.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:hd,eventMap:pd,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},t.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Ge(this.registeredEvents),this.state.trafficLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);function hE(e){var t=e.onLoad,n=e.onUnmount,r=c.useContext(Ne),o=c.useState(null),i=o[0],s=o[1];return c.useEffect(function(){i!==null&&i.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.BicyclingLayer;return s(a),a.setMap(r),t&&t(a),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(hE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},t.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);function gE(e){var t=e.onLoad,n=e.onUnmount,r=c.useContext(Ne),o=c.useState(null),i=o[0],s=o[1];return c.useEffect(function(){i!==null&&i.setMap(r)},[r]),c.useEffect(function(){var a=new google.maps.TransitLayer;return s(a),a.setMap(r),t&&t(a),function(){i!==null&&(n&&n(i),i.setMap(null))}},[]),null}c.memo(gE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},t.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var gd={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},vd={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}};function vE(e){var t=e.options,n=e.drawingMode,r=e.onCircleComplete,o=e.onMarkerComplete,i=e.onOverlayComplete,s=e.onPolygonComplete,a=e.onPolylineComplete,u=e.onRectangleComplete,l=e.onLoad,f=e.onUnmount,d=c.useContext(Ne),h=c.useState(null),v=h[0],m=h[1],g=c.useState(null),p=g[0],E=g[1],S=c.useState(null),D=S[0],M=S[1],b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1];return c.useEffect(function(){v!==null&&v.setMap(d)},[d]),c.useEffect(function(){t&&v!==null&&v.setOptions(t)},[v,t]),c.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),c.useEffect(function(){v&&r&&(p!==null&&google.maps.event.removeListener(p),E(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),c.useEffect(function(){v&&o&&(D!==null&&google.maps.event.removeListener(D),M(google.maps.event.addListener(v,"markercomplete",o)))},[v,o]),c.useEffect(function(){v&&i&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(v,"overlaycomplete",i)))},[v,i]),c.useEffect(function(){v&&s&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(v,"polygoncomplete",s)))},[v,s]),c.useEffect(function(){v&&a&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(v,"polylinecomplete",a)))},[v,a]),c.useEffect(function(){v&&u&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(v,"rectanglecomplete",u)))},[v,u]),c.useEffect(function(){Tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var I=new google.maps.drawing.DrawingManager(Pe(Pe({},t||{}),{map:d}));return n&&I.setDrawingMode(n),r&&E(google.maps.event.addListener(I,"circlecomplete",r)),o&&M(google.maps.event.addListener(I,"markercomplete",o)),i&&L(google.maps.event.addListener(I,"overlaycomplete",i)),s&&P(google.maps.event.addListener(I,"polygoncomplete",s)),a&&R(google.maps.event.addListener(I,"polylinecomplete",a)),u&&Y(google.maps.event.addListener(I,"rectanglecomplete",u)),m(I),l&&l(I),function(){v!==null&&(p&&google.maps.event.removeListener(p),D&&google.maps.event.removeListener(D),w&&google.maps.event.removeListener(w),H&&google.maps.event.removeListener(H),_&&google.maps.event.removeListener(_),N&&google.maps.event.removeListener(N),f&&f(v),v.setMap(null))}},[]),null}c.memo(vE),function(e){pt(t,e);function t(n){var r=e.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},Tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return t.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:vd,eventMap:gd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},t.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:vd,eventMap:gd,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},t.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Ge(this.registeredEvents),this.state.drawingManager.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var md={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"},yd={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},Ei={};function mE(e){var t=e.position,n=e.options,r=e.clusterer,o=e.noClustererRedraw,i=e.children,s=e.draggable,a=e.visible,u=e.animation,l=e.clickable,f=e.cursor,d=e.icon,h=e.label,v=e.opacity,m=e.shape,g=e.title,p=e.zIndex,E=e.onClick,S=e.onDblClick,D=e.onDrag,M=e.onDragEnd,b=e.onDragStart,w=e.onMouseOut,L=e.onMouseOver,O=e.onMouseUp,H=e.onMouseDown,P=e.onRightClick,V=e.onClickableChanged,_=e.onCursorChanged,R=e.onAnimationChanged,F=e.onDraggableChanged,N=e.onFlatChanged,Y=e.onIconChanged,I=e.onPositionChanged,Q=e.onShapeChanged,ne=e.onTitleChanged,k=e.onVisibleChanged,T=e.onZindexChanged,Z=e.onLoad,$=e.onUnmount,K=c.useContext(Ne),G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1],le=c.useState(null),Me=le[0],oe=le[1],Ae=c.useState(null),ie=Ae[0],Se=Ae[1],Be=c.useState(null),Re=Be[0],Xe=Be[1],Ce=c.useState(null),ht=Ce[0],rt=Ce[1],Yt=c.useState(null),At=Yt[0],It=Yt[1],gn=c.useState(null),vn=gn[0],mn=gn[1],yn=c.useState(null),Ft=yn[0],Xt=yn[1],_t=c.useState(null),Ut=_t[0],bn=_t[1],Tn=c.useState(null),Cn=Tn[0],An=Tn[1],tr=c.useState(null),Jt=tr[0],Fn=tr[1],nr=c.useState(null),En=nr[0],In=nr[1],_n=c.useState(null),wn=_n[0],rr=_n[1],or=c.useState(null),Dn=or[0],C=or[1],q=c.useState(null),J=q[0],ce=q[1],we=c.useState(null),Le=we[0],Ee=we[1],ye=c.useState(null),ze=ye[0],Te=ye[1],Fe=c.useState(null),Qe=Fe[0],Rt=Fe[1];c.useEffect(function(){y!==null&&y.setMap(K)},[K]),c.useEffect(function(){typeof n<"u"&&y!==null&&y.setOptions(n)},[y,n]),c.useEffect(function(){typeof s<"u"&&y!==null&&y.setDraggable(s)},[y,s]),c.useEffect(function(){t&&y!==null&&y.setPosition(t)},[y,t]),c.useEffect(function(){typeof a<"u"&&y!==null&&y.setVisible(a)},[y,a]),c.useEffect(function(){y==null||y.setAnimation(u)},[y,u]),c.useEffect(function(){y&&l!==void 0&&y.setClickable(l)},[y,l]),c.useEffect(function(){y&&f!==void 0&&y.setCursor(f)},[y,f]),c.useEffect(function(){y&&d!==void 0&&y.setIcon(d)},[y,d]),c.useEffect(function(){y&&h!==void 0&&y.setLabel(h)},[y,h]),c.useEffect(function(){y&&v!==void 0&&y.setOpacity(v)},[y,v]),c.useEffect(function(){y&&m!==void 0&&y.setShape(m)},[y,m]),c.useEffect(function(){y&&g!==void 0&&y.setTitle(g)},[y,g]),c.useEffect(function(){y&&p!==void 0&&y.setZIndex(p)},[y,p]),c.useEffect(function(){y&&S&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(y,"dblclick",S)))},[S]),c.useEffect(function(){y&&M&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(y,"dragend",M)))},[M]),c.useEffect(function(){y&&b&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(y,"dragstart",b)))},[b]),c.useEffect(function(){y&&H&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(y,"mousedown",H)))},[H]),c.useEffect(function(){y&&w&&(Me!==null&&google.maps.event.removeListener(Me),oe(google.maps.event.addListener(y,"mouseout",w)))},[w]),c.useEffect(function(){y&&L&&(ie!==null&&google.maps.event.removeListener(ie),Se(google.maps.event.addListener(y,"mouseover",L)))},[L]),c.useEffect(function(){y&&O&&(Re!==null&&google.maps.event.removeListener(Re),Xe(google.maps.event.addListener(y,"mouseup",O)))},[O]),c.useEffect(function(){y&&P&&(ht!==null&&google.maps.event.removeListener(ht),rt(google.maps.event.addListener(y,"rightclick",P)))},[P]),c.useEffect(function(){y&&E&&(At!==null&&google.maps.event.removeListener(At),It(google.maps.event.addListener(y,"click",E)))},[E]),c.useEffect(function(){y&&D&&(vn!==null&&google.maps.event.removeListener(vn),mn(google.maps.event.addListener(y,"drag",D)))},[D]),c.useEffect(function(){y&&V&&(Ft!==null&&google.maps.event.removeListener(Ft),Xt(google.maps.event.addListener(y,"clickable_changed",V)))},[V]),c.useEffect(function(){y&&_&&(Ut!==null&&google.maps.event.removeListener(Ut),bn(google.maps.event.addListener(y,"cursor_changed",_)))},[_]),c.useEffect(function(){y&&R&&(Cn!==null&&google.maps.event.removeListener(Cn),An(google.maps.event.addListener(y,"animation_changed",R)))},[R]),c.useEffect(function(){y&&F&&(Jt!==null&&google.maps.event.removeListener(Jt),Fn(google.maps.event.addListener(y,"draggable_changed",F)))},[F]),c.useEffect(function(){y&&N&&(En!==null&&google.maps.event.removeListener(En),In(google.maps.event.addListener(y,"flat_changed",N)))},[N]),c.useEffect(function(){y&&Y&&(wn!==null&&google.maps.event.removeListener(wn),rr(google.maps.event.addListener(y,"icon_changed",Y)))},[Y]),c.useEffect(function(){y&&I&&(Dn!==null&&google.maps.event.removeListener(Dn),C(google.maps.event.addListener(y,"position_changed",I)))},[I]),c.useEffect(function(){y&&Q&&(J!==null&&google.maps.event.removeListener(J),ce(google.maps.event.addListener(y,"shape_changed",Q)))},[Q]),c.useEffect(function(){y&&ne&&(Le!==null&&google.maps.event.removeListener(Le),Ee(google.maps.event.addListener(y,"title_changed",ne)))},[ne]),c.useEffect(function(){y&&k&&(ze!==null&&google.maps.event.removeListener(ze),Te(google.maps.event.addListener(y,"visible_changed",k)))},[k]),c.useEffect(function(){y&&T&&(Qe!==null&&google.maps.event.removeListener(Qe),Rt(google.maps.event.addListener(y,"zindex_changed",T)))},[T]),c.useEffect(function(){var $e=Pe(Pe(Pe({},n||Ei),r?Ei:{map:K}),{position:t}),pe=new google.maps.Marker($e);return r?r.addMarker(pe,!!o):pe.setMap(K),t&&pe.setPosition(t),typeof a<"u"&&pe.setVisible(a),typeof s<"u"&&pe.setDraggable(s),typeof l<"u"&&pe.setClickable(l),typeof f=="string"&&pe.setCursor(f),d&&pe.setIcon(d),typeof h<"u"&&pe.setLabel(h),typeof v<"u"&&pe.setOpacity(v),m&&pe.setShape(m),typeof g=="string"&&pe.setTitle(g),typeof p=="number"&&pe.setZIndex(p),S&&X(google.maps.event.addListener(pe,"dblclick",S)),M&&se(google.maps.event.addListener(pe,"dragend",M)),b&&he(google.maps.event.addListener(pe,"dragstart",b)),H&&me(google.maps.event.addListener(pe,"mousedown",H)),w&&oe(google.maps.event.addListener(pe,"mouseout",w)),L&&Se(google.maps.event.addListener(pe,"mouseover",L)),O&&Xe(google.maps.event.addListener(pe,"mouseup",O)),P&&rt(google.maps.event.addListener(pe,"rightclick",P)),E&&It(google.maps.event.addListener(pe,"click",E)),D&&mn(google.maps.event.addListener(pe,"drag",D)),V&&Xt(google.maps.event.addListener(pe,"clickable_changed",V)),_&&bn(google.maps.event.addListener(pe,"cursor_changed",_)),R&&An(google.maps.event.addListener(pe,"animation_changed",R)),F&&Fn(google.maps.event.addListener(pe,"draggable_changed",F)),N&&In(google.maps.event.addListener(pe,"flat_changed",N)),Y&&rr(google.maps.event.addListener(pe,"icon_changed",Y)),I&&C(google.maps.event.addListener(pe,"position_changed",I)),Q&&ce(google.maps.event.addListener(pe,"shape_changed",Q)),ne&&Ee(google.maps.event.addListener(pe,"title_changed",ne)),k&&Te(google.maps.event.addListener(pe,"visible_changed",k)),T&&Rt(google.maps.event.addListener(pe,"zindex_changed",T)),z(pe),Z&&Z(pe),function(){B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),ve!==null&&google.maps.event.removeListener(ve),Me!==null&&google.maps.event.removeListener(Me),ie!==null&&google.maps.event.removeListener(ie),Re!==null&&google.maps.event.removeListener(Re),ht!==null&&google.maps.event.removeListener(ht),At!==null&&google.maps.event.removeListener(At),Ft!==null&&google.maps.event.removeListener(Ft),Ut!==null&&google.maps.event.removeListener(Ut),Cn!==null&&google.maps.event.removeListener(Cn),Jt!==null&&google.maps.event.removeListener(Jt),En!==null&&google.maps.event.removeListener(En),wn!==null&&google.maps.event.removeListener(wn),Dn!==null&&google.maps.event.removeListener(Dn),Le!==null&&google.maps.event.removeListener(Le),ze!==null&&google.maps.event.removeListener(ze),Qe!==null&&google.maps.event.removeListener(Qe),$&&$(pe),r?r.removeMarker(pe,!!o):pe&&pe.setMap(null)}},[]);var jt=c.useMemo(function(){return i?c.Children.map(i,function($e){if(!c.isValidElement($e))return $e;var pe=$e;return c.cloneElement(pe,{anchor:y})}):null},[i,y]);return tt.jsx(tt.Fragment,{children:jt})||null}c.memo(mE),function(e){pt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n}return t.prototype.componentDidMount=function(){var n=Pe(Pe(Pe({},this.props.options||Ei),this.props.clusterer?Ei:{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=qe({updaterMap:yd,eventMap:md,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},t.prototype.componentDidUpdate=function(n){this.marker&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:yd,eventMap:md,prevProps:n,nextProps:this.props,instance:this.marker}))},t.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Ge(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},t.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=c.Children.map(this.props.children,function(o){if(!c.isValidElement(o))return o;var i=o;return c.cloneElement(i,{anchor:n.marker})})),r||null},t.contextType=Ne,t}(c.PureComponent);var yE=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,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(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(t){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var 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(),o=this.cluster.getBounds(),i=n.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(o),this.timeOut=window.setTimeout(function(){var s=n.getMap();if(s!==null){"fitBounds"in s&&s.fitBounds(o);var a=s.getZoom()||0;r!==null&&a>r&&s.setZoom(r+1)}},100)}t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var t;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(t=this.getPanes())===null||t===void 0||t.overlayMouseTarget.appendChild(this.div);var 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))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var t=this.getPosFromLatLng(this.center);this.div.style.top=t!==null?"".concat(t.y,"px"):"0",this.div.style.left=t!==null?"".concat(t.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var t,n,r,o,i,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(((t=u[0])===null||t===void 0?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),d=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(d!==null?"".concat(d.y,"px"):"0","; left: ").concat(d!==null?"".concat(d.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 v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((o=this.sums)===null||o===void 0?void 0:o.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(v.innerHTML="".concat((s=this.sums)===null||s===void 0?void 0:s.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(v),this.div.title=a,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(t){this.sums=t;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,t.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")},e.prototype.setCenter=function(t){this.center=t},e.prototype.getPosFromLatLng=function(t){var n=this.getProjection().fromLatLngToDivPixel(t);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},e}(),bE=function(){function e(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new yE(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,o=n;r<o.length;r++){var i=o[r],s=i.getPosition();s&&t.extend(s)}return t},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){var n;if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var r=t.getPosition();if(r){var o=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(o-1)+r.lat())/o,(this.center.lng()*(o-1)+r.lng())/o),this.calculateBounds()}}}else{var r=t.getPosition();r&&(this.center=r,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var i=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)t.getMap()!==this.map&&t.setMap(this.map);else if(i<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(this.bounds!==null){var n=t.getPosition();if(n)return this.bounds.contains(n)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=(t=this.map)===null||t===void 0?void 0:t.getZoom();if(r!==null&&typeof o<"u"&&o>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()},e.prototype.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var n=0;n<this.markers.length;n++)if(t===this.markers[n])return!0;return!1},e}();function CE(e,t){var n=e.length,r=n.toString().length,o=Math.min(r,t);return{text:n.toString(),index:o,title:""}}var EE=2e3,wE=500,DE="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",xE="png",SE=[53,56,66,78,90],LE="cluster",bd=function(){function e(t,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(e,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||DE,this.imageExtension=r.imageExtension||xE,this.imageSizes=r.imageSizes||SE,this.calculator=r.calculator||CE,this.batchSize=r.batchSize||EE,this.batchSizeIE=r.batchSizeIE||wE,this.clusterClass=r.clusterClass||LE,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(t)}return e.prototype.onZoomChanged=function(){var t,n;this.resetViewport(!1),(((t=this.getMap())===null||t===void 0?void 0:t.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")},e.prototype.onIdle=function(){this.redraw()},e.prototype.onAdd=function(){var t=this.getMap();this.activeMap=t,this.ready=!0,this.repaint(),t!==null&&(this.listeners=[google.maps.event.addListener(t,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(t,"idle",this.onIdle)])},e.prototype.onRemove=function(){for(var t=0,n=this.markers;t<n.length;t++){var r=n[t];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var o=0,i=this.clusters;o<i.length;o++){var s=i[o];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},e.prototype.draw=function(){},e.prototype.getMap=function(){return null},e.prototype.getPanes=function(){return null},e.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},e.prototype.setMap=function(){},e.prototype.addListener=function(){return{remove:function(){}}},e.prototype.bindTo=function(){},e.prototype.get=function(){},e.prototype.notify=function(){},e.prototype.set=function(){},e.prototype.setValues=function(){},e.prototype.unbind=function(){},e.prototype.unbindAll=function(){},e.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:"".concat(this.imagePath+(t+1),".").concat(this.imageExtension),height:this.imageSizes[t]||0,width:this.imageSizes[t]||0})},e.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,o=t;r<o.length;r++){var i=o[r],s=i.getPosition();s&&n.extend(s)}var a=this.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(n)},e.prototype.getGridSize=function(){return this.gridSize},e.prototype.setGridSize=function(t){this.gridSize=t},e.prototype.getMinimumClusterSize=function(){return this.minClusterSize},e.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},e.prototype.getMaxZoom=function(){return this.maxZoom},e.prototype.setMaxZoom=function(t){this.maxZoom=t},e.prototype.getStyles=function(){return this.styles},e.prototype.setStyles=function(t){this.styles=t},e.prototype.getTitle=function(){return this.title},e.prototype.setTitle=function(t){this.title=t},e.prototype.getZoomOnClick=function(){return this.zoomOnClick},e.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},e.prototype.getAverageCenter=function(){return this.averageCenter},e.prototype.setAverageCenter=function(t){this.averageCenter=t},e.prototype.getIgnoreHidden=function(){return this.ignoreHidden},e.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},e.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},e.prototype.getImageExtension=function(){return this.imageExtension},e.prototype.setImageExtension=function(t){this.imageExtension=t},e.prototype.getImagePath=function(){return this.imagePath},e.prototype.setImagePath=function(t){this.imagePath=t},e.prototype.getImageSizes=function(){return this.imageSizes},e.prototype.setImageSizes=function(t){this.imageSizes=t},e.prototype.getCalculator=function(){return this.calculator},e.prototype.setCalculator=function(t){this.calculator=t},e.prototype.getBatchSizeIE=function(){return this.batchSizeIE},e.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},e.prototype.getClusterClass=function(){return this.clusterClass},e.prototype.setClusterClass=function(t){this.clusterClass=t},e.prototype.getMarkers=function(){return this.markers},e.prototype.getTotalMarkers=function(){return this.markers.length},e.prototype.getClusters=function(){return this.clusters},e.prototype.getTotalClusters=function(){return this.clusters.length},e.prototype.addMarker=function(t,n){this.pushMarkerTo(t),n||this.redraw()},e.prototype.addMarkers=function(t,n){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r];o&&this.pushMarkerTo(o)}n||this.redraw()},e.prototype.pushMarkerTo=function(t){var n=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",function(){n.ready&&(t.isAdded=!1,n.repaint())}),t.isAdded=!1,this.markers.push(t)},e.prototype.removeMarker_=function(t){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(t);else for(var r=0;r<this.markers.length;r++)if(t===this.markers[r]){n=r;break}return n===-1?!1:(t.setMap(null),this.markers.splice(n,1),!0)},e.prototype.removeMarker=function(t,n){var r=this.removeMarker_(t);return!n&&r&&this.repaint(),r},e.prototype.removeMarkers=function(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var s=i[o];r=r||this.removeMarker_(s)}return!n&&r&&this.repaint(),r},e.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},e.prototype.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var n=0,r=t;n<r.length;n++){var o=r[n];o.remove()}},0)},e.prototype.getExtendedBounds=function(t){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var o=n.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));if(o!==null&&(o.x-=this.gridSize,o.y+=this.gridSize),r!==null){var i=n.fromDivPixelToLatLng(r);i!==null&&t.extend(i)}if(o!==null){var s=n.fromDivPixelToLatLng(o);s!==null&&t.extend(s)}return t},e.prototype.redraw=function(){this.createClusters(0)},e.prototype.resetViewport=function(t){for(var n=0,r=this.clusters;n<r.length;n++){var o=r[n];o.remove()}this.clusters=[];for(var i=0,s=this.markers;i<s.length;i++){var a=s[i];a.isAdded=!1,t&&a.setMap(null)}},e.prototype.distanceBetweenPoints=function(t,n){var r=6371,o=(n.lat()-t.lat())*Math.PI/180,i=(n.lng()-t.lng())*Math.PI/180,s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return r*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))},e.prototype.isMarkerInBounds=function(t,n){var r=t.getPosition();return r?n.contains(r):!1},e.prototype.addToClosestCluster=function(t){for(var n,r=4e4,o=null,i=0,s=this.clusters;i<s.length;i++){var a=s[i];n=a;var u=n.getCenter(),l=t.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<r&&(r=f,o=n)}}o&&o.isMarkerInClusterBounds(t)?o.addMarker(t):(n=new bE(this),n.addMarker(t),this.clusters.push(n))},e.prototype.createClusters=function(t){var n=this;if(this.ready){t===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),o=r!==null&&("getBounds"in r)?r.getBounds():null,i=(r==null?void 0:r.getZoom())||0,s=i>3?new google.maps.LatLngBounds(o==null?void 0:o.getSouthWest(),o==null?void 0:o.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(t+this.batchSize,this.markers.length),l=t;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 d=0,h=this.clusters;d<h.length;d++){var v=h[d];v.updateIcon()}}}},e.prototype.extend=function(t,n){return(function(r){for(var o in r.prototype){var i=o;this.prototype[i]=r.prototype[i]}return this}).apply(t,[n])},e}(),Ln={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},nt={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},OE={};function kE(e){var t=e.children,n=e.options,r=e.averageCenter,o=e.batchSizeIE,i=e.calculator,s=e.clusterClass,a=e.enableRetinaIcons,u=e.gridSize,l=e.ignoreHidden,f=e.imageExtension,d=e.imagePath,h=e.imageSizes,v=e.maxZoom,m=e.minimumClusterSize,g=e.styles,p=e.title,E=e.zoomOnClick,S=e.onClick,D=e.onClusteringBegin,M=e.onClusteringEnd,b=e.onMouseOver,w=e.onMouseOut,L=e.onLoad,O=e.onUnmount,H=c.useState(null),P=H[0],V=H[1],_=c.useContext(Ne),R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1];return c.useEffect(function(){P&&w&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(P,Ln.onMouseOut,w)))},[w]),c.useEffect(function(){P&&b&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(P,Ln.onMouseOver,b)))},[b]),c.useEffect(function(){P&&S&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(P,Ln.onClick,S)))},[S]),c.useEffect(function(){P&&D&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(P,Ln.onClusteringBegin,D)))},[D]),c.useEffect(function(){P&&M&&(k!==null&&google.maps.event.removeListener(k),Q(google.maps.event.addListener(P,Ln.onClusteringEnd,M)))},[M]),c.useEffect(function(){typeof r<"u"&&P!==null&&nt.averageCenter(P,r)},[P,r]),c.useEffect(function(){typeof o<"u"&&P!==null&&nt.batchSizeIE(P,o)},[P,o]),c.useEffect(function(){typeof i<"u"&&P!==null&&nt.calculator(P,i)},[P,i]),c.useEffect(function(){typeof s<"u"&&P!==null&&nt.clusterClass(P,s)},[P,s]),c.useEffect(function(){typeof a<"u"&&P!==null&&nt.enableRetinaIcons(P,a)},[P,a]),c.useEffect(function(){typeof u<"u"&&P!==null&&nt.gridSize(P,u)},[P,u]),c.useEffect(function(){typeof l<"u"&&P!==null&&nt.ignoreHidden(P,l)},[P,l]),c.useEffect(function(){typeof f<"u"&&P!==null&&nt.imageExtension(P,f)},[P,f]),c.useEffect(function(){typeof d<"u"&&P!==null&&nt.imagePath(P,d)},[P,d]),c.useEffect(function(){typeof h<"u"&&P!==null&&nt.imageSizes(P,h)},[P,h]),c.useEffect(function(){typeof v<"u"&&P!==null&&nt.maxZoom(P,v)},[P,v]),c.useEffect(function(){typeof m<"u"&&P!==null&&nt.minimumClusterSize(P,m)},[P,m]),c.useEffect(function(){typeof g<"u"&&P!==null&&nt.styles(P,g)},[P,g]),c.useEffect(function(){typeof p<"u"&&P!==null&&nt.title(P,p)},[P,p]),c.useEffect(function(){typeof E<"u"&&P!==null&&nt.zoomOnClick(P,E)},[P,E]),c.useEffect(function(){if(_){var W=Pe({},n||OE),B=new bd(_,[],W);return r&&nt.averageCenter(B,r),o&&nt.batchSizeIE(B,o),i&&nt.calculator(B,i),s&&nt.clusterClass(B,s),a&&nt.enableRetinaIcons(B,a),u&&nt.gridSize(B,u),l&&nt.ignoreHidden(B,l),f&&nt.imageExtension(B,f),d&&nt.imagePath(B,d),h&&nt.imageSizes(B,h),v&&nt.maxZoom(B,v),m&&nt.minimumClusterSize(B,m),g&&nt.styles(B,g),p&&nt.title(B,p),E&&nt.zoomOnClick(B,E),w&&K(google.maps.event.addListener(B,Ln.onMouseOut,w)),b&&z(google.maps.event.addListener(B,Ln.onMouseOver,b)),S&&N(google.maps.event.addListener(B,Ln.onClick,S)),D&&Q(google.maps.event.addListener(B,Ln.onClusteringBegin,D)),M&&T(google.maps.event.addListener(B,Ln.onClusteringEnd,M)),V(B),L&&L(B),function(){$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),O&&O(B)}}},[]),P!==null&&t(P)||null}c.memo(kE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(this.context){var n=new bd(this.context,[],this.props.options);this.registeredEvents=qe({updaterMap:nt,eventMap:Ln,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},t.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:nt,eventMap:Ln,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},t.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Ge(this.registeredEvents),this.state.markerClusterer.setMap(null))},t.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},t.contextType=Ne,t}(c.PureComponent);function Cd(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}var Ed=function(){function e(t){t===void 0&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",t.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),typeof t.visible>"u"&&(typeof t.isHidden>"u"?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var t=this,n=function(l){l.returnValue=!1,l.preventDefault&&l.preventDefault(),t.enableEventPropagation||Cd(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 o=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-o.left-o.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],s=0,a=i;s<a.length;s++){var u=a[s];this.eventListeners.push(google.maps.event.addListener(this.div,u,Cd))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){t.div&&(t.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},e.prototype.getCloseBoxImg=function(){var t="";return this.closeBoxURL!==""&&(t='<img alt=""',t+=' aria-hidden="true"',t+=" src='"+this.closeBoxURL+"'",t+=" align=right",t+=" style='",t+=" position: relative;",t+=" cursor: pointer;",t+=" margin: "+this.closeBoxMargin+";",t+="'>"),t},e.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},e.prototype.closeClickHandler=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},e.prototype.getCloseClickHandler=function(){return this.closeClickHandler},e.prototype.panBox=function(t){if(this.div&&!t){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,o=0,i=n.getBounds();i&&!i.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,d=this.div.offsetWidth,h=this.div.offsetHeight,v=this.infoBoxClearance.width,m=this.infoBoxClearance.height,g=this.getProjection(),p=g.fromLatLngToContainerPixel(this.position);p!==null&&(p.x<-l+v?r=p.x+l-v:p.x+d+l+v>a&&(r=p.x+d+l+v-a),this.alignBottom?p.y<-f+m+h?o=p.y+f-m-h:p.y+f+m>u&&(o=p.y+f+m-u):p.y<-f+m?o=p.y+f-m:p.y+h+f+m>u&&(o=p.y+h+f+m-u)),r===0&&o===0||n.panBy(r,o)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var t=this.boxStyle;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this.div.style[n]=t[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")}},e.prototype.getBoxWidths=function(){var t={top:0,bottom:0,left:0,right:0};if(!this.div)return t;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(t.top=parseInt(r.borderTopWidth||"",10)||0,t.bottom=parseInt(r.borderBottomWidth||"",10)||0,t.left=parseInt(r.borderLeftWidth||"",10)||0,t.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var o=this.div.currentStyle;o&&(t.top=parseInt(o.borderTopWidth||"",10)||0,t.bottom=parseInt(o.borderBottomWidth||"",10)||0,t.left=parseInt(o.borderLeftWidth||"",10)||0,t.right=parseInt(o.borderRightWidth||"",10)||0)}return t},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var t=this.getProjection(),n=t.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"}},e.prototype.setOptions=function(t){t===void 0&&(t={}),typeof t.boxClass<"u"&&(this.boxClass=t.boxClass,this.setBoxStyle()),typeof t.boxStyle<"u"&&(this.boxStyle=t.boxStyle,this.setBoxStyle()),typeof t.content<"u"&&this.setContent(t.content),typeof t.disableAutoPan<"u"&&(this.disableAutoPan=t.disableAutoPan),typeof t.maxWidth<"u"&&(this.maxWidth=t.maxWidth),typeof t.pixelOffset<"u"&&(this.pixelOffset=t.pixelOffset),typeof t.alignBottom<"u"&&(this.alignBottom=t.alignBottom),typeof t.position<"u"&&this.setPosition(t.position),typeof t.zIndex<"u"&&this.setZIndex(t.zIndex),typeof t.closeBoxMargin<"u"&&(this.closeBoxMargin=t.closeBoxMargin),typeof t.closeBoxURL<"u"&&(this.closeBoxURL=t.closeBoxURL),typeof t.infoBoxClearance<"u"&&(this.infoBoxClearance=t.infoBoxClearance),typeof t.isHidden<"u"&&(this.isHidden=t.isHidden),typeof t.visible<"u"&&(this.isHidden=!t.visible),typeof t.enableEventPropagation<"u"&&(this.enableEventPropagation=t.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(t){this.content=t,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof t=="string"?this.div.innerHTML=this.getCloseBoxImg()+t:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(t))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(t){this.position=t,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(t){this.isHidden=!t,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(t){this.zIndex=t,this.div&&(this.div.style.zIndex=t+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var t=this.getMap();return typeof t>"u"||t===null?!1:!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(t,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var o=n.getPosition();r.setPosition(o)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(t),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var t=0,n=this.eventListeners;t<n.length;t++){var r=n[t];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)},e.prototype.extend=function(t,n){return(function(r){for(var o in r.prototype)Object.prototype.hasOwnProperty.call(this,o)||(this.prototype[o]=r.prototype[o]);return this}).apply(t,[n])},e}(),wd={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Dd={options:function(e,t){e.setOptions(t)},position:function(e,t){t instanceof google.maps.LatLng?e.setPosition(t):e.setPosition(new google.maps.LatLng(t.lat,t.lng))},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},PE={};function ME(e){var t=e.children,n=e.anchor,r=e.options,o=e.position,i=e.zIndex,s=e.onCloseClick,a=e.onDomReady,u=e.onContentChanged,l=e.onPositionChanged,f=e.onZindexChanged,d=e.onLoad,h=e.onUnmount,v=c.useContext(Ne),m=c.useState(null),g=m[0],p=m[1],E=c.useState(null),S=E[0],D=E[1],M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useRef(null);return c.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){if(o&&g!==null){var I=o instanceof google.maps.LatLng?o:new google.maps.LatLng(o.lat,o.lng);g.setPosition(I)}},[o]),c.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&u&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(function(){g&&l&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(g,"position_changed",l)))},[l]),c.useEffect(function(){g&&f&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){if(v){var I=r||PE,Q=I.position,ne=Aa(I,["position"]),k=void 0;Q&&!(Q instanceof google.maps.LatLng)&&(k=new google.maps.LatLng(Q.lat,Q.lng));var T=new Ed(Pe(Pe({},ne),k?{position:k}:{}));Y.current=document.createElement("div"),p(T),s&&D(google.maps.event.addListener(T,"closeclick",s)),a&&w(google.maps.event.addListener(T,"domready",a)),u&&H(google.maps.event.addListener(T,"content_changed",u)),l&&_(google.maps.event.addListener(T,"position_changed",l)),f&&N(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(Y.current),n?T.open(v,n):T.getPosition()?T.open(v):Tt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),d&&d(T)}return function(){g!==null&&(S&&google.maps.event.removeListener(S),O&&google.maps.event.removeListener(O),b&&google.maps.event.removeListener(b),V&&google.maps.event.removeListener(V),F&&google.maps.event.removeListener(F),h&&h(g),g.close())}},[]),Y.current?xn.createPortal(c.Children.only(t),Y.current):null}c.memo(ME),function(e){pt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,o){o?n.context!==null&&r.open(n.context,o):r.getPosition()?n.context!==null&&r.open(n.context):Tt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return t.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,o=Aa(n,["position"]),i;r&&!(r instanceof google.maps.LatLng)&&(i=new google.maps.LatLng(r.lat,r.lng));var s=new Ed(Pe(Pe({},o),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=qe({updaterMap:Dd,eventMap:wd,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)},t.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Dd,eventMap:wd,prevProps:n,nextProps:this.props,instance:r}))},t.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Ge(this.registeredEvents),r.close())},t.prototype.render=function(){return this.containerElement?xn.createPortal(c.Children.only(this.props.children),this.containerElement):null},t.contextType=Ne,t}(c.PureComponent);var BE=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},xd=rd(BE);const Sd=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ia=1,Eo=8;class _a{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==Ia)throw new Error(`Got v${o} data when expected v${Ia}.`);const i=Sd[r&15];if(!i)throw new Error("Unrecognized array type.");const[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new _a(a,s,i,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=Sd.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-a%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Eo,t),this.coords=new this.ArrayType(this.data,Eo+a+u,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(Eo+s+a+u),this.ids=new this.IndexArrayType(this.data,Eo,t),this.coords=new this.ArrayType(this.data,Eo+a+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ia<<4)+i]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Ra(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:a}=this,u=[0,i.length-1,0],l=[];for(;u.length;){const f=u.pop()||0,d=u.pop()||0,h=u.pop()||0;if(d-h<=a){for(let p=h;p<=d;p++){const E=s[2*p],S=s[2*p+1];E>=t&&E<=r&&S>=n&&S<=o&&l.push(i[p])}continue}const v=h+d>>1,m=s[2*v],g=s[2*v+1];m>=t&&m<=r&&g>=n&&g<=o&&l.push(i[v]),(f===0?t<=m:n<=g)&&(u.push(h),u.push(v-1),u.push(1-f)),(f===0?r>=m:o>=g)&&(u.push(v+1),u.push(d),u.push(1-f))}return l}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:s}=this,a=[0,o.length-1,0],u=[],l=r*r;for(;a.length;){const f=a.pop()||0,d=a.pop()||0,h=a.pop()||0;if(d-h<=s){for(let p=h;p<=d;p++)Od(i[2*p],i[2*p+1],t,n)<=l&&u.push(o[p]);continue}const v=h+d>>1,m=i[2*v],g=i[2*v+1];Od(m,g,t,n)<=l&&u.push(o[v]),(f===0?t-r<=m:n-r<=g)&&(a.push(h),a.push(v-1),a.push(1-f)),(f===0?t+r>=m:n+r>=g)&&(a.push(v+1),a.push(d),a.push(1-f))}return u}}function Ra(e,t,n,r,o,i){if(o-r<=n)return;const s=r+o>>1;Ld(e,t,s,r,o,i),Ra(e,t,n,r,s-1,1-i),Ra(e,t,n,s+1,o,1-i)}function Ld(e,t,n,r,o,i){for(;o>r;){if(o-r>600){const l=o-r+1,f=n-r+1,d=Math.log(l),h=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*h*(l-h)/l)*(f-l/2<0?-1:1),m=Math.max(r,Math.floor(n-f*h/l+v)),g=Math.min(o,Math.floor(n+(l-f)*h/l+v));Ld(e,t,n,m,g,i)}const s=t[2*n+i];let a=r,u=o;for(wo(e,t,r,n),t[2*o+i]>s&&wo(e,t,r,o);a<u;){for(wo(e,t,a,u),a++,u--;t[2*a+i]<s;)a++;for(;t[2*u+i]>s;)u--}t[2*r+i]===s?wo(e,t,r,u):(u++,wo(e,t,u,o)),u<=n&&(r=u+1),n<=u&&(o=u-1)}}function wo(e,t,n,r){ja(e,n,r),ja(t,2*n,2*r),ja(t,2*n+1,2*r+1)}function ja(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Od(e,t,n,r){const o=e-n,i=t-r;return o*o+i*i}const TE={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},kd=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),Ar=2,ur=3,Na=4,lr=5,Pd=6;class AE{constructor(t){this.options=Object.assign(Object.create(TE),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const i=`prepare ${t.length} points`;n&&console.time(i),this.points=t;const s=[];for(let u=0;u<t.length;u++){const l=t[u];if(!l.geometry)continue;const[f,d]=l.geometry.coordinates,h=kd(wi(f)),v=kd(Di(d));s.push(h,v,1/0,u,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);n&&console.timeEnd(i);for(let u=o;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(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let i=t[2]===180?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){const d=this.getClusters([r,o,180,s],n),h=this.getClusters([-180,o,i,s],n);return d.concat(h)}const a=this.trees[this._limitZoom(n)],u=a.range(wi(r),Di(s),wi(i),Di(o)),l=a.data,f=[];for(const d of u){const h=this.stride*d;f.push(l[h+lr]>1?Md(l,h,this.clusterProps):this.points[l[h+ur]])}return f}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(o);const s=i.data;if(n*this.stride>=s.length)throw new Error(o);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=i.within(u,l,a),d=[];for(const h of f){const v=h*this.stride;s[v+Na]===t&&d.push(s[v+lr]>1?Md(s,v,this.clusterProps):this.points[s[v+ur]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:s,radius:a}=this.options,u=a/s,l=(r-u)/i,f=(r+1+u)/i,d={features:[]};return this._addTileFeatures(o.range((n-u)/i,l,(n+1+u)/i,f),o.data,n,r,i,d),n===0&&this._addTileFeatures(o.range(1-u/i,l,1,f),o.data,i,r,i,d),n===i-1&&this._addTileFeatures(o.range(0,l,u/i,f),o.data,-1,r,i,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,i){const s=this.getChildren(n);for(const a of s){const u=a.properties;if(u&&u.cluster?i+u.point_count<=o?i+=u.point_count:i=this._appendLeaves(t,u.cluster_id,r,o,i):i<o?i++:t.push(a),t.length===r)break}return i}_createTree(t){const n=new _a(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,i,s){for(const a of t){const u=a*this.stride,l=n[u+lr]>1;let f,d,h;if(l)f=Bd(n,u,this.clusterProps),d=n[u],h=n[u+1];else{const g=this.points[n[u+ur]];f=g.properties;const[p,E]=g.geometry.coordinates;d=wi(p),h=Di(E)}const v={type:1,geometry:[[Math.round(this.options.extent*(d*i-r)),Math.round(this.options.extent*(h*i-o))]],tags:f};let m;l||this.options.generateId?m=n[u+ur]:m=this.points[n[u+ur]].id,m!==void 0&&(v.id=m),s.features.push(v)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:i,minPoints:s}=this.options,a=r/(o*Math.pow(2,n)),u=t.data,l=[],f=this.stride;for(let d=0;d<u.length;d+=f){if(u[d+Ar]<=n)continue;u[d+Ar]=n;const h=u[d],v=u[d+1],m=t.within(u[d],u[d+1],a),g=u[d+lr];let p=g;for(const E of m){const S=E*f;u[S+Ar]>n&&(p+=u[S+lr])}if(p>g&&p>=s){let E=h*g,S=v*g,D,M=-1;const b=((d/f|0)<<5)+(n+1)+this.points.length;for(const w of m){const L=w*f;if(u[L+Ar]<=n)continue;u[L+Ar]=n;const O=u[L+lr];E+=u[L]*O,S+=u[L+1]*O,u[L+Na]=b,i&&(D||(D=this._map(u,d,!0),M=this.clusterProps.length,this.clusterProps.push(D)),i(D,this._map(u,L)))}u[d+Na]=b,l.push(E/p,S/p,1/0,b,-1,p),i&&l.push(M)}else{for(let E=0;E<f;E++)l.push(u[d+E]);if(p>1)for(const E of m){const S=E*f;if(!(u[S+Ar]<=n)){u[S+Ar]=n;for(let D=0;D<f;D++)l.push(u[S+D])}}}}return l}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+lr]>1){const s=this.clusterProps[t[n+Pd]];return r?Object.assign({},s):s}const o=this.points[t[n+ur]].properties,i=this.options.map(o);return r&&i===o?Object.assign({},i):i}}function Md(e,t,n){return{type:"Feature",id:e[t+ur],properties:Bd(e,t,n),geometry:{type:"Point",coordinates:[FE(e[t]),IE(e[t+1])]}}}function Bd(e,t,n){const r=e[t+lr],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,i=e[t+Pd],s=i===-1?{}:Object.assign({},n[i]);return Object.assign(s,{cluster:!0,cluster_id:e[t+ur],point_count:r,point_count_abbreviated:o})}function wi(e){return e/360+.5}function Di(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function FE(e){return(e-.5)*360}function IE(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}/*! *****************************************************************************
|
124
|
+
Copyright (c) Microsoft Corporation.
|
125
|
+
|
126
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
127
|
+
purpose with or without fee is hereby granted.
|
128
|
+
|
129
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
130
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
131
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
132
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
133
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
134
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
135
|
+
PERFORMANCE OF THIS SOFTWARE.
|
136
|
+
***************************************************************************** */function _E(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}class un{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,n){this.isAdvancedMarker(t)?t.map=n:t.setMap(n)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class za{constructor({markers:t,position:n}){this.markers=t,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 t=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)t.extend(un.getPosition(n));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>un.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(un.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class RE{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return jE(t)}}const jE=e=>e.map(t=>new za({position:un.getPosition(t),markers:[t]}));class NE extends RE{constructor(t){var{maxZoom:n,radius:r=60}=t,o=_E(t,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new AE(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let n=!1;const r={zoom:t.map.getZoom()};if(!xd(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const o=this.markers.map(i=>{const s=un.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng(),s.lat()]},properties:{marker:i}}});this.superCluster.load(o)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!xd(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:n}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[t,n]},properties:r}){if(r.cluster)return new za({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(i=>i.properties.marker),position:{lat:n,lng:t}});const o=r.marker;return new za({markers:[o],position:un.getPosition(o)})}}class zE{constructor(t,n){this.markers={sum:t.length};const r=n.map(i=>i.count),o=r.reduce((i,s)=>i+s,0);this.clusters={count:n.length,markers:{mean:o/n.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class $E{render({count:t,position:n},r,o){const i=`<svg fill="${t>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">
|
137
|
+
<circle cx="120" cy="120" opacity=".6" r="70" />
|
138
|
+
<circle cx="120" cy="120" opacity=".3" r="90" />
|
139
|
+
<circle cx="120" cy="120" opacity=".2" r="110" />
|
140
|
+
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>
|
141
|
+
</svg>`,s=`Cluster of ${t} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+t;if(un.isAdvancedMarkerAvailable(o)){const l=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;l.setAttribute("transform","translate(0 25)");const f={map:o,position:n,zIndex:a,title:s,content:l};return new google.maps.marker.AdvancedMarkerElement(f)}const u={position:n,zIndex:a,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(u)}}function UE(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}class $a{constructor(){UE($a,google.maps.OverlayView)}}var Do;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"})(Do||(Do={}));const WE=(e,t,n)=>{n.fitBounds(t.bounds)};class HE extends $a{constructor({map:t,markers:n=[],algorithmOptions:r={},algorithm:o=new NE(r),renderer:i=new $E,onClusterClick:s=WE}){super(),this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=s,t&&this.setMap(t)}addMarker(t,n){this.markers.includes(t)||(this.markers.push(t),n||this.render())}addMarkers(t,n){t.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(t,n){const r=this.markers.indexOf(t);return r===-1?!1:(un.setMap(t,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(t,n){let r=!1;return t.forEach(o=>{r=this.removeMarker(o,!0)||r}),r&&!n&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,Do.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||r==null){const o=new Set;for(const s of n)s.markers.length==1&&o.add(s.markers[0]);const i=[];for(const s of this.clusters)s.marker!=null&&(s.markers.length==1?o.has(s.marker)||un.setMap(s.marker,null):i.push(s.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>i.forEach(s=>un.setMap(s,null)))}google.maps.event.trigger(this,Do.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>un.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new zE(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,t,n),r.markers.forEach(o=>un.setMap(o,null)),this.onClusterClick&&r.marker.addListener("click",o=>{google.maps.event.trigger(this,Do.CLUSTER_CLICK,r),this.onClusterClick(o,r,n)})),un.setMap(r.marker,n)})}}function VE(e){var t=rE(),n=c.useState(null),r=n[0],o=n[1];return c.useEffect(function(){if(t&&r===null){var i=new HE(Pe(Pe({},e),{map:t}));o(i)}},[t]),r}function qE(e){var t=e.children,n=e.options,r=VE(n);return r!==null?t(r):null}c.memo(qE);var Td={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Ad={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}};function ZE(e){var t=e.children,n=e.anchor,r=e.options,o=e.position,i=e.zIndex,s=e.onCloseClick,a=e.onDomReady,u=e.onContentChanged,l=e.onPositionChanged,f=e.onZindexChanged,d=e.onLoad,h=e.onUnmount,v=c.useContext(Ne),m=c.useState(null),g=m[0],p=m[1],E=c.useState(null),S=E[0],D=E[1],M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useRef(null);return c.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),c.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),c.useEffect(function(){o&&g!==null&&g.setPosition(o)},[o]),c.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),c.useEffect(function(){g&&s&&(S!==null&&google.maps.event.removeListener(S),D(google.maps.event.addListener(g,"closeclick",s)))},[s]),c.useEffect(function(){g&&a&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",a)))},[a]),c.useEffect(function(){g&&u&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(g,"content_changed",u)))},[u]),c.useEffect(function(){g&&l&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(g,"position_changed",l)))},[l]),c.useEffect(function(){g&&f&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),c.useEffect(function(){var I=new google.maps.InfoWindow(Pe({},r||{}));return p(I),Y.current=document.createElement("div"),s&&D(google.maps.event.addListener(I,"closeclick",s)),a&&w(google.maps.event.addListener(I,"domready",a)),u&&H(google.maps.event.addListener(I,"content_changed",u)),l&&_(google.maps.event.addListener(I,"position_changed",l)),f&&N(google.maps.event.addListener(I,"zindex_changed",f)),I.setContent(Y.current),o&&I.setPosition(o),i&&I.setZIndex(i),n?I.open(v,n):I.getPosition()?I.open(v):Tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),d&&d(I),function(){S&&google.maps.event.removeListener(S),O&&google.maps.event.removeListener(O),b&&google.maps.event.removeListener(b),V&&google.maps.event.removeListener(V),F&&google.maps.event.removeListener(F),h&&h(I),I.close()}},[]),Y.current?xn.createPortal(c.Children.only(t),Y.current):null}c.memo(ZE),function(e){pt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,o){o?r.open(n.context,o):r.getPosition()?r.open(n.context):Tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return t.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(Pe({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=qe({updaterMap:Ad,eventMap:Td,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},t.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Ad,eventMap:Td,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},t.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Ge(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},t.prototype.render=function(){return this.containerElement?xn.createPortal(c.Children.only(this.props.children),this.containerElement):null},t.contextType=Ne,t}(c.PureComponent);var Fd={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Id={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},GE={};function KE(e){var t=e.options,n=e.draggable,r=e.editable,o=e.visible,i=e.path,s=e.onDblClick,a=e.onDragEnd,u=e.onDragStart,l=e.onMouseDown,f=e.onMouseMove,d=e.onMouseOut,h=e.onMouseOver,v=e.onMouseUp,m=e.onRightClick,g=e.onClick,p=e.onDrag,E=e.onLoad,S=e.onUnmount,D=c.useContext(Ne),M=c.useState(null),b=M[0],w=M[1],L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1];return c.useEffect(function(){b!==null&&b.setMap(D)},[D]),c.useEffect(function(){typeof t<"u"&&b!==null&&b.setOptions(t)},[b,t]),c.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),c.useEffect(function(){typeof o<"u"&&b!==null&&b.setVisible(o)},[b,o]),c.useEffect(function(){typeof i<"u"&&b!==null&&b.setPath(i)},[b,i]),c.useEffect(function(){b&&s&&(O!==null&&google.maps.event.removeListener(O),H(google.maps.event.addListener(b,"dblclick",s)))},[s]),c.useEffect(function(){b&&a&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(b,"dragend",a)))},[a]),c.useEffect(function(){b&&u&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(function(){b&&l&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(function(){b&&d&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(b,"mouseout",d)))},[d]),c.useEffect(function(){b&&h&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(b,"mouseover",h)))},[h]),c.useEffect(function(){b&&v&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(b,"mouseup",v)))},[v]),c.useEffect(function(){b&&m&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(b,"rightclick",m)))},[m]),c.useEffect(function(){b&&g&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(b,"click",g)))},[g]),c.useEffect(function(){b&&p&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(b,"drag",p)))},[p]),c.useEffect(function(){var le=new google.maps.Polyline(Pe(Pe({},t||GE),{map:D}));return i&&le.setPath(i),typeof o<"u"&&le.setVisible(o),typeof r<"u"&&le.setEditable(r),typeof n<"u"&&le.setDraggable(n),s&&H(google.maps.event.addListener(le,"dblclick",s)),a&&_(google.maps.event.addListener(le,"dragend",a)),u&&N(google.maps.event.addListener(le,"dragstart",u)),l&&Q(google.maps.event.addListener(le,"mousedown",l)),f&&T(google.maps.event.addListener(le,"mousemove",f)),d&&K(google.maps.event.addListener(le,"mouseout",d)),h&&z(google.maps.event.addListener(le,"mouseover",h)),v&&X(google.maps.event.addListener(le,"mouseup",v)),m&&se(google.maps.event.addListener(le,"rightclick",m)),g&&he(google.maps.event.addListener(le,"click",g)),p&&me(google.maps.event.addListener(le,"drag",p)),w(le),E&&E(le),function(){O!==null&&google.maps.event.removeListener(O),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),S&&S(le),le.setMap(null)}},[]),null}c.memo(KE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Polyline(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:Id,eventMap:Fd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},t.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Id,eventMap:Fd,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},t.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Ge(this.registeredEvents),this.state.polyline.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var _d={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Rd={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}};function YE(e){var t=e.options,n=e.draggable,r=e.editable,o=e.visible,i=e.path,s=e.paths,a=e.onDblClick,u=e.onDragEnd,l=e.onDragStart,f=e.onMouseDown,d=e.onMouseMove,h=e.onMouseOut,v=e.onMouseOver,m=e.onMouseUp,g=e.onRightClick,p=e.onClick,E=e.onDrag,S=e.onLoad,D=e.onUnmount,M=e.onEdit,b=c.useContext(Ne),w=c.useState(null),L=w[0],O=w[1],H=c.useState(null),P=H[0],V=H[1],_=c.useState(null),R=_[0],F=_[1],N=c.useState(null),Y=N[0],I=N[1],Q=c.useState(null),ne=Q[0],k=Q[1],T=c.useState(null),Z=T[0],$=T[1],K=c.useState(null),G=K[0],y=K[1],z=c.useState(null),W=z[0],B=z[1],X=c.useState(null),ee=X[0],j=X[1],se=c.useState(null),ae=se[0],fe=se[1],he=c.useState(null),be=he[0],ve=he[1],me=c.useState(null),le=me[0],Me=me[1];return c.useEffect(function(){L!==null&&L.setMap(b)},[b]),c.useEffect(function(){typeof t<"u"&&L!==null&&L.setOptions(t)},[L,t]),c.useEffect(function(){typeof n<"u"&&L!==null&&L.setDraggable(n)},[L,n]),c.useEffect(function(){typeof r<"u"&&L!==null&&L.setEditable(r)},[L,r]),c.useEffect(function(){typeof o<"u"&&L!==null&&L.setVisible(o)},[L,o]),c.useEffect(function(){typeof i<"u"&&L!==null&&L.setPath(i)},[L,i]),c.useEffect(function(){typeof s<"u"&&L!==null&&L.setPaths(s)},[L,s]),c.useEffect(function(){L&&a&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(L,"dblclick",a)))},[a]),c.useEffect(function(){L&&(google.maps.event.addListener(L.getPath(),"insert_at",function(){M==null||M(L)}),google.maps.event.addListener(L.getPath(),"set_at",function(){M==null||M(L)}))},[L,M]),c.useEffect(function(){L&&u&&(R!==null&&google.maps.event.removeListener(R),F(google.maps.event.addListener(L,"dragend",u)))},[u]),c.useEffect(function(){L&&l&&(Y!==null&&google.maps.event.removeListener(Y),I(google.maps.event.addListener(L,"dragstart",l)))},[l]),c.useEffect(function(){L&&f&&(ne!==null&&google.maps.event.removeListener(ne),k(google.maps.event.addListener(L,"mousedown",f)))},[f]),c.useEffect(function(){L&&d&&(Z!==null&&google.maps.event.removeListener(Z),$(google.maps.event.addListener(L,"mousemove",d)))},[d]),c.useEffect(function(){L&&h&&(G!==null&&google.maps.event.removeListener(G),y(google.maps.event.addListener(L,"mouseout",h)))},[h]),c.useEffect(function(){L&&v&&(W!==null&&google.maps.event.removeListener(W),B(google.maps.event.addListener(L,"mouseover",v)))},[v]),c.useEffect(function(){L&&m&&(ee!==null&&google.maps.event.removeListener(ee),j(google.maps.event.addListener(L,"mouseup",m)))},[m]),c.useEffect(function(){L&&g&&(ae!==null&&google.maps.event.removeListener(ae),fe(google.maps.event.addListener(L,"rightclick",g)))},[g]),c.useEffect(function(){L&&p&&(be!==null&&google.maps.event.removeListener(be),ve(google.maps.event.addListener(L,"click",p)))},[p]),c.useEffect(function(){L&&E&&(le!==null&&google.maps.event.removeListener(le),Me(google.maps.event.addListener(L,"drag",E)))},[E]),c.useEffect(function(){var oe=new google.maps.Polygon(Pe(Pe({},t||{}),{map:b}));return i&&oe.setPath(i),s&&oe.setPaths(s),typeof o<"u"&&oe.setVisible(o),typeof r<"u"&&oe.setEditable(r),typeof n<"u"&&oe.setDraggable(n),a&&V(google.maps.event.addListener(oe,"dblclick",a)),u&&F(google.maps.event.addListener(oe,"dragend",u)),l&&I(google.maps.event.addListener(oe,"dragstart",l)),f&&k(google.maps.event.addListener(oe,"mousedown",f)),d&&$(google.maps.event.addListener(oe,"mousemove",d)),h&&y(google.maps.event.addListener(oe,"mouseout",h)),v&&B(google.maps.event.addListener(oe,"mouseover",v)),m&&j(google.maps.event.addListener(oe,"mouseup",m)),g&&fe(google.maps.event.addListener(oe,"rightclick",g)),p&&ve(google.maps.event.addListener(oe,"click",p)),E&&Me(google.maps.event.addListener(oe,"drag",E)),O(oe),S&&S(oe),function(){P!==null&&google.maps.event.removeListener(P),R!==null&&google.maps.event.removeListener(R),Y!==null&&google.maps.event.removeListener(Y),ne!==null&&google.maps.event.removeListener(ne),Z!==null&&google.maps.event.removeListener(Z),G!==null&&google.maps.event.removeListener(G),W!==null&&google.maps.event.removeListener(W),ee!==null&&google.maps.event.removeListener(ee),ae!==null&&google.maps.event.removeListener(ae),be!==null&&google.maps.event.removeListener(be),D&&D(oe),oe.setMap(null)}},[]),null}c.memo(YE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Polygon(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:Rd,eventMap:_d,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},t.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Rd,eventMap:_d,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},t.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Ge(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var jd={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"},Nd={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}};function XE(e){var t=e.options,n=e.bounds,r=e.draggable,o=e.editable,i=e.visible,s=e.onDblClick,a=e.onDragEnd,u=e.onDragStart,l=e.onMouseDown,f=e.onMouseMove,d=e.onMouseOut,h=e.onMouseOver,v=e.onMouseUp,m=e.onRightClick,g=e.onClick,p=e.onDrag,E=e.onBoundsChanged,S=e.onLoad,D=e.onUnmount,M=c.useContext(Ne),b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1],I=c.useState(null),Q=I[0],ne=I[1],k=c.useState(null),T=k[0],Z=k[1],$=c.useState(null),K=$[0],G=$[1],y=c.useState(null),z=y[0],W=y[1],B=c.useState(null),X=B[0],ee=B[1],j=c.useState(null),se=j[0],ae=j[1],fe=c.useState(null),he=fe[0],be=fe[1],ve=c.useState(null),me=ve[0],le=ve[1],Me=c.useState(null),oe=Me[0],Ae=Me[1];return c.useEffect(function(){w!==null&&w.setMap(M)},[M]),c.useEffect(function(){typeof t<"u"&&w!==null&&w.setOptions(t)},[w,t]),c.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(function(){typeof o<"u"&&w!==null&&w.setEditable(o)},[w,o]),c.useEffect(function(){typeof i<"u"&&w!==null&&w.setVisible(i)},[w,i]),c.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),c.useEffect(function(){w&&s&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(w,"dblclick",s)))},[s]),c.useEffect(function(){w&&a&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(w,"dragend",a)))},[a]),c.useEffect(function(){w&&u&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(function(){w&&l&&(Q!==null&&google.maps.event.removeListener(Q),ne(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(function(){w&&f&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(function(){w&&d&&(K!==null&&google.maps.event.removeListener(K),G(google.maps.event.addListener(w,"mouseout",d)))},[d]),c.useEffect(function(){w&&h&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(function(){w&&v&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(w,"mouseup",v)))},[v]),c.useEffect(function(){w&&m&&(se!==null&&google.maps.event.removeListener(se),ae(google.maps.event.addListener(w,"rightclick",m)))},[m]),c.useEffect(function(){w&&g&&(he!==null&&google.maps.event.removeListener(he),be(google.maps.event.addListener(w,"click",g)))},[g]),c.useEffect(function(){w&&p&&(me!==null&&google.maps.event.removeListener(me),le(google.maps.event.addListener(w,"drag",p)))},[p]),c.useEffect(function(){w&&E&&(oe!==null&&google.maps.event.removeListener(oe),Ae(google.maps.event.addListener(w,"bounds_changed",E)))},[E]),c.useEffect(function(){var ie=new google.maps.Rectangle(Pe(Pe({},t||{}),{map:M}));return typeof i<"u"&&ie.setVisible(i),typeof o<"u"&&ie.setEditable(o),typeof r<"u"&&ie.setDraggable(r),typeof n<"u"&&ie.setBounds(n),s&&P(google.maps.event.addListener(ie,"dblclick",s)),a&&R(google.maps.event.addListener(ie,"dragend",a)),u&&Y(google.maps.event.addListener(ie,"dragstart",u)),l&&ne(google.maps.event.addListener(ie,"mousedown",l)),f&&Z(google.maps.event.addListener(ie,"mousemove",f)),d&&G(google.maps.event.addListener(ie,"mouseout",d)),h&&W(google.maps.event.addListener(ie,"mouseover",h)),v&&ee(google.maps.event.addListener(ie,"mouseup",v)),m&&ae(google.maps.event.addListener(ie,"rightclick",m)),g&&be(google.maps.event.addListener(ie,"click",g)),p&&le(google.maps.event.addListener(ie,"drag",p)),E&&Ae(google.maps.event.addListener(ie,"bounds_changed",E)),L(ie),S&&S(ie),function(){H!==null&&google.maps.event.removeListener(H),_!==null&&google.maps.event.removeListener(_),N!==null&&google.maps.event.removeListener(N),Q!==null&&google.maps.event.removeListener(Q),T!==null&&google.maps.event.removeListener(T),K!==null&&google.maps.event.removeListener(K),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),me!==null&&google.maps.event.removeListener(me),oe!==null&&google.maps.event.removeListener(oe),D&&D(ie),ie.setMap(null)}},[]),null}c.memo(XE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:Nd,eventMap:jd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},t.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Nd,eventMap:jd,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},t.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Ge(this.registeredEvents),this.state.rectangle.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var zd={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"},$d={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},JE={};function QE(e){var t=e.options,n=e.center,r=e.radius,o=e.draggable,i=e.editable,s=e.visible,a=e.onDblClick,u=e.onDragEnd,l=e.onDragStart,f=e.onMouseDown,d=e.onMouseMove,h=e.onMouseOut,v=e.onMouseOver,m=e.onMouseUp,g=e.onRightClick,p=e.onClick,E=e.onDrag,S=e.onCenterChanged,D=e.onRadiusChanged,M=e.onLoad,b=e.onUnmount,w=c.useContext(Ne),L=c.useState(null),O=L[0],H=L[1],P=c.useState(null),V=P[0],_=P[1],R=c.useState(null),F=R[0],N=R[1],Y=c.useState(null),I=Y[0],Q=Y[1],ne=c.useState(null),k=ne[0],T=ne[1],Z=c.useState(null),$=Z[0],K=Z[1],G=c.useState(null),y=G[0],z=G[1],W=c.useState(null),B=W[0],X=W[1],ee=c.useState(null),j=ee[0],se=ee[1],ae=c.useState(null),fe=ae[0],he=ae[1],be=c.useState(null),ve=be[0],me=be[1],le=c.useState(null),Me=le[0],oe=le[1],Ae=c.useState(null),ie=Ae[0],Se=Ae[1],Be=c.useState(null),Re=Be[0],Xe=Be[1];return c.useEffect(function(){O!==null&&O.setMap(w)},[w]),c.useEffect(function(){typeof t<"u"&&O!==null&&O.setOptions(t)},[O,t]),c.useEffect(function(){typeof o<"u"&&O!==null&&O.setDraggable(o)},[O,o]),c.useEffect(function(){typeof i<"u"&&O!==null&&O.setEditable(i)},[O,i]),c.useEffect(function(){typeof s<"u"&&O!==null&&O.setVisible(s)},[O,s]),c.useEffect(function(){typeof r=="number"&&O!==null&&O.setRadius(r)},[O,r]),c.useEffect(function(){typeof n<"u"&&O!==null&&O.setCenter(n)},[O,n]),c.useEffect(function(){O&&a&&(V!==null&&google.maps.event.removeListener(V),_(google.maps.event.addListener(O,"dblclick",a)))},[a]),c.useEffect(function(){O&&u&&(F!==null&&google.maps.event.removeListener(F),N(google.maps.event.addListener(O,"dragend",u)))},[u]),c.useEffect(function(){O&&l&&(I!==null&&google.maps.event.removeListener(I),Q(google.maps.event.addListener(O,"dragstart",l)))},[l]),c.useEffect(function(){O&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(O,"mousedown",f)))},[f]),c.useEffect(function(){O&&d&&($!==null&&google.maps.event.removeListener($),K(google.maps.event.addListener(O,"mousemove",d)))},[d]),c.useEffect(function(){O&&h&&(y!==null&&google.maps.event.removeListener(y),z(google.maps.event.addListener(O,"mouseout",h)))},[h]),c.useEffect(function(){O&&v&&(B!==null&&google.maps.event.removeListener(B),X(google.maps.event.addListener(O,"mouseover",v)))},[v]),c.useEffect(function(){O&&m&&(j!==null&&google.maps.event.removeListener(j),se(google.maps.event.addListener(O,"mouseup",m)))},[m]),c.useEffect(function(){O&&g&&(fe!==null&&google.maps.event.removeListener(fe),he(google.maps.event.addListener(O,"rightclick",g)))},[g]),c.useEffect(function(){O&&p&&(ve!==null&&google.maps.event.removeListener(ve),me(google.maps.event.addListener(O,"click",p)))},[p]),c.useEffect(function(){O&&E&&(Me!==null&&google.maps.event.removeListener(Me),oe(google.maps.event.addListener(O,"drag",E)))},[E]),c.useEffect(function(){O&&S&&(ie!==null&&google.maps.event.removeListener(ie),Se(google.maps.event.addListener(O,"center_changed",S)))},[p]),c.useEffect(function(){O&&D&&(Re!==null&&google.maps.event.removeListener(Re),Xe(google.maps.event.addListener(O,"radius_changed",D)))},[D]),c.useEffect(function(){var Ce=new google.maps.Circle(Pe(Pe({},t||JE),{map:w}));return typeof r=="number"&&Ce.setRadius(r),typeof n<"u"&&Ce.setCenter(n),typeof r=="number"&&Ce.setRadius(r),typeof s<"u"&&Ce.setVisible(s),typeof i<"u"&&Ce.setEditable(i),typeof o<"u"&&Ce.setDraggable(o),a&&_(google.maps.event.addListener(Ce,"dblclick",a)),u&&N(google.maps.event.addListener(Ce,"dragend",u)),l&&Q(google.maps.event.addListener(Ce,"dragstart",l)),f&&T(google.maps.event.addListener(Ce,"mousedown",f)),d&&K(google.maps.event.addListener(Ce,"mousemove",d)),h&&z(google.maps.event.addListener(Ce,"mouseout",h)),v&&X(google.maps.event.addListener(Ce,"mouseover",v)),m&&se(google.maps.event.addListener(Ce,"mouseup",m)),g&&he(google.maps.event.addListener(Ce,"rightclick",g)),p&&me(google.maps.event.addListener(Ce,"click",p)),E&&oe(google.maps.event.addListener(Ce,"drag",E)),S&&Se(google.maps.event.addListener(Ce,"center_changed",S)),D&&Xe(google.maps.event.addListener(Ce,"radius_changed",D)),H(Ce),M&&M(Ce),function(){V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),y!==null&&google.maps.event.removeListener(y),B!==null&&google.maps.event.removeListener(B),j!==null&&google.maps.event.removeListener(j),fe!==null&&google.maps.event.removeListener(fe),ve!==null&&google.maps.event.removeListener(ve),ie!==null&&google.maps.event.removeListener(ie),Re!==null&&google.maps.event.removeListener(Re),b&&b(Ce),Ce.setMap(null)}},[]),null}c.memo(QE),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.Circle(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:$d,eventMap:zd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},t.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:$d,eventMap:zd,prevProps:n,nextProps:this.props,instance:this.state.circle}))},t.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Ge(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var Ud={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Wd={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,r){e.loadGeoJson(t,n,r)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}};function e1(e){var t=e.options,n=e.onClick,r=e.onDblClick,o=e.onMouseDown,i=e.onMouseMove,s=e.onMouseOut,a=e.onMouseOver,u=e.onMouseUp,l=e.onRightClick,f=e.onAddFeature,d=e.onRemoveFeature,h=e.onRemoveProperty,v=e.onSetGeometry,m=e.onSetProperty,g=e.onLoad,p=e.onUnmount,E=c.useContext(Ne),S=c.useState(null),D=S[0],M=S[1],b=c.useState(null),w=b[0],L=b[1],O=c.useState(null),H=O[0],P=O[1],V=c.useState(null),_=V[0],R=V[1],F=c.useState(null),N=F[0],Y=F[1],I=c.useState(null),Q=I[0],ne=I[1],k=c.useState(null),T=k[0],Z=k[1],$=c.useState(null),K=$[0],G=$[1],y=c.useState(null),z=y[0],W=y[1],B=c.useState(null),X=B[0],ee=B[1],j=c.useState(null),se=j[0],ae=j[1],fe=c.useState(null),he=fe[0],be=fe[1],ve=c.useState(null),me=ve[0],le=ve[1],Me=c.useState(null),oe=Me[0],Ae=Me[1];return c.useEffect(function(){D!==null&&D.setMap(E)},[E]),c.useEffect(function(){D&&r&&(w!==null&&google.maps.event.removeListener(w),L(google.maps.event.addListener(D,"dblclick",r)))},[r]),c.useEffect(function(){D&&o&&(H!==null&&google.maps.event.removeListener(H),P(google.maps.event.addListener(D,"mousedown",o)))},[o]),c.useEffect(function(){D&&i&&(_!==null&&google.maps.event.removeListener(_),R(google.maps.event.addListener(D,"mousemove",i)))},[i]),c.useEffect(function(){D&&s&&(N!==null&&google.maps.event.removeListener(N),Y(google.maps.event.addListener(D,"mouseout",s)))},[s]),c.useEffect(function(){D&&a&&(Q!==null&&google.maps.event.removeListener(Q),ne(google.maps.event.addListener(D,"mouseover",a)))},[a]),c.useEffect(function(){D&&u&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(D,"mouseup",u)))},[u]),c.useEffect(function(){D&&l&&(K!==null&&google.maps.event.removeListener(K),G(google.maps.event.addListener(D,"rightclick",l)))},[l]),c.useEffect(function(){D&&n&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(D,"click",n)))},[n]),c.useEffect(function(){D&&f&&(X!==null&&google.maps.event.removeListener(X),ee(google.maps.event.addListener(D,"addfeature",f)))},[f]),c.useEffect(function(){D&&d&&(se!==null&&google.maps.event.removeListener(se),ae(google.maps.event.addListener(D,"removefeature",d)))},[d]),c.useEffect(function(){D&&h&&(he!==null&&google.maps.event.removeListener(he),be(google.maps.event.addListener(D,"removeproperty",h)))},[h]),c.useEffect(function(){D&&v&&(me!==null&&google.maps.event.removeListener(me),le(google.maps.event.addListener(D,"setgeometry",v)))},[v]),c.useEffect(function(){D&&m&&(oe!==null&&google.maps.event.removeListener(oe),Ae(google.maps.event.addListener(D,"setproperty",m)))},[m]),c.useEffect(function(){if(E!==null){var ie=new google.maps.Data(Pe(Pe({},t||{}),{map:E}));r&&L(google.maps.event.addListener(ie,"dblclick",r)),o&&P(google.maps.event.addListener(ie,"mousedown",o)),i&&R(google.maps.event.addListener(ie,"mousemove",i)),s&&Y(google.maps.event.addListener(ie,"mouseout",s)),a&&ne(google.maps.event.addListener(ie,"mouseover",a)),u&&Z(google.maps.event.addListener(ie,"mouseup",u)),l&&G(google.maps.event.addListener(ie,"rightclick",l)),n&&W(google.maps.event.addListener(ie,"click",n)),f&&ee(google.maps.event.addListener(ie,"addfeature",f)),d&&ae(google.maps.event.addListener(ie,"removefeature",d)),h&&be(google.maps.event.addListener(ie,"removeproperty",h)),v&&le(google.maps.event.addListener(ie,"setgeometry",v)),m&&Ae(google.maps.event.addListener(ie,"setproperty",m)),M(ie),g&&g(ie)}return function(){D&&(w!==null&&google.maps.event.removeListener(w),H!==null&&google.maps.event.removeListener(H),_!==null&&google.maps.event.removeListener(_),N!==null&&google.maps.event.removeListener(N),Q!==null&&google.maps.event.removeListener(Q),T!==null&&google.maps.event.removeListener(T),K!==null&&google.maps.event.removeListener(K),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),se!==null&&google.maps.event.removeListener(se),he!==null&&google.maps.event.removeListener(he),me!==null&&google.maps.event.removeListener(me),oe!==null&&google.maps.event.removeListener(oe),p&&p(D),D.setMap(null))}},[]),null}c.memo(e1),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(Pe(Pe({},this.props.options||{}),{map:this.context}));this.registeredEvents=qe({updaterMap:Wd,eventMap:Ud,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},t.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Wd,eventMap:Ud,prevProps:n,nextProps:this.props,instance:this.state.data}))},t.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Ge(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var Hd={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Vd={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(Pe(Pe({},this.props.options),{map:this.context}));this.registeredEvents=qe({updaterMap:Vd,eventMap:Hd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},t.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Vd,eventMap:Hd,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},t.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Ge(this.registeredEvents),this.state.kmlLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t})(c.PureComponent);function qd(e,t){return typeof t=="function"?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function t1(e,t){return new t(e.lat,e.lng)}function n1(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function r1(e,t,n){return e instanceof t?e:n(e,t)}function o1(e,t,n){return e instanceof t?e:n(e,t)}function i1(e,t,n){var r=e&&e.fromLatLngToDivPixel(n.getNorthEast()),o=e&&e.fromLatLngToDivPixel(n.getSouthWest());return r&&o?{left:"".concat(o.x+t.x,"px"),top:"".concat(r.y+t.y,"px"),width:"".concat(r.x-o.x-t.x,"px"),height:"".concat(o.y-r.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}function s1(e,t,n){var r=e&&e.fromLatLngToDivPixel(n);if(r){var o=r.x,i=r.y;return{left:"".concat(o+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}function Zd(e,t,n,r){return n!==void 0?i1(e,t,o1(n,google.maps.LatLngBounds,n1)):s1(e,t,r1(r,google.maps.LatLng,t1))}function a1(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.height&&e.height===t.height}function u1(e,t,n,r,o){var i=function(s){pt(a,s);function a(u,l,f,d){var h=s.call(this)||this;return h.container=u,h.pane=l,h.position=f,h.bounds=d,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=Pe({},this.container?qd(this.container,o):{x:0,y:0}),f=Zd(u,l,this.bounds,this.position),d=0,h=Object.entries(f);d<h.length;d++){var v=h[d],m=v[0],g=v[1];this.container.style[m]=g}},a.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},a}(google.maps.OverlayView);return new i(e,t,n,r)}function Gd(e){if(!e)return"";var t=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e.lat,e.lng);return t+""}function Kd(e){if(!e)return"";var t=e instanceof google.maps.LatLngBounds?e:new google.maps.LatLngBounds(new google.maps.LatLng(e.south,e.east),new google.maps.LatLng(e.north,e.west));return t+""}function l1(e){var t=e.position,n=e.bounds,r=e.mapPaneName,o=e.zIndex,i=e.onLoad,s=e.onUnmount,a=e.getPixelPositionOffset,u=e.children,l=c.useContext(Ne),f=c.useMemo(function(){var h=document.createElement("div");return h.style.position="absolute",h},[]),d=c.useMemo(function(){return u1(f,r,t,n,a)},[f,r,t,n]);return c.useEffect(function(){return i==null||i(d),d==null||d.setMap(l),function(){s==null||s(d),d==null||d.setMap(null)}},[l,d]),c.useEffect(function(){f.style.zIndex="".concat(o)},[o,f]),pi.createPortal(u,f)}c.memo(l1),function(e){pt(t,e);function t(n){var r=e.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var i=r.props.mapPaneName,s=r.overlayView.getPanes();Tt(!!i,"OverlayView requires props.mapPaneName but got %s",i),s?r.setState({paneEl:s[i]}):r.setState({paneEl:null})},r.onAdd=function(){var i,s;r.updatePane(),(s=(i=r.props).onLoad)===null||s===void 0||s.call(i,r.overlayView)},r.onPositionElement=function(){var i=r.overlayView.getProjection(),s=Pe({x:0,y:0},r.containerRef.current?qd(r.containerRef.current,r.props.getPixelPositionOffset):{}),a=Zd(i,s,r.props.bounds,r.props.position),u=r.state.containerStyle,l=u.left,f=u.top,d=u.width,h=u.height;a1(a,{left:l,top:f,width:d,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 i,s;r.setState(function(){return{paneEl:null}}),(s=(i=r.props).onUnmount)===null||s===void 0||s.call(i,r.overlayView)},r.containerRef=c.createRef();var o=new google.maps.OverlayView;return o.onAdd=r.onAdd,o.draw=r.draw,o.onRemove=r.onRemove,r.overlayView=o,r}return t.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},t.prototype.componentDidUpdate=function(n){var r=Gd(n.position),o=Gd(this.props.position),i=Kd(n.bounds),s=Kd(this.props.bounds);(r!==o||i!==s)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},t.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},t.prototype.render=function(){var n=this.state.paneEl;return n?pi.createPortal(tt.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),n):null},t.FLOAT_PANE="floatPane",t.MAP_PANE="mapPane",t.MARKER_LAYER="markerLayer",t.OVERLAY_LAYER="overlayLayer",t.OVERLAY_MOUSE_TARGET="overlayMouseTarget",t.contextType=Ne,t}(c.PureComponent);function c1(){}var Yd={onDblClick:"dblclick",onClick:"click"},Xd={opacity:function(e,t){e.setOpacity(t)}};function f1(e){var t=e.url,n=e.bounds,r=e.options,o=e.visible,i=c.useContext(Ne),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(t,s,Pe({},r));return u},[]);return c.useEffect(function(){a!==null&&a.setMap(i)},[i]),c.useEffect(function(){typeof t<"u"&&a!==null&&(a.set("url",t),a.setMap(i))},[a,t]),c.useEffect(function(){typeof o<"u"&&a!==null&&a.setOpacity(o?1:0)},[a,o]),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(i))},[a,n]),null}c.memo(f1),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Tt(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Pe(Pe({},this.props.options),{map:this.context}));this.registeredEvents=qe({updaterMap:Xd,eventMap:Yd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},t.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Xd,eventMap:Yd,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},t.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},t.prototype.render=function(){return null},t.defaultProps={onLoad:c1},t.contextType=Ne,t}(c.PureComponent);var Jd={},Qd={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}};function d1(e){var t=e.data,n=e.onLoad,r=e.onUnmount,o=e.options,i=c.useContext(Ne),s=c.useState(null),a=s[0],u=s[1];return c.useEffect(function(){google.maps.visualization||Tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(function(){Tt(!!t,"data property is required in HeatmapLayer %s",t)},[t]),c.useEffect(function(){a!==null&&a.setMap(i)},[i]),c.useEffect(function(){o&&a!==null&&a.setOptions(o)},[a,o]),c.useEffect(function(){var l=new google.maps.visualization.HeatmapLayer(Pe(Pe({},o||{}),{data:t,map:i}));return u(l),n&&n(l),function(){a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(d1),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Tt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(Pe(Pe({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=qe({updaterMap:Qd,eventMap:Jd,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},t.prototype.componentDidUpdate=function(n){Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:Qd,eventMap:Jd,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},t.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Ge(this.registeredEvents),this.state.heatmapLayer.setMap(null))},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent);var ep={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},tp={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n,r,o=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=qe({updaterMap:tp,eventMap:ep,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{streetViewPanorama:o}},this.setStreetViewPanoramaCallback)},t.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:tp,eventMap:ep,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},t.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Ge(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},t.prototype.render=function(){return null},t.contextType=Ne,t})(c.PureComponent),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},t.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},t.prototype.render=function(){return null},t.contextType=Ne,t}(c.PureComponent),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Tt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},t.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},t.prototype.render=function(){return null},t}(c.PureComponent);var np={onDirectionsChanged:"directions_changed"},rp={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=qe({updaterMap:rp,eventMap:np,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},t.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:rp,eventMap:np,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},t.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Ge(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},t.prototype.render=function(){return tt.jsx(tt.Fragment,{})},t.contextType=Ne,t})(c.PureComponent),function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){Tt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},t.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},t.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},t.prototype.render=function(){return null},t}(c.PureComponent);var op={onPlacesChanged:"places_changed"},ip={bounds:function(e,t){e.setBounds(t)}};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){if(Tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=qe({updaterMap:ip,eventMap:op,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},t.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:ip,eventMap:op,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},t.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Ge(this.registeredEvents))},t.prototype.render=function(){return tt.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})},t.contextType=Ne,t})(c.PureComponent);var sp={onPlaceChanged:"place_changed"},ap={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}};(function(e){pt(t,e);function t(){var n=e!==null&&e.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 t.prototype.componentDidMount=function(){var n;Tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var o=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=qe({updaterMap:ap,eventMap:sp,prevProps:{},nextProps:this.props,instance:o}),this.setState(function(){return{autocomplete:o}},this.setAutocompleteCallback)}},t.prototype.componentDidUpdate=function(n){Ge(this.registeredEvents),this.registeredEvents=qe({updaterMap:ap,eventMap:sp,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},t.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Ge(this.registeredEvents)},t.prototype.render=function(){return tt.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})},t.defaultProps={className:""},t.contextType=Ne,t})(c.PureComponent);function up(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",loadingText:o,size:i="md",leftIcon:s,rightIcon:a,disabled:u,className:l="",children:f,...d}=e,h={xs:12,sm:16,md:20,lg:24}[i],v=`arkynButton ${t?"loadingTrue":"loadingFalse"} ${r} ${n} ${i} ${o?"loadingTextTrue":"loadingTextFalse"} ${l}`;return tt.jsxs("button",{className:v,disabled:u||t,...d,children:[tt.jsxs("div",{className:"arkynButtonSpinner",children:[tt.jsx(Ue.Loader2,{size:h,strokeWidth:2.5}),o&&o]}),tt.jsxs("div",{className:"arkynButtonContent",children:[nd(h,s),f,nd(h,a)]})]})}function p1(){const e=on.useActionData(),t=on.useNavigation(),n=on.useFetchers(),[r,o]=c.useState(null);function i(l,f){return JSON.stringify(l)===JSON.stringify(f)}function s(){r&&o(null)}c.useEffect(()=>{var l,f;let d=((f=(l=n[0])==null?void 0:l.data)==null?void 0:f.fieldErrors)||{};i(r,d)||Object.entries(d).length!==0&&o(d)},[n,e]),c.useEffect(()=>{var l;((l=n[0])==null?void 0:l.state)==="submitting"&&s()},[n,t]);const a=(e==null?void 0:e.fieldErrors)||r;let u={};return Object.entries(a||{}).forEach(([l,f])=>{typeof f=="string"&&typeof l=="string"&&(u[l]=f)}),u}c.createContext({});function h1(e){return e&&e.replace(/[^0-9]/g,"")}h1({CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"}.CNPJ).length,c.forwardRef((e,t)=>tt.jsx("input",{ref:t,...e}));function g1(e){const{isLoading:t=!1,scheme:n="primary",variant:r="solid",size:o="md",icon:i,disabled:s,className:a="",...u}=e,l={xs:12,sm:16,md:20,lg:24},f=`arkynIconButton ${r} ${n} ${o} ${t?"loadingTrue":"loadingFalse"} ${a}`;return tt.jsxs("button",{disabled:s||t,className:f.trim(),...u,children:[tt.jsx("div",{className:"arkynIconButtonSpinner",children:tt.jsx(Ue.Loader2,{size:l[o],strokeWidth:2.5})}),tt.jsx("div",{className:"arkynIconButtonContent",children:tt.jsx(i,{size:l[o],strokeWidth:2.5})})]})}c.createContext({});var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});for(var v1=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ua={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},lp={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:v1?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Wa={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},xi=1;xi<20;xi++)Wa["f"+xi]=111+xi;function Si(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(s){return cp(s,t)}),o=function(s){return r.some(function(a){return fp(a,s)})},i=n==null?o:o(n);return i}function m1(e,t){return Si(e,t)}function y1(e,t){return Si(e,{byKey:!0},t)}function cp(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var o=e.split("+"),i=o.length;for(var s in Ua)r[Ua[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var f=o[Symbol.iterator](),d;!(a=(d=f.next()).done);a=!0){var h=d.value,v=h.endsWith("?")&&h.length>1;v&&(h=h.slice(0,-1));var m=Ha(h),g=Ua[m];if(h.length>1&&!g&&!lp[h]&&!Wa[m])throw new TypeError('Unknown modifier: "'+h+'"');(i===1||!g)&&(n?r.key=m:r.which=dp(h)),g&&(r[g]=v?null:!0)}}catch(p){u=!0,l=p}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function fp(e,t){for(var n in e){var r=e[n],o=void 0;if(r!=null&&(n==="key"&&t.key!=null?o=t.key.toLowerCase():n==="which"?o=r===91&&t.which===93?91:t.which:o=t[n],!(o==null&&r===!1)&&o!==r))return!1}return!0}function dp(e){e=Ha(e);var t=Wa[e]||e.toUpperCase().charCodeAt(0);return t}function Ha(e){return e=e.toLowerCase(),e=lp[e]||e,e}Hn.default=Si;var Va=Hn.isHotkey=Si;Hn.isCodeHotkey=m1,Hn.isKeyHotkey=y1,Hn.parseHotkey=cp,Hn.compareHotkey=fp,Hn.toKeyCode=dp,Hn.toKeyName=Ha;/*!
|
142
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
143
|
+
*
|
144
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
145
|
+
* Released under the MIT License.
|
146
|
+
*/function pp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wt(e){var t,n;return pp(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(pp(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var hp=Symbol.for("immer-nothing"),gp=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state"),b1=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){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 '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"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(e){return`'current' expects a draft, got: ${e}`},"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(e){return`'original' expects a draft, got: ${e}`}]:[];function Qt(e,...t){if(process.env.NODE_ENV!=="production"){const n=b1[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var eo=Object.getPrototypeOf;function Fr(e){return!!e&&!!e[ln]}function Ir(e){var t;return e?vp(e)||Array.isArray(e)||!!e[gp]||!!((t=e.constructor)!=null&&t[gp])||ki(e)||Pi(e):!1}var C1=Object.prototype.constructor.toString();function vp(e){if(!e||typeof e!="object")return!1;const t=eo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===C1}function Li(e,t){Oi(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Oi(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:ki(e)?2:Pi(e)?3:0}function qa(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mp(e,t,n){const r=Oi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function E1(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ki(e){return e instanceof Map}function Pi(e){return e instanceof Set}function _r(e){return e.copy_||e.base_}function Za(e,t){if(ki(e))return new Map(e);if(Pi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=vp(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ln];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){const s=o[i],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:e[s]})}return Object.create(eo(e),r)}else{const r=eo(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Ga(e,t=!1){return Mi(e)||Fr(e)||!Ir(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=w1),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ga(r,!0))),e}function w1(){Qt(2)}function Mi(e){return Object.isFrozen(e)}var D1={};function Rr(e){const t=D1[e];return t||Qt(0,e),t}var xo;function yp(){return xo}function x1(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function bp(e,t){t&&(Rr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ka(e){Ya(e),e.drafts_.forEach(S1),e.drafts_=null}function Ya(e){e===xo&&(xo=e.parent_)}function Cp(e){return xo=x1(xo,e)}function S1(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ep(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ln].modified_&&(Ka(t),Qt(4)),Ir(e)&&(e=Bi(t,e),t.parent_||Ti(t,e)),t.patches_&&Rr("Patches").generateReplacementPatches_(n[ln].base_,e,t.patches_,t.inversePatches_)):e=Bi(t,n,[]),Ka(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hp?e:void 0}function Bi(e,t,n){if(Mi(t))return t;const r=t[ln];if(!r)return Li(t,(o,i)=>wp(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ti(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Li(i,(a,u)=>wp(e,r,o,a,u,n,s)),Ti(e,o,!1),n&&e.patches_&&Rr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function wp(e,t,n,r,o,i,s){if(process.env.NODE_ENV!=="production"&&o===n&&Qt(5),Fr(o)){const a=i&&t&&t.type_!==3&&!qa(t.assigned_,r)?i.concat(r):void 0,u=Bi(e,o,a);if(mp(n,r,u),Fr(u))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Ir(o)&&!Mi(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bi(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ti(e,o)}}function Ti(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ga(t,n)}function L1(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:yp(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Xa;n&&(o=[r],i=So);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var Xa={get(e,t){if(t===ln)return e;const n=_r(e);if(!qa(n,t))return O1(e,n,t);const r=n[t];return e.finalized_||!Ir(r)?r:r===Ja(e.base_,t)?(eu(e),e.copy_[t]=tu(r,e)):r},has(e,t){return t in _r(e)},ownKeys(e){return Reflect.ownKeys(_r(e))},set(e,t,n){const r=Dp(_r(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ja(_r(e),t),i=o==null?void 0:o[ln];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(E1(n,o)&&(n!==void 0||qa(e.base_,t)))return!0;eu(e),Qa(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ja(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,eu(e),Qa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=_r(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qt(11)},getPrototypeOf(e){return eo(e.base_)},setPrototypeOf(){Qt(12)}},So={};Li(Xa,(e,t)=>{So[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),So.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Qt(13),So.set.call(this,e,t,void 0)},So.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Qt(14),Xa.set.call(this,e[0],t,n,e[0])};function Ja(e,t){const n=e[ln];return(n?_r(n):e)[t]}function O1(e,t,n){var r;const o=Dp(t,n);return o?"value"in o?o.value:(r=o.get)==null?void 0:r.call(e.draft_):void 0}function Dp(e,t){if(!(t in e))return;let n=eo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=eo(n)}}function Qa(e){e.modified_||(e.modified_=!0,e.parent_&&Qa(e.parent_))}function eu(e){e.copy_||(e.copy_=Za(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var k1=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(a=i,...u){return s.produce(a,l=>n.call(this,l,...u))}}typeof n!="function"&&Qt(6),r!==void 0&&typeof r!="function"&&Qt(7);let o;if(Ir(t)){const i=Cp(this),s=tu(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?Ka(i):Ya(i)}return bp(i,r),Ep(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===hp&&(o=void 0),this.autoFreeze_&&Ga(o,!0),r){const i=[],s=[];Rr("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else Qt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...s)=>this.produceWithPatches(i,a=>t(a,...s));let r,o;return[this.produce(t,n,(i,s)=>{r=i,o=s}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ir(e)||Qt(8),Fr(e)&&(e=P1(e));const t=Cp(this),n=tu(e,void 0);return n[ln].isManual_=!0,Ya(t),n}finishDraft(e,t){const n=e&&e[ln];(!n||!n.isManual_)&&Qt(9);const{scope_:r}=n;return bp(r,t),Ep(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Rr("Patches").applyPatches_;return Fr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function tu(e,t){const n=ki(e)?Rr("MapSet").proxyMap_(e,t):Pi(e)?Rr("MapSet").proxySet_(e,t):L1(e,t);return(t?t.scope_:yp()).drafts_.push(n),n}function P1(e){return Fr(e)||Qt(10,e),xp(e)}function xp(e){if(!Ir(e)||Mi(e))return e;const t=e[ln];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Za(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Za(e,!0);return Li(n,(r,o)=>{mp(n,r,xp(o))}),t&&(t.finalized_=!1),n}var cn=new k1,nu=cn.produce;cn.produceWithPatches.bind(cn),cn.setAutoFreeze.bind(cn),cn.setUseStrictShallowCopy.bind(cn),cn.applyPatches.bind(cn);var Sp=cn.createDraft.bind(cn),Lp=cn.finishDraft.bind(cn),de={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=de.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r],i=t[r];if(o!==i)break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],s=t[n];return de.equals(r,o)&&i>s},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return de.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],s=t[n];return de.equals(r,o)&&i<s},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return de.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&de.compare(e,t)===0},isBefore(e,t){return de.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&de.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&de.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&de.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&de.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),o=e[e.length-1],i=t[t.length-1];return o!==i&&de.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!de.isAncestor(t,e)&&!de.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:o="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:i}=t;(de.equals(i,r)||de.endsBefore(i,r)||de.isAncestor(i,r))&&(r[i.length-1]+=1);break}case"remove_node":{var{path:s}=t;if(de.equals(s,r)||de.isAncestor(s,r))return null;de.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{var{path:a,position:u}=t;de.equals(a,r)||de.endsBefore(a,r)?r[a.length-1]-=1:de.isAncestor(a,r)&&(r[a.length-1]-=1,r[a.length]+=u);break}case"split_node":{var{path:l,position:f}=t;if(de.equals(l,r)){if(o==="forward")r[r.length-1]+=1;else if(o!=="backward")return null}else de.endsBefore(l,r)?r[l.length-1]+=1:de.isAncestor(l,r)&&e[l.length]>=f&&(r[l.length-1]+=1,r[l.length]-=f);break}case"move_node":{var{path:d,newPath:h}=t;if(de.equals(d,h))return r;if(de.isAncestor(d,r)||de.equals(d,r)){var v=h.slice();return de.endsBefore(d,h)&&d.length<h.length&&(v[d.length-1]-=1),v.concat(r.slice(d.length))}else de.isSibling(d,h)&&(de.isAncestor(h,r)||de.equals(h,r))?de.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:de.endsBefore(h,r)||de.equals(h,r)||de.isAncestor(h,r)?(de.endsBefore(d,r)&&(r[d.length-1]-=1),r[h.length-1]+=1):de.endsBefore(d,r)&&(de.equals(h,r)&&(r[h.length-1]+=1),r[d.length-1]-=1);break}}return r}};function Lo(e){"@babel/helpers - typeof";return Lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lo(e)}function M1(e,t){if(Lo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Lo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B1(e){var t=M1(e,"string");return Lo(t)==="symbol"?t:String(t)}function to(e,t,n){return t=B1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Op(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Op(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var T1=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:o}=n,i=_e.parent(e,r),s=r[r.length-1];if(s>i.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(i.children.splice(s,0,o),t)for(var[a,u]of We.points(t))t[u]=gt.transform(a,n);break}case"insert_text":{var{path:l,offset:f,text:d}=n;if(d.length===0)break;var h=_e.leaf(e,l),v=h.text.slice(0,f),m=h.text.slice(f);if(h.text=v+d+m,t)for(var[g,p]of We.points(t))t[p]=gt.transform(g,n);break}case"merge_node":{var{path:E}=n,S=_e.get(e,E),D=de.previous(E),M=_e.get(e,D),b=_e.parent(e,E),w=E[E.length-1];if(kt.isText(S)&&kt.isText(M))M.text+=S.text;else if(!kt.isText(S)&&!kt.isText(M))M.children.push(...S.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(E,"] to nodes of different interfaces: ").concat(fn.stringify(S)," ").concat(fn.stringify(M)));if(b.children.splice(w,1),t)for(var[L,O]of We.points(t))t[O]=gt.transform(L,n);break}case"move_node":{var{path:H,newPath:P}=n;if(de.isAncestor(H,P))throw new Error("Cannot move a path [".concat(H,"] to new path [").concat(P,"] because the destination is inside itself."));var V=_e.get(e,H),_=_e.parent(e,H),R=H[H.length-1];_.children.splice(R,1);var F=de.transform(H,n),N=_e.get(e,de.parent(F)),Y=F[F.length-1];if(N.children.splice(Y,0,V),t)for(var[I,Q]of We.points(t))t[Q]=gt.transform(I,n);break}case"remove_node":{var{path:ne}=n,k=ne[ne.length-1],T=_e.parent(e,ne);if(T.children.splice(k,1),t)for(var[Z,$]of We.points(t)){var K=gt.transform(Z,n);if(t!=null&&K!=null)t[$]=K;else{var G=void 0,y=void 0;for(var[z,W]of _e.texts(e))if(de.compare(W,ne)===-1)G=[z,W];else{y=[z,W];break}var B=!1;G&&y&&(de.equals(y[1],ne)?B=!de.hasPrevious(y[1]):B=de.common(G[1],ne).length<de.common(y[1],ne).length),G&&!B?(Z.path=G[1],Z.offset=G[0].text.length):y?(Z.path=y[1],Z.offset=0):t=null}}break}case"remove_text":{var{path:X,offset:ee,text:j}=n;if(j.length===0)break;var se=_e.leaf(e,X),ae=se.text.slice(0,ee),fe=se.text.slice(ee+j.length);if(se.text=ae+fe,t)for(var[he,be]of We.points(t))t[be]=gt.transform(he,n);break}case"set_node":{var{path:ve,properties:me,newProperties:le}=n;if(ve.length===0)throw new Error("Cannot set properties on the root node!");var Me=_e.get(e,ve);for(var oe in le){if(oe==="children"||oe==="text")throw new Error('Cannot set the "'.concat(oe,'" property of nodes!'));var Ae=le[oe];Ae==null?delete Me[oe]:Me[oe]=Ae}for(var ie in me)le.hasOwnProperty(ie)||delete Me[ie];break}case"set_selection":{var{newProperties:Se}=n;if(Se==null)t=Se;else{if(t==null){if(!We.isRange(Se))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(fn.stringify(Se)," when there is no current selection."));t=Oo({},Se)}for(var Be in Se){var Re=Se[Be];if(Re==null){if(Be==="anchor"||Be==="focus")throw new Error('Cannot remove the "'.concat(Be,'" selection property'));delete t[Be]}else t[Be]=Re}}break}case"split_node":{var{path:Xe,position:Ce,properties:ht}=n;if(Xe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Xe,"] because the root node cannot be split."));var rt=_e.get(e,Xe),Yt=_e.parent(e,Xe),At=Xe[Xe.length-1],It;if(kt.isText(rt)){var gn=rt.text.slice(0,Ce),vn=rt.text.slice(Ce);rt.text=gn,It=Oo(Oo({},ht),{},{text:vn})}else{var mn=rt.children.slice(0,Ce),yn=rt.children.slice(Ce);rt.children=mn,It=Oo(Oo({},ht),{},{children:yn})}if(Yt.children.splice(At+1,0,It),t)for(var[Ft,Xt]of We.points(t))t[Xt]=gt.transform(Ft,n);break}}return t},A1={transform(e,t){e.children=Sp(e.children);var n=e.selection&&Sp(e.selection);try{n=T1(e,n,t)}finally{e.children=Lp(e.children),n?e.selection=Fr(n)?Lp(n):n:e.selection=null}}},F1={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},I1={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},kp=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(Wt(r)&&Wt(o)){if(!kp(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(r!==o)return!1}for(var s in t)if(e[s]===void 0&&t[s]!==void 0)return!1;return!0};function _1(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ko(e,t){if(e==null)return{};var n=_1(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var R1=["anchor","focus"];function Pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function j1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pp(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var We={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return We.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=We.edges(e);return t},equals(e,t){return gt.equals(e.anchor,t.anchor)&>.equals(e.focus,t.focus)},includes(e,t){if(We.isRange(t)){if(We.includes(e,t.anchor)||We.includes(e,t.focus))return!0;var[n,r]=We.edges(e),[o,i]=We.edges(t);return gt.isBefore(n,o)&>.isAfter(r,i)}var[s,a]=We.edges(e),u=!1,l=!1;return gt.isPoint(t)?(u=gt.compare(t,s)>=0,l=gt.compare(t,a)<=0):(u=de.compare(t,s.path)>=0,l=de.compare(t,a.path)<=0),u&&l},intersection(e,t){var n=ko(e,R1),[r,o]=We.edges(e),[i,s]=We.edges(t),a=gt.isBefore(r,i)?i:r,u=gt.isBefore(o,s)?o:s;return gt.isBefore(u,a)?null:j1({anchor:a,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return gt.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return gt.equals(t,n)},isExpanded(e){return!We.isCollapsed(e)},isForward(e){return!We.isBackward(e)},isRange(e){return Wt(e)&>.isPoint(e.anchor)&>.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=We.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return nu(e,r=>{if(r===null)return null;var{affinity:o="inward"}=n,i,s;if(o==="inward"){var a=We.isCollapsed(r);We.isForward(r)?(i="forward",s=a?i:"backward"):(i="backward",s=a?i:"forward")}else o==="outward"?We.isForward(r)?(i="backward",s="forward"):(i="forward",s="backward"):(i=o,s=o);var u=gt.transform(r.anchor,t,{affinity:i}),l=gt.transform(r.focus,t,{affinity:s});if(!u||!l)return null;r.anchor=u,r.focus=l})}},Mp=e=>Wt(e)&&_e.isNodeList(e.children)&&!ft.isEditor(e),Vn={isAncestor(e){return Wt(e)&&_e.isNodeList(e.children)},isElement:Mp,isElementList(e){return Array.isArray(e)&&e.every(t=>Vn.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Mp(e)&&e[n]===t},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},N1=["children"],z1=["text"],Bp=new WeakMap,_e={ancestor(e,t){var n=_e.get(e,t);if(kt.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(fn.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of de.ancestors(t,n)){var o=_e.ancestor(e,r),i=[o,r];yield i}}()},child(e,t){if(kt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(fn.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(fn.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,o=_e.ancestor(e,t),{children:i}=o,s=r?i.length-1:0;r?s>=0:s<i.length;){var a=_e.child(o,s),u=t.concat(s);yield[a,u],s=r?s-1:s+1}}()},common(e,t,n){var r=de.common(t,n),o=_e.get(e,r);return[o,r]},descendant(e,t){var n=_e.get(e,t);if(ft.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(fn.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of _e.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of _e.nodes(e,t))Vn.isElement(n)&&(yield[n,r])}()},extractProps(e){if(Vn.isAncestor(e)){var t=ko(e,N1);return t}else{var t=ko(e,z1);return t}},first(e,t){for(var n=t.slice(),r=_e.get(e,n);r&&!(kt.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(kt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(fn.stringify(e)));var n=nu({children:e.children},r=>{var[o,i]=We.edges(t),s=_e.nodes(r,{reverse:!0,pass:h=>{var[,v]=h;return!We.includes(t,v)}});for(var[,a]of s){if(!We.includes(t,a)){var u=_e.parent(r,a),l=a[a.length-1];u.children.splice(l,1)}if(de.equals(a,i.path)){var f=_e.leaf(r,a);f.text=f.text.slice(0,i.offset)}if(de.equals(a,o.path)){var d=_e.leaf(r,a);d.text=d.text.slice(o.offset)}}ft.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(kt.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(fn.stringify(e)));n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(kt.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode(e){return kt.isText(e)||Vn.isElement(e)||ft.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Bp.get(e);if(t!==void 0)return t;var n=e.every(r=>_e.isNode(r));return Bp.set(e,n),n},last(e,t){for(var n=t.slice(),r=_e.get(e,n);r&&!(kt.isText(r)||r.children.length===0);){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=_e.get(e,t);if(!kt.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(fn.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of de.levels(t,n)){var o=_e.get(e,r);yield[o,r]}}()},matches(e,t){return Vn.isElement(e)&&Vn.isElementProps(t)&&Vn.matches(e,t)||kt.isText(e)&&kt.isTextProps(t)&&kt.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,s=new Set,a=[],u=e;!(i&&(r?de.isBefore(a,i):de.isAfter(a,i)));){if(s.has(u)||(yield[u,a]),!s.has(u)&&!kt.isText(u)&&u.children.length!==0&&(n==null||n([u,a])===!1)){s.add(u);var l=r?u.children.length-1:0;de.isAncestor(a,o)&&(l=o[a.length]),a=a.concat(l),u=_e.get(e,a);continue}if(a.length===0)break;if(!r){var f=de.next(a);if(_e.has(e,f)){a=f,u=_e.get(e,a);continue}}if(r&&a[a.length-1]!==0){var d=de.previous(a);a=d,u=_e.get(e,a);continue}a=de.parent(a),u=_e.get(e,a),s.add(u)}}()},parent(e,t){var n=de.parent(t),r=_e.get(e,n);if(kt.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return kt.isText(e)?e.text:e.children.map(_e.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of _e.nodes(e,t))kt.isText(n)&&(yield[n,r])}()}};function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tp(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Po={isNodeOperation(e){return Po.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Wt(e))return!1;switch(e.type){case"insert_node":return de.isPath(e.path)&&_e.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&de.isPath(e.path);case"merge_node":return typeof e.position=="number"&&de.isPath(e.path)&&Wt(e.properties);case"move_node":return de.isPath(e.path)&&de.isPath(e.newPath);case"remove_node":return de.isPath(e.path)&&_e.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&de.isPath(e.path);case"set_node":return de.isPath(e.path)&&Wt(e.properties)&&Wt(e.newProperties);case"set_selection":return e.properties===null&&We.isRange(e.newProperties)||e.newProperties===null&&We.isRange(e.properties)||Wt(e.properties)&&Wt(e.newProperties);case"split_node":return de.isPath(e.path)&&typeof e.position=="number"&&Wt(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Po.isOperation(t))},isSelectionOperation(e){return Po.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Po.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return mt(mt({},e),{},{type:"remove_node"});case"insert_text":return mt(mt({},e),{},{type:"remove_text"});case"merge_node":return mt(mt({},e),{},{type:"split_node",path:de.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(de.equals(t,n))return e;if(de.isSibling(n,t))return mt(mt({},e),{},{path:t,newPath:n});var r=de.transform(n,e),o=de.transform(de.next(n),e);return mt(mt({},e),{},{path:r,newPath:o})}case"remove_node":return mt(mt({},e),{},{type:"insert_node"});case"remove_text":return mt(mt({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:s}=e;return mt(mt({},e),{},{properties:s,newProperties:i})}case"set_selection":{var{properties:a,newProperties:u}=e;return a==null?mt(mt({},e),{},{properties:u,newProperties:null}):u==null?mt(mt({},e),{},{properties:null,newProperties:a}):mt(mt({},e),{},{properties:u,newProperties:a})}case"split_node":return mt(mt({},e),{},{type:"merge_node",path:de.next(e.path)})}}},Ap=new WeakMap,$1=e=>{var t=Ap.get(e);if(t!==void 0)return t;if(!Wt(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Wt(e.marks))&&(e.selection===null||We.isRange(e.selection))&&_e.isNodeList(e.children)&&Po.isOperationList(e.operations);return Ap.set(e,n),n},ft={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return $1(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)};function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gt={compare(e,t){var n=de.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return gt.compare(e,t)===1},isBefore(e,t){return gt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&de.equals(e.path,t.path)},isPoint(e){return Wt(e)&&typeof e.offset=="number"&&de.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return nu(e,r=>{if(r===null)return null;var{affinity:o="forward"}=n,{path:i,offset:s}=r;switch(t.type){case"insert_node":case"move_node":{r.path=de.transform(i,t,n);break}case"insert_text":{de.equals(t.path,i)&&(t.offset<s||t.offset===s&&o==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{de.equals(t.path,i)&&(r.offset+=t.position),r.path=de.transform(i,t,n);break}case"remove_text":{de.equals(t.path,i)&&t.offset<=s&&(r.offset-=Math.min(s-t.offset,t.text.length));break}case"remove_node":{if(de.equals(t.path,i)||de.isAncestor(t.path,i))return null;r.path=de.transform(i,t,n);break}case"split_node":{if(de.equals(t.path,i)){if(t.position===s&&o==null)return null;(t.position<s||t.position===s&&o==="forward")&&(r.offset-=t.position,r.path=de.transform(i,t,Ip(Ip({},n),{},{affinity:"forward"})))}else r.path=de.transform(i,t,n);break}}})}},_p=void 0,fn={setScrubber(e){_p=e},stringify(e){return JSON.stringify(e,_p)}},U1=["text"],W1=["anchor","focus"];function Rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rp(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var kt={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function o(i){var s=ko(i,U1);return s}return kp(r?o(e):e,r?o(t):t)},isText(e){return Wt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>kt.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[qn({},e)];for(var r of t){var o=ko(r,W1),[i,s]=We.edges(r),a=[],u=0,l=i.offset,f=s.offset;for(var d of n){var{length:h}=d.text,v=u;if(u+=h,l<=v&&u<=f){Object.assign(d,o),a.push(d);continue}if(l!==f&&(l===u||f===v)||l>u||f<v||f===v&&v!==0){a.push(d);continue}var m=d,g=void 0,p=void 0;if(f<u){var E=f-v;p=qn(qn({},m),{},{text:m.text.slice(E)}),m=qn(qn({},m),{},{text:m.text.slice(0,E)})}if(l>v){var S=l-v;g=qn(qn({},m),{},{text:m.text.slice(0,S)}),m=qn(qn({},m),{},{text:m.text.slice(S)})}Object.assign(m,o),g&&a.push(g),a.push(m),p&&a.push(p)}n=a}return n}},H1=e=>e.selection?e.selection:e.children.length>0?ft.end(e,[]):[0],vt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(vt||(vt={})),vt.L,vt.L|vt.V|vt.LV|vt.LVT,vt.LV|vt.V,vt.V|vt.T,vt.LVT|vt.T,vt.T,vt.Any,vt.Extend|vt.ZWJ,vt.Any,vt.SpacingMark,vt.Prepend,vt.Any,vt.ZWJ,vt.ExtPict,vt.RI,vt.RI;var V1={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ft.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=H1(e)}=n;if(de.isPath(o)&&(o=ft.range(e,o)),We.isRange(o))if(We.isCollapsed(o))o=o.anchor;else{var i=We.end(o);if(!r&&ft.void(e,{at:i}))return;var s=We.start(o),a=ft.pointRef(e,s),u=ft.pointRef(e,i);Fi.delete(e,{at:o,voids:r});var l=a.unref(),f=u.unref();o=l||f,Fi.setSelection(e,{anchor:o,focus:o})}if(!(!r&&ft.void(e,{at:o})||ft.elementReadOnly(e,{at:o}))){var{path:d,offset:h}=o;t.length>0&&e.apply({type:"insert_text",path:d,offset:h,text:t})}})}};function jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jp(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Fi=Ai(Ai(Ai(Ai({},A1),F1),I1),V1),q1=typeof ct=="object"&&ct&&ct.Object===Object&&ct,Z1=q1,G1=Z1,K1=typeof self=="object"&&self&&self.Object===Object&&self,Y1=G1||K1||Function("return this")(),X1=Y1,J1=X1,Q1=J1.Symbol,Np=Q1,zp=Np;zp&&zp.toStringTag;var $p=Np;$p&&$p.toStringTag;var Up;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Up||(Up={}));var ru=function(e){return Object.freeze(e)},ew=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,ru(this)}return e}(),tw=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ru(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,s=t.bottom,a=t.left,u=t.width,l=t.height;return{x:n,y:r,top:o,right:i,bottom:s,left:a,width:u,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Wp=typeof window<"u"?window:{};/msie|trident/i.test(Wp.navigator&&Wp.navigator.userAgent);var ou=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ew((n?t:e)||0,(n?e:t)||0)};ru({devicePixelContentBoxSize:ou(),borderBoxSize:ou(),contentBoxSize:ou(),contentRect:new tw(0,0,0,0)});function Mo(e){"@babel/helpers - typeof";return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(e)}function nw(e,t){if(Mo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rw(e){var t=nw(e,"string");return Mo(t)==="symbol"?t:String(t)}function Bo(e,t,n){return t=rw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ow=c.createContext(null),iu,su;parseInt(c.version.split(".")[0],10);var Hp=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),au=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ii=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),iw=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(iu=navigator.userAgent.match(/Version\/(\d+)/))!==null&&iu!==void 0&&iu[1]&&parseInt((su=navigator.userAgent.match(/Version\/(\d+)/))===null||su===void 0?void 0:su[1],10)<17;var sw=new WeakMap,aw=new WeakMap,uw=new WeakMap,lw=new WeakMap,cw=new WeakMap,Vp=new WeakMap,fw=new WeakMap,qp=new WeakMap,_i=new WeakMap,dw=new WeakMap,pw=new WeakMap,hw=new WeakMap,Zp=globalThis.Node,gw=globalThis.Text,Gp=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,vw=e=>Ri(e)&&e.nodeType===8,Rn=e=>Ri(e)&&e.nodeType===1,Ri=e=>{var t=Gp(e);return!!t&&e instanceof t.Node},Kp=e=>{var t=e&&e.anchorNode&&Gp(e.anchorNode);return!!t&&e instanceof t.Selection},mw=e=>{var[t,n]=e;if(Rn(t)&&t.childNodes.length){var r=n===t.childNodes.length,o=r?n-1:n;for([t,o]=Yp(t,o,r?"backward":"forward"),r=o<n;Rn(t)&&t.childNodes.length;){var i=r?t.childNodes.length-1:0;t=bw(t,i,r?"backward":"forward")}n=r&&t.textContent!=null?t.textContent.length:0}return[t,n]},yw=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Yp=(e,t,n)=>{for(var{childNodes:r}=e,o=r[t],i=t,s=!1,a=!1;(vw(o)||Rn(o)&&o.childNodes.length===0||Rn(o)&&o.getAttribute("contenteditable")==="false")&&!(s&&a);){if(i>=r.length){s=!0,i=t-1,n="backward";continue}if(i<0){a=!0,i=t+1,n="forward";continue}o=r[i],t=i,i+=n==="forward"?1:-1}return[o,t]},bw=(e,t,n)=>{var[r]=Yp(e,t,n);return r},Xp=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Jp=(e,t,n)=>{var{target:r}=t;if(Rn(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:o}=Je.getWindow(e);if(o.contains(r))return Je.hasDOMNode(e,r,{editable:!0});var i=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!i||i===t?!1:Jp(e,i,n)},Qp=(e,t)=>!!(e.compareDocumentPosition(t)&Zp.DOCUMENT_POSITION_PRECEDING),Cw=(e,t)=>!!(e.compareDocumentPosition(t)&Zp.DOCUMENT_POSITION_FOLLOWING),Ew=0;class ww{constructor(){Bo(this,"id",void 0),this.id="".concat(Ew++)}}var Je={androidPendingDiffs:e=>hw.get(e),androidScheduleFlush:e=>{var t;(t=pw.get(e))===null||t===void 0||t()},blur:e=>{var t=Je.toDOMNode(e,e),n=Je.findDocumentOrShadowRoot(e);_i.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,n=Je.findDocumentOrShadowRoot(e),r=Xp(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Fi.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Je.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:n,clientY:r,target:o}=t;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=Je.toSlateNode(e,t.target),s=Je.findPath(e,i);if(Vn.isElement(i)&&ft.isVoid(e,i)){var a=o.getBoundingClientRect(),u=e.isInline(i)?n-a.left<a.left+a.width-n:r-a.top<a.top+a.height-r,l=ft.point(e,s,{edge:u?"start":"end"}),f=u?ft.before(e,l):ft.after(e,l);if(f){var d=ft.range(e,f);return d}}var h,{document:v}=Je.getWindow(e);if(v.caretRangeFromPoint)h=v.caretRangeFromPoint(n,r);else{var m=v.caretPositionFromPoint(n,r);m&&(h=v.createRange(),h.setStart(m.offsetNode,m.offset),h.setEnd(m.offsetNode,m.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var g=Je.toSlateRange(e,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(e,t)=>{var n=Vp.get(t);return n||(n=new ww,Vp.set(t,n)),n},findPath:(e,t)=>{for(var n=[],r=t;;){var o=aw.get(r);if(o==null){if(ft.isEditor(r))return n;break}var i=sw.get(r);if(i==null)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(fn.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!_i.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Je.focus(e,{retries:t.retries-1})},10);return}var n=Je.toDOMNode(e,e),r=Je.findDocumentOrShadowRoot(e);if(r.activeElement!==n){if(e.selection&&r instanceof Document){var o=Xp(r),i=Je.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(i)}e.selection||Fi.select(e,ft.start(e,[])),_i.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:e=>{var t=uw.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:r=!1}=n,o=Je.toDOMNode(e,e),i;try{i=Rn(t)?t:t.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return i?i.closest("[data-slate-editor]")===o&&(!r||i.isContentEditable?!0:typeof i.isContentEditable=="boolean"&&i.closest('[contenteditable="false"]')===o||!!i.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Ri(t)&&Je.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:n,focus:r}=t;return ft.hasPath(e,n.path)&&ft.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Je.hasEditableTarget(e,t)||Je.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Ri(t)&&Je.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!dw.get(e),isFocused:e=>!!_i.get(e),isReadOnly:e=>!!qp.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(qp.get(e))return!1;var n=Je.hasTarget(e,t)&&Je.toSlateNode(e,t);return Vn.isElement(n)&&ft.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n=fw.get(e),r=ft.isEditor(t)?lw.get(e):n==null?void 0:n.get(Je.findKey(e,t));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(fn.stringify(t)));return r},toDOMPoint:(e,t)=>{var[n]=ft.node(e,t.path),r=Je.toDOMNode(e,n),o;ft.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",s=Array.from(r.querySelectorAll(i)),a=0,u=0;u<s.length;u++){var l=s[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:d}=f.textContent,h=l.getAttribute("data-slate-length"),v=h==null?d:parseInt(h,10),m=a+v,g=s[u+1];if(t.offset===m&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var p,E=g.childNodes[0];o=[E instanceof gw?E:g,(p=g.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(t.offset<=m){var S=Math.min(d,Math.max(0,t.offset-a));o=[f,S];break}a=m}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(fn.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:n,focus:r}=t,o=We.isBackward(t),i=Je.toDOMPoint(e,n),s=We.isCollapsed(t)?i:Je.toDOMPoint(e,r),a=Je.getWindow(e),u=a.document.createRange(),[l,f]=o?s:i,[d,h]=o?i:s,v=Rn(l)?l:l.parentElement,m=!!v.getAttribute("data-slate-zero-width"),g=Rn(d)?d:d.parentElement,p=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,m?1:f),u.setEnd(d,p?1:h),u},toSlateNode:(e,t)=>{var n=Rn(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?cw.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(e,t,n)=>{var{exactMatch:r,suppressThrow:o,searchDirection:i="backward"}=n,[s,a]=r?t:mw(t),u=s.parentNode,l=null,f=0;if(u){var d,h,v=Je.toDOMNode(e,e),m=u.closest('[data-slate-void="true"]'),g=m&&v.contains(m)?m:null,p=u.closest('[contenteditable="false"]'),E=p&&v.contains(p)?p:null,S=u.closest("[data-slate-leaf]"),D=null;if(S){if(l=S.closest('[data-slate-node="text"]'),l){var M=Je.getWindow(e),b=M.document.createRange();b.setStart(l,0),b.setEnd(s,a);var w=b.cloneContents(),L=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];L.forEach($=>{if(au&&!r&&$.hasAttribute("data-slate-zero-width")&&$.textContent.length>0&&$.textContext!=="\uFEFF"){$.textContent.startsWith("\uFEFF")&&($.textContent=$.textContent.slice(1));return}$.parentNode.removeChild($)}),f=w.textContent.length,D=l}}else if(g){for(var O=g.querySelectorAll("[data-slate-leaf]"),H=0;H<O.length;H++){var P=O[H];if(Je.hasDOMNode(e,P)){S=P;break}}S?(l=S.closest('[data-slate-node="text"]'),D=S,f=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach($=>{f-=$.textContent.length})):f=1}else if(E){var V=$=>$?$.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],_=E.closest('[data-slate-node="element"]');if(i==="forward"){var R,F=[...V(_),...V(_==null?void 0:_.nextElementSibling)];S=(R=F.find($=>Cw(E,$)))!==null&&R!==void 0?R:null}else{var N,Y=[...V(_==null?void 0:_.previousElementSibling),...V(_)];S=(N=Y.findLast($=>Qp(E,$)))!==null&&N!==void 0?N:null}S&&(l=S.closest('[data-slate-node="text"]'),D=S,i==="forward"?f=0:(f=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach($=>{f-=$.textContent.length})))}D&&f===D.textContent.length&&au&&D.getAttribute("data-slate-zero-width")==="z"&&(d=D.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Ii&&(h=D.textContent)!==null&&h!==void 0&&h.endsWith(`
|
147
|
+
|
148
|
+
`))&&f--}if(au&&!l&&!r){var I=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(I&&Je.hasDOMNode(e,I,{editable:!0})){var Q=Je.toSlateNode(e,I),{path:ne,offset:k}=ft.start(e,Je.findPath(e,Q));return I.querySelector("[data-slate-leaf]")||(k=a),{path:ne,offset:k}}}if(!l){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var T=Je.toSlateNode(e,l),Z=Je.findPath(e,T);return{path:Z,offset:f}},toSlateRange:(e,t,n)=>{var r,{exactMatch:o,suppressThrow:i}=n,s=Kp(t)?t.anchorNode:t.startContainer,a,u,l,f,d;if(s)if(Kp(t)){if(Ii&&t.rangeCount>1){l=t.focusNode;var h=t.getRangeAt(0),v=t.getRangeAt(t.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&v.startContainer instanceof HTMLTableRowElement){let w=function(L){return L.childElementCount>0?w(L.children[0]):L};var m=h.startContainer,g=v.startContainer,p=w(m.children[h.startOffset]),E=w(g.children[v.startOffset]);f=0,E.childNodes.length>0?a=E.childNodes[0]:a=E,p.childNodes.length>0?l=p.childNodes[0]:l=p,E instanceof HTMLElement?u=E.innerHTML.length:u=0}else h.startContainer===l?(a=v.endContainer,u=v.endOffset,f=h.startOffset):(a=h.startContainer,u=h.endOffset,f=v.startOffset)}else a=t.anchorNode,u=t.anchorOffset,l=t.focusNode,f=t.focusOffset;iw&&yw(a)||Ii?d=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:d=t.isCollapsed}else a=t.startContainer,u=t.startOffset,l=t.endContainer,f=t.endOffset,d=t.collapsed;if(a==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Ii&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
|
149
|
+
|
150
|
+
`)&&f===l.textContent.length&&f--;var S=Je.toSlatePoint(e,[a,u],{exactMatch:o,suppressThrow:i});if(!S)return null;var D=Qp(a,l)||a===l&&f<u,M=d?S:Je.toSlatePoint(e,[l,f],{exactMatch:o,suppressThrow:i,searchDirection:D?"forward":"backward"});if(!M)return null;var b={anchor:S,focus:M};return We.isExpanded(b)&&We.isForward(b)&&Rn(l)&&ft.void(e,{at:b.focus,mode:"highest"})&&(b=ft.unhangRange(e,b,{voids:!0})),b}},Dw={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"},xw={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"},Sw={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},yt=e=>{var t=Dw[e],n=xw[e],r=Sw[e],o=t&&Va(t),i=n&&Va(n),s=r&&Va(r);return a=>!!(o&&o(a)||Hp&&i&&i(a)||!Hp&&s&&s(a))};yt("bold"),yt("compose"),yt("moveBackward"),yt("moveForward"),yt("deleteBackward"),yt("deleteForward"),yt("deleteLineBackward"),yt("deleteLineForward"),yt("deleteWordBackward"),yt("deleteWordForward"),yt("extendBackward"),yt("extendForward"),yt("extendLineBackward"),yt("extendLineForward"),yt("italic"),yt("moveLineBackward"),yt("moveLineForward"),yt("moveWordBackward"),yt("moveWordForward"),yt("redo"),yt("insertSoftBreak"),yt("splitBlock"),yt("transposeCharacter"),yt("undo");var Lw=(e,t)=>{var n=[],r=()=>{n=[]},o=s=>{if(t.current){var a=s.filter(u=>Jp(e,u,s));n.push(...a)}};function i(){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:o,restoreDOM:i,clear:r}},Ow={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class kw extends c.Component{constructor(){super(...arguments),Bo(this,"context",null),Bo(this,"manager",null),Bo(this,"mutationObserver",null)}observe(){var t,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,Ow)}componentDidMount(){var{receivedUserInput:t}=this.props,n=this.context;this.manager=Lw(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(o)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}Bo(kw,"contextType",ow);var eh={},uu={},lu={};Object.defineProperty(lu,"__esModule",{value:!0}),lu.default=Tw;var th="html",nh="head",ji="body",Pw=/<([a-zA-Z]+[0-9]?)/,rh=/<head[^]*>/i,oh=/<body[^]*>/i,Ni=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},cu=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},ih=typeof window=="object"&&window.DOMParser;if(typeof ih=="function"){var Mw=new ih,Bw="text/html";cu=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),Mw.parseFromString(e,Bw)},Ni=cu}if(typeof document=="object"&&document.implementation){var zi=document.implementation.createHTMLDocument();Ni=function(e,t){if(t){var n=zi.documentElement.querySelector(t);return n&&(n.innerHTML=e),zi}return zi.documentElement.innerHTML=e,zi}}var $i=typeof document=="object"&&document.createElement("template"),fu;$i&&$i.content&&(fu=function(e){return $i.innerHTML=e,$i.content.childNodes});function Tw(e){var t,n,r=e.match(Pw),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case th:{var i=cu(e);if(!rh.test(e)){var s=i.querySelector(nh);(t=s==null?void 0:s.parentNode)===null||t===void 0||t.removeChild(s)}if(!oh.test(e)){var s=i.querySelector(ji);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return i.querySelectorAll(th)}case nh:case ji:{var a=Ni(e).querySelectorAll(o);return oh.test(e)&&rh.test(e)?a[0].parentNode.childNodes:a}default:{if(fu)return fu(e);var s=Ni(e,ji).querySelector(ji);return s.childNodes}}}var Ui={},du={},pu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(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"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(pu);var Ke={},cr=ct&&ct.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),To=ct&&ct.__assign||function(){return To=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},To.apply(this,arguments)};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.cloneNode=Ke.hasChildren=Ke.isDocument=Ke.isDirective=Ke.isComment=Ke.isText=Ke.isCDATA=Ke.isTag=Ke.Element=Ke.Document=Ke.CDATA=Ke.NodeWithChildren=Ke.ProcessingInstruction=Ke.Comment=Ke.Text=Ke.DataNode=Ke.Node=void 0;var en=pu,hu=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),gu(this,t)},e}();Ke.Node=hu;var Wi=function(e){cr(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(hu);Ke.DataNode=Wi;var sh=function(e){cr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=en.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Wi);Ke.Text=sh;var ah=function(e){cr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=en.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Wi);Ke.Comment=ah;var uh=function(e){cr(t,e);function t(n,r){var o=e.call(this,r)||this;return o.name=n,o.type=en.ElementType.Directive,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Wi);Ke.ProcessingInstruction=uh;var Hi=function(e){cr(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(hu);Ke.NodeWithChildren=Hi;var lh=function(e){cr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=en.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Hi);Ke.CDATA=lh;var ch=function(e){cr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=en.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Hi);Ke.Document=ch;var fh=function(e){cr(t,e);function t(n,r,o,i){o===void 0&&(o=[]),i===void 0&&(i=n==="script"?en.ElementType.Script:n==="style"?en.ElementType.Style:en.ElementType.Tag);var s=e.call(this,o)||this;return s.name=n,s.attribs=r,s.type=i,s}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var o,i;return{name:r,value:n.attribs[r],namespace:(o=n["x-attribsNamespace"])===null||o===void 0?void 0:o[r],prefix:(i=n["x-attribsPrefix"])===null||i===void 0?void 0:i[r]}})},enumerable:!1,configurable:!0}),t}(Hi);Ke.Element=fh;function dh(e){return(0,en.isTag)(e)}Ke.isTag=dh;function ph(e){return e.type===en.ElementType.CDATA}Ke.isCDATA=ph;function hh(e){return e.type===en.ElementType.Text}Ke.isText=hh;function gh(e){return e.type===en.ElementType.Comment}Ke.isComment=gh;function vh(e){return e.type===en.ElementType.Directive}Ke.isDirective=vh;function mh(e){return e.type===en.ElementType.Root}Ke.isDocument=mh;function Aw(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ke.hasChildren=Aw;function gu(e,t){t===void 0&&(t=!1);var n;if(hh(e))n=new sh(e.data);else if(gh(e))n=new ah(e.data);else if(dh(e)){var r=t?vu(e.children):[],o=new fh(e.name,To({},e.attribs),r);r.forEach(function(u){return u.parent=o}),e.namespace!=null&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=To({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=To({},e["x-attribsPrefix"])),n=o}else if(ph(e)){var r=t?vu(e.children):[],i=new lh(r);r.forEach(function(l){return l.parent=i}),n=i}else if(mh(e)){var r=t?vu(e.children):[],s=new ch(r);r.forEach(function(l){return l.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else if(vh(e)){var a=new uh(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}Ke.cloneNode=gu;function vu(e){for(var t=e.map(function(r){return gu(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=ct&&ct.__createBinding||(Object.create?function(a,u,l,f){f===void 0&&(f=l);var d=Object.getOwnPropertyDescriptor(u,l);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(a,f,d)}:function(a,u,l,f){f===void 0&&(f=l),a[f]=u[l]}),n=ct&&ct.__exportStar||function(a,u){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&t(u,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=pu,o=Ke;n(Ke,e);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function a(u,l,f){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=i),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??i,this.elementCB=f??null}return a.prototype.onparserinit=function(u){this.parser=u},a.prototype.onreset=function(){this.dom=[],this.root=new o.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,d=new o.Element(u,l,void 0,f);this.addNode(d),this.tagStack.push(d)},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 o.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 o.Comment(u);this.addNode(l),this.lastNode=l},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var u=new o.Text(""),l=new o.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 o.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}();e.DomHandler=s,e.default=s})(du);var yh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{})})(yh),Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.formatAttributes=bh,Ui.formatDOM=Ch;var Vi=du,Fw=yh;function Iw(e){return Fw.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function bh(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function _w(e){e=e.toLowerCase();var t=Iw(e);return t||e}function Ch(e,t,n){t===void 0&&(t=null);for(var r=[],o,i=0,s=e.length;i<s;i++){var a=e[i];switch(a.nodeType){case 1:{var u=_w(a.nodeName);o=new Vi.Element(u,bh(a.attributes)),o.children=Ch(u==="template"?a.content.childNodes:a.childNodes,o);break}case 3:o=new Vi.Text(a.nodeValue);break;case 8:o=new Vi.Comment(a.nodeValue);break;default:continue}var l=r[i-1]||null;l&&(l.next=o),o.parent=t,o.prev=l,o.next=null,r.push(o)}return n&&(o=new Vi.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),o.next=r[0]||null,o.parent=t,r.unshift(o),r[1]&&(r[1].prev=r[0])),r}var Rw=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uu,"__esModule",{value:!0}),uu.default=$w;var jw=Rw(lu),Nw=Ui,zw=/<(![a-zA-Z\s]+)>/;function $w(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(zw),n=t?t[1]:void 0;return(0,Nw.formatDOM)((0,jw.default)(e),null,n)}var qi={},Pn={},Zi={},Uw=0;Zi.SAME=Uw;var Ww=1;Zi.CAMELCASE=Ww,Zi.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 Eh=0,fr=1,Gi=2,Ki=3,mu=4,wh=5,Dh=6;function Hw(e){return zt.hasOwnProperty(e)?zt[e]:null}function Vt(e,t,n,r,o,i,s){this.acceptsBooleans=t===Gi||t===Ki||t===mu,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const zt={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{zt[e]=new Vt(e,Eh,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{zt[e]=new Vt(e,fr,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{zt[e]=new Vt(e,Gi,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{zt[e]=new Vt(e,Gi,!1,e,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(e=>{zt[e]=new Vt(e,Ki,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{zt[e]=new Vt(e,Ki,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{zt[e]=new Vt(e,mu,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{zt[e]=new Vt(e,Dh,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{zt[e]=new Vt(e,wh,!1,e.toLowerCase(),null,!1,!1)});const yu=/[\-\:]([a-z])/g,bu=e=>e[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(e=>{const t=e.replace(yu,bu);zt[t]=new Vt(t,fr,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(yu,bu);zt[t]=new Vt(t,fr,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(yu,bu);zt[t]=new Vt(t,fr,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{zt[e]=new Vt(e,fr,!1,e.toLowerCase(),null,!1,!1)});const Vw="xlinkHref";zt[Vw]=new Vt("xlinkHref",fr,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{zt[e]=new Vt(e,fr,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:qw,SAME:Zw,possibleStandardNames:xh}=Zi,Gw=":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",Kw=Gw+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Yw=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Kw+"]*$")),Xw=Object.keys(xh).reduce((e,t)=>{const n=xh[t];return n===Zw?e[t]=t:n===qw?e[t.toLowerCase()]=t:e[t]=n,e},{});Pn.BOOLEAN=Ki,Pn.BOOLEANISH_STRING=Gi,Pn.NUMERIC=wh,Pn.OVERLOADED_BOOLEAN=mu,Pn.POSITIVE_NUMERIC=Dh,Pn.RESERVED=Eh,Pn.STRING=fr,Pn.getPropertyInfo=Hw,Pn.isCustomAttribute=Yw,Pn.possibleStandardNames=Xw;var Cu={},Eu={},Sh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Jw=/\n/g,Qw=/^\s*/,eD=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tD=/^:\s*/,nD=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,rD=/^[;\s]*/,oD=/^\s+|\s+$/g,iD=`
|
151
|
+
`,Lh="/",Oh="*",jr="",sD="comment",aD="declaration",uD=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(m){var g=m.match(Jw);g&&(n+=g.length);var p=m.lastIndexOf(iD);r=~p?m.length-p:r+m.length}function i(){var m={line:n,column:r};return function(g){return g.position=new s(m),l(),g}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(m){var g=new Error(t.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function u(m){var g=m.exec(e);if(g){var p=g[0];return o(p),e=e.slice(p.length),g}}function l(){u(Qw)}function f(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=i();if(!(Lh!=e.charAt(0)||Oh!=e.charAt(1))){for(var g=2;jr!=e.charAt(g)&&(Oh!=e.charAt(g)||Lh!=e.charAt(g+1));)++g;if(g+=2,jr===e.charAt(g-1))return a("End of comment missing");var p=e.slice(2,g-2);return r+=2,o(p),e=e.slice(g),r+=2,m({type:sD,comment:p})}}function h(){var m=i(),g=u(eD);if(g){if(d(),!u(tD))return a("property missing ':'");var p=u(nD),E=m({type:aD,property:kh(g[0].replace(Sh,jr)),value:p?kh(p[0].replace(Sh,jr)):jr});return u(rD),E}}function v(){var m=[];f(m);for(var g;g=h();)g!==!1&&(m.push(g),f(m));return m}return l(),v()};function kh(e){return e?e.replace(oD,jr):jr}var lD=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.default=fD;var cD=lD(uD);function fD(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,cD.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var s=i.property,a=i.value;o?t(s,a,i):a&&(n=n||{},n[s]=a)}}),n}var Yi={};Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.camelCase=void 0;var dD=/^--[a-zA-Z0-9-]+$/,pD=/-([a-z])/g,hD=/^[^-]+$/,gD=/^-(webkit|moz|ms|o|khtml)-/,vD=/^-(ms)-/,mD=function(e){return!e||hD.test(e)||dD.test(e)},yD=function(e,t){return t.toUpperCase()},Ph=function(e,t){return"".concat(t,"-")},bD=function(e,t){return t===void 0&&(t={}),mD(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(vD,Ph):e=e.replace(gD,Ph),e.replace(pD,yD))};Yi.camelCase=bD;var CD=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ED=CD(Eu),wD=Yi;function wu(e,t){var n={};return!e||typeof e!="string"||(0,ED.default)(e,function(r,o){r&&o&&(n[(0,wD.camelCase)(r,t)]=o)}),n}wu.default=wu;var DD=wu;(function(e){var t=ct&&ct.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=i,e.setStyleProp=a;var n=c,r=t(DD),o=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(f,d){return f.includes("-")?!o.has(f):!!(d&&typeof d.is=="string")}var s={reactCompat:!0};function a(f,d){if(typeof f=="string"){if(!f.trim()){d.style={};return}try{d.style=(0,r.default)(f,s)}catch{d.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=u;var l=function(f){return f};e.returnFirstArg=l})(Cu),Object.defineProperty(qi,"__esModule",{value:!0}),qi.default=OD;var Ao=Pn,Mh=Cu,xD=["checked","value"],SD=["input","select","textarea"],LD={reset:!0,submit:!0};function OD(e,t){e===void 0&&(e={});var n={},r=!!(e.type&&LD[e.type]);for(var o in e){var i=e[o];if((0,Ao.isCustomAttribute)(o)){n[o]=i;continue}var s=o.toLowerCase(),a=Bh(s);if(a){var u=(0,Ao.getPropertyInfo)(a);switch(xD.includes(a)&&SD.includes(t)&&!r&&(a=Bh("default"+s)),n[a]=i,u&&u.type){case Ao.BOOLEAN:n[a]=!0;break;case Ao.OVERLOADED_BOOLEAN:i===""&&(n[a]=!0);break}continue}Mh.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}return(0,Mh.setStyleProp)(e.style,n),n}function Bh(e){return Ao.possibleStandardNames[e]}var Du={},kD=ct&&ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0}),Du.default=Th;var xu=c,PD=kD(qi),Fo=Cu,MD={cloneElement:xu.cloneElement,createElement:xu.createElement,isValidElement:xu.isValidElement};function Th(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace=="function",o=t.transform||Fo.returnFirstArg,i=t.library||MD,s=i.cloneElement,a=i.createElement,u=i.isValidElement,l=e.length,f=0;f<l;f++){var d=e[f];if(r){var h=t.replace(d,f);if(u(h)){l>1&&(h=s(h,{key:h.key||f})),n.push(o(h,d,f));continue}}if(d.type==="text"){var v=!d.data.trim().length;if(v&&d.parent&&!(0,Fo.canTextBeChildOfNode)(d.parent)||t.trim&&v)continue;n.push(o(d.data,d,f));continue}var m=d,g={};BD(m)?((0,Fo.setStyleProp)(m.attribs.style,m.attribs),g=m.attribs):m.attribs&&(g=(0,PD.default)(m.attribs,m.name));var p=void 0;switch(d.type){case"script":case"style":d.children[0]&&(g.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?g.defaultValue=d.children[0].data:d.children&&d.children.length&&(p=Th(d.children,t));break;default:continue}l>1&&(g.key=f),n.push(o(a(d.name,g,p),d,f))}return n.length===1?n[0]:n}function BD(e){return Fo.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,Fo.isCustomComponent)(e.name,e.attribs)}(function(e){var t=ct&&ct.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var n=t(uu);e.htmlToDOM=n.default;var r=t(qi);e.attributesToProps=r.default;var o=t(Du);e.domToReact=o.default;var i=du;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.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,o.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||s),l):[]}})(eh);const Ah=KC(eh);Ah.default,c.createContext({}),c.createContext({}),c.createContext({});function TD(e){const{text:t,size:n="lg",children:r,orientation:o="top",className:i="",...s}=e,a=`arkynTooltip ${n} ${o} ${i}`;return tt.jsxs("div",{className:a.trim(),...s,children:[r,tt.jsx("div",{className:"arkynTooltipText",children:t})]})}var Pt={},Su={},Io={},_o={},Fh="Expected a function",Ih=NaN,AD="[object Symbol]",FD=/^\s+|\s+$/g,ID=/^[-+]0x[0-9a-f]+$/i,_D=/^0b[01]+$/i,RD=/^0o[0-7]+$/i,jD=parseInt,ND=typeof ct=="object"&&ct&&ct.Object===Object&&ct,zD=typeof self=="object"&&self&&self.Object===Object&&self,$D=ND||zD||Function("return this")(),UD=Object.prototype,WD=UD.toString,HD=Math.max,VD=Math.min,Lu=function(){return $D.Date.now()};function qD(e,t,n){var r,o,i,s,a,u,l=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Fh);t=_h(t)||0,Xi(n)&&(f=!!n.leading,d="maxWait"in n,i=d?HD(_h(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function v(w){var L=r,O=o;return r=o=void 0,l=w,s=e.apply(O,L),s}function m(w){return l=w,a=setTimeout(E,t),f?v(w):s}function g(w){var L=w-u,O=w-l,H=t-L;return d?VD(H,i-O):H}function p(w){var L=w-u,O=w-l;return u===void 0||L>=t||L<0||d&&O>=i}function E(){var w=Lu();if(p(w))return S(w);a=setTimeout(E,g(w))}function S(w){return a=void 0,h&&r?v(w):(r=o=void 0,s)}function D(){a!==void 0&&clearTimeout(a),l=0,r=u=o=a=void 0}function M(){return a===void 0?s:S(Lu())}function b(){var w=Lu(),L=p(w);if(r=arguments,o=this,u=w,L){if(a===void 0)return m(u);if(d)return a=setTimeout(E,t),v(u)}return a===void 0&&(a=setTimeout(E,t)),s}return b.cancel=D,b.flush=M,b}function ZD(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Fh);return Xi(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),qD(e,t,{leading:r,maxWait:t,trailing:o})}function Xi(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function GD(e){return!!e&&typeof e=="object"}function KD(e){return typeof e=="symbol"||GD(e)&&WD.call(e)==AD}function _h(e){if(typeof e=="number")return e;if(KD(e))return Ih;if(Xi(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xi(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(FD,"");var n=_D.test(e);return n||RD.test(e)?jD(e.slice(2),n?2:8):ID.test(e)?Ih:+e}var YD=ZD,Ro={};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.addPassiveEventListener=function(e,t,n){var r=n.name;r||(r=t,console.warn("Listener must be a named function.")),Ji.has(t)||Ji.set(t,new Set);var o=Ji.get(t);if(!o.has(r)){var i=function(){var s=!1;try{var a=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,a)}catch{}return s}();e.addEventListener(t,n,i?{passive:!0}:!1),o.add(r)}},Ro.removePassiveEventListener=function(e,t,n){e.removeEventListener(t,n),Ji.get(t).delete(n.name||t)};var Ji=new Map;Object.defineProperty(_o,"__esModule",{value:!0});var XD=YD,JD=ex(XD),QD=Ro;function ex(e){return e&&e.__esModule?e:{default:e}}var tx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,JD.default)(e,t)},Dt={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,t){if(e){var n=tx(function(r){Dt.scrollHandler(e)},t);Dt.scrollSpyContainers.push(e),(0,QD.addPassiveEventListener)(e,"scroll",n)}},isMounted:function(e){return Dt.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var t=window.pageYOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return t?window.pageXOffset:n?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var t=window.pageXOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return t?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var t=Dt.scrollSpyContainers[Dt.scrollSpyContainers.indexOf(e)].spyCallbacks||[];t.forEach(function(n){return n(Dt.currentPositionX(e),Dt.currentPositionY(e))})},addStateHandler:function(e){Dt.spySetState.push(e)},addSpyHandler:function(e,t){var n=Dt.scrollSpyContainers[Dt.scrollSpyContainers.indexOf(t)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(e),e(Dt.currentPositionX(t),Dt.currentPositionY(t))},updateStates:function(){Dt.spySetState.forEach(function(e){return e()})},unmount:function(e,t){Dt.scrollSpyContainers.forEach(function(n){return n.spyCallbacks&&n.spyCallbacks.length&&n.spyCallbacks.indexOf(t)>-1&&n.spyCallbacks.splice(n.spyCallbacks.indexOf(t),1)}),Dt.spySetState&&Dt.spySetState.length&&Dt.spySetState.indexOf(e)>-1&&Dt.spySetState.splice(Dt.spySetState.indexOf(e),1),document.removeEventListener("scroll",Dt.scrollHandler)},update:function(){return Dt.scrollSpyContainers.forEach(function(e){return Dt.scrollHandler(e)})}};_o.default=Dt;var no={},jo={};Object.defineProperty(jo,"__esModule",{value:!0});var nx=function(e,t){var n=e.indexOf("#")===0?e.substring(1):e,r=n?"#"+n:"",o=window&&window.location,i=r?o.pathname+o.search+r:o.pathname+o.search;t?history.pushState(history.state,"",i):history.replaceState(history.state,"",i)},rx=function(){return window.location.hash.replace(/^#/,"")},ox=function(e){return function(t){return e.contains?e!=t&&e.contains(t):!!(e.compareDocumentPosition(t)&16)}},ix=function(e){return getComputedStyle(e).position!=="static"},Ou=function(e,t){for(var n=e.offsetTop,r=e.offsetParent;r&&!t(r);)n+=r.offsetTop,r=r.offsetParent;return{offsetTop:n,offsetParent:r}},sx=function(e,t,n){if(n)return e===document?t.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?t.offsetLeft:t.offsetLeft-e.offsetLeft;if(e===document)return t.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(ix(e)){if(t.offsetParent!==e){var r=function(u){return u===e||u===document},o=Ou(t,r),i=o.offsetTop,s=o.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return i}return t.offsetTop}if(t.offsetParent===e.offsetParent)return t.offsetTop-e.offsetTop;var a=function(u){return u===document};return Ou(t,a).offsetTop-Ou(e,a).offsetTop};jo.default={updateHash:nx,getHash:rx,filterElementInContainer:ox,scrollOffset:sx};var Qi={},ku={};Object.defineProperty(ku,"__esModule",{value:!0}),ku.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 Pu={};Object.defineProperty(Pu,"__esModule",{value:!0});var ax=Ro,ux=["mousedown","mousewheel","touchmove","keydown"];Pu.default={subscribe:function(e){return typeof document<"u"&&ux.forEach(function(t){return(0,ax.addPassiveEventListener)(document,t,e)})}};var No={};Object.defineProperty(No,"__esModule",{value:!0});var Mu={registered:{},scrollEvent:{register:function(e,t){Mu.registered[e]=t},remove:function(e){Mu.registered[e]=null}}};No.default=Mu,Object.defineProperty(Qi,"__esModule",{value:!0});var lx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx=jo;es(cx);var fx=ku,Rh=es(fx),dx=Pu,px=es(dx),hx=No,jn=es(hx);function es(e){return e&&e.__esModule?e:{default:e}}var jh=function(e){return Rh.default[e.smooth]||Rh.default.defaultEasing},gx=function(e){return typeof e=="function"?e:function(){return e}},vx=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Bu=function(){return vx()||function(e,t,n){window.setTimeout(e,n||1e3/60,new Date().getTime())}}(),Nh=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}},zh=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollLeft;var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft},$h=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollTop;var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},mx=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollWidth-t.offsetWidth;var n=document.body,r=document.documentElement;return Math.max(n.scrollWidth,n.offsetWidth,r.clientWidth,r.scrollWidth,r.offsetWidth)},yx=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollHeight-t.offsetHeight;var n=document.body,r=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)},bx=function e(t,n,r){var o=n.data;if(!n.ignoreCancelEvents&&o.cancel){jn.default.registered.end&&jn.default.registered.end(o.to,o.target,o.currentPositionY);return}if(o.delta=Math.round(o.targetPosition-o.startPosition),o.start===null&&(o.start=r),o.progress=r-o.start,o.percent=o.progress>=o.duration?1:t(o.progress/o.duration),o.currentPosition=o.startPosition+Math.ceil(o.delta*o.percent),o.containerElement&&o.containerElement!==document&&o.containerElement!==document.body?n.horizontal?o.containerElement.scrollLeft=o.currentPosition:o.containerElement.scrollTop=o.currentPosition:n.horizontal?window.scrollTo(o.currentPosition,0):window.scrollTo(0,o.currentPosition),o.percent<1){var i=e.bind(null,t,n);Bu.call(window,i);return}jn.default.registered.end&&jn.default.registered.end(o.to,o.target,o.currentPosition)},Tu=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},zo=function(e,t,n,r){t.data=t.data||Nh(),window.clearTimeout(t.data.delayTimeout);var o=function(){t.data.cancel=!0};if(px.default.subscribe(o),Tu(t),t.data.start=null,t.data.cancel=!1,t.data.startPosition=t.horizontal?zh(t):$h(t),t.data.targetPosition=t.absolute?e:e+t.data.startPosition,t.data.startPosition===t.data.targetPosition){jn.default.registered.end&&jn.default.registered.end(t.data.to,t.data.target,t.data.currentPosition);return}t.data.delta=Math.round(t.data.targetPosition-t.data.startPosition),t.data.duration=gx(t.duration)(t.data.delta),t.data.duration=isNaN(parseFloat(t.data.duration))?1e3:parseFloat(t.data.duration),t.data.to=n,t.data.target=r;var i=jh(t),s=bx.bind(null,i,t);if(t&&t.delay>0){t.data.delayTimeout=window.setTimeout(function(){jn.default.registered.begin&&jn.default.registered.begin(t.data.to,t.data.target),Bu.call(window,s)},t.delay);return}jn.default.registered.begin&&jn.default.registered.begin(t.data.to,t.data.target),Bu.call(window,s)},ts=function(e){return e=lx({},e),e.data=e.data||Nh(),e.absolute=!0,e},Cx=function(e){zo(0,ts(e))},Ex=function(e,t){zo(e,ts(t))},wx=function(e){e=ts(e),Tu(e),zo(e.horizontal?mx(e):yx(e),e)},Dx=function(e,t){t=ts(t),Tu(t);var n=t.horizontal?zh(t):$h(t);zo(e+n,t)};Qi.default={animateTopScroll:zo,getAnimationType:jh,scrollToTop:Cx,scrollToBottom:wx,scrollTo:Ex,scrollMore:Dx},Object.defineProperty(no,"__esModule",{value:!0});var xx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sx=jo,Lx=Au(Sx),Ox=Qi,kx=Au(Ox),Px=No,ns=Au(Px);function Au(e){return e&&e.__esModule?e:{default:e}}var rs={},Uh=void 0;no.default={unmount:function(){rs={}},register:function(e,t){rs[e]=t},unregister:function(e){delete rs[e]},get:function(e){return rs[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Uh=e},getActiveLink:function(){return Uh},scrollTo:function(e,t){var n=this.get(e);if(!n){console.warn("target Element not found");return}t=xx({},t,{absolute:!1});var r=t.containerId,o=t.container,i=void 0;r?i=document.getElementById(r):o&&o.nodeType?i=o:i=document,t.absolute=!0;var s=t.horizontal,a=Lx.default.scrollOffset(i,n,s)+(t.offset||0);if(!t.smooth){ns.default.registered.begin&&ns.default.registered.begin(e,n),i===document?t.horizontal?window.scrollTo(a,0):window.scrollTo(0,a):i.scrollTop=a,ns.default.registered.end&&ns.default.registered.end(e,n);return}kx.default.animateTopScroll(a,t,e,n)}};var Fu={exports:{}},Iu={exports:{}},it={};/** @license React v16.13.1
|
152
|
+
* react-is.production.min.js
|
153
|
+
*
|
154
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
155
|
+
*
|
156
|
+
* This source code is licensed under the MIT license found in the
|
157
|
+
* LICENSE file in the root directory of this source tree.
|
158
|
+
*/var Wh;function Mx(){if(Wh)return it;Wh=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case t:switch(b=b.type,b){case u:case l:case r:case i:case o:case d:return b;default:switch(b=b&&b.$$typeof,b){case a:case f:case m:case v:case s:return b;default:return w}}case n:return w}}}function M(b){return D(b)===l}return it.AsyncMode=u,it.ConcurrentMode=l,it.ContextConsumer=a,it.ContextProvider=s,it.Element=t,it.ForwardRef=f,it.Fragment=r,it.Lazy=m,it.Memo=v,it.Portal=n,it.Profiler=i,it.StrictMode=o,it.Suspense=d,it.isAsyncMode=function(b){return M(b)||D(b)===u},it.isConcurrentMode=M,it.isContextConsumer=function(b){return D(b)===a},it.isContextProvider=function(b){return D(b)===s},it.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},it.isForwardRef=function(b){return D(b)===f},it.isFragment=function(b){return D(b)===r},it.isLazy=function(b){return D(b)===m},it.isMemo=function(b){return D(b)===v},it.isPortal=function(b){return D(b)===n},it.isProfiler=function(b){return D(b)===i},it.isStrictMode=function(b){return D(b)===o},it.isSuspense=function(b){return D(b)===d},it.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===i||b===o||b===d||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===v||b.$$typeof===s||b.$$typeof===a||b.$$typeof===f||b.$$typeof===p||b.$$typeof===E||b.$$typeof===S||b.$$typeof===g)},it.typeOf=D,it}var ut={};/** @license React v16.13.1
|
159
|
+
* react-is.development.js
|
160
|
+
*
|
161
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
162
|
+
*
|
163
|
+
* This source code is licensed under the MIT license found in the
|
164
|
+
* LICENSE file in the root directory of this source tree.
|
165
|
+
*/var Hh;function Bx(){return Hh||(Hh=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(j){return typeof j=="string"||typeof j=="function"||j===r||j===l||j===i||j===o||j===d||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===s||j.$$typeof===a||j.$$typeof===f||j.$$typeof===p||j.$$typeof===E||j.$$typeof===S||j.$$typeof===g)}function M(j){if(typeof j=="object"&&j!==null){var se=j.$$typeof;switch(se){case t:var ae=j.type;switch(ae){case u:case l:case r:case i:case o:case d:return ae;default:var fe=ae&&ae.$$typeof;switch(fe){case a:case f:case m:case v:case s:return fe;default:return se}}case n:return se}}}var b=u,w=l,L=a,O=s,H=t,P=f,V=r,_=m,R=v,F=n,N=i,Y=o,I=d,Q=!1;function ne(j){return Q||(Q=!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(j)||M(j)===u}function k(j){return M(j)===l}function T(j){return M(j)===a}function Z(j){return M(j)===s}function $(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function K(j){return M(j)===f}function G(j){return M(j)===r}function y(j){return M(j)===m}function z(j){return M(j)===v}function W(j){return M(j)===n}function B(j){return M(j)===i}function X(j){return M(j)===o}function ee(j){return M(j)===d}ut.AsyncMode=b,ut.ConcurrentMode=w,ut.ContextConsumer=L,ut.ContextProvider=O,ut.Element=H,ut.ForwardRef=P,ut.Fragment=V,ut.Lazy=_,ut.Memo=R,ut.Portal=F,ut.Profiler=N,ut.StrictMode=Y,ut.Suspense=I,ut.isAsyncMode=ne,ut.isConcurrentMode=k,ut.isContextConsumer=T,ut.isContextProvider=Z,ut.isElement=$,ut.isForwardRef=K,ut.isFragment=G,ut.isLazy=y,ut.isMemo=z,ut.isPortal=W,ut.isProfiler=B,ut.isStrictMode=X,ut.isSuspense=ee,ut.isValidElementType=D,ut.typeOf=M}()),ut}var Vh;function qh(){return Vh||(Vh=1,process.env.NODE_ENV==="production"?Iu.exports=Mx():Iu.exports=Bx()),Iu.exports}/*
|
166
|
+
object-assign
|
167
|
+
(c) Sindre Sorhus
|
168
|
+
@license MIT
|
169
|
+
*/var _u,Zh;function Tx(){if(Zh)return _u;Zh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[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 _u=o()?Object.assign:function(i,s){for(var a,u=r(i),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(u[d]=a[d]);if(e){l=e(a);for(var h=0;h<l.length;h++)n.call(a,l[h])&&(u[l[h]]=a[l[h]])}}return u},_u}var Ru,Gh;function ju(){if(Gh)return Ru;Gh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ru=e,Ru}var Kh,Yh;function Xh(){return Yh||(Yh=1,Kh=Function.call.bind(Object.prototype.hasOwnProperty)),Kh}var Nu,Jh;function Ax(){if(Jh)return Nu;Jh=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ju(),n={},r=Xh();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,u,l){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var d;try{if(typeof i[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 i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=i[f](s,f,u,a,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((u||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var v=l?l():"";e("Failed "+a+" type: "+d.message+(v??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Nu=o,Nu}var zu,Qh;function Fx(){if(Qh)return zu;Qh=1;var e=qh(),t=Tx(),n=ju(),r=Xh(),o=Ax(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return zu=function(a,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(k){var T=k&&(l&&k[l]||k[f]);if(typeof T=="function")return T}var h="<<anonymous>>",v={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:S(),arrayOf:D,element:M(),elementType:b(),instanceOf:w,node:P(),objectOf:O,oneOf:L,oneOfType:H,shape:_,exact:R};function m(k,T){return k===T?k!==0||1/k===1/T:k!==k&&T!==T}function g(k,T){this.message=k,this.data=T&&typeof T=="object"?T:{},this.stack=""}g.prototype=Error.prototype;function p(k){if(process.env.NODE_ENV!=="production")var T={},Z=0;function $(G,y,z,W,B,X,ee){if(W=W||h,X=X||z,ee!==n){if(u){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=W+":"+z;!T[se]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[se]=!0,Z++)}}return y[z]==null?G?y[z]===null?new g("The "+B+" `"+X+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+B+" `"+X+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(y,z,W,B,X)}var K=$.bind(null,!1);return K.isRequired=$.bind(null,!0),K}function E(k){function T(Z,$,K,G,y,z){var W=Z[$],B=Y(W);if(B!==k){var X=I(W);return new g("Invalid "+G+" `"+y+"` of type "+("`"+X+"` supplied to `"+K+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return p(T)}function S(){return p(s)}function D(k){function T(Z,$,K,G,y){if(typeof k!="function")return new g("Property `"+y+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var z=Z[$];if(!Array.isArray(z)){var W=Y(z);return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected an array."))}for(var B=0;B<z.length;B++){var X=k(z,B,K,G,y+"["+B+"]",n);if(X instanceof Error)return X}return null}return p(T)}function M(){function k(T,Z,$,K,G){var y=T[Z];if(!a(y)){var z=Y(y);return new g("Invalid "+K+" `"+G+"` of type "+("`"+z+"` supplied to `"+$+"`, expected a single ReactElement."))}return null}return p(k)}function b(){function k(T,Z,$,K,G){var y=T[Z];if(!e.isValidElementType(y)){var z=Y(y);return new g("Invalid "+K+" `"+G+"` of type "+("`"+z+"` supplied to `"+$+"`, expected a single ReactElement type."))}return null}return p(k)}function w(k){function T(Z,$,K,G,y){if(!(Z[$]instanceof k)){var z=k.name||h,W=ne(Z[$]);return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected ")+("instance of `"+z+"`."))}return null}return p(T)}function L(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function T(Z,$,K,G,y){for(var z=Z[$],W=0;W<k.length;W++)if(m(z,k[W]))return null;var B=JSON.stringify(k,function(X,ee){var j=I(ee);return j==="symbol"?String(ee):ee});return new g("Invalid "+G+" `"+y+"` of value `"+String(z)+"` "+("supplied to `"+K+"`, expected one of "+B+"."))}return p(T)}function O(k){function T(Z,$,K,G,y){if(typeof k!="function")return new g("Property `"+y+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected an object."));for(var B in z)if(r(z,B)){var X=k(z,B,K,G,y+"."+B,n);if(X instanceof Error)return X}return null}return p(T)}function H(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var T=0;T<k.length;T++){var Z=k[T];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(Z)+" at index "+T+"."),s}function $(K,G,y,z,W){for(var B=[],X=0;X<k.length;X++){var ee=k[X],j=ee(K,G,y,z,W,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&B.push(j.data.expectedType)}var se=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new g("Invalid "+z+" `"+W+"` supplied to "+("`"+y+"`"+se+"."))}return p($)}function P(){function k(T,Z,$,K,G){return F(T[Z])?null:new g("Invalid "+K+" `"+G+"` supplied to "+("`"+$+"`, expected a ReactNode."))}return p(k)}function V(k,T,Z,$,K){return new g((k||"React class")+": "+T+" type `"+Z+"."+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function _(k){function T(Z,$,K,G,y){var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type `"+W+"` "+("supplied to `"+K+"`, expected `object`."));for(var B in k){var X=k[B];if(typeof X!="function")return V(K,G,y,B,I(X));var ee=X(z,B,K,G,y+"."+B,n);if(ee)return ee}return null}return p(T)}function R(k){function T(Z,$,K,G,y){var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type `"+W+"` "+("supplied to `"+K+"`, expected `object`."));var B=t({},Z[$],k);for(var X in B){var ee=k[X];if(r(k,X)&&typeof ee!="function")return V(K,G,y,X,I(ee));if(!ee)return new g("Invalid "+G+" `"+y+"` key `"+X+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(Z[$],null," ")+`
|
170
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var j=ee(z,X,K,G,y+"."+X,n);if(j)return j}return null}return p(T)}function F(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(F);if(k===null||a(k))return!0;var T=d(k);if(T){var Z=T.call(k),$;if(T!==k.entries){for(;!($=Z.next()).done;)if(!F($.value))return!1}else for(;!($=Z.next()).done;){var K=$.value;if(K&&!F(K[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,T){return k==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function Y(k){var T=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(T,k)?"symbol":T}function I(k){if(typeof k>"u"||k===null)return""+k;var T=Y(k);if(T==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return T}function Q(k){var T=I(k);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function ne(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},zu}var $u,eg;function Ix(){if(eg)return $u;eg=1;var e=ju();function t(){}function n(){}return n.resetWarningCache=t,$u=function(){function r(s,a,u,l,f,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},$u}if(process.env.NODE_ENV!=="production"){var _x=qh(),Rx=!0;Fu.exports=Fx()(_x.isElement,Rx)}else Fu.exports=Ix()();var os=Fu.exports,is={};Object.defineProperty(is,"__esModule",{value:!0});var jx=jo,Uu=Nx(jx);function Nx(e){return e&&e.__esModule?e:{default:e}}var zx={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,t){this.containers[e]=t},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,t=this.getHash();t?window.setTimeout(function(){e.scrollTo(t,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,t){var n=this.scroller,r=n.get(e);if(r&&(t||e!==n.getActiveLink())){var o=this.containers[e]||document;n.scrollTo(e,{container:o})}},getHash:function(){return Uu.default.getHash()},changeHash:function(e,t){this.isInitialized()&&Uu.default.getHash()!==e&&Uu.default.updateHash(e,t)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};is.default=zx,Object.defineProperty(Io,"__esModule",{value:!0});var ss=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$x=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ux=c,tg=$o(Ux),Wx=_o,as=$o(Wx),Hx=no,Vx=$o(Hx),qx=os,bt=$o(qx),Zx=is,dr=$o(Zx);function $o(e){return e&&e.__esModule?e:{default:e}}function Gx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kx(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Yx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ng={to:bt.default.string.isRequired,containerId:bt.default.string,container:bt.default.object,activeClass:bt.default.string,activeStyle:bt.default.object,spy:bt.default.bool,horizontal:bt.default.bool,smooth:bt.default.oneOfType([bt.default.bool,bt.default.string]),offset:bt.default.number,delay:bt.default.number,isDynamic:bt.default.bool,onClick:bt.default.func,duration:bt.default.oneOfType([bt.default.number,bt.default.func]),absolute:bt.default.bool,onSetActive:bt.default.func,onSetInactive:bt.default.func,ignoreCancelEvents:bt.default.bool,hashSpy:bt.default.bool,saveHashHistory:bt.default.bool,spyThrottle:bt.default.number};Io.default=function(e,t){var n=t||Vx.default,r=function(i){Yx(s,i);function s(a){Gx(this,s);var u=Kx(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return o.call(u),u.state={active:!1},u}return $x(s,[{key:"getScrollSpyContainer",value:function(){var a=this.props.containerId,u=this.props.container;return a&&!u?document.getElementById(a):u&&u.nodeType?u:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var a=this.getScrollSpyContainer();as.default.isMounted(a)||as.default.mount(a,this.props.spyThrottle),this.props.hashSpy&&(dr.default.isMounted()||dr.default.mount(n),dr.default.mapContainer(this.props.to,a)),as.default.addSpyHandler(this.spyHandler,a),this.setState({container:a})}}},{key:"componentWillUnmount",value:function(){as.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var a="";this.state&&this.state.active?a=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():a=this.props.className;var u={};this.state&&this.state.active?u=ss({},this.props.style,this.props.activeStyle):u=ss({},this.props.style);var l=ss({},this.props);for(var f in ng)l.hasOwnProperty(f)&&delete l[f];return l.className=a,l.style=u,l.onClick=this.handleClick,tg.default.createElement(e,l)}}]),s}(tg.default.PureComponent),o=function(){var i=this;this.scrollTo=function(s,a){n.scrollTo(s,ss({},i.state,a))},this.handleClick=function(s){i.props.onClick&&i.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),i.scrollTo(i.props.to,i.props)},this.spyHandler=function(s,a){var u=i.getScrollSpyContainer();if(!(dr.default.isMounted()&&!dr.default.isInitialized())){var l=i.props.horizontal,f=i.props.to,d=null,h=void 0,v=void 0;if(l){var m=0,g=0,p=0;if(u.getBoundingClientRect){var E=u.getBoundingClientRect();p=E.left}if(!d||i.props.isDynamic){if(d=n.get(f),!d)return;var S=d.getBoundingClientRect();m=S.left-p+s,g=m+S.width}var D=s-i.props.offset;h=D>=Math.floor(m)&&D<Math.floor(g),v=D<Math.floor(m)||D>=Math.floor(g)}else{var M=0,b=0,w=0;if(u.getBoundingClientRect){var L=u.getBoundingClientRect();w=L.top}if(!d||i.props.isDynamic){if(d=n.get(f),!d)return;var O=d.getBoundingClientRect();M=O.top-w+a,b=M+O.height}var H=a-i.props.offset;h=H>=Math.floor(M)&&H<Math.floor(b),v=H<Math.floor(M)||H>=Math.floor(b)}var P=n.getActiveLink();if(v){if(f===P&&n.setActiveLink(void 0),i.props.hashSpy&&dr.default.getHash()===f){var V=i.props.saveHashHistory,_=V===void 0?!1:V;dr.default.changeHash("",_)}i.props.spy&&i.state.active&&(i.setState({active:!1}),i.props.onSetInactive&&i.props.onSetInactive(f,d))}if(h&&(P!==f||i.state.active===!1)){n.setActiveLink(f);var R=i.props.saveHashHistory,F=R===void 0?!1:R;i.props.hashSpy&&dr.default.changeHash(f,F),i.props.spy&&(i.setState({active:!0}),i.props.onSetActive&&i.props.onSetActive(f,d))}}}};return r.propTypes=ng,r.defaultProps={offset:0},r},Object.defineProperty(Su,"__esModule",{value:!0});var Xx=c,rg=og(Xx),Jx=Io,Qx=og(Jx);function og(e){return e&&e.__esModule?e:{default:e}}function eS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ig(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function tS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var nS=function(e){tS(t,e);function t(){var n,r,o,i;eS(this,t);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return i=(r=(o=ig(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(a))),o),o.render=function(){return rg.default.createElement("a",o.props,o.props.children)},r),ig(o,i)}return t}(rg.default.Component);Su.default=(0,Qx.default)(nS);var Wu={};Object.defineProperty(Wu,"__esModule",{value:!0});var rS=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),oS=c,sg=ag(oS),iS=Io,sS=ag(iS);function ag(e){return e&&e.__esModule?e:{default:e}}function aS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uS(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function lS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var cS=function(e){lS(t,e);function t(){return aS(this,t),uS(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return rS(t,[{key:"render",value:function(){return sg.default.createElement("button",this.props,this.props.children)}}]),t}(sg.default.Component);Wu.default=(0,sS.default)(cS);var Hu={},us={};Object.defineProperty(us,"__esModule",{value:!0});var fS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dS=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),pS=c,ug=ls(pS),hS=xn;ls(hS);var gS=no,lg=ls(gS),vS=os,cg=ls(vS);function ls(e){return e&&e.__esModule?e:{default:e}}function mS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yS(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function bS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}us.default=function(e){var t=function(n){bS(r,n);function r(o){mS(this,r);var i=yS(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,o));return i.childBindings={domNode:null},i}return dS(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;lg.default.unregister(this.props.name)}},{key:"registerElems",value:function(o){lg.default.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return ug.default.createElement(e,fS({},this.props,{parentBindings:this.childBindings}))}}]),r}(ug.default.Component);return t.propTypes={name:cg.default.string,id:cg.default.string},t},Object.defineProperty(Hu,"__esModule",{value:!0});var fg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CS=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ES=c,dg=Vu(ES),wS=us,DS=Vu(wS),xS=os,pg=Vu(xS);function Vu(e){return e&&e.__esModule?e:{default:e}}function SS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LS(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function OS(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var hg=function(e){OS(t,e);function t(){return SS(this,t),LS(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return CS(t,[{key:"render",value:function(){var n=this,r=fg({},this.props);return delete r.name,r.parentBindings&&delete r.parentBindings,dg.default.createElement("div",fg({},r,{ref:function(o){n.props.parentBindings.domNode=o}}),this.props.children)}}]),t}(dg.default.Component);hg.propTypes={name:pg.default.string,id:pg.default.string},Hu.default=(0,DS.default)(hg);var qu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function vg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mg(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function yg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var cs=c,Nr=_o,Zu=no,xt=os,pr=is,bg={to:xt.string.isRequired,containerId:xt.string,container:xt.object,activeClass:xt.string,spy:xt.bool,smooth:xt.oneOfType([xt.bool,xt.string]),offset:xt.number,delay:xt.number,isDynamic:xt.bool,onClick:xt.func,duration:xt.oneOfType([xt.number,xt.func]),absolute:xt.bool,onSetActive:xt.func,onSetInactive:xt.func,ignoreCancelEvents:xt.bool,hashSpy:xt.bool,spyThrottle:xt.number},kS={Scroll:function(e,t){console.warn("Helpers.Scroll is deprecated since v1.7.0");var n=t||Zu,r=function(i){yg(s,i);function s(a){vg(this,s);var u=mg(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return o.call(u),u.state={active:!1},u}return gg(s,[{key:"getScrollSpyContainer",value:function(){var a=this.props.containerId,u=this.props.container;return a?document.getElementById(a):u&&u.nodeType?u:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var a=this.getScrollSpyContainer();Nr.isMounted(a)||Nr.mount(a,this.props.spyThrottle),this.props.hashSpy&&(pr.isMounted()||pr.mount(n),pr.mapContainer(this.props.to,a)),this.props.spy&&Nr.addStateHandler(this.stateHandler),Nr.addSpyHandler(this.spyHandler,a),this.setState({container:a})}}},{key:"componentWillUnmount",value:function(){Nr.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var a="";this.state&&this.state.active?a=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():a=this.props.className;var u=qu({},this.props);for(var l in bg)u.hasOwnProperty(l)&&delete u[l];return u.className=a,u.onClick=this.handleClick,cs.createElement(e,u)}}]),s}(cs.Component),o=function(){var i=this;this.scrollTo=function(s,a){n.scrollTo(s,qu({},i.state,a))},this.handleClick=function(s){i.props.onClick&&i.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),i.scrollTo(i.props.to,i.props)},this.stateHandler=function(){n.getActiveLink()!==i.props.to&&(i.state!==null&&i.state.active&&i.props.onSetInactive&&i.props.onSetInactive(),i.setState({active:!1}))},this.spyHandler=function(s){var a=i.getScrollSpyContainer();if(!(pr.isMounted()&&!pr.isInitialized())){var u=i.props.to,l=null,f=0,d=0,h=0;if(a.getBoundingClientRect){var v=a.getBoundingClientRect();h=v.top}if(!l||i.props.isDynamic){if(l=n.get(u),!l)return;var m=l.getBoundingClientRect();f=m.top-h+s,d=f+m.height}var g=s-i.props.offset,p=g>=Math.floor(f)&&g<Math.floor(d),E=g<Math.floor(f)||g>=Math.floor(d),S=n.getActiveLink();if(E)return u===S&&n.setActiveLink(void 0),i.props.hashSpy&&pr.getHash()===u&&pr.changeHash(),i.props.spy&&i.state.active&&(i.setState({active:!1}),i.props.onSetInactive&&i.props.onSetInactive()),Nr.updateStates();if(p&&S!==u)return n.setActiveLink(u),i.props.hashSpy&&pr.changeHash(u),i.props.spy&&(i.setState({active:!0}),i.props.onSetActive&&i.props.onSetActive(u)),Nr.updateStates()}}};return r.propTypes=bg,r.defaultProps={offset:0},r},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var t=function(n){yg(r,n);function r(o){vg(this,r);var i=mg(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,o));return i.childBindings={domNode:null},i}return gg(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;Zu.unregister(this.props.name)}},{key:"registerElems",value:function(o){Zu.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return cs.createElement(e,qu({},this.props,{parentBindings:this.childBindings}))}}]),r}(cs.Component);return t.propTypes={name:xt.string,id:xt.string},t}},PS=kS;Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.Helpers=Pt.ScrollElement=Pt.ScrollLink=Pt.animateScroll=Pt.scrollSpy=Pt.Events=Pt.scroller=Pt.Element=Pt.Button=Pt.Link=void 0;var MS=Su,Cg=Nn(MS),BS=Wu,Eg=Nn(BS),TS=Hu,wg=Nn(TS),AS=no,Dg=Nn(AS),FS=No,xg=Nn(FS),IS=_o,Sg=Nn(IS),_S=Qi,Lg=Nn(_S),RS=Io,Og=Nn(RS),jS=us,kg=Nn(jS),NS=PS,Pg=Nn(NS);function Nn(e){return e&&e.__esModule?e:{default:e}}Pt.Link=Cg.default,Pt.Button=Eg.default,Pt.Element=wg.default,Pt.scroller=Dg.default,Pt.Events=xg.default,Pt.scrollSpy=Sg.default,Pt.animateScroll=Lg.default,Pt.ScrollLink=Og.default,Pt.ScrollElement=kg.default,Pt.Helpers=Pg.default,Pt.default={Link:Cg.default,Button:Eg.default,Element:wg.default,scroller:Dg.default,Events:xg.default,scrollSpy:Sg.default,animateScroll:Lg.default,ScrollLink:Og.default,ScrollElement:kg.default,Helpers:Pg.default},c.createContext({}),c.createContext({}),c.createContext({});let zS={data:""},$S=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||zS,US=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,WS=/\/\*[^]*?\*\/| +/g,Mg=/\n+/g,hr=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+s+";":r+=i[1]=="f"?hr(s,i):i+"{"+hr(s,i[1]=="k"?"":t)+"}":typeof s=="object"?r+=hr(s,t?t.replace(/([^,])+/g,a=>i.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=hr.p?hr.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Zn={},Bg=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Bg(e[n]);return t}return e},HS=(e,t,n,r,o)=>{let i=Bg(e),s=Zn[i]||(Zn[i]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(i));if(!Zn[s]){let u=i!==e?e:(l=>{let f,d,h=[{}];for(;f=US.exec(l.replace(WS,""));)f[4]?h.shift():f[3]?(d=f[3].replace(Mg," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][f[1]]=f[2].replace(Mg," ").trim();return h[0]})(e);Zn[s]=hr(o?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&Zn.g?Zn.g:null;return n&&(Zn.g=Zn[s]),((u,l,f,d)=>{d?l.data=l.data.replace(d,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(Zn[s],t,r,a),s},VS=(e,t,n)=>e.reduce((r,o,i)=>{let s=t[i];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?"":hr(a,""):a===!1?"":a}return r+o+(s??"")},"");function fs(e){let t=this||{},n=e.call?e(t.p):e;return HS(n.unshift?n.raw?VS(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,$S(t.target),t.g,t.o,t.k)}let Tg,Gu,Ku;fs.bind({g:1});let Gn=fs.bind({k:1});function qS(e,t,n,r){hr.p=t,Tg=e,Gu=n,Ku=r}function gr(e,t){let n=this||{};return function(){let r=arguments;function o(i,s){let a=Object.assign({},i),u=a.className||o.className;n.p=Object.assign({theme:Gu&&Gu()},a),n.o=/ *go\d+/.test(u),a.className=fs.apply(n,r)+(u?" "+u:""),t&&(a.ref=s);let l=e;return e[0]&&(l=a.as||e,delete a.as),Ku&&l[0]&&Ku(a),Tg(l,a)}return t?t(o):o}}var ZS=e=>typeof e=="function",GS=(e,t)=>ZS(e)?e(t):e,KS=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),YS=Gn`
|
171
|
+
from {
|
172
|
+
transform: scale(0) rotate(45deg);
|
173
|
+
opacity: 0;
|
174
|
+
}
|
175
|
+
to {
|
176
|
+
transform: scale(1) rotate(45deg);
|
177
|
+
opacity: 1;
|
178
|
+
}`,XS=Gn`
|
179
|
+
from {
|
180
|
+
transform: scale(0);
|
181
|
+
opacity: 0;
|
182
|
+
}
|
183
|
+
to {
|
184
|
+
transform: scale(1);
|
185
|
+
opacity: 1;
|
186
|
+
}`,JS=Gn`
|
187
|
+
from {
|
188
|
+
transform: scale(0) rotate(90deg);
|
189
|
+
opacity: 0;
|
190
|
+
}
|
191
|
+
to {
|
192
|
+
transform: scale(1) rotate(90deg);
|
193
|
+
opacity: 1;
|
194
|
+
}`,QS=gr("div")`
|
195
|
+
width: 20px;
|
196
|
+
opacity: 0;
|
197
|
+
height: 20px;
|
198
|
+
border-radius: 10px;
|
199
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
200
|
+
position: relative;
|
201
|
+
transform: rotate(45deg);
|
202
|
+
|
203
|
+
animation: ${YS} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
204
|
+
forwards;
|
205
|
+
animation-delay: 100ms;
|
206
|
+
|
207
|
+
&:after,
|
208
|
+
&:before {
|
209
|
+
content: '';
|
210
|
+
animation: ${XS} 0.15s ease-out forwards;
|
211
|
+
animation-delay: 150ms;
|
212
|
+
position: absolute;
|
213
|
+
border-radius: 3px;
|
214
|
+
opacity: 0;
|
215
|
+
background: ${e=>e.secondary||"#fff"};
|
216
|
+
bottom: 9px;
|
217
|
+
left: 4px;
|
218
|
+
height: 2px;
|
219
|
+
width: 12px;
|
220
|
+
}
|
221
|
+
|
222
|
+
&:before {
|
223
|
+
animation: ${JS} 0.15s ease-out forwards;
|
224
|
+
animation-delay: 180ms;
|
225
|
+
transform: rotate(90deg);
|
226
|
+
}
|
227
|
+
`,eL=Gn`
|
228
|
+
from {
|
229
|
+
transform: rotate(0deg);
|
230
|
+
}
|
231
|
+
to {
|
232
|
+
transform: rotate(360deg);
|
233
|
+
}
|
234
|
+
`,tL=gr("div")`
|
235
|
+
width: 12px;
|
236
|
+
height: 12px;
|
237
|
+
box-sizing: border-box;
|
238
|
+
border: 2px solid;
|
239
|
+
border-radius: 100%;
|
240
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
241
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
242
|
+
animation: ${eL} 1s linear infinite;
|
243
|
+
`,nL=Gn`
|
244
|
+
from {
|
245
|
+
transform: scale(0) rotate(45deg);
|
246
|
+
opacity: 0;
|
247
|
+
}
|
248
|
+
to {
|
249
|
+
transform: scale(1) rotate(45deg);
|
250
|
+
opacity: 1;
|
251
|
+
}`,rL=Gn`
|
252
|
+
0% {
|
253
|
+
height: 0;
|
254
|
+
width: 0;
|
255
|
+
opacity: 0;
|
256
|
+
}
|
257
|
+
40% {
|
258
|
+
height: 0;
|
259
|
+
width: 6px;
|
260
|
+
opacity: 1;
|
261
|
+
}
|
262
|
+
100% {
|
263
|
+
opacity: 1;
|
264
|
+
height: 10px;
|
265
|
+
}`,oL=gr("div")`
|
266
|
+
width: 20px;
|
267
|
+
opacity: 0;
|
268
|
+
height: 20px;
|
269
|
+
border-radius: 10px;
|
270
|
+
background: ${e=>e.primary||"#61d345"};
|
271
|
+
position: relative;
|
272
|
+
transform: rotate(45deg);
|
273
|
+
|
274
|
+
animation: ${nL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
275
|
+
forwards;
|
276
|
+
animation-delay: 100ms;
|
277
|
+
&:after {
|
278
|
+
content: '';
|
279
|
+
box-sizing: border-box;
|
280
|
+
animation: ${rL} 0.2s ease-out forwards;
|
281
|
+
opacity: 0;
|
282
|
+
animation-delay: 200ms;
|
283
|
+
position: absolute;
|
284
|
+
border-right: 2px solid;
|
285
|
+
border-bottom: 2px solid;
|
286
|
+
border-color: ${e=>e.secondary||"#fff"};
|
287
|
+
bottom: 6px;
|
288
|
+
left: 6px;
|
289
|
+
height: 10px;
|
290
|
+
width: 6px;
|
291
|
+
}
|
292
|
+
`,iL=gr("div")`
|
293
|
+
position: absolute;
|
294
|
+
`,sL=gr("div")`
|
295
|
+
position: relative;
|
296
|
+
display: flex;
|
297
|
+
justify-content: center;
|
298
|
+
align-items: center;
|
299
|
+
min-width: 20px;
|
300
|
+
min-height: 20px;
|
301
|
+
`,aL=Gn`
|
302
|
+
from {
|
303
|
+
transform: scale(0.6);
|
304
|
+
opacity: 0.4;
|
305
|
+
}
|
306
|
+
to {
|
307
|
+
transform: scale(1);
|
308
|
+
opacity: 1;
|
309
|
+
}`,uL=gr("div")`
|
310
|
+
position: relative;
|
311
|
+
transform: scale(0.6);
|
312
|
+
opacity: 0.4;
|
313
|
+
min-width: 20px;
|
314
|
+
animation: ${aL} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
315
|
+
forwards;
|
316
|
+
`,lL=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ot.createElement(uL,null,t):t:n==="blank"?null:ot.createElement(sL,null,ot.createElement(tL,{...r}),n!=="loading"&&ot.createElement(iL,null,n==="error"?ot.createElement(QS,{...r}):ot.createElement(oL,{...r})))},cL=e=>`
|
317
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
318
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
319
|
+
`,fL=e=>`
|
320
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
321
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
322
|
+
`,dL="0%{opacity:0;} 100%{opacity:1;}",pL="0%{opacity:1;} 100%{opacity:0;}",hL=gr("div")`
|
323
|
+
display: flex;
|
324
|
+
align-items: center;
|
325
|
+
background: #fff;
|
326
|
+
color: #363636;
|
327
|
+
line-height: 1.3;
|
328
|
+
will-change: transform;
|
329
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
330
|
+
max-width: 350px;
|
331
|
+
pointer-events: auto;
|
332
|
+
padding: 8px 10px;
|
333
|
+
border-radius: 8px;
|
334
|
+
`,gL=gr("div")`
|
335
|
+
display: flex;
|
336
|
+
justify-content: center;
|
337
|
+
margin: 4px 10px;
|
338
|
+
color: inherit;
|
339
|
+
flex: 1 1 auto;
|
340
|
+
white-space: pre-line;
|
341
|
+
`,vL=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=KS()?[dL,pL]:[cL(n),fL(n)];return{animation:t?`${Gn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Gn(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}};ot.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?vL(e.position||t||"top-center",e.visible):{opacity:0},i=ot.createElement(lL,{toast:e}),s=ot.createElement(gL,{...e.ariaProps},GS(e.message,e));return ot.createElement(hL,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:s}):ot.createElement(ot.Fragment,null,i,s))}),qS(ot.createElement),fs`
|
342
|
+
z-index: 9999;
|
343
|
+
> * {
|
344
|
+
pointer-events: auto;
|
345
|
+
}
|
346
|
+
`;function mL(e){const{filePath:t,isLoading:n,acceptImage:r,changeImageButtonText:o,handleSelectFile:i,reSendImage:s}=e;function a(){const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=l=>{var d;const f=(d=l.target.files)==null?void 0:d[0];f&&i(f)},u.click()}return A.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url(${t})`},children:[s&&A.jsx(TD,{orientation:"bottom",text:"Reenviar imagem",children:A.jsx(g1,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:s,icon:Ue.RefreshCw})}),A.jsx(up,{isLoading:n,onClick:a,variant:"outline",size:"sm",type:"button",children:o})]})}function yL(e){const{error:t}=e,n="arkynImageUploadError";return t?A.jsx("strong",{className:n,children:t}):A.jsx(A.Fragment,{})}function bL(e){const{label:t,showAsterisk:n}=e,o=`arkynImageUploadLabel ${n?"asteriskTrue":"asteriskFalse"}`;return A.jsx("strong",{className:o.trim(),children:t})}function CL(e){const{dropImageText:t,isLoading:n,acceptImage:r,handleSelectFile:o,selectImageButtonText:i}=e;function s(u){u.preventDefault();const l=u.dataTransfer.files[0];l&&o(l)}function a(){const u=document.createElement("input");u.type="file",u.accept=r,u.onchange=l=>{var d;const f=(d=l.target.files)==null?void 0:d[0];f&&o(f)},u.click()}return A.jsxs("div",{onDrop:s,className:"arkynImageUploadNoFileContent",children:[A.jsx(up,{isLoading:n,onClick:a,variant:"ghost",size:"sm",type:"button",children:i}),A.jsx("p",{children:t})]})}function EL(e){const{name:t,defaultValue:n="",label:r,showAsterisk:o=!1,action:i,fileName:s="file",method:a="POST",acceptImage:u="image/*",fileResponseName:l="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:d="Selecionar imagem",dropImageText:h="Ou arraste e solte a imagem aqui",onUpload:v}=e,g=p1()[t],[p,E]=c.useState(n),[S,D]=c.useState(""),[M,b]=c.useState(null),[w,L]=c.useState(n),[O,H]=c.useState(!1);async function P(Y){H(!0),b(Y);const I=new FormData;I.append(s,Y),await fetch(i,{method:a,body:I}).then(async Q=>await Q.json()).then(Q=>{Q!=null&&Q.error?D(Q.error):E(Q==null?void 0:Q[l]),v&&v(Q==null?void 0:Q[l])}).catch(Q=>{console.error(Q),D("Erro ao enviar imagem")}).finally(()=>H(!1))}function V(Y){L(URL.createObjectURL(Y)),P(Y)}const _=g||S,N=`arkynImageUpload ${_?"hasError":"noHasError"} ${w?"hasImage":"noHasImage"}`;return A.jsxs("div",{className:"arkynImageUploadContainer",children:[r&&A.jsx(bL,{label:r,showAsterisk:o}),A.jsxs("div",{className:N,children:[A.jsx("input",{type:"hidden",name:t,value:p||""}),!w&&A.jsx(CL,{isLoading:O,acceptImage:u,dropImageText:h,handleSelectFile:V,selectImageButtonText:d}),w&&A.jsx(mL,{isLoading:O,acceptImage:u,filePath:w,handleSelectFile:V,changeImageButtonText:f,reSendImage:_&&M?()=>P(M):void 0})]}),_&&A.jsx(yL,{error:_})]})}const Ag=c.createContext({});function wL(){return c.useContext(Ag)}function DL(e){const{defaultValue:t,name:n,value:r,onChange:o,size:i="md",className:s="",...a}=e,[u,l]=c.useState(t||""),{inputRef:f,id:d}=an();function h(m){l(m),o&&o(m)}const v=`arkynRadioGroup ${i} ${s}`;return A.jsxs(Ag.Provider,{value:{onChange:h,value:r||u,size:i},children:[A.jsx("input",{style:{display:"none"},type:"text",id:d,readOnly:!0,name:n,ref:f,value:r||u}),A.jsx("div",{className:v.trim(),...a})]})}function xL(e){const{value:t,size:n,disabled:r,children:o,className:i="",...s}=e,{onChange:a,size:u,value:l}=wL(),{error:f}=an(),g=`arkynRadioBox ${n||u} ${l===t?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${i}`;return A.jsxs("label",{className:g.trim(),children:[A.jsx("button",{type:"button",disabled:r,onClick:()=>a(t),onFocus:()=>a(t),...s}),o]})}var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});for(var SL=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Yu={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Fg={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:SL?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Xu={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},ds=1;ds<20;ds++)Xu["f"+ds]=111+ds;function ps(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(s){return Ig(s,t)}),o=function(a){return r.some(function(u){return _g(u,a)})},i=n==null?o:o(n);return i}function LL(e,t){return ps(e,t)}function OL(e,t){return ps(e,{byKey:!0},t)}function Ig(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var o=e.split("+"),i=o.length;for(var s in Yu)r[Yu[s]]=!1;var a=!0,u=!1,l=void 0;try{for(var f=o[Symbol.iterator](),d;!(a=(d=f.next()).done);a=!0){var h=d.value,v=h.endsWith("?")&&h.length>1;v&&(h=h.slice(0,-1));var m=Ju(h),g=Yu[m];if(h.length>1&&!g&&!Fg[h]&&!Xu[m])throw new TypeError('Unknown modifier: "'+h+'"');(i===1||!g)&&(n?r.key=m:r.which=Rg(h)),g&&(r[g]=v?null:!0)}}catch(p){u=!0,l=p}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}return r}function _g(e,t){for(var n in e){var r=e[n],o=void 0;if(r!=null&&(n==="key"&&t.key!=null?o=t.key.toLowerCase():n==="which"?o=r===91&&t.which===93?91:t.which:o=t[n],!(o==null&&r===!1)&&o!==r))return!1}return!0}function Rg(e){e=Ju(e);var t=Xu[e]||e.toUpperCase().charCodeAt(0);return t}function Ju(e){return e=e.toLowerCase(),e=Fg[e]||e,e}var kL=Kn.default=ps,Qu=Kn.isHotkey=ps;Kn.isCodeHotkey=LL,Kn.isKeyHotkey=OL,Kn.parseHotkey=Ig,Kn.compareHotkey=_g,Kn.toKeyCode=Rg,Kn.toKeyName=Ju;/*!
|
72
347
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
73
348
|
*
|
74
349
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
75
350
|
* Released under the MIT License.
|
76
|
-
*/function du(t){return Object.prototype.toString.call(t)==="[object Object]"}function ut(t){var e,n;return du(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(du(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var pu=Symbol.for("immer-nothing"),hu=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state"),Fh=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function ht(t,...e){if(process.env.NODE_ENV!=="production"){const n=Fh[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function pn(t){return!!t&&!!t[Ct]}function hn(t){var e;return t?vu(t)||Array.isArray(t)||!!t[hu]||!!((e=t.constructor)!=null&&e[hu])||zr(t)||Wr(t):!1}var Mh=Object.prototype.constructor.toString();function vu(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Mh}function Nr(t,e){_r(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function _r(t){const e=t[Ct];return e?e.type_:Array.isArray(t)?1:zr(t)?2:Wr(t)?3:0}function uo(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function gu(t,e,n){const r=_r(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function kh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function zr(t){return t instanceof Map}function Wr(t){return t instanceof Set}function vn(t){return t.copy_||t.base_}function lo(t,e){if(zr(t))return new Map(t);if(Wr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=vu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Ct];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function co(t,e=!1){return Ur(t)||pn(t)||!hn(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=Th),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>co(r,!0))),t}function Th(){ht(2)}function Ur(t){return Object.isFrozen(t)}var Ih={};function gn(t){const e=Ih[t];return e||ht(0,t),e}var $n;function mu(){return $n}function jh(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function yu(t,e){e&&(gn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function fo(t){po(t),t.drafts_.forEach(Nh),t.drafts_=null}function po(t){t===$n&&($n=t.parent_)}function Cu(t){return $n=jh($n,t)}function Nh(t){const e=t[Ct];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Du(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Ct].modified_&&(fo(e),ht(4)),hn(t)&&(t=Hr(e,t),e.parent_||Rr(e,t)),e.patches_&&gn("Patches").generateReplacementPatches_(n[Ct].base_,t,e.patches_,e.inversePatches_)):t=Hr(e,n,[]),fo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==pu?t:void 0}function Hr(t,e,n){if(Ur(e))return e;const r=e[Ct];if(!r)return Nr(e,(i,o)=>Eu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Rr(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Nr(o,(a,u)=>Eu(t,r,i,a,u,n,s)),Rr(t,i,!1),n&&t.patches_&&gn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Eu(t,e,n,r,i,o,s){if(process.env.NODE_ENV!=="production"&&i===n&&ht(5),pn(i)){const a=o&&e&&e.type_!==3&&!uo(e.assigned_,r)?o.concat(r):void 0,u=Hr(t,i,a);if(gu(n,r,u),pn(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(hn(i)&&!Ur(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Hr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Rr(t,i)}}function Rr(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&co(e,n)}function _h(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:mu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=ho;n&&(i=[r],o=er);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var ho={get(t,e){if(e===Ct)return t;const n=vn(t);if(!uo(n,e))return zh(t,n,e);const r=n[e];return t.finalized_||!hn(r)?r:r===vo(t.base_,e)?(mo(t),t.copy_[e]=yo(r,t)):r},has(t,e){return e in vn(t)},ownKeys(t){return Reflect.ownKeys(vn(t))},set(t,e,n){const r=bu(vn(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=vo(vn(t),e),o=i==null?void 0:i[Ct];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(kh(n,i)&&(n!==void 0||uo(t.base_,e)))return!0;mo(t),go(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return vo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,mo(t),go(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=vn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ht(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ht(12)}},er={};Nr(ho,(t,e)=>{er[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),er.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&ht(13),er.set.call(this,t,e,void 0)},er.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&ht(14),ho.set.call(this,t[0],e,n,t[0])};function vo(t,e){const n=t[Ct];return(n?vn(n):t)[e]}function zh(t,e,n){var i;const r=bu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function bu(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function go(t){t.modified_||(t.modified_=!0,t.parent_&&go(t.parent_))}function mo(t){t.copy_||(t.copy_=lo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Wh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(u=o,...l){return s.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let i;if(hn(e)){const o=Cu(this),s=yo(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?fo(o):po(o)}return yu(o,r),Du(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===pu&&(i=void 0),this.autoFreeze_&&co(i,!0),r){const o=[],s=[];gn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ht(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,u=>e(u,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){hn(t)||ht(8),pn(t)&&(t=Uh(t));const e=Cu(this),n=yo(t,void 0);return n[Ct].isManual_=!0,po(e),n}finishDraft(t,e){const n=t&&t[Ct];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return yu(r,e),Du(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=gn("Patches").applyPatches_;return pn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function yo(t,e){const n=zr(t)?gn("MapSet").proxyMap_(t,e):Wr(t)?gn("MapSet").proxySet_(t,e):_h(t,e);return(e?e.scope_:mu()).drafts_.push(n),n}function Uh(t){return pn(t)||ht(10,t),wu(t)}function wu(t){if(!hn(t)||Ur(t))return t;const e=t[Ct];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=lo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=lo(t,!0);return Nr(n,(r,i)=>{gu(n,r,wu(i))}),e&&(e.finalized_=!1),n}var Dt=new Wh,Co=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt);var Bu=Dt.createDraft.bind(Dt),xu=Dt.finishDraft.bind(Dt),Hh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=L.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Rh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Se.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Vh={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=V.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},Vr=new WeakMap,qr=new WeakMap,tr=new WeakMap,Su=new WeakMap,Au=new WeakMap,Lu=new WeakMap,Ou=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=L.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var i=t[r],o=e[r];if(i!==o)break;n.push(i)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),o=t[n],s=e[n];return L.equals(r,i)&&o>s},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return L.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),o=t[n],s=e[n];return L.equals(r,i)&&o<s},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return L.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&L.compare(t,e)===0},isBefore(t,e){return L.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&L.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&L.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&L.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&L.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],o=e[e.length-1];return i!==o&&L.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!L.isAncestor(e,t)&&!L.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:i="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:o}=e;(L.equals(o,r)||L.endsBefore(o,r)||L.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:s}=e;if(L.equals(s,r)||L.isAncestor(s,r))return null;L.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{var{path:a,position:u}=e;L.equals(a,r)||L.endsBefore(a,r)?r[a.length-1]-=1:L.isAncestor(a,r)&&(r[a.length-1]-=1,r[a.length]+=u);break}case"split_node":{var{path:l,position:c}=e;if(L.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,r)?r[l.length-1]+=1:L.isAncestor(l,r)&&t[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:p,newPath:h}=e;if(L.equals(p,h))return r;if(L.isAncestor(p,r)||L.equals(p,r)){var g=h.slice();return L.endsBefore(p,h)&&p.length<h.length&&(g[p.length-1]-=1),g.concat(r.slice(p.length))}else L.isSibling(p,h)&&(L.isAncestor(h,r)||L.equals(h,r))?L.endsBefore(p,r)?r[p.length-1]-=1:r[p.length-1]+=1:L.endsBefore(h,r)||L.equals(h,r)||L.isAncestor(h,r)?(L.endsBefore(p,r)&&(r[p.length-1]-=1),r[h.length-1]+=1):L.endsBefore(p,r)&&(L.equals(h,r)&&(r[h.length-1]+=1),r[p.length-1]-=1);break}}return r}};function nr(t){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(t)}function qh(t,e){if(nr(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gh(t){var e=qh(t,"string");return nr(e)==="symbol"?e:String(e)}function lt(t,e,n){return e=Gh(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zh=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=ne.parent(t,r),s=r[r.length-1];if(s>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(s,0,i),e)for(var[a,u]of V.points(e))e[u]=Se.transform(a,n);break}case"insert_text":{var{path:l,offset:c,text:p}=n;if(p.length===0)break;var h=ne.leaf(t,l),g=h.text.slice(0,c),y=h.text.slice(c);if(h.text=g+p+y,e)for(var[v,d]of V.points(e))e[d]=Se.transform(v,n);break}case"merge_node":{var{path:D}=n,B=ne.get(t,D),b=L.previous(D),O=ne.get(t,b),E=ne.parent(t,D),w=D[D.length-1];if(ce.isText(B)&&ce.isText(O))O.text+=B.text;else if(!ce.isText(B)&&!ce.isText(O))O.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(it.stringify(B)," ").concat(it.stringify(O)));if(E.children.splice(w,1),e)for(var[A,F]of V.points(e))e[F]=Se.transform(A,n);break}case"move_node":{var{path:R,newPath:P}=n;if(L.isAncestor(R,P))throw new Error("Cannot move a path [".concat(R,"] to new path [").concat(P,"] because the destination is inside itself."));var z=ne.get(t,R),I=ne.parent(t,R),j=R[R.length-1];I.children.splice(j,1);var T=L.transform(R,n),N=ne.get(t,L.parent(T)),K=T[T.length-1];if(N.children.splice(K,0,z),e)for(var[_,ie]of V.points(e))e[ie]=Se.transform(_,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],H=ne.parent(t,re);if(H.children.splice(k,1),e)for(var[J,q]of V.points(e)){var ee=Se.transform(J,n);if(e!=null&&ee!=null)e[q]=ee;else{var Y=void 0,C=void 0;for(var[W,U]of ne.texts(t))if(L.compare(U,re)===-1)Y=[W,U];else{C=[W,U];break}var M=!1;Y&&C&&(L.equals(C[1],re)?M=!L.hasPrevious(C[1]):M=L.common(Y[1],re).length<L.common(C[1],re).length),Y&&!M?(J.path=Y[1],J.offset=Y[0].text.length):C?(J.path=C[1],J.offset=0):e=null}}break}case"remove_text":{var{path:X,offset:te,text:G}=n;if(G.length===0)break;var le=ne.leaf(t,X),se=le.text.slice(0,te),pe=le.text.slice(te+G.length);if(le.text=se+pe,e)for(var[ve,Ce]of V.points(e))e[Ce]=Se.transform(ve,n);break}case"set_node":{var{path:me,properties:De,newProperties:ge}=n;if(me.length===0)throw new Error("Cannot set properties on the root node!");var Ne=ne.get(t,me);for(var ae in ge){if(ae==="children"||ae==="text")throw new Error('Cannot set the "'.concat(ae,'" property of nodes!'));var Ue=ge[ae];Ue==null?delete Ne[ae]:Ne[ae]=Ue}for(var de in De)ge.hasOwnProperty(de)||delete Ne[de];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!V.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(it.stringify(we)," when there is no current selection."));e=rr({},we)}for(var Te in we){var Xe=we[Te];if(Xe==null){if(Te==="anchor"||Te==="focus")throw new Error('Cannot remove the "'.concat(Te,'" selection property'));delete e[Te]}else e[Te]=Xe}}break}case"split_node":{var{path:$e,position:xe,properties:pt}=n;if($e.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat($e,"] because the root node cannot be split."));var st=ne.get(t,$e),an=ne.parent(t,$e),xt=$e[$e.length-1],Lt;if(ce.isText(st)){var _n=st.text.slice(0,xe),zn=st.text.slice(xe);st.text=_n,Lt=rr(rr({},pt),{},{text:zn})}else{var Wn=st.children.slice(0,xe),Un=st.children.slice(xe);st.children=Wn,Lt=rr(rr({},pt),{},{children:Un})}if(an.children.splice(xt+1,0,Lt),e)for(var[Tt,An]of V.points(e))e[An]=Se.transform(Tt,n);break}}return e},Yh={transform(t,e){t.children=Bu(t.children);var n=t.selection&&Bu(t.selection);try{n=Zh(t,n,e)}finally{t.children=xu(t.children),n?t.selection=pn(n)?xu(n):n:t.selection=null}}},Kh={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},Xh={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},Fu=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ut(r)&&ut(i)){if(!Fu(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==i[o])return!1}else if(r!==i)return!1}for(var s in e)if(t[s]===void 0&&e[s]!==void 0)return!1;return!0};function Jh(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jt(t,e){if(t==null)return{};var n=Jh(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var Qh=["anchor","focus"];function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $h(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var V={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return V.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=V.edges(t);return e},equals(t,e){return Se.equals(t.anchor,e.anchor)&&Se.equals(t.focus,e.focus)},includes(t,e){if(V.isRange(e)){if(V.includes(t,e.anchor)||V.includes(t,e.focus))return!0;var[n,r]=V.edges(t),[i,o]=V.edges(e);return Se.isBefore(n,i)&&Se.isAfter(r,o)}var[s,a]=V.edges(t),u=!1,l=!1;return Se.isPoint(e)?(u=Se.compare(e,s)>=0,l=Se.compare(e,a)<=0):(u=L.compare(e,s.path)>=0,l=L.compare(e,a.path)<=0),u&&l},intersection(t,e){var n=jt(t,Qh),[r,i]=V.edges(t),[o,s]=V.edges(e),a=Se.isBefore(r,o)?o:r,u=Se.isBefore(i,s)?i:s;return Se.isBefore(u,a)?null:$h({anchor:a,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Se.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Se.equals(e,n)},isExpanded(t){return!V.isCollapsed(t)},isForward(t){return!V.isBackward(t)},isRange(t){return ut(t)&&Se.isPoint(t.anchor)&&Se.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=V.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,s;if(i==="inward"){var a=V.isCollapsed(r);V.isForward(r)?(o="forward",s=a?o:"backward"):(o="backward",s=a?o:"forward")}else i==="outward"?V.isForward(r)?(o="backward",s="forward"):(o="forward",s="backward"):(o=i,s=i);var u=Se.transform(r.anchor,e,{affinity:o}),l=Se.transform(r.focus,e,{affinity:s});if(!u||!l)return null;r.anchor=u,r.focus=l})}},ku=t=>ut(t)&&ne.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return ut(t)&&ne.isNodeList(t.children)},isElement:ku,isElementList(t){return Array.isArray(t)&&t.every(e=>ue.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return ku(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},ev=["children"],tv=["text"],Tu=new WeakMap,ne={ancestor(t,e){var n=ne.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(it.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.ancestors(e,n)){var i=ne.ancestor(t,r),o=[i,r];yield o}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(it.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(it.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=ne.ancestor(t,e),{children:o}=i,s=r?o.length-1:0;r?s>=0:s<o.length;){var a=ne.child(i,s),u=e.concat(s);yield[a,u],s=r?s-1:s+1}}()},common(t,e,n){var r=L.common(e,n),i=ne.get(t,r);return[i,r]},descendant(t,e){var n=ne.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(it.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.nodes(t,e))ue.isElement(n)&&(yield[n,r])}()},extractProps(t){if(ue.isAncestor(t)){var e=jt(t,ev);return e}else{var e=jt(t,tv);return e}},first(t,e){for(var n=e.slice(),r=ne.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(it.stringify(t)));var n=Co({children:t.children},r=>{var[i,o]=V.edges(e),s=ne.nodes(r,{reverse:!0,pass:h=>{var[,g]=h;return!V.includes(e,g)}});for(var[,a]of s){if(!V.includes(e,a)){var u=ne.parent(r,a),l=a[a.length-1];u.children.splice(l,1)}if(L.equals(a,o.path)){var c=ne.leaf(r,a);c.text=c.text.slice(0,o.offset)}if(L.equals(a,i.path)){var p=ne.leaf(r,a);p.text=p.text.slice(i.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(it.stringify(t)));n=n.children[i]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(t){return ce.isText(t)||ue.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Tu.get(t);if(e!==void 0)return e;var n=t.every(r=>ne.isNode(r));return Tu.set(t,n),n},last(t,e){for(var n=e.slice(),r=ne.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=ne.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(it.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of L.levels(e,n)){var i=ne.get(t,r);yield[i,r]}}()},matches(t,e){return ue.isElement(t)&&ue.isElementProps(e)&&ue.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:i=[],to:o}=e,s=new Set,a=[],u=t;!(o&&(r?L.isBefore(a,o):L.isAfter(a,o)));){if(s.has(u)||(yield[u,a]),!s.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,a])===!1)){s.add(u);var l=r?u.children.length-1:0;L.isAncestor(a,i)&&(l=i[a.length]),a=a.concat(l),u=ne.get(t,a);continue}if(a.length===0)break;if(!r){var c=L.next(a);if(ne.has(t,c)){a=c,u=ne.get(t,a);continue}}if(r&&a[a.length-1]!==0){var p=L.previous(a);a=p,u=ne.get(t,a);continue}a=L.parent(a),u=ne.get(t,a),s.add(u)}}()},parent(t,e){var n=L.parent(e),r=ne.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ne.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ne.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Iu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Iu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Iu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zt={isNodeOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!ut(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&ne.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"merge_node":return typeof t.position=="number"&&L.isPath(t.path)&&ut(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&ne.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&L.isPath(t.path);case"set_node":return L.isPath(t.path)&&ut(t.properties)&&ut(t.newProperties);case"set_selection":return t.properties===null&&V.isRange(t.newProperties)||t.newProperties===null&&V.isRange(t.properties)||ut(t.properties)&&ut(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&ut(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Zt.isOperation(e))},isSelectionOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Re(Re({},t),{},{type:"remove_node"});case"insert_text":return Re(Re({},t),{},{type:"remove_text"});case"merge_node":return Re(Re({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(L.equals(e,n))return t;if(L.isSibling(n,e))return Re(Re({},t),{},{path:e,newPath:n});var r=L.transform(n,t),i=L.transform(L.next(n),t);return Re(Re({},t),{},{path:r,newPath:i})}case"remove_node":return Re(Re({},t),{},{type:"insert_node"});case"remove_text":return Re(Re({},t),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:s}=t;return Re(Re({},t),{},{properties:s,newProperties:o})}case"set_selection":{var{properties:a,newProperties:u}=t;return a==null?Re(Re({},t),{},{properties:u,newProperties:null}):u==null?Re(Re({},t),{},{properties:null,newProperties:a}):Re(Re({},t),{},{properties:u,newProperties:a})}case"split_node":return Re(Re({},t),{},{type:"merge_node",path:L.next(t.path)})}}},ju=new WeakMap,nv=t=>{var e=ju.get(t);if(e!==void 0)return e;if(!ut(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||ut(t.marks))&&(t.selection===null||V.isRange(t.selection))&&ne.isNodeList(t.children)&&Zt.isOperationList(t.operations);return ju.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return nv(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},rv={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function Nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Se={compare(t,e){var n=L.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Se.compare(t,e)===1},isBefore(t,e){return Se.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return ut(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Co(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:s}=r;switch(e.type){case"insert_node":case"move_node":{r.path=L.transform(o,e,n);break}case"insert_text":{L.equals(e.path,o)&&(e.offset<s||e.offset===s&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,o)&&(r.offset+=e.position),r.path=L.transform(o,e,n);break}case"remove_text":{L.equals(e.path,o)&&e.offset<=s&&(r.offset-=Math.min(s-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,o)||L.isAncestor(e.path,o))return null;r.path=L.transform(o,e,n);break}case"split_node":{if(L.equals(e.path,o)){if(e.position===s&&i==null)return null;(e.position<s||e.position===s&&i==="forward")&&(r.offset-=e.position,r.path=L.transform(o,e,_u(_u({},n),{},{affinity:"forward"})))}else r.path=L.transform(o,e,n);break}}})}},zu=void 0,it={setScrubber(t){zu=t},stringify(t){return JSON.stringify(t,zu)}},iv=["text"],ov=["anchor","focus"];function Wu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(o){var s=jt(o,iv);return s}return Fu(r?i(t):t,r?i(e):e)},isText(t){return ut(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[Nt({},t)];for(var r of e){var i=jt(r,ov),[o,s]=V.edges(r),a=[],u=0,l=o.offset,c=s.offset;for(var p of n){var{length:h}=p.text,g=u;if(u+=h,l<=g&&u<=c){Object.assign(p,i),a.push(p);continue}if(l!==c&&(l===u||c===g)||l>u||c<g||c===g&&g!==0){a.push(p);continue}var y=p,v=void 0,d=void 0;if(c<u){var D=c-g;d=Nt(Nt({},y),{},{text:y.text.slice(D)}),y=Nt(Nt({},y),{},{text:y.text.slice(0,D)})}if(l>g){var B=l-g;v=Nt(Nt({},y),{},{text:y.text.slice(0,B)}),y=Nt(Nt({},y),{},{text:y.text.slice(B)})}Object.assign(y,i),v&&a.push(v),a.push(y),d&&a.push(d)}n=a}return n}},Do=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Pn=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Eo=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?fv(e):e,o=be.None,s=be.None,a=0,u=null,l=null;for(var c of i){var p=c.codePointAt(0);if(!p)break;var h=wv(c,p);if([o,s]=r?[s,h]:[h,o],Fn(o,be.ZWJ)&&Fn(s,be.ExtPict)&&(r?u=Uu(e.substring(0,a)):u=Uu(e.substring(0,e.length-a)),!u)||Fn(o,be.RI)&&Fn(s,be.RI)&&(l!==null?l=!l:r?l=!0:l=Lv(e.substring(0,e.length-a)),!l)||o!==be.None&&s!==be.None&&xv(o,s))break;a+=c.length}return a||1},sv=/\s/,av=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,uv=/['\u2018\u2019]/,lv=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var o=Eo(e,n),[s,a]=bo(e,o,n);if(cv(s,a,n))i=!0,r+=o;else if(!i)r+=o;else break;e=a}return r},bo=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},cv=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(sv.test(e))return!1;if(uv.test(e)){var i=Eo(n,r),[o,s]=bo(n,i,r);if(t(o,s,r))return!0}return!av.test(e)},fv=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(pv(i.charCodeAt(0))){var o=e.charAt(n-r-1);if(dv(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},dv=t=>t>=55296&&t<=56319,pv=t=>t>=56320&&t<=57343,be;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(be||(be={}));var hv=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,vv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,gv=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,mv=/^[\u1100-\u115F\uA960-\uA97C]$/,yv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Cv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Dv=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Ev=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,bv=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,wv=(t,e)=>{var n=be.Any;return t.search(hv)!==-1&&(n|=be.Extend),e===8205&&(n|=be.ZWJ),e>=127462&&e<=127487&&(n|=be.RI),t.search(vv)!==-1&&(n|=be.Prepend),t.search(gv)!==-1&&(n|=be.SpacingMark),t.search(mv)!==-1&&(n|=be.L),t.search(yv)!==-1&&(n|=be.V),t.search(Cv)!==-1&&(n|=be.T),t.search(Dv)!==-1&&(n|=be.LV),t.search(Ev)!==-1&&(n|=be.LVT),t.search(bv)!==-1&&(n|=be.ExtPict),n};function Fn(t,e){return(t&e)!==0}var Bv=[[be.L,be.L|be.V|be.LV|be.LVT],[be.LV|be.V,be.V|be.T],[be.LVT|be.T,be.T],[be.Any,be.Extend|be.ZWJ],[be.Any,be.SpacingMark],[be.Prepend,be.Any],[be.ZWJ,be.ExtPict],[be.RI,be.RI]];function xv(t,e){return Bv.findIndex(n=>Fn(t,n[0])&&Fn(e,n[1]))===-1}var Sv=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Uu=t=>t.search(Sv)!==-1,Av=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Lv=t=>{var e=t.match(Av);if(e===null)return!1;var n=e[0].length/2;return n%2===1},Ov={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:i=Do(t)}=n;if(L.isPath(i)&&(i=m.range(t,i)),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var o=V.end(i);if(!r&&m.void(t,{at:o}))return;var s=V.start(i),a=m.pointRef(t,s),u=m.pointRef(t,o);Q.delete(t,{at:i,voids:r});var l=a.unref(),c=u.unref();i=l||c,Q.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:p,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:p,offset:h,text:e})}})}};function Hu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Q=Gr(Gr(Gr(Gr({},Yh),Kh),Xh),Ov),Zr=new WeakMap,Pv=t=>Zr.get(t)||!1,Fv=(t,e,n)=>{var r=Zr.get(t)||!1;Zr.set(t,!0);try{e(),n()}finally{Zr.set(t,r)}};function Ru(t,e,n){var r=Vr.get(t)||[],i=qr.get(t)||new Set,o,s,a=p=>{if(p){var h=p.join(",");s.has(h)||(s.add(h),o.push(p))}};if(n){o=[],s=new Set;for(var u of r){var l=n(u);a(l)}}else o=r,s=i;for(var c of e)a(c);Vr.set(t,o),qr.set(t,s)}var Mv=(t,e)=>{for(var n of m.pathRefs(t))Hh.transform(n,e);for(var r of m.pointRefs(t))Rh.transform(r,e);for(var i of m.rangeRefs(t))Vh.transform(i,e);if(!Pv(t)){var o=L.operationCanTransformPath(e)?s=>L.transform(s,e):void 0;Ru(t,t.getDirtyPaths(e),o)}Q.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),tr.get(t)||(tr.set(t,!0),Promise.resolve().then(()=>{tr.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},kv=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return L.levels(n)}case"insert_node":{var{node:r,path:i}=e,o=L.levels(i),s=ce.isText(r)?[]:Array.from(ne.nodes(r),P=>{var[,z]=P;return i.concat(z)});return[...o,...s]}case"merge_node":{var{path:a}=e,u=L.ancestors(a),l=L.previous(a);return[...u,l]}case"move_node":{var{path:c,newPath:p}=e;if(L.equals(c,p))return[];var h=[],g=[];for(var y of L.ancestors(c)){var v=L.transform(y,e);h.push(v)}for(var d of L.ancestors(p)){var D=L.transform(d,e);g.push(D)}var B=g[g.length-1],b=p[p.length-1],O=B.concat(b);return[...h,...g,O]}case"remove_node":{var{path:E}=e,w=L.ancestors(E);return[...w]}case"split_node":{var{path:A}=e,F=L.levels(A),R=L.next(A);return[...F,R]}default:return[]}},Tv=t=>{var{selection:e}=t;return e?ne.fragment(t,e):[]},Iv=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(ue.isElement(n)&&n.children.length===0){var i={text:""};Q.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var o=m.isEditor(n)?!1:ue.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),s=0,a=0;a<n.children.length;a++,s++){var u=ne.get(t,r);if(!ce.isText(u)){var l=u.children[s],c=u.children[s-1],p=a===n.children.length-1,h=ce.isText(l)||ue.isElement(l)&&t.isInline(l);if(h!==o)Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--;else if(ue.isElement(l)){if(t.isInline(l)){if(c==null||!ce.isText(c)){var g={text:""};Q.insertNodes(t,g,{at:r.concat(s),voids:!0}),s++}else if(p){var y={text:""};Q.insertNodes(t,y,{at:r.concat(s+1),voids:!0}),s++}}}else{if(!ce.isText(l)&&!("children"in l)){var v=l;v.children=[]}c!=null&&ce.isText(c)&&(ce.equals(l,c,{loose:!0})?(Q.mergeNodes(t,{at:r.concat(s),voids:!0}),s--):c.text===""?(Q.removeNodes(t,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(Q.removeNodes(t,{at:r.concat(s),voids:!0}),s--))}}}}},jv=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,i=r*42;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},Nv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:o=e.selection,match:s}=n;if(o){var a=m.path(e,o),u=i==="lowest";for(var[l,c]of m.levels(e,{at:a,voids:r,match:s,reverse:u}))if(!ce.isText(l)){if(V.isRange(o)){if(L.isAncestor(c,o.anchor.path)&&L.isAncestor(c,o.focus.path))return[l,c]}else if(!L.equals(a,c))return[l,c]}}};function Vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var _v=(t,e,n)=>{var{selection:r}=t;if(r){var i=(p,h)=>{if(!ce.isText(p))return!1;var[g,y]=m.parent(t,h);return!t.isVoid(g)||t.markableVoid(g)},o=V.isExpanded(r),s=!1;if(!o){var[a,u]=m.node(t,r);if(a&&i(a,u)){var[l]=m.parent(t,u);s=l&&t.markableVoid(l)}}if(o||s)Q.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var c=qu(qu({},m.marks(t)||{}),{},{[e]:n});t.marks=c,tr.get(t)||t.onChange()}}};function Gu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var zv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),o=m.end(e,[]),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Zu(Zu({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=c),u++}return l};function Yu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),o=m.point(e,n,{edge:"start"}),s={anchor:i,focus:o},{distance:a=1}=r,u=0,l;for(var c of m.positions(e,Ku(Ku({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=c),u++}return l},Uv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e,reverse:!0})},Hv=(t,e)=>{var{selection:n}=t;n&&V.isCollapsed(n)&&Q.delete(t,{unit:e})},Rv=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&V.isExpanded(r)&&Q.delete(e,{reverse:n==="backward"})},Vv=(t,e)=>[m.start(t,e),m.end(t,e)];function Xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ju(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var qv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ju(Ju({},n),{},{match:r=>ue.isElement(r)&&m.isElementReadOnly(e,r)}))},Gv=(t,e)=>m.point(t,e,{edge:"end"}),Zv=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},Yv=(t,e)=>{var n=m.range(t,e);return ne.fragment(t,n)};function Qu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qu(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Kv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,$u($u({},n),{},{match:r=>ue.isElement(r)&&m.isVoid(e,r)}))},Xv=(t,e)=>e.children.some(n=>ue.isElement(n)&&m.isBlock(t,n)),Jv=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),Qv=(t,e)=>ne.has(t,e),$v=(t,e)=>e.children.every(n=>ce.isText(n)),eg=t=>{Q.splitNodes(t,{always:!0})},tg=(t,e,n)=>{Q.insertNodes(t,e,n)},ng=t=>{Q.splitNodes(t,{always:!0})};function el(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?el(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):el(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ig=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:o}=e;if(i){if(o){var s=rg({text:n},o);Q.insertNodes(e,s,{at:r.at,voids:r.voids})}else Q.insertText(e,n,r);e.marks=null}},og=(t,e)=>!t.isInline(e),sg=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),ag=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},ug=(t,e,n)=>{var r=m.end(t,n);return Se.equals(e,r)},lg=t=>{var e=Su.get(t);return e===void 0?!0:e},cg=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Se.equals(e,r)},fg=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},dg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.leaf(e,i);return[o,i]};function pg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:o}=e;if(o==null&&(o=()=>!0),!!n){var s=[],a=m.path(t,n);for(var[u,l]of ne.levels(t,a))if(o(u,l)&&(s.push([u,l]),!i&&ue.isElement(u)&&m.isVoid(t,u)))break;r&&s.reverse(),yield*s}}()}var hg=["text"],vg=["text"],gg=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:o}=r;if(n)return n;if(V.isExpanded(r)){var s=m.isEnd(e,i,i.path);if(s){var a=m.after(e,i);a&&(i=a)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:o}});if(u){var[l]=u,c=jt(l,hg);return c}else return{}}var{path:p}=i,[h]=m.leaf(e,p);if(i.offset===0){var g=m.previous(e,{at:p,match:ce.isText}),y=m.above(e,{match:O=>ue.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!y){var v=m.above(e,{match:O=>ue.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,B]=v;L.isAncestor(B,D)&&(h=d)}}}var b=jt(h,vg);return b},mg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.after(e,s,{voids:i});if(a){var[,u]=m.last(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{at:l,match:o,mode:r,voids:i});return p}}},yg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=ne.get(e,i);return[o,i]};function Cg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:s=!1,ignoreNonSelectable:a=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var l,c;if(rv.isSpan(n))l=n[0],c=n[1];else{var p=m.path(t,n,{edge:"start"}),h=m.path(t,n,{edge:"end"});l=o?h:p,c=o?p:h}var g=ne.nodes(t,{reverse:o,from:l,to:c,pass:O=>{var[E]=O;return ue.isElement(E)?!!(!s&&(m.isVoid(t,E)||m.isElementReadOnly(t,E))||a&&!m.isSelectable(t,E)):!1}}),y=[],v;for(var[d,D]of g)if(!(a&&ue.isElement(d)&&!m.isSelectable(t,d))){var B=v&&L.compare(D,v[1])===0;if(!(r==="highest"&&B)){if(!u(d,D)){if(i&&!B&&ce.isText(d))return;continue}if(r==="lowest"&&B){v=[d,D];continue}var b=r==="lowest"?v:[d,D];b&&(i?y.push(b):yield b),v=[d,D]}}r==="lowest"&&v&&(i?y.push(v):yield v),i&&(yield*y)}}()}var Dg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,o=c=>Vr.get(c)||[],s=c=>qr.get(c)||new Set,a=c=>{var p=o(c).pop(),h=p.join(",");return s(c).delete(h),p};if(m.isNormalizing(e)){if(r){var u=Array.from(ne.nodes(e),c=>{var[,p]=c;return p}),l=new Set(u.map(c=>c.join(",")));Vr.set(e,u),qr.set(e,l)}o(e).length!==0&&m.withoutNormalizing(e,()=>{for(var c of o(e))if(ne.has(e,c)){var p=m.node(e,c),[h,g]=p;ue.isElement(h)&&h.children.length===0&&e.normalizeNode(p,{operation:i})}for(var y=o(e),v=y.length,d=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=a(e);if(ne.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:i})}d++,y=o(e)}})}},Eg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),o=L.parent(i),s=m.node(e,o);return s},bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pathRefs(e);return u.delete(o),o.current=null,a}},s=m.pathRefs(e);return s.add(o),o},wg=t=>{var e=Au.get(t);return e||(e=new Set,Au.set(t,e)),e},Bg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:o}=r;if(L.isPath(n)){if(o==="start"){var[,s]=ne.first(e,n);n=s}else if(o==="end"){var[,a]=ne.last(e,n);n=a}}return V.isRange(n)&&(o==="start"?n=V.start(n):o==="end"?n=V.end(n):n=L.common(n.anchor.path,n.focus.path)),Se.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},xg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.pointRefs(e);return u.delete(o),o.current=null,a}},s=m.pointRefs(e);return s.add(o),o},Sg=t=>{var e=Lu.get(t);return e||(e=new Set,Lu.set(t,e)),e},Ag=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(L.isPath(n)){var o;if(i==="end"){var[,s]=ne.last(e,n);o=s}else{var[,a]=ne.first(e,n);o=a}var u=ne.get(e,o);if(!ce.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(n,"] because it has no ").concat(i," text node."));return{path:o,offset:i==="end"?u.text.length:0}}if(V.isRange(n)){var[l,c]=V.edges(n);return i==="start"?l:c}return n};function Lg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e;if(!n)return;var a=m.range(t,n),[u,l]=V.edges(a),c=i?l:u,p=!1,h="",g=0,y=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:o,ignoreNonSelectable:s})){if(ue.isElement(d)){if(!o&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=L.isAncestor(D,l.path)?l:m.end(t,D),b=L.isAncestor(D,u.path)?u:m.start(t,D);h=m.string(t,{anchor:b,focus:B},{voids:o}),p=!0}}if(ce.isText(d)){var O=L.equals(D,c.path);for(O?(y=i?c.offset:d.text.length-c.offset,v=c.offset):(y=d.text.length,v=i?y:0),(O||p||r==="offset")&&(yield{path:D,offset:v},p=!1);;){if(g===0){if(h==="")break;g=E(h,r,i),h=bo(h,g,i)[1]}if(v=i?v-g:v+g,y=y-g,y<0){g=-y;break}g=0,yield{path:D,offset:v}}}}function E(w,A,F){return A==="character"?Eo(w,F):A==="word"?lv(w,F):A==="line"||A==="block"?w.length:1}}()}var Og=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection}=n;if(s){var a=m.before(e,s,{voids:i});if(a){var[,u]=m.first(e,[]),l=[a.path,u];if(L.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(L.isPath(s)){var[c]=m.parent(e,s);o=h=>c.children.includes(h)}else o=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:o,mode:r,voids:i});return p}}},Pg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,o={current:n,affinity:i,unref(){var{current:a}=o,u=m.rangeRefs(e);return u.delete(o),o.current=null,a}},s=m.rangeRefs(e);return s.add(o),o},Fg=t=>{var e=Ou.get(t);return e||(e=new Set,Ou.set(t,e)),e},Mg=(t,e,n)=>{if(V.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function tl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Tg=(t,e)=>{var{selection:n}=t;if(n){var r=(c,p)=>{if(!ce.isText(c))return!1;var[h,g]=m.parent(t,p);return!t.isVoid(h)||t.markableVoid(h)},i=V.isExpanded(n),o=!1;if(!i){var[s,a]=m.node(t,n);if(s&&r(s,a)){var[u]=m.parent(t,a);o=u&&t.markableVoid(u)}}if(i||o)Q.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var l=kg({},m.marks(t)||{});delete l[e],t.marks=l,tr.get(t)||t.onChange()}}},Ig=(t,e)=>{Su.set(t,e)},jg=(t,e)=>m.point(t,e,{edge:"start"}),Ng=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,o=m.range(e,n),[s,a]=V.edges(o),u="";for(var[l,c]of m.nodes(e,{at:o,match:ce.isText,voids:i})){var p=l.text;L.equals(c,a.path)&&(p=p.slice(0,a.offset)),L.equals(c,s.path)&&(p=p.slice(s.offset)),u+=p}return u},_g=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[o,s]=V.edges(n);if(o.offset!==0||s.offset!==0||V.isCollapsed(n)||L.hasPrevious(s.path))return n;var a=m.above(e,{at:s,match:y=>ue.isElement(y)&&m.isBlock(e,y),voids:i}),u=a?a[1]:[],l=m.start(e,o),c={anchor:l,focus:s},p=!0;for(var[h,g]of m.nodes(e,{at:c,match:ce.isText,reverse:!0,voids:i})){if(p){p=!1;continue}if(h.text!==""||L.isBefore(g,u)){s={path:g,offset:h.text.length};break}}return{anchor:o,focus:s}},zg=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Wg=(t,e,n)=>{var[r,i]=e;return ue.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Ug=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:o=!1,unit:s="character",distance:a=1,voids:u=!1}=n,{at:l=e.selection,hanging:c=!1}=n;if(l){var p=!1;if(V.isRange(l)&&V.isCollapsed(l)&&(p=!0,l=l.anchor),Se.isPoint(l)){var h=m.void(e,{at:l,mode:"highest"});if(!u&&h){var[,g]=h;l=g}else{var y={unit:s,distance:a},v=o?m.before(e,l,y)||m.start(e,[]):m.after(e,l,y)||m.end(e,[]);l={anchor:l,focus:v},c=!0}}if(L.isPath(l)){Q.removeNodes(e,{at:l,voids:u});return}if(!V.isCollapsed(l)){if(!c){var[,d]=V.edges(l),D=m.end(e,[]);Se.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[B,b]=V.edges(l),O=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:B,voids:u}),E=m.above(e,{match:se=>ue.isElement(se)&&m.isBlock(e,se),at:b,voids:u}),w=O&&E&&!L.equals(O[1],E[1]),A=L.equals(B.path,b.path),F=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),R=u?null:(i=m.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:b,mode:"highest"});if(F){var P=m.before(e,B);P&&O&&L.isAncestor(O[1],P.path)&&(B=P)}if(R){var z=m.after(e,b);z&&E&&L.isAncestor(E[1],z.path)&&(b=z)}var I=[],j;for(var T of m.nodes(e,{at:l,voids:u})){var[N,K]=T;j&&L.compare(K,j)===0||(!u&&ue.isElement(N)&&(m.isVoid(e,N)||m.isElementReadOnly(e,N))||!L.isCommon(K,B.path)&&!L.isCommon(K,b.path))&&(I.push(T),j=K)}var _=Array.from(I,se=>{var[,pe]=se;return m.pathRef(e,pe)}),ie=m.pointRef(e,B),re=m.pointRef(e,b),k="";if(!A&&!F){var H=ie.current,[J]=m.leaf(e,H),{path:q}=H,{offset:ee}=B,Y=J.text.slice(ee);Y.length>0&&(e.apply({type:"remove_text",path:q,offset:ee,text:Y}),k=Y)}if(_.reverse().map(se=>se.unref()).filter(se=>se!==null).forEach(se=>Q.removeNodes(e,{at:se,voids:u})),!R){var C=re.current,[W]=m.leaf(e,C),{path:U}=C,M=A?B.offset:0,X=W.text.slice(M,b.offset);X.length>0&&(e.apply({type:"remove_text",path:U,offset:M,text:X}),k=X)}!A&&w&&re.current&&ie.current&&Q.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),p&&o&&s==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&Q.insertText(e,k.slice(0,k.length-a));var te=ie.unref(),G=re.unref(),le=o?te||G:G||te;n.at==null&&le&&Q.select(e,le)}}})},Hg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1}=r,{at:s=Do(e),batchDirty:a=!0}=r;if(n.length){if(V.isRange(s))if(i||(s=m.unhangRange(e,s,{voids:o})),V.isCollapsed(s))s=s.anchor;else{var[,u]=V.edges(s);if(!o&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);Q.delete(e,{at:s}),s=l.unref()}else L.isPath(s)&&(s=m.start(e,s));if(!(!o&&m.void(e,{at:s}))){var c=m.above(e,{at:s,match:Y=>ue.isElement(Y)&&m.isInline(e,Y),mode:"highest",voids:o});if(c){var[,p]=c;if(m.isEnd(e,s,p)){var h=m.after(e,p);s=h}else if(m.isStart(e,s,p)){var g=m.before(e,p);s=g}}var y=m.above(e,{match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),at:s,voids:o}),[,v]=y,d=m.isStart(e,s,v),D=m.isEnd(e,s,v),B=d&&D,b=!d||d&&D,O=!D,[,E]=ne.first({children:n},[]),[,w]=ne.last({children:n},[]),A=[],F=Y=>{var[C,W]=Y,U=W.length===0;return U?!1:B?!0:!(b&&L.isAncestor(W,E)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C)||O&&L.isAncestor(W,w)&&ue.isElement(C)&&!e.isVoid(C)&&!e.isInline(C))};for(var R of ne.nodes({children:n},{pass:F}))F(R)&&A.push(R);var P=[],z=[],I=[],j=!0,T=!1;for(var[N]of A)ue.isElement(N)&&!e.isInline(N)?(j=!1,T=!0,z.push(N)):j?P.push(N):I.push(N);var[K]=m.nodes(e,{at:s,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o}),[,_]=K,ie=m.isStart(e,s,_),re=m.isEnd(e,s,_),k=m.pathRef(e,D&&!I.length?L.next(v):v),H=m.pathRef(e,re?L.next(_):_);Q.splitNodes(e,{at:s,match:Y=>T?ue.isElement(Y)&&m.isBlock(e,Y):ce.isText(Y)||m.isInline(e,Y),mode:T?"lowest":"highest",always:T&&(!d||P.length>0)&&(!D||I.length>0),voids:o});var J=m.pathRef(e,!ie||ie&&re?L.next(_):_);if(Q.insertNodes(e,P,{at:J.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),B&&!P.length&&z.length&&!I.length&&Q.delete(e,{at:v,voids:o}),Q.insertNodes(e,z,{at:k.current,match:Y=>ue.isElement(Y)&&m.isBlock(e,Y),mode:"lowest",voids:o,batchDirty:a}),Q.insertNodes(e,I,{at:H.current,match:Y=>ce.isText(Y)||m.isInline(e,Y),mode:"highest",voids:o,batchDirty:a}),!r.at){var q;if(I.length>0&&H.current?q=L.previous(H.current):z.length>0&&k.current?q=L.previous(k.current):J.current&&(q=L.previous(J.current)),q){var ee=m.end(e,q);Q.select(e,ee)}}J.unref(),k.unref(),H.unref()}}})},Rg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:i}=e;if(i){if(r==="anchor")Q.select(e,i.anchor);else if(r==="focus")Q.select(e,i.focus);else if(r==="start"){var[o]=V.edges(i);Q.select(e,o)}else if(r==="end"){var[,s]=V.edges(i);Q.select(e,s)}}else return},Vg=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},qg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:o="character",reverse:s=!1}=n,{edge:a=null}=n;if(r){a==="start"&&(a=V.isBackward(r)?"focus":"anchor"),a==="end"&&(a=V.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,c={distance:i,unit:o,ignoreNonSelectable:!0},p={};if(a==null||a==="anchor"){var h=s?m.before(e,u,c):m.after(e,u,c);h&&(p.anchor=h)}if(a==null||a==="focus"){var g=s?m.before(e,l,c):m.after(e,l,c);g&&(p.focus=g)}Q.setSelection(e,p)}},Gg=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){Q.setSelection(t,e);return}if(!V.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(it.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function rl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nl(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:o="both"}=r;if(i){o==="start"&&(o=V.isBackward(i)?"focus":"anchor"),o==="end"&&(o=V.isBackward(i)?"anchor":"focus");var{anchor:s,focus:a}=i,u=o==="anchor"?s:a;Q.setSelection(e,{[o==="anchor"?"anchor":"focus"]:rl(rl({},u),n)})}},Yg=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var o in e)(o==="anchor"&&e.anchor!=null&&!Se.equals(e.anchor,n.anchor)||o==="focus"&&e.focus!=null&&!Se.equals(e.focus,n.focus)||o!=="anchor"&&o!=="focus"&&e[o]!==n[o])&&(r[o]=n[o],i[o]=e[o]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},Kg=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:o=!1,mode:s="lowest",batchDirty:a=!0}=r,{at:u,match:l,select:c}=r;if(ne.isNode(n)&&(n=[n]),n.length!==0){var[p]=n;if(u||(u=Do(e),c!==!1&&(c=!0)),c==null&&(c=!1),V.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:o})),V.isCollapsed(u))u=u.anchor;else{var[,h]=V.edges(u),g=m.pointRef(e,h);Q.delete(e,{at:u}),u=g.unref()}if(Se.isPoint(u)){l==null&&(ce.isText(p)?l=P=>ce.isText(P):e.isInline(p)?l=P=>ce.isText(P)||m.isInline(e,P):l=P=>ue.isElement(P)&&m.isBlock(e,P));var[y]=m.nodes(e,{at:u.path,match:l,mode:s,voids:o});if(y){var[,v]=y,d=m.pathRef(e,v),D=m.isEnd(e,u,v);Q.splitNodes(e,{at:u,match:l,mode:s,voids:o});var B=d.unref();u=D?L.next(B):B}else return}var b=L.parent(u),O=u[u.length-1];if(!(!o&&m.void(e,{at:b}))){if(a){var E=[],w=L.levels(b);Fv(e,()=>{var P=function(){var j=b.concat(O);O++;var T={type:"insert_node",path:j,node:z};e.apply(T),u=L.next(u),E.push(T),ce.isText?w.push(...Array.from(ne.nodes(z),N=>{var[,K]=N;return j.concat(K)})):w.push(j)};for(var z of n)P()},()=>{Ru(e,w,P=>{var z=P;for(var I of E)if(L.operationCanTransformPath(I)&&(z=L.transform(z,I),!z))return null;return z})})}else for(var A of n){var F=b.concat(O);O++,e.apply({type:"insert_node",path:F,node:A}),u=L.next(u)}if(u=L.previous(u),c){var R=m.end(e,u);R&&Q.select(e,R)}}}})},Xg=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:i="lowest",voids:o=!1}=n,{match:s}=n;if(s==null&&(s=L.isPath(r)?Pn(e,r):O=>ue.isElement(O)&&m.isBlock(e,O)),!!r){var a=m.nodes(e,{at:r,match:s,mode:i,voids:o}),u=Array.from(a,O=>{var[,E]=O;return m.pathRef(e,E)});for(var l of u){var c=l.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var p=m.node(e,L.parent(c)),[h,g]=p,y=c[c.length-1],{length:v}=h.children;if(v===1){var d=L.next(g);Q.moveNodes(e,{at:c,to:d,voids:o}),Q.removeNodes(e,{at:g,voids:o})}else if(y===0)Q.moveNodes(e,{at:c,to:g,voids:o});else if(y===v-1){var D=L.next(g);Q.moveNodes(e,{at:c,to:D,voids:o})}else{var B=L.next(c),b=L.next(g);Q.splitNodes(e,{at:B,voids:o}),Q.moveNodes(e,{at:c,to:b,voids:o})}}}})},Jg=["text"],Qg=["children"],il=(t,e)=>{if(ue.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?il(t,n.children[0]):!1}else return!m.isEditor(e)},$g=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:o=!1,voids:s=!1,mode:a="lowest"}=n;if(i){if(r==null)if(L.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>ue.isElement(P)&&m.isBlock(e,P);if(!o&&V.isRange(i)&&(i=m.unhangRange(e,i,{voids:s})),V.isRange(i))if(V.isCollapsed(i))i=i.anchor;else{var[,l]=V.edges(i),c=m.pointRef(e,l);Q.delete(e,{at:i}),i=c.unref(),n.at==null&&Q.select(e,i)}var[p]=m.nodes(e,{at:i,match:r,voids:s,mode:a}),h=m.previous(e,{at:i,match:r,voids:s,mode:a});if(!(!p||!h)){var[g,y]=p,[v,d]=h;if(!(y.length===0||d.length===0)){var D=L.next(d),B=L.common(y,d),b=L.isSibling(y,d),O=Array.from(m.levels(e,{at:y}),P=>{var[z]=P;return z}).slice(B.length).slice(0,-1),E=m.above(e,{at:y,mode:"highest",match:P=>O.includes(P)&&il(e,P)}),w=E&&m.pathRef(e,E[1]),A,F;if(ce.isText(g)&&ce.isText(v)){var R=jt(g,Jg);F=v.text.length,A=R}else if(ue.isElement(g)&&ue.isElement(v)){var R=jt(g,Qg);F=v.children.length,A=R}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(it.stringify(g)," ").concat(it.stringify(v)));b||Q.moveNodes(e,{at:y,to:D,voids:s}),w&&Q.removeNodes(e,{at:w.current,voids:s}),m.shouldMergeNodesRemovePrevNode(e,h,p)?Q.removeNodes(e,{at:d,voids:s}):e.apply({type:"merge_node",path:D,position:F,properties:A}),w&&w.unref()}}}})},em=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:o=!1}=e,{match:s}=e;if(r){s==null&&(s=L.isPath(r)?Pn(t,r):g=>ue.isElement(g)&&m.isBlock(t,g));var a=m.pathRef(t,n),u=m.nodes(t,{at:r,match:s,mode:i,voids:o}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(t,y)});for(var c of l){var p=c.unref(),h=a.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),a.current&&L.isSibling(h,p)&&L.isAfter(h,p)&&(a.current=L.next(a.current))}a.unref()}})},tm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),!r&&V.isRange(s)&&(s=m.unhangRange(e,s,{voids:i}));var u=m.nodes(e,{at:s,match:a,mode:o,voids:i}),l=Array.from(u,g=>{var[,y]=g;return m.pathRef(e,y)});for(var c of l){var p=c.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},nm=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:o=e.selection,compare:s,merge:a}=r,{hanging:u=!1,mode:l="lowest",split:c=!1,voids:p=!1}=r;if(o){if(i==null&&(i=L.isPath(o)?Pn(e,o):F=>ue.isElement(F)&&m.isBlock(e,F)),!u&&V.isRange(o)&&(o=m.unhangRange(e,o,{voids:p})),c&&V.isRange(o)){if(V.isCollapsed(o)&&m.leaf(e,o.anchor)[0].text.length>0)return;var h=m.rangeRef(e,o,{affinity:"inward"}),[g,y]=V.edges(o),v=l==="lowest"?"lowest":"highest",d=m.isEnd(e,y,y.path);Q.splitNodes(e,{at:y,match:i,mode:v,voids:p,always:!d});var D=m.isStart(e,g,g.path);Q.splitNodes(e,{at:g,match:i,mode:v,voids:p,always:!D}),o=h.unref(),r.at==null&&Q.select(e,o)}s||(s=(F,R)=>F!==R);for(var[B,b]of m.nodes(e,{at:o,match:i,mode:l,voids:p})){var O={},E={};if(b.length!==0){var w=!1;for(var A in n)A==="children"||A==="text"||s(n[A],B[A])&&(w=!0,B.hasOwnProperty(A)&&(O[A]=B[A]),a?n[A]!=null&&(E[A]=a(B[A],n[A])):n[A]!=null&&(E[A]=n[A]));w&&e.apply({type:"set_node",path:b,properties:O,newProperties:E})}}}})},rm=(t,e)=>{if(V.isCollapsed(e))return e.anchor;var[,n]=V.edges(e),r=m.pointRef(t,n);return Q.delete(t,{at:e}),r.unref()},im=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:i=!1}=n,{match:o,at:s=e.selection,height:a=0,always:u=!1}=n;if(o==null&&(o=re=>ue.isElement(re)&&m.isBlock(e,re)),V.isRange(s)&&(s=rm(e,s)),L.isPath(s)){var l=s,c=m.point(e,l),[p]=m.parent(e,l);o=re=>re===p,a=c.path.length-l.length+1,s=c,u=!0}if(s){var h=m.pointRef(e,s,{affinity:"backward"}),g;try{var[y]=m.nodes(e,{at:s,match:o,mode:r,voids:i});if(!y)return;var v=m.void(e,{at:s,mode:"highest"}),d=0;if(!i&&v){var[D,B]=v;if(ue.isElement(D)&&e.isInline(D)){var b=m.after(e,B);if(!b){var O={text:""},E=L.next(B);Q.insertNodes(e,O,{at:E,voids:i}),b=m.point(e,E)}s=b,u=!0}var w=s.path.length-B.length;a=w+1,u=!0}g=m.pointRef(e,s);var A=s.path.length-a,[,F]=y,R=s.path.slice(0,A),P=a===0?s.offset:s.path[A]+d;for(var[z,I]of m.levels(e,{at:R,reverse:!0,voids:i})){var j=!1;if(I.length<F.length||I.length===0||!i&&ue.isElement(z)&&m.isVoid(e,z))break;var T=h.current,N=m.isEnd(e,T,I);if(u||!h||!m.isEdge(e,T,I)){j=!0;var K=ne.extractProps(z);e.apply({type:"split_node",path:I,position:P,properties:K})}P=I[I.length-1]+(j||N?1:0)}if(n.at==null){var _=g.current||m.end(e,[]);Q.select(e,_)}}finally{var ie;h.unref(),(ie=g)===null||ie===void 0||ie.unref()}}})},om=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var o of n)i[o]=null;Q.setNodes(e,i,r)},sm=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{at:s=e.selection,match:a}=n;if(s){a==null&&(a=L.isPath(s)?Pn(e,s):g=>ue.isElement(g)&&m.isBlock(e,g)),L.isPath(s)&&(s=m.range(e,s));var u=V.isRange(s)?m.rangeRef(e,s):null,l=m.nodes(e,{at:s,match:a,mode:r,voids:o}),c=Array.from(l,g=>{var[,y]=g;return m.pathRef(e,y)}).reverse(),p=function(){var y=h.unref(),[v]=m.node(e,y),d=m.range(e,y);i&&u&&(d=V.intersection(u.current,d)),Q.liftNodes(e,{at:d,match:D=>ue.isAncestor(v)&&v.children.includes(D),voids:o})};for(var h of c)p();u&&u.unref()}})};function ol(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ol(Object(n),!0).forEach(function(r){lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var am=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:o=!1,voids:s=!1}=r,{match:a,at:u=e.selection}=r;if(u){if(a==null&&(L.isPath(u)?a=Pn(e,u):e.isInline(n)?a=d=>ue.isElement(d)&&m.isInline(e,d)||ce.isText(d):a=d=>ue.isElement(d)&&m.isBlock(e,d)),o&&V.isRange(u)){var[l,c]=V.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});Q.splitNodes(e,{at:c,match:a,voids:s}),Q.splitNodes(e,{at:l,match:a,voids:s}),u=p.unref(),r.at==null&&Q.select(e,u)}var h=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>ue.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:s})),g=function(){var D=V.isRange(u)?V.intersection(u,m.range(e,v)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:a,mode:i,voids:s}));if(B.length>0){var[b]=B,O=B[B.length-1],[,E]=b,[,w]=O;if(E.length===0&&w.length===0)return 0;var A=L.equals(E,w)?L.parent(E):L.common(E,w),F=m.range(e,E,w),R=m.node(e,A),[P]=R,z=A.length+1,I=L.next(w.slice(0,z)),j=sl(sl({},n),{},{children:[]});Q.insertNodes(e,j,{at:I,voids:s}),Q.moveNodes(e,{at:F,match:T=>ue.isAncestor(P)&&P.children.includes(T),to:I.concat(0),voids:s})}},y;for(var[,v]of h)y=g()}})},um=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mv(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _v(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uv(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hv(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rv(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tv(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eg(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ng(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hg(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tg(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ig(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Iv(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tg(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kv(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jv(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nv(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zv(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wv(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rg(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ug(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vg(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vv(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qv(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gv(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zv(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yv(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gg(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xv(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jv(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qv(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $v(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kg(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return og(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sg(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ag(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ug(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lg(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cg(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fg(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dg(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return pg(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xg(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $g(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qg(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return em(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mg(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yg(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Cg(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dg(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eg(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Bg(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bg(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wg(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ag(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xg(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sg(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lg(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Og(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mg(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Pg(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fg(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tm(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gg(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nm(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ig(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zg(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yg(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return im(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jg(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ng(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _g(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return om(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sm(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kv(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zg(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return am(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wg(t,...r)}};return t};/*!
|
351
|
+
*/function jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ht(e){var t,n;return jg(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(jg(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Ng=Symbol.for("immer-nothing"),zg=Symbol.for("immer-draftable"),dn=Symbol.for("immer-state"),PL=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){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 '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"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(e){return`'current' expects a draft, got: ${e}`},"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(e){return`'original' expects a draft, got: ${e}`}]:[];function tn(e,...t){if(process.env.NODE_ENV!=="production"){const n=PL[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ro=Object.getPrototypeOf;function zr(e){return!!e&&!!e[dn]}function $r(e){var t;return e?$g(e)||Array.isArray(e)||!!e[zg]||!!((t=e.constructor)!=null&&t[zg])||vs(e)||ms(e):!1}var ML=Object.prototype.constructor.toString();function $g(e){if(!e||typeof e!="object")return!1;const t=ro(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===ML}function hs(e,t){gs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function gs(e){const t=e[dn];return t?t.type_:Array.isArray(e)?1:vs(e)?2:ms(e)?3:0}function el(e,t){return gs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ug(e,t,n){const r=gs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function BL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function vs(e){return e instanceof Map}function ms(e){return e instanceof Set}function Ur(e){return e.copy_||e.base_}function tl(e,t){if(vs(e))return new Map(e);if(ms(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=$g(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[dn];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){const s=o[i],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:e[s]})}return Object.create(ro(e),r)}else{const r=ro(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function nl(e,t=!1){return ys(e)||zr(e)||!$r(e)||(gs(e)>1&&(e.set=e.add=e.clear=e.delete=TL),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>nl(r,!0))),e}function TL(){tn(2)}function ys(e){return Object.isFrozen(e)}var AL={};function Wr(e){const t=AL[e];return t||tn(0,e),t}var Uo;function Wg(){return Uo}function FL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Hg(e,t){t&&(Wr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rl(e){ol(e),e.drafts_.forEach(IL),e.drafts_=null}function ol(e){e===Uo&&(Uo=e.parent_)}function Vg(e){return Uo=FL(Uo,e)}function IL(e){const t=e[dn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[dn].modified_&&(rl(t),tn(4)),$r(e)&&(e=bs(t,e),t.parent_||Cs(t,e)),t.patches_&&Wr("Patches").generateReplacementPatches_(n[dn].base_,e,t.patches_,t.inversePatches_)):e=bs(t,n,[]),rl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ng?e:void 0}function bs(e,t,n){if(ys(t))return t;const r=t[dn];if(!r)return hs(t,(o,i)=>Zg(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Cs(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),hs(i,(a,u)=>Zg(e,r,o,a,u,n,s)),Cs(e,o,!1),n&&e.patches_&&Wr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Zg(e,t,n,r,o,i,s){if(process.env.NODE_ENV!=="production"&&o===n&&tn(5),zr(o)){const a=i&&t&&t.type_!==3&&!el(t.assigned_,r)?i.concat(r):void 0,u=bs(e,o,a);if(Ug(n,r,u),zr(u))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if($r(o)&&!ys(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;bs(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Cs(e,o)}}function Cs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nl(t,n)}function _L(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wg(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=il;n&&(o=[r],i=Wo);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var il={get(e,t){if(t===dn)return e;const n=Ur(e);if(!el(n,t))return RL(e,n,t);const r=n[t];return e.finalized_||!$r(r)?r:r===sl(e.base_,t)?(ul(e),e.copy_[t]=ll(r,e)):r},has(e,t){return t in Ur(e)},ownKeys(e){return Reflect.ownKeys(Ur(e))},set(e,t,n){const r=Gg(Ur(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=sl(Ur(e),t),i=o==null?void 0:o[dn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(BL(n,o)&&(n!==void 0||el(e.base_,t)))return!0;ul(e),al(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return sl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ul(e),al(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){tn(11)},getPrototypeOf(e){return ro(e.base_)},setPrototypeOf(){tn(12)}},Wo={};hs(il,(e,t)=>{Wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Wo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&tn(13),Wo.set.call(this,e,t,void 0)},Wo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&tn(14),il.set.call(this,e[0],t,n,e[0])};function sl(e,t){const n=e[dn];return(n?Ur(n):e)[t]}function RL(e,t,n){var o;const r=Gg(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Gg(e,t){if(!(t in e))return;let n=ro(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ro(n)}}function al(e){e.modified_||(e.modified_=!0,e.parent_&&al(e.parent_))}function ul(e){e.copy_||(e.copy_=tl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(u=i,...l){return s.produce(u,f=>n.call(this,f,...l))}}typeof n!="function"&&tn(6),r!==void 0&&typeof r!="function"&&tn(7);let o;if($r(t)){const i=Vg(this),s=ll(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?rl(i):ol(i)}return Hg(i,r),qg(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Ng&&(o=void 0),this.autoFreeze_&&nl(o,!0),r){const i=[],s=[];Wr("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else tn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,u=>t(u,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){$r(e)||tn(8),zr(e)&&(e=NL(e));const t=Vg(this),n=ll(e,void 0);return n[dn].isManual_=!0,ol(t),n}finishDraft(e,t){const n=e&&e[dn];(!n||!n.isManual_)&&tn(9);const{scope_:r}=n;return Hg(r,t),qg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Wr("Patches").applyPatches_;return zr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ll(e,t){const n=vs(e)?Wr("MapSet").proxyMap_(e,t):ms(e)?Wr("MapSet").proxySet_(e,t):_L(e,t);return(t?t.scope_:Wg()).drafts_.push(n),n}function NL(e){return zr(e)||tn(10,e),Kg(e)}function Kg(e){if(!$r(e)||ys(e))return e;const t=e[dn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tl(e,t.scope_.immer_.useStrictShallowCopy_)}else n=tl(e,!0);return hs(n,(r,o)=>{Ug(n,r,Kg(o))}),t&&(t.finalized_=!1),n}var pn=new jL,cl=pn.produce;pn.produceWithPatches.bind(pn),pn.setAutoFreeze.bind(pn),pn.setUseStrictShallowCopy.bind(pn),pn.applyPatches.bind(pn);var Yg=pn.createDraft.bind(pn),Xg=pn.finishDraft.bind(pn),zL={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=U.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}},$L={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=He.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}},UL={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var o=te.transform(n,t,{affinity:r});e.current=o,o==null&&e.unref()}}},Es=new WeakMap,ws=new WeakMap,Ho=new WeakMap,Jg=new WeakMap,Qg=new WeakMap,ev=new WeakMap,tv=new WeakMap,U={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=U.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r],i=t[r];if(o!==i)break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],s=t[n];return U.equals(r,o)&&i>s},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return U.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],s=t[n];return U.equals(r,o)&&i<s},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return U.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&U.compare(e,t)===0},isBefore(e,t){return U.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&U.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&U.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&U.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&U.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),o=e[e.length-1],i=t[t.length-1];return o!==i&&U.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!U.isAncestor(t,e)&&!U.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:o="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{var{path:i}=t;(U.equals(i,r)||U.endsBefore(i,r)||U.isAncestor(i,r))&&(r[i.length-1]+=1);break}case"remove_node":{var{path:s}=t;if(U.equals(s,r)||U.isAncestor(s,r))return null;U.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{var{path:a,position:u}=t;U.equals(a,r)||U.endsBefore(a,r)?r[a.length-1]-=1:U.isAncestor(a,r)&&(r[a.length-1]-=1,r[a.length]+=u);break}case"split_node":{var{path:l,position:f}=t;if(U.equals(l,r)){if(o==="forward")r[r.length-1]+=1;else if(o!=="backward")return null}else U.endsBefore(l,r)?r[l.length-1]+=1:U.isAncestor(l,r)&&e[l.length]>=f&&(r[l.length-1]+=1,r[l.length]-=f);break}case"move_node":{var{path:d,newPath:h}=t;if(U.equals(d,h))return r;if(U.isAncestor(d,r)||U.equals(d,r)){var v=h.slice();return U.endsBefore(d,h)&&d.length<h.length&&(v[d.length-1]-=1),v.concat(r.slice(d.length))}else U.isSibling(d,h)&&(U.isAncestor(h,r)||U.equals(h,r))?U.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:U.endsBefore(h,r)||U.equals(h,r)||U.isAncestor(h,r)?(U.endsBefore(d,r)&&(r[d.length-1]-=1),r[h.length-1]+=1):U.endsBefore(d,r)&&(U.equals(h,r)&&(r[h.length-1]+=1),r[d.length-1]-=1);break}}return r}};function Vo(e){"@babel/helpers - typeof";return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vo(e)}function WL(e,t){if(Vo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e){var t=WL(e,"string");return Vo(t)==="symbol"?t:String(t)}function qt(e,t,n){return t=HL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var VL=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:o}=n,i=ge.parent(e,r),s=r[r.length-1];if(s>i.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(i.children.splice(s,0,o),t)for(var[a,u]of te.points(t))t[u]=He.transform(a,n);break}case"insert_text":{var{path:l,offset:f,text:d}=n;if(d.length===0)break;var h=ge.leaf(e,l),v=h.text.slice(0,f),m=h.text.slice(f);if(h.text=v+d+m,t)for(var[g,p]of te.points(t))t[p]=He.transform(g,n);break}case"merge_node":{var{path:E}=n,S=ge.get(e,E),D=U.previous(E),M=ge.get(e,D),b=ge.parent(e,E),w=E[E.length-1];if(xe.isText(S)&&xe.isText(M))M.text+=S.text;else if(!xe.isText(S)&&!xe.isText(M))M.children.push(...S.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(E,"] to nodes of different interfaces: ").concat(Nt.stringify(S)," ").concat(Nt.stringify(M)));if(b.children.splice(w,1),t)for(var[L,O]of te.points(t))t[O]=He.transform(L,n);break}case"move_node":{var{path:H,newPath:P}=n;if(U.isAncestor(H,P))throw new Error("Cannot move a path [".concat(H,"] to new path [").concat(P,"] because the destination is inside itself."));var V=ge.get(e,H),_=ge.parent(e,H),R=H[H.length-1];_.children.splice(R,1);var F=U.transform(H,n),N=ge.get(e,U.parent(F)),Y=F[F.length-1];if(N.children.splice(Y,0,V),t)for(var[I,Q]of te.points(t))t[Q]=He.transform(I,n);break}case"remove_node":{var{path:ne}=n,k=ne[ne.length-1],T=ge.parent(e,ne);if(T.children.splice(k,1),t)for(var[Z,$]of te.points(t)){var K=He.transform(Z,n);if(t!=null&&K!=null)t[$]=K;else{var G=void 0,y=void 0;for(var[z,W]of ge.texts(e))if(U.compare(W,ne)===-1)G=[z,W];else{y=[z,W];break}var B=!1;G&&y&&(U.equals(y[1],ne)?B=!U.hasPrevious(y[1]):B=U.common(G[1],ne).length<U.common(y[1],ne).length),G&&!B?(Z.path=G[1],Z.offset=G[0].text.length):y?(Z.path=y[1],Z.offset=0):t=null}}break}case"remove_text":{var{path:X,offset:ee,text:j}=n;if(j.length===0)break;var se=ge.leaf(e,X),ae=se.text.slice(0,ee),fe=se.text.slice(ee+j.length);if(se.text=ae+fe,t)for(var[he,be]of te.points(t))t[be]=He.transform(he,n);break}case"set_node":{var{path:ve,properties:me,newProperties:le}=n;if(ve.length===0)throw new Error("Cannot set properties on the root node!");var Me=ge.get(e,ve);for(var oe in le){if(oe==="children"||oe==="text")throw new Error('Cannot set the "'.concat(oe,'" property of nodes!'));var Ae=le[oe];Ae==null?delete Me[oe]:Me[oe]=Ae}for(var ie in me)le.hasOwnProperty(ie)||delete Me[ie];break}case"set_selection":{var{newProperties:Se}=n;if(Se==null)t=Se;else{if(t==null){if(!te.isRange(Se))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Nt.stringify(Se)," when there is no current selection."));t=qo({},Se)}for(var Be in Se){var Re=Se[Be];if(Re==null){if(Be==="anchor"||Be==="focus")throw new Error('Cannot remove the "'.concat(Be,'" selection property'));delete t[Be]}else t[Be]=Re}}break}case"split_node":{var{path:Xe,position:Ce,properties:ht}=n;if(Xe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Xe,"] because the root node cannot be split."));var rt=ge.get(e,Xe),Yt=ge.parent(e,Xe),At=Xe[Xe.length-1],It;if(xe.isText(rt)){var gn=rt.text.slice(0,Ce),vn=rt.text.slice(Ce);rt.text=gn,It=qo(qo({},ht),{},{text:vn})}else{var mn=rt.children.slice(0,Ce),yn=rt.children.slice(Ce);rt.children=mn,It=qo(qo({},ht),{},{children:yn})}if(Yt.children.splice(At+1,0,It),t)for(var[Ft,Xt]of te.points(t))t[Xt]=He.transform(Ft,n);break}}return t},qL={transform(e,t){e.children=Yg(e.children);var n=e.selection&&Yg(e.selection);try{n=VL(e,n,t)}finally{e.children=Xg(e.children),n?e.selection=zr(n)?Xg(n):n:e.selection=null}}},ZL={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},GL={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},rv=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(Ht(r)&&Ht(o)){if(!rv(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(r!==o)return!1}for(var s in t)if(e[s]===void 0&&t[s]!==void 0)return!1;return!0};function KL(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Yn(e,t){if(e==null)return{};var n=KL(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var YL=["anchor","focus"];function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function XL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ov(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var te={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return te.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=te.edges(e);return t},equals(e,t){return He.equals(e.anchor,t.anchor)&&He.equals(e.focus,t.focus)},includes(e,t){if(te.isRange(t)){if(te.includes(e,t.anchor)||te.includes(e,t.focus))return!0;var[n,r]=te.edges(e),[o,i]=te.edges(t);return He.isBefore(n,o)&&He.isAfter(r,i)}var[s,a]=te.edges(e),u=!1,l=!1;return He.isPoint(t)?(u=He.compare(t,s)>=0,l=He.compare(t,a)<=0):(u=U.compare(t,s.path)>=0,l=U.compare(t,a.path)<=0),u&&l},intersection(e,t){var n=Yn(e,YL),[r,o]=te.edges(e),[i,s]=te.edges(t),a=He.isBefore(r,i)?i:r,u=He.isBefore(o,s)?o:s;return He.isBefore(u,a)?null:XL({anchor:a,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return He.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return He.equals(t,n)},isExpanded(e){return!te.isCollapsed(e)},isForward(e){return!te.isBackward(e)},isRange(e){return Ht(e)&&He.isPoint(e.anchor)&&He.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=te.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cl(e,r=>{if(r===null)return null;var{affinity:o="inward"}=n,i,s;if(o==="inward"){var a=te.isCollapsed(r);te.isForward(r)?(i="forward",s=a?i:"backward"):(i="backward",s=a?i:"forward")}else o==="outward"?te.isForward(r)?(i="backward",s="forward"):(i="forward",s="backward"):(i=o,s=o);var u=He.transform(r.anchor,t,{affinity:i}),l=He.transform(r.focus,t,{affinity:s});if(!u||!l)return null;r.anchor=u,r.focus=l})}},iv=e=>Ht(e)&&ge.isNodeList(e.children)&&!x.isEditor(e),De={isAncestor(e){return Ht(e)&&ge.isNodeList(e.children)},isElement:iv,isElementList(e){return Array.isArray(e)&&e.every(t=>De.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return iv(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},JL=["children"],QL=["text"],sv=new WeakMap,ge={ancestor(e,t){var n=ge.get(e,t);if(xe.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Nt.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of U.ancestors(t,n)){var o=ge.ancestor(e,r),i=[o,r];yield i}}()},child(e,t){if(xe.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Nt.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Nt.stringify(e)));return n},children(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,o=ge.ancestor(e,t),{children:i}=o,s=r?i.length-1:0;r?s>=0:s<i.length;){var a=ge.child(o,s),u=t.concat(s);yield[a,u],s=r?s-1:s+1}}()},common(e,t,n){var r=U.common(t,n),o=ge.get(e,r);return[o,r]},descendant(e,t){var n=ge.get(e,t);if(x.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Nt.stringify(n)));return n},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ge.nodes(e,t))r.length!==0&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ge.nodes(e,t))De.isElement(n)&&(yield[n,r])}()},extractProps(e){if(De.isAncestor(e)){var t=Yn(e,JL);return t}else{var t=Yn(e,QL);return t}},first(e,t){for(var n=t.slice(),r=ge.get(e,n);r&&!(xe.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(xe.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Nt.stringify(e)));var n=cl({children:e.children},r=>{var[o,i]=te.edges(t),s=ge.nodes(r,{reverse:!0,pass:h=>{var[,v]=h;return!te.includes(t,v)}});for(var[,a]of s){if(!te.includes(t,a)){var u=ge.parent(r,a),l=a[a.length-1];u.children.splice(l,1)}if(U.equals(a,i.path)){var f=ge.leaf(r,a);f.text=f.text.slice(0,i.offset)}if(U.equals(a,o.path)){var d=ge.leaf(r,a);d.text=d.text.slice(o.offset)}}x.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(xe.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Nt.stringify(e)));n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(xe.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode(e){return xe.isText(e)||De.isElement(e)||x.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=sv.get(e);if(t!==void 0)return t;var n=e.every(r=>ge.isNode(r));return sv.set(e,n),n},last(e,t){for(var n=t.slice(),r=ge.get(e,n);r&&!(xe.isText(r)||r.children.length===0);){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=ge.get(e,t);if(!xe.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Nt.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of U.levels(t,n)){var o=ge.get(e,r);yield[o,r]}}()},matches(e,t){return De.isElement(e)&&De.isElementProps(t)&&De.matches(e,t)||xe.isText(e)&&xe.isTextProps(t)&&xe.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,s=new Set,a=[],u=e;!(i&&(r?U.isBefore(a,i):U.isAfter(a,i)));){if(s.has(u)||(yield[u,a]),!s.has(u)&&!xe.isText(u)&&u.children.length!==0&&(n==null||n([u,a])===!1)){s.add(u);var l=r?u.children.length-1:0;U.isAncestor(a,o)&&(l=o[a.length]),a=a.concat(l),u=ge.get(e,a);continue}if(a.length===0)break;if(!r){var f=U.next(a);if(ge.has(e,f)){a=f,u=ge.get(e,a);continue}}if(r&&a[a.length-1]!==0){var d=U.previous(a);a=d,u=ge.get(e,a);continue}a=U.parent(a),u=ge.get(e,a),s.add(u)}}()},parent(e,t){var n=U.parent(t),r=ge.get(e,n);if(xe.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return xe.isText(e)?e.text:e.children.map(ge.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ge.nodes(e,t))xe.isText(n)&&(yield[n,r])}()}};function av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?av(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):av(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var vr={isNodeOperation(e){return vr.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Ht(e))return!1;switch(e.type){case"insert_node":return U.isPath(e.path)&&ge.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&U.isPath(e.path);case"merge_node":return typeof e.position=="number"&&U.isPath(e.path)&&Ht(e.properties);case"move_node":return U.isPath(e.path)&&U.isPath(e.newPath);case"remove_node":return U.isPath(e.path)&&ge.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&U.isPath(e.path);case"set_node":return U.isPath(e.path)&&Ht(e.properties)&&Ht(e.newProperties);case"set_selection":return e.properties===null&&te.isRange(e.newProperties)||e.newProperties===null&&te.isRange(e.properties)||Ht(e.properties)&&Ht(e.newProperties);case"split_node":return U.isPath(e.path)&&typeof e.position=="number"&&Ht(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>vr.isOperation(t))},isSelectionOperation(e){return vr.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return vr.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Ct(Ct({},e),{},{type:"remove_node"});case"insert_text":return Ct(Ct({},e),{},{type:"remove_text"});case"merge_node":return Ct(Ct({},e),{},{type:"split_node",path:U.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(U.equals(t,n))return e;if(U.isSibling(n,t))return Ct(Ct({},e),{},{path:t,newPath:n});var r=U.transform(n,e),o=U.transform(U.next(n),e);return Ct(Ct({},e),{},{path:r,newPath:o})}case"remove_node":return Ct(Ct({},e),{},{type:"insert_node"});case"remove_text":return Ct(Ct({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:s}=e;return Ct(Ct({},e),{},{properties:s,newProperties:i})}case"set_selection":{var{properties:a,newProperties:u}=e;return a==null?Ct(Ct({},e),{},{properties:u,newProperties:null}):u==null?Ct(Ct({},e),{},{properties:null,newProperties:a}):Ct(Ct({},e),{},{properties:u,newProperties:a})}case"split_node":return Ct(Ct({},e),{},{type:"merge_node",path:U.next(e.path)})}}},uv=new WeakMap,eO=e=>{var t=uv.get(e);if(t!==void 0)return t;if(!Ht(e))return!1;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Ht(e.marks))&&(e.selection===null||te.isRange(e.selection))&&ge.isNodeList(e.children)&&vr.isOperationList(e.operations);return uv.set(e,n),n},x={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor(e){return eO(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},tO={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(U.isPath)}};function lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var He={compare(e,t){var n=U.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return He.compare(e,t)===1},isBefore(e,t){return He.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&U.equals(e.path,t.path)},isPoint(e){return Ht(e)&&typeof e.offset=="number"&&U.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return cl(e,r=>{if(r===null)return null;var{affinity:o="forward"}=n,{path:i,offset:s}=r;switch(t.type){case"insert_node":case"move_node":{r.path=U.transform(i,t,n);break}case"insert_text":{U.equals(t.path,i)&&(t.offset<s||t.offset===s&&o==="forward")&&(r.offset+=t.text.length);break}case"merge_node":{U.equals(t.path,i)&&(r.offset+=t.position),r.path=U.transform(i,t,n);break}case"remove_text":{U.equals(t.path,i)&&t.offset<=s&&(r.offset-=Math.min(s-t.offset,t.text.length));break}case"remove_node":{if(U.equals(t.path,i)||U.isAncestor(t.path,i))return null;r.path=U.transform(i,t,n);break}case"split_node":{if(U.equals(t.path,i)){if(t.position===s&&o==null)return null;(t.position<s||t.position===s&&o==="forward")&&(r.offset-=t.position,r.path=U.transform(i,t,cv(cv({},n),{},{affinity:"forward"})))}else r.path=U.transform(i,t,n);break}}})}},fv=void 0,Nt={setScrubber(e){fv=e},stringify(e){return JSON.stringify(e,fv)}},nO=["text"],rO=["anchor","focus"];function dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var xe={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function o(i){var s=Yn(i,nO);return s}return rv(r?o(e):e,r?o(t):t)},isText(e){return Ht(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>xe.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Xn({},e)];for(var r of t){var o=Yn(r,rO),[i,s]=te.edges(r),a=[],u=0,l=i.offset,f=s.offset;for(var d of n){var{length:h}=d.text,v=u;if(u+=h,l<=v&&u<=f){Object.assign(d,o),a.push(d);continue}if(l!==f&&(l===u||f===v)||l>u||f<v||f===v&&v!==0){a.push(d);continue}var m=d,g=void 0,p=void 0;if(f<u){var E=f-v;p=Xn(Xn({},m),{},{text:m.text.slice(E)}),m=Xn(Xn({},m),{},{text:m.text.slice(0,E)})}if(l>v){var S=l-v;g=Xn(Xn({},m),{},{text:m.text.slice(0,S)}),m=Xn(Xn({},m),{},{text:m.text.slice(S)})}Object.assign(m,o),g&&a.push(g),a.push(m),p&&a.push(p)}n=a}return n}},fl=e=>e.selection?e.selection:e.children.length>0?x.end(e,[]):[0],oo=(e,t)=>{var[n]=x.node(e,t);return r=>r===n},dl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,o=n?lO(t):t,i=Ie.None,s=Ie.None,a=0,u=null,l=null;for(var f of o){var d=f.codePointAt(0);if(!d)break;var h=EO(f,d);if([i,s]=r?[s,h]:[h,i],io(i,Ie.ZWJ)&&io(s,Ie.ExtPict)&&(r?u=pv(t.substring(0,a)):u=pv(t.substring(0,t.length-a)),!u)||io(i,Ie.RI)&&io(s,Ie.RI)&&(l!==null?l=!l:r?l=!0:l=LO(t.substring(0,t.length-a)),!l)||i!==Ie.None&&s!==Ie.None&&DO(i,s))break;a+=f.length}return a||1},oO=/\s/,iO=/[\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]/,sO=/['\u2018\u2019]/,aO=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,o=!1;t.length>0;){var i=dl(t,n),[s,a]=pl(t,i,n);if(uO(s,a,n))o=!0,r+=i;else if(!o)r+=i;else break;t=a}return r},pl=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},uO=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(oO.test(t))return!1;if(sO.test(t)){var o=dl(n,r),[i,s]=pl(n,o,r);if(e(i,s,r))return!0}return!iO.test(t)},lO=function*(t){for(var n=t.length-1,r=0;r<t.length;r++){var o=t.charAt(n-r);if(fO(o.charCodeAt(0))){var i=t.charAt(n-r-1);if(cO(i.charCodeAt(0))){yield i+o,r++;continue}}yield o}},cO=e=>e>=55296&&e<=56319,fO=e=>e>=56320&&e<=57343,Ie;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Ie||(Ie={}));var dO=/^(?:[\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])$/,pO=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,hO=/^(?:[\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])$/,gO=/^[\u1100-\u115F\uA960-\uA97C]$/,vO=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,mO=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,yO=/^[\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]$/,bO=/^[\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]$/,CO=/^(?:[\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])$/,EO=(e,t)=>{var n=Ie.Any;return e.search(dO)!==-1&&(n|=Ie.Extend),t===8205&&(n|=Ie.ZWJ),t>=127462&&t<=127487&&(n|=Ie.RI),e.search(pO)!==-1&&(n|=Ie.Prepend),e.search(hO)!==-1&&(n|=Ie.SpacingMark),e.search(gO)!==-1&&(n|=Ie.L),e.search(vO)!==-1&&(n|=Ie.V),e.search(mO)!==-1&&(n|=Ie.T),e.search(yO)!==-1&&(n|=Ie.LV),e.search(bO)!==-1&&(n|=Ie.LVT),e.search(CO)!==-1&&(n|=Ie.ExtPict),n};function io(e,t){return(e&t)!==0}var wO=[[Ie.L,Ie.L|Ie.V|Ie.LV|Ie.LVT],[Ie.LV|Ie.V,Ie.V|Ie.T],[Ie.LVT|Ie.T,Ie.T],[Ie.Any,Ie.Extend|Ie.ZWJ],[Ie.Any,Ie.SpacingMark],[Ie.Prepend,Ie.Any],[Ie.ZWJ,Ie.ExtPict],[Ie.RI,Ie.RI]];function DO(e,t){return wO.findIndex(n=>io(e,n[0])&&io(t,n[1]))===-1}var xO=/(?:[\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$/,pv=e=>e.search(xO)!==-1,SO=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,LO=e=>{var t=e.match(SO);if(t===null)return!1;var n=t[0].length/2;return n%2===1},OO={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};x.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=fl(e)}=n;if(U.isPath(o)&&(o=x.range(e,o)),te.isRange(o))if(te.isCollapsed(o))o=o.anchor;else{var i=te.end(o);if(!r&&x.void(e,{at:i}))return;var s=te.start(o),a=x.pointRef(e,s),u=x.pointRef(e,i);ue.delete(e,{at:o,voids:r});var l=a.unref(),f=u.unref();o=l||f,ue.setSelection(e,{anchor:o,focus:o})}if(!(!r&&x.void(e,{at:o})||x.elementReadOnly(e,{at:o}))){var{path:d,offset:h}=o;t.length>0&&e.apply({type:"insert_text",path:d,offset:h,text:t})}})}};function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ue=Ds(Ds(Ds(Ds({},qL),ZL),GL),OO),xs=new WeakMap,kO=e=>xs.get(e)||!1,PO=(e,t,n)=>{var r=xs.get(e)||!1;xs.set(e,!0);try{t(),n()}finally{xs.set(e,r)}};function gv(e,t,n){var r=Es.get(e)||[],o=ws.get(e)||new Set,i,s,a=d=>{if(d){var h=d.join(",");s.has(h)||(s.add(h),i.push(d))}};if(n){i=[],s=new Set;for(var u of r){var l=n(u);a(l)}}else i=r,s=o;for(var f of t)a(f);Es.set(e,i),ws.set(e,s)}var MO=(e,t)=>{for(var n of x.pathRefs(e))zL.transform(n,t);for(var r of x.pointRefs(e))$L.transform(r,t);for(var o of x.rangeRefs(e))UL.transform(o,t);if(!kO(e)){var i=U.operationCanTransformPath(t)?s=>U.transform(s,t):void 0;gv(e,e.getDirtyPaths(t),i)}ue.transform(e,t),e.operations.push(t),x.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Ho.get(e)||(Ho.set(e,!0),Promise.resolve().then(()=>{Ho.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},BO=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=t;return U.levels(n)}case"insert_node":{var{node:r,path:o}=t,i=U.levels(o),s=xe.isText(r)?[]:Array.from(ge.nodes(r),P=>{var[,V]=P;return o.concat(V)});return[...i,...s]}case"merge_node":{var{path:a}=t,u=U.ancestors(a),l=U.previous(a);return[...u,l]}case"move_node":{var{path:f,newPath:d}=t;if(U.equals(f,d))return[];var h=[],v=[];for(var m of U.ancestors(f)){var g=U.transform(m,t);h.push(g)}for(var p of U.ancestors(d)){var E=U.transform(p,t);v.push(E)}var S=v[v.length-1],D=d[d.length-1],M=S.concat(D);return[...h,...v,M]}case"remove_node":{var{path:b}=t,w=U.ancestors(b);return[...w]}case"split_node":{var{path:L}=t,O=U.levels(L),H=U.next(L);return[...O,H]}default:return[]}},TO=e=>{var{selection:t}=e;return t?ge.fragment(e,t):[]},AO=(e,t)=>{var[n,r]=t;if(!xe.isText(n)){if(De.isElement(n)&&n.children.length===0){var o={text:""};ue.insertNodes(e,o,{at:r.concat(0),voids:!0});return}for(var i=x.isEditor(n)?!1:De.isElement(n)&&(e.isInline(n)||n.children.length===0||xe.isText(n.children[0])||e.isInline(n.children[0])),s=0,a=0;a<n.children.length;a++,s++){var u=ge.get(e,r);if(!xe.isText(u)){var l=u.children[s],f=u.children[s-1],d=a===n.children.length-1,h=xe.isText(l)||De.isElement(l)&&e.isInline(l);if(h!==i)ue.removeNodes(e,{at:r.concat(s),voids:!0}),s--;else if(De.isElement(l)){if(e.isInline(l)){if(f==null||!xe.isText(f)){var v={text:""};ue.insertNodes(e,v,{at:r.concat(s),voids:!0}),s++}else if(d){var m={text:""};ue.insertNodes(e,m,{at:r.concat(s+1),voids:!0}),s++}}}else{if(!xe.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&xe.isText(f)&&(xe.equals(l,f,{loose:!0})?(ue.mergeNodes(e,{at:r.concat(s),voids:!0}),s--):f.text===""?(ue.removeNodes(e,{at:r.concat(s-1),voids:!0}),s--):l.text===""&&(ue.removeNodes(e,{at:r.concat(s),voids:!0}),s--))}}}}},FO=(e,t)=>{var{iteration:n,initialDirtyPathsLength:r}=t,o=r*42;if(n>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},IO=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:o="lowest",at:i=t.selection,match:s}=n;if(i){var a=x.path(t,i),u=o==="lowest";for(var[l,f]of x.levels(t,{at:a,voids:r,match:s,reverse:u}))if(!xe.isText(l)){if(te.isRange(i)){if(U.isAncestor(f,i.anchor.path)&&U.isAncestor(f,i.focus.path))return[l,f]}else if(!U.equals(a,f))return[l,f]}}};function vv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var _O=(e,t,n)=>{var{selection:r}=e;if(r){var o=(d,h)=>{if(!xe.isText(d))return!1;var[v,m]=x.parent(e,h);return!e.isVoid(v)||e.markableVoid(v)},i=te.isExpanded(r),s=!1;if(!i){var[a,u]=x.node(e,r);if(a&&o(a,u)){var[l]=x.parent(e,u);s=l&&e.markableVoid(l)}}if(i||s)ue.setNodes(e,{[t]:n},{match:o,split:!0,voids:!0});else{var f=mv(mv({},x.marks(e)||{}),{},{[t]:n});e.marks=f,Ho.get(e)||e.onChange()}}};function yv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var RO=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=x.point(t,n,{edge:"end"}),i=x.end(t,[]),s={anchor:o,focus:i},{distance:a=1}=r,u=0,l;for(var f of x.positions(t,bv(bv({},r),{},{at:s}))){if(u>a)break;u!==0&&(l=f),u++}return l};function Cv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ev(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var jO=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=x.start(t,[]),i=x.point(t,n,{edge:"start"}),s={anchor:o,focus:i},{distance:a=1}=r,u=0,l;for(var f of x.positions(t,Ev(Ev({},r),{},{at:s,reverse:!0}))){if(u>a)break;u!==0&&(l=f),u++}return l},NO=(e,t)=>{var{selection:n}=e;n&&te.isCollapsed(n)&&ue.delete(e,{unit:t,reverse:!0})},zO=(e,t)=>{var{selection:n}=e;n&&te.isCollapsed(n)&&ue.delete(e,{unit:t})},$O=function(t){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=t;r&&te.isExpanded(r)&&ue.delete(t,{reverse:n==="backward"})},UO=(e,t)=>[x.start(e,t),x.end(e,t)];function wv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var WO=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return x.above(t,Dv(Dv({},n),{},{match:r=>De.isElement(r)&&x.isElementReadOnly(t,r)}))},HO=(e,t)=>x.point(e,t,{edge:"end"}),VO=(e,t)=>{var n=x.path(e,t,{edge:"start"});return x.node(e,n)},qO=(e,t)=>{var n=x.range(e,t);return ge.fragment(e,n)};function xv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Sv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ZO=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return x.above(t,Sv(Sv({},n),{},{match:r=>De.isElement(r)&&x.isVoid(t,r)}))},GO=(e,t)=>t.children.some(n=>De.isElement(n)&&x.isBlock(e,n)),KO=(e,t)=>t.children.some(n=>xe.isText(n)||x.isInline(e,n)),YO=(e,t)=>ge.has(e,t),XO=(e,t)=>t.children.every(n=>xe.isText(n)),JO=e=>{ue.splitNodes(e,{always:!0})},QO=(e,t,n)=>{ue.insertNodes(e,t,n)},ek=e=>{ue.splitNodes(e,{always:!0})};function Lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o,marks:i}=t;if(o){if(i){var s=tk({text:n},i);ue.insertNodes(t,s,{at:r.at,voids:r.voids})}else ue.insertText(t,n,r);t.marks=null}},rk=(e,t)=>!e.isInline(t),ok=(e,t,n)=>x.isStart(e,t,n)||x.isEnd(e,t,n),ik=(e,t)=>{var{children:n}=t,[r]=n;return n.length===0||n.length===1&&xe.isText(r)&&r.text===""&&!e.isVoid(t)},sk=(e,t,n)=>{var r=x.end(e,n);return He.equals(t,r)},ak=e=>{var t=Jg.get(e);return t===void 0?!0:t},uk=(e,t,n)=>{if(t.offset!==0)return!1;var r=x.start(e,n);return He.equals(t,r)},lk=(e,t)=>{var n=x.path(e,t,{edge:"end"});return x.node(e,n)},ck=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=x.path(t,n,r),i=ge.leaf(t,o);return[i,o]};function fk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),!!n){var s=[],a=x.path(e,n);for(var[u,l]of ge.levels(e,a))if(i(u,l)&&(s.push([u,l]),!o&&De.isElement(u)&&x.isVoid(e,u)))break;r&&s.reverse(),yield*s}}()}var dk=["text"],pk=["text"],hk=function(t){var{marks:n,selection:r}=t;if(!r)return null;var{anchor:o,focus:i}=r;if(n)return n;if(te.isExpanded(r)){var s=x.isEnd(t,o,o.path);if(s){var a=x.after(t,o);a&&(o=a)}var[u]=x.nodes(t,{match:xe.isText,at:{anchor:o,focus:i}});if(u){var[l]=u,f=Yn(l,dk);return f}else return{}}var{path:d}=o,[h]=x.leaf(t,d);if(o.offset===0){var v=x.previous(t,{at:d,match:xe.isText}),m=x.above(t,{match:M=>De.isElement(M)&&x.isVoid(t,M)&&t.markableVoid(M)});if(!m){var g=x.above(t,{match:M=>De.isElement(M)&&x.isBlock(t,M)});if(v&&g){var[p,E]=v,[,S]=g;U.isAncestor(S,E)&&(h=p)}}}var D=Yn(h,pk);return D},gk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:s=t.selection}=n;if(s){var a=x.after(t,s,{voids:o});if(a){var[,u]=x.last(t,[]),l=[a.path,u];if(U.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(U.isPath(s)){var[f]=x.parent(t,s);i=h=>f.children.includes(h)}else i=()=>!0;var[d]=x.nodes(t,{at:l,match:i,mode:r,voids:o});return d}}},vk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=x.path(t,n,r),i=ge.get(t,o);return[i,o]};function mk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:s=!1,ignoreNonSelectable:a=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!n){var l,f;if(tO.isSpan(n))l=n[0],f=n[1];else{var d=x.path(e,n,{edge:"start"}),h=x.path(e,n,{edge:"end"});l=i?h:d,f=i?d:h}var v=ge.nodes(e,{reverse:i,from:l,to:f,pass:M=>{var[b]=M;return De.isElement(b)?!!(!s&&(x.isVoid(e,b)||x.isElementReadOnly(e,b))||a&&!x.isSelectable(e,b)):!1}}),m=[],g;for(var[p,E]of v)if(!(a&&De.isElement(p)&&!x.isSelectable(e,p))){var S=g&&U.compare(E,g[1])===0;if(!(r==="highest"&&S)){if(!u(p,E)){if(o&&!S&&xe.isText(p))return;continue}if(r==="lowest"&&S){g=[p,E];continue}var D=r==="lowest"?g:[p,E];D&&(o?m.push(D):yield D),g=[p,E]}}r==="lowest"&&g&&(o?m.push(g):yield g),o&&(yield*m)}}()}var yk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:o}=n,i=f=>Es.get(f)||[],s=f=>ws.get(f)||new Set,a=f=>{var d=i(f).pop(),h=d.join(",");return s(f).delete(h),d};if(x.isNormalizing(t)){if(r){var u=Array.from(ge.nodes(t),f=>{var[,d]=f;return d}),l=new Set(u.map(f=>f.join(",")));Es.set(t,u),ws.set(t,l)}i(t).length!==0&&x.withoutNormalizing(t,()=>{for(var f of i(t))if(ge.has(t,f)){var d=x.node(t,f),[h,v]=d;De.isElement(h)&&h.children.length===0&&t.normalizeNode(d,{operation:o})}for(var m=i(t),g=m.length,p=0;m.length!==0;){if(!t.shouldNormalize({dirtyPaths:m,iteration:p,initialDirtyPathsLength:g,operation:o}))return;var E=a(t);if(ge.has(t,E)){var S=x.node(t,E);t.normalizeNode(S,{operation:o})}p++,m=i(t)}})}},bk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=x.path(t,n,r),i=U.parent(o),s=x.node(t,i);return s},Ck=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i,u=x.pathRefs(t);return u.delete(i),i.current=null,a}},s=x.pathRefs(t);return s.add(i),i},Ek=e=>{var t=Qg.get(e);return t||(t=new Set,Qg.set(e,t)),t},wk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:o,edge:i}=r;if(U.isPath(n)){if(i==="start"){var[,s]=ge.first(t,n);n=s}else if(i==="end"){var[,a]=ge.last(t,n);n=a}}return te.isRange(n)&&(i==="start"?n=te.start(n):i==="end"?n=te.end(n):n=U.common(n.anchor.path,n.focus.path)),He.isPoint(n)&&(n=n.path),o!=null&&(n=n.slice(0,o)),n},Dk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i,u=x.pointRefs(t);return u.delete(i),i.current=null,a}},s=x.pointRefs(t);return s.add(i),i},xk=e=>{var t=ev.get(e);return t||(t=new Set,ev.set(e,t)),t},Sk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:o="start"}=r;if(U.isPath(n)){var i;if(o==="end"){var[,s]=ge.last(t,n);i=s}else{var[,a]=ge.first(t,n);i=a}var u=ge.get(t,i);if(!xe.isText(u))throw new Error("Cannot get the ".concat(o," point in the node at path [").concat(n,"] because it has no ").concat(o," text node."));return{path:i,offset:o==="end"?u.text.length:0}}if(te.isRange(n)){var[l,f]=te.edges(n);return o==="start"?l:f}return n};function Lk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1,ignoreNonSelectable:s=!1}=t;if(!n)return;var a=x.range(e,n),[u,l]=te.edges(a),f=o?l:u,d=!1,h="",v=0,m=0,g=0;for(var[p,E]of x.nodes(e,{at:n,reverse:o,voids:i,ignoreNonSelectable:s})){if(De.isElement(p)){if(!i&&(e.isVoid(p)||e.isElementReadOnly(p))){yield x.start(e,E);continue}if(e.isInline(p))continue;if(x.hasInlines(e,p)){var S=U.isAncestor(E,l.path)?l:x.end(e,E),D=U.isAncestor(E,u.path)?u:x.start(e,E);h=x.string(e,{anchor:D,focus:S},{voids:i}),d=!0}}if(xe.isText(p)){var M=U.equals(E,f.path);for(M?(m=o?f.offset:p.text.length-f.offset,g=f.offset):(m=p.text.length,g=o?m:0),(M||d||r==="offset")&&(yield{path:E,offset:g},d=!1);;){if(v===0){if(h==="")break;v=b(h,r,o),h=pl(h,v,o)[1]}if(g=o?g-v:g+v,m=m-v,m<0){v=-m;break}v=0,yield{path:E,offset:g}}}}function b(w,L,O){return L==="character"?dl(w,O):L==="word"?aO(w,O):L==="line"||L==="block"?w.length:1}}()}var Ok=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:o=!1}=n,{match:i,at:s=t.selection}=n;if(s){var a=x.before(t,s,{voids:o});if(a){var[,u]=x.first(t,[]),l=[a.path,u];if(U.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(U.isPath(s)){var[f]=x.parent(t,s);i=h=>f.children.includes(h)}else i=()=>!0;var[d]=x.nodes(t,{reverse:!0,at:l,match:i,mode:r,voids:o});return d}}},kk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:o="forward"}=r,i={current:n,affinity:o,unref(){var{current:a}=i,u=x.rangeRefs(t);return u.delete(i),i.current=null,a}},s=x.rangeRefs(t);return s.add(i),i},Pk=e=>{var t=tv.get(e);return t||(t=new Set,tv.set(e,t)),t},Mk=(e,t,n)=>{if(te.isRange(t)&&!n)return t;var r=x.start(e,t),o=x.end(e,n||t);return{anchor:r,focus:o}};function Ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ov(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ov(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Tk=(e,t)=>{var{selection:n}=e;if(n){var r=(f,d)=>{if(!xe.isText(f))return!1;var[h,v]=x.parent(e,d);return!e.isVoid(h)||e.markableVoid(h)},o=te.isExpanded(n),i=!1;if(!o){var[s,a]=x.node(e,n);if(s&&r(s,a)){var[u]=x.parent(e,a);i=u&&e.markableVoid(u)}}if(o||i)ue.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var l=Bk({},x.marks(e)||{});delete l[t],e.marks=l,Ho.get(e)||e.onChange()}}},Ak=(e,t)=>{Jg.set(e,t)},Fk=(e,t)=>x.point(e,t,{edge:"start"}),Ik=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,i=x.range(t,n),[s,a]=te.edges(i),u="";for(var[l,f]of x.nodes(t,{at:i,match:xe.isText,voids:o})){var d=l.text;U.equals(f,a.path)&&(d=d.slice(0,a.offset)),U.equals(f,s.path)&&(d=d.slice(s.offset)),u+=d}return u},_k=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:o=!1}=r,[i,s]=te.edges(n);if(i.offset!==0||s.offset!==0||te.isCollapsed(n)||U.hasPrevious(s.path))return n;var a=x.above(t,{at:s,match:m=>De.isElement(m)&&x.isBlock(t,m),voids:o}),u=a?a[1]:[],l=x.start(t,i),f={anchor:l,focus:s},d=!0;for(var[h,v]of x.nodes(t,{at:f,match:xe.isText,reverse:!0,voids:o})){if(d){d=!1;continue}if(h.text!==""||U.isBefore(v,u)){s={path:v,offset:h.text.length};break}}return{anchor:i,focus:s}},Rk=(e,t)=>{var n=x.isNormalizing(e);x.setNormalizing(e,!1);try{t()}finally{x.setNormalizing(e,n)}x.normalize(e)},jk=(e,t,n)=>{var[r,o]=t;return De.isElement(r)&&x.isEmpty(e,r)||xe.isText(r)&&r.text===""&&o[o.length-1]!==0},Nk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var r,o,{reverse:i=!1,unit:s="character",distance:a=1,voids:u=!1}=n,{at:l=t.selection,hanging:f=!1}=n;if(l){var d=!1;if(te.isRange(l)&&te.isCollapsed(l)&&(d=!0,l=l.anchor),He.isPoint(l)){var h=x.void(t,{at:l,mode:"highest"});if(!u&&h){var[,v]=h;l=v}else{var m={unit:s,distance:a},g=i?x.before(t,l,m)||x.start(t,[]):x.after(t,l,m)||x.end(t,[]);l={anchor:l,focus:g},f=!0}}if(U.isPath(l)){ue.removeNodes(t,{at:l,voids:u});return}if(!te.isCollapsed(l)){if(!f){var[,p]=te.edges(l),E=x.end(t,[]);He.equals(p,E)||(l=x.unhangRange(t,l,{voids:u}))}var[S,D]=te.edges(l),M=x.above(t,{match:ae=>De.isElement(ae)&&x.isBlock(t,ae),at:S,voids:u}),b=x.above(t,{match:ae=>De.isElement(ae)&&x.isBlock(t,ae),at:D,voids:u}),w=M&&b&&!U.equals(M[1],b[1]),L=U.equals(S.path,D.path),O=u?null:(r=x.void(t,{at:S,mode:"highest"}))!==null&&r!==void 0?r:x.elementReadOnly(t,{at:S,mode:"highest"}),H=u?null:(o=x.void(t,{at:D,mode:"highest"}))!==null&&o!==void 0?o:x.elementReadOnly(t,{at:D,mode:"highest"});if(O){var P=x.before(t,S);P&&M&&U.isAncestor(M[1],P.path)&&(S=P)}if(H){var V=x.after(t,D);V&&b&&U.isAncestor(b[1],V.path)&&(D=V)}var _=[],R;for(var F of x.nodes(t,{at:l,voids:u})){var[N,Y]=F;R&&U.compare(Y,R)===0||(!u&&De.isElement(N)&&(x.isVoid(t,N)||x.isElementReadOnly(t,N))||!U.isCommon(Y,S.path)&&!U.isCommon(Y,D.path))&&(_.push(F),R=Y)}var I=Array.from(_,ae=>{var[,fe]=ae;return x.pathRef(t,fe)}),Q=x.pointRef(t,S),ne=x.pointRef(t,D),k="";if(!L&&!O){var T=Q.current,[Z]=x.leaf(t,T),{path:$}=T,{offset:K}=S,G=Z.text.slice(K);G.length>0&&(t.apply({type:"remove_text",path:$,offset:K,text:G}),k=G)}if(I.reverse().map(ae=>ae.unref()).filter(ae=>ae!==null).forEach(ae=>ue.removeNodes(t,{at:ae,voids:u})),!H){var y=ne.current,[z]=x.leaf(t,y),{path:W}=y,B=L?S.offset:0,X=z.text.slice(B,D.offset);X.length>0&&(t.apply({type:"remove_text",path:W,offset:B,text:X}),k=X)}!L&&w&&ne.current&&Q.current&&ue.mergeNodes(t,{at:ne.current,hanging:!0,voids:u}),d&&i&&s==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&ue.insertText(t,k.slice(0,k.length-a));var ee=Q.unref(),j=ne.unref(),se=i?ee||j:j||ee;n.at==null&&se&&ue.select(t,se)}}})},zk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};x.withoutNormalizing(t,()=>{var{hanging:o=!1,voids:i=!1}=r,{at:s=fl(t),batchDirty:a=!0}=r;if(n.length){if(te.isRange(s))if(o||(s=x.unhangRange(t,s,{voids:i})),te.isCollapsed(s))s=s.anchor;else{var[,u]=te.edges(s);if(!i&&x.void(t,{at:u}))return;var l=x.pointRef(t,u);ue.delete(t,{at:s}),s=l.unref()}else U.isPath(s)&&(s=x.start(t,s));if(!(!i&&x.void(t,{at:s}))){var f=x.above(t,{at:s,match:G=>De.isElement(G)&&x.isInline(t,G),mode:"highest",voids:i});if(f){var[,d]=f;if(x.isEnd(t,s,d)){var h=x.after(t,d);s=h}else if(x.isStart(t,s,d)){var v=x.before(t,d);s=v}}var m=x.above(t,{match:G=>De.isElement(G)&&x.isBlock(t,G),at:s,voids:i}),[,g]=m,p=x.isStart(t,s,g),E=x.isEnd(t,s,g),S=p&&E,D=!p||p&&E,M=!E,[,b]=ge.first({children:n},[]),[,w]=ge.last({children:n},[]),L=[],O=G=>{var[y,z]=G,W=z.length===0;return W?!1:S?!0:!(D&&U.isAncestor(z,b)&&De.isElement(y)&&!t.isVoid(y)&&!t.isInline(y)||M&&U.isAncestor(z,w)&&De.isElement(y)&&!t.isVoid(y)&&!t.isInline(y))};for(var H of ge.nodes({children:n},{pass:O}))O(H)&&L.push(H);var P=[],V=[],_=[],R=!0,F=!1;for(var[N]of L)De.isElement(N)&&!t.isInline(N)?(R=!1,F=!0,V.push(N)):R?P.push(N):_.push(N);var[Y]=x.nodes(t,{at:s,match:G=>xe.isText(G)||x.isInline(t,G),mode:"highest",voids:i}),[,I]=Y,Q=x.isStart(t,s,I),ne=x.isEnd(t,s,I),k=x.pathRef(t,E&&!_.length?U.next(g):g),T=x.pathRef(t,ne?U.next(I):I);ue.splitNodes(t,{at:s,match:G=>F?De.isElement(G)&&x.isBlock(t,G):xe.isText(G)||x.isInline(t,G),mode:F?"lowest":"highest",always:F&&(!p||P.length>0)&&(!E||_.length>0),voids:i});var Z=x.pathRef(t,!Q||Q&&ne?U.next(I):I);if(ue.insertNodes(t,P,{at:Z.current,match:G=>xe.isText(G)||x.isInline(t,G),mode:"highest",voids:i,batchDirty:a}),S&&!P.length&&V.length&&!_.length&&ue.delete(t,{at:g,voids:i}),ue.insertNodes(t,V,{at:k.current,match:G=>De.isElement(G)&&x.isBlock(t,G),mode:"lowest",voids:i,batchDirty:a}),ue.insertNodes(t,_,{at:T.current,match:G=>xe.isText(G)||x.isInline(t,G),mode:"highest",voids:i,batchDirty:a}),!r.at){var $;if(_.length>0&&T.current?$=U.previous(T.current):V.length>0&&k.current?$=U.previous(k.current):Z.current&&($=U.previous(Z.current)),$){var K=x.end(t,$);ue.select(t,K)}}Z.unref(),k.unref(),T.unref()}}})},$k=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:o}=t;if(o){if(r==="anchor")ue.select(t,o.anchor);else if(r==="focus")ue.select(t,o.focus);else if(r==="start"){var[i]=te.edges(o);ue.select(t,i)}else if(r==="end"){var[,s]=te.edges(o);ue.select(t,s)}}else return},Uk=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},Wk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=t,{distance:o=1,unit:i="character",reverse:s=!1}=n,{edge:a=null}=n;if(r){a==="start"&&(a=te.isBackward(r)?"focus":"anchor"),a==="end"&&(a=te.isBackward(r)?"anchor":"focus");var{anchor:u,focus:l}=r,f={distance:o,unit:i,ignoreNonSelectable:!0},d={};if(a==null||a==="anchor"){var h=s?x.before(t,u,f):x.after(t,u,f);h&&(d.anchor=h)}if(a==null||a==="focus"){var v=s?x.before(t,l,f):x.after(t,l,f);v&&(d.focus=v)}ue.setSelection(t,d)}},Hk=(e,t)=>{var{selection:n}=e;if(t=x.range(e,t),n){ue.setSelection(e,t);return}if(!te.isRange(t))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(Nt.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})};function kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Vk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:o}=t,{edge:i="both"}=r;if(o){i==="start"&&(i=te.isBackward(o)?"focus":"anchor"),i==="end"&&(i=te.isBackward(o)?"anchor":"focus");var{anchor:s,focus:a}=o,u=i==="anchor"?s:a;ue.setSelection(t,{[i==="anchor"?"anchor":"focus"]:Pv(Pv({},u),n)})}},qk=(e,t)=>{var{selection:n}=e,r={},o={};if(n){for(var i in t)(i==="anchor"&&t.anchor!=null&&!He.equals(t.anchor,n.anchor)||i==="focus"&&t.focus!=null&&!He.equals(t.focus,n.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}},Zk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};x.withoutNormalizing(t,()=>{var{hanging:o=!1,voids:i=!1,mode:s="lowest",batchDirty:a=!0}=r,{at:u,match:l,select:f}=r;if(ge.isNode(n)&&(n=[n]),n.length!==0){var[d]=n;if(u||(u=fl(t),f!==!1&&(f=!0)),f==null&&(f=!1),te.isRange(u))if(o||(u=x.unhangRange(t,u,{voids:i})),te.isCollapsed(u))u=u.anchor;else{var[,h]=te.edges(u),v=x.pointRef(t,h);ue.delete(t,{at:u}),u=v.unref()}if(He.isPoint(u)){l==null&&(xe.isText(d)?l=P=>xe.isText(P):t.isInline(d)?l=P=>xe.isText(P)||x.isInline(t,P):l=P=>De.isElement(P)&&x.isBlock(t,P));var[m]=x.nodes(t,{at:u.path,match:l,mode:s,voids:i});if(m){var[,g]=m,p=x.pathRef(t,g),E=x.isEnd(t,u,g);ue.splitNodes(t,{at:u,match:l,mode:s,voids:i});var S=p.unref();u=E?U.next(S):S}else return}var D=U.parent(u),M=u[u.length-1];if(!(!i&&x.void(t,{at:D}))){if(a){var b=[],w=U.levels(D);PO(t,()=>{var P=function(){var R=D.concat(M);M++;var F={type:"insert_node",path:R,node:V};t.apply(F),u=U.next(u),b.push(F),xe.isText?w.push(...Array.from(ge.nodes(V),N=>{var[,Y]=N;return R.concat(Y)})):w.push(R)};for(var V of n)P()},()=>{gv(t,w,P=>{var V=P;for(var _ of b)if(U.operationCanTransformPath(_)&&(V=U.transform(V,_),!V))return null;return V})})}else for(var L of n){var O=D.concat(M);M++,t.apply({type:"insert_node",path:O,node:L}),u=U.next(u)}if(u=U.previous(u),f){var H=x.end(t,u);H&&ue.select(t,H)}}}})},Gk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var{at:r=t.selection,mode:o="lowest",voids:i=!1}=n,{match:s}=n;if(s==null&&(s=U.isPath(r)?oo(t,r):M=>De.isElement(M)&&x.isBlock(t,M)),!!r){var a=x.nodes(t,{at:r,match:s,mode:o,voids:i}),u=Array.from(a,M=>{var[,b]=M;return x.pathRef(t,b)});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 d=x.node(t,U.parent(f)),[h,v]=d,m=f[f.length-1],{length:g}=h.children;if(g===1){var p=U.next(v);ue.moveNodes(t,{at:f,to:p,voids:i}),ue.removeNodes(t,{at:v,voids:i})}else if(m===0)ue.moveNodes(t,{at:f,to:v,voids:i});else if(m===g-1){var E=U.next(v);ue.moveNodes(t,{at:f,to:E,voids:i})}else{var S=U.next(f),D=U.next(v);ue.splitNodes(t,{at:S,voids:i}),ue.moveNodes(t,{at:f,to:D,voids:i})}}}})},Kk=["text"],Yk=["children"],Mv=(e,t)=>{if(De.isElement(t)){var n=t;return x.isVoid(e,t)?!0:n.children.length===1?Mv(e,n.children[0]):!1}else return!x.isEditor(t)},Xk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var{match:r,at:o=t.selection}=n,{hanging:i=!1,voids:s=!1,mode:a="lowest"}=n;if(o){if(r==null)if(U.isPath(o)){var[u]=x.parent(t,o);r=P=>u.children.includes(P)}else r=P=>De.isElement(P)&&x.isBlock(t,P);if(!i&&te.isRange(o)&&(o=x.unhangRange(t,o,{voids:s})),te.isRange(o))if(te.isCollapsed(o))o=o.anchor;else{var[,l]=te.edges(o),f=x.pointRef(t,l);ue.delete(t,{at:o}),o=f.unref(),n.at==null&&ue.select(t,o)}var[d]=x.nodes(t,{at:o,match:r,voids:s,mode:a}),h=x.previous(t,{at:o,match:r,voids:s,mode:a});if(!(!d||!h)){var[v,m]=d,[g,p]=h;if(!(m.length===0||p.length===0)){var E=U.next(p),S=U.common(m,p),D=U.isSibling(m,p),M=Array.from(x.levels(t,{at:m}),P=>{var[V]=P;return V}).slice(S.length).slice(0,-1),b=x.above(t,{at:m,mode:"highest",match:P=>M.includes(P)&&Mv(t,P)}),w=b&&x.pathRef(t,b[1]),L,O;if(xe.isText(v)&&xe.isText(g)){var H=Yn(v,Kk);O=g.text.length,L=H}else if(De.isElement(v)&&De.isElement(g)){var H=Yn(v,Yk);O=g.children.length,L=H}else throw new Error("Cannot merge the node at path [".concat(m,"] with the previous sibling because it is not the same kind: ").concat(Nt.stringify(v)," ").concat(Nt.stringify(g)));D||ue.moveNodes(t,{at:m,to:E,voids:s}),w&&ue.removeNodes(t,{at:w.current,voids:s}),x.shouldMergeNodesRemovePrevNode(t,h,d)?ue.removeNodes(t,{at:p,voids:s}):t.apply({type:"merge_node",path:E,position:O,properties:L}),w&&w.unref()}}}})},Jk=(e,t)=>{x.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:s}=t;if(r){s==null&&(s=U.isPath(r)?oo(e,r):v=>De.isElement(v)&&x.isBlock(e,v));var a=x.pathRef(e,n),u=x.nodes(e,{at:r,match:s,mode:o,voids:i}),l=Array.from(u,v=>{var[,m]=v;return x.pathRef(e,m)});for(var f of l){var d=f.unref(),h=a.current;d.length!==0&&e.apply({type:"move_node",path:d,newPath:h}),a.current&&U.isSibling(h,d)&&U.isAfter(h,d)&&(a.current=U.next(a.current))}a.unref()}})},Qk=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:s=t.selection,match:a}=n;if(s){a==null&&(a=U.isPath(s)?oo(t,s):v=>De.isElement(v)&&x.isBlock(t,v)),!r&&te.isRange(s)&&(s=x.unhangRange(t,s,{voids:o}));var u=x.nodes(t,{at:s,match:a,mode:i,voids:o}),l=Array.from(u,v=>{var[,m]=v;return x.pathRef(t,m)});for(var f of l){var d=f.unref();if(d){var[h]=x.node(t,d);t.apply({type:"remove_node",path:d,node:h})}}}})},eP=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};x.withoutNormalizing(t,()=>{var{match:o,at:i=t.selection,compare:s,merge:a}=r,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:d=!1}=r;if(i){if(o==null&&(o=U.isPath(i)?oo(t,i):O=>De.isElement(O)&&x.isBlock(t,O)),!u&&te.isRange(i)&&(i=x.unhangRange(t,i,{voids:d})),f&&te.isRange(i)){if(te.isCollapsed(i)&&x.leaf(t,i.anchor)[0].text.length>0)return;var h=x.rangeRef(t,i,{affinity:"inward"}),[v,m]=te.edges(i),g=l==="lowest"?"lowest":"highest",p=x.isEnd(t,m,m.path);ue.splitNodes(t,{at:m,match:o,mode:g,voids:d,always:!p});var E=x.isStart(t,v,v.path);ue.splitNodes(t,{at:v,match:o,mode:g,voids:d,always:!E}),i=h.unref(),r.at==null&&ue.select(t,i)}s||(s=(O,H)=>O!==H);for(var[S,D]of x.nodes(t,{at:i,match:o,mode:l,voids:d})){var M={},b={};if(D.length!==0){var w=!1;for(var L in n)L==="children"||L==="text"||s(n[L],S[L])&&(w=!0,S.hasOwnProperty(L)&&(M[L]=S[L]),a?n[L]!=null&&(b[L]=a(S[L],n[L])):n[L]!=null&&(b[L]=n[L]));w&&t.apply({type:"set_node",path:D,properties:M,newProperties:b})}}}})},tP=(e,t)=>{if(te.isCollapsed(t))return t.anchor;var[,n]=te.edges(t),r=x.pointRef(e,n);return ue.delete(e,{at:t}),r.unref()},nP=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var{mode:r="lowest",voids:o=!1}=n,{match:i,at:s=t.selection,height:a=0,always:u=!1}=n;if(i==null&&(i=ne=>De.isElement(ne)&&x.isBlock(t,ne)),te.isRange(s)&&(s=tP(t,s)),U.isPath(s)){var l=s,f=x.point(t,l),[d]=x.parent(t,l);i=ne=>ne===d,a=f.path.length-l.length+1,s=f,u=!0}if(s){var h=x.pointRef(t,s,{affinity:"backward"}),v;try{var[m]=x.nodes(t,{at:s,match:i,mode:r,voids:o});if(!m)return;var g=x.void(t,{at:s,mode:"highest"}),p=0;if(!o&&g){var[E,S]=g;if(De.isElement(E)&&t.isInline(E)){var D=x.after(t,S);if(!D){var M={text:""},b=U.next(S);ue.insertNodes(t,M,{at:b,voids:o}),D=x.point(t,b)}s=D,u=!0}var w=s.path.length-S.length;a=w+1,u=!0}v=x.pointRef(t,s);var L=s.path.length-a,[,O]=m,H=s.path.slice(0,L),P=a===0?s.offset:s.path[L]+p;for(var[V,_]of x.levels(t,{at:H,reverse:!0,voids:o})){var R=!1;if(_.length<O.length||_.length===0||!o&&De.isElement(V)&&x.isVoid(t,V))break;var F=h.current,N=x.isEnd(t,F,_);if(u||!h||!x.isEdge(t,F,_)){R=!0;var Y=ge.extractProps(V);t.apply({type:"split_node",path:_,position:P,properties:Y})}P=_[_.length-1]+(R||N?1:0)}if(n.at==null){var I=v.current||x.end(t,[]);ue.select(t,I)}}finally{var Q;h.unref(),(Q=v)===null||Q===void 0||Q.unref()}}})},rP=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var o={};for(var i of n)o[i]=null;ue.setNodes(t,o,r)},oP=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};x.withoutNormalizing(t,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{at:s=t.selection,match:a}=n;if(s){a==null&&(a=U.isPath(s)?oo(t,s):v=>De.isElement(v)&&x.isBlock(t,v)),U.isPath(s)&&(s=x.range(t,s));var u=te.isRange(s)?x.rangeRef(t,s):null,l=x.nodes(t,{at:s,match:a,mode:r,voids:i}),f=Array.from(l,v=>{var[,m]=v;return x.pathRef(t,m)}).reverse(),d=function(){var m=h.unref(),[g]=x.node(t,m),p=x.range(t,m);o&&u&&(p=te.intersection(u.current,p)),ue.liftNodes(t,{at:p,match:E=>De.isAncestor(g)&&g.children.includes(E),voids:i})};for(var h of f)d();u&&u.unref()}})};function Bv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bv(Object(n),!0).forEach(function(r){qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var iP=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};x.withoutNormalizing(t,()=>{var{mode:o="lowest",split:i=!1,voids:s=!1}=r,{match:a,at:u=t.selection}=r;if(u){if(a==null&&(U.isPath(u)?a=oo(t,u):t.isInline(n)?a=p=>De.isElement(p)&&x.isInline(t,p)||xe.isText(p):a=p=>De.isElement(p)&&x.isBlock(t,p)),i&&te.isRange(u)){var[l,f]=te.edges(u),d=x.rangeRef(t,u,{affinity:"inward"});ue.splitNodes(t,{at:f,match:a,voids:s}),ue.splitNodes(t,{at:l,match:a,voids:s}),u=d.unref(),r.at==null&&ue.select(t,u)}var h=Array.from(x.nodes(t,{at:u,match:t.isInline(n)?p=>De.isElement(p)&&x.isBlock(t,p):p=>x.isEditor(p),mode:"lowest",voids:s})),v=function(){var E=te.isRange(u)?te.intersection(u,x.range(t,g)):u;if(!E)return 0;var S=Array.from(x.nodes(t,{at:E,match:a,mode:o,voids:s}));if(S.length>0){var[D]=S,M=S[S.length-1],[,b]=D,[,w]=M;if(b.length===0&&w.length===0)return 0;var L=U.equals(b,w)?U.parent(b):U.common(b,w),O=x.range(t,b,w),H=x.node(t,L),[P]=H,V=L.length+1,_=U.next(w.slice(0,V)),R=Tv(Tv({},n),{},{children:[]});ue.insertNodes(t,R,{at:_,voids:s}),ue.moveNodes(t,{at:O,match:F=>De.isAncestor(P)&&P.children.includes(F),to:_.concat(0),voids:s})}},m;for(var[,g]of h)m=v()}})},sP=()=>{var e={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),o=0;o<n;o++)r[o]=arguments[o];return MO(e,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return _O(e,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return NO(e,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return zO(e,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return $O(e,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return TO(e,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return JO(e,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ek(e,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return zk(e,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return QO(e,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return nk(e,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return AO(e,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Tk(e,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return BO(e,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return FO(e,...r)},above:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return IO(e,...r)},after:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return RO(e,...r)},before:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return jO(e,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return $k(e,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Nk(e,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Uk(e,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return UO(e,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return WO(e,...r)},end:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return HO(e,...r)},first:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return VO(e,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return qO(e,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return hk(e,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return GO(e,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return KO(e,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return YO(e,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return XO(e,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Zk(e,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return rk(e,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ok(e,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ik(e,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return sk(e,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ak(e,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return uk(e,...r)},last:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return lk(e,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ck(e,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return fk(e,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Gk(e,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Xk(e,...r)},move:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Wk(e,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Jk(e,...r)},next:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return gk(e,...r)},node:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return vk(e,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return mk(e,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yk(e,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return bk(e,...r)},path:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return wk(e,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ck(e,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ek(e,...r)},point:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Sk(e,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Dk(e,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return xk(e,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Lk(e,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ok(e,...r)},range:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Mk(e,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return kk(e,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Pk(e,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Qk(e,...r)},select:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Hk(e,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return eP(e,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ak(e,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Vk(e,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return qk(e,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return nP(e,...r)},start:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Fk(e,...r)},string:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ik(e,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return _k(e,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return rP(e,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return oP(e,...r)},void:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return ZO(e,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Rk(e,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return iP(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return jk(e,...r)}};return e};/*!
|
77
352
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
78
353
|
*
|
79
354
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
80
355
|
* Released under the MIT License.
|
81
|
-
*/function al(t){return Object.prototype.toString.call(t)==="[object Object]"}function lm(t){var e,n;return al(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(al(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var cm={isHistory(t){return lm(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Zt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Zt.isOperationList(t.undos[0].operations))}},wo=new WeakMap,ir=new WeakMap,mn={isHistoryEditor(t){return cm.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=mn.isMerging(t);ir.set(t,!0),e(),ir.set(t,n)},withoutMerging(t,e){var n=mn.isMerging(t);ir.set(t,!1),e(),ir.set(t,n)},withoutSaving(t,e){var n=mn.isSaving(t);wo.set(t,!1),e(),wo.set(t,n)}},fm=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),mn.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];mn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var s=o.operations.map(Zt.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=mn.isSaving(e),c=mn.isMerging(e);if(l==null&&(l=pm(r)),l){if(c==null&&(a==null?c=!1:i.length!==0?c=!0:c=dm(r,u)),a&&c)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},dm=(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)),pm=(t,e)=>t.type!=="set_selection",hm=mm,ul="֑-߿יִ-﷽ﹰ-ﻼ",ll="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",vm=new RegExp("^[^"+ll+"]*["+ul+"]"),gm=new RegExp("^[^"+ul+"]*["+ll+"]");function mm(t){return t=String(t||""),vm.test(t)?"rtl":gm.test(t)?"ltr":"neutral"}const cl=Or(hm);function ym(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bo=ym,Cm=typeof We=="object"&&We&&We.Object===Object&&We,Dm=Cm,Em=Dm,bm=typeof self=="object"&&self&&self.Object===Object&&self,wm=Em||bm||Function("return this")(),fl=wm,Bm=fl,xm=function(){return Bm.Date.now()},Sm=xm,Am=/\s/;function Lm(t){for(var e=t.length;e--&&Am.test(t.charAt(e)););return e}var Om=Lm,Pm=Om,Fm=/^\s+/;function Mm(t){return t&&t.slice(0,Pm(t)+1).replace(Fm,"")}var km=Mm,Tm=fl,Im=Tm.Symbol,dl=Im,pl=dl,hl=Object.prototype,jm=hl.hasOwnProperty,Nm=hl.toString,or=pl?pl.toStringTag:void 0;function _m(t){var e=jm.call(t,or),n=t[or];try{t[or]=void 0;var r=!0}catch{}var i=Nm.call(t);return r&&(e?t[or]=n:delete t[or]),i}var zm=_m,Wm=Object.prototype,Um=Wm.toString;function Hm(t){return Um.call(t)}var Rm=Hm,vl=dl,Vm=zm,qm=Rm,Gm="[object Null]",Zm="[object Undefined]",gl=vl?vl.toStringTag:void 0;function Ym(t){return t==null?t===void 0?Zm:Gm:gl&&gl in Object(t)?Vm(t):qm(t)}var Km=Ym;function Xm(t){return t!=null&&typeof t=="object"}var Jm=Xm,Qm=Km,$m=Jm,ey="[object Symbol]";function ty(t){return typeof t=="symbol"||$m(t)&&Qm(t)==ey}var ny=ty,ry=km,ml=Bo,iy=ny,yl=NaN,oy=/^[-+]0x[0-9a-f]+$/i,sy=/^0b[01]+$/i,ay=/^0o[0-7]+$/i,uy=parseInt;function ly(t){if(typeof t=="number")return t;if(iy(t))return yl;if(ml(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ml(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ry(t);var n=sy.test(t);return n||ay.test(t)?uy(t.slice(2),n?2:8):oy.test(t)?yl:+t}var cy=ly,fy=Bo,xo=Sm,Cl=cy,dy="Expected a function",py=Math.max,hy=Math.min;function vy(t,e,n){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(dy);e=Cl(e)||0,fy(n)&&(c=!!n.leading,p="maxWait"in n,o=p?py(Cl(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function g(w){var A=r,F=i;return r=i=void 0,l=w,s=t.apply(F,A),s}function y(w){return l=w,a=setTimeout(D,e),c?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?hy(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 Dl=vy;const gy=Or(Dl);var my=Dl,yy=Bo,Cy="Expected a function";function Dy(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Cy);return yy(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),my(t,e,{leading:r,maxWait:e,trailing:i})}var Ey=Dy;const by=Or(Ey),El=t=>typeof t=="object"&&t!=null&&t.nodeType===1,bl=(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 bl(n.overflowY,e)||bl(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,wy=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},wl=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,p=typeof l=="function"?l:K=>K!==l;if(!El(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,g=[];let y=t;for(;El(y)&&p(y);){if(y=wy(y),y===h){g.push(y);break}y!=null&&y===document.body&&So(y)&&!So(document.documentElement)||y!=null&&So(y,c)&&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},By=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function xy(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(wl(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:s}of wl(t,By(e))){const a=o-n.top+n.bottom,u=s-n.left+n.right;i.scroll({top:a,left:u,behavior:r})}}var yn=[],Sy=function(){return yn.some(function(t){return t.activeTargets.length>0})},Ay=function(){return yn.some(function(t){return t.skippedTargets.length>0})},Bl="ResizeObserver loop completed with undelivered notifications.",Ly=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 Cn=function(t){return Object.freeze(t)},Oy=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Cn(this)}return t}(),xl=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,Cn(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},Sl=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)},Al=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)},Py=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,Ll=/auto|scroll/,Fy=/^tb|vertical/,My=/msie|trident/i.test(ar.navigator&&ar.navigator.userAgent),Pt=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 Oy((n?e:t)||0,(n?t:e)||0)},Ol=Cn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new xl(0,0,0,0)}),Pl=function(t,e){if(e===void 0&&(e=!1),Kr.has(t)&&!e)return Kr.get(t);if(Sl(t))return Kr.set(t,Ol),Ol;var n=getComputedStyle(t),r=Ao(t)&&t.ownerSVGElement&&t.getBBox(),i=!My&&n.boxSizing==="border-box",o=Fy.test(n.writingMode||""),s=!r&&Ll.test(n.overflowY||""),a=!r&&Ll.test(n.overflowX||""),u=r?0:Pt(n.paddingTop),l=r?0:Pt(n.paddingRight),c=r?0:Pt(n.paddingBottom),p=r?0:Pt(n.paddingLeft),h=r?0:Pt(n.borderTopWidth),g=r?0:Pt(n.borderRightWidth),y=r?0:Pt(n.borderBottomWidth),v=r?0:Pt(n.borderLeftWidth),d=p+l,D=u+c,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:Pt(n.width)-w-E,R=r?r.height:Pt(n.height)-A-O,P=F+d+E+B,z=R+D+O+b,I=Cn({devicePixelContentBoxSize:Mn(Math.round(F*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:Mn(P,z,o),contentBoxSize:Mn(F,R,o),contentRect:new xl(p,u,F,R)});return Kr.set(t,I),I},Fl=function(t,e,n){var r=Pl(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}},ky=function(){function t(e){var n=Pl(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Cn([n.borderBoxSize]),this.contentBoxSize=Cn([n.contentBoxSize]),this.devicePixelContentBoxSize=Cn([n.devicePixelContentBoxSize])}return t}(),Ml=function(t){if(Sl(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Ty=function(){var t=1/0,e=[];yn.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(l){var c=new ky(l.target),p=Ml(l.target);a.push(c),l.lastReportedSize=Fl(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},kl=function(t){yn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ml(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Iy=function(){var t=0;for(kl(t);Sy();)t=Ty(),kl(t);return Ay()&&Ly(),t>0},Lo,Tl=[],jy=function(){return Tl.splice(0).forEach(function(t){return t()})},Ny=function(t){if(!Lo){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return jy()}).observe(n,r),Lo=function(){n.textContent="".concat(e?e--:e++)}}Tl.push(t),Lo()},_y=function(t){Ny(function(){requestAnimationFrame(t)})},Xr=0,zy=function(){return!!Xr},Wy=250,Uy={attributes:!0,characterData:!0,childList:!0,subtree:!0},Il=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],jl=function(t){return t===void 0&&(t=0),Date.now()+t},Oo=!1,Hy=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=Wy),!Oo){Oo=!0;var r=jl(e);_y(function(){var i=!1;try{i=Iy()}finally{if(Oo=!1,e=r-jl(),!zy())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,Uy)};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(),Il.forEach(function(n){return ar.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Il.forEach(function(n){return ar.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Po=new Hy,Nl=function(t){!Xr&&t>0&&Po.start(),Xr+=t,!Xr&&Po.stop()},Ry=function(t){return!Ao(t)&&!Py(t)&&getComputedStyle(t).display==="inline"},Vy=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=Fl(this.target,this.observedBox,!0);return Ry(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),qy=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Jr=new WeakMap,_l=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 qy(e,n);Jr.set(e,r)},t.observe=function(e,n,r){var i=Jr.get(e),o=i.observationTargets.length===0;_l(i.observationTargets,n)<0&&(o&&yn.push(i),i.observationTargets.push(new Vy(n,r&&r.box)),Nl(1),Po.schedule())},t.unobserve=function(e,n){var r=Jr.get(e),i=_l(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&yn.splice(yn.indexOf(r),1),r.observationTargets.splice(i,1),Nl(-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}(),Gy=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(!Al(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(!Al(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 Zy(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=Zy(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 Yy(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 Ky(t){var e=Yy(t,"string");return ur(e)==="symbol"?e:String(e)}function wt(t,e,n){return e=Ky(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fo=f.createContext(null),Yt=()=>{var t=f.useContext(Fo);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Mo,ko,zl=parseInt(f.version.split(".")[0],10),Wl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Ul=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),Dn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Xy=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Hl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Jy=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Qy=ct&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),$y=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),e0=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),t0=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 Kt=(!Jy||!Qy)&&!Xy&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",To=new WeakMap,Io=new WeakMap,Rl=new WeakMap,ei=new WeakMap,jo=new WeakMap,lr=new WeakMap,En=new WeakMap,ti=new WeakMap,ni=new WeakMap,No=new WeakMap,Xt=new WeakMap,bn=new WeakMap,cr=new WeakMap,_o=new WeakMap,zo=new WeakMap,St=new WeakMap,_t=new WeakMap,vt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Vl=new WeakMap,In=Symbol("placeholder"),ql=Symbol("mark-placeholder"),Gl=globalThis.Node,n0=globalThis.Text,Wo=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,r0=t=>$t(t)&&t.nodeType===8,Bt=t=>$t(t)&&t.nodeType===1,$t=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},Zl=t=>$t(t)&&t.nodeType===3,i0=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,o0=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]=Yl(e,i,r?"backward":"forward"),r=i<n;Bt(e)&&e.childNodes.length;){var o=r?e.childNodes.length-1:0;e=a0(e,o,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},s0=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Yl=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],o=e,s=!1,a=!1;(r0(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]},a0=(t,e,n)=>{var[r]=Yl(t,e,n);return r},Kl=t=>{var e="";if(Zl(t)&&t.nodeValue)return t.nodeValue;if(Bt(t)){for(var n of Array.from(t.childNodes))e+=Kl(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
|
82
|
-
`)}return
|
356
|
+
*/function Av(e){return Object.prototype.toString.call(e)==="[object Object]"}function aP(e){var t,n;return Av(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(Av(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var uP={isHistory(e){return aP(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||vr.isOperationList(e.redos[0].operations))&&(e.undos.length===0||vr.isOperationList(e.undos[0].operations))}},hl=new WeakMap,Zo=new WeakMap,Hr={isHistoryEditor(e){return uP.isHistory(e.history)&&x.isEditor(e)},isMerging(e){return Zo.get(e)},isSaving(e){return hl.get(e)},redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=Hr.isMerging(e);Zo.set(e,!0),t(),Zo.set(e,n)},withoutMerging(e,t){var n=Hr.isMerging(e);Zo.set(e,!1),t(),Zo.set(e,n)},withoutSaving(e,t){var n=Hr.isSaving(e);hl.set(e,!1),t(),hl.set(e,n)}},lP=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:r}=t,{redos:o}=r;if(o.length>0){var i=o[o.length-1];i.selectionBefore&&ue.setSelection(t,i.selectionBefore),Hr.withoutSaving(t,()=>{x.withoutNormalizing(t,()=>{for(var s of i.operations)t.apply(s)})}),r.redos.pop(),t.writeHistory("undos",i)}},t.undo=()=>{var{history:r}=t,{undos:o}=r;if(o.length>0){var i=o[o.length-1];Hr.withoutSaving(t,()=>{x.withoutNormalizing(t,()=>{var s=i.operations.map(vr.inverse).reverse();for(var a of s)t.apply(a);i.selectionBefore&&ue.setSelection(t,i.selectionBefore)})}),t.writeHistory("redos",i),r.undos.pop()}},t.apply=r=>{var{operations:o,history:i}=t,{undos:s}=i,a=s[s.length-1],u=a&&a.operations[a.operations.length-1],l=Hr.isSaving(t),f=Hr.isMerging(t);if(l==null&&(l=fP(r)),l){if(f==null&&(a==null?f=!1:o.length!==0?f=!0:f=cP(r,u)),a&&f)a.operations.push(r);else{var d={operations:[r],selectionBefore:t.selection};t.writeHistory("undos",d)}for(;s.length>100;)s.shift();i.redos=[]}n(r)},t.writeHistory=(r,o)=>{t.history[r].push(o)},t},cP=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&U.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&U.equals(e.path,t.path)),fP=(e,t)=>e.type!=="set_selection",dP=gP,Fv="֑-߿יִ-﷽ﹰ-ﻼ",Iv="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",pP=new RegExp("^[^"+Iv+"]*["+Fv+"]"),hP=new RegExp("^[^"+Fv+"]*["+Iv+"]");function gP(e){return e=String(e||""),pP.test(e)?"rtl":hP.test(e)?"ltr":"neutral"}const _v=hi(dP);function vP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gl=vP,mP=typeof lt=="object"&<&<.Object===Object&<,yP=mP,bP=yP,CP=typeof self=="object"&&self&&self.Object===Object&&self,EP=bP||CP||Function("return this")(),Rv=EP,wP=Rv,DP=function(){return wP.Date.now()},xP=DP,SP=/\s/;function LP(e){for(var t=e.length;t--&&SP.test(e.charAt(t)););return t}var OP=LP,kP=OP,PP=/^\s+/;function MP(e){return e&&e.slice(0,kP(e)+1).replace(PP,"")}var BP=MP,TP=Rv,AP=TP.Symbol,jv=AP,Nv=jv,zv=Object.prototype,FP=zv.hasOwnProperty,IP=zv.toString,Go=Nv?Nv.toStringTag:void 0;function _P(e){var t=FP.call(e,Go),n=e[Go];try{e[Go]=void 0;var r=!0}catch{}var o=IP.call(e);return r&&(t?e[Go]=n:delete e[Go]),o}var RP=_P,jP=Object.prototype,NP=jP.toString;function zP(e){return NP.call(e)}var $P=zP,$v=jv,UP=RP,WP=$P,HP="[object Null]",VP="[object Undefined]",Uv=$v?$v.toStringTag:void 0;function qP(e){return e==null?e===void 0?VP:HP:Uv&&Uv in Object(e)?UP(e):WP(e)}var ZP=qP;function GP(e){return e!=null&&typeof e=="object"}var KP=GP,YP=ZP,XP=KP,JP="[object Symbol]";function QP(e){return typeof e=="symbol"||XP(e)&&YP(e)==JP}var eM=QP,tM=BP,Wv=gl,nM=eM,Hv=NaN,rM=/^[-+]0x[0-9a-f]+$/i,oM=/^0b[01]+$/i,iM=/^0o[0-7]+$/i,sM=parseInt;function aM(e){if(typeof e=="number")return e;if(nM(e))return Hv;if(Wv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Wv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=tM(e);var n=oM.test(e);return n||iM.test(e)?sM(e.slice(2),n?2:8):rM.test(e)?Hv:+e}var uM=aM,lM=gl,vl=xP,Vv=uM,cM="Expected a function",fM=Math.max,dM=Math.min;function pM(e,t,n){var r,o,i,s,a,u,l=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(cM);t=Vv(t)||0,lM(n)&&(f=!!n.leading,d="maxWait"in n,i=d?fM(Vv(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function v(w){var L=r,O=o;return r=o=void 0,l=w,s=e.apply(O,L),s}function m(w){return l=w,a=setTimeout(E,t),f?v(w):s}function g(w){var L=w-u,O=w-l,H=t-L;return d?dM(H,i-O):H}function p(w){var L=w-u,O=w-l;return u===void 0||L>=t||L<0||d&&O>=i}function E(){var w=vl();if(p(w))return S(w);a=setTimeout(E,g(w))}function S(w){return a=void 0,h&&r?v(w):(r=o=void 0,s)}function D(){a!==void 0&&clearTimeout(a),l=0,r=u=o=a=void 0}function M(){return a===void 0?s:S(vl())}function b(){var w=vl(),L=p(w);if(r=arguments,o=this,u=w,L){if(a===void 0)return m(u);if(d)return clearTimeout(a),a=setTimeout(E,t),v(u)}return a===void 0&&(a=setTimeout(E,t)),s}return b.cancel=D,b.flush=M,b}var qv=pM;const hM=hi(qv);var gM=qv,vM=gl,mM="Expected a function";function yM(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(mM);return vM(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),gM(e,t,{leading:r,maxWait:t,trailing:o})}var bM=yM;const CM=hi(bM),Zv=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Gv=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ml=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Gv(n.overflowY,t)||Gv(n.overflowX,t)||(r=>{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},Ss=(e,t,n,r,o,i,s,a)=>i<e&&s>t||i>e&&s<t?0:i<=e&&a<=n||s>=t&&a>=n?i-e-r:s>t&&a<n||i<e&&a>n?s-t+o:0,EM=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},Kv=(e,t)=>{var n,r,o,i;if(typeof document>"u")return[];const{scrollMode:s,block:a,inline:u,boundary:l,skipOverflowHiddenElements:f}=t,d=typeof l=="function"?l:Y=>Y!==l;if(!Zv(e))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,v=[];let m=e;for(;Zv(m)&&d(m);){if(m=EM(m),m===h){v.push(m);break}m!=null&&m===document.body&&ml(m)&&!ml(document.documentElement)||m!=null&&ml(m,f)&&v.push(m)}const g=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,p=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:E,scrollY:S}=window,{height:D,width:M,top:b,right:w,bottom:L,left:O}=e.getBoundingClientRect(),{top:H,right:P,bottom:V,left:_}=(Y=>{const I=window.getComputedStyle(Y);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(e);let R=a==="start"||a==="nearest"?b-H:a==="end"?L+V:b+D/2-H+V,F=u==="center"?O+M/2-_+P:u==="end"?w+P:O-_;const N=[];for(let Y=0;Y<v.length;Y++){const I=v[Y],{height:Q,width:ne,top:k,right:T,bottom:Z,left:$}=I.getBoundingClientRect();if(s==="if-needed"&&b>=0&&O>=0&&L<=p&&w<=g&&b>=k&&L<=Z&&O>=$&&w<=T)return N;const K=getComputedStyle(I),G=parseInt(K.borderLeftWidth,10),y=parseInt(K.borderTopWidth,10),z=parseInt(K.borderRightWidth,10),W=parseInt(K.borderBottomWidth,10);let B=0,X=0;const ee="offsetWidth"in I?I.offsetWidth-I.clientWidth-G-z:0,j="offsetHeight"in I?I.offsetHeight-I.clientHeight-y-W:0,se="offsetWidth"in I?I.offsetWidth===0?0:ne/I.offsetWidth:0,ae="offsetHeight"in I?I.offsetHeight===0?0:Q/I.offsetHeight:0;if(h===I)B=a==="start"?R:a==="end"?R-p:a==="nearest"?Ss(S,S+p,p,y,W,S+R,S+R+D,D):R-p/2,X=u==="start"?F:u==="center"?F-g/2:u==="end"?F-g:Ss(E,E+g,g,G,z,E+F,E+F+M,M),B=Math.max(0,B+S),X=Math.max(0,X+E);else{B=a==="start"?R-k-y:a==="end"?R-Z+W+j:a==="nearest"?Ss(k,Z,Q,y,W+j,R,R+D,D):R-(k+Q/2)+j/2,X=u==="start"?F-$-G:u==="center"?F-($+ne/2)+ee/2:u==="end"?F-T+z+ee:Ss($,T,ne,G,z+ee,F,F+M,M);const{scrollLeft:fe,scrollTop:he}=I;B=ae===0?0:Math.max(0,Math.min(he+B/ae,I.scrollHeight-Q/ae+j)),X=se===0?0:Math.max(0,Math.min(fe+X/se,I.scrollWidth-ne/se+ee)),R+=he-B,F+=fe-X}N.push({el:I,top:B,left:X})}return N},wM=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function DM(e,t){if(!e.isConnected||!(o=>{let i=o;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;const n=(o=>{const i=window.getComputedStyle(o);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(Kv(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:i,left:s}of Kv(e,wM(t))){const a=i-n.top+n.bottom,u=s-n.left+n.right;o.scroll({top:a,left:u,behavior:r})}}var Vr=[],xM=function(){return Vr.some(function(e){return e.activeTargets.length>0})},SM=function(){return Vr.some(function(e){return e.skippedTargets.length>0})},Yv="ResizeObserver loop completed with undelivered notifications.",LM=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Yv}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Yv),window.dispatchEvent(e)},Ko;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ko||(Ko={}));var qr=function(e){return Object.freeze(e)},OM=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,qr(this)}return e}(),Xv=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,qr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,s=t.bottom,a=t.left,u=t.width,l=t.height;return{x:n,y:r,top:o,right:i,bottom:s,left:a,width:u,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),yl=function(e){return e instanceof SVGElement&&"getBBox"in e},Jv=function(e){if(yl(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},Qv=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},kM=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Yo=typeof window<"u"?window:{},Ls=new WeakMap,em=/auto|scroll/,PM=/^tb|vertical/,MM=/msie|trident/i.test(Yo.navigator&&Yo.navigator.userAgent),zn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new OM((n?t:e)||0,(n?e:t)||0)},tm=qr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Xv(0,0,0,0)}),nm=function(e,t){if(t===void 0&&(t=!1),Ls.has(e)&&!t)return Ls.get(e);if(Jv(e))return Ls.set(e,tm),tm;var n=getComputedStyle(e),r=yl(e)&&e.ownerSVGElement&&e.getBBox(),o=!MM&&n.boxSizing==="border-box",i=PM.test(n.writingMode||""),s=!r&&em.test(n.overflowY||""),a=!r&&em.test(n.overflowX||""),u=r?0:zn(n.paddingTop),l=r?0:zn(n.paddingRight),f=r?0:zn(n.paddingBottom),d=r?0:zn(n.paddingLeft),h=r?0:zn(n.borderTopWidth),v=r?0:zn(n.borderRightWidth),m=r?0:zn(n.borderBottomWidth),g=r?0:zn(n.borderLeftWidth),p=d+l,E=u+f,S=g+v,D=h+m,M=a?e.offsetHeight-D-e.clientHeight:0,b=s?e.offsetWidth-S-e.clientWidth:0,w=o?p+S:0,L=o?E+D:0,O=r?r.width:zn(n.width)-w-b,H=r?r.height:zn(n.height)-L-M,P=O+p+b+S,V=H+E+M+D,_=qr({devicePixelContentBoxSize:so(Math.round(O*devicePixelRatio),Math.round(H*devicePixelRatio),i),borderBoxSize:so(P,V,i),contentBoxSize:so(O,H,i),contentRect:new Xv(d,u,O,H)});return Ls.set(e,_),_},rm=function(e,t,n){var r=nm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case Ko.DEVICE_PIXEL_CONTENT_BOX:return s;case Ko.BORDER_BOX:return o;default:return i}},BM=function(){function e(t){var n=nm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=qr([n.borderBoxSize]),this.contentBoxSize=qr([n.contentBoxSize]),this.devicePixelContentBoxSize=qr([n.devicePixelContentBoxSize])}return e}(),om=function(e){if(Jv(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},TM=function(){var e=1/0,t=[];Vr.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(l){var f=new BM(l.target),d=om(l.target);a.push(f),l.lastReportedSize=rm(l.target,l.observedBox),d<e&&(e=d)}),t.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},im=function(e){Vr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(om(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},AM=function(){var e=0;for(im(e);xM();)e=TM(),im(e);return SM()&&LM(),e>0},bl,sm=[],FM=function(){return sm.splice(0).forEach(function(e){return e()})},IM=function(e){if(!bl){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return FM()}).observe(n,r),bl=function(){n.textContent="".concat(t?t--:t++)}}sm.push(e),bl()},_M=function(e){IM(function(){requestAnimationFrame(e)})},Os=0,RM=function(){return!!Os},jM=250,NM={attributes:!0,characterData:!0,childList:!0,subtree:!0},am=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],um=function(e){return e===void 0&&(e=0),Date.now()+e},Cl=!1,zM=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=jM),!Cl){Cl=!0;var r=um(t);_M(function(){var o=!1;try{o=AM()}finally{if(Cl=!1,t=r-um(),!RM())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,NM)};document.body?n():Yo.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),am.forEach(function(n){return Yo.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),am.forEach(function(n){return Yo.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),El=new zM,lm=function(e){!Os&&e>0&&El.start(),Os+=e,!Os&&El.stop()},$M=function(e){return!yl(e)&&!kM(e)&&getComputedStyle(e).display==="inline"},UM=function(){function e(t,n){this.target=t,this.observedBox=n||Ko.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=rm(this.target,this.observedBox,!0);return $M(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),WM=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),ks=new WeakMap,cm=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ps=function(){function e(){}return e.connect=function(t,n){var r=new WM(t,n);ks.set(t,r)},e.observe=function(t,n,r){var o=ks.get(t),i=o.observationTargets.length===0;cm(o.observationTargets,n)<0&&(i&&Vr.push(o),o.observationTargets.push(new UM(n,r&&r.box)),lm(1),El.schedule())},e.unobserve=function(t,n){var r=ks.get(t),o=cm(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Vr.splice(Vr.indexOf(r),1),r.observationTargets.splice(o,1),lm(-1))},e.disconnect=function(t){var n=this,r=ks.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),HM=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ps.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qv(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ps.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Qv(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ps.unobserve(this,t)},e.prototype.disconnect=function(){Ps.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function VM(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ao(e,t){if(e==null)return{};var n=VM(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xo(e){"@babel/helpers - typeof";return Xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(e)}function qM(e,t){if(Xo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZM(e){var t=qM(e,"string");return Xo(t)==="symbol"?t:String(t)}function On(e,t,n){return t=ZM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wl=c.createContext(null),mr=()=>{var e=c.useContext(wl);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Dl,xl,fm=parseInt(c.version.split(".")[0],10),dm=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,pm=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Zt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),uo=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Zr=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),GM=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),hm=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),KM=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),YM=Zt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),XM=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),JM=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),QM=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Ms=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Dl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Dl!==void 0&&Dl[1]&&parseInt((xl=navigator.userAgent.match(/Version\/(\d+)/))===null||xl===void 0?void 0:xl[1],10)<17);var yr=(!KM||!YM)&&!GM&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Sl=new WeakMap,Ll=new WeakMap,gm=new WeakMap,Bs=new WeakMap,Ol=new WeakMap,Jo=new WeakMap,Gr=new WeakMap,Ts=new WeakMap,As=new WeakMap,kl=new WeakMap,br=new WeakMap,Kr=new WeakMap,Qo=new WeakMap,Pl=new WeakMap,Ml=new WeakMap,Mn=new WeakMap,Jn=new WeakMap,nn=new WeakMap,Cr=new WeakMap,Er=new WeakMap,vm=new WeakMap,lo=Symbol("placeholder"),mm=Symbol("mark-placeholder"),ym=globalThis.Node,eB=globalThis.Text,Bl=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,tB=e=>wr(e)&&e.nodeType===8,kn=e=>wr(e)&&e.nodeType===1,wr=e=>{var t=Bl(e);return!!t&&e instanceof t.Node},Tl=e=>{var t=e&&e.anchorNode&&Bl(e.anchorNode);return!!t&&e instanceof t.Selection},bm=e=>wr(e)&&e.nodeType===3,nB=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,rB=e=>{var[t,n]=e;if(kn(t)&&t.childNodes.length){var r=n===t.childNodes.length,o=r?n-1:n;for([t,o]=Cm(t,o,r?"backward":"forward"),r=o<n;kn(t)&&t.childNodes.length;){var i=r?t.childNodes.length-1:0;t=iB(t,i,r?"backward":"forward")}n=r&&t.textContent!=null?t.textContent.length:0}return[t,n]},oB=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Cm=(e,t,n)=>{for(var{childNodes:r}=e,o=r[t],i=t,s=!1,a=!1;(tB(o)||kn(o)&&o.childNodes.length===0||kn(o)&&o.getAttribute("contenteditable")==="false")&&!(s&&a);){if(i>=r.length){s=!0,i=t-1,n="backward";continue}if(i<0){a=!0,i=t+1,n="forward";continue}o=r[i],t=i,i+=n==="forward"?1:-1}return[o,t]},iB=(e,t,n)=>{var[r]=Cm(e,t,n);return r},Em=e=>{var t="";if(bm(e)&&e.nodeValue)return e.nodeValue;if(kn(e)){for(var n of Array.from(e.childNodes))t+=Em(n);var r=getComputedStyle(e).getPropertyValue("display");(r==="block"||r==="list"||e.tagName==="BR")&&(t+=`
|
357
|
+
`)}return t},sB=/data-slate-fragment="(.+?)"/m,aB=e=>{var t=e.getData("text/html"),[,n]=t.match(sB)||[];return n},ei=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Al=(e,t,n)=>{var{target:r}=t;if(kn(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:o}=re.getWindow(e);if(o.contains(r))return re.hasDOMNode(e,r,{editable:!0});var i=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!i||i===t?!1:Al(e,i,n)},uB=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(n=e.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var t,n,r;e=(r=e)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return e},wm=(e,t)=>!!(e.compareDocumentPosition(t)&ym.DOCUMENT_POSITION_PRECEDING),lB=(e,t)=>!!(e.compareDocumentPosition(t)&ym.DOCUMENT_POSITION_FOLLOWING),cB=0;class fB{constructor(){On(this,"id",void 0),this.id="".concat(cB++)}}var re={androidPendingDiffs:e=>nn.get(e),androidScheduleFlush:e=>{var t;(t=Ml.get(e))===null||t===void 0||t()},blur:e=>{var t=re.toDOMNode(e,e),n=re.findDocumentOrShadowRoot(e);br.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,n=re.findDocumentOrShadowRoot(e),r=ei(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&ue.deselect(e)},findDocumentOrShadowRoot:e=>{var t=re.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:n,clientY:r,target:o}=t;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=re.toSlateNode(e,t.target),s=re.findPath(e,i);if(De.isElement(i)&&x.isVoid(e,i)){var a=o.getBoundingClientRect(),u=e.isInline(i)?n-a.left<a.left+a.width-n:r-a.top<a.top+a.height-r,l=x.point(e,s,{edge:u?"start":"end"}),f=u?x.before(e,l):x.after(e,l);if(f){var d=x.range(e,f);return d}}var h,{document:v}=re.getWindow(e);if(v.caretRangeFromPoint)h=v.caretRangeFromPoint(n,r);else{var m=v.caretPositionFromPoint(n,r);m&&(h=v.createRange(),h.setStart(m.offsetNode,m.offset),h.setEnd(m.offsetNode,m.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var g=re.toSlateRange(e,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(e,t)=>{var n=Ts.get(t);return n||(n=new fB,Ts.set(t,n)),n},findPath:(e,t)=>{for(var n=[],r=t;;){var o=Ll.get(r);if(o==null){if(x.isEditor(r))return n;break}var i=Sl.get(r);if(i==null)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(Nt.stringify(t)))},focus:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!br.get(t)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(t.operations.length>0){setTimeout(()=>{re.focus(t,{retries:n.retries-1})},10);return}var r=re.toDOMNode(t,t),o=re.findDocumentOrShadowRoot(t);if(o.activeElement!==r){if(t.selection&&o instanceof Document){var i=ei(o),s=re.toDOMRange(t,t.selection);i==null||i.removeAllRanges(),i==null||i.addRange(s)}t.selection||ue.select(t,x.start(t,[])),br.set(t,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=gm.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:o=!1}=r,i=re.toDOMNode(t,t),s;try{s=kn(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]")===i&&(!o||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&s.closest('[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>wr(t)&&re.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:n,focus:r}=t;return x.hasPath(e,n.path)&&x.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>re.hasEditableTarget(e,t)||re.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>wr(t)&&re.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Kr.get(e),isFocused:e=>!!br.get(e),isReadOnly:e=>!!kl.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(kl.get(e))return!1;var n=re.hasTarget(e,t)&&re.toSlateNode(e,t);return De.isElement(n)&&x.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n=As.get(e),r=x.isEditor(t)?Bs.get(e):n==null?void 0:n.get(re.findKey(e,t));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Nt.stringify(t)));return r},toDOMPoint:(e,t)=>{var[n]=x.node(e,t.path),r=re.toDOMNode(e,n),o;x.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",s=Array.from(r.querySelectorAll(i)),a=0,u=0;u<s.length;u++){var l=s[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:d}=f.textContent,h=l.getAttribute("data-slate-length"),v=h==null?d:parseInt(h,10),m=a+v,g=s[u+1];if(t.offset===m&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var p,E=g.childNodes[0];o=[E instanceof eB?E:g,(p=g.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(t.offset<=m){var S=Math.min(d,Math.max(0,t.offset-a));o=[f,S];break}a=m}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Nt.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:n,focus:r}=t,o=te.isBackward(t),i=re.toDOMPoint(e,n),s=te.isCollapsed(t)?i:re.toDOMPoint(e,r),a=re.getWindow(e),u=a.document.createRange(),[l,f]=o?s:i,[d,h]=o?i:s,v=kn(l)?l:l.parentElement,m=!!v.getAttribute("data-slate-zero-width"),g=kn(d)?d:d.parentElement,p=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,m?1:f),u.setEnd(d,p?1:h),u},toSlateNode:(e,t)=>{var n=kn(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Jo.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(e,t,n)=>{var{exactMatch:r,suppressThrow:o,searchDirection:i="backward"}=n,[s,a]=r?t:rB(t),u=s.parentNode,l=null,f=0;if(u){var d,h,v=re.toDOMNode(e,e),m=u.closest('[data-slate-void="true"]'),g=m&&v.contains(m)?m:null,p=u.closest('[contenteditable="false"]'),E=p&&v.contains(p)?p:null,S=u.closest("[data-slate-leaf]"),D=null;if(S){if(l=S.closest('[data-slate-node="text"]'),l){var M=re.getWindow(e),b=M.document.createRange();b.setStart(l,0),b.setEnd(s,a);var w=b.cloneContents(),L=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];L.forEach($=>{if(Zt&&!r&&$.hasAttribute("data-slate-zero-width")&&$.textContent.length>0&&$.textContext!=="\uFEFF"){$.textContent.startsWith("\uFEFF")&&($.textContent=$.textContent.slice(1));return}$.parentNode.removeChild($)}),f=w.textContent.length,D=l}}else if(g){for(var O=g.querySelectorAll("[data-slate-leaf]"),H=0;H<O.length;H++){var P=O[H];if(re.hasDOMNode(e,P)){S=P;break}}S?(l=S.closest('[data-slate-node="text"]'),D=S,f=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach($=>{f-=$.textContent.length})):f=1}else if(E){var V=$=>$?$.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],_=E.closest('[data-slate-node="element"]');if(i==="forward"){var R,F=[...V(_),...V(_==null?void 0:_.nextElementSibling)];S=(R=F.find($=>lB(E,$)))!==null&&R!==void 0?R:null}else{var N,Y=[...V(_==null?void 0:_.previousElementSibling),...V(_)];S=(N=Y.findLast($=>wm(E,$)))!==null&&N!==void 0?N:null}S&&(l=S.closest('[data-slate-node="text"]'),D=S,i==="forward"?f=0:(f=D.textContent.length,D.querySelectorAll("[data-slate-zero-width]").forEach($=>{f-=$.textContent.length})))}D&&f===D.textContent.length&&Zt&&D.getAttribute("data-slate-zero-width")==="z"&&(d=D.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||uo&&(h=D.textContent)!==null&&h!==void 0&&h.endsWith(`
|
83
358
|
|
84
|
-
`))&&
|
359
|
+
`))&&f--}if(Zt&&!l&&!r){var I=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(I&&re.hasDOMNode(e,I,{editable:!0})){var Q=re.toSlateNode(e,I),{path:ne,offset:k}=x.start(e,re.findPath(e,Q));return I.querySelector("[data-slate-leaf]")||(k=a),{path:ne,offset:k}}}if(!l){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var T=re.toSlateNode(e,l),Z=re.findPath(e,T);return{path:Z,offset:f}},toSlateRange:(e,t,n)=>{var r,{exactMatch:o,suppressThrow:i}=n,s=Tl(t)?t.anchorNode:t.startContainer,a,u,l,f,d;if(s)if(Tl(t)){if(uo&&t.rangeCount>1){l=t.focusNode;var h=t.getRangeAt(0),v=t.getRangeAt(t.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&v.startContainer instanceof HTMLTableRowElement){let w=function(L){return L.childElementCount>0?w(L.children[0]):L};var m=h.startContainer,g=v.startContainer,p=w(m.children[h.startOffset]),E=w(g.children[v.startOffset]);f=0,E.childNodes.length>0?a=E.childNodes[0]:a=E,p.childNodes.length>0?l=p.childNodes[0]:l=p,E instanceof HTMLElement?u=E.innerHTML.length:u=0}else h.startContainer===l?(a=v.endContainer,u=v.endOffset,f=h.startOffset):(a=h.startContainer,u=h.endOffset,f=v.startOffset)}else a=t.anchorNode,u=t.anchorOffset,l=t.focusNode,f=t.focusOffset;hm&&oB(a)||uo?d=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:d=t.isCollapsed}else a=t.startContainer,u=t.startOffset,l=t.endContainer,f=t.endOffset,d=t.collapsed;if(a==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));uo&&(r=l.textContent)!==null&&r!==void 0&&r.endsWith(`
|
85
360
|
|
86
|
-
`)&&
|
87
|
-
`))return
|
88
|
-
`)
|
89
|
-
`?
|
90
|
-
`:""),[o]=f.useState(i);return dr(()=>{var s=i();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),f.createElement(_0,{ref:r},o)},_0=f.memo(f.forwardRef((t,e)=>f.createElement("span",{"data-slate-string":!0,ref:e},t.children))),qo=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,i={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(i["data-slate-mark-placeholder"]=!0),f.createElement("span",j0({},i),!(ct||Wl)||!n?"\uFEFF":null,n?f.createElement("br",null):null)};function sc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ac(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var z0=ct?300:0;function W0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function uc(t){t.current&&(clearTimeout(t.current),t.current=null)}var U0=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:s=B=>f.createElement(R0,ac({},B))}=t,a=Yt(),u=f.useRef(null),l=f.useRef(null),[c,p]=f.useState(!1),h=f.useRef(null),g=f.useCallback(B=>{if(W0(u,B==null),B==null){var b;jo.delete(a),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(jo.set(a,B),!u.current){var O=window.ResizeObserver||Gy;u.current=new O(()=>{var E;(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,B)})}u.current.observe(B),l.current=B}},[l,e,a]),y=f.createElement(N0,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[In];if(f.useEffect(()=>(v?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},z0)):(uc(h),p(!1)),()=>uc(h)),[v,p]),v&&c){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Dn?"inherit":void 0},contentEditable:!1,ref:g}};y=f.createElement(f.Fragment,null,o(d),y)}var D={"data-slate-leaf":!0};return s({attributes:D,children:y,leaf:e,text:r})},H0=f.memo(U0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[In]===t.leaf[In]),R0=t=>{var{attributes:e,children:n}=t;return f.createElement("span",ac({},e),n)},V0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:s}=t,a=Yt(),u=f.useRef(null),l=ce.decorations(s,e),c=Z.findKey(a,s),p=[],h=0;h<l.length;h++){var g=l[h];p.push(f.createElement(H0,{isLast:n&&h===l.length-1,key:"".concat(c.id,"-").concat(h),renderPlaceholder:i,leaf:g,text:s,parent:r,renderLeaf:o}))}var y=f.useCallback(v=>{var d=ni.get(a);v?(d==null||d.set(c,v),En.set(s,v),lr.set(v,s)):(d==null||d.delete(c),En.delete(s),u.current&&lr.delete(u.current)),u.current=v},[u,a,c,s]);return f.createElement("span",{"data-slate-node":"text",ref:y},p)},lc=f.memo(V0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&I0(e.decorations,t.decorations));function cc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Go(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q0=t=>{var{decorations:e,element:n,renderElement:r=B=>f.createElement(Z0,Go({},B)),renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Yt(),u=X0(),l=a.isInline(n),c=Z.findKey(a,n),p=f.useCallback(B=>{var b=ni.get(a);B?(b==null||b.set(c,B),En.set(n,B),lr.set(B,n)):(b==null||b.delete(c),En.delete(n))},[a,c,n]),h=dc({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}),g={"data-slate-node":"element",ref:p};if(l&&(g["data-slate-inline"]=!0),!l&&m.hasInlines(a,n)){var y=ne.string(n),v=cl(y);v==="rtl"&&(g.dir=v)}if(m.isVoid(a,n)){g["data-slate-void"]=!0,!u&&l&&(g.contentEditable=!1);var d=l?"span":"div",[[D]]=ne.texts(n);h=f.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},f.createElement(lc,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),To.set(D,0),Io.set(D,n)}return r({attributes:g,children:h,element:n})},G0=f.memo(q0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&T0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&V.equals(t.selection,e.selection))),Z0=t=>{var{attributes:e,children:n,element:r}=t,i=Yt(),o=i.isInline(r)?"span":"div";return f.createElement(o,Go(Go({},e),{},{style:{position:"relative"}}),n)},fc=f.createContext(()=>[]),Y0=()=>f.useContext(fc),K0=f.createContext(!1),dc=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:s}=t,a=Y0(),u=Yt(),l=Z.findPath(u,n),c=[],p=ue.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),h=0;h<n.children.length;h++){var g=l.concat(h),y=n.children[h],v=Z.findKey(u,y),d=m.range(u,g),D=s&&V.intersection(d,s),B=a([y,g]);for(var b of e){var O=V.intersection(b,d);O&&B.push(O)}ue.isElement(y)?c.push(f.createElement(K0.Provider,{key:"provider-".concat(v.id),value:!!D},f.createElement(G0,{decorations:B,element:y,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:D}))):c.push(f.createElement(lc,{decorations:B,key:v.id,isLast:p&&h===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:o,text:y})),To.set(y,h),Io.set(y,n)}return c},pc=f.createContext(!1),X0=()=>f.useContext(pc),hc=f.createContext(null),Zo=()=>{var t=f.useContext(hc);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function J0(){var t=Yt(),e=f.useRef(!1),n=f.useRef(0),r=f.useCallback(()=>{if(!e.current){e.current=!0;var i=Z.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return f.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var Q0=3,$0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},eC={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},tC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ve=t=>{var e=$0[t],n=eC[t],r=tC[t],i=e&&ao(e),o=n&&ao(n),s=r&&ao(r);return a=>!!(i&&i(a)||Ul&&o&&o(a)||!Ul&&s&&s(a))},Ze={isBold:Ve("bold"),isCompose:Ve("compose"),isMoveBackward:Ve("moveBackward"),isMoveForward:Ve("moveForward"),isDeleteBackward:Ve("deleteBackward"),isDeleteForward:Ve("deleteForward"),isDeleteLineBackward:Ve("deleteLineBackward"),isDeleteLineForward:Ve("deleteLineForward"),isDeleteWordBackward:Ve("deleteWordBackward"),isDeleteWordForward:Ve("deleteWordForward"),isExtendBackward:Ve("extendBackward"),isExtendForward:Ve("extendForward"),isExtendLineBackward:Ve("extendLineBackward"),isExtendLineForward:Ve("extendLineForward"),isItalic:Ve("italic"),isMoveLineBackward:Ve("moveLineBackward"),isMoveLineForward:Ve("moveLineForward"),isMoveWordBackward:Ve("moveWordBackward"),isMoveWordForward:Ve("moveWordForward"),isRedo:Ve("redo"),isSoftBreak:Ve("insertSoftBreak"),isSplitBlock:Ve("splitBlock"),isTransposeCharacter:Ve("transposeCharacter"),isUndo:Ve("undo")},nC=(t,e)=>{var n=[],r=()=>{n=[]},i=s=>{if(e.current){var a=s.filter(u=>Ho(t,u,s));n.push(...a)}};function o(){n.length>0&&(n.reverse().forEach(s=>{s.type!=="characterData"&&(s.removedNodes.forEach(a=>{s.target.insertBefore(a,s.nextSibling)}),s.addedNodes.forEach(a=>{s.target.removeChild(a)}))}),r())}return{registerMutations:i,restoreDOM:o,clear:r}},rC={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class vc extends f.Component{constructor(){super(...arguments),wt(this,"context",null),wt(this,"manager",null),wt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,rC)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=nC(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var o;(o=this.manager)===null||o===void 0||o.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}wt(vc,"contextType",Fo);var iC=ct?vc:t=>{var{children:e}=t;return f.createElement(f.Fragment,null,e)},oC=f.createContext(!1),sC=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],aC=["text"];function gc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ft(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var uC=t=>f.createElement(f.Fragment,null,dc(t)),lC=f.forwardRef((t,e)=>{var n=f.useCallback(C=>f.createElement(cC,Ft({},C)),[]),{autoFocus:r,decorate:i=fC,onDOMBeforeInput:o,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:c=n,scrollSelectionIntoView:p=dC,style:h={},as:g="div",disableDefaultStyles:y=!1}=t,v=kn(t,sC),d=Zo(),[D,B]=f.useState(!1),b=f.useRef(null),O=f.useRef([]),[E,w]=f.useState(),A=f.useRef(!1),{onUserInput:F,receivedUserInput:R}=J0(),[,P]=f.useReducer(C=>C+1,0);Vl.set(d,P),No.set(d,a);var z=f.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);f.useEffect(()=>{b.current&&r&&b.current.focus()},[r]);var I=f.useRef(),j=f.useMemo(()=>by(()=>{var C=Z.toDOMNode(d,d),W=C.getRootNode();if(!A.current&&Dn&&W instanceof ShadowRoot){A.current=!0;var U=c0();U?document.execCommand("indent"):Q.deselect(d),A.current=!1;return}var M=I.current;if((ct||!Z.isComposing(d))&&(!z.isUpdatingSelection||M!=null&&M.isFlushing())&&!z.isDraggingInternally){var X=Z.findDocumentOrShadowRoot(d),{activeElement:te}=X,G=Z.toDOMNode(d,d),le=fr(X);if(te===G?(z.latestElement=te,Xt.set(d,!0)):Xt.delete(d),!le)return Q.deselect(d);var{anchorNode:se,focusNode:pe}=le,ve=Z.hasEditableTarget(d,se)||Z.isTargetInsideNonReadonlyVoid(d,se),Ce=Z.hasTarget(d,pe);if(ve&&Ce){var me=Z.toSlateRange(d,le,{exactMatch:!1,suppressThrow:!0});me&&(!Z.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?Q.select(d,me):M==null||M.handleUserSelect(me))}a&&(!ve||!Ce)&&Q.deselect(d)}},100),[d,a,z]),T=f.useMemo(()=>gy(j,0),[j]);I.current=P0({node:b,onDOMSelectionChange:j,scheduleOnDOMSelectionChange:T}),dr(()=>{var C,W,U;b.current&&(U=Wo(b.current))?(Rl.set(d,U),ei.set(d,b.current),En.set(d,b.current),lr.set(b.current,d)):En.delete(d);var{selection:M}=d,X=Z.findDocumentOrShadowRoot(d),te=fr(X);if(!(!te||!Z.isFocused(d)||(C=I.current)!==null&&C!==void 0&&C.hasPendingAction())){var G=ve=>{var Ce=te.type!=="None";if(!(!M&&!Ce)){var me=te.focusNode,De;if(Tn&&te.rangeCount>1){var ge=te.getRangeAt(0),Ne=te.getRangeAt(te.rangeCount-1);ge.startContainer===me?De=Ne.endContainer:De=ge.startContainer}else De=te.anchorNode;var ae=ei.get(d),Ue=!1;if(ae.contains(De)&&ae.contains(me)&&(Ue=!0),Ce&&Ue&&M&&!ve){var de=Z.toSlateRange(d,te,{exactMatch:!0,suppressThrow:!0});if(de&&V.equals(de,M)){var we;if(!z.hasMarkPlaceholder||(we=De)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Z.hasRange(d,M)){d.selection=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!0});return}z.isUpdatingSelection=!0;var Te=M&&Z.toDOMRange(d,M);return Te?(Z.isComposing(d)&&!ct?te.collapseToEnd():V.isBackward(M)?te.setBaseAndExtent(Te.endContainer,Te.endOffset,Te.startContainer,Te.startOffset):te.setBaseAndExtent(Te.startContainer,Te.startOffset,Te.endContainer,Te.endOffset),p(d,Te)):te.removeAllRanges(),Te}};te.rangeCount<=1&&G();var le=((W=I.current)===null||W===void 0?void 0:W.isFlushing())==="action";if(!ct||!le){setTimeout(()=>{z.isUpdatingSelection=!1});return}var se=null,pe=requestAnimationFrame(()=>{if(le){var ve=Ce=>{try{var me=Z.toDOMNode(d,d);me.focus(),G(Ce)}catch{}};ve(),se=setTimeout(()=>{ve(!0),z.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(pe),se&&clearTimeout(se)}}});var N=f.useCallback(C=>{var W=Z.toDOMNode(d,d),U=W.getRootNode();if(A!=null&&A.current&&Dn&&U instanceof ShadowRoot){var M=C.getTargetRanges(),X=M[0],te=new window.Range;te.setStart(X.startContainer,X.startOffset),te.setEnd(X.endContainer,X.endOffset);var G=Z.toSlateRange(d,te,{exactMatch:!1,suppressThrow:!1});Q.select(d,G),C.preventDefault(),C.stopImmediatePropagation();return}if(F(),!a&&Z.hasEditableTarget(d,C.target)&&!pC(C,o)){var le;if(I.current)return I.current.handleDOMBeforeInput(C);T.flush(),j.flush();var{selection:se}=d,{inputType:pe}=C,ve=C.dataTransfer||C.data||void 0,Ce=pe==="insertCompositionText"||pe==="deleteCompositionText";if(Ce&&Z.isComposing(d))return;var me=!1;if(pe==="insertText"&&se&&V.isCollapsed(se)&&C.data&&C.data.length===1&&/[a-z ]/i.test(C.data)&&se.anchor.offset!==0){var De,ge;me=!0,d.marks&&(me=!1);var{anchor:Ne}=se,[ae,Ue]=Z.toDOMPoint(d,Ne),de=(De=ae.parentElement)===null||De===void 0?void 0:De.closest("a"),we=Z.getWindow(d);if(me&&de&&Z.hasDOMNode(d,de)){var Te,Xe=we==null?void 0:we.document.createTreeWalker(de,NodeFilter.SHOW_TEXT).lastChild();Xe===ae&&((Te=Xe.textContent)===null||Te===void 0?void 0:Te.length)===Ue&&(me=!1)}if(me&&ae.parentElement&&(we==null||(ge=we.getComputedStyle(ae.parentElement))===null||ge===void 0?void 0:ge.whiteSpace)==="pre"){var $e=m.above(d,{at:Ne.path,match:Lt=>ue.isElement(Lt)&&m.isBlock(d,Lt)});$e&&ne.string($e[0]).includes(" ")&&(me=!1)}}if(!pe.startsWith("delete")||pe.startsWith("deleteBy")){var[xe]=C.getTargetRanges();if(xe){var pt=Z.toSlateRange(d,xe,{exactMatch:!1,suppressThrow:!1});if(!se||!V.equals(se,pt)){me=!1;var st=!Ce&&d.selection&&m.rangeRef(d,d.selection);Q.select(d,pt),st&&cr.set(d,st)}}}if(Ce)return;if(me||C.preventDefault(),se&&V.isExpanded(se)&&pe.startsWith("delete")){var an=pe.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:an});return}switch(pe){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{pe==="insertFromComposition"&&Z.isComposing(d)&&(B(!1),bn.set(d,!1)),(ve==null?void 0:ve.constructor.name)==="DataTransfer"?Z.insertData(d,ve):typeof ve=="string"&&(me?O.current.push(()=>m.insertText(d,ve)):m.insertText(d,ve));break}}var xt=(le=cr.get(d))===null||le===void 0?void 0:le.unref();cr.delete(d),xt&&(!d.selection||!V.equals(d.selection,xt))&&Q.select(d,xt)}},[d,j,F,o,a,T]),K=f.useCallback(C=>{C==null?(j.cancel(),T.cancel(),ei.delete(d),En.delete(d),b.current&&Kt&&b.current.removeEventListener("beforeinput",N)):Kt&&C.addEventListener("beforeinput",N),b.current=C,typeof e=="function"?e(C):e&&(e.current=C)},[j,T,d,N,e]);dr(()=>{var C=Z.getWindow(d);C.document.addEventListener("selectionchange",T);var W=()=>{z.isDraggingInternally=!1};return C.document.addEventListener("dragend",W),C.document.addEventListener("drop",W),()=>{C.document.removeEventListener("selectionchange",T),C.document.removeEventListener("dragend",W),C.document.removeEventListener("drop",W)}},[T,z]);var _=i([d,[]]),ie=s&&d.children.length===1&&Array.from(ne.texts(d)).length===1&&ne.string(d)===""&&!D,re=f.useCallback(C=>{if(C&&ie){var W;w((W=C.getBoundingClientRect())===null||W===void 0?void 0:W.height)}else w(void 0)},[ie]);if(ie){var k=m.start(d,[]);_.push({[In]:!0,placeholder:s,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:H}=d;if(z.hasMarkPlaceholder=!1,d.selection&&V.isCollapsed(d.selection)&&H){var{anchor:J}=d.selection,q=ne.leaf(d,J.path),ee=kn(q,aC);if(!ce.equals(q,H,{loose:!0})){z.hasMarkPlaceholder=!0;var Y=Object.fromEntries(Object.keys(ee).map(C=>[C,null]));_.push(Ft(Ft(Ft({[ql]:!0},Y),H),{},{anchor:J,focus:J}))}}return f.useEffect(()=>{setTimeout(()=>{var{selection:C}=d;if(C){var{anchor:W}=C,U=ne.leaf(d,W.path);if(H&&!ce.equals(U,H,{loose:!0})){St.set(d,H);return}}St.delete(d)})}),f.createElement(pc.Provider,{value:a},f.createElement(oC.Provider,{value:D},f.createElement(fc.Provider,{value:i},f.createElement(iC,{node:b,receivedUserInput:R},f.createElement(g,Ft(Ft({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},v),{},{spellCheck:Kt||!$r?v.spellCheck:!1,autoCorrect:Kt||!$r?v.autoCorrect:"false",autoCapitalize:Kt||!$r?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:K,style:Ft(Ft({},y?{}:Ft({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},E?{minHeight:E}:{})),h),onBeforeInput:f.useCallback(C=>{if(!Kt&&!a&&!ft(C,v.onBeforeInput)&&Z.hasSelectableTarget(d,C.target)&&(C.preventDefault(),!Z.isComposing(d))){var W=C.data;m.insertText(d,W)}},[v.onBeforeInput,d,a]),onInput:f.useCallback(C=>{if(!ft(C,v.onInput)){if(I.current){I.current.handleInput();return}for(var W of O.current)W();O.current=[]}},[v.onInput]),onBlur:f.useCallback(C=>{if(!(a||z.isUpdatingSelection||!Z.hasSelectableTarget(d,C.target)||ft(C,v.onBlur))){var W=Z.findDocumentOrShadowRoot(d);if(z.latestElement!==W.activeElement){var{relatedTarget:U}=C,M=Z.toDOMNode(d,d);if(U!==M&&!(Bt(U)&&U.hasAttribute("data-slate-spacer"))){if(U!=null&&$t(U)&&Z.hasDOMNode(d,U)){var X=Z.toSlateNode(d,U);if(ue.isElement(X)&&!d.isVoid(X))return}if(Dn){var te=fr(W);te==null||te.removeAllRanges()}Xt.delete(d)}}}},[a,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onClick)&&$t(C.target)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W);if(!m.hasPath(d,U)||ne.get(d,U)!==W)return;if(C.detail===Q0&&U.length>=1){var M=U;if(!(ue.isElement(W)&&m.isBlock(d,W))){var X,te=m.above(d,{match:me=>ue.isElement(me)&&m.isBlock(d,me),at:U});M=(X=te==null?void 0:te[1])!==null&&X!==void 0?X:U.slice(0,1)}var G=m.range(d,M);Q.select(d,G);return}if(a)return;var le=m.start(d,U),se=m.end(d,U),pe=m.void(d,{at:le}),ve=m.void(d,{at:se});if(pe&&ve&&L.equals(pe[1],ve[1])){var Ce=m.range(d,le);Q.select(d,Ce)}}},[d,v.onClick,a]),onCompositionEnd:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if(Z.isComposing(d)&&Promise.resolve().then(()=>{B(!1),bn.set(d,!1)}),(W=I.current)===null||W===void 0||W.handleCompositionEnd(C),ft(C,v.onCompositionEnd)||ct)return;if(!Dn&&!$y&&!Wl&&!t0&&!e0&&C.data){var U=St.get(d);St.delete(d),U!==void 0&&(_t.set(d,d.marks),d.marks=U),m.insertText(d,C.data);var M=_t.get(d);_t.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCompositionUpdate)&&(Z.isComposing(d)||(B(!0),bn.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:f.useCallback(C=>{if(Z.hasSelectableTarget(d,C.target)){var W;if((W=I.current)===null||W===void 0||W.handleCompositionStart(C),ft(C,v.onCompositionStart)||ct)return;B(!0);var{selection:U}=d;if(U&&V.isExpanded(U)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:f.useCallback(C=>{Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCopy)&&!mc(C)&&(C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"copy"))},[v.onCopy,d]),onCut:f.useCallback(C=>{if(!a&&Z.hasSelectableTarget(d,C.target)&&!ft(C,v.onCut)&&!mc(C)){C.preventDefault(),Z.setFragmentData(d,C.clipboardData,"cut");var{selection:W}=d;if(W)if(V.isExpanded(W))m.deleteFragment(d);else{var U=ne.parent(d,W.anchor.path);m.isVoid(d,U)&&Q.delete(d)}}},[a,d,v.onCut]),onDragOver:f.useCallback(C=>{if(Z.hasTarget(d,C.target)&&!ft(C,v.onDragOver)){var W=Z.toSlateNode(d,C.target);ue.isElement(W)&&m.isVoid(d,W)&&C.preventDefault()}},[v.onDragOver,d]),onDragStart:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDragStart)){var W=Z.toSlateNode(d,C.target),U=Z.findPath(d,W),M=ue.isElement(W)&&m.isVoid(d,W)||m.void(d,{at:U,voids:!0});if(M){var X=m.range(d,U);Q.select(d,X)}z.isDraggingInternally=!0,Z.setFragmentData(d,C.dataTransfer,"drag")}},[a,d,v.onDragStart,z]),onDrop:f.useCallback(C=>{if(!a&&Z.hasTarget(d,C.target)&&!ft(C,v.onDrop)){C.preventDefault();var W=d.selection,U=Z.findEventRange(d,C),M=C.dataTransfer;Q.select(d,U),z.isDraggingInternally&&W&&!V.equals(W,U)&&!m.void(d,{at:U,voids:!0})&&Q.delete(d,{at:W}),Z.insertData(d,M),Z.isFocused(d)||Z.focus(d)}},[a,d,v.onDrop,z]),onDragEnd:f.useCallback(C=>{!a&&z.isDraggingInternally&&v.onDragEnd&&Z.hasTarget(d,C.target)&&v.onDragEnd(C)},[a,z,v,d]),onFocus:f.useCallback(C=>{if(!a&&!z.isUpdatingSelection&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onFocus)){var W=Z.toDOMNode(d,d),U=Z.findDocumentOrShadowRoot(d);if(z.latestElement=U.activeElement,Tn&&C.target!==W){W.focus();return}Xt.set(d,!0)}},[a,z,d,v.onFocus]),onKeyDown:f.useCallback(C=>{if(!a&&Z.hasEditableTarget(d,C.target)){var W;(W=I.current)===null||W===void 0||W.handleKeyDown(C);var{nativeEvent:U}=C;if(Z.isComposing(d)&&U.isComposing===!1&&(bn.set(d,!1),B(!1)),ft(C,v.onKeyDown)||Z.isComposing(d))return;var{selection:M}=d,X=d.children[M!==null?M.focus.path[0]:0],te=cl(ne.string(X))==="rtl";if(Ze.isRedo(U)){C.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Ze.isUndo(U)){C.preventDefault();var le=d;typeof le.undo=="function"&&le.undo();return}if(Ze.isMoveLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",reverse:!0});return}if(Ze.isMoveLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line"});return}if(Ze.isExtendLineBackward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Ze.isExtendLineForward(U)){C.preventDefault(),Q.move(d,{unit:"line",edge:"focus"});return}if(Ze.isMoveBackward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:!te}):Q.collapse(d,{edge:te?"end":"start"});return}if(Ze.isMoveForward(U)){C.preventDefault(),M&&V.isCollapsed(M)?Q.move(d,{reverse:te}):Q.collapse(d,{edge:te?"start":"end"});return}if(Ze.isMoveWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:!te});return}if(Ze.isMoveWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)&&Q.collapse(d,{edge:"focus"}),Q.move(d,{unit:"word",reverse:te});return}if(Kt){if((Hl||Dn)&&M&&(Ze.isDeleteBackward(U)||Ze.isDeleteForward(U))&&V.isCollapsed(M)){var se=ne.parent(d,M.anchor.path);if(ue.isElement(se)&&m.isVoid(d,se)&&(m.isInline(d,se)||m.isBlock(d,se))){C.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Ze.isBold(U)||Ze.isItalic(U)||Ze.isTransposeCharacter(U)){C.preventDefault();return}if(Ze.isSoftBreak(U)){C.preventDefault(),m.insertSoftBreak(d);return}if(Ze.isSplitBlock(U)){C.preventDefault(),m.insertBreak(d);return}if(Ze.isDeleteBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Ze.isDeleteForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Ze.isDeleteLineBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Ze.isDeleteLineForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Ze.isDeleteWordBackward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Ze.isDeleteWordForward(U)){C.preventDefault(),M&&V.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[a,d,v.onKeyDown]),onPaste:f.useCallback(C=>{!a&&Z.hasEditableTarget(d,C.target)&&!ft(C,v.onPaste)&&(!Kt||i0(C.nativeEvent)||Dn)&&(C.preventDefault(),Z.insertData(d,C.clipboardData))},[a,d,v.onPaste])}),f.createElement(uC,{decorations:_,node:d,renderElement:u,renderPlaceholder:c,renderLeaf:l,selection:d.selection}))))))}),cC=t=>{var{attributes:e,children:n}=t;return f.createElement("span",Ft({},e),n,ct&&f.createElement("br",null))},fC=()=>[],dC=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&V.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),xy(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},ft=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},mc=t=>$t(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),pC=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},hC=f.createContext(!1),vC=f.createContext({});function gC(t){var e=f.useRef([]).current,n=f.useRef({editor:t}).current,r=f.useCallback(o=>{n.editor=o,e.forEach(s=>s(o))},[e,n]),i=f.useMemo(()=>({getSlate:()=>n.editor,addEventListener:o=>(e.push(o),()=>{e.splice(e.indexOf(o),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var mC=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],yC=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:o,initialValue:s}=t,a=kn(t,mC),[u,l]=f.useState(()=>{if(!ne.isNodeList(s))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(it.stringify(s)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(it.stringify(e)));return e.children=s,Object.assign(e,a),{v:0,editor:e}}),{selectorContext:c,onChange:p}=gC(e),h=f.useCallback(v=>{var d;switch(r&&r(e.children),v==null||(d=v.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:o==null||o(e.children)}l(D=>({v:D.v+1,editor:e})),p(e)},[e,p,r,i,o]);f.useEffect(()=>(_o.set(e,h),()=>{_o.set(e,()=>{})}),[e,h]);var[g,y]=f.useState(Z.isFocused(e));return f.useEffect(()=>{y(Z.isFocused(e))},[e]),dr(()=>{var v=()=>y(Z.isFocused(e));return zl>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),f.createElement(vC.Provider,{value:c},f.createElement(hc.Provider,{value:u},f.createElement(Fo.Provider,{value:u.editor},f.createElement(hC.Provider,{value:g},n))))},yc=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Cc=(t,e,n)=>{var r=Z.toDOMRange(t,e).getBoundingClientRect(),i=Z.toDOMRange(t,n).getBoundingClientRect();return yc(r,i)&&yc(i,r)},CC=(t,e)=>{var n=m.range(t,V.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,o=r.length,s=Math.floor(o/2);if(Cc(t,m.range(t,r[i]),n))return m.range(t,r[i],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;s!==r.length&&s!==i;)Cc(t,m.range(t,r[s]),n)?o=s:i=s,s=Math.floor((i+o)/2);return m.range(t,r[o],n)};function Dc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ec(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dc(Object(n),!0).forEach(function(r){wt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var DC=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:o,deleteBackward:s,addMark:a,removeMark:u}=r;return ni.set(r,new WeakMap),r.addMark=(l,c)=>{var p,h;(p=zo.get(r))===null||p===void 0||p(),!St.get(r)&&(h=vt.get(r))!==null&&h!==void 0&&h.length&&St.set(r,null),_t.delete(r),a(l,c)},r.removeMark=l=>{var c;!St.get(r)&&(c=vt.get(r))!==null&&c!==void 0&&c.length&&St.set(r,null),_t.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&V.isCollapsed(r.selection)){var c=m.above(r,{match:y=>ue.isElement(y)&&m.isBlock(r,y),at:r.selection});if(c){var[,p]=c,h=m.range(r,p,r.selection.anchor),g=CC(r,h);V.isCollapsed(g)||Q.delete(r,{at:g})}}},r.apply=l=>{var c=[],p=[],h=vt.get(r);if(h!=null&&h.length){var g=h.map(T=>C0(T,l)).filter(Boolean);vt.set(r,g)}var y=Qt.get(r);y&&Qt.set(r,ec(r,y,l));var v=Jt.get(r);if(v!=null&&v.at){var d=Se.isPoint(v==null?void 0:v.at)?Vo(r,v.at,l):ec(r,v.at,l);Jt.set(r,d?Ec(Ec({},v),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{c.push(...jn(r,l.path));break}case"set_selection":{var D;(D=cr.get(r))===null||D===void 0||D.unref(),cr.delete(r);break}case"insert_node":case"remove_node":{c.push(...jn(r,L.parent(l.path)));break}case"merge_node":{var B=L.previous(l.path);c.push(...jn(r,B));break}case"move_node":{var b=L.common(L.parent(l.path),L.parent(l.newPath));c.push(...jn(r,b));var O;L.isBefore(l.path,l.newPath)?(c.push(...jn(r,L.parent(l.path))),O=l.newPath):(c.push(...jn(r,L.parent(l.newPath))),O=l.path);var E=ne.get(e,L.parent(O)),w=Z.findKey(r,E),A=m.pathRef(r,L.parent(O));p.push([A,w]);break}}i(l);for(var[F,R]of c){var[P]=m.node(r,F);ti.set(P,R)}for(var[z,I]of p)if(z.current){var[j]=m.node(r,z.current);ti.set(j,I)}},r.setFragmentData=l=>{var{selection:c}=r;if(c){var[p,h]=V.edges(c),g=m.void(r,{at:p.path}),y=m.void(r,{at:h.path});if(!(V.isCollapsed(c)&&!g)){var v=Z.toDOMRange(r,c),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),y){var[B]=y,b=v.cloneRange(),O=Z.toDOMNode(r,B);b.setEndAfter(O),d=b.cloneContents()}if(g&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var z=P.getAttribute("data-slate-zero-width")==="n";P.textContent=z?`
|
91
|
-
`:""}),Zl(D)){var E=D.ownerDocument.createElement("span");E.style.whiteSpace="pre",E.appendChild(D),d.appendChild(E),D=E}var w=r.getFragment(),A=JSON.stringify(w),F=window.btoa(encodeURIComponent(A));D.setAttribute("data-slate-fragment",F),l.setData("application/".concat(n),F);var R=d.ownerDocument.createElement("div");return R.appendChild(d),R.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(R),l.setData("text/html",R.innerHTML),l.setData("text/plain",Kl(R)),d.ownerDocument.body.removeChild(R),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var c=l.getData("application/".concat(n))||l0(l);if(c){var p=decodeURIComponent(window.atob(c)),h=JSON.parse(p);return r.insertFragment(h),!0}return!1},r.insertTextData=l=>{var c=l.getData("text/plain");if(c){var p=c.split(/\r\n|\r|\n/),h=!1;for(var g of p)h&&Q.splitNodes(r,{always:!0}),r.insertText(g),h=!0;return!0}return!1},r.onChange=l=>{var c=zl<18?ln.unstable_batchedUpdates:p=>p();c(()=>{var p=_o.get(r);p&&p(l),o(l)})},r},jn=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var o=Z.findKey(t,r);n.push([i,o])}return n};function bc(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:o=>!m.isEditor(o)&&ue.isElement(o)&&o[n]===e}));return!!i}const wc=["listItem","numberedList"],ii=["left","center","right","justify"];function EC(t,e){const n=ii.includes(e)?"align":"type",r=bc(t,e,n),i=wc.includes(e);Q.unwrapNodes(t,{match:s=>!m.isEditor(s)&&ue.isElement(s)&&wc.includes(s.type)&&!ii.includes(e),split:!0});let o;if(ii.includes(e)?o={align:r?void 0:e}:o={type:r?"paragraph":i?"listItem":e},Q.setNodes(t,o),!r&&i){const s={type:e,children:[]};Q.wrapNodes(t,s)}}function wn({format:t,icon:e}){const n=Zo(),r=ii.includes(t)?"align":"type",o=bc(n,t,r)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),EC(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+o,onMouseDown:s,children:x.jsx(e,{})})}function bC({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return x.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return x.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return x.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return x.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return x.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return x.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return x.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function wC({attributes:t,children:e,leaf:n}){return n.bold&&(e=x.jsx("strong",{children:e})),n.code&&(e=x.jsx("code",{children:e})),n.italic&&(e=x.jsx("em",{children:e})),n.underline&&(e=x.jsx("u",{children:e})),x.jsx("span",{...t,children:e})}function Bc(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function xc(t,e){Bc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function oi({format:t,icon:e}){const n=Zo(),i=Bc(n,t)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),xc(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:o,children:x.jsx(e,{})})}function BC({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const Sc={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},xC=[{type:"paragraph",children:[{text:""}]}];var Ac={},Yo={},Ko={};Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.default=OC;var Lc="html",Oc="head",si="body",SC=/<([a-zA-Z]+[0-9]?)/,Pc=/<head[^]*>/i,Fc=/<body[^]*>/i,ai=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},Xo=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Mc=typeof window=="object"&&window.DOMParser;if(typeof Mc=="function"){var AC=new Mc,LC="text/html";Xo=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),AC.parseFromString(t,LC)},ai=Xo}if(typeof document=="object"&&document.implementation){var ui=document.implementation.createHTMLDocument();ai=function(t,e){if(e){var n=ui.documentElement.querySelector(e);return n&&(n.innerHTML=t),ui}return ui.documentElement.innerHTML=t,ui}}var li=typeof document=="object"&&document.createElement("template"),Jo;li&&li.content&&(Jo=function(t){return li.innerHTML=t,li.content.childNodes});function OC(t){var e,n,r=t.match(SC),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case Lc:{var o=Xo(t);if(!Pc.test(t)){var s=o.querySelector(Oc);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.removeChild(s)}if(!Fc.test(t)){var s=o.querySelector(si);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return o.querySelectorAll(Lc)}case Oc:case si:{var a=ai(t).querySelectorAll(i);return Fc.test(t)&&Pc.test(t)?a[0].parentNode.childNodes:a}default:{if(Jo)return Jo(t);var s=ai(t,si).querySelector(si);return s.childNodes}}}var ci={},Qo={},$o={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function n(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}t.isTag=n,t.Root=e.Root,t.Text=e.Text,t.Directive=e.Directive,t.Comment=e.Comment,t.Script=e.Script,t.Style=e.Style,t.Tag=e.Tag,t.CDATA=e.CDATA,t.Doctype=e.Doctype})($o);var Fe={},en=We&&We.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pr=We&&We.__assign||function(){return pr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},pr.apply(this,arguments)};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.cloneNode=Fe.hasChildren=Fe.isDocument=Fe.isDirective=Fe.isComment=Fe.isText=Fe.isCDATA=Fe.isTag=Fe.Element=Fe.Document=Fe.CDATA=Fe.NodeWithChildren=Fe.ProcessingInstruction=Fe.Comment=Fe.Text=Fe.DataNode=Fe.Node=void 0;var gt=$o,es=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(e){return e===void 0&&(e=!1),ts(this,e)},t}();Fe.Node=es;var fi=function(t){en(e,t);function e(n){var r=t.call(this)||this;return r.data=n,r}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),e}(es);Fe.DataNode=fi;var kc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Text,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(fi);Fe.Text=kc;var Tc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Comment,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(fi);Fe.Comment=Tc;var Ic=function(t){en(e,t);function e(n,r){var i=t.call(this,r)||this;return i.name=n,i.type=gt.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(fi);Fe.ProcessingInstruction=Ic;var di=function(t){en(e,t);function e(n){var r=t.call(this)||this;return r.children=n,r}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),e}(es);Fe.NodeWithChildren=di;var jc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.CDATA,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(di);Fe.CDATA=jc;var Nc=function(t){en(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=gt.ElementType.Root,n}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(di);Fe.Document=Nc;var _c=function(t){en(e,t);function e(n,r,i,o){i===void 0&&(i=[]),o===void 0&&(o=n==="script"?gt.ElementType.Script:n==="style"?gt.ElementType.Style:gt.ElementType.Tag);var s=t.call(this,i)||this;return s.name=n,s.attribs=r,s.type=o,s}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var i,o;return{name:r,value:n.attribs[r],namespace:(i=n["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(o=n["x-attribsPrefix"])===null||o===void 0?void 0:o[r]}})},enumerable:!1,configurable:!0}),e}(di);Fe.Element=_c;function zc(t){return(0,gt.isTag)(t)}Fe.isTag=zc;function Wc(t){return t.type===gt.ElementType.CDATA}Fe.isCDATA=Wc;function Uc(t){return t.type===gt.ElementType.Text}Fe.isText=Uc;function Hc(t){return t.type===gt.ElementType.Comment}Fe.isComment=Hc;function Rc(t){return t.type===gt.ElementType.Directive}Fe.isDirective=Rc;function Vc(t){return t.type===gt.ElementType.Root}Fe.isDocument=Vc;function PC(t){return Object.prototype.hasOwnProperty.call(t,"children")}Fe.hasChildren=PC;function ts(t,e){e===void 0&&(e=!1);var n;if(Uc(t))n=new kc(t.data);else if(Hc(t))n=new Tc(t.data);else if(zc(t)){var r=e?ns(t.children):[],i=new _c(t.name,pr({},t.attribs),r);r.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=pr({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=pr({},t["x-attribsPrefix"])),n=i}else if(Wc(t)){var r=e?ns(t.children):[],o=new jc(r);r.forEach(function(l){return l.parent=o}),n=o}else if(Vc(t)){var r=e?ns(t.children):[],s=new Nc(r);r.forEach(function(l){return l.parent=s}),t["x-mode"]&&(s["x-mode"]=t["x-mode"]),n=s}else if(Rc(t)){var a=new Ic(t.name,t.data);t["x-name"]!=null&&(a["x-name"]=t["x-name"],a["x-publicId"]=t["x-publicId"],a["x-systemId"]=t["x-systemId"]),n=a}else throw new Error("Not implemented yet: ".concat(t.type));return n.startIndex=t.startIndex,n.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(n.sourceCodeLocation=t.sourceCodeLocation),n}Fe.cloneNode=ts;function ns(t){for(var e=t.map(function(r){return ts(r,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}(function(t){var e=We&&We.__createBinding||(Object.create?function(a,u,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(u,l);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(a,c,p)}:function(a,u,l,c){c===void 0&&(c=l),a[c]=u[l]}),n=We&&We.__exportStar||function(a,u){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,a,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var r=$o,i=Fe;n(Fe,t);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function a(u,l,c){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(c=l,l=o),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??o,this.elementCB=c??null}return a.prototype.onparserinit=function(u){this.parser=u},a.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},a.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},a.prototype.onerror=function(u){this.handleCallback(u)},a.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},a.prototype.onopentag=function(u,l){var c=this.options.xmlMode?r.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,c);this.addNode(p),this.tagStack.push(p)},a.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===r.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var c=new i.Text(u);this.addNode(c),this.lastNode=c}},a.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},a.prototype.oncdataend=function(){this.lastNode=null},a.prototype.onprocessinginstruction=function(u,l){var c=new i.ProcessingInstruction(u,l);this.addNode(c)},a.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},a.prototype.addNode=function(u){var l=this.tagStack[this.tagStack.length-1],c=l.children[l.children.length-1];this.options.withStartIndices&&(u.startIndex=this.parser.startIndex),this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),l.children.push(u),c&&(u.prev=c,c.next=u),u.parent=l,this.lastNode=null},a}();t.DomHandler=s,t.default=s})(Qo);var qc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,n){return e[n.toLowerCase()]=n,e},{})})(qc),Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatAttributes=Gc,ci.formatDOM=Zc;var pi=Qo,FC=qc;function MC(t){return FC.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Gc(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function kC(t){t=t.toLowerCase();var e=MC(t);return e||t}function Zc(t,e,n){e===void 0&&(e=null);for(var r=[],i,o=0,s=t.length;o<s;o++){var a=t[o];switch(a.nodeType){case 1:{var u=kC(a.nodeName);i=new pi.Element(u,Gc(a.attributes)),i.children=Zc(u==="template"?a.content.childNodes:a.childNodes,i);break}case 3:i=new pi.Text(a.nodeValue);break;case 8:i=new pi.Comment(a.nodeValue);break;default:continue}var l=r[o-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,r.push(i)}return n&&(i=new pi.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),i.next=r[0]||null,i.parent=e,r.unshift(i),r[1]&&(r[1].prev=r[0])),r}var TC=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.default=_C;var IC=TC(Ko),jC=ci,NC=/<(![a-zA-Z\s]+)>/;function _C(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(NC),n=e?e[1]:void 0;return(0,jC.formatDOM)((0,IC.default)(t),null,n)}var hi={},At={},vi={},zC=0;vi.SAME=zC;var WC=1;vi.CAMELCASE=WC,vi.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const Yc=0,tn=1,gi=2,mi=3,rs=4,Kc=5,Xc=6;function UC(t){return ot.hasOwnProperty(t)?ot[t]:null}function dt(t,e,n,r,i,o,s){this.acceptsBooleans=e===gi||e===mi||e===rs,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}const ot={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{ot[t]=new dt(t,Yc,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{ot[t]=new dt(t,tn,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{ot[t]=new dt(t,gi,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{ot[t]=new dt(t,gi,!1,t,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(t=>{ot[t]=new dt(t,mi,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{ot[t]=new dt(t,mi,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{ot[t]=new dt(t,rs,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{ot[t]=new dt(t,Xc,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{ot[t]=new dt(t,Kc,!1,t.toLowerCase(),null,!1,!1)});const is=/[\-\:]([a-z])/g,os=t=>t[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(is,os);ot[e]=new dt(e,tn,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{ot[t]=new dt(t,tn,!1,t.toLowerCase(),null,!1,!1)});const HC="xlinkHref";ot[HC]=new dt("xlinkHref",tn,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{ot[t]=new dt(t,tn,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:RC,SAME:VC,possibleStandardNames:Jc}=vi,qC=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",GC=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+qC+"]*$")),ZC=Object.keys(Jc).reduce((t,e)=>{const n=Jc[e];return n===VC?t[e]=e:n===RC?t[e.toLowerCase()]=e:t[e]=n,t},{});At.BOOLEAN=mi,At.BOOLEANISH_STRING=gi,At.NUMERIC=Kc,At.OVERLOADED_BOOLEAN=rs,At.POSITIVE_NUMERIC=Xc,At.RESERVED=Yc,At.STRING=tn,At.getPropertyInfo=UC,At.isCustomAttribute=GC,At.possibleStandardNames=ZC;var ss={},as={},Qc=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,YC=/\n/g,KC=/^\s*/,XC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,JC=/^:\s*/,QC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$C=/^[;\s]*/,eD=/^\s+|\s+$/g,tD=`
|
92
|
-
`,$c="/",ef="*",Bn="",nD="comment",rD="declaration",iD=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(y){var v=y.match(YC);v&&(n+=v.length);var d=y.lastIndexOf(tD);r=~d?y.length-d:r+y.length}function o(){var y={line:n,column:r};return function(v){return v.position=new s(y),l(),v}}function s(y){this.start=y,this.end={line:n,column:r},this.source=e.source}s.prototype.content=t;function a(y){var v=new Error(e.source+":"+n+":"+r+": "+y);if(v.reason=y,v.filename=e.source,v.line=n,v.column=r,v.source=t,!e.silent)throw v}function u(y){var v=y.exec(t);if(v){var d=v[0];return i(d),t=t.slice(d.length),v}}function l(){u(KC)}function c(y){var v;for(y=y||[];v=p();)v!==!1&&y.push(v);return y}function p(){var y=o();if(!($c!=t.charAt(0)||ef!=t.charAt(1))){for(var v=2;Bn!=t.charAt(v)&&(ef!=t.charAt(v)||$c!=t.charAt(v+1));)++v;if(v+=2,Bn===t.charAt(v-1))return a("End of comment missing");var d=t.slice(2,v-2);return r+=2,i(d),t=t.slice(v),r+=2,y({type:nD,comment:d})}}function h(){var y=o(),v=u(XC);if(v){if(p(),!u(JC))return a("property missing ':'");var d=u(QC),D=y({type:rD,property:tf(v[0].replace(Qc,Bn)),value:d?tf(d[0].replace(Qc,Bn)):Bn});return u($C),D}}function g(){var y=[];c(y);for(var v;v=h();)v!==!1&&(y.push(v),c(y));return y}return l(),g()};function tf(t){return t?t.replace(eD,Bn):Bn}var oD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(as,"__esModule",{value:!0}),as.default=aD;var sD=oD(iD);function aD(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,sD.default)(t),i=typeof e=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?e(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var yi={};Object.defineProperty(yi,"__esModule",{value:!0}),yi.camelCase=void 0;var uD=/^--[a-zA-Z0-9-]+$/,lD=/-([a-z])/g,cD=/^[^-]+$/,fD=/^-(webkit|moz|ms|o|khtml)-/,dD=/^-(ms)-/,pD=function(t){return!t||cD.test(t)||uD.test(t)},hD=function(t,e){return e.toUpperCase()},nf=function(t,e){return"".concat(e,"-")},vD=function(t,e){return e===void 0&&(e={}),pD(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(dD,nf):t=t.replace(fD,nf),t.replace(lD,hD))};yi.camelCase=vD;var gD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},mD=gD(as),yD=yi;function us(t,e){var n={};return!t||typeof t!="string"||(0,mD.default)(t,function(r,i){r&&i&&(n[(0,yD.camelCase)(r,e)]=i)}),n}us.default=us;var CD=us;(function(t){var e=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=o,t.setStyleProp=a;var n=f,r=e(CD),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(c,p){return c.includes("-")?!i.has(c):!!(p&&typeof p.is=="string")}var s={reactCompat:!0};function a(c,p){if(typeof c=="string"){if(!c.trim()){p.style={};return}try{p.style=(0,r.default)(c,s)}catch{p.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(c){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(c.name)};t.canTextBeChildOfNode=u;var l=function(c){return c};t.returnFirstArg=l})(ss),Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=wD;var hr=At,rf=ss,DD=["checked","value"],ED=["input","select","textarea"],bD={reset:!0,submit:!0};function wD(t,e){t===void 0&&(t={});var n={},r=!!(t.type&&bD[t.type]);for(var i in t){var o=t[i];if((0,hr.isCustomAttribute)(i)){n[i]=o;continue}var s=i.toLowerCase(),a=of(s);if(a){var u=(0,hr.getPropertyInfo)(a);switch(DD.includes(a)&&ED.includes(e)&&!r&&(a=of("default"+s)),n[a]=o,u&&u.type){case hr.BOOLEAN:n[a]=!0;break;case hr.OVERLOADED_BOOLEAN:o===""&&(n[a]=!0);break}continue}rf.PRESERVE_CUSTOM_ATTRIBUTES&&(n[i]=o)}return(0,rf.setStyleProp)(t.style,n),n}function of(t){return hr.possibleStandardNames[t]}var ls={},BD=We&&We.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=sf;var cs=f,xD=BD(hi),vr=ss,SD={cloneElement:cs.cloneElement,createElement:cs.createElement,isValidElement:cs.isValidElement};function sf(t,e){e===void 0&&(e={});for(var n=[],r=typeof e.replace=="function",i=e.transform||vr.returnFirstArg,o=e.library||SD,s=o.cloneElement,a=o.createElement,u=o.isValidElement,l=t.length,c=0;c<l;c++){var p=t[c];if(r){var h=e.replace(p,c);if(u(h)){l>1&&(h=s(h,{key:h.key||c})),n.push(i(h,p,c));continue}}if(p.type==="text"){var g=!p.data.trim().length;if(g&&p.parent&&!(0,vr.canTextBeChildOfNode)(p.parent)||e.trim&&g)continue;n.push(i(p.data,p,c));continue}var y=p,v={};AD(y)?((0,vr.setStyleProp)(y.attribs.style,y.attribs),v=y.attribs):y.attribs&&(v=(0,xD.default)(y.attribs,y.name));var d=void 0;switch(p.type){case"script":case"style":p.children[0]&&(v.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?v.defaultValue=p.children[0].data:p.children&&p.children.length&&(d=sf(p.children,e));break;default:continue}l>1&&(v.key=c),n.push(i(a(p.name,v,d),p,c))}return n.length===1?n[0]:n}function AD(t){return vr.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,vr.isCustomComponent)(t.name,t.attribs)}(function(t){var e=We&&We.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=a;var n=e(Yo);t.htmlToDOM=n.default;var r=e(hi);t.attributesToProps=r.default;var i=e(ls);t.domToReact=i.default;var o=Qo;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function a(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||s),l):[]}})(Ac);const af=Or(Ac),LD=af.default||af,fs=t=>{if(typeof t=="string")return{text:t||""};function e(i){return i.map(o=>fs(o))}const n=Array.isArray(t.props.children)?e(t.props.children):[{text:t.props.children}],r=typeof t.props.children=="string"?t.props.children:"";switch(t.type){case"p":return{type:"paragraph",children:n};case"blockquote":return{type:"blockQuote",children:n};case"ul":return{type:"bulletedList",children:n};case"h1":return{type:"headingOne",children:n};case"h2":return{type:"headingTwo",children:n};case"li":return{type:"listItem",children:n};case"ol":return{type:"numberedList",children:n};case"strong":return{type:"paragraph",text:r,bold:!0};case"code":return{text:r,code:!0};case"em":return{text:r,italic:!0};case"u":return{text:r,underline:!0};default:return{text:r}}},OD=t=>{const e=LD(t);return Array.isArray(e)?e.flatMap(n=>typeof n=="string"?{text:n}:fs(n)):typeof e=="string"?[{text:e}]:[fs(e)]};function uf(t){return t.map(e=>ne.string(e)).join("")}const lf=t=>{if(ce.isText(t)){let e=t.text;return t.bold&&(e=`<strong>${e}</strong>`),t.code&&(e=`<code>${e}</code>`),t.italic&&(e=`<em>${e}</em>`),t.underline&&(e=`<u>${e}</u>`),e}if(ue.isElement(t)){const e=t.children.map(n=>lf(n)).join("");switch(t.type){case"paragraph":return`<p>${e}</p>`;case"blockQuote":return`<blockquote>${e}</blockquote>`;case"bulletedList":return`<ul>${e}</ul>`;case"headingOne":return`<h1>${e}</h1>`;case"headingTwo":return`<h2>${e}</h2>`;case"listItem":return`<li>${e}</li>`;case"numberedList":return`<ol>${e}</ol>`;default:return e}}return""},cf=t=>t.children.map(e=>lf(e)).join(""),ff=t=>/<\/?[a-z][\s\S]*>/i.test(t);function PD({name:t,defaultValue:e,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:i=2e3,onValueChange:o,onChange:s,isError:a}){const u=f.useMemo(()=>fm(DC(um())),[]),{id:l,inputRef:c,error:p}=yt(),h=f.useRef(null),g=ff(e)?OD(e):xC,y=uf(g),[v,d]=f.useState(y.length),[D,B]=f.useState(ff(e)?e:""),[b,O]=f.useState(!1),E=c||h,w=a||!!p,A=f.useCallback(wC,[]),F=f.useCallback(bC,[]);function R(T){const N=uf(T);d(N.length),r&&r(N.length),!(n&&N.length>=i)&&(B(cf(u)),s&&s(T),o&&o(cf(u)),u.children=T,Q.setNodes(u,{children:T}))}const P=b?"focusTrue":"focusFalse",I=`arkynRichText ${w||i<v?"errorTrue":"errorFalse"} ${P}`,j=i-v;return x.jsxs(yC,{editor:u,initialValue:g,onChange:R,onValueChange:R,children:[x.jsxs("div",{className:I,children:[x.jsxs(BC,{children:[x.jsx(wn,{format:"headingOne",icon:Oe.Heading1}),x.jsx(wn,{format:"headingTwo",icon:Oe.Heading2}),x.jsx(wn,{format:"blockQuote",icon:Oe.Quote}),x.jsx(oi,{format:"bold",icon:Oe.Bold}),x.jsx(oi,{format:"italic",icon:Oe.Italic}),x.jsx(oi,{format:"underline",icon:Oe.Underline}),x.jsx(oi,{format:"code",icon:Oe.Code}),x.jsx(wn,{format:"left",icon:Oe.AlignLeft}),x.jsx(wn,{format:"right",icon:Oe.AlignRight}),x.jsx(wn,{format:"center",icon:Oe.AlignCenter}),x.jsx(wn,{format:"justify",icon:Oe.AlignJustify})]}),x.jsx(lC,{className:"editorContainer",renderElement:F,renderLeaf:A,spellCheck:!0,id:l,onFocus:()=>O(!0),onBlur:()=>O(!1),onKeyDown:T=>{for(const N in Sc)if(Ph(N,T)){T.preventDefault();const K=Sc[N];xc(u,K)}}}),j<0&&x.jsx("div",{className:"restatesCharacters",children:j})]}),x.jsx("input",{ref:E,type:"hidden",name:t,value:D}),x.jsx("input",{type:"hidden",name:`${t}Count`,value:v})]})}function FD(t,e){const{isLoading:n,isError:r,size:i="md",className:o="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:c,onFocus:p,onBlur:h,title:g,style:y,closeOnSelect:v=!0,...d}=t,E=`arkyn_select ${a?"hasPrefix":""} ${s} ${i} ${l||c||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${o}`,A={md:20,lg:20}[i];return{isLoading:n,className:E,prefix:Pd(a,A,"prefix"),LeftIcon:u,disabled:l||n||c,onFocus:p,onBlur:h,title:g,closeOnSelect:v,style:y,iconSize:A,Spinner:x.jsx(Oe.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function MD(t){var J;const[e,n]=f.useState(!1),{inputRef:r,id:i,error:o}=yt(),s=f.useRef(null),a=r||s,u=t.isError||!!o,{disabled:l,title:c,style:p,className:h,prefix:g,iconSize:y,isLoading:v,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:b,onBlur:O,Spinner:E,name:w,placeholder:A,onSelect:F,options:R,optionMaxHeight:P,closeOnSelect:z,...I}=FD({...t,id:i,isError:u},e),[j,T]=f.useState(B);function N(){l||!(a!=null&&a.current)||e||(n(!0),a.current.focus())}function K(q){e||(n(!0),b&&b(q))}function _(){n(!1),O&&a.current&&a.current.blur()}function ie(q){const{label:ee,value:Y}=q;T(j!==Y?Y:""),F&&F({label:ee,value:Y}),z&&_()}const re=typeof D=="string"?D:j,k=((J=R.find(q=>q.value===re))==null?void 0:J.label)||"",H=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{title:c,style:p,onClick:N,className:`${h} placeholder_dark_${H()}`,children:[g,d&&x.jsx(d,{size:y,strokeWidth:2.5}),x.jsx("input",{disabled:l,readOnly:!0,placeholder:k||A,onFocus:K,...I}),x.jsx("input",{type:"hidden",ref:a,name:w,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[R.map(({label:q,value:ee})=>x.jsxs("div",{onClick:()=>ie({label:q,value:ee}),className:re===ee?"arkyn_select_option active":"arkyn_select_option",children:[q," ",x.jsx(Oe.Check,{})]},ee)),R.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&x.jsx(Oe.ChevronDown,{className:"arkyn_select_arrow",size:y,strokeWidth:2.5}),v&&E]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function kD(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:o="",name:s,className:a="",onCheck:u,...l}=t,[c,p]=f.useState(n),{id:h,inputRef:g}=yt(),y=typeof r=="boolean"?r:c;function v(){p(!c),u&&u(y?o:i||"checked")}const D=`arkynSwitch ${y?"checkedTrue":"checkedFalse"} ${e} ${a}`;return x.jsx("button",{type:"button",onClick:v,className:D,...l,children:x.jsx("input",{id:h,type:"hidden",name:s,ref:g,onClick:v,value:y?i||"checked":o})})}function TD(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:o=!1,onFocus:s,onBlur:a,title:u,style:l,...c}=t,[p,h]=f.useState(!1),{inputRef:g,id:y,error:v}=yt(),d=f.useRef(null),D=g||d,b=t.isError||!!v?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${i||o?"opacityTrue":"opacityFalse"} ${b} ${p?"focusedTrue":"focusedFalse"} ${r}`;function A(){i||!(D!=null&&D.current)||(h(!0),D.current.focus())}function F(P){h(!0),s&&s(P)}function R(P){h(!1),a&&a(P)}return x.jsx("section",{title:u,style:l,onClick:A,className:w,children:x.jsx("textarea",{id:y,disabled:i,readOnly:o,ref:D,onFocus:F,onBlur:R,...c})})}function ID(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function jD(t){const{pathname:e}=Ot.useLocation(),{className:n="",disabled:r=!1,children:i,to:o,...s}=t,u=`arkynBreadcrumbLink ${e===o?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Oe.ChevronRight,{size:14,strokeWidth:2.5}),i]}):x.jsxs(Ot.Link,{to:o,className:u,...s,children:[x.jsx(Oe.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ds(t=""){const e=Ot.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=o=>{Object.entries(o).forEach(([s,a])=>{a===void 0?n.delete(`${r}${s}`):n.set(`${r}${s}`,String(a))})};return{getParam:o=>n.get(`${r}${o}`),getScopedSearch:o=>{i(o);let s=n.toString();return s&&(s="?"+s),s}}}function ND(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:o=2,...s}=t,a=Ot.useNavigate(),{getParam:u,getScopedSearch:l}=ds(e),c=Number(u(i))||1,p=Number(u(r))||20,h=Math.ceil(n/p),g=Od(c,o),y=Ld(c,o,h);function v(d){a(l({page:d}))}return x.jsxs("div",{className:"arkynPagination",...s,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:c<=1,onClick:()=>v(c-1),children:x.jsx(Oe.ChevronLeft,{})}),c>1+o&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),c>2+o&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Oe.Ellipsis,{})})]}),g.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),x.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:c}),y.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),c+o<h&&x.jsxs(x.Fragment,{children:[c+1+o<h&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Oe.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(h),children:h})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:c>=h,onClick:()=>v(c+1),children:x.jsx(Oe.ChevronRight,{})})]})}const ps=f.createContext({});function _D(){if(!ps)throw new Error("useTabContext must be used within a TabProvider");return f.useContext(ps)}function zD(t){const{children:e,onClick:n,defaultActive:r,className:i,...o}=t,[s,a]=f.useState(r||""),[u,l]=f.useState(!0),c=f.useRef(null),p=`arkynTabContainer ${i||""}`,[h,g]=f.useState({width:"0px",left:"0px",transition:"none"}),y=(d,D)=>{const B=d.getBoundingClientRect(),b=c.current.getBoundingClientRect(),O=D?void 0:"none";l(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-b.left}px`})};f.useEffect(()=>{const d=c.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&y(D)},[]);const v=d=>{const D=d.target;D&&(a(D.value),D.classList.add("activeTrue"),y(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:c,className:p.trim(),...o,children:[x.jsx(ps.Provider,{value:{handleTabClick:v,showInitialTab:u,value:s},children:e}),x.jsx("div",{className:"activeLine",style:h})]})}function WD(t){const{children:e,className:n="",onClick:r,...i}=t,{value:o,showInitialTab:s,handleTabClick:a}=_D(),u=o===i.value&&o?"activeTrue":"activeFalse",c=`arkynTabButton ${o===i.value&&s?"showBorderBottom":""} ${u} ${n}`;function p(h){a(h),r&&r(h)}return x.jsx("button",{onClick:p,className:c.trim(),...i,children:e})}const df=f.createContext({});function UD(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:o,...s}=t,a=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${o}`;return x.jsx(df.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:l.trim(),...s,children:[x.jsx(cn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:i})]})})})}function HD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(df),s=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:o,"aria-label":"Close drawer",children:x.jsx(Oe.X,{size:24})})]})}const pf=f.createContext({});function RD(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...o}=t,a=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(pf.Provider,{value:{makeInvisible:n},children:x.jsx(cn.AnimatePresence,{children:e&&x.jsxs("aside",{className:a.trim(),...o,children:[x.jsx(cn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(cn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function VD(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function qD(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:o}=f.useContext(pf),s=`arkynModalHeader ${n}`;return x.jsxs("header",{className:s.trim(),...i,children:[r,e&&x.jsx("button",{type:"button",onClick:o,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Oe.X,{size:24})})]})}function GD(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[o,s]=f.useState(!1),u=`arkynPopover ${i} ${o?"visibleTrue":"visibleFalse"}`;function l(){o||s(!0)}return x.jsxs("div",{className:u,onClick:l,children:[n,x.jsx(cn.motion.div,{style:{visibility:o?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:o?1:0},exit:{opacity:0},onClick:()=>r&&s(!1),className:"arkynPopoverContent",children:e}),o&&x.jsx("div",{onClick:()=>s(!1),className:"arkynPopoverOverlay"})]})}function ZD(t){const{message:e,type:n}=t,r=`arkynToast ${n}}`;function i(){switch(n){case"success":return x.jsx(Oe.CheckCircle2,{});case"danger":return x.jsx(Oe.XCircle,{});default:return x.jsx(Oe.Info,{})}}return x.jsxs("div",{className:r,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(i,{})]}),x.jsx("p",{children:x.jsx("span",{children:e})})]})}function YD(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:o="",...s}=t,a=`arkynTooltip ${n} ${i} ${o}`;return x.jsxs("div",{className:a.trim(),...s,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var Qe={},hs={},gr={},mr={},hf="Expected a function",vf=NaN,KD="[object Symbol]",XD=/^\s+|\s+$/g,JD=/^[-+]0x[0-9a-f]+$/i,QD=/^0b[01]+$/i,$D=/^0o[0-7]+$/i,eE=parseInt,tE=typeof We=="object"&&We&&We.Object===Object&&We,nE=typeof self=="object"&&self&&self.Object===Object&&self,rE=tE||nE||Function("return this")(),iE=Object.prototype,oE=iE.toString,sE=Math.max,aE=Math.min,vs=function(){return rE.Date.now()};function uE(t,e,n){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(hf);e=gf(e)||0,Ci(n)&&(c=!!n.leading,p="maxWait"in n,o=p?sE(gf(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function g(w){var A=r,F=i;return r=i=void 0,l=w,s=t.apply(F,A),s}function y(w){return l=w,a=setTimeout(D,e),c?g(w):s}function v(w){var A=w-u,F=w-l,R=e-A;return p?aE(R,o-F):R}function d(w){var A=w-u,F=w-l;return u===void 0||A>=e||A<0||p&&F>=o}function D(){var w=vs();if(d(w))return B(w);a=setTimeout(D,v(w))}function B(w){return a=void 0,h&&r?g(w):(r=i=void 0,s)}function b(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function O(){return a===void 0?s:B(vs())}function E(){var w=vs(),A=d(w);if(r=arguments,i=this,u=w,A){if(a===void 0)return y(u);if(p)return a=setTimeout(D,e),g(u)}return a===void 0&&(a=setTimeout(D,e)),s}return E.cancel=b,E.flush=O,E}function lE(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(hf);return Ci(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),uE(t,e,{leading:r,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function cE(t){return!!t&&typeof t=="object"}function fE(t){return typeof t=="symbol"||cE(t)&&oE.call(t)==KD}function gf(t){if(typeof t=="number")return t;if(fE(t))return vf;if(Ci(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ci(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(XD,"");var n=QD.test(t);return n||$D.test(t)?eE(t.slice(2),n?2:8):JD.test(t)?vf:+t}var dE=lE,yr={};Object.defineProperty(yr,"__esModule",{value:!0}),yr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),Di.has(n)||Di.set(n,new Set);var o=Di.get(n);if(!o.has(i)){var s=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,u)}catch{}return a}();e.addEventListener(n,r,s?{passive:!0}:!1),o.add(i)}},yr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Di.get(n).delete(r.name||n)};var Di=new Map;Object.defineProperty(mr,"__esModule",{value:!0});var pE=dE,hE=gE(pE),vE=yr;function gE(t){return t&&t.__esModule?t:{default:t}}var mE=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,hE.default)(e,n)},Ye={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=mE(function(i){Ye.scrollHandler(e)},n);Ye.scrollSpyContainers.push(e),(0,vE.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Ye.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Ye.currentPositionX(e),Ye.currentPositionY(e))})},addStateHandler:function(e){Ye.spySetState.push(e)},addSpyHandler:function(e,n){var r=Ye.scrollSpyContainers[Ye.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Ye.currentPositionX(n),Ye.currentPositionY(n))},updateStates:function(){Ye.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Ye.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Ye.spySetState&&Ye.spySetState.length&&Ye.spySetState.indexOf(e)>-1&&Ye.spySetState.splice(Ye.spySetState.indexOf(e),1),document.removeEventListener("scroll",Ye.scrollHandler)},update:function(){return Ye.scrollSpyContainers.forEach(function(e){return Ye.scrollHandler(e)})}};mr.default=Ye;var Nn={},Cr={};Object.defineProperty(Cr,"__esModule",{value:!0});var yE=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",o=window&&window.location,s=i?o.pathname+o.search+i:o.pathname+o.search;n?history.pushState(history.state,"",s):history.replaceState(history.state,"",s)},CE=function(){return window.location.hash.replace(/^#/,"")},DE=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},EE=function(e){return getComputedStyle(e).position!=="static"},gs=function(e,n){for(var r=e.offsetTop,i=e.offsetParent;i&&!n(i);)r+=i.offsetTop,i=i.offsetParent;return{offsetTop:r,offsetParent:i}},bE=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(EE(e)){if(n.offsetParent!==e){var i=function(c){return c===e||c===document},o=gs(n,i),s=o.offsetTop,a=o.offsetParent;if(a!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return s}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(c){return c===document};return gs(n,u).offsetTop-gs(e,u).offsetTop};Cr.default={updateHash:yE,getHash:CE,filterElementInContainer:DE,scrollOffset:bE};var Ei={},ms={};Object.defineProperty(ms,"__esModule",{value:!0}),ms.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var ys={};Object.defineProperty(ys,"__esModule",{value:!0});var wE=yr,BE=["mousedown","mousewheel","touchmove","keydown"];ys.default={subscribe:function(e){return typeof document<"u"&&BE.forEach(function(n){return(0,wE.addPassiveEventListener)(document,n,e)})}};var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});var Cs={registered:{},scrollEvent:{register:function(e,n){Cs.registered[e]=n},remove:function(e){Cs.registered[e]=null}}};Dr.default=Cs,Object.defineProperty(Ei,"__esModule",{value:!0});var xE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},SE=Cr;bi(SE);var AE=ms,mf=bi(AE),LE=ys,OE=bi(LE),PE=Dr,Mt=bi(PE);function bi(t){return t&&t.__esModule?t:{default:t}}var yf=function(e){return mf.default[e.smooth]||mf.default.defaultEasing},FE=function(e){return typeof e=="function"?e:function(){return e}},ME=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Ds=function(){return ME()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Cf=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},Df=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},Ef=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},kE=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,i=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},TE=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,i=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},IE=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:e(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var o=t.bind(null,e,n);Ds.call(window,o);return}Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPosition)},Es=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},Er=function(e,n,r,i){n.data=n.data||Cf(),window.clearTimeout(n.data.delayTimeout);var o=function(){n.data.cancel=!0};if(OE.default.subscribe(o),Es(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Df(n):Ef(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Mt.default.registered.end&&Mt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=FE(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=i;var s=yf(n),a=IE.bind(null,s,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),Ds.call(window,a)},wi=function(e){return e=xE({},e),e.data=e.data||Cf(),e.absolute=!0,e},jE=function(e){Er(0,wi(e))},NE=function(e,n){Er(e,wi(n))},_E=function(e){e=wi(e),Es(e),Er(e.horizontal?kE(e):TE(e),e)},zE=function(e,n){n=wi(n),Es(n);var r=n.horizontal?Df(n):Ef(n);Er(e+r,n)};Ei.default={animateTopScroll:Er,getAnimationType:yf,scrollToTop:jE,scrollToBottom:_E,scrollTo:NE,scrollMore:zE},Object.defineProperty(Nn,"__esModule",{value:!0});var WE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},UE=Cr,HE=bs(UE),RE=Ei,VE=bs(RE),qE=Dr,Bi=bs(qE);function bs(t){return t&&t.__esModule?t:{default:t}}var xi={},bf=void 0;Nn.default={unmount:function(){xi={}},register:function(e,n){xi[e]=n},unregister:function(e){delete xi[e]},get:function(e){return xi[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return bf=e},getActiveLink:function(){return bf},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=WE({},n,{absolute:!1});var i=n.containerId,o=n.container,s=void 0;i?s=document.getElementById(i):o&&o.nodeType?s=o:s=document,n.absolute=!0;var a=n.horizontal,u=HE.default.scrollOffset(s,r,a)+(n.offset||0);if(!n.smooth){Bi.default.registered.begin&&Bi.default.registered.begin(e,r),s===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):s.scrollTop=u,Bi.default.registered.end&&Bi.default.registered.end(e,r);return}VE.default.animateTopScroll(u,n,e,r)}};var ws={exports:{}},Si={exports:{}},_e={};/** @license React v16.13.1
|
361
|
+
`)&&f===l.textContent.length&&f--;var S=re.toSlatePoint(e,[a,u],{exactMatch:o,suppressThrow:i});if(!S)return null;var D=wm(a,l)||a===l&&f<u,M=d?S:re.toSlatePoint(e,[l,f],{exactMatch:o,suppressThrow:i,searchDirection:D?"forward":"backward"});if(!M)return null;var b={anchor:S,focus:M};return te.isExpanded(b)&&te.isForward(b)&&kn(l)&&x.void(e,{at:b.focus,mode:"highest"})&&(b=x.unhangRange(e,b,{voids:!0})),b}};function dB(e,t){var{path:n,diff:r}=t;if(!x.hasPath(e,n))return!1;var o=ge.get(e,n);if(!xe.isText(o))return!1;if(r.start!==o.text.length||r.text.length===0)return o.text.slice(r.start,r.start+r.text.length)===r.text;var i=U.next(n);if(!x.hasPath(e,i))return!1;var s=ge.get(e,i);return xe.isText(s)&&s.text.startsWith(r.text)}function Dm(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((o,i)=>o.slice(0,i.start)+i.text+o.slice(i.end),e)}function pB(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return n}function hB(e,t,n){for(var r=Math.min(e.length,t.length,n),o=0;o<r;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return r}function xm(e,t){var{start:n,end:r,text:o}=t,i=e.slice(n,r),s=pB(i,o),a=Math.min(i.length-s,o.length-s),u=hB(i,o,a),l={start:n+s,end:r-u,text:o.slice(s,o.length-u)};return l.start===l.end&&l.text.length===0?null:l}function gB(e,t,n){var r=Math.min(t.start,n.start),o=Math.max(0,Math.min(t.start+t.text.length,n.end)-n.start),i=Dm(e,t,n),s=Math.max(n.start+n.text.length,t.start+t.text.length+(t.start+t.text.length>n.start?n.text.length:0)-o),a=i.slice(r,s),u=Math.max(t.end,n.end-t.text.length+(t.end-t.start));return xm(e,{start:r,end:u,text:a})}function vB(e){var{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Fl(e,t){var{path:n,offset:r}=t;if(!x.hasPath(e,n))return null;var o=ge.get(e,n);if(!xe.isText(o))return null;var i=x.above(e,{match:a=>De.isElement(a)&&x.isBlock(e,a),at:n});if(!i)return null;for(;r>o.text.length;){var s=x.next(e,{at:n,match:xe.isText});if(!s||!U.isDescendant(s[1],i[1]))return null;r-=o.text.length,o=s[0],n=s[1]}return{path:n,offset:r}}function Sm(e,t){var n=Fl(e,t.anchor);if(!n)return null;if(te.isCollapsed(t))return{anchor:n,focus:n};var r=Fl(e,t.focus);return r?{anchor:n,focus:r}:null}function Il(e,t,n){var r=nn.get(e),o=r==null?void 0:r.find(f=>{var{path:d}=f;return U.equals(d,t.path)});if(!o||t.offset<=o.diff.start)return He.transform(t,n,{affinity:"backward"});var{diff:i}=o;if(t.offset<=i.start+i.text.length){var s={path:t.path,offset:i.start},a=He.transform(s,n,{affinity:"backward"});return a?{path:a.path,offset:a.offset+t.offset-i.start}:null}var u={path:t.path,offset:t.offset-i.text.length+i.end-i.start},l=He.transform(u,n,{affinity:"backward"});return l?n.type==="split_node"&&U.equals(n.path,t.path)&&u.offset<n.position&&i.start<n.position?l:{path:l.path,offset:l.offset+i.text.length-i.end+i.start}:null}function Lm(e,t,n){var r=Il(e,t.anchor,n);if(!r)return null;if(te.isCollapsed(t))return{anchor:r,focus:r};var o=Il(e,t.focus,n);return o?{anchor:r,focus:o}:null}function mB(e,t){var{path:n,diff:r,id:o}=e;switch(t.type){case"insert_text":return!U.equals(t.path,n)||t.offset>=r.end?e:t.offset<=r.start?{diff:{start:t.text.length+r.start,end:t.text.length+r.end,text:r.text},id:o,path:n}:{diff:{start:r.start,end:r.end+t.text.length,text:r.text},id:o,path:n};case"remove_text":return!U.equals(t.path,n)||t.offset>=r.end?e:t.offset+t.text.length<=r.start?{diff:{start:r.start-t.text.length,end:r.end-t.text.length,text:r.text},id:o,path:n}:{diff:{start:r.start,end:r.end-t.text.length,text:r.text},id:o,path:n};case"split_node":return!U.equals(t.path,n)||t.position>=r.end?{diff:r,id:o,path:U.transform(n,t,{affinity:"backward"})}:t.position>r.start?{diff:{start:r.start,end:Math.min(t.position,r.end),text:r.text},id:o,path:n}:{diff:{start:r.start-t.position,end:r.end-t.position,text:r.text},id:o,path:U.transform(n,t,{affinity:"forward"})};case"merge_node":return U.equals(t.path,n)?{diff:{start:r.start+t.position,end:r.end+t.position,text:r.text},id:o,path:U.transform(n,t)}:{diff:r,id:o,path:U.transform(n,t)}}var i=U.transform(n,t);return i?{diff:r,path:i,id:o}:null}function Om(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Fs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Om(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Om(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var yB=25,bB=200,CB=function(){},EB=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function wB(e){var{editor:t,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=e,o=!1,i=null,s=null,a=null,u=0,l=!1,f=()=>{var _=Er.get(t);if(Er.delete(t),_){var{selection:R}=t,F=Sm(t,_);F&&(!R||!te.equals(F,R))&&ue.select(t,F)}},d=()=>{var _=Cr.get(t);if(Cr.delete(t),!!_){if(_.at){var R=He.isPoint(_.at)?Fl(t,_.at):Sm(t,_.at);if(!R)return;var F=x.range(t,R);(!t.selection||!te.equals(t.selection,F))&&ue.select(t,R)}_.run()}},h=()=>{if(s&&(clearTimeout(s),s=null),a&&(clearTimeout(a),a=null),!M()&&!D()){f();return}o||(o=!0,setTimeout(()=>o=!1)),D()&&(o="action");var _=t.selection&&x.rangeRef(t,t.selection,{affinity:"forward"});Jn.set(t,t.marks),CB("flush",Cr.get(t),nn.get(t));for(var R=M(),F;F=(N=nn.get(t))===null||N===void 0?void 0:N[0];){var N,Y,I=Mn.get(t);I!==void 0&&(Mn.delete(t),t.marks=I),I&&l===!1&&(l=null);var Q=vB(F);(!t.selection||!te.equals(t.selection,Q))&&ue.select(t,Q),F.diff.text?x.insertText(t,F.diff.text):x.deleteFragment(t),nn.set(t,(Y=nn.get(t))===null||Y===void 0?void 0:Y.filter(T=>{var{id:Z}=T;return Z!==F.id})),dB(t,F)||(R=!1,Cr.delete(t),Jn.delete(t),o="action",Er.delete(t),n.cancel(),r.cancel(),_==null||_.unref())}var ne=_==null?void 0:_.unref();if(ne&&!Er.get(t)&&(!t.selection||!te.equals(ne,t.selection))&&ue.select(t,ne),D()){d();return}R&&n(),n.flush(),r.flush(),f();var k=Jn.get(t);Jn.delete(t),k!==void 0&&(t.marks=k,t.onChange())},v=_=>{i&&clearTimeout(i),i=setTimeout(()=>{Kr.set(t,!1),h()},yB)},m=_=>{Kr.set(t,!0),i&&(clearTimeout(i),i=null)},g=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,F=Ol.get(t);if(F){if(M()||R){F.style.display="none";return}F.style.removeProperty("display")}},p=(_,R)=>{var F,N=(F=nn.get(t))!==null&&F!==void 0?F:[];nn.set(t,N);var Y=ge.leaf(t,_),I=N.findIndex(k=>U.equals(k.path,_));if(I<0){var Q=xm(Y.text,R);Q&&N.push({path:_,diff:R,id:u++}),g();return}var ne=gB(Y.text,N[I].diff,R);if(!ne){N.splice(I,1),g();return}N[I]=Fs(Fs({},N[I]),{},{diff:ne})},E=function(R){var{at:F}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,Er.delete(t),n.cancel(),r.cancel(),D()&&h(),Cr.set(t,{at:F,run:R}),a=setTimeout(h)},S=_=>{var R;s&&(clearTimeout(s),s=null);var{inputType:F}=_,N=null,Y=_.dataTransfer||_.data||void 0;l!==!1&&F!=="insertText"&&F!=="insertCompositionText"&&(l=!1);var[I]=_.getTargetRanges();I&&(N=re.toSlateRange(t,I,{exactMatch:!1,suppressThrow:!0}));var Q=re.getWindow(t),ne=Q.getSelection();if(!N&&ne&&(I=ne,N=re.toSlateRange(t,ne,{exactMatch:!1,suppressThrow:!0})),N=(R=N)!==null&&R!==void 0?R:t.selection,!!N){var k=!0;if(F.startsWith("delete")){if(te.isExpanded(N)){var[T,Z]=te.edges(N),$=ge.leaf(t,T.path);if($.text.length===T.offset&&Z.offset===0){var K=x.next(t,{at:T.path,match:xe.isText});K&&U.equals(K[1],Z.path)&&(N={anchor:Z,focus:Z})}}var G=F.endsWith("Backward")?"backward":"forward",[y,z]=te.edges(N),[W,B]=x.leaf(t,y.path),X={text:"",start:y.offset,end:z.offset},ee=nn.get(t),j=ee==null?void 0:ee.find(Xe=>U.equals(Xe.path,B)),se=j?[j.diff,X]:[X],ae=Dm(W.text,...se);if(ae.length===0&&(k=!1),te.isExpanded(N)){if(k&&U.equals(N.anchor.path,N.focus.path)){var fe={path:N.anchor.path,offset:y.offset},he=x.range(t,fe,fe);return L(he),p(N.anchor.path,{text:"",end:z.offset,start:y.offset})}return E(()=>x.deleteFragment(t,{direction:G}),{at:N})}}switch(F){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return E(()=>x.deleteFragment(t),{at:N});case"deleteContent":case"deleteContentForward":{var{anchor:be}=N;if(k&&te.isCollapsed(N)){var ve=ge.leaf(t,be.path);if(be.offset<ve.text.length)return p(be.path,{text:"",start:be.offset,end:be.offset+1})}return E(()=>x.deleteForward(t),{at:N})}case"deleteContentBackward":{var me,{anchor:le}=N,Me=Tl(I)?I.isCollapsed:!!((me=I)!==null&&me!==void 0&&me.collapsed);return k&&Me&&te.isCollapsed(N)&&le.offset>0?p(le.path,{text:"",start:le.offset-1,end:le.offset}):E(()=>x.deleteBackward(t),{at:N})}case"deleteEntireSoftLine":return E(()=>{x.deleteBackward(t,{unit:"line"}),x.deleteForward(t,{unit:"line"})},{at:N});case"deleteHardLineBackward":return E(()=>x.deleteBackward(t,{unit:"block"}),{at:N});case"deleteSoftLineBackward":return E(()=>x.deleteBackward(t,{unit:"line"}),{at:N});case"deleteHardLineForward":return E(()=>x.deleteForward(t,{unit:"block"}),{at:N});case"deleteSoftLineForward":return E(()=>x.deleteForward(t,{unit:"line"}),{at:N});case"deleteWordBackward":return E(()=>x.deleteBackward(t,{unit:"word"}),{at:N});case"deleteWordForward":return E(()=>x.deleteForward(t,{unit:"word"}),{at:N});case"insertLineBreak":return E(()=>x.insertSoftBreak(t),{at:N});case"insertParagraph":return E(()=>x.insertBreak(t),{at:N});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(EB(Y))return E(()=>re.insertData(t,Y),{at:N});var oe=Y??"";if(Mn.get(t)&&(oe=oe.replace("\uFEFF","")),F==="insertText"&&/.*\n.*\n$/.test(oe)&&(oe=oe.slice(0,-1)),oe.includes(`
|
362
|
+
`))return E(()=>{var Xe=oe.split(`
|
363
|
+
`);Xe.forEach((Ce,ht)=>{Ce&&x.insertText(t,Ce),ht!==Xe.length-1&&x.insertSoftBreak(t)})},{at:N});if(U.equals(N.anchor.path,N.focus.path)){var[Ae,ie]=te.edges(N),Se={start:Ae.offset,end:ie.offset,text:oe};if(oe&&l&&F==="insertCompositionText"){var Be=l.start+l.text.search(/\S|$/),Re=Se.start+Se.text.search(/\S|$/);Re===Be+1&&Se.end===l.start+l.text.length?(Se.start-=1,l=null,P()):l=!1}else F==="insertText"?l===null?l=Se:l&&te.isCollapsed(N)&&l.end+l.text.length===Ae.offset?l=Fs(Fs({},l),{},{text:l.text+oe}):l=!1:l=!1;if(k){p(Ae.path,Se);return}}return E(()=>x.insertText(t,oe),{at:N})}}}},D=()=>!!Cr.get(t),M=()=>{var _;return!!((_=nn.get(t))!==null&&_!==void 0&&_.length)},b=()=>D()||M(),w=()=>o,L=_=>{Er.set(t,_),s&&(clearTimeout(s),s=null);var{selection:R}=t;if(_){var F=!R||!U.equals(R.anchor.path,_.anchor.path),N=!R||!U.equals(R.anchor.path.slice(0,-1),_.anchor.path.slice(0,-1));(F&&l||N)&&(l=!1),(F||M())&&(s=setTimeout(h,bB))}},O=()=>{(D()||!M())&&h()},H=_=>{M()||(g(!0),setTimeout(g))},P=()=>{D()||(a=setTimeout(h))},V=_=>{if(!(M()||D())&&_.some(F=>Al(t,F,_))){var R;(R=vm.get(t))===null||R===void 0||R()}};return{flush:h,scheduleFlush:P,hasPendingDiffs:M,hasPendingAction:D,hasPendingChanges:b,isFlushing:w,handleUserSelect:L,handleCompositionEnd:v,handleCompositionStart:m,handleDOMBeforeInput:S,handleKeyDown:H,handleDomMutations:V,handleInput:O}}function DB(){var e=c.useRef(!1);return c.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var ti=Ms?c.useLayoutEffect:c.useEffect;function xB(e,t,n){var[r]=c.useState(()=>new MutationObserver(t));ti(()=>{r.takeRecords()}),c.useEffect(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}var SB=["node"];function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function LB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?km(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var OB={subtree:!0,childList:!0,characterData:!0},kB=Zt?e=>{var{node:t}=e,n=ao(e,SB);if(!Zt)return null;var r=mr(),o=DB(),[i]=c.useState(()=>wB(LB({editor:r},n)));return xB(t,i.handleDomMutations,OB),Ml.set(r,i.scheduleFlush),o&&i.flush(),i}:()=>null,PB=["anchor","focus"],MB=["anchor","focus"],BB=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),Pm=(e,t)=>{var n=ao(e,PB),r=ao(t,MB);return e[lo]===t[lo]&&BB(n,r)},TB=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(!te.equals(r,o)||!Pm(r,o))return!1}return!0},AB=(e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],o=t[n];if(r.anchor.offset!==o.anchor.offset||r.focus.offset!==o.focus.offset||!Pm(r,o))return!1}return!0};function Mm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function FB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mm(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var IB=e=>{var{isLast:t,leaf:n,parent:r,text:o}=e,i=mr(),s=re.findPath(i,o),a=U.parent(s),u=!!n[mm];return i.isVoid(r)?c.createElement(_l,{length:ge.string(r).length}):n.text===""&&r.children[r.children.length-1]===o&&!i.isInline(r)&&x.string(i,a)===""?c.createElement(_l,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?c.createElement(_l,{isMarkPlaceholder:u}):t&&n.text.slice(-1)===`
|
364
|
+
`?c.createElement(Bm,{isTrailing:!0,text:n.text}):c.createElement(Bm,{text:n.text})},Bm=e=>{var{text:t,isTrailing:n=!1}=e,r=c.useRef(null),o=()=>"".concat(t??"").concat(n?`
|
365
|
+
`:""),[i]=c.useState(o);return ti(()=>{var s=o();r.current&&r.current.textContent!==s&&(r.current.textContent=s)}),c.createElement(_B,{ref:r},i)},_B=c.memo(c.forwardRef((e,t)=>c.createElement("span",{"data-slate-string":!0,ref:t},e.children))),_l=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,o={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(o["data-slate-mark-placeholder"]=!0),c.createElement("span",FB({},o),!(Zt||dm)||!n?"\uFEFF":null,n?c.createElement("br",null):null)};function Tm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Am(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tm(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var RB=Zt?300:0;function jB(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function Fm(e){e.current&&(clearTimeout(e.current),e.current=null)}var NB=e=>{var{leaf:t,isLast:n,text:r,parent:o,renderPlaceholder:i,renderLeaf:s=S=>c.createElement($B,Am({},S))}=e,a=mr(),u=c.useRef(null),l=c.useRef(null),[f,d]=c.useState(!1),h=c.useRef(null),v=c.useCallback(S=>{if(jB(u,S==null),S==null){var D;Ol.delete(a),(D=t.onPlaceholderResize)===null||D===void 0||D.call(t,null)}else{if(Ol.set(a,S),!u.current){var M=window.ResizeObserver||HM;u.current=new M(()=>{var b;(b=t.onPlaceholderResize)===null||b===void 0||b.call(t,S)})}u.current.observe(S),l.current=S}},[l,t,a]),m=c.createElement(IB,{isLast:n,leaf:t,parent:o,text:r}),g=!!t[lo];if(c.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{d(!0),h.current=null},RB)):(Fm(h),d(!1)),()=>Fm(h)),[g,d]),g&&f){var p={children:t.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:Zr?"inherit":void 0},contentEditable:!1,ref:v}};m=c.createElement(c.Fragment,null,i(p),m)}var E={"data-slate-leaf":!0};return s({attributes:E,children:m,leaf:t,text:r})},zB=c.memo(NB,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&xe.equals(t.leaf,e.leaf)&&t.leaf[lo]===e.leaf[lo]),$B=e=>{var{attributes:t,children:n}=e;return c.createElement("span",Am({},t),n)},UB=e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:o,renderLeaf:i,text:s}=e,a=mr(),u=c.useRef(null),l=xe.decorations(s,t),f=re.findKey(a,s),d=[],h=0;h<l.length;h++){var v=l[h];d.push(c.createElement(zB,{isLast:n&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:o,leaf:v,text:s,parent:r,renderLeaf:i}))}var m=c.useCallback(g=>{var p=As.get(a);g?(p==null||p.set(f,g),Gr.set(s,g),Jo.set(g,s)):(p==null||p.delete(f),Gr.delete(s),u.current&&Jo.delete(u.current)),u.current=g},[u,a,f,s]);return c.createElement("span",{"data-slate-node":"text",ref:m},d)},Im=c.memo(UB,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&AB(t.decorations,e.decorations));function _m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Rl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_m(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var WB=e=>{var{decorations:t,element:n,renderElement:r=S=>c.createElement(VB,Rl({},S)),renderPlaceholder:o,renderLeaf:i,selection:s}=e,a=mr(),u=GB(),l=a.isInline(n),f=re.findKey(a,n),d=c.useCallback(S=>{var D=As.get(a);S?(D==null||D.set(f,S),Gr.set(n,S),Jo.set(S,n)):(D==null||D.delete(f),Gr.delete(n))},[a,f,n]),h=jm({decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:i,selection:s}),v={"data-slate-node":"element",ref:d};if(l&&(v["data-slate-inline"]=!0),!l&&x.hasInlines(a,n)){var m=ge.string(n),g=_v(m);g==="rtl"&&(v.dir=g)}if(x.isVoid(a,n)){v["data-slate-void"]=!0,!u&&l&&(v.contentEditable=!1);var p=l?"span":"div",[[E]]=ge.texts(n);h=c.createElement(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(Im,{renderPlaceholder:o,decorations:[],isLast:!1,parent:n,text:E})),Sl.set(E,0),Ll.set(E,n)}return r({attributes:v,children:h,element:n})},HB=c.memo(WB,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&TB(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&te.equals(e.selection,t.selection))),VB=e=>{var{attributes:t,children:n,element:r}=e,o=mr(),i=o.isInline(r)?"span":"div";return c.createElement(i,Rl(Rl({},t),{},{style:{position:"relative"}}),n)},Rm=c.createContext(()=>[]),qB=()=>c.useContext(Rm),ZB=c.createContext(!1),jm=e=>{for(var{decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:i,selection:s}=e,a=qB(),u=mr(),l=re.findPath(u,n),f=[],d=De.isElement(n)&&!u.isInline(n)&&x.hasInlines(u,n),h=0;h<n.children.length;h++){var v=l.concat(h),m=n.children[h],g=re.findKey(u,m),p=x.range(u,v),E=s&&te.intersection(p,s),S=a([m,v]);for(var D of t){var M=te.intersection(D,p);M&&S.push(M)}De.isElement(m)?f.push(c.createElement(ZB.Provider,{key:"provider-".concat(g.id),value:!!E},c.createElement(HB,{decorations:S,element:m,key:g.id,renderElement:r,renderPlaceholder:o,renderLeaf:i,selection:E}))):f.push(c.createElement(Im,{decorations:S,key:g.id,isLast:d&&h===n.children.length-1,parent:n,renderPlaceholder:o,renderLeaf:i,text:m})),Sl.set(m,h),Ll.set(m,n)}return f},Nm=c.createContext(!1),GB=()=>c.useContext(Nm),zm=c.createContext(null),jl=()=>{var e=c.useContext(zm);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function KB(){var e=mr(),t=c.useRef(!1),n=c.useRef(0),r=c.useCallback(()=>{if(!t.current){t.current=!0;var o=re.getWindow(e);o.cancelAnimationFrame(n.current),n.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return c.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}var YB=3,XB={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"},JB={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"},QB={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Et=e=>{var t=XB[e],n=JB[e],r=QB[e],o=t&&Qu(t),i=n&&Qu(n),s=r&&Qu(r);return a=>!!(o&&o(a)||pm&&i&&i(a)||!pm&&s&&s(a))},St={isBold:Et("bold"),isCompose:Et("compose"),isMoveBackward:Et("moveBackward"),isMoveForward:Et("moveForward"),isDeleteBackward:Et("deleteBackward"),isDeleteForward:Et("deleteForward"),isDeleteLineBackward:Et("deleteLineBackward"),isDeleteLineForward:Et("deleteLineForward"),isDeleteWordBackward:Et("deleteWordBackward"),isDeleteWordForward:Et("deleteWordForward"),isExtendBackward:Et("extendBackward"),isExtendForward:Et("extendForward"),isExtendLineBackward:Et("extendLineBackward"),isExtendLineForward:Et("extendLineForward"),isItalic:Et("italic"),isMoveLineBackward:Et("moveLineBackward"),isMoveLineForward:Et("moveLineForward"),isMoveWordBackward:Et("moveWordBackward"),isMoveWordForward:Et("moveWordForward"),isRedo:Et("redo"),isSoftBreak:Et("insertSoftBreak"),isSplitBlock:Et("splitBlock"),isTransposeCharacter:Et("transposeCharacter"),isUndo:Et("undo")},eT=(e,t)=>{var n=[],r=()=>{n=[]},o=s=>{if(t.current){var a=s.filter(u=>Al(e,u,s));n.push(...a)}};function i(){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:o,restoreDOM:i,clear:r}},tT={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class $m extends c.Component{constructor(){super(...arguments),On(this,"context",null),On(this,"manager",null),On(this,"mutationObserver",null)}observe(){var t,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,tT)}componentDidMount(){var{receivedUserInput:t}=this.props,n=this.context;this.manager=eT(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(o)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}On($m,"contextType",wl);var nT=Zt?$m:e=>{var{children:t}=e;return c.createElement(c.Fragment,null,t)},rT=c.createContext(!1),oT=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],iT=["text"];function Um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Um(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sT=e=>c.createElement(c.Fragment,null,jm(e)),aT=c.forwardRef((e,t)=>{var n=c.useCallback(y=>c.createElement(uT,$n({},y)),[]),{autoFocus:r,decorate:o=lT,onDOMBeforeInput:i,placeholder:s,readOnly:a=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=n,scrollSelectionIntoView:d=cT,style:h={},as:v="div",disableDefaultStyles:m=!1}=e,g=ao(e,oT),p=jl(),[E,S]=c.useState(!1),D=c.useRef(null),M=c.useRef([]),[b,w]=c.useState(),L=c.useRef(!1),{onUserInput:O,receivedUserInput:H}=KB(),[,P]=c.useReducer(y=>y+1,0);vm.set(p,P),kl.set(p,a);var V=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{D.current&&r&&D.current.focus()},[r]);var _=c.useRef(),R=c.useMemo(()=>CM(()=>{var y=re.toDOMNode(p,p),z=y.getRootNode();if(!L.current&&Zr&&z instanceof ShadowRoot){L.current=!0;var W=uB();W?document.execCommand("indent"):ue.deselect(p),L.current=!1;return}var B=_.current;if((Zt||!re.isComposing(p))&&(!V.isUpdatingSelection||B!=null&&B.isFlushing())&&!V.isDraggingInternally){var X=re.findDocumentOrShadowRoot(p),{activeElement:ee}=X,j=re.toDOMNode(p,p),se=ei(X);if(ee===j?(V.latestElement=ee,br.set(p,!0)):br.delete(p),!se)return ue.deselect(p);var{anchorNode:ae,focusNode:fe}=se,he=re.hasEditableTarget(p,ae)||re.isTargetInsideNonReadonlyVoid(p,ae),be=re.hasTarget(p,fe);if(he&&be){var ve=re.toSlateRange(p,se,{exactMatch:!1,suppressThrow:!0});ve&&(!re.isComposing(p)&&!(B!=null&&B.hasPendingChanges())&&!(B!=null&&B.isFlushing())?ue.select(p,ve):B==null||B.handleUserSelect(ve))}a&&(!he||!be)&&ue.deselect(p)}},100),[p,a,V]),F=c.useMemo(()=>hM(R,0),[R]);_.current=kB({node:D,onDOMSelectionChange:R,scheduleOnDOMSelectionChange:F}),ti(()=>{var y,z,W;D.current&&(W=Bl(D.current))?(gm.set(p,W),Bs.set(p,D.current),Gr.set(p,D.current),Jo.set(D.current,p)):Gr.delete(p);var{selection:B}=p,X=re.findDocumentOrShadowRoot(p),ee=ei(X);if(!(!ee||!re.isFocused(p)||(y=_.current)!==null&&y!==void 0&&y.hasPendingAction())){var j=he=>{var be=ee.type!=="None";if(!(!B&&!be)){var ve=ee.focusNode,me;if(uo&&ee.rangeCount>1){var le=ee.getRangeAt(0),Me=ee.getRangeAt(ee.rangeCount-1);le.startContainer===ve?me=Me.endContainer:me=le.startContainer}else me=ee.anchorNode;var oe=Bs.get(p),Ae=!1;if(oe.contains(me)&&oe.contains(ve)&&(Ae=!0),be&&Ae&&B&&!he){var ie=re.toSlateRange(p,ee,{exactMatch:!0,suppressThrow:!0});if(ie&&te.equals(ie,B)){var Se;if(!V.hasMarkPlaceholder||(Se=me)!==null&&Se!==void 0&&(Se=Se.parentElement)!==null&&Se!==void 0&&Se.hasAttribute("data-slate-mark-placeholder"))return}}if(B&&!re.hasRange(p,B)){p.selection=re.toSlateRange(p,ee,{exactMatch:!1,suppressThrow:!0});return}V.isUpdatingSelection=!0;var Be=B&&re.toDOMRange(p,B);return Be?(re.isComposing(p)&&!Zt?ee.collapseToEnd():te.isBackward(B)?ee.setBaseAndExtent(Be.endContainer,Be.endOffset,Be.startContainer,Be.startOffset):ee.setBaseAndExtent(Be.startContainer,Be.startOffset,Be.endContainer,Be.endOffset),d(p,Be)):ee.removeAllRanges(),Be}};ee.rangeCount<=1&&j();var se=((z=_.current)===null||z===void 0?void 0:z.isFlushing())==="action";if(!Zt||!se){setTimeout(()=>{V.isUpdatingSelection=!1});return}var ae=null,fe=requestAnimationFrame(()=>{if(se){var he=be=>{try{var ve=re.toDOMNode(p,p);ve.focus(),j(be)}catch{}};he(),ae=setTimeout(()=>{he(!0),V.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(fe),ae&&clearTimeout(ae)}}});var N=c.useCallback(y=>{var z=re.toDOMNode(p,p),W=z.getRootNode();if(L!=null&&L.current&&Zr&&W instanceof ShadowRoot){var B=y.getTargetRanges(),X=B[0],ee=new window.Range;ee.setStart(X.startContainer,X.startOffset),ee.setEnd(X.endContainer,X.endOffset);var j=re.toSlateRange(p,ee,{exactMatch:!1,suppressThrow:!1});ue.select(p,j),y.preventDefault(),y.stopImmediatePropagation();return}if(O(),!a&&re.hasEditableTarget(p,y.target)&&!fT(y,i)){var se;if(_.current)return _.current.handleDOMBeforeInput(y);F.flush(),R.flush();var{selection:ae}=p,{inputType:fe}=y,he=y.dataTransfer||y.data||void 0,be=fe==="insertCompositionText"||fe==="deleteCompositionText";if(be&&re.isComposing(p))return;var ve=!1;if(fe==="insertText"&&ae&&te.isCollapsed(ae)&&y.data&&y.data.length===1&&/[a-z ]/i.test(y.data)&&ae.anchor.offset!==0){var me,le;ve=!0,p.marks&&(ve=!1);var{anchor:Me}=ae,[oe,Ae]=re.toDOMPoint(p,Me),ie=(me=oe.parentElement)===null||me===void 0?void 0:me.closest("a"),Se=re.getWindow(p);if(ve&&ie&&re.hasDOMNode(p,ie)){var Be,Re=Se==null?void 0:Se.document.createTreeWalker(ie,NodeFilter.SHOW_TEXT).lastChild();Re===oe&&((Be=Re.textContent)===null||Be===void 0?void 0:Be.length)===Ae&&(ve=!1)}if(ve&&oe.parentElement&&(Se==null||(le=Se.getComputedStyle(oe.parentElement))===null||le===void 0?void 0:le.whiteSpace)==="pre"){var Xe=x.above(p,{at:Me.path,match:It=>De.isElement(It)&&x.isBlock(p,It)});Xe&&ge.string(Xe[0]).includes(" ")&&(ve=!1)}}if(!fe.startsWith("delete")||fe.startsWith("deleteBy")){var[Ce]=y.getTargetRanges();if(Ce){var ht=re.toSlateRange(p,Ce,{exactMatch:!1,suppressThrow:!1});if(!ae||!te.equals(ae,ht)){ve=!1;var rt=!be&&p.selection&&x.rangeRef(p,p.selection);ue.select(p,ht),rt&&Qo.set(p,rt)}}}if(be)return;if(ve||y.preventDefault(),ae&&te.isExpanded(ae)&&fe.startsWith("delete")){var Yt=fe.endsWith("Backward")?"backward":"forward";x.deleteFragment(p,{direction:Yt});return}switch(fe){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{x.deleteFragment(p);break}case"deleteContent":case"deleteContentForward":{x.deleteForward(p);break}case"deleteContentBackward":{x.deleteBackward(p);break}case"deleteEntireSoftLine":{x.deleteBackward(p,{unit:"line"}),x.deleteForward(p,{unit:"line"});break}case"deleteHardLineBackward":{x.deleteBackward(p,{unit:"block"});break}case"deleteSoftLineBackward":{x.deleteBackward(p,{unit:"line"});break}case"deleteHardLineForward":{x.deleteForward(p,{unit:"block"});break}case"deleteSoftLineForward":{x.deleteForward(p,{unit:"line"});break}case"deleteWordBackward":{x.deleteBackward(p,{unit:"word"});break}case"deleteWordForward":{x.deleteForward(p,{unit:"word"});break}case"insertLineBreak":x.insertSoftBreak(p);break;case"insertParagraph":{x.insertBreak(p);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{fe==="insertFromComposition"&&re.isComposing(p)&&(S(!1),Kr.set(p,!1)),(he==null?void 0:he.constructor.name)==="DataTransfer"?re.insertData(p,he):typeof he=="string"&&(ve?M.current.push(()=>x.insertText(p,he)):x.insertText(p,he));break}}var At=(se=Qo.get(p))===null||se===void 0?void 0:se.unref();Qo.delete(p),At&&(!p.selection||!te.equals(p.selection,At))&&ue.select(p,At)}},[p,R,O,i,a,F]),Y=c.useCallback(y=>{y==null?(R.cancel(),F.cancel(),Bs.delete(p),Gr.delete(p),D.current&&yr&&D.current.removeEventListener("beforeinput",N)):yr&&y.addEventListener("beforeinput",N),D.current=y,typeof t=="function"?t(y):t&&(t.current=y)},[R,F,p,N,t]);ti(()=>{var y=re.getWindow(p);y.document.addEventListener("selectionchange",F);var z=()=>{V.isDraggingInternally=!1};return y.document.addEventListener("dragend",z),y.document.addEventListener("drop",z),()=>{y.document.removeEventListener("selectionchange",F),y.document.removeEventListener("dragend",z),y.document.removeEventListener("drop",z)}},[F,V]);var I=o([p,[]]),Q=s&&p.children.length===1&&Array.from(ge.texts(p)).length===1&&ge.string(p)===""&&!E,ne=c.useCallback(y=>{if(y&&Q){var z;w((z=y.getBoundingClientRect())===null||z===void 0?void 0:z.height)}else w(void 0)},[Q]);if(Q){var k=x.start(p,[]);I.push({[lo]:!0,placeholder:s,onPlaceholderResize:ne,anchor:k,focus:k})}var{marks:T}=p;if(V.hasMarkPlaceholder=!1,p.selection&&te.isCollapsed(p.selection)&&T){var{anchor:Z}=p.selection,$=ge.leaf(p,Z.path),K=ao($,iT);if(!xe.equals($,T,{loose:!0})){V.hasMarkPlaceholder=!0;var G=Object.fromEntries(Object.keys(K).map(y=>[y,null]));I.push($n($n($n({[mm]:!0},G),T),{},{anchor:Z,focus:Z}))}}return c.useEffect(()=>{setTimeout(()=>{var{selection:y}=p;if(y){var{anchor:z}=y,W=ge.leaf(p,z.path);if(T&&!xe.equals(W,T,{loose:!0})){Mn.set(p,T);return}}Mn.delete(p)})}),c.createElement(Nm.Provider,{value:a},c.createElement(rT.Provider,{value:E},c.createElement(Rm.Provider,{value:o},c.createElement(nT,{node:D,receivedUserInput:H},c.createElement(v,$n($n({role:a?void 0:"textbox","aria-multiline":a?void 0:!0},g),{},{spellCheck:yr||!Ms?g.spellCheck:!1,autoCorrect:yr||!Ms?g.autoCorrect:"false",autoCapitalize:yr||!Ms?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!a,zindex:-1,suppressContentEditableWarning:!0,ref:Y,style:$n($n({},m?{}:$n({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),h),onBeforeInput:c.useCallback(y=>{if(!yr&&!a&&!Gt(y,g.onBeforeInput)&&re.hasSelectableTarget(p,y.target)&&(y.preventDefault(),!re.isComposing(p))){var z=y.data;x.insertText(p,z)}},[g.onBeforeInput,p,a]),onInput:c.useCallback(y=>{if(!Gt(y,g.onInput)){if(_.current){_.current.handleInput();return}for(var z of M.current)z();M.current=[]}},[g.onInput]),onBlur:c.useCallback(y=>{if(!(a||V.isUpdatingSelection||!re.hasSelectableTarget(p,y.target)||Gt(y,g.onBlur))){var z=re.findDocumentOrShadowRoot(p);if(V.latestElement!==z.activeElement){var{relatedTarget:W}=y,B=re.toDOMNode(p,p);if(W!==B&&!(kn(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&wr(W)&&re.hasDOMNode(p,W)){var X=re.toSlateNode(p,W);if(De.isElement(X)&&!p.isVoid(X))return}if(Zr){var ee=ei(z);ee==null||ee.removeAllRanges()}br.delete(p)}}}},[a,V.isUpdatingSelection,V.latestElement,p,g.onBlur]),onClick:c.useCallback(y=>{if(re.hasTarget(p,y.target)&&!Gt(y,g.onClick)&&wr(y.target)){var z=re.toSlateNode(p,y.target),W=re.findPath(p,z);if(!x.hasPath(p,W)||ge.get(p,W)!==z)return;if(y.detail===YB&&W.length>=1){var B=W;if(!(De.isElement(z)&&x.isBlock(p,z))){var X,ee=x.above(p,{match:ve=>De.isElement(ve)&&x.isBlock(p,ve),at:W});B=(X=ee==null?void 0:ee[1])!==null&&X!==void 0?X:W.slice(0,1)}var j=x.range(p,B);ue.select(p,j);return}if(a)return;var se=x.start(p,W),ae=x.end(p,W),fe=x.void(p,{at:se}),he=x.void(p,{at:ae});if(fe&&he&&U.equals(fe[1],he[1])){var be=x.range(p,se);ue.select(p,be)}}},[p,g.onClick,a]),onCompositionEnd:c.useCallback(y=>{if(re.hasSelectableTarget(p,y.target)){var z;if(re.isComposing(p)&&Promise.resolve().then(()=>{S(!1),Kr.set(p,!1)}),(z=_.current)===null||z===void 0||z.handleCompositionEnd(y),Gt(y,g.onCompositionEnd)||Zt)return;if(!Zr&&!XM&&!dm&&!QM&&!JM&&y.data){var W=Mn.get(p);Mn.delete(p),W!==void 0&&(Jn.set(p,p.marks),p.marks=W),x.insertText(p,y.data);var B=Jn.get(p);Jn.delete(p),B!==void 0&&(p.marks=B)}}},[g.onCompositionEnd,p]),onCompositionUpdate:c.useCallback(y=>{re.hasSelectableTarget(p,y.target)&&!Gt(y,g.onCompositionUpdate)&&(re.isComposing(p)||(S(!0),Kr.set(p,!0)))},[g.onCompositionUpdate,p]),onCompositionStart:c.useCallback(y=>{if(re.hasSelectableTarget(p,y.target)){var z;if((z=_.current)===null||z===void 0||z.handleCompositionStart(y),Gt(y,g.onCompositionStart)||Zt)return;S(!0);var{selection:W}=p;if(W&&te.isExpanded(W)){x.deleteFragment(p);return}}},[g.onCompositionStart,p]),onCopy:c.useCallback(y=>{re.hasSelectableTarget(p,y.target)&&!Gt(y,g.onCopy)&&!Wm(y)&&(y.preventDefault(),re.setFragmentData(p,y.clipboardData,"copy"))},[g.onCopy,p]),onCut:c.useCallback(y=>{if(!a&&re.hasSelectableTarget(p,y.target)&&!Gt(y,g.onCut)&&!Wm(y)){y.preventDefault(),re.setFragmentData(p,y.clipboardData,"cut");var{selection:z}=p;if(z)if(te.isExpanded(z))x.deleteFragment(p);else{var W=ge.parent(p,z.anchor.path);x.isVoid(p,W)&&ue.delete(p)}}},[a,p,g.onCut]),onDragOver:c.useCallback(y=>{if(re.hasTarget(p,y.target)&&!Gt(y,g.onDragOver)){var z=re.toSlateNode(p,y.target);De.isElement(z)&&x.isVoid(p,z)&&y.preventDefault()}},[g.onDragOver,p]),onDragStart:c.useCallback(y=>{if(!a&&re.hasTarget(p,y.target)&&!Gt(y,g.onDragStart)){var z=re.toSlateNode(p,y.target),W=re.findPath(p,z),B=De.isElement(z)&&x.isVoid(p,z)||x.void(p,{at:W,voids:!0});if(B){var X=x.range(p,W);ue.select(p,X)}V.isDraggingInternally=!0,re.setFragmentData(p,y.dataTransfer,"drag")}},[a,p,g.onDragStart,V]),onDrop:c.useCallback(y=>{if(!a&&re.hasTarget(p,y.target)&&!Gt(y,g.onDrop)){y.preventDefault();var z=p.selection,W=re.findEventRange(p,y),B=y.dataTransfer;ue.select(p,W),V.isDraggingInternally&&z&&!te.equals(z,W)&&!x.void(p,{at:W,voids:!0})&&ue.delete(p,{at:z}),re.insertData(p,B),re.isFocused(p)||re.focus(p)}},[a,p,g.onDrop,V]),onDragEnd:c.useCallback(y=>{!a&&V.isDraggingInternally&&g.onDragEnd&&re.hasTarget(p,y.target)&&g.onDragEnd(y)},[a,V,g,p]),onFocus:c.useCallback(y=>{if(!a&&!V.isUpdatingSelection&&re.hasEditableTarget(p,y.target)&&!Gt(y,g.onFocus)){var z=re.toDOMNode(p,p),W=re.findDocumentOrShadowRoot(p);if(V.latestElement=W.activeElement,uo&&y.target!==z){z.focus();return}br.set(p,!0)}},[a,V,p,g.onFocus]),onKeyDown:c.useCallback(y=>{if(!a&&re.hasEditableTarget(p,y.target)){var z;(z=_.current)===null||z===void 0||z.handleKeyDown(y);var{nativeEvent:W}=y;if(re.isComposing(p)&&W.isComposing===!1&&(Kr.set(p,!1),S(!1)),Gt(y,g.onKeyDown)||re.isComposing(p))return;var{selection:B}=p,X=p.children[B!==null?B.focus.path[0]:0],ee=_v(ge.string(X))==="rtl";if(St.isRedo(W)){y.preventDefault();var j=p;typeof j.redo=="function"&&j.redo();return}if(St.isUndo(W)){y.preventDefault();var se=p;typeof se.undo=="function"&&se.undo();return}if(St.isMoveLineBackward(W)){y.preventDefault(),ue.move(p,{unit:"line",reverse:!0});return}if(St.isMoveLineForward(W)){y.preventDefault(),ue.move(p,{unit:"line"});return}if(St.isExtendLineBackward(W)){y.preventDefault(),ue.move(p,{unit:"line",edge:"focus",reverse:!0});return}if(St.isExtendLineForward(W)){y.preventDefault(),ue.move(p,{unit:"line",edge:"focus"});return}if(St.isMoveBackward(W)){y.preventDefault(),B&&te.isCollapsed(B)?ue.move(p,{reverse:!ee}):ue.collapse(p,{edge:ee?"end":"start"});return}if(St.isMoveForward(W)){y.preventDefault(),B&&te.isCollapsed(B)?ue.move(p,{reverse:ee}):ue.collapse(p,{edge:ee?"start":"end"});return}if(St.isMoveWordBackward(W)){y.preventDefault(),B&&te.isExpanded(B)&&ue.collapse(p,{edge:"focus"}),ue.move(p,{unit:"word",reverse:!ee});return}if(St.isMoveWordForward(W)){y.preventDefault(),B&&te.isExpanded(B)&&ue.collapse(p,{edge:"focus"}),ue.move(p,{unit:"word",reverse:ee});return}if(yr){if((hm||Zr)&&B&&(St.isDeleteBackward(W)||St.isDeleteForward(W))&&te.isCollapsed(B)){var ae=ge.parent(p,B.anchor.path);if(De.isElement(ae)&&x.isVoid(p,ae)&&(x.isInline(p,ae)||x.isBlock(p,ae))){y.preventDefault(),x.deleteBackward(p,{unit:"block"});return}}}else{if(St.isBold(W)||St.isItalic(W)||St.isTransposeCharacter(W)){y.preventDefault();return}if(St.isSoftBreak(W)){y.preventDefault(),x.insertSoftBreak(p);return}if(St.isSplitBlock(W)){y.preventDefault(),x.insertBreak(p);return}if(St.isDeleteBackward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"backward"}):x.deleteBackward(p);return}if(St.isDeleteForward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"forward"}):x.deleteForward(p);return}if(St.isDeleteLineBackward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"backward"}):x.deleteBackward(p,{unit:"line"});return}if(St.isDeleteLineForward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"forward"}):x.deleteForward(p,{unit:"line"});return}if(St.isDeleteWordBackward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"backward"}):x.deleteBackward(p,{unit:"word"});return}if(St.isDeleteWordForward(W)){y.preventDefault(),B&&te.isExpanded(B)?x.deleteFragment(p,{direction:"forward"}):x.deleteForward(p,{unit:"word"});return}}}},[a,p,g.onKeyDown]),onPaste:c.useCallback(y=>{!a&&re.hasEditableTarget(p,y.target)&&!Gt(y,g.onPaste)&&(!yr||nB(y.nativeEvent)||Zr)&&(y.preventDefault(),re.insertData(p,y.clipboardData))},[a,p,g.onPaste])}),c.createElement(sT,{decorations:I,node:p,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:p.selection}))))))}),uT=e=>{var{attributes:t,children:n}=e;return c.createElement("span",$n({},t),n,Zt&&c.createElement("br",null))},lT=()=>[],cT=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&te.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),DM(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},Gt=(e,t)=>{if(!t)return!1;var n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},Wm=e=>wr(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),fT=(e,t)=>{if(!t)return!1;var n=t(e);return n??e.defaultPrevented},dT=c.createContext(!1),pT=c.createContext({});function hT(e){var t=c.useRef([]).current,n=c.useRef({editor:e}).current,r=c.useCallback(i=>{n.editor=i,t.forEach(s=>s(i))},[t,n]),o=c.useMemo(()=>({getSlate:()=>n.editor,addEventListener:i=>(t.push(i),()=>{t.splice(t.indexOf(i),1)})}),[t,n]);return{selectorContext:o,onChange:r}}var gT=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],vT=e=>{var{editor:t,children:n,onChange:r,onSelectionChange:o,onValueChange:i,initialValue:s}=e,a=ao(e,gT),[u,l]=c.useState(()=>{if(!ge.isNodeList(s))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Nt.stringify(s)));if(!x.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Nt.stringify(t)));return t.children=s,Object.assign(t,a),{v:0,editor:t}}),{selectorContext:f,onChange:d}=hT(t),h=c.useCallback(g=>{var p;switch(r&&r(t.children),g==null||(p=g.operation)===null||p===void 0?void 0:p.type){case"set_selection":o==null||o(t.selection);break;default:i==null||i(t.children)}l(E=>({v:E.v+1,editor:t})),d(t)},[t,d,r,o,i]);c.useEffect(()=>(Pl.set(t,h),()=>{Pl.set(t,()=>{})}),[t,h]);var[v,m]=c.useState(re.isFocused(t));return c.useEffect(()=>{m(re.isFocused(t))},[t]),ti(()=>{var g=()=>m(re.isFocused(t));return fm>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),c.createElement(pT.Provider,{value:f},c.createElement(zm.Provider,{value:u},c.createElement(wl.Provider,{value:u.editor},c.createElement(dT.Provider,{value:v},n))))},Hm=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Vm=(e,t,n)=>{var r=re.toDOMRange(e,t).getBoundingClientRect(),o=re.toDOMRange(e,n).getBoundingClientRect();return Hm(r,o)&&Hm(o,r)},mT=(e,t)=>{var n=x.range(e,te.end(t)),r=Array.from(x.positions(e,{at:t})),o=0,i=r.length,s=Math.floor(i/2);if(Vm(e,x.range(e,r[o]),n))return x.range(e,r[o],n);if(r.length<2)return x.range(e,r[r.length-1],n);for(;s!==r.length&&s!==o;)Vm(e,x.range(e,r[s]),n)?i=s:o=s,s=Math.floor((o+i)/2);return x.range(e,r[i],n)};function qm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qm(Object(n),!0).forEach(function(r){On(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var yT=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=t,{apply:o,onChange:i,deleteBackward:s,addMark:a,removeMark:u}=r;return As.set(r,new WeakMap),r.addMark=(l,f)=>{var d,h;(d=Ml.get(r))===null||d===void 0||d(),!Mn.get(r)&&(h=nn.get(r))!==null&&h!==void 0&&h.length&&Mn.set(r,null),Jn.delete(r),a(l,f)},r.removeMark=l=>{var f;!Mn.get(r)&&(f=nn.get(r))!==null&&f!==void 0&&f.length&&Mn.set(r,null),Jn.delete(r),u(l)},r.deleteBackward=l=>{if(l!=="line")return s(l);if(r.selection&&te.isCollapsed(r.selection)){var f=x.above(r,{match:m=>De.isElement(m)&&x.isBlock(r,m),at:r.selection});if(f){var[,d]=f,h=x.range(r,d,r.selection.anchor),v=mT(r,h);te.isCollapsed(v)||ue.delete(r,{at:v})}}},r.apply=l=>{var f=[],d=[],h=nn.get(r);if(h!=null&&h.length){var v=h.map(F=>mB(F,l)).filter(Boolean);nn.set(r,v)}var m=Er.get(r);m&&Er.set(r,Lm(r,m,l));var g=Cr.get(r);if(g!=null&&g.at){var p=He.isPoint(g==null?void 0:g.at)?Il(r,g.at,l):Lm(r,g.at,l);Cr.set(r,p?Zm(Zm({},g),{},{at:p}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...co(r,l.path));break}case"set_selection":{var E;(E=Qo.get(r))===null||E===void 0||E.unref(),Qo.delete(r);break}case"insert_node":case"remove_node":{f.push(...co(r,U.parent(l.path)));break}case"merge_node":{var S=U.previous(l.path);f.push(...co(r,S));break}case"move_node":{var D=U.common(U.parent(l.path),U.parent(l.newPath));f.push(...co(r,D));var M;U.isBefore(l.path,l.newPath)?(f.push(...co(r,U.parent(l.path))),M=l.newPath):(f.push(...co(r,U.parent(l.newPath))),M=l.path);var b=ge.get(t,U.parent(M)),w=re.findKey(r,b),L=x.pathRef(r,U.parent(M));d.push([L,w]);break}}o(l);for(var[O,H]of f){var[P]=x.node(r,O);Ts.set(P,H)}for(var[V,_]of d)if(V.current){var[R]=x.node(r,V.current);Ts.set(R,_)}},r.setFragmentData=l=>{var{selection:f}=r;if(f){var[d,h]=te.edges(f),v=x.void(r,{at:d.path}),m=x.void(r,{at:h.path});if(!(te.isCollapsed(f)&&!v)){var g=re.toDOMRange(r,f),p=g.cloneContents(),E=p.childNodes[0];if(p.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(E=P)}),m){var[S]=m,D=g.cloneRange(),M=re.toDOMNode(r,S);D.setEndAfter(M),p=D.cloneContents()}if(v&&(E=p.querySelector("[data-slate-spacer]")),Array.from(p.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var V=P.getAttribute("data-slate-zero-width")==="n";P.textContent=V?`
|
366
|
+
`:""}),bm(E)){var b=E.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(E),p.appendChild(b),E=b}var w=r.getFragment(),L=JSON.stringify(w),O=window.btoa(encodeURIComponent(L));E.setAttribute("data-slate-fragment",O),l.setData("application/".concat(n),O);var H=p.ownerDocument.createElement("div");return H.appendChild(p),H.setAttribute("hidden","true"),p.ownerDocument.body.appendChild(H),l.setData("text/html",H.innerHTML),l.setData("text/plain",Em(H)),p.ownerDocument.body.removeChild(H),l}}},r.insertData=l=>{r.insertFragmentData(l)||r.insertTextData(l)},r.insertFragmentData=l=>{var f=l.getData("application/".concat(n))||aB(l);if(f){var d=decodeURIComponent(window.atob(f)),h=JSON.parse(d);return r.insertFragment(h),!0}return!1},r.insertTextData=l=>{var f=l.getData("text/plain");if(f){var d=f.split(/\r\n|\r|\n/),h=!1;for(var v of d)h&&ue.splitNodes(r,{always:!0}),r.insertText(v),h=!0;return!0}return!1},r.onChange=l=>{var f=fm<18?xn.unstable_batchedUpdates:d=>d();f(()=>{var d=Pl.get(r);d&&d(l),i(l)})},r},co=(e,t)=>{var n=[];for(var[r,o]of x.levels(e,{at:t})){var i=re.findKey(e,r);n.push([o,i])}return n};function Gm(e,t,n="type"){const{selection:r}=e;if(!r)return!1;const[o]=Array.from(x.nodes(e,{at:x.unhangRange(e,r),match:i=>!x.isEditor(i)&&De.isElement(i)&&i[n]===t}));return!!o}const Km=["listItem","numberedList"],Is=["left","center","right","justify"];function bT(e,t){const n=Is.includes(t)?"align":"type",r=Gm(e,t,n),o=Km.includes(t);ue.unwrapNodes(e,{match:s=>!x.isEditor(s)&&De.isElement(s)&&Km.includes(s.type)&&!Is.includes(t),split:!0});let i;if(Is.includes(t)?i={align:r?void 0:t}:i={type:r?"paragraph":o?"listItem":t},ue.setNodes(e,i),!r&&o){const s={type:t,children:[]};ue.wrapNodes(e,s)}}function Yr({format:e,icon:t}){const n=jl(),r=Is.includes(e)?"align":"type",i=Gm(n,e,r)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),bT(n,e)}return A.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+i,onMouseDown:s,children:A.jsx(t,{})})}function CT({attributes:e,children:t,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return A.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...e,children:t});case"bulletedList":return A.jsx("ul",{className:"arkynElementBulletList",style:r,...e,children:t});case"headingOne":return A.jsx("h1",{className:"arkynElementHeadingOne",style:r,...e,children:t});case"headingTwo":return A.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...e,children:t});case"listItem":return A.jsx("li",{className:"arkynElementListItem",style:r,...e,children:t});case"numberedList":return A.jsx("ol",{className:"arkynElementNumberedList",style:r,...e,children:t});default:return A.jsx("p",{className:"arkynElementParagraph",style:r,...e,children:t})}}function ET({attributes:e,children:t,leaf:n}){return n.bold&&(t=A.jsx("strong",{children:t})),n.code&&(t=A.jsx("code",{children:t})),n.italic&&(t=A.jsx("em",{children:t})),n.underline&&(t=A.jsx("u",{children:t})),A.jsx("span",{...e,children:t})}function Ym(e,t){const n=x.marks(e);return n?n[t]===!0:!1}function Xm(e,t){Ym(e,t)?x.removeMark(e,t):x.addMark(e,t,!0)}function _s({format:e,icon:t}){const n=jl(),o=Ym(n,e)?"activeTrue":"activeFalse";function i(s){s.preventDefault(),Xm(n,e)}return A.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+o,onMouseDown:i,children:A.jsx(t,{})})}function wT({children:e}){return A.jsx("div",{className:"arkynRichTextToolbar",children:e})}const Jm={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},DT=[{type:"paragraph",children:[{text:""}]}];var Qm={},Nl={},zl={};Object.defineProperty(zl,"__esModule",{value:!0}),zl.default=OT;var ey="html",ty="head",Rs="body",xT=/<([a-zA-Z]+[0-9]?)/,ny=/<head[^]*>/i,ry=/<body[^]*>/i,js=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},$l=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},oy=typeof window=="object"&&window.DOMParser;if(typeof oy=="function"){var ST=new oy,LT="text/html";$l=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),ST.parseFromString(e,LT)},js=$l}if(typeof document=="object"&&document.implementation){var Ns=document.implementation.createHTMLDocument();js=function(e,t){if(t){var n=Ns.documentElement.querySelector(t);return n&&(n.innerHTML=e),Ns}return Ns.documentElement.innerHTML=e,Ns}}var zs=typeof document=="object"&&document.createElement("template"),Ul;zs&&zs.content&&(Ul=function(e){return zs.innerHTML=e,zs.content.childNodes});function OT(e){var t,n,r=e.match(xT),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case ey:{var i=$l(e);if(!ny.test(e)){var s=i.querySelector(ty);(t=s==null?void 0:s.parentNode)===null||t===void 0||t.removeChild(s)}if(!ry.test(e)){var s=i.querySelector(Rs);(n=s==null?void 0:s.parentNode)===null||n===void 0||n.removeChild(s)}return i.querySelectorAll(ey)}case ty:case Rs:{var a=js(e).querySelectorAll(o);return ry.test(e)&&ny.test(e)?a[0].parentNode.childNodes:a}default:{if(Ul)return Ul(e);var s=js(e,Rs).querySelector(Rs);return s.childNodes}}}var $s={},Wl={},Hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(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"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Hl);var Ye={},Dr=lt&<.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=lt&<.__assign||function(){return ni=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ni.apply(this,arguments)};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.cloneNode=Ye.hasChildren=Ye.isDocument=Ye.isDirective=Ye.isComment=Ye.isText=Ye.isCDATA=Ye.isTag=Ye.Element=Ye.Document=Ye.CDATA=Ye.NodeWithChildren=Ye.ProcessingInstruction=Ye.Comment=Ye.Text=Ye.DataNode=Ye.Node=void 0;var rn=Hl,Vl=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){return t===void 0&&(t=!1),ql(this,t)},e}();Ye.Node=Vl;var Us=function(e){Dr(t,e);function t(n){var r=e.call(this)||this;return r.data=n,r}return Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(n){this.data=n},enumerable:!1,configurable:!0}),t}(Vl);Ye.DataNode=Us;var iy=function(e){Dr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=rn.ElementType.Text,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(Us);Ye.Text=iy;var sy=function(e){Dr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=rn.ElementType.Comment,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(Us);Ye.Comment=sy;var ay=function(e){Dr(t,e);function t(n,r){var o=e.call(this,r)||this;return o.name=n,o.type=rn.ElementType.Directive,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(Us);Ye.ProcessingInstruction=ay;var Ws=function(e){Dr(t,e);function t(n){var r=e.call(this)||this;return r.children=n,r}return Object.defineProperty(t.prototype,"firstChild",{get:function(){var n;return(n=this.children[0])!==null&&n!==void 0?n:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(Vl);Ye.NodeWithChildren=Ws;var uy=function(e){Dr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=rn.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Ws);Ye.CDATA=uy;var ly=function(e){Dr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=rn.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Ws);Ye.Document=ly;var cy=function(e){Dr(t,e);function t(n,r,o,i){o===void 0&&(o=[]),i===void 0&&(i=n==="script"?rn.ElementType.Script:n==="style"?rn.ElementType.Style:rn.ElementType.Tag);var s=e.call(this,o)||this;return s.name=n,s.attribs=r,s.type=i,s}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var o,i;return{name:r,value:n.attribs[r],namespace:(o=n["x-attribsNamespace"])===null||o===void 0?void 0:o[r],prefix:(i=n["x-attribsPrefix"])===null||i===void 0?void 0:i[r]}})},enumerable:!1,configurable:!0}),t}(Ws);Ye.Element=cy;function fy(e){return(0,rn.isTag)(e)}Ye.isTag=fy;function dy(e){return e.type===rn.ElementType.CDATA}Ye.isCDATA=dy;function py(e){return e.type===rn.ElementType.Text}Ye.isText=py;function hy(e){return e.type===rn.ElementType.Comment}Ye.isComment=hy;function gy(e){return e.type===rn.ElementType.Directive}Ye.isDirective=gy;function vy(e){return e.type===rn.ElementType.Root}Ye.isDocument=vy;function kT(e){return Object.prototype.hasOwnProperty.call(e,"children")}Ye.hasChildren=kT;function ql(e,t){t===void 0&&(t=!1);var n;if(py(e))n=new iy(e.data);else if(hy(e))n=new sy(e.data);else if(fy(e)){var r=t?Zl(e.children):[],o=new cy(e.name,ni({},e.attribs),r);r.forEach(function(u){return u.parent=o}),e.namespace!=null&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=ni({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=ni({},e["x-attribsPrefix"])),n=o}else if(dy(e)){var r=t?Zl(e.children):[],i=new uy(r);r.forEach(function(l){return l.parent=i}),n=i}else if(vy(e)){var r=t?Zl(e.children):[],s=new ly(r);r.forEach(function(l){return l.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else if(gy(e)){var a=new ay(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),n=a}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}Ye.cloneNode=ql;function Zl(e){for(var t=e.map(function(r){return ql(r,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}(function(e){var t=lt&<.__createBinding||(Object.create?function(a,u,l,f){f===void 0&&(f=l);var d=Object.getOwnPropertyDescriptor(u,l);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(a,f,d)}:function(a,u,l,f){f===void 0&&(f=l),a[f]=u[l]}),n=lt&<.__exportStar||function(a,u){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&t(u,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=Hl,o=Ye;n(Ye,e);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function a(u,l,f){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=i),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??i,this.elementCB=f??null}return a.prototype.onparserinit=function(u){this.parser=u},a.prototype.onreset=function(){this.dom=[],this.root=new o.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,d=new o.Element(u,l,void 0,f);this.addNode(d),this.tagStack.push(d)},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 o.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 o.Comment(u);this.addNode(l),this.lastNode=l},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var u=new o.Text(""),l=new o.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 o.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}();e.DomHandler=s,e.default=s})(Wl);var my={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.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"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{})})(my),Object.defineProperty($s,"__esModule",{value:!0}),$s.formatAttributes=yy,$s.formatDOM=by;var Hs=Wl,PT=my;function MT(e){return PT.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function yy(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function BT(e){e=e.toLowerCase();var t=MT(e);return t||e}function by(e,t,n){t===void 0&&(t=null);for(var r=[],o,i=0,s=e.length;i<s;i++){var a=e[i];switch(a.nodeType){case 1:{var u=BT(a.nodeName);o=new Hs.Element(u,yy(a.attributes)),o.children=by(u==="template"?a.content.childNodes:a.childNodes,o);break}case 3:o=new Hs.Text(a.nodeValue);break;case 8:o=new Hs.Comment(a.nodeValue);break;default:continue}var l=r[i-1]||null;l&&(l.next=o),o.parent=t,o.prev=l,o.next=null,r.push(o)}return n&&(o=new Hs.ProcessingInstruction(n.substring(0,n.indexOf(" ")).toLowerCase(),n),o.next=r[0]||null,o.parent=t,r.unshift(o),r[1]&&(r[1].prev=r[0])),r}var TT=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.default=_T;var AT=TT(zl),FT=$s,IT=/<(![a-zA-Z\s]+)>/;function _T(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(IT),n=t?t[1]:void 0;return(0,FT.formatDOM)((0,AT.default)(e),null,n)}var Vs={},Bn={},qs={},RT=0;qs.SAME=RT;var jT=1;qs.CAMELCASE=jT,qs.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 Cy=0,xr=1,Zs=2,Gs=3,Gl=4,Ey=5,wy=6;function NT(e){return $t.hasOwnProperty(e)?$t[e]:null}function Kt(e,t,n,r,o,i,s){this.acceptsBooleans=t===Zs||t===Gs||t===Gl,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}const $t={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{$t[e]=new Kt(e,Cy,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{$t[e]=new Kt(e,xr,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{$t[e]=new Kt(e,Zs,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{$t[e]=new Kt(e,Zs,!1,e,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(e=>{$t[e]=new Kt(e,Gs,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{$t[e]=new Kt(e,Gs,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{$t[e]=new Kt(e,Gl,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{$t[e]=new Kt(e,wy,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{$t[e]=new Kt(e,Ey,!1,e.toLowerCase(),null,!1,!1)});const Kl=/[\-\:]([a-z])/g,Yl=e=>e[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(e=>{const t=e.replace(Kl,Yl);$t[t]=new Kt(t,xr,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(Kl,Yl);$t[t]=new Kt(t,xr,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(Kl,Yl);$t[t]=new Kt(t,xr,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{$t[e]=new Kt(e,xr,!1,e.toLowerCase(),null,!1,!1)});const zT="xlinkHref";$t[zT]=new Kt("xlinkHref",xr,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{$t[e]=new Kt(e,xr,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:$T,SAME:UT,possibleStandardNames:Dy}=qs,WT=":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",HT=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+WT+"]*$")),VT=Object.keys(Dy).reduce((e,t)=>{const n=Dy[t];return n===UT?e[t]=t:n===$T?e[t.toLowerCase()]=t:e[t]=n,e},{});Bn.BOOLEAN=Gs,Bn.BOOLEANISH_STRING=Zs,Bn.NUMERIC=Ey,Bn.OVERLOADED_BOOLEAN=Gl,Bn.POSITIVE_NUMERIC=wy,Bn.RESERVED=Cy,Bn.STRING=xr,Bn.getPropertyInfo=NT,Bn.isCustomAttribute=HT,Bn.possibleStandardNames=VT;var Xl={},Jl={},xy=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,qT=/\n/g,ZT=/^\s*/,GT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,KT=/^:\s*/,YT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,XT=/^[;\s]*/,JT=/^\s+|\s+$/g,QT=`
|
367
|
+
`,Sy="/",Ly="*",Xr="",eA="comment",tA="declaration",nA=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(m){var g=m.match(qT);g&&(n+=g.length);var p=m.lastIndexOf(QT);r=~p?m.length-p:r+m.length}function i(){var m={line:n,column:r};return function(g){return g.position=new s(m),l(),g}}function s(m){this.start=m,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(m){var g=new Error(t.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function u(m){var g=m.exec(e);if(g){var p=g[0];return o(p),e=e.slice(p.length),g}}function l(){u(ZT)}function f(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=i();if(!(Sy!=e.charAt(0)||Ly!=e.charAt(1))){for(var g=2;Xr!=e.charAt(g)&&(Ly!=e.charAt(g)||Sy!=e.charAt(g+1));)++g;if(g+=2,Xr===e.charAt(g-1))return a("End of comment missing");var p=e.slice(2,g-2);return r+=2,o(p),e=e.slice(g),r+=2,m({type:eA,comment:p})}}function h(){var m=i(),g=u(GT);if(g){if(d(),!u(KT))return a("property missing ':'");var p=u(YT),E=m({type:tA,property:Oy(g[0].replace(xy,Xr)),value:p?Oy(p[0].replace(xy,Xr)):Xr});return u(XT),E}}function v(){var m=[];f(m);for(var g;g=h();)g!==!1&&(m.push(g),f(m));return m}return l(),v()};function Oy(e){return e?e.replace(JT,Xr):Xr}var rA=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.default=iA;var oA=rA(nA);function iA(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,oA.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var s=i.property,a=i.value;o?t(s,a,i):a&&(n=n||{},n[s]=a)}}),n}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.camelCase=void 0;var sA=/^--[a-zA-Z0-9-]+$/,aA=/-([a-z])/g,uA=/^[^-]+$/,lA=/^-(webkit|moz|ms|o|khtml)-/,cA=/^-(ms)-/,fA=function(e){return!e||uA.test(e)||sA.test(e)},dA=function(e,t){return t.toUpperCase()},ky=function(e,t){return"".concat(t,"-")},pA=function(e,t){return t===void 0&&(t={}),fA(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(cA,ky):e=e.replace(lA,ky),e.replace(aA,dA))};Ks.camelCase=pA;var hA=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gA=hA(Jl),vA=Ks;function Ql(e,t){var n={};return!e||typeof e!="string"||(0,gA.default)(e,function(r,o){r&&o&&(n[(0,vA.camelCase)(r,t)]=o)}),n}Ql.default=Ql;var mA=Ql;(function(e){var t=lt&<.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=i,e.setStyleProp=a;var n=c,r=t(mA),o=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function i(f,d){return f.includes("-")?!o.has(f):!!(d&&typeof d.is=="string")}var s={reactCompat:!0};function a(f,d){if(typeof f=="string"){if(!f.trim()){d.style={};return}try{d.style=(0,r.default)(f,s)}catch{d.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};e.canTextBeChildOfNode=u;var l=function(f){return f};e.returnFirstArg=l})(Xl),Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.default=EA;var ri=Bn,Py=Xl,yA=["checked","value"],bA=["input","select","textarea"],CA={reset:!0,submit:!0};function EA(e,t){e===void 0&&(e={});var n={},r=!!(e.type&&CA[e.type]);for(var o in e){var i=e[o];if((0,ri.isCustomAttribute)(o)){n[o]=i;continue}var s=o.toLowerCase(),a=My(s);if(a){var u=(0,ri.getPropertyInfo)(a);switch(yA.includes(a)&&bA.includes(t)&&!r&&(a=My("default"+s)),n[a]=i,u&&u.type){case ri.BOOLEAN:n[a]=!0;break;case ri.OVERLOADED_BOOLEAN:i===""&&(n[a]=!0);break}continue}Py.PRESERVE_CUSTOM_ATTRIBUTES&&(n[o]=i)}return(0,Py.setStyleProp)(e.style,n),n}function My(e){return ri.possibleStandardNames[e]}var ec={},wA=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ec,"__esModule",{value:!0}),ec.default=By;var tc=c,DA=wA(Vs),oi=Xl,xA={cloneElement:tc.cloneElement,createElement:tc.createElement,isValidElement:tc.isValidElement};function By(e,t){t===void 0&&(t={});for(var n=[],r=typeof t.replace=="function",o=t.transform||oi.returnFirstArg,i=t.library||xA,s=i.cloneElement,a=i.createElement,u=i.isValidElement,l=e.length,f=0;f<l;f++){var d=e[f];if(r){var h=t.replace(d,f);if(u(h)){l>1&&(h=s(h,{key:h.key||f})),n.push(o(h,d,f));continue}}if(d.type==="text"){var v=!d.data.trim().length;if(v&&d.parent&&!(0,oi.canTextBeChildOfNode)(d.parent)||t.trim&&v)continue;n.push(o(d.data,d,f));continue}var m=d,g={};SA(m)?((0,oi.setStyleProp)(m.attribs.style,m.attribs),g=m.attribs):m.attribs&&(g=(0,DA.default)(m.attribs,m.name));var p=void 0;switch(d.type){case"script":case"style":d.children[0]&&(g.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?g.defaultValue=d.children[0].data:d.children&&d.children.length&&(p=By(d.children,t));break;default:continue}l>1&&(g.key=f),n.push(o(a(d.name,g,p),d,f))}return n.length===1?n[0]:n}function SA(e){return oi.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,oi.isCustomComponent)(e.name,e.attribs)}(function(e){var t=lt&<.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var n=t(Nl);e.htmlToDOM=n.default;var r=t(Vs);e.attributesToProps=r.default;var o=t(ec);e.domToReact=o.default;var i=Wl;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.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,o.default)((0,n.default)(u,(l==null?void 0:l.htmlparser2)||s),l):[]}})(Qm);const Ty=hi(Qm),LA=Ty.default||Ty,nc=e=>{if(typeof e=="string")return{text:e||""};function t(o){return o.map(i=>nc(i))}const n=Array.isArray(e.props.children)?t(e.props.children):[{text:e.props.children}],r=typeof e.props.children=="string"?e.props.children:"";switch(e.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}}},OA=e=>{const t=LA(e);return Array.isArray(t)?t.flatMap(n=>typeof n=="string"?{text:n}:nc(n)):typeof t=="string"?[{text:t}]:[nc(t)]};function Ay(e){return e.map(t=>ge.string(t)).join("")}const Fy=e=>{if(xe.isText(e)){let t=e.text;return e.bold&&(t=`<strong>${t}</strong>`),e.code&&(t=`<code>${t}</code>`),e.italic&&(t=`<em>${t}</em>`),e.underline&&(t=`<u>${t}</u>`),t}if(De.isElement(e)){const t=e.children.map(n=>Fy(n)).join("");switch(e.type){case"paragraph":return`<p>${t}</p>`;case"blockQuote":return`<blockquote>${t}</blockquote>`;case"bulletedList":return`<ul>${t}</ul>`;case"headingOne":return`<h1>${t}</h1>`;case"headingTwo":return`<h2>${t}</h2>`;case"listItem":return`<li>${t}</li>`;case"numberedList":return`<ol>${t}</ol>`;default:return t}}return""},Iy=e=>e.children.map(t=>Fy(t)).join(""),_y=e=>/<\/?[a-z][\s\S]*>/i.test(e);function kA({name:e,defaultValue:t,enforceCharacterLimit:n=!1,onChangeCharactersCount:r,maxLimit:o=2e3,onValueChange:i,onChange:s,isError:a}){const u=c.useMemo(()=>lP(yT(sP())),[]),{id:l,inputRef:f,error:d}=an(),h=c.useRef(null),v=_y(t)?OA(t):DT,m=Ay(v),[g,p]=c.useState(m.length),[E,S]=c.useState(_y(t)?t:""),[D,M]=c.useState(!1),b=f||h,w=a||!!d,L=c.useCallback(ET,[]),O=c.useCallback(CT,[]);function H(F){const N=Ay(F);p(N.length),r&&r(N.length),!(n&&N.length>=o)&&(S(Iy(u)),s&&s(F),i&&i(Iy(u)),u.children=F,ue.setNodes(u,{children:F}))}const P=D?"focusTrue":"focusFalse",_=`arkynRichText ${w||o<g?"errorTrue":"errorFalse"} ${P}`,R=o-g;return A.jsxs(vT,{editor:u,initialValue:v,onChange:H,onValueChange:H,children:[A.jsxs("div",{className:_,children:[A.jsxs(wT,{children:[A.jsx(Yr,{format:"headingOne",icon:Ue.Heading1}),A.jsx(Yr,{format:"headingTwo",icon:Ue.Heading2}),A.jsx(Yr,{format:"blockQuote",icon:Ue.Quote}),A.jsx(_s,{format:"bold",icon:Ue.Bold}),A.jsx(_s,{format:"italic",icon:Ue.Italic}),A.jsx(_s,{format:"underline",icon:Ue.Underline}),A.jsx(_s,{format:"code",icon:Ue.Code}),A.jsx(Yr,{format:"left",icon:Ue.AlignLeft}),A.jsx(Yr,{format:"right",icon:Ue.AlignRight}),A.jsx(Yr,{format:"center",icon:Ue.AlignCenter}),A.jsx(Yr,{format:"justify",icon:Ue.AlignJustify})]}),A.jsx(aT,{className:"editorContainer",renderElement:O,renderLeaf:L,spellCheck:!0,id:l,onFocus:()=>M(!0),onBlur:()=>M(!1),onKeyDown:F=>{for(const N in Jm)if(kL(N,F)){F.preventDefault();const Y=Jm[N];Xm(u,Y)}}}),R<0&&A.jsx("div",{className:"restatesCharacters",children:R})]}),A.jsx("input",{ref:b,type:"hidden",name:e,value:E}),A.jsx("input",{type:"hidden",name:`${e}Count`,value:g})]})}function PA(e,t){const{isLoading:n,isError:r,size:o="md",className:i="",variant:s="solid",prefix:a,leftIcon:u,disabled:l,readOnly:f,onFocus:d,onBlur:h,title:v,style:m,closeOnSelect:g=!0,...p}=e,b=`arkyn_select ${a?"hasPrefix":""} ${s} ${o} ${l||f||n?"opacity":""} ${r?"errored":""} ${t?"focused":""} ${i}`,L={md:20,lg:20}[o];return{isLoading:n,className:b,prefix:tb(a,L,"prefix"),LeftIcon:u,disabled:l||n||f,onFocus:d,onBlur:h,title:v,closeOnSelect:g,style:m,iconSize:L,Spinner:A.jsx(Ue.Loader2,{className:"spinner",size:L,strokeWidth:2.5}),...p}}function MA(e){var Z;const[t,n]=c.useState(!1),{inputRef:r,id:o,error:i}=an(),s=c.useRef(null),a=r||s,u=e.isError||!!i,{disabled:l,title:f,style:d,className:h,prefix:v,iconSize:m,isLoading:g,LeftIcon:p,value:E=null,defaultValue:S="",onFocus:D,onBlur:M,Spinner:b,name:w,placeholder:L,onSelect:O,options:H,optionMaxHeight:P,closeOnSelect:V,..._}=PA({...e,id:o,isError:u},t),[R,F]=c.useState(S);function N(){l||!(a!=null&&a.current)||t||(n(!0),a.current.focus())}function Y($){t||(n(!0),D&&D($))}function I(){n(!1),M&&a.current&&a.current.blur()}function Q($){const{label:K,value:G}=$;F(R!==G?G:""),O&&O({label:K,value:G}),V&&I()}const ne=typeof E=="string"?E:R,k=((Z=H.find($=>$.value===ne))==null?void 0:Z.label)||"",T=()=>{if(!t&&k)return!0;if(!t&&!k)return!1;if(t&&k)return!0;if(t&&!k)return!1};return A.jsxs(A.Fragment,{children:[A.jsxs("section",{title:f,style:d,onClick:N,className:`${h} placeholder_dark_${T()}`,children:[v,p&&A.jsx(p,{size:m,strokeWidth:2.5}),A.jsx("input",{disabled:l,readOnly:!0,placeholder:k||L,onFocus:Y,..._}),A.jsx("input",{type:"hidden",ref:a,name:w,value:ne||"",readOnly:!0}),t&&A.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[H.map(({label:$,value:K})=>A.jsxs("div",{onClick:()=>Q({label:$,value:K}),className:ne===K?"arkyn_select_option active":"arkyn_select_option",children:[$," ",A.jsx(Ue.Check,{})]},K)),H.length<=0&&A.jsx("p",{children:"Sem opções disponíveis"})]}),!g&&A.jsx(Ue.ChevronDown,{className:"arkyn_select_arrow",size:m,strokeWidth:2.5}),g&&b]}),t&&A.jsx("aside",{className:"arkyn_select_overlay",onClick:I})]})}function BA(e){const{size:t="lg",defaultChecked:n=!1,checked:r=null,value:o,unCheckedValue:i="",name:s,className:a="",onCheck:u,...l}=e,[f,d]=c.useState(n),{id:h,inputRef:v}=an(),m=typeof r=="boolean"?r:f;function g(){d(!f),u&&u(m?i:o||"checked")}const E=`arkynSwitch ${m?"checkedTrue":"checkedFalse"} ${t} ${a}`;return A.jsx("button",{type:"button",onClick:g,className:E,...l,children:A.jsx("input",{id:h,type:"hidden",name:s,ref:v,onClick:g,value:m?o||"checked":i})})}function TA(e){const{variant:t="solid",size:n="md",className:r,disabled:o=!1,readOnly:i=!1,onFocus:s,onBlur:a,title:u,style:l,...f}=e,[d,h]=c.useState(!1),{inputRef:v,id:m,error:g}=an(),p=c.useRef(null),E=v||p,D=e.isError||!!g?"errorTrue":"errorFalse",w=`arkynTextarea ${t} ${n} ${o||i?"opacityTrue":"opacityFalse"} ${D} ${d?"focusedTrue":"focusedFalse"} ${r}`;function L(){o||!(E!=null&&E.current)||(h(!0),E.current.focus())}function O(P){h(!0),s&&s(P)}function H(P){h(!1),a&&a(P)}return A.jsx("section",{title:u,style:l,onClick:L,className:w,children:A.jsx("textarea",{id:m,disabled:o,readOnly:i,ref:E,onFocus:O,onBlur:H,...f})})}function AA(e){const{className:t="",...n}=e,r=`arkynBreadcrumbContainer ${t}`;return A.jsx("nav",{className:r,...n})}function FA(e){const{pathname:t}=on.useLocation(),{className:n="",disabled:r=!1,children:o,to:i,...s}=e,u=`arkynBreadcrumbLink ${t===i?"active":"inactive"} ${n}`;return r?A.jsxs("p",{className:u,children:[A.jsx(Ue.ChevronRight,{size:14,strokeWidth:2.5}),o]}):A.jsxs(on.Link,{to:i,className:u,...s,children:[A.jsx(Ue.ChevronRight,{size:14,strokeWidth:2.5}),o]})}function rc(e=""){const t=on.useLocation(),n=new URLSearchParams(t.search),r=e?`${e}:`:"",o=i=>{Object.entries(i).forEach(([s,a])=>{a===void 0?n.delete(`${r}${s}`):n.set(`${r}${s}`,String(a))})};return{getParam:i=>n.get(`${r}${i}`),getScopedSearch:i=>{o(i);let s=n.toString();return s&&(s="?"+s),s}}}function IA(e){const{scope:t,totalCountRegisters:n,perPageKey:r="per_page",pageKey:o="page",siblingsCount:i=2,...s}=e,a=on.useNavigate(),{getParam:u,getScopedSearch:l}=rc(t),f=Number(u(o))||1,d=Number(u(r))||20,h=Math.ceil(n/d),v=eb(f,i),m=Q0(f,i,h);function g(p){a(l({page:p}))}return A.jsxs("div",{className:"arkynPagination",...s,children:[A.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>g(f-1),children:A.jsx(Ue.ChevronLeft,{})}),f>1+i&&A.jsxs(A.Fragment,{children:[A.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>g(1),children:"1"}),f>2+i&&A.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:A.jsx(Ue.Ellipsis,{})})]}),v.map((p,E)=>A.jsx("button",{onClick:()=>g(p),className:"arkynPaginationPageButton",children:p},E)),A.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),m.map((p,E)=>A.jsx("button",{onClick:()=>g(p),className:"arkynPaginationPageButton",children:p},E)),f+i<h&&A.jsxs(A.Fragment,{children:[f+1+i<h&&A.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:A.jsx(Ue.Ellipsis,{})}),A.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>g(h),children:h})]}),A.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=h,onClick:()=>g(f+1),children:A.jsx(Ue.ChevronRight,{})})]})}const oc=c.createContext({});function _A(){if(!oc)throw new Error("useTabContext must be used within a TabProvider");return c.useContext(oc)}function RA(e){const{children:t,onClick:n,defaultActive:r,className:o,...i}=e,[s,a]=c.useState(r||""),[u,l]=c.useState(!0),f=c.useRef(null),d=`arkynTabContainer ${o||""}`,[h,v]=c.useState({width:"0px",left:"0px",transition:"none"}),m=(p,E)=>{const S=p.getBoundingClientRect(),D=f.current.getBoundingClientRect(),M=E?void 0:"none";l(!1),v({transition:M,width:`${S.width}px`,left:`${S.left-D.left}px`})};c.useEffect(()=>{const p=f.current;if(!p)return;let E=null;E=p.querySelector("button.activeTrue"),E&&m(E)},[]);const g=p=>{const E=p.target;E&&(a(E.value),E.classList.add("activeTrue"),m(E,!0),n&&n(E.value))};return A.jsxs("nav",{ref:f,className:d.trim(),...i,children:[A.jsx(oc.Provider,{value:{handleTabClick:g,showInitialTab:u,value:s},children:t}),A.jsx("div",{className:"activeLine",style:h})]})}function jA(e){const{children:t,className:n="",onClick:r,...o}=e,{value:i,showInitialTab:s,handleTabClick:a}=_A(),u=i===o.value&&i?"activeTrue":"activeFalse",f=`arkynTabButton ${i===o.value&&s?"showBorderBottom":""} ${u} ${n}`;function d(h){a(h),r&&r(h)}return A.jsx("button",{onClick:d,className:f.trim(),...o,children:t})}const Ry=c.createContext({});function NA(e){const{isVisibled:t,makeInvisible:n,orientation:r="left",children:o,className:i,...s}=e,a=r==="left"?"-100%":"100%",l=`arkynDrawerContainer ${r} ${t?"visibleTrue":"visibleFalse"} ${i}`;return A.jsx(Ry.Provider,{value:{makeInvisible:n},children:A.jsx(Pr.AnimatePresence,{children:t&&A.jsxs("aside",{className:l.trim(),...s,children:[A.jsx(Pr.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),A.jsx(Pr.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${a})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${a})`},children:o})]})})})}function zA(e){const{showCloseButton:t=!0,className:n,children:r,...o}=e,{makeInvisible:i}=c.useContext(Ry),s=`arkynDrawerHeader ${n}`;return A.jsxs("header",{className:s.trim(),...o,children:[r,t&&A.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:i,"aria-label":"Close drawer",children:A.jsx(Ue.X,{size:24})})]})}const jy=c.createContext({});function $A(e){const{isVisibled:t,makeInvisible:n,children:r,className:o="",...i}=e,a=`arkynModalContainer ${t?"visibleTrue":"visibleFalse"} ${o}`;return A.jsx(jy.Provider,{value:{makeInvisible:n},children:A.jsx(Pr.AnimatePresence,{children:t&&A.jsxs("aside",{className:a.trim(),...i,children:[A.jsx(Pr.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),A.jsx(Pr.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 UA(e){const{alignment:t="right",className:n,...r}=e,o=`arkynModalFooter ${t} ${n}`;return A.jsx("footer",{className:o.trim(),...r})}function WA(e){const{showCloseButton:t=!0,className:n,children:r,...o}=e,{makeInvisible:i}=c.useContext(jy),s=`arkynModalHeader ${n}`;return A.jsxs("header",{className:s.trim(),...o,children:[r,t&&A.jsx("button",{type:"button",onClick:i,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:A.jsx(Ue.X,{size:24})})]})}function HA(e){const{children:t,button:n,closeOnClick:r,orientation:o="bottomLeft"}=e,[i,s]=c.useState(!1),u=`arkynPopover ${o} ${i?"visibleTrue":"visibleFalse"}`;function l(){i||s(!0)}return A.jsxs("div",{className:u,onClick:l,children:[n,A.jsx(Pr.motion.div,{style:{visibility:i?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:i?1:0},exit:{opacity:0},onClick:()=>r&&s(!1),className:"arkynPopoverContent",children:t}),i&&A.jsx("div",{onClick:()=>s(!1),className:"arkynPopoverOverlay"})]})}function VA(e){const{message:t,type:n}=e,r=`arkynToast ${n}}`;function o(){switch(n){case"success":return A.jsx(Ue.CheckCircle2,{});case"danger":return A.jsx(Ue.XCircle,{});default:return A.jsx(Ue.Info,{})}}return A.jsxs("div",{className:r,children:[A.jsxs("div",{children:[A.jsx("div",{className:"bg"}),A.jsx(o,{})]}),A.jsx("p",{children:A.jsx("span",{children:t})})]})}function qA(e){const{text:t,size:n="lg",children:r,orientation:o="top",className:i="",...s}=e,a=`arkynTooltip ${n} ${o} ${i}`;return A.jsxs("div",{className:a.trim(),...s,children:[r,A.jsx("div",{className:"arkynTooltipText",children:t})]})}var Mt={},ic={},ii={},si={},Ny="Expected a function",zy=NaN,ZA="[object Symbol]",GA=/^\s+|\s+$/g,KA=/^[-+]0x[0-9a-f]+$/i,YA=/^0b[01]+$/i,XA=/^0o[0-7]+$/i,JA=parseInt,QA=typeof lt=="object"&<&<.Object===Object&<,eF=typeof self=="object"&&self&&self.Object===Object&&self,tF=QA||eF||Function("return this")(),nF=Object.prototype,rF=nF.toString,oF=Math.max,iF=Math.min,sc=function(){return tF.Date.now()};function sF(e,t,n){var r,o,i,s,a,u,l=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Ny);t=$y(t)||0,Ys(n)&&(f=!!n.leading,d="maxWait"in n,i=d?oF($y(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function v(w){var L=r,O=o;return r=o=void 0,l=w,s=e.apply(O,L),s}function m(w){return l=w,a=setTimeout(E,t),f?v(w):s}function g(w){var L=w-u,O=w-l,H=t-L;return d?iF(H,i-O):H}function p(w){var L=w-u,O=w-l;return u===void 0||L>=t||L<0||d&&O>=i}function E(){var w=sc();if(p(w))return S(w);a=setTimeout(E,g(w))}function S(w){return a=void 0,h&&r?v(w):(r=o=void 0,s)}function D(){a!==void 0&&clearTimeout(a),l=0,r=u=o=a=void 0}function M(){return a===void 0?s:S(sc())}function b(){var w=sc(),L=p(w);if(r=arguments,o=this,u=w,L){if(a===void 0)return m(u);if(d)return a=setTimeout(E,t),v(u)}return a===void 0&&(a=setTimeout(E,t)),s}return b.cancel=D,b.flush=M,b}function aF(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(Ny);return Ys(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),sF(e,t,{leading:r,maxWait:t,trailing:o})}function Ys(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function uF(e){return!!e&&typeof e=="object"}function lF(e){return typeof e=="symbol"||uF(e)&&rF.call(e)==ZA}function $y(e){if(typeof e=="number")return e;if(lF(e))return zy;if(Ys(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ys(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(GA,"");var n=YA.test(e);return n||XA.test(e)?JA(e.slice(2),n?2:8):KA.test(e)?zy:+e}var cF=aF,ai={};Object.defineProperty(ai,"__esModule",{value:!0}),ai.addPassiveEventListener=function(t,n,r){var o=r.name;o||(o=n,console.warn("Listener must be a named function.")),Xs.has(n)||Xs.set(n,new Set);var i=Xs.get(n);if(!i.has(o)){var s=function(){var a=!1;try{var u=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,u)}catch{}return a}();t.addEventListener(n,r,s?{passive:!0}:!1),i.add(o)}},ai.removePassiveEventListener=function(t,n,r){t.removeEventListener(n,r),Xs.get(n).delete(r.name||n)};var Xs=new Map;Object.defineProperty(si,"__esModule",{value:!0});var fF=cF,dF=hF(fF),pF=ai;function hF(e){return e&&e.__esModule?e:{default:e}}var gF=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,dF.default)(t,n)},Lt={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(t,n){if(t){var r=gF(function(o){Lt.scrollHandler(t)},n);Lt.scrollSpyContainers.push(t),(0,pF.addPassiveEventListener)(t,"scroll",r)}},isMounted:function(t){return Lt.scrollSpyContainers.indexOf(t)!==-1},currentPositionX:function(t){if(t===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return t.scrollLeft},currentPositionY:function(t){if(t===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return t.scrollTop},scrollHandler:function(t){var n=Lt.scrollSpyContainers[Lt.scrollSpyContainers.indexOf(t)].spyCallbacks||[];n.forEach(function(r){return r(Lt.currentPositionX(t),Lt.currentPositionY(t))})},addStateHandler:function(t){Lt.spySetState.push(t)},addSpyHandler:function(t,n){var r=Lt.scrollSpyContainers[Lt.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(t),t(Lt.currentPositionX(n),Lt.currentPositionY(n))},updateStates:function(){Lt.spySetState.forEach(function(t){return t()})},unmount:function(t,n){Lt.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Lt.spySetState&&Lt.spySetState.length&&Lt.spySetState.indexOf(t)>-1&&Lt.spySetState.splice(Lt.spySetState.indexOf(t),1),document.removeEventListener("scroll",Lt.scrollHandler)},update:function(){return Lt.scrollSpyContainers.forEach(function(t){return Lt.scrollHandler(t)})}};si.default=Lt;var fo={},ui={};Object.defineProperty(ui,"__esModule",{value:!0});var vF=function(t,n){var r=t.indexOf("#")===0?t.substring(1):t,o=r?"#"+r:"",i=window&&window.location,s=o?i.pathname+i.search+o:i.pathname+i.search;n?history.pushState(history.state,"",s):history.replaceState(history.state,"",s)},mF=function(){return window.location.hash.replace(/^#/,"")},yF=function(t){return function(n){return t.contains?t!=n&&t.contains(n):!!(t.compareDocumentPosition(n)&16)}},bF=function(t){return getComputedStyle(t).position!=="static"},ac=function(t,n){for(var r=t.offsetTop,o=t.offsetParent;o&&!n(o);)r+=o.offsetTop,o=o.offsetParent;return{offsetTop:r,offsetParent:o}},CF=function(t,n,r){if(r)return t===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(t).position!=="static"?n.offsetLeft:n.offsetLeft-t.offsetLeft;if(t===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(bF(t)){if(n.offsetParent!==t){var o=function(f){return f===t||f===document},i=ac(n,o),s=i.offsetTop,a=i.offsetParent;if(a!==t)throw new Error("Seems containerElement is not an ancestor of the Element");return s}return n.offsetTop}if(n.offsetParent===t.offsetParent)return n.offsetTop-t.offsetTop;var u=function(f){return f===document};return ac(n,u).offsetTop-ac(t,u).offsetTop};ui.default={updateHash:vF,getHash:mF,filterElementInContainer:yF,scrollOffset:CF};var Js={},uc={};Object.defineProperty(uc,"__esModule",{value:!0}),uc.default={defaultEasing:function(t){return t<.5?Math.pow(t*2,2)/2:1-Math.pow((1-t)*2,2)/2},linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}};var lc={};Object.defineProperty(lc,"__esModule",{value:!0});var EF=ai,wF=["mousedown","mousewheel","touchmove","keydown"];lc.default={subscribe:function(t){return typeof document<"u"&&wF.forEach(function(n){return(0,EF.addPassiveEventListener)(document,n,t)})}};var li={};Object.defineProperty(li,"__esModule",{value:!0});var cc={registered:{},scrollEvent:{register:function(t,n){cc.registered[t]=n},remove:function(t){cc.registered[t]=null}}};li.default=cc,Object.defineProperty(Js,"__esModule",{value:!0});var DF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xF=ui;Qs(xF);var SF=uc,Uy=Qs(SF),LF=lc,OF=Qs(LF),kF=li,Un=Qs(kF);function Qs(e){return e&&e.__esModule?e:{default:e}}var Wy=function(t){return Uy.default[t.smooth]||Uy.default.defaultEasing},PF=function(t){return typeof t=="function"?t:function(){return t}},MF=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},fc=function(){return MF()||function(e,t,n){window.setTimeout(e,n||1e3/60,new Date().getTime())}}(),Hy=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}},Vy=function(t){var n=t.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:o?document.documentElement.scrollLeft:document.body.scrollLeft},qy=function(t){var n=t.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,o=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:o?document.documentElement.scrollTop:document.body.scrollTop},BF=function(t){var n=t.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,o=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,o.clientWidth,o.scrollWidth,o.offsetWidth)},TF=function(t){var n=t.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,o=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,o.clientHeight,o.scrollHeight,o.offsetHeight)},AF=function e(t,n,r){var o=n.data;if(!n.ignoreCancelEvents&&o.cancel){Un.default.registered.end&&Un.default.registered.end(o.to,o.target,o.currentPositionY);return}if(o.delta=Math.round(o.targetPosition-o.startPosition),o.start===null&&(o.start=r),o.progress=r-o.start,o.percent=o.progress>=o.duration?1:t(o.progress/o.duration),o.currentPosition=o.startPosition+Math.ceil(o.delta*o.percent),o.containerElement&&o.containerElement!==document&&o.containerElement!==document.body?n.horizontal?o.containerElement.scrollLeft=o.currentPosition:o.containerElement.scrollTop=o.currentPosition:n.horizontal?window.scrollTo(o.currentPosition,0):window.scrollTo(0,o.currentPosition),o.percent<1){var i=e.bind(null,t,n);fc.call(window,i);return}Un.default.registered.end&&Un.default.registered.end(o.to,o.target,o.currentPosition)},dc=function(t){t.data.containerElement=t?t.containerId?document.getElementById(t.containerId):t.container&&t.container.nodeType?t.container:document:null},ci=function(t,n,r,o){n.data=n.data||Hy(),window.clearTimeout(n.data.delayTimeout);var i=function(){n.data.cancel=!0};if(OF.default.subscribe(i),dc(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?Vy(n):qy(n),n.data.targetPosition=n.absolute?t:t+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Un.default.registered.end&&Un.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=PF(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=o;var s=Wy(n),a=AF.bind(null,s,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Un.default.registered.begin&&Un.default.registered.begin(n.data.to,n.data.target),fc.call(window,a)},n.delay);return}Un.default.registered.begin&&Un.default.registered.begin(n.data.to,n.data.target),fc.call(window,a)},ea=function(t){return t=DF({},t),t.data=t.data||Hy(),t.absolute=!0,t},FF=function(t){ci(0,ea(t))},IF=function(t,n){ci(t,ea(n))},_F=function(t){t=ea(t),dc(t),ci(t.horizontal?BF(t):TF(t),t)},RF=function(t,n){n=ea(n),dc(n);var r=n.horizontal?Vy(n):qy(n);ci(t+r,n)};Js.default={animateTopScroll:ci,getAnimationType:Wy,scrollToTop:FF,scrollToBottom:_F,scrollTo:IF,scrollMore:RF},Object.defineProperty(fo,"__esModule",{value:!0});var jF=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NF=ui,zF=pc(NF),$F=Js,UF=pc($F),WF=li,ta=pc(WF);function pc(e){return e&&e.__esModule?e:{default:e}}var na={},Zy=void 0;fo.default={unmount:function(){na={}},register:function(t,n){na[t]=n},unregister:function(t){delete na[t]},get:function(t){return na[t]||document.getElementById(t)||document.getElementsByName(t)[0]||document.getElementsByClassName(t)[0]},setActiveLink:function(t){return Zy=t},getActiveLink:function(){return Zy},scrollTo:function(t,n){var r=this.get(t);if(!r){console.warn("target Element not found");return}n=jF({},n,{absolute:!1});var o=n.containerId,i=n.container,s=void 0;o?s=document.getElementById(o):i&&i.nodeType?s=i:s=document,n.absolute=!0;var a=n.horizontal,u=zF.default.scrollOffset(s,r,a)+(n.offset||0);if(!n.smooth){ta.default.registered.begin&&ta.default.registered.begin(t,r),s===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):s.scrollTop=u,ta.default.registered.end&&ta.default.registered.end(t,r);return}UF.default.animateTopScroll(u,n,t,r)}};var hc={exports:{}},ra={exports:{}},st={};/** @license React v16.13.1
|
93
368
|
* react-is.production.min.js
|
94
369
|
*
|
95
370
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
96
371
|
*
|
97
372
|
* This source code is licensed under the MIT license found in the
|
98
373
|
* LICENSE file in the root directory of this source tree.
|
99
|
-
*/var
|
374
|
+
*/var Gy;function HF(){if(Gy)return st;Gy=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case t:switch(b=b.type,b){case u:case l:case r:case i:case o:case d:return b;default:switch(b=b&&b.$$typeof,b){case a:case f:case m:case v:case s:return b;default:return w}}case n:return w}}}function M(b){return D(b)===l}return st.AsyncMode=u,st.ConcurrentMode=l,st.ContextConsumer=a,st.ContextProvider=s,st.Element=t,st.ForwardRef=f,st.Fragment=r,st.Lazy=m,st.Memo=v,st.Portal=n,st.Profiler=i,st.StrictMode=o,st.Suspense=d,st.isAsyncMode=function(b){return M(b)||D(b)===u},st.isConcurrentMode=M,st.isContextConsumer=function(b){return D(b)===a},st.isContextProvider=function(b){return D(b)===s},st.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},st.isForwardRef=function(b){return D(b)===f},st.isFragment=function(b){return D(b)===r},st.isLazy=function(b){return D(b)===m},st.isMemo=function(b){return D(b)===v},st.isPortal=function(b){return D(b)===n},st.isProfiler=function(b){return D(b)===i},st.isStrictMode=function(b){return D(b)===o},st.isSuspense=function(b){return D(b)===d},st.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===i||b===o||b===d||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===v||b.$$typeof===s||b.$$typeof===a||b.$$typeof===f||b.$$typeof===p||b.$$typeof===E||b.$$typeof===S||b.$$typeof===g)},st.typeOf=D,st}var at={};/** @license React v16.13.1
|
100
375
|
* react-is.development.js
|
101
376
|
*
|
102
377
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
103
378
|
*
|
104
379
|
* This source code is licensed under the MIT license found in the
|
105
380
|
* LICENSE file in the root directory of this source tree.
|
106
|
-
*/var
|
381
|
+
*/var Ky;function VF(){return Ky||(Ky=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function D(j){return typeof j=="string"||typeof j=="function"||j===r||j===l||j===i||j===o||j===d||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===v||j.$$typeof===s||j.$$typeof===a||j.$$typeof===f||j.$$typeof===p||j.$$typeof===E||j.$$typeof===S||j.$$typeof===g)}function M(j){if(typeof j=="object"&&j!==null){var se=j.$$typeof;switch(se){case t:var ae=j.type;switch(ae){case u:case l:case r:case i:case o:case d:return ae;default:var fe=ae&&ae.$$typeof;switch(fe){case a:case f:case m:case v:case s:return fe;default:return se}}case n:return se}}}var b=u,w=l,L=a,O=s,H=t,P=f,V=r,_=m,R=v,F=n,N=i,Y=o,I=d,Q=!1;function ne(j){return Q||(Q=!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(j)||M(j)===u}function k(j){return M(j)===l}function T(j){return M(j)===a}function Z(j){return M(j)===s}function $(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function K(j){return M(j)===f}function G(j){return M(j)===r}function y(j){return M(j)===m}function z(j){return M(j)===v}function W(j){return M(j)===n}function B(j){return M(j)===i}function X(j){return M(j)===o}function ee(j){return M(j)===d}at.AsyncMode=b,at.ConcurrentMode=w,at.ContextConsumer=L,at.ContextProvider=O,at.Element=H,at.ForwardRef=P,at.Fragment=V,at.Lazy=_,at.Memo=R,at.Portal=F,at.Profiler=N,at.StrictMode=Y,at.Suspense=I,at.isAsyncMode=ne,at.isConcurrentMode=k,at.isContextConsumer=T,at.isContextProvider=Z,at.isElement=$,at.isForwardRef=K,at.isFragment=G,at.isLazy=y,at.isMemo=z,at.isPortal=W,at.isProfiler=B,at.isStrictMode=X,at.isSuspense=ee,at.isValidElementType=D,at.typeOf=M}()),at}var Yy;function Xy(){return Yy||(Yy=1,process.env.NODE_ENV==="production"?ra.exports=HF():ra.exports=VF()),ra.exports}/*
|
107
382
|
object-assign
|
108
383
|
(c) Sindre Sorhus
|
109
384
|
@license MIT
|
110
|
-
*/var
|
111
|
-
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var G=te(W,X,ee,Y,C+"."+X,n);if(G)return G}return null}return d(H)}function T(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(T);if(k===null||a(k))return!0;var H=p(k);if(H){var J=H.call(k),q;if(H!==k.entries){for(;!(q=J.next()).done;)if(!T(q.value))return!1}else for(;!(q=J.next()).done;){var ee=q.value;if(ee&&!T(ee[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,H){return k==="symbol"?!0:H?H["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&H instanceof Symbol:!1}function K(k){var H=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(H,k)?"symbol":H}function _(k){if(typeof k>"u"||k===null)return""+k;var H=K(k);if(H==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return H}function ie(k){var H=_(k);switch(H){case"array":case"object":return"an "+H;case"boolean":case"date":case"regexp":return"a "+H;default:return H}}function re(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Os}var Ps,kf;function JE(){if(kf)return Ps;kf=1;var t=Ss();function e(){}function n(){}return n.resetWarningCache=e,Ps=function(){function r(s,a,u,l,c,p){if(p!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},Ps}if(process.env.NODE_ENV!=="production"){var QE=Sf(),$E=!0;ws.exports=XE()(QE.isElement,$E)}else ws.exports=JE()();var Ai=ws.exports,Li={};Object.defineProperty(Li,"__esModule",{value:!0});var eb=Cr,Fs=tb(eb);function tb(t){return t&&t.__esModule?t:{default:t}}var nb={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,i=r.get(e);if(i&&(n||e!==r.getActiveLink())){var o=this.containers[e]||document;r.scrollTo(e,{container:o})}},getHash:function(){return Fs.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Fs.default.getHash()!==e&&Fs.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Li.default=nb,Object.defineProperty(gr,"__esModule",{value:!0});var Oi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ib=f,Tf=br(ib),ob=mr,Pi=br(ob),sb=Nn,ab=br(sb),ub=Ai,qe=br(ub),lb=Li,nn=br(lb);function br(t){return t&&t.__esModule?t:{default:t}}function cb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function db(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var If={to:qe.default.string.isRequired,containerId:qe.default.string,container:qe.default.object,activeClass:qe.default.string,activeStyle:qe.default.object,spy:qe.default.bool,horizontal:qe.default.bool,smooth:qe.default.oneOfType([qe.default.bool,qe.default.string]),offset:qe.default.number,delay:qe.default.number,isDynamic:qe.default.bool,onClick:qe.default.func,duration:qe.default.oneOfType([qe.default.number,qe.default.func]),absolute:qe.default.bool,onSetActive:qe.default.func,onSetInactive:qe.default.func,ignoreCancelEvents:qe.default.bool,hashSpy:qe.default.bool,saveHashHistory:qe.default.bool,spyThrottle:qe.default.number};gr.default=function(t,e){var n=e||ab.default,r=function(o){db(s,o);function s(a){cb(this,s);var u=fb(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return i.call(u),u.state={active:!1},u}return rb(s,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,l=this.props.container;return u&&!l?document.getElementById(u):l&&l.nodeType?l:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Pi.default.isMounted(u)||Pi.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(nn.default.isMounted()||nn.default.mount(n),nn.default.mapContainer(this.props.to,u)),Pi.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Pi.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var l={};this.state&&this.state.active?l=Oi({},this.props.style,this.props.activeStyle):l=Oi({},this.props.style);var c=Oi({},this.props);for(var p in If)c.hasOwnProperty(p)&&delete c[p];return c.className=u,c.style=l,c.onClick=this.handleClick,Tf.default.createElement(t,c)}}]),s}(Tf.default.PureComponent),i=function(){var s=this;this.scrollTo=function(a,u){n.scrollTo(a,Oi({},s.state,u))},this.handleClick=function(a){s.props.onClick&&s.props.onClick(a),a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),s.scrollTo(s.props.to,s.props)},this.spyHandler=function(a,u){var l=s.getScrollSpyContainer();if(!(nn.default.isMounted()&&!nn.default.isInitialized())){var c=s.props.horizontal,p=s.props.to,h=null,g=void 0,y=void 0;if(c){var v=0,d=0,D=0;if(l.getBoundingClientRect){var B=l.getBoundingClientRect();D=B.left}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var b=h.getBoundingClientRect();v=b.left-D+a,d=v+b.width}var O=a-s.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),y=O<Math.floor(v)||O>=Math.floor(d)}else{var E=0,w=0,A=0;if(l.getBoundingClientRect){var F=l.getBoundingClientRect();A=F.top}if(!h||s.props.isDynamic){if(h=n.get(p),!h)return;var R=h.getBoundingClientRect();E=R.top-A+u,w=E+R.height}var P=u-s.props.offset;g=P>=Math.floor(E)&&P<Math.floor(w),y=P<Math.floor(E)||P>=Math.floor(w)}var z=n.getActiveLink();if(y){if(p===z&&n.setActiveLink(void 0),s.props.hashSpy&&nn.default.getHash()===p){var I=s.props.saveHashHistory,j=I===void 0?!1:I;nn.default.changeHash("",j)}s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive(p,h))}if(g&&(z!==p||s.state.active===!1)){n.setActiveLink(p);var T=s.props.saveHashHistory,N=T===void 0?!1:T;s.props.hashSpy&&nn.default.changeHash(p,N),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(p,h))}}}};return r.propTypes=If,r.defaultProps={offset:0},r},Object.defineProperty(hs,"__esModule",{value:!0});var pb=f,jf=Nf(pb),hb=gr,vb=Nf(hb);function Nf(t){return t&&t.__esModule?t:{default:t}}function gb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var yb=function(t){mb(e,t);function e(){var n,r,i,o;gb(this,e);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return o=(r=(i=_f(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(a))),i),i.render=function(){return jf.default.createElement("a",i.props,i.props.children)},r),_f(i,o)}return e}(jf.default.Component);hs.default=(0,vb.default)(yb);var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});var Cb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Db=f,zf=Wf(Db),Eb=gr,bb=Wf(Eb);function Wf(t){return t&&t.__esModule?t:{default:t}}function wb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function xb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Sb=function(t){xb(e,t);function e(){return wb(this,e),Bb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return Cb(e,[{key:"render",value:function(){return zf.default.createElement("button",this.props,this.props.children)}}]),e}(zf.default.Component);Ms.default=(0,bb.default)(Sb);var ks={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var Ab=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Ob=f,Uf=Mi(Ob),Pb=ln;Mi(Pb);var Fb=Nn,Hf=Mi(Fb),Mb=Ai,Rf=Mi(Mb);function Mi(t){return t&&t.__esModule?t:{default:t}}function kb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ib(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Fi.default=function(t){var e=function(n){Ib(r,n);function r(i){kb(this,r);var o=Tb(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return o.childBindings={domNode:null},o}return Lb(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Hf.default.unregister(this.props.name)}},{key:"registerElems",value:function(o){Hf.default.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return Uf.default.createElement(t,Ab({},this.props,{parentBindings:this.childBindings}))}}]),r}(Uf.default.Component);return e.propTypes={name:Rf.default.string,id:Rf.default.string},e},Object.defineProperty(ks,"__esModule",{value:!0});var Vf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jb=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Nb=f,qf=Ts(Nb),_b=Fi,zb=Ts(_b),Wb=Ai,Gf=Ts(Wb);function Ts(t){return t&&t.__esModule?t:{default:t}}function Ub(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hb(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Rb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Zf=function(t){Rb(e,t);function e(){return Ub(this,e),Hb(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return jb(e,[{key:"render",value:function(){var r=this,i=Vf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,qf.default.createElement("div",Vf({},i,{ref:function(s){r.props.parentBindings.domNode=s}}),this.props.children)}}]),e}(qf.default.Component);Zf.propTypes={name:Gf.default.string,id:Gf.default.string},ks.default=(0,zb.default)(Zf);var Is=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yf=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function Kf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xf(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Jf(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ki=f,xn=mr,js=Nn,Ke=Ai,rn=Li,Qf={to:Ke.string.isRequired,containerId:Ke.string,container:Ke.object,activeClass:Ke.string,spy:Ke.bool,smooth:Ke.oneOfType([Ke.bool,Ke.string]),offset:Ke.number,delay:Ke.number,isDynamic:Ke.bool,onClick:Ke.func,duration:Ke.oneOfType([Ke.number,Ke.func]),absolute:Ke.bool,onSetActive:Ke.func,onSetInactive:Ke.func,ignoreCancelEvents:Ke.bool,hashSpy:Ke.bool,spyThrottle:Ke.number},Vb={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||js,i=function(s){Jf(a,s);function a(u){Kf(this,a);var l=Xf(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,u));return o.call(l),l.state={active:!1},l}return Yf(a,[{key:"getScrollSpyContainer",value:function(){var l=this.props.containerId,c=this.props.container;return l?document.getElementById(l):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var l=this.getScrollSpyContainer();xn.isMounted(l)||xn.mount(l,this.props.spyThrottle),this.props.hashSpy&&(rn.isMounted()||rn.mount(r),rn.mapContainer(this.props.to,l)),this.props.spy&&xn.addStateHandler(this.stateHandler),xn.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){xn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var l="";this.state&&this.state.active?l=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():l=this.props.className;var c=Is({},this.props);for(var p in Qf)c.hasOwnProperty(p)&&delete c[p];return c.className=l,c.onClick=this.handleClick,ki.createElement(e,c)}}]),a}(ki.Component),o=function(){var a=this;this.scrollTo=function(u,l){r.scrollTo(u,Is({},a.state,l))},this.handleClick=function(u){a.props.onClick&&a.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),a.scrollTo(a.props.to,a.props)},this.stateHandler=function(){r.getActiveLink()!==a.props.to&&(a.state!==null&&a.state.active&&a.props.onSetInactive&&a.props.onSetInactive(),a.setState({active:!1}))},this.spyHandler=function(u){var l=a.getScrollSpyContainer();if(!(rn.isMounted()&&!rn.isInitialized())){var c=a.props.to,p=null,h=0,g=0,y=0;if(l.getBoundingClientRect){var v=l.getBoundingClientRect();y=v.top}if(!p||a.props.isDynamic){if(p=r.get(c),!p)return;var d=p.getBoundingClientRect();h=d.top-y+u,g=h+d.height}var D=u-a.props.offset,B=D>=Math.floor(h)&&D<Math.floor(g),b=D<Math.floor(h)||D>=Math.floor(g),O=r.getActiveLink();if(b)return c===O&&r.setActiveLink(void 0),a.props.hashSpy&&rn.getHash()===c&&rn.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),xn.updateStates();if(B&&O!==c)return r.setActiveLink(c),a.props.hashSpy&&rn.changeHash(c),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(c)),xn.updateStates()}}};return i.propTypes=Qf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){Jf(i,r);function i(o){Kf(this,i);var s=Xf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,o));return s.childBindings={domNode:null},s}return Yf(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(s){this.props.name!==s.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;js.unregister(this.props.name)}},{key:"registerElems",value:function(s){js.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ki.createElement(e,Is({},this.props,{parentBindings:this.childBindings}))}}]),i}(ki.Component);return n.propTypes={name:Ke.string,id:Ke.string},n}},qb=Vb;Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.Helpers=Qe.ScrollElement=Qe.ScrollLink=ld=Qe.animateScroll=Qe.scrollSpy=Qe.Events=Qe.scroller=Qe.Element=Qe.Button=Qe.Link=void 0;var Gb=hs,$f=kt(Gb),Zb=Ms,ed=kt(Zb),Yb=ks,td=kt(Yb),Kb=Nn,nd=kt(Kb),Xb=Dr,rd=kt(Xb),Jb=mr,id=kt(Jb),Qb=Ei,od=kt(Qb),$b=gr,sd=kt($b),e1=Fi,ad=kt(e1),t1=qb,ud=kt(t1);function kt(t){return t&&t.__esModule?t:{default:t}}Qe.Link=$f.default,Qe.Button=ed.default,Qe.Element=td.default,Qe.scroller=nd.default,Qe.Events=rd.default,Qe.scrollSpy=id.default;var ld=Qe.animateScroll=od.default;Qe.ScrollLink=sd.default,Qe.ScrollElement=ad.default,Qe.Helpers=ud.default,Qe.default={Link:$f.default,Button:ed.default,Element:td.default,scroller:nd.default,Events:rd.default,scrollSpy:id.default,animateScroll:od.default,ScrollLink:sd.default,ScrollElement:ad.default,Helpers:ud.default};const Ns=f.createContext({}),cd=f.createContext({});function fd(){const t=f.useContext(cd);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function dd(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="success"||t.type==="danger")}function n1(){const t=Ot.useActionData(),{closeModal:e,closeAll:n}=f.useContext(Ns),{showToast:r}=fd(),{getParam:i}=ds(),{pathname:o}=Ot.useLocation(),s=Ot.useNavigate(),a=i("closeAllModals");f.useEffect(()=>{a==="true"&&(n(),s(o))},[a]),f.useEffect(()=>{const u=t==null?void 0:t.closeModalKey;u&&e(u)},[t]),f.useEffect(()=>{const u=t==null?void 0:t.toast,l=t==null?void 0:t.message;dd(u)&&r(u),!dd(u)&&l&&r({message:l,type:"danger"})},[t]),f.useEffect(()=>{var u,l;if(typeof((u=t==null?void 0:t.data)==null?void 0:u.scrollTo)=="string"){const c=document.getElementById((l=t==null?void 0:t.data)==null?void 0:l.scrollTo);c&&ld.scrollTo(c.offsetTop-200)}},[t])}const pd=f.createContext({});function r1(t){const e=f.useContext(pd);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:i,closeDrawer:o}=e,s=r(t),a=n(t);return{drawerIsOpen:s,drawerData:a,openDrawer:c=>i(t,c),closeDrawer:()=>o(t)}}else return e}function i1(t){const e=f.useContext(Ns);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:i,closeModal:o}=e,s=r(t),a=n(t);return{modalIsOpen:s,modalData:a,openModal:c=>i(t,c),closeModal:()=>o(t)}}else return e}function o1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(u){return!!n.some(l=>l.key===u)}function o(u){var l;return(l=n.find(c=>c.key===u))==null?void 0:l.data}function s(u,l){const c=i(u);r(c?p=>[...p.filter(g=>g.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function a(u){r(n.filter(l=>l.key!==u))}return x.jsx(pd.Provider,{value:{drawerIsOpen:i,drawerData:o,openDrawer:s,closeDrawer:a},children:e})}function s1({googleMapsApiKey:t,children:e,...n}){return x.jsx(Zd,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function a1(t){const{children:e=!1}=t,[n,r]=f.useState([]);function i(l){return!!n.some(c=>c.key===l)}function o(l){var c;return(c=n.find(p=>p.key===l))==null?void 0:c.data}function s(l,c){const p=i(l);r(p?h=>[...h.filter(y=>y.key!==l),{key:l,data:c}]:[...n,{key:l,data:c}])}function a(l){r(n.filter(c=>c.key!==l))}function u(){r([])}return x.jsx(Ns.Provider,{value:{modalIsOpen:i,modalData:o,openModal:s,closeModal:a,closeAll:u},children:e})}let u1={data:""},l1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||u1,c1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,f1=/\/\*[^]*?\*\/| +/g,hd=/\n+/g,on=(t,e)=>{let n="",r="",i="";for(let o in t){let s=t[o];o[0]=="@"?o[1]=="i"?n=o+" "+s+";":r+=o[1]=="f"?on(s,o):o+"{"+on(s,o[1]=="k"?"":e)+"}":typeof s=="object"?r+=on(s,e?e.replace(/([^,])+/g,a=>o.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=on.p?on.p(o,s):o+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+r},zt={},vd=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+vd(t[n]);return e}return t},d1=(t,e,n,r,i)=>{let o=vd(t),s=zt[o]||(zt[o]=(u=>{let l=0,c=11;for(;l<u.length;)c=101*c+u.charCodeAt(l++)>>>0;return"go"+c})(o));if(!zt[s]){let u=o!==t?t:(l=>{let c,p,h=[{}];for(;c=c1.exec(l.replace(f1,""));)c[4]?h.shift():c[3]?(p=c[3].replace(hd," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][c[1]]=c[2].replace(hd," ").trim();return h[0]})(t);zt[s]=on(i?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&zt.g?zt.g:null;return n&&(zt.g=zt[s]),((u,l,c,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=c?u+l.data:l.data+u)})(zt[s],e,r,a),s},p1=(t,e,n)=>t.reduce((r,i,o)=>{let s=e[o];if(s&&s.call){let a=s(n),u=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=u?"."+u:a&&typeof a=="object"?a.props?"":on(a,""):a===!1?"":a}return r+i+(s??"")},"");function Ti(t){let e=this||{},n=t.call?t(e.p):t;return d1(n.unshift?n.raw?p1(n,[].slice.call(arguments,1),e.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(e.p):i),{}):n,l1(e.target),e.g,e.o,e.k)}let gd,_s,zs;Ti.bind({g:1});let Wt=Ti.bind({k:1});function h1(t,e,n,r){on.p=e,gd=t,_s=n,zs=r}function sn(t,e){let n=this||{};return function(){let r=arguments;function i(o,s){let a=Object.assign({},o),u=a.className||i.className;n.p=Object.assign({theme:_s&&_s()},a),n.o=/ *go\d+/.test(u),a.className=Ti.apply(n,r)+(u?" "+u:""),e&&(a.ref=s);let l=t;return t[0]&&(l=a.as||t,delete a.as),zs&&l[0]&&zs(a),gd(l,a)}return e?e(i):i}}var v1=t=>typeof t=="function",Ii=(t,e)=>v1(t)?t(e):t,g1=(()=>{let t=0;return()=>(++t).toString()})(),md=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),m1=20,ji=new Map,y1=1e3,yd=t=>{if(ji.has(t))return;let e=setTimeout(()=>{ji.delete(t),Sn({type:4,toastId:t})},y1);ji.set(t,e)},C1=t=>{let e=ji.get(t);e&&clearTimeout(e)},Ws=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,m1)};case 1:return e.toast.id&&C1(e.toast.id),{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:n}=e;return t.toasts.find(o=>o.id===n.id)?Ws(t,{type:1,toast:n}):Ws(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?yd(r):t.toasts.forEach(o=>{yd(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===r||r===void 0?{...o,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+i}))}}},Ni=[],_i={toasts:[],pausedAt:void 0},Sn=t=>{_i=Ws(_i,t),Ni.forEach(e=>{e(_i)})},D1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},E1=(t={})=>{let[e,n]=f.useState(_i);f.useEffect(()=>(Ni.push(n),()=>{let i=Ni.indexOf(n);i>-1&&Ni.splice(i,1)}),[e]);let r=e.toasts.map(i=>{var o,s;return{...t,...t[i.type],...i,duration:i.duration||((o=t[i.type])==null?void 0:o.duration)||(t==null?void 0:t.duration)||D1[i.type],style:{...t.style,...(s=t[i.type])==null?void 0:s.style,...i.style}}});return{...e,toasts:r}},b1=(t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(n==null?void 0:n.id)||g1()}),wr=t=>(e,n)=>{let r=b1(e,t,n);return Sn({type:2,toast:r}),r.id},Et=(t,e)=>wr("blank")(t,e);Et.error=wr("error"),Et.success=wr("success"),Et.loading=wr("loading"),Et.custom=wr("custom"),Et.dismiss=t=>{Sn({type:3,toastId:t})},Et.remove=t=>Sn({type:4,toastId:t}),Et.promise=(t,e,n)=>{let r=Et.loading(e.loading,{...n,...n==null?void 0:n.loading});return t.then(i=>(Et.success(Ii(e.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Et.error(Ii(e.error,i),{id:r,...n,...n==null?void 0:n.error})}),t};var w1=(t,e)=>{Sn({type:1,toast:{id:t,height:e}})},B1=()=>{Sn({type:5,time:Date.now()})},x1=t=>{let{toasts:e,pausedAt:n}=E1(t);f.useEffect(()=>{if(n)return;let o=Date.now(),s=e.map(a=>{if(a.duration===1/0)return;let u=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(u<0){a.visible&&Et.dismiss(a.id);return}return setTimeout(()=>Et.dismiss(a.id),u)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[e,n]);let r=f.useCallback(()=>{n&&Sn({type:6,time:Date.now()})},[n]),i=f.useCallback((o,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},c=e.filter(g=>(g.position||l)===(o.position||l)&&g.height),p=c.findIndex(g=>g.id===o.id),h=c.filter((g,y)=>y<p&&g.visible).length;return c.filter(g=>g.visible).slice(...a?[h+1]:[0,h]).reduce((g,y)=>g+(y.height||0)+u,0)},[e]);return{toasts:e,handlers:{updateHeight:w1,startPause:B1,endPause:r,calculateOffset:i}}},S1=Wt`
|
385
|
+
*/var gc,Jy;function qF(){if(Jy)return gc;Jy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[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 gc=o()?Object.assign:function(i,s){for(var a,u=r(i),l,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(u[d]=a[d]);if(e){l=e(a);for(var h=0;h<l.length;h++)n.call(a,l[h])&&(u[l[h]]=a[l[h]])}}return u},gc}var vc,Qy;function mc(){if(Qy)return vc;Qy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vc=e,vc}var yc,e0;function t0(){return e0||(e0=1,yc=Function.call.bind(Object.prototype.hasOwnProperty)),yc}var bc,n0;function ZF(){if(n0)return bc;n0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=mc(),n={},r=t0();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,u,l){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var d;try{if(typeof i[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 i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=i[f](s,f,u,a,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((u||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var v=l?l():"";e("Failed "+a+" type: "+d.message+(v??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bc=o,bc}var Cc,r0;function GF(){if(r0)return Cc;r0=1;var e=Xy(),t=qF(),n=mc(),r=t0(),o=ZF(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Cc=function(a,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(k){var T=k&&(l&&k[l]||k[f]);if(typeof T=="function")return T}var h="<<anonymous>>",v={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:S(),arrayOf:D,element:M(),elementType:b(),instanceOf:w,node:P(),objectOf:O,oneOf:L,oneOfType:H,shape:_,exact:R};function m(k,T){return k===T?k!==0||1/k===1/T:k!==k&&T!==T}function g(k,T){this.message=k,this.data=T&&typeof T=="object"?T:{},this.stack=""}g.prototype=Error.prototype;function p(k){if(process.env.NODE_ENV!=="production")var T={},Z=0;function $(G,y,z,W,B,X,ee){if(W=W||h,X=X||z,ee!==n){if(u){var j=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=W+":"+z;!T[se]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[se]=!0,Z++)}}return y[z]==null?G?y[z]===null?new g("The "+B+" `"+X+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+B+" `"+X+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(y,z,W,B,X)}var K=$.bind(null,!1);return K.isRequired=$.bind(null,!0),K}function E(k){function T(Z,$,K,G,y,z){var W=Z[$],B=Y(W);if(B!==k){var X=I(W);return new g("Invalid "+G+" `"+y+"` of type "+("`"+X+"` supplied to `"+K+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return p(T)}function S(){return p(s)}function D(k){function T(Z,$,K,G,y){if(typeof k!="function")return new g("Property `"+y+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var z=Z[$];if(!Array.isArray(z)){var W=Y(z);return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected an array."))}for(var B=0;B<z.length;B++){var X=k(z,B,K,G,y+"["+B+"]",n);if(X instanceof Error)return X}return null}return p(T)}function M(){function k(T,Z,$,K,G){var y=T[Z];if(!a(y)){var z=Y(y);return new g("Invalid "+K+" `"+G+"` of type "+("`"+z+"` supplied to `"+$+"`, expected a single ReactElement."))}return null}return p(k)}function b(){function k(T,Z,$,K,G){var y=T[Z];if(!e.isValidElementType(y)){var z=Y(y);return new g("Invalid "+K+" `"+G+"` of type "+("`"+z+"` supplied to `"+$+"`, expected a single ReactElement type."))}return null}return p(k)}function w(k){function T(Z,$,K,G,y){if(!(Z[$]instanceof k)){var z=k.name||h,W=ne(Z[$]);return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected ")+("instance of `"+z+"`."))}return null}return p(T)}function L(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function T(Z,$,K,G,y){for(var z=Z[$],W=0;W<k.length;W++)if(m(z,k[W]))return null;var B=JSON.stringify(k,function(ee,j){var se=I(j);return se==="symbol"?String(j):j});return new g("Invalid "+G+" `"+y+"` of value `"+String(z)+"` "+("supplied to `"+K+"`, expected one of "+B+"."))}return p(T)}function O(k){function T(Z,$,K,G,y){if(typeof k!="function")return new g("Property `"+y+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type "+("`"+W+"` supplied to `"+K+"`, expected an object."));for(var B in z)if(r(z,B)){var X=k(z,B,K,G,y+"."+B,n);if(X instanceof Error)return X}return null}return p(T)}function H(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var T=0;T<k.length;T++){var Z=k[T];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q(Z)+" at index "+T+"."),s}function $(K,G,y,z,W){for(var B=[],X=0;X<k.length;X++){var ee=k[X],j=ee(K,G,y,z,W,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&B.push(j.data.expectedType)}var se=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new g("Invalid "+z+" `"+W+"` supplied to "+("`"+y+"`"+se+"."))}return p($)}function P(){function k(T,Z,$,K,G){return F(T[Z])?null:new g("Invalid "+K+" `"+G+"` supplied to "+("`"+$+"`, expected a ReactNode."))}return p(k)}function V(k,T,Z,$,K){return new g((k||"React class")+": "+T+" type `"+Z+"."+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function _(k){function T(Z,$,K,G,y){var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type `"+W+"` "+("supplied to `"+K+"`, expected `object`."));for(var B in k){var X=k[B];if(typeof X!="function")return V(K,G,y,B,I(X));var ee=X(z,B,K,G,y+"."+B,n);if(ee)return ee}return null}return p(T)}function R(k){function T(Z,$,K,G,y){var z=Z[$],W=Y(z);if(W!=="object")return new g("Invalid "+G+" `"+y+"` of type `"+W+"` "+("supplied to `"+K+"`, expected `object`."));var B=t({},Z[$],k);for(var X in B){var ee=k[X];if(r(k,X)&&typeof ee!="function")return V(K,G,y,X,I(ee));if(!ee)return new g("Invalid "+G+" `"+y+"` key `"+X+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(Z[$],null," ")+`
|
386
|
+
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var j=ee(z,X,K,G,y+"."+X,n);if(j)return j}return null}return p(T)}function F(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(F);if(k===null||a(k))return!0;var T=d(k);if(T){var Z=T.call(k),$;if(T!==k.entries){for(;!($=Z.next()).done;)if(!F($.value))return!1}else for(;!($=Z.next()).done;){var K=$.value;if(K&&!F(K[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,T){return k==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function Y(k){var T=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(T,k)?"symbol":T}function I(k){if(typeof k>"u"||k===null)return""+k;var T=Y(k);if(T==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return T}function Q(k){var T=I(k);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function ne(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},Cc}var Ec,o0;function KF(){if(o0)return Ec;o0=1;var e=mc();function t(){}function n(){}return n.resetWarningCache=t,Ec=function(){function r(s,a,u,l,f,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Ec}if(process.env.NODE_ENV!=="production"){var YF=Xy(),XF=!0;hc.exports=GF()(YF.isElement,XF)}else hc.exports=KF()();var oa=hc.exports,ia={};Object.defineProperty(ia,"__esModule",{value:!0});var JF=ui,wc=QF(JF);function QF(e){return e&&e.__esModule?e:{default:e}}var eI={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(t){this.scroller=t,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(t,n){this.containers[t]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var t=this,n=this.getHash();n?window.setTimeout(function(){t.scrollTo(n,!0),t.initialized=!0},10):this.initialized=!0},scrollTo:function(t,n){var r=this.scroller,o=r.get(t);if(o&&(n||t!==r.getActiveLink())){var i=this.containers[t]||document;r.scrollTo(t,{container:i})}},getHash:function(){return wc.default.getHash()},changeHash:function(t,n){this.isInitialized()&&wc.default.getHash()!==t&&wc.default.updateHash(t,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};ia.default=eI,Object.defineProperty(ii,"__esModule",{value:!0});var sa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tI=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),nI=c,i0=fi(nI),rI=si,aa=fi(rI),oI=fo,iI=fi(oI),sI=oa,wt=fi(sI),aI=ia,Sr=fi(aI);function fi(e){return e&&e.__esModule?e:{default:e}}function uI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lI(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function cI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s0={to:wt.default.string.isRequired,containerId:wt.default.string,container:wt.default.object,activeClass:wt.default.string,activeStyle:wt.default.object,spy:wt.default.bool,horizontal:wt.default.bool,smooth:wt.default.oneOfType([wt.default.bool,wt.default.string]),offset:wt.default.number,delay:wt.default.number,isDynamic:wt.default.bool,onClick:wt.default.func,duration:wt.default.oneOfType([wt.default.number,wt.default.func]),absolute:wt.default.bool,onSetActive:wt.default.func,onSetInactive:wt.default.func,ignoreCancelEvents:wt.default.bool,hashSpy:wt.default.bool,saveHashHistory:wt.default.bool,spyThrottle:wt.default.number};ii.default=function(e,t){var n=t||iI.default,r=function(i){cI(s,i);function s(a){uI(this,s);var u=lI(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return o.call(u),u.state={active:!1},u}return tI(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();aa.default.isMounted(u)||aa.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&(Sr.default.isMounted()||Sr.default.mount(n),Sr.default.mapContainer(this.props.to,u)),aa.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){aa.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=sa({},this.props.style,this.props.activeStyle):l=sa({},this.props.style);var f=sa({},this.props);for(var d in s0)f.hasOwnProperty(d)&&delete f[d];return f.className=u,f.style=l,f.onClick=this.handleClick,i0.default.createElement(e,f)}}]),s}(i0.default.PureComponent),o=function(){var s=this;this.scrollTo=function(a,u){n.scrollTo(a,sa({},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(!(Sr.default.isMounted()&&!Sr.default.isInitialized())){var f=s.props.horizontal,d=s.props.to,h=null,v=void 0,m=void 0;if(f){var g=0,p=0,E=0;if(l.getBoundingClientRect){var S=l.getBoundingClientRect();E=S.left}if(!h||s.props.isDynamic){if(h=n.get(d),!h)return;var D=h.getBoundingClientRect();g=D.left-E+a,p=g+D.width}var M=a-s.props.offset;v=M>=Math.floor(g)&&M<Math.floor(p),m=M<Math.floor(g)||M>=Math.floor(p)}else{var b=0,w=0,L=0;if(l.getBoundingClientRect){var O=l.getBoundingClientRect();L=O.top}if(!h||s.props.isDynamic){if(h=n.get(d),!h)return;var H=h.getBoundingClientRect();b=H.top-L+u,w=b+H.height}var P=u-s.props.offset;v=P>=Math.floor(b)&&P<Math.floor(w),m=P<Math.floor(b)||P>=Math.floor(w)}var V=n.getActiveLink();if(m){if(d===V&&n.setActiveLink(void 0),s.props.hashSpy&&Sr.default.getHash()===d){var _=s.props.saveHashHistory,R=_===void 0?!1:_;Sr.default.changeHash("",R)}s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive(d,h))}if(v&&(V!==d||s.state.active===!1)){n.setActiveLink(d);var F=s.props.saveHashHistory,N=F===void 0?!1:F;s.props.hashSpy&&Sr.default.changeHash(d,N),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(d,h))}}}};return r.propTypes=s0,r.defaultProps={offset:0},r},Object.defineProperty(ic,"__esModule",{value:!0});var fI=c,a0=u0(fI),dI=ii,pI=u0(dI);function u0(e){return e&&e.__esModule?e:{default:e}}function hI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function gI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var vI=function(e){gI(t,e);function t(){var n,r,o,i;hI(this,t);for(var s=arguments.length,a=Array(s),u=0;u<s;u++)a[u]=arguments[u];return i=(r=(o=l0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(a))),o),o.render=function(){return a0.default.createElement("a",o.props,o.props.children)},r),l0(o,i)}return t}(a0.default.Component);ic.default=(0,pI.default)(vI);var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});var mI=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),yI=c,c0=f0(yI),bI=ii,CI=f0(bI);function f0(e){return e&&e.__esModule?e:{default:e}}function EI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wI(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function DI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var xI=function(e){DI(t,e);function t(){return EI(this,t),wI(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return mI(t,[{key:"render",value:function(){return c0.default.createElement("button",this.props,this.props.children)}}]),t}(c0.default.Component);Dc.default=(0,CI.default)(xI);var xc={},ua={};Object.defineProperty(ua,"__esModule",{value:!0});var SI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LI=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),OI=c,d0=la(OI),kI=xn;la(kI);var PI=fo,p0=la(PI),MI=oa,h0=la(MI);function la(e){return e&&e.__esModule?e:{default:e}}function BI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TI(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function AI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}ua.default=function(e){var t=function(n){AI(r,n);function r(o){BI(this,r);var i=TI(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,o));return i.childBindings={domNode:null},i}return LI(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(i){this.props.name!==i.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;p0.default.unregister(this.props.name)}},{key:"registerElems",value:function(i){p0.default.register(i,this.childBindings.domNode)}},{key:"render",value:function(){return d0.default.createElement(e,SI({},this.props,{parentBindings:this.childBindings}))}}]),r}(d0.default.Component);return t.propTypes={name:h0.default.string,id:h0.default.string},t},Object.defineProperty(xc,"__esModule",{value:!0});var g0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FI=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),II=c,v0=Sc(II),_I=ua,RI=Sc(_I),jI=oa,m0=Sc(jI);function Sc(e){return e&&e.__esModule?e:{default:e}}function NI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zI(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function $I(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y0=function(e){$I(t,e);function t(){return NI(this,t),zI(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return FI(t,[{key:"render",value:function(){var r=this,o=g0({},this.props);return delete o.name,o.parentBindings&&delete o.parentBindings,v0.default.createElement("div",g0({},o,{ref:function(s){r.props.parentBindings.domNode=s}}),this.props.children)}}]),t}(v0.default.Component);y0.propTypes={name:m0.default.string,id:m0.default.string},xc.default=(0,RI.default)(y0);var Lc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b0=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function C0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function w0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var ca=c,Jr=si,Oc=fo,Ot=oa,Lr=ia,D0={to:Ot.string.isRequired,containerId:Ot.string,container:Ot.object,activeClass:Ot.string,spy:Ot.bool,smooth:Ot.oneOfType([Ot.bool,Ot.string]),offset:Ot.number,delay:Ot.number,isDynamic:Ot.bool,onClick:Ot.func,duration:Ot.oneOfType([Ot.number,Ot.func]),absolute:Ot.bool,onSetActive:Ot.func,onSetInactive:Ot.func,ignoreCancelEvents:Ot.bool,hashSpy:Ot.bool,spyThrottle:Ot.number},UI={Scroll:function(t,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||Oc,o=function(s){w0(a,s);function a(u){C0(this,a);var l=E0(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,u));return i.call(l),l.state={active:!1},l}return b0(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();Jr.isMounted(l)||Jr.mount(l,this.props.spyThrottle),this.props.hashSpy&&(Lr.isMounted()||Lr.mount(r),Lr.mapContainer(this.props.to,l)),this.props.spy&&Jr.addStateHandler(this.stateHandler),Jr.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Jr.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=Lc({},this.props);for(var d in D0)f.hasOwnProperty(d)&&delete f[d];return f.className=l,f.onClick=this.handleClick,ca.createElement(t,f)}}]),a}(ca.Component),i=function(){var a=this;this.scrollTo=function(u,l){r.scrollTo(u,Lc({},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(!(Lr.isMounted()&&!Lr.isInitialized())){var f=a.props.to,d=null,h=0,v=0,m=0;if(l.getBoundingClientRect){var g=l.getBoundingClientRect();m=g.top}if(!d||a.props.isDynamic){if(d=r.get(f),!d)return;var p=d.getBoundingClientRect();h=p.top-m+u,v=h+p.height}var E=u-a.props.offset,S=E>=Math.floor(h)&&E<Math.floor(v),D=E<Math.floor(h)||E>=Math.floor(v),M=r.getActiveLink();if(D)return f===M&&r.setActiveLink(void 0),a.props.hashSpy&&Lr.getHash()===f&&Lr.changeHash(),a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive()),Jr.updateStates();if(S&&M!==f)return r.setActiveLink(f),a.props.hashSpy&&Lr.changeHash(f),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(f)),Jr.updateStates()}}};return o.propTypes=D0,o.defaultProps={offset:0},o},Element:function(t){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){w0(o,r);function o(i){C0(this,o);var s=E0(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,i));return s.childBindings={domNode:null},s}return b0(o,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(s){this.props.name!==s.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Oc.unregister(this.props.name)}},{key:"registerElems",value:function(s){Oc.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return ca.createElement(t,Lc({},this.props,{parentBindings:this.childBindings}))}}]),o}(ca.Component);return n.propTypes={name:Ot.string,id:Ot.string},n}},WI=UI;Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.Helpers=Mt.ScrollElement=Mt.ScrollLink=F0=Mt.animateScroll=Mt.scrollSpy=Mt.Events=Mt.scroller=Mt.Element=Mt.Button=Mt.Link=void 0;var HI=ic,x0=Wn(HI),VI=Dc,S0=Wn(VI),qI=xc,L0=Wn(qI),ZI=fo,O0=Wn(ZI),GI=li,k0=Wn(GI),KI=si,P0=Wn(KI),YI=Js,M0=Wn(YI),XI=ii,B0=Wn(XI),JI=ua,T0=Wn(JI),QI=WI,A0=Wn(QI);function Wn(e){return e&&e.__esModule?e:{default:e}}Mt.Link=x0.default,Mt.Button=S0.default,Mt.Element=L0.default,Mt.scroller=O0.default,Mt.Events=k0.default,Mt.scrollSpy=P0.default;var F0=Mt.animateScroll=M0.default;Mt.ScrollLink=B0.default,Mt.ScrollElement=T0.default,Mt.Helpers=A0.default,Mt.default={Link:x0.default,Button:S0.default,Element:L0.default,scroller:O0.default,Events:k0.default,scrollSpy:P0.default,animateScroll:M0.default,ScrollLink:B0.default,ScrollElement:T0.default,Helpers:A0.default};const kc=c.createContext({}),I0=c.createContext({});function _0(){const e=c.useContext(I0);if(Object.entries(e).length===0)throw new Error("useToast must be used within a Provider");return e}function R0(e){return e&&typeof e.title=="string"&&typeof e.message=="string"&&(e.size===void 0||e.size==="md"||e.size==="lg")&&(e.type==="success"||e.type==="danger")}function e_(){const e=on.useActionData(),{closeModal:t,closeAll:n}=c.useContext(kc),{showToast:r}=_0(),{getParam:o}=rc(),{pathname:i}=on.useLocation(),s=on.useNavigate(),a=o("closeAllModals");c.useEffect(()=>{a==="true"&&(n(),s(i))},[a]),c.useEffect(()=>{const u=e==null?void 0:e.closeModalKey;u&&t(u)},[e]),c.useEffect(()=>{const u=e==null?void 0:e.toast,l=e==null?void 0:e.message;R0(u)&&r(u),!R0(u)&&l&&r({message:l,type:"danger"})},[e]),c.useEffect(()=>{var u,l;if(typeof((u=e==null?void 0:e.data)==null?void 0:u.scrollTo)=="string"){const f=document.getElementById((l=e==null?void 0:e.data)==null?void 0:l.scrollTo);f&&F0.scrollTo(f.offsetTop-200)}},[e])}const j0=c.createContext({});function t_(e){const t=c.useContext(j0);if(Object.entries(t).length===0)throw new Error("useDrawer must be used within a Provider");if(e){const{drawerData:n,drawerIsOpen:r,openDrawer:o,closeDrawer:i}=t,s=r(e),a=n(e);return{drawerIsOpen:s,drawerData:a,openDrawer:f=>o(e,f),closeDrawer:()=>i(e)}}else return t}function n_(e){const t=c.useContext(kc);if(Object.entries(t).length===0)throw new Error("useModal must be used within a Provider");if(e){const{modalData:n,modalIsOpen:r,openModal:o,closeModal:i}=t,s=r(e),a=n(e);return{modalIsOpen:s,modalData:a,openModal:f=>o(e,f),closeModal:()=>i(e)}}else return t}function r_(e){const{children:t=!1}=e,[n,r]=c.useState([]);function o(u){return!!n.some(l=>l.key===u)}function i(u){var l;return(l=n.find(f=>f.key===u))==null?void 0:l.data}function s(u,l){const f=o(u);r(f?d=>[...d.filter(v=>v.key!==u),{key:u,data:l}]:[...n,{key:u,data:l}])}function a(u){r(n.filter(l=>l.key!==u))}return A.jsx(j0.Provider,{value:{drawerIsOpen:o,drawerData:i,openDrawer:s,closeDrawer:a},children:t})}function o_({googleMapsApiKey:e,children:t,...n}){return A.jsx(yb,{libraries:["places","marker","maps"],googleMapsApiKey:e,...n,children:t})}function i_(e){const{children:t=!1}=e,[n,r]=c.useState([]);function o(l){return!!n.some(f=>f.key===l)}function i(l){var f;return(f=n.find(d=>d.key===l))==null?void 0:f.data}function s(l,f){const d=o(l);r(d?h=>[...h.filter(m=>m.key!==l),{key:l,data:f}]:[...n,{key:l,data:f}])}function a(l){r(n.filter(f=>f.key!==l))}function u(){r([])}return A.jsx(kc.Provider,{value:{modalIsOpen:o,modalData:i,openModal:s,closeModal:a,closeAll:u},children:t})}let s_={data:""},a_=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||s_,u_=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l_=/\/\*[^]*?\*\/| +/g,N0=/\n+/g,Or=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+s+";":r+=i[1]=="f"?Or(s,i):i+"{"+Or(s,i[1]=="k"?"":t)+"}":typeof s=="object"?r+=Or(s,t?t.replace(/([^,])+/g,a=>i.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,a):a?a+" "+u:u)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Or.p?Or.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Qn={},z0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+z0(e[n]);return t}return e},c_=(e,t,n,r,o)=>{let i=z0(e),s=Qn[i]||(Qn[i]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(i));if(!Qn[s]){let u=i!==e?e:(l=>{let f,d,h=[{}];for(;f=u_.exec(l.replace(l_,""));)f[4]?h.shift():f[3]?(d=f[3].replace(N0," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][f[1]]=f[2].replace(N0," ").trim();return h[0]})(e);Qn[s]=Or(o?{["@keyframes "+s]:u}:u,n?"":"."+s)}let a=n&&Qn.g?Qn.g:null;return n&&(Qn.g=Qn[s]),((u,l,f,d)=>{d?l.data=l.data.replace(d,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(Qn[s],t,r,a),s},f_=(e,t,n)=>e.reduce((r,o,i)=>{let s=t[i];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?"":Or(a,""):a===!1?"":a}return r+o+(s??"")},"");function fa(e){let t=this||{},n=e.call?e(t.p):e;return c_(n.unshift?n.raw?f_(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,a_(t.target),t.g,t.o,t.k)}let $0,Pc,Mc;fa.bind({g:1});let er=fa.bind({k:1});function d_(e,t,n,r){Or.p=t,$0=e,Pc=n,Mc=r}function kr(e,t){let n=this||{};return function(){let r=arguments;function o(i,s){let a=Object.assign({},i),u=a.className||o.className;n.p=Object.assign({theme:Pc&&Pc()},a),n.o=/ *go\d+/.test(u),a.className=fa.apply(n,r)+(u?" "+u:""),t&&(a.ref=s);let l=e;return e[0]&&(l=a.as||e,delete a.as),Mc&&l[0]&&Mc(a),$0(l,a)}return t?t(o):o}}var p_=e=>typeof e=="function",da=(e,t)=>p_(e)?e(t):e,h_=(()=>{let e=0;return()=>(++e).toString()})(),U0=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),g_=20,pa=new Map,v_=1e3,W0=e=>{if(pa.has(e))return;let t=setTimeout(()=>{pa.delete(e),Qr({type:4,toastId:e})},v_);pa.set(e,t)},m_=e=>{let t=pa.get(e);t&&clearTimeout(t)},Bc=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,g_)};case 1:return t.toast.id&&m_(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:n}=t;return e.toasts.find(i=>i.id===n.id)?Bc(e,{type:1,toast:n}):Bc(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?W0(r):e.toasts.forEach(i=>{W0(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===r||r===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},ha=[],ga={toasts:[],pausedAt:void 0},Qr=e=>{ga=Bc(ga,e),ha.forEach(t=>{t(ga)})},y_={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},b_=(e={})=>{let[t,n]=c.useState(ga);c.useEffect(()=>(ha.push(n),()=>{let o=ha.indexOf(n);o>-1&&ha.splice(o,1)}),[t]);let r=t.toasts.map(o=>{var i,s;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||y_[o.type],style:{...e.style,...(s=e[o.type])==null?void 0:s.style,...o.style}}});return{...t,toasts:r}},C_=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||h_()}),di=e=>(t,n)=>{let r=C_(t,e,n);return Qr({type:2,toast:r}),r.id},hn=(e,t)=>di("blank")(e,t);hn.error=di("error"),hn.success=di("success"),hn.loading=di("loading"),hn.custom=di("custom"),hn.dismiss=e=>{Qr({type:3,toastId:e})},hn.remove=e=>Qr({type:4,toastId:e}),hn.promise=(e,t,n)=>{let r=hn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(o=>(hn.success(da(t.success,o),{id:r,...n,...n==null?void 0:n.success}),o)).catch(o=>{hn.error(da(t.error,o),{id:r,...n,...n==null?void 0:n.error})}),e};var E_=(e,t)=>{Qr({type:1,toast:{id:e,height:t}})},w_=()=>{Qr({type:5,time:Date.now()})},D_=e=>{let{toasts:t,pausedAt:n}=b_(e);c.useEffect(()=>{if(n)return;let i=Date.now(),s=t.map(a=>{if(a.duration===1/0)return;let u=(a.duration||0)+a.pauseDuration-(i-a.createdAt);if(u<0){a.visible&&hn.dismiss(a.id);return}return setTimeout(()=>hn.dismiss(a.id),u)});return()=>{s.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=c.useCallback(()=>{n&&Qr({type:6,time:Date.now()})},[n]),o=c.useCallback((i,s)=>{let{reverseOrder:a=!1,gutter:u=8,defaultPosition:l}=s||{},f=t.filter(v=>(v.position||l)===(i.position||l)&&v.height),d=f.findIndex(v=>v.id===i.id),h=f.filter((v,m)=>m<d&&v.visible).length;return f.filter(v=>v.visible).slice(...a?[h+1]:[0,h]).reduce((v,m)=>v+(m.height||0)+u,0)},[t]);return{toasts:t,handlers:{updateHeight:E_,startPause:w_,endPause:r,calculateOffset:o}}},x_=er`
|
112
387
|
from {
|
113
388
|
transform: scale(0) rotate(45deg);
|
114
389
|
opacity: 0;
|
@@ -116,7 +391,7 @@ from {
|
|
116
391
|
to {
|
117
392
|
transform: scale(1) rotate(45deg);
|
118
393
|
opacity: 1;
|
119
|
-
}`,
|
394
|
+
}`,S_=er`
|
120
395
|
from {
|
121
396
|
transform: scale(0);
|
122
397
|
opacity: 0;
|
@@ -124,7 +399,7 @@ from {
|
|
124
399
|
to {
|
125
400
|
transform: scale(1);
|
126
401
|
opacity: 1;
|
127
|
-
}`,
|
402
|
+
}`,L_=er`
|
128
403
|
from {
|
129
404
|
transform: scale(0) rotate(90deg);
|
130
405
|
opacity: 0;
|
@@ -132,28 +407,28 @@ from {
|
|
132
407
|
to {
|
133
408
|
transform: scale(1) rotate(90deg);
|
134
409
|
opacity: 1;
|
135
|
-
}`,
|
410
|
+
}`,O_=kr("div")`
|
136
411
|
width: 20px;
|
137
412
|
opacity: 0;
|
138
413
|
height: 20px;
|
139
414
|
border-radius: 10px;
|
140
|
-
background: ${
|
415
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
141
416
|
position: relative;
|
142
417
|
transform: rotate(45deg);
|
143
418
|
|
144
|
-
animation: ${
|
419
|
+
animation: ${x_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
145
420
|
forwards;
|
146
421
|
animation-delay: 100ms;
|
147
422
|
|
148
423
|
&:after,
|
149
424
|
&:before {
|
150
425
|
content: '';
|
151
|
-
animation: ${
|
426
|
+
animation: ${S_} 0.15s ease-out forwards;
|
152
427
|
animation-delay: 150ms;
|
153
428
|
position: absolute;
|
154
429
|
border-radius: 3px;
|
155
430
|
opacity: 0;
|
156
|
-
background: ${
|
431
|
+
background: ${e=>e.secondary||"#fff"};
|
157
432
|
bottom: 9px;
|
158
433
|
left: 4px;
|
159
434
|
height: 2px;
|
@@ -161,27 +436,27 @@ to {
|
|
161
436
|
}
|
162
437
|
|
163
438
|
&:before {
|
164
|
-
animation: ${
|
439
|
+
animation: ${L_} 0.15s ease-out forwards;
|
165
440
|
animation-delay: 180ms;
|
166
441
|
transform: rotate(90deg);
|
167
442
|
}
|
168
|
-
`,
|
443
|
+
`,k_=er`
|
169
444
|
from {
|
170
445
|
transform: rotate(0deg);
|
171
446
|
}
|
172
447
|
to {
|
173
448
|
transform: rotate(360deg);
|
174
449
|
}
|
175
|
-
`,
|
450
|
+
`,P_=kr("div")`
|
176
451
|
width: 12px;
|
177
452
|
height: 12px;
|
178
453
|
box-sizing: border-box;
|
179
454
|
border: 2px solid;
|
180
455
|
border-radius: 100%;
|
181
|
-
border-color: ${
|
182
|
-
border-right-color: ${
|
183
|
-
animation: ${
|
184
|
-
`,
|
456
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
457
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
458
|
+
animation: ${k_} 1s linear infinite;
|
459
|
+
`,M_=er`
|
185
460
|
from {
|
186
461
|
transform: scale(0) rotate(45deg);
|
187
462
|
opacity: 0;
|
@@ -189,7 +464,7 @@ from {
|
|
189
464
|
to {
|
190
465
|
transform: scale(1) rotate(45deg);
|
191
466
|
opacity: 1;
|
192
|
-
}`,
|
467
|
+
}`,B_=er`
|
193
468
|
0% {
|
194
469
|
height: 0;
|
195
470
|
width: 0;
|
@@ -203,43 +478,43 @@ to {
|
|
203
478
|
100% {
|
204
479
|
opacity: 1;
|
205
480
|
height: 10px;
|
206
|
-
}`,
|
481
|
+
}`,T_=kr("div")`
|
207
482
|
width: 20px;
|
208
483
|
opacity: 0;
|
209
484
|
height: 20px;
|
210
485
|
border-radius: 10px;
|
211
|
-
background: ${
|
486
|
+
background: ${e=>e.primary||"#61d345"};
|
212
487
|
position: relative;
|
213
488
|
transform: rotate(45deg);
|
214
489
|
|
215
|
-
animation: ${
|
490
|
+
animation: ${M_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
216
491
|
forwards;
|
217
492
|
animation-delay: 100ms;
|
218
493
|
&:after {
|
219
494
|
content: '';
|
220
495
|
box-sizing: border-box;
|
221
|
-
animation: ${
|
496
|
+
animation: ${B_} 0.2s ease-out forwards;
|
222
497
|
opacity: 0;
|
223
498
|
animation-delay: 200ms;
|
224
499
|
position: absolute;
|
225
500
|
border-right: 2px solid;
|
226
501
|
border-bottom: 2px solid;
|
227
|
-
border-color: ${
|
502
|
+
border-color: ${e=>e.secondary||"#fff"};
|
228
503
|
bottom: 6px;
|
229
504
|
left: 6px;
|
230
505
|
height: 10px;
|
231
506
|
width: 6px;
|
232
507
|
}
|
233
|
-
`,
|
508
|
+
`,A_=kr("div")`
|
234
509
|
position: absolute;
|
235
|
-
`,
|
510
|
+
`,F_=kr("div")`
|
236
511
|
position: relative;
|
237
512
|
display: flex;
|
238
513
|
justify-content: center;
|
239
514
|
align-items: center;
|
240
515
|
min-width: 20px;
|
241
516
|
min-height: 20px;
|
242
|
-
`,
|
517
|
+
`,I_=er`
|
243
518
|
from {
|
244
519
|
transform: scale(0.6);
|
245
520
|
opacity: 0.4;
|
@@ -247,20 +522,20 @@ from {
|
|
247
522
|
to {
|
248
523
|
transform: scale(1);
|
249
524
|
opacity: 1;
|
250
|
-
}`,
|
525
|
+
}`,__=kr("div")`
|
251
526
|
position: relative;
|
252
527
|
transform: scale(0.6);
|
253
528
|
opacity: 0.4;
|
254
529
|
min-width: 20px;
|
255
|
-
animation: ${
|
530
|
+
animation: ${I_} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
256
531
|
forwards;
|
257
|
-
`,
|
258
|
-
0% {transform: translate3d(0,${
|
532
|
+
`,R_=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ot.createElement(__,null,t):t:n==="blank"?null:ot.createElement(F_,null,ot.createElement(P_,{...r}),n!=="loading"&&ot.createElement(A_,null,n==="error"?ot.createElement(O_,{...r}):ot.createElement(T_,{...r})))},j_=e=>`
|
533
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
259
534
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
260
|
-
`,
|
535
|
+
`,N_=e=>`
|
261
536
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
262
|
-
100% {transform: translate3d(0,${
|
263
|
-
`,
|
537
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
538
|
+
`,z_="0%{opacity:0;} 100%{opacity:1;}",$_="0%{opacity:1;} 100%{opacity:0;}",U_=kr("div")`
|
264
539
|
display: flex;
|
265
540
|
align-items: center;
|
266
541
|
background: #fff;
|
@@ -272,16 +547,16 @@ to {
|
|
272
547
|
pointer-events: auto;
|
273
548
|
padding: 8px 10px;
|
274
549
|
border-radius: 8px;
|
275
|
-
`,
|
550
|
+
`,W_=kr("div")`
|
276
551
|
display: flex;
|
277
552
|
justify-content: center;
|
278
553
|
margin: 4px 10px;
|
279
554
|
color: inherit;
|
280
555
|
flex: 1 1 auto;
|
281
556
|
white-space: pre-line;
|
282
|
-
`,
|
557
|
+
`,H_=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=U0()?[z_,$_]:[j_(n),N_(n)];return{animation:t?`${er(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${er(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},V_=ot.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?H_(e.position||t||"top-center",e.visible):{opacity:0},i=ot.createElement(R_,{toast:e}),s=ot.createElement(W_,{...e.ariaProps},da(e.message,e));return ot.createElement(U_,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:i,message:s}):ot.createElement(ot.Fragment,null,i,s))});d_(ot.createElement);var q_=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=ot.useCallback(s=>{if(s){let a=()=>{let u=s.getBoundingClientRect().height;r(e,u)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return ot.createElement("div",{ref:i,className:t,style:n},o)},Z_=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:U0()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},G_=fa`
|
283
558
|
z-index: 9999;
|
284
559
|
> * {
|
285
560
|
pointer-events: auto;
|
286
561
|
}
|
287
|
-
`,
|
562
|
+
`,va=16,K_=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:s})=>{let{toasts:a,handlers:u}=D_(n);return ot.createElement("div",{style:{position:"fixed",zIndex:9999,top:va,left:va,right:va,bottom:va,pointerEvents:"none",...i},className:s,onMouseEnter:u.startPause,onMouseLeave:u.endPause},a.map(l=>{let f=l.position||t,d=u.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Z_(f,d);return ot.createElement(q_,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?G_:"",style:h},l.type==="custom"?da(l.message,l):o?o(l):ot.createElement(V_,{toast:l,position:f}))}))},H0=hn;function Y_({children:e}){function t(n){switch(n.type){case"success":return H0.success(n.message);case"danger":return H0.error(n.message)}}return A.jsxs(I0.Provider,{value:{showToast:t},children:[A.jsx(K_,{position:"top-right",containerStyle:{zIndex:999999999999999}}),e]})}Oe.AlertContainer=K0,Oe.AlertContent=Y0,Oe.AlertDescription=X0,Oe.AlertIcon=J0,Oe.AlertTitle=Rc,Oe.Badge=nb,Oe.BreadcrumbContainer=AA,Oe.BreadcrumbLink=FA,Oe.Button=BC,Oe.Card=rb,Oe.Checkbox=AC,Oe.Divider=ob,Oe.DrawerContainer=NA,Oe.DrawerHeader=zA,Oe.DrawerProvider=r_,Oe.FormController=TC,Oe.FormError=FC,Oe.FormLabel=IC,Oe.GoogleMap=xC,Oe.GoogleProvider=o_,Oe.GoogleSearchPlaces=ZC,Oe.IconButton=GC,Oe.ImageUpload=EL,Oe.Input=Qf,Oe.ModalContainer=$A,Oe.ModalFooter=UA,Oe.ModalHeader=WA,Oe.ModalProvider=i_,Oe.Pagination=IA,Oe.Popover=HA,Oe.RadioBox=xL,Oe.RadioGroup=DL,Oe.RichText=kA,Oe.Select=MA,Oe.Skeleton=SC,Oe.Switch=BA,Oe.TabButton=jA,Oe.TabContainer=RA,Oe.TableBody=LC,Oe.TableCaption=OC,Oe.TableContainer=kC,Oe.TableFooter=PC,Oe.TableHeader=MC,Oe.Textarea=TA,Oe.Toast=VA,Oe.ToastProvider=Y_,Oe.Tooltip=qA,Oe.useAutomation=e_,Oe.useDrawer=t_,Oe.useFieldErrors=qf,Oe.useModal=n_,Oe.useScopedParams=rc,Oe.useToast=_0,Object.defineProperty(Oe,Symbol.toStringTag,{value:"Module"})});
|