@arkyn/components 1.4.7 → 1.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,41 +14,41 @@
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 no;function Cp(){return no||(no=1,process.env.NODE_ENV!=="production"&&function(){var t=c,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function d(S){if(S===null||typeof S!="object")return null;var ne=v&&S[v]||S[g];return typeof ne=="function"?ne:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(S){{for(var ne=arguments.length,oe=new Array(ne>1?ne-1:0),pe=1;pe<ne;pe++)oe[pe-1]=arguments[pe];B("error",S,oe)}}function B(S,ne,oe){{var pe=D.ReactDebugCurrentFrame,Te=pe.getStackAddendum();Te!==""&&(ne+="%s",oe=oe.concat([Te]));var je=oe.map(function(xe){return String(xe)});je.unshift("Warning: "+ne),Function.prototype.apply.call(console[S],console,je)}}var w=!1,b=!1,x=!1,A=!1,U=!1,P;P=Symbol.for("react.module.reference");function H(S){return!!(typeof S=="string"||typeof S=="function"||S===n||S===s||U||S===i||S===l||S===f||A||S===y||w||b||x||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===a||S.$$typeof===o||S.$$typeof===u||S.$$typeof===P||S.getModuleId!==void 0))}function j(S,ne,oe){var pe=S.displayName;if(pe)return pe;var Te=ne.displayName||ne.name||"";return Te!==""?oe+"("+Te+")":oe}function M(S){return S.displayName||"Context"}function W(S){if(S==null)return null;if(typeof S.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof S=="function")return S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof S=="object")switch(S.$$typeof){case o:var ne=S;return M(ne)+".Consumer";case a:var oe=S;return M(oe._context)+".Provider";case u:return j(S,S.render,"ForwardRef");case p:var pe=S.displayName||null;return pe!==null?pe:W(S.type)||"Memo";case h:{var Te=S,je=Te._payload,xe=Te._init;try{return W(xe(je))}catch{return null}}}return null}var _=Object.assign,z=0,Y,V,Q,ie,k,G,$;function R(){}R.__reactDisabledLog=!0;function re(){{if(z===0){Y=console.log,V=console.info,Q=console.warn,ie=console.error,k=console.group,G=console.groupCollapsed,$=console.groupEnd;var S={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}z++}}function F(){{if(z--,z===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},S,{value:Y}),info:_({},S,{value:V}),warn:_({},S,{value:Q}),error:_({},S,{value:ie}),group:_({},S,{value:k}),groupCollapsed:_({},S,{value:G}),groupEnd:_({},S,{value:$})})}z<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var O=D.ReactCurrentDispatcher,N;function T(S,ne,oe){{if(N===void 0)try{throw Error()}catch(Te){var pe=Te.stack.trim().match(/\n( *(at )?)/);N=pe&&pe[1]||""}return`
18
- `+N+S}}var I=!1,Z;{var ee=typeof WeakMap=="function"?WeakMap:Map;Z=new ee}function J(S,ne){if(!S||I)return"";{var oe=Z.get(S);if(oe!==void 0)return oe}var pe;I=!0;var Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=O.current,O.current=null,re();try{if(ne){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ht){pe=ht}Reflect.construct(S,[],xe)}else{try{xe.call()}catch(ht){pe=ht}S.call(xe.prototype)}}else{try{throw Error()}catch(ht){pe=ht}S()}}catch(ht){if(ht&&pe&&typeof ht.stack=="string"){for(var Ee=ht.stack.split(`
17
+ */var no;function Cp(){return no||(no=1,process.env.NODE_ENV!=="production"&&function(){var t=c,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function d(A){if(A===null||typeof A!="object")return null;var ie=v&&A[v]||A[g];return typeof ie=="function"?ie:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(A){{for(var ie=arguments.length,oe=new Array(ie>1?ie-1:0),pe=1;pe<ie;pe++)oe[pe-1]=arguments[pe];B("error",A,oe)}}function B(A,ie,oe){{var pe=D.ReactDebugCurrentFrame,Te=pe.getStackAddendum();Te!==""&&(ie+="%s",oe=oe.concat([Te]));var je=oe.map(function(xe){return String(xe)});je.unshift("Warning: "+ie),Function.prototype.apply.call(console[A],console,je)}}var w=!1,b=!1,x=!1,S=!1,U=!1,P;P=Symbol.for("react.module.reference");function H(A){return!!(typeof A=="string"||typeof A=="function"||A===n||A===s||U||A===i||A===l||A===f||S||A===y||w||b||x||typeof A=="object"&&A!==null&&(A.$$typeof===h||A.$$typeof===p||A.$$typeof===a||A.$$typeof===o||A.$$typeof===u||A.$$typeof===P||A.getModuleId!==void 0))}function j(A,ie,oe){var pe=A.displayName;if(pe)return pe;var Te=ie.displayName||ie.name||"";return Te!==""?oe+"("+Te+")":oe}function M(A){return A.displayName||"Context"}function N(A){if(A==null)return null;if(typeof A.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case o:var ie=A;return M(ie)+".Consumer";case a:var oe=A;return M(oe._context)+".Provider";case u:return j(A,A.render,"ForwardRef");case p:var pe=A.displayName||null;return pe!==null?pe:N(A.type)||"Memo";case h:{var Te=A,je=Te._payload,xe=Te._init;try{return N(xe(je))}catch{return null}}}return null}var z=Object.assign,W=0,X,R,ne,Q,k,G,$;function V(){}V.__reactDisabledLog=!0;function re(){{if(W===0){X=console.log,R=console.info,ne=console.warn,Q=console.error,k=console.group,G=console.groupCollapsed,$=console.groupEnd;var A={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}W++}}function F(){{if(W--,W===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},A,{value:X}),info:z({},A,{value:R}),warn:z({},A,{value:ne}),error:z({},A,{value:Q}),group:z({},A,{value:k}),groupCollapsed:z({},A,{value:G}),groupEnd:z({},A,{value:$})})}W<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var O=D.ReactCurrentDispatcher,_;function T(A,ie,oe){{if(_===void 0)try{throw Error()}catch(Te){var pe=Te.stack.trim().match(/\n( *(at )?)/);_=pe&&pe[1]||""}return`
18
+ `+_+A}}var I=!1,Z;{var ee=typeof WeakMap=="function"?WeakMap:Map;Z=new ee}function J(A,ie){if(!A||I)return"";{var oe=Z.get(A);if(oe!==void 0)return oe}var pe;I=!0;var Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=O.current,O.current=null,re();try{if(ie){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ht){pe=ht}Reflect.construct(A,[],xe)}else{try{xe.call()}catch(ht){pe=ht}A.call(xe.prototype)}}else{try{throw Error()}catch(ht){pe=ht}A()}}catch(ht){if(ht&&pe&&typeof ht.stack=="string"){for(var Ee=ht.stack.split(`
19
19
  `),ct=pe.stack.split(`
20
20
  `),Ve=Ee.length-1,Ge=ct.length-1;Ve>=1&&Ge>=0&&Ee[Ve]!==ct[Ge];)Ge--;for(;Ve>=1&&Ge>=0;Ve--,Ge--)if(Ee[Ve]!==ct[Ge]){if(Ve!==1||Ge!==1)do if(Ve--,Ge--,Ge<0||Ee[Ve]!==ct[Ge]){var Ot=`
21
- `+Ee[Ve].replace(" at new "," at ");return S.displayName&&Ot.includes("<anonymous>")&&(Ot=Ot.replace("<anonymous>",S.displayName)),typeof S=="function"&&Z.set(S,Ot),Ot}while(Ve>=1&&Ge>=0);break}}}finally{I=!1,O.current=je,F(),Error.prepareStackTrace=Te}var qr=S?S.displayName||S.name:"",Sr=qr?T(qr):"";return typeof S=="function"&&Z.set(S,Sr),Sr}function de(S,ne,oe){return J(S,!1)}function fe(S){var ne=S.prototype;return!!(ne&&ne.isReactComponent)}function ce(S,ne,oe){if(S==null)return"";if(typeof S=="function")return J(S,fe(S));if(typeof S=="string")return T(S);switch(S){case l:return T("Suspense");case f:return T("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case u:return de(S.render);case p:return ce(S.type,ne,oe);case h:{var pe=S,Te=pe._payload,je=pe._init;try{return ce(je(Te),ne,oe)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,Me={},Ae=D.ReactDebugCurrentFrame;function Ie(S){if(S){var ne=S._owner,oe=ce(S.type,S._source,ne?ne.type:null);Ae.setExtraStackFrame(oe)}else Ae.setExtraStackFrame(null)}function qe(S,ne,oe,pe,Te){{var je=Function.call.bind(we);for(var xe in S)if(je(S,xe)){var Ee=void 0;try{if(typeof S[xe]!="function"){var ct=Error((pe||"React class")+": "+oe+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ct.name="Invariant Violation",ct}Ee=S[xe](ne,xe,pe,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ve){Ee=Ve}Ee&&!(Ee instanceof Error)&&(Ie(Te),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pe||"React class",oe,xe,typeof Ee),Ie(null)),Ee instanceof Error&&!(Ee.message in Me)&&(Me[Ee.message]=!0,Ie(Te),E("Failed %s type: %s",oe,Ee.message),Ie(null))}}}var rt=Array.isArray;function Be(S){return rt(S)}function Je(S){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,oe=ne&&S[Symbol.toStringTag]||S.constructor.name||"Object";return oe}}function it(S){try{return Oe(S),!1}catch{return!0}}function Oe(S){return""+S}function Fe(S){if(it(S))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(S)),Oe(S)}var Qe=D.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},et,Ct,Ye;Ye={};function nr(S){if(we.call(S,"ref")){var ne=Object.getOwnPropertyDescriptor(S,"ref").get;if(ne&&ne.isReactWarning)return!1}return S.ref!==void 0}function wt(S){if(we.call(S,"key")){var ne=Object.getOwnPropertyDescriptor(S,"key").get;if(ne&&ne.isReactWarning)return!1}return S.key!==void 0}function St(S,ne){if(typeof S.ref=="string"&&Qe.current&&ne&&Qe.current.stateNode!==ne){var oe=W(Qe.current.type);Ye[oe]||(E('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',W(Qe.current.type),S.ref),Ye[oe]=!0)}}function ir(S,ne){{var oe=function(){et||(et=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};oe.isReactWarning=!0,Object.defineProperty(S,"key",{get:oe,configurable:!0})}}function Wr(S,ne){{var oe=function(){Ct||(Ct=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};oe.isReactWarning=!0,Object.defineProperty(S,"ref",{get:oe,configurable:!0})}}var sr=function(S,ne,oe,pe,Te,je,xe){var Ee={$$typeof:e,type:S,key:ne,ref:oe,props:xe,_owner:je};return Ee._store={},Object.defineProperty(Ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.defineProperty(Ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.freeze&&(Object.freeze(Ee.props),Object.freeze(Ee)),Ee};function Hr(S,ne,oe,pe,Te){{var je,xe={},Ee=null,ct=null;oe!==void 0&&(Fe(oe),Ee=""+oe),wt(ne)&&(Fe(ne.key),Ee=""+ne.key),nr(ne)&&(ct=ne.ref,St(ne,Te));for(je in ne)we.call(ne,je)&&!Ke.hasOwnProperty(je)&&(xe[je]=ne[je]);if(S&&S.defaultProps){var Ve=S.defaultProps;for(je in Ve)xe[je]===void 0&&(xe[je]=Ve[je])}if(Ee||ct){var Ge=typeof S=="function"?S.displayName||S.name||"Unknown":S;Ee&&ir(xe,Ge),ct&&Wr(xe,Ge)}return sr(S,Ee,ct,Te,pe,Qe.current,xe)}}var Mt=D.ReactCurrentOwner,xr=D.ReactDebugCurrentFrame;function Wt(S){if(S){var ne=S._owner,oe=ce(S.type,S._source,ne?ne.type:null);xr.setExtraStackFrame(oe)}else xr.setExtraStackFrame(null)}var Ur;Ur=!1;function ar(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function Sn(){{if(Mt.current){var S=W(Mt.current.type);if(S)return`
21
+ `+Ee[Ve].replace(" at new "," at ");return A.displayName&&Ot.includes("<anonymous>")&&(Ot=Ot.replace("<anonymous>",A.displayName)),typeof A=="function"&&Z.set(A,Ot),Ot}while(Ve>=1&&Ge>=0);break}}}finally{I=!1,O.current=je,F(),Error.prepareStackTrace=Te}var qr=A?A.displayName||A.name:"",Sr=qr?T(qr):"";return typeof A=="function"&&Z.set(A,Sr),Sr}function de(A,ie,oe){return J(A,!1)}function fe(A){var ie=A.prototype;return!!(ie&&ie.isReactComponent)}function ce(A,ie,oe){if(A==null)return"";if(typeof A=="function")return J(A,fe(A));if(typeof A=="string")return T(A);switch(A){case l:return T("Suspense");case f:return T("SuspenseList")}if(typeof A=="object")switch(A.$$typeof){case u:return de(A.render);case p:return ce(A.type,ie,oe);case h:{var pe=A,Te=pe._payload,je=pe._init;try{return ce(je(Te),ie,oe)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,Me={},Ae=D.ReactDebugCurrentFrame;function Ie(A){if(A){var ie=A._owner,oe=ce(A.type,A._source,ie?ie.type:null);Ae.setExtraStackFrame(oe)}else Ae.setExtraStackFrame(null)}function qe(A,ie,oe,pe,Te){{var je=Function.call.bind(we);for(var xe in A)if(je(A,xe)){var Ee=void 0;try{if(typeof A[xe]!="function"){var ct=Error((pe||"React class")+": "+oe+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ct.name="Invariant Violation",ct}Ee=A[xe](ie,xe,pe,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ve){Ee=Ve}Ee&&!(Ee instanceof Error)&&(Ie(Te),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pe||"React class",oe,xe,typeof Ee),Ie(null)),Ee instanceof Error&&!(Ee.message in Me)&&(Me[Ee.message]=!0,Ie(Te),E("Failed %s type: %s",oe,Ee.message),Ie(null))}}}var rt=Array.isArray;function Be(A){return rt(A)}function Je(A){{var ie=typeof Symbol=="function"&&Symbol.toStringTag,oe=ie&&A[Symbol.toStringTag]||A.constructor.name||"Object";return oe}}function it(A){try{return Oe(A),!1}catch{return!0}}function Oe(A){return""+A}function Fe(A){if(it(A))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(A)),Oe(A)}var Qe=D.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},et,Ct,Ye;Ye={};function nr(A){if(we.call(A,"ref")){var ie=Object.getOwnPropertyDescriptor(A,"ref").get;if(ie&&ie.isReactWarning)return!1}return A.ref!==void 0}function wt(A){if(we.call(A,"key")){var ie=Object.getOwnPropertyDescriptor(A,"key").get;if(ie&&ie.isReactWarning)return!1}return A.key!==void 0}function St(A,ie){if(typeof A.ref=="string"&&Qe.current&&ie&&Qe.current.stateNode!==ie){var oe=N(Qe.current.type);Ye[oe]||(E('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',N(Qe.current.type),A.ref),Ye[oe]=!0)}}function ir(A,ie){{var oe=function(){et||(et=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ie))};oe.isReactWarning=!0,Object.defineProperty(A,"key",{get:oe,configurable:!0})}}function Wr(A,ie){{var oe=function(){Ct||(Ct=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ie))};oe.isReactWarning=!0,Object.defineProperty(A,"ref",{get:oe,configurable:!0})}}var sr=function(A,ie,oe,pe,Te,je,xe){var Ee={$$typeof:e,type:A,key:ie,ref:oe,props:xe,_owner:je};return Ee._store={},Object.defineProperty(Ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.defineProperty(Ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.freeze&&(Object.freeze(Ee.props),Object.freeze(Ee)),Ee};function Hr(A,ie,oe,pe,Te){{var je,xe={},Ee=null,ct=null;oe!==void 0&&(Fe(oe),Ee=""+oe),wt(ie)&&(Fe(ie.key),Ee=""+ie.key),nr(ie)&&(ct=ie.ref,St(ie,Te));for(je in ie)we.call(ie,je)&&!Ke.hasOwnProperty(je)&&(xe[je]=ie[je]);if(A&&A.defaultProps){var Ve=A.defaultProps;for(je in Ve)xe[je]===void 0&&(xe[je]=Ve[je])}if(Ee||ct){var Ge=typeof A=="function"?A.displayName||A.name||"Unknown":A;Ee&&ir(xe,Ge),ct&&Wr(xe,Ge)}return sr(A,Ee,ct,Te,pe,Qe.current,xe)}}var Mt=D.ReactCurrentOwner,xr=D.ReactDebugCurrentFrame;function Wt(A){if(A){var ie=A._owner,oe=ce(A.type,A._source,ie?ie.type:null);xr.setExtraStackFrame(oe)}else xr.setExtraStackFrame(null)}var Ur;Ur=!1;function ar(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function Sn(){{if(Mt.current){var A=N(Mt.current.type);if(A)return`
22
22
 
23
- Check the render method of \``+S+"`."}return""}}function Rr(S){return""}var An={};function Vr(S){{var ne=Sn();if(!ne){var oe=typeof S=="string"?S:S.displayName||S.name;oe&&(ne=`
23
+ Check the render method of \``+A+"`."}return""}}function Rr(A){return""}var An={};function Vr(A){{var ie=Sn();if(!ie){var oe=typeof A=="string"?A:A.displayName||A.name;oe&&(ie=`
24
24
 
25
- Check the top-level render call using <`+oe+">.")}return ne}}function Ln(S,ne){{if(!S._store||S._store.validated||S.key!=null)return;S._store.validated=!0;var oe=Vr(ne);if(An[oe])return;An[oe]=!0;var pe="";S&&S._owner&&S._owner!==Mt.current&&(pe=" It was passed a child from "+W(S._owner.type)+"."),Wt(S),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,pe),Wt(null)}}function $i(S,ne){{if(typeof S!="object")return;if(Be(S))for(var oe=0;oe<S.length;oe++){var pe=S[oe];ar(pe)&&Ln(pe,ne)}else if(ar(S))S._store&&(S._store.validated=!0);else if(S){var Te=d(S);if(typeof Te=="function"&&Te!==S.entries)for(var je=Te.call(S),xe;!(xe=je.next()).done;)ar(xe.value)&&Ln(xe.value,ne)}}}function Br(S){{var ne=S.type;if(ne==null||typeof ne=="string")return;var oe;if(typeof ne=="function")oe=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===u||ne.$$typeof===p))oe=ne.propTypes;else return;if(oe){var pe=W(ne);qe(oe,S.props,"prop",pe,S)}else if(ne.PropTypes!==void 0&&!Ur){Ur=!0;var Te=W(ne);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Te||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(S){{for(var ne=Object.keys(S.props),oe=0;oe<ne.length;oe++){var pe=ne[oe];if(pe!=="children"&&pe!=="key"){Wt(S),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pe),Wt(null);break}}S.ref!==null&&(Wt(S),E("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}var vp={};function gp(S,ne,oe,pe,Te,je){{var xe=H(S);if(!xe){var Ee="";(S===void 0||typeof S=="object"&&S!==null&&Object.keys(S).length===0)&&(Ee+=" 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 ct=Rr();ct?Ee+=ct:Ee+=Sn();var Ve;S===null?Ve="null":Be(S)?Ve="array":S!==void 0&&S.$$typeof===e?(Ve="<"+(W(S.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Ve=typeof S,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ve,Ee)}var Ge=Hr(S,ne,oe,Te,je);if(Ge==null)return Ge;if(xe){var Ot=ne.children;if(Ot!==void 0)if(pe)if(Be(Ot)){for(var qr=0;qr<Ot.length;qr++)$i(Ot[qr],S);Object.freeze&&Object.freeze(Ot)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $i(Ot,S)}if(we.call(ne,"key")){var Sr=W(S),ht=Object.keys(ne).filter(function(LO){return LO!=="key"}),Qa=ht.length>0?"{key: someKey, "+ht.join(": ..., ")+": ...}":"{key: someKey}";if(!vp[Sr+Qa]){var AO=ht.length>0?"{"+ht.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+oe+">.")}return ie}}function Ln(A,ie){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var oe=Vr(ie);if(An[oe])return;An[oe]=!0;var pe="";A&&A._owner&&A._owner!==Mt.current&&(pe=" It was passed a child from "+N(A._owner.type)+"."),Wt(A),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,pe),Wt(null)}}function $i(A,ie){{if(typeof A!="object")return;if(Be(A))for(var oe=0;oe<A.length;oe++){var pe=A[oe];ar(pe)&&Ln(pe,ie)}else if(ar(A))A._store&&(A._store.validated=!0);else if(A){var Te=d(A);if(typeof Te=="function"&&Te!==A.entries)for(var je=Te.call(A),xe;!(xe=je.next()).done;)ar(xe.value)&&Ln(xe.value,ie)}}}function Br(A){{var ie=A.type;if(ie==null||typeof ie=="string")return;var oe;if(typeof ie=="function")oe=ie.propTypes;else if(typeof ie=="object"&&(ie.$$typeof===u||ie.$$typeof===p))oe=ie.propTypes;else return;if(oe){var pe=N(ie);qe(oe,A.props,"prop",pe,A)}else if(ie.PropTypes!==void 0&&!Ur){Ur=!0;var Te=N(ie);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Te||"Unknown")}typeof ie.getDefaultProps=="function"&&!ie.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ge(A){{for(var ie=Object.keys(A.props),oe=0;oe<ie.length;oe++){var pe=ie[oe];if(pe!=="children"&&pe!=="key"){Wt(A),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pe),Wt(null);break}}A.ref!==null&&(Wt(A),E("Invalid attribute `ref` supplied to `React.Fragment`."),Wt(null))}}var vp={};function gp(A,ie,oe,pe,Te,je){{var xe=H(A);if(!xe){var Ee="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(Ee+=" 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 ct=Rr();ct?Ee+=ct:Ee+=Sn();var Ve;A===null?Ve="null":Be(A)?Ve="array":A!==void 0&&A.$$typeof===e?(Ve="<"+(N(A.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Ve=typeof A,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ve,Ee)}var Ge=Hr(A,ie,oe,Te,je);if(Ge==null)return Ge;if(xe){var Ot=ie.children;if(Ot!==void 0)if(pe)if(Be(Ot)){for(var qr=0;qr<Ot.length;qr++)$i(Ot[qr],A);Object.freeze&&Object.freeze(Ot)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $i(Ot,A)}if(we.call(ie,"key")){var Sr=N(A),ht=Object.keys(ie).filter(function(LO){return LO!=="key"}),Qa=ht.length>0?"{key: someKey, "+ht.join(": ..., ")+": ...}":"{key: someKey}";if(!vp[Sr+Qa]){var AO=ht.length>0?"{"+ht.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Qa,Sr,AO,Sr),vp[Sr+Qa]=!0}}return S===n?ge(Ge):Br(Ge),Ge}}function OO(S,ne,oe){return gp(S,ne,oe,!0)}function xO(S,ne,oe){return gp(S,ne,oe,!1)}var BO=xO,SO=OO;Zr.Fragment=n,Zr.jsx=BO,Zr.jsxs=SO}()),Zr}process.env.NODE_ENV==="production"?Ji.exports=yp():Ji.exports=Cp();var C=Ji.exports;function io(t){const{className:e,...r}=t,n=`arkynAlertTitle ${e}`;return C.jsx("div",{className:n.trim(),...r})}const so=c.createContext({});function bp(){return c.useContext(so)}function Dp(t){const{schema:e,children:r,className:n,...i}=t,o=!(l=>{let f=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===io?f=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),f})(r)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${o} ${n}`;return C.jsx(so.Provider,{value:t,children:C.jsx("div",{className:u.trim(),...i,children:r})})}function Ep(t){const{className:e,...r}=t,n=`arkynAlertContent ${e}`;return C.jsx("div",{className:n.trim(),...r})}function wp(t){const{className:e,...r}=t,n=`arkynAlertDescription ${e}`;return C.jsx("div",{className:n.trim(),...r})}function Op(t){const{className:e,...r}=t,{schema:n}=bp(),i=`arkynAlertIcon ${n} ${e}`;switch(n){case"success":return C.jsx(he.CheckCircle2,{className:i,...r});case"danger":return C.jsx(he.XCircle,{className:i,...r});case"warning":return C.jsx(he.AlertTriangle,{className:i,...r});case"info":return C.jsx(he.Info,{className:i,...r})}}function Fn(t,e){return e?C.jsx(e,{size:t,strokeWidth:2.5}):C.jsx(C.Fragment,{})}/*!
30
+ <%s key={someKey} {...props} />`,Qa,Sr,AO,Sr),vp[Sr+Qa]=!0}}return A===n?ge(Ge):Br(Ge),Ge}}function OO(A,ie,oe){return gp(A,ie,oe,!0)}function xO(A,ie,oe){return gp(A,ie,oe,!1)}var BO=xO,SO=OO;Zr.Fragment=n,Zr.jsx=BO,Zr.jsxs=SO}()),Zr}process.env.NODE_ENV==="production"?Ji.exports=yp():Ji.exports=Cp();var C=Ji.exports;function io(t){const{className:e,...r}=t,n=`arkynAlertTitle ${e}`;return C.jsx("div",{className:n.trim(),...r})}const so=c.createContext({});function bp(){return c.useContext(so)}function Dp(t){const{schema:e,children:r,className:n,...i}=t,o=!(l=>{let f=!1;const p=h=>{Array.isArray(h)?h.forEach(p):h&&typeof h=="object"&&"type"in h&&(h.type===io?f=!0:h.props&&h.props.children&&p(h.props.children))};return p(l),f})(r)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${o} ${n}`;return C.jsx(so.Provider,{value:t,children:C.jsx("div",{className:u.trim(),...i,children:r})})}function Ep(t){const{className:e,...r}=t,n=`arkynAlertContent ${e}`;return C.jsx("div",{className:n.trim(),...r})}function wp(t){const{className:e,...r}=t,n=`arkynAlertDescription ${e}`;return C.jsx("div",{className:n.trim(),...r})}function Op(t){const{className:e,...r}=t,{schema:n}=bp(),i=`arkynAlertIcon ${n} ${e}`;switch(n){case"success":return C.jsx(he.CheckCircle2,{className:i,...r});case"danger":return C.jsx(he.XCircle,{className:i,...r});case"warning":return C.jsx(he.AlertTriangle,{className:i,...r});case"info":return C.jsx(he.Info,{className:i,...r})}}function Fn(t,e){return e?C.jsx(e,{size:t,strokeWidth:2.5}):C.jsx(C.Fragment,{})}/*!
31
31
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
32
32
  *
33
33
  * Copyright (c) 2014-2017, Jon Schlinkert.
34
34
  * Released under the MIT License.
35
- */function ao(t){return Object.prototype.toString.call(t)==="[object Object]"}function nt(t){var e,r;return ao(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ao(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var oo=Symbol.for("immer-nothing"),uo=Symbol.for("immer-draftable"),vt=Symbol.for("immer-state"),xp=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 ft(t,...e){if(process.env.NODE_ENV!=="production"){const r=xp[t],n=typeof r=="function"?r.apply(null,e):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object.getPrototypeOf;function lr(t){return!!t&&!!t[vt]}function cr(t){var e;return t?lo(t)||Array.isArray(t)||!!t[uo]||!!((e=t.constructor)!=null&&e[uo])||kn(t)||jn(t):!1}var Bp=Object.prototype.constructor.toString();function lo(t){if(!t||typeof t!="object")return!1;const e=Ar(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Bp}function Tn(t,e){Mn(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Mn(t){const e=t[vt];return e?e.type_:Array.isArray(t)?1:kn(t)?2:jn(t)?3:0}function Qi(t,e){return Mn(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function co(t,e,r){const n=Mn(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Sp(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function kn(t){return t instanceof Map}function jn(t){return t instanceof Set}function fr(t){return t.copy_||t.base_}function es(t,e){if(kn(t))return new Map(t);if(jn(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=lo(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[vt];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){const a=i[s],o=n[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[a]})}return Object.create(Ar(t),n)}else{const n=Ar(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function ts(t,e=!1){return In(t)||lr(t)||!cr(t)||(Mn(t)>1&&(t.set=t.add=t.clear=t.delete=Ap),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>ts(n,!0))),t}function Ap(){ft(2)}function In(t){return Object.isFrozen(t)}var Lp={};function dr(t){const e=Lp[t];return e||ft(0,t),e}var Kr;function fo(){return Kr}function Pp(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function po(t,e){e&&(dr("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function rs(t){ns(t),t.drafts_.forEach(Fp),t.drafts_=null}function ns(t){t===Kr&&(Kr=t.parent_)}function ho(t){return Kr=Pp(Kr,t)}function Fp(t){const e=t[vt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function vo(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[vt].modified_&&(rs(e),ft(4)),cr(t)&&(t=Nn(e,t),e.parent_||_n(e,t)),e.patches_&&dr("Patches").generateReplacementPatches_(r[vt].base_,t,e.patches_,e.inversePatches_)):t=Nn(e,r,[]),rs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==oo?t:void 0}function Nn(t,e,r){if(In(e))return e;const n=e[vt];if(!n)return Tn(e,(i,s)=>go(t,n,e,i,s,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return _n(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let s=i,a=!1;n.type_===3&&(s=new Set(i),i.clear(),a=!0),Tn(s,(o,u)=>go(t,n,i,o,u,r,a)),_n(t,i,!1),r&&t.patches_&&dr("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function go(t,e,r,n,i,s,a){if(process.env.NODE_ENV!=="production"&&i===r&&ft(5),lr(i)){const o=s&&e&&e.type_!==3&&!Qi(e.assigned_,n)?s.concat(n):void 0,u=Nn(t,i,o);if(co(r,n,u),lr(u))t.canAutoFreeze_=!1;else return}else a&&r.add(i);if(cr(i)&&!In(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Nn(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&_n(t,i)}}function _n(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&ts(e,r)}function Tp(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:fo(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,s=is;r&&(i=[n],s=Yr);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return n.draft_=o,n.revoke_=a,o}var is={get(t,e){if(e===vt)return t;const r=fr(t);if(!Qi(r,e))return Mp(t,r,e);const n=r[e];return t.finalized_||!cr(n)?n:n===ss(t.base_,e)?(os(t),t.copy_[e]=us(n,t)):n},has(t,e){return e in fr(t)},ownKeys(t){return Reflect.ownKeys(fr(t))},set(t,e,r){const n=mo(fr(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=ss(fr(t),e),s=i==null?void 0:i[vt];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(Sp(r,i)&&(r!==void 0||Qi(t.base_,e)))return!0;os(t),as(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return ss(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,os(t),as(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=fr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){ft(11)},getPrototypeOf(t){return Ar(t.base_)},setPrototypeOf(){ft(12)}},Yr={};Tn(is,(t,e)=>{Yr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yr.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&ft(13),Yr.set.call(this,t,e,void 0)},Yr.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&ft(14),is.set.call(this,t[0],e,r,t[0])};function ss(t,e){const r=t[vt];return(r?fr(r):t)[e]}function Mp(t,e,r){var i;const n=mo(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function mo(t,e){if(!(e in t))return;let r=Ar(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Ar(r)}}function as(t){t.modified_||(t.modified_=!0,t.parent_&&as(t.parent_))}function os(t){t.copy_||(t.copy_=es(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var kp=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const s=r;r=e;const a=this;return function(u=s,...l){return a.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&ft(6),n!==void 0&&typeof n!="function"&&ft(7);let i;if(cr(e)){const s=ho(this),a=us(e,void 0);let o=!0;try{i=r(a),o=!1}finally{o?rs(s):ns(s)}return po(s,n),vo(i,s)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===oo&&(i=void 0),this.autoFreeze_&&ts(i,!0),n){const s=[],a=[];dr("Patches").generateReplacementPatches_(e,i,s,a),n(s,a)}return i}else ft(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(a,...o)=>this.produceWithPatches(a,u=>e(u,...o));let n,i;return[this.produce(e,r,(a,o)=>{n=a,i=o}),n,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){cr(t)||ft(8),lr(t)&&(t=jp(t));const e=ho(this),r=us(t,void 0);return r[vt].isManual_=!0,ns(e),r}finishDraft(t,e){const r=t&&t[vt];(!r||!r.isManual_)&&ft(9);const{scope_:n}=r;return po(n,e),vo(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=dr("Patches").applyPatches_;return lr(t)?n(t,e):this.produce(t,i=>n(i,e))}};function us(t,e){const r=kn(t)?dr("MapSet").proxyMap_(t,e):jn(t)?dr("MapSet").proxySet_(t,e):Tp(t,e);return(e?e.scope_:fo()).drafts_.push(r),r}function jp(t){return lr(t)||ft(10,t),yo(t)}function yo(t){if(!cr(t)||In(t))return t;const e=t[vt];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=es(t,e.scope_.immer_.useStrictShallowCopy_)}else r=es(t,!0);return Tn(r,(n,i)=>{co(r,n,yo(i))}),e&&(e.finalized_=!1),r}var gt=new kp,ls=gt.produce;gt.produceWithPatches.bind(gt),gt.setAutoFreeze.bind(gt),gt.setUseStrictShallowCopy.bind(gt),gt.applyPatches.bind(gt);var Co=gt.createDraft.bind(gt),bo=gt.finishDraft.bind(gt),Ip={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=L.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},Np={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=ye.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},_p={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=q.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},zn=new WeakMap,Wn=new WeakMap,Xr=new WeakMap,Do=new WeakMap,Eo=new WeakMap,wo=new WeakMap,Oo=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=L.levels(t,e);return r?n=n.slice(1):n=n.slice(0,-1),n},common(t,e){for(var r=[],n=0;n<t.length&&n<e.length;n++){var i=t[n],s=e[n];if(i!==s)break;r.push(i)}return r},compare(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++){if(t[n]<e[n])return-1;if(t[n]>e[n])return 1}return 0},endsAfter(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),s=t[r],a=e[r];return L.equals(n,i)&&s>a},endsAt(t,e){var r=t.length,n=t.slice(0,r),i=e.slice(0,r);return L.equals(n,i)},endsBefore(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),s=t[r],a=e[r];return L.equals(n,i)&&s<a},equals(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])},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 r=t.slice(0,-1),n=e.slice(0,-1),i=t[t.length-1],s=e[e.length-1];return i!==s&&L.equals(r,n)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=[],i=0;i<=t.length;i++)n.push(t.slice(0,i));return r&&n.reverse(),n},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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var n=[...t],{affinity:i="forward"}=r;if(t.length===0)return n;switch(e.type){case"insert_node":{var{path:s}=e;(L.equals(s,n)||L.endsBefore(s,n)||L.isAncestor(s,n))&&(n[s.length-1]+=1);break}case"remove_node":{var{path:a}=e;if(L.equals(a,n)||L.isAncestor(a,n))return null;L.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:o,position:u}=e;L.equals(o,n)||L.endsBefore(o,n)?n[o.length-1]-=1:L.isAncestor(o,n)&&(n[o.length-1]-=1,n[o.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if(L.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,n)?n[l.length-1]+=1:L.isAncestor(l,n)&&t[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:p,newPath:h}=e;if(L.equals(p,h))return n;if(L.isAncestor(p,n)||L.equals(p,n)){var y=h.slice();return L.endsBefore(p,h)&&p.length<h.length&&(y[p.length-1]-=1),y.concat(n.slice(p.length))}else L.isSibling(p,h)&&(L.isAncestor(h,n)||L.equals(h,n))?L.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:L.endsBefore(h,n)||L.equals(h,n)||L.isAncestor(h,n)?(L.endsBefore(p,n)&&(n[p.length-1]-=1),n[h.length-1]+=1):L.endsBefore(p,n)&&(L.equals(h,n)&&(n[h.length-1]+=1),n[p.length-1]-=1);break}}return n}};function $r(t){"@babel/helpers - typeof";return $r=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},$r(t)}function zp(t,e){if($r(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($r(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wp(t){var e=zp(t,"string");return $r(e)==="symbol"?e:String(e)}function st(t,e,r){return e=Wp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Hp=(t,e,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,s=se.parent(t,n),a=n[n.length-1];if(a>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(s.children.splice(a,0,i),e)for(var[o,u]of q.points(e))e[u]=ye.transform(o,r);break}case"insert_text":{var{path:l,offset:f,text:p}=r;if(p.length===0)break;var h=se.leaf(t,l),y=h.text.slice(0,f),v=h.text.slice(f);if(h.text=y+p+v,e)for(var[g,d]of q.points(e))e[d]=ye.transform(g,r);break}case"merge_node":{var{path:D}=r,E=se.get(t,D),B=L.previous(D),w=se.get(t,B),b=se.parent(t,D),x=D[D.length-1];if(le.isText(E)&&le.isText(w))w.text+=E.text;else if(!le.isText(E)&&!le.isText(w))w.children.push(...E.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat($e.stringify(E)," ").concat($e.stringify(w)));if(b.children.splice(x,1),e)for(var[A,U]of q.points(e))e[U]=ye.transform(A,r);break}case"move_node":{var{path:P,newPath:H}=r;if(L.isAncestor(P,H))throw new Error("Cannot move a path [".concat(P,"] to new path [").concat(H,"] because the destination is inside itself."));var j=se.get(t,P),M=se.parent(t,P),W=P[P.length-1];M.children.splice(W,1);var _=L.transform(P,r),z=se.get(t,L.parent(_)),Y=_[_.length-1];if(z.children.splice(Y,0,j),e)for(var[V,Q]of q.points(e))e[Q]=ye.transform(V,r);break}case"remove_node":{var{path:ie}=r,k=ie[ie.length-1],G=se.parent(t,ie);if(G.children.splice(k,1),e)for(var[$,R]of q.points(e)){var re=ye.transform($,r);if(e!=null&&re!=null)e[R]=re;else{var F=void 0,O=void 0;for(var[N,T]of se.texts(t))if(L.compare(T,ie)===-1)F=[N,T];else{O=[N,T];break}var I=!1;F&&O&&(L.equals(O[1],ie)?I=!L.hasPrevious(O[1]):I=L.common(F[1],ie).length<L.common(O[1],ie).length),F&&!I?($.path=F[1],$.offset=F[0].text.length):O?($.path=O[1],$.offset=0):e=null}}break}case"remove_text":{var{path:Z,offset:ee,text:J}=r;if(J.length===0)break;var de=se.leaf(t,Z),fe=de.text.slice(0,ee),ce=de.text.slice(ee+J.length);if(de.text=fe+ce,e)for(var[we,Me]of q.points(e))e[Me]=ye.transform(we,r);break}case"set_node":{var{path:Ae,properties:Ie,newProperties:qe}=r;if(Ae.length===0)throw new Error("Cannot set properties on the root node!");var rt=se.get(t,Ae);for(var Be in qe){if(Be==="children"||Be==="text")throw new Error('Cannot set the "'.concat(Be,'" property of nodes!'));var Je=qe[Be];Je==null?delete rt[Be]:rt[Be]=Je}for(var it in Ie)qe.hasOwnProperty(it)||delete rt[it];break}case"set_selection":{var{newProperties:Oe}=r;if(Oe==null)e=Oe;else{if(e==null){if(!q.isRange(Oe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat($e.stringify(Oe)," when there is no current selection."));e=Jr({},Oe)}for(var Fe in Oe){var Qe=Oe[Fe];if(Qe==null){if(Fe==="anchor"||Fe==="focus")throw new Error('Cannot remove the "'.concat(Fe,'" selection property'));delete e[Fe]}else e[Fe]=Qe}}break}case"split_node":{var{path:Ke,position:et,properties:Ct}=r;if(Ke.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ke,"] because the root node cannot be split."));var Ye=se.get(t,Ke),nr=se.parent(t,Ke),wt=Ke[Ke.length-1],St;if(le.isText(Ye)){var ir=Ye.text.slice(0,et),Wr=Ye.text.slice(et);Ye.text=ir,St=Jr(Jr({},Ct),{},{text:Wr})}else{var sr=Ye.children.slice(0,et),Hr=Ye.children.slice(et);Ye.children=sr,St=Jr(Jr({},Ct),{},{children:Hr})}if(nr.children.splice(wt+1,0,St),e)for(var[Mt,xr]of q.points(e))e[xr]=ye.transform(Mt,r);break}}return e},Up={transform(t,e){t.children=Co(t.children);var r=t.selection&&Co(t.selection);try{r=Hp(t,r,e)}finally{t.children=bo(t.children),r?t.selection=lr(r)?bo(r):r:t.selection=null}}},Rp={insertNodes(t,e,r){t.insertNodes(e,r)},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,r){t.setNodes(e,r)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,r){t.unsetNodes(e,r)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,r){t.wrapNodes(e,r)}},Vp={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,r){t.setPoint(e,r)},setSelection(t,e){t.setSelection(e)}},Bo=(t,e)=>{for(var r in t){var n=t[r],i=e[r];if(nt(n)&&nt(i)){if(!Bo(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var s=0;s<n.length;s++)if(n[s]!==i[s])return!1}else if(n!==i)return!1}for(var a in e)if(t[a]===void 0&&e[a]!==void 0)return!1;return!0};function qp(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function kt(t,e){if(t==null)return{};var r=qp(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Gp=["anchor","focus"];function So(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?So(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,{anchor:n,focus:i}=t;return q.isBackward(t)===r?[n,i]:[i,n]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return ye.equals(t.anchor,e.anchor)&&ye.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[r,n]=q.edges(t),[i,s]=q.edges(e);return ye.isBefore(r,i)&&ye.isAfter(n,s)}var[a,o]=q.edges(t),u=!1,l=!1;return ye.isPoint(e)?(u=ye.compare(e,a)>=0,l=ye.compare(e,o)<=0):(u=L.compare(e,a.path)>=0,l=L.compare(e,o.path)<=0),u&&l},intersection(t,e){var r=kt(t,Gp),[n,i]=q.edges(t),[s,a]=q.edges(e),o=ye.isBefore(n,s)?s:n,u=ye.isBefore(i,a)?i:a;return ye.isBefore(u,o)?null:Zp({anchor:o,focus:u},r)},isBackward(t){var{anchor:e,focus:r}=t;return ye.isAfter(e,r)},isCollapsed(t){var{anchor:e,focus:r}=t;return ye.equals(e,r)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return nt(t)&&ye.isPoint(t.anchor)&&ye.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ls(t,n=>{if(n===null)return null;var{affinity:i="inward"}=r,s,a;if(i==="inward"){var o=q.isCollapsed(n);q.isForward(n)?(s="forward",a=o?s:"backward"):(s="backward",a=o?s:"forward")}else i==="outward"?q.isForward(n)?(s="backward",a="forward"):(s="forward",a="backward"):(s=i,a=i);var u=ye.transform(n.anchor,e,{affinity:s}),l=ye.transform(n.focus,e,{affinity:a});if(!u||!l)return null;n.anchor=u,n.focus=l})}},Ao=t=>nt(t)&&se.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return nt(t)&&se.isNodeList(t.children)},isElement:Ao,isElementList(t){return Array.isArray(t)&&t.every(e=>ue.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Ao(e)&&e[n]===r},matches(t,e){for(var r in e)if(r!=="children"&&t[r]!==e[r])return!1;return!0}},Kp=["children"],Yp=["text"],Lo=new WeakMap,se={ancestor(t,e){var r=se.get(t,e);if(le.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat($e.stringify(r)));return r},ancestors(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of L.ancestors(e,r)){var i=se.ancestor(t,n),s=[i,n];yield s}}()},child(t,e){if(le.isText(t))throw new Error("Cannot get the child of a text node: ".concat($e.stringify(t)));var r=t.children[e];if(r==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat($e.stringify(t)));return r},children(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,i=se.ancestor(t,e),{children:s}=i,a=n?s.length-1:0;n?a>=0:a<s.length;){var o=se.child(i,a),u=e.concat(a);yield[o,u],a=n?a-1:a+1}}()},common(t,e,r){var n=L.common(e,r),i=se.get(t,n);return[i,n]},descendant(t,e){var r=se.get(t,e);if(m.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat($e.stringify(r)));return r},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))n.length!==0&&(yield[r,n])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))ue.isElement(r)&&(yield[r,n])}()},extractProps(t){if(ue.isAncestor(t)){var e=kt(t,Kp);return e}else{var e=kt(t,Yp);return e}},first(t,e){for(var r=e.slice(),n=se.get(t,r);n&&!(le.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(t,e){if(le.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat($e.stringify(t)));var r=ls({children:t.children},n=>{var[i,s]=q.edges(e),a=se.nodes(n,{reverse:!0,pass:h=>{var[,y]=h;return!q.includes(e,y)}});for(var[,o]of a){if(!q.includes(e,o)){var u=se.parent(n,o),l=o[o.length-1];u.children.splice(l,1)}if(L.equals(o,s.path)){var f=se.leaf(n,o);f.text=f.text.slice(0,s.offset)}if(L.equals(o,i.path)){var p=se.leaf(n,o);p.text=p.text.slice(i.offset)}}m.isEditor(n)&&(n.selection=null)});return r.children},get(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(le.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat($e.stringify(t)));r=r.children[i]}return r},has(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(le.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(t){return le.isText(t)||ue.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Lo.get(t);if(e!==void 0)return e;var r=t.every(n=>se.isNode(n));return Lo.set(t,r),r},last(t,e){for(var r=e.slice(),n=se.get(t,r);n&&!(le.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(t,e){var r=se.get(t,e);if(!le.isText(r))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat($e.stringify(r)));return r},levels(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of L.levels(e,r)){var i=se.get(t,n);yield[i,n]}}()},matches(t,e){return ue.isElement(t)&&ue.isElementProps(e)&&ue.matches(t,e)||le.isText(t)&&le.isTextProps(e)&&le.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=e,{from:i=[],to:s}=e,a=new Set,o=[],u=t;!(s&&(n?L.isBefore(o,s):L.isAfter(o,s)));){if(a.has(u)||(yield[u,o]),!a.has(u)&&!le.isText(u)&&u.children.length!==0&&(r==null||r([u,o])===!1)){a.add(u);var l=n?u.children.length-1:0;L.isAncestor(o,i)&&(l=i[o.length]),o=o.concat(l),u=se.get(t,o);continue}if(o.length===0)break;if(!n){var f=L.next(o);if(se.has(t,f)){o=f,u=se.get(t,o);continue}}if(n&&o[o.length-1]!==0){var p=L.previous(o);o=p,u=se.get(t,o);continue}o=L.parent(o),u=se.get(t,o),a.add(u)}}()},parent(t,e){var r=L.parent(e),n=se.get(t,r);if(le.isText(n))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return n},string(t){return le.isText(t)?t.text:t.children.map(se.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))le.isText(r)&&(yield[r,n])}()}};function Po(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Po(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Po(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ht={isNodeOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!nt(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&se.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)&&nt(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&se.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)&&nt(t.properties)&&nt(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||nt(t.properties)&&nt(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&nt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Ht.isOperation(e))},isSelectionOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ne(Ne({},t),{},{type:"remove_node"});case"insert_text":return Ne(Ne({},t),{},{type:"remove_text"});case"merge_node":return Ne(Ne({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:r}=t;if(L.equals(e,r))return t;if(L.isSibling(r,e))return Ne(Ne({},t),{},{path:e,newPath:r});var n=L.transform(r,t),i=L.transform(L.next(r),t);return Ne(Ne({},t),{},{path:n,newPath:i})}case"remove_node":return Ne(Ne({},t),{},{type:"insert_node"});case"remove_text":return Ne(Ne({},t),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:a}=t;return Ne(Ne({},t),{},{properties:a,newProperties:s})}case"set_selection":{var{properties:o,newProperties:u}=t;return o==null?Ne(Ne({},t),{},{properties:u,newProperties:null}):u==null?Ne(Ne({},t),{},{properties:null,newProperties:o}):Ne(Ne({},t),{},{properties:u,newProperties:o})}case"split_node":return Ne(Ne({},t),{},{type:"merge_node",path:L.next(t.path)})}}},Fo=new WeakMap,Xp=t=>{var e=Fo.get(t);if(e!==void 0)return e;if(!nt(t))return!1;var r=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||nt(t.marks))&&(t.selection===null||q.isRange(t.selection))&&se.isNodeList(t.children)&&Ht.isOperationList(t.operations);return Fo.set(t,r),r},m={above(t,e){return t.above(e)},addMark(t,e,r){t.addMark(e,r)},after(t,e,r){return t.after(e,r)},before(t,e,r){return t.before(e,r)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteBackward(r)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteForward(r)},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,r){t.insertFragment(e,r)},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,r){return t.isEdge(e,r)},isEditor(t){return Xp(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,r){return t.isEnd(e,r)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,r){return t.isStart(e,r)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,r){return t.leaf(e,r)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,r){return t.node(e,r)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,r){return t.parent(e,r)},path(t,e,r){return t.path(e,r)},pathRef(t,e,r){return t.pathRef(e,r)},pathRefs(t){return t.pathRefs()},point(t,e,r){return t.point(e,r)},pointRef(t,e,r){return t.pointRef(e,r)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,r){return t.range(e,r)},rangeRef(t,e,r){return t.rangeRef(e,r)},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,r){return t.string(e,r)},unhangRange(t,e,r){return t.unhangRange(e,r)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,r)=>t.shouldMergeNodesRemovePrevNode(e,r)},$p={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function To(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?To(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):To(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ye={compare(t,e){var r=L.compare(t.path,e.path);return r===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:r},isAfter(t,e){return ye.compare(t,e)===1},isBefore(t,e){return ye.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return nt(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ls(t,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:s,offset:a}=n;switch(e.type){case"insert_node":case"move_node":{n.path=L.transform(s,e,r);break}case"insert_text":{L.equals(e.path,s)&&(e.offset<a||e.offset===a&&i==="forward")&&(n.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,s)&&(n.offset+=e.position),n.path=L.transform(s,e,r);break}case"remove_text":{L.equals(e.path,s)&&e.offset<=a&&(n.offset-=Math.min(a-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,s)||L.isAncestor(e.path,s))return null;n.path=L.transform(s,e,r);break}case"split_node":{if(L.equals(e.path,s)){if(e.position===a&&i==null)return null;(e.position<a||e.position===a&&i==="forward")&&(n.offset-=e.position,n.path=L.transform(s,e,Mo(Mo({},r),{},{affinity:"forward"})))}else n.path=L.transform(s,e,r);break}}})}},ko=void 0,$e={setScrubber(t){ko=t},stringify(t){return JSON.stringify(t,ko)}},Jp=["text"],Qp=["anchor","focus"];function jo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var le={equals(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(s){var a=kt(s,Jp);return a}return Bo(n?i(t):t,n?i(e):e)},isText(t){return nt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>le.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var r in e)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==e[r]))return!1;return!0},decorations(t,e){var r=[jt({},t)];for(var n of e){var i=kt(n,Qp),[s,a]=q.edges(n),o=[],u=0,l=s.offset,f=a.offset;for(var p of r){var{length:h}=p.text,y=u;if(u+=h,l<=y&&u<=f){Object.assign(p,i),o.push(p);continue}if(l!==f&&(l===u||f===y)||l>u||f<y||f===y&&y!==0){o.push(p);continue}var v=p,g=void 0,d=void 0;if(f<u){var D=f-y;d=jt(jt({},v),{},{text:v.text.slice(D)}),v=jt(jt({},v),{},{text:v.text.slice(0,D)})}if(l>y){var E=l-y;g=jt(jt({},v),{},{text:v.text.slice(0,E)}),v=jt(jt({},v),{},{text:v.text.slice(E)})}Object.assign(v,i),g&&o.push(g),o.push(v),d&&o.push(d)}r=o}return r}},cs=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Lr=(t,e)=>{var[r]=m.node(t,e);return n=>n===r},fs=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?sh(e):e,s=ve.None,a=ve.None,o=0,u=null,l=null;for(var f of i){var p=f.codePointAt(0);if(!p)break;var h=mh(f,p);if([s,a]=n?[a,h]:[h,s],Pr(s,ve.ZWJ)&&Pr(a,ve.ExtPict)&&(n?u=Io(e.substring(0,o)):u=Io(e.substring(0,e.length-o)),!u)||Pr(s,ve.RI)&&Pr(a,ve.RI)&&(l!==null?l=!l:n?l=!0:l=Eh(e.substring(0,e.length-o)),!l)||s!==ve.None&&a!==ve.None&&Ch(s,a))break;o+=f.length}return o||1},eh=/\s/,th=/[\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]/,rh=/['\u2018\u2019]/,nh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;e.length>0;){var s=fs(e,r),[a,o]=ds(e,s,r);if(ih(a,o,r))i=!0,n+=s;else if(!i)n+=s;else break;e=o}return n},ds=(t,e,r)=>{if(r){var n=t.length-e;return[t.slice(n,t.length),t.slice(0,n)]}return[t.slice(0,e),t.slice(e)]},ih=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(eh.test(e))return!1;if(rh.test(e)){var i=fs(r,n),[s,a]=ds(r,i,n);if(t(s,a,n))return!0}return!th.test(e)},sh=function*(e){for(var r=e.length-1,n=0;n<e.length;n++){var i=e.charAt(r-n);if(oh(i.charCodeAt(0))){var s=e.charAt(r-n-1);if(ah(s.charCodeAt(0))){yield s+i,n++;continue}}yield i}},ah=t=>t>=55296&&t<=56319,oh=t=>t>=56320&&t<=57343,ve;(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"})(ve||(ve={}));var uh=/^(?:[\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])$/,lh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,ch=/^(?:[\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])$/,fh=/^[\u1100-\u115F\uA960-\uA97C]$/,dh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,ph=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,hh=/^[\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]$/,vh=/^[\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]$/,gh=/^(?:[\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])$/,mh=(t,e)=>{var r=ve.Any;return t.search(uh)!==-1&&(r|=ve.Extend),e===8205&&(r|=ve.ZWJ),e>=127462&&e<=127487&&(r|=ve.RI),t.search(lh)!==-1&&(r|=ve.Prepend),t.search(ch)!==-1&&(r|=ve.SpacingMark),t.search(fh)!==-1&&(r|=ve.L),t.search(dh)!==-1&&(r|=ve.V),t.search(ph)!==-1&&(r|=ve.T),t.search(hh)!==-1&&(r|=ve.LV),t.search(vh)!==-1&&(r|=ve.LVT),t.search(gh)!==-1&&(r|=ve.ExtPict),r};function Pr(t,e){return(t&e)!==0}var yh=[[ve.L,ve.L|ve.V|ve.LV|ve.LVT],[ve.LV|ve.V,ve.V|ve.T],[ve.LVT|ve.T,ve.T],[ve.Any,ve.Extend|ve.ZWJ],[ve.Any,ve.SpacingMark],[ve.Prepend,ve.Any],[ve.ZWJ,ve.ExtPict],[ve.RI,ve.RI]];function Ch(t,e){return yh.findIndex(r=>Pr(t,r[0])&&Pr(e,r[1]))===-1}var bh=/(?:[\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$/,Io=t=>t.search(bh)!==-1,Dh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Eh=t=>{var e=t.match(Dh);if(e===null)return!1;var r=e[0].length/2;return r%2===1},wh={delete(t,e){t.delete(e)},insertFragment(t,e,r){t.insertFragment(e,r)},insertText(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:n=!1}=r,{at:i=cs(t)}=r;if(L.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var s=q.end(i);if(!n&&m.void(t,{at:s}))return;var a=q.start(i),o=m.pointRef(t,a),u=m.pointRef(t,s);te.delete(t,{at:i,voids:n});var l=o.unref(),f=u.unref();i=l||f,te.setSelection(t,{anchor:i,focus:i})}if(!(!n&&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 No(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?No(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var te=Hn(Hn(Hn(Hn({},Up),Rp),Vp),wh),Un=new WeakMap,Oh=t=>Un.get(t)||!1,xh=(t,e,r)=>{var n=Un.get(t)||!1;Un.set(t,!0);try{e(),r()}finally{Un.set(t,n)}};function _o(t,e,r){var n=zn.get(t)||[],i=Wn.get(t)||new Set,s,a,o=p=>{if(p){var h=p.join(",");a.has(h)||(a.add(h),s.push(p))}};if(r){s=[],a=new Set;for(var u of n){var l=r(u);o(l)}}else s=n,a=i;for(var f of e)o(f);zn.set(t,s),Wn.set(t,a)}var Bh=(t,e)=>{for(var r of m.pathRefs(t))Ip.transform(r,e);for(var n of m.pointRefs(t))Np.transform(n,e);for(var i of m.rangeRefs(t))_p.transform(i,e);if(!Oh(t)){var s=L.operationCanTransformPath(e)?a=>L.transform(a,e):void 0;_o(t,t.getDirtyPaths(e),s)}te.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Xr.get(t)||(Xr.set(t,!0),Promise.resolve().then(()=>{Xr.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},Sh=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=e;return L.levels(r)}case"insert_node":{var{node:n,path:i}=e,s=L.levels(i),a=le.isText(n)?[]:Array.from(se.nodes(n),H=>{var[,j]=H;return i.concat(j)});return[...s,...a]}case"merge_node":{var{path:o}=e,u=L.ancestors(o),l=L.previous(o);return[...u,l]}case"move_node":{var{path:f,newPath:p}=e;if(L.equals(f,p))return[];var h=[],y=[];for(var v of L.ancestors(f)){var g=L.transform(v,e);h.push(g)}for(var d of L.ancestors(p)){var D=L.transform(d,e);y.push(D)}var E=y[y.length-1],B=p[p.length-1],w=E.concat(B);return[...h,...y,w]}case"remove_node":{var{path:b}=e,x=L.ancestors(b);return[...x]}case"split_node":{var{path:A}=e,U=L.levels(A),P=L.next(A);return[...U,P]}default:return[]}},Ah=t=>{var{selection:e}=t;return e?se.fragment(t,e):[]},Lh=(t,e)=>{var[r,n]=e;if(!le.isText(r)){if(ue.isElement(r)&&r.children.length===0){var i={text:""};te.insertNodes(t,i,{at:n.concat(0),voids:!0});return}for(var s=m.isEditor(r)?!1:ue.isElement(r)&&(t.isInline(r)||r.children.length===0||le.isText(r.children[0])||t.isInline(r.children[0])),a=0,o=0;o<r.children.length;o++,a++){var u=se.get(t,n);if(!le.isText(u)){var l=u.children[a],f=u.children[a-1],p=o===r.children.length-1,h=le.isText(l)||ue.isElement(l)&&t.isInline(l);if(h!==s)te.removeNodes(t,{at:n.concat(a),voids:!0}),a--;else if(ue.isElement(l)){if(t.isInline(l)){if(f==null||!le.isText(f)){var y={text:""};te.insertNodes(t,y,{at:n.concat(a),voids:!0}),a++}else if(p){var v={text:""};te.insertNodes(t,v,{at:n.concat(a+1),voids:!0}),a++}}}else{if(!le.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&le.isText(f)&&(le.equals(l,f,{loose:!0})?(te.mergeNodes(t,{at:n.concat(a),voids:!0}),a--):f.text===""?(te.removeNodes(t,{at:n.concat(a-1),voids:!0}),a--):l.text===""&&(te.removeNodes(t,{at:n.concat(a),voids:!0}),a--))}}}}},Ph=(t,e)=>{var{iteration:r,initialDirtyPathsLength:n}=e,i=n*42;if(r>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},Fh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:i="lowest",at:s=e.selection,match:a}=r;if(s){var o=m.path(e,s),u=i==="lowest";for(var[l,f]of m.levels(e,{at:o,voids:n,match:a,reverse:u}))if(!le.isText(l)){if(q.isRange(s)){if(L.isAncestor(f,s.anchor.path)&&L.isAncestor(f,s.focus.path))return[l,f]}else if(!L.equals(o,f))return[l,f]}}};function zo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Th=(t,e,r)=>{var{selection:n}=t;if(n){var i=(p,h)=>{if(!le.isText(p))return!1;var[y,v]=m.parent(t,h);return!t.isVoid(y)||t.markableVoid(y)},s=q.isExpanded(n),a=!1;if(!s){var[o,u]=m.node(t,n);if(o&&i(o,u)){var[l]=m.parent(t,u);a=l&&t.markableVoid(l)}}if(s||a)te.setNodes(t,{[e]:r},{match:i,split:!0,voids:!0});else{var f=Wo(Wo({},m.marks(t)||{}),{},{[e]:r});t.marks=f,Xr.get(t)||t.onChange()}}};function Ho(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Uo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ho(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ho(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Mh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,r,{edge:"end"}),s=m.end(e,[]),a={anchor:i,focus:s},{distance:o=1}=n,u=0,l;for(var f of m.positions(e,Uo(Uo({},n),{},{at:a}))){if(u>o)break;u!==0&&(l=f),u++}return l};function Ro(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ro(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ro(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var kh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),s=m.point(e,r,{edge:"start"}),a={anchor:i,focus:s},{distance:o=1}=n,u=0,l;for(var f of m.positions(e,Vo(Vo({},n),{},{at:a,reverse:!0}))){if(u>o)break;u!==0&&(l=f),u++}return l},jh=(t,e)=>{var{selection:r}=t;r&&q.isCollapsed(r)&&te.delete(t,{unit:e,reverse:!0})},Ih=(t,e)=>{var{selection:r}=t;r&&q.isCollapsed(r)&&te.delete(t,{unit:e})},Nh=function(e){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&q.isExpanded(n)&&te.delete(e,{reverse:r==="backward"})},_h=(t,e)=>[m.start(t,e),m.end(t,e)];function qo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Go(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var zh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Go(Go({},r),{},{match:n=>ue.isElement(n)&&m.isElementReadOnly(e,n)}))},Wh=(t,e)=>m.point(t,e,{edge:"end"}),Hh=(t,e)=>{var r=m.path(t,e,{edge:"start"});return m.node(t,r)},Uh=(t,e)=>{var r=m.range(t,e);return se.fragment(t,r)};function Zo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ko(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Rh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ko(Ko({},r),{},{match:n=>ue.isElement(n)&&m.isVoid(e,n)}))},Vh=(t,e)=>e.children.some(r=>ue.isElement(r)&&m.isBlock(t,r)),qh=(t,e)=>e.children.some(r=>le.isText(r)||m.isInline(t,r)),Gh=(t,e)=>se.has(t,e),Zh=(t,e)=>e.children.every(r=>le.isText(r)),Kh=t=>{te.splitNodes(t,{always:!0})},Yh=(t,e,r)=>{te.insertNodes(t,e,r)},Xh=t=>{te.splitNodes(t,{always:!0})};function Yo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $h(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Jh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:s}=e;if(i){if(s){var a=$h({text:r},s);te.insertNodes(e,a,{at:n.at,voids:n.voids})}else te.insertText(e,r,n);e.marks=null}},Qh=(t,e)=>!t.isInline(e),ev=(t,e,r)=>m.isStart(t,e,r)||m.isEnd(t,e,r),tv=(t,e)=>{var{children:r}=e,[n]=r;return r.length===0||r.length===1&&le.isText(n)&&n.text===""&&!t.isVoid(e)},rv=(t,e,r)=>{var n=m.end(t,r);return ye.equals(e,n)},nv=t=>{var e=Do.get(t);return e===void 0?!0:e},iv=(t,e,r)=>{if(e.offset!==0)return!1;var n=m.start(t,r);return ye.equals(e,n)},sv=(t,e)=>{var r=m.path(t,e,{edge:"end"});return m.node(t,r)},av=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=se.leaf(e,i);return[s,i]};function ov(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,reverse:n=!1,voids:i=!1}=e,{match:s}=e;if(s==null&&(s=()=>!0),!!r){var a=[],o=m.path(t,r);for(var[u,l]of se.levels(t,o))if(s(u,l)&&(a.push([u,l]),!i&&ue.isElement(u)&&m.isVoid(t,u)))break;n&&a.reverse(),yield*a}}()}var uv=["text"],lv=["text"],cv=function(e){var{marks:r,selection:n}=e;if(!n)return null;var{anchor:i,focus:s}=n;if(r)return r;if(q.isExpanded(n)){var a=m.isEnd(e,i,i.path);if(a){var o=m.after(e,i);o&&(i=o)}var[u]=m.nodes(e,{match:le.isText,at:{anchor:i,focus:s}});if(u){var[l]=u,f=kt(l,uv);return f}else return{}}var{path:p}=i,[h]=m.leaf(e,p);if(i.offset===0){var y=m.previous(e,{at:p,match:le.isText}),v=m.above(e,{match:w=>ue.isElement(w)&&m.isVoid(e,w)&&e.markableVoid(w)});if(!v){var g=m.above(e,{match:w=>ue.isElement(w)&&m.isBlock(e,w)});if(y&&g){var[d,D]=y,[,E]=g;L.isAncestor(E,D)&&(h=d)}}}var B=kt(h,lv);return B},fv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection}=r;if(a){var o=m.after(e,a,{voids:i});if(o){var[,u]=m.last(e,[]),l=[o.path,u];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(s==null)if(L.isPath(a)){var[f]=m.parent(e,a);s=h=>f.children.includes(h)}else s=()=>!0;var[p]=m.nodes(e,{at:l,match:s,mode:n,voids:i});return p}}},dv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=se.get(e,i);return[s,i]};function pv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,mode:n="all",universal:i=!1,reverse:s=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!r){var l,f;if($p.isSpan(r))l=r[0],f=r[1];else{var p=m.path(t,r,{edge:"start"}),h=m.path(t,r,{edge:"end"});l=s?h:p,f=s?p:h}var y=se.nodes(t,{reverse:s,from:l,to:f,pass:w=>{var[b]=w;return ue.isElement(b)?!!(!a&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||o&&!m.isSelectable(t,b)):!1}}),v=[],g;for(var[d,D]of y)if(!(o&&ue.isElement(d)&&!m.isSelectable(t,d))){var E=g&&L.compare(D,g[1])===0;if(!(n==="highest"&&E)){if(!u(d,D)){if(i&&!E&&le.isText(d))return;continue}if(n==="lowest"&&E){g=[d,D];continue}var B=n==="lowest"?g:[d,D];B&&(i?v.push(B):yield B),g=[d,D]}}n==="lowest"&&g&&(i?v.push(g):yield g),i&&(yield*v)}}()}var hv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:i}=r,s=f=>zn.get(f)||[],a=f=>Wn.get(f)||new Set,o=f=>{var p=s(f).pop(),h=p.join(",");return a(f).delete(h),p};if(m.isNormalizing(e)){if(n){var u=Array.from(se.nodes(e),f=>{var[,p]=f;return p}),l=new Set(u.map(f=>f.join(",")));zn.set(e,u),Wn.set(e,l)}s(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of s(e))if(se.has(e,f)){var p=m.node(e,f),[h,y]=p;ue.isElement(h)&&h.children.length===0&&e.normalizeNode(p,{operation:i})}for(var v=s(e),g=v.length,d=0;v.length!==0;){if(!e.shouldNormalize({dirtyPaths:v,iteration:d,initialDirtyPathsLength:g,operation:i}))return;var D=o(e);if(se.has(e,D)){var E=m.node(e,D);e.normalizeNode(E,{operation:i})}d++,v=s(e)}})}},vv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=L.parent(i),a=m.node(e,s);return a},gv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.pathRefs(e);return u.delete(s),s.current=null,o}},a=m.pathRefs(e);return a.add(s),s},mv=t=>{var e=Eo.get(t);return e||(e=new Set,Eo.set(t,e)),e},yv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:s}=n;if(L.isPath(r)){if(s==="start"){var[,a]=se.first(e,r);r=a}else if(s==="end"){var[,o]=se.last(e,r);r=o}}return q.isRange(r)&&(s==="start"?r=q.start(r):s==="end"?r=q.end(r):r=L.common(r.anchor.path,r.focus.path)),ye.isPoint(r)&&(r=r.path),i!=null&&(r=r.slice(0,i)),r},Cv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.pointRefs(e);return u.delete(s),s.current=null,o}},a=m.pointRefs(e);return a.add(s),s},bv=t=>{var e=wo.get(t);return e||(e=new Set,wo.set(t,e)),e},Dv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=n;if(L.isPath(r)){var s;if(i==="end"){var[,a]=se.last(e,r);s=a}else{var[,o]=se.first(e,r);s=o}var u=se.get(e,s);if(!le.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(r,"] because it has no ").concat(i," text node."));return{path:s,offset:i==="end"?u.text.length:0}}if(q.isRange(r)){var[l,f]=q.edges(r);return i==="start"?l:f}return r};function Ev(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,unit:n="offset",reverse:i=!1,voids:s=!1,ignoreNonSelectable:a=!1}=e;if(!r)return;var o=m.range(t,r),[u,l]=q.edges(o),f=i?l:u,p=!1,h="",y=0,v=0,g=0;for(var[d,D]of m.nodes(t,{at:r,reverse:i,voids:s,ignoreNonSelectable:a})){if(ue.isElement(d)){if(!s&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var E=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:E},{voids:s}),p=!0}}if(le.isText(d)){var w=L.equals(D,f.path);for(w?(v=i?f.offset:d.text.length-f.offset,g=f.offset):(v=d.text.length,g=i?v:0),(w||p||n==="offset")&&(yield{path:D,offset:g},p=!1);;){if(y===0){if(h==="")break;y=b(h,n,i),h=ds(h,y,i)[1]}if(g=i?g-y:g+y,v=v-y,v<0){y=-v;break}y=0,yield{path:D,offset:g}}}}function b(x,A,U){return A==="character"?fs(x,U):A==="word"?nh(x,U):A==="line"||A==="block"?x.length:1}}()}var wv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection}=r;if(a){var o=m.before(e,a,{voids:i});if(o){var[,u]=m.first(e,[]),l=[o.path,u];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(s==null)if(L.isPath(a)){var[f]=m.parent(e,a);s=h=>f.children.includes(h)}else s=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:s,mode:n,voids:i});return p}}},Ov=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.rangeRefs(e);return u.delete(s),s.current=null,o}},a=m.rangeRefs(e);return a.add(s),s},xv=t=>{var e=Oo.get(t);return e||(e=new Set,Oo.set(t,e)),e},Bv=(t,e,r)=>{if(q.isRange(e)&&!r)return e;var n=m.start(t,e),i=m.end(t,r||e);return{anchor:n,focus:i}};function Xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Av=(t,e)=>{var{selection:r}=t;if(r){var n=(f,p)=>{if(!le.isText(f))return!1;var[h,y]=m.parent(t,p);return!t.isVoid(h)||t.markableVoid(h)},i=q.isExpanded(r),s=!1;if(!i){var[a,o]=m.node(t,r);if(a&&n(a,o)){var[u]=m.parent(t,o);s=u&&t.markableVoid(u)}}if(i||s)te.unsetNodes(t,e,{match:n,split:!0,voids:!0});else{var l=Sv({},m.marks(t)||{});delete l[e],t.marks=l,Xr.get(t)||t.onChange()}}},Lv=(t,e)=>{Do.set(t,e)},Pv=(t,e)=>m.point(t,e,{edge:"start"}),Fv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,s=m.range(e,r),[a,o]=q.edges(s),u="";for(var[l,f]of m.nodes(e,{at:s,match:le.isText,voids:i})){var p=l.text;L.equals(f,o.path)&&(p=p.slice(0,o.offset)),L.equals(f,a.path)&&(p=p.slice(a.offset)),u+=p}return u},Tv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,[s,a]=q.edges(r);if(s.offset!==0||a.offset!==0||q.isCollapsed(r)||L.hasPrevious(a.path))return r;var o=m.above(e,{at:a,match:v=>ue.isElement(v)&&m.isBlock(e,v),voids:i}),u=o?o[1]:[],l=m.start(e,s),f={anchor:l,focus:a},p=!0;for(var[h,y]of m.nodes(e,{at:f,match:le.isText,reverse:!0,voids:i})){if(p){p=!1;continue}if(h.text!==""||L.isBefore(y,u)){a={path:y,offset:h.text.length};break}}return{anchor:s,focus:a}},Mv=(t,e)=>{var r=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,r)}m.normalize(t)},kv=(t,e,r)=>{var[n,i]=e;return ue.isElement(n)&&m.isEmpty(t,n)||le.isText(n)&&n.text===""&&i[i.length-1]!==0},jv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var n,i,{reverse:s=!1,unit:a="character",distance:o=1,voids:u=!1}=r,{at:l=e.selection,hanging:f=!1}=r;if(l){var p=!1;if(q.isRange(l)&&q.isCollapsed(l)&&(p=!0,l=l.anchor),ye.isPoint(l)){var h=m.void(e,{at:l,mode:"highest"});if(!u&&h){var[,y]=h;l=y}else{var v={unit:a,distance:o},g=s?m.before(e,l,v)||m.start(e,[]):m.after(e,l,v)||m.end(e,[]);l={anchor:l,focus:g},f=!0}}if(L.isPath(l)){te.removeNodes(e,{at:l,voids:u});return}if(!q.isCollapsed(l)){if(!f){var[,d]=q.edges(l),D=m.end(e,[]);ye.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[E,B]=q.edges(l),w=m.above(e,{match:fe=>ue.isElement(fe)&&m.isBlock(e,fe),at:E,voids:u}),b=m.above(e,{match:fe=>ue.isElement(fe)&&m.isBlock(e,fe),at:B,voids:u}),x=w&&b&&!L.equals(w[1],b[1]),A=L.equals(E.path,B.path),U=u?null:(n=m.void(e,{at:E,mode:"highest"}))!==null&&n!==void 0?n:m.elementReadOnly(e,{at:E,mode:"highest"}),P=u?null:(i=m.void(e,{at:B,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:B,mode:"highest"});if(U){var H=m.before(e,E);H&&w&&L.isAncestor(w[1],H.path)&&(E=H)}if(P){var j=m.after(e,B);j&&b&&L.isAncestor(b[1],j.path)&&(B=j)}var M=[],W;for(var _ of m.nodes(e,{at:l,voids:u})){var[z,Y]=_;W&&L.compare(Y,W)===0||(!u&&ue.isElement(z)&&(m.isVoid(e,z)||m.isElementReadOnly(e,z))||!L.isCommon(Y,E.path)&&!L.isCommon(Y,B.path))&&(M.push(_),W=Y)}var V=Array.from(M,fe=>{var[,ce]=fe;return m.pathRef(e,ce)}),Q=m.pointRef(e,E),ie=m.pointRef(e,B),k="";if(!A&&!U){var G=Q.current,[$]=m.leaf(e,G),{path:R}=G,{offset:re}=E,F=$.text.slice(re);F.length>0&&(e.apply({type:"remove_text",path:R,offset:re,text:F}),k=F)}if(V.reverse().map(fe=>fe.unref()).filter(fe=>fe!==null).forEach(fe=>te.removeNodes(e,{at:fe,voids:u})),!P){var O=ie.current,[N]=m.leaf(e,O),{path:T}=O,I=A?E.offset:0,Z=N.text.slice(I,B.offset);Z.length>0&&(e.apply({type:"remove_text",path:T,offset:I,text:Z}),k=Z)}!A&&x&&ie.current&&Q.current&&te.mergeNodes(e,{at:ie.current,hanging:!0,voids:u}),p&&s&&a==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&te.insertText(e,k.slice(0,k.length-o));var ee=Q.unref(),J=ie.unref(),de=s?ee||J:J||ee;r.at==null&&de&&te.select(e,de)}}})},Iv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:s=!1}=n,{at:a=cs(e),batchDirty:o=!0}=n;if(r.length){if(q.isRange(a))if(i||(a=m.unhangRange(e,a,{voids:s})),q.isCollapsed(a))a=a.anchor;else{var[,u]=q.edges(a);if(!s&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);te.delete(e,{at:a}),a=l.unref()}else L.isPath(a)&&(a=m.start(e,a));if(!(!s&&m.void(e,{at:a}))){var f=m.above(e,{at:a,match:F=>ue.isElement(F)&&m.isInline(e,F),mode:"highest",voids:s});if(f){var[,p]=f;if(m.isEnd(e,a,p)){var h=m.after(e,p);a=h}else if(m.isStart(e,a,p)){var y=m.before(e,p);a=y}}var v=m.above(e,{match:F=>ue.isElement(F)&&m.isBlock(e,F),at:a,voids:s}),[,g]=v,d=m.isStart(e,a,g),D=m.isEnd(e,a,g),E=d&&D,B=!d||d&&D,w=!D,[,b]=se.first({children:r},[]),[,x]=se.last({children:r},[]),A=[],U=F=>{var[O,N]=F,T=N.length===0;return T?!1:E?!0:!(B&&L.isAncestor(N,b)&&ue.isElement(O)&&!e.isVoid(O)&&!e.isInline(O)||w&&L.isAncestor(N,x)&&ue.isElement(O)&&!e.isVoid(O)&&!e.isInline(O))};for(var P of se.nodes({children:r},{pass:U}))U(P)&&A.push(P);var H=[],j=[],M=[],W=!0,_=!1;for(var[z]of A)ue.isElement(z)&&!e.isInline(z)?(W=!1,_=!0,j.push(z)):W?H.push(z):M.push(z);var[Y]=m.nodes(e,{at:a,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s}),[,V]=Y,Q=m.isStart(e,a,V),ie=m.isEnd(e,a,V),k=m.pathRef(e,D&&!M.length?L.next(g):g),G=m.pathRef(e,ie?L.next(V):V);te.splitNodes(e,{at:a,match:F=>_?ue.isElement(F)&&m.isBlock(e,F):le.isText(F)||m.isInline(e,F),mode:_?"lowest":"highest",always:_&&(!d||H.length>0)&&(!D||M.length>0),voids:s});var $=m.pathRef(e,!Q||Q&&ie?L.next(V):V);if(te.insertNodes(e,H,{at:$.current,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s,batchDirty:o}),E&&!H.length&&j.length&&!M.length&&te.delete(e,{at:g,voids:s}),te.insertNodes(e,j,{at:k.current,match:F=>ue.isElement(F)&&m.isBlock(e,F),mode:"lowest",voids:s,batchDirty:o}),te.insertNodes(e,M,{at:G.current,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s,batchDirty:o}),!n.at){var R;if(M.length>0&&G.current?R=L.previous(G.current):j.length>0&&k.current?R=L.previous(k.current):$.current&&(R=L.previous($.current)),R){var re=m.end(e,R);te.select(e,re)}}$.unref(),k.unref(),G.unref()}}})},Nv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=r,{selection:i}=e;if(i){if(n==="anchor")te.select(e,i.anchor);else if(n==="focus")te.select(e,i.focus);else if(n==="start"){var[s]=q.edges(i);te.select(e,s)}else if(n==="end"){var[,a]=q.edges(i);te.select(e,a)}}else return},_v=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},zv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:i=1,unit:s="character",reverse:a=!1}=r,{edge:o=null}=r;if(n){o==="start"&&(o=q.isBackward(n)?"focus":"anchor"),o==="end"&&(o=q.isBackward(n)?"anchor":"focus");var{anchor:u,focus:l}=n,f={distance:i,unit:s,ignoreNonSelectable:!0},p={};if(o==null||o==="anchor"){var h=a?m.before(e,u,f):m.after(e,u,f);h&&(p.anchor=h)}if(o==null||o==="focus"){var y=a?m.before(e,l,f):m.after(e,l,f);y&&(p.focus=y)}te.setSelection(e,p)}},Wv=(t,e)=>{var{selection:r}=t;if(e=m.range(t,e),r){te.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat($e.stringify(e)));t.apply({type:"set_selection",properties:r,newProperties:e})};function $o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$o(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$o(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Hv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:s="both"}=n;if(i){s==="start"&&(s=q.isBackward(i)?"focus":"anchor"),s==="end"&&(s=q.isBackward(i)?"anchor":"focus");var{anchor:a,focus:o}=i,u=s==="anchor"?a:o;te.setSelection(e,{[s==="anchor"?"anchor":"focus"]:Jo(Jo({},u),r)})}},Uv=(t,e)=>{var{selection:r}=t,n={},i={};if(r){for(var s in e)(s==="anchor"&&e.anchor!=null&&!ye.equals(e.anchor,r.anchor)||s==="focus"&&e.focus!=null&&!ye.equals(e.focus,r.focus)||s!=="anchor"&&s!=="focus"&&e[s]!==r[s])&&(n[s]=r[s],i[s]=e[s]);Object.keys(n).length>0&&t.apply({type:"set_selection",properties:n,newProperties:i})}},Rv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:s=!1,mode:a="lowest",batchDirty:o=!0}=n,{at:u,match:l,select:f}=n;if(se.isNode(r)&&(r=[r]),r.length!==0){var[p]=r;if(u||(u=cs(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:s})),q.isCollapsed(u))u=u.anchor;else{var[,h]=q.edges(u),y=m.pointRef(e,h);te.delete(e,{at:u}),u=y.unref()}if(ye.isPoint(u)){l==null&&(le.isText(p)?l=H=>le.isText(H):e.isInline(p)?l=H=>le.isText(H)||m.isInline(e,H):l=H=>ue.isElement(H)&&m.isBlock(e,H));var[v]=m.nodes(e,{at:u.path,match:l,mode:a,voids:s});if(v){var[,g]=v,d=m.pathRef(e,g),D=m.isEnd(e,u,g);te.splitNodes(e,{at:u,match:l,mode:a,voids:s});var E=d.unref();u=D?L.next(E):E}else return}var B=L.parent(u),w=u[u.length-1];if(!(!s&&m.void(e,{at:B}))){if(o){var b=[],x=L.levels(B);xh(e,()=>{var H=function(){var W=B.concat(w);w++;var _={type:"insert_node",path:W,node:j};e.apply(_),u=L.next(u),b.push(_),le.isText?x.push(...Array.from(se.nodes(j),z=>{var[,Y]=z;return W.concat(Y)})):x.push(W)};for(var j of r)H()},()=>{_o(e,x,H=>{var j=H;for(var M of b)if(L.operationCanTransformPath(M)&&(j=L.transform(j,M),!j))return null;return j})})}else for(var A of r){var U=B.concat(w);w++,e.apply({type:"insert_node",path:U,node:A}),u=L.next(u)}if(u=L.previous(u),f){var P=m.end(e,u);P&&te.select(e,P)}}}})},Vv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:i="lowest",voids:s=!1}=r,{match:a}=r;if(a==null&&(a=L.isPath(n)?Lr(e,n):w=>ue.isElement(w)&&m.isBlock(e,w)),!!n){var o=m.nodes(e,{at:n,match:a,mode:i,voids:s}),u=Array.from(o,w=>{var[,b]=w;return m.pathRef(e,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 p=m.node(e,L.parent(f)),[h,y]=p,v=f[f.length-1],{length:g}=h.children;if(g===1){var d=L.next(y);te.moveNodes(e,{at:f,to:d,voids:s}),te.removeNodes(e,{at:y,voids:s})}else if(v===0)te.moveNodes(e,{at:f,to:y,voids:s});else if(v===g-1){var D=L.next(y);te.moveNodes(e,{at:f,to:D,voids:s})}else{var E=L.next(f),B=L.next(y);te.splitNodes(e,{at:E,voids:s}),te.moveNodes(e,{at:f,to:B,voids:s})}}}})},qv=["text"],Gv=["children"],Qo=(t,e)=>{if(ue.isElement(e)){var r=e;return m.isVoid(t,e)?!0:r.children.length===1?Qo(t,r.children[0]):!1}else return!m.isEditor(e)},Zv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:s=!1,voids:a=!1,mode:o="lowest"}=r;if(i){if(n==null)if(L.isPath(i)){var[u]=m.parent(e,i);n=H=>u.children.includes(H)}else n=H=>ue.isElement(H)&&m.isBlock(e,H);if(!s&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:a})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,l]=q.edges(i),f=m.pointRef(e,l);te.delete(e,{at:i}),i=f.unref(),r.at==null&&te.select(e,i)}var[p]=m.nodes(e,{at:i,match:n,voids:a,mode:o}),h=m.previous(e,{at:i,match:n,voids:a,mode:o});if(!(!p||!h)){var[y,v]=p,[g,d]=h;if(!(v.length===0||d.length===0)){var D=L.next(d),E=L.common(v,d),B=L.isSibling(v,d),w=Array.from(m.levels(e,{at:v}),H=>{var[j]=H;return j}).slice(E.length).slice(0,-1),b=m.above(e,{at:v,mode:"highest",match:H=>w.includes(H)&&Qo(e,H)}),x=b&&m.pathRef(e,b[1]),A,U;if(le.isText(y)&&le.isText(g)){var P=kt(y,qv);U=g.text.length,A=P}else if(ue.isElement(y)&&ue.isElement(g)){var P=kt(y,Gv);U=g.children.length,A=P}else throw new Error("Cannot merge the node at path [".concat(v,"] with the previous sibling because it is not the same kind: ").concat($e.stringify(y)," ").concat($e.stringify(g)));B||te.moveNodes(e,{at:v,to:D,voids:a}),x&&te.removeNodes(e,{at:x.current,voids:a}),m.shouldMergeNodesRemovePrevNode(e,h,p)?te.removeNodes(e,{at:d,voids:a}):e.apply({type:"merge_node",path:D,position:U,properties:A}),x&&x.unref()}}}})},Kv=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:r,at:n=t.selection,mode:i="lowest",voids:s=!1}=e,{match:a}=e;if(n){a==null&&(a=L.isPath(n)?Lr(t,n):y=>ue.isElement(y)&&m.isBlock(t,y));var o=m.pathRef(t,r),u=m.nodes(t,{at:n,match:a,mode:i,voids:s}),l=Array.from(u,y=>{var[,v]=y;return m.pathRef(t,v)});for(var f of l){var p=f.unref(),h=o.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),o.current&&L.isSibling(h,p)&&L.isAfter(h,p)&&(o.current=L.next(o.current))}o.unref()}})},Yv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:s="lowest"}=r,{at:a=e.selection,match:o}=r;if(a){o==null&&(o=L.isPath(a)?Lr(e,a):y=>ue.isElement(y)&&m.isBlock(e,y)),!n&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:i}));var u=m.nodes(e,{at:a,match:o,mode:s,voids:i}),l=Array.from(u,y=>{var[,v]=y;return m.pathRef(e,v)});for(var f of l){var p=f.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},Xv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:s=e.selection,compare:a,merge:o}=n,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:p=!1}=n;if(s){if(i==null&&(i=L.isPath(s)?Lr(e,s):U=>ue.isElement(U)&&m.isBlock(e,U)),!u&&q.isRange(s)&&(s=m.unhangRange(e,s,{voids:p})),f&&q.isRange(s)){if(q.isCollapsed(s)&&m.leaf(e,s.anchor)[0].text.length>0)return;var h=m.rangeRef(e,s,{affinity:"inward"}),[y,v]=q.edges(s),g=l==="lowest"?"lowest":"highest",d=m.isEnd(e,v,v.path);te.splitNodes(e,{at:v,match:i,mode:g,voids:p,always:!d});var D=m.isStart(e,y,y.path);te.splitNodes(e,{at:y,match:i,mode:g,voids:p,always:!D}),s=h.unref(),n.at==null&&te.select(e,s)}a||(a=(U,P)=>U!==P);for(var[E,B]of m.nodes(e,{at:s,match:i,mode:l,voids:p})){var w={},b={};if(B.length!==0){var x=!1;for(var A in r)A==="children"||A==="text"||a(r[A],E[A])&&(x=!0,E.hasOwnProperty(A)&&(w[A]=E[A]),o?r[A]!=null&&(b[A]=o(E[A],r[A])):r[A]!=null&&(b[A]=r[A]));x&&e.apply({type:"set_node",path:B,properties:w,newProperties:b})}}}})},$v=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,r]=q.edges(e),n=m.pointRef(t,r);return te.delete(t,{at:e}),n.unref()},Jv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection,height:o=0,always:u=!1}=r;if(s==null&&(s=ie=>ue.isElement(ie)&&m.isBlock(e,ie)),q.isRange(a)&&(a=$v(e,a)),L.isPath(a)){var l=a,f=m.point(e,l),[p]=m.parent(e,l);s=ie=>ie===p,o=f.path.length-l.length+1,a=f,u=!0}if(a){var h=m.pointRef(e,a,{affinity:"backward"}),y;try{var[v]=m.nodes(e,{at:a,match:s,mode:n,voids:i});if(!v)return;var g=m.void(e,{at:a,mode:"highest"}),d=0;if(!i&&g){var[D,E]=g;if(ue.isElement(D)&&e.isInline(D)){var B=m.after(e,E);if(!B){var w={text:""},b=L.next(E);te.insertNodes(e,w,{at:b,voids:i}),B=m.point(e,b)}a=B,u=!0}var x=a.path.length-E.length;o=x+1,u=!0}y=m.pointRef(e,a);var A=a.path.length-o,[,U]=v,P=a.path.slice(0,A),H=o===0?a.offset:a.path[A]+d;for(var[j,M]of m.levels(e,{at:P,reverse:!0,voids:i})){var W=!1;if(M.length<U.length||M.length===0||!i&&ue.isElement(j)&&m.isVoid(e,j))break;var _=h.current,z=m.isEnd(e,_,M);if(u||!h||!m.isEdge(e,_,M)){W=!0;var Y=se.extractProps(j);e.apply({type:"split_node",path:M,position:H,properties:Y})}H=M[M.length-1]+(W||z?1:0)}if(r.at==null){var V=y.current||m.end(e,[]);te.select(e,V)}}finally{var Q;h.unref(),(Q=y)===null||Q===void 0||Q.unref()}}})},Qv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var i={};for(var s of r)i[s]=null;te.setNodes(e,i,n)},eg=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:s=!1}=r,{at:a=e.selection,match:o}=r;if(a){o==null&&(o=L.isPath(a)?Lr(e,a):y=>ue.isElement(y)&&m.isBlock(e,y)),L.isPath(a)&&(a=m.range(e,a));var u=q.isRange(a)?m.rangeRef(e,a):null,l=m.nodes(e,{at:a,match:o,mode:n,voids:s}),f=Array.from(l,y=>{var[,v]=y;return m.pathRef(e,v)}).reverse(),p=function(){var v=h.unref(),[g]=m.node(e,v),d=m.range(e,v);i&&u&&(d=q.intersection(u.current,d)),te.liftNodes(e,{at:d,match:D=>ue.isAncestor(g)&&g.children.includes(D),voids:s})};for(var h of f)p();u&&u.unref()}})};function eu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var tg=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:s=!1,voids:a=!1}=n,{match:o,at:u=e.selection}=n;if(u){if(o==null&&(L.isPath(u)?o=Lr(e,u):e.isInline(r)?o=d=>ue.isElement(d)&&m.isInline(e,d)||le.isText(d):o=d=>ue.isElement(d)&&m.isBlock(e,d)),s&&q.isRange(u)){var[l,f]=q.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});te.splitNodes(e,{at:f,match:o,voids:a}),te.splitNodes(e,{at:l,match:o,voids:a}),u=p.unref(),n.at==null&&te.select(e,u)}var h=Array.from(m.nodes(e,{at:u,match:e.isInline(r)?d=>ue.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:a})),y=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,g)):u;if(!D)return 0;var E=Array.from(m.nodes(e,{at:D,match:o,mode:i,voids:a}));if(E.length>0){var[B]=E,w=E[E.length-1],[,b]=B,[,x]=w;if(b.length===0&&x.length===0)return 0;var A=L.equals(b,x)?L.parent(b):L.common(b,x),U=m.range(e,b,x),P=m.node(e,A),[H]=P,j=A.length+1,M=L.next(x.slice(0,j)),W=tu(tu({},r),{},{children:[]});te.insertNodes(e,W,{at:M,voids:a}),te.moveNodes(e,{at:U,match:_=>ue.isAncestor(H)&&H.children.includes(_),to:M.concat(0),voids:a})}},v;for(var[,g]of h)v=y()}})},rg=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Bh(t,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Th(t,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jh(t,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ih(t,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Nh(t,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ah(t,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Kh(t,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Xh(t,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Iv(t,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Yh(t,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Jh(t,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Lh(t,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Av(t,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Sh(t,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ph(t,...n)},above:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Fh(t,...n)},after:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Mh(t,...n)},before:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kh(t,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Nv(t,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jv(t,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _v(t,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _h(t,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zh(t,...n)},end:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Wh(t,...n)},first:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Hh(t,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Uh(t,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cv(t,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Vh(t,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return qh(t,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Gh(t,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Zh(t,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Rv(t,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Qh(t,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ev(t,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tv(t,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return rv(t,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return nv(t,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return iv(t,...n)},last:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return sv(t,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return av(t,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ov(t,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Vv(t,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Zv(t,...n)},move:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zv(t,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Kv(t,...n)},next:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fv(t,...n)},node:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dv(t,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pv(t,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hv(t,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vv(t,...n)},path:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yv(t,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gv(t,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mv(t,...n)},point:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Dv(t,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Cv(t,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bv(t,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ev(t,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wv(t,...n)},range:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Bv(t,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ov(t,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xv(t,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Yv(t,...n)},select:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Wv(t,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Xv(t,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Lv(t,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Hv(t,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Uv(t,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Jv(t,...n)},start:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Pv(t,...n)},string:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Fv(t,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Tv(t,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Qv(t,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return eg(t,...n)},void:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Rh(t,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Mv(t,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tg(t,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kv(t,...n)}};return t};const ru=t=>{if(le.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=>ru(n)).join(""),r=t.align||"left";switch(t.type){case"image":return`<img src="${t.src}" class="align_${r}" />`;case"paragraph":return`<p class="align_${r}">${e}</p>`;case"blockQuote":return`<blockquote class="align_${r}">${e}</blockquote>`;case"bulletedList":return`<ul class="align_${r}">${e}</ul>`;case"headingOne":return`<h1 class="align_${r}">${e}</h1>`;case"headingTwo":return`<h2 class="align_${r}">${e}</h2>`;case"listItem":return`<li class="align_${r}">${e}</li>`;case"numberedList":return`<ol class="align_${r}">${e}</ol>`;default:return e}}return""},ng=t=>t.map(e=>ru(e)).join("");var nu={},ps={},hs={};Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=og;var iu="html",su="head",Rn="body",ig=/<([a-zA-Z]+[0-9]?)/,au=/<head[^]*>/i,ou=/<body[^]*>/i,Vn=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},vs=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},uu=typeof window=="object"&&window.DOMParser;if(typeof uu=="function"){var sg=new uu,ag="text/html";vs=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),sg.parseFromString(t,ag)},Vn=vs}if(typeof document=="object"&&document.implementation){var qn=document.implementation.createHTMLDocument();Vn=function(t,e){if(e){var r=qn.documentElement.querySelector(e);return r&&(r.innerHTML=t),qn}return qn.documentElement.innerHTML=t,qn}}var Gn=typeof document=="object"&&document.createElement("template"),gs;Gn&&Gn.content&&(gs=function(t){return Gn.innerHTML=t,Gn.content.childNodes});function og(t){var e,r,n=t.match(ig),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case iu:{var s=vs(t);if(!au.test(t)){var a=s.querySelector(su);(e=a==null?void 0:a.parentNode)===null||e===void 0||e.removeChild(a)}if(!ou.test(t)){var a=s.querySelector(Rn);(r=a==null?void 0:a.parentNode)===null||r===void 0||r.removeChild(a)}return s.querySelectorAll(iu)}case su:case Rn:{var o=Vn(t).querySelectorAll(i);return ou.test(t)&&au.test(t)?o[0].parentNode.childNodes:o}default:{if(gs)return gs(t);var a=Vn(t,Rn).querySelector(Rn);return a.childNodes}}}var Zn={},ms={},ys={};(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(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function r(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}t.isTag=r,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})(ys);var be={},Ut=ke&&ke.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qr=ke&&ke.__assign||function(){return Qr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Qr.apply(this,arguments)};Object.defineProperty(be,"__esModule",{value:!0}),be.cloneNode=be.hasChildren=be.isDocument=be.isDirective=be.isComment=be.isText=be.isCDATA=be.isTag=be.Element=be.Document=be.CDATA=be.NodeWithChildren=be.ProcessingInstruction=be.Comment=be.Text=be.DataNode=be.Node=void 0;var dt=ys,Cs=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),bs(this,e)},t}();be.Node=Cs;var Kn=function(t){Ut(e,t);function e(r){var n=t.call(this)||this;return n.data=r,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),e}(Cs);be.DataNode=Kn;var lu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Text,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(Kn);be.Text=lu;var cu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Comment,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(Kn);be.Comment=cu;var fu=function(t){Ut(e,t);function e(r,n){var i=t.call(this,n)||this;return i.name=r,i.type=dt.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(Kn);be.ProcessingInstruction=fu;var Yn=function(t){Ut(e,t);function e(r){var n=t.call(this)||this;return n.children=r,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r: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(r){this.children=r},enumerable:!1,configurable:!0}),e}(Cs);be.NodeWithChildren=Yn;var du=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Yn);be.CDATA=du;var pu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Yn);be.Document=pu;var hu=function(t){Ut(e,t);function e(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?dt.ElementType.Script:r==="style"?dt.ElementType.Style:dt.ElementType.Tag);var a=t.call(this,i)||this;return a.name=r,a.attribs=n,a.type=s,a}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(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),e}(Yn);be.Element=hu;function vu(t){return(0,dt.isTag)(t)}be.isTag=vu;function gu(t){return t.type===dt.ElementType.CDATA}be.isCDATA=gu;function mu(t){return t.type===dt.ElementType.Text}be.isText=mu;function yu(t){return t.type===dt.ElementType.Comment}be.isComment=yu;function Cu(t){return t.type===dt.ElementType.Directive}be.isDirective=Cu;function bu(t){return t.type===dt.ElementType.Root}be.isDocument=bu;function ug(t){return Object.prototype.hasOwnProperty.call(t,"children")}be.hasChildren=ug;function bs(t,e){e===void 0&&(e=!1);var r;if(mu(t))r=new lu(t.data);else if(yu(t))r=new cu(t.data);else if(vu(t)){var n=e?Ds(t.children):[],i=new hu(t.name,Qr({},t.attribs),n);n.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=Qr({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=Qr({},t["x-attribsPrefix"])),r=i}else if(gu(t)){var n=e?Ds(t.children):[],s=new du(n);n.forEach(function(l){return l.parent=s}),r=s}else if(bu(t)){var n=e?Ds(t.children):[],a=new pu(n);n.forEach(function(l){return l.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(Cu(t)){var o=new fu(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}be.cloneNode=bs;function Ds(t){for(var e=t.map(function(n){return bs(n,!0)}),r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}(function(t){var e=ke&&ke.__createBinding||(Object.create?function(o,u,l,f){f===void 0&&(f=l);var p=Object.getOwnPropertyDescriptor(u,l);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(o,f,p)}:function(o,u,l,f){f===void 0&&(f=l),o[f]=u[l]}),r=ke&&ke.__exportStar||function(o,u){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,o,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var n=ys,i=be;r(be,t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function o(u,l,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=s),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??s,this.elementCB=f??null}return o.prototype.onparserinit=function(u){this.parser=u},o.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},o.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},o.prototype.onerror=function(u){this.handleCallback(u)},o.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},o.prototype.onopentag=function(u,l){var f=this.options.xmlMode?n.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,f);this.addNode(p),this.tagStack.push(p)},o.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===n.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},o.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},o.prototype.oncommentend=function(){this.lastNode=null},o.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},o.prototype.oncdataend=function(){this.lastNode=null},o.prototype.onprocessinginstruction=function(u,l){var f=new i.ProcessingInstruction(u,l);this.addNode(f)},o.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},o.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},o}();t.DomHandler=a,t.default=a})(ms);var Du={};(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,r){return e[r.toLowerCase()]=r,e},{})})(Du),Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.formatAttributes=Eu,Zn.formatDOM=wu;var Xn=ms,lg=Du;function cg(t){return lg.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Eu(t){for(var e={},r=0,n=t.length;r<n;r++){var i=t[r];e[i.name]=i.value}return e}function fg(t){t=t.toLowerCase();var e=cg(t);return e||t}function wu(t,e,r){e===void 0&&(e=null);for(var n=[],i,s=0,a=t.length;s<a;s++){var o=t[s];switch(o.nodeType){case 1:{var u=fg(o.nodeName);i=new Xn.Element(u,Eu(o.attributes)),i.children=wu(u==="template"?o.content.childNodes:o.childNodes,i);break}case 3:i=new Xn.Text(o.nodeValue);break;case 8:i=new Xn.Comment(o.nodeValue);break;default:continue}var l=n[s-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,n.push(i)}return r&&(i=new Xn.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),i.next=n[0]||null,i.parent=e,n.unshift(i),n[1]&&(n[1].prev=n[0])),n}var dg=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=gg;var pg=dg(hs),hg=Zn,vg=/<(![a-zA-Z\s]+)>/;function gg(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(vg),r=e?e[1]:void 0;return(0,hg.formatDOM)((0,pg.default)(t),null,r)}var $n={},xt={},Jn={},mg=0;Jn.SAME=mg;var yg=1;Jn.CAMELCASE=yg,Jn.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 Ou=0,Rt=1,Qn=2,ei=3,Es=4,xu=5,Bu=6;function Cg(t){return tt.hasOwnProperty(t)?tt[t]:null}function at(t,e,r,n,i,s,a){this.acceptsBooleans=e===Qn||e===ei||e===Es,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}const tt={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{tt[t]=new at(t,Ou,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{tt[t]=new at(t,Rt,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{tt[t]=new at(t,Qn,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{tt[t]=new at(t,Qn,!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=>{tt[t]=new at(t,ei,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{tt[t]=new at(t,ei,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{tt[t]=new at(t,Es,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{tt[t]=new at(t,Bu,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{tt[t]=new at(t,xu,!1,t.toLowerCase(),null,!1,!1)});const ws=/[\-\:]([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(ws,Os);tt[e]=new at(e,Rt,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(ws,Os);tt[e]=new at(e,Rt,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(ws,Os);tt[e]=new at(e,Rt,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{tt[t]=new at(t,Rt,!1,t.toLowerCase(),null,!1,!1)});const bg="xlinkHref";tt[bg]=new at("xlinkHref",Rt,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{tt[t]=new at(t,Rt,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:Dg,SAME:Eg,possibleStandardNames:Su}=Jn,wg=":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",Og=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+wg+"]*$")),xg=Object.keys(Su).reduce((t,e)=>{const r=Su[e];return r===Eg?t[e]=e:r===Dg?t[e.toLowerCase()]=e:t[e]=r,t},{});xt.BOOLEAN=ei,xt.BOOLEANISH_STRING=Qn,xt.NUMERIC=xu,xt.OVERLOADED_BOOLEAN=Es,xt.POSITIVE_NUMERIC=Bu,xt.RESERVED=Ou,xt.STRING=Rt,xt.getPropertyInfo=Cg,xt.isCustomAttribute=Og,xt.possibleStandardNames=xg;var xs={},Bs={},Au=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Bg=/\n/g,Sg=/^\s*/,Ag=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Lg=/^:\s*/,Pg=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Fg=/^[;\s]*/,Tg=/^\s+|\s+$/g,Mg=`
36
- `,Lu="/",Pu="*",pr="",kg="comment",jg="declaration",Ig=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(Bg);g&&(r+=g.length);var d=v.lastIndexOf(Mg);n=~d?v.length-d:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new a(v),l(),g}}function a(v){this.start=v,this.end={line:r,column:n},this.source=e.source}a.prototype.content=t;function o(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function u(v){var g=v.exec(t);if(g){var d=g[0];return i(d),t=t.slice(d.length),g}}function l(){u(Sg)}function f(v){var g;for(v=v||[];g=p();)g!==!1&&v.push(g);return v}function p(){var v=s();if(!(Lu!=t.charAt(0)||Pu!=t.charAt(1))){for(var g=2;pr!=t.charAt(g)&&(Pu!=t.charAt(g)||Lu!=t.charAt(g+1));)++g;if(g+=2,pr===t.charAt(g-1))return o("End of comment missing");var d=t.slice(2,g-2);return n+=2,i(d),t=t.slice(g),n+=2,v({type:kg,comment:d})}}function h(){var v=s(),g=u(Ag);if(g){if(p(),!u(Lg))return o("property missing ':'");var d=u(Pg),D=v({type:jg,property:Fu(g[0].replace(Au,pr)),value:d?Fu(d[0].replace(Au,pr)):pr});return u(Fg),D}}function y(){var v=[];f(v);for(var g;g=h();)g!==!1&&(v.push(g),f(v));return v}return l(),y()};function Fu(t){return t?t.replace(Tg,pr):pr}var Ng=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=zg;var _g=Ng(Ig);function zg(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,_g.default)(t),i=typeof e=="function";return n.forEach(function(s){if(s.type==="declaration"){var a=s.property,o=s.value;i?e(a,o,s):o&&(r=r||{},r[a]=o)}}),r}var ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.camelCase=void 0;var Wg=/^--[a-zA-Z0-9_-]+$/,Hg=/-([a-z])/g,Ug=/^[^-]+$/,Rg=/^-(webkit|moz|ms|o|khtml)-/,Vg=/^-(ms)-/,qg=function(t){return!t||Ug.test(t)||Wg.test(t)},Gg=function(t,e){return e.toUpperCase()},Tu=function(t,e){return"".concat(e,"-")},Zg=function(t,e){return e===void 0&&(e={}),qg(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(Vg,Tu):t=t.replace(Rg,Tu),t.replace(Hg,Gg))};ti.camelCase=Zg;var Kg=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Yg=Kg(Bs),Xg=ti;function Ss(t,e){var r={};return!t||typeof t!="string"||(0,Yg.default)(t,function(n,i){n&&i&&(r[(0,Xg.camelCase)(n,e)]=i)}),r}Ss.default=Ss;var $g=Ss;(function(t){var e=ke&&ke.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=s,t.setStyleProp=o;var r=c,n=e($g),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(f,p){return f.includes("-")?!i.has(f):!!(p&&typeof p.is=="string")}var a={reactCompat:!0};function o(f,p){if(typeof f=="string"){if(!f.trim()){p.style={};return}try{p.style=(0,n.default)(f,a)}catch{p.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(xs),Object.defineProperty($n,"__esModule",{value:!0}),$n.default=tm;var en=xt,Mu=xs,Jg=["checked","value"],Qg=["input","select","textarea"],em={reset:!0,submit:!0};function tm(t,e){t===void 0&&(t={});var r={},n=!!(t.type&&em[t.type]);for(var i in t){var s=t[i];if((0,en.isCustomAttribute)(i)){r[i]=s;continue}var a=i.toLowerCase(),o=ku(a);if(o){var u=(0,en.getPropertyInfo)(o);switch(Jg.includes(o)&&Qg.includes(e)&&!n&&(o=ku("default"+a)),r[o]=s,u&&u.type){case en.BOOLEAN:r[o]=!0;break;case en.OVERLOADED_BOOLEAN:s===""&&(r[o]=!0);break}continue}Mu.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,Mu.setStyleProp)(t.style,r),r}function ku(t){return en.possibleStandardNames[t]}var As={},rm=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(As,"__esModule",{value:!0}),As.default=ju;var Ls=c,nm=rm($n),tn=xs,im={cloneElement:Ls.cloneElement,createElement:Ls.createElement,isValidElement:Ls.isValidElement};function ju(t,e){e===void 0&&(e={});for(var r=[],n=typeof e.replace=="function",i=e.transform||tn.returnFirstArg,s=e.library||im,a=s.cloneElement,o=s.createElement,u=s.isValidElement,l=t.length,f=0;f<l;f++){var p=t[f];if(n){var h=e.replace(p,f);if(u(h)){l>1&&(h=a(h,{key:h.key||f})),r.push(i(h,p,f));continue}}if(p.type==="text"){var y=!p.data.trim().length;if(y&&p.parent&&!(0,tn.canTextBeChildOfNode)(p.parent)||e.trim&&y)continue;r.push(i(p.data,p,f));continue}var v=p,g={};sm(v)?((0,tn.setStyleProp)(v.attribs.style,v.attribs),g=v.attribs):v.attribs&&(g=(0,nm.default)(v.attribs,v.name));var d=void 0;switch(p.type){case"script":case"style":p.children[0]&&(g.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?g.defaultValue=p.children[0].data:p.children&&p.children.length&&(d=ju(p.children,e));break;default:continue}l>1&&(g.key=f),r.push(i(o(p.name,g,d),p,f))}return r.length===1?r[0]:r}function sm(t){return tn.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,tn.isCustomComponent)(t.name,t.attribs)}(function(t){var e=ke&&ke.__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=o;var r=e(ps);t.htmlToDOM=r.default;var n=e($n);t.attributesToProps=n.default;var i=e(As);t.domToReact=i.default;var s=ms;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1};function o(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,r.default)(u,(l==null?void 0:l.htmlparser2)||a),l):[]}})(nu);const Iu=Pn(nu),am=Iu.default||Iu,Ps=t=>{var n;if(typeof t=="string")return{text:t};const e=Array.isArray(t.props.children)?t.props.children.map(i=>Ps(i)):[{text:t.props.children||""}],r=(n=t.props.className)==null?void 0:n.replace("align_","");switch(t.type){case"img":return{type:"image",align:r,src:t.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:r,children:e};case"blockquote":return{type:"blockQuote",align:r,children:e};case"ul":return{type:"bulletedList",align:r,children:e};case"ol":return{type:"numberedList",align:r,children:e};case"li":return{type:"listItem",align:r,children:e};case"h1":return{type:"headingOne",align:r,children:e};case"h2":return{type:"headingTwo",align:r,children:e};case"strong":return{text:t.props.children,bold:!0};case"code":return{text:t.props.children,code:!0};case"em":return{text:t.props.children,italic:!0};case"u":return{text:t.props.children,underline:!0};default:return{text:t.props.children||""}}},om=t=>{const e=am(t);return Array.isArray(e)?e.map(r=>typeof r=="string"?{text:r}:Ps(r)):typeof e=="string"?[{text:e}]:[Ps(e)]},um=t=>/<\/?[a-z][\s\S]*>/i.test(t);function Fs(t,e,r){if(!t)return C.jsx(C.Fragment,{});if(typeof t=="string")return C.jsx("p",{className:r,children:t});const n=t;return C.jsx("p",{className:r,children:C.jsx(n,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function lm(t){const{variant:e="ghost",scheme:r="primary",size:n="md",leftIcon:i,rightIcon:s,className:a="",children:o,...u}=t,f={md:12,lg:14}[n],p=`arkynBadge ${e} ${r} ${n} ${a}`;return C.jsxs("div",{className:p.trim(),...u,children:[Fn(f,i),o,Fn(f,i)]})}function cm(t){const{className:e,...r}=t,n=`arkynCard ${e}`;return C.jsx("div",{className:n.trim(),...r})}function fm(t){const{className:e,orientation:r="horizontal",...n}=t,i=`arkynDivider ${r} ${e}`;return C.jsx("div",{className:i.trim(),...n})}function dm(t){const{className:e,...r}=t,n=`arkynSkeleton ${e}`;return C.jsx("aside",{className:n.trim(),...r})}function pm(t){const{emptyMessage:e="Nenhum dado adicionado.",className:r,children:n,...i}=t,s=`arkynTableBody ${r}`,a=c.Children.count(n)===0;return C.jsx("tbody",{className:s.trim(),...i,children:a?C.jsx("tr",{className:"arkynTableBodyEmptyLine",children:C.jsx("td",{colSpan:100,children:C.jsx("div",{children:e})})}):n})}function hm(t){const{className:e,children:r,...n}=t,i=`arkynTableCaption ${e}`;return C.jsx("caption",{className:i.trim(),...n,children:C.jsx("div",{className:"arkynTableCaptionContent",children:r})})}function vm(t){const{children:e,className:r,...n}=t,i=`arkynTableContainer ${r}`;return C.jsx("div",{className:i.trim(),...n,children:C.jsx("table",{children:e})})}function gm(t){const{className:e,children:r,...n}=t,i=`arkynTableFooter ${e}`;return C.jsxs("tfoot",{className:i.trim(),...n,children:[C.jsx("tr",{className:"spacingRow"}),C.jsx("tr",{children:C.jsx("th",{colSpan:100,children:C.jsx("div",{className:"arkynTableFooterContent",children:r})})})]})}function mm(t){const{className:e,children:r,...n}=t,i=`arkynTableHeader ${e}`;return C.jsxs("thead",{className:i.trim(),...n,children:[C.jsx("tr",{children:r}),C.jsx("tr",{className:"spacingRow"})]})}function rn(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",loadingText:i,size:s="md",leftIcon:a,rightIcon:o,disabled:u,className:l="",children:f,...p}=t,y={xs:12,sm:16,md:20,lg:24}[s],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${n} ${r} ${s} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return C.jsxs("button",{className:d,disabled:u||e,...p,children:[C.jsxs("div",{className:"arkynButtonSpinner",children:[C.jsx(he.Loader2,{size:y,strokeWidth:2.5}),i&&i]}),C.jsxs("div",{className:"arkynButtonContent",children:[Fn(y,a),f,Fn(y,o)]})]})}function Ts(){const t=At.useActionData(),e=At.useNavigation(),r=At.useFetchers(),[n,i]=c.useState(null);function s(l,f){return JSON.stringify(l)===JSON.stringify(f)}function a(){n&&i(null)}c.useEffect(()=>{var f,p;let l=((p=(f=r[0])==null?void 0:f.data)==null?void 0:p.fieldErrors)||{};s(n,l)||Object.entries(l).length!==0&&i(l)},[r,t]),c.useEffect(()=>{var l;((l=r[0])==null?void 0:l.state)==="submitting"&&a()},[r,e]);const o=(t==null?void 0:t.fieldErrors)||n;let u={};return Object.entries(o||{}).forEach(([l,f])=>{typeof f=="string"&&typeof l=="string"&&(u[l]=f)}),u}const Nu=c.createContext({});function Ms(t){var p;const{children:e,className:r,id:n,...i}=t,s=Ts(),a=c.useRef(null),o=((p=a.current)==null?void 0:p.name)||"",u=(s==null?void 0:s[o])||null,l=c.useId(),f=`arkynFormController ${r}`;return C.jsx(Nu.Provider,{value:{error:u,id:l,inputRef:a},children:C.jsx("section",{id:n||o||void 0,className:f.trim(),...i,children:e})})}function ot(){return c.useContext(Nu)}function ym(t){const{name:e,className:r="",size:n="md",isError:i,defaultChecked:s=!1,checked:a=null,onCheck:o,value:u,...l}=t,{id:f,inputRef:p,error:h}=ot(),y=i||!!h,[v,g]=c.useState(s||!1),d=typeof a=="boolean"?a:v,B=`arkynCheckbox ${n} ${y?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${r}`;function w(){const b=v;g(!b),o&&o(b?"":u||"checked")}return C.jsxs("button",{id:f,type:"button",className:B,onClick:w,...l,children:[C.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),C.jsx(he.Check,{})]})}function Cm(t){const{children:e,className:r,...n}=t,i=`arkynFormError ${r}`,{error:s}=ot();return e?C.jsx("strong",{className:i.trim(),...n,children:e}):s?C.jsx("strong",{className:i.trim(),...n,children:s}):C.jsx(C.Fragment,{})}function ks(t){const{showAsterisk:e=!1,className:r="",...n}=t,{id:i}=ot(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${r}`;return C.jsx("label",{className:a.trim(),htmlFor:i,...n})}function _u(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",size:i="md",icon:s,disabled:a,className:o="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${n} ${r} ${i} ${e?"loadingTrue":"loadingFalse"} ${o}`;return C.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[C.jsx("div",{className:"arkynIconButtonSpinner",children:C.jsx(he.Loader2,{size:l[i],strokeWidth:2.5})}),C.jsx("div",{className:"arkynIconButtonContent",children:C.jsx(s,{size:l[i],strokeWidth:2.5})})]})}function zu(t){const{text:e,size:r="lg",children:n,orientation:i="top",className:s="",...a}=t,o=`arkynTooltip ${r} ${i} ${s}`;return C.jsxs("div",{className:o.trim(),...a,children:[n,C.jsx("div",{className:"arkynTooltipText",children:e})]})}function bm(t){const{filePath:e,isLoading:r,acceptImage:n,changeImageButtonText:i,handleSelectFile:s,reSendImage:a}=t;function o(){const u=document.createElement("input");u.type="file",u.accept=n,u.onchange=l=>{var p;const f=(p=l.target.files)==null?void 0:p[0];f&&s(f)},u.click()}return C.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${e}")`},children:[a&&C.jsx(zu,{orientation:"bottom",text:"Reenviar imagem",children:C.jsx(_u,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:r,onClick:a,icon:he.RefreshCw})}),C.jsx(rn,{isLoading:r,onClick:o,variant:"outline",size:"sm",type:"button",children:i})]})}function Dm(t){const{error:e}=t,r="arkynImageUploadError";return e?C.jsx("strong",{className:r,children:e}):C.jsx(C.Fragment,{})}function Em(t){const{label:e,showAsterisk:r}=t,i=`arkynImageUploadLabel ${r?"asteriskTrue":"asteriskFalse"}`;return C.jsx("strong",{className:i.trim(),children:e})}function wm(t){const{dropImageText:e,isLoading:r,acceptImage:n,handleSelectFile:i,selectImageButtonText:s}=t;function a(u){u.preventDefault();const l=u.dataTransfer.files[0];l&&i(l)}function o(){const u=document.createElement("input");u.type="file",u.accept=n,u.onchange=l=>{var p;const f=(p=l.target.files)==null?void 0:p[0];f&&i(f)},u.click()}return C.jsxs("div",{onDrop:a,className:"arkynImageUploadNoFileContent",children:[C.jsx(rn,{isLoading:r,onClick:o,variant:"ghost",size:"sm",type:"button",children:s}),C.jsx("p",{children:e})]})}function Wu(t){const{name:e,defaultValue:r="",label:n,showAsterisk:i=!1,action:s,fileName:a="file",method:o="POST",acceptImage:u="image/*",fileResponseName:l="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:p="Selecionar imagem",dropImageText:h="Ou arraste e solte a imagem aqui",onUpload:y}=t,g=Ts()[e],[d,D]=c.useState(r),[E,B]=c.useState(""),[w,b]=c.useState(null),[x,A]=c.useState(r),[U,P]=c.useState(!1);async function H(Y){P(!0),b(Y),B("");const V=new FormData;V.append(a,Y),await fetch(s,{method:o,body:V}).then(async Q=>await Q.json()).then(Q=>{Q!=null&&Q.error?B(Q.error):D(Q==null?void 0:Q[l]),y&&y(Q==null?void 0:Q[l])}).catch(Q=>{console.error(Q),B("Erro ao enviar imagem")}).finally(()=>P(!1))}function j(Y){A(URL.createObjectURL(Y)),H(Y)}const M=g||E,z=`arkynImageUpload ${M?"hasError":"noHasError"} ${x?"hasImage":"noHasImage"}`;return C.jsxs("div",{className:"arkynImageUploadContainer",children:[n&&C.jsx(Em,{label:n,showAsterisk:i}),C.jsxs("div",{className:z,children:[C.jsx("input",{type:"hidden",name:e,value:d||""}),!x&&C.jsx(wm,{isLoading:U,acceptImage:u,dropImageText:h,handleSelectFile:j,selectImageButtonText:p}),x&&C.jsx(bm,{isLoading:U,acceptImage:u,filePath:x,handleSelectFile:j,changeImageButtonText:f,reSendImage:M&&w?()=>H(w):void 0})]}),M&&C.jsx(Dm,{error:M})]})}function Vt(t,e,r){if(!t)return C.jsx(C.Fragment,{});if(typeof t=="string")return C.jsx("p",{className:r,children:t});const n=t;return C.jsx("p",{className:r,children:C.jsx(n,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function js(t){return t&&t.replace(/[^0-9]/g,"")}function Hu(t,e){let r="",n=0;return Array.from(t).forEach((i,s)=>{e[s+n].match(/[0-9]/)||(r+=e[s+n],n++),r+=i}),r}function Uu(t){return t.length>11?"CNPJ":"CPF"}const Is={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Ru=js(Is.CNPJ).length;function Om(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,defaultValue:h,readOnly:y,onFocus:v,onBlur:g,title:d,style:D,onChange:E,...B}=t;function w(_){let z=js(_);const Y=Uu(z);if(!(z.length>Ru))return z=Hu(z,Is[Y]),z}const b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||y||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,W={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,W,"prefix"),sufix:Vt(u,W,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:w(h||""),disabled:p,readOnly:y,onFocus:v,onBlur:g,title:d,style:D,onChange:E,loadingPosition:b,iconSize:W,Spinner:C.jsx(he.Loader2,{className:"spinner",size:W,strokeWidth:2.5}),...B}}function xm(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,Spinner:A,onChange:U,value:P,defaultValue:H,...j}=Om({...t,id:s,isError:u},e),[M,W]=c.useState(H),_=E&&!D,z=x&&!D,Y=d==="left"&&D,V=d==="right"&&D;function Q(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function ie($){let R=js($.target.value);const re=Uu(R);R.length>Ru||(R=Hu(R,Is[re]),$.target.value=R,W(R),U&&U($))}function k($){r(!0),w&&w($)}function G($){r(!1),b&&b($)}return C.jsxs("section",{title:f,style:p,onClick:Q,className:h,children:[y,Y&&A,_&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx("input",{disabled:l||D,readOnly:B,ref:o,value:P||M,onFocus:k,onChange:ie,onBlur:G,...j}),z&&C.jsx(x,{size:g,strokeWidth:2.5}),V&&A,v]})}const Bm=3,Sm=(t="pt-BR",e,r="BRL",n=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:r,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(n?Bm:0),ri=2,Vu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),Ns=t=>{let e=t;return typeof t=="string"?(e=Vu(t),e%1!==0&&(e=e.toFixed(ri))):e=Number.isInteger(t)?Number(t)*10**ri:t.toFixed(ri),Vu(e)/10**ri},qu=(t,e,r)=>{if(!e)return[0,""];const n=Ns(e),i=Sm(t,n,r);return[n,i]};function Am(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,max:D=1e9,locale:E="pt-BR",currency:B="BRL",...w}=t,b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,W={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,W,"prefix"),sufix:Vt(u,W,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,locale:E,currency:B,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,max:D,loadingPosition:b,iconSize:W,Spinner:C.jsx(he.Loader2,{className:"spinner",size:W,strokeWidth:2.5}),...w}}function Lm(t){const[e,r]=c.useState(!1),[n,i]=c.useState("0"),s=c.useRef(null),{inputRef:a,id:o,error:u}=ot(),l=a||s,f=t.isError||!!u,{disabled:p,title:h,style:y,className:v,prefix:g,sufix:d,iconSize:D,loadingPosition:E,isLoading:B,LeftIcon:w,readOnly:b,onFocus:x,onBlur:A,RightIcon:U,Spinner:P,value:H,max:j,onChangeValue:M,onKeyPress:W,currency:_,locale:z,name:Y,defaultValue:V,...Q}=Am({...t,id:o,isError:f},e),ie=w&&!B,k=U&&!B,G=E==="left"&&B,$=E==="right"&&B;function R(){p||!(l!=null&&l.current)||(r(!0),l.current.focus())}function re(I){r(!0),x&&x(I)}function F(I){r(!1),A&&A(I)}const O=I=>{const[Z,ee]=qu(z,I,_);return!j||Z<=j?(i(ee),[Z,ee]):[Ns(n),n]},N=I=>{I.preventDefault();const[Z,ee]=O(I.target.value);M&&M(I,String(Z),String(ee))},T=I=>W&&W(I,I.key,I.key);return c.useEffect(()=>{const I=H||+V||void 0,[,Z]=qu(z,I,_);i(Z)},[_,V,H]),C.jsxs("section",{title:h,style:y,onClick:R,className:v,children:[g,G&&P,ie&&C.jsx(w,{size:D,strokeWidth:2.5}),C.jsx("input",{value:n,onChange:N,onBlur:F,onFocus:re,onKeyUp:T,disabled:p||B,readOnly:b,...Q}),C.jsx("input",{type:"hidden",ref:l,name:Y,value:Ns(n)}),$&&P,k&&C.jsx(U,{size:D,strokeWidth:2.5}),d]})}function Pm(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,showMask:E=!1,type:B,...w}=t,b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,W={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,W,"prefix"),sufix:Vt(u,W,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,loadingPosition:b,iconSize:W,showMask:E,Spinner:C.jsx(he.Loader2,{className:"spinner",size:W,strokeWidth:2.5}),...w}}const Fm=c.forwardRef((t,e)=>C.jsx("input",{ref:e,...t}));function Tm(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,Spinner:A,...U}=Pm({...t,id:s,isError:u},e),P=E&&!D,H=x&&!D,j=d==="left"&&D,M=d==="right"&&D;function W(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function _(Y){r(!0),w&&w(Y)}function z(Y){r(!1),b&&b(Y)}return C.jsxs("section",{title:f,style:p,onClick:W,className:h,children:[y,j&&A,P&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx(mp.InputMask,{component:Fm,ref:o,onFocus:_,onBlur:z,disabled:l,...U}),H&&C.jsx(x,{size:g,strokeWidth:2.5}),M&&A,v]})}function Mm(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,...E}=t,B=f?"right":"left",P=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,j={md:20,lg:20}[i];return{isLoading:r,className:P,prefix:Vt(o,j,"prefix"),sufix:Vt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,loadingPosition:B,iconSize:j,Spinner:C.jsx(he.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...E}}function km(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,type:A,Spinner:U,...P}=Mm({...t,id:s,isError:u},e),H=E&&!D,j=x&&!D,M=d==="left"&&D,W=d==="right"&&D;function _(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function z(V){r(!0),w&&w(V)}function Y(V){r(!1),b&&b(V)}return A==="hidden"?C.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:o,...P}):C.jsxs("section",{title:f,style:p,onClick:_,className:h,children:[y,M&&U,H&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx("input",{disabled:l||D,readOnly:B,ref:o,onFocus:z,onBlur:Y,type:A,...P}),j&&C.jsx(x,{size:g,strokeWidth:2.5}),W&&U,v]})}function nn(t){return t.type==="currency"?C.jsx(Lm,{...t}):t.type==="masked"?C.jsx(Tm,{...t}):t.type==="cpf-cnpj"?C.jsx(xm,{...t}):C.jsx(km,{...t})}function jm(t){const{iconSize:e,isLoading:r,disabled:n,readOnly:i,isFocused:s}=t,u=`arkynMultiSelectChevron ${n||i?"notAnimate":""} ${s?"focused":""}`;return r?C.jsx(C.Fragment,{}):C.jsx(he.ChevronDown,{className:u,size:e,strokeWidth:2.5})}function Im(t){const{children:e,handleContainerFocus:r,disabled:n,isError:i,isLoading:s,isFocused:a,className:o,readOnly:u,variant:l,size:f,id:p,prefixExists:h}=t,y=h?"hasPrefix":"",v=i?"errored":"",g=n||u||s?"opacity":"",d=a?"focused":"";return C.jsx("section",{onClick:r,id:p,className:`arkynMultiSelectContainer ${y} ${l} ${f} ${g} ${v} ${d} ${o}`,children:e})}function Nm(t){const{children:e,size:r}=t,n=`arkynMultiSelectContent ${r}`;return C.jsx("div",{className:n,children:e})}function _m(t){const{label:e,value:r,handleChangeValue:n}=t;return C.jsxs("div",{className:"arkynMultiSelectMark",children:[e,C.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),n(r)},children:C.jsx(he.X,{})})]})}function zm(t){const{label:e,optionHasSelected:r,handleChangeValue:n,value:i,size:s}=t,a=r(i)?"active":"",o=`arkynMultiSelectOption ${s} ${a}`;return C.jsxs("div",{onClick:()=>n(i),className:o,children:[e," ",C.jsx(he.Check,{})]})}function Wm(t){const{children:e,isFocused:r,isSearchable:n,onSearch:i}=t;function s(a){n&&i(a.target.value)}return r?C.jsxs("div",{className:"arkynMultiSelectOptionsContainer",children:[n&&C.jsx(nn,{type:"search",name:"search-select",variant:"underline",leftIcon:he.Search,onChange:s}),e]}):C.jsx(C.Fragment,{})}function Hm(t){const{isFocused:e,handleBlur:r}=t;return e?C.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:r}):C.jsx(C.Fragment,{})}function Um(t){const{iconSize:e,isLoading:r}=t;return r?C.jsx(he.Loader2,{className:"arkynMultiSelectSpinner",size:e,strokeWidth:2.5}):C.jsx(C.Fragment,{})}function Rm(t){const{name:e,options:r,className:n="",placeholder:i="Selecione...",closeOnSelect:s=!1,defaultValue:a=[],isError:o,isLoading:u=!1,readOnly:l=!1,isSearchable:f=!1,leftIcon:p,onSearch:h,onSelect:y,onBlur:v,notFoundText:g="Sem opções disponíveis",onFocus:d,disabled:D=!1,prefix:E,size:B="md",value:w,variant:b="solid"}=t,x=ot(),A=c.useRef(null),U=x.inputRef||A,P=x.id,H=o||!!x.error,M={md:20,lg:20}[B],W=Fs(E,M,"prefix"),[_,z]=c.useState(""),[Y,V]=c.useState(!1),[Q,ie]=c.useState(a),k=w||Q;function G(T){return k.includes(T)}function $(T){const I=r.find(Z=>Z.value===T);return(I==null?void 0:I.label)||""}function R(){D||!(U!=null&&U.current)||Y||(V(!0),U.current.focus(),d&&d())}function re(){V(!1),v&&U.current&&U.current.blur()}function F(T){z(T),h&&h(T)}function O(T){G(T)?ie(Q.filter(I=>I!==T)):ie([...Q,T]),y&&y(Q),s&&re()}const N=r.filter(T=>!!(t.onSearch||!t.isSearchable||T.label.toLowerCase().includes(_.toLowerCase())));return C.jsxs(Im,{handleContainerFocus:R,disabled:D,isError:H,isFocused:Y,isLoading:u,readOnly:l,size:B,variant:b,className:n,prefixExists:!!E,id:P,children:[C.jsx("input",{ref:U,name:e,value:JSON.stringify(k),type:"hidden"}),W,p&&C.jsx(p,{size:M,strokeWidth:2.5}),C.jsxs(Nm,{size:B,children:[k.map(T=>C.jsx(_m,{label:$(T),value:T,handleChangeValue:O},T)),k.length<=0&&C.jsx("p",{children:i})]}),C.jsxs(Wm,{isFocused:Y,isSearchable:f,onSearch:F,children:[N.map(({label:T,value:I})=>C.jsx(zm,{label:T,value:I,size:B,handleChangeValue:O,optionHasSelected:G},I)),N.length<=0&&C.jsx("p",{children:g})]}),C.jsx(jm,{disabled:D,isFocused:Y,readOnly:l,iconSize:M,isLoading:u}),C.jsx(Um,{iconSize:M,isLoading:u}),C.jsx(Hm,{handleBlur:re,isFocused:Y})]})}const Gu=c.createContext({});function Vm(){return c.useContext(Gu)}function qm(t){const{defaultValue:e,name:r,value:n,onChange:i,size:s="md",className:a="",...o}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=ot();function h(v){l(v),i&&i(v)}const y=`arkynRadioGroup ${s} ${a}`;return C.jsxs(Gu.Provider,{value:{onChange:h,value:n||u,size:s},children:[C.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:r,ref:f,value:n||u}),C.jsx("div",{className:y.trim(),...o})]})}function Gm(t){const{value:e,size:r,disabled:n,children:i,className:s="",...a}=t,{onChange:o,size:u,value:l}=Vm(),{error:f}=ot(),g=`arkynRadioBox ${r||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${n?"disabledTrue":"disabledFalse"} ${s}`;return C.jsxs("label",{className:g.trim(),children:[C.jsx("button",{type:"button",disabled:n,onClick:()=>o(e),onFocus:()=>o(e),...a}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Zm=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),_s={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Zu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Zm?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},zs={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},ni=1;ni<20;ni++)zs["f"+ni]=111+ni;function ii(t,e,r){e&&!("byKey"in e)&&(r=e,e=null),Array.isArray(t)||(t=[t]);var n=t.map(function(a){return Ku(a,e)}),i=function(o){return n.some(function(u){return Yu(u,o)})},s=r==null?i:i(r);return s}function Km(t,e){return ii(t,e)}function Ym(t,e){return ii(t,{byKey:!0},e)}function Ku(t,e){var r=e&&e.byKey,n={};t=t.replace("++","+add");var i=t.split("+"),s=i.length;for(var a in _s)n[_s[a]]=!1;var o=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),p;!(o=(p=f.next()).done);o=!0){var h=p.value,y=h.endsWith("?")&&h.length>1;y&&(h=h.slice(0,-1));var v=Ws(h),g=_s[v];if(h.length>1&&!g&&!Zu[h]&&!zs[v])throw new TypeError('Unknown modifier: "'+h+'"');(s===1||!g)&&(r?n.key=v:n.which=Xu(h)),g&&(n[g]=y?null:!0)}}catch(d){u=!0,l=d}finally{try{!o&&f.return&&f.return()}finally{if(u)throw l}}return n}function Yu(t,e){for(var r in t){var n=t[r],i=void 0;if(n!=null&&(r==="key"&&e.key!=null?i=e.key.toLowerCase():r==="which"?i=n===91&&e.which===93?91:e.which:i=e[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function Xu(t){t=Ws(t);var e=zs[t]||t.toUpperCase().charCodeAt(0);return e}function Ws(t){return t=t.toLowerCase(),t=Zu[t]||t,t}var Xm=It.default=ii,Hs=It.isHotkey=ii;It.isCodeHotkey=Km,It.isKeyHotkey=Ym,It.parseHotkey=Ku,It.compareHotkey=Yu,It.toKeyCode=Xu,It.toKeyName=Ws;/*!
35
+ */function ao(t){return Object.prototype.toString.call(t)==="[object Object]"}function nt(t){var e,r;return ao(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ao(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var oo=Symbol.for("immer-nothing"),uo=Symbol.for("immer-draftable"),vt=Symbol.for("immer-state"),xp=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 ft(t,...e){if(process.env.NODE_ENV!=="production"){const r=xp[t],n=typeof r=="function"?r.apply(null,e):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Ar=Object.getPrototypeOf;function lr(t){return!!t&&!!t[vt]}function cr(t){var e;return t?lo(t)||Array.isArray(t)||!!t[uo]||!!((e=t.constructor)!=null&&e[uo])||kn(t)||jn(t):!1}var Bp=Object.prototype.constructor.toString();function lo(t){if(!t||typeof t!="object")return!1;const e=Ar(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Bp}function Tn(t,e){Mn(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Mn(t){const e=t[vt];return e?e.type_:Array.isArray(t)?1:kn(t)?2:jn(t)?3:0}function Qi(t,e){return Mn(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function co(t,e,r){const n=Mn(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Sp(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function kn(t){return t instanceof Map}function jn(t){return t instanceof Set}function fr(t){return t.copy_||t.base_}function es(t,e){if(kn(t))return new Map(t);if(jn(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=lo(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[vt];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){const a=i[s],o=n[a];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[a]})}return Object.create(Ar(t),n)}else{const n=Ar(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function ts(t,e=!1){return In(t)||lr(t)||!cr(t)||(Mn(t)>1&&(t.set=t.add=t.clear=t.delete=Ap),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>ts(n,!0))),t}function Ap(){ft(2)}function In(t){return Object.isFrozen(t)}var Lp={};function dr(t){const e=Lp[t];return e||ft(0,t),e}var Kr;function fo(){return Kr}function Pp(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function po(t,e){e&&(dr("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function rs(t){ns(t),t.drafts_.forEach(Fp),t.drafts_=null}function ns(t){t===Kr&&(Kr=t.parent_)}function ho(t){return Kr=Pp(Kr,t)}function Fp(t){const e=t[vt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function vo(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[vt].modified_&&(rs(e),ft(4)),cr(t)&&(t=Nn(e,t),e.parent_||_n(e,t)),e.patches_&&dr("Patches").generateReplacementPatches_(r[vt].base_,t,e.patches_,e.inversePatches_)):t=Nn(e,r,[]),rs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==oo?t:void 0}function Nn(t,e,r){if(In(e))return e;const n=e[vt];if(!n)return Tn(e,(i,s)=>go(t,n,e,i,s,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return _n(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let s=i,a=!1;n.type_===3&&(s=new Set(i),i.clear(),a=!0),Tn(s,(o,u)=>go(t,n,i,o,u,r,a)),_n(t,i,!1),r&&t.patches_&&dr("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function go(t,e,r,n,i,s,a){if(process.env.NODE_ENV!=="production"&&i===r&&ft(5),lr(i)){const o=s&&e&&e.type_!==3&&!Qi(e.assigned_,n)?s.concat(n):void 0,u=Nn(t,i,o);if(co(r,n,u),lr(u))t.canAutoFreeze_=!1;else return}else a&&r.add(i);if(cr(i)&&!In(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Nn(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&_n(t,i)}}function _n(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&ts(e,r)}function Tp(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:fo(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,s=is;r&&(i=[n],s=Yr);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return n.draft_=o,n.revoke_=a,o}var is={get(t,e){if(e===vt)return t;const r=fr(t);if(!Qi(r,e))return Mp(t,r,e);const n=r[e];return t.finalized_||!cr(n)?n:n===ss(t.base_,e)?(os(t),t.copy_[e]=us(n,t)):n},has(t,e){return e in fr(t)},ownKeys(t){return Reflect.ownKeys(fr(t))},set(t,e,r){const n=mo(fr(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=ss(fr(t),e),s=i==null?void 0:i[vt];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(Sp(r,i)&&(r!==void 0||Qi(t.base_,e)))return!0;os(t),as(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return ss(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,os(t),as(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=fr(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){ft(11)},getPrototypeOf(t){return Ar(t.base_)},setPrototypeOf(){ft(12)}},Yr={};Tn(is,(t,e)=>{Yr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yr.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&ft(13),Yr.set.call(this,t,e,void 0)},Yr.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&ft(14),is.set.call(this,t[0],e,r,t[0])};function ss(t,e){const r=t[vt];return(r?fr(r):t)[e]}function Mp(t,e,r){var i;const n=mo(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function mo(t,e){if(!(e in t))return;let r=Ar(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Ar(r)}}function as(t){t.modified_||(t.modified_=!0,t.parent_&&as(t.parent_))}function os(t){t.copy_||(t.copy_=es(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var kp=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const s=r;r=e;const a=this;return function(u=s,...l){return a.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&ft(6),n!==void 0&&typeof n!="function"&&ft(7);let i;if(cr(e)){const s=ho(this),a=us(e,void 0);let o=!0;try{i=r(a),o=!1}finally{o?rs(s):ns(s)}return po(s,n),vo(i,s)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===oo&&(i=void 0),this.autoFreeze_&&ts(i,!0),n){const s=[],a=[];dr("Patches").generateReplacementPatches_(e,i,s,a),n(s,a)}return i}else ft(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(a,...o)=>this.produceWithPatches(a,u=>e(u,...o));let n,i;return[this.produce(e,r,(a,o)=>{n=a,i=o}),n,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){cr(t)||ft(8),lr(t)&&(t=jp(t));const e=ho(this),r=us(t,void 0);return r[vt].isManual_=!0,ns(e),r}finishDraft(t,e){const r=t&&t[vt];(!r||!r.isManual_)&&ft(9);const{scope_:n}=r;return po(n,e),vo(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));const n=dr("Patches").applyPatches_;return lr(t)?n(t,e):this.produce(t,i=>n(i,e))}};function us(t,e){const r=kn(t)?dr("MapSet").proxyMap_(t,e):jn(t)?dr("MapSet").proxySet_(t,e):Tp(t,e);return(e?e.scope_:fo()).drafts_.push(r),r}function jp(t){return lr(t)||ft(10,t),yo(t)}function yo(t){if(!cr(t)||In(t))return t;const e=t[vt];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=es(t,e.scope_.immer_.useStrictShallowCopy_)}else r=es(t,!0);return Tn(r,(n,i)=>{co(r,n,yo(i))}),e&&(e.finalized_=!1),r}var gt=new kp,ls=gt.produce;gt.produceWithPatches.bind(gt),gt.setAutoFreeze.bind(gt),gt.setUseStrictShallowCopy.bind(gt),gt.applyPatches.bind(gt);var Co=gt.createDraft.bind(gt),bo=gt.finishDraft.bind(gt),Ip={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=L.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},Np={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=ye.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},_p={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=q.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},zn=new WeakMap,Wn=new WeakMap,Xr=new WeakMap,Do=new WeakMap,Eo=new WeakMap,wo=new WeakMap,Oo=new WeakMap,L={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=L.levels(t,e);return r?n=n.slice(1):n=n.slice(0,-1),n},common(t,e){for(var r=[],n=0;n<t.length&&n<e.length;n++){var i=t[n],s=e[n];if(i!==s)break;r.push(i)}return r},compare(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++){if(t[n]<e[n])return-1;if(t[n]>e[n])return 1}return 0},endsAfter(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),s=t[r],a=e[r];return L.equals(n,i)&&s>a},endsAt(t,e){var r=t.length,n=t.slice(0,r),i=e.slice(0,r);return L.equals(n,i)},endsBefore(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),s=t[r],a=e[r];return L.equals(n,i)&&s<a},equals(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])},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 r=t.slice(0,-1),n=e.slice(0,-1),i=t[t.length-1],s=e[e.length-1];return i!==s&&L.equals(r,n)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=[],i=0;i<=t.length;i++)n.push(t.slice(0,i));return r&&n.reverse(),n},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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var n=[...t],{affinity:i="forward"}=r;if(t.length===0)return n;switch(e.type){case"insert_node":{var{path:s}=e;(L.equals(s,n)||L.endsBefore(s,n)||L.isAncestor(s,n))&&(n[s.length-1]+=1);break}case"remove_node":{var{path:a}=e;if(L.equals(a,n)||L.isAncestor(a,n))return null;L.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:o,position:u}=e;L.equals(o,n)||L.endsBefore(o,n)?n[o.length-1]-=1:L.isAncestor(o,n)&&(n[o.length-1]-=1,n[o.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if(L.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else L.endsBefore(l,n)?n[l.length-1]+=1:L.isAncestor(l,n)&&t[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:p,newPath:h}=e;if(L.equals(p,h))return n;if(L.isAncestor(p,n)||L.equals(p,n)){var y=h.slice();return L.endsBefore(p,h)&&p.length<h.length&&(y[p.length-1]-=1),y.concat(n.slice(p.length))}else L.isSibling(p,h)&&(L.isAncestor(h,n)||L.equals(h,n))?L.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:L.endsBefore(h,n)||L.equals(h,n)||L.isAncestor(h,n)?(L.endsBefore(p,n)&&(n[p.length-1]-=1),n[h.length-1]+=1):L.endsBefore(p,n)&&(L.equals(h,n)&&(n[h.length-1]+=1),n[p.length-1]-=1);break}}return n}};function $r(t){"@babel/helpers - typeof";return $r=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},$r(t)}function zp(t,e){if($r(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($r(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wp(t){var e=zp(t,"string");return $r(e)==="symbol"?e:String(e)}function st(t,e,r){return e=Wp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Hp=(t,e,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,s=se.parent(t,n),a=n[n.length-1];if(a>s.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(s.children.splice(a,0,i),e)for(var[o,u]of q.points(e))e[u]=ye.transform(o,r);break}case"insert_text":{var{path:l,offset:f,text:p}=r;if(p.length===0)break;var h=se.leaf(t,l),y=h.text.slice(0,f),v=h.text.slice(f);if(h.text=y+p+v,e)for(var[g,d]of q.points(e))e[d]=ye.transform(g,r);break}case"merge_node":{var{path:D}=r,E=se.get(t,D),B=L.previous(D),w=se.get(t,B),b=se.parent(t,D),x=D[D.length-1];if(le.isText(E)&&le.isText(w))w.text+=E.text;else if(!le.isText(E)&&!le.isText(w))w.children.push(...E.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat($e.stringify(E)," ").concat($e.stringify(w)));if(b.children.splice(x,1),e)for(var[S,U]of q.points(e))e[U]=ye.transform(S,r);break}case"move_node":{var{path:P,newPath:H}=r;if(L.isAncestor(P,H))throw new Error("Cannot move a path [".concat(P,"] to new path [").concat(H,"] because the destination is inside itself."));var j=se.get(t,P),M=se.parent(t,P),N=P[P.length-1];M.children.splice(N,1);var z=L.transform(P,r),W=se.get(t,L.parent(z)),X=z[z.length-1];if(W.children.splice(X,0,j),e)for(var[R,ne]of q.points(e))e[ne]=ye.transform(R,r);break}case"remove_node":{var{path:Q}=r,k=Q[Q.length-1],G=se.parent(t,Q);if(G.children.splice(k,1),e)for(var[$,V]of q.points(e)){var re=ye.transform($,r);if(e!=null&&re!=null)e[V]=re;else{var F=void 0,O=void 0;for(var[_,T]of se.texts(t))if(L.compare(T,Q)===-1)F=[_,T];else{O=[_,T];break}var I=!1;F&&O&&(L.equals(O[1],Q)?I=!L.hasPrevious(O[1]):I=L.common(F[1],Q).length<L.common(O[1],Q).length),F&&!I?($.path=F[1],$.offset=F[0].text.length):O?($.path=O[1],$.offset=0):e=null}}break}case"remove_text":{var{path:Z,offset:ee,text:J}=r;if(J.length===0)break;var de=se.leaf(t,Z),fe=de.text.slice(0,ee),ce=de.text.slice(ee+J.length);if(de.text=fe+ce,e)for(var[we,Me]of q.points(e))e[Me]=ye.transform(we,r);break}case"set_node":{var{path:Ae,properties:Ie,newProperties:qe}=r;if(Ae.length===0)throw new Error("Cannot set properties on the root node!");var rt=se.get(t,Ae);for(var Be in qe){if(Be==="children"||Be==="text")throw new Error('Cannot set the "'.concat(Be,'" property of nodes!'));var Je=qe[Be];Je==null?delete rt[Be]:rt[Be]=Je}for(var it in Ie)qe.hasOwnProperty(it)||delete rt[it];break}case"set_selection":{var{newProperties:Oe}=r;if(Oe==null)e=Oe;else{if(e==null){if(!q.isRange(Oe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat($e.stringify(Oe)," when there is no current selection."));e=Jr({},Oe)}for(var Fe in Oe){var Qe=Oe[Fe];if(Qe==null){if(Fe==="anchor"||Fe==="focus")throw new Error('Cannot remove the "'.concat(Fe,'" selection property'));delete e[Fe]}else e[Fe]=Qe}}break}case"split_node":{var{path:Ke,position:et,properties:Ct}=r;if(Ke.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ke,"] because the root node cannot be split."));var Ye=se.get(t,Ke),nr=se.parent(t,Ke),wt=Ke[Ke.length-1],St;if(le.isText(Ye)){var ir=Ye.text.slice(0,et),Wr=Ye.text.slice(et);Ye.text=ir,St=Jr(Jr({},Ct),{},{text:Wr})}else{var sr=Ye.children.slice(0,et),Hr=Ye.children.slice(et);Ye.children=sr,St=Jr(Jr({},Ct),{},{children:Hr})}if(nr.children.splice(wt+1,0,St),e)for(var[Mt,xr]of q.points(e))e[xr]=ye.transform(Mt,r);break}}return e},Up={transform(t,e){t.children=Co(t.children);var r=t.selection&&Co(t.selection);try{r=Hp(t,r,e)}finally{t.children=bo(t.children),r?t.selection=lr(r)?bo(r):r:t.selection=null}}},Rp={insertNodes(t,e,r){t.insertNodes(e,r)},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,r){t.setNodes(e,r)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,r){t.unsetNodes(e,r)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,r){t.wrapNodes(e,r)}},Vp={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,r){t.setPoint(e,r)},setSelection(t,e){t.setSelection(e)}},Bo=(t,e)=>{for(var r in t){var n=t[r],i=e[r];if(nt(n)&&nt(i)){if(!Bo(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var s=0;s<n.length;s++)if(n[s]!==i[s])return!1}else if(n!==i)return!1}for(var a in e)if(t[a]===void 0&&e[a]!==void 0)return!1;return!0};function qp(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function kt(t,e){if(t==null)return{};var r=qp(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var Gp=["anchor","focus"];function So(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?So(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):So(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,{anchor:n,focus:i}=t;return q.isBackward(t)===r?[n,i]:[i,n]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return ye.equals(t.anchor,e.anchor)&&ye.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[r,n]=q.edges(t),[i,s]=q.edges(e);return ye.isBefore(r,i)&&ye.isAfter(n,s)}var[a,o]=q.edges(t),u=!1,l=!1;return ye.isPoint(e)?(u=ye.compare(e,a)>=0,l=ye.compare(e,o)<=0):(u=L.compare(e,a.path)>=0,l=L.compare(e,o.path)<=0),u&&l},intersection(t,e){var r=kt(t,Gp),[n,i]=q.edges(t),[s,a]=q.edges(e),o=ye.isBefore(n,s)?s:n,u=ye.isBefore(i,a)?i:a;return ye.isBefore(u,o)?null:Zp({anchor:o,focus:u},r)},isBackward(t){var{anchor:e,focus:r}=t;return ye.isAfter(e,r)},isCollapsed(t){var{anchor:e,focus:r}=t;return ye.equals(e,r)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return nt(t)&&ye.isPoint(t.anchor)&&ye.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ls(t,n=>{if(n===null)return null;var{affinity:i="inward"}=r,s,a;if(i==="inward"){var o=q.isCollapsed(n);q.isForward(n)?(s="forward",a=o?s:"backward"):(s="backward",a=o?s:"forward")}else i==="outward"?q.isForward(n)?(s="backward",a="forward"):(s="forward",a="backward"):(s=i,a=i);var u=ye.transform(n.anchor,e,{affinity:s}),l=ye.transform(n.focus,e,{affinity:a});if(!u||!l)return null;n.anchor=u,n.focus=l})}},Ao=t=>nt(t)&&se.isNodeList(t.children)&&!m.isEditor(t),ue={isAncestor(t){return nt(t)&&se.isNodeList(t.children)},isElement:Ao,isElementList(t){return Array.isArray(t)&&t.every(e=>ue.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Ao(e)&&e[n]===r},matches(t,e){for(var r in e)if(r!=="children"&&t[r]!==e[r])return!1;return!0}},Kp=["children"],Yp=["text"],Lo=new WeakMap,se={ancestor(t,e){var r=se.get(t,e);if(le.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat($e.stringify(r)));return r},ancestors(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of L.ancestors(e,r)){var i=se.ancestor(t,n),s=[i,n];yield s}}()},child(t,e){if(le.isText(t))throw new Error("Cannot get the child of a text node: ".concat($e.stringify(t)));var r=t.children[e];if(r==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat($e.stringify(t)));return r},children(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,i=se.ancestor(t,e),{children:s}=i,a=n?s.length-1:0;n?a>=0:a<s.length;){var o=se.child(i,a),u=e.concat(a);yield[o,u],a=n?a-1:a+1}}()},common(t,e,r){var n=L.common(e,r),i=se.get(t,n);return[i,n]},descendant(t,e){var r=se.get(t,e);if(m.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat($e.stringify(r)));return r},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))n.length!==0&&(yield[r,n])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))ue.isElement(r)&&(yield[r,n])}()},extractProps(t){if(ue.isAncestor(t)){var e=kt(t,Kp);return e}else{var e=kt(t,Yp);return e}},first(t,e){for(var r=e.slice(),n=se.get(t,r);n&&!(le.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(t,e){if(le.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat($e.stringify(t)));var r=ls({children:t.children},n=>{var[i,s]=q.edges(e),a=se.nodes(n,{reverse:!0,pass:h=>{var[,y]=h;return!q.includes(e,y)}});for(var[,o]of a){if(!q.includes(e,o)){var u=se.parent(n,o),l=o[o.length-1];u.children.splice(l,1)}if(L.equals(o,s.path)){var f=se.leaf(n,o);f.text=f.text.slice(0,s.offset)}if(L.equals(o,i.path)){var p=se.leaf(n,o);p.text=p.text.slice(i.offset)}}m.isEditor(n)&&(n.selection=null)});return r.children},get(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(le.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat($e.stringify(t)));r=r.children[i]}return r},has(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(le.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(t){return le.isText(t)||ue.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Lo.get(t);if(e!==void 0)return e;var r=t.every(n=>se.isNode(n));return Lo.set(t,r),r},last(t,e){for(var r=e.slice(),n=se.get(t,r);n&&!(le.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(t,e){var r=se.get(t,e);if(!le.isText(r))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat($e.stringify(r)));return r},levels(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of L.levels(e,r)){var i=se.get(t,n);yield[i,n]}}()},matches(t,e){return ue.isElement(t)&&ue.isElementProps(e)&&ue.matches(t,e)||le.isText(t)&&le.isTextProps(e)&&le.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=e,{from:i=[],to:s}=e,a=new Set,o=[],u=t;!(s&&(n?L.isBefore(o,s):L.isAfter(o,s)));){if(a.has(u)||(yield[u,o]),!a.has(u)&&!le.isText(u)&&u.children.length!==0&&(r==null||r([u,o])===!1)){a.add(u);var l=n?u.children.length-1:0;L.isAncestor(o,i)&&(l=i[o.length]),o=o.concat(l),u=se.get(t,o);continue}if(o.length===0)break;if(!n){var f=L.next(o);if(se.has(t,f)){o=f,u=se.get(t,o);continue}}if(n&&o[o.length-1]!==0){var p=L.previous(o);o=p,u=se.get(t,o);continue}o=L.parent(o),u=se.get(t,o),a.add(u)}}()},parent(t,e){var r=L.parent(e),n=se.get(t,r);if(le.isText(n))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return n},string(t){return le.isText(t)?t.text:t.children.map(se.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of se.nodes(t,e))le.isText(r)&&(yield[r,n])}()}};function Po(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Po(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Po(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ht={isNodeOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!nt(t))return!1;switch(t.type){case"insert_node":return L.isPath(t.path)&&se.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)&&nt(t.properties);case"move_node":return L.isPath(t.path)&&L.isPath(t.newPath);case"remove_node":return L.isPath(t.path)&&se.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)&&nt(t.properties)&&nt(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||nt(t.properties)&&nt(t.newProperties);case"split_node":return L.isPath(t.path)&&typeof t.position=="number"&&nt(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Ht.isOperation(e))},isSelectionOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Ht.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ne(Ne({},t),{},{type:"remove_node"});case"insert_text":return Ne(Ne({},t),{},{type:"remove_text"});case"merge_node":return Ne(Ne({},t),{},{type:"split_node",path:L.previous(t.path)});case"move_node":{var{newPath:e,path:r}=t;if(L.equals(e,r))return t;if(L.isSibling(r,e))return Ne(Ne({},t),{},{path:e,newPath:r});var n=L.transform(r,t),i=L.transform(L.next(r),t);return Ne(Ne({},t),{},{path:n,newPath:i})}case"remove_node":return Ne(Ne({},t),{},{type:"insert_node"});case"remove_text":return Ne(Ne({},t),{},{type:"insert_text"});case"set_node":{var{properties:s,newProperties:a}=t;return Ne(Ne({},t),{},{properties:a,newProperties:s})}case"set_selection":{var{properties:o,newProperties:u}=t;return o==null?Ne(Ne({},t),{},{properties:u,newProperties:null}):u==null?Ne(Ne({},t),{},{properties:null,newProperties:o}):Ne(Ne({},t),{},{properties:u,newProperties:o})}case"split_node":return Ne(Ne({},t),{},{type:"merge_node",path:L.next(t.path)})}}},Fo=new WeakMap,Xp=t=>{var e=Fo.get(t);if(e!==void 0)return e;if(!nt(t))return!1;var r=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||nt(t.marks))&&(t.selection===null||q.isRange(t.selection))&&se.isNodeList(t.children)&&Ht.isOperationList(t.operations);return Fo.set(t,r),r},m={above(t,e){return t.above(e)},addMark(t,e,r){t.addMark(e,r)},after(t,e,r){return t.after(e,r)},before(t,e,r){return t.before(e,r)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteBackward(r)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=e;t.deleteForward(r)},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,r){t.insertFragment(e,r)},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,r){return t.isEdge(e,r)},isEditor(t){return Xp(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,r){return t.isEnd(e,r)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,r){return t.isStart(e,r)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,r){return t.leaf(e,r)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,r){return t.node(e,r)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,r){return t.parent(e,r)},path(t,e,r){return t.path(e,r)},pathRef(t,e,r){return t.pathRef(e,r)},pathRefs(t){return t.pathRefs()},point(t,e,r){return t.point(e,r)},pointRef(t,e,r){return t.pointRef(e,r)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,r){return t.range(e,r)},rangeRef(t,e,r){return t.rangeRef(e,r)},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,r){return t.string(e,r)},unhangRange(t,e,r){return t.unhangRange(e,r)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,r)=>t.shouldMergeNodesRemovePrevNode(e,r)},$p={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(L.isPath)}};function To(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?To(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):To(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ye={compare(t,e){var r=L.compare(t.path,e.path);return r===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:r},isAfter(t,e){return ye.compare(t,e)===1},isBefore(t,e){return ye.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&L.equals(t.path,e.path)},isPoint(t){return nt(t)&&typeof t.offset=="number"&&L.isPath(t.path)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ls(t,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:s,offset:a}=n;switch(e.type){case"insert_node":case"move_node":{n.path=L.transform(s,e,r);break}case"insert_text":{L.equals(e.path,s)&&(e.offset<a||e.offset===a&&i==="forward")&&(n.offset+=e.text.length);break}case"merge_node":{L.equals(e.path,s)&&(n.offset+=e.position),n.path=L.transform(s,e,r);break}case"remove_text":{L.equals(e.path,s)&&e.offset<=a&&(n.offset-=Math.min(a-e.offset,e.text.length));break}case"remove_node":{if(L.equals(e.path,s)||L.isAncestor(e.path,s))return null;n.path=L.transform(s,e,r);break}case"split_node":{if(L.equals(e.path,s)){if(e.position===a&&i==null)return null;(e.position<a||e.position===a&&i==="forward")&&(n.offset-=e.position,n.path=L.transform(s,e,Mo(Mo({},r),{},{affinity:"forward"})))}else n.path=L.transform(s,e,r);break}}})}},ko=void 0,$e={setScrubber(t){ko=t},stringify(t){return JSON.stringify(t,ko)}},Jp=["text"],Qp=["anchor","focus"];function jo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var le={equals(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(s){var a=kt(s,Jp);return a}return Bo(n?i(t):t,n?i(e):e)},isText(t){return nt(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>le.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var r in e)if(r!=="text"&&(!t.hasOwnProperty(r)||t[r]!==e[r]))return!1;return!0},decorations(t,e){var r=[jt({},t)];for(var n of e){var i=kt(n,Qp),[s,a]=q.edges(n),o=[],u=0,l=s.offset,f=a.offset;for(var p of r){var{length:h}=p.text,y=u;if(u+=h,l<=y&&u<=f){Object.assign(p,i),o.push(p);continue}if(l!==f&&(l===u||f===y)||l>u||f<y||f===y&&y!==0){o.push(p);continue}var v=p,g=void 0,d=void 0;if(f<u){var D=f-y;d=jt(jt({},v),{},{text:v.text.slice(D)}),v=jt(jt({},v),{},{text:v.text.slice(0,D)})}if(l>y){var E=l-y;g=jt(jt({},v),{},{text:v.text.slice(0,E)}),v=jt(jt({},v),{},{text:v.text.slice(E)})}Object.assign(v,i),g&&o.push(g),o.push(v),d&&o.push(d)}r=o}return r}},cs=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],Lr=(t,e)=>{var[r]=m.node(t,e);return n=>n===r},fs=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?sh(e):e,s=ve.None,a=ve.None,o=0,u=null,l=null;for(var f of i){var p=f.codePointAt(0);if(!p)break;var h=mh(f,p);if([s,a]=n?[a,h]:[h,s],Pr(s,ve.ZWJ)&&Pr(a,ve.ExtPict)&&(n?u=Io(e.substring(0,o)):u=Io(e.substring(0,e.length-o)),!u)||Pr(s,ve.RI)&&Pr(a,ve.RI)&&(l!==null?l=!l:n?l=!0:l=Eh(e.substring(0,e.length-o)),!l)||s!==ve.None&&a!==ve.None&&Ch(s,a))break;o+=f.length}return o||1},eh=/\s/,th=/[\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]/,rh=/['\u2018\u2019]/,nh=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;e.length>0;){var s=fs(e,r),[a,o]=ds(e,s,r);if(ih(a,o,r))i=!0,n+=s;else if(!i)n+=s;else break;e=o}return n},ds=(t,e,r)=>{if(r){var n=t.length-e;return[t.slice(n,t.length),t.slice(0,n)]}return[t.slice(0,e),t.slice(e)]},ih=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(eh.test(e))return!1;if(rh.test(e)){var i=fs(r,n),[s,a]=ds(r,i,n);if(t(s,a,n))return!0}return!th.test(e)},sh=function*(e){for(var r=e.length-1,n=0;n<e.length;n++){var i=e.charAt(r-n);if(oh(i.charCodeAt(0))){var s=e.charAt(r-n-1);if(ah(s.charCodeAt(0))){yield s+i,n++;continue}}yield i}},ah=t=>t>=55296&&t<=56319,oh=t=>t>=56320&&t<=57343,ve;(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"})(ve||(ve={}));var uh=/^(?:[\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])$/,lh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,ch=/^(?:[\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])$/,fh=/^[\u1100-\u115F\uA960-\uA97C]$/,dh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,ph=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,hh=/^[\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]$/,vh=/^[\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]$/,gh=/^(?:[\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])$/,mh=(t,e)=>{var r=ve.Any;return t.search(uh)!==-1&&(r|=ve.Extend),e===8205&&(r|=ve.ZWJ),e>=127462&&e<=127487&&(r|=ve.RI),t.search(lh)!==-1&&(r|=ve.Prepend),t.search(ch)!==-1&&(r|=ve.SpacingMark),t.search(fh)!==-1&&(r|=ve.L),t.search(dh)!==-1&&(r|=ve.V),t.search(ph)!==-1&&(r|=ve.T),t.search(hh)!==-1&&(r|=ve.LV),t.search(vh)!==-1&&(r|=ve.LVT),t.search(gh)!==-1&&(r|=ve.ExtPict),r};function Pr(t,e){return(t&e)!==0}var yh=[[ve.L,ve.L|ve.V|ve.LV|ve.LVT],[ve.LV|ve.V,ve.V|ve.T],[ve.LVT|ve.T,ve.T],[ve.Any,ve.Extend|ve.ZWJ],[ve.Any,ve.SpacingMark],[ve.Prepend,ve.Any],[ve.ZWJ,ve.ExtPict],[ve.RI,ve.RI]];function Ch(t,e){return yh.findIndex(r=>Pr(t,r[0])&&Pr(e,r[1]))===-1}var bh=/(?:[\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$/,Io=t=>t.search(bh)!==-1,Dh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Eh=t=>{var e=t.match(Dh);if(e===null)return!1;var r=e[0].length/2;return r%2===1},wh={delete(t,e){t.delete(e)},insertFragment(t,e,r){t.insertFragment(e,r)},insertText(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:n=!1}=r,{at:i=cs(t)}=r;if(L.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var s=q.end(i);if(!n&&m.void(t,{at:s}))return;var a=q.start(i),o=m.pointRef(t,a),u=m.pointRef(t,s);te.delete(t,{at:i,voids:n});var l=o.unref(),f=u.unref();i=l||f,te.setSelection(t,{anchor:i,focus:i})}if(!(!n&&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 No(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?No(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var te=Hn(Hn(Hn(Hn({},Up),Rp),Vp),wh),Un=new WeakMap,Oh=t=>Un.get(t)||!1,xh=(t,e,r)=>{var n=Un.get(t)||!1;Un.set(t,!0);try{e(),r()}finally{Un.set(t,n)}};function _o(t,e,r){var n=zn.get(t)||[],i=Wn.get(t)||new Set,s,a,o=p=>{if(p){var h=p.join(",");a.has(h)||(a.add(h),s.push(p))}};if(r){s=[],a=new Set;for(var u of n){var l=r(u);o(l)}}else s=n,a=i;for(var f of e)o(f);zn.set(t,s),Wn.set(t,a)}var Bh=(t,e)=>{for(var r of m.pathRefs(t))Ip.transform(r,e);for(var n of m.pointRefs(t))Np.transform(n,e);for(var i of m.rangeRefs(t))_p.transform(i,e);if(!Oh(t)){var s=L.operationCanTransformPath(e)?a=>L.transform(a,e):void 0;_o(t,t.getDirtyPaths(e),s)}te.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Xr.get(t)||(Xr.set(t,!0),Promise.resolve().then(()=>{Xr.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},Sh=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=e;return L.levels(r)}case"insert_node":{var{node:n,path:i}=e,s=L.levels(i),a=le.isText(n)?[]:Array.from(se.nodes(n),H=>{var[,j]=H;return i.concat(j)});return[...s,...a]}case"merge_node":{var{path:o}=e,u=L.ancestors(o),l=L.previous(o);return[...u,l]}case"move_node":{var{path:f,newPath:p}=e;if(L.equals(f,p))return[];var h=[],y=[];for(var v of L.ancestors(f)){var g=L.transform(v,e);h.push(g)}for(var d of L.ancestors(p)){var D=L.transform(d,e);y.push(D)}var E=y[y.length-1],B=p[p.length-1],w=E.concat(B);return[...h,...y,w]}case"remove_node":{var{path:b}=e,x=L.ancestors(b);return[...x]}case"split_node":{var{path:S}=e,U=L.levels(S),P=L.next(S);return[...U,P]}default:return[]}},Ah=t=>{var{selection:e}=t;return e?se.fragment(t,e):[]},Lh=(t,e)=>{var[r,n]=e;if(!le.isText(r)){if(ue.isElement(r)&&r.children.length===0){var i={text:""};te.insertNodes(t,i,{at:n.concat(0),voids:!0});return}for(var s=m.isEditor(r)?!1:ue.isElement(r)&&(t.isInline(r)||r.children.length===0||le.isText(r.children[0])||t.isInline(r.children[0])),a=0,o=0;o<r.children.length;o++,a++){var u=se.get(t,n);if(!le.isText(u)){var l=u.children[a],f=u.children[a-1],p=o===r.children.length-1,h=le.isText(l)||ue.isElement(l)&&t.isInline(l);if(h!==s)te.removeNodes(t,{at:n.concat(a),voids:!0}),a--;else if(ue.isElement(l)){if(t.isInline(l)){if(f==null||!le.isText(f)){var y={text:""};te.insertNodes(t,y,{at:n.concat(a),voids:!0}),a++}else if(p){var v={text:""};te.insertNodes(t,v,{at:n.concat(a+1),voids:!0}),a++}}}else{if(!le.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&le.isText(f)&&(le.equals(l,f,{loose:!0})?(te.mergeNodes(t,{at:n.concat(a),voids:!0}),a--):f.text===""?(te.removeNodes(t,{at:n.concat(a-1),voids:!0}),a--):l.text===""&&(te.removeNodes(t,{at:n.concat(a),voids:!0}),a--))}}}}},Ph=(t,e)=>{var{iteration:r,initialDirtyPathsLength:n}=e,i=n*42;if(r>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},Fh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:i="lowest",at:s=e.selection,match:a}=r;if(s){var o=m.path(e,s),u=i==="lowest";for(var[l,f]of m.levels(e,{at:o,voids:n,match:a,reverse:u}))if(!le.isText(l)){if(q.isRange(s)){if(L.isAncestor(f,s.anchor.path)&&L.isAncestor(f,s.focus.path))return[l,f]}else if(!L.equals(o,f))return[l,f]}}};function zo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Th=(t,e,r)=>{var{selection:n}=t;if(n){var i=(p,h)=>{if(!le.isText(p))return!1;var[y,v]=m.parent(t,h);return!t.isVoid(y)||t.markableVoid(y)},s=q.isExpanded(n),a=!1;if(!s){var[o,u]=m.node(t,n);if(o&&i(o,u)){var[l]=m.parent(t,u);a=l&&t.markableVoid(l)}}if(s||a)te.setNodes(t,{[e]:r},{match:i,split:!0,voids:!0});else{var f=Wo(Wo({},m.marks(t)||{}),{},{[e]:r});t.marks=f,Xr.get(t)||t.onChange()}}};function Ho(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Uo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ho(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ho(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Mh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,r,{edge:"end"}),s=m.end(e,[]),a={anchor:i,focus:s},{distance:o=1}=n,u=0,l;for(var f of m.positions(e,Uo(Uo({},n),{},{at:a}))){if(u>o)break;u!==0&&(l=f),u++}return l};function Ro(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ro(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ro(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var kh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),s=m.point(e,r,{edge:"start"}),a={anchor:i,focus:s},{distance:o=1}=n,u=0,l;for(var f of m.positions(e,Vo(Vo({},n),{},{at:a,reverse:!0}))){if(u>o)break;u!==0&&(l=f),u++}return l},jh=(t,e)=>{var{selection:r}=t;r&&q.isCollapsed(r)&&te.delete(t,{unit:e,reverse:!0})},Ih=(t,e)=>{var{selection:r}=t;r&&q.isCollapsed(r)&&te.delete(t,{unit:e})},Nh=function(e){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&q.isExpanded(n)&&te.delete(e,{reverse:r==="backward"})},_h=(t,e)=>[m.start(t,e),m.end(t,e)];function qo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Go(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var zh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Go(Go({},r),{},{match:n=>ue.isElement(n)&&m.isElementReadOnly(e,n)}))},Wh=(t,e)=>m.point(t,e,{edge:"end"}),Hh=(t,e)=>{var r=m.path(t,e,{edge:"start"});return m.node(t,r)},Uh=(t,e)=>{var r=m.range(t,e);return se.fragment(t,r)};function Zo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ko(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Rh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ko(Ko({},r),{},{match:n=>ue.isElement(n)&&m.isVoid(e,n)}))},Vh=(t,e)=>e.children.some(r=>ue.isElement(r)&&m.isBlock(t,r)),qh=(t,e)=>e.children.some(r=>le.isText(r)||m.isInline(t,r)),Gh=(t,e)=>se.has(t,e),Zh=(t,e)=>e.children.every(r=>le.isText(r)),Kh=t=>{te.splitNodes(t,{always:!0})},Yh=(t,e,r)=>{te.insertNodes(t,e,r)},Xh=t=>{te.splitNodes(t,{always:!0})};function Yo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $h(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Jh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:s}=e;if(i){if(s){var a=$h({text:r},s);te.insertNodes(e,a,{at:n.at,voids:n.voids})}else te.insertText(e,r,n);e.marks=null}},Qh=(t,e)=>!t.isInline(e),ev=(t,e,r)=>m.isStart(t,e,r)||m.isEnd(t,e,r),tv=(t,e)=>{var{children:r}=e,[n]=r;return r.length===0||r.length===1&&le.isText(n)&&n.text===""&&!t.isVoid(e)},rv=(t,e,r)=>{var n=m.end(t,r);return ye.equals(e,n)},nv=t=>{var e=Do.get(t);return e===void 0?!0:e},iv=(t,e,r)=>{if(e.offset!==0)return!1;var n=m.start(t,r);return ye.equals(e,n)},sv=(t,e)=>{var r=m.path(t,e,{edge:"end"});return m.node(t,r)},av=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=se.leaf(e,i);return[s,i]};function ov(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,reverse:n=!1,voids:i=!1}=e,{match:s}=e;if(s==null&&(s=()=>!0),!!r){var a=[],o=m.path(t,r);for(var[u,l]of se.levels(t,o))if(s(u,l)&&(a.push([u,l]),!i&&ue.isElement(u)&&m.isVoid(t,u)))break;n&&a.reverse(),yield*a}}()}var uv=["text"],lv=["text"],cv=function(e){var{marks:r,selection:n}=e;if(!n)return null;var{anchor:i,focus:s}=n;if(r)return r;if(q.isExpanded(n)){var a=m.isEnd(e,i,i.path);if(a){var o=m.after(e,i);o&&(i=o)}var[u]=m.nodes(e,{match:le.isText,at:{anchor:i,focus:s}});if(u){var[l]=u,f=kt(l,uv);return f}else return{}}var{path:p}=i,[h]=m.leaf(e,p);if(i.offset===0){var y=m.previous(e,{at:p,match:le.isText}),v=m.above(e,{match:w=>ue.isElement(w)&&m.isVoid(e,w)&&e.markableVoid(w)});if(!v){var g=m.above(e,{match:w=>ue.isElement(w)&&m.isBlock(e,w)});if(y&&g){var[d,D]=y,[,E]=g;L.isAncestor(E,D)&&(h=d)}}}var B=kt(h,lv);return B},fv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection}=r;if(a){var o=m.after(e,a,{voids:i});if(o){var[,u]=m.last(e,[]),l=[o.path,u];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(s==null)if(L.isPath(a)){var[f]=m.parent(e,a);s=h=>f.children.includes(h)}else s=()=>!0;var[p]=m.nodes(e,{at:l,match:s,mode:n,voids:i});return p}}},dv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=se.get(e,i);return[s,i]};function pv(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,mode:n="all",universal:i=!1,reverse:s=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!r){var l,f;if($p.isSpan(r))l=r[0],f=r[1];else{var p=m.path(t,r,{edge:"start"}),h=m.path(t,r,{edge:"end"});l=s?h:p,f=s?p:h}var y=se.nodes(t,{reverse:s,from:l,to:f,pass:w=>{var[b]=w;return ue.isElement(b)?!!(!a&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||o&&!m.isSelectable(t,b)):!1}}),v=[],g;for(var[d,D]of y)if(!(o&&ue.isElement(d)&&!m.isSelectable(t,d))){var E=g&&L.compare(D,g[1])===0;if(!(n==="highest"&&E)){if(!u(d,D)){if(i&&!E&&le.isText(d))return;continue}if(n==="lowest"&&E){g=[d,D];continue}var B=n==="lowest"?g:[d,D];B&&(i?v.push(B):yield B),g=[d,D]}}n==="lowest"&&g&&(i?v.push(g):yield g),i&&(yield*v)}}()}var hv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:i}=r,s=f=>zn.get(f)||[],a=f=>Wn.get(f)||new Set,o=f=>{var p=s(f).pop(),h=p.join(",");return a(f).delete(h),p};if(m.isNormalizing(e)){if(n){var u=Array.from(se.nodes(e),f=>{var[,p]=f;return p}),l=new Set(u.map(f=>f.join(",")));zn.set(e,u),Wn.set(e,l)}s(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of s(e))if(se.has(e,f)){var p=m.node(e,f),[h,y]=p;ue.isElement(h)&&h.children.length===0&&e.normalizeNode(p,{operation:i})}for(var v=s(e),g=v.length,d=0;v.length!==0;){if(!e.shouldNormalize({dirtyPaths:v,iteration:d,initialDirtyPathsLength:g,operation:i}))return;var D=o(e);if(se.has(e,D)){var E=m.node(e,D);e.normalizeNode(E,{operation:i})}d++,v=s(e)}})}},vv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,r,n),s=L.parent(i),a=m.node(e,s);return a},gv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.pathRefs(e);return u.delete(s),s.current=null,o}},a=m.pathRefs(e);return a.add(s),s},mv=t=>{var e=Eo.get(t);return e||(e=new Set,Eo.set(t,e)),e},yv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:s}=n;if(L.isPath(r)){if(s==="start"){var[,a]=se.first(e,r);r=a}else if(s==="end"){var[,o]=se.last(e,r);r=o}}return q.isRange(r)&&(s==="start"?r=q.start(r):s==="end"?r=q.end(r):r=L.common(r.anchor.path,r.focus.path)),ye.isPoint(r)&&(r=r.path),i!=null&&(r=r.slice(0,i)),r},Cv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.pointRefs(e);return u.delete(s),s.current=null,o}},a=m.pointRefs(e);return a.add(s),s},bv=t=>{var e=wo.get(t);return e||(e=new Set,wo.set(t,e)),e},Dv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=n;if(L.isPath(r)){var s;if(i==="end"){var[,a]=se.last(e,r);s=a}else{var[,o]=se.first(e,r);s=o}var u=se.get(e,s);if(!le.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(r,"] because it has no ").concat(i," text node."));return{path:s,offset:i==="end"?u.text.length:0}}if(q.isRange(r)){var[l,f]=q.edges(r);return i==="start"?l:f}return r};function Ev(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:r=t.selection,unit:n="offset",reverse:i=!1,voids:s=!1,ignoreNonSelectable:a=!1}=e;if(!r)return;var o=m.range(t,r),[u,l]=q.edges(o),f=i?l:u,p=!1,h="",y=0,v=0,g=0;for(var[d,D]of m.nodes(t,{at:r,reverse:i,voids:s,ignoreNonSelectable:a})){if(ue.isElement(d)){if(!s&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var E=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:E},{voids:s}),p=!0}}if(le.isText(d)){var w=L.equals(D,f.path);for(w?(v=i?f.offset:d.text.length-f.offset,g=f.offset):(v=d.text.length,g=i?v:0),(w||p||n==="offset")&&(yield{path:D,offset:g},p=!1);;){if(y===0){if(h==="")break;y=b(h,n,i),h=ds(h,y,i)[1]}if(g=i?g-y:g+y,v=v-y,v<0){y=-v;break}y=0,yield{path:D,offset:g}}}}function b(x,S,U){return S==="character"?fs(x,U):S==="word"?nh(x,U):S==="line"||S==="block"?x.length:1}}()}var wv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection}=r;if(a){var o=m.before(e,a,{voids:i});if(o){var[,u]=m.first(e,[]),l=[o.path,u];if(L.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(s==null)if(L.isPath(a)){var[f]=m.parent(e,a);s=h=>f.children.includes(h)}else s=()=>!0;var[p]=m.nodes(e,{reverse:!0,at:l,match:s,mode:n,voids:i});return p}}},Ov=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,s={current:r,affinity:i,unref(){var{current:o}=s,u=m.rangeRefs(e);return u.delete(s),s.current=null,o}},a=m.rangeRefs(e);return a.add(s),s},xv=t=>{var e=Oo.get(t);return e||(e=new Set,Oo.set(t,e)),e},Bv=(t,e,r)=>{if(q.isRange(e)&&!r)return e;var n=m.start(t,e),i=m.end(t,r||e);return{anchor:n,focus:i}};function Xo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xo(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xo(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Av=(t,e)=>{var{selection:r}=t;if(r){var n=(f,p)=>{if(!le.isText(f))return!1;var[h,y]=m.parent(t,p);return!t.isVoid(h)||t.markableVoid(h)},i=q.isExpanded(r),s=!1;if(!i){var[a,o]=m.node(t,r);if(a&&n(a,o)){var[u]=m.parent(t,o);s=u&&t.markableVoid(u)}}if(i||s)te.unsetNodes(t,e,{match:n,split:!0,voids:!0});else{var l=Sv({},m.marks(t)||{});delete l[e],t.marks=l,Xr.get(t)||t.onChange()}}},Lv=(t,e)=>{Do.set(t,e)},Pv=(t,e)=>m.point(t,e,{edge:"start"}),Fv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,s=m.range(e,r),[a,o]=q.edges(s),u="";for(var[l,f]of m.nodes(e,{at:s,match:le.isText,voids:i})){var p=l.text;L.equals(f,o.path)&&(p=p.slice(0,o.offset)),L.equals(f,a.path)&&(p=p.slice(a.offset)),u+=p}return u},Tv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,[s,a]=q.edges(r);if(s.offset!==0||a.offset!==0||q.isCollapsed(r)||L.hasPrevious(a.path))return r;var o=m.above(e,{at:a,match:v=>ue.isElement(v)&&m.isBlock(e,v),voids:i}),u=o?o[1]:[],l=m.start(e,s),f={anchor:l,focus:a},p=!0;for(var[h,y]of m.nodes(e,{at:f,match:le.isText,reverse:!0,voids:i})){if(p){p=!1;continue}if(h.text!==""||L.isBefore(y,u)){a={path:y,offset:h.text.length};break}}return{anchor:s,focus:a}},Mv=(t,e)=>{var r=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,r)}m.normalize(t)},kv=(t,e,r)=>{var[n,i]=e;return ue.isElement(n)&&m.isEmpty(t,n)||le.isText(n)&&n.text===""&&i[i.length-1]!==0},jv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var n,i,{reverse:s=!1,unit:a="character",distance:o=1,voids:u=!1}=r,{at:l=e.selection,hanging:f=!1}=r;if(l){var p=!1;if(q.isRange(l)&&q.isCollapsed(l)&&(p=!0,l=l.anchor),ye.isPoint(l)){var h=m.void(e,{at:l,mode:"highest"});if(!u&&h){var[,y]=h;l=y}else{var v={unit:a,distance:o},g=s?m.before(e,l,v)||m.start(e,[]):m.after(e,l,v)||m.end(e,[]);l={anchor:l,focus:g},f=!0}}if(L.isPath(l)){te.removeNodes(e,{at:l,voids:u});return}if(!q.isCollapsed(l)){if(!f){var[,d]=q.edges(l),D=m.end(e,[]);ye.equals(d,D)||(l=m.unhangRange(e,l,{voids:u}))}var[E,B]=q.edges(l),w=m.above(e,{match:fe=>ue.isElement(fe)&&m.isBlock(e,fe),at:E,voids:u}),b=m.above(e,{match:fe=>ue.isElement(fe)&&m.isBlock(e,fe),at:B,voids:u}),x=w&&b&&!L.equals(w[1],b[1]),S=L.equals(E.path,B.path),U=u?null:(n=m.void(e,{at:E,mode:"highest"}))!==null&&n!==void 0?n:m.elementReadOnly(e,{at:E,mode:"highest"}),P=u?null:(i=m.void(e,{at:B,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:B,mode:"highest"});if(U){var H=m.before(e,E);H&&w&&L.isAncestor(w[1],H.path)&&(E=H)}if(P){var j=m.after(e,B);j&&b&&L.isAncestor(b[1],j.path)&&(B=j)}var M=[],N;for(var z of m.nodes(e,{at:l,voids:u})){var[W,X]=z;N&&L.compare(X,N)===0||(!u&&ue.isElement(W)&&(m.isVoid(e,W)||m.isElementReadOnly(e,W))||!L.isCommon(X,E.path)&&!L.isCommon(X,B.path))&&(M.push(z),N=X)}var R=Array.from(M,fe=>{var[,ce]=fe;return m.pathRef(e,ce)}),ne=m.pointRef(e,E),Q=m.pointRef(e,B),k="";if(!S&&!U){var G=ne.current,[$]=m.leaf(e,G),{path:V}=G,{offset:re}=E,F=$.text.slice(re);F.length>0&&(e.apply({type:"remove_text",path:V,offset:re,text:F}),k=F)}if(R.reverse().map(fe=>fe.unref()).filter(fe=>fe!==null).forEach(fe=>te.removeNodes(e,{at:fe,voids:u})),!P){var O=Q.current,[_]=m.leaf(e,O),{path:T}=O,I=S?E.offset:0,Z=_.text.slice(I,B.offset);Z.length>0&&(e.apply({type:"remove_text",path:T,offset:I,text:Z}),k=Z)}!S&&x&&Q.current&&ne.current&&te.mergeNodes(e,{at:Q.current,hanging:!0,voids:u}),p&&s&&a==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&te.insertText(e,k.slice(0,k.length-o));var ee=ne.unref(),J=Q.unref(),de=s?ee||J:J||ee;r.at==null&&de&&te.select(e,de)}}})},Iv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:s=!1}=n,{at:a=cs(e),batchDirty:o=!0}=n;if(r.length){if(q.isRange(a))if(i||(a=m.unhangRange(e,a,{voids:s})),q.isCollapsed(a))a=a.anchor;else{var[,u]=q.edges(a);if(!s&&m.void(e,{at:u}))return;var l=m.pointRef(e,u);te.delete(e,{at:a}),a=l.unref()}else L.isPath(a)&&(a=m.start(e,a));if(!(!s&&m.void(e,{at:a}))){var f=m.above(e,{at:a,match:F=>ue.isElement(F)&&m.isInline(e,F),mode:"highest",voids:s});if(f){var[,p]=f;if(m.isEnd(e,a,p)){var h=m.after(e,p);a=h}else if(m.isStart(e,a,p)){var y=m.before(e,p);a=y}}var v=m.above(e,{match:F=>ue.isElement(F)&&m.isBlock(e,F),at:a,voids:s}),[,g]=v,d=m.isStart(e,a,g),D=m.isEnd(e,a,g),E=d&&D,B=!d||d&&D,w=!D,[,b]=se.first({children:r},[]),[,x]=se.last({children:r},[]),S=[],U=F=>{var[O,_]=F,T=_.length===0;return T?!1:E?!0:!(B&&L.isAncestor(_,b)&&ue.isElement(O)&&!e.isVoid(O)&&!e.isInline(O)||w&&L.isAncestor(_,x)&&ue.isElement(O)&&!e.isVoid(O)&&!e.isInline(O))};for(var P of se.nodes({children:r},{pass:U}))U(P)&&S.push(P);var H=[],j=[],M=[],N=!0,z=!1;for(var[W]of S)ue.isElement(W)&&!e.isInline(W)?(N=!1,z=!0,j.push(W)):N?H.push(W):M.push(W);var[X]=m.nodes(e,{at:a,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s}),[,R]=X,ne=m.isStart(e,a,R),Q=m.isEnd(e,a,R),k=m.pathRef(e,D&&!M.length?L.next(g):g),G=m.pathRef(e,Q?L.next(R):R);te.splitNodes(e,{at:a,match:F=>z?ue.isElement(F)&&m.isBlock(e,F):le.isText(F)||m.isInline(e,F),mode:z?"lowest":"highest",always:z&&(!d||H.length>0)&&(!D||M.length>0),voids:s});var $=m.pathRef(e,!ne||ne&&Q?L.next(R):R);if(te.insertNodes(e,H,{at:$.current,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s,batchDirty:o}),E&&!H.length&&j.length&&!M.length&&te.delete(e,{at:g,voids:s}),te.insertNodes(e,j,{at:k.current,match:F=>ue.isElement(F)&&m.isBlock(e,F),mode:"lowest",voids:s,batchDirty:o}),te.insertNodes(e,M,{at:G.current,match:F=>le.isText(F)||m.isInline(e,F),mode:"highest",voids:s,batchDirty:o}),!n.at){var V;if(M.length>0&&G.current?V=L.previous(G.current):j.length>0&&k.current?V=L.previous(k.current):$.current&&(V=L.previous($.current)),V){var re=m.end(e,V);te.select(e,re)}}$.unref(),k.unref(),G.unref()}}})},Nv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=r,{selection:i}=e;if(i){if(n==="anchor")te.select(e,i.anchor);else if(n==="focus")te.select(e,i.focus);else if(n==="start"){var[s]=q.edges(i);te.select(e,s)}else if(n==="end"){var[,a]=q.edges(i);te.select(e,a)}}else return},_v=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},zv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:i=1,unit:s="character",reverse:a=!1}=r,{edge:o=null}=r;if(n){o==="start"&&(o=q.isBackward(n)?"focus":"anchor"),o==="end"&&(o=q.isBackward(n)?"anchor":"focus");var{anchor:u,focus:l}=n,f={distance:i,unit:s,ignoreNonSelectable:!0},p={};if(o==null||o==="anchor"){var h=a?m.before(e,u,f):m.after(e,u,f);h&&(p.anchor=h)}if(o==null||o==="focus"){var y=a?m.before(e,l,f):m.after(e,l,f);y&&(p.focus=y)}te.setSelection(e,p)}},Wv=(t,e)=>{var{selection:r}=t;if(e=m.range(t,e),r){te.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat($e.stringify(e)));t.apply({type:"set_selection",properties:r,newProperties:e})};function $o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$o(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$o(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Hv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:s="both"}=n;if(i){s==="start"&&(s=q.isBackward(i)?"focus":"anchor"),s==="end"&&(s=q.isBackward(i)?"anchor":"focus");var{anchor:a,focus:o}=i,u=s==="anchor"?a:o;te.setSelection(e,{[s==="anchor"?"anchor":"focus"]:Jo(Jo({},u),r)})}},Uv=(t,e)=>{var{selection:r}=t,n={},i={};if(r){for(var s in e)(s==="anchor"&&e.anchor!=null&&!ye.equals(e.anchor,r.anchor)||s==="focus"&&e.focus!=null&&!ye.equals(e.focus,r.focus)||s!=="anchor"&&s!=="focus"&&e[s]!==r[s])&&(n[s]=r[s],i[s]=e[s]);Object.keys(n).length>0&&t.apply({type:"set_selection",properties:n,newProperties:i})}},Rv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:s=!1,mode:a="lowest",batchDirty:o=!0}=n,{at:u,match:l,select:f}=n;if(se.isNode(r)&&(r=[r]),r.length!==0){var[p]=r;if(u||(u=cs(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:s})),q.isCollapsed(u))u=u.anchor;else{var[,h]=q.edges(u),y=m.pointRef(e,h);te.delete(e,{at:u}),u=y.unref()}if(ye.isPoint(u)){l==null&&(le.isText(p)?l=H=>le.isText(H):e.isInline(p)?l=H=>le.isText(H)||m.isInline(e,H):l=H=>ue.isElement(H)&&m.isBlock(e,H));var[v]=m.nodes(e,{at:u.path,match:l,mode:a,voids:s});if(v){var[,g]=v,d=m.pathRef(e,g),D=m.isEnd(e,u,g);te.splitNodes(e,{at:u,match:l,mode:a,voids:s});var E=d.unref();u=D?L.next(E):E}else return}var B=L.parent(u),w=u[u.length-1];if(!(!s&&m.void(e,{at:B}))){if(o){var b=[],x=L.levels(B);xh(e,()=>{var H=function(){var N=B.concat(w);w++;var z={type:"insert_node",path:N,node:j};e.apply(z),u=L.next(u),b.push(z),le.isText?x.push(...Array.from(se.nodes(j),W=>{var[,X]=W;return N.concat(X)})):x.push(N)};for(var j of r)H()},()=>{_o(e,x,H=>{var j=H;for(var M of b)if(L.operationCanTransformPath(M)&&(j=L.transform(j,M),!j))return null;return j})})}else for(var S of r){var U=B.concat(w);w++,e.apply({type:"insert_node",path:U,node:S}),u=L.next(u)}if(u=L.previous(u),f){var P=m.end(e,u);P&&te.select(e,P)}}}})},Vv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:i="lowest",voids:s=!1}=r,{match:a}=r;if(a==null&&(a=L.isPath(n)?Lr(e,n):w=>ue.isElement(w)&&m.isBlock(e,w)),!!n){var o=m.nodes(e,{at:n,match:a,mode:i,voids:s}),u=Array.from(o,w=>{var[,b]=w;return m.pathRef(e,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 p=m.node(e,L.parent(f)),[h,y]=p,v=f[f.length-1],{length:g}=h.children;if(g===1){var d=L.next(y);te.moveNodes(e,{at:f,to:d,voids:s}),te.removeNodes(e,{at:y,voids:s})}else if(v===0)te.moveNodes(e,{at:f,to:y,voids:s});else if(v===g-1){var D=L.next(y);te.moveNodes(e,{at:f,to:D,voids:s})}else{var E=L.next(f),B=L.next(y);te.splitNodes(e,{at:E,voids:s}),te.moveNodes(e,{at:f,to:B,voids:s})}}}})},qv=["text"],Gv=["children"],Qo=(t,e)=>{if(ue.isElement(e)){var r=e;return m.isVoid(t,e)?!0:r.children.length===1?Qo(t,r.children[0]):!1}else return!m.isEditor(e)},Zv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:s=!1,voids:a=!1,mode:o="lowest"}=r;if(i){if(n==null)if(L.isPath(i)){var[u]=m.parent(e,i);n=H=>u.children.includes(H)}else n=H=>ue.isElement(H)&&m.isBlock(e,H);if(!s&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:a})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,l]=q.edges(i),f=m.pointRef(e,l);te.delete(e,{at:i}),i=f.unref(),r.at==null&&te.select(e,i)}var[p]=m.nodes(e,{at:i,match:n,voids:a,mode:o}),h=m.previous(e,{at:i,match:n,voids:a,mode:o});if(!(!p||!h)){var[y,v]=p,[g,d]=h;if(!(v.length===0||d.length===0)){var D=L.next(d),E=L.common(v,d),B=L.isSibling(v,d),w=Array.from(m.levels(e,{at:v}),H=>{var[j]=H;return j}).slice(E.length).slice(0,-1),b=m.above(e,{at:v,mode:"highest",match:H=>w.includes(H)&&Qo(e,H)}),x=b&&m.pathRef(e,b[1]),S,U;if(le.isText(y)&&le.isText(g)){var P=kt(y,qv);U=g.text.length,S=P}else if(ue.isElement(y)&&ue.isElement(g)){var P=kt(y,Gv);U=g.children.length,S=P}else throw new Error("Cannot merge the node at path [".concat(v,"] with the previous sibling because it is not the same kind: ").concat($e.stringify(y)," ").concat($e.stringify(g)));B||te.moveNodes(e,{at:v,to:D,voids:a}),x&&te.removeNodes(e,{at:x.current,voids:a}),m.shouldMergeNodesRemovePrevNode(e,h,p)?te.removeNodes(e,{at:d,voids:a}):e.apply({type:"merge_node",path:D,position:U,properties:S}),x&&x.unref()}}}})},Kv=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:r,at:n=t.selection,mode:i="lowest",voids:s=!1}=e,{match:a}=e;if(n){a==null&&(a=L.isPath(n)?Lr(t,n):y=>ue.isElement(y)&&m.isBlock(t,y));var o=m.pathRef(t,r),u=m.nodes(t,{at:n,match:a,mode:i,voids:s}),l=Array.from(u,y=>{var[,v]=y;return m.pathRef(t,v)});for(var f of l){var p=f.unref(),h=o.current;p.length!==0&&t.apply({type:"move_node",path:p,newPath:h}),o.current&&L.isSibling(h,p)&&L.isAfter(h,p)&&(o.current=L.next(o.current))}o.unref()}})},Yv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:s="lowest"}=r,{at:a=e.selection,match:o}=r;if(a){o==null&&(o=L.isPath(a)?Lr(e,a):y=>ue.isElement(y)&&m.isBlock(e,y)),!n&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:i}));var u=m.nodes(e,{at:a,match:o,mode:s,voids:i}),l=Array.from(u,y=>{var[,v]=y;return m.pathRef(e,v)});for(var f of l){var p=f.unref();if(p){var[h]=m.node(e,p);e.apply({type:"remove_node",path:p,node:h})}}}})},Xv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:s=e.selection,compare:a,merge:o}=n,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:p=!1}=n;if(s){if(i==null&&(i=L.isPath(s)?Lr(e,s):U=>ue.isElement(U)&&m.isBlock(e,U)),!u&&q.isRange(s)&&(s=m.unhangRange(e,s,{voids:p})),f&&q.isRange(s)){if(q.isCollapsed(s)&&m.leaf(e,s.anchor)[0].text.length>0)return;var h=m.rangeRef(e,s,{affinity:"inward"}),[y,v]=q.edges(s),g=l==="lowest"?"lowest":"highest",d=m.isEnd(e,v,v.path);te.splitNodes(e,{at:v,match:i,mode:g,voids:p,always:!d});var D=m.isStart(e,y,y.path);te.splitNodes(e,{at:y,match:i,mode:g,voids:p,always:!D}),s=h.unref(),n.at==null&&te.select(e,s)}a||(a=(U,P)=>U!==P);for(var[E,B]of m.nodes(e,{at:s,match:i,mode:l,voids:p})){var w={},b={};if(B.length!==0){var x=!1;for(var S in r)S==="children"||S==="text"||a(r[S],E[S])&&(x=!0,E.hasOwnProperty(S)&&(w[S]=E[S]),o?r[S]!=null&&(b[S]=o(E[S],r[S])):r[S]!=null&&(b[S]=r[S]));x&&e.apply({type:"set_node",path:B,properties:w,newProperties:b})}}}})},$v=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,r]=q.edges(e),n=m.pointRef(t,r);return te.delete(t,{at:e}),n.unref()},Jv=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:i=!1}=r,{match:s,at:a=e.selection,height:o=0,always:u=!1}=r;if(s==null&&(s=Q=>ue.isElement(Q)&&m.isBlock(e,Q)),q.isRange(a)&&(a=$v(e,a)),L.isPath(a)){var l=a,f=m.point(e,l),[p]=m.parent(e,l);s=Q=>Q===p,o=f.path.length-l.length+1,a=f,u=!0}if(a){var h=m.pointRef(e,a,{affinity:"backward"}),y;try{var[v]=m.nodes(e,{at:a,match:s,mode:n,voids:i});if(!v)return;var g=m.void(e,{at:a,mode:"highest"}),d=0;if(!i&&g){var[D,E]=g;if(ue.isElement(D)&&e.isInline(D)){var B=m.after(e,E);if(!B){var w={text:""},b=L.next(E);te.insertNodes(e,w,{at:b,voids:i}),B=m.point(e,b)}a=B,u=!0}var x=a.path.length-E.length;o=x+1,u=!0}y=m.pointRef(e,a);var S=a.path.length-o,[,U]=v,P=a.path.slice(0,S),H=o===0?a.offset:a.path[S]+d;for(var[j,M]of m.levels(e,{at:P,reverse:!0,voids:i})){var N=!1;if(M.length<U.length||M.length===0||!i&&ue.isElement(j)&&m.isVoid(e,j))break;var z=h.current,W=m.isEnd(e,z,M);if(u||!h||!m.isEdge(e,z,M)){N=!0;var X=se.extractProps(j);e.apply({type:"split_node",path:M,position:H,properties:X})}H=M[M.length-1]+(N||W?1:0)}if(r.at==null){var R=y.current||m.end(e,[]);te.select(e,R)}}finally{var ne;h.unref(),(ne=y)===null||ne===void 0||ne.unref()}}})},Qv=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var i={};for(var s of r)i[s]=null;te.setNodes(e,i,n)},eg=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:s=!1}=r,{at:a=e.selection,match:o}=r;if(a){o==null&&(o=L.isPath(a)?Lr(e,a):y=>ue.isElement(y)&&m.isBlock(e,y)),L.isPath(a)&&(a=m.range(e,a));var u=q.isRange(a)?m.rangeRef(e,a):null,l=m.nodes(e,{at:a,match:o,mode:n,voids:s}),f=Array.from(l,y=>{var[,v]=y;return m.pathRef(e,v)}).reverse(),p=function(){var v=h.unref(),[g]=m.node(e,v),d=m.range(e,v);i&&u&&(d=q.intersection(u.current,d)),te.liftNodes(e,{at:d,match:D=>ue.isAncestor(g)&&g.children.includes(D),voids:s})};for(var h of f)p();u&&u.unref()}})};function eu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(r),!0).forEach(function(n){st(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var tg=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:s=!1,voids:a=!1}=n,{match:o,at:u=e.selection}=n;if(u){if(o==null&&(L.isPath(u)?o=Lr(e,u):e.isInline(r)?o=d=>ue.isElement(d)&&m.isInline(e,d)||le.isText(d):o=d=>ue.isElement(d)&&m.isBlock(e,d)),s&&q.isRange(u)){var[l,f]=q.edges(u),p=m.rangeRef(e,u,{affinity:"inward"});te.splitNodes(e,{at:f,match:o,voids:a}),te.splitNodes(e,{at:l,match:o,voids:a}),u=p.unref(),n.at==null&&te.select(e,u)}var h=Array.from(m.nodes(e,{at:u,match:e.isInline(r)?d=>ue.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:a})),y=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,g)):u;if(!D)return 0;var E=Array.from(m.nodes(e,{at:D,match:o,mode:i,voids:a}));if(E.length>0){var[B]=E,w=E[E.length-1],[,b]=B,[,x]=w;if(b.length===0&&x.length===0)return 0;var S=L.equals(b,x)?L.parent(b):L.common(b,x),U=m.range(e,b,x),P=m.node(e,S),[H]=P,j=S.length+1,M=L.next(x.slice(0,j)),N=tu(tu({},r),{},{children:[]});te.insertNodes(e,N,{at:M,voids:a}),te.moveNodes(e,{at:U,match:z=>ue.isAncestor(H)&&H.children.includes(z),to:M.concat(0),voids:a})}},v;for(var[,g]of h)v=y()}})},rg=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Bh(t,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Th(t,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jh(t,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ih(t,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Nh(t,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ah(t,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Kh(t,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Xh(t,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Iv(t,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Yh(t,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Jh(t,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Lh(t,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Av(t,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Sh(t,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ph(t,...n)},above:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Fh(t,...n)},after:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Mh(t,...n)},before:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kh(t,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Nv(t,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jv(t,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _v(t,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _h(t,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zh(t,...n)},end:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Wh(t,...n)},first:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Hh(t,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Uh(t,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cv(t,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Vh(t,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return qh(t,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Gh(t,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Zh(t,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Rv(t,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Qh(t,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ev(t,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tv(t,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return rv(t,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return nv(t,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return iv(t,...n)},last:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return sv(t,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return av(t,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ov(t,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Vv(t,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Zv(t,...n)},move:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zv(t,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Kv(t,...n)},next:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fv(t,...n)},node:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dv(t,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pv(t,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hv(t,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vv(t,...n)},path:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yv(t,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gv(t,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mv(t,...n)},point:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Dv(t,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Cv(t,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bv(t,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ev(t,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wv(t,...n)},range:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Bv(t,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Ov(t,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xv(t,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Yv(t,...n)},select:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Wv(t,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Xv(t,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Lv(t,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Hv(t,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Uv(t,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Jv(t,...n)},start:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Pv(t,...n)},string:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Fv(t,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Tv(t,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Qv(t,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return eg(t,...n)},void:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Rh(t,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return Mv(t,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tg(t,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kv(t,...n)}};return t};const ru=t=>{if(le.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=>ru(n)).join(""),r=t.align||"left";switch(t.type){case"image":return`<img src="${t.src}" class="align_${r}" />`;case"paragraph":return`<p class="align_${r}">${e}</p>`;case"blockQuote":return`<blockquote class="align_${r}">${e}</blockquote>`;case"bulletedList":return`<ul class="align_${r}">${e}</ul>`;case"headingOne":return`<h1 class="align_${r}">${e}</h1>`;case"headingTwo":return`<h2 class="align_${r}">${e}</h2>`;case"listItem":return`<li class="align_${r}">${e}</li>`;case"numberedList":return`<ol class="align_${r}">${e}</ol>`;default:return e}}return""},ng=t=>t.map(e=>ru(e)).join("");var nu={},ps={},hs={};Object.defineProperty(hs,"__esModule",{value:!0}),hs.default=og;var iu="html",su="head",Rn="body",ig=/<([a-zA-Z]+[0-9]?)/,au=/<head[^]*>/i,ou=/<body[^]*>/i,Vn=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},vs=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},uu=typeof window=="object"&&window.DOMParser;if(typeof uu=="function"){var sg=new uu,ag="text/html";vs=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),sg.parseFromString(t,ag)},Vn=vs}if(typeof document=="object"&&document.implementation){var qn=document.implementation.createHTMLDocument();Vn=function(t,e){if(e){var r=qn.documentElement.querySelector(e);return r&&(r.innerHTML=t),qn}return qn.documentElement.innerHTML=t,qn}}var Gn=typeof document=="object"&&document.createElement("template"),gs;Gn&&Gn.content&&(gs=function(t){return Gn.innerHTML=t,Gn.content.childNodes});function og(t){var e,r,n=t.match(ig),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case iu:{var s=vs(t);if(!au.test(t)){var a=s.querySelector(su);(e=a==null?void 0:a.parentNode)===null||e===void 0||e.removeChild(a)}if(!ou.test(t)){var a=s.querySelector(Rn);(r=a==null?void 0:a.parentNode)===null||r===void 0||r.removeChild(a)}return s.querySelectorAll(iu)}case su:case Rn:{var o=Vn(t).querySelectorAll(i);return ou.test(t)&&au.test(t)?o[0].parentNode.childNodes:o}default:{if(gs)return gs(t);var a=Vn(t,Rn).querySelector(Rn);return a.childNodes}}}var Zn={},ms={},ys={};(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(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=t.ElementType||(t.ElementType={}));function r(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}t.isTag=r,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})(ys);var be={},Ut=ke&&ke.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Qr=ke&&ke.__assign||function(){return Qr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Qr.apply(this,arguments)};Object.defineProperty(be,"__esModule",{value:!0}),be.cloneNode=be.hasChildren=be.isDocument=be.isDirective=be.isComment=be.isText=be.isCDATA=be.isTag=be.Element=be.Document=be.CDATA=be.NodeWithChildren=be.ProcessingInstruction=be.Comment=be.Text=be.DataNode=be.Node=void 0;var dt=ys,Cs=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),bs(this,e)},t}();be.Node=Cs;var Kn=function(t){Ut(e,t);function e(r){var n=t.call(this)||this;return n.data=r,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!1,configurable:!0}),e}(Cs);be.DataNode=Kn;var lu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Text,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(Kn);be.Text=lu;var cu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Comment,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(Kn);be.Comment=cu;var fu=function(t){Ut(e,t);function e(r,n){var i=t.call(this,n)||this;return i.name=r,i.type=dt.ElementType.Directive,i}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(Kn);be.ProcessingInstruction=fu;var Yn=function(t){Ut(e,t);function e(r){var n=t.call(this)||this;return n.children=r,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var r;return(r=this.children[0])!==null&&r!==void 0?r: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(r){this.children=r},enumerable:!1,configurable:!0}),e}(Cs);be.NodeWithChildren=Yn;var du=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Yn);be.CDATA=du;var pu=function(t){Ut(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=dt.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Yn);be.Document=pu;var hu=function(t){Ut(e,t);function e(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?dt.ElementType.Script:r==="style"?dt.ElementType.Style:dt.ElementType.Tag);var a=t.call(this,i)||this;return a.name=r,a.attribs=n,a.type=s,a}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(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),e}(Yn);be.Element=hu;function vu(t){return(0,dt.isTag)(t)}be.isTag=vu;function gu(t){return t.type===dt.ElementType.CDATA}be.isCDATA=gu;function mu(t){return t.type===dt.ElementType.Text}be.isText=mu;function yu(t){return t.type===dt.ElementType.Comment}be.isComment=yu;function Cu(t){return t.type===dt.ElementType.Directive}be.isDirective=Cu;function bu(t){return t.type===dt.ElementType.Root}be.isDocument=bu;function ug(t){return Object.prototype.hasOwnProperty.call(t,"children")}be.hasChildren=ug;function bs(t,e){e===void 0&&(e=!1);var r;if(mu(t))r=new lu(t.data);else if(yu(t))r=new cu(t.data);else if(vu(t)){var n=e?Ds(t.children):[],i=new hu(t.name,Qr({},t.attribs),n);n.forEach(function(u){return u.parent=i}),t.namespace!=null&&(i.namespace=t.namespace),t["x-attribsNamespace"]&&(i["x-attribsNamespace"]=Qr({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(i["x-attribsPrefix"]=Qr({},t["x-attribsPrefix"])),r=i}else if(gu(t)){var n=e?Ds(t.children):[],s=new du(n);n.forEach(function(l){return l.parent=s}),r=s}else if(bu(t)){var n=e?Ds(t.children):[],a=new pu(n);n.forEach(function(l){return l.parent=a}),t["x-mode"]&&(a["x-mode"]=t["x-mode"]),r=a}else if(Cu(t)){var o=new fu(t.name,t.data);t["x-name"]!=null&&(o["x-name"]=t["x-name"],o["x-publicId"]=t["x-publicId"],o["x-systemId"]=t["x-systemId"]),r=o}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}be.cloneNode=bs;function Ds(t){for(var e=t.map(function(n){return bs(n,!0)}),r=1;r<e.length;r++)e[r].prev=e[r-1],e[r-1].next=e[r];return e}(function(t){var e=ke&&ke.__createBinding||(Object.create?function(o,u,l,f){f===void 0&&(f=l);var p=Object.getOwnPropertyDescriptor(u,l);(!p||("get"in p?!u.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(o,f,p)}:function(o,u,l,f){f===void 0&&(f=l),o[f]=u[l]}),r=ke&&ke.__exportStar||function(o,u){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,o,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var n=ys,i=be;r(be,t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},a=function(){function o(u,l,f){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof l=="function"&&(f=l,l=s),typeof u=="object"&&(l=u,u=void 0),this.callback=u??null,this.options=l??s,this.elementCB=f??null}return o.prototype.onparserinit=function(u){this.parser=u},o.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},o.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},o.prototype.onerror=function(u){this.handleCallback(u)},o.prototype.onclosetag=function(){this.lastNode=null;var u=this.tagStack.pop();this.options.withEndIndices&&(u.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(u)},o.prototype.onopentag=function(u,l){var f=this.options.xmlMode?n.ElementType.Tag:void 0,p=new i.Element(u,l,void 0,f);this.addNode(p),this.tagStack.push(p)},o.prototype.ontext=function(u){var l=this.lastNode;if(l&&l.type===n.ElementType.Text)l.data+=u,this.options.withEndIndices&&(l.endIndex=this.parser.endIndex);else{var f=new i.Text(u);this.addNode(f),this.lastNode=f}},o.prototype.oncomment=function(u){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=u;return}var l=new i.Comment(u);this.addNode(l),this.lastNode=l},o.prototype.oncommentend=function(){this.lastNode=null},o.prototype.oncdatastart=function(){var u=new i.Text(""),l=new i.CDATA([u]);this.addNode(l),u.parent=l,this.lastNode=u},o.prototype.oncdataend=function(){this.lastNode=null},o.prototype.onprocessinginstruction=function(u,l){var f=new i.ProcessingInstruction(u,l);this.addNode(f)},o.prototype.handleCallback=function(u){if(typeof this.callback=="function")this.callback(u,this.dom);else if(u)throw u},o.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},o}();t.DomHandler=a,t.default=a})(ms);var Du={};(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,r){return e[r.toLowerCase()]=r,e},{})})(Du),Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.formatAttributes=Eu,Zn.formatDOM=wu;var Xn=ms,lg=Du;function cg(t){return lg.CASE_SENSITIVE_TAG_NAMES_MAP[t]}function Eu(t){for(var e={},r=0,n=t.length;r<n;r++){var i=t[r];e[i.name]=i.value}return e}function fg(t){t=t.toLowerCase();var e=cg(t);return e||t}function wu(t,e,r){e===void 0&&(e=null);for(var n=[],i,s=0,a=t.length;s<a;s++){var o=t[s];switch(o.nodeType){case 1:{var u=fg(o.nodeName);i=new Xn.Element(u,Eu(o.attributes)),i.children=wu(u==="template"?o.content.childNodes:o.childNodes,i);break}case 3:i=new Xn.Text(o.nodeValue);break;case 8:i=new Xn.Comment(o.nodeValue);break;default:continue}var l=n[s-1]||null;l&&(l.next=i),i.parent=e,i.prev=l,i.next=null,n.push(i)}return r&&(i=new Xn.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r),i.next=n[0]||null,i.parent=e,n.unshift(i),n[1]&&(n[1].prev=n[0])),n}var dg=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=gg;var pg=dg(hs),hg=Zn,vg=/<(![a-zA-Z\s]+)>/;function gg(t){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];var e=t.match(vg),r=e?e[1]:void 0;return(0,hg.formatDOM)((0,pg.default)(t),null,r)}var $n={},xt={},Jn={},mg=0;Jn.SAME=mg;var yg=1;Jn.CAMELCASE=yg,Jn.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 Ou=0,Rt=1,Qn=2,ei=3,Es=4,xu=5,Bu=6;function Cg(t){return tt.hasOwnProperty(t)?tt[t]:null}function at(t,e,r,n,i,s,a){this.acceptsBooleans=e===Qn||e===ei||e===Es,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}const tt={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{tt[t]=new at(t,Ou,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([t,e])=>{tt[t]=new at(t,Rt,!1,e,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{tt[t]=new at(t,Qn,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{tt[t]=new at(t,Qn,!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=>{tt[t]=new at(t,ei,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{tt[t]=new at(t,ei,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{tt[t]=new at(t,Es,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{tt[t]=new at(t,Bu,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{tt[t]=new at(t,xu,!1,t.toLowerCase(),null,!1,!1)});const ws=/[\-\:]([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(ws,Os);tt[e]=new at(e,Rt,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(ws,Os);tt[e]=new at(e,Rt,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(ws,Os);tt[e]=new at(e,Rt,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{tt[t]=new at(t,Rt,!1,t.toLowerCase(),null,!1,!1)});const bg="xlinkHref";tt[bg]=new at("xlinkHref",Rt,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{tt[t]=new at(t,Rt,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:Dg,SAME:Eg,possibleStandardNames:Su}=Jn,wg=":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",Og=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+wg+"]*$")),xg=Object.keys(Su).reduce((t,e)=>{const r=Su[e];return r===Eg?t[e]=e:r===Dg?t[e.toLowerCase()]=e:t[e]=r,t},{});xt.BOOLEAN=ei,xt.BOOLEANISH_STRING=Qn,xt.NUMERIC=xu,xt.OVERLOADED_BOOLEAN=Es,xt.POSITIVE_NUMERIC=Bu,xt.RESERVED=Ou,xt.STRING=Rt,xt.getPropertyInfo=Cg,xt.isCustomAttribute=Og,xt.possibleStandardNames=xg;var xs={},Bs={},Au=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Bg=/\n/g,Sg=/^\s*/,Ag=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Lg=/^:\s*/,Pg=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Fg=/^[;\s]*/,Tg=/^\s+|\s+$/g,Mg=`
36
+ `,Lu="/",Pu="*",pr="",kg="comment",jg="declaration",Ig=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(v){var g=v.match(Bg);g&&(r+=g.length);var d=v.lastIndexOf(Mg);n=~d?v.length-d:n+v.length}function s(){var v={line:r,column:n};return function(g){return g.position=new a(v),l(),g}}function a(v){this.start=v,this.end={line:r,column:n},this.source=e.source}a.prototype.content=t;function o(v){var g=new Error(e.source+":"+r+":"+n+": "+v);if(g.reason=v,g.filename=e.source,g.line=r,g.column=n,g.source=t,!e.silent)throw g}function u(v){var g=v.exec(t);if(g){var d=g[0];return i(d),t=t.slice(d.length),g}}function l(){u(Sg)}function f(v){var g;for(v=v||[];g=p();)g!==!1&&v.push(g);return v}function p(){var v=s();if(!(Lu!=t.charAt(0)||Pu!=t.charAt(1))){for(var g=2;pr!=t.charAt(g)&&(Pu!=t.charAt(g)||Lu!=t.charAt(g+1));)++g;if(g+=2,pr===t.charAt(g-1))return o("End of comment missing");var d=t.slice(2,g-2);return n+=2,i(d),t=t.slice(g),n+=2,v({type:kg,comment:d})}}function h(){var v=s(),g=u(Ag);if(g){if(p(),!u(Lg))return o("property missing ':'");var d=u(Pg),D=v({type:jg,property:Fu(g[0].replace(Au,pr)),value:d?Fu(d[0].replace(Au,pr)):pr});return u(Fg),D}}function y(){var v=[];f(v);for(var g;g=h();)g!==!1&&(v.push(g),f(v));return v}return l(),y()};function Fu(t){return t?t.replace(Tg,pr):pr}var Ng=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=zg;var _g=Ng(Ig);function zg(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,_g.default)(t),i=typeof e=="function";return n.forEach(function(s){if(s.type==="declaration"){var a=s.property,o=s.value;i?e(a,o,s):o&&(r=r||{},r[a]=o)}}),r}var ti={};Object.defineProperty(ti,"__esModule",{value:!0}),ti.camelCase=void 0;var Wg=/^--[a-zA-Z0-9_-]+$/,Hg=/-([a-z])/g,Ug=/^[^-]+$/,Rg=/^-(webkit|moz|ms|o|khtml)-/,Vg=/^-(ms)-/,qg=function(t){return!t||Ug.test(t)||Wg.test(t)},Gg=function(t,e){return e.toUpperCase()},Tu=function(t,e){return"".concat(e,"-")},Zg=function(t,e){return e===void 0&&(e={}),qg(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(Vg,Tu):t=t.replace(Rg,Tu),t.replace(Hg,Gg))};ti.camelCase=Zg;var Kg=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Yg=Kg(Bs),Xg=ti;function Ss(t,e){var r={};return!t||typeof t!="string"||(0,Yg.default)(t,function(n,i){n&&i&&(r[(0,Xg.camelCase)(n,e)]=i)}),r}Ss.default=Ss;var $g=Ss;(function(t){var e=ke&&ke.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=s,t.setStyleProp=o;var r=c,n=e($g),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(f,p){return f.includes("-")?!i.has(f):!!(p&&typeof p.is=="string")}var a={reactCompat:!0};function o(f,p){if(typeof f=="string"){if(!f.trim()){p.style={};return}try{p.style=(0,n.default)(f,a)}catch{p.style={}}}}t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var u=function(f){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(f.name)};t.canTextBeChildOfNode=u;var l=function(f){return f};t.returnFirstArg=l})(xs),Object.defineProperty($n,"__esModule",{value:!0}),$n.default=tm;var en=xt,Mu=xs,Jg=["checked","value"],Qg=["input","select","textarea"],em={reset:!0,submit:!0};function tm(t,e){t===void 0&&(t={});var r={},n=!!(t.type&&em[t.type]);for(var i in t){var s=t[i];if((0,en.isCustomAttribute)(i)){r[i]=s;continue}var a=i.toLowerCase(),o=ku(a);if(o){var u=(0,en.getPropertyInfo)(o);switch(Jg.includes(o)&&Qg.includes(e)&&!n&&(o=ku("default"+a)),r[o]=s,u&&u.type){case en.BOOLEAN:r[o]=!0;break;case en.OVERLOADED_BOOLEAN:s===""&&(r[o]=!0);break}continue}Mu.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,Mu.setStyleProp)(t.style,r),r}function ku(t){return en.possibleStandardNames[t]}var As={},rm=ke&&ke.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(As,"__esModule",{value:!0}),As.default=ju;var Ls=c,nm=rm($n),tn=xs,im={cloneElement:Ls.cloneElement,createElement:Ls.createElement,isValidElement:Ls.isValidElement};function ju(t,e){e===void 0&&(e={});for(var r=[],n=typeof e.replace=="function",i=e.transform||tn.returnFirstArg,s=e.library||im,a=s.cloneElement,o=s.createElement,u=s.isValidElement,l=t.length,f=0;f<l;f++){var p=t[f];if(n){var h=e.replace(p,f);if(u(h)){l>1&&(h=a(h,{key:h.key||f})),r.push(i(h,p,f));continue}}if(p.type==="text"){var y=!p.data.trim().length;if(y&&p.parent&&!(0,tn.canTextBeChildOfNode)(p.parent)||e.trim&&y)continue;r.push(i(p.data,p,f));continue}var v=p,g={};sm(v)?((0,tn.setStyleProp)(v.attribs.style,v.attribs),g=v.attribs):v.attribs&&(g=(0,nm.default)(v.attribs,v.name));var d=void 0;switch(p.type){case"script":case"style":p.children[0]&&(g.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?g.defaultValue=p.children[0].data:p.children&&p.children.length&&(d=ju(p.children,e));break;default:continue}l>1&&(g.key=f),r.push(i(o(p.name,g,d),p,f))}return r.length===1?r[0]:r}function sm(t){return tn.PRESERVE_CUSTOM_ATTRIBUTES&&t.type==="tag"&&(0,tn.isCustomComponent)(t.name,t.attribs)}(function(t){var e=ke&&ke.__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=o;var r=e(ps);t.htmlToDOM=r.default;var n=e($n);t.attributesToProps=n.default;var i=e(As);t.domToReact=i.default;var s=ms;Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var a={lowerCaseAttributeNames:!1};function o(u,l){if(typeof u!="string")throw new TypeError("First argument must be a string");return u?(0,i.default)((0,r.default)(u,(l==null?void 0:l.htmlparser2)||a),l):[]}})(nu);const Iu=Pn(nu),am=Iu.default||Iu,Ps=t=>{var n;if(typeof t=="string")return{text:t};const e=Array.isArray(t.props.children)?t.props.children.map(i=>Ps(i)):[{text:t.props.children||""}],r=(n=t.props.className)==null?void 0:n.replace("align_","");switch(t.type){case"img":return{type:"image",align:r,src:t.props.src,children:[{text:""}]};case"p":return{type:"paragraph",align:r,children:e};case"blockquote":return{type:"blockQuote",align:r,children:e};case"ul":return{type:"bulletedList",align:r,children:e};case"ol":return{type:"numberedList",align:r,children:e};case"li":return{type:"listItem",align:r,children:e};case"h1":return{type:"headingOne",align:r,children:e};case"h2":return{type:"headingTwo",align:r,children:e};case"strong":return{text:t.props.children,bold:!0};case"code":return{text:t.props.children,code:!0};case"em":return{text:t.props.children,italic:!0};case"u":return{text:t.props.children,underline:!0};default:return{text:t.props.children||""}}},om=t=>{const e=am(t);return Array.isArray(e)?e.map(r=>typeof r=="string"?{text:r}:Ps(r)):typeof e=="string"?[{text:e}]:[Ps(e)]},um=t=>/<\/?[a-z][\s\S]*>/i.test(t);function Fs(t,e,r){if(!t)return C.jsx(C.Fragment,{});if(typeof t=="string")return C.jsx("p",{className:r,children:t});const n=t;return C.jsx("p",{className:r,children:C.jsx(n,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function lm(t){const{variant:e="ghost",scheme:r="primary",size:n="md",leftIcon:i,rightIcon:s,className:a="",children:o,...u}=t,f={md:12,lg:14}[n],p=`arkynBadge ${e} ${r} ${n} ${a}`;return C.jsxs("div",{className:p.trim(),...u,children:[Fn(f,i),o,Fn(f,i)]})}function cm(t){const{className:e,...r}=t,n=`arkynCard ${e}`;return C.jsx("div",{className:n.trim(),...r})}function fm(t){const{className:e,orientation:r="horizontal",...n}=t,i=`arkynDivider ${r} ${e}`;return C.jsx("div",{className:i.trim(),...n})}function dm(t){const{className:e,...r}=t,n=`arkynSkeleton ${e}`;return C.jsx("aside",{className:n.trim(),...r})}function pm(t){const{emptyMessage:e="Nenhum dado adicionado.",className:r,children:n,...i}=t,s=`arkynTableBody ${r}`,a=c.Children.count(n)===0;return C.jsx("tbody",{className:s.trim(),...i,children:a?C.jsx("tr",{className:"arkynTableBodyEmptyLine",children:C.jsx("td",{colSpan:100,children:C.jsx("div",{children:e})})}):n})}function hm(t){const{className:e,children:r,...n}=t,i=`arkynTableCaption ${e}`;return C.jsx("caption",{className:i.trim(),...n,children:C.jsx("div",{className:"arkynTableCaptionContent",children:r})})}function vm(t){const{children:e,className:r,...n}=t,i=`arkynTableContainer ${r}`;return C.jsx("div",{className:i.trim(),...n,children:C.jsx("table",{children:e})})}function gm(t){const{className:e,children:r,...n}=t,i=`arkynTableFooter ${e}`;return C.jsxs("tfoot",{className:i.trim(),...n,children:[C.jsx("tr",{className:"spacingRow"}),C.jsx("tr",{children:C.jsx("th",{colSpan:100,children:C.jsx("div",{className:"arkynTableFooterContent",children:r})})})]})}function mm(t){const{className:e,children:r,...n}=t,i=`arkynTableHeader ${e}`;return C.jsxs("thead",{className:i.trim(),...n,children:[C.jsx("tr",{children:r}),C.jsx("tr",{className:"spacingRow"})]})}function rn(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",loadingText:i,size:s="md",leftIcon:a,rightIcon:o,disabled:u,className:l="",children:f,...p}=t,y={xs:12,sm:16,md:20,lg:24}[s],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${n} ${r} ${s} ${i?"loadingTextTrue":"loadingTextFalse"} ${l}`;return C.jsxs("button",{className:d,disabled:u||e,...p,children:[C.jsxs("div",{className:"arkynButtonSpinner",children:[C.jsx(he.Loader2,{size:y,strokeWidth:2.5}),i&&i]}),C.jsxs("div",{className:"arkynButtonContent",children:[Fn(y,a),f,Fn(y,o)]})]})}function Ts(){const t=At.useActionData(),e=At.useNavigation(),r=At.useFetchers(),[n,i]=c.useState(null);function s(l,f){return JSON.stringify(l)===JSON.stringify(f)}function a(){n&&i(null)}c.useEffect(()=>{var f,p;let l=((p=(f=r[0])==null?void 0:f.data)==null?void 0:p.fieldErrors)||{};s(n,l)||Object.entries(l).length!==0&&i(l)},[r,t]),c.useEffect(()=>{var l;((l=r[0])==null?void 0:l.state)==="submitting"&&a()},[r,e]);const o=(t==null?void 0:t.fieldErrors)||n;let u={};return Object.entries(o||{}).forEach(([l,f])=>{typeof f=="string"&&typeof l=="string"&&(u[l]=f)}),u}const Nu=c.createContext({});function Ms(t){var p;const{children:e,className:r,id:n,...i}=t,s=Ts(),a=c.useRef(null),o=((p=a.current)==null?void 0:p.name)||"",u=(s==null?void 0:s[o])||null,l=c.useId(),f=`arkynFormController ${r}`;return C.jsx(Nu.Provider,{value:{error:u,id:l,inputRef:a},children:C.jsx("section",{id:n||o||void 0,className:f.trim(),...i,children:e})})}function ot(){return c.useContext(Nu)}function ym(t){const{name:e,className:r="",size:n="md",isError:i,defaultChecked:s=!1,checked:a=null,onCheck:o,value:u,...l}=t,{id:f,inputRef:p,error:h}=ot(),y=i||!!h,[v,g]=c.useState(s||!1),d=typeof a=="boolean"?a:v,B=`arkynCheckbox ${n} ${y?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${r}`;function w(){const b=v;g(!b),o&&o(b?"":u||"checked")}return C.jsxs("button",{id:f,type:"button",className:B,onClick:w,...l,children:[C.jsx("input",{type:"hidden",name:e,ref:p,value:d?u||"checked":""}),C.jsx(he.Check,{})]})}function Cm(t){const{children:e,className:r,...n}=t,i=`arkynFormError ${r}`,{error:s}=ot();return e?C.jsx("strong",{className:i.trim(),...n,children:e}):s?C.jsx("strong",{className:i.trim(),...n,children:s}):C.jsx(C.Fragment,{})}function ks(t){const{showAsterisk:e=!1,className:r="",...n}=t,{id:i}=ot(),a=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${r}`;return C.jsx("label",{className:a.trim(),htmlFor:i,...n})}function _u(t){const{isLoading:e=!1,scheme:r="primary",variant:n="solid",size:i="md",icon:s,disabled:a,className:o="",...u}=t,l={xs:12,sm:16,md:20,lg:24},p=`arkynIconButton ${n} ${r} ${i} ${e?"loadingTrue":"loadingFalse"} ${o}`;return C.jsxs("button",{disabled:a||e,className:p.trim(),...u,children:[C.jsx("div",{className:"arkynIconButtonSpinner",children:C.jsx(he.Loader2,{size:l[i],strokeWidth:2.5})}),C.jsx("div",{className:"arkynIconButtonContent",children:C.jsx(s,{size:l[i],strokeWidth:2.5})})]})}function zu(t){const{text:e,size:r="lg",children:n,orientation:i="top",className:s="",...a}=t,o=`arkynTooltip ${r} ${i} ${s}`;return C.jsxs("div",{className:o.trim(),...a,children:[n,C.jsx("div",{className:"arkynTooltipText",children:e})]})}function bm(t){const{disabled:e,filePath:r,isLoading:n,acceptImage:i,changeImageButtonText:s,handleSelectFile:a,reSendImage:o}=t;function u(){if(e)return;const l=document.createElement("input");l.type="file",l.accept=i,l.onchange=f=>{var h;const p=(h=f.target.files)==null?void 0:h[0];p&&a(p)},l.click()}return C.jsxs("div",{className:"arkynImageUploadHasFileContent",style:{backgroundImage:`url("${r}")`},children:[o&&C.jsx(zu,{orientation:"bottom",text:"Reenviar imagem",children:C.jsx(_u,{type:"button","aria-label":"resend image",variant:"outline",scheme:"danger",size:"sm",isLoading:n,onClick:o,icon:he.RefreshCw,disabled:e})}),C.jsx(rn,{isLoading:n,onClick:u,variant:"outline",size:"sm",type:"button",disabled:e,children:s})]})}function Dm(t){const{error:e}=t,r="arkynImageUploadError";return e?C.jsx("strong",{className:r,children:e}):C.jsx(C.Fragment,{})}function Em(t){const{label:e,showAsterisk:r}=t,i=`arkynImageUploadLabel ${r?"asteriskTrue":"asteriskFalse"}`;return C.jsx("strong",{className:i.trim(),children:e})}function wm(t){const{dropImageText:e,isLoading:r,acceptImage:n,handleSelectFile:i,selectImageButtonText:s,disabled:a}=t;function o(l){if(a)return;l.preventDefault();const f=l.dataTransfer.files[0];f&&i(f)}function u(){if(a)return;const l=document.createElement("input");l.type="file",l.accept=n,l.onchange=f=>{var h;const p=(h=f.target.files)==null?void 0:h[0];p&&i(p)},l.click()}return C.jsxs("div",{onDrop:o,className:"arkynImageUploadNoFileContent",children:[C.jsx(rn,{isLoading:r,onClick:u,variant:"ghost",size:"sm",type:"button",disabled:a,children:s}),C.jsx("p",{children:e})]})}function Wu(t){const{name:e,defaultValue:r="",label:n,showAsterisk:i=!1,action:s,fileName:a="file",method:o="POST",acceptImage:u="image/*",fileResponseName:l="url",changeImageButtonText:f="Alterar imagem",selectImageButtonText:p="Selecionar imagem",dropImageText:h="Ou arraste e solte a imagem aqui",onUpload:y,disabled:v=!1}=t,d=Ts()[e],[D,E]=c.useState(r),[B,w]=c.useState(""),[b,x]=c.useState(null),[S,U]=c.useState(r),[P,H]=c.useState(!1);async function j(R){if(v)return;H(!0),x(R),w("");const ne=new FormData;ne.append(a,R),await fetch(s,{method:o,body:ne}).then(async Q=>await Q.json()).then(Q=>{Q!=null&&Q.error?w(Q.error):E(Q==null?void 0:Q[l]),y&&y(Q==null?void 0:Q[l])}).catch(Q=>{console.error(Q),w("Erro ao enviar imagem")}).finally(()=>H(!1))}function M(R){v||(U(URL.createObjectURL(R)),j(R))}const N=d||B,X=`arkynImageUpload ${N?"hasError":"noHasError"} ${S?"hasImage":"noHasImage"}`;return C.jsxs("div",{className:"arkynImageUploadContainer",children:[n&&C.jsx(Em,{label:n,showAsterisk:i}),C.jsxs("div",{className:X,children:[C.jsx("input",{type:"hidden",name:e,value:D||""}),!S&&C.jsx(wm,{disabled:v,isLoading:P,acceptImage:u,dropImageText:h,handleSelectFile:M,selectImageButtonText:p}),S&&C.jsx(bm,{disabled:v,isLoading:P,acceptImage:u,filePath:S,handleSelectFile:M,changeImageButtonText:f,reSendImage:N&&b?()=>j(b):void 0})]}),N&&C.jsx(Dm,{error:N})]})}function Vt(t,e,r){if(!t)return C.jsx(C.Fragment,{});if(typeof t=="string")return C.jsx("p",{className:r,children:t});const n=t;return C.jsx("p",{className:r,children:C.jsx(n,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function js(t){return t&&t.replace(/[^0-9]/g,"")}function Hu(t,e){let r="",n=0;return Array.from(t).forEach((i,s)=>{e[s+n].match(/[0-9]/)||(r+=e[s+n],n++),r+=i}),r}function Uu(t){return t.length>11?"CNPJ":"CPF"}const Is={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Ru=js(Is.CNPJ).length;function Om(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,defaultValue:h,readOnly:y,onFocus:v,onBlur:g,title:d,style:D,onChange:E,...B}=t;function w(z){let W=js(z);const X=Uu(W);if(!(W.length>Ru))return W=Hu(W,Is[X]),W}const b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||y||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,N={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,N,"prefix"),sufix:Vt(u,N,"sufix"),LeftIcon:l,RightIcon:f,defaultValue:w(h||""),disabled:p,readOnly:y,onFocus:v,onBlur:g,title:d,style:D,onChange:E,loadingPosition:b,iconSize:N,Spinner:C.jsx(he.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...B}}function xm(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,Spinner:S,onChange:U,value:P,defaultValue:H,...j}=Om({...t,id:s,isError:u},e),[M,N]=c.useState(H),z=E&&!D,W=x&&!D,X=d==="left"&&D,R=d==="right"&&D;function ne(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function Q($){let V=js($.target.value);const re=Uu(V);V.length>Ru||(V=Hu(V,Is[re]),$.target.value=V,N(V),U&&U($))}function k($){r(!0),w&&w($)}function G($){r(!1),b&&b($)}return C.jsxs("section",{title:f,style:p,onClick:ne,className:h,children:[y,X&&S,z&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx("input",{disabled:l||D,readOnly:B,ref:o,value:P||M,onFocus:k,onChange:Q,onBlur:G,...j}),W&&C.jsx(x,{size:g,strokeWidth:2.5}),R&&S,v]})}const Bm=3,Sm=(t="pt-BR",e,r="BRL",n=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:r,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(n?Bm:0),ri=2,Vu=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),Ns=t=>{let e=t;return typeof t=="string"?(e=Vu(t),e%1!==0&&(e=e.toFixed(ri))):e=Number.isInteger(t)?Number(t)*10**ri:t.toFixed(ri),Vu(e)/10**ri},qu=(t,e,r)=>{if(!e)return[0,""];const n=Ns(e),i=Sm(t,n,r);return[n,i]};function Am(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,max:D=1e9,locale:E="pt-BR",currency:B="BRL",...w}=t,b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,N={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,N,"prefix"),sufix:Vt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,locale:E,currency:B,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,max:D,loadingPosition:b,iconSize:N,Spinner:C.jsx(he.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...w}}function Lm(t){const[e,r]=c.useState(!1),[n,i]=c.useState("0"),s=c.useRef(null),{inputRef:a,id:o,error:u}=ot(),l=a||s,f=t.isError||!!u,{disabled:p,title:h,style:y,className:v,prefix:g,sufix:d,iconSize:D,loadingPosition:E,isLoading:B,LeftIcon:w,readOnly:b,onFocus:x,onBlur:S,RightIcon:U,Spinner:P,value:H,max:j,onChangeValue:M,onKeyPress:N,currency:z,locale:W,name:X,defaultValue:R,...ne}=Am({...t,id:o,isError:f},e),Q=w&&!B,k=U&&!B,G=E==="left"&&B,$=E==="right"&&B;function V(){p||!(l!=null&&l.current)||(r(!0),l.current.focus())}function re(I){r(!0),x&&x(I)}function F(I){r(!1),S&&S(I)}const O=I=>{const[Z,ee]=qu(W,I,z);return!j||Z<=j?(i(ee),[Z,ee]):[Ns(n),n]},_=I=>{I.preventDefault();const[Z,ee]=O(I.target.value);M&&M(I,String(Z),String(ee))},T=I=>N&&N(I,I.key,I.key);return c.useEffect(()=>{const I=H||+R||void 0,[,Z]=qu(W,I,z);i(Z)},[z,R,H]),C.jsxs("section",{title:h,style:y,onClick:V,className:v,children:[g,G&&P,Q&&C.jsx(w,{size:D,strokeWidth:2.5}),C.jsx("input",{value:n,onChange:_,onBlur:F,onFocus:re,onKeyUp:T,disabled:p||B,readOnly:b,...ne}),C.jsx("input",{type:"hidden",ref:l,name:X,value:Ns(n)}),$&&P,k&&C.jsx(U,{size:D,strokeWidth:2.5}),d]})}function Pm(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,showMask:E=!1,type:B,...w}=t,b=f?"right":"left",j=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,N={md:20,lg:20}[i];return{isLoading:r,className:j,prefix:Vt(o,N,"prefix"),sufix:Vt(u,N,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,loadingPosition:b,iconSize:N,showMask:E,Spinner:C.jsx(he.Loader2,{className:"spinner",size:N,strokeWidth:2.5}),...w}}const Fm=c.forwardRef((t,e)=>C.jsx("input",{ref:e,...t}));function Tm(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,Spinner:S,...U}=Pm({...t,id:s,isError:u},e),P=E&&!D,H=x&&!D,j=d==="left"&&D,M=d==="right"&&D;function N(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function z(X){r(!0),w&&w(X)}function W(X){r(!1),b&&b(X)}return C.jsxs("section",{title:f,style:p,onClick:N,className:h,children:[y,j&&S,P&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx(mp.InputMask,{component:Fm,ref:o,onFocus:z,onBlur:W,disabled:l,...U}),H&&C.jsx(x,{size:g,strokeWidth:2.5}),M&&S,v]})}function Mm(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,sufix:u,leftIcon:l,rightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,...E}=t,B=f?"right":"left",P=`arkyn_input ${o?"hasPrefix":""} ${u?"hasSufix":""} ${a} ${i} ${p||h||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,j={md:20,lg:20}[i];return{isLoading:r,className:P,prefix:Vt(o,j,"prefix"),sufix:Vt(u,j,"sufix"),LeftIcon:l,RightIcon:f,disabled:p,readOnly:h,onFocus:y,onBlur:v,title:g,style:d,onChange:D,loadingPosition:B,iconSize:j,Spinner:C.jsx(he.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...E}}function km(t){const[e,r]=c.useState(!1),n=c.useRef(null),{inputRef:i,id:s,error:a}=ot(),o=i||n,u=t.isError||!!a,{disabled:l,title:f,style:p,className:h,prefix:y,sufix:v,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:E,readOnly:B,onFocus:w,onBlur:b,RightIcon:x,type:S,Spinner:U,...P}=Mm({...t,id:s,isError:u},e),H=E&&!D,j=x&&!D,M=d==="left"&&D,N=d==="right"&&D;function z(){l||!(o!=null&&o.current)||(r(!0),o.current.focus())}function W(R){r(!0),w&&w(R)}function X(R){r(!1),b&&b(R)}return S==="hidden"?C.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:o,...P}):C.jsxs("section",{title:f,style:p,onClick:z,className:h,children:[y,M&&U,H&&C.jsx(E,{size:g,strokeWidth:2.5}),C.jsx("input",{disabled:l||D,readOnly:B,ref:o,onFocus:W,onBlur:X,type:S,...P}),j&&C.jsx(x,{size:g,strokeWidth:2.5}),N&&U,v]})}function nn(t){return t.type==="currency"?C.jsx(Lm,{...t}):t.type==="masked"?C.jsx(Tm,{...t}):t.type==="cpf-cnpj"?C.jsx(xm,{...t}):C.jsx(km,{...t})}function jm(t){const{iconSize:e,isLoading:r,disabled:n,readOnly:i,isFocused:s}=t,u=`arkynMultiSelectChevron ${n||i?"notAnimate":""} ${s?"focused":""}`;return r?C.jsx(C.Fragment,{}):C.jsx(he.ChevronDown,{className:u,size:e,strokeWidth:2.5})}function Im(t){const{children:e,handleContainerFocus:r,disabled:n,isError:i,isLoading:s,isFocused:a,className:o,readOnly:u,variant:l,size:f,id:p,prefixExists:h}=t,y=h?"hasPrefix":"",v=i?"errored":"",g=n||u||s?"opacity":"",d=a?"focused":"";return C.jsx("section",{onClick:r,id:p,className:`arkynMultiSelectContainer ${y} ${l} ${f} ${g} ${v} ${d} ${o}`,children:e})}function Nm(t){const{children:e,size:r}=t,n=`arkynMultiSelectContent ${r}`;return C.jsx("div",{className:n,children:e})}function _m(t){const{label:e,value:r,handleChangeValue:n}=t;return C.jsxs("div",{className:"arkynMultiSelectMark",children:[e,C.jsx("button",{type:"button",onClick:i=>{i.stopPropagation(),n(r)},children:C.jsx(he.X,{})})]})}function zm(t){const{label:e,optionHasSelected:r,handleChangeValue:n,value:i,size:s}=t,a=r(i)?"active":"",o=`arkynMultiSelectOption ${s} ${a}`;return C.jsxs("div",{onClick:()=>n(i),className:o,children:[e," ",C.jsx(he.Check,{})]})}function Wm(t){const{children:e,isFocused:r,isSearchable:n,onSearch:i}=t;function s(a){n&&i(a.target.value)}return r?C.jsxs("div",{className:"arkynMultiSelectOptionsContainer",children:[n&&C.jsx(nn,{type:"search",name:"search-select",variant:"underline",leftIcon:he.Search,onChange:s}),e]}):C.jsx(C.Fragment,{})}function Hm(t){const{isFocused:e,handleBlur:r}=t;return e?C.jsx("aside",{className:"arkynMultiSelectOverlay",onClick:r}):C.jsx(C.Fragment,{})}function Um(t){const{iconSize:e,isLoading:r}=t;return r?C.jsx(he.Loader2,{className:"arkynMultiSelectSpinner",size:e,strokeWidth:2.5}):C.jsx(C.Fragment,{})}function Rm(t){const{name:e,options:r,className:n="",placeholder:i="Selecione...",closeOnSelect:s=!1,defaultValue:a=[],isError:o,isLoading:u=!1,readOnly:l=!1,isSearchable:f=!1,leftIcon:p,onSearch:h,onSelect:y,onBlur:v,notFoundText:g="Sem opções disponíveis",onFocus:d,disabled:D=!1,prefix:E,size:B="md",value:w,variant:b="solid"}=t,x=ot(),S=c.useRef(null),U=x.inputRef||S,P=x.id,H=o||!!x.error,M={md:20,lg:20}[B],N=Fs(E,M,"prefix"),[z,W]=c.useState(""),[X,R]=c.useState(!1),[ne,Q]=c.useState(a),k=w||ne;function G(T){return k.includes(T)}function $(T){const I=r.find(Z=>Z.value===T);return(I==null?void 0:I.label)||""}function V(){D||!(U!=null&&U.current)||X||(R(!0),U.current.focus(),d&&d())}function re(){R(!1),v&&U.current&&U.current.blur()}function F(T){W(T),h&&h(T)}function O(T){G(T)?Q(ne.filter(I=>I!==T)):Q([...ne,T]),y&&y(ne),s&&re()}const _=r.filter(T=>!!(t.onSearch||!t.isSearchable||T.label.toLowerCase().includes(z.toLowerCase())));return C.jsxs(Im,{handleContainerFocus:V,disabled:D,isError:H,isFocused:X,isLoading:u,readOnly:l,size:B,variant:b,className:n,prefixExists:!!E,id:P,children:[C.jsx("input",{ref:U,name:e,value:JSON.stringify(k),type:"hidden"}),N,p&&C.jsx(p,{size:M,strokeWidth:2.5}),C.jsxs(Nm,{size:B,children:[k.map(T=>C.jsx(_m,{label:$(T),value:T,handleChangeValue:O},T)),k.length<=0&&C.jsx("p",{children:i})]}),C.jsxs(Wm,{isFocused:X,isSearchable:f,onSearch:F,children:[_.map(({label:T,value:I})=>C.jsx(zm,{label:T,value:I,size:B,handleChangeValue:O,optionHasSelected:G},I)),_.length<=0&&C.jsx("p",{children:g})]}),C.jsx(jm,{disabled:D,isFocused:X,readOnly:l,iconSize:M,isLoading:u}),C.jsx(Um,{iconSize:M,isLoading:u}),C.jsx(Hm,{handleBlur:re,isFocused:X})]})}const Gu=c.createContext({});function Vm(){return c.useContext(Gu)}function qm(t){const{defaultValue:e,name:r,value:n,onChange:i,size:s="md",className:a="",...o}=t,[u,l]=c.useState(e||""),{inputRef:f,id:p}=ot();function h(v){l(v),i&&i(v)}const y=`arkynRadioGroup ${s} ${a}`;return C.jsxs(Gu.Provider,{value:{onChange:h,value:n||u,size:s},children:[C.jsx("input",{style:{display:"none"},type:"text",id:p,readOnly:!0,name:r,ref:f,value:n||u}),C.jsx("div",{className:y.trim(),...o})]})}function Gm(t){const{value:e,size:r,disabled:n,children:i,className:s="",...a}=t,{onChange:o,size:u,value:l}=Vm(),{error:f}=ot(),g=`arkynRadioBox ${r||u} ${l===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${n?"disabledTrue":"disabledFalse"} ${s}`;return C.jsxs("label",{className:g.trim(),children:[C.jsx("button",{type:"button",disabled:n,onClick:()=>o(e),onFocus:()=>o(e),...a}),i]})}var It={};Object.defineProperty(It,"__esModule",{value:!0});for(var Zm=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),_s={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Zu={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Zm?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},zs={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},ni=1;ni<20;ni++)zs["f"+ni]=111+ni;function ii(t,e,r){e&&!("byKey"in e)&&(r=e,e=null),Array.isArray(t)||(t=[t]);var n=t.map(function(a){return Ku(a,e)}),i=function(o){return n.some(function(u){return Yu(u,o)})},s=r==null?i:i(r);return s}function Km(t,e){return ii(t,e)}function Ym(t,e){return ii(t,{byKey:!0},e)}function Ku(t,e){var r=e&&e.byKey,n={};t=t.replace("++","+add");var i=t.split("+"),s=i.length;for(var a in _s)n[_s[a]]=!1;var o=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),p;!(o=(p=f.next()).done);o=!0){var h=p.value,y=h.endsWith("?")&&h.length>1;y&&(h=h.slice(0,-1));var v=Ws(h),g=_s[v];if(h.length>1&&!g&&!Zu[h]&&!zs[v])throw new TypeError('Unknown modifier: "'+h+'"');(s===1||!g)&&(r?n.key=v:n.which=Xu(h)),g&&(n[g]=y?null:!0)}}catch(d){u=!0,l=d}finally{try{!o&&f.return&&f.return()}finally{if(u)throw l}}return n}function Yu(t,e){for(var r in t){var n=t[r],i=void 0;if(n!=null&&(r==="key"&&e.key!=null?i=e.key.toLowerCase():r==="which"?i=n===91&&e.which===93?91:e.which:i=e[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function Xu(t){t=Ws(t);var e=zs[t]||t.toUpperCase().charCodeAt(0);return e}function Ws(t){return t=t.toLowerCase(),t=Zu[t]||t,t}var Xm=It.default=ii,Hs=It.isHotkey=ii;It.isCodeHotkey=Km,It.isKeyHotkey=Ym,It.parseHotkey=Ku,It.compareHotkey=Yu,It.toKeyCode=Xu,It.toKeyName=Ws;/*!
37
37
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
38
38
  *
39
39
  * Copyright (c) 2014-2017, Jon Schlinkert.
40
40
  * Released under the MIT License.
41
- */function $u(t){return Object.prototype.toString.call(t)==="[object Object]"}function $m(t){var e,r;return $u(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!($u(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Jm={isHistory(t){return $m(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Ht.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Ht.isOperationList(t.undos[0].operations))}},Us=new WeakMap,sn=new WeakMap,hr={isHistoryEditor(t){return Jm.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return sn.get(t)},isSaving(t){return Us.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var r=hr.isMerging(t);sn.set(t,!0),e(),sn.set(t,r)},withoutMerging(t,e){var r=hr.isMerging(t);sn.set(t,!1),e(),sn.set(t,r)},withoutSaving(t,e){var r=hr.isSaving(t);Us.set(t,!1),e(),Us.set(t,r)}},Qm=t=>{var e=t,{apply:r}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:n}=e,{redos:i}=n;if(i.length>0){var s=i[i.length-1];s.selectionBefore&&te.setSelection(e,s.selectionBefore),hr.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var a of s.operations)e.apply(a)})}),n.redos.pop(),e.writeHistory("undos",s)}},e.undo=()=>{var{history:n}=e,{undos:i}=n;if(i.length>0){var s=i[i.length-1];hr.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var a=s.operations.map(Ht.inverse).reverse();for(var o of a)e.apply(o);s.selectionBefore&&te.setSelection(e,s.selectionBefore)})}),e.writeHistory("redos",s),n.undos.pop()}},e.apply=n=>{var{operations:i,history:s}=e,{undos:a}=s,o=a[a.length-1],u=o&&o.operations[o.operations.length-1],l=hr.isSaving(e),f=hr.isMerging(e);if(l==null&&(l=ty(n)),l){if(f==null&&(o==null?f=!1:i.length!==0?f=!0:f=ey(n,u)),o&&f)o.operations.push(n);else{var p={operations:[n],selectionBefore:e.selection};e.writeHistory("undos",p)}for(;a.length>100;)a.shift();s.redos=[]}r(n)},e.writeHistory=(n,i)=>{e.history[n].push(i)},e},ey=(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)),ty=(t,e)=>t.type!=="set_selection",ry=sy,Ju="֑-߿יִ-﷽ﹰ-ﻼ",Qu="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",ny=new RegExp("^[^"+Qu+"]*["+Ju+"]"),iy=new RegExp("^[^"+Ju+"]*["+Qu+"]");function sy(t){return t=String(t||""),ny.test(t)?"rtl":iy.test(t)?"ltr":"neutral"}const el=Pn(ry);function ay(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rs=ay,oy=typeof ke=="object"&&ke&&ke.Object===Object&&ke,uy=oy,ly=uy,cy=typeof self=="object"&&self&&self.Object===Object&&self,fy=ly||cy||Function("return this")(),tl=fy,dy=tl,py=function(){return dy.Date.now()},hy=py,vy=/\s/;function gy(t){for(var e=t.length;e--&&vy.test(t.charAt(e)););return e}var my=gy,yy=my,Cy=/^\s+/;function by(t){return t&&t.slice(0,yy(t)+1).replace(Cy,"")}var Dy=by,Ey=tl,wy=Ey.Symbol,rl=wy,nl=rl,il=Object.prototype,Oy=il.hasOwnProperty,xy=il.toString,an=nl?nl.toStringTag:void 0;function By(t){var e=Oy.call(t,an),r=t[an];try{t[an]=void 0;var n=!0}catch{}var i=xy.call(t);return n&&(e?t[an]=r:delete t[an]),i}var Sy=By,Ay=Object.prototype,Ly=Ay.toString;function Py(t){return Ly.call(t)}var Fy=Py,sl=rl,Ty=Sy,My=Fy,ky="[object Null]",jy="[object Undefined]",al=sl?sl.toStringTag:void 0;function Iy(t){return t==null?t===void 0?jy:ky:al&&al in Object(t)?Ty(t):My(t)}var Ny=Iy;function _y(t){return t!=null&&typeof t=="object"}var zy=_y,Wy=Ny,Hy=zy,Uy="[object Symbol]";function Ry(t){return typeof t=="symbol"||Hy(t)&&Wy(t)==Uy}var Vy=Ry,qy=Dy,ol=Rs,Gy=Vy,ul=NaN,Zy=/^[-+]0x[0-9a-f]+$/i,Ky=/^0b[01]+$/i,Yy=/^0o[0-7]+$/i,Xy=parseInt;function $y(t){if(typeof t=="number")return t;if(Gy(t))return ul;if(ol(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ol(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=qy(t);var r=Ky.test(t);return r||Yy.test(t)?Xy(t.slice(2),r?2:8):Zy.test(t)?ul:+t}var Jy=$y,Qy=Rs,Vs=hy,ll=Jy,eC="Expected a function",tC=Math.max,rC=Math.min;function nC(t,e,r){var n,i,s,a,o,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(eC);e=ll(e)||0,Qy(r)&&(f=!!r.leading,p="maxWait"in r,s=p?tC(ll(r.maxWait)||0,e):s,h="trailing"in r?!!r.trailing:h);function y(x){var A=n,U=i;return n=i=void 0,l=x,a=t.apply(U,A),a}function v(x){return l=x,o=setTimeout(D,e),f?y(x):a}function g(x){var A=x-u,U=x-l,P=e-A;return p?rC(P,s-U):P}function d(x){var A=x-u,U=x-l;return u===void 0||A>=e||A<0||p&&U>=s}function D(){var x=Vs();if(d(x))return E(x);o=setTimeout(D,g(x))}function E(x){return o=void 0,h&&n?y(x):(n=i=void 0,a)}function B(){o!==void 0&&clearTimeout(o),l=0,n=u=i=o=void 0}function w(){return o===void 0?a:E(Vs())}function b(){var x=Vs(),A=d(x);if(n=arguments,i=this,u=x,A){if(o===void 0)return v(u);if(p)return clearTimeout(o),o=setTimeout(D,e),y(u)}return o===void 0&&(o=setTimeout(D,e)),a}return b.cancel=B,b.flush=w,b}var cl=nC;const iC=Pn(cl);var sC=cl,aC=Rs,oC="Expected a function";function uC(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(oC);return aC(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),sC(t,e,{leading:n,maxWait:e,trailing:i})}var lC=uC;const cC=Pn(lC),fl=t=>typeof t=="object"&&t!=null&&t.nodeType===1,dl=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",qs=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return dl(r.overflowY,e)||dl(r.overflowX,e)||(n=>{const i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(t)}return!1},si=(t,e,r,n,i,s,a,o)=>s<t&&a>e||s>t&&a<e?0:s<=t&&o<=r||a>=e&&o>=r?s-t-n:a>e&&o<r||s<t&&o>r?a-e+i:0,fC=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},pl=(t,e)=>{var r,n,i,s;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,p=typeof l=="function"?l:Y=>Y!==l;if(!fl(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,y=[];let v=t;for(;fl(v)&&p(v);){if(v=fC(v),v===h){y.push(v);break}v!=null&&v===document.body&&qs(v)&&!qs(document.documentElement)||v!=null&&qs(v,f)&&y.push(v)}const g=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,d=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,{scrollX:D,scrollY:E}=window,{height:B,width:w,top:b,right:x,bottom:A,left:U}=t.getBoundingClientRect(),{top:P,right:H,bottom:j,left:M}=(Y=>{const V=window.getComputedStyle(Y);return{top:parseFloat(V.scrollMarginTop)||0,right:parseFloat(V.scrollMarginRight)||0,bottom:parseFloat(V.scrollMarginBottom)||0,left:parseFloat(V.scrollMarginLeft)||0}})(t);let W=o==="start"||o==="nearest"?b-P:o==="end"?A+j:b+B/2-P+j,_=u==="center"?U+w/2-M+H:u==="end"?x+H:U-M;const z=[];for(let Y=0;Y<y.length;Y++){const V=y[Y],{height:Q,width:ie,top:k,right:G,bottom:$,left:R}=V.getBoundingClientRect();if(a==="if-needed"&&b>=0&&U>=0&&A<=d&&x<=g&&b>=k&&A<=$&&U>=R&&x<=G)return z;const re=getComputedStyle(V),F=parseInt(re.borderLeftWidth,10),O=parseInt(re.borderTopWidth,10),N=parseInt(re.borderRightWidth,10),T=parseInt(re.borderBottomWidth,10);let I=0,Z=0;const ee="offsetWidth"in V?V.offsetWidth-V.clientWidth-F-N:0,J="offsetHeight"in V?V.offsetHeight-V.clientHeight-O-T:0,de="offsetWidth"in V?V.offsetWidth===0?0:ie/V.offsetWidth:0,fe="offsetHeight"in V?V.offsetHeight===0?0:Q/V.offsetHeight:0;if(h===V)I=o==="start"?W:o==="end"?W-d:o==="nearest"?si(E,E+d,d,O,T,E+W,E+W+B,B):W-d/2,Z=u==="start"?_:u==="center"?_-g/2:u==="end"?_-g:si(D,D+g,g,F,N,D+_,D+_+w,w),I=Math.max(0,I+E),Z=Math.max(0,Z+D);else{I=o==="start"?W-k-O:o==="end"?W-$+T+J:o==="nearest"?si(k,$,Q,O,T+J,W,W+B,B):W-(k+Q/2)+J/2,Z=u==="start"?_-R-F:u==="center"?_-(R+ie/2)+ee/2:u==="end"?_-G+N+ee:si(R,G,ie,F,N+ee,_,_+w,w);const{scrollLeft:ce,scrollTop:we}=V;I=fe===0?0:Math.max(0,Math.min(we+I/fe,V.scrollHeight-Q/fe+J)),Z=de===0?0:Math.max(0,Math.min(ce+Z/de,V.scrollWidth-ie/de+ee)),W+=we-I,_+=ce-Z}z.push({el:V,top:I,left:Z})}return z},dC=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function pC(t,e){if(!t.isConnected||!(i=>{let s=i;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t))return;const r=(i=>{const s=window.getComputedStyle(i);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(pl(t,e));const n=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:s,left:a}of pl(t,dC(e))){const o=s-r.top+r.bottom,u=a-r.left+r.right;i.scroll({top:o,left:u,behavior:n})}}var vr=[],hC=function(){return vr.some(function(t){return t.activeTargets.length>0})},vC=function(){return vr.some(function(t){return t.skippedTargets.length>0})},hl="ResizeObserver loop completed with undelivered notifications.",gC=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:hl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=hl),window.dispatchEvent(t)},on;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(on||(on={}));var gr=function(t){return Object.freeze(t)},mC=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,gr(this)}return t}(),vl=function(){function t(e,r,n,i){return this.x=e,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gr(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,s=e.right,a=e.bottom,o=e.left,u=e.width,l=e.height;return{x:r,y:n,top:i,right:s,bottom:a,left:o,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Gs=function(t){return t instanceof SVGElement&&"getBBox"in t},gl=function(t){if(Gs(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,s=i.offsetWidth,a=i.offsetHeight;return!(s||a||t.getClientRects().length)},ml=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},yC=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},un=typeof window<"u"?window:{},ai=new WeakMap,yl=/auto|scroll/,CC=/^tb|vertical/,bC=/msie|trident/i.test(un.navigator&&un.navigator.userAgent),Lt=function(t){return parseFloat(t||"0")},Fr=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new mC((r?e:t)||0,(r?t:e)||0)},Cl=gr({devicePixelContentBoxSize:Fr(),borderBoxSize:Fr(),contentBoxSize:Fr(),contentRect:new vl(0,0,0,0)}),bl=function(t,e){if(e===void 0&&(e=!1),ai.has(t)&&!e)return ai.get(t);if(gl(t))return ai.set(t,Cl),Cl;var r=getComputedStyle(t),n=Gs(t)&&t.ownerSVGElement&&t.getBBox(),i=!bC&&r.boxSizing==="border-box",s=CC.test(r.writingMode||""),a=!n&&yl.test(r.overflowY||""),o=!n&&yl.test(r.overflowX||""),u=n?0:Lt(r.paddingTop),l=n?0:Lt(r.paddingRight),f=n?0:Lt(r.paddingBottom),p=n?0:Lt(r.paddingLeft),h=n?0:Lt(r.borderTopWidth),y=n?0:Lt(r.borderRightWidth),v=n?0:Lt(r.borderBottomWidth),g=n?0:Lt(r.borderLeftWidth),d=p+l,D=u+f,E=g+y,B=h+v,w=o?t.offsetHeight-B-t.clientHeight:0,b=a?t.offsetWidth-E-t.clientWidth:0,x=i?d+E:0,A=i?D+B:0,U=n?n.width:Lt(r.width)-x-b,P=n?n.height:Lt(r.height)-A-w,H=U+d+b+E,j=P+D+w+B,M=gr({devicePixelContentBoxSize:Fr(Math.round(U*devicePixelRatio),Math.round(P*devicePixelRatio),s),borderBoxSize:Fr(H,j,s),contentBoxSize:Fr(U,P,s),contentRect:new vl(p,u,U,P)});return ai.set(t,M),M},Dl=function(t,e,r){var n=bl(t,r),i=n.borderBoxSize,s=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case on.DEVICE_PIXEL_CONTENT_BOX:return a;case on.BORDER_BOX:return i;default:return s}},DC=function(){function t(e){var r=bl(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=gr([r.borderBoxSize]),this.contentBoxSize=gr([r.contentBoxSize]),this.devicePixelContentBoxSize=gr([r.devicePixelContentBoxSize])}return t}(),El=function(t){if(gl(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},EC=function(){var t=1/0,e=[];vr.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(l){var f=new DC(l.target),p=El(l.target);o.push(f),l.lastReportedSize=Dl(l.target,l.observedBox),p<t&&(t=p)}),e.push(function(){a.callback.call(a.observer,o,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},wl=function(t){vr.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(El(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},wC=function(){var t=0;for(wl(t);hC();)t=EC(),wl(t);return vC()&&gC(),t>0},Zs,Ol=[],OC=function(){return Ol.splice(0).forEach(function(t){return t()})},xC=function(t){if(!Zs){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return OC()}).observe(r,n),Zs=function(){r.textContent="".concat(e?e--:e++)}}Ol.push(t),Zs()},BC=function(t){xC(function(){requestAnimationFrame(t)})},oi=0,SC=function(){return!!oi},AC=250,LC={attributes:!0,characterData:!0,childList:!0,subtree:!0},xl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Bl=function(t){return t===void 0&&(t=0),Date.now()+t},Ks=!1,PC=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=AC),!Ks){Ks=!0;var n=Bl(e);BC(function(){var i=!1;try{i=wC()}finally{if(Ks=!1,e=n-Bl(),!SC())return;i?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,LC)};document.body?r():un.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xl.forEach(function(r){return un.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),xl.forEach(function(r){return un.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),Ys=new PC,Sl=function(t){!oi&&t>0&&Ys.start(),oi+=t,!oi&&Ys.stop()},FC=function(t){return!Gs(t)&&!yC(t)&&getComputedStyle(t).display==="inline"},TC=function(){function t(e,r){this.target=e,this.observedBox=r||on.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Dl(this.target,this.observedBox,!0);return FC(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),MC=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),ui=new WeakMap,Al=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},li=function(){function t(){}return t.connect=function(e,r){var n=new MC(e,r);ui.set(e,n)},t.observe=function(e,r,n){var i=ui.get(e),s=i.observationTargets.length===0;Al(i.observationTargets,r)<0&&(s&&vr.push(i),i.observationTargets.push(new TC(r,n&&n.box)),Sl(1),Ys.schedule())},t.unobserve=function(e,r){var n=ui.get(e),i=Al(n.observationTargets,r),s=n.observationTargets.length===1;i>=0&&(s&&vr.splice(vr.indexOf(n),1),n.observationTargets.splice(i,1),Sl(-1))},t.disconnect=function(e){var r=this,n=ui.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),kC=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.");li.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ml(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");li.observe(this,e,r)},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(!ml(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");li.unobserve(this,e)},t.prototype.disconnect=function(){li.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function jC(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Tr(t,e){if(t==null)return{};var r=jC(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ln(t){"@babel/helpers - typeof";return ln=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},ln(t)}function IC(t,e){if(ln(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ln(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NC(t){var e=IC(t,"string");return ln(e)==="symbol"?e:String(e)}function bt(t,e,r){return e=NC(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xs=c.createContext(null),qt=()=>{var t=c.useContext(Xs);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},$s,Js,Ll=parseInt(c.version.split(".")[0],10),Pl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Fl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),ut=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Mr=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),mr=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),_C=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Tl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),zC=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),WC=ut&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),HC=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),UC=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),RC=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ci=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(($s=navigator.userAgent.match(/Version\/(\d+)/))!==null&&$s!==void 0&&$s[1]&&parseInt((Js=navigator.userAgent.match(/Version\/(\d+)/))===null||Js===void 0?void 0:Js[1],10)<17);var Gt=(!zC||!WC)&&!_C&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",kr=new WeakMap,Qs=new WeakMap,ea=new WeakMap,Ml=new WeakMap,fi=new WeakMap,ta=new WeakMap,cn=new WeakMap,yr=new WeakMap,di=new WeakMap,pi=new WeakMap,ra=new WeakMap,Zt=new WeakMap,Cr=new WeakMap,fn=new WeakMap,na=new WeakMap,ia=new WeakMap,Bt=new WeakMap,Nt=new WeakMap,pt=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,kl=new WeakMap,jr=Symbol("placeholder"),jl=Symbol("mark-placeholder"),Il=globalThis.Node,VC=globalThis.Text,sa=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,qC=t=>Xt(t)&&t.nodeType===8,Dt=t=>Xt(t)&&t.nodeType===1,Xt=t=>{var e=sa(t);return!!e&&t instanceof e.Node},aa=t=>{var e=t&&t.anchorNode&&sa(t.anchorNode);return!!e&&t instanceof e.Selection},Nl=t=>Xt(t)&&t.nodeType===3,GC=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,ZC=t=>{var[e,r]=t;if(Dt(e)&&e.childNodes.length){var n=r===e.childNodes.length,i=n?r-1:r;for([e,i]=_l(e,i,n?"backward":"forward"),n=i<r;Dt(e)&&e.childNodes.length;){var s=n?e.childNodes.length-1:0;e=YC(e,s,n?"backward":"forward")}r=n&&e.textContent!=null?e.textContent.length:0}return[e,r]},KC=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},_l=(t,e,r)=>{for(var{childNodes:n}=t,i=n[e],s=e,a=!1,o=!1;(qC(i)||Dt(i)&&i.childNodes.length===0||Dt(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=n.length){a=!0,s=e-1,r="backward";continue}if(s<0){o=!0,s=e+1,r="forward";continue}i=n[s],e=s,s+=r==="forward"?1:-1}return[i,e]},YC=(t,e,r)=>{var[n]=_l(t,e,r);return n},zl=t=>{var e="";if(Nl(t)&&t.nodeValue)return t.nodeValue;if(Dt(t)){for(var r of Array.from(t.childNodes))e+=zl(r);var n=getComputedStyle(t).getPropertyValue("display");(n==="block"||n==="list"||t.tagName==="BR")&&(e+=`
42
- `)}return e},XC=/data-slate-fragment="(.+?)"/m,$C=t=>{var e=t.getData("text/html"),[,r]=e.match(XC)||[];return r},dn=t=>t.getSelection!=null?t.getSelection():document.getSelection(),oa=(t,e,r)=>{var{target:n}=e;if(Dt(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:i}=X.getWindow(t);if(i.contains(n))return X.hasDOMNode(t,n,{editable:!0});var s=r.find(a=>{var{addedNodes:o,removedNodes:u}=a;for(var l of o)if(l===n||l.contains(n))return!0;for(var f of u)if(f===n||f.contains(n))return!0});return!s||s===e?!1:oa(t,s,r)},JC=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(r=t.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var e,r,n;t=(n=t)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return t},Wl=(t,e)=>!!(t.compareDocumentPosition(e)&Il.DOCUMENT_POSITION_PRECEDING),QC=(t,e)=>!!(t.compareDocumentPosition(e)&Il.DOCUMENT_POSITION_FOLLOWING),e0=0;class t0{constructor(){bt(this,"id",void 0),this.id="".concat(e0++)}}var X={androidPendingDiffs:t=>pt.get(t),androidScheduleFlush:t=>{var e;(e=ia.get(t))===null||e===void 0||e()},blur:t=>{var e=X.toDOMNode(t,t),r=X.findDocumentOrShadowRoot(t);Zt.set(t,!1),r.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,r=X.findDocumentOrShadowRoot(t),n=dn(r);n&&n.rangeCount>0&&n.removeAllRanges(),e&&te.deselect(t)},findDocumentOrShadowRoot:t=>{var e=X.toDOMNode(t,t),r=e.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:r,clientY:n,target:i}=e;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var s=X.toSlateNode(t,e.target),a=X.findPath(t,s);if(ue.isElement(s)&&m.isVoid(t,s)){var o=i.getBoundingClientRect(),u=t.isInline(s)?r-o.left<o.left+o.width-r:n-o.top<o.top+o.height-n,l=m.point(t,a,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var p=m.range(t,f);return p}}var h,{document:y}=X.getWindow(t);if(y.caretRangeFromPoint)h=y.caretRangeFromPoint(r,n);else{var v=y.caretPositionFromPoint(r,n);v&&(h=y.createRange(),h.setStart(v.offsetNode,v.offset),h.setEnd(v.offsetNode,v.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var g=X.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(t,e)=>{var r=di.get(e);return r||(r=new t0,di.set(e,r)),r},findPath:(t,e)=>{for(var r=[],n=e;;){var i=ea.get(n);if(i==null){if(m.isEditor(n))return r;break}var s=Qs.get(n);if(s==null)break;r.unshift(s),n=i}throw new Error("Unable to find the path for Slate node: ".concat($e.stringify(e)))},focus:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Zt.get(e)){if(r.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{X.focus(e,{retries:r.retries-1})},10);return}var n=X.toDOMNode(e,e),i=X.findDocumentOrShadowRoot(e);if(i.activeElement!==n){if(e.selection&&i instanceof Document){var s=dn(i),a=X.toDOMRange(e,e.selection);s==null||s.removeAllRanges(),s==null||s.addRange(a)}e.selection||te.select(e,m.start(e,[])),Zt.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:t=>{var e=Ml.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=n,s=X.toDOMNode(e,e),a;try{a=Dt(r)?r:r.parentElement}catch(o){if(o instanceof Error&&!o.message.includes('Permission denied to access property "nodeType"'))throw o}return a?a.closest("[data-slate-editor]")===s&&(!i||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===s||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Xt(e)&&X.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:r,focus:n}=e;return m.hasPath(t,r.path)&&m.hasPath(t,n.path)},hasSelectableTarget:(t,e)=>X.hasEditableTarget(t,e)||X.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Xt(e)&&X.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!Cr.get(t),isFocused:t=>!!Zt.get(t),isReadOnly:t=>!!ra.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(ra.get(t))return!1;var r=X.hasTarget(t,e)&&X.toSlateNode(t,e);return ue.isElement(r)&&m.isVoid(t,r)},setFragmentData:(t,e,r)=>t.setFragmentData(e,r),toDOMNode:(t,e)=>{var r=pi.get(t),n=m.isEditor(e)?fi.get(t):r==null?void 0:r.get(X.findKey(t,e));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat($e.stringify(e)));return n},toDOMPoint:(t,e)=>{var[r]=m.node(t,e.path),n=X.toDOMNode(t,r),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var s="[data-slate-string], [data-slate-zero-width]",a=Array.from(n.querySelectorAll(s)),o=0,u=0;u<a.length;u++){var l=a[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:p}=f.textContent,h=l.getAttribute("data-slate-length"),y=h==null?p:parseInt(h,10),v=o+y,g=a[u+1];if(e.offset===v&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var d,D=g.childNodes[0];i=[D instanceof VC?D:g,(d=g.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=v){var E=Math.min(p,Math.max(0,e.offset-o));i=[f,E];break}o=v}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat($e.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:r,focus:n}=e,i=q.isBackward(e),s=X.toDOMPoint(t,r),a=q.isCollapsed(e)?s:X.toDOMPoint(t,n),o=X.getWindow(t),u=o.document.createRange(),[l,f]=i?a:s,[p,h]=i?s:a,y=Dt(l)?l:l.parentElement,v=!!y.getAttribute("data-slate-zero-width"),g=Dt(p)?p:p.parentElement,d=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,v?1:f),u.setEnd(p,d?1:h),u},toSlateNode:(t,e)=>{var r=Dt(e)?e:e.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?cn.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(t,e,r)=>{var{exactMatch:n,suppressThrow:i,searchDirection:s="backward"}=r,[a,o]=n?e:ZC(e),u=a.parentNode,l=null,f=0;if(u){var p,h,y=X.toDOMNode(t,t),v=u.closest('[data-slate-void="true"]'),g=v&&y.contains(v)?v:null,d=u.closest('[contenteditable="false"]'),D=d&&y.contains(d)?d:null,E=u.closest("[data-slate-leaf]"),B=null;if(E){if(l=E.closest('[data-slate-node="text"]'),l){var w=X.getWindow(t),b=w.document.createRange();b.setStart(l,0),b.setEnd(a,o);var x=b.cloneContents(),A=[...Array.prototype.slice.call(x.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(x.querySelectorAll("[contenteditable=false]"))];A.forEach(R=>{if(ut&&!n&&R.hasAttribute("data-slate-zero-width")&&R.textContent.length>0&&R.textContext!=="\uFEFF"){R.textContent.startsWith("\uFEFF")&&(R.textContent=R.textContent.slice(1));return}R.parentNode.removeChild(R)}),f=x.textContent.length,B=l}}else if(g){for(var U=g.querySelectorAll("[data-slate-leaf]"),P=0;P<U.length;P++){var H=U[P];if(X.hasDOMNode(t,H)){E=H;break}}E?(l=E.closest('[data-slate-node="text"]'),B=E,f=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(R=>{f-=R.textContent.length})):f=1}else if(D){var j=R=>R?R.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],M=D.closest('[data-slate-node="element"]');if(s==="forward"){var W,_=[...j(M),...j(M==null?void 0:M.nextElementSibling)];E=(W=_.find(R=>QC(D,R)))!==null&&W!==void 0?W:null}else{var z,Y=[...j(M==null?void 0:M.previousElementSibling),...j(M)];E=(z=Y.findLast(R=>Wl(D,R)))!==null&&z!==void 0?z:null}E&&(l=E.closest('[data-slate-node="text"]'),B=E,s==="forward"?f=0:(f=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(R=>{f-=R.textContent.length})))}B&&f===B.textContent.length&&ut&&B.getAttribute("data-slate-zero-width")==="z"&&(p=B.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Mr&&(h=B.textContent)!==null&&h!==void 0&&h.endsWith(`
41
+ */function $u(t){return Object.prototype.toString.call(t)==="[object Object]"}function $m(t){var e,r;return $u(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!($u(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Jm={isHistory(t){return $m(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Ht.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Ht.isOperationList(t.undos[0].operations))}},Us=new WeakMap,sn=new WeakMap,hr={isHistoryEditor(t){return Jm.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return sn.get(t)},isSaving(t){return Us.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var r=hr.isMerging(t);sn.set(t,!0),e(),sn.set(t,r)},withoutMerging(t,e){var r=hr.isMerging(t);sn.set(t,!1),e(),sn.set(t,r)},withoutSaving(t,e){var r=hr.isSaving(t);Us.set(t,!1),e(),Us.set(t,r)}},Qm=t=>{var e=t,{apply:r}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:n}=e,{redos:i}=n;if(i.length>0){var s=i[i.length-1];s.selectionBefore&&te.setSelection(e,s.selectionBefore),hr.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var a of s.operations)e.apply(a)})}),n.redos.pop(),e.writeHistory("undos",s)}},e.undo=()=>{var{history:n}=e,{undos:i}=n;if(i.length>0){var s=i[i.length-1];hr.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var a=s.operations.map(Ht.inverse).reverse();for(var o of a)e.apply(o);s.selectionBefore&&te.setSelection(e,s.selectionBefore)})}),e.writeHistory("redos",s),n.undos.pop()}},e.apply=n=>{var{operations:i,history:s}=e,{undos:a}=s,o=a[a.length-1],u=o&&o.operations[o.operations.length-1],l=hr.isSaving(e),f=hr.isMerging(e);if(l==null&&(l=ty(n)),l){if(f==null&&(o==null?f=!1:i.length!==0?f=!0:f=ey(n,u)),o&&f)o.operations.push(n);else{var p={operations:[n],selectionBefore:e.selection};e.writeHistory("undos",p)}for(;a.length>100;)a.shift();s.redos=[]}r(n)},e.writeHistory=(n,i)=>{e.history[n].push(i)},e},ey=(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)),ty=(t,e)=>t.type!=="set_selection",ry=sy,Ju="֑-߿יִ-﷽ﹰ-ﻼ",Qu="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",ny=new RegExp("^[^"+Qu+"]*["+Ju+"]"),iy=new RegExp("^[^"+Ju+"]*["+Qu+"]");function sy(t){return t=String(t||""),ny.test(t)?"rtl":iy.test(t)?"ltr":"neutral"}const el=Pn(ry);function ay(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Rs=ay,oy=typeof ke=="object"&&ke&&ke.Object===Object&&ke,uy=oy,ly=uy,cy=typeof self=="object"&&self&&self.Object===Object&&self,fy=ly||cy||Function("return this")(),tl=fy,dy=tl,py=function(){return dy.Date.now()},hy=py,vy=/\s/;function gy(t){for(var e=t.length;e--&&vy.test(t.charAt(e)););return e}var my=gy,yy=my,Cy=/^\s+/;function by(t){return t&&t.slice(0,yy(t)+1).replace(Cy,"")}var Dy=by,Ey=tl,wy=Ey.Symbol,rl=wy,nl=rl,il=Object.prototype,Oy=il.hasOwnProperty,xy=il.toString,an=nl?nl.toStringTag:void 0;function By(t){var e=Oy.call(t,an),r=t[an];try{t[an]=void 0;var n=!0}catch{}var i=xy.call(t);return n&&(e?t[an]=r:delete t[an]),i}var Sy=By,Ay=Object.prototype,Ly=Ay.toString;function Py(t){return Ly.call(t)}var Fy=Py,sl=rl,Ty=Sy,My=Fy,ky="[object Null]",jy="[object Undefined]",al=sl?sl.toStringTag:void 0;function Iy(t){return t==null?t===void 0?jy:ky:al&&al in Object(t)?Ty(t):My(t)}var Ny=Iy;function _y(t){return t!=null&&typeof t=="object"}var zy=_y,Wy=Ny,Hy=zy,Uy="[object Symbol]";function Ry(t){return typeof t=="symbol"||Hy(t)&&Wy(t)==Uy}var Vy=Ry,qy=Dy,ol=Rs,Gy=Vy,ul=NaN,Zy=/^[-+]0x[0-9a-f]+$/i,Ky=/^0b[01]+$/i,Yy=/^0o[0-7]+$/i,Xy=parseInt;function $y(t){if(typeof t=="number")return t;if(Gy(t))return ul;if(ol(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ol(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=qy(t);var r=Ky.test(t);return r||Yy.test(t)?Xy(t.slice(2),r?2:8):Zy.test(t)?ul:+t}var Jy=$y,Qy=Rs,Vs=hy,ll=Jy,eC="Expected a function",tC=Math.max,rC=Math.min;function nC(t,e,r){var n,i,s,a,o,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(eC);e=ll(e)||0,Qy(r)&&(f=!!r.leading,p="maxWait"in r,s=p?tC(ll(r.maxWait)||0,e):s,h="trailing"in r?!!r.trailing:h);function y(x){var S=n,U=i;return n=i=void 0,l=x,a=t.apply(U,S),a}function v(x){return l=x,o=setTimeout(D,e),f?y(x):a}function g(x){var S=x-u,U=x-l,P=e-S;return p?rC(P,s-U):P}function d(x){var S=x-u,U=x-l;return u===void 0||S>=e||S<0||p&&U>=s}function D(){var x=Vs();if(d(x))return E(x);o=setTimeout(D,g(x))}function E(x){return o=void 0,h&&n?y(x):(n=i=void 0,a)}function B(){o!==void 0&&clearTimeout(o),l=0,n=u=i=o=void 0}function w(){return o===void 0?a:E(Vs())}function b(){var x=Vs(),S=d(x);if(n=arguments,i=this,u=x,S){if(o===void 0)return v(u);if(p)return clearTimeout(o),o=setTimeout(D,e),y(u)}return o===void 0&&(o=setTimeout(D,e)),a}return b.cancel=B,b.flush=w,b}var cl=nC;const iC=Pn(cl);var sC=cl,aC=Rs,oC="Expected a function";function uC(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(oC);return aC(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),sC(t,e,{leading:n,maxWait:e,trailing:i})}var lC=uC;const cC=Pn(lC),fl=t=>typeof t=="object"&&t!=null&&t.nodeType===1,dl=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",qs=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return dl(r.overflowY,e)||dl(r.overflowX,e)||(n=>{const i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(t)}return!1},si=(t,e,r,n,i,s,a,o)=>s<t&&a>e||s>t&&a<e?0:s<=t&&o<=r||a>=e&&o>=r?s-t-n:a>e&&o<r||s<t&&o>r?a-e+i:0,fC=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},pl=(t,e)=>{var r,n,i,s;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,p=typeof l=="function"?l:X=>X!==l;if(!fl(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,y=[];let v=t;for(;fl(v)&&p(v);){if(v=fC(v),v===h){y.push(v);break}v!=null&&v===document.body&&qs(v)&&!qs(document.documentElement)||v!=null&&qs(v,f)&&y.push(v)}const g=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,d=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,{scrollX:D,scrollY:E}=window,{height:B,width:w,top:b,right:x,bottom:S,left:U}=t.getBoundingClientRect(),{top:P,right:H,bottom:j,left:M}=(X=>{const R=window.getComputedStyle(X);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(t);let N=o==="start"||o==="nearest"?b-P:o==="end"?S+j:b+B/2-P+j,z=u==="center"?U+w/2-M+H:u==="end"?x+H:U-M;const W=[];for(let X=0;X<y.length;X++){const R=y[X],{height:ne,width:Q,top:k,right:G,bottom:$,left:V}=R.getBoundingClientRect();if(a==="if-needed"&&b>=0&&U>=0&&S<=d&&x<=g&&b>=k&&S<=$&&U>=V&&x<=G)return W;const re=getComputedStyle(R),F=parseInt(re.borderLeftWidth,10),O=parseInt(re.borderTopWidth,10),_=parseInt(re.borderRightWidth,10),T=parseInt(re.borderBottomWidth,10);let I=0,Z=0;const ee="offsetWidth"in R?R.offsetWidth-R.clientWidth-F-_:0,J="offsetHeight"in R?R.offsetHeight-R.clientHeight-O-T:0,de="offsetWidth"in R?R.offsetWidth===0?0:Q/R.offsetWidth:0,fe="offsetHeight"in R?R.offsetHeight===0?0:ne/R.offsetHeight:0;if(h===R)I=o==="start"?N:o==="end"?N-d:o==="nearest"?si(E,E+d,d,O,T,E+N,E+N+B,B):N-d/2,Z=u==="start"?z:u==="center"?z-g/2:u==="end"?z-g:si(D,D+g,g,F,_,D+z,D+z+w,w),I=Math.max(0,I+E),Z=Math.max(0,Z+D);else{I=o==="start"?N-k-O:o==="end"?N-$+T+J:o==="nearest"?si(k,$,ne,O,T+J,N,N+B,B):N-(k+ne/2)+J/2,Z=u==="start"?z-V-F:u==="center"?z-(V+Q/2)+ee/2:u==="end"?z-G+_+ee:si(V,G,Q,F,_+ee,z,z+w,w);const{scrollLeft:ce,scrollTop:we}=R;I=fe===0?0:Math.max(0,Math.min(we+I/fe,R.scrollHeight-ne/fe+J)),Z=de===0?0:Math.max(0,Math.min(ce+Z/de,R.scrollWidth-Q/de+ee)),N+=we-I,z+=ce-Z}W.push({el:R,top:I,left:Z})}return W},dC=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function pC(t,e){if(!t.isConnected||!(i=>{let s=i;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(t))return;const r=(i=>{const s=window.getComputedStyle(i);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(pl(t,e));const n=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:s,left:a}of pl(t,dC(e))){const o=s-r.top+r.bottom,u=a-r.left+r.right;i.scroll({top:o,left:u,behavior:n})}}var vr=[],hC=function(){return vr.some(function(t){return t.activeTargets.length>0})},vC=function(){return vr.some(function(t){return t.skippedTargets.length>0})},hl="ResizeObserver loop completed with undelivered notifications.",gC=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:hl}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=hl),window.dispatchEvent(t)},on;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(on||(on={}));var gr=function(t){return Object.freeze(t)},mC=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,gr(this)}return t}(),vl=function(){function t(e,r,n,i){return this.x=e,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gr(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,s=e.right,a=e.bottom,o=e.left,u=e.width,l=e.height;return{x:r,y:n,top:i,right:s,bottom:a,left:o,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Gs=function(t){return t instanceof SVGElement&&"getBBox"in t},gl=function(t){if(Gs(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,s=i.offsetWidth,a=i.offsetHeight;return!(s||a||t.getClientRects().length)},ml=function(t){var e;if(t instanceof Element)return!0;var r=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},yC=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},un=typeof window<"u"?window:{},ai=new WeakMap,yl=/auto|scroll/,CC=/^tb|vertical/,bC=/msie|trident/i.test(un.navigator&&un.navigator.userAgent),Lt=function(t){return parseFloat(t||"0")},Fr=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new mC((r?e:t)||0,(r?t:e)||0)},Cl=gr({devicePixelContentBoxSize:Fr(),borderBoxSize:Fr(),contentBoxSize:Fr(),contentRect:new vl(0,0,0,0)}),bl=function(t,e){if(e===void 0&&(e=!1),ai.has(t)&&!e)return ai.get(t);if(gl(t))return ai.set(t,Cl),Cl;var r=getComputedStyle(t),n=Gs(t)&&t.ownerSVGElement&&t.getBBox(),i=!bC&&r.boxSizing==="border-box",s=CC.test(r.writingMode||""),a=!n&&yl.test(r.overflowY||""),o=!n&&yl.test(r.overflowX||""),u=n?0:Lt(r.paddingTop),l=n?0:Lt(r.paddingRight),f=n?0:Lt(r.paddingBottom),p=n?0:Lt(r.paddingLeft),h=n?0:Lt(r.borderTopWidth),y=n?0:Lt(r.borderRightWidth),v=n?0:Lt(r.borderBottomWidth),g=n?0:Lt(r.borderLeftWidth),d=p+l,D=u+f,E=g+y,B=h+v,w=o?t.offsetHeight-B-t.clientHeight:0,b=a?t.offsetWidth-E-t.clientWidth:0,x=i?d+E:0,S=i?D+B:0,U=n?n.width:Lt(r.width)-x-b,P=n?n.height:Lt(r.height)-S-w,H=U+d+b+E,j=P+D+w+B,M=gr({devicePixelContentBoxSize:Fr(Math.round(U*devicePixelRatio),Math.round(P*devicePixelRatio),s),borderBoxSize:Fr(H,j,s),contentBoxSize:Fr(U,P,s),contentRect:new vl(p,u,U,P)});return ai.set(t,M),M},Dl=function(t,e,r){var n=bl(t,r),i=n.borderBoxSize,s=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case on.DEVICE_PIXEL_CONTENT_BOX:return a;case on.BORDER_BOX:return i;default:return s}},DC=function(){function t(e){var r=bl(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=gr([r.borderBoxSize]),this.contentBoxSize=gr([r.contentBoxSize]),this.devicePixelContentBoxSize=gr([r.devicePixelContentBoxSize])}return t}(),El=function(t){if(gl(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},EC=function(){var t=1/0,e=[];vr.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(l){var f=new DC(l.target),p=El(l.target);o.push(f),l.lastReportedSize=Dl(l.target,l.observedBox),p<t&&(t=p)}),e.push(function(){a.callback.call(a.observer,o,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},wl=function(t){vr.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(El(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},wC=function(){var t=0;for(wl(t);hC();)t=EC(),wl(t);return vC()&&gC(),t>0},Zs,Ol=[],OC=function(){return Ol.splice(0).forEach(function(t){return t()})},xC=function(t){if(!Zs){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return OC()}).observe(r,n),Zs=function(){r.textContent="".concat(e?e--:e++)}}Ol.push(t),Zs()},BC=function(t){xC(function(){requestAnimationFrame(t)})},oi=0,SC=function(){return!!oi},AC=250,LC={attributes:!0,characterData:!0,childList:!0,subtree:!0},xl=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Bl=function(t){return t===void 0&&(t=0),Date.now()+t},Ks=!1,PC=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=AC),!Ks){Ks=!0;var n=Bl(e);BC(function(){var i=!1;try{i=wC()}finally{if(Ks=!1,e=n-Bl(),!SC())return;i?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,LC)};document.body?r():un.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xl.forEach(function(r){return un.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),xl.forEach(function(r){return un.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),Ys=new PC,Sl=function(t){!oi&&t>0&&Ys.start(),oi+=t,!oi&&Ys.stop()},FC=function(t){return!Gs(t)&&!yC(t)&&getComputedStyle(t).display==="inline"},TC=function(){function t(e,r){this.target=e,this.observedBox=r||on.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Dl(this.target,this.observedBox,!0);return FC(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),MC=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),ui=new WeakMap,Al=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},li=function(){function t(){}return t.connect=function(e,r){var n=new MC(e,r);ui.set(e,n)},t.observe=function(e,r,n){var i=ui.get(e),s=i.observationTargets.length===0;Al(i.observationTargets,r)<0&&(s&&vr.push(i),i.observationTargets.push(new TC(r,n&&n.box)),Sl(1),Ys.schedule())},t.unobserve=function(e,r){var n=ui.get(e),i=Al(n.observationTargets,r),s=n.observationTargets.length===1;i>=0&&(s&&vr.splice(vr.indexOf(n),1),n.observationTargets.splice(i,1),Sl(-1))},t.disconnect=function(e){var r=this,n=ui.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),kC=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.");li.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ml(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");li.observe(this,e,r)},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(!ml(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");li.unobserve(this,e)},t.prototype.disconnect=function(){li.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function jC(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Tr(t,e){if(t==null)return{};var r=jC(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ln(t){"@babel/helpers - typeof";return ln=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},ln(t)}function IC(t,e){if(ln(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ln(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NC(t){var e=IC(t,"string");return ln(e)==="symbol"?e:String(e)}function bt(t,e,r){return e=NC(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xs=c.createContext(null),qt=()=>{var t=c.useContext(Xs);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},$s,Js,Ll=parseInt(c.version.split(".")[0],10),Pl=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Fl=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),ut=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Mr=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),mr=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),_C=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Tl=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),zC=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),WC=ut&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),HC=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),UC=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),RC=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ci=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(($s=navigator.userAgent.match(/Version\/(\d+)/))!==null&&$s!==void 0&&$s[1]&&parseInt((Js=navigator.userAgent.match(/Version\/(\d+)/))===null||Js===void 0?void 0:Js[1],10)<17);var Gt=(!zC||!WC)&&!_C&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",kr=new WeakMap,Qs=new WeakMap,ea=new WeakMap,Ml=new WeakMap,fi=new WeakMap,ta=new WeakMap,cn=new WeakMap,yr=new WeakMap,di=new WeakMap,pi=new WeakMap,ra=new WeakMap,Zt=new WeakMap,Cr=new WeakMap,fn=new WeakMap,na=new WeakMap,ia=new WeakMap,Bt=new WeakMap,Nt=new WeakMap,pt=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,kl=new WeakMap,jr=Symbol("placeholder"),jl=Symbol("mark-placeholder"),Il=globalThis.Node,VC=globalThis.Text,sa=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,qC=t=>Xt(t)&&t.nodeType===8,Dt=t=>Xt(t)&&t.nodeType===1,Xt=t=>{var e=sa(t);return!!e&&t instanceof e.Node},aa=t=>{var e=t&&t.anchorNode&&sa(t.anchorNode);return!!e&&t instanceof e.Selection},Nl=t=>Xt(t)&&t.nodeType===3,GC=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,ZC=t=>{var[e,r]=t;if(Dt(e)&&e.childNodes.length){var n=r===e.childNodes.length,i=n?r-1:r;for([e,i]=_l(e,i,n?"backward":"forward"),n=i<r;Dt(e)&&e.childNodes.length;){var s=n?e.childNodes.length-1:0;e=YC(e,s,n?"backward":"forward")}r=n&&e.textContent!=null?e.textContent.length:0}return[e,r]},KC=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},_l=(t,e,r)=>{for(var{childNodes:n}=t,i=n[e],s=e,a=!1,o=!1;(qC(i)||Dt(i)&&i.childNodes.length===0||Dt(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=n.length){a=!0,s=e-1,r="backward";continue}if(s<0){o=!0,s=e+1,r="forward";continue}i=n[s],e=s,s+=r==="forward"?1:-1}return[i,e]},YC=(t,e,r)=>{var[n]=_l(t,e,r);return n},zl=t=>{var e="";if(Nl(t)&&t.nodeValue)return t.nodeValue;if(Dt(t)){for(var r of Array.from(t.childNodes))e+=zl(r);var n=getComputedStyle(t).getPropertyValue("display");(n==="block"||n==="list"||t.tagName==="BR")&&(e+=`
42
+ `)}return e},XC=/data-slate-fragment="(.+?)"/m,$C=t=>{var e=t.getData("text/html"),[,r]=e.match(XC)||[];return r},dn=t=>t.getSelection!=null?t.getSelection():document.getSelection(),oa=(t,e,r)=>{var{target:n}=e;if(Dt(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:i}=Y.getWindow(t);if(i.contains(n))return Y.hasDOMNode(t,n,{editable:!0});var s=r.find(a=>{var{addedNodes:o,removedNodes:u}=a;for(var l of o)if(l===n||l.contains(n))return!0;for(var f of u)if(f===n||f.contains(n))return!0});return!s||s===e?!1:oa(t,s,r)},JC=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(r=t.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var e,r,n;t=(n=t)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return t},Wl=(t,e)=>!!(t.compareDocumentPosition(e)&Il.DOCUMENT_POSITION_PRECEDING),QC=(t,e)=>!!(t.compareDocumentPosition(e)&Il.DOCUMENT_POSITION_FOLLOWING),e0=0;class t0{constructor(){bt(this,"id",void 0),this.id="".concat(e0++)}}var Y={androidPendingDiffs:t=>pt.get(t),androidScheduleFlush:t=>{var e;(e=ia.get(t))===null||e===void 0||e()},blur:t=>{var e=Y.toDOMNode(t,t),r=Y.findDocumentOrShadowRoot(t);Zt.set(t,!1),r.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,r=Y.findDocumentOrShadowRoot(t),n=dn(r);n&&n.rangeCount>0&&n.removeAllRanges(),e&&te.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Y.toDOMNode(t,t),r=e.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:r,clientY:n,target:i}=e;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var s=Y.toSlateNode(t,e.target),a=Y.findPath(t,s);if(ue.isElement(s)&&m.isVoid(t,s)){var o=i.getBoundingClientRect(),u=t.isInline(s)?r-o.left<o.left+o.width-r:n-o.top<o.top+o.height-n,l=m.point(t,a,{edge:u?"start":"end"}),f=u?m.before(t,l):m.after(t,l);if(f){var p=m.range(t,f);return p}}var h,{document:y}=Y.getWindow(t);if(y.caretRangeFromPoint)h=y.caretRangeFromPoint(r,n);else{var v=y.caretPositionFromPoint(r,n);v&&(h=y.createRange(),h.setStart(v.offsetNode,v.offset),h.setEnd(v.offsetNode,v.offset))}if(!h)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var g=Y.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(t,e)=>{var r=di.get(e);return r||(r=new t0,di.set(e,r)),r},findPath:(t,e)=>{for(var r=[],n=e;;){var i=ea.get(n);if(i==null){if(m.isEditor(n))return r;break}var s=Qs.get(n);if(s==null)break;r.unshift(s),n=i}throw new Error("Unable to find the path for Slate node: ".concat($e.stringify(e)))},focus:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Zt.get(e)){if(r.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Y.focus(e,{retries:r.retries-1})},10);return}var n=Y.toDOMNode(e,e),i=Y.findDocumentOrShadowRoot(e);if(i.activeElement!==n){if(e.selection&&i instanceof Document){var s=dn(i),a=Y.toDOMRange(e,e.selection);s==null||s.removeAllRanges(),s==null||s.addRange(a)}e.selection||te.select(e,m.start(e,[])),Zt.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:t=>{var e=Ml.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=n,s=Y.toDOMNode(e,e),a;try{a=Dt(r)?r:r.parentElement}catch(o){if(o instanceof Error&&!o.message.includes('Permission denied to access property "nodeType"'))throw o}return a?a.closest("[data-slate-editor]")===s&&(!i||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===s||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Xt(e)&&Y.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:r,focus:n}=e;return m.hasPath(t,r.path)&&m.hasPath(t,n.path)},hasSelectableTarget:(t,e)=>Y.hasEditableTarget(t,e)||Y.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Xt(e)&&Y.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!Cr.get(t),isFocused:t=>!!Zt.get(t),isReadOnly:t=>!!ra.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(ra.get(t))return!1;var r=Y.hasTarget(t,e)&&Y.toSlateNode(t,e);return ue.isElement(r)&&m.isVoid(t,r)},setFragmentData:(t,e,r)=>t.setFragmentData(e,r),toDOMNode:(t,e)=>{var r=pi.get(t),n=m.isEditor(e)?fi.get(t):r==null?void 0:r.get(Y.findKey(t,e));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat($e.stringify(e)));return n},toDOMPoint:(t,e)=>{var[r]=m.node(t,e.path),n=Y.toDOMNode(t,r),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var s="[data-slate-string], [data-slate-zero-width]",a=Array.from(n.querySelectorAll(s)),o=0,u=0;u<a.length;u++){var l=a[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:p}=f.textContent,h=l.getAttribute("data-slate-length"),y=h==null?p:parseInt(h,10),v=o+y,g=a[u+1];if(e.offset===v&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var d,D=g.childNodes[0];i=[D instanceof VC?D:g,(d=g.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=v){var E=Math.min(p,Math.max(0,e.offset-o));i=[f,E];break}o=v}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat($e.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:r,focus:n}=e,i=q.isBackward(e),s=Y.toDOMPoint(t,r),a=q.isCollapsed(e)?s:Y.toDOMPoint(t,n),o=Y.getWindow(t),u=o.document.createRange(),[l,f]=i?a:s,[p,h]=i?s:a,y=Dt(l)?l:l.parentElement,v=!!y.getAttribute("data-slate-zero-width"),g=Dt(p)?p:p.parentElement,d=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,v?1:f),u.setEnd(p,d?1:h),u},toSlateNode:(t,e)=>{var r=Dt(e)?e:e.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?cn.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(t,e,r)=>{var{exactMatch:n,suppressThrow:i,searchDirection:s="backward"}=r,[a,o]=n?e:ZC(e),u=a.parentNode,l=null,f=0;if(u){var p,h,y=Y.toDOMNode(t,t),v=u.closest('[data-slate-void="true"]'),g=v&&y.contains(v)?v:null,d=u.closest('[contenteditable="false"]'),D=d&&y.contains(d)?d:null,E=u.closest("[data-slate-leaf]"),B=null;if(E){if(l=E.closest('[data-slate-node="text"]'),l){var w=Y.getWindow(t),b=w.document.createRange();b.setStart(l,0),b.setEnd(a,o);var x=b.cloneContents(),S=[...Array.prototype.slice.call(x.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(x.querySelectorAll("[contenteditable=false]"))];S.forEach(V=>{if(ut&&!n&&V.hasAttribute("data-slate-zero-width")&&V.textContent.length>0&&V.textContext!=="\uFEFF"){V.textContent.startsWith("\uFEFF")&&(V.textContent=V.textContent.slice(1));return}V.parentNode.removeChild(V)}),f=x.textContent.length,B=l}}else if(g){for(var U=g.querySelectorAll("[data-slate-leaf]"),P=0;P<U.length;P++){var H=U[P];if(Y.hasDOMNode(t,H)){E=H;break}}E?(l=E.closest('[data-slate-node="text"]'),B=E,f=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(V=>{f-=V.textContent.length})):f=1}else if(D){var j=V=>V?V.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],M=D.closest('[data-slate-node="element"]');if(s==="forward"){var N,z=[...j(M),...j(M==null?void 0:M.nextElementSibling)];E=(N=z.find(V=>QC(D,V)))!==null&&N!==void 0?N:null}else{var W,X=[...j(M==null?void 0:M.previousElementSibling),...j(M)];E=(W=X.findLast(V=>Wl(D,V)))!==null&&W!==void 0?W:null}E&&(l=E.closest('[data-slate-node="text"]'),B=E,s==="forward"?f=0:(f=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(V=>{f-=V.textContent.length})))}B&&f===B.textContent.length&&ut&&B.getAttribute("data-slate-zero-width")==="z"&&(p=B.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Mr&&(h=B.textContent)!==null&&h!==void 0&&h.endsWith(`
43
43
 
44
- `))&&f--}if(ut&&!l&&!n){var V=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(V&&X.hasDOMNode(t,V,{editable:!0})){var Q=X.toSlateNode(t,V),{path:ie,offset:k}=m.start(t,X.findPath(t,Q));return V.querySelector("[data-slate-leaf]")||(k=o),{path:ie,offset:k}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var G=X.toSlateNode(t,l),$=X.findPath(t,G);return{path:$,offset:f}},toSlateRange:(t,e,r)=>{var n,{exactMatch:i,suppressThrow:s}=r,a=aa(e)?e.anchorNode:e.startContainer,o,u,l,f,p;if(a)if(aa(e)){if(Mr&&e.rangeCount>1){l=e.focusNode;var h=e.getRangeAt(0),y=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let x=function(A){return A.childElementCount>0?x(A.children[0]):A};var v=h.startContainer,g=y.startContainer,d=x(v.children[h.startOffset]),D=x(g.children[y.startOffset]);f=0,D.childNodes.length>0?o=D.childNodes[0]:o=D,d.childNodes.length>0?l=d.childNodes[0]:l=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else h.startContainer===l?(o=y.endContainer,u=y.endOffset,f=h.startOffset):(o=h.startContainer,u=h.endOffset,f=y.startOffset)}else o=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Tl&&KC(o)||Mr?p=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:p=e.isCollapsed}else o=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,p=e.collapsed;if(o==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Mr&&(n=l.textContent)!==null&&n!==void 0&&n.endsWith(`
44
+ `))&&f--}if(ut&&!l&&!n){var R=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(R&&Y.hasDOMNode(t,R,{editable:!0})){var ne=Y.toSlateNode(t,R),{path:Q,offset:k}=m.start(t,Y.findPath(t,ne));return R.querySelector("[data-slate-leaf]")||(k=o),{path:Q,offset:k}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var G=Y.toSlateNode(t,l),$=Y.findPath(t,G);return{path:$,offset:f}},toSlateRange:(t,e,r)=>{var n,{exactMatch:i,suppressThrow:s}=r,a=aa(e)?e.anchorNode:e.startContainer,o,u,l,f,p;if(a)if(aa(e)){if(Mr&&e.rangeCount>1){l=e.focusNode;var h=e.getRangeAt(0),y=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let x=function(S){return S.childElementCount>0?x(S.children[0]):S};var v=h.startContainer,g=y.startContainer,d=x(v.children[h.startOffset]),D=x(g.children[y.startOffset]);f=0,D.childNodes.length>0?o=D.childNodes[0]:o=D,d.childNodes.length>0?l=d.childNodes[0]:l=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else h.startContainer===l?(o=y.endContainer,u=y.endOffset,f=h.startOffset):(o=h.startContainer,u=h.endOffset,f=y.startOffset)}else o=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Tl&&KC(o)||Mr?p=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:p=e.isCollapsed}else o=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,p=e.collapsed;if(o==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Mr&&(n=l.textContent)!==null&&n!==void 0&&n.endsWith(`
45
45
 
46
- `)&&f===l.textContent.length&&f--;var E=X.toSlatePoint(t,[o,u],{exactMatch:i,suppressThrow:s});if(!E)return null;var B=Wl(o,l)||o===l&&f<u,w=p?E:X.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:s,searchDirection:B?"forward":"backward"});if(!w)return null;var b={anchor:E,focus:w};return q.isExpanded(b)&&q.isForward(b)&&Dt(l)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function r0(t,e){var{path:r,diff:n}=e;if(!m.hasPath(t,r))return!1;var i=se.get(t,r);if(!le.isText(i))return!1;if(n.start!==i.text.length||n.text.length===0)return i.text.slice(n.start,n.start+n.text.length)===n.text;var s=L.next(r);if(!m.hasPath(t,s))return!1;var a=se.get(t,s);return le.isText(a)&&a.text.startsWith(n.text)}function Hl(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((i,s)=>i.slice(0,s.start)+s.text+i.slice(s.end),t)}function n0(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n))return n;return r}function i0(t,e,r){for(var n=Math.min(t.length,e.length,r),i=0;i<n;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return n}function Ul(t,e){var{start:r,end:n,text:i}=e,s=t.slice(r,n),a=n0(s,i),o=Math.min(s.length-a,i.length-a),u=i0(s,i,o),l={start:r+a,end:n-u,text:i.slice(a,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function s0(t,e,r){var n=Math.min(e.start,r.start),i=Math.max(0,Math.min(e.start+e.text.length,r.end)-r.start),s=Hl(t,e,r),a=Math.max(r.start+r.text.length,e.start+e.text.length+(e.start+e.text.length>r.start?r.text.length:0)-i),o=s.slice(n,a),u=Math.max(e.end,r.end-e.text.length+(e.end-e.start));return Ul(t,{start:n,end:u,text:o})}function a0(t){var{path:e,diff:r}=t;return{anchor:{path:e,offset:r.start},focus:{path:e,offset:r.end}}}function ua(t,e){var{path:r,offset:n}=e;if(!m.hasPath(t,r))return null;var i=se.get(t,r);if(!le.isText(i))return null;var s=m.above(t,{match:o=>ue.isElement(o)&&m.isBlock(t,o),at:r});if(!s)return null;for(;n>i.text.length;){var a=m.next(t,{at:r,match:le.isText});if(!a||!L.isDescendant(a[1],s[1]))return null;n-=i.text.length,i=a[0],r=a[1]}return{path:r,offset:n}}function Rl(t,e){var r=ua(t,e.anchor);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var n=ua(t,e.focus);return n?{anchor:r,focus:n}:null}function la(t,e,r){var n=pt.get(t),i=n==null?void 0:n.find(f=>{var{path:p}=f;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return ye.transform(e,r,{affinity:"backward"});var{diff:s}=i;if(e.offset<=s.start+s.text.length){var a={path:e.path,offset:s.start},o=ye.transform(a,r,{affinity:"backward"});return o?{path:o.path,offset:o.offset+e.offset-s.start}:null}var u={path:e.path,offset:e.offset-s.text.length+s.end-s.start},l=ye.transform(u,r,{affinity:"backward"});return l?r.type==="split_node"&&L.equals(r.path,e.path)&&u.offset<r.position&&s.start<r.position?l:{path:l.path,offset:l.offset+s.text.length-s.end+s.start}:null}function Vl(t,e,r){var n=la(t,e.anchor,r);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var i=la(t,e.focus,r);return i?{anchor:n,focus:i}:null}function o0(t,e){var{path:r,diff:n,id:i}=t;switch(e.type){case"insert_text":return!L.equals(e.path,r)||e.offset>=n.end?t:e.offset<=n.start?{diff:{start:e.text.length+n.start,end:e.text.length+n.end,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end+e.text.length,text:n.text},id:i,path:r};case"remove_text":return!L.equals(e.path,r)||e.offset>=n.end?t:e.offset+e.text.length<=n.start?{diff:{start:n.start-e.text.length,end:n.end-e.text.length,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end-e.text.length,text:n.text},id:i,path:r};case"split_node":return!L.equals(e.path,r)||e.position>=n.end?{diff:n,id:i,path:L.transform(r,e,{affinity:"backward"})}:e.position>n.start?{diff:{start:n.start,end:Math.min(e.position,n.end),text:n.text},id:i,path:r}:{diff:{start:n.start-e.position,end:n.end-e.position,text:n.text},id:i,path:L.transform(r,e,{affinity:"forward"})};case"merge_node":return L.equals(e.path,r)?{diff:{start:n.start+e.position,end:n.end+e.position,text:n.text},id:i,path:L.transform(r,e)}:{diff:n,id:i,path:L.transform(r,e)}}var s=L.transform(r,e);return s?{diff:n,path:s,id:i}:null}function ql(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ql(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ql(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var u0=25,l0=200,c0=function(){},f0=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function d0(t){var{editor:e,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=t,i=!1,s=null,a=null,o=null,u=0,l=!1,f=()=>{var M=Yt.get(e);if(Yt.delete(e),M){var{selection:W}=e,_=Rl(e,M);_&&(!W||!q.equals(_,W))&&te.select(e,_)}},p=()=>{var M=Kt.get(e);if(Kt.delete(e),!!M){if(M.at){var W=ye.isPoint(M.at)?ua(e,M.at):Rl(e,M.at);if(!W)return;var _=m.range(e,W);(!e.selection||!q.equals(e.selection,_))&&te.select(e,W)}M.run()}},h=()=>{if(a&&(clearTimeout(a),a=null),o&&(clearTimeout(o),o=null),!w()&&!B()){f();return}i||(i=!0,setTimeout(()=>i=!1)),B()&&(i="action");var M=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),c0("flush",Kt.get(e),pt.get(e));for(var W=w(),_;_=(z=pt.get(e))===null||z===void 0?void 0:z[0];){var z,Y,V=Bt.get(e);V!==void 0&&(Bt.delete(e),e.marks=V),V&&l===!1&&(l=null);var Q=a0(_);(!e.selection||!q.equals(e.selection,Q))&&te.select(e,Q),_.diff.text?m.insertText(e,_.diff.text):m.deleteFragment(e),pt.set(e,(Y=pt.get(e))===null||Y===void 0?void 0:Y.filter(G=>{var{id:$}=G;return $!==_.id})),r0(e,_)||(W=!1,Kt.delete(e),Nt.delete(e),i="action",Yt.delete(e),r.cancel(),n.cancel(),M==null||M.unref())}var ie=M==null?void 0:M.unref();if(ie&&!Yt.get(e)&&(!e.selection||!q.equals(ie,e.selection))&&te.select(e,ie),B()){p();return}W&&r(),r.flush(),n.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},y=M=>{s&&clearTimeout(s),s=setTimeout(()=>{Cr.set(e,!1),h()},u0)},v=M=>{Cr.set(e,!0),s&&(clearTimeout(s),s=null)},g=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,_=ta.get(e);if(_){if(w()||W){_.style.display="none";return}_.style.removeProperty("display")}},d=(M,W)=>{var _,z=(_=pt.get(e))!==null&&_!==void 0?_:[];pt.set(e,z);var Y=se.leaf(e,M),V=z.findIndex(k=>L.equals(k.path,M));if(V<0){var Q=Ul(Y.text,W);Q&&z.push({path:M,diff:W,id:u++}),g();return}var ie=s0(Y.text,z[V].diff,W);if(!ie){z.splice(V,1),g();return}z[V]=hi(hi({},z[V]),{},{diff:ie})},D=function(W){var{at:_}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,Yt.delete(e),r.cancel(),n.cancel(),B()&&h(),Kt.set(e,{at:_,run:W}),o=setTimeout(h)},E=M=>{var W;if(a&&(clearTimeout(a),a=null),!kr.get(e)){var{inputType:_}=M,z=null,Y=M.dataTransfer||M.data||void 0;l!==!1&&_!=="insertText"&&_!=="insertCompositionText"&&(l=!1);var[V]=M.getTargetRanges();V&&(z=X.toSlateRange(e,V,{exactMatch:!1,suppressThrow:!0}));var Q=X.getWindow(e),ie=Q.getSelection();if(!z&&ie&&(V=ie,z=X.toSlateRange(e,ie,{exactMatch:!1,suppressThrow:!0})),z=(W=z)!==null&&W!==void 0?W:e.selection,!!z){var k=!0;if(_.startsWith("delete")){if(q.isExpanded(z)){var[G,$]=q.edges(z),R=se.leaf(e,G.path);if(R.text.length===G.offset&&$.offset===0){var re=m.next(e,{at:G.path,match:le.isText});re&&L.equals(re[1],$.path)&&(z={anchor:$,focus:$})}}var F=_.endsWith("Backward")?"backward":"forward",[O,N]=q.edges(z),[T,I]=m.leaf(e,O.path),Z={text:"",start:O.offset,end:N.offset},ee=pt.get(e),J=ee==null?void 0:ee.find(Ke=>L.equals(Ke.path,I)),de=J?[J.diff,Z]:[Z],fe=Hl(T.text,...de);if(fe.length===0&&(k=!1),q.isExpanded(z)){if(k&&L.equals(z.anchor.path,z.focus.path)){var ce={path:z.anchor.path,offset:O.offset},we=m.range(e,ce,ce);return A(we),d(z.anchor.path,{text:"",end:N.offset,start:O.offset})}return D(()=>m.deleteFragment(e,{direction:F}),{at:z})}}switch(_){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:z});case"deleteContent":case"deleteContentForward":{var{anchor:Me}=z;if(k&&q.isCollapsed(z)){var Ae=se.leaf(e,Me.path);if(Me.offset<Ae.text.length)return d(Me.path,{text:"",start:Me.offset,end:Me.offset+1})}return D(()=>m.deleteForward(e),{at:z})}case"deleteContentBackward":{var Ie,{anchor:qe}=z,rt=aa(V)?V.isCollapsed:!!((Ie=V)!==null&&Ie!==void 0&&Ie.collapsed);return k&&rt&&q.isCollapsed(z)&&qe.offset>0?d(qe.path,{text:"",start:qe.offset-1,end:qe.offset}):D(()=>m.deleteBackward(e),{at:z})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:z});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:z});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:z});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:z});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:z});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:z});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:z});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:z});case"insertParagraph":return D(()=>m.insertBreak(e),{at:z});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(f0(Y))return D(()=>X.insertData(e,Y),{at:z});var Be=Y??"";if(Bt.get(e)&&(Be=Be.replace("\uFEFF","")),_==="insertText"&&/.*\n.*\n$/.test(Be)&&(Be=Be.slice(0,-1)),Be.includes(`
46
+ `)&&f===l.textContent.length&&f--;var E=Y.toSlatePoint(t,[o,u],{exactMatch:i,suppressThrow:s});if(!E)return null;var B=Wl(o,l)||o===l&&f<u,w=p?E:Y.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:s,searchDirection:B?"forward":"backward"});if(!w)return null;var b={anchor:E,focus:w};return q.isExpanded(b)&&q.isForward(b)&&Dt(l)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function r0(t,e){var{path:r,diff:n}=e;if(!m.hasPath(t,r))return!1;var i=se.get(t,r);if(!le.isText(i))return!1;if(n.start!==i.text.length||n.text.length===0)return i.text.slice(n.start,n.start+n.text.length)===n.text;var s=L.next(r);if(!m.hasPath(t,s))return!1;var a=se.get(t,s);return le.isText(a)&&a.text.startsWith(n.text)}function Hl(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((i,s)=>i.slice(0,s.start)+s.text+i.slice(s.end),t)}function n0(t,e){for(var r=Math.min(t.length,e.length),n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n))return n;return r}function i0(t,e,r){for(var n=Math.min(t.length,e.length,r),i=0;i<n;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return n}function Ul(t,e){var{start:r,end:n,text:i}=e,s=t.slice(r,n),a=n0(s,i),o=Math.min(s.length-a,i.length-a),u=i0(s,i,o),l={start:r+a,end:n-u,text:i.slice(a,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function s0(t,e,r){var n=Math.min(e.start,r.start),i=Math.max(0,Math.min(e.start+e.text.length,r.end)-r.start),s=Hl(t,e,r),a=Math.max(r.start+r.text.length,e.start+e.text.length+(e.start+e.text.length>r.start?r.text.length:0)-i),o=s.slice(n,a),u=Math.max(e.end,r.end-e.text.length+(e.end-e.start));return Ul(t,{start:n,end:u,text:o})}function a0(t){var{path:e,diff:r}=t;return{anchor:{path:e,offset:r.start},focus:{path:e,offset:r.end}}}function ua(t,e){var{path:r,offset:n}=e;if(!m.hasPath(t,r))return null;var i=se.get(t,r);if(!le.isText(i))return null;var s=m.above(t,{match:o=>ue.isElement(o)&&m.isBlock(t,o),at:r});if(!s)return null;for(;n>i.text.length;){var a=m.next(t,{at:r,match:le.isText});if(!a||!L.isDescendant(a[1],s[1]))return null;n-=i.text.length,i=a[0],r=a[1]}return{path:r,offset:n}}function Rl(t,e){var r=ua(t,e.anchor);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var n=ua(t,e.focus);return n?{anchor:r,focus:n}:null}function la(t,e,r){var n=pt.get(t),i=n==null?void 0:n.find(f=>{var{path:p}=f;return L.equals(p,e.path)});if(!i||e.offset<=i.diff.start)return ye.transform(e,r,{affinity:"backward"});var{diff:s}=i;if(e.offset<=s.start+s.text.length){var a={path:e.path,offset:s.start},o=ye.transform(a,r,{affinity:"backward"});return o?{path:o.path,offset:o.offset+e.offset-s.start}:null}var u={path:e.path,offset:e.offset-s.text.length+s.end-s.start},l=ye.transform(u,r,{affinity:"backward"});return l?r.type==="split_node"&&L.equals(r.path,e.path)&&u.offset<r.position&&s.start<r.position?l:{path:l.path,offset:l.offset+s.text.length-s.end+s.start}:null}function Vl(t,e,r){var n=la(t,e.anchor,r);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var i=la(t,e.focus,r);return i?{anchor:n,focus:i}:null}function o0(t,e){var{path:r,diff:n,id:i}=t;switch(e.type){case"insert_text":return!L.equals(e.path,r)||e.offset>=n.end?t:e.offset<=n.start?{diff:{start:e.text.length+n.start,end:e.text.length+n.end,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end+e.text.length,text:n.text},id:i,path:r};case"remove_text":return!L.equals(e.path,r)||e.offset>=n.end?t:e.offset+e.text.length<=n.start?{diff:{start:n.start-e.text.length,end:n.end-e.text.length,text:n.text},id:i,path:r}:{diff:{start:n.start,end:n.end-e.text.length,text:n.text},id:i,path:r};case"split_node":return!L.equals(e.path,r)||e.position>=n.end?{diff:n,id:i,path:L.transform(r,e,{affinity:"backward"})}:e.position>n.start?{diff:{start:n.start,end:Math.min(e.position,n.end),text:n.text},id:i,path:r}:{diff:{start:n.start-e.position,end:n.end-e.position,text:n.text},id:i,path:L.transform(r,e,{affinity:"forward"})};case"merge_node":return L.equals(e.path,r)?{diff:{start:n.start+e.position,end:n.end+e.position,text:n.text},id:i,path:L.transform(r,e)}:{diff:n,id:i,path:L.transform(r,e)}}var s=L.transform(r,e);return s?{diff:n,path:s,id:i}:null}function ql(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ql(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ql(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var u0=25,l0=200,c0=function(){},f0=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function d0(t){var{editor:e,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=t,i=!1,s=null,a=null,o=null,u=0,l=!1,f=()=>{var M=Yt.get(e);if(Yt.delete(e),M){var{selection:N}=e,z=Rl(e,M);z&&(!N||!q.equals(z,N))&&te.select(e,z)}},p=()=>{var M=Kt.get(e);if(Kt.delete(e),!!M){if(M.at){var N=ye.isPoint(M.at)?ua(e,M.at):Rl(e,M.at);if(!N)return;var z=m.range(e,N);(!e.selection||!q.equals(e.selection,z))&&te.select(e,N)}M.run()}},h=()=>{if(a&&(clearTimeout(a),a=null),o&&(clearTimeout(o),o=null),!w()&&!B()){f();return}i||(i=!0,setTimeout(()=>i=!1)),B()&&(i="action");var M=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),c0("flush",Kt.get(e),pt.get(e));for(var N=w(),z;z=(W=pt.get(e))===null||W===void 0?void 0:W[0];){var W,X,R=Bt.get(e);R!==void 0&&(Bt.delete(e),e.marks=R),R&&l===!1&&(l=null);var ne=a0(z);(!e.selection||!q.equals(e.selection,ne))&&te.select(e,ne),z.diff.text?m.insertText(e,z.diff.text):m.deleteFragment(e),pt.set(e,(X=pt.get(e))===null||X===void 0?void 0:X.filter(G=>{var{id:$}=G;return $!==z.id})),r0(e,z)||(N=!1,Kt.delete(e),Nt.delete(e),i="action",Yt.delete(e),r.cancel(),n.cancel(),M==null||M.unref())}var Q=M==null?void 0:M.unref();if(Q&&!Yt.get(e)&&(!e.selection||!q.equals(Q,e.selection))&&te.select(e,Q),B()){p();return}N&&r(),r.flush(),n.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},y=M=>{s&&clearTimeout(s),s=setTimeout(()=>{Cr.set(e,!1),h()},u0)},v=M=>{Cr.set(e,!0),s&&(clearTimeout(s),s=null)},g=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,z=ta.get(e);if(z){if(w()||N){z.style.display="none";return}z.style.removeProperty("display")}},d=(M,N)=>{var z,W=(z=pt.get(e))!==null&&z!==void 0?z:[];pt.set(e,W);var X=se.leaf(e,M),R=W.findIndex(k=>L.equals(k.path,M));if(R<0){var ne=Ul(X.text,N);ne&&W.push({path:M,diff:N,id:u++}),g();return}var Q=s0(X.text,W[R].diff,N);if(!Q){W.splice(R,1),g();return}W[R]=hi(hi({},W[R]),{},{diff:Q})},D=function(N){var{at:z}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,Yt.delete(e),r.cancel(),n.cancel(),B()&&h(),Kt.set(e,{at:z,run:N}),o=setTimeout(h)},E=M=>{var N;if(a&&(clearTimeout(a),a=null),!kr.get(e)){var{inputType:z}=M,W=null,X=M.dataTransfer||M.data||void 0;l!==!1&&z!=="insertText"&&z!=="insertCompositionText"&&(l=!1);var[R]=M.getTargetRanges();R&&(W=Y.toSlateRange(e,R,{exactMatch:!1,suppressThrow:!0}));var ne=Y.getWindow(e),Q=ne.getSelection();if(!W&&Q&&(R=Q,W=Y.toSlateRange(e,Q,{exactMatch:!1,suppressThrow:!0})),W=(N=W)!==null&&N!==void 0?N:e.selection,!!W){var k=!0;if(z.startsWith("delete")){if(q.isExpanded(W)){var[G,$]=q.edges(W),V=se.leaf(e,G.path);if(V.text.length===G.offset&&$.offset===0){var re=m.next(e,{at:G.path,match:le.isText});re&&L.equals(re[1],$.path)&&(W={anchor:$,focus:$})}}var F=z.endsWith("Backward")?"backward":"forward",[O,_]=q.edges(W),[T,I]=m.leaf(e,O.path),Z={text:"",start:O.offset,end:_.offset},ee=pt.get(e),J=ee==null?void 0:ee.find(Ke=>L.equals(Ke.path,I)),de=J?[J.diff,Z]:[Z],fe=Hl(T.text,...de);if(fe.length===0&&(k=!1),q.isExpanded(W)){if(k&&L.equals(W.anchor.path,W.focus.path)){var ce={path:W.anchor.path,offset:O.offset},we=m.range(e,ce,ce);return S(we),d(W.anchor.path,{text:"",end:_.offset,start:O.offset})}return D(()=>m.deleteFragment(e,{direction:F}),{at:W})}}switch(z){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:W});case"deleteContent":case"deleteContentForward":{var{anchor:Me}=W;if(k&&q.isCollapsed(W)){var Ae=se.leaf(e,Me.path);if(Me.offset<Ae.text.length)return d(Me.path,{text:"",start:Me.offset,end:Me.offset+1})}return D(()=>m.deleteForward(e),{at:W})}case"deleteContentBackward":{var Ie,{anchor:qe}=W,rt=aa(R)?R.isCollapsed:!!((Ie=R)!==null&&Ie!==void 0&&Ie.collapsed);return k&&rt&&q.isCollapsed(W)&&qe.offset>0?d(qe.path,{text:"",start:qe.offset-1,end:qe.offset}):D(()=>m.deleteBackward(e),{at:W})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:W});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:W});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:W});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:W});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:W});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:W});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:W});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:W});case"insertParagraph":return D(()=>m.insertBreak(e),{at:W});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(f0(X))return D(()=>Y.insertData(e,X),{at:W});var Be=X??"";if(Bt.get(e)&&(Be=Be.replace("\uFEFF","")),z==="insertText"&&/.*\n.*\n$/.test(Be)&&(Be=Be.slice(0,-1)),Be.includes(`
47
47
  `))return D(()=>{var Ke=Be.split(`
48
- `);Ke.forEach((et,Ct)=>{et&&m.insertText(e,et),Ct!==Ke.length-1&&m.insertSoftBreak(e)})},{at:z});if(L.equals(z.anchor.path,z.focus.path)){var[Je,it]=q.edges(z),Oe={start:Je.offset,end:it.offset,text:Be};if(Be&&l&&_==="insertCompositionText"){var Fe=l.start+l.text.search(/\S|$/),Qe=Oe.start+Oe.text.search(/\S|$/);Qe===Fe+1&&Oe.end===l.start+l.text.length?(Oe.start-=1,l=null,H()):l=!1}else _==="insertText"?l===null?l=Oe:l&&q.isCollapsed(z)&&l.end+l.text.length===Je.offset?l=hi(hi({},l),{},{text:l.text+Be}):l=!1:l=!1;if(k){d(Je.path,Oe);return}}return D(()=>m.insertText(e,Be),{at:z})}}}}},B=()=>!!Kt.get(e),w=()=>{var M;return!!((M=pt.get(e))!==null&&M!==void 0&&M.length)},b=()=>B()||w(),x=()=>i,A=M=>{Yt.set(e,M),a&&(clearTimeout(a),a=null);var{selection:W}=e;if(M){var _=!W||!L.equals(W.anchor.path,M.anchor.path),z=!W||!L.equals(W.anchor.path.slice(0,-1),M.anchor.path.slice(0,-1));(_&&l||z)&&(l=!1),(_||w())&&(a=setTimeout(h,l0))}},U=()=>{(B()||!w())&&h()},P=M=>{w()||(g(!0),setTimeout(g))},H=()=>{B()||(o=setTimeout(h))},j=M=>{if(!(w()||B())&&M.some(_=>oa(e,_,M))){var W;(W=kl.get(e))===null||W===void 0||W()}};return{flush:h,scheduleFlush:H,hasPendingDiffs:w,hasPendingAction:B,hasPendingChanges:b,isFlushing:x,handleUserSelect:A,handleCompositionEnd:y,handleCompositionStart:v,handleDOMBeforeInput:E,handleKeyDown:P,handleDomMutations:j,handleInput:U}}function p0(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var pn=ci?c.useLayoutEffect:c.useEffect;function h0(t,e,r){var[n]=c.useState(()=>new MutationObserver(e));pn(()=>{n.takeRecords()}),c.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(t.current,r),()=>n.disconnect()},[n,t,r])}var v0=["node"];function Gl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function g0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var m0={subtree:!0,childList:!0,characterData:!0},y0=ut?t=>{var{node:e}=t,r=Tr(t,v0);if(!ut)return null;var n=qt(),i=p0(),[s]=c.useState(()=>d0(g0({editor:n},r)));return h0(e,s.handleDomMutations,m0),ia.set(n,s.scheduleFlush),i&&s.flush(),s}:()=>null,C0=["anchor","focus"],b0=["anchor","focus"],D0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>e.hasOwnProperty(r)&&t[r]===e[r]),Zl=(t,e)=>{var r=Tr(t,C0),n=Tr(e,b0);return t[jr]===e[jr]&&D0(r,n)},E0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(!q.equals(n,i)||!Zl(n,i))return!1}return!0},w0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(n.anchor.offset!==i.anchor.offset||n.focus.offset!==i.focus.offset||!Zl(n,i))return!1}return!0};function Kl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function O0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var x0=t=>{var{isLast:e,leaf:r,parent:n,text:i}=t,s=qt(),a=X.findPath(s,i),o=L.parent(a),u=!!r[jl];return s.isVoid(n)?c.createElement(ca,{length:se.string(n).length}):r.text===""&&n.children[n.children.length-1]===i&&!s.isInline(n)&&m.string(s,o)===""?c.createElement(ca,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?c.createElement(ca,{isMarkPlaceholder:u}):e&&r.text.slice(-1)===`
48
+ `);Ke.forEach((et,Ct)=>{et&&m.insertText(e,et),Ct!==Ke.length-1&&m.insertSoftBreak(e)})},{at:W});if(L.equals(W.anchor.path,W.focus.path)){var[Je,it]=q.edges(W),Oe={start:Je.offset,end:it.offset,text:Be};if(Be&&l&&z==="insertCompositionText"){var Fe=l.start+l.text.search(/\S|$/),Qe=Oe.start+Oe.text.search(/\S|$/);Qe===Fe+1&&Oe.end===l.start+l.text.length?(Oe.start-=1,l=null,H()):l=!1}else z==="insertText"?l===null?l=Oe:l&&q.isCollapsed(W)&&l.end+l.text.length===Je.offset?l=hi(hi({},l),{},{text:l.text+Be}):l=!1:l=!1;if(k){d(Je.path,Oe);return}}return D(()=>m.insertText(e,Be),{at:W})}}}}},B=()=>!!Kt.get(e),w=()=>{var M;return!!((M=pt.get(e))!==null&&M!==void 0&&M.length)},b=()=>B()||w(),x=()=>i,S=M=>{Yt.set(e,M),a&&(clearTimeout(a),a=null);var{selection:N}=e;if(M){var z=!N||!L.equals(N.anchor.path,M.anchor.path),W=!N||!L.equals(N.anchor.path.slice(0,-1),M.anchor.path.slice(0,-1));(z&&l||W)&&(l=!1),(z||w())&&(a=setTimeout(h,l0))}},U=()=>{(B()||!w())&&h()},P=M=>{w()||(g(!0),setTimeout(g))},H=()=>{B()||(o=setTimeout(h))},j=M=>{if(!(w()||B())&&M.some(z=>oa(e,z,M))){var N;(N=kl.get(e))===null||N===void 0||N()}};return{flush:h,scheduleFlush:H,hasPendingDiffs:w,hasPendingAction:B,hasPendingChanges:b,isFlushing:x,handleUserSelect:S,handleCompositionEnd:y,handleCompositionStart:v,handleDOMBeforeInput:E,handleKeyDown:P,handleDomMutations:j,handleInput:U}}function p0(){var t=c.useRef(!1);return c.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var pn=ci?c.useLayoutEffect:c.useEffect;function h0(t,e,r){var[n]=c.useState(()=>new MutationObserver(e));pn(()=>{n.takeRecords()}),c.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(t.current,r),()=>n.disconnect()},[n,t,r])}var v0=["node"];function Gl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function g0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var m0={subtree:!0,childList:!0,characterData:!0},y0=ut?t=>{var{node:e}=t,r=Tr(t,v0);if(!ut)return null;var n=qt(),i=p0(),[s]=c.useState(()=>d0(g0({editor:n},r)));return h0(e,s.handleDomMutations,m0),ia.set(n,s.scheduleFlush),i&&s.flush(),s}:()=>null,C0=["anchor","focus"],b0=["anchor","focus"],D0=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>e.hasOwnProperty(r)&&t[r]===e[r]),Zl=(t,e)=>{var r=Tr(t,C0),n=Tr(e,b0);return t[jr]===e[jr]&&D0(r,n)},E0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(!q.equals(n,i)||!Zl(n,i))return!1}return!0},w0=(t,e)=>{if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++){var n=t[r],i=e[r];if(n.anchor.offset!==i.anchor.offset||n.focus.offset!==i.focus.offset||!Zl(n,i))return!1}return!0};function Kl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function O0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var x0=t=>{var{isLast:e,leaf:r,parent:n,text:i}=t,s=qt(),a=Y.findPath(s,i),o=L.parent(a),u=!!r[jl];return s.isVoid(n)?c.createElement(ca,{length:se.string(n).length}):r.text===""&&n.children[n.children.length-1]===i&&!s.isInline(n)&&m.string(s,o)===""?c.createElement(ca,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?c.createElement(ca,{isMarkPlaceholder:u}):e&&r.text.slice(-1)===`
49
49
  `?c.createElement(Yl,{isTrailing:!0,text:r.text}):c.createElement(Yl,{text:r.text})},Yl=t=>{var{text:e,isTrailing:r=!1}=t,n=c.useRef(null),i=()=>"".concat(e??"").concat(r?`
50
- `:""),[s]=c.useState(i);return pn(()=>{var a=i();n.current&&n.current.textContent!==a&&(n.current.textContent=a)}),c.createElement(B0,{ref:n},s)},B0=c.memo(c.forwardRef((t,e)=>c.createElement("span",{"data-slate-string":!0,ref:e},t.children))),ca=t=>{var{length:e=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=t,i={"data-slate-zero-width":r?"n":"z","data-slate-length":e};return n&&(i["data-slate-mark-placeholder"]=!0),c.createElement("span",O0({},i),!(ut||Pl)||!r?"\uFEFF":null,r?c.createElement("br",null):null)};function Xl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $l(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var S0=ut?300:0;function A0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function Jl(t){t.current&&(clearTimeout(t.current),t.current=null)}var L0=t=>{var{leaf:e,isLast:r,text:n,parent:i,renderPlaceholder:s,renderLeaf:a=E=>c.createElement(F0,$l({},E))}=t,o=qt(),u=c.useRef(null),l=c.useRef(null),[f,p]=c.useState(!1),h=c.useRef(null),y=c.useCallback(E=>{if(A0(u,E==null),E==null){var B;ta.delete(o),(B=e.onPlaceholderResize)===null||B===void 0||B.call(e,null)}else{if(ta.set(o,E),!u.current){var w=window.ResizeObserver||kC;u.current=new w(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,E)})}u.current.observe(E),l.current=E}},[l,e,o]),v=c.createElement(x0,{isLast:r,leaf:e,parent:i,text:n}),g=!!e[jr];if(c.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},S0)):(Jl(h),p(!1)),()=>Jl(h)),[g,p]),g&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:mr?"inherit":void 0},contentEditable:!1,ref:y}};v=c.createElement(c.Fragment,null,s(d),v)}var D={"data-slate-leaf":!0};return a({attributes:D,children:v,leaf:e,text:n})},P0=c.memo(L0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&le.equals(e.leaf,t.leaf)&&e.leaf[jr]===t.leaf[jr]),F0=t=>{var{attributes:e,children:r}=t;return c.createElement("span",$l({},e),r)},T0=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:i,renderLeaf:s,text:a}=t,o=qt(),u=c.useRef(null),l=le.decorations(a,e),f=X.findKey(o,a),p=[],h=0;h<l.length;h++){var y=l[h];p.push(c.createElement(P0,{isLast:r&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:y,text:a,parent:n,renderLeaf:s}))}var v=c.useCallback(g=>{var d=pi.get(o);g?(d==null||d.set(f,g),yr.set(a,g),cn.set(g,a)):(d==null||d.delete(f),yr.delete(a),u.current&&cn.delete(u.current)),u.current=g},[u,o,f,a]);return c.createElement("span",{"data-slate-node":"text",ref:v},p)},Ql=c.memo(T0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&w0(e.decorations,t.decorations));function ec(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ec(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var M0=t=>{var{decorations:e,element:r,renderElement:n=E=>c.createElement(j0,fa({},E)),renderPlaceholder:i,renderLeaf:s,selection:a}=t,o=qt(),u=_0(),l=o.isInline(r),f=X.findKey(o,r),p=c.useCallback(E=>{var B=pi.get(o);E?(B==null||B.set(f,E),yr.set(r,E),cn.set(E,r)):(B==null||B.delete(f),yr.delete(r))},[o,f,r]),h=rc({decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:a}),y={"data-slate-node":"element",ref:p};if(l&&(y["data-slate-inline"]=!0),!l&&m.hasInlines(o,r)){var v=se.string(r),g=el(v);g==="rtl"&&(y.dir=g)}if(m.isVoid(o,r)){y["data-slate-void"]=!0,!u&&l&&(y.contentEditable=!1);var d=l?"span":"div",[[D]]=se.texts(r);h=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(Ql,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:D})),Qs.set(D,0),ea.set(D,r)}return n({attributes:y,children:h,element:r})},k0=c.memo(M0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&E0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),j0=t=>{var{attributes:e,children:r,element:n}=t,i=qt(),s=i.isInline(n)?"span":"div";return c.createElement(s,fa(fa({},e),{},{style:{position:"relative"}}),r)},tc=c.createContext(()=>[]),I0=()=>c.useContext(tc),N0=c.createContext(!1),rc=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:a}=t,o=I0(),u=qt();kr.set(u,!1);for(var l=X.findPath(u,r),f=[],p=ue.isElement(r)&&!u.isInline(r)&&m.hasInlines(u,r),h=0;h<r.children.length;h++){var y=l.concat(h),v=r.children[h],g=X.findKey(u,v),d=m.range(u,y),D=a&&q.intersection(d,a),E=o([v,y]);for(var B of e){var w=q.intersection(B,d);w&&E.push(w)}ue.isElement(v)?f.push(c.createElement(N0.Provider,{key:"provider-".concat(g.id),value:!!D},c.createElement(k0,{decorations:E,element:v,key:g.id,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:D}))):f.push(c.createElement(Ql,{decorations:E,key:g.id,isLast:p&&h===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:s,text:v})),Qs.set(v,h),ea.set(v,r)}return f},nc=c.createContext(!1),_0=()=>c.useContext(nc),ic=c.createContext(null),vi=()=>{var t=c.useContext(ic);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function z0(){var t=qt(),e=c.useRef(!1),r=c.useRef(0),n=c.useCallback(()=>{if(!e.current){e.current=!0;var i=X.getWindow(t);i.cancelAnimationFrame(r.current),r.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return c.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var W0=3,H0={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"},U0={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"},R0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},_e=t=>{var e=H0[t],r=U0[t],n=R0[t],i=e&&Hs(e),s=r&&Hs(r),a=n&&Hs(n);return o=>!!(i&&i(o)||Fl&&s&&s(o)||!Fl&&a&&a(o))},We={isBold:_e("bold"),isCompose:_e("compose"),isMoveBackward:_e("moveBackward"),isMoveForward:_e("moveForward"),isDeleteBackward:_e("deleteBackward"),isDeleteForward:_e("deleteForward"),isDeleteLineBackward:_e("deleteLineBackward"),isDeleteLineForward:_e("deleteLineForward"),isDeleteWordBackward:_e("deleteWordBackward"),isDeleteWordForward:_e("deleteWordForward"),isExtendBackward:_e("extendBackward"),isExtendForward:_e("extendForward"),isExtendLineBackward:_e("extendLineBackward"),isExtendLineForward:_e("extendLineForward"),isItalic:_e("italic"),isMoveLineBackward:_e("moveLineBackward"),isMoveLineForward:_e("moveLineForward"),isMoveWordBackward:_e("moveWordBackward"),isMoveWordForward:_e("moveWordForward"),isRedo:_e("redo"),isSoftBreak:_e("insertSoftBreak"),isSplitBlock:_e("splitBlock"),isTransposeCharacter:_e("transposeCharacter"),isUndo:_e("undo")},V0=(t,e)=>{var r=[],n=()=>{r=[]},i=a=>{if(e.current){var o=a.filter(u=>oa(t,u,a));r.push(...o)}};function s(){r.length>0&&(r.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),n())}return{registerMutations:i,restoreDOM:s,clear:n}},q0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class sc extends c.Component{constructor(){super(...arguments),bt(this,"context",null),bt(this,"manager",null),bt(this,"mutationObserver",null)}observe(){var e,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(r.current,q0)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=V0(r,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,r,n,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.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}}bt(sc,"contextType",Xs);var G0=ut?sc:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},Z0=c.createContext(!1),K0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Y0=["text"];function ac(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ac(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ac(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var X0=t=>c.createElement(c.Fragment,null,rc(t)),$0=c.forwardRef((t,e)=>{var r=c.useCallback(O=>c.createElement(J0,Pt({},O)),[]),{autoFocus:n,decorate:i=Q0,onDOMBeforeInput:s,placeholder:a,readOnly:o=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=r,scrollSelectionIntoView:p=eb,style:h={},as:y="div",disableDefaultStyles:v=!1}=t,g=Tr(t,K0),d=vi(),[D,E]=c.useState(!1),B=c.useRef(null),w=c.useRef([]),[b,x]=c.useState(),A=c.useRef(!1),{onUserInput:U,receivedUserInput:P}=z0(),[,H]=c.useReducer(O=>O+1,0);kl.set(d,H),ra.set(d,o);var j=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{B.current&&n&&B.current.focus()},[n]);var M=c.useRef(),W=c.useMemo(()=>cC(()=>{if(kr.get(d)){W();return}var O=X.toDOMNode(d,d),N=O.getRootNode();if(!A.current&&mr&&N instanceof ShadowRoot){A.current=!0;var T=JC();T?document.execCommand("indent"):te.deselect(d),A.current=!1;return}var I=M.current;if((ut||!X.isComposing(d))&&(!j.isUpdatingSelection||I!=null&&I.isFlushing())&&!j.isDraggingInternally){var Z=X.findDocumentOrShadowRoot(d),{activeElement:ee}=Z,J=X.toDOMNode(d,d),de=dn(Z);if(ee===J?(j.latestElement=ee,Zt.set(d,!0)):Zt.delete(d),!de)return te.deselect(d);var{anchorNode:fe,focusNode:ce}=de,we=X.hasEditableTarget(d,fe)||X.isTargetInsideNonReadonlyVoid(d,fe),Me=X.hasTarget(d,ce);if(we&&Me){var Ae=X.toSlateRange(d,de,{exactMatch:!1,suppressThrow:!0});Ae&&(!X.isComposing(d)&&!(I!=null&&I.hasPendingChanges())&&!(I!=null&&I.isFlushing())?te.select(d,Ae):I==null||I.handleUserSelect(Ae))}o&&(!we||!Me)&&te.deselect(d)}},100),[d,o,j]),_=c.useMemo(()=>iC(W,0),[W]);M.current=y0({node:B,onDOMSelectionChange:W,scheduleOnDOMSelectionChange:_}),pn(()=>{var O,N,T;B.current&&(T=sa(B.current))?(Ml.set(d,T),fi.set(d,B.current),yr.set(d,B.current),cn.set(B.current,d)):yr.delete(d);var{selection:I}=d,Z=X.findDocumentOrShadowRoot(d),ee=dn(Z);if(!(!ee||!X.isFocused(d)||(O=M.current)!==null&&O!==void 0&&O.hasPendingAction())){var J=we=>{var Me=ee.type!=="None";if(!(!I&&!Me)){var Ae=ee.focusNode,Ie;if(Mr&&ee.rangeCount>1){var qe=ee.getRangeAt(0),rt=ee.getRangeAt(ee.rangeCount-1);qe.startContainer===Ae?Ie=rt.endContainer:Ie=qe.startContainer}else Ie=ee.anchorNode;var Be=fi.get(d),Je=!1;if(Be.contains(Ie)&&Be.contains(Ae)&&(Je=!0),Me&&Je&&I&&!we){var it=X.toSlateRange(d,ee,{exactMatch:!0,suppressThrow:!0});if(it&&q.equals(it,I)){var Oe;if(!j.hasMarkPlaceholder||(Oe=Ie)!==null&&Oe!==void 0&&(Oe=Oe.parentElement)!==null&&Oe!==void 0&&Oe.hasAttribute("data-slate-mark-placeholder"))return}}if(I&&!X.hasRange(d,I)){d.selection=X.toSlateRange(d,ee,{exactMatch:!1,suppressThrow:!0});return}j.isUpdatingSelection=!0;var Fe=I&&X.toDOMRange(d,I);return Fe?(X.isComposing(d)&&!ut?ee.collapseToEnd():q.isBackward(I)?ee.setBaseAndExtent(Fe.endContainer,Fe.endOffset,Fe.startContainer,Fe.startOffset):ee.setBaseAndExtent(Fe.startContainer,Fe.startOffset,Fe.endContainer,Fe.endOffset),p(d,Fe)):ee.removeAllRanges(),Fe}};ee.rangeCount<=1&&J();var de=((N=M.current)===null||N===void 0?void 0:N.isFlushing())==="action";if(!ut||!de){setTimeout(()=>{j.isUpdatingSelection=!1});return}var fe=null,ce=requestAnimationFrame(()=>{if(de){var we=Me=>{try{var Ae=X.toDOMNode(d,d);Ae.focus(),J(Me)}catch{}};we(),fe=setTimeout(()=>{we(!0),j.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ce),fe&&clearTimeout(fe)}}});var z=c.useCallback(O=>{var N=X.toDOMNode(d,d),T=N.getRootNode();if(A!=null&&A.current&&mr&&T instanceof ShadowRoot){var I=O.getTargetRanges(),Z=I[0],ee=new window.Range;ee.setStart(Z.startContainer,Z.startOffset),ee.setEnd(Z.endContainer,Z.endOffset);var J=X.toSlateRange(d,ee,{exactMatch:!1,suppressThrow:!1});te.select(d,J),O.preventDefault(),O.stopImmediatePropagation();return}if(U(),!o&&X.hasEditableTarget(d,O.target)&&!tb(O,s)){var de;if(M.current)return M.current.handleDOMBeforeInput(O);_.flush(),W.flush();var{selection:fe}=d,{inputType:ce}=O,we=O.dataTransfer||O.data||void 0,Me=ce==="insertCompositionText"||ce==="deleteCompositionText";if(Me&&X.isComposing(d))return;var Ae=!1;if(ce==="insertText"&&fe&&q.isCollapsed(fe)&&O.data&&O.data.length===1&&/[a-z ]/i.test(O.data)&&fe.anchor.offset!==0&&(Ae=!0,d.marks&&(Ae=!1),!kr.get(d))){var Ie,qe,{anchor:rt}=fe,[Be,Je]=X.toDOMPoint(d,rt),it=(Ie=Be.parentElement)===null||Ie===void 0?void 0:Ie.closest("a"),Oe=X.getWindow(d);if(Ae&&it&&X.hasDOMNode(d,it)){var Fe,Qe=Oe==null?void 0:Oe.document.createTreeWalker(it,NodeFilter.SHOW_TEXT).lastChild();Qe===Be&&((Fe=Qe.textContent)===null||Fe===void 0?void 0:Fe.length)===Je&&(Ae=!1)}if(Ae&&Be.parentElement&&(Oe==null||(qe=Oe.getComputedStyle(Be.parentElement))===null||qe===void 0?void 0:qe.whiteSpace)==="pre"){var Ke=m.above(d,{at:rt.path,match:St=>ue.isElement(St)&&m.isBlock(d,St)});Ke&&se.string(Ke[0]).includes(" ")&&(Ae=!1)}}if((!ce.startsWith("delete")||ce.startsWith("deleteBy"))&&!kr.get(d)){var[et]=O.getTargetRanges();if(et){var Ct=X.toSlateRange(d,et,{exactMatch:!1,suppressThrow:!1});if(!fe||!q.equals(fe,Ct)){Ae=!1;var Ye=!Me&&d.selection&&m.rangeRef(d,d.selection);te.select(d,Ct),Ye&&fn.set(d,Ye)}}}if(Me)return;if(Ae||O.preventDefault(),fe&&q.isExpanded(fe)&&ce.startsWith("delete")){var nr=ce.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:nr});return}switch(ce){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":{ce==="insertFromComposition"&&X.isComposing(d)&&(E(!1),Cr.set(d,!1)),(we==null?void 0:we.constructor.name)==="DataTransfer"?X.insertData(d,we):typeof we=="string"&&(Ae?w.current.push(()=>m.insertText(d,we)):m.insertText(d,we));break}}var wt=(de=fn.get(d))===null||de===void 0?void 0:de.unref();fn.delete(d),wt&&(!d.selection||!q.equals(d.selection,wt))&&te.select(d,wt)}},[d,W,U,s,o,_]),Y=c.useCallback(O=>{O==null?(W.cancel(),_.cancel(),fi.delete(d),yr.delete(d),B.current&&Gt&&B.current.removeEventListener("beforeinput",z)):Gt&&O.addEventListener("beforeinput",z),B.current=O,typeof e=="function"?e(O):e&&(e.current=O)},[W,_,d,z,e]);pn(()=>{var O=X.getWindow(d);O.document.addEventListener("selectionchange",_);var N=()=>{j.isDraggingInternally=!1};return O.document.addEventListener("dragend",N),O.document.addEventListener("drop",N),()=>{O.document.removeEventListener("selectionchange",_),O.document.removeEventListener("dragend",N),O.document.removeEventListener("drop",N)}},[_,j]);var V=i([d,[]]),Q=a&&d.children.length===1&&Array.from(se.texts(d)).length===1&&se.string(d)===""&&!D,ie=c.useCallback(O=>{if(O&&Q){var N;x((N=O.getBoundingClientRect())===null||N===void 0?void 0:N.height)}else x(void 0)},[Q]);if(Q){var k=m.start(d,[]);V.push({[jr]:!0,placeholder:a,onPlaceholderResize:ie,anchor:k,focus:k})}var{marks:G}=d;if(j.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&G){var{anchor:$}=d.selection,R=se.leaf(d,$.path),re=Tr(R,Y0);if(!le.equals(R,G,{loose:!0})){j.hasMarkPlaceholder=!0;var F=Object.fromEntries(Object.keys(re).map(O=>[O,null]));V.push(Pt(Pt(Pt({[jl]:!0},F),G),{},{anchor:$,focus:$}))}}return c.useEffect(()=>{setTimeout(()=>{var{selection:O}=d;if(O){var{anchor:N}=O,T=se.leaf(d,N.path);if(G&&!le.equals(T,G,{loose:!0})){Bt.set(d,G);return}}Bt.delete(d)})}),c.createElement(nc.Provider,{value:o},c.createElement(Z0.Provider,{value:D},c.createElement(tc.Provider,{value:i},c.createElement(G0,{node:B,receivedUserInput:P},c.createElement(y,Pt(Pt({role:o?void 0:"textbox","aria-multiline":o?void 0:!0},g),{},{spellCheck:Gt||!ci?g.spellCheck:!1,autoCorrect:Gt||!ci?g.autoCorrect:"false",autoCapitalize:Gt||!ci?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!o,zindex:-1,suppressContentEditableWarning:!0,ref:Y,style:Pt(Pt({},v?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),h),onBeforeInput:c.useCallback(O=>{if(!Gt&&!o&&!lt(O,g.onBeforeInput)&&X.hasSelectableTarget(d,O.target)&&(O.preventDefault(),!X.isComposing(d))){var N=O.data;m.insertText(d,N)}},[g.onBeforeInput,d,o]),onInput:c.useCallback(O=>{if(!lt(O,g.onInput)){if(M.current){M.current.handleInput();return}for(var N of w.current)N();if(w.current=[],!X.isFocused(d)){var T=O.nativeEvent,I=d;if(T.inputType==="historyUndo"&&typeof I.undo=="function"){I.undo();return}if(T.inputType==="historyRedo"&&typeof I.redo=="function"){I.redo();return}}}},[g.onInput,d]),onBlur:c.useCallback(O=>{if(!(o||j.isUpdatingSelection||!X.hasSelectableTarget(d,O.target)||lt(O,g.onBlur))){var N=X.findDocumentOrShadowRoot(d);if(j.latestElement!==N.activeElement){var{relatedTarget:T}=O,I=X.toDOMNode(d,d);if(T!==I&&!(Dt(T)&&T.hasAttribute("data-slate-spacer"))){if(T!=null&&Xt(T)&&X.hasDOMNode(d,T)){var Z=X.toSlateNode(d,T);if(ue.isElement(Z)&&!d.isVoid(Z))return}if(mr){var ee=dn(N);ee==null||ee.removeAllRanges()}Zt.delete(d)}}}},[o,j.isUpdatingSelection,j.latestElement,d,g.onBlur]),onClick:c.useCallback(O=>{if(X.hasTarget(d,O.target)&&!lt(O,g.onClick)&&Xt(O.target)){var N=X.toSlateNode(d,O.target),T=X.findPath(d,N);if(!m.hasPath(d,T)||se.get(d,T)!==N)return;if(O.detail===W0&&T.length>=1){var I=T;if(!(ue.isElement(N)&&m.isBlock(d,N))){var Z,ee=m.above(d,{match:Ae=>ue.isElement(Ae)&&m.isBlock(d,Ae),at:T});I=(Z=ee==null?void 0:ee[1])!==null&&Z!==void 0?Z:T.slice(0,1)}var J=m.range(d,I);te.select(d,J);return}if(o)return;var de=m.start(d,T),fe=m.end(d,T),ce=m.void(d,{at:de}),we=m.void(d,{at:fe});if(ce&&we&&L.equals(ce[1],we[1])){var Me=m.range(d,de);te.select(d,Me)}}},[d,g.onClick,o]),onCompositionEnd:c.useCallback(O=>{if(X.hasSelectableTarget(d,O.target)){var N;if(X.isComposing(d)&&Promise.resolve().then(()=>{E(!1),Cr.set(d,!1)}),(N=M.current)===null||N===void 0||N.handleCompositionEnd(O),lt(O,g.onCompositionEnd)||ut)return;if(!mr&&!HC&&!Pl&&!RC&&!UC&&O.data){var T=Bt.get(d);Bt.delete(d),T!==void 0&&(Nt.set(d,d.marks),d.marks=T),m.insertText(d,O.data);var I=Nt.get(d);Nt.delete(d),I!==void 0&&(d.marks=I)}}},[g.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(O=>{X.hasSelectableTarget(d,O.target)&&!lt(O,g.onCompositionUpdate)&&(X.isComposing(d)||(E(!0),Cr.set(d,!0)))},[g.onCompositionUpdate,d]),onCompositionStart:c.useCallback(O=>{if(X.hasSelectableTarget(d,O.target)){var N;if((N=M.current)===null||N===void 0||N.handleCompositionStart(O),lt(O,g.onCompositionStart)||ut)return;E(!0);var{selection:T}=d;if(T&&q.isExpanded(T)){m.deleteFragment(d);return}}},[g.onCompositionStart,d]),onCopy:c.useCallback(O=>{X.hasSelectableTarget(d,O.target)&&!lt(O,g.onCopy)&&!oc(O)&&(O.preventDefault(),X.setFragmentData(d,O.clipboardData,"copy"))},[g.onCopy,d]),onCut:c.useCallback(O=>{if(!o&&X.hasSelectableTarget(d,O.target)&&!lt(O,g.onCut)&&!oc(O)){O.preventDefault(),X.setFragmentData(d,O.clipboardData,"cut");var{selection:N}=d;if(N)if(q.isExpanded(N))m.deleteFragment(d);else{var T=se.parent(d,N.anchor.path);m.isVoid(d,T)&&te.delete(d)}}},[o,d,g.onCut]),onDragOver:c.useCallback(O=>{if(X.hasTarget(d,O.target)&&!lt(O,g.onDragOver)){var N=X.toSlateNode(d,O.target);ue.isElement(N)&&m.isVoid(d,N)&&O.preventDefault()}},[g.onDragOver,d]),onDragStart:c.useCallback(O=>{if(!o&&X.hasTarget(d,O.target)&&!lt(O,g.onDragStart)){var N=X.toSlateNode(d,O.target),T=X.findPath(d,N),I=ue.isElement(N)&&m.isVoid(d,N)||m.void(d,{at:T,voids:!0});if(I){var Z=m.range(d,T);te.select(d,Z)}j.isDraggingInternally=!0,X.setFragmentData(d,O.dataTransfer,"drag")}},[o,d,g.onDragStart,j]),onDrop:c.useCallback(O=>{if(!o&&X.hasTarget(d,O.target)&&!lt(O,g.onDrop)){O.preventDefault();var N=d.selection,T=X.findEventRange(d,O),I=O.dataTransfer;te.select(d,T),j.isDraggingInternally&&N&&!q.equals(N,T)&&!m.void(d,{at:T,voids:!0})&&te.delete(d,{at:N}),X.insertData(d,I),X.isFocused(d)||X.focus(d)}},[o,d,g.onDrop,j]),onDragEnd:c.useCallback(O=>{!o&&j.isDraggingInternally&&g.onDragEnd&&X.hasTarget(d,O.target)&&g.onDragEnd(O)},[o,j,g,d]),onFocus:c.useCallback(O=>{if(!o&&!j.isUpdatingSelection&&X.hasEditableTarget(d,O.target)&&!lt(O,g.onFocus)){var N=X.toDOMNode(d,d),T=X.findDocumentOrShadowRoot(d);if(j.latestElement=T.activeElement,Mr&&O.target!==N){N.focus();return}Zt.set(d,!0)}},[o,j,d,g.onFocus]),onKeyDown:c.useCallback(O=>{if(!o&&X.hasEditableTarget(d,O.target)){var N;(N=M.current)===null||N===void 0||N.handleKeyDown(O);var{nativeEvent:T}=O;if(X.isComposing(d)&&T.isComposing===!1&&(Cr.set(d,!1),E(!1)),lt(O,g.onKeyDown)||X.isComposing(d))return;var{selection:I}=d,Z=d.children[I!==null?I.focus.path[0]:0],ee=el(se.string(Z))==="rtl";if(We.isRedo(T)){O.preventDefault();var J=d;typeof J.redo=="function"&&J.redo();return}if(We.isUndo(T)){O.preventDefault();var de=d;typeof de.undo=="function"&&de.undo();return}if(We.isMoveLineBackward(T)){O.preventDefault(),te.move(d,{unit:"line",reverse:!0});return}if(We.isMoveLineForward(T)){O.preventDefault(),te.move(d,{unit:"line"});return}if(We.isExtendLineBackward(T)){O.preventDefault(),te.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(We.isExtendLineForward(T)){O.preventDefault(),te.move(d,{unit:"line",edge:"focus"});return}if(We.isMoveBackward(T)){O.preventDefault(),I&&q.isCollapsed(I)?te.move(d,{reverse:!ee}):te.collapse(d,{edge:ee?"end":"start"});return}if(We.isMoveForward(T)){O.preventDefault(),I&&q.isCollapsed(I)?te.move(d,{reverse:ee}):te.collapse(d,{edge:ee?"start":"end"});return}if(We.isMoveWordBackward(T)){O.preventDefault(),I&&q.isExpanded(I)&&te.collapse(d,{edge:"focus"}),te.move(d,{unit:"word",reverse:!ee});return}if(We.isMoveWordForward(T)){O.preventDefault(),I&&q.isExpanded(I)&&te.collapse(d,{edge:"focus"}),te.move(d,{unit:"word",reverse:ee});return}if(Gt){if((Tl||mr)&&I&&(We.isDeleteBackward(T)||We.isDeleteForward(T))&&q.isCollapsed(I)){var fe=se.parent(d,I.anchor.path);if(ue.isElement(fe)&&m.isVoid(d,fe)&&(m.isInline(d,fe)||m.isBlock(d,fe))){O.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(We.isBold(T)||We.isItalic(T)||We.isTransposeCharacter(T)){O.preventDefault();return}if(We.isSoftBreak(T)){O.preventDefault(),m.insertSoftBreak(d);return}if(We.isSplitBlock(T)){O.preventDefault(),m.insertBreak(d);return}if(We.isDeleteBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(We.isDeleteForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(We.isDeleteLineBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(We.isDeleteLineForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(We.isDeleteWordBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(We.isDeleteWordForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[o,d,g.onKeyDown]),onPaste:c.useCallback(O=>{!o&&X.hasEditableTarget(d,O.target)&&!lt(O,g.onPaste)&&(!Gt||GC(O.nativeEvent)||mr)&&(O.preventDefault(),X.insertData(d,O.clipboardData))},[o,d,g.onPaste])}),c.createElement(X0,{decorations:V,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),J0=t=>{var{attributes:e,children:r}=t;return c.createElement("span",Pt({},e),r,ut&&c.createElement("br",null))},Q0=()=>[],eb=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),pC(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},lt=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},oc=t=>Xt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),tb=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},rb=c.createContext(!1),nb=c.createContext({});function ib(t){var e=c.useRef([]).current,r=c.useRef({editor:t}).current,n=c.useCallback(s=>{r.editor=s,e.forEach(a=>a(s))},[e,r]),i=c.useMemo(()=>({getSlate:()=>r.editor,addEventListener:s=>(e.push(s),()=>{e.splice(e.indexOf(s),1)})}),[e,r]);return{selectorContext:i,onChange:n}}var sb=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],ab=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:i,onValueChange:s,initialValue:a}=t,o=Tr(t,sb),[u,l]=c.useState(()=>{if(!se.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat($e.stringify(a)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat($e.stringify(e)));return e.children=a,Object.assign(e,o),{v:0,editor:e}}),{selectorContext:f,onChange:p}=ib(e),h=c.useCallback(g=>{var d;switch(n&&n(e.children),g==null||(d=g.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:s==null||s(e.children)}l(D=>({v:D.v+1,editor:e})),p(e)},[e,p,n,i,s]);c.useEffect(()=>(na.set(e,h),()=>{na.set(e,()=>{})}),[e,h]);var[y,v]=c.useState(X.isFocused(e));return c.useEffect(()=>{v(X.isFocused(e))},[e]),pn(()=>{var g=()=>v(X.isFocused(e));return Ll>=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(nb.Provider,{value:f},c.createElement(ic.Provider,{value:u},c.createElement(Xs.Provider,{value:u.editor},c.createElement(rb.Provider,{value:y},r))))},uc=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},lc=(t,e,r)=>{var n=X.toDOMRange(t,e).getBoundingClientRect(),i=X.toDOMRange(t,r).getBoundingClientRect();return uc(n,i)&&uc(i,n)},ob=(t,e)=>{var r=m.range(t,q.end(e)),n=Array.from(m.positions(t,{at:e})),i=0,s=n.length,a=Math.floor(s/2);if(lc(t,m.range(t,n[i]),r))return m.range(t,n[i],r);if(n.length<2)return m.range(t,n[n.length-1],r);for(;a!==n.length&&a!==i;)lc(t,m.range(t,n[a]),r)?s=a:i=a,a=Math.floor((i+s)/2);return m.range(t,n[s],r)};function cc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cc(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ub=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:i,onChange:s,deleteBackward:a,addMark:o,removeMark:u}=n;return pi.set(n,new WeakMap),n.addMark=(l,f)=>{var p,h;(p=ia.get(n))===null||p===void 0||p(),!Bt.get(n)&&(h=pt.get(n))!==null&&h!==void 0&&h.length&&Bt.set(n,null),Nt.delete(n),o(l,f)},n.removeMark=l=>{var f;!Bt.get(n)&&(f=pt.get(n))!==null&&f!==void 0&&f.length&&Bt.set(n,null),Nt.delete(n),u(l)},n.deleteBackward=l=>{if(l!=="line")return a(l);if(n.selection&&q.isCollapsed(n.selection)){var f=m.above(n,{match:v=>ue.isElement(v)&&m.isBlock(n,v),at:n.selection});if(f){var[,p]=f,h=m.range(n,p,n.selection.anchor),y=ob(n,h);q.isCollapsed(y)||te.delete(n,{at:y})}}},n.apply=l=>{var f=[],p=[],h=pt.get(n);if(h!=null&&h.length){var y=h.map(_=>o0(_,l)).filter(Boolean);pt.set(n,y)}var v=Yt.get(n);v&&Yt.set(n,Vl(n,v,l));var g=Kt.get(n);if(g!=null&&g.at){var d=ye.isPoint(g==null?void 0:g.at)?la(n,g.at,l):Vl(n,g.at,l);Kt.set(n,d?fc(fc({},g),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...Ir(n,l.path));break}case"set_selection":{var D;(D=fn.get(n))===null||D===void 0||D.unref(),fn.delete(n);break}case"insert_node":case"remove_node":{f.push(...Ir(n,L.parent(l.path)));break}case"merge_node":{var E=L.previous(l.path);f.push(...Ir(n,E));break}case"move_node":{var B=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...Ir(n,B));var w;L.isBefore(l.path,l.newPath)?(f.push(...Ir(n,L.parent(l.path))),w=l.newPath):(f.push(...Ir(n,L.parent(l.newPath))),w=l.path);var b=se.get(e,L.parent(w)),x=X.findKey(n,b),A=m.pathRef(n,L.parent(w));p.push([A,x]);break}}switch(i(l),l.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":kr.set(n,!0)}for(var[U,P]of f){var[H]=m.node(n,U);di.set(H,P)}for(var[j,M]of p){if(j.current){var[W]=m.node(n,j.current);di.set(W,M)}j.unref()}},n.setFragmentData=l=>{var{selection:f}=n;if(f){var[p,h]=q.edges(f),y=m.void(n,{at:p.path}),v=m.void(n,{at:h.path});if(!(q.isCollapsed(f)&&!y)){var g=X.toDOMRange(n,f),d=g.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(H=>{H.textContent&&H.textContent.trim()!==""&&(D=H)}),v){var[E]=v,B=g.cloneRange(),w=X.toDOMNode(n,E);B.setEndAfter(w),d=B.cloneContents()}if(y&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(H=>{var j=H.getAttribute("data-slate-zero-width")==="n";H.textContent=j?`
51
- `:""}),Nl(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var x=n.getFragment(),A=JSON.stringify(x),U=window.btoa(encodeURIComponent(A));D.setAttribute("data-slate-fragment",U),l.setData("application/".concat(r),U);var P=d.ownerDocument.createElement("div");return P.appendChild(d),P.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(P),l.setData("text/html",P.innerHTML),l.setData("text/plain",zl(P)),d.ownerDocument.body.removeChild(P),l}}},n.insertData=l=>{n.insertFragmentData(l)||n.insertTextData(l)},n.insertFragmentData=l=>{var f=l.getData("application/".concat(r))||$C(l);if(f){var p=decodeURIComponent(window.atob(f)),h=JSON.parse(p);return n.insertFragment(h),!0}return!1},n.insertTextData=l=>{var f=l.getData("text/plain");if(f){var p=f.split(/\r\n|\r|\n/),h=!1;for(var y of p)h&&te.splitNodes(n,{always:!0}),n.insertText(y),h=!0;return!0}return!1},n.onChange=l=>{var f=Ll<18?or.unstable_batchedUpdates:p=>p();f(()=>{var p=na.get(n);p&&p(l),s(l)})},n},Ir=(t,e)=>{var r=[];for(var[n,i]of m.levels(t,{at:e})){var s=X.findKey(t,n);r.push([i,s])}return r};function dc(t,e,r="type"){const{selection:n}=t;if(!n)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,n),match:s=>!m.isEditor(s)&&ue.isElement(s)&&s[r]===e}));return!!i}const pc=["listItem","numberedList"],gi=["left","center","right","justify"];function lb(t,e){const r=gi.includes(e)?"align":"type",n=dc(t,e,r),i=pc.includes(e);te.unwrapNodes(t,{match:a=>!m.isEditor(a)&&ue.isElement(a)&&pc.includes(a.type)&&!gi.includes(e),split:!0});let s;if(gi.includes(e)?s={align:n?void 0:e}:s={type:n?"paragraph":i?"listItem":e},te.setNodes(t,s),!n&&i){const a={type:e,children:[]};te.wrapNodes(t,a)}}function br({format:t,icon:e}){const r=vi(),n=gi.includes(t)?"align":"type",s=dc(r,t,n)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),lb(r,t)}return C.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+s,onMouseDown:a,children:C.jsx(e,{})})}function cb({attributes:t,children:e,element:r}){const n={textAlign:r.align};switch(r.type){case"blockQuote":return C.jsx("blockquote",{className:"arkynElementBlockquote",style:n,...t,children:e});case"bulletedList":return C.jsx("ul",{className:"arkynElementBulletList",style:n,...t,children:e});case"headingOne":return C.jsx("h1",{className:"arkynElementHeadingOne",style:n,...t,children:e});case"headingTwo":return C.jsx("h2",{className:"arkynElementHeadingTwo",style:n,...t,children:e});case"listItem":return C.jsx("li",{className:"arkynElementListItem",style:n,...t,children:e});case"numberedList":return C.jsx("ol",{className:"arkynElementNumberedList",style:n,...t,children:e});case"image":return C.jsxs("div",{style:n,...t,children:[C.jsx("img",{className:"arkynElementImage",alt:"arkynElementImage",src:(r==null?void 0:r.src)||""}),e]});default:return C.jsx("p",{className:"arkynElementParagraph",style:n,...t,children:e})}}const hc=c.createContext({});function vc(t){const{isVisibled:e,makeInvisible:r,children:n,className:i="",...s}=t,o=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return C.jsx(hc.Provider,{value:{makeInvisible:r},children:C.jsx(ur.AnimatePresence,{children:e&&C.jsxs("aside",{className:o.trim(),...s,children:[C.jsx(ur.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),C.jsx(ur.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:n})]})})})}function gc(t){const{alignment:e="right",className:r,...n}=t,i=`arkynModalFooter ${e} ${r}`;return C.jsx("footer",{className:i.trim(),...n})}function mc(t){const{showCloseButton:e=!0,className:r,children:n,...i}=t,{makeInvisible:s}=c.useContext(hc),a=`arkynModalHeader ${r}`;return C.jsxs("header",{className:a.trim(),...i,children:[n,e&&C.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:C.jsx(he.X,{size:24})})]})}const da=c.createContext({});function fb(){if(!da)throw new Error("useTabContext must be used within a TabProvider");return c.useContext(da)}function yc(t){const{children:e,onClick:r,defaultActive:n,className:i,...s}=t,[a,o]=c.useState(n||""),[u,l]=c.useState(!0),f=c.useRef(null),p=`arkynTabContainer ${i||""}`,[h,y]=c.useState({width:"0px",left:"0px",transition:"none"}),v=(d,D)=>{const E=d.getBoundingClientRect(),B=f.current.getBoundingClientRect(),w=D?void 0:"none";l(!1),y({transition:w,width:`${E.width}px`,left:`${E.left-B.left}px`})};c.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&v(D)},[]);const g=d=>{const D=d.target;D&&(o(D.value),D.classList.add("activeTrue"),v(D,!0),r&&r(D.value))};return C.jsxs("nav",{ref:f,className:p.trim(),...s,children:[C.jsx(da.Provider,{value:{handleTabClick:g,showInitialTab:u,value:a},children:e}),C.jsx("div",{className:"activeLine",style:h})]})}function pa(t){const{children:e,className:r="",onClick:n,...i}=t,{value:s,showInitialTab:a,handleTabClick:o}=fb(),u=s===i.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===i.value&&a?"showBorderBottom":""} ${u} ${r}`;function p(h){o(h),n&&n(h)}return C.jsx("button",{onClick:p,className:f.trim(),...i,type:"button",children:e})}function db(t){const{action:e,tabLabels:r=["Adicionar URL","Upload de arquivo"],modalCancelButton:n="Cancelar",modalConfirmButton:i="Confirmar",modalInputImageLabel:s="Imagem:",modalInputUrlLabel:a="URL da imagem:",modalTitle:o="Inserir imagem"}=t,u=vi(),[l,f]=c.useState(!1),[p,h]=c.useState(""),[y,v]=c.useState("url");function g(d){d.preventDefault(),!(!p||p==="")&&(u.insertNodes([{type:"paragraph",children:[{text:""}]},{type:"image",src:p,children:[{text:""}]},{type:"paragraph",children:[{text:""}]}]),f(!1))}return C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",className:"arkynRichTextInsertImage",onMouseDown:()=>f(!0),children:C.jsx(he.Image,{})}),C.jsxs(vc,{isVisibled:l,makeInvisible:()=>f(!1),children:[C.jsx(mc,{children:o}),C.jsxs("div",{className:"arkynRichTextInsertImageModalContent",children:[C.jsxs(yc,{defaultActive:y,onClick:v,children:[C.jsx(pa,{value:"url",children:r[0]}),C.jsx(pa,{value:"file",children:r[1]})]}),y==="url"&&C.jsxs(C.Fragment,{children:[C.jsxs(Ms,{children:[C.jsx(ks,{children:a}),C.jsx(nn,{type:"text",name:"richTextimageURL",defaultValue:p,onChange:d=>h(d.target.value)})]}),p&&C.jsx("img",{className:"arkynRichTextInsertImageModalPreviewImage",src:p,alt:"preview"})]}),y==="file"&&C.jsxs(Ms,{children:[C.jsx(ks,{children:s}),C.jsx(Wu,{name:"richTextimageURL",action:e,defaultValue:p,onUpload:d=>h(d||"")})]})]}),C.jsxs(gc,{children:[C.jsx(rn,{type:"button",scheme:"danger",variant:"outline",onClick:()=>f(!1),children:n}),C.jsx(rn,{type:"button",onClick:g,children:i})]})]})]})}function pb({attributes:t,children:e,leaf:r}){return r.bold&&(e=C.jsx("strong",{children:e})),r.code&&(e=C.jsx("code",{children:e})),r.italic&&(e=C.jsx("em",{children:e})),r.underline&&(e=C.jsx("u",{children:e})),C.jsx("span",{...t,children:e})}function Cc(t,e){const r=m.marks(t);return r?r[e]===!0:!1}function bc(t,e){Cc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function mi({format:t,icon:e}){const r=vi(),i=Cc(r,t)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),bc(r,t)}return C.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:s,children:C.jsx(e,{})})}function hb({children:t}){return C.jsx("div",{className:"arkynRichTextToolbar",children:t})}function Dc(t){return t.map(e=>se.string(e)).join("")}const Ec={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},yi=[{type:"paragraph",children:[{text:""}]}];function vb(t){const{name:e,hiddenButtons:r,imageConfig:n,defaultValue:i="[]",enforceCharacterLimit:s=!1,onChangeCharactersCount:a,maxLimit:o=2e3,onChange:u,isError:l}=t,f=c.useMemo(()=>Qm(ub(rg())),[]),{id:p,inputRef:h,error:y}=ot(),v=c.useRef(null);function g(){try{const V=JSON.parse(i);return!Array.isArray(V)||V.length<=0?yi:V.every(ie=>typeof ie=="object"&&ie!==null&&"type"in ie&&"children"in ie)?V:yi}catch{return yi}}const d=Dc(g()),[D,E]=c.useState(d.length),[B,w]=c.useState(JSON.stringify(g())||"[]"),[b,x]=c.useState(!1),A=h||v,U=l||!!y,P=c.useCallback(pb,[]),H=c.useCallback(cb,[]);function j(V){const Q=Dc(V);E(Q.length),a&&a(Q.length),!(s&&Q.length>=o)&&(w(JSON.stringify(V)),u&&u(V),f.children=V,te.setNodes(f,{children:V}))}const M=b?"focusTrue":"focusFalse",_=`arkynRichText ${U||o<D?"errorTrue":"errorFalse"} ${M}`,z=o-D;function Y(V){return!(r!=null&&r.includes(V))}return C.jsxs(ab,{editor:f,initialValue:g(),onChange:j,onValueChange:j,children:[C.jsxs("div",{className:_,children:[C.jsxs(hb,{children:[Y("headingOne")&&C.jsx(br,{format:"headingOne",icon:he.Heading1}),Y("headingTwo")&&C.jsx(br,{format:"headingTwo",icon:he.Heading2}),Y("blockQuote")&&C.jsx(br,{format:"blockQuote",icon:he.Quote}),Y("bold")&&C.jsx(mi,{format:"bold",icon:he.Bold}),Y("italic")&&C.jsx(mi,{format:"italic",icon:he.Italic}),Y("underline")&&C.jsx(mi,{format:"underline",icon:he.Underline}),Y("code")&&C.jsx(mi,{format:"code",icon:he.Code}),Y("left")&&C.jsx(br,{format:"left",icon:he.AlignLeft}),Y("right")&&C.jsx(br,{format:"right",icon:he.AlignRight}),Y("center")&&C.jsx(br,{format:"center",icon:he.AlignCenter}),Y("justify")&&C.jsx(br,{format:"justify",icon:he.AlignJustify}),n&&Y("image")&&C.jsx(db,{...n})]}),C.jsx($0,{className:"editorContainer",renderElement:H,renderLeaf:P,spellCheck:!0,id:p,onFocus:()=>x(!0),onBlur:()=>x(!1),onKeyDown:V=>{for(const Q in Ec)if(Xm(Q,V)){V.preventDefault();const ie=Ec[Q];bc(f,ie)}}}),z<0&&C.jsx("div",{className:"restatesCharacters",children:z})]}),C.jsx("input",{type:"hidden",ref:A,name:e,value:B}),C.jsx("input",{type:"hidden",name:`${e}Count`,value:D})]})}function gb(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,leftIcon:u,disabled:l,readOnly:f,onFocus:p,onBlur:h,title:y,style:v,closeOnSelect:g=!0,...d}=t,b=`arkyn_select ${o?"hasPrefix":""} ${a} ${i} ${l||f||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,A={md:20,lg:20}[i];return{isLoading:r,className:b,prefix:Fs(o,A,"prefix"),LeftIcon:u,disabled:l||r||f,onFocus:p,onBlur:h,title:y,closeOnSelect:g,style:v,iconSize:A,Spinner:C.jsx(he.Loader2,{className:"spinner",size:A,strokeWidth:2.5}),...d}}function mb(t){var O;const[e,r]=c.useState(""),[n,i]=c.useState(!1),{inputRef:s,id:a,error:o}=ot(),u=c.useRef(null),l=s||u,f=t.isError||!!o,{disabled:p,title:h,style:y,className:v,prefix:g,iconSize:d,isLoading:D,LeftIcon:E,value:B=null,defaultValue:w="",onFocus:b,onBlur:x,Spinner:A,name:U,placeholder:P,onSelect:H,options:j,optionMaxHeight:M,closeOnSelect:W,isSearchable:_,onSearch:z,...Y}=gb({...t,id:a,isError:f},n),[V,Q]=c.useState(w);function ie(){p||!(l!=null&&l.current)||n||(i(!0),l.current.focus())}function k(N){n||(i(!0),b&&b(N))}function G(){i(!1),x&&l.current&&l.current.blur()}function $(N){const{label:T,value:I}=N;Q(V!==I?I:""),H&&H({label:T,value:I}),W&&G()}const R=typeof B=="string"?B:V,re=((O=j.find(N=>N.value===R))==null?void 0:O.label)||"",F=()=>{if(!n&&re)return!0;if(!n&&!re)return!1;if(n&&re)return!0;if(n&&!re)return!1};return C.jsxs(C.Fragment,{children:[C.jsxs("section",{title:h,style:y,onClick:ie,className:`${v} placeholder_dark_${F()}`,children:[g,E&&C.jsx(E,{size:d,strokeWidth:2.5}),C.jsx("input",{disabled:p,readOnly:!0,placeholder:re||P,onFocus:k,...Y}),C.jsx("input",{type:"hidden",ref:l,name:U,value:R||"",readOnly:!0}),n&&C.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:M},children:[_&&C.jsx(nn,{type:"search",name:"search-select",variant:"underline",leftIcon:he.Search,onChange:N=>r(N.target.value)}),j.filter(N=>!!(t.onSearch||!t.isSearchable||N.label.toLowerCase().includes(e.toLowerCase()))).map(({label:N,value:T})=>C.jsxs("div",{onClick:()=>$({label:N,value:T}),className:R===T?"arkyn_select_option active":"arkyn_select_option",children:[N," ",C.jsx(he.Check,{})]},T)),j.length<=0&&C.jsx("p",{children:"Sem opções disponíveis"})]}),!D&&C.jsx(he.ChevronDown,{className:"arkyn_select_arrow",size:d,strokeWidth:2.5}),D&&A]}),n&&C.jsx("aside",{className:"arkyn_select_overlay",onClick:G})]})}function yb(t){const{size:e="lg",defaultChecked:r=!1,checked:n=null,value:i,unCheckedValue:s="",name:a,className:o="",onCheck:u,...l}=t,[f,p]=c.useState(r),{id:h,inputRef:y}=ot(),v=typeof n=="boolean"?n:f;function g(){p(!f),u&&u(v?s:i||"checked")}const D=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${e} ${o}`;return C.jsx("button",{type:"button",onClick:g,className:D,...l,children:C.jsx("input",{id:h,type:"hidden",name:a,ref:y,onClick:g,value:v?i||"checked":s})})}function Cb(t){const{variant:e="solid",size:r="md",className:n,disabled:i=!1,readOnly:s=!1,onFocus:a,onBlur:o,title:u,style:l,...f}=t,[p,h]=c.useState(!1),{inputRef:y,id:v,error:g}=ot(),d=c.useRef(null),D=y||d,B=t.isError||!!g?"errorTrue":"errorFalse",x=`arkynTextarea ${e} ${r} ${i||s?"opacityTrue":"opacityFalse"} ${B} ${p?"focusedTrue":"focusedFalse"} ${n}`;function A(){i||!(D!=null&&D.current)||(h(!0),D.current.focus())}function U(H){h(!0),a&&a(H)}function P(H){h(!1),o&&o(H)}return C.jsx("section",{title:u,style:l,onClick:A,className:x,children:C.jsx("textarea",{id:v,disabled:i,readOnly:s,ref:D,onFocus:U,onBlur:P,...f})})}function bb(t){const{className:e="",...r}=t,n=`arkynBreadcrumbContainer ${e}`;return C.jsx("nav",{className:n,...r})}function Db(t){const{pathname:e}=At.useLocation(),{className:r="",disabled:n=!1,children:i,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${r}`;return n?C.jsxs("p",{className:u,children:[C.jsx(he.ChevronRight,{size:14,strokeWidth:2.5}),i]}):C.jsxs(At.Link,{to:s,className:u,...a,children:[C.jsx(he.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ha(t=""){const e=At.useLocation(),r=new URLSearchParams(e.search),n=t?`${t}:`:"",i=s=>{Object.entries(s).forEach(([a,o])=>{o===void 0?r.delete(`${n}${a}`):r.set(`${n}${a}`,String(o))})};return{getParam:s=>r.get(`${n}${s}`),getScopedSearch:s=>{i(s);let a=r.toString();return a&&(a="?"+a),a}}}function wc(t,e){return[...new Array(e-t)].map((r,n)=>t+n+1).filter(r=>r>0)}function Eb(t){const{scope:e,totalCountRegisters:r,perPageKey:n="per_page",pageKey:i="page",siblingsCount:s=2,currentPage:a=1,registerPerPage:o=20,...u}=t,l=At.useNavigate(),{getParam:f,getScopedSearch:p}=ha(e),h=Number(f("page"))||a,y=Number(f("per_page"))||o,v=Math.ceil(r/y),g=h>1?wc(h-1-s,h-1):[],d=h<v?wc(h,Math.min(h+s,v)):[];function D(E){l(p({page:E}))}return C.jsxs("div",{className:"arkynPagination",...u,children:[C.jsx("button",{className:"arkynPaginationIconButton",disabled:h<=1,onClick:()=>D(h-1),children:C.jsx(he.ChevronLeft,{})}),h>1+s&&C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>D(1),children:"1"}),h>2+s&&C.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:C.jsx(he.Ellipsis,{})})]}),g.length>0&&g.map((E,B)=>C.jsx("button",{onClick:()=>D(E),className:"arkynPaginationPageButton",children:E},B)),C.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:h}),d.length>0&&d.map((E,B)=>C.jsx("button",{onClick:()=>D(E),className:"arkynPaginationPageButton",children:E},B)),h+s<v&&C.jsxs(C.Fragment,{children:[h+1+s<v&&C.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:C.jsx(he.Ellipsis,{})}),C.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>D(v),children:v})]}),C.jsx("button",{className:"arkynPaginationIconButton",disabled:h>=v,onClick:()=>D(h+1),children:C.jsx(he.ChevronRight,{})})]})}const Oc=c.createContext({});function wb(t){const{isVisibled:e,makeInvisible:r,orientation:n="left",children:i,className:s,...a}=t,o=n==="left"?"-100%":"100%",l=`arkynDrawerContainer ${n} ${e?"visibleTrue":"visibleFalse"} ${s}`;return C.jsx(Oc.Provider,{value:{makeInvisible:r},children:C.jsx(ur.AnimatePresence,{children:e&&C.jsxs("aside",{className:l.trim(),...a,children:[C.jsx(ur.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),C.jsx(ur.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${o})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${o})`},children:i})]})})})}function Ob(t){const{showCloseButton:e=!0,className:r,children:n,...i}=t,{makeInvisible:s}=c.useContext(Oc),a=`arkynDrawerHeader ${r}`;return C.jsxs("header",{className:a.trim(),...i,children:[n,e&&C.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:C.jsx(he.X,{size:24})})]})}function xb(t){const{children:e,button:r,closeOnClick:n,orientation:i="bottomLeft"}=t,[s,a]=c.useState(!1),u=`arkynPopover ${i} ${s?"visibleTrue":"visibleFalse"}`;function l(){s||a(!0)}return C.jsxs("div",{className:u,onClick:l,children:[r,C.jsx(ur.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>n&&a(!1),className:"arkynPopoverContent",children:e}),s&&C.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Bb(t){const{message:e,type:r}=t,n=`arkynToast ${r}}`;function i(){switch(r){case"success":return C.jsx(he.CheckCircle2,{});case"danger":return C.jsx(he.XCircle,{});default:return C.jsx(he.Info,{})}}return C.jsxs("div",{className:n,children:[C.jsxs("div",{children:[C.jsx("div",{className:"bg"}),C.jsx(i,{})]}),C.jsx("p",{children:C.jsx("span",{children:e})})]})}var Re={},va={},hn={},vn={},xc="Expected a function",Bc=NaN,Sb="[object Symbol]",Ab=/^\s+|\s+$/g,Lb=/^[-+]0x[0-9a-f]+$/i,Pb=/^0b[01]+$/i,Fb=/^0o[0-7]+$/i,Tb=parseInt,Mb=typeof ke=="object"&&ke&&ke.Object===Object&&ke,kb=typeof self=="object"&&self&&self.Object===Object&&self,jb=Mb||kb||Function("return this")(),Ib=Object.prototype,Nb=Ib.toString,_b=Math.max,zb=Math.min,ga=function(){return jb.Date.now()};function Wb(t,e,r){var n,i,s,a,o,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(xc);e=Sc(e)||0,Ci(r)&&(f=!!r.leading,p="maxWait"in r,s=p?_b(Sc(r.maxWait)||0,e):s,h="trailing"in r?!!r.trailing:h);function y(x){var A=n,U=i;return n=i=void 0,l=x,a=t.apply(U,A),a}function v(x){return l=x,o=setTimeout(D,e),f?y(x):a}function g(x){var A=x-u,U=x-l,P=e-A;return p?zb(P,s-U):P}function d(x){var A=x-u,U=x-l;return u===void 0||A>=e||A<0||p&&U>=s}function D(){var x=ga();if(d(x))return E(x);o=setTimeout(D,g(x))}function E(x){return o=void 0,h&&n?y(x):(n=i=void 0,a)}function B(){o!==void 0&&clearTimeout(o),l=0,n=u=i=o=void 0}function w(){return o===void 0?a:E(ga())}function b(){var x=ga(),A=d(x);if(n=arguments,i=this,u=x,A){if(o===void 0)return v(u);if(p)return o=setTimeout(D,e),y(u)}return o===void 0&&(o=setTimeout(D,e)),a}return b.cancel=B,b.flush=w,b}function Hb(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(xc);return Ci(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Wb(t,e,{leading:n,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ub(t){return!!t&&typeof t=="object"}function Rb(t){return typeof t=="symbol"||Ub(t)&&Nb.call(t)==Sb}function Sc(t){if(typeof t=="number")return t;if(Rb(t))return Bc;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(Ab,"");var r=Pb.test(t);return r||Fb.test(t)?Tb(t.slice(2),r?2:8):Lb.test(t)?Bc:+t}var Vb=Hb,gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.addPassiveEventListener=function(e,r,n){var i=n.name;i||(i=r,console.warn("Listener must be a named function.")),bi.has(r)||bi.set(r,new Set);var s=bi.get(r);if(!s.has(i)){var a=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,u)}catch{}return o}();e.addEventListener(r,n,a?{passive:!0}:!1),s.add(i)}},gn.removePassiveEventListener=function(e,r,n){e.removeEventListener(r,n),bi.get(r).delete(n.name||r)};var bi=new Map;Object.defineProperty(vn,"__esModule",{value:!0});var qb=Vb,Gb=Kb(qb),Zb=gn;function Kb(t){return t&&t.__esModule?t:{default:t}}var Yb=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,Gb.default)(e,r)},He={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,r){if(e){var n=Yb(function(i){He.scrollHandler(e)},r);He.scrollSpyContainers.push(e),(0,Zb.addPassiveEventListener)(e,"scroll",n)}},isMounted:function(e){return He.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var r=window.pageYOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:n?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var r=window.pageXOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var r=He.scrollSpyContainers[He.scrollSpyContainers.indexOf(e)].spyCallbacks||[];r.forEach(function(n){return n(He.currentPositionX(e),He.currentPositionY(e))})},addStateHandler:function(e){He.spySetState.push(e)},addSpyHandler:function(e,r){var n=He.scrollSpyContainers[He.scrollSpyContainers.indexOf(r)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(e),e(He.currentPositionX(r),He.currentPositionY(r))},updateStates:function(){He.spySetState.forEach(function(e){return e()})},unmount:function(e,r){He.scrollSpyContainers.forEach(function(n){return n.spyCallbacks&&n.spyCallbacks.length&&n.spyCallbacks.indexOf(r)>-1&&n.spyCallbacks.splice(n.spyCallbacks.indexOf(r),1)}),He.spySetState&&He.spySetState.length&&He.spySetState.indexOf(e)>-1&&He.spySetState.splice(He.spySetState.indexOf(e),1),document.removeEventListener("scroll",He.scrollHandler)},update:function(){return He.scrollSpyContainers.forEach(function(e){return He.scrollHandler(e)})}};vn.default=He;var Nr={},mn={};Object.defineProperty(mn,"__esModule",{value:!0});var Xb=function(e,r){var n=e.indexOf("#")===0?e.substring(1):e,i=n?"#"+n:"",s=window&&window.location,a=i?s.pathname+s.search+i:s.pathname+s.search;r?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},$b=function(){return window.location.hash.replace(/^#/,"")},Jb=function(e){return function(r){return e.contains?e!=r&&e.contains(r):!!(e.compareDocumentPosition(r)&16)}},Qb=function(e){return getComputedStyle(e).position!=="static"},ma=function(e,r){for(var n=e.offsetTop,i=e.offsetParent;i&&!r(i);)n+=i.offsetTop,i=i.offsetParent;return{offsetTop:n,offsetParent:i}},eD=function(e,r,n){if(n)return e===document?r.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?r.offsetLeft:r.offsetLeft-e.offsetLeft;if(e===document)return r.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Qb(e)){if(r.offsetParent!==e){var i=function(f){return f===e||f===document},s=ma(r,i),a=s.offsetTop,o=s.offsetParent;if(o!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return r.offsetTop}if(r.offsetParent===e.offsetParent)return r.offsetTop-e.offsetTop;var u=function(f){return f===document};return ma(r,u).offsetTop-ma(e,u).offsetTop};mn.default={updateHash:Xb,getHash:$b,filterElementInContainer:Jb,scrollOffset:eD};var Di={},ya={};Object.defineProperty(ya,"__esModule",{value:!0}),ya.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 Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});var tD=gn,rD=["mousedown","mousewheel","touchmove","keydown"];Ca.default={subscribe:function(e){return typeof document<"u"&&rD.forEach(function(r){return(0,tD.addPassiveEventListener)(document,r,e)})}};var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var ba={registered:{},scrollEvent:{register:function(e,r){ba.registered[e]=r},remove:function(e){ba.registered[e]=null}}};yn.default=ba,Object.defineProperty(Di,"__esModule",{value:!0});var nD=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},iD=mn;Ei(iD);var sD=ya,Ac=Ei(sD),aD=Ca,oD=Ei(aD),uD=yn,Ft=Ei(uD);function Ei(t){return t&&t.__esModule?t:{default:t}}var Lc=function(e){return Ac.default[e.smooth]||Ac.default.defaultEasing},lD=function(e){return typeof e=="function"?e:function(){return e}},cD=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Da=function(){return cD()||function(t,e,r){window.setTimeout(t,r||1e3/60,new Date().getTime())}}(),Pc=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}},Fc=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollLeft;var n=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},Tc=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollTop;var n=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},fD=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollWidth-r.offsetWidth;var n=document.body,i=document.documentElement;return Math.max(n.scrollWidth,n.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},dD=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollHeight-r.offsetHeight;var n=document.body,i=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},pD=function t(e,r,n){var i=r.data;if(!r.ignoreCancelEvents&&i.cancel){Ft.default.registered.end&&Ft.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=n),i.progress=n-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?r.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:r.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var s=t.bind(null,e,r);Da.call(window,s);return}Ft.default.registered.end&&Ft.default.registered.end(i.to,i.target,i.currentPosition)},Ea=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},Cn=function(e,r,n,i){r.data=r.data||Pc(),window.clearTimeout(r.data.delayTimeout);var s=function(){r.data.cancel=!0};if(oD.default.subscribe(s),Ea(r),r.data.start=null,r.data.cancel=!1,r.data.startPosition=r.horizontal?Fc(r):Tc(r),r.data.targetPosition=r.absolute?e:e+r.data.startPosition,r.data.startPosition===r.data.targetPosition){Ft.default.registered.end&&Ft.default.registered.end(r.data.to,r.data.target,r.data.currentPosition);return}r.data.delta=Math.round(r.data.targetPosition-r.data.startPosition),r.data.duration=lD(r.duration)(r.data.delta),r.data.duration=isNaN(parseFloat(r.data.duration))?1e3:parseFloat(r.data.duration),r.data.to=n,r.data.target=i;var a=Lc(r),o=pD.bind(null,a,r);if(r&&r.delay>0){r.data.delayTimeout=window.setTimeout(function(){Ft.default.registered.begin&&Ft.default.registered.begin(r.data.to,r.data.target),Da.call(window,o)},r.delay);return}Ft.default.registered.begin&&Ft.default.registered.begin(r.data.to,r.data.target),Da.call(window,o)},wi=function(e){return e=nD({},e),e.data=e.data||Pc(),e.absolute=!0,e},hD=function(e){Cn(0,wi(e))},vD=function(e,r){Cn(e,wi(r))},gD=function(e){e=wi(e),Ea(e),Cn(e.horizontal?fD(e):dD(e),e)},mD=function(e,r){r=wi(r),Ea(r);var n=r.horizontal?Fc(r):Tc(r);Cn(e+n,r)};Di.default={animateTopScroll:Cn,getAnimationType:Lc,scrollToTop:hD,scrollToBottom:gD,scrollTo:vD,scrollMore:mD},Object.defineProperty(Nr,"__esModule",{value:!0});var yD=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},CD=mn,bD=wa(CD),DD=Di,ED=wa(DD),wD=yn,Oi=wa(wD);function wa(t){return t&&t.__esModule?t:{default:t}}var xi={},Mc=void 0;Nr.default={unmount:function(){xi={}},register:function(e,r){xi[e]=r},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 Mc=e},getActiveLink:function(){return Mc},scrollTo:function(e,r){var n=this.get(e);if(!n){console.warn("target Element not found");return}r=yD({},r,{absolute:!1});var i=r.containerId,s=r.container,a=void 0;i?a=document.getElementById(i):s&&s.nodeType?a=s:a=document,r.absolute=!0;var o=r.horizontal,u=bD.default.scrollOffset(a,n,o)+(r.offset||0);if(!r.smooth){Oi.default.registered.begin&&Oi.default.registered.begin(e,n),a===document?r.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,Oi.default.registered.end&&Oi.default.registered.end(e,n);return}ED.default.animateTopScroll(u,r,e,n)}};var Oa={exports:{}},Bi={exports:{}},Le={};/** @license React v16.13.1
50
+ `:""),[s]=c.useState(i);return pn(()=>{var a=i();n.current&&n.current.textContent!==a&&(n.current.textContent=a)}),c.createElement(B0,{ref:n},s)},B0=c.memo(c.forwardRef((t,e)=>c.createElement("span",{"data-slate-string":!0,ref:e},t.children))),ca=t=>{var{length:e=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=t,i={"data-slate-zero-width":r?"n":"z","data-slate-length":e};return n&&(i["data-slate-mark-placeholder"]=!0),c.createElement("span",O0({},i),!(ut||Pl)||!r?"\uFEFF":null,r?c.createElement("br",null):null)};function Xl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $l(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xl(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var S0=ut?300:0;function A0(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function Jl(t){t.current&&(clearTimeout(t.current),t.current=null)}var L0=t=>{var{leaf:e,isLast:r,text:n,parent:i,renderPlaceholder:s,renderLeaf:a=E=>c.createElement(F0,$l({},E))}=t,o=qt(),u=c.useRef(null),l=c.useRef(null),[f,p]=c.useState(!1),h=c.useRef(null),y=c.useCallback(E=>{if(A0(u,E==null),E==null){var B;ta.delete(o),(B=e.onPlaceholderResize)===null||B===void 0||B.call(e,null)}else{if(ta.set(o,E),!u.current){var w=window.ResizeObserver||kC;u.current=new w(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,E)})}u.current.observe(E),l.current=E}},[l,e,o]),v=c.createElement(x0,{isLast:r,leaf:e,parent:i,text:n}),g=!!e[jr];if(c.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},S0)):(Jl(h),p(!1)),()=>Jl(h)),[g,p]),g&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:mr?"inherit":void 0},contentEditable:!1,ref:y}};v=c.createElement(c.Fragment,null,s(d),v)}var D={"data-slate-leaf":!0};return a({attributes:D,children:v,leaf:e,text:n})},P0=c.memo(L0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&le.equals(e.leaf,t.leaf)&&e.leaf[jr]===t.leaf[jr]),F0=t=>{var{attributes:e,children:r}=t;return c.createElement("span",$l({},e),r)},T0=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:i,renderLeaf:s,text:a}=t,o=qt(),u=c.useRef(null),l=le.decorations(a,e),f=Y.findKey(o,a),p=[],h=0;h<l.length;h++){var y=l[h];p.push(c.createElement(P0,{isLast:r&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:y,text:a,parent:n,renderLeaf:s}))}var v=c.useCallback(g=>{var d=pi.get(o);g?(d==null||d.set(f,g),yr.set(a,g),cn.set(g,a)):(d==null||d.delete(f),yr.delete(a),u.current&&cn.delete(u.current)),u.current=g},[u,o,f,a]);return c.createElement("span",{"data-slate-node":"text",ref:v},p)},Ql=c.memo(T0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&w0(e.decorations,t.decorations));function ec(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ec(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var M0=t=>{var{decorations:e,element:r,renderElement:n=E=>c.createElement(j0,fa({},E)),renderPlaceholder:i,renderLeaf:s,selection:a}=t,o=qt(),u=_0(),l=o.isInline(r),f=Y.findKey(o,r),p=c.useCallback(E=>{var B=pi.get(o);E?(B==null||B.set(f,E),yr.set(r,E),cn.set(E,r)):(B==null||B.delete(f),yr.delete(r))},[o,f,r]),h=rc({decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:a}),y={"data-slate-node":"element",ref:p};if(l&&(y["data-slate-inline"]=!0),!l&&m.hasInlines(o,r)){var v=se.string(r),g=el(v);g==="rtl"&&(y.dir=g)}if(m.isVoid(o,r)){y["data-slate-void"]=!0,!u&&l&&(y.contentEditable=!1);var d=l?"span":"div",[[D]]=se.texts(r);h=c.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},c.createElement(Ql,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:D})),Qs.set(D,0),ea.set(D,r)}return n({attributes:y,children:h,element:r})},k0=c.memo(M0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&E0(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),j0=t=>{var{attributes:e,children:r,element:n}=t,i=qt(),s=i.isInline(n)?"span":"div";return c.createElement(s,fa(fa({},e),{},{style:{position:"relative"}}),r)},tc=c.createContext(()=>[]),I0=()=>c.useContext(tc),N0=c.createContext(!1),rc=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:a}=t,o=I0(),u=qt();kr.set(u,!1);for(var l=Y.findPath(u,r),f=[],p=ue.isElement(r)&&!u.isInline(r)&&m.hasInlines(u,r),h=0;h<r.children.length;h++){var y=l.concat(h),v=r.children[h],g=Y.findKey(u,v),d=m.range(u,y),D=a&&q.intersection(d,a),E=o([v,y]);for(var B of e){var w=q.intersection(B,d);w&&E.push(w)}ue.isElement(v)?f.push(c.createElement(N0.Provider,{key:"provider-".concat(g.id),value:!!D},c.createElement(k0,{decorations:E,element:v,key:g.id,renderElement:n,renderPlaceholder:i,renderLeaf:s,selection:D}))):f.push(c.createElement(Ql,{decorations:E,key:g.id,isLast:p&&h===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:s,text:v})),Qs.set(v,h),ea.set(v,r)}return f},nc=c.createContext(!1),_0=()=>c.useContext(nc),ic=c.createContext(null),vi=()=>{var t=c.useContext(ic);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function z0(){var t=qt(),e=c.useRef(!1),r=c.useRef(0),n=c.useCallback(()=>{if(!e.current){e.current=!0;var i=Y.getWindow(t);i.cancelAnimationFrame(r.current),r.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return c.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var W0=3,H0={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"},U0={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"},R0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},_e=t=>{var e=H0[t],r=U0[t],n=R0[t],i=e&&Hs(e),s=r&&Hs(r),a=n&&Hs(n);return o=>!!(i&&i(o)||Fl&&s&&s(o)||!Fl&&a&&a(o))},We={isBold:_e("bold"),isCompose:_e("compose"),isMoveBackward:_e("moveBackward"),isMoveForward:_e("moveForward"),isDeleteBackward:_e("deleteBackward"),isDeleteForward:_e("deleteForward"),isDeleteLineBackward:_e("deleteLineBackward"),isDeleteLineForward:_e("deleteLineForward"),isDeleteWordBackward:_e("deleteWordBackward"),isDeleteWordForward:_e("deleteWordForward"),isExtendBackward:_e("extendBackward"),isExtendForward:_e("extendForward"),isExtendLineBackward:_e("extendLineBackward"),isExtendLineForward:_e("extendLineForward"),isItalic:_e("italic"),isMoveLineBackward:_e("moveLineBackward"),isMoveLineForward:_e("moveLineForward"),isMoveWordBackward:_e("moveWordBackward"),isMoveWordForward:_e("moveWordForward"),isRedo:_e("redo"),isSoftBreak:_e("insertSoftBreak"),isSplitBlock:_e("splitBlock"),isTransposeCharacter:_e("transposeCharacter"),isUndo:_e("undo")},V0=(t,e)=>{var r=[],n=()=>{r=[]},i=a=>{if(e.current){var o=a.filter(u=>oa(t,u,a));r.push(...o)}};function s(){r.length>0&&(r.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),n())}return{registerMutations:i,restoreDOM:s,clear:n}},q0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class sc extends c.Component{constructor(){super(...arguments),bt(this,"context",null),bt(this,"manager",null),bt(this,"mutationObserver",null)}observe(){var e,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(r.current,q0)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=V0(r,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,r,n,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.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}}bt(sc,"contextType",Xs);var G0=ut?sc:t=>{var{children:e}=t;return c.createElement(c.Fragment,null,e)},Z0=c.createContext(!1),K0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Y0=["text"];function ac(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ac(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ac(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var X0=t=>c.createElement(c.Fragment,null,rc(t)),$0=c.forwardRef((t,e)=>{var r=c.useCallback(O=>c.createElement(J0,Pt({},O)),[]),{autoFocus:n,decorate:i=Q0,onDOMBeforeInput:s,placeholder:a,readOnly:o=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=r,scrollSelectionIntoView:p=eb,style:h={},as:y="div",disableDefaultStyles:v=!1}=t,g=Tr(t,K0),d=vi(),[D,E]=c.useState(!1),B=c.useRef(null),w=c.useRef([]),[b,x]=c.useState(),S=c.useRef(!1),{onUserInput:U,receivedUserInput:P}=z0(),[,H]=c.useReducer(O=>O+1,0);kl.set(d,H),ra.set(d,o);var j=c.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);c.useEffect(()=>{B.current&&n&&B.current.focus()},[n]);var M=c.useRef(),N=c.useMemo(()=>cC(()=>{if(kr.get(d)){N();return}var O=Y.toDOMNode(d,d),_=O.getRootNode();if(!S.current&&mr&&_ instanceof ShadowRoot){S.current=!0;var T=JC();T?document.execCommand("indent"):te.deselect(d),S.current=!1;return}var I=M.current;if((ut||!Y.isComposing(d))&&(!j.isUpdatingSelection||I!=null&&I.isFlushing())&&!j.isDraggingInternally){var Z=Y.findDocumentOrShadowRoot(d),{activeElement:ee}=Z,J=Y.toDOMNode(d,d),de=dn(Z);if(ee===J?(j.latestElement=ee,Zt.set(d,!0)):Zt.delete(d),!de)return te.deselect(d);var{anchorNode:fe,focusNode:ce}=de,we=Y.hasEditableTarget(d,fe)||Y.isTargetInsideNonReadonlyVoid(d,fe),Me=Y.hasTarget(d,ce);if(we&&Me){var Ae=Y.toSlateRange(d,de,{exactMatch:!1,suppressThrow:!0});Ae&&(!Y.isComposing(d)&&!(I!=null&&I.hasPendingChanges())&&!(I!=null&&I.isFlushing())?te.select(d,Ae):I==null||I.handleUserSelect(Ae))}o&&(!we||!Me)&&te.deselect(d)}},100),[d,o,j]),z=c.useMemo(()=>iC(N,0),[N]);M.current=y0({node:B,onDOMSelectionChange:N,scheduleOnDOMSelectionChange:z}),pn(()=>{var O,_,T;B.current&&(T=sa(B.current))?(Ml.set(d,T),fi.set(d,B.current),yr.set(d,B.current),cn.set(B.current,d)):yr.delete(d);var{selection:I}=d,Z=Y.findDocumentOrShadowRoot(d),ee=dn(Z);if(!(!ee||!Y.isFocused(d)||(O=M.current)!==null&&O!==void 0&&O.hasPendingAction())){var J=we=>{var Me=ee.type!=="None";if(!(!I&&!Me)){var Ae=ee.focusNode,Ie;if(Mr&&ee.rangeCount>1){var qe=ee.getRangeAt(0),rt=ee.getRangeAt(ee.rangeCount-1);qe.startContainer===Ae?Ie=rt.endContainer:Ie=qe.startContainer}else Ie=ee.anchorNode;var Be=fi.get(d),Je=!1;if(Be.contains(Ie)&&Be.contains(Ae)&&(Je=!0),Me&&Je&&I&&!we){var it=Y.toSlateRange(d,ee,{exactMatch:!0,suppressThrow:!0});if(it&&q.equals(it,I)){var Oe;if(!j.hasMarkPlaceholder||(Oe=Ie)!==null&&Oe!==void 0&&(Oe=Oe.parentElement)!==null&&Oe!==void 0&&Oe.hasAttribute("data-slate-mark-placeholder"))return}}if(I&&!Y.hasRange(d,I)){d.selection=Y.toSlateRange(d,ee,{exactMatch:!1,suppressThrow:!0});return}j.isUpdatingSelection=!0;var Fe=I&&Y.toDOMRange(d,I);return Fe?(Y.isComposing(d)&&!ut?ee.collapseToEnd():q.isBackward(I)?ee.setBaseAndExtent(Fe.endContainer,Fe.endOffset,Fe.startContainer,Fe.startOffset):ee.setBaseAndExtent(Fe.startContainer,Fe.startOffset,Fe.endContainer,Fe.endOffset),p(d,Fe)):ee.removeAllRanges(),Fe}};ee.rangeCount<=1&&J();var de=((_=M.current)===null||_===void 0?void 0:_.isFlushing())==="action";if(!ut||!de){setTimeout(()=>{j.isUpdatingSelection=!1});return}var fe=null,ce=requestAnimationFrame(()=>{if(de){var we=Me=>{try{var Ae=Y.toDOMNode(d,d);Ae.focus(),J(Me)}catch{}};we(),fe=setTimeout(()=>{we(!0),j.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ce),fe&&clearTimeout(fe)}}});var W=c.useCallback(O=>{var _=Y.toDOMNode(d,d),T=_.getRootNode();if(S!=null&&S.current&&mr&&T instanceof ShadowRoot){var I=O.getTargetRanges(),Z=I[0],ee=new window.Range;ee.setStart(Z.startContainer,Z.startOffset),ee.setEnd(Z.endContainer,Z.endOffset);var J=Y.toSlateRange(d,ee,{exactMatch:!1,suppressThrow:!1});te.select(d,J),O.preventDefault(),O.stopImmediatePropagation();return}if(U(),!o&&Y.hasEditableTarget(d,O.target)&&!tb(O,s)){var de;if(M.current)return M.current.handleDOMBeforeInput(O);z.flush(),N.flush();var{selection:fe}=d,{inputType:ce}=O,we=O.dataTransfer||O.data||void 0,Me=ce==="insertCompositionText"||ce==="deleteCompositionText";if(Me&&Y.isComposing(d))return;var Ae=!1;if(ce==="insertText"&&fe&&q.isCollapsed(fe)&&O.data&&O.data.length===1&&/[a-z ]/i.test(O.data)&&fe.anchor.offset!==0&&(Ae=!0,d.marks&&(Ae=!1),!kr.get(d))){var Ie,qe,{anchor:rt}=fe,[Be,Je]=Y.toDOMPoint(d,rt),it=(Ie=Be.parentElement)===null||Ie===void 0?void 0:Ie.closest("a"),Oe=Y.getWindow(d);if(Ae&&it&&Y.hasDOMNode(d,it)){var Fe,Qe=Oe==null?void 0:Oe.document.createTreeWalker(it,NodeFilter.SHOW_TEXT).lastChild();Qe===Be&&((Fe=Qe.textContent)===null||Fe===void 0?void 0:Fe.length)===Je&&(Ae=!1)}if(Ae&&Be.parentElement&&(Oe==null||(qe=Oe.getComputedStyle(Be.parentElement))===null||qe===void 0?void 0:qe.whiteSpace)==="pre"){var Ke=m.above(d,{at:rt.path,match:St=>ue.isElement(St)&&m.isBlock(d,St)});Ke&&se.string(Ke[0]).includes(" ")&&(Ae=!1)}}if((!ce.startsWith("delete")||ce.startsWith("deleteBy"))&&!kr.get(d)){var[et]=O.getTargetRanges();if(et){var Ct=Y.toSlateRange(d,et,{exactMatch:!1,suppressThrow:!1});if(!fe||!q.equals(fe,Ct)){Ae=!1;var Ye=!Me&&d.selection&&m.rangeRef(d,d.selection);te.select(d,Ct),Ye&&fn.set(d,Ye)}}}if(Me)return;if(Ae||O.preventDefault(),fe&&q.isExpanded(fe)&&ce.startsWith("delete")){var nr=ce.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:nr});return}switch(ce){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":{ce==="insertFromComposition"&&Y.isComposing(d)&&(E(!1),Cr.set(d,!1)),(we==null?void 0:we.constructor.name)==="DataTransfer"?Y.insertData(d,we):typeof we=="string"&&(Ae?w.current.push(()=>m.insertText(d,we)):m.insertText(d,we));break}}var wt=(de=fn.get(d))===null||de===void 0?void 0:de.unref();fn.delete(d),wt&&(!d.selection||!q.equals(d.selection,wt))&&te.select(d,wt)}},[d,N,U,s,o,z]),X=c.useCallback(O=>{O==null?(N.cancel(),z.cancel(),fi.delete(d),yr.delete(d),B.current&&Gt&&B.current.removeEventListener("beforeinput",W)):Gt&&O.addEventListener("beforeinput",W),B.current=O,typeof e=="function"?e(O):e&&(e.current=O)},[N,z,d,W,e]);pn(()=>{var O=Y.getWindow(d);O.document.addEventListener("selectionchange",z);var _=()=>{j.isDraggingInternally=!1};return O.document.addEventListener("dragend",_),O.document.addEventListener("drop",_),()=>{O.document.removeEventListener("selectionchange",z),O.document.removeEventListener("dragend",_),O.document.removeEventListener("drop",_)}},[z,j]);var R=i([d,[]]),ne=a&&d.children.length===1&&Array.from(se.texts(d)).length===1&&se.string(d)===""&&!D,Q=c.useCallback(O=>{if(O&&ne){var _;x((_=O.getBoundingClientRect())===null||_===void 0?void 0:_.height)}else x(void 0)},[ne]);if(ne){var k=m.start(d,[]);R.push({[jr]:!0,placeholder:a,onPlaceholderResize:Q,anchor:k,focus:k})}var{marks:G}=d;if(j.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&G){var{anchor:$}=d.selection,V=se.leaf(d,$.path),re=Tr(V,Y0);if(!le.equals(V,G,{loose:!0})){j.hasMarkPlaceholder=!0;var F=Object.fromEntries(Object.keys(re).map(O=>[O,null]));R.push(Pt(Pt(Pt({[jl]:!0},F),G),{},{anchor:$,focus:$}))}}return c.useEffect(()=>{setTimeout(()=>{var{selection:O}=d;if(O){var{anchor:_}=O,T=se.leaf(d,_.path);if(G&&!le.equals(T,G,{loose:!0})){Bt.set(d,G);return}}Bt.delete(d)})}),c.createElement(nc.Provider,{value:o},c.createElement(Z0.Provider,{value:D},c.createElement(tc.Provider,{value:i},c.createElement(G0,{node:B,receivedUserInput:P},c.createElement(y,Pt(Pt({role:o?void 0:"textbox","aria-multiline":o?void 0:!0},g),{},{spellCheck:Gt||!ci?g.spellCheck:!1,autoCorrect:Gt||!ci?g.autoCorrect:"false",autoCapitalize:Gt||!ci?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!o,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:Pt(Pt({},v?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),h),onBeforeInput:c.useCallback(O=>{if(!Gt&&!o&&!lt(O,g.onBeforeInput)&&Y.hasSelectableTarget(d,O.target)&&(O.preventDefault(),!Y.isComposing(d))){var _=O.data;m.insertText(d,_)}},[g.onBeforeInput,d,o]),onInput:c.useCallback(O=>{if(!lt(O,g.onInput)){if(M.current){M.current.handleInput();return}for(var _ of w.current)_();if(w.current=[],!Y.isFocused(d)){var T=O.nativeEvent,I=d;if(T.inputType==="historyUndo"&&typeof I.undo=="function"){I.undo();return}if(T.inputType==="historyRedo"&&typeof I.redo=="function"){I.redo();return}}}},[g.onInput,d]),onBlur:c.useCallback(O=>{if(!(o||j.isUpdatingSelection||!Y.hasSelectableTarget(d,O.target)||lt(O,g.onBlur))){var _=Y.findDocumentOrShadowRoot(d);if(j.latestElement!==_.activeElement){var{relatedTarget:T}=O,I=Y.toDOMNode(d,d);if(T!==I&&!(Dt(T)&&T.hasAttribute("data-slate-spacer"))){if(T!=null&&Xt(T)&&Y.hasDOMNode(d,T)){var Z=Y.toSlateNode(d,T);if(ue.isElement(Z)&&!d.isVoid(Z))return}if(mr){var ee=dn(_);ee==null||ee.removeAllRanges()}Zt.delete(d)}}}},[o,j.isUpdatingSelection,j.latestElement,d,g.onBlur]),onClick:c.useCallback(O=>{if(Y.hasTarget(d,O.target)&&!lt(O,g.onClick)&&Xt(O.target)){var _=Y.toSlateNode(d,O.target),T=Y.findPath(d,_);if(!m.hasPath(d,T)||se.get(d,T)!==_)return;if(O.detail===W0&&T.length>=1){var I=T;if(!(ue.isElement(_)&&m.isBlock(d,_))){var Z,ee=m.above(d,{match:Ae=>ue.isElement(Ae)&&m.isBlock(d,Ae),at:T});I=(Z=ee==null?void 0:ee[1])!==null&&Z!==void 0?Z:T.slice(0,1)}var J=m.range(d,I);te.select(d,J);return}if(o)return;var de=m.start(d,T),fe=m.end(d,T),ce=m.void(d,{at:de}),we=m.void(d,{at:fe});if(ce&&we&&L.equals(ce[1],we[1])){var Me=m.range(d,de);te.select(d,Me)}}},[d,g.onClick,o]),onCompositionEnd:c.useCallback(O=>{if(Y.hasSelectableTarget(d,O.target)){var _;if(Y.isComposing(d)&&Promise.resolve().then(()=>{E(!1),Cr.set(d,!1)}),(_=M.current)===null||_===void 0||_.handleCompositionEnd(O),lt(O,g.onCompositionEnd)||ut)return;if(!mr&&!HC&&!Pl&&!RC&&!UC&&O.data){var T=Bt.get(d);Bt.delete(d),T!==void 0&&(Nt.set(d,d.marks),d.marks=T),m.insertText(d,O.data);var I=Nt.get(d);Nt.delete(d),I!==void 0&&(d.marks=I)}}},[g.onCompositionEnd,d]),onCompositionUpdate:c.useCallback(O=>{Y.hasSelectableTarget(d,O.target)&&!lt(O,g.onCompositionUpdate)&&(Y.isComposing(d)||(E(!0),Cr.set(d,!0)))},[g.onCompositionUpdate,d]),onCompositionStart:c.useCallback(O=>{if(Y.hasSelectableTarget(d,O.target)){var _;if((_=M.current)===null||_===void 0||_.handleCompositionStart(O),lt(O,g.onCompositionStart)||ut)return;E(!0);var{selection:T}=d;if(T&&q.isExpanded(T)){m.deleteFragment(d);return}}},[g.onCompositionStart,d]),onCopy:c.useCallback(O=>{Y.hasSelectableTarget(d,O.target)&&!lt(O,g.onCopy)&&!oc(O)&&(O.preventDefault(),Y.setFragmentData(d,O.clipboardData,"copy"))},[g.onCopy,d]),onCut:c.useCallback(O=>{if(!o&&Y.hasSelectableTarget(d,O.target)&&!lt(O,g.onCut)&&!oc(O)){O.preventDefault(),Y.setFragmentData(d,O.clipboardData,"cut");var{selection:_}=d;if(_)if(q.isExpanded(_))m.deleteFragment(d);else{var T=se.parent(d,_.anchor.path);m.isVoid(d,T)&&te.delete(d)}}},[o,d,g.onCut]),onDragOver:c.useCallback(O=>{if(Y.hasTarget(d,O.target)&&!lt(O,g.onDragOver)){var _=Y.toSlateNode(d,O.target);ue.isElement(_)&&m.isVoid(d,_)&&O.preventDefault()}},[g.onDragOver,d]),onDragStart:c.useCallback(O=>{if(!o&&Y.hasTarget(d,O.target)&&!lt(O,g.onDragStart)){var _=Y.toSlateNode(d,O.target),T=Y.findPath(d,_),I=ue.isElement(_)&&m.isVoid(d,_)||m.void(d,{at:T,voids:!0});if(I){var Z=m.range(d,T);te.select(d,Z)}j.isDraggingInternally=!0,Y.setFragmentData(d,O.dataTransfer,"drag")}},[o,d,g.onDragStart,j]),onDrop:c.useCallback(O=>{if(!o&&Y.hasTarget(d,O.target)&&!lt(O,g.onDrop)){O.preventDefault();var _=d.selection,T=Y.findEventRange(d,O),I=O.dataTransfer;te.select(d,T),j.isDraggingInternally&&_&&!q.equals(_,T)&&!m.void(d,{at:T,voids:!0})&&te.delete(d,{at:_}),Y.insertData(d,I),Y.isFocused(d)||Y.focus(d)}},[o,d,g.onDrop,j]),onDragEnd:c.useCallback(O=>{!o&&j.isDraggingInternally&&g.onDragEnd&&Y.hasTarget(d,O.target)&&g.onDragEnd(O)},[o,j,g,d]),onFocus:c.useCallback(O=>{if(!o&&!j.isUpdatingSelection&&Y.hasEditableTarget(d,O.target)&&!lt(O,g.onFocus)){var _=Y.toDOMNode(d,d),T=Y.findDocumentOrShadowRoot(d);if(j.latestElement=T.activeElement,Mr&&O.target!==_){_.focus();return}Zt.set(d,!0)}},[o,j,d,g.onFocus]),onKeyDown:c.useCallback(O=>{if(!o&&Y.hasEditableTarget(d,O.target)){var _;(_=M.current)===null||_===void 0||_.handleKeyDown(O);var{nativeEvent:T}=O;if(Y.isComposing(d)&&T.isComposing===!1&&(Cr.set(d,!1),E(!1)),lt(O,g.onKeyDown)||Y.isComposing(d))return;var{selection:I}=d,Z=d.children[I!==null?I.focus.path[0]:0],ee=el(se.string(Z))==="rtl";if(We.isRedo(T)){O.preventDefault();var J=d;typeof J.redo=="function"&&J.redo();return}if(We.isUndo(T)){O.preventDefault();var de=d;typeof de.undo=="function"&&de.undo();return}if(We.isMoveLineBackward(T)){O.preventDefault(),te.move(d,{unit:"line",reverse:!0});return}if(We.isMoveLineForward(T)){O.preventDefault(),te.move(d,{unit:"line"});return}if(We.isExtendLineBackward(T)){O.preventDefault(),te.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(We.isExtendLineForward(T)){O.preventDefault(),te.move(d,{unit:"line",edge:"focus"});return}if(We.isMoveBackward(T)){O.preventDefault(),I&&q.isCollapsed(I)?te.move(d,{reverse:!ee}):te.collapse(d,{edge:ee?"end":"start"});return}if(We.isMoveForward(T)){O.preventDefault(),I&&q.isCollapsed(I)?te.move(d,{reverse:ee}):te.collapse(d,{edge:ee?"start":"end"});return}if(We.isMoveWordBackward(T)){O.preventDefault(),I&&q.isExpanded(I)&&te.collapse(d,{edge:"focus"}),te.move(d,{unit:"word",reverse:!ee});return}if(We.isMoveWordForward(T)){O.preventDefault(),I&&q.isExpanded(I)&&te.collapse(d,{edge:"focus"}),te.move(d,{unit:"word",reverse:ee});return}if(Gt){if((Tl||mr)&&I&&(We.isDeleteBackward(T)||We.isDeleteForward(T))&&q.isCollapsed(I)){var fe=se.parent(d,I.anchor.path);if(ue.isElement(fe)&&m.isVoid(d,fe)&&(m.isInline(d,fe)||m.isBlock(d,fe))){O.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(We.isBold(T)||We.isItalic(T)||We.isTransposeCharacter(T)){O.preventDefault();return}if(We.isSoftBreak(T)){O.preventDefault(),m.insertSoftBreak(d);return}if(We.isSplitBlock(T)){O.preventDefault(),m.insertBreak(d);return}if(We.isDeleteBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(We.isDeleteForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(We.isDeleteLineBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(We.isDeleteLineForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(We.isDeleteWordBackward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(We.isDeleteWordForward(T)){O.preventDefault(),I&&q.isExpanded(I)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[o,d,g.onKeyDown]),onPaste:c.useCallback(O=>{!o&&Y.hasEditableTarget(d,O.target)&&!lt(O,g.onPaste)&&(!Gt||GC(O.nativeEvent)||mr)&&(O.preventDefault(),Y.insertData(d,O.clipboardData))},[o,d,g.onPaste])}),c.createElement(X0,{decorations:R,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:d.selection}))))))}),J0=t=>{var{attributes:e,children:r}=t;return c.createElement("span",Pt({},e),r,ut&&c.createElement("br",null))},Q0=()=>[],eb=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),pC(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},lt=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},oc=t=>Xt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),tb=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},rb=c.createContext(!1),nb=c.createContext({});function ib(t){var e=c.useRef([]).current,r=c.useRef({editor:t}).current,n=c.useCallback(s=>{r.editor=s,e.forEach(a=>a(s))},[e,r]),i=c.useMemo(()=>({getSlate:()=>r.editor,addEventListener:s=>(e.push(s),()=>{e.splice(e.indexOf(s),1)})}),[e,r]);return{selectorContext:i,onChange:n}}var sb=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],ab=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:i,onValueChange:s,initialValue:a}=t,o=Tr(t,sb),[u,l]=c.useState(()=>{if(!se.isNodeList(a))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat($e.stringify(a)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat($e.stringify(e)));return e.children=a,Object.assign(e,o),{v:0,editor:e}}),{selectorContext:f,onChange:p}=ib(e),h=c.useCallback(g=>{var d;switch(n&&n(e.children),g==null||(d=g.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:s==null||s(e.children)}l(D=>({v:D.v+1,editor:e})),p(e)},[e,p,n,i,s]);c.useEffect(()=>(na.set(e,h),()=>{na.set(e,()=>{})}),[e,h]);var[y,v]=c.useState(Y.isFocused(e));return c.useEffect(()=>{v(Y.isFocused(e))},[e]),pn(()=>{var g=()=>v(Y.isFocused(e));return Ll>=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(nb.Provider,{value:f},c.createElement(ic.Provider,{value:u},c.createElement(Xs.Provider,{value:u.editor},c.createElement(rb.Provider,{value:y},r))))},uc=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},lc=(t,e,r)=>{var n=Y.toDOMRange(t,e).getBoundingClientRect(),i=Y.toDOMRange(t,r).getBoundingClientRect();return uc(n,i)&&uc(i,n)},ob=(t,e)=>{var r=m.range(t,q.end(e)),n=Array.from(m.positions(t,{at:e})),i=0,s=n.length,a=Math.floor(s/2);if(lc(t,m.range(t,n[i]),r))return m.range(t,n[i],r);if(n.length<2)return m.range(t,n[n.length-1],r);for(;a!==n.length&&a!==i;)lc(t,m.range(t,n[a]),r)?s=a:i=a,a=Math.floor((i+s)/2);return m.range(t,n[s],r)};function cc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cc(Object(r),!0).forEach(function(n){bt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ub=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:i,onChange:s,deleteBackward:a,addMark:o,removeMark:u}=n;return pi.set(n,new WeakMap),n.addMark=(l,f)=>{var p,h;(p=ia.get(n))===null||p===void 0||p(),!Bt.get(n)&&(h=pt.get(n))!==null&&h!==void 0&&h.length&&Bt.set(n,null),Nt.delete(n),o(l,f)},n.removeMark=l=>{var f;!Bt.get(n)&&(f=pt.get(n))!==null&&f!==void 0&&f.length&&Bt.set(n,null),Nt.delete(n),u(l)},n.deleteBackward=l=>{if(l!=="line")return a(l);if(n.selection&&q.isCollapsed(n.selection)){var f=m.above(n,{match:v=>ue.isElement(v)&&m.isBlock(n,v),at:n.selection});if(f){var[,p]=f,h=m.range(n,p,n.selection.anchor),y=ob(n,h);q.isCollapsed(y)||te.delete(n,{at:y})}}},n.apply=l=>{var f=[],p=[],h=pt.get(n);if(h!=null&&h.length){var y=h.map(z=>o0(z,l)).filter(Boolean);pt.set(n,y)}var v=Yt.get(n);v&&Yt.set(n,Vl(n,v,l));var g=Kt.get(n);if(g!=null&&g.at){var d=ye.isPoint(g==null?void 0:g.at)?la(n,g.at,l):Vl(n,g.at,l);Kt.set(n,d?fc(fc({},g),{},{at:d}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...Ir(n,l.path));break}case"set_selection":{var D;(D=fn.get(n))===null||D===void 0||D.unref(),fn.delete(n);break}case"insert_node":case"remove_node":{f.push(...Ir(n,L.parent(l.path)));break}case"merge_node":{var E=L.previous(l.path);f.push(...Ir(n,E));break}case"move_node":{var B=L.common(L.parent(l.path),L.parent(l.newPath));f.push(...Ir(n,B));var w;L.isBefore(l.path,l.newPath)?(f.push(...Ir(n,L.parent(l.path))),w=l.newPath):(f.push(...Ir(n,L.parent(l.newPath))),w=l.path);var b=se.get(e,L.parent(w)),x=Y.findKey(n,b),S=m.pathRef(n,L.parent(w));p.push([S,x]);break}}switch(i(l),l.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":kr.set(n,!0)}for(var[U,P]of f){var[H]=m.node(n,U);di.set(H,P)}for(var[j,M]of p){if(j.current){var[N]=m.node(n,j.current);di.set(N,M)}j.unref()}},n.setFragmentData=l=>{var{selection:f}=n;if(f){var[p,h]=q.edges(f),y=m.void(n,{at:p.path}),v=m.void(n,{at:h.path});if(!(q.isCollapsed(f)&&!y)){var g=Y.toDOMRange(n,f),d=g.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(H=>{H.textContent&&H.textContent.trim()!==""&&(D=H)}),v){var[E]=v,B=g.cloneRange(),w=Y.toDOMNode(n,E);B.setEndAfter(w),d=B.cloneContents()}if(y&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(H=>{var j=H.getAttribute("data-slate-zero-width")==="n";H.textContent=j?`
51
+ `:""}),Nl(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var x=n.getFragment(),S=JSON.stringify(x),U=window.btoa(encodeURIComponent(S));D.setAttribute("data-slate-fragment",U),l.setData("application/".concat(r),U);var P=d.ownerDocument.createElement("div");return P.appendChild(d),P.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(P),l.setData("text/html",P.innerHTML),l.setData("text/plain",zl(P)),d.ownerDocument.body.removeChild(P),l}}},n.insertData=l=>{n.insertFragmentData(l)||n.insertTextData(l)},n.insertFragmentData=l=>{var f=l.getData("application/".concat(r))||$C(l);if(f){var p=decodeURIComponent(window.atob(f)),h=JSON.parse(p);return n.insertFragment(h),!0}return!1},n.insertTextData=l=>{var f=l.getData("text/plain");if(f){var p=f.split(/\r\n|\r|\n/),h=!1;for(var y of p)h&&te.splitNodes(n,{always:!0}),n.insertText(y),h=!0;return!0}return!1},n.onChange=l=>{var f=Ll<18?or.unstable_batchedUpdates:p=>p();f(()=>{var p=na.get(n);p&&p(l),s(l)})},n},Ir=(t,e)=>{var r=[];for(var[n,i]of m.levels(t,{at:e})){var s=Y.findKey(t,n);r.push([i,s])}return r};function dc(t,e,r="type"){const{selection:n}=t;if(!n)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,n),match:s=>!m.isEditor(s)&&ue.isElement(s)&&s[r]===e}));return!!i}const pc=["listItem","numberedList"],gi=["left","center","right","justify"];function lb(t,e){const r=gi.includes(e)?"align":"type",n=dc(t,e,r),i=pc.includes(e);te.unwrapNodes(t,{match:a=>!m.isEditor(a)&&ue.isElement(a)&&pc.includes(a.type)&&!gi.includes(e),split:!0});let s;if(gi.includes(e)?s={align:n?void 0:e}:s={type:n?"paragraph":i?"listItem":e},te.setNodes(t,s),!n&&i){const a={type:e,children:[]};te.wrapNodes(t,a)}}function br({format:t,icon:e}){const r=vi(),n=gi.includes(t)?"align":"type",s=dc(r,t,n)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),lb(r,t)}return C.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+s,onMouseDown:a,children:C.jsx(e,{})})}function cb({attributes:t,children:e,element:r}){const n={textAlign:r.align};switch(r.type){case"blockQuote":return C.jsx("blockquote",{className:"arkynElementBlockquote",style:n,...t,children:e});case"bulletedList":return C.jsx("ul",{className:"arkynElementBulletList",style:n,...t,children:e});case"headingOne":return C.jsx("h1",{className:"arkynElementHeadingOne",style:n,...t,children:e});case"headingTwo":return C.jsx("h2",{className:"arkynElementHeadingTwo",style:n,...t,children:e});case"listItem":return C.jsx("li",{className:"arkynElementListItem",style:n,...t,children:e});case"numberedList":return C.jsx("ol",{className:"arkynElementNumberedList",style:n,...t,children:e});case"image":return C.jsxs("div",{style:n,...t,children:[C.jsx("img",{className:"arkynElementImage",alt:"arkynElementImage",src:(r==null?void 0:r.src)||""}),e]});default:return C.jsx("p",{className:"arkynElementParagraph",style:n,...t,children:e})}}const hc=c.createContext({});function vc(t){const{isVisibled:e,makeInvisible:r,children:n,className:i="",...s}=t,o=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return C.jsx(hc.Provider,{value:{makeInvisible:r},children:C.jsx(ur.AnimatePresence,{children:e&&C.jsxs("aside",{className:o.trim(),...s,children:[C.jsx(ur.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),C.jsx(ur.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:n})]})})})}function gc(t){const{alignment:e="right",className:r,...n}=t,i=`arkynModalFooter ${e} ${r}`;return C.jsx("footer",{className:i.trim(),...n})}function mc(t){const{showCloseButton:e=!0,className:r,children:n,...i}=t,{makeInvisible:s}=c.useContext(hc),a=`arkynModalHeader ${r}`;return C.jsxs("header",{className:a.trim(),...i,children:[n,e&&C.jsx("button",{type:"button",onClick:s,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:C.jsx(he.X,{size:24})})]})}const da=c.createContext({});function fb(){if(!da)throw new Error("useTabContext must be used within a TabProvider");return c.useContext(da)}function yc(t){const{children:e,onClick:r,defaultActive:n,className:i,...s}=t,[a,o]=c.useState(n||""),[u,l]=c.useState(!0),f=c.useRef(null),p=`arkynTabContainer ${i||""}`,[h,y]=c.useState({width:"0px",left:"0px",transition:"none"}),v=(d,D)=>{const E=d.getBoundingClientRect(),B=f.current.getBoundingClientRect(),w=D?void 0:"none";l(!1),y({transition:w,width:`${E.width}px`,left:`${E.left-B.left}px`})};c.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&v(D)},[]);const g=d=>{const D=d.target;D&&(o(D.value),D.classList.add("activeTrue"),v(D,!0),r&&r(D.value))};return C.jsxs("nav",{ref:f,className:p.trim(),...s,children:[C.jsx(da.Provider,{value:{handleTabClick:g,showInitialTab:u,value:a},children:e}),C.jsx("div",{className:"activeLine",style:h})]})}function pa(t){const{children:e,className:r="",onClick:n,...i}=t,{value:s,showInitialTab:a,handleTabClick:o}=fb(),u=s===i.value&&s?"activeTrue":"activeFalse",f=`arkynTabButton ${s===i.value&&a?"showBorderBottom":""} ${u} ${r}`;function p(h){o(h),n&&n(h)}return C.jsx("button",{onClick:p,className:f.trim(),...i,type:"button",children:e})}function db(t){const{action:e,tabLabels:r=["Adicionar URL","Upload de arquivo"],modalCancelButton:n="Cancelar",modalConfirmButton:i="Confirmar",modalInputImageLabel:s="Imagem:",modalInputUrlLabel:a="URL da imagem:",modalTitle:o="Inserir imagem"}=t,u=vi(),[l,f]=c.useState(!1),[p,h]=c.useState(""),[y,v]=c.useState("url");function g(d){d.preventDefault(),!(!p||p==="")&&(u.insertNodes([{type:"paragraph",children:[{text:""}]},{type:"image",src:p,children:[{text:""}]},{type:"paragraph",children:[{text:""}]}]),f(!1))}return C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",className:"arkynRichTextInsertImage",onMouseDown:()=>f(!0),children:C.jsx(he.Image,{})}),C.jsxs(vc,{isVisibled:l,makeInvisible:()=>f(!1),children:[C.jsx(mc,{children:o}),C.jsxs("div",{className:"arkynRichTextInsertImageModalContent",children:[C.jsxs(yc,{defaultActive:y,onClick:v,children:[C.jsx(pa,{value:"url",children:r[0]}),C.jsx(pa,{value:"file",children:r[1]})]}),y==="url"&&C.jsxs(C.Fragment,{children:[C.jsxs(Ms,{children:[C.jsx(ks,{children:a}),C.jsx(nn,{type:"text",name:"richTextimageURL",defaultValue:p,onChange:d=>h(d.target.value)})]}),p&&C.jsx("img",{className:"arkynRichTextInsertImageModalPreviewImage",src:p,alt:"preview"})]}),y==="file"&&C.jsxs(Ms,{children:[C.jsx(ks,{children:s}),C.jsx(Wu,{name:"richTextimageURL",action:e,defaultValue:p,onUpload:d=>h(d||"")})]})]}),C.jsxs(gc,{children:[C.jsx(rn,{type:"button",scheme:"danger",variant:"outline",onClick:()=>f(!1),children:n}),C.jsx(rn,{type:"button",onClick:g,children:i})]})]})]})}function pb({attributes:t,children:e,leaf:r}){return r.bold&&(e=C.jsx("strong",{children:e})),r.code&&(e=C.jsx("code",{children:e})),r.italic&&(e=C.jsx("em",{children:e})),r.underline&&(e=C.jsx("u",{children:e})),C.jsx("span",{...t,children:e})}function Cc(t,e){const r=m.marks(t);return r?r[e]===!0:!1}function bc(t,e){Cc(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function mi({format:t,icon:e}){const r=vi(),i=Cc(r,t)?"activeTrue":"activeFalse";function s(a){a.preventDefault(),bc(r,t)}return C.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:s,children:C.jsx(e,{})})}function hb({children:t}){return C.jsx("div",{className:"arkynRichTextToolbar",children:t})}function Dc(t){return t.map(e=>se.string(e)).join("")}const Ec={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},yi=[{type:"paragraph",children:[{text:""}]}];function vb(t){const{name:e,hiddenButtons:r,imageConfig:n,defaultValue:i="[]",enforceCharacterLimit:s=!1,onChangeCharactersCount:a,maxLimit:o=2e3,onChange:u,isError:l}=t,f=c.useMemo(()=>Qm(ub(rg())),[]),{id:p,inputRef:h,error:y}=ot(),v=c.useRef(null);function g(){try{const R=JSON.parse(i);return!Array.isArray(R)||R.length<=0?yi:R.every(Q=>typeof Q=="object"&&Q!==null&&"type"in Q&&"children"in Q)?R:yi}catch{return yi}}const d=Dc(g()),[D,E]=c.useState(d.length),[B,w]=c.useState(JSON.stringify(g())||"[]"),[b,x]=c.useState(!1),S=h||v,U=l||!!y,P=c.useCallback(pb,[]),H=c.useCallback(cb,[]);function j(R){const ne=Dc(R);E(ne.length),a&&a(ne.length),!(s&&ne.length>=o)&&(w(JSON.stringify(R)),u&&u(R),f.children=R,te.setNodes(f,{children:R}))}const M=b?"focusTrue":"focusFalse",z=`arkynRichText ${U||o<D?"errorTrue":"errorFalse"} ${M}`,W=o-D;function X(R){return!(r!=null&&r.includes(R))}return C.jsxs(ab,{editor:f,initialValue:g(),onChange:j,onValueChange:j,children:[C.jsxs("div",{className:z,children:[C.jsxs(hb,{children:[X("headingOne")&&C.jsx(br,{format:"headingOne",icon:he.Heading1}),X("headingTwo")&&C.jsx(br,{format:"headingTwo",icon:he.Heading2}),X("blockQuote")&&C.jsx(br,{format:"blockQuote",icon:he.Quote}),X("bold")&&C.jsx(mi,{format:"bold",icon:he.Bold}),X("italic")&&C.jsx(mi,{format:"italic",icon:he.Italic}),X("underline")&&C.jsx(mi,{format:"underline",icon:he.Underline}),X("code")&&C.jsx(mi,{format:"code",icon:he.Code}),X("left")&&C.jsx(br,{format:"left",icon:he.AlignLeft}),X("right")&&C.jsx(br,{format:"right",icon:he.AlignRight}),X("center")&&C.jsx(br,{format:"center",icon:he.AlignCenter}),X("justify")&&C.jsx(br,{format:"justify",icon:he.AlignJustify}),n&&X("image")&&C.jsx(db,{...n})]}),C.jsx($0,{className:"editorContainer",renderElement:H,renderLeaf:P,spellCheck:!0,id:p,onFocus:()=>x(!0),onBlur:()=>x(!1),onKeyDown:R=>{for(const ne in Ec)if(Xm(ne,R)){R.preventDefault();const Q=Ec[ne];bc(f,Q)}}}),W<0&&C.jsx("div",{className:"restatesCharacters",children:W})]}),C.jsx("input",{type:"hidden",ref:S,name:e,value:B}),C.jsx("input",{type:"hidden",name:`${e}Count`,value:D})]})}function gb(t,e){const{isLoading:r,isError:n,size:i="md",className:s="",variant:a="solid",prefix:o,leftIcon:u,disabled:l,readOnly:f,onFocus:p,onBlur:h,title:y,style:v,closeOnSelect:g=!0,...d}=t,b=`arkyn_select ${o?"hasPrefix":""} ${a} ${i} ${l||f||r?"opacity":""} ${n?"errored":""} ${e?"focused":""} ${s}`,S={md:20,lg:20}[i];return{isLoading:r,className:b,prefix:Fs(o,S,"prefix"),LeftIcon:u,disabled:l||r||f,onFocus:p,onBlur:h,title:y,closeOnSelect:g,style:v,iconSize:S,Spinner:C.jsx(he.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...d}}function mb(t){var O;const[e,r]=c.useState(""),[n,i]=c.useState(!1),{inputRef:s,id:a,error:o}=ot(),u=c.useRef(null),l=s||u,f=t.isError||!!o,{disabled:p,title:h,style:y,className:v,prefix:g,iconSize:d,isLoading:D,LeftIcon:E,value:B=null,defaultValue:w="",onFocus:b,onBlur:x,Spinner:S,name:U,placeholder:P,onSelect:H,options:j,optionMaxHeight:M,closeOnSelect:N,isSearchable:z,onSearch:W,...X}=gb({...t,id:a,isError:f},n),[R,ne]=c.useState(w);function Q(){p||!(l!=null&&l.current)||n||(i(!0),l.current.focus())}function k(_){n||(i(!0),b&&b(_))}function G(){i(!1),x&&l.current&&l.current.blur()}function $(_){const{label:T,value:I}=_;ne(R!==I?I:""),H&&H({label:T,value:I}),N&&G()}const V=typeof B=="string"?B:R,re=((O=j.find(_=>_.value===V))==null?void 0:O.label)||"",F=()=>{if(!n&&re)return!0;if(!n&&!re)return!1;if(n&&re)return!0;if(n&&!re)return!1};return C.jsxs(C.Fragment,{children:[C.jsxs("section",{title:h,style:y,onClick:Q,className:`${v} placeholder_dark_${F()}`,children:[g,E&&C.jsx(E,{size:d,strokeWidth:2.5}),C.jsx("input",{disabled:p,readOnly:!0,placeholder:re||P,onFocus:k,...X}),C.jsx("input",{type:"hidden",ref:l,name:U,value:V||"",readOnly:!0}),n&&C.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:M},children:[z&&C.jsx(nn,{type:"search",name:"search-select",variant:"underline",leftIcon:he.Search,onChange:_=>r(_.target.value)}),j.filter(_=>!!(t.onSearch||!t.isSearchable||_.label.toLowerCase().includes(e.toLowerCase()))).map(({label:_,value:T})=>C.jsxs("div",{onClick:()=>$({label:_,value:T}),className:V===T?"arkyn_select_option active":"arkyn_select_option",children:[_," ",C.jsx(he.Check,{})]},T)),j.length<=0&&C.jsx("p",{children:"Sem opções disponíveis"})]}),!D&&C.jsx(he.ChevronDown,{className:"arkyn_select_arrow",size:d,strokeWidth:2.5}),D&&S]}),n&&C.jsx("aside",{className:"arkyn_select_overlay",onClick:G})]})}function yb(t){const{size:e="lg",defaultChecked:r=!1,checked:n=null,value:i,unCheckedValue:s="",name:a,className:o="",onCheck:u,...l}=t,[f,p]=c.useState(r),{id:h,inputRef:y}=ot(),v=typeof n=="boolean"?n:f;function g(){p(!f),u&&u(v?s:i||"checked")}const D=`arkynSwitch ${v?"checkedTrue":"checkedFalse"} ${e} ${o}`;return C.jsx("button",{type:"button",onClick:g,className:D,...l,children:C.jsx("input",{id:h,type:"hidden",name:a,ref:y,onClick:g,value:v?i||"checked":s})})}function Cb(t){const{variant:e="solid",size:r="md",className:n,disabled:i=!1,readOnly:s=!1,onFocus:a,onBlur:o,title:u,style:l,...f}=t,[p,h]=c.useState(!1),{inputRef:y,id:v,error:g}=ot(),d=c.useRef(null),D=y||d,B=t.isError||!!g?"errorTrue":"errorFalse",x=`arkynTextarea ${e} ${r} ${i||s?"opacityTrue":"opacityFalse"} ${B} ${p?"focusedTrue":"focusedFalse"} ${n}`;function S(){i||!(D!=null&&D.current)||(h(!0),D.current.focus())}function U(H){h(!0),a&&a(H)}function P(H){h(!1),o&&o(H)}return C.jsx("section",{title:u,style:l,onClick:S,className:x,children:C.jsx("textarea",{id:v,disabled:i,readOnly:s,ref:D,onFocus:U,onBlur:P,...f})})}function bb(t){const{className:e="",...r}=t,n=`arkynBreadcrumbContainer ${e}`;return C.jsx("nav",{className:n,...r})}function Db(t){const{pathname:e}=At.useLocation(),{className:r="",disabled:n=!1,children:i,to:s,...a}=t,u=`arkynBreadcrumbLink ${e===s?"active":"inactive"} ${r}`;return n?C.jsxs("p",{className:u,children:[C.jsx(he.ChevronRight,{size:14,strokeWidth:2.5}),i]}):C.jsxs(At.Link,{to:s,className:u,...a,children:[C.jsx(he.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function ha(t=""){const e=At.useLocation(),r=new URLSearchParams(e.search),n=t?`${t}:`:"",i=s=>{Object.entries(s).forEach(([a,o])=>{o===void 0?r.delete(`${n}${a}`):r.set(`${n}${a}`,String(o))})};return{getParam:s=>r.get(`${n}${s}`),getScopedSearch:s=>{i(s);let a=r.toString();return a&&(a="?"+a),a}}}function wc(t,e){return[...new Array(e-t)].map((r,n)=>t+n+1).filter(r=>r>0)}function Eb(t){const{scope:e,totalCountRegisters:r,perPageKey:n="per_page",pageKey:i="page",siblingsCount:s=2,currentPage:a=1,registerPerPage:o=20,...u}=t,l=At.useNavigate(),{getParam:f,getScopedSearch:p}=ha(e),h=Number(f("page"))||a,y=Number(f("per_page"))||o,v=Math.ceil(r/y),g=h>1?wc(h-1-s,h-1):[],d=h<v?wc(h,Math.min(h+s,v)):[];function D(E){l(p({page:E}))}return C.jsxs("div",{className:"arkynPagination",...u,children:[C.jsx("button",{className:"arkynPaginationIconButton",disabled:h<=1,onClick:()=>D(h-1),children:C.jsx(he.ChevronLeft,{})}),h>1+s&&C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>D(1),children:"1"}),h>2+s&&C.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:C.jsx(he.Ellipsis,{})})]}),g.length>0&&g.map((E,B)=>C.jsx("button",{onClick:()=>D(E),className:"arkynPaginationPageButton",children:E},B)),C.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:h}),d.length>0&&d.map((E,B)=>C.jsx("button",{onClick:()=>D(E),className:"arkynPaginationPageButton",children:E},B)),h+s<v&&C.jsxs(C.Fragment,{children:[h+1+s<v&&C.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:C.jsx(he.Ellipsis,{})}),C.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>D(v),children:v})]}),C.jsx("button",{className:"arkynPaginationIconButton",disabled:h>=v,onClick:()=>D(h+1),children:C.jsx(he.ChevronRight,{})})]})}const Oc=c.createContext({});function wb(t){const{isVisibled:e,makeInvisible:r,orientation:n="left",children:i,className:s,...a}=t,o=n==="left"?"-100%":"100%",l=`arkynDrawerContainer ${n} ${e?"visibleTrue":"visibleFalse"} ${s}`;return C.jsx(Oc.Provider,{value:{makeInvisible:r},children:C.jsx(ur.AnimatePresence,{children:e&&C.jsxs("aside",{className:l.trim(),...a,children:[C.jsx(ur.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:r}),C.jsx(ur.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${o})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${o})`},children:i})]})})})}function Ob(t){const{showCloseButton:e=!0,className:r,children:n,...i}=t,{makeInvisible:s}=c.useContext(Oc),a=`arkynDrawerHeader ${r}`;return C.jsxs("header",{className:a.trim(),...i,children:[n,e&&C.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:s,"aria-label":"Close drawer",children:C.jsx(he.X,{size:24})})]})}function xb(t){const{children:e,button:r,closeOnClick:n,orientation:i="bottomLeft"}=t,[s,a]=c.useState(!1),u=`arkynPopover ${i} ${s?"visibleTrue":"visibleFalse"}`;function l(){s||a(!0)}return C.jsxs("div",{className:u,onClick:l,children:[r,C.jsx(ur.motion.div,{style:{visibility:s?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:s?1:0},exit:{opacity:0},onClick:()=>n&&a(!1),className:"arkynPopoverContent",children:e}),s&&C.jsx("div",{onClick:()=>a(!1),className:"arkynPopoverOverlay"})]})}function Bb(t){const{message:e,type:r}=t,n=`arkynToast ${r}}`;function i(){switch(r){case"success":return C.jsx(he.CheckCircle2,{});case"danger":return C.jsx(he.XCircle,{});default:return C.jsx(he.Info,{})}}return C.jsxs("div",{className:n,children:[C.jsxs("div",{children:[C.jsx("div",{className:"bg"}),C.jsx(i,{})]}),C.jsx("p",{children:C.jsx("span",{children:e})})]})}var Re={},va={},hn={},vn={},xc="Expected a function",Bc=NaN,Sb="[object Symbol]",Ab=/^\s+|\s+$/g,Lb=/^[-+]0x[0-9a-f]+$/i,Pb=/^0b[01]+$/i,Fb=/^0o[0-7]+$/i,Tb=parseInt,Mb=typeof ke=="object"&&ke&&ke.Object===Object&&ke,kb=typeof self=="object"&&self&&self.Object===Object&&self,jb=Mb||kb||Function("return this")(),Ib=Object.prototype,Nb=Ib.toString,_b=Math.max,zb=Math.min,ga=function(){return jb.Date.now()};function Wb(t,e,r){var n,i,s,a,o,u,l=0,f=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError(xc);e=Sc(e)||0,Ci(r)&&(f=!!r.leading,p="maxWait"in r,s=p?_b(Sc(r.maxWait)||0,e):s,h="trailing"in r?!!r.trailing:h);function y(x){var S=n,U=i;return n=i=void 0,l=x,a=t.apply(U,S),a}function v(x){return l=x,o=setTimeout(D,e),f?y(x):a}function g(x){var S=x-u,U=x-l,P=e-S;return p?zb(P,s-U):P}function d(x){var S=x-u,U=x-l;return u===void 0||S>=e||S<0||p&&U>=s}function D(){var x=ga();if(d(x))return E(x);o=setTimeout(D,g(x))}function E(x){return o=void 0,h&&n?y(x):(n=i=void 0,a)}function B(){o!==void 0&&clearTimeout(o),l=0,n=u=i=o=void 0}function w(){return o===void 0?a:E(ga())}function b(){var x=ga(),S=d(x);if(n=arguments,i=this,u=x,S){if(o===void 0)return v(u);if(p)return o=setTimeout(D,e),y(u)}return o===void 0&&(o=setTimeout(D,e)),a}return b.cancel=B,b.flush=w,b}function Hb(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(xc);return Ci(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Wb(t,e,{leading:n,maxWait:e,trailing:i})}function Ci(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ub(t){return!!t&&typeof t=="object"}function Rb(t){return typeof t=="symbol"||Ub(t)&&Nb.call(t)==Sb}function Sc(t){if(typeof t=="number")return t;if(Rb(t))return Bc;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(Ab,"");var r=Pb.test(t);return r||Fb.test(t)?Tb(t.slice(2),r?2:8):Lb.test(t)?Bc:+t}var Vb=Hb,gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.addPassiveEventListener=function(e,r,n){var i=n.name;i||(i=r,console.warn("Listener must be a named function.")),bi.has(r)||bi.set(r,new Set);var s=bi.get(r);if(!s.has(i)){var a=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("test",null,u)}catch{}return o}();e.addEventListener(r,n,a?{passive:!0}:!1),s.add(i)}},gn.removePassiveEventListener=function(e,r,n){e.removeEventListener(r,n),bi.get(r).delete(n.name||r)};var bi=new Map;Object.defineProperty(vn,"__esModule",{value:!0});var qb=Vb,Gb=Kb(qb),Zb=gn;function Kb(t){return t&&t.__esModule?t:{default:t}}var Yb=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,Gb.default)(e,r)},He={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,r){if(e){var n=Yb(function(i){He.scrollHandler(e)},r);He.scrollSpyContainers.push(e),(0,Zb.addPassiveEventListener)(e,"scroll",n)}},isMounted:function(e){return He.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var r=window.pageYOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:n?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var r=window.pageXOffset!==void 0,n=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var r=He.scrollSpyContainers[He.scrollSpyContainers.indexOf(e)].spyCallbacks||[];r.forEach(function(n){return n(He.currentPositionX(e),He.currentPositionY(e))})},addStateHandler:function(e){He.spySetState.push(e)},addSpyHandler:function(e,r){var n=He.scrollSpyContainers[He.scrollSpyContainers.indexOf(r)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(e),e(He.currentPositionX(r),He.currentPositionY(r))},updateStates:function(){He.spySetState.forEach(function(e){return e()})},unmount:function(e,r){He.scrollSpyContainers.forEach(function(n){return n.spyCallbacks&&n.spyCallbacks.length&&n.spyCallbacks.indexOf(r)>-1&&n.spyCallbacks.splice(n.spyCallbacks.indexOf(r),1)}),He.spySetState&&He.spySetState.length&&He.spySetState.indexOf(e)>-1&&He.spySetState.splice(He.spySetState.indexOf(e),1),document.removeEventListener("scroll",He.scrollHandler)},update:function(){return He.scrollSpyContainers.forEach(function(e){return He.scrollHandler(e)})}};vn.default=He;var Nr={},mn={};Object.defineProperty(mn,"__esModule",{value:!0});var Xb=function(e,r){var n=e.indexOf("#")===0?e.substring(1):e,i=n?"#"+n:"",s=window&&window.location,a=i?s.pathname+s.search+i:s.pathname+s.search;r?history.pushState(history.state,"",a):history.replaceState(history.state,"",a)},$b=function(){return window.location.hash.replace(/^#/,"")},Jb=function(e){return function(r){return e.contains?e!=r&&e.contains(r):!!(e.compareDocumentPosition(r)&16)}},Qb=function(e){return getComputedStyle(e).position!=="static"},ma=function(e,r){for(var n=e.offsetTop,i=e.offsetParent;i&&!r(i);)n+=i.offsetTop,i=i.offsetParent;return{offsetTop:n,offsetParent:i}},eD=function(e,r,n){if(n)return e===document?r.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?r.offsetLeft:r.offsetLeft-e.offsetLeft;if(e===document)return r.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(Qb(e)){if(r.offsetParent!==e){var i=function(f){return f===e||f===document},s=ma(r,i),a=s.offsetTop,o=s.offsetParent;if(o!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return a}return r.offsetTop}if(r.offsetParent===e.offsetParent)return r.offsetTop-e.offsetTop;var u=function(f){return f===document};return ma(r,u).offsetTop-ma(e,u).offsetTop};mn.default={updateHash:Xb,getHash:$b,filterElementInContainer:Jb,scrollOffset:eD};var Di={},ya={};Object.defineProperty(ya,"__esModule",{value:!0}),ya.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 Ca={};Object.defineProperty(Ca,"__esModule",{value:!0});var tD=gn,rD=["mousedown","mousewheel","touchmove","keydown"];Ca.default={subscribe:function(e){return typeof document<"u"&&rD.forEach(function(r){return(0,tD.addPassiveEventListener)(document,r,e)})}};var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var ba={registered:{},scrollEvent:{register:function(e,r){ba.registered[e]=r},remove:function(e){ba.registered[e]=null}}};yn.default=ba,Object.defineProperty(Di,"__esModule",{value:!0});var nD=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},iD=mn;Ei(iD);var sD=ya,Ac=Ei(sD),aD=Ca,oD=Ei(aD),uD=yn,Ft=Ei(uD);function Ei(t){return t&&t.__esModule?t:{default:t}}var Lc=function(e){return Ac.default[e.smooth]||Ac.default.defaultEasing},lD=function(e){return typeof e=="function"?e:function(){return e}},cD=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},Da=function(){return cD()||function(t,e,r){window.setTimeout(t,r||1e3/60,new Date().getTime())}}(),Pc=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}},Fc=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollLeft;var n=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},Tc=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollTop;var n=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},fD=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollWidth-r.offsetWidth;var n=document.body,i=document.documentElement;return Math.max(n.scrollWidth,n.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},dD=function(e){var r=e.data.containerElement;if(r&&r!==document&&r!==document.body)return r.scrollHeight-r.offsetHeight;var n=document.body,i=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},pD=function t(e,r,n){var i=r.data;if(!r.ignoreCancelEvents&&i.cancel){Ft.default.registered.end&&Ft.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=n),i.progress=n-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?r.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:r.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var s=t.bind(null,e,r);Da.call(window,s);return}Ft.default.registered.end&&Ft.default.registered.end(i.to,i.target,i.currentPosition)},Ea=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},Cn=function(e,r,n,i){r.data=r.data||Pc(),window.clearTimeout(r.data.delayTimeout);var s=function(){r.data.cancel=!0};if(oD.default.subscribe(s),Ea(r),r.data.start=null,r.data.cancel=!1,r.data.startPosition=r.horizontal?Fc(r):Tc(r),r.data.targetPosition=r.absolute?e:e+r.data.startPosition,r.data.startPosition===r.data.targetPosition){Ft.default.registered.end&&Ft.default.registered.end(r.data.to,r.data.target,r.data.currentPosition);return}r.data.delta=Math.round(r.data.targetPosition-r.data.startPosition),r.data.duration=lD(r.duration)(r.data.delta),r.data.duration=isNaN(parseFloat(r.data.duration))?1e3:parseFloat(r.data.duration),r.data.to=n,r.data.target=i;var a=Lc(r),o=pD.bind(null,a,r);if(r&&r.delay>0){r.data.delayTimeout=window.setTimeout(function(){Ft.default.registered.begin&&Ft.default.registered.begin(r.data.to,r.data.target),Da.call(window,o)},r.delay);return}Ft.default.registered.begin&&Ft.default.registered.begin(r.data.to,r.data.target),Da.call(window,o)},wi=function(e){return e=nD({},e),e.data=e.data||Pc(),e.absolute=!0,e},hD=function(e){Cn(0,wi(e))},vD=function(e,r){Cn(e,wi(r))},gD=function(e){e=wi(e),Ea(e),Cn(e.horizontal?fD(e):dD(e),e)},mD=function(e,r){r=wi(r),Ea(r);var n=r.horizontal?Fc(r):Tc(r);Cn(e+n,r)};Di.default={animateTopScroll:Cn,getAnimationType:Lc,scrollToTop:hD,scrollToBottom:gD,scrollTo:vD,scrollMore:mD},Object.defineProperty(Nr,"__esModule",{value:!0});var yD=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},CD=mn,bD=wa(CD),DD=Di,ED=wa(DD),wD=yn,Oi=wa(wD);function wa(t){return t&&t.__esModule?t:{default:t}}var xi={},Mc=void 0;Nr.default={unmount:function(){xi={}},register:function(e,r){xi[e]=r},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 Mc=e},getActiveLink:function(){return Mc},scrollTo:function(e,r){var n=this.get(e);if(!n){console.warn("target Element not found");return}r=yD({},r,{absolute:!1});var i=r.containerId,s=r.container,a=void 0;i?a=document.getElementById(i):s&&s.nodeType?a=s:a=document,r.absolute=!0;var o=r.horizontal,u=bD.default.scrollOffset(a,n,o)+(r.offset||0);if(!r.smooth){Oi.default.registered.begin&&Oi.default.registered.begin(e,n),a===document?r.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):a.scrollTop=u,Oi.default.registered.end&&Oi.default.registered.end(e,n);return}ED.default.animateTopScroll(u,r,e,n)}};var Oa={exports:{}},Bi={exports:{}},Le={};/** @license React v16.13.1
52
52
  * react-is.production.min.js
53
53
  *
54
54
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -62,20 +62,20 @@ React keys must be passed directly to JSX without using spread:
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var jc;function xD(){return jc||(jc=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,y=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function B(J){return typeof J=="string"||typeof J=="function"||J===n||J===l||J===s||J===i||J===p||J===h||typeof J=="object"&&J!==null&&(J.$$typeof===v||J.$$typeof===y||J.$$typeof===a||J.$$typeof===o||J.$$typeof===f||J.$$typeof===d||J.$$typeof===D||J.$$typeof===E||J.$$typeof===g)}function w(J){if(typeof J=="object"&&J!==null){var de=J.$$typeof;switch(de){case e:var fe=J.type;switch(fe){case u:case l:case n:case s:case i:case p:return fe;default:var ce=fe&&fe.$$typeof;switch(ce){case o:case f:case v:case y:case a:return ce;default:return de}}case r:return de}}}var b=u,x=l,A=o,U=a,P=e,H=f,j=n,M=v,W=y,_=r,z=s,Y=i,V=p,Q=!1;function ie(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)||w(J)===u}function k(J){return w(J)===l}function G(J){return w(J)===o}function $(J){return w(J)===a}function R(J){return typeof J=="object"&&J!==null&&J.$$typeof===e}function re(J){return w(J)===f}function F(J){return w(J)===n}function O(J){return w(J)===v}function N(J){return w(J)===y}function T(J){return w(J)===r}function I(J){return w(J)===s}function Z(J){return w(J)===i}function ee(J){return w(J)===p}Pe.AsyncMode=b,Pe.ConcurrentMode=x,Pe.ContextConsumer=A,Pe.ContextProvider=U,Pe.Element=P,Pe.ForwardRef=H,Pe.Fragment=j,Pe.Lazy=M,Pe.Memo=W,Pe.Portal=_,Pe.Profiler=z,Pe.StrictMode=Y,Pe.Suspense=V,Pe.isAsyncMode=ie,Pe.isConcurrentMode=k,Pe.isContextConsumer=G,Pe.isContextProvider=$,Pe.isElement=R,Pe.isForwardRef=re,Pe.isFragment=F,Pe.isLazy=O,Pe.isMemo=N,Pe.isPortal=T,Pe.isProfiler=I,Pe.isStrictMode=Z,Pe.isSuspense=ee,Pe.isValidElementType=B,Pe.typeOf=w}()),Pe}var Ic;function Nc(){return Ic||(Ic=1,process.env.NODE_ENV==="production"?Bi.exports=OD():Bi.exports=xD()),Bi.exports}/*
65
+ */var jc;function xD(){return jc||(jc=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,y=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function B(J){return typeof J=="string"||typeof J=="function"||J===n||J===l||J===s||J===i||J===p||J===h||typeof J=="object"&&J!==null&&(J.$$typeof===v||J.$$typeof===y||J.$$typeof===a||J.$$typeof===o||J.$$typeof===f||J.$$typeof===d||J.$$typeof===D||J.$$typeof===E||J.$$typeof===g)}function w(J){if(typeof J=="object"&&J!==null){var de=J.$$typeof;switch(de){case e:var fe=J.type;switch(fe){case u:case l:case n:case s:case i:case p:return fe;default:var ce=fe&&fe.$$typeof;switch(ce){case o:case f:case v:case y:case a:return ce;default:return de}}case r:return de}}}var b=u,x=l,S=o,U=a,P=e,H=f,j=n,M=v,N=y,z=r,W=s,X=i,R=p,ne=!1;function Q(J){return ne||(ne=!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)||w(J)===u}function k(J){return w(J)===l}function G(J){return w(J)===o}function $(J){return w(J)===a}function V(J){return typeof J=="object"&&J!==null&&J.$$typeof===e}function re(J){return w(J)===f}function F(J){return w(J)===n}function O(J){return w(J)===v}function _(J){return w(J)===y}function T(J){return w(J)===r}function I(J){return w(J)===s}function Z(J){return w(J)===i}function ee(J){return w(J)===p}Pe.AsyncMode=b,Pe.ConcurrentMode=x,Pe.ContextConsumer=S,Pe.ContextProvider=U,Pe.Element=P,Pe.ForwardRef=H,Pe.Fragment=j,Pe.Lazy=M,Pe.Memo=N,Pe.Portal=z,Pe.Profiler=W,Pe.StrictMode=X,Pe.Suspense=R,Pe.isAsyncMode=Q,Pe.isConcurrentMode=k,Pe.isContextConsumer=G,Pe.isContextProvider=$,Pe.isElement=V,Pe.isForwardRef=re,Pe.isFragment=F,Pe.isLazy=O,Pe.isMemo=_,Pe.isPortal=T,Pe.isProfiler=I,Pe.isStrictMode=Z,Pe.isSuspense=ee,Pe.isValidElementType=B,Pe.typeOf=w}()),Pe}var Ic;function Nc(){return Ic||(Ic=1,process.env.NODE_ENV==="production"?Bi.exports=OD():Bi.exports=xD()),Bi.exports}/*
66
66
  object-assign
67
67
  (c) Sindre Sorhus
68
68
  @license MIT
69
- */var xa,_c;function BD(){if(_c)return xa;_c=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},o=0;o<10;o++)a["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(a).map(function(f){return a[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 xa=i()?Object.assign:function(s,a){for(var o,u=n(s),l,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var p in o)e.call(o,p)&&(u[p]=o[p]);if(t){l=t(o);for(var h=0;h<l.length;h++)r.call(o,l[h])&&(u[l[h]]=o[l[h]])}}return u},xa}var Ba,zc;function Sa(){if(zc)return Ba;zc=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ba=t,Ba}var Aa,Wc;function Hc(){return Wc||(Wc=1,Aa=Function.call.bind(Object.prototype.hasOwnProperty)),Aa}var La,Uc;function SD(){if(Uc)return La;Uc=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Sa(),r={},n=Hc();t=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,o,u,l){if(process.env.NODE_ENV!=="production"){for(var f in s)if(n(s,f)){var p;try{if(typeof s[f]!="function"){var h=Error((u||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=s[f](a,f,u,o,null,e)}catch(v){p=v}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=l?l():"";t("Failed "+o+" type: "+p.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},La=i,La}var Pa,Rc;function AD(){if(Rc)return Pa;Rc=1;var t=Nc(),e=BD(),r=Sa(),n=Hc(),i=SD(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Pa=function(o,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(k){var G=k&&(l&&k[l]||k[f]);if(typeof G=="function")return G}var h="<<anonymous>>",y={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:E(),arrayOf:B,element:w(),elementType:b(),instanceOf:x,node:H(),objectOf:U,oneOf:A,oneOfType:P,shape:M,exact:W};function v(k,G){return k===G?k!==0||1/k===1/G:k!==k&&G!==G}function g(k,G){this.message=k,this.data=G&&typeof G=="object"?G:{},this.stack=""}g.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var G={},$=0;function R(F,O,N,T,I,Z,ee){if(T=T||h,Z=Z||N,ee!==r){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 de=T+":"+N;!G[de]&&$<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+T+"`. 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."),G[de]=!0,$++)}}return O[N]==null?F?O[N]===null?new g("The "+I+" `"+Z+"` is marked as required "+("in `"+T+"`, but its value is `null`.")):new g("The "+I+" `"+Z+"` is marked as required in "+("`"+T+"`, but its value is `undefined`.")):null:k(O,N,T,I,Z)}var re=R.bind(null,!1);return re.isRequired=R.bind(null,!0),re}function D(k){function G($,R,re,F,O,N){var T=$[R],I=Y(T);if(I!==k){var Z=V(T);return new g("Invalid "+F+" `"+O+"` of type "+("`"+Z+"` supplied to `"+re+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(G)}function E(){return d(a)}function B(k){function G($,R,re,F,O){if(typeof k!="function")return new g("Property `"+O+"` of component `"+re+"` has invalid PropType notation inside arrayOf.");var N=$[R];if(!Array.isArray(N)){var T=Y(N);return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected an array."))}for(var I=0;I<N.length;I++){var Z=k(N,I,re,F,O+"["+I+"]",r);if(Z instanceof Error)return Z}return null}return d(G)}function w(){function k(G,$,R,re,F){var O=G[$];if(!o(O)){var N=Y(O);return new g("Invalid "+re+" `"+F+"` of type "+("`"+N+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(G,$,R,re,F){var O=G[$];if(!t.isValidElementType(O)){var N=Y(O);return new g("Invalid "+re+" `"+F+"` of type "+("`"+N+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return d(k)}function x(k){function G($,R,re,F,O){if(!($[R]instanceof k)){var N=k.name||h,T=ie($[R]);return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected ")+("instance of `"+N+"`."))}return null}return d(G)}function A(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function G($,R,re,F,O){for(var N=$[R],T=0;T<k.length;T++)if(v(N,k[T]))return null;var I=JSON.stringify(k,function(ee,J){var de=V(J);return de==="symbol"?String(J):J});return new g("Invalid "+F+" `"+O+"` of value `"+String(N)+"` "+("supplied to `"+re+"`, expected one of "+I+"."))}return d(G)}function U(k){function G($,R,re,F,O){if(typeof k!="function")return new g("Property `"+O+"` of component `"+re+"` has invalid PropType notation inside objectOf.");var N=$[R],T=Y(N);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected an object."));for(var I in N)if(n(N,I)){var Z=k(N,I,re,F,O+"."+I,r);if(Z instanceof Error)return Z}return null}return d(G)}function P(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var G=0;G<k.length;G++){var $=k[G];if(typeof $!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Q($)+" at index "+G+"."),a}function R(re,F,O,N,T){for(var I=[],Z=0;Z<k.length;Z++){var ee=k[Z],J=ee(re,F,O,N,T,r);if(J==null)return null;J.data&&n(J.data,"expectedType")&&I.push(J.data.expectedType)}var de=I.length>0?", expected one of type ["+I.join(", ")+"]":"";return new g("Invalid "+N+" `"+T+"` supplied to "+("`"+O+"`"+de+"."))}return d(R)}function H(){function k(G,$,R,re,F){return _(G[$])?null:new g("Invalid "+re+" `"+F+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return d(k)}function j(k,G,$,R,re){return new g((k||"React class")+": "+G+" type `"+$+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function M(k){function G($,R,re,F,O){var N=$[R],T=Y(N);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type `"+T+"` "+("supplied to `"+re+"`, expected `object`."));for(var I in k){var Z=k[I];if(typeof Z!="function")return j(re,F,O,I,V(Z));var ee=Z(N,I,re,F,O+"."+I,r);if(ee)return ee}return null}return d(G)}function W(k){function G($,R,re,F,O){var N=$[R],T=Y(N);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type `"+T+"` "+("supplied to `"+re+"`, expected `object`."));var I=e({},$[R],k);for(var Z in I){var ee=k[Z];if(n(k,Z)&&typeof ee!="function")return j(re,F,O,Z,V(ee));if(!ee)return new g("Invalid "+F+" `"+O+"` key `"+Z+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify($[R],null," ")+`
70
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var J=ee(N,Z,re,F,O+"."+Z,r);if(J)return J}return null}return d(G)}function _(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(_);if(k===null||o(k))return!0;var G=p(k);if(G){var $=G.call(k),R;if(G!==k.entries){for(;!(R=$.next()).done;)if(!_(R.value))return!1}else for(;!(R=$.next()).done;){var re=R.value;if(re&&!_(re[1]))return!1}}else return!1;return!0;default:return!1}}function z(k,G){return k==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function Y(k){var G=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":z(G,k)?"symbol":G}function V(k){if(typeof k>"u"||k===null)return""+k;var G=Y(k);if(G==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return G}function Q(k){var G=V(k);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function ie(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Pa}var Fa,Vc;function LD(){if(Vc)return Fa;Vc=1;var t=Sa();function e(){}function r(){}return r.resetWarningCache=e,Fa=function(){function n(a,o,u,l,f,p){if(p!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},Fa}if(process.env.NODE_ENV!=="production"){var PD=Nc(),FD=!0;Oa.exports=AD()(PD.isElement,FD)}else Oa.exports=LD()();var Si=Oa.exports,Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});var TD=mn,Ta=MD(TD);function MD(t){return t&&t.__esModule?t:{default:t}}var kD={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,r){this.containers[e]=r},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,r=this.getHash();r?window.setTimeout(function(){e.scrollTo(r,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,r){var n=this.scroller,i=n.get(e);if(i&&(r||e!==n.getActiveLink())){var s=this.containers[e]||document;n.scrollTo(e,{container:s})}},getHash:function(){return Ta.default.getHash()},changeHash:function(e,r){this.isInitialized()&&Ta.default.getHash()!==e&&Ta.default.updateHash(e,r)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Ai.default=kD,Object.defineProperty(hn,"__esModule",{value:!0});var Li=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jD=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),ID=c,qc=bn(ID),ND=vn,Pi=bn(ND),_D=Nr,zD=bn(_D),WD=Si,ze=bn(WD),HD=Ai,$t=bn(HD);function bn(t){return t&&t.__esModule?t:{default:t}}function UD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RD(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 VD(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 Gc={to:ze.default.string.isRequired,containerId:ze.default.string,container:ze.default.object,activeClass:ze.default.string,activeStyle:ze.default.object,spy:ze.default.bool,horizontal:ze.default.bool,smooth:ze.default.oneOfType([ze.default.bool,ze.default.string]),offset:ze.default.number,delay:ze.default.number,isDynamic:ze.default.bool,onClick:ze.default.func,duration:ze.default.oneOfType([ze.default.number,ze.default.func]),absolute:ze.default.bool,onSetActive:ze.default.func,onSetInactive:ze.default.func,ignoreCancelEvents:ze.default.bool,hashSpy:ze.default.bool,saveHashHistory:ze.default.bool,spyThrottle:ze.default.number};hn.default=function(t,e){var r=e||zD.default,n=function(s){VD(a,s);function a(o){UD(this,a);var u=RD(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,o));return i.call(u),u.state={active:!1},u}return jD(a,[{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&&($t.default.isMounted()||$t.default.mount(r),$t.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=Li({},this.props.style,this.props.activeStyle):l=Li({},this.props.style);var f=Li({},this.props);for(var p in Gc)f.hasOwnProperty(p)&&delete f[p];return f.className=u,f.style=l,f.onClick=this.handleClick,qc.default.createElement(t,f)}}]),a}(qc.default.PureComponent),i=function(){var a=this;this.scrollTo=function(o,u){r.scrollTo(o,Li({},a.state,u))},this.handleClick=function(o){a.props.onClick&&a.props.onClick(o),o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault(),a.scrollTo(a.props.to,a.props)},this.spyHandler=function(o,u){var l=a.getScrollSpyContainer();if(!($t.default.isMounted()&&!$t.default.isInitialized())){var f=a.props.horizontal,p=a.props.to,h=null,y=void 0,v=void 0;if(f){var g=0,d=0,D=0;if(l.getBoundingClientRect){var E=l.getBoundingClientRect();D=E.left}if(!h||a.props.isDynamic){if(h=r.get(p),!h)return;var B=h.getBoundingClientRect();g=B.left-D+o,d=g+B.width}var w=o-a.props.offset;y=w>=Math.floor(g)&&w<Math.floor(d),v=w<Math.floor(g)||w>=Math.floor(d)}else{var b=0,x=0,A=0;if(l.getBoundingClientRect){var U=l.getBoundingClientRect();A=U.top}if(!h||a.props.isDynamic){if(h=r.get(p),!h)return;var P=h.getBoundingClientRect();b=P.top-A+u,x=b+P.height}var H=u-a.props.offset;y=H>=Math.floor(b)&&H<Math.floor(x),v=H<Math.floor(b)||H>=Math.floor(x)}var j=r.getActiveLink();if(v){if(p===j&&r.setActiveLink(void 0),a.props.hashSpy&&$t.default.getHash()===p){var M=a.props.saveHashHistory,W=M===void 0?!1:M;$t.default.changeHash("",W)}a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive(p,h))}if(y&&(j!==p||a.state.active===!1)){r.setActiveLink(p);var _=a.props.saveHashHistory,z=_===void 0?!1:_;a.props.hashSpy&&$t.default.changeHash(p,z),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(p,h))}}}};return n.propTypes=Gc,n.defaultProps={offset:0},n},Object.defineProperty(va,"__esModule",{value:!0});var qD=c,Zc=Kc(qD),GD=hn,ZD=Kc(GD);function Kc(t){return t&&t.__esModule?t:{default:t}}function KD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yc(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 YD(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 XD=function(t){YD(e,t);function e(){var r,n,i,s;KD(this,e);for(var a=arguments.length,o=Array(a),u=0;u<a;u++)o[u]=arguments[u];return s=(n=(i=Yc(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(o))),i),i.render=function(){return Zc.default.createElement("a",i.props,i.props.children)},n),Yc(i,s)}return e}(Zc.default.Component);va.default=(0,ZD.default)(XD);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var $D=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),JD=c,Xc=$c(JD),QD=hn,eE=$c(QD);function $c(t){return t&&t.__esModule?t:{default:t}}function tE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rE(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 nE(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 iE=function(t){nE(e,t);function e(){return tE(this,e),rE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return $D(e,[{key:"render",value:function(){return Xc.default.createElement("button",this.props,this.props.children)}}]),e}(Xc.default.Component);Ma.default=(0,eE.default)(iE);var ka={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var sE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},aE=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),oE=c,Jc=Ti(oE),uE=or;Ti(uE);var lE=Nr,Qc=Ti(lE),cE=Si,ef=Ti(cE);function Ti(t){return t&&t.__esModule?t:{default:t}}function fE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dE(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 pE(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(r){pE(n,r);function n(i){fE(this,n);var s=dE(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i));return s.childBindings={domNode:null},s}return aE(n,[{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;Qc.default.unregister(this.props.name)}},{key:"registerElems",value:function(s){Qc.default.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return Jc.default.createElement(t,sE({},this.props,{parentBindings:this.childBindings}))}}]),n}(Jc.default.Component);return e.propTypes={name:ef.default.string,id:ef.default.string},e},Object.defineProperty(ka,"__esModule",{value:!0});var tf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hE=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),vE=c,rf=ja(vE),gE=Fi,mE=ja(gE),yE=Si,nf=ja(yE);function ja(t){return t&&t.__esModule?t:{default:t}}function CE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bE(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 DE(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 sf=function(t){DE(e,t);function e(){return CE(this,e),bE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return hE(e,[{key:"render",value:function(){var n=this,i=tf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,rf.default.createElement("div",tf({},i,{ref:function(a){n.props.parentBindings.domNode=a}}),this.props.children)}}]),e}(rf.default.Component);sf.propTypes={name:nf.default.string,id:nf.default.string},ka.default=(0,mE.default)(sf);var Ia=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},af=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function of(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uf(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 lf(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 Mi=c,Dr=vn,Na=Nr,Ue=Si,Jt=Ai,cf={to:Ue.string.isRequired,containerId:Ue.string,container:Ue.object,activeClass:Ue.string,spy:Ue.bool,smooth:Ue.oneOfType([Ue.bool,Ue.string]),offset:Ue.number,delay:Ue.number,isDynamic:Ue.bool,onClick:Ue.func,duration:Ue.oneOfType([Ue.number,Ue.func]),absolute:Ue.bool,onSetActive:Ue.func,onSetInactive:Ue.func,ignoreCancelEvents:Ue.bool,hashSpy:Ue.bool,spyThrottle:Ue.number},EE={Scroll:function(e,r){console.warn("Helpers.Scroll is deprecated since v1.7.0");var n=r||Na,i=function(a){lf(o,a);function o(u){of(this,o);var l=uf(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,u));return s.call(l),l.state={active:!1},l}return af(o,[{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();Dr.isMounted(l)||Dr.mount(l,this.props.spyThrottle),this.props.hashSpy&&(Jt.isMounted()||Jt.mount(n),Jt.mapContainer(this.props.to,l)),this.props.spy&&Dr.addStateHandler(this.stateHandler),Dr.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Dr.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=Ia({},this.props);for(var p in cf)f.hasOwnProperty(p)&&delete f[p];return f.className=l,f.onClick=this.handleClick,Mi.createElement(e,f)}}]),o}(Mi.Component),s=function(){var o=this;this.scrollTo=function(u,l){n.scrollTo(u,Ia({},o.state,l))},this.handleClick=function(u){o.props.onClick&&o.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),o.scrollTo(o.props.to,o.props)},this.stateHandler=function(){n.getActiveLink()!==o.props.to&&(o.state!==null&&o.state.active&&o.props.onSetInactive&&o.props.onSetInactive(),o.setState({active:!1}))},this.spyHandler=function(u){var l=o.getScrollSpyContainer();if(!(Jt.isMounted()&&!Jt.isInitialized())){var f=o.props.to,p=null,h=0,y=0,v=0;if(l.getBoundingClientRect){var g=l.getBoundingClientRect();v=g.top}if(!p||o.props.isDynamic){if(p=n.get(f),!p)return;var d=p.getBoundingClientRect();h=d.top-v+u,y=h+d.height}var D=u-o.props.offset,E=D>=Math.floor(h)&&D<Math.floor(y),B=D<Math.floor(h)||D>=Math.floor(y),w=n.getActiveLink();if(B)return f===w&&n.setActiveLink(void 0),o.props.hashSpy&&Jt.getHash()===f&&Jt.changeHash(),o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive()),Dr.updateStates();if(E&&w!==f)return n.setActiveLink(f),o.props.hashSpy&&Jt.changeHash(f),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(f)),Dr.updateStates()}}};return i.propTypes=cf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var r=function(n){lf(i,n);function i(s){of(this,i);var a=uf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s));return a.childBindings={domNode:null},a}return af(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Na.unregister(this.props.name)}},{key:"registerElems",value:function(a){Na.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return Mi.createElement(e,Ia({},this.props,{parentBindings:this.childBindings}))}}]),i}(Mi.Component);return r.propTypes={name:Ue.string,id:Ue.string},r}},wE=EE;Object.defineProperty(Re,"__esModule",{value:!0}),Re.Helpers=Re.ScrollElement=Re.ScrollLink=Df=Re.animateScroll=Re.scrollSpy=Re.Events=Re.scroller=Re.Element=Re.Button=Re.Link=void 0;var OE=va,ff=Tt(OE),xE=Ma,df=Tt(xE),BE=ka,pf=Tt(BE),SE=Nr,hf=Tt(SE),AE=yn,vf=Tt(AE),LE=vn,gf=Tt(LE),PE=Di,mf=Tt(PE),FE=hn,yf=Tt(FE),TE=Fi,Cf=Tt(TE),ME=wE,bf=Tt(ME);function Tt(t){return t&&t.__esModule?t:{default:t}}Re.Link=ff.default,Re.Button=df.default,Re.Element=pf.default,Re.scroller=hf.default,Re.Events=vf.default,Re.scrollSpy=gf.default;var Df=Re.animateScroll=mf.default;Re.ScrollLink=yf.default,Re.ScrollElement=Cf.default,Re.Helpers=bf.default,Re.default={Link:ff.default,Button:df.default,Element:pf.default,scroller:hf.default,Events:vf.default,scrollSpy:gf.default,animateScroll:mf.default,ScrollLink:yf.default,ScrollElement:Cf.default,Helpers:bf.default};const _a=c.createContext({}),Ef=c.createContext({});function wf(){const t=c.useContext(Ef);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function Of(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 kE(){const t=At.useActionData(),{closeModal:e,closeAll:r}=c.useContext(_a),{showToast:n}=wf(),{getParam:i}=ha(),{pathname:s}=At.useLocation(),a=At.useNavigate(),o=i("closeAllModals");c.useEffect(()=>{o==="true"&&(r(),a(s))},[o]),c.useEffect(()=>{const u=t==null?void 0:t.closeModalKey;u&&e(u)},[t]),c.useEffect(()=>{const u=t==null?void 0:t.closeAllModals;typeof u=="boolean"&&u&&r()},[t]),c.useEffect(()=>{const u=t==null?void 0:t.toast,l=t==null?void 0:t.message;Of(u)&&n(u),!Of(u)&&l&&n({message:l,type:"danger"})},[t]),c.useEffect(()=>{var u,l;if(typeof((u=t==null?void 0:t.data)==null?void 0:u.scrollTo)=="string"){const f=document.getElementById((l=t==null?void 0:t.data)==null?void 0:l.scrollTo);f&&Df.scrollTo(f.offsetTop-200)}},[t])}const xf=c.createContext({});function jE(t){const e=c.useContext(xf);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:r,drawerIsOpen:n,openDrawer:i,closeDrawer:s}=e,a=n(t),o=r(t);return{drawerIsOpen:a,drawerData:o,openDrawer:f=>i(t,f),closeDrawer:()=>s(t)}}else return e}function IE(){return()=>{}}function Bf(){return c.useSyncExternalStore(IE,()=>!0,()=>!1)}function NE(t){const e=c.useContext(_a);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:r,modalIsOpen:n,openModal:i,closeModal:s}=e,a=n(t),o=r(t);return{modalIsOpen:a,modalData:o,openModal:f=>i(t,f),closeModal:()=>s(t)}}else return e}function _E(t){const{children:e=!1}=t,[r,n]=c.useState([]);function i(u){return!!r.some(l=>l.key===u)}function s(u){var l;return(l=r.find(f=>f.key===u))==null?void 0:l.data}function a(u,l){const f=i(u);n(f?p=>[...p.filter(y=>y.key!==u),{key:u,data:l}]:[...r,{key:u,data:l}])}function o(u){n(r.filter(l=>l.key!==u))}return C.jsx(xf.Provider,{value:{drawerIsOpen:i,drawerData:s,openDrawer:a,closeDrawer:o},children:e})}function Dn(t){"@babel/helpers - typeof";return Dn=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},Dn(t)}function zE(t,e){if(Dn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WE(t){var e=zE(t,"string");return Dn(e)=="symbol"?e:e+""}function K(t,e,r){return(e=WE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var za,Af;function HE(){if(Af)return za;Af=1;var t=process.env.NODE_ENV,e=function(n,i,s,a,o,u,l,f){if(t!=="production"&&i===void 0)throw new Error("invariant requires an error message argument");if(!n){var p;if(i===void 0)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[s,a,o,u,l,f],y=0;p=new Error(i.replace(/%s/g,function(){return h[y++]})),p.name="Invariant Violation"}throw p.framesToPop=1,p}};return za=e,za}var UE=HE(),Ze=Sf(UE),me=c.createContext(null);function RE(){Ze(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(me);return Ze(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function VE(t,e,r){return Object.keys(t).reduce(function(i,s){return e(i,t[s],s)},r)}function qE(t,e){Object.keys(t).forEach(r=>e(t[r],r))}function GE(t,e,r,n){var i={},s=(a,o)=>{var u=r[o];u!==e[o]&&(i[o]=u,a(n,u))};return qE(t,s),i}function ZE(t,e,r){var n=VE(r,function(s,a,o){return typeof t[o]=="function"&&s.push(google.maps.event.addListener(e,a,t[o])),s},[]);return n}function KE(t){google.maps.event.removeListener(t)}function De(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];t.forEach(KE)}function Ce(t){var{updaterMap:e,eventMap:r,prevProps:n,nextProps:i,instance:s}=t,a=ZE(i,s,r);return GE(e,n,i,s),a}var Lf={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"},Pf={extraMapTypes(t,e){e.forEach(function(n,i){t.mapTypes.set(String(i),n)})},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};function YE(t){var{children:e,options:r,id:n,mapContainerStyle:i,mapContainerClassName:s,center:a,onClick:o,onDblClick:u,onDrag:l,onDragEnd:f,onDragStart:p,onMouseMove:h,onMouseOut:y,onMouseOver:v,onMouseDown:g,onMouseUp:d,onRightClick:D,onCenterChanged:E,onLoad:B,onUnmount:w}=t,[b,x]=c.useState(null),A=c.useRef(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,W]=c.useState(null),[_,z]=c.useState(null),[Y,V]=c.useState(null),[Q,ie]=c.useState(null),[k,G]=c.useState(null),[$,R]=c.useState(null),[re,F]=c.useState(null),[O,N]=c.useState(null),[T,I]=c.useState(null),[Z,ee]=c.useState(null);return c.useEffect(()=>{r&&b!==null&&b.setOptions(r)},[b,r]),c.useEffect(()=>{b!==null&&typeof a<"u"&&b.setCenter(a)},[b,a]),c.useEffect(()=>{b&&u&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(b,"dblclick",u)))},[u]),c.useEffect(()=>{b&&f&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(b,"dragend",f)))},[f]),c.useEffect(()=>{b&&p&&(_!==null&&google.maps.event.removeListener(_),z(google.maps.event.addListener(b,"dragstart",p)))},[p]),c.useEffect(()=>{b&&g&&(Y!==null&&google.maps.event.removeListener(Y),V(google.maps.event.addListener(b,"mousedown",g)))},[g]),c.useEffect(()=>{b&&h&&(Q!==null&&google.maps.event.removeListener(Q),ie(google.maps.event.addListener(b,"mousemove",h)))},[h]),c.useEffect(()=>{b&&y&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(b,"mouseout",y)))},[y]),c.useEffect(()=>{b&&v&&($!==null&&google.maps.event.removeListener($),R(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(()=>{b&&d&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(b,"mouseup",d)))},[d]),c.useEffect(()=>{b&&D&&(O!==null&&google.maps.event.removeListener(O),N(google.maps.event.addListener(b,"rightclick",D)))},[D]),c.useEffect(()=>{b&&o&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(b,"click",o)))},[o]),c.useEffect(()=>{b&&l&&(Z!==null&&google.maps.event.removeListener(Z),ee(google.maps.event.addListener(b,"drag",l)))},[l]),c.useEffect(()=>{b&&E&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(b,"center_changed",E)))},[o]),c.useEffect(()=>{var J=A.current===null?null:new google.maps.Map(A.current,r);return x(J),J!==null&&B&&B(J),()=>{J!==null&&w&&w(J)}},[]),C.jsx("div",{id:n,ref:A,style:i,className:s,children:C.jsx(me.Provider,{value:b,children:b!==null?e:null})})}c.memo(YE);let XE=class extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{map:null}),K(this,"registeredEvents",[]),K(this,"mapRef",null),K(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),K(this,"panTo",e=>{var r=this.getInstance();r&&r.panTo(e)}),K(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),K(this,"getRef",e=>{this.mapRef=e})}componentDidMount(){var e=this.getInstance();this.registeredEvents=Ce({updaterMap:Pf,eventMap:Lf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)}componentDidUpdate(e){this.state.map!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Pf,eventMap:Lf,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),De(this.registeredEvents))}render(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(me.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}};function Ff(t,e,r,n,i,s,a){try{var o=t[s](a),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(n,i)}function Tf(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(u){Ff(s,n,i,a,o,"next",u)}function o(u){Ff(s,n,i,a,o,"throw",u)}a(void 0)})}}function Mf(t){var{googleMapsApiKey:e,googleMapsClientId:r,version:n="weekly",language:i,region:s,libraries:a,channel:o,mapIds:u,authReferrerPolicy:l}=t,f=[];return Ze(e&&r||!(e&&r),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?f.push("key=".concat(e)):r&&f.push("client=".concat(r)),n&&f.push("v=".concat(n)),i&&f.push("language=".concat(i)),s&&f.push("region=".concat(s)),a&&a.length&&f.push("libraries=".concat(a.sort().join(","))),o&&f.push("channel=".concat(o)),u&&u.length&&f.push("map_ids=".concat(u.join(","))),l&&f.push("auth_referrer_policy=".concat(l)),f.push("loading=async"),f.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(f.join("&"))}var Er=typeof document<"u";function kf(t){var{url:e,id:r,nonce:n}=t;return Er?new Promise(function(s,a){var o=document.getElementById(r),u=window;if(o){var l=o.getAttribute("data-state");if(o.src===e&&l!=="error"){if(l==="ready")return s(r);var f=u.initMap,p=o.onerror;u.initMap=function(){f&&f(),s(r)},o.onerror=function(y){p&&p(y),a(y)};return}else o.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=e,h.id=r,h.async=!0,h.nonce=n||"",h.onerror=function(v){h.setAttribute("data-state","error"),a(v)},u.initMap=function(){h.setAttribute("data-state","ready"),s(r)},document.head.appendChild(h)}).catch(i=>{throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function jf(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
69
+ */var xa,_c;function BD(){if(_c)return xa;_c=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},o=0;o<10;o++)a["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(a).map(function(f){return a[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 xa=i()?Object.assign:function(s,a){for(var o,u=n(s),l,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var p in o)e.call(o,p)&&(u[p]=o[p]);if(t){l=t(o);for(var h=0;h<l.length;h++)r.call(o,l[h])&&(u[l[h]]=o[l[h]])}}return u},xa}var Ba,zc;function Sa(){if(zc)return Ba;zc=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ba=t,Ba}var Aa,Wc;function Hc(){return Wc||(Wc=1,Aa=Function.call.bind(Object.prototype.hasOwnProperty)),Aa}var La,Uc;function SD(){if(Uc)return La;Uc=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Sa(),r={},n=Hc();t=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,o,u,l){if(process.env.NODE_ENV!=="production"){for(var f in s)if(n(s,f)){var p;try{if(typeof s[f]!="function"){var h=Error((u||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=s[f](a,f,u,o,null,e)}catch(v){p=v}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=l?l():"";t("Failed "+o+" type: "+p.message+(y??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},La=i,La}var Pa,Rc;function AD(){if(Rc)return Pa;Rc=1;var t=Nc(),e=BD(),r=Sa(),n=Hc(),i=SD(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return Pa=function(o,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function p(k){var G=k&&(l&&k[l]||k[f]);if(typeof G=="function")return G}var h="<<anonymous>>",y={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:E(),arrayOf:B,element:w(),elementType:b(),instanceOf:x,node:H(),objectOf:U,oneOf:S,oneOfType:P,shape:M,exact:N};function v(k,G){return k===G?k!==0||1/k===1/G:k!==k&&G!==G}function g(k,G){this.message=k,this.data=G&&typeof G=="object"?G:{},this.stack=""}g.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var G={},$=0;function V(F,O,_,T,I,Z,ee){if(T=T||h,Z=Z||_,ee!==r){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 de=T+":"+_;!G[de]&&$<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+T+"`. 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."),G[de]=!0,$++)}}return O[_]==null?F?O[_]===null?new g("The "+I+" `"+Z+"` is marked as required "+("in `"+T+"`, but its value is `null`.")):new g("The "+I+" `"+Z+"` is marked as required in "+("`"+T+"`, but its value is `undefined`.")):null:k(O,_,T,I,Z)}var re=V.bind(null,!1);return re.isRequired=V.bind(null,!0),re}function D(k){function G($,V,re,F,O,_){var T=$[V],I=X(T);if(I!==k){var Z=R(T);return new g("Invalid "+F+" `"+O+"` of type "+("`"+Z+"` supplied to `"+re+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(G)}function E(){return d(a)}function B(k){function G($,V,re,F,O){if(typeof k!="function")return new g("Property `"+O+"` of component `"+re+"` has invalid PropType notation inside arrayOf.");var _=$[V];if(!Array.isArray(_)){var T=X(_);return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected an array."))}for(var I=0;I<_.length;I++){var Z=k(_,I,re,F,O+"["+I+"]",r);if(Z instanceof Error)return Z}return null}return d(G)}function w(){function k(G,$,V,re,F){var O=G[$];if(!o(O)){var _=X(O);return new g("Invalid "+re+" `"+F+"` of type "+("`"+_+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(G,$,V,re,F){var O=G[$];if(!t.isValidElementType(O)){var _=X(O);return new g("Invalid "+re+" `"+F+"` of type "+("`"+_+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return d(k)}function x(k){function G($,V,re,F,O){if(!($[V]instanceof k)){var _=k.name||h,T=Q($[V]);return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected ")+("instance of `"+_+"`."))}return null}return d(G)}function S(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function G($,V,re,F,O){for(var _=$[V],T=0;T<k.length;T++)if(v(_,k[T]))return null;var I=JSON.stringify(k,function(ee,J){var de=R(J);return de==="symbol"?String(J):J});return new g("Invalid "+F+" `"+O+"` of value `"+String(_)+"` "+("supplied to `"+re+"`, expected one of "+I+"."))}return d(G)}function U(k){function G($,V,re,F,O){if(typeof k!="function")return new g("Property `"+O+"` of component `"+re+"` has invalid PropType notation inside objectOf.");var _=$[V],T=X(_);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type "+("`"+T+"` supplied to `"+re+"`, expected an object."));for(var I in _)if(n(_,I)){var Z=k(_,I,re,F,O+"."+I,r);if(Z instanceof Error)return Z}return null}return d(G)}function P(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var G=0;G<k.length;G++){var $=k[G];if(typeof $!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ne($)+" at index "+G+"."),a}function V(re,F,O,_,T){for(var I=[],Z=0;Z<k.length;Z++){var ee=k[Z],J=ee(re,F,O,_,T,r);if(J==null)return null;J.data&&n(J.data,"expectedType")&&I.push(J.data.expectedType)}var de=I.length>0?", expected one of type ["+I.join(", ")+"]":"";return new g("Invalid "+_+" `"+T+"` supplied to "+("`"+O+"`"+de+"."))}return d(V)}function H(){function k(G,$,V,re,F){return z(G[$])?null:new g("Invalid "+re+" `"+F+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return d(k)}function j(k,G,$,V,re){return new g((k||"React class")+": "+G+" type `"+$+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function M(k){function G($,V,re,F,O){var _=$[V],T=X(_);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type `"+T+"` "+("supplied to `"+re+"`, expected `object`."));for(var I in k){var Z=k[I];if(typeof Z!="function")return j(re,F,O,I,R(Z));var ee=Z(_,I,re,F,O+"."+I,r);if(ee)return ee}return null}return d(G)}function N(k){function G($,V,re,F,O){var _=$[V],T=X(_);if(T!=="object")return new g("Invalid "+F+" `"+O+"` of type `"+T+"` "+("supplied to `"+re+"`, expected `object`."));var I=e({},$[V],k);for(var Z in I){var ee=k[Z];if(n(k,Z)&&typeof ee!="function")return j(re,F,O,Z,R(ee));if(!ee)return new g("Invalid "+F+" `"+O+"` key `"+Z+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify($[V],null," ")+`
70
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var J=ee(_,Z,re,F,O+"."+Z,r);if(J)return J}return null}return d(G)}function z(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(z);if(k===null||o(k))return!0;var G=p(k);if(G){var $=G.call(k),V;if(G!==k.entries){for(;!(V=$.next()).done;)if(!z(V.value))return!1}else for(;!(V=$.next()).done;){var re=V.value;if(re&&!z(re[1]))return!1}}else return!1;return!0;default:return!1}}function W(k,G){return k==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function X(k){var G=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":W(G,k)?"symbol":G}function R(k){if(typeof k>"u"||k===null)return""+k;var G=X(k);if(G==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return G}function ne(k){var G=R(k);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Q(k){return!k.constructor||!k.constructor.name?h:k.constructor.name}return y.checkPropTypes=i,y.resetWarningCache=i.resetWarningCache,y.PropTypes=y,y},Pa}var Fa,Vc;function LD(){if(Vc)return Fa;Vc=1;var t=Sa();function e(){}function r(){}return r.resetWarningCache=e,Fa=function(){function n(a,o,u,l,f,p){if(p!==t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},Fa}if(process.env.NODE_ENV!=="production"){var PD=Nc(),FD=!0;Oa.exports=AD()(PD.isElement,FD)}else Oa.exports=LD()();var Si=Oa.exports,Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});var TD=mn,Ta=MD(TD);function MD(t){return t&&t.__esModule?t:{default:t}}var kD={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,r){this.containers[e]=r},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,r=this.getHash();r?window.setTimeout(function(){e.scrollTo(r,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,r){var n=this.scroller,i=n.get(e);if(i&&(r||e!==n.getActiveLink())){var s=this.containers[e]||document;n.scrollTo(e,{container:s})}},getHash:function(){return Ta.default.getHash()},changeHash:function(e,r){this.isInitialized()&&Ta.default.getHash()!==e&&Ta.default.updateHash(e,r)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Ai.default=kD,Object.defineProperty(hn,"__esModule",{value:!0});var Li=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jD=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),ID=c,qc=bn(ID),ND=vn,Pi=bn(ND),_D=Nr,zD=bn(_D),WD=Si,ze=bn(WD),HD=Ai,$t=bn(HD);function bn(t){return t&&t.__esModule?t:{default:t}}function UD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RD(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 VD(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 Gc={to:ze.default.string.isRequired,containerId:ze.default.string,container:ze.default.object,activeClass:ze.default.string,activeStyle:ze.default.object,spy:ze.default.bool,horizontal:ze.default.bool,smooth:ze.default.oneOfType([ze.default.bool,ze.default.string]),offset:ze.default.number,delay:ze.default.number,isDynamic:ze.default.bool,onClick:ze.default.func,duration:ze.default.oneOfType([ze.default.number,ze.default.func]),absolute:ze.default.bool,onSetActive:ze.default.func,onSetInactive:ze.default.func,ignoreCancelEvents:ze.default.bool,hashSpy:ze.default.bool,saveHashHistory:ze.default.bool,spyThrottle:ze.default.number};hn.default=function(t,e){var r=e||zD.default,n=function(s){VD(a,s);function a(o){UD(this,a);var u=RD(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,o));return i.call(u),u.state={active:!1},u}return jD(a,[{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&&($t.default.isMounted()||$t.default.mount(r),$t.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=Li({},this.props.style,this.props.activeStyle):l=Li({},this.props.style);var f=Li({},this.props);for(var p in Gc)f.hasOwnProperty(p)&&delete f[p];return f.className=u,f.style=l,f.onClick=this.handleClick,qc.default.createElement(t,f)}}]),a}(qc.default.PureComponent),i=function(){var a=this;this.scrollTo=function(o,u){r.scrollTo(o,Li({},a.state,u))},this.handleClick=function(o){a.props.onClick&&a.props.onClick(o),o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault(),a.scrollTo(a.props.to,a.props)},this.spyHandler=function(o,u){var l=a.getScrollSpyContainer();if(!($t.default.isMounted()&&!$t.default.isInitialized())){var f=a.props.horizontal,p=a.props.to,h=null,y=void 0,v=void 0;if(f){var g=0,d=0,D=0;if(l.getBoundingClientRect){var E=l.getBoundingClientRect();D=E.left}if(!h||a.props.isDynamic){if(h=r.get(p),!h)return;var B=h.getBoundingClientRect();g=B.left-D+o,d=g+B.width}var w=o-a.props.offset;y=w>=Math.floor(g)&&w<Math.floor(d),v=w<Math.floor(g)||w>=Math.floor(d)}else{var b=0,x=0,S=0;if(l.getBoundingClientRect){var U=l.getBoundingClientRect();S=U.top}if(!h||a.props.isDynamic){if(h=r.get(p),!h)return;var P=h.getBoundingClientRect();b=P.top-S+u,x=b+P.height}var H=u-a.props.offset;y=H>=Math.floor(b)&&H<Math.floor(x),v=H<Math.floor(b)||H>=Math.floor(x)}var j=r.getActiveLink();if(v){if(p===j&&r.setActiveLink(void 0),a.props.hashSpy&&$t.default.getHash()===p){var M=a.props.saveHashHistory,N=M===void 0?!1:M;$t.default.changeHash("",N)}a.props.spy&&a.state.active&&(a.setState({active:!1}),a.props.onSetInactive&&a.props.onSetInactive(p,h))}if(y&&(j!==p||a.state.active===!1)){r.setActiveLink(p);var z=a.props.saveHashHistory,W=z===void 0?!1:z;a.props.hashSpy&&$t.default.changeHash(p,W),a.props.spy&&(a.setState({active:!0}),a.props.onSetActive&&a.props.onSetActive(p,h))}}}};return n.propTypes=Gc,n.defaultProps={offset:0},n},Object.defineProperty(va,"__esModule",{value:!0});var qD=c,Zc=Kc(qD),GD=hn,ZD=Kc(GD);function Kc(t){return t&&t.__esModule?t:{default:t}}function KD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yc(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 YD(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 XD=function(t){YD(e,t);function e(){var r,n,i,s;KD(this,e);for(var a=arguments.length,o=Array(a),u=0;u<a;u++)o[u]=arguments[u];return s=(n=(i=Yc(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(o))),i),i.render=function(){return Zc.default.createElement("a",i.props,i.props.children)},n),Yc(i,s)}return e}(Zc.default.Component);va.default=(0,ZD.default)(XD);var Ma={};Object.defineProperty(Ma,"__esModule",{value:!0});var $D=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),JD=c,Xc=$c(JD),QD=hn,eE=$c(QD);function $c(t){return t&&t.__esModule?t:{default:t}}function tE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rE(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 nE(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 iE=function(t){nE(e,t);function e(){return tE(this,e),rE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return $D(e,[{key:"render",value:function(){return Xc.default.createElement("button",this.props,this.props.children)}}]),e}(Xc.default.Component);Ma.default=(0,eE.default)(iE);var ka={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var sE=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},aE=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),oE=c,Jc=Ti(oE),uE=or;Ti(uE);var lE=Nr,Qc=Ti(lE),cE=Si,ef=Ti(cE);function Ti(t){return t&&t.__esModule?t:{default:t}}function fE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dE(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 pE(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(r){pE(n,r);function n(i){fE(this,n);var s=dE(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i));return s.childBindings={domNode:null},s}return aE(n,[{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;Qc.default.unregister(this.props.name)}},{key:"registerElems",value:function(s){Qc.default.register(s,this.childBindings.domNode)}},{key:"render",value:function(){return Jc.default.createElement(t,sE({},this.props,{parentBindings:this.childBindings}))}}]),n}(Jc.default.Component);return e.propTypes={name:ef.default.string,id:ef.default.string},e},Object.defineProperty(ka,"__esModule",{value:!0});var tf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hE=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),vE=c,rf=ja(vE),gE=Fi,mE=ja(gE),yE=Si,nf=ja(yE);function ja(t){return t&&t.__esModule?t:{default:t}}function CE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bE(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 DE(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 sf=function(t){DE(e,t);function e(){return CE(this,e),bE(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return hE(e,[{key:"render",value:function(){var n=this,i=tf({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,rf.default.createElement("div",tf({},i,{ref:function(a){n.props.parentBindings.domNode=a}}),this.props.children)}}]),e}(rf.default.Component);sf.propTypes={name:nf.default.string,id:nf.default.string},ka.default=(0,mE.default)(sf);var Ia=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},af=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function of(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uf(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 lf(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 Mi=c,Dr=vn,Na=Nr,Ue=Si,Jt=Ai,cf={to:Ue.string.isRequired,containerId:Ue.string,container:Ue.object,activeClass:Ue.string,spy:Ue.bool,smooth:Ue.oneOfType([Ue.bool,Ue.string]),offset:Ue.number,delay:Ue.number,isDynamic:Ue.bool,onClick:Ue.func,duration:Ue.oneOfType([Ue.number,Ue.func]),absolute:Ue.bool,onSetActive:Ue.func,onSetInactive:Ue.func,ignoreCancelEvents:Ue.bool,hashSpy:Ue.bool,spyThrottle:Ue.number},EE={Scroll:function(e,r){console.warn("Helpers.Scroll is deprecated since v1.7.0");var n=r||Na,i=function(a){lf(o,a);function o(u){of(this,o);var l=uf(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,u));return s.call(l),l.state={active:!1},l}return af(o,[{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();Dr.isMounted(l)||Dr.mount(l,this.props.spyThrottle),this.props.hashSpy&&(Jt.isMounted()||Jt.mount(n),Jt.mapContainer(this.props.to,l)),this.props.spy&&Dr.addStateHandler(this.stateHandler),Dr.addSpyHandler(this.spyHandler,l),this.setState({container:l})}}},{key:"componentWillUnmount",value:function(){Dr.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=Ia({},this.props);for(var p in cf)f.hasOwnProperty(p)&&delete f[p];return f.className=l,f.onClick=this.handleClick,Mi.createElement(e,f)}}]),o}(Mi.Component),s=function(){var o=this;this.scrollTo=function(u,l){n.scrollTo(u,Ia({},o.state,l))},this.handleClick=function(u){o.props.onClick&&o.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),o.scrollTo(o.props.to,o.props)},this.stateHandler=function(){n.getActiveLink()!==o.props.to&&(o.state!==null&&o.state.active&&o.props.onSetInactive&&o.props.onSetInactive(),o.setState({active:!1}))},this.spyHandler=function(u){var l=o.getScrollSpyContainer();if(!(Jt.isMounted()&&!Jt.isInitialized())){var f=o.props.to,p=null,h=0,y=0,v=0;if(l.getBoundingClientRect){var g=l.getBoundingClientRect();v=g.top}if(!p||o.props.isDynamic){if(p=n.get(f),!p)return;var d=p.getBoundingClientRect();h=d.top-v+u,y=h+d.height}var D=u-o.props.offset,E=D>=Math.floor(h)&&D<Math.floor(y),B=D<Math.floor(h)||D>=Math.floor(y),w=n.getActiveLink();if(B)return f===w&&n.setActiveLink(void 0),o.props.hashSpy&&Jt.getHash()===f&&Jt.changeHash(),o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive()),Dr.updateStates();if(E&&w!==f)return n.setActiveLink(f),o.props.hashSpy&&Jt.changeHash(f),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(f)),Dr.updateStates()}}};return i.propTypes=cf,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var r=function(n){lf(i,n);function i(s){of(this,i);var a=uf(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,s));return a.childBindings={domNode:null},a}return af(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Na.unregister(this.props.name)}},{key:"registerElems",value:function(a){Na.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return Mi.createElement(e,Ia({},this.props,{parentBindings:this.childBindings}))}}]),i}(Mi.Component);return r.propTypes={name:Ue.string,id:Ue.string},r}},wE=EE;Object.defineProperty(Re,"__esModule",{value:!0}),Re.Helpers=Re.ScrollElement=Re.ScrollLink=Df=Re.animateScroll=Re.scrollSpy=Re.Events=Re.scroller=Re.Element=Re.Button=Re.Link=void 0;var OE=va,ff=Tt(OE),xE=Ma,df=Tt(xE),BE=ka,pf=Tt(BE),SE=Nr,hf=Tt(SE),AE=yn,vf=Tt(AE),LE=vn,gf=Tt(LE),PE=Di,mf=Tt(PE),FE=hn,yf=Tt(FE),TE=Fi,Cf=Tt(TE),ME=wE,bf=Tt(ME);function Tt(t){return t&&t.__esModule?t:{default:t}}Re.Link=ff.default,Re.Button=df.default,Re.Element=pf.default,Re.scroller=hf.default,Re.Events=vf.default,Re.scrollSpy=gf.default;var Df=Re.animateScroll=mf.default;Re.ScrollLink=yf.default,Re.ScrollElement=Cf.default,Re.Helpers=bf.default,Re.default={Link:ff.default,Button:df.default,Element:pf.default,scroller:hf.default,Events:vf.default,scrollSpy:gf.default,animateScroll:mf.default,ScrollLink:yf.default,ScrollElement:Cf.default,Helpers:bf.default};const _a=c.createContext({}),Ef=c.createContext({});function wf(){const t=c.useContext(Ef);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function Of(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 kE(){const t=At.useActionData(),{closeModal:e,closeAll:r}=c.useContext(_a),{showToast:n}=wf(),{getParam:i}=ha(),{pathname:s}=At.useLocation(),a=At.useNavigate(),o=i("closeAllModals");c.useEffect(()=>{o==="true"&&(r(),a(s))},[o]),c.useEffect(()=>{const u=t==null?void 0:t.closeModalKey;u&&e(u)},[t]),c.useEffect(()=>{const u=t==null?void 0:t.closeAllModals;typeof u=="boolean"&&u&&r()},[t]),c.useEffect(()=>{const u=t==null?void 0:t.toast,l=t==null?void 0:t.message;Of(u)&&n(u),!Of(u)&&l&&n({message:l,type:"danger"})},[t]),c.useEffect(()=>{var u,l;if(typeof((u=t==null?void 0:t.data)==null?void 0:u.scrollTo)=="string"){const f=document.getElementById((l=t==null?void 0:t.data)==null?void 0:l.scrollTo);f&&Df.scrollTo(f.offsetTop-200)}},[t])}const xf=c.createContext({});function jE(t){const e=c.useContext(xf);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:r,drawerIsOpen:n,openDrawer:i,closeDrawer:s}=e,a=n(t),o=r(t);return{drawerIsOpen:a,drawerData:o,openDrawer:f=>i(t,f),closeDrawer:()=>s(t)}}else return e}function IE(){return()=>{}}function Bf(){return c.useSyncExternalStore(IE,()=>!0,()=>!1)}function NE(t){const e=c.useContext(_a);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:r,modalIsOpen:n,openModal:i,closeModal:s}=e,a=n(t),o=r(t);return{modalIsOpen:a,modalData:o,openModal:f=>i(t,f),closeModal:()=>s(t)}}else return e}function _E(t){const{children:e=!1}=t,[r,n]=c.useState([]);function i(u){return!!r.some(l=>l.key===u)}function s(u){var l;return(l=r.find(f=>f.key===u))==null?void 0:l.data}function a(u,l){const f=i(u);n(f?p=>[...p.filter(y=>y.key!==u),{key:u,data:l}]:[...r,{key:u,data:l}])}function o(u){n(r.filter(l=>l.key!==u))}return C.jsx(xf.Provider,{value:{drawerIsOpen:i,drawerData:s,openDrawer:a,closeDrawer:o},children:e})}function Dn(t){"@babel/helpers - typeof";return Dn=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},Dn(t)}function zE(t,e){if(Dn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WE(t){var e=zE(t,"string");return Dn(e)=="symbol"?e:e+""}function K(t,e,r){return(e=WE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var za,Af;function HE(){if(Af)return za;Af=1;var t=process.env.NODE_ENV,e=function(n,i,s,a,o,u,l,f){if(t!=="production"&&i===void 0)throw new Error("invariant requires an error message argument");if(!n){var p;if(i===void 0)p=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var h=[s,a,o,u,l,f],y=0;p=new Error(i.replace(/%s/g,function(){return h[y++]})),p.name="Invariant Violation"}throw p.framesToPop=1,p}};return za=e,za}var UE=HE(),Ze=Sf(UE),me=c.createContext(null);function RE(){Ze(!!c.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=c.useContext(me);return Ze(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function VE(t,e,r){return Object.keys(t).reduce(function(i,s){return e(i,t[s],s)},r)}function qE(t,e){Object.keys(t).forEach(r=>e(t[r],r))}function GE(t,e,r,n){var i={},s=(a,o)=>{var u=r[o];u!==e[o]&&(i[o]=u,a(n,u))};return qE(t,s),i}function ZE(t,e,r){var n=VE(r,function(s,a,o){return typeof t[o]=="function"&&s.push(google.maps.event.addListener(e,a,t[o])),s},[]);return n}function KE(t){google.maps.event.removeListener(t)}function De(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];t.forEach(KE)}function Ce(t){var{updaterMap:e,eventMap:r,prevProps:n,nextProps:i,instance:s}=t,a=ZE(i,s,r);return GE(e,n,i,s),a}var Lf={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"},Pf={extraMapTypes(t,e){e.forEach(function(n,i){t.mapTypes.set(String(i),n)})},center(t,e){t.setCenter(e)},clickableIcons(t,e){t.setClickableIcons(e)},heading(t,e){t.setHeading(e)},mapTypeId(t,e){t.setMapTypeId(e)},options(t,e){t.setOptions(e)},streetView(t,e){t.setStreetView(e)},tilt(t,e){t.setTilt(e)},zoom(t,e){t.setZoom(e)}};function YE(t){var{children:e,options:r,id:n,mapContainerStyle:i,mapContainerClassName:s,center:a,onClick:o,onDblClick:u,onDrag:l,onDragEnd:f,onDragStart:p,onMouseMove:h,onMouseOut:y,onMouseOver:v,onMouseDown:g,onMouseUp:d,onRightClick:D,onCenterChanged:E,onLoad:B,onUnmount:w}=t,[b,x]=c.useState(null),S=c.useRef(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,N]=c.useState(null),[z,W]=c.useState(null),[X,R]=c.useState(null),[ne,Q]=c.useState(null),[k,G]=c.useState(null),[$,V]=c.useState(null),[re,F]=c.useState(null),[O,_]=c.useState(null),[T,I]=c.useState(null),[Z,ee]=c.useState(null);return c.useEffect(()=>{r&&b!==null&&b.setOptions(r)},[b,r]),c.useEffect(()=>{b!==null&&typeof a<"u"&&b.setCenter(a)},[b,a]),c.useEffect(()=>{b&&u&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(b,"dblclick",u)))},[u]),c.useEffect(()=>{b&&f&&(M!==null&&google.maps.event.removeListener(M),N(google.maps.event.addListener(b,"dragend",f)))},[f]),c.useEffect(()=>{b&&p&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(b,"dragstart",p)))},[p]),c.useEffect(()=>{b&&g&&(X!==null&&google.maps.event.removeListener(X),R(google.maps.event.addListener(b,"mousedown",g)))},[g]),c.useEffect(()=>{b&&h&&(ne!==null&&google.maps.event.removeListener(ne),Q(google.maps.event.addListener(b,"mousemove",h)))},[h]),c.useEffect(()=>{b&&y&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(b,"mouseout",y)))},[y]),c.useEffect(()=>{b&&v&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(b,"mouseover",v)))},[v]),c.useEffect(()=>{b&&d&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(b,"mouseup",d)))},[d]),c.useEffect(()=>{b&&D&&(O!==null&&google.maps.event.removeListener(O),_(google.maps.event.addListener(b,"rightclick",D)))},[D]),c.useEffect(()=>{b&&o&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(b,"click",o)))},[o]),c.useEffect(()=>{b&&l&&(Z!==null&&google.maps.event.removeListener(Z),ee(google.maps.event.addListener(b,"drag",l)))},[l]),c.useEffect(()=>{b&&E&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(b,"center_changed",E)))},[o]),c.useEffect(()=>{var J=S.current===null?null:new google.maps.Map(S.current,r);return x(J),J!==null&&B&&B(J),()=>{J!==null&&w&&w(J)}},[]),C.jsx("div",{id:n,ref:S,style:i,className:s,children:C.jsx(me.Provider,{value:b,children:b!==null?e:null})})}c.memo(YE);let XE=class extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{map:null}),K(this,"registeredEvents",[]),K(this,"mapRef",null),K(this,"getInstance",()=>this.mapRef===null?null:new google.maps.Map(this.mapRef,this.props.options)),K(this,"panTo",e=>{var r=this.getInstance();r&&r.panTo(e)}),K(this,"setMapCallback",()=>{this.state.map!==null&&this.props.onLoad&&this.props.onLoad(this.state.map)}),K(this,"getRef",e=>{this.mapRef=e})}componentDidMount(){var e=this.getInstance();this.registeredEvents=Ce({updaterMap:Pf,eventMap:Lf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)}componentDidUpdate(e){this.state.map!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Pf,eventMap:Lf,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),De(this.registeredEvents))}render(){return C.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:C.jsx(me.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})}};function Ff(t,e,r,n,i,s,a){try{var o=t[s](a),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(n,i)}function Tf(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var s=t.apply(e,r);function a(u){Ff(s,n,i,a,o,"next",u)}function o(u){Ff(s,n,i,a,o,"throw",u)}a(void 0)})}}function Mf(t){var{googleMapsApiKey:e,googleMapsClientId:r,version:n="weekly",language:i,region:s,libraries:a,channel:o,mapIds:u,authReferrerPolicy:l}=t,f=[];return Ze(e&&r||!(e&&r),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?f.push("key=".concat(e)):r&&f.push("client=".concat(r)),n&&f.push("v=".concat(n)),i&&f.push("language=".concat(i)),s&&f.push("region=".concat(s)),a&&a.length&&f.push("libraries=".concat(a.sort().join(","))),o&&f.push("channel=".concat(o)),u&&u.length&&f.push("map_ids=".concat(u.join(","))),l&&f.push("auth_referrer_policy=".concat(l)),f.push("loading=async"),f.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(f.join("&"))}var Er=typeof document<"u";function kf(t){var{url:e,id:r,nonce:n}=t;return Er?new Promise(function(s,a){var o=document.getElementById(r),u=window;if(o){var l=o.getAttribute("data-state");if(o.src===e&&l!=="error"){if(l==="ready")return s(r);var f=u.initMap,p=o.onerror;u.initMap=function(){f&&f(),s(r)},o.onerror=function(y){p&&p(y),a(y)};return}else o.remove()}var h=document.createElement("script");h.type="text/javascript",h.src=e,h.id=r,h.async=!0,h.nonce=n||"",h.onerror=function(v){h.setAttribute("data-state","error"),a(v)},u.initMap=function(){h.setAttribute("data-state","ready"),s(r)},document.head.appendChild(h)}).catch(i=>{throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function jf(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
71
71
  `,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
72
72
  `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function If(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,s){return jf(i)||Reflect.apply(e,t,[i,s]),i};var r=t.appendChild.bind(t);t.appendChild=function(i){return jf(i)||Reflect.apply(r,t,[i]),i}}}var En=!1;function Nf(){return C.jsx("div",{children:"Loading..."})}var Wa={id:"script-loader",version:"weekly"};class _f extends c.PureComponent{constructor(){super(...arguments),K(this,"check",c.createRef()),K(this,"state",{loaded:!1}),K(this,"cleanupCallback",()=>{delete window.google.maps,this.injectScript()}),K(this,"isCleaningUp",Tf(function*(){function e(r){if(!En)r();else if(Er)var n=window.setInterval(function(){En||(window.clearInterval(n),r())},1)}return new Promise(e)})),K(this,"cleanup",()=>{En=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(n){return typeof n.src=="string"&&n.src.includes("maps.googleapis")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(n){return n.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(n){return n.innerText!==void 0&&n.innerText.length>0&&n.innerText.includes(".gm-")}).forEach(function(n){n.parentNode&&n.parentNode.removeChild(n)})}),K(this,"injectScript",()=>{this.props.preventGoogleFontsLoading&&If(),Ze(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);var e={id:this.props.id,nonce:this.props.nonce,url:Mf(this.props)};kf(e).then(()=>{this.props.onLoad&&this.props.onLoad(),this.setState(function(){return{loaded:!0}})}).catch(r=>{this.props.onError&&this.props.onError(r),console.error(`
73
73
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",`) to <LoadScript />
74
74
  Otherwise it is a Network issue.
75
- `))})})}componentDidMount(){if(Er){if(window.google&&window.google.maps&&!En){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}}componentDidUpdate(e){this.props.libraries!==e.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"),Er&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))}componentWillUnmount(){if(Er){this.cleanup();var e=()=>{this.check.current||(delete window.google,En=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(Nf,{})]})}}K(_f,"defaultProps",Wa);function $E(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}function Ha(t,e){if(t==null)return{};var r,n,i=$E(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var zf;function JE(t){var{id:e=Wa.id,version:r=Wa.version,nonce:n,googleMapsApiKey:i,googleMapsClientId:s,language:a,region:o,libraries:u,preventGoogleFontsLoading:l,channel:f,mapIds:p,authReferrerPolicy:h}=t,y=c.useRef(!1),[v,g]=c.useState(!1),[d,D]=c.useState(void 0);c.useEffect(function(){return y.current=!0,()=>{y.current=!1}},[]),c.useEffect(function(){Er&&l&&If()},[l]),c.useEffect(function(){v&&Ze(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[v]);var E=Mf({version:r,googleMapsApiKey:i,googleMapsClientId:s,language:a,region:o,libraries:u,channel:f,mapIds:p,authReferrerPolicy:h});c.useEffect(function(){if(!Er)return;function b(){y.current&&(g(!0),zf=E)}if(window.google&&window.google.maps&&zf===E){b();return}kf({id:e,url:E,nonce:n}).then(b).catch(function(A){y.current&&D(A),console.warn(`
75
+ `))})})}componentDidMount(){if(Er){if(window.google&&window.google.maps&&!En){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}}componentDidUpdate(e){this.props.libraries!==e.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"),Er&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))}componentWillUnmount(){if(Er){this.cleanup();var e=()=>{this.check.current||(delete window.google,En=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||C.jsx(Nf,{})]})}}K(_f,"defaultProps",Wa);function $E(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}function Ha(t,e){if(t==null)return{};var r,n,i=$E(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var zf;function JE(t){var{id:e=Wa.id,version:r=Wa.version,nonce:n,googleMapsApiKey:i,googleMapsClientId:s,language:a,region:o,libraries:u,preventGoogleFontsLoading:l,channel:f,mapIds:p,authReferrerPolicy:h}=t,y=c.useRef(!1),[v,g]=c.useState(!1),[d,D]=c.useState(void 0);c.useEffect(function(){return y.current=!0,()=>{y.current=!1}},[]),c.useEffect(function(){Er&&l&&If()},[l]),c.useEffect(function(){v&&Ze(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[v]);var E=Mf({version:r,googleMapsApiKey:i,googleMapsClientId:s,language:a,region:o,libraries:u,channel:f,mapIds:p,authReferrerPolicy:h});c.useEffect(function(){if(!Er)return;function b(){y.current&&(g(!0),zf=E)}if(window.google&&window.google.maps&&zf===E){b();return}kf({id:e,url:E,nonce:n}).then(b).catch(function(S){y.current&&D(S),console.warn(`
76
76
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(i||"-",") or Client ID (").concat(s||"-",`)
77
77
  Otherwise it is a Network issue.
78
- `)),console.error(A)})},[e,E,n]);var B=c.useRef();return c.useEffect(function(){B.current&&u!==B.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"),B.current=u},[u]),{isLoaded:v,loadError:d,url:E}}var QE=["loadingElement","onLoad","onError","onUnmount","children"],ew=C.jsx(Nf,{});function tw(t){var{loadingElement:e,onLoad:r,onError:n,onUnmount:i,children:s}=t,a=Ha(t,QE),{isLoaded:o,loadError:u}=JE(a);return c.useEffect(function(){o&&typeof r=="function"&&r()},[o,r]),c.useEffect(function(){u&&typeof n=="function"&&n(u)},[u,n]),c.useEffect(function(){return()=>{i&&i()}},[i]),o?s:e||ew}c.memo(tw),typeof SuppressedError=="function"&&SuppressedError;var Wf;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Wf||(Wf={}));function Hf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ki(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Uf={},Rf={options(t,e){t.setOptions(e)}};function rw(t){var{options:e,onLoad:r,onUnmount:n}=t,i=c.useContext(me),[s,a]=c.useState(null);return c.useEffect(()=>{s!==null&&s.setMap(i)},[i]),c.useEffect(()=>{e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(()=>{var o=new google.maps.TrafficLayer(ki(ki({},e),{},{map:i}));return a(o),r&&r(o),()=>{s!==null&&(n&&n(s),s.setMap(null))}},[]),null}c.memo(rw);class nw extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{trafficLayer:null}),K(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),K(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(ki(ki({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Rf,eventMap:Uf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)}componentDidUpdate(e){this.state.trafficLayer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Rf,eventMap:Uf,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),De(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}K(nw,"contextType",me);function iw(t){var{onLoad:e,onUnmount:r}=t,n=c.useContext(me),[i,s]=c.useState(null);return c.useEffect(()=>{i!==null&&i.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.BicyclingLayer;return s(a),a.setMap(n),e&&e(a),()=>{a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(iw);class sw extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{bicyclingLayer:null}),K(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}K(sw,"contextType",me);function aw(t){var{onLoad:e,onUnmount:r}=t,n=c.useContext(me),[i,s]=c.useState(null);return c.useEffect(()=>{i!==null&&i.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.TransitLayer;return s(a),a.setMap(n),e&&e(a),()=>{i!==null&&(r&&r(i),i.setMap(null))}},[]),null}c.memo(aw);class ow extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{transitLayer:null}),K(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var e=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:e}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}K(ow,"contextType",me);function Vf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ji(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var qf={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Gf={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};function uw(t){var{options:e,drawingMode:r,onCircleComplete:n,onMarkerComplete:i,onOverlayComplete:s,onPolygonComplete:a,onPolylineComplete:o,onRectangleComplete:u,onLoad:l,onUnmount:f}=t,p=c.useContext(me),[h,y]=c.useState(null),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,A]=c.useState(null),[U,P]=c.useState(null);return c.useEffect(()=>{h!==null&&h.setMap(p)},[p]),c.useEffect(()=>{e&&h!==null&&h.setOptions(e)},[h,e]),c.useEffect(()=>{h!==null&&h.setDrawingMode(r??null)},[h,r]),c.useEffect(()=>{h&&n&&(v!==null&&google.maps.event.removeListener(v),g(google.maps.event.addListener(h,"circlecomplete",n)))},[h,n]),c.useEffect(()=>{h&&i&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(h,"markercomplete",i)))},[h,i]),c.useEffect(()=>{h&&s&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(h,"overlaycomplete",s)))},[h,s]),c.useEffect(()=>{h&&a&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(h,"polygoncomplete",a)))},[h,a]),c.useEffect(()=>{h&&o&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(h,"polylinecomplete",o)))},[h,o]),c.useEffect(()=>{h&&u&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(h,"rectanglecomplete",u)))},[h,u]),c.useEffect(()=>{Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var H=new google.maps.drawing.DrawingManager(ji(ji({},e),{},{map:p}));return r&&H.setDrawingMode(r),n&&g(google.maps.event.addListener(H,"circlecomplete",n)),i&&D(google.maps.event.addListener(H,"markercomplete",i)),s&&B(google.maps.event.addListener(H,"overlaycomplete",s)),a&&b(google.maps.event.addListener(H,"polygoncomplete",a)),o&&A(google.maps.event.addListener(H,"polylinecomplete",o)),u&&P(google.maps.event.addListener(H,"rectanglecomplete",u)),y(H),l&&l(H),()=>{h!==null&&(v&&google.maps.event.removeListener(v),d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),f&&f(h),h.setMap(null))}},[]),null}c.memo(uw);class lw extends c.PureComponent{constructor(e){super(e),K(this,"registeredEvents",[]),K(this,"state",{drawingManager:null}),K(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(ji(ji({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Gf,eventMap:qf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)}componentDidUpdate(e){this.state.drawingManager!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Gf,eventMap:qf,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),De(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}K(lw,"contextType",me);function Zf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Kf={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"},Yf={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Ii={};function cw(t){var{position:e,options:r,clusterer:n,noClustererRedraw:i,children:s,draggable:a,visible:o,animation:u,clickable:l,cursor:f,icon:p,label:h,opacity:y,shape:v,title:g,zIndex:d,onClick:D,onDblClick:E,onDrag:B,onDragEnd:w,onDragStart:b,onMouseOut:x,onMouseOver:A,onMouseUp:U,onMouseDown:P,onRightClick:H,onClickableChanged:j,onCursorChanged:M,onAnimationChanged:W,onDraggableChanged:_,onFlatChanged:z,onIconChanged:Y,onPositionChanged:V,onShapeChanged:Q,onTitleChanged:ie,onVisibleChanged:k,onZindexChanged:G,onLoad:$,onUnmount:R}=t,re=c.useContext(me),[F,O]=c.useState(null),[N,T]=c.useState(null),[I,Z]=c.useState(null),[ee,J]=c.useState(null),[de,fe]=c.useState(null),[ce,we]=c.useState(null),[Me,Ae]=c.useState(null),[Ie,qe]=c.useState(null),[rt,Be]=c.useState(null),[Je,it]=c.useState(null),[Oe,Fe]=c.useState(null),[Qe,Ke]=c.useState(null),[et,Ct]=c.useState(null),[Ye,nr]=c.useState(null),[wt,St]=c.useState(null),[ir,Wr]=c.useState(null),[sr,Hr]=c.useState(null),[Mt,xr]=c.useState(null),[Wt,Ur]=c.useState(null),[ar,Sn]=c.useState(null),[Rr,An]=c.useState(null),[Vr,Ln]=c.useState(null);c.useEffect(()=>{F!==null&&F.setMap(re)},[re]),c.useEffect(()=>{typeof r<"u"&&F!==null&&F.setOptions(r)},[F,r]),c.useEffect(()=>{typeof a<"u"&&F!==null&&F.setDraggable(a)},[F,a]),c.useEffect(()=>{e&&F!==null&&F.setPosition(e)},[F,e]),c.useEffect(()=>{typeof o<"u"&&F!==null&&F.setVisible(o)},[F,o]),c.useEffect(()=>{F==null||F.setAnimation(u)},[F,u]),c.useEffect(()=>{F&&l!==void 0&&F.setClickable(l)},[F,l]),c.useEffect(()=>{F&&f!==void 0&&F.setCursor(f)},[F,f]),c.useEffect(()=>{F&&p!==void 0&&F.setIcon(p)},[F,p]),c.useEffect(()=>{F&&h!==void 0&&F.setLabel(h)},[F,h]),c.useEffect(()=>{F&&y!==void 0&&F.setOpacity(y)},[F,y]),c.useEffect(()=>{F&&v!==void 0&&F.setShape(v)},[F,v]),c.useEffect(()=>{F&&g!==void 0&&F.setTitle(g)},[F,g]),c.useEffect(()=>{F&&d!==void 0&&F.setZIndex(d)},[F,d]),c.useEffect(()=>{F&&E&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(F,"dblclick",E)))},[E]),c.useEffect(()=>{F&&w&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(F,"dragend",w)))},[w]),c.useEffect(()=>{F&&b&&(ee!==null&&google.maps.event.removeListener(ee),J(google.maps.event.addListener(F,"dragstart",b)))},[b]),c.useEffect(()=>{F&&P&&(de!==null&&google.maps.event.removeListener(de),fe(google.maps.event.addListener(F,"mousedown",P)))},[P]),c.useEffect(()=>{F&&x&&(ce!==null&&google.maps.event.removeListener(ce),we(google.maps.event.addListener(F,"mouseout",x)))},[x]),c.useEffect(()=>{F&&A&&(Me!==null&&google.maps.event.removeListener(Me),Ae(google.maps.event.addListener(F,"mouseover",A)))},[A]),c.useEffect(()=>{F&&U&&(Ie!==null&&google.maps.event.removeListener(Ie),qe(google.maps.event.addListener(F,"mouseup",U)))},[U]),c.useEffect(()=>{F&&H&&(rt!==null&&google.maps.event.removeListener(rt),Be(google.maps.event.addListener(F,"rightclick",H)))},[H]),c.useEffect(()=>{F&&D&&(Je!==null&&google.maps.event.removeListener(Je),it(google.maps.event.addListener(F,"click",D)))},[D]),c.useEffect(()=>{F&&B&&(Oe!==null&&google.maps.event.removeListener(Oe),Fe(google.maps.event.addListener(F,"drag",B)))},[B]),c.useEffect(()=>{F&&j&&(Qe!==null&&google.maps.event.removeListener(Qe),Ke(google.maps.event.addListener(F,"clickable_changed",j)))},[j]),c.useEffect(()=>{F&&M&&(et!==null&&google.maps.event.removeListener(et),Ct(google.maps.event.addListener(F,"cursor_changed",M)))},[M]),c.useEffect(()=>{F&&W&&(Ye!==null&&google.maps.event.removeListener(Ye),nr(google.maps.event.addListener(F,"animation_changed",W)))},[W]),c.useEffect(()=>{F&&_&&(wt!==null&&google.maps.event.removeListener(wt),St(google.maps.event.addListener(F,"draggable_changed",_)))},[_]),c.useEffect(()=>{F&&z&&(ir!==null&&google.maps.event.removeListener(ir),Wr(google.maps.event.addListener(F,"flat_changed",z)))},[z]),c.useEffect(()=>{F&&Y&&(sr!==null&&google.maps.event.removeListener(sr),Hr(google.maps.event.addListener(F,"icon_changed",Y)))},[Y]),c.useEffect(()=>{F&&V&&(Mt!==null&&google.maps.event.removeListener(Mt),xr(google.maps.event.addListener(F,"position_changed",V)))},[V]),c.useEffect(()=>{F&&Q&&(Wt!==null&&google.maps.event.removeListener(Wt),Ur(google.maps.event.addListener(F,"shape_changed",Q)))},[Q]),c.useEffect(()=>{F&&ie&&(ar!==null&&google.maps.event.removeListener(ar),Sn(google.maps.event.addListener(F,"title_changed",ie)))},[ie]),c.useEffect(()=>{F&&k&&(Rr!==null&&google.maps.event.removeListener(Rr),An(google.maps.event.addListener(F,"visible_changed",k)))},[k]),c.useEffect(()=>{F&&G&&(Vr!==null&&google.maps.event.removeListener(Vr),Ln(google.maps.event.addListener(F,"zindex_changed",G)))},[G]),c.useEffect(()=>{var Br=_r(_r(_r({},r||Ii),n?Ii:{map:re}),{},{position:e}),ge=new google.maps.Marker(Br);return n?n.addMarker(ge,!!i):ge.setMap(re),e&&ge.setPosition(e),typeof o<"u"&&ge.setVisible(o),typeof a<"u"&&ge.setDraggable(a),typeof l<"u"&&ge.setClickable(l),typeof f=="string"&&ge.setCursor(f),p&&ge.setIcon(p),typeof h<"u"&&ge.setLabel(h),typeof y<"u"&&ge.setOpacity(y),v&&ge.setShape(v),typeof g=="string"&&ge.setTitle(g),typeof d=="number"&&ge.setZIndex(d),E&&T(google.maps.event.addListener(ge,"dblclick",E)),w&&Z(google.maps.event.addListener(ge,"dragend",w)),b&&J(google.maps.event.addListener(ge,"dragstart",b)),P&&fe(google.maps.event.addListener(ge,"mousedown",P)),x&&we(google.maps.event.addListener(ge,"mouseout",x)),A&&Ae(google.maps.event.addListener(ge,"mouseover",A)),U&&qe(google.maps.event.addListener(ge,"mouseup",U)),H&&Be(google.maps.event.addListener(ge,"rightclick",H)),D&&it(google.maps.event.addListener(ge,"click",D)),B&&Fe(google.maps.event.addListener(ge,"drag",B)),j&&Ke(google.maps.event.addListener(ge,"clickable_changed",j)),M&&Ct(google.maps.event.addListener(ge,"cursor_changed",M)),W&&nr(google.maps.event.addListener(ge,"animation_changed",W)),_&&St(google.maps.event.addListener(ge,"draggable_changed",_)),z&&Wr(google.maps.event.addListener(ge,"flat_changed",z)),Y&&Hr(google.maps.event.addListener(ge,"icon_changed",Y)),V&&xr(google.maps.event.addListener(ge,"position_changed",V)),Q&&Ur(google.maps.event.addListener(ge,"shape_changed",Q)),ie&&Sn(google.maps.event.addListener(ge,"title_changed",ie)),k&&An(google.maps.event.addListener(ge,"visible_changed",k)),G&&Ln(google.maps.event.addListener(ge,"zindex_changed",G)),O(ge),$&&$(ge),()=>{N!==null&&google.maps.event.removeListener(N),I!==null&&google.maps.event.removeListener(I),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),ce!==null&&google.maps.event.removeListener(ce),Me!==null&&google.maps.event.removeListener(Me),Ie!==null&&google.maps.event.removeListener(Ie),rt!==null&&google.maps.event.removeListener(rt),Je!==null&&google.maps.event.removeListener(Je),Qe!==null&&google.maps.event.removeListener(Qe),et!==null&&google.maps.event.removeListener(et),Ye!==null&&google.maps.event.removeListener(Ye),wt!==null&&google.maps.event.removeListener(wt),ir!==null&&google.maps.event.removeListener(ir),sr!==null&&google.maps.event.removeListener(sr),Mt!==null&&google.maps.event.removeListener(Mt),ar!==null&&google.maps.event.removeListener(ar),Rr!==null&&google.maps.event.removeListener(Rr),Vr!==null&&google.maps.event.removeListener(Vr),R&&R(ge),n?n.removeMarker(ge,!!i):ge&&ge.setMap(null)}},[]);var $i=c.useMemo(()=>s?c.Children.map(s,Br=>{if(!c.isValidElement(Br))return Br;var ge=Br;return c.cloneElement(ge,{anchor:F})}):null,[s,F]);return C.jsx(C.Fragment,{children:$i})||null}c.memo(cw);class Xf extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[])}componentDidMount(){var e=this;return Tf(function*(){var r=_r(_r(_r({},e.props.options||Ii),e.props.clusterer?Ii:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(r),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=Ce({updaterMap:Yf,eventMap:Kf,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)})()}componentDidUpdate(e){this.marker&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Yf,eventMap:Kf,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),De(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var e=this.props.children?c.Children.map(this.props.children,r=>{if(!c.isValidElement(r))return r;var n=r;return c.cloneElement(n,{anchor:this.marker})}):null;return e||null}}K(Xf,"contextType",me);var fw=function(){function t(e,r){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=r,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(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 r=this.cluster.getClusterer();if(google.maps.event.trigger(r,"click",this.cluster),google.maps.event.trigger(r,"clusterclick",this.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),i=this.cluster.getBounds(),s=r.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(i),this.timeOut=window.setTimeout(function(){var a=r.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(i);var o=a.getZoom()||0;n!==null&&o>n&&a.setZoom(n+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 r=this.getMap();r!==null&&(this.boundsChangedListener=google.maps.event.addListener(r,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},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,r,n,i,s,a;if(this.div&&this.center){var o=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((r=u[1])===null||r===void 0?void 0:r.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=o,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 y=document.createElement("div");y.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(y.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((s=this.sums)===null||s===void 0)&&s.html&&(y.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(y),this.div.title=o,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var r=this.cluster.getClusterer().getStyles(),n=r[Math.min(r.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var r=this.getProjection().fromLatLngToDivPixel(e);return r!==null&&(r.x-=this.anchorIcon[1],r.y-=this.anchorIcon[0]),r},t}(),dw=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 fw(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),r=this.getMarkers(),n=0,i=r;n<i.length;n++){var s=i[n],a=s.getPosition();a&&e.extend(a)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var r;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var n=e.getPosition();if(n){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+n.lat())/i,(this.center.lng()*(i-1)+n.lng())/i),this.calculateBounds()}}}else{var n=e.getPosition();n&&(this.center=n,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var s=this.markers.length,a=this.markerClusterer.getMaxZoom(),o=(r=this.map)===null||r===void 0?void 0:r.getZoom();if(a!==null&&typeof o<"u"&&o>a)e.getMap()!==this.map&&e.setMap(this.map);else if(s<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(s===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var r=e.getPosition();if(r)return this.bounds.contains(r)}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,r=this.markers.length,n=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(n!==null&&typeof i<"u"&&i>n){this.clusterIcon.hide();return}if(r<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var r=0;r<this.markers.length;r++)if(e===this.markers[r])return!0;return!1},t}();function pw(t,e){var r=t.length,n=r.toString().length,i=Math.min(n,e);return{text:r.toString(),index:i,title:""}}var hw=2e3,vw=500,gw="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",mw="png",yw=[53,56,66,78,90],Cw="cluster",$f=function(){function t(e,r,n){r===void 0&&(r=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||gw,this.imageExtension=n.imageExtension||mw,this.imageSizes=n.imageSizes||yw,this.calculator=n.calculator||pw,this.batchSize=n.batchSize||hw,this.batchSizeIE=n.batchSizeIE||vw,this.clusterClass=n.clusterClass||Cw,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,r;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((r=this.getMap())===null||r===void 0?void 0:r.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},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,r=this.markers;e<r.length;e++){var n=r[e];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var i=0,s=this.clusters;i<s.length;i++){var a=s[i];a.remove()}this.clusters=[];for(var o=0,u=this.listeners;o<u.length;o++){var l=u[o];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(),r=new google.maps.LatLngBounds,n=0,i=e;n<i.length;n++){var s=i[n],a=s.getPosition();a&&r.extend(a)}var o=this.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(r)},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,r){this.pushMarkerTo(e),r||this.redraw()},t.prototype.addMarkers=function(e,r){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=e[n];i&&this.pushMarkerTo(i)}r||this.redraw()},t.prototype.pushMarkerTo=function(e){var r=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){r.ready&&(e.isAdded=!1,r.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var r=-1;if(this.markers.indexOf)r=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){r=n;break}return r===-1?!1:(e.setMap(null),this.markers.splice(r,1),!0)},t.prototype.removeMarker=function(e,r){var n=this.removeMarker_(e);return!r&&n&&this.repaint(),n},t.prototype.removeMarkers=function(e,r){for(var n=!1,i=0,s=e;i<s.length;i++){var a=s[i];n=n||this.removeMarker_(a)}return!r&&n&&this.repaint(),n},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 n=0,i=e;n<i.length;n++){var s=i[n];s.remove()}},0)},t.prototype.getExtendedBounds=function(e){var r=this.getProjection(),n=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var i=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),n!==null){var s=r.fromDivPixelToLatLng(n);s!==null&&e.extend(s)}if(i!==null){var a=r.fromDivPixelToLatLng(i);a!==null&&e.extend(a)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var r=0,n=this.clusters;r<n.length;r++){var i=n[r];i.remove()}this.clusters=[];for(var s=0,a=this.markers;s<a.length;s++){var o=a[s];o.isAdded=!1,e&&o.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,r){var n=6371,i=(r.lat()-e.lat())*Math.PI/180,s=(r.lng()-e.lng())*Math.PI/180,a=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(r.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.isMarkerInBounds=function(e,r){var n=e.getPosition();return n?r.contains(n):!1},t.prototype.addToClosestCluster=function(e){for(var r,n=4e4,i=null,s=0,a=this.clusters;s<a.length;s++){var o=a[s];r=o;var u=r.getCenter(),l=e.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<n&&(n=f,i=r)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(r=new dw(this),r.addMarker(e),this.clusters.push(r))},t.prototype.createClusters=function(e){var r=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 n=this.getMap(),i=n!==null&&("getBounds"in n)?n.getBounds():null,s=(n==null?void 0:n.getZoom())||0,a=s>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)),o=this.getExtendedBounds(a),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,o)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){r.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,h=this.clusters;p<h.length;p++){var y=h[p];y.updateIcon()}}}},t.prototype.extend=function(e,r){return(function(i){for(var s in i.prototype){var a=s;this.prototype[a]=i.prototype[a]}return this}).apply(e,[r])},t}();function Jf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Et={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Se={averageCenter(t,e){t.setAverageCenter(e)},batchSizeIE(t,e){t.setBatchSizeIE(e)},calculator(t,e){t.setCalculator(e)},clusterClass(t,e){t.setClusterClass(e)},enableRetinaIcons(t,e){t.setEnableRetinaIcons(e)},gridSize(t,e){t.setGridSize(e)},ignoreHidden(t,e){t.setIgnoreHidden(e)},imageExtension(t,e){t.setImageExtension(e)},imagePath(t,e){t.setImagePath(e)},imageSizes(t,e){t.setImageSizes(e)},maxZoom(t,e){t.setMaxZoom(e)},minimumClusterSize(t,e){t.setMinimumClusterSize(e)},styles(t,e){t.setStyles(e)},title(t,e){t.setTitle(e)},zoomOnClick(t,e){t.setZoomOnClick(e)}},Dw={};function Ew(t){var{children:e,options:r,averageCenter:n,batchSizeIE:i,calculator:s,clusterClass:a,enableRetinaIcons:o,gridSize:u,ignoreHidden:l,imageExtension:f,imagePath:p,imageSizes:h,maxZoom:y,minimumClusterSize:v,styles:g,title:d,zoomOnClick:D,onClick:E,onClusteringBegin:B,onClusteringEnd:w,onMouseOver:b,onMouseOut:x,onLoad:A,onUnmount:U}=t,[P,H]=c.useState(null),j=c.useContext(me),[M,W]=c.useState(null),[_,z]=c.useState(null),[Y,V]=c.useState(null),[Q,ie]=c.useState(null),[k,G]=c.useState(null);return c.useEffect(()=>{P&&x&&(Q!==null&&google.maps.event.removeListener(Q),ie(google.maps.event.addListener(P,Et.onMouseOut,x)))},[x]),c.useEffect(()=>{P&&b&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(P,Et.onMouseOver,b)))},[b]),c.useEffect(()=>{P&&E&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(P,Et.onClick,E)))},[E]),c.useEffect(()=>{P&&B&&(_!==null&&google.maps.event.removeListener(_),z(google.maps.event.addListener(P,Et.onClusteringBegin,B)))},[B]),c.useEffect(()=>{P&&w&&(Y!==null&&google.maps.event.removeListener(Y),z(google.maps.event.addListener(P,Et.onClusteringEnd,w)))},[w]),c.useEffect(()=>{typeof n<"u"&&P!==null&&Se.averageCenter(P,n)},[P,n]),c.useEffect(()=>{typeof i<"u"&&P!==null&&Se.batchSizeIE(P,i)},[P,i]),c.useEffect(()=>{typeof s<"u"&&P!==null&&Se.calculator(P,s)},[P,s]),c.useEffect(()=>{typeof a<"u"&&P!==null&&Se.clusterClass(P,a)},[P,a]),c.useEffect(()=>{typeof o<"u"&&P!==null&&Se.enableRetinaIcons(P,o)},[P,o]),c.useEffect(()=>{typeof u<"u"&&P!==null&&Se.gridSize(P,u)},[P,u]),c.useEffect(()=>{typeof l<"u"&&P!==null&&Se.ignoreHidden(P,l)},[P,l]),c.useEffect(()=>{typeof f<"u"&&P!==null&&Se.imageExtension(P,f)},[P,f]),c.useEffect(()=>{typeof p<"u"&&P!==null&&Se.imagePath(P,p)},[P,p]),c.useEffect(()=>{typeof h<"u"&&P!==null&&Se.imageSizes(P,h)},[P,h]),c.useEffect(()=>{typeof y<"u"&&P!==null&&Se.maxZoom(P,y)},[P,y]),c.useEffect(()=>{typeof v<"u"&&P!==null&&Se.minimumClusterSize(P,v)},[P,v]),c.useEffect(()=>{typeof g<"u"&&P!==null&&Se.styles(P,g)},[P,g]),c.useEffect(()=>{typeof d<"u"&&P!==null&&Se.title(P,d)},[P,d]),c.useEffect(()=>{typeof D<"u"&&P!==null&&Se.zoomOnClick(P,D)},[P,D]),c.useEffect(()=>{if(j){var $=bw({},r||Dw),R=new $f(j,[],$);return n&&Se.averageCenter(R,n),i&&Se.batchSizeIE(R,i),s&&Se.calculator(R,s),a&&Se.clusterClass(R,a),o&&Se.enableRetinaIcons(R,o),u&&Se.gridSize(R,u),l&&Se.ignoreHidden(R,l),f&&Se.imageExtension(R,f),p&&Se.imagePath(R,p),h&&Se.imageSizes(R,h),y&&Se.maxZoom(R,y),v&&Se.minimumClusterSize(R,v),g&&Se.styles(R,g),d&&Se.title(R,d),D&&Se.zoomOnClick(R,D),x&&ie(google.maps.event.addListener(R,Et.onMouseOut,x)),b&&G(google.maps.event.addListener(R,Et.onMouseOver,b)),E&&W(google.maps.event.addListener(R,Et.onClick,E)),B&&z(google.maps.event.addListener(R,Et.onClusteringBegin,B)),w&&V(google.maps.event.addListener(R,Et.onClusteringEnd,w)),H(R),A&&A(R),()=>{Q!==null&&google.maps.event.removeListener(Q),k!==null&&google.maps.event.removeListener(k),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),Y!==null&&google.maps.event.removeListener(Y),U&&U(R)}}},[]),P!==null&&e(P)||null}c.memo(Ew);class ww extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{markerClusterer:null}),K(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var e=new $f(this.context,[],this.props.options);this.registeredEvents=Ce({updaterMap:Se,eventMap:Et,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({markerClusterer:e}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Se,eventMap:Et,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),De(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}K(ww,"contextType",me);function Qf(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var ed=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,r=function(f){f.returnValue=!1,f.preventDefault&&f.preventDefault(),e.enableEventPropagation||Qf(f)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var 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 s=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,o=s;a<o.length;a++){var u=o[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,Qf))}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",r),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 r=this.getMap();if(r instanceof google.maps.Map){var n=0,i=0,s=r.getBounds();s&&!s.contains(this.position)&&r.setCenter(this.position);var a=r.getDiv(),o=a.offsetWidth,u=a.offsetHeight,l=this.pixelOffset.width,f=this.pixelOffset.height,p=this.div.offsetWidth,h=this.div.offsetHeight,y=this.infoBoxClearance.width,v=this.infoBoxClearance.height,g=this.getProjection(),d=g.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+y?n=d.x+l-y:d.x+p+l+y>o&&(n=d.x+p+l+y-o),this.alignBottom?d.y<-f+v+h?i=d.y+f-v-h:d.y+f+v>u&&(i=d.y+f+v-u):d.y<-f+v?i=d.y+f-v:d.y+h+f+v>u&&(i=d.y+h+f+v-u)),n===0&&i===0||r.panBy(n,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.div.style[r]=e[r]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var r=this.div.ownerDocument,n=r&&r.defaultView?r.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.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(),r=e.fromLatLngToDivPixel(this.position);r!==null&&(this.div.style.left=r.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(r.y+this.pixelOffset.height)+"px":this.div.style.top=r.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},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,r){var n=this;r&&(this.position=r.getPosition(),this.moveListener=google.maps.event.addListener(r,"position_changed",function(){var i=r.getPosition();n.setPosition(i)}),this.mapListener=google.maps.event.addListener(r,"map_changed",function(){n.setMap(r.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,r=this.eventListeners;e<r.length;e++){var n=r[e];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,r){return(function(i){for(var s in i.prototype)Object.prototype.hasOwnProperty.call(this,s)||(this.prototype[s]=i.prototype[s]);return this}).apply(e,[r])},t}(),Ow=["position"],xw=["position"];function td(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?td(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):td(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var rd={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},nd={options(t,e){t.setOptions(e)},position(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Bw={};function Sw(t){var{children:e,anchor:r,options:n,position:i,zIndex:s,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:l,onZindexChanged:f,onLoad:p,onUnmount:h}=t,y=c.useContext(me),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,A]=c.useState(null),[U,P]=c.useState(null),H=c.useRef(null);return c.useEffect(()=>{y&&v!==null&&(v.close(),r?v.open(y,r):v.getPosition()&&v.open(y))},[y,v,r]),c.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),c.useEffect(()=>{if(i&&v!==null){var j=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(j)}},[i]),c.useEffect(()=>{typeof s=="number"&&v!==null&&v.setZIndex(s)},[s]),c.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(v,"closeclick",a)))},[a]),c.useEffect(()=>{v&&o&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"domready",o)))},[o]),c.useEffect(()=>{v&&u&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(()=>{v&&l&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(()=>{v&&f&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(()=>{if(y){var j=n||Bw,{position:M}=j,W=Ha(j,Ow),_;M&&!(M instanceof google.maps.LatLng)&&(_=new google.maps.LatLng(M.lat,M.lng));var z=new ed(Ni(Ni({},W),_?{position:_}:{}));H.current=document.createElement("div"),g(z),a&&D(google.maps.event.addListener(z,"closeclick",a)),o&&B(google.maps.event.addListener(z,"domready",o)),u&&b(google.maps.event.addListener(z,"content_changed",u)),l&&A(google.maps.event.addListener(z,"position_changed",l)),f&&P(google.maps.event.addListener(z,"zindex_changed",f)),z.setContent(H.current),r?z.open(y,r):z.getPosition()?z.open(y):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(z)}return()=>{v!==null&&(d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),h&&h(v),v.close())}},[]),H.current?or.createPortal(c.Children.only(e),H.current):null}c.memo(Sw);class Aw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",null),K(this,"state",{infoBox:null}),K(this,"open",(e,r)=>{r?this.context!==null&&e.open(this.context,r):e.getPosition()?this.context!==null&&e.open(this.context):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),K(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var e=this.props.options||{},{position:r}=e,n=Ha(e,xw),i;r&&!(r instanceof google.maps.LatLng)&&(i=new google.maps.LatLng(r.lat,r.lng));var s=new ed(Ni(Ni({},n),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Ce({updaterMap:nd,eventMap:rd,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:r}=this.state;r!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:nd,eventMap:rd,prevProps:e,nextProps:this.props,instance:r}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:r}=this.state;r!==null&&(e&&e(r),De(this.registeredEvents),r.close())}render(){return this.containerElement?or.createPortal(c.Children.only(this.props.children),this.containerElement):null}}K(Aw,"contextType",me);var Ua,id;function Lw(){return id||(id=1,Ua=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),Ua}var Pw=Lw(),sd=Sf(Pw),ad=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ra=1,wn=8;class Va{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");var i=n>>4;if(i!==Ra)throw new Error("Got v".concat(i," data when expected v").concat(Ra,"."));var s=ad[n&15];if(!s)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Va(o,a,s,e)}constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,i=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var s=ad.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-o%8)%8;if(s<0)throw new Error("Unexpected typed array class: ".concat(n,"."));i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,wn,e),this.coords=new this.ArrayType(this.data,wn+o+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(wn+a+o+u),this.ids=new this.IndexArrayType(this.data,wn,e),this.coords=new this.ArrayType(this.data,wn+o+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ra<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return qa(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:a,nodeSize:o}=this,u=[0,s.length-1,0],l=[];u.length;){var f=u.pop()||0,p=u.pop()||0,h=u.pop()||0;if(p-h<=o){for(var y=h;y<=p;y++){var v=a[2*y],g=a[2*y+1];v>=e&&v<=n&&g>=r&&g<=i&&l.push(s[y])}continue}var d=h+p>>1,D=a[2*d],E=a[2*d+1];D>=e&&D<=n&&E>=r&&E<=i&&l.push(s[d]),(f===0?e<=D:r<=E)&&(u.push(h),u.push(d-1),u.push(1-f)),(f===0?n>=D:i>=E)&&(u.push(d+1),u.push(p),u.push(1-f))}return l}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:i,coords:s,nodeSize:a}=this,o=[0,i.length-1,0],u=[],l=n*n;o.length;){var f=o.pop()||0,p=o.pop()||0,h=o.pop()||0;if(p-h<=a){for(var y=h;y<=p;y++)ud(s[2*y],s[2*y+1],e,r)<=l&&u.push(i[y]);continue}var v=h+p>>1,g=s[2*v],d=s[2*v+1];ud(g,d,e,r)<=l&&u.push(i[v]),(f===0?e-n<=g:r-n<=d)&&(o.push(h),o.push(v-1),o.push(1-f)),(f===0?e+n>=g:r+n>=d)&&(o.push(v+1),o.push(p),o.push(1-f))}return u}}function qa(t,e,r,n,i,s){if(!(i-n<=r)){var a=n+i>>1;od(t,e,a,n,i,s),qa(t,e,r,n,a-1,1-s),qa(t,e,r,a+1,i,1-s)}}function od(t,e,r,n,i,s){for(;i>n;){if(i-n>600){var a=i-n+1,o=r-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*l*(a-l)/a)*(o-a/2<0?-1:1),p=Math.max(n,Math.floor(r-o*l/a+f)),h=Math.min(i,Math.floor(r+(a-o)*l/a+f));od(t,e,r,p,h,s)}var y=e[2*r+s],v=n,g=i;for(On(t,e,n,r),e[2*i+s]>y&&On(t,e,n,i);v<g;){for(On(t,e,v,g),v++,g--;e[2*v+s]<y;)v++;for(;e[2*g+s]>y;)g--}e[2*n+s]===y?On(t,e,n,g):(g++,On(t,e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}function On(t,e,r,n){Ga(t,r,n),Ga(e,2*r,2*n),Ga(e,2*r+1,2*n+1)}function Ga(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ud(t,e,r,n){var i=t-r,s=e-n;return i*i+s*s}var Fw={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ld=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),wr=2,Qt=3,Za=4,er=5,cd=6;class Tw{constructor(e){this.options=Object.assign(Object.create(Fw),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:r,minZoom:n,maxZoom:i}=this.options;r&&console.time("total time");var s="prepare ".concat(e.length," points");r&&console.time(s),this.points=e;for(var a=[],o=0;o<e.length;o++){var u=e[o];if(u.geometry){var[l,f]=u.geometry.coordinates,p=ld(_i(l)),h=ld(zi(f));a.push(p,h,1/0,o,-1,1),this.options.reduce&&a.push(0)}}var y=this.trees[i+1]=this._createTree(a);r&&console.timeEnd(s);for(var v=i;v>=n;v--){var g=+Date.now();y=this.trees[v]=this._createTree(this._cluster(y,v)),r&&console.log("z%d: %d clusters in %dms",v,y.numItems,+Date.now()-g)}return r&&console.timeEnd("total time"),this}getClusters(e,r){var n=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),s=e[2]===180?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){var o=this.getClusters([n,i,180,a],r),u=this.getClusters([-180,i,s,a],r);return o.concat(u)}var l=this.trees[this._limitZoom(r)],f=l.range(_i(n),zi(a),_i(s),zi(i)),p=l.data,h=[];for(var y of f){var v=this.stride*y;h.push(p[v+er]>1?fd(p,v,this.clusterProps):this.points[p[v+Qt]])}return h}getChildren(e){var r=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(i);var a=s.data;if(r*this.stride>=a.length)throw new Error(i);var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=a[r*this.stride],l=a[r*this.stride+1],f=s.within(u,l,o),p=[];for(var h of f){var y=h*this.stride;a[y+Za]===e&&p.push(a[y+er]>1?fd(a,y,this.clusterProps):this.points[a[y+Qt]])}if(p.length===0)throw new Error(i);return p}getLeaves(e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,e,r,n,0),i}getTile(e,r,n){var i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:a,radius:o}=this.options,u=o/a,l=(n-u)/s,f=(n+1+u)/s,p={features:[]};return this._addTileFeatures(i.range((r-u)/s,l,(r+1+u)/s,f),i.data,r,n,s,p),r===0&&this._addTileFeatures(i.range(1-u/s,l,1,f),i.data,s,n,s,p),r===s-1&&this._addTileFeatures(i.range(0,l,u/s,f),i.data,-1,n,s,p),p.features.length?p:null}getClusterExpansionZoom(e){for(var r=this._getOriginZoom(e)-1;r<=this.options.maxZoom;){var n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,i,s){var a=this.getChildren(r);for(var o of a){var u=o.properties;if(u&&u.cluster?s+u.point_count<=i?s+=u.point_count:s=this._appendLeaves(e,u.cluster_id,n,i,s):s<i?s++:e.push(o),e.length===n)break}return s}_createTree(e){for(var r=new Va(e.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,i,s,a){for(var o of e){var u=o*this.stride,l=r[u+er]>1,f=void 0,p=void 0,h=void 0;if(l)f=dd(r,u,this.clusterProps),p=r[u],h=r[u+1];else{var y=this.points[r[u+Qt]];f=y.properties;var[v,g]=y.geometry.coordinates;p=_i(v),h=zi(g)}var d={type:1,geometry:[[Math.round(this.options.extent*(p*s-n)),Math.round(this.options.extent*(h*s-i))]],tags:f},D=void 0;l||this.options.generateId?D=r[u+Qt]:D=this.points[r[u+Qt]].id,D!==void 0&&(d.id=D),a.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){for(var{radius:n,extent:i,reduce:s,minPoints:a}=this.options,o=n/(i*Math.pow(2,r)),u=e.data,l=[],f=this.stride,p=0;p<u.length;p+=f)if(!(u[p+wr]<=r)){u[p+wr]=r;var h=u[p],y=u[p+1],v=e.within(u[p],u[p+1],o),g=u[p+er],d=g;for(var D of v){var E=D*f;u[E+wr]>r&&(d+=u[E+er])}if(d>g&&d>=a){var B=h*g,w=y*g,b=void 0,x=-1,A=((p/f|0)<<5)+(r+1)+this.points.length;for(var U of v){var P=U*f;if(!(u[P+wr]<=r)){u[P+wr]=r;var H=u[P+er];B+=u[P]*H,w+=u[P+1]*H,u[P+Za]=A,s&&(b||(b=this._map(u,p,!0),x=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(u,P)))}}u[p+Za]=A,l.push(B/d,w/d,1/0,A,-1,d),s&&l.push(x)}else{for(var j=0;j<f;j++)l.push(u[p+j]);if(d>1)for(var M of v){var W=M*f;if(!(u[W+wr]<=r)){u[W+wr]=r;for(var _=0;_<f;_++)l.push(u[W+_])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+er]>1){var i=this.clusterProps[e[r+cd]];return n?Object.assign({},i):i}var s=this.points[e[r+Qt]].properties,a=this.options.map(s);return n&&a===s?Object.assign({},a):a}}function fd(t,e,r){return{type:"Feature",id:t[e+Qt],properties:dd(t,e,r),geometry:{type:"Point",coordinates:[Mw(t[e]),kw(t[e+1])]}}}function dd(t,e,r){var n=t[e+er],i=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,s=t[e+cd],a=s===-1?{}:Object.assign({},r[s]);return Object.assign(a,{cluster:!0,cluster_id:t[e+Qt],point_count:n,point_count_abbreviated:i})}function _i(t){return t/360+.5}function zi(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Mw(t){return(t-.5)*360}function kw(t){var e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
78
+ `)),console.error(S)})},[e,E,n]);var B=c.useRef();return c.useEffect(function(){B.current&&u!==B.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"),B.current=u},[u]),{isLoaded:v,loadError:d,url:E}}var QE=["loadingElement","onLoad","onError","onUnmount","children"],ew=C.jsx(Nf,{});function tw(t){var{loadingElement:e,onLoad:r,onError:n,onUnmount:i,children:s}=t,a=Ha(t,QE),{isLoaded:o,loadError:u}=JE(a);return c.useEffect(function(){o&&typeof r=="function"&&r()},[o,r]),c.useEffect(function(){u&&typeof n=="function"&&n(u)},[u,n]),c.useEffect(function(){return()=>{i&&i()}},[i]),o?s:e||ew}c.memo(tw),typeof SuppressedError=="function"&&SuppressedError;var Wf;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Wf||(Wf={}));function Hf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ki(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Uf={},Rf={options(t,e){t.setOptions(e)}};function rw(t){var{options:e,onLoad:r,onUnmount:n}=t,i=c.useContext(me),[s,a]=c.useState(null);return c.useEffect(()=>{s!==null&&s.setMap(i)},[i]),c.useEffect(()=>{e&&s!==null&&s.setOptions(e)},[s,e]),c.useEffect(()=>{var o=new google.maps.TrafficLayer(ki(ki({},e),{},{map:i}));return a(o),r&&r(o),()=>{s!==null&&(n&&n(s),s.setMap(null))}},[]),null}c.memo(rw);class nw extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{trafficLayer:null}),K(this,"setTrafficLayerCallback",()=>{this.state.trafficLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)}),K(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(ki(ki({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Rf,eventMap:Uf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)}componentDidUpdate(e){this.state.trafficLayer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Rf,eventMap:Uf,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),De(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}K(nw,"contextType",me);function iw(t){var{onLoad:e,onUnmount:r}=t,n=c.useContext(me),[i,s]=c.useState(null);return c.useEffect(()=>{i!==null&&i.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.BicyclingLayer;return s(a),a.setMap(n),e&&e(a),()=>{a!==null&&(r&&r(a),a.setMap(null))}},[]),null}c.memo(iw);class sw extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{bicyclingLayer:null}),K(this,"setBicyclingLayerCallback",()=>{this.state.bicyclingLayer!==null&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))})}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState(()=>({bicyclingLayer:e}),this.setBicyclingLayerCallback)}componentWillUnmount(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}K(sw,"contextType",me);function aw(t){var{onLoad:e,onUnmount:r}=t,n=c.useContext(me),[i,s]=c.useState(null);return c.useEffect(()=>{i!==null&&i.setMap(n)},[n]),c.useEffect(()=>{var a=new google.maps.TransitLayer;return s(a),a.setMap(n),e&&e(a),()=>{i!==null&&(r&&r(i),i.setMap(null))}},[]),null}c.memo(aw);class ow extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{transitLayer:null}),K(this,"setTransitLayerCallback",()=>{this.state.transitLayer!==null&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))})}componentDidMount(){var e=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:e}},this.setTransitLayerCallback)}componentWillUnmount(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}K(ow,"contextType",me);function Vf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ji(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var qf={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Gf={drawingMode(t,e){t.setDrawingMode(e)},options(t,e){t.setOptions(e)}};function uw(t){var{options:e,drawingMode:r,onCircleComplete:n,onMarkerComplete:i,onOverlayComplete:s,onPolygonComplete:a,onPolylineComplete:o,onRectangleComplete:u,onLoad:l,onUnmount:f}=t,p=c.useContext(me),[h,y]=c.useState(null),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,S]=c.useState(null),[U,P]=c.useState(null);return c.useEffect(()=>{h!==null&&h.setMap(p)},[p]),c.useEffect(()=>{e&&h!==null&&h.setOptions(e)},[h,e]),c.useEffect(()=>{h!==null&&h.setDrawingMode(r??null)},[h,r]),c.useEffect(()=>{h&&n&&(v!==null&&google.maps.event.removeListener(v),g(google.maps.event.addListener(h,"circlecomplete",n)))},[h,n]),c.useEffect(()=>{h&&i&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(h,"markercomplete",i)))},[h,i]),c.useEffect(()=>{h&&s&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(h,"overlaycomplete",s)))},[h,s]),c.useEffect(()=>{h&&a&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(h,"polygoncomplete",a)))},[h,a]),c.useEffect(()=>{h&&o&&(x!==null&&google.maps.event.removeListener(x),S(google.maps.event.addListener(h,"polylinecomplete",o)))},[h,o]),c.useEffect(()=>{h&&u&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(h,"rectanglecomplete",u)))},[h,u]),c.useEffect(()=>{Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var H=new google.maps.drawing.DrawingManager(ji(ji({},e),{},{map:p}));return r&&H.setDrawingMode(r),n&&g(google.maps.event.addListener(H,"circlecomplete",n)),i&&D(google.maps.event.addListener(H,"markercomplete",i)),s&&B(google.maps.event.addListener(H,"overlaycomplete",s)),a&&b(google.maps.event.addListener(H,"polygoncomplete",a)),o&&S(google.maps.event.addListener(H,"polylinecomplete",o)),u&&P(google.maps.event.addListener(H,"rectanglecomplete",u)),y(H),l&&l(H),()=>{h!==null&&(v&&google.maps.event.removeListener(v),d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),f&&f(h),h.setMap(null))}},[]),null}c.memo(uw);class lw extends c.PureComponent{constructor(e){super(e),K(this,"registeredEvents",[]),K(this,"state",{drawingManager:null}),K(this,"setDrawingManagerCallback",()=>{this.state.drawingManager!==null&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)}),Ze(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(ji(ji({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Gf,eventMap:qf,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)}componentDidUpdate(e){this.state.drawingManager!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Gf,eventMap:qf,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),De(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}K(lw,"contextType",me);function Zf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Kf={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"},Yf={animation(t,e){t.setAnimation(e)},clickable(t,e){t.setClickable(e)},cursor(t,e){t.setCursor(e)},draggable(t,e){t.setDraggable(e)},icon(t,e){t.setIcon(e)},label(t,e){t.setLabel(e)},map(t,e){t.setMap(e)},opacity(t,e){t.setOpacity(e)},options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},shape(t,e){t.setShape(e)},title(t,e){t.setTitle(e)},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Ii={};function cw(t){var{position:e,options:r,clusterer:n,noClustererRedraw:i,children:s,draggable:a,visible:o,animation:u,clickable:l,cursor:f,icon:p,label:h,opacity:y,shape:v,title:g,zIndex:d,onClick:D,onDblClick:E,onDrag:B,onDragEnd:w,onDragStart:b,onMouseOut:x,onMouseOver:S,onMouseUp:U,onMouseDown:P,onRightClick:H,onClickableChanged:j,onCursorChanged:M,onAnimationChanged:N,onDraggableChanged:z,onFlatChanged:W,onIconChanged:X,onPositionChanged:R,onShapeChanged:ne,onTitleChanged:Q,onVisibleChanged:k,onZindexChanged:G,onLoad:$,onUnmount:V}=t,re=c.useContext(me),[F,O]=c.useState(null),[_,T]=c.useState(null),[I,Z]=c.useState(null),[ee,J]=c.useState(null),[de,fe]=c.useState(null),[ce,we]=c.useState(null),[Me,Ae]=c.useState(null),[Ie,qe]=c.useState(null),[rt,Be]=c.useState(null),[Je,it]=c.useState(null),[Oe,Fe]=c.useState(null),[Qe,Ke]=c.useState(null),[et,Ct]=c.useState(null),[Ye,nr]=c.useState(null),[wt,St]=c.useState(null),[ir,Wr]=c.useState(null),[sr,Hr]=c.useState(null),[Mt,xr]=c.useState(null),[Wt,Ur]=c.useState(null),[ar,Sn]=c.useState(null),[Rr,An]=c.useState(null),[Vr,Ln]=c.useState(null);c.useEffect(()=>{F!==null&&F.setMap(re)},[re]),c.useEffect(()=>{typeof r<"u"&&F!==null&&F.setOptions(r)},[F,r]),c.useEffect(()=>{typeof a<"u"&&F!==null&&F.setDraggable(a)},[F,a]),c.useEffect(()=>{e&&F!==null&&F.setPosition(e)},[F,e]),c.useEffect(()=>{typeof o<"u"&&F!==null&&F.setVisible(o)},[F,o]),c.useEffect(()=>{F==null||F.setAnimation(u)},[F,u]),c.useEffect(()=>{F&&l!==void 0&&F.setClickable(l)},[F,l]),c.useEffect(()=>{F&&f!==void 0&&F.setCursor(f)},[F,f]),c.useEffect(()=>{F&&p!==void 0&&F.setIcon(p)},[F,p]),c.useEffect(()=>{F&&h!==void 0&&F.setLabel(h)},[F,h]),c.useEffect(()=>{F&&y!==void 0&&F.setOpacity(y)},[F,y]),c.useEffect(()=>{F&&v!==void 0&&F.setShape(v)},[F,v]),c.useEffect(()=>{F&&g!==void 0&&F.setTitle(g)},[F,g]),c.useEffect(()=>{F&&d!==void 0&&F.setZIndex(d)},[F,d]),c.useEffect(()=>{F&&E&&(_!==null&&google.maps.event.removeListener(_),T(google.maps.event.addListener(F,"dblclick",E)))},[E]),c.useEffect(()=>{F&&w&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(F,"dragend",w)))},[w]),c.useEffect(()=>{F&&b&&(ee!==null&&google.maps.event.removeListener(ee),J(google.maps.event.addListener(F,"dragstart",b)))},[b]),c.useEffect(()=>{F&&P&&(de!==null&&google.maps.event.removeListener(de),fe(google.maps.event.addListener(F,"mousedown",P)))},[P]),c.useEffect(()=>{F&&x&&(ce!==null&&google.maps.event.removeListener(ce),we(google.maps.event.addListener(F,"mouseout",x)))},[x]),c.useEffect(()=>{F&&S&&(Me!==null&&google.maps.event.removeListener(Me),Ae(google.maps.event.addListener(F,"mouseover",S)))},[S]),c.useEffect(()=>{F&&U&&(Ie!==null&&google.maps.event.removeListener(Ie),qe(google.maps.event.addListener(F,"mouseup",U)))},[U]),c.useEffect(()=>{F&&H&&(rt!==null&&google.maps.event.removeListener(rt),Be(google.maps.event.addListener(F,"rightclick",H)))},[H]),c.useEffect(()=>{F&&D&&(Je!==null&&google.maps.event.removeListener(Je),it(google.maps.event.addListener(F,"click",D)))},[D]),c.useEffect(()=>{F&&B&&(Oe!==null&&google.maps.event.removeListener(Oe),Fe(google.maps.event.addListener(F,"drag",B)))},[B]),c.useEffect(()=>{F&&j&&(Qe!==null&&google.maps.event.removeListener(Qe),Ke(google.maps.event.addListener(F,"clickable_changed",j)))},[j]),c.useEffect(()=>{F&&M&&(et!==null&&google.maps.event.removeListener(et),Ct(google.maps.event.addListener(F,"cursor_changed",M)))},[M]),c.useEffect(()=>{F&&N&&(Ye!==null&&google.maps.event.removeListener(Ye),nr(google.maps.event.addListener(F,"animation_changed",N)))},[N]),c.useEffect(()=>{F&&z&&(wt!==null&&google.maps.event.removeListener(wt),St(google.maps.event.addListener(F,"draggable_changed",z)))},[z]),c.useEffect(()=>{F&&W&&(ir!==null&&google.maps.event.removeListener(ir),Wr(google.maps.event.addListener(F,"flat_changed",W)))},[W]),c.useEffect(()=>{F&&X&&(sr!==null&&google.maps.event.removeListener(sr),Hr(google.maps.event.addListener(F,"icon_changed",X)))},[X]),c.useEffect(()=>{F&&R&&(Mt!==null&&google.maps.event.removeListener(Mt),xr(google.maps.event.addListener(F,"position_changed",R)))},[R]),c.useEffect(()=>{F&&ne&&(Wt!==null&&google.maps.event.removeListener(Wt),Ur(google.maps.event.addListener(F,"shape_changed",ne)))},[ne]),c.useEffect(()=>{F&&Q&&(ar!==null&&google.maps.event.removeListener(ar),Sn(google.maps.event.addListener(F,"title_changed",Q)))},[Q]),c.useEffect(()=>{F&&k&&(Rr!==null&&google.maps.event.removeListener(Rr),An(google.maps.event.addListener(F,"visible_changed",k)))},[k]),c.useEffect(()=>{F&&G&&(Vr!==null&&google.maps.event.removeListener(Vr),Ln(google.maps.event.addListener(F,"zindex_changed",G)))},[G]),c.useEffect(()=>{var Br=_r(_r(_r({},r||Ii),n?Ii:{map:re}),{},{position:e}),ge=new google.maps.Marker(Br);return n?n.addMarker(ge,!!i):ge.setMap(re),e&&ge.setPosition(e),typeof o<"u"&&ge.setVisible(o),typeof a<"u"&&ge.setDraggable(a),typeof l<"u"&&ge.setClickable(l),typeof f=="string"&&ge.setCursor(f),p&&ge.setIcon(p),typeof h<"u"&&ge.setLabel(h),typeof y<"u"&&ge.setOpacity(y),v&&ge.setShape(v),typeof g=="string"&&ge.setTitle(g),typeof d=="number"&&ge.setZIndex(d),E&&T(google.maps.event.addListener(ge,"dblclick",E)),w&&Z(google.maps.event.addListener(ge,"dragend",w)),b&&J(google.maps.event.addListener(ge,"dragstart",b)),P&&fe(google.maps.event.addListener(ge,"mousedown",P)),x&&we(google.maps.event.addListener(ge,"mouseout",x)),S&&Ae(google.maps.event.addListener(ge,"mouseover",S)),U&&qe(google.maps.event.addListener(ge,"mouseup",U)),H&&Be(google.maps.event.addListener(ge,"rightclick",H)),D&&it(google.maps.event.addListener(ge,"click",D)),B&&Fe(google.maps.event.addListener(ge,"drag",B)),j&&Ke(google.maps.event.addListener(ge,"clickable_changed",j)),M&&Ct(google.maps.event.addListener(ge,"cursor_changed",M)),N&&nr(google.maps.event.addListener(ge,"animation_changed",N)),z&&St(google.maps.event.addListener(ge,"draggable_changed",z)),W&&Wr(google.maps.event.addListener(ge,"flat_changed",W)),X&&Hr(google.maps.event.addListener(ge,"icon_changed",X)),R&&xr(google.maps.event.addListener(ge,"position_changed",R)),ne&&Ur(google.maps.event.addListener(ge,"shape_changed",ne)),Q&&Sn(google.maps.event.addListener(ge,"title_changed",Q)),k&&An(google.maps.event.addListener(ge,"visible_changed",k)),G&&Ln(google.maps.event.addListener(ge,"zindex_changed",G)),O(ge),$&&$(ge),()=>{_!==null&&google.maps.event.removeListener(_),I!==null&&google.maps.event.removeListener(I),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),ce!==null&&google.maps.event.removeListener(ce),Me!==null&&google.maps.event.removeListener(Me),Ie!==null&&google.maps.event.removeListener(Ie),rt!==null&&google.maps.event.removeListener(rt),Je!==null&&google.maps.event.removeListener(Je),Qe!==null&&google.maps.event.removeListener(Qe),et!==null&&google.maps.event.removeListener(et),Ye!==null&&google.maps.event.removeListener(Ye),wt!==null&&google.maps.event.removeListener(wt),ir!==null&&google.maps.event.removeListener(ir),sr!==null&&google.maps.event.removeListener(sr),Mt!==null&&google.maps.event.removeListener(Mt),ar!==null&&google.maps.event.removeListener(ar),Rr!==null&&google.maps.event.removeListener(Rr),Vr!==null&&google.maps.event.removeListener(Vr),V&&V(ge),n?n.removeMarker(ge,!!i):ge&&ge.setMap(null)}},[]);var $i=c.useMemo(()=>s?c.Children.map(s,Br=>{if(!c.isValidElement(Br))return Br;var ge=Br;return c.cloneElement(ge,{anchor:F})}):null,[s,F]);return C.jsx(C.Fragment,{children:$i})||null}c.memo(cw);class Xf extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[])}componentDidMount(){var e=this;return Tf(function*(){var r=_r(_r(_r({},e.props.options||Ii),e.props.clusterer?Ii:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(r),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=Ce({updaterMap:Yf,eventMap:Kf,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)})()}componentDidUpdate(e){this.marker&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Yf,eventMap:Kf,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),De(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){var e=this.props.children?c.Children.map(this.props.children,r=>{if(!c.isValidElement(r))return r;var n=r;return c.cloneElement(n,{anchor:this.marker})}):null;return e||null}}K(Xf,"contextType",me);var fw=function(){function t(e,r){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=r,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(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 r=this.cluster.getClusterer();if(google.maps.event.trigger(r,"click",this.cluster),google.maps.event.trigger(r,"clusterclick",this.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),i=this.cluster.getBounds(),s=r.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(i),this.timeOut=window.setTimeout(function(){var a=r.getMap();if(a!==null){"fitBounds"in a&&a.fitBounds(i);var o=a.getZoom()||0;n!==null&&o>n&&a.setZoom(n+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 r=this.getMap();r!==null&&(this.boundsChangedListener=google.maps.event.addListener(r,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},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,r,n,i,s,a;if(this.div&&this.center){var o=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),l=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((r=u[1])===null||r===void 0?void 0:r.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=o,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 y=document.createElement("div");y.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((n=this.sums)===null||n===void 0)&&n.text&&(y.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((s=this.sums)===null||s===void 0)&&s.html&&(y.innerHTML="".concat((a=this.sums)===null||a===void 0?void 0:a.html)),this.div.innerHTML="",this.div.appendChild(h),this.div.appendChild(y),this.div.title=o,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var r=this.cluster.getClusterer().getStyles(),n=r[Math.min(r.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var r=this.getProjection().fromLatLngToDivPixel(e);return r!==null&&(r.x-=this.anchorIcon[1],r.y-=this.anchorIcon[0]),r},t}(),dw=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 fw(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),r=this.getMarkers(),n=0,i=r;n<i.length;n++){var s=i[n],a=s.getPosition();a&&e.extend(a)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var r;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var n=e.getPosition();if(n){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+n.lat())/i,(this.center.lng()*(i-1)+n.lng())/i),this.calculateBounds()}}}else{var n=e.getPosition();n&&(this.center=n,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var s=this.markers.length,a=this.markerClusterer.getMaxZoom(),o=(r=this.map)===null||r===void 0?void 0:r.getZoom();if(a!==null&&typeof o<"u"&&o>a)e.getMap()!==this.map&&e.setMap(this.map);else if(s<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(s===this.minClusterSize)for(var u=0,l=this.markers;u<l.length;u++){var f=l[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var r=e.getPosition();if(r)return this.bounds.contains(r)}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,r=this.markers.length,n=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(n!==null&&typeof i<"u"&&i>n){this.clusterIcon.hide();return}if(r<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var r=0;r<this.markers.length;r++)if(e===this.markers[r])return!0;return!1},t}();function pw(t,e){var r=t.length,n=r.toString().length,i=Math.min(n,e);return{text:r.toString(),index:i,title:""}}var hw=2e3,vw=500,gw="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",mw="png",yw=[53,56,66,78,90],Cw="cluster",$f=function(){function t(e,r,n){r===void 0&&(r=[]),n===void 0&&(n={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,n.zoomOnClick!==void 0&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,n.averageCenter!==void 0&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,n.ignoreHidden!==void 0&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,n.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||gw,this.imageExtension=n.imageExtension||mw,this.imageSizes=n.imageSizes||yw,this.calculator=n.calculator||pw,this.batchSize=n.batchSize||hw,this.batchSizeIE=n.batchSizeIE||vw,this.clusterClass=n.clusterClass||Cw,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,r;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((r=this.getMap())===null||r===void 0?void 0:r.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},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,r=this.markers;e<r.length;e++){var n=r[e];n.getMap()!==this.activeMap&&n.setMap(this.activeMap)}for(var i=0,s=this.clusters;i<s.length;i++){var a=s[i];a.remove()}this.clusters=[];for(var o=0,u=this.listeners;o<u.length;o++){var l=u[o];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(),r=new google.maps.LatLngBounds,n=0,i=e;n<i.length;n++){var s=i[n],a=s.getPosition();a&&r.extend(a)}var o=this.getMap();o!==null&&"fitBounds"in o&&o.fitBounds(r)},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,r){this.pushMarkerTo(e),r||this.redraw()},t.prototype.addMarkers=function(e,r){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=e[n];i&&this.pushMarkerTo(i)}r||this.redraw()},t.prototype.pushMarkerTo=function(e){var r=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){r.ready&&(e.isAdded=!1,r.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var r=-1;if(this.markers.indexOf)r=this.markers.indexOf(e);else for(var n=0;n<this.markers.length;n++)if(e===this.markers[n]){r=n;break}return r===-1?!1:(e.setMap(null),this.markers.splice(r,1),!0)},t.prototype.removeMarker=function(e,r){var n=this.removeMarker_(e);return!r&&n&&this.repaint(),n},t.prototype.removeMarkers=function(e,r){for(var n=!1,i=0,s=e;i<s.length;i++){var a=s[i];n=n||this.removeMarker_(a)}return!r&&n&&this.repaint(),n},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 n=0,i=e;n<i.length;n++){var s=i[n];s.remove()}},0)},t.prototype.getExtendedBounds=function(e){var r=this.getProjection(),n=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));n!==null&&(n.x+=this.gridSize,n.y-=this.gridSize);var i=r.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),n!==null){var s=r.fromDivPixelToLatLng(n);s!==null&&e.extend(s)}if(i!==null){var a=r.fromDivPixelToLatLng(i);a!==null&&e.extend(a)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var r=0,n=this.clusters;r<n.length;r++){var i=n[r];i.remove()}this.clusters=[];for(var s=0,a=this.markers;s<a.length;s++){var o=a[s];o.isAdded=!1,e&&o.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,r){var n=6371,i=(r.lat()-e.lat())*Math.PI/180,s=(r.lng()-e.lng())*Math.PI/180,a=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(r.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return n*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},t.prototype.isMarkerInBounds=function(e,r){var n=e.getPosition();return n?r.contains(n):!1},t.prototype.addToClosestCluster=function(e){for(var r,n=4e4,i=null,s=0,a=this.clusters;s<a.length;s++){var o=a[s];r=o;var u=r.getCenter(),l=e.getPosition();if(u&&l){var f=this.distanceBetweenPoints(u,l);f<n&&(n=f,i=r)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(r=new dw(this),r.addMarker(e),this.clusters.push(r))},t.prototype.createClusters=function(e){var r=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 n=this.getMap(),i=n!==null&&("getBounds"in n)?n.getBounds():null,s=(n==null?void 0:n.getZoom())||0,a=s>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)),o=this.getExtendedBounds(a),u=Math.min(e+this.batchSize,this.markers.length),l=e;l<u;l++){var f=this.markers[l];f&&!f.isAdded&&this.isMarkerInBounds(f,o)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){r.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var p=0,h=this.clusters;p<h.length;p++){var y=h[p];y.updateIcon()}}}},t.prototype.extend=function(e,r){return(function(i){for(var s in i.prototype){var a=s;this.prototype[a]=i.prototype[a]}return this}).apply(e,[r])},t}();function Jf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jf(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Et={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},Se={averageCenter(t,e){t.setAverageCenter(e)},batchSizeIE(t,e){t.setBatchSizeIE(e)},calculator(t,e){t.setCalculator(e)},clusterClass(t,e){t.setClusterClass(e)},enableRetinaIcons(t,e){t.setEnableRetinaIcons(e)},gridSize(t,e){t.setGridSize(e)},ignoreHidden(t,e){t.setIgnoreHidden(e)},imageExtension(t,e){t.setImageExtension(e)},imagePath(t,e){t.setImagePath(e)},imageSizes(t,e){t.setImageSizes(e)},maxZoom(t,e){t.setMaxZoom(e)},minimumClusterSize(t,e){t.setMinimumClusterSize(e)},styles(t,e){t.setStyles(e)},title(t,e){t.setTitle(e)},zoomOnClick(t,e){t.setZoomOnClick(e)}},Dw={};function Ew(t){var{children:e,options:r,averageCenter:n,batchSizeIE:i,calculator:s,clusterClass:a,enableRetinaIcons:o,gridSize:u,ignoreHidden:l,imageExtension:f,imagePath:p,imageSizes:h,maxZoom:y,minimumClusterSize:v,styles:g,title:d,zoomOnClick:D,onClick:E,onClusteringBegin:B,onClusteringEnd:w,onMouseOver:b,onMouseOut:x,onLoad:S,onUnmount:U}=t,[P,H]=c.useState(null),j=c.useContext(me),[M,N]=c.useState(null),[z,W]=c.useState(null),[X,R]=c.useState(null),[ne,Q]=c.useState(null),[k,G]=c.useState(null);return c.useEffect(()=>{P&&x&&(ne!==null&&google.maps.event.removeListener(ne),Q(google.maps.event.addListener(P,Et.onMouseOut,x)))},[x]),c.useEffect(()=>{P&&b&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(P,Et.onMouseOver,b)))},[b]),c.useEffect(()=>{P&&E&&(M!==null&&google.maps.event.removeListener(M),N(google.maps.event.addListener(P,Et.onClick,E)))},[E]),c.useEffect(()=>{P&&B&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(P,Et.onClusteringBegin,B)))},[B]),c.useEffect(()=>{P&&w&&(X!==null&&google.maps.event.removeListener(X),W(google.maps.event.addListener(P,Et.onClusteringEnd,w)))},[w]),c.useEffect(()=>{typeof n<"u"&&P!==null&&Se.averageCenter(P,n)},[P,n]),c.useEffect(()=>{typeof i<"u"&&P!==null&&Se.batchSizeIE(P,i)},[P,i]),c.useEffect(()=>{typeof s<"u"&&P!==null&&Se.calculator(P,s)},[P,s]),c.useEffect(()=>{typeof a<"u"&&P!==null&&Se.clusterClass(P,a)},[P,a]),c.useEffect(()=>{typeof o<"u"&&P!==null&&Se.enableRetinaIcons(P,o)},[P,o]),c.useEffect(()=>{typeof u<"u"&&P!==null&&Se.gridSize(P,u)},[P,u]),c.useEffect(()=>{typeof l<"u"&&P!==null&&Se.ignoreHidden(P,l)},[P,l]),c.useEffect(()=>{typeof f<"u"&&P!==null&&Se.imageExtension(P,f)},[P,f]),c.useEffect(()=>{typeof p<"u"&&P!==null&&Se.imagePath(P,p)},[P,p]),c.useEffect(()=>{typeof h<"u"&&P!==null&&Se.imageSizes(P,h)},[P,h]),c.useEffect(()=>{typeof y<"u"&&P!==null&&Se.maxZoom(P,y)},[P,y]),c.useEffect(()=>{typeof v<"u"&&P!==null&&Se.minimumClusterSize(P,v)},[P,v]),c.useEffect(()=>{typeof g<"u"&&P!==null&&Se.styles(P,g)},[P,g]),c.useEffect(()=>{typeof d<"u"&&P!==null&&Se.title(P,d)},[P,d]),c.useEffect(()=>{typeof D<"u"&&P!==null&&Se.zoomOnClick(P,D)},[P,D]),c.useEffect(()=>{if(j){var $=bw({},r||Dw),V=new $f(j,[],$);return n&&Se.averageCenter(V,n),i&&Se.batchSizeIE(V,i),s&&Se.calculator(V,s),a&&Se.clusterClass(V,a),o&&Se.enableRetinaIcons(V,o),u&&Se.gridSize(V,u),l&&Se.ignoreHidden(V,l),f&&Se.imageExtension(V,f),p&&Se.imagePath(V,p),h&&Se.imageSizes(V,h),y&&Se.maxZoom(V,y),v&&Se.minimumClusterSize(V,v),g&&Se.styles(V,g),d&&Se.title(V,d),D&&Se.zoomOnClick(V,D),x&&Q(google.maps.event.addListener(V,Et.onMouseOut,x)),b&&G(google.maps.event.addListener(V,Et.onMouseOver,b)),E&&N(google.maps.event.addListener(V,Et.onClick,E)),B&&W(google.maps.event.addListener(V,Et.onClusteringBegin,B)),w&&R(google.maps.event.addListener(V,Et.onClusteringEnd,w)),H(V),S&&S(V),()=>{ne!==null&&google.maps.event.removeListener(ne),k!==null&&google.maps.event.removeListener(k),M!==null&&google.maps.event.removeListener(M),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),U&&U(V)}}},[]),P!==null&&e(P)||null}c.memo(Ew);class ww extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{markerClusterer:null}),K(this,"setClustererCallback",()=>{this.state.markerClusterer!==null&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)})}componentDidMount(){if(this.context){var e=new $f(this.context,[],this.props.options);this.registeredEvents=Ce({updaterMap:Se,eventMap:Et,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({markerClusterer:e}),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Se,eventMap:Et,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),De(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null}}K(ww,"contextType",me);function Qf(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var ed=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,r=function(f){f.returnValue=!1,f.preventDefault&&f.preventDefault(),e.enableEventPropagation||Qf(f)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var n=this.getPanes();if(n!==null&&n[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var 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 s=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0,o=s;a<o.length;a++){var u=o[a];this.eventListeners.push(google.maps.event.addListener(this.div,u,Qf))}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",r),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 r=this.getMap();if(r instanceof google.maps.Map){var n=0,i=0,s=r.getBounds();s&&!s.contains(this.position)&&r.setCenter(this.position);var a=r.getDiv(),o=a.offsetWidth,u=a.offsetHeight,l=this.pixelOffset.width,f=this.pixelOffset.height,p=this.div.offsetWidth,h=this.div.offsetHeight,y=this.infoBoxClearance.width,v=this.infoBoxClearance.height,g=this.getProjection(),d=g.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-l+y?n=d.x+l-y:d.x+p+l+y>o&&(n=d.x+p+l+y-o),this.alignBottom?d.y<-f+v+h?i=d.y+f-v-h:d.y+f+v>u&&(i=d.y+f+v-u):d.y<-f+v?i=d.y+f-v:d.y+h+f+v>u&&(i=d.y+h+f+v-u)),n===0&&i===0||r.panBy(n,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this.div.style[r]=e[r]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+n*100+')"',this.div.style.filter="alpha(opacity="+n*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var r=this.div.ownerDocument,n=r&&r.defaultView?r.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.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(),r=e.fromLatLngToDivPixel(this.position);r!==null&&(this.div.style.left=r.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(r.y+this.pixelOffset.height)+"px":this.div.style.top=r.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},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,r){var n=this;r&&(this.position=r.getPosition(),this.moveListener=google.maps.event.addListener(r,"position_changed",function(){var i=r.getPosition();n.setPosition(i)}),this.mapListener=google.maps.event.addListener(r,"map_changed",function(){n.setMap(r.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,r=this.eventListeners;e<r.length;e++){var n=r[e];google.maps.event.removeListener(n)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,r){return(function(i){for(var s in i.prototype)Object.prototype.hasOwnProperty.call(this,s)||(this.prototype[s]=i.prototype[s]);return this}).apply(e,[r])},t}(),Ow=["position"],xw=["position"];function td(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?td(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):td(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var rd={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},nd={options(t,e){t.setOptions(e)},position(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible(t,e){t.setVisible(e)},zIndex(t,e){t.setZIndex(e)}},Bw={};function Sw(t){var{children:e,anchor:r,options:n,position:i,zIndex:s,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:l,onZindexChanged:f,onLoad:p,onUnmount:h}=t,y=c.useContext(me),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,S]=c.useState(null),[U,P]=c.useState(null),H=c.useRef(null);return c.useEffect(()=>{y&&v!==null&&(v.close(),r?v.open(y,r):v.getPosition()&&v.open(y))},[y,v,r]),c.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),c.useEffect(()=>{if(i&&v!==null){var j=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(j)}},[i]),c.useEffect(()=>{typeof s=="number"&&v!==null&&v.setZIndex(s)},[s]),c.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(v,"closeclick",a)))},[a]),c.useEffect(()=>{v&&o&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"domready",o)))},[o]),c.useEffect(()=>{v&&u&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(()=>{v&&l&&(x!==null&&google.maps.event.removeListener(x),S(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(()=>{v&&f&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(()=>{if(y){var j=n||Bw,{position:M}=j,N=Ha(j,Ow),z;M&&!(M instanceof google.maps.LatLng)&&(z=new google.maps.LatLng(M.lat,M.lng));var W=new ed(Ni(Ni({},N),z?{position:z}:{}));H.current=document.createElement("div"),g(W),a&&D(google.maps.event.addListener(W,"closeclick",a)),o&&B(google.maps.event.addListener(W,"domready",o)),u&&b(google.maps.event.addListener(W,"content_changed",u)),l&&S(google.maps.event.addListener(W,"position_changed",l)),f&&P(google.maps.event.addListener(W,"zindex_changed",f)),W.setContent(H.current),r?W.open(y,r):W.getPosition()?W.open(y):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>."),p&&p(W)}return()=>{v!==null&&(d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),h&&h(v),v.close())}},[]),H.current?or.createPortal(c.Children.only(e),H.current):null}c.memo(Sw);class Aw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",null),K(this,"state",{infoBox:null}),K(this,"open",(e,r)=>{r?this.context!==null&&e.open(this.context,r):e.getPosition()?this.context!==null&&e.open(this.context):Ze(!1,"You must provide either an anchor or a position prop for <InfoBox>.")}),K(this,"setInfoBoxCallback",()=>{this.state.infoBox!==null&&this.containerElement!==null&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))})}componentDidMount(){var e=this.props.options||{},{position:r}=e,n=Ha(e,xw),i;r&&!(r instanceof google.maps.LatLng)&&(i=new google.maps.LatLng(r.lat,r.lng));var s=new ed(Ni(Ni({},n),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Ce({updaterMap:nd,eventMap:rd,prevProps:{},nextProps:this.props,instance:s}),this.setState({infoBox:s},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:r}=this.state;r!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:nd,eventMap:rd,prevProps:e,nextProps:this.props,instance:r}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:r}=this.state;r!==null&&(e&&e(r),De(this.registeredEvents),r.close())}render(){return this.containerElement?or.createPortal(c.Children.only(this.props.children),this.containerElement):null}}K(Aw,"contextType",me);var Ua,id;function Lw(){return id||(id=1,Ua=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),Ua}var Pw=Lw(),sd=Sf(Pw),ad=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ra=1,wn=8;class Va{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");var i=n>>4;if(i!==Ra)throw new Error("Got v".concat(i," data when expected v").concat(Ra,"."));var s=ad[n&15];if(!s)throw new Error("Unrecognized array type.");var[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Va(o,a,s,e)}constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:64,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Float64Array,i=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var s=ad.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-o%8)%8;if(s<0)throw new Error("Unexpected typed array class: ".concat(n,"."));i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,wn,e),this.coords=new this.ArrayType(this.data,wn+o+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(wn+a+o+u),this.ids=new this.IndexArrayType(this.data,wn,e),this.coords=new this.ArrayType(this.data,wn+o+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Ra<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return qa(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:s,coords:a,nodeSize:o}=this,u=[0,s.length-1,0],l=[];u.length;){var f=u.pop()||0,p=u.pop()||0,h=u.pop()||0;if(p-h<=o){for(var y=h;y<=p;y++){var v=a[2*y],g=a[2*y+1];v>=e&&v<=n&&g>=r&&g<=i&&l.push(s[y])}continue}var d=h+p>>1,D=a[2*d],E=a[2*d+1];D>=e&&D<=n&&E>=r&&E<=i&&l.push(s[d]),(f===0?e<=D:r<=E)&&(u.push(h),u.push(d-1),u.push(1-f)),(f===0?n>=D:i>=E)&&(u.push(d+1),u.push(p),u.push(1-f))}return l}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:i,coords:s,nodeSize:a}=this,o=[0,i.length-1,0],u=[],l=n*n;o.length;){var f=o.pop()||0,p=o.pop()||0,h=o.pop()||0;if(p-h<=a){for(var y=h;y<=p;y++)ud(s[2*y],s[2*y+1],e,r)<=l&&u.push(i[y]);continue}var v=h+p>>1,g=s[2*v],d=s[2*v+1];ud(g,d,e,r)<=l&&u.push(i[v]),(f===0?e-n<=g:r-n<=d)&&(o.push(h),o.push(v-1),o.push(1-f)),(f===0?e+n>=g:r+n>=d)&&(o.push(v+1),o.push(p),o.push(1-f))}return u}}function qa(t,e,r,n,i,s){if(!(i-n<=r)){var a=n+i>>1;od(t,e,a,n,i,s),qa(t,e,r,n,a-1,1-s),qa(t,e,r,a+1,i,1-s)}}function od(t,e,r,n,i,s){for(;i>n;){if(i-n>600){var a=i-n+1,o=r-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*l*(a-l)/a)*(o-a/2<0?-1:1),p=Math.max(n,Math.floor(r-o*l/a+f)),h=Math.min(i,Math.floor(r+(a-o)*l/a+f));od(t,e,r,p,h,s)}var y=e[2*r+s],v=n,g=i;for(On(t,e,n,r),e[2*i+s]>y&&On(t,e,n,i);v<g;){for(On(t,e,v,g),v++,g--;e[2*v+s]<y;)v++;for(;e[2*g+s]>y;)g--}e[2*n+s]===y?On(t,e,n,g):(g++,On(t,e,g,i)),g<=r&&(n=g+1),r<=g&&(i=g-1)}}function On(t,e,r,n){Ga(t,r,n),Ga(e,2*r,2*n),Ga(e,2*r+1,2*n+1)}function Ga(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ud(t,e,r,n){var i=t-r,s=e-n;return i*i+s*s}var Fw={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},ld=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),wr=2,Qt=3,Za=4,er=5,cd=6;class Tw{constructor(e){this.options=Object.assign(Object.create(Fw),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:r,minZoom:n,maxZoom:i}=this.options;r&&console.time("total time");var s="prepare ".concat(e.length," points");r&&console.time(s),this.points=e;for(var a=[],o=0;o<e.length;o++){var u=e[o];if(u.geometry){var[l,f]=u.geometry.coordinates,p=ld(_i(l)),h=ld(zi(f));a.push(p,h,1/0,o,-1,1),this.options.reduce&&a.push(0)}}var y=this.trees[i+1]=this._createTree(a);r&&console.timeEnd(s);for(var v=i;v>=n;v--){var g=+Date.now();y=this.trees[v]=this._createTree(this._cluster(y,v)),r&&console.log("z%d: %d clusters in %dms",v,y.numItems,+Date.now()-g)}return r&&console.timeEnd("total time"),this}getClusters(e,r){var n=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),s=e[2]===180?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){var o=this.getClusters([n,i,180,a],r),u=this.getClusters([-180,i,s,a],r);return o.concat(u)}var l=this.trees[this._limitZoom(r)],f=l.range(_i(n),zi(a),_i(s),zi(i)),p=l.data,h=[];for(var y of f){var v=this.stride*y;h.push(p[v+er]>1?fd(p,v,this.clusterProps):this.points[p[v+Qt]])}return h}getChildren(e){var r=this._getOriginId(e),n=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(i);var a=s.data;if(r*this.stride>=a.length)throw new Error(i);var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=a[r*this.stride],l=a[r*this.stride+1],f=s.within(u,l,o),p=[];for(var h of f){var y=h*this.stride;a[y+Za]===e&&p.push(a[y+er]>1?fd(a,y,this.clusterProps):this.points[a[y+Qt]])}if(p.length===0)throw new Error(i);return p}getLeaves(e,r,n){r=r||10,n=n||0;var i=[];return this._appendLeaves(i,e,r,n,0),i}getTile(e,r,n){var i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:a,radius:o}=this.options,u=o/a,l=(n-u)/s,f=(n+1+u)/s,p={features:[]};return this._addTileFeatures(i.range((r-u)/s,l,(r+1+u)/s,f),i.data,r,n,s,p),r===0&&this._addTileFeatures(i.range(1-u/s,l,1,f),i.data,s,n,s,p),r===s-1&&this._addTileFeatures(i.range(0,l,u/s,f),i.data,-1,n,s,p),p.features.length?p:null}getClusterExpansionZoom(e){for(var r=this._getOriginZoom(e)-1;r<=this.options.maxZoom;){var n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,i,s){var a=this.getChildren(r);for(var o of a){var u=o.properties;if(u&&u.cluster?s+u.point_count<=i?s+=u.point_count:s=this._appendLeaves(e,u.cluster_id,n,i,s):s<i?s++:e.push(o),e.length===n)break}return s}_createTree(e){for(var r=new Va(e.length/this.stride|0,this.options.nodeSize,Float32Array),n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,i,s,a){for(var o of e){var u=o*this.stride,l=r[u+er]>1,f=void 0,p=void 0,h=void 0;if(l)f=dd(r,u,this.clusterProps),p=r[u],h=r[u+1];else{var y=this.points[r[u+Qt]];f=y.properties;var[v,g]=y.geometry.coordinates;p=_i(v),h=zi(g)}var d={type:1,geometry:[[Math.round(this.options.extent*(p*s-n)),Math.round(this.options.extent*(h*s-i))]],tags:f},D=void 0;l||this.options.generateId?D=r[u+Qt]:D=this.points[r[u+Qt]].id,D!==void 0&&(d.id=D),a.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){for(var{radius:n,extent:i,reduce:s,minPoints:a}=this.options,o=n/(i*Math.pow(2,r)),u=e.data,l=[],f=this.stride,p=0;p<u.length;p+=f)if(!(u[p+wr]<=r)){u[p+wr]=r;var h=u[p],y=u[p+1],v=e.within(u[p],u[p+1],o),g=u[p+er],d=g;for(var D of v){var E=D*f;u[E+wr]>r&&(d+=u[E+er])}if(d>g&&d>=a){var B=h*g,w=y*g,b=void 0,x=-1,S=((p/f|0)<<5)+(r+1)+this.points.length;for(var U of v){var P=U*f;if(!(u[P+wr]<=r)){u[P+wr]=r;var H=u[P+er];B+=u[P]*H,w+=u[P+1]*H,u[P+Za]=S,s&&(b||(b=this._map(u,p,!0),x=this.clusterProps.length,this.clusterProps.push(b)),s(b,this._map(u,P)))}}u[p+Za]=S,l.push(B/d,w/d,1/0,S,-1,d),s&&l.push(x)}else{for(var j=0;j<f;j++)l.push(u[p+j]);if(d>1)for(var M of v){var N=M*f;if(!(u[N+wr]<=r)){u[N+wr]=r;for(var z=0;z<f;z++)l.push(u[N+z])}}}}return l}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+er]>1){var i=this.clusterProps[e[r+cd]];return n?Object.assign({},i):i}var s=this.points[e[r+Qt]].properties,a=this.options.map(s);return n&&a===s?Object.assign({},a):a}}function fd(t,e,r){return{type:"Feature",id:t[e+Qt],properties:dd(t,e,r),geometry:{type:"Point",coordinates:[Mw(t[e]),kw(t[e+1])]}}}function dd(t,e,r){var n=t[e+er],i=n>=1e4?"".concat(Math.round(n/1e3),"k"):n>=1e3?"".concat(Math.round(n/100)/10,"k"):n,s=t[e+cd],a=s===-1?{}:Object.assign({},r[s]);return Object.assign(a,{cluster:!0,cluster_id:t[e+Qt],point_count:n,point_count_abbreviated:i})}function _i(t){return t/360+.5}function zi(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Mw(t){return(t-.5)*360}function kw(t){var e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
79
79
  Copyright (c) Microsoft Corporation.
80
80
 
81
81
  Permission to use, copy, modify, and/or distribute this software for any
@@ -93,7 +93,7 @@ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var J=ee(N,Z,re,F,O+"."+
93
93
  <circle cx="120" cy="120" opacity=".3" r="90" />
94
94
  <circle cx="120" cy="120" opacity=".2" r="110" />
95
95
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">`).concat(i,`</text>
96
- </svg>`),u="Cluster of ".concat(i," markers"),l=Number(google.maps.Marker.MAX_ZINDEX)+i;if(mt.isAdvancedMarkerAvailable(n)){var f=new DOMParser,p=f.parseFromString(o,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");var h={map:n,position:s,zIndex:l,title:u,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}var y={position:s,zIndex:l,title:u,icon:{url:"data:image/svg+xml;base64,".concat(btoa(o)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(y)}}function Hw(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}class Ya{constructor(){Hw(Ya,google.maps.OverlayView)}}var xn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(xn||(xn={}));var Uw=(t,e,r)=>{r.fitBounds(e.bounds)};class Rw extends Ya{constructor(e){var{map:r,markers:n=[],algorithmOptions:i={},algorithm:s=new _w(i),renderer:a=new Ww,onClusterClick:o=Uw}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=s,this.renderer=a,this.onClusterClick=o,r&&this.setMap(r)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){var n=this.markers.indexOf(e);return n===-1?!1:(mt.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){var n=!1;return e.forEach(i=>{n=this.removeMarker(i,!0)||n}),n&&!r&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,xn.CLUSTERING_BEGIN,this);var{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){var i=new Set;for(var s of r)s.markers.length==1&&i.add(s.markers[0]);var a=[];for(var o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||mt.setMap(o.marker,null):a.push(o.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>a.forEach(u=>mt.setMap(u,null)))}google.maps.event.trigger(this,xn.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(){var e=new zw(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,r),n.markers.forEach(i=>mt.setMap(i,null)),this.onClusterClick&&n.marker.addListener("click",i=>{google.maps.event.trigger(this,xn.CLUSTER_CLICK,n),this.onClusterClick(i,n,r)})),mt.setMap(n.marker,r)})}}function pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vw(t){var e=RE(),[r,n]=c.useState(null);return c.useEffect(()=>{if(e&&r===null){var i=new Rw(hd(hd({},t),{},{map:e}));n(i)}},[e]),r}function qw(t){var{children:e,options:r}=t,n=Vw(r);return n!==null?e(n):null}c.memo(qw);var vd={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},gd={options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},zIndex(t,e){t.setZIndex(e)}};function Gw(t){var{children:e,anchor:r,options:n,position:i,zIndex:s,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:l,onZindexChanged:f,onLoad:p,onUnmount:h}=t,y=c.useContext(me),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,A]=c.useState(null),[U,P]=c.useState(null),H=c.useRef(null);return c.useEffect(()=>{v!==null&&(v.close(),r?v.open(y,r):v.getPosition()&&v.open(y))},[y,v,r]),c.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),c.useEffect(()=>{i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(()=>{typeof s=="number"&&v!==null&&v.setZIndex(s)},[s]),c.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(v,"closeclick",a)))},[a]),c.useEffect(()=>{v&&o&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"domready",o)))},[o]),c.useEffect(()=>{v&&u&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(()=>{v&&l&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(()=>{v&&f&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(()=>{var j=new google.maps.InfoWindow(n);return g(j),H.current=document.createElement("div"),a&&D(google.maps.event.addListener(j,"closeclick",a)),o&&B(google.maps.event.addListener(j,"domready",o)),u&&b(google.maps.event.addListener(j,"content_changed",u)),l&&A(google.maps.event.addListener(j,"position_changed",l)),f&&P(google.maps.event.addListener(j,"zindex_changed",f)),j.setContent(H.current),i&&j.setPosition(i),s&&j.setZIndex(s),r?j.open(y,r):j.getPosition()?j.open(y):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(j),()=>{d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),h&&h(j),j.close()}},[]),H.current?or.createPortal(c.Children.only(e),H.current):null}c.memo(Gw);class Zw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",null),K(this,"state",{infoWindow:null}),K(this,"open",(e,r)=>{r?e.open(this.context,r):e.getPosition()?e.open(this.context):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),K(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=Ce({updaterMap:gd,eventMap:vd,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({infoWindow:e}),this.setInfoWindowCallback)}componentDidUpdate(e){this.state.infoWindow!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:gd,eventMap:vd,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(De(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?or.createPortal(c.Children.only(this.props.children),this.containerElement):null}}K(Zw,"contextType",me);function md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?md(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):md(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yd={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Cd={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},visible(t,e){t.setVisible(e)}},Kw={};function Yw(t){var{options:e,draggable:r,editable:n,visible:i,path:s,onDblClick:a,onDragEnd:o,onDragStart:u,onMouseDown:l,onMouseMove:f,onMouseOut:p,onMouseOver:h,onMouseUp:y,onRightClick:v,onClick:g,onDrag:d,onLoad:D,onUnmount:E}=t,B=c.useContext(me),[w,b]=c.useState(null),[x,A]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,W]=c.useState(null),[_,z]=c.useState(null),[Y,V]=c.useState(null),[Q,ie]=c.useState(null),[k,G]=c.useState(null),[$,R]=c.useState(null),[re,F]=c.useState(null),[O,N]=c.useState(null);return c.useEffect(()=>{w!==null&&w.setMap(B)},[B]),c.useEffect(()=>{typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(()=>{typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(()=>{typeof n<"u"&&w!==null&&w.setEditable(n)},[w,n]),c.useEffect(()=>{typeof i<"u"&&w!==null&&w.setVisible(i)},[w,i]),c.useEffect(()=>{typeof s<"u"&&w!==null&&w.setPath(s)},[w,s]),c.useEffect(()=>{w&&a&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(w,"dblclick",a)))},[a]),c.useEffect(()=>{w&&o&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(w,"dragend",o)))},[o]),c.useEffect(()=>{w&&u&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(()=>{w&&l&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(()=>{w&&f&&(_!==null&&google.maps.event.removeListener(_),z(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(()=>{w&&p&&(Y!==null&&google.maps.event.removeListener(Y),V(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(()=>{w&&h&&(Q!==null&&google.maps.event.removeListener(Q),ie(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(()=>{w&&y&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(w,"mouseup",y)))},[y]),c.useEffect(()=>{w&&v&&($!==null&&google.maps.event.removeListener($),R(google.maps.event.addListener(w,"rightclick",v)))},[v]),c.useEffect(()=>{w&&g&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(w,"click",g)))},[g]),c.useEffect(()=>{w&&d&&(O!==null&&google.maps.event.removeListener(O),N(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(()=>{var T=new google.maps.Polyline(Wi(Wi({},e||Kw),{},{map:B}));return s&&T.setPath(s),typeof i<"u"&&T.setVisible(i),typeof n<"u"&&T.setEditable(n),typeof r<"u"&&T.setDraggable(r),a&&A(google.maps.event.addListener(T,"dblclick",a)),o&&P(google.maps.event.addListener(T,"dragend",o)),u&&j(google.maps.event.addListener(T,"dragstart",u)),l&&W(google.maps.event.addListener(T,"mousedown",l)),f&&z(google.maps.event.addListener(T,"mousemove",f)),p&&V(google.maps.event.addListener(T,"mouseout",p)),h&&ie(google.maps.event.addListener(T,"mouseover",h)),y&&G(google.maps.event.addListener(T,"mouseup",y)),v&&R(google.maps.event.addListener(T,"rightclick",v)),g&&F(google.maps.event.addListener(T,"click",g)),d&&N(google.maps.event.addListener(T,"drag",d)),b(T),D&&D(T),()=>{x!==null&&google.maps.event.removeListener(x),U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),E&&E(T),T.setMap(null)}},[]),null}c.memo(Yw);class Xw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{polyline:null}),K(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var e=new google.maps.Polyline(Wi(Wi({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Cd,eventMap:yd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)}componentDidUpdate(e){this.state.polyline!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Cd,eventMap:yd,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),De(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}K(Xw,"contextType",me);function bd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ed={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},wd={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},paths(t,e){t.setPaths(e)},visible(t,e){t.setVisible(e)}};function $w(t){var{options:e,draggable:r,editable:n,visible:i,path:s,paths:a,onDblClick:o,onDragEnd:u,onDragStart:l,onMouseDown:f,onMouseMove:p,onMouseOut:h,onMouseOver:y,onMouseUp:v,onRightClick:g,onClick:d,onDrag:D,onLoad:E,onUnmount:B,onEdit:w}=t,b=c.useContext(me),[x,A]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,W]=c.useState(null),[_,z]=c.useState(null),[Y,V]=c.useState(null),[Q,ie]=c.useState(null),[k,G]=c.useState(null),[$,R]=c.useState(null),[re,F]=c.useState(null),[O,N]=c.useState(null),[T,I]=c.useState(null);return c.useEffect(()=>{x!==null&&x.setMap(b)},[b]),c.useEffect(()=>{typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(()=>{typeof r<"u"&&x!==null&&x.setDraggable(r)},[x,r]),c.useEffect(()=>{typeof n<"u"&&x!==null&&x.setEditable(n)},[x,n]),c.useEffect(()=>{typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),c.useEffect(()=>{typeof s<"u"&&x!==null&&x.setPath(s)},[x,s]),c.useEffect(()=>{typeof a<"u"&&x!==null&&x.setPaths(a)},[x,a]),c.useEffect(()=>{x&&typeof o=="function"&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(x,"dblclick",o)))},[o]),c.useEffect(()=>{x&&(google.maps.event.addListener(x.getPath(),"insert_at",()=>{w==null||w(x)}),google.maps.event.addListener(x.getPath(),"set_at",()=>{w==null||w(x)}),google.maps.event.addListener(x.getPath(),"remove_at",()=>{w==null||w(x)}))},[x,w]),c.useEffect(()=>{x&&typeof u=="function"&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(x,"dragend",u)))},[u]),c.useEffect(()=>{x&&typeof l=="function"&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(x,"dragstart",l)))},[l]),c.useEffect(()=>{x&&typeof f=="function"&&(_!==null&&google.maps.event.removeListener(_),z(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(()=>{x&&typeof p=="function"&&(Y!==null&&google.maps.event.removeListener(Y),V(google.maps.event.addListener(x,"mousemove",p)))},[p]),c.useEffect(()=>{x&&typeof h=="function"&&(Q!==null&&google.maps.event.removeListener(Q),ie(google.maps.event.addListener(x,"mouseout",h)))},[h]),c.useEffect(()=>{x&&typeof y=="function"&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(x,"mouseover",y)))},[y]),c.useEffect(()=>{x&&typeof v=="function"&&($!==null&&google.maps.event.removeListener($),R(google.maps.event.addListener(x,"mouseup",v)))},[v]),c.useEffect(()=>{x&&typeof g=="function"&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(x,"rightclick",g)))},[g]),c.useEffect(()=>{x&&typeof d=="function"&&(O!==null&&google.maps.event.removeListener(O),N(google.maps.event.addListener(x,"click",d)))},[d]),c.useEffect(()=>{x&&typeof D=="function"&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(x,"drag",D)))},[D]),c.useEffect(()=>{var Z=new google.maps.Polygon(Dd(Dd({},e),{},{map:b}));return s&&Z.setPath(s),a&&Z.setPaths(a),typeof i<"u"&&Z.setVisible(i),typeof n<"u"&&Z.setEditable(n),typeof r<"u"&&Z.setDraggable(r),o&&P(google.maps.event.addListener(Z,"dblclick",o)),u&&j(google.maps.event.addListener(Z,"dragend",u)),l&&W(google.maps.event.addListener(Z,"dragstart",l)),f&&z(google.maps.event.addListener(Z,"mousedown",f)),p&&V(google.maps.event.addListener(Z,"mousemove",p)),h&&ie(google.maps.event.addListener(Z,"mouseout",h)),y&&G(google.maps.event.addListener(Z,"mouseover",y)),v&&R(google.maps.event.addListener(Z,"mouseup",v)),g&&F(google.maps.event.addListener(Z,"rightclick",g)),d&&N(google.maps.event.addListener(Z,"click",d)),D&&I(google.maps.event.addListener(Z,"drag",D)),A(Z),E&&E(Z),()=>{U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),O!==null&&google.maps.event.removeListener(O),B&&B(Z),Z.setMap(null)}},[]),null}c.memo($w);class Jw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=Ce({updaterMap:wd,eventMap:Ed,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:wd,eventMap:Ed,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),De(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}K(Jw,"contextType",me);function Od(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Od(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Od(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var xd={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"},Bd={bounds(t,e){t.setBounds(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},visible(t,e){t.setVisible(e)}};function Qw(t){var{options:e,bounds:r,draggable:n,editable:i,visible:s,onDblClick:a,onDragEnd:o,onDragStart:u,onMouseDown:l,onMouseMove:f,onMouseOut:p,onMouseOver:h,onMouseUp:y,onRightClick:v,onClick:g,onDrag:d,onBoundsChanged:D,onLoad:E,onUnmount:B}=t,w=c.useContext(me),[b,x]=c.useState(null),[A,U]=c.useState(null),[P,H]=c.useState(null),[j,M]=c.useState(null),[W,_]=c.useState(null),[z,Y]=c.useState(null),[V,Q]=c.useState(null),[ie,k]=c.useState(null),[G,$]=c.useState(null),[R,re]=c.useState(null),[F,O]=c.useState(null),[N,T]=c.useState(null),[I,Z]=c.useState(null);return c.useEffect(()=>{b!==null&&b.setMap(w)},[w]),c.useEffect(()=>{typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(()=>{typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(()=>{typeof i<"u"&&b!==null&&b.setEditable(i)},[b,i]),c.useEffect(()=>{typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),c.useEffect(()=>{typeof r<"u"&&b!==null&&b.setBounds(r)},[b,r]),c.useEffect(()=>{b&&a&&(A!==null&&google.maps.event.removeListener(A),U(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(()=>{b&&o&&(P!==null&&google.maps.event.removeListener(P),H(google.maps.event.addListener(b,"dragend",o)))},[o]),c.useEffect(()=>{b&&u&&(j!==null&&google.maps.event.removeListener(j),M(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(()=>{b&&l&&(W!==null&&google.maps.event.removeListener(W),_(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(()=>{b&&f&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(()=>{b&&p&&(V!==null&&google.maps.event.removeListener(V),Q(google.maps.event.addListener(b,"mouseout",p)))},[p]),c.useEffect(()=>{b&&h&&(ie!==null&&google.maps.event.removeListener(ie),k(google.maps.event.addListener(b,"mouseover",h)))},[h]),c.useEffect(()=>{b&&y&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(()=>{b&&v&&(R!==null&&google.maps.event.removeListener(R),re(google.maps.event.addListener(b,"rightclick",v)))},[v]),c.useEffect(()=>{b&&g&&(F!==null&&google.maps.event.removeListener(F),O(google.maps.event.addListener(b,"click",g)))},[g]),c.useEffect(()=>{b&&d&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(b,"drag",d)))},[d]),c.useEffect(()=>{b&&D&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(b,"bounds_changed",D)))},[D]),c.useEffect(()=>{var ee=new google.maps.Rectangle(Hi(Hi({},e),{},{map:w}));return typeof s<"u"&&ee.setVisible(s),typeof i<"u"&&ee.setEditable(i),typeof n<"u"&&ee.setDraggable(n),typeof r<"u"&&ee.setBounds(r),a&&U(google.maps.event.addListener(ee,"dblclick",a)),o&&H(google.maps.event.addListener(ee,"dragend",o)),u&&M(google.maps.event.addListener(ee,"dragstart",u)),l&&_(google.maps.event.addListener(ee,"mousedown",l)),f&&Y(google.maps.event.addListener(ee,"mousemove",f)),p&&Q(google.maps.event.addListener(ee,"mouseout",p)),h&&k(google.maps.event.addListener(ee,"mouseover",h)),y&&$(google.maps.event.addListener(ee,"mouseup",y)),v&&re(google.maps.event.addListener(ee,"rightclick",v)),g&&O(google.maps.event.addListener(ee,"click",g)),d&&T(google.maps.event.addListener(ee,"drag",d)),D&&Z(google.maps.event.addListener(ee,"bounds_changed",D)),x(ee),E&&E(ee),()=>{A!==null&&google.maps.event.removeListener(A),P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),W!==null&&google.maps.event.removeListener(W),z!==null&&google.maps.event.removeListener(z),V!==null&&google.maps.event.removeListener(V),ie!==null&&google.maps.event.removeListener(ie),G!==null&&google.maps.event.removeListener(G),R!==null&&google.maps.event.removeListener(R),F!==null&&google.maps.event.removeListener(F),N!==null&&google.maps.event.removeListener(N),I!==null&&google.maps.event.removeListener(I),B&&B(ee),ee.setMap(null)}},[]),null}c.memo(Qw);class e1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{rectangle:null}),K(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var e=new google.maps.Rectangle(Hi(Hi({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Bd,eventMap:xd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)}componentDidUpdate(e){this.state.rectangle!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Bd,eventMap:xd,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),De(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}K(e1,"contextType",me);function Sd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ui(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ad={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"},Ld={center(t,e){t.setCenter(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},radius(t,e){t.setRadius(e)},visible(t,e){t.setVisible(e)}},t1={};function r1(t){var{options:e,center:r,radius:n,draggable:i,editable:s,visible:a,onDblClick:o,onDragEnd:u,onDragStart:l,onMouseDown:f,onMouseMove:p,onMouseOut:h,onMouseOver:y,onMouseUp:v,onRightClick:g,onClick:d,onDrag:D,onCenterChanged:E,onRadiusChanged:B,onLoad:w,onUnmount:b}=t,x=c.useContext(me),[A,U]=c.useState(null),[P,H]=c.useState(null),[j,M]=c.useState(null),[W,_]=c.useState(null),[z,Y]=c.useState(null),[V,Q]=c.useState(null),[ie,k]=c.useState(null),[G,$]=c.useState(null),[R,re]=c.useState(null),[F,O]=c.useState(null),[N,T]=c.useState(null),[I,Z]=c.useState(null),[ee,J]=c.useState(null),[de,fe]=c.useState(null);return c.useEffect(()=>{A!==null&&A.setMap(x)},[x]),c.useEffect(()=>{typeof e<"u"&&A!==null&&A.setOptions(e)},[A,e]),c.useEffect(()=>{typeof i<"u"&&A!==null&&A.setDraggable(i)},[A,i]),c.useEffect(()=>{typeof s<"u"&&A!==null&&A.setEditable(s)},[A,s]),c.useEffect(()=>{typeof a<"u"&&A!==null&&A.setVisible(a)},[A,a]),c.useEffect(()=>{typeof n=="number"&&A!==null&&A.setRadius(n)},[A,n]),c.useEffect(()=>{typeof r<"u"&&A!==null&&A.setCenter(r)},[A,r]),c.useEffect(()=>{A&&o&&(P!==null&&google.maps.event.removeListener(P),H(google.maps.event.addListener(A,"dblclick",o)))},[o]),c.useEffect(()=>{A&&u&&(j!==null&&google.maps.event.removeListener(j),M(google.maps.event.addListener(A,"dragend",u)))},[u]),c.useEffect(()=>{A&&l&&(W!==null&&google.maps.event.removeListener(W),_(google.maps.event.addListener(A,"dragstart",l)))},[l]),c.useEffect(()=>{A&&f&&(z!==null&&google.maps.event.removeListener(z),Y(google.maps.event.addListener(A,"mousedown",f)))},[f]),c.useEffect(()=>{A&&p&&(V!==null&&google.maps.event.removeListener(V),Q(google.maps.event.addListener(A,"mousemove",p)))},[p]),c.useEffect(()=>{A&&h&&(ie!==null&&google.maps.event.removeListener(ie),k(google.maps.event.addListener(A,"mouseout",h)))},[h]),c.useEffect(()=>{A&&y&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(A,"mouseover",y)))},[y]),c.useEffect(()=>{A&&v&&(R!==null&&google.maps.event.removeListener(R),re(google.maps.event.addListener(A,"mouseup",v)))},[v]),c.useEffect(()=>{A&&g&&(F!==null&&google.maps.event.removeListener(F),O(google.maps.event.addListener(A,"rightclick",g)))},[g]),c.useEffect(()=>{A&&d&&(N!==null&&google.maps.event.removeListener(N),T(google.maps.event.addListener(A,"click",d)))},[d]),c.useEffect(()=>{A&&D&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(A,"drag",D)))},[D]),c.useEffect(()=>{A&&E&&(ee!==null&&google.maps.event.removeListener(ee),J(google.maps.event.addListener(A,"center_changed",E)))},[d]),c.useEffect(()=>{A&&B&&(de!==null&&google.maps.event.removeListener(de),fe(google.maps.event.addListener(A,"radius_changed",B)))},[B]),c.useEffect(()=>{var ce=new google.maps.Circle(Ui(Ui({},e||t1),{},{map:x}));return typeof n=="number"&&ce.setRadius(n),typeof r<"u"&&ce.setCenter(r),typeof n=="number"&&ce.setRadius(n),typeof a<"u"&&ce.setVisible(a),typeof s<"u"&&ce.setEditable(s),typeof i<"u"&&ce.setDraggable(i),o&&H(google.maps.event.addListener(ce,"dblclick",o)),u&&M(google.maps.event.addListener(ce,"dragend",u)),l&&_(google.maps.event.addListener(ce,"dragstart",l)),f&&Y(google.maps.event.addListener(ce,"mousedown",f)),p&&Q(google.maps.event.addListener(ce,"mousemove",p)),h&&k(google.maps.event.addListener(ce,"mouseout",h)),y&&$(google.maps.event.addListener(ce,"mouseover",y)),v&&re(google.maps.event.addListener(ce,"mouseup",v)),g&&O(google.maps.event.addListener(ce,"rightclick",g)),d&&T(google.maps.event.addListener(ce,"click",d)),D&&Z(google.maps.event.addListener(ce,"drag",D)),E&&J(google.maps.event.addListener(ce,"center_changed",E)),B&&fe(google.maps.event.addListener(ce,"radius_changed",B)),U(ce),w&&w(ce),()=>{P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),W!==null&&google.maps.event.removeListener(W),z!==null&&google.maps.event.removeListener(z),V!==null&&google.maps.event.removeListener(V),ie!==null&&google.maps.event.removeListener(ie),G!==null&&google.maps.event.removeListener(G),R!==null&&google.maps.event.removeListener(R),F!==null&&google.maps.event.removeListener(F),N!==null&&google.maps.event.removeListener(N),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),b&&b(ce),ce.setMap(null)}},[]),null}c.memo(r1);class n1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{circle:null}),K(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var e=new google.maps.Circle(Ui(Ui({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Ld,eventMap:Ad,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)}componentDidUpdate(e){this.state.circle!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Ld,eventMap:Ad,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var e;this.props.onUnmount&&this.props.onUnmount(this.state.circle),De(this.registeredEvents),(e=this.state.circle)===null||e===void 0||e.setMap(null)}}render(){return null}}K(n1,"contextType",me);function Pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ri(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Fd={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Td={add(t,e){t.add(e)},addgeojson(t,e,r){t.addGeoJson(e,r)},contains(t,e){t.contains(e)},foreach(t,e){t.forEach(e)},loadgeojson(t,e,r,n){t.loadGeoJson(e,r,n)},overridestyle(t,e,r){t.overrideStyle(e,r)},remove(t,e){t.remove(e)},revertstyle(t,e){t.revertStyle(e)},controlposition(t,e){t.setControlPosition(e)},controls(t,e){t.setControls(e)},drawingmode(t,e){t.setDrawingMode(e)},map(t,e){t.setMap(e)},style(t,e){t.setStyle(e)},togeojson(t,e){t.toGeoJson(e)}};function i1(t){var{options:e,onClick:r,onDblClick:n,onMouseDown:i,onMouseMove:s,onMouseOut:a,onMouseOver:o,onMouseUp:u,onRightClick:l,onAddFeature:f,onRemoveFeature:p,onRemoveProperty:h,onSetGeometry:y,onSetProperty:v,onLoad:g,onUnmount:d}=t,D=c.useContext(me),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,A]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,W]=c.useState(null),[_,z]=c.useState(null),[Y,V]=c.useState(null),[Q,ie]=c.useState(null),[k,G]=c.useState(null),[$,R]=c.useState(null),[re,F]=c.useState(null),[O,N]=c.useState(null),[T,I]=c.useState(null);return c.useEffect(()=>{E!==null&&E.setMap(D)},[D]),c.useEffect(()=>{E&&n&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(E,"dblclick",n)))},[n]),c.useEffect(()=>{E&&i&&(x!==null&&google.maps.event.removeListener(x),A(google.maps.event.addListener(E,"mousedown",i)))},[i]),c.useEffect(()=>{E&&s&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(E,"mousemove",s)))},[s]),c.useEffect(()=>{E&&a&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(E,"mouseout",a)))},[a]),c.useEffect(()=>{E&&o&&(M!==null&&google.maps.event.removeListener(M),W(google.maps.event.addListener(E,"mouseover",o)))},[o]),c.useEffect(()=>{E&&u&&(_!==null&&google.maps.event.removeListener(_),z(google.maps.event.addListener(E,"mouseup",u)))},[u]),c.useEffect(()=>{E&&l&&(Y!==null&&google.maps.event.removeListener(Y),V(google.maps.event.addListener(E,"rightclick",l)))},[l]),c.useEffect(()=>{E&&r&&(Q!==null&&google.maps.event.removeListener(Q),ie(google.maps.event.addListener(E,"click",r)))},[r]),c.useEffect(()=>{E&&f&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(E,"addfeature",f)))},[f]),c.useEffect(()=>{E&&p&&($!==null&&google.maps.event.removeListener($),R(google.maps.event.addListener(E,"removefeature",p)))},[p]),c.useEffect(()=>{E&&h&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(E,"removeproperty",h)))},[h]),c.useEffect(()=>{E&&y&&(O!==null&&google.maps.event.removeListener(O),N(google.maps.event.addListener(E,"setgeometry",y)))},[y]),c.useEffect(()=>{E&&v&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(E,"setproperty",v)))},[v]),c.useEffect(()=>{if(D!==null){var Z=new google.maps.Data(Ri(Ri({},e),{},{map:D}));n&&b(google.maps.event.addListener(Z,"dblclick",n)),i&&A(google.maps.event.addListener(Z,"mousedown",i)),s&&P(google.maps.event.addListener(Z,"mousemove",s)),a&&j(google.maps.event.addListener(Z,"mouseout",a)),o&&W(google.maps.event.addListener(Z,"mouseover",o)),u&&z(google.maps.event.addListener(Z,"mouseup",u)),l&&V(google.maps.event.addListener(Z,"rightclick",l)),r&&ie(google.maps.event.addListener(Z,"click",r)),f&&G(google.maps.event.addListener(Z,"addfeature",f)),p&&R(google.maps.event.addListener(Z,"removefeature",p)),h&&F(google.maps.event.addListener(Z,"removeproperty",h)),y&&N(google.maps.event.addListener(Z,"setgeometry",y)),v&&I(google.maps.event.addListener(Z,"setproperty",v)),B(Z),g&&g(Z)}return()=>{E&&(w!==null&&google.maps.event.removeListener(w),x!==null&&google.maps.event.removeListener(x),U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),_!==null&&google.maps.event.removeListener(_),Y!==null&&google.maps.event.removeListener(Y),Q!==null&&google.maps.event.removeListener(Q),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),O!==null&&google.maps.event.removeListener(O),T!==null&&google.maps.event.removeListener(T),d&&d(E),E.setMap(null))}},[]),null}c.memo(i1);class s1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{data:null}),K(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var e=new google.maps.Data(Ri(Ri({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Td,eventMap:Fd,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({data:e}),this.setDataCallback)}}componentDidUpdate(e){this.state.data!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Td,eventMap:Fd,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),De(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}K(s1,"contextType",me);function Md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Md(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var jd={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Id={options(t,e){t.setOptions(e)},url(t,e){t.setUrl(e)},zIndex(t,e){t.setZIndex(e)}};class a1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{kmlLayer:null}),K(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var e=new google.maps.KmlLayer(kd(kd({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Id,eventMap:jd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)}componentDidUpdate(e){this.state.kmlLayer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Id,eventMap:jd,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),De(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}K(a1,"contextType",me);function Nd(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function o1(t,e){return new e(t.lat,t.lng)}function u1(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 l1(t,e,r){return t instanceof e?t:r(t,e)}function c1(t,e,r){return t instanceof e?t:r(t,e)}function f1(t,e,r){var n=t&&t.fromLatLngToDivPixel(r.getNorthEast()),i=t&&t.fromLatLngToDivPixel(r.getSouthWest());return n&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(n.y+e.y,"px"),width:"".concat(n.x-i.x-e.x,"px"),height:"".concat(i.y-n.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function d1(t,e,r){var n=t&&t.fromLatLngToDivPixel(r);if(n){var{x:i,y:s}=n;return{left:"".concat(i+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _d(t,e,r,n){return r!==void 0?f1(t,e,c1(r,google.maps.LatLngBounds,u1)):d1(t,e,l1(n,google.maps.LatLng,o1))}function p1(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function zd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function h1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v1(t,e,r,n,i){class s extends google.maps.OverlayView{constructor(o,u,l,f){super(),this.container=o,this.pane=u,this.position=l,this.bounds=f}onAdd(){var o,u=(o=this.getPanes())===null||o===void 0?void 0:o[this.pane];u==null||u.appendChild(this.container)}draw(){var o=this.getProjection(),u=h1({},this.container?Nd(this.container,i):{x:0,y:0}),l=_d(o,u,this.bounds,this.position);for(var[f,p]of Object.entries(l))this.container.style[f]=p}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new s(t,e,r,n)}function Wd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function g1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hd(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Ud(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 m1(t){var{position:e,bounds:r,mapPaneName:n,zIndex:i,onLoad:s,onUnmount:a,getPixelPositionOffset:o,children:u}=t,l=c.useContext(me),f=c.useMemo(()=>{var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(()=>v1(f,n,e,r,o),[f,n,e,r]);return c.useEffect(()=>(s==null||s(p),p==null||p.setMap(l),()=>{a==null||a(p),p==null||p.setMap(null)}),[l,p]),c.useEffect(()=>{f.style.zIndex="".concat(i)},[i,f]),to.createPortal(u,f)}c.memo(m1);class zr extends c.PureComponent{constructor(e){super(e),K(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),K(this,"updatePane",()=>{var n=this.props.mapPaneName,i=this.overlayView.getPanes();Ze(!!n,"OverlayView requires props.mapPaneName but got %s",n),i?this.setState({paneEl:i[n]}):this.setState({paneEl:null})}),K(this,"onAdd",()=>{var n,i;this.updatePane(),(n=(i=this.props).onLoad)===null||n===void 0||n.call(i,this.overlayView)}),K(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),i=g1({x:0,y:0},this.containerRef.current?Nd(this.containerRef.current,this.props.getPixelPositionOffset):{}),s=_d(n,i,this.props.bounds,this.props.position);if(!p1(s,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,o,u,l;this.setState({containerStyle:{top:(a=s.top)!==null&&a!==void 0?a:0,left:(o=s.left)!==null&&o!==void 0?o:0,width:(u=s.width)!==null&&u!==void 0?u:0,height:(l=s.height)!==null&&l!==void 0?l:0,position:"absolute"}})}}),K(this,"draw",()=>{this.onPositionElement()}),K(this,"onRemove",()=>{var n,i;this.setState(()=>({paneEl:null})),(n=(i=this.props).onUnmount)===null||n===void 0||n.call(i,this.overlayView)}),this.containerRef=c.createRef();var r=new google.maps.OverlayView;r.onAdd=this.onAdd,r.draw=this.draw,r.onRemove=this.onRemove,this.overlayView=r}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var r=Hd(e.position),n=Hd(this.props.position),i=Ud(e.bounds),s=Ud(this.props.bounds);(r!==n||i!==s)&&this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?to.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),e):null}}K(zr,"FLOAT_PANE","floatPane"),K(zr,"MAP_PANE","mapPane"),K(zr,"MARKER_LAYER","markerLayer"),K(zr,"OVERLAY_LAYER","overlayLayer"),K(zr,"OVERLAY_MOUSE_TARGET","overlayMouseTarget"),K(zr,"contextType",me);function y1(){}function Rd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var qd={onDblClick:"dblclick",onClick:"click"},Gd={opacity(t,e){t.setOpacity(e)}};function C1(t){var{url:e,bounds:r,options:n,visible:i}=t,s=c.useContext(me),a=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east)),o=c.useMemo(()=>new google.maps.GroundOverlay(e,a,n),[]);return c.useEffect(()=>{o!==null&&o.setMap(s)},[s]),c.useEffect(()=>{typeof e<"u"&&o!==null&&(o.set("url",e),o.setMap(s))},[o,e]),c.useEffect(()=>{typeof i<"u"&&o!==null&&o.setOpacity(i?1:0)},[o,i]),c.useEffect(()=>{var u=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east));typeof r<"u"&&o!==null&&(o.set("bounds",u),o.setMap(s))},[o,r]),null}c.memo(C1);class Zd extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{groundOverlay:null}),K(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){Ze(!!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 e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Vd(Vd({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Gd,eventMap:qd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)}componentDidUpdate(e){this.state.groundOverlay!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Gd,eventMap:qd,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}K(Zd,"defaultProps",{onLoad:y1}),K(Zd,"contextType",me);function Kd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Yd={},Xd={data(t,e){t.setData(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)}};function b1(t){var{data:e,onLoad:r,onUnmount:n,options:i}=t,s=c.useContext(me),[a,o]=c.useState(null);return c.useEffect(()=>{google.maps.visualization||Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(()=>{Ze(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(()=>{a!==null&&a.setMap(s)},[s]),c.useEffect(()=>{i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(()=>{var u=new google.maps.visualization.HeatmapLayer(Vi(Vi({},i),{},{data:e,map:s}));return o(u),r&&r(u),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(b1);class D1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{heatmapLayer:null}),K(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ze(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(Vi(Vi({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=Ce({updaterMap:Xd,eventMap:Yd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)}componentDidUpdate(e){De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Xd,eventMap:Yd,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),De(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}K(D1,"contextType",me);var $d={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Jd={register(t,e,r){t.registerPanoProvider(e,r)},links(t,e){t.setLinks(e)},motionTracking(t,e){t.setMotionTracking(e)},options(t,e){t.setOptions(e)},pano(t,e){t.setPano(e)},position(t,e){t.setPosition(e)},pov(t,e){t.setPov(e)},visible(t,e){t.setVisible(e)},zoom(t,e){t.setZoom(e)}};class E1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{streetViewPanorama:null}),K(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var e,r,n=(e=(r=this.context)===null||r===void 0?void 0:r.getStreetView())!==null&&e!==void 0?e:null;this.registeredEvents=Ce({updaterMap:Jd,eventMap:$d,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){this.state.streetViewPanorama!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Jd,eventMap:$d,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),De(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}K(E1,"contextType",me);class w1 extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{streetViewService:null}),K(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}K(w1,"contextType",me);var Qd={onDirectionsChanged:"directions_changed"},ep={directions(t,e){t.setDirections(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},panel(t,e){t.setPanel(e)},routeIndex(t,e){t.setRouteIndex(e)}};class O1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{directionsRenderer:null}),K(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Ce({updaterMap:ep,eventMap:Qd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)}componentDidUpdate(e){this.state.directionsRenderer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:ep,eventMap:Qd,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),De(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}K(O1,"contextType",me);var tp={onPlacesChanged:"places_changed"},rp={bounds(t,e){t.setBounds(e)}};class np extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",c.createRef()),K(this,"state",{searchBox:null}),K(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(Ze(!!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 e=this.containerElement.current.querySelector("input");if(e!==null){var r=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=Ce({updaterMap:rp,eventMap:tp,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}}componentDidUpdate(e){this.state.searchBox!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:rp,eventMap:tp,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),De(this.registeredEvents))}render(){return C.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})}}K(np,"contextType",me);var ip={onPlaceChanged:"place_changed"},sp={bounds(t,e){t.setBounds(e)},restrictions(t,e){t.setComponentRestrictions(e)},fields(t,e){t.setFields(e)},options(t,e){t.setOptions(e)},types(t,e){t.setTypes(e)}};class ap extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",c.createRef()),K(this,"state",{autocomplete:null}),K(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var e;Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(e=this.containerElement.current)===null||e===void 0?void 0:e.querySelector("input");if(r){var n=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Ce({updaterMap:sp,eventMap:ip,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(e){De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:sp,eventMap:ip,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&De(this.registeredEvents)}render(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})}}K(ap,"defaultProps",{className:""}),K(ap,"contextType",me);function x1({googleMapsApiKey:t,children:e,...r}){return C.jsx(_f,{libraries:["places","marker","maps"],googleMapsApiKey:t,...r,children:e})}function B1(t){const{children:e=!1}=t,[r,n]=c.useState([]);function i(l){return!!r.some(f=>f.key===l)}function s(l){var f;return(f=r.find(p=>p.key===l))==null?void 0:f.data}function a(l,f){const p=i(l);n(p?h=>[...h.filter(v=>v.key!==l),{key:l,data:f}]:[...r,{key:l,data:f}])}function o(l){n(r.filter(f=>f.key!==l))}function u(){n([])}return C.jsx(_a.Provider,{value:{modalIsOpen:i,modalData:s,openModal:a,closeModal:o,closeAll:u},children:e})}let S1={data:""},A1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||S1,L1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,P1=/\/\*[^]*?\*\/| +/g,op=/\n+/g,tr=(t,e)=>{let r="",n="",i="";for(let s in t){let a=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+a+";":n+=s[1]=="f"?tr(a,s):s+"{"+tr(a,s[1]=="k"?"":e)+"}":typeof a=="object"?n+=tr(a,e?e.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,o):o?o+" "+u:u)):s):a!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=tr.p?tr.p(s,a):s+":"+a+";")}return r+(e&&i?e+"{"+i+"}":i)+n},_t={},up=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+up(t[r]);return e}return t},F1=(t,e,r,n,i)=>{let s=up(t),a=_t[s]||(_t[s]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(s));if(!_t[a]){let u=s!==t?t:(l=>{let f,p,h=[{}];for(;f=L1.exec(l.replace(P1,""));)f[4]?h.shift():f[3]?(p=f[3].replace(op," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][f[1]]=f[2].replace(op," ").trim();return h[0]})(t);_t[a]=tr(i?{["@keyframes "+a]:u}:u,r?"":"."+a)}let o=r&&_t.g?_t.g:null;return r&&(_t.g=_t[a]),((u,l,f,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(_t[a],e,n,o),a},T1=(t,e,r)=>t.reduce((n,i,s)=>{let a=e[s];if(a&&a.call){let o=a(r),u=o&&o.props&&o.props.className||/^go/.test(o)&&o;a=u?"."+u:o&&typeof o=="object"?o.props?"":tr(o,""):o===!1?"":o}return n+i+(a??"")},"");function qi(t){let e=this||{},r=t.call?t(e.p):t;return F1(r.unshift?r.raw?T1(r,[].slice.call(arguments,1),e.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(e.p):i),{}):r,A1(e.target),e.g,e.o,e.k)}let lp,Xa,$a;qi.bind({g:1});let zt=qi.bind({k:1});function M1(t,e,r,n){tr.p=e,lp=t,Xa=r,$a=n}function rr(t,e){let r=this||{};return function(){let n=arguments;function i(s,a){let o=Object.assign({},s),u=o.className||i.className;r.p=Object.assign({theme:Xa&&Xa()},o),r.o=/ *go\d+/.test(u),o.className=qi.apply(r,n)+(u?" "+u:"");let l=t;return t[0]&&(l=o.as||t,delete o.as),$a&&l[0]&&$a(o),lp(l,o)}return i}}var k1=t=>typeof t=="function",Gi=(t,e)=>k1(t)?t(e):t,j1=(()=>{let t=0;return()=>(++t).toString()})(),cp=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),I1=20,Zi=new Map,N1=1e3,fp=t=>{if(Zi.has(t))return;let e=setTimeout(()=>{Zi.delete(t),Or({type:4,toastId:t})},N1);Zi.set(t,e)},_1=t=>{let e=Zi.get(t);e&&clearTimeout(e)},Ja=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,I1)};case 1:return e.toast.id&&_1(e.toast.id),{...t,toasts:t.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:r}=e;return t.toasts.find(s=>s.id===r.id)?Ja(t,{type:1,toast:r}):Ja(t,{type:0,toast:r});case 3:let{toastId:n}=e;return n?fp(n):t.toasts.forEach(s=>{fp(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,visible:!1}:s)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.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(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},Ki=[],Yi={toasts:[],pausedAt:void 0},Or=t=>{Yi=Ja(Yi,t),Ki.forEach(e=>{e(Yi)})},z1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},W1=(t={})=>{let[e,r]=c.useState(Yi);c.useEffect(()=>(Ki.push(r),()=>{let i=Ki.indexOf(r);i>-1&&Ki.splice(i,1)}),[e]);let n=e.toasts.map(i=>{var s,a;return{...t,...t[i.type],...i,duration:i.duration||((s=t[i.type])==null?void 0:s.duration)||(t==null?void 0:t.duration)||z1[i.type],style:{...t.style,...(a=t[i.type])==null?void 0:a.style,...i.style}}});return{...e,toasts:n}},H1=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||j1()}),Bn=t=>(e,r)=>{let n=H1(e,t,r);return Or({type:2,toast:n}),n.id},yt=(t,e)=>Bn("blank")(t,e);yt.error=Bn("error"),yt.success=Bn("success"),yt.loading=Bn("loading"),yt.custom=Bn("custom"),yt.dismiss=t=>{Or({type:3,toastId:t})},yt.remove=t=>Or({type:4,toastId:t}),yt.promise=(t,e,r)=>{let n=yt.loading(e.loading,{...r,...r==null?void 0:r.loading});return t.then(i=>(yt.success(Gi(e.success,i),{id:n,...r,...r==null?void 0:r.success}),i)).catch(i=>{yt.error(Gi(e.error,i),{id:n,...r,...r==null?void 0:r.error})}),t};var U1=(t,e)=>{Or({type:1,toast:{id:t,height:e}})},R1=()=>{Or({type:5,time:Date.now()})},V1=t=>{let{toasts:e,pausedAt:r}=W1(t);c.useEffect(()=>{if(r)return;let s=Date.now(),a=e.map(o=>{if(o.duration===1/0)return;let u=(o.duration||0)+o.pauseDuration-(s-o.createdAt);if(u<0){o.visible&&yt.dismiss(o.id);return}return setTimeout(()=>yt.dismiss(o.id),u)});return()=>{a.forEach(o=>o&&clearTimeout(o))}},[e,r]);let n=c.useCallback(()=>{r&&Or({type:6,time:Date.now()})},[r]),i=c.useCallback((s,a)=>{let{reverseOrder:o=!1,gutter:u=8,defaultPosition:l}=a||{},f=e.filter(y=>(y.position||l)===(s.position||l)&&y.height),p=f.findIndex(y=>y.id===s.id),h=f.filter((y,v)=>v<p&&y.visible).length;return f.filter(y=>y.visible).slice(...o?[h+1]:[0,h]).reduce((y,v)=>y+(v.height||0)+u,0)},[e]);return{toasts:e,handlers:{updateHeight:U1,startPause:R1,endPause:n,calculateOffset:i}}},q1=zt`
96
+ </svg>`),u="Cluster of ".concat(i," markers"),l=Number(google.maps.Marker.MAX_ZINDEX)+i;if(mt.isAdvancedMarkerAvailable(n)){var f=new DOMParser,p=f.parseFromString(o,"image/svg+xml").documentElement;p.setAttribute("transform","translate(0 25)");var h={map:n,position:s,zIndex:l,title:u,content:p};return new google.maps.marker.AdvancedMarkerElement(h)}var y={position:s,zIndex:l,title:u,icon:{url:"data:image/svg+xml;base64,".concat(btoa(o)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(y)}}function Hw(t,e){for(var r in e.prototype)t.prototype[r]=e.prototype[r]}class Ya{constructor(){Hw(Ya,google.maps.OverlayView)}}var xn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(xn||(xn={}));var Uw=(t,e,r)=>{r.fitBounds(e.bounds)};class Rw extends Ya{constructor(e){var{map:r,markers:n=[],algorithmOptions:i={},algorithm:s=new _w(i),renderer:a=new Ww,onClusterClick:o=Uw}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=s,this.renderer=a,this.onClusterClick=o,r&&this.setMap(r)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){var n=this.markers.indexOf(e);return n===-1?!1:(mt.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){var n=!1;return e.forEach(i=>{n=this.removeMarker(i,!0)||n}),n&&!r&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,xn.CLUSTERING_BEGIN,this);var{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){var i=new Set;for(var s of r)s.markers.length==1&&i.add(s.markers[0]);var a=[];for(var o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||mt.setMap(o.marker,null):a.push(o.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>a.forEach(u=>mt.setMap(u,null)))}google.maps.event.trigger(this,xn.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(){var e=new zw(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{n.markers.length===1?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,r),n.markers.forEach(i=>mt.setMap(i,null)),this.onClusterClick&&n.marker.addListener("click",i=>{google.maps.event.trigger(this,xn.CLUSTER_CLICK,n),this.onClusterClick(i,n,r)})),mt.setMap(n.marker,r)})}}function pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vw(t){var e=RE(),[r,n]=c.useState(null);return c.useEffect(()=>{if(e&&r===null){var i=new Rw(hd(hd({},t),{},{map:e}));n(i)}},[e]),r}function qw(t){var{children:e,options:r}=t,n=Vw(r);return n!==null?e(n):null}c.memo(qw);var vd={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},gd={options(t,e){t.setOptions(e)},position(t,e){t.setPosition(e)},zIndex(t,e){t.setZIndex(e)}};function Gw(t){var{children:e,anchor:r,options:n,position:i,zIndex:s,onCloseClick:a,onDomReady:o,onContentChanged:u,onPositionChanged:l,onZindexChanged:f,onLoad:p,onUnmount:h}=t,y=c.useContext(me),[v,g]=c.useState(null),[d,D]=c.useState(null),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,S]=c.useState(null),[U,P]=c.useState(null),H=c.useRef(null);return c.useEffect(()=>{v!==null&&(v.close(),r?v.open(y,r):v.getPosition()&&v.open(y))},[y,v,r]),c.useEffect(()=>{n&&v!==null&&v.setOptions(n)},[v,n]),c.useEffect(()=>{i&&v!==null&&v.setPosition(i)},[i]),c.useEffect(()=>{typeof s=="number"&&v!==null&&v.setZIndex(s)},[s]),c.useEffect(()=>{v&&a&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(v,"closeclick",a)))},[a]),c.useEffect(()=>{v&&o&&(E!==null&&google.maps.event.removeListener(E),B(google.maps.event.addListener(v,"domready",o)))},[o]),c.useEffect(()=>{v&&u&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(v,"content_changed",u)))},[u]),c.useEffect(()=>{v&&l&&(x!==null&&google.maps.event.removeListener(x),S(google.maps.event.addListener(v,"position_changed",l)))},[l]),c.useEffect(()=>{v&&f&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),c.useEffect(()=>{var j=new google.maps.InfoWindow(n);return g(j),H.current=document.createElement("div"),a&&D(google.maps.event.addListener(j,"closeclick",a)),o&&B(google.maps.event.addListener(j,"domready",o)),u&&b(google.maps.event.addListener(j,"content_changed",u)),l&&S(google.maps.event.addListener(j,"position_changed",l)),f&&P(google.maps.event.addListener(j,"zindex_changed",f)),j.setContent(H.current),i&&j.setPosition(i),s&&j.setZIndex(s),r?j.open(y,r):j.getPosition()?j.open(y):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),p&&p(j),()=>{d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),x&&google.maps.event.removeListener(x),U&&google.maps.event.removeListener(U),h&&h(j),j.close()}},[]),H.current?or.createPortal(c.Children.only(e),H.current):null}c.memo(Gw);class Zw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",null),K(this,"state",{infoWindow:null}),K(this,"open",(e,r)=>{r?e.open(this.context,r):e.getPosition()?e.open(this.context):Ze(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")}),K(this,"setInfoWindowCallback",()=>{this.state.infoWindow!==null&&this.containerElement!==null&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))})}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=Ce({updaterMap:gd,eventMap:vd,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({infoWindow:e}),this.setInfoWindowCallback)}componentDidUpdate(e){this.state.infoWindow!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:gd,eventMap:vd,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){this.state.infoWindow!==null&&(De(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?or.createPortal(c.Children.only(this.props.children),this.containerElement):null}}K(Zw,"contextType",me);function md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?md(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):md(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var yd={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Cd={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},visible(t,e){t.setVisible(e)}},Kw={};function Yw(t){var{options:e,draggable:r,editable:n,visible:i,path:s,onDblClick:a,onDragEnd:o,onDragStart:u,onMouseDown:l,onMouseMove:f,onMouseOut:p,onMouseOver:h,onMouseUp:y,onRightClick:v,onClick:g,onDrag:d,onLoad:D,onUnmount:E}=t,B=c.useContext(me),[w,b]=c.useState(null),[x,S]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,N]=c.useState(null),[z,W]=c.useState(null),[X,R]=c.useState(null),[ne,Q]=c.useState(null),[k,G]=c.useState(null),[$,V]=c.useState(null),[re,F]=c.useState(null),[O,_]=c.useState(null);return c.useEffect(()=>{w!==null&&w.setMap(B)},[B]),c.useEffect(()=>{typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),c.useEffect(()=>{typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),c.useEffect(()=>{typeof n<"u"&&w!==null&&w.setEditable(n)},[w,n]),c.useEffect(()=>{typeof i<"u"&&w!==null&&w.setVisible(i)},[w,i]),c.useEffect(()=>{typeof s<"u"&&w!==null&&w.setPath(s)},[w,s]),c.useEffect(()=>{w&&a&&(x!==null&&google.maps.event.removeListener(x),S(google.maps.event.addListener(w,"dblclick",a)))},[a]),c.useEffect(()=>{w&&o&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(w,"dragend",o)))},[o]),c.useEffect(()=>{w&&u&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(w,"dragstart",u)))},[u]),c.useEffect(()=>{w&&l&&(M!==null&&google.maps.event.removeListener(M),N(google.maps.event.addListener(w,"mousedown",l)))},[l]),c.useEffect(()=>{w&&f&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(w,"mousemove",f)))},[f]),c.useEffect(()=>{w&&p&&(X!==null&&google.maps.event.removeListener(X),R(google.maps.event.addListener(w,"mouseout",p)))},[p]),c.useEffect(()=>{w&&h&&(ne!==null&&google.maps.event.removeListener(ne),Q(google.maps.event.addListener(w,"mouseover",h)))},[h]),c.useEffect(()=>{w&&y&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(w,"mouseup",y)))},[y]),c.useEffect(()=>{w&&v&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(w,"rightclick",v)))},[v]),c.useEffect(()=>{w&&g&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(w,"click",g)))},[g]),c.useEffect(()=>{w&&d&&(O!==null&&google.maps.event.removeListener(O),_(google.maps.event.addListener(w,"drag",d)))},[d]),c.useEffect(()=>{var T=new google.maps.Polyline(Wi(Wi({},e||Kw),{},{map:B}));return s&&T.setPath(s),typeof i<"u"&&T.setVisible(i),typeof n<"u"&&T.setEditable(n),typeof r<"u"&&T.setDraggable(r),a&&S(google.maps.event.addListener(T,"dblclick",a)),o&&P(google.maps.event.addListener(T,"dragend",o)),u&&j(google.maps.event.addListener(T,"dragstart",u)),l&&N(google.maps.event.addListener(T,"mousedown",l)),f&&W(google.maps.event.addListener(T,"mousemove",f)),p&&R(google.maps.event.addListener(T,"mouseout",p)),h&&Q(google.maps.event.addListener(T,"mouseover",h)),y&&G(google.maps.event.addListener(T,"mouseup",y)),v&&V(google.maps.event.addListener(T,"rightclick",v)),g&&F(google.maps.event.addListener(T,"click",g)),d&&_(google.maps.event.addListener(T,"drag",d)),b(T),D&&D(T),()=>{x!==null&&google.maps.event.removeListener(x),U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),ne!==null&&google.maps.event.removeListener(ne),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),E&&E(T),T.setMap(null)}},[]),null}c.memo(Yw);class Xw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{polyline:null}),K(this,"setPolylineCallback",()=>{this.state.polyline!==null&&this.props.onLoad&&this.props.onLoad(this.state.polyline)})}componentDidMount(){var e=new google.maps.Polyline(Wi(Wi({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Cd,eventMap:yd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)}componentDidUpdate(e){this.state.polyline!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Cd,eventMap:yd,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),De(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}K(Xw,"contextType",me);function bd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ed={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},wd={draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},path(t,e){t.setPath(e)},paths(t,e){t.setPaths(e)},visible(t,e){t.setVisible(e)}};function $w(t){var{options:e,draggable:r,editable:n,visible:i,path:s,paths:a,onDblClick:o,onDragEnd:u,onDragStart:l,onMouseDown:f,onMouseMove:p,onMouseOut:h,onMouseOver:y,onMouseUp:v,onRightClick:g,onClick:d,onDrag:D,onLoad:E,onUnmount:B,onEdit:w}=t,b=c.useContext(me),[x,S]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,N]=c.useState(null),[z,W]=c.useState(null),[X,R]=c.useState(null),[ne,Q]=c.useState(null),[k,G]=c.useState(null),[$,V]=c.useState(null),[re,F]=c.useState(null),[O,_]=c.useState(null),[T,I]=c.useState(null);return c.useEffect(()=>{x!==null&&x.setMap(b)},[b]),c.useEffect(()=>{typeof e<"u"&&x!==null&&x.setOptions(e)},[x,e]),c.useEffect(()=>{typeof r<"u"&&x!==null&&x.setDraggable(r)},[x,r]),c.useEffect(()=>{typeof n<"u"&&x!==null&&x.setEditable(n)},[x,n]),c.useEffect(()=>{typeof i<"u"&&x!==null&&x.setVisible(i)},[x,i]),c.useEffect(()=>{typeof s<"u"&&x!==null&&x.setPath(s)},[x,s]),c.useEffect(()=>{typeof a<"u"&&x!==null&&x.setPaths(a)},[x,a]),c.useEffect(()=>{x&&typeof o=="function"&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(x,"dblclick",o)))},[o]),c.useEffect(()=>{x&&(google.maps.event.addListener(x.getPath(),"insert_at",()=>{w==null||w(x)}),google.maps.event.addListener(x.getPath(),"set_at",()=>{w==null||w(x)}),google.maps.event.addListener(x.getPath(),"remove_at",()=>{w==null||w(x)}))},[x,w]),c.useEffect(()=>{x&&typeof u=="function"&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(x,"dragend",u)))},[u]),c.useEffect(()=>{x&&typeof l=="function"&&(M!==null&&google.maps.event.removeListener(M),N(google.maps.event.addListener(x,"dragstart",l)))},[l]),c.useEffect(()=>{x&&typeof f=="function"&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(x,"mousedown",f)))},[f]),c.useEffect(()=>{x&&typeof p=="function"&&(X!==null&&google.maps.event.removeListener(X),R(google.maps.event.addListener(x,"mousemove",p)))},[p]),c.useEffect(()=>{x&&typeof h=="function"&&(ne!==null&&google.maps.event.removeListener(ne),Q(google.maps.event.addListener(x,"mouseout",h)))},[h]),c.useEffect(()=>{x&&typeof y=="function"&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(x,"mouseover",y)))},[y]),c.useEffect(()=>{x&&typeof v=="function"&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(x,"mouseup",v)))},[v]),c.useEffect(()=>{x&&typeof g=="function"&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(x,"rightclick",g)))},[g]),c.useEffect(()=>{x&&typeof d=="function"&&(O!==null&&google.maps.event.removeListener(O),_(google.maps.event.addListener(x,"click",d)))},[d]),c.useEffect(()=>{x&&typeof D=="function"&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(x,"drag",D)))},[D]),c.useEffect(()=>{var Z=new google.maps.Polygon(Dd(Dd({},e),{},{map:b}));return s&&Z.setPath(s),a&&Z.setPaths(a),typeof i<"u"&&Z.setVisible(i),typeof n<"u"&&Z.setEditable(n),typeof r<"u"&&Z.setDraggable(r),o&&P(google.maps.event.addListener(Z,"dblclick",o)),u&&j(google.maps.event.addListener(Z,"dragend",u)),l&&N(google.maps.event.addListener(Z,"dragstart",l)),f&&W(google.maps.event.addListener(Z,"mousedown",f)),p&&R(google.maps.event.addListener(Z,"mousemove",p)),h&&Q(google.maps.event.addListener(Z,"mouseout",h)),y&&G(google.maps.event.addListener(Z,"mouseover",y)),v&&V(google.maps.event.addListener(Z,"mouseup",v)),g&&F(google.maps.event.addListener(Z,"rightclick",g)),d&&_(google.maps.event.addListener(Z,"click",d)),D&&I(google.maps.event.addListener(Z,"drag",D)),S(Z),E&&E(Z),()=>{U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),ne!==null&&google.maps.event.removeListener(ne),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),O!==null&&google.maps.event.removeListener(O),B&&B(Z),Z.setMap(null)}},[]),null}c.memo($w);class Jw extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=Ce({updaterMap:wd,eventMap:Ed,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:wd,eventMap:Ed,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),De(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}K(Jw,"contextType",me);function Od(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Od(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Od(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var xd={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"},Bd={bounds(t,e){t.setBounds(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},visible(t,e){t.setVisible(e)}};function Qw(t){var{options:e,bounds:r,draggable:n,editable:i,visible:s,onDblClick:a,onDragEnd:o,onDragStart:u,onMouseDown:l,onMouseMove:f,onMouseOut:p,onMouseOver:h,onMouseUp:y,onRightClick:v,onClick:g,onDrag:d,onBoundsChanged:D,onLoad:E,onUnmount:B}=t,w=c.useContext(me),[b,x]=c.useState(null),[S,U]=c.useState(null),[P,H]=c.useState(null),[j,M]=c.useState(null),[N,z]=c.useState(null),[W,X]=c.useState(null),[R,ne]=c.useState(null),[Q,k]=c.useState(null),[G,$]=c.useState(null),[V,re]=c.useState(null),[F,O]=c.useState(null),[_,T]=c.useState(null),[I,Z]=c.useState(null);return c.useEffect(()=>{b!==null&&b.setMap(w)},[w]),c.useEffect(()=>{typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),c.useEffect(()=>{typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),c.useEffect(()=>{typeof i<"u"&&b!==null&&b.setEditable(i)},[b,i]),c.useEffect(()=>{typeof s<"u"&&b!==null&&b.setVisible(s)},[b,s]),c.useEffect(()=>{typeof r<"u"&&b!==null&&b.setBounds(r)},[b,r]),c.useEffect(()=>{b&&a&&(S!==null&&google.maps.event.removeListener(S),U(google.maps.event.addListener(b,"dblclick",a)))},[a]),c.useEffect(()=>{b&&o&&(P!==null&&google.maps.event.removeListener(P),H(google.maps.event.addListener(b,"dragend",o)))},[o]),c.useEffect(()=>{b&&u&&(j!==null&&google.maps.event.removeListener(j),M(google.maps.event.addListener(b,"dragstart",u)))},[u]),c.useEffect(()=>{b&&l&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(b,"mousedown",l)))},[l]),c.useEffect(()=>{b&&f&&(W!==null&&google.maps.event.removeListener(W),X(google.maps.event.addListener(b,"mousemove",f)))},[f]),c.useEffect(()=>{b&&p&&(R!==null&&google.maps.event.removeListener(R),ne(google.maps.event.addListener(b,"mouseout",p)))},[p]),c.useEffect(()=>{b&&h&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(b,"mouseover",h)))},[h]),c.useEffect(()=>{b&&y&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(b,"mouseup",y)))},[y]),c.useEffect(()=>{b&&v&&(V!==null&&google.maps.event.removeListener(V),re(google.maps.event.addListener(b,"rightclick",v)))},[v]),c.useEffect(()=>{b&&g&&(F!==null&&google.maps.event.removeListener(F),O(google.maps.event.addListener(b,"click",g)))},[g]),c.useEffect(()=>{b&&d&&(_!==null&&google.maps.event.removeListener(_),T(google.maps.event.addListener(b,"drag",d)))},[d]),c.useEffect(()=>{b&&D&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(b,"bounds_changed",D)))},[D]),c.useEffect(()=>{var ee=new google.maps.Rectangle(Hi(Hi({},e),{},{map:w}));return typeof s<"u"&&ee.setVisible(s),typeof i<"u"&&ee.setEditable(i),typeof n<"u"&&ee.setDraggable(n),typeof r<"u"&&ee.setBounds(r),a&&U(google.maps.event.addListener(ee,"dblclick",a)),o&&H(google.maps.event.addListener(ee,"dragend",o)),u&&M(google.maps.event.addListener(ee,"dragstart",u)),l&&z(google.maps.event.addListener(ee,"mousedown",l)),f&&X(google.maps.event.addListener(ee,"mousemove",f)),p&&ne(google.maps.event.addListener(ee,"mouseout",p)),h&&k(google.maps.event.addListener(ee,"mouseover",h)),y&&$(google.maps.event.addListener(ee,"mouseup",y)),v&&re(google.maps.event.addListener(ee,"rightclick",v)),g&&O(google.maps.event.addListener(ee,"click",g)),d&&T(google.maps.event.addListener(ee,"drag",d)),D&&Z(google.maps.event.addListener(ee,"bounds_changed",D)),x(ee),E&&E(ee),()=>{S!==null&&google.maps.event.removeListener(S),P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),R!==null&&google.maps.event.removeListener(R),Q!==null&&google.maps.event.removeListener(Q),G!==null&&google.maps.event.removeListener(G),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),_!==null&&google.maps.event.removeListener(_),I!==null&&google.maps.event.removeListener(I),B&&B(ee),ee.setMap(null)}},[]),null}c.memo(Qw);class e1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{rectangle:null}),K(this,"setRectangleCallback",()=>{this.state.rectangle!==null&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)})}componentDidMount(){var e=new google.maps.Rectangle(Hi(Hi({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Bd,eventMap:xd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)}componentDidUpdate(e){this.state.rectangle!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Bd,eventMap:xd,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),De(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}K(e1,"contextType",me);function Sd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ui(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ad={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"},Ld={center(t,e){t.setCenter(e)},draggable(t,e){t.setDraggable(e)},editable(t,e){t.setEditable(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},radius(t,e){t.setRadius(e)},visible(t,e){t.setVisible(e)}},t1={};function r1(t){var{options:e,center:r,radius:n,draggable:i,editable:s,visible:a,onDblClick:o,onDragEnd:u,onDragStart:l,onMouseDown:f,onMouseMove:p,onMouseOut:h,onMouseOver:y,onMouseUp:v,onRightClick:g,onClick:d,onDrag:D,onCenterChanged:E,onRadiusChanged:B,onLoad:w,onUnmount:b}=t,x=c.useContext(me),[S,U]=c.useState(null),[P,H]=c.useState(null),[j,M]=c.useState(null),[N,z]=c.useState(null),[W,X]=c.useState(null),[R,ne]=c.useState(null),[Q,k]=c.useState(null),[G,$]=c.useState(null),[V,re]=c.useState(null),[F,O]=c.useState(null),[_,T]=c.useState(null),[I,Z]=c.useState(null),[ee,J]=c.useState(null),[de,fe]=c.useState(null);return c.useEffect(()=>{S!==null&&S.setMap(x)},[x]),c.useEffect(()=>{typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),c.useEffect(()=>{typeof i<"u"&&S!==null&&S.setDraggable(i)},[S,i]),c.useEffect(()=>{typeof s<"u"&&S!==null&&S.setEditable(s)},[S,s]),c.useEffect(()=>{typeof a<"u"&&S!==null&&S.setVisible(a)},[S,a]),c.useEffect(()=>{typeof n=="number"&&S!==null&&S.setRadius(n)},[S,n]),c.useEffect(()=>{typeof r<"u"&&S!==null&&S.setCenter(r)},[S,r]),c.useEffect(()=>{S&&o&&(P!==null&&google.maps.event.removeListener(P),H(google.maps.event.addListener(S,"dblclick",o)))},[o]),c.useEffect(()=>{S&&u&&(j!==null&&google.maps.event.removeListener(j),M(google.maps.event.addListener(S,"dragend",u)))},[u]),c.useEffect(()=>{S&&l&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(S,"dragstart",l)))},[l]),c.useEffect(()=>{S&&f&&(W!==null&&google.maps.event.removeListener(W),X(google.maps.event.addListener(S,"mousedown",f)))},[f]),c.useEffect(()=>{S&&p&&(R!==null&&google.maps.event.removeListener(R),ne(google.maps.event.addListener(S,"mousemove",p)))},[p]),c.useEffect(()=>{S&&h&&(Q!==null&&google.maps.event.removeListener(Q),k(google.maps.event.addListener(S,"mouseout",h)))},[h]),c.useEffect(()=>{S&&y&&(G!==null&&google.maps.event.removeListener(G),$(google.maps.event.addListener(S,"mouseover",y)))},[y]),c.useEffect(()=>{S&&v&&(V!==null&&google.maps.event.removeListener(V),re(google.maps.event.addListener(S,"mouseup",v)))},[v]),c.useEffect(()=>{S&&g&&(F!==null&&google.maps.event.removeListener(F),O(google.maps.event.addListener(S,"rightclick",g)))},[g]),c.useEffect(()=>{S&&d&&(_!==null&&google.maps.event.removeListener(_),T(google.maps.event.addListener(S,"click",d)))},[d]),c.useEffect(()=>{S&&D&&(I!==null&&google.maps.event.removeListener(I),Z(google.maps.event.addListener(S,"drag",D)))},[D]),c.useEffect(()=>{S&&E&&(ee!==null&&google.maps.event.removeListener(ee),J(google.maps.event.addListener(S,"center_changed",E)))},[d]),c.useEffect(()=>{S&&B&&(de!==null&&google.maps.event.removeListener(de),fe(google.maps.event.addListener(S,"radius_changed",B)))},[B]),c.useEffect(()=>{var ce=new google.maps.Circle(Ui(Ui({},e||t1),{},{map:x}));return typeof n=="number"&&ce.setRadius(n),typeof r<"u"&&ce.setCenter(r),typeof n=="number"&&ce.setRadius(n),typeof a<"u"&&ce.setVisible(a),typeof s<"u"&&ce.setEditable(s),typeof i<"u"&&ce.setDraggable(i),o&&H(google.maps.event.addListener(ce,"dblclick",o)),u&&M(google.maps.event.addListener(ce,"dragend",u)),l&&z(google.maps.event.addListener(ce,"dragstart",l)),f&&X(google.maps.event.addListener(ce,"mousedown",f)),p&&ne(google.maps.event.addListener(ce,"mousemove",p)),h&&k(google.maps.event.addListener(ce,"mouseout",h)),y&&$(google.maps.event.addListener(ce,"mouseover",y)),v&&re(google.maps.event.addListener(ce,"mouseup",v)),g&&O(google.maps.event.addListener(ce,"rightclick",g)),d&&T(google.maps.event.addListener(ce,"click",d)),D&&Z(google.maps.event.addListener(ce,"drag",D)),E&&J(google.maps.event.addListener(ce,"center_changed",E)),B&&fe(google.maps.event.addListener(ce,"radius_changed",B)),U(ce),w&&w(ce),()=>{P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),N!==null&&google.maps.event.removeListener(N),W!==null&&google.maps.event.removeListener(W),R!==null&&google.maps.event.removeListener(R),Q!==null&&google.maps.event.removeListener(Q),G!==null&&google.maps.event.removeListener(G),V!==null&&google.maps.event.removeListener(V),F!==null&&google.maps.event.removeListener(F),_!==null&&google.maps.event.removeListener(_),ee!==null&&google.maps.event.removeListener(ee),de!==null&&google.maps.event.removeListener(de),b&&b(ce),ce.setMap(null)}},[]),null}c.memo(r1);class n1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{circle:null}),K(this,"setCircleCallback",()=>{this.state.circle!==null&&this.props.onLoad&&this.props.onLoad(this.state.circle)})}componentDidMount(){var e=new google.maps.Circle(Ui(Ui({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Ld,eventMap:Ad,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)}componentDidUpdate(e){this.state.circle!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Ld,eventMap:Ad,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){if(this.state.circle!==null){var e;this.props.onUnmount&&this.props.onUnmount(this.state.circle),De(this.registeredEvents),(e=this.state.circle)===null||e===void 0||e.setMap(null)}}render(){return null}}K(n1,"contextType",me);function Pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ri(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Fd={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Td={add(t,e){t.add(e)},addgeojson(t,e,r){t.addGeoJson(e,r)},contains(t,e){t.contains(e)},foreach(t,e){t.forEach(e)},loadgeojson(t,e,r,n){t.loadGeoJson(e,r,n)},overridestyle(t,e,r){t.overrideStyle(e,r)},remove(t,e){t.remove(e)},revertstyle(t,e){t.revertStyle(e)},controlposition(t,e){t.setControlPosition(e)},controls(t,e){t.setControls(e)},drawingmode(t,e){t.setDrawingMode(e)},map(t,e){t.setMap(e)},style(t,e){t.setStyle(e)},togeojson(t,e){t.toGeoJson(e)}};function i1(t){var{options:e,onClick:r,onDblClick:n,onMouseDown:i,onMouseMove:s,onMouseOut:a,onMouseOver:o,onMouseUp:u,onRightClick:l,onAddFeature:f,onRemoveFeature:p,onRemoveProperty:h,onSetGeometry:y,onSetProperty:v,onLoad:g,onUnmount:d}=t,D=c.useContext(me),[E,B]=c.useState(null),[w,b]=c.useState(null),[x,S]=c.useState(null),[U,P]=c.useState(null),[H,j]=c.useState(null),[M,N]=c.useState(null),[z,W]=c.useState(null),[X,R]=c.useState(null),[ne,Q]=c.useState(null),[k,G]=c.useState(null),[$,V]=c.useState(null),[re,F]=c.useState(null),[O,_]=c.useState(null),[T,I]=c.useState(null);return c.useEffect(()=>{E!==null&&E.setMap(D)},[D]),c.useEffect(()=>{E&&n&&(w!==null&&google.maps.event.removeListener(w),b(google.maps.event.addListener(E,"dblclick",n)))},[n]),c.useEffect(()=>{E&&i&&(x!==null&&google.maps.event.removeListener(x),S(google.maps.event.addListener(E,"mousedown",i)))},[i]),c.useEffect(()=>{E&&s&&(U!==null&&google.maps.event.removeListener(U),P(google.maps.event.addListener(E,"mousemove",s)))},[s]),c.useEffect(()=>{E&&a&&(H!==null&&google.maps.event.removeListener(H),j(google.maps.event.addListener(E,"mouseout",a)))},[a]),c.useEffect(()=>{E&&o&&(M!==null&&google.maps.event.removeListener(M),N(google.maps.event.addListener(E,"mouseover",o)))},[o]),c.useEffect(()=>{E&&u&&(z!==null&&google.maps.event.removeListener(z),W(google.maps.event.addListener(E,"mouseup",u)))},[u]),c.useEffect(()=>{E&&l&&(X!==null&&google.maps.event.removeListener(X),R(google.maps.event.addListener(E,"rightclick",l)))},[l]),c.useEffect(()=>{E&&r&&(ne!==null&&google.maps.event.removeListener(ne),Q(google.maps.event.addListener(E,"click",r)))},[r]),c.useEffect(()=>{E&&f&&(k!==null&&google.maps.event.removeListener(k),G(google.maps.event.addListener(E,"addfeature",f)))},[f]),c.useEffect(()=>{E&&p&&($!==null&&google.maps.event.removeListener($),V(google.maps.event.addListener(E,"removefeature",p)))},[p]),c.useEffect(()=>{E&&h&&(re!==null&&google.maps.event.removeListener(re),F(google.maps.event.addListener(E,"removeproperty",h)))},[h]),c.useEffect(()=>{E&&y&&(O!==null&&google.maps.event.removeListener(O),_(google.maps.event.addListener(E,"setgeometry",y)))},[y]),c.useEffect(()=>{E&&v&&(T!==null&&google.maps.event.removeListener(T),I(google.maps.event.addListener(E,"setproperty",v)))},[v]),c.useEffect(()=>{if(D!==null){var Z=new google.maps.Data(Ri(Ri({},e),{},{map:D}));n&&b(google.maps.event.addListener(Z,"dblclick",n)),i&&S(google.maps.event.addListener(Z,"mousedown",i)),s&&P(google.maps.event.addListener(Z,"mousemove",s)),a&&j(google.maps.event.addListener(Z,"mouseout",a)),o&&N(google.maps.event.addListener(Z,"mouseover",o)),u&&W(google.maps.event.addListener(Z,"mouseup",u)),l&&R(google.maps.event.addListener(Z,"rightclick",l)),r&&Q(google.maps.event.addListener(Z,"click",r)),f&&G(google.maps.event.addListener(Z,"addfeature",f)),p&&V(google.maps.event.addListener(Z,"removefeature",p)),h&&F(google.maps.event.addListener(Z,"removeproperty",h)),y&&_(google.maps.event.addListener(Z,"setgeometry",y)),v&&I(google.maps.event.addListener(Z,"setproperty",v)),B(Z),g&&g(Z)}return()=>{E&&(w!==null&&google.maps.event.removeListener(w),x!==null&&google.maps.event.removeListener(x),U!==null&&google.maps.event.removeListener(U),H!==null&&google.maps.event.removeListener(H),M!==null&&google.maps.event.removeListener(M),z!==null&&google.maps.event.removeListener(z),X!==null&&google.maps.event.removeListener(X),ne!==null&&google.maps.event.removeListener(ne),k!==null&&google.maps.event.removeListener(k),$!==null&&google.maps.event.removeListener($),re!==null&&google.maps.event.removeListener(re),O!==null&&google.maps.event.removeListener(O),T!==null&&google.maps.event.removeListener(T),d&&d(E),E.setMap(null))}},[]),null}c.memo(i1);class s1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{data:null}),K(this,"setDataCallback",()=>{this.state.data!==null&&this.props.onLoad&&this.props.onLoad(this.state.data)})}componentDidMount(){if(this.context!==null){var e=new google.maps.Data(Ri(Ri({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Td,eventMap:Fd,prevProps:{},nextProps:this.props,instance:e}),this.setState(()=>({data:e}),this.setDataCallback)}}componentDidUpdate(e){this.state.data!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Td,eventMap:Fd,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),De(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}K(s1,"contextType",me);function Md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Md(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var jd={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Id={options(t,e){t.setOptions(e)},url(t,e){t.setUrl(e)},zIndex(t,e){t.setZIndex(e)}};class a1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{kmlLayer:null}),K(this,"setKmlLayerCallback",()=>{this.state.kmlLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)})}componentDidMount(){var e=new google.maps.KmlLayer(kd(kd({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Id,eventMap:jd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)}componentDidUpdate(e){this.state.kmlLayer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Id,eventMap:jd,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),De(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}K(a1,"contextType",me);function Nd(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function o1(t,e){return new e(t.lat,t.lng)}function u1(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 l1(t,e,r){return t instanceof e?t:r(t,e)}function c1(t,e,r){return t instanceof e?t:r(t,e)}function f1(t,e,r){var n=t&&t.fromLatLngToDivPixel(r.getNorthEast()),i=t&&t.fromLatLngToDivPixel(r.getSouthWest());return n&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(n.y+e.y,"px"),width:"".concat(n.x-i.x-e.x,"px"),height:"".concat(i.y-n.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function d1(t,e,r){var n=t&&t.fromLatLngToDivPixel(r);if(n){var{x:i,y:s}=n;return{left:"".concat(i+e.x,"px"),top:"".concat(s+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function _d(t,e,r,n){return r!==void 0?f1(t,e,c1(r,google.maps.LatLngBounds,u1)):d1(t,e,l1(n,google.maps.LatLng,o1))}function p1(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function zd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function h1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v1(t,e,r,n,i){class s extends google.maps.OverlayView{constructor(o,u,l,f){super(),this.container=o,this.pane=u,this.position=l,this.bounds=f}onAdd(){var o,u=(o=this.getPanes())===null||o===void 0?void 0:o[this.pane];u==null||u.appendChild(this.container)}draw(){var o=this.getProjection(),u=h1({},this.container?Nd(this.container,i):{x:0,y:0}),l=_d(o,u,this.bounds,this.position);for(var[f,p]of Object.entries(l))this.container.style[f]=p}onRemove(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)}}return new s(t,e,r,n)}function Wd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function g1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hd(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function Ud(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 m1(t){var{position:e,bounds:r,mapPaneName:n,zIndex:i,onLoad:s,onUnmount:a,getPixelPositionOffset:o,children:u}=t,l=c.useContext(me),f=c.useMemo(()=>{var h=document.createElement("div");return h.style.position="absolute",h},[]),p=c.useMemo(()=>v1(f,n,e,r,o),[f,n,e,r]);return c.useEffect(()=>(s==null||s(p),p==null||p.setMap(l),()=>{a==null||a(p),p==null||p.setMap(null)}),[l,p]),c.useEffect(()=>{f.style.zIndex="".concat(i)},[i,f]),to.createPortal(u,f)}c.memo(m1);class zr extends c.PureComponent{constructor(e){super(e),K(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),K(this,"updatePane",()=>{var n=this.props.mapPaneName,i=this.overlayView.getPanes();Ze(!!n,"OverlayView requires props.mapPaneName but got %s",n),i?this.setState({paneEl:i[n]}):this.setState({paneEl:null})}),K(this,"onAdd",()=>{var n,i;this.updatePane(),(n=(i=this.props).onLoad)===null||n===void 0||n.call(i,this.overlayView)}),K(this,"onPositionElement",()=>{var n=this.overlayView.getProjection(),i=g1({x:0,y:0},this.containerRef.current?Nd(this.containerRef.current,this.props.getPixelPositionOffset):{}),s=_d(n,i,this.props.bounds,this.props.position);if(!p1(s,{left:this.state.containerStyle.left,top:this.state.containerStyle.top,width:this.state.containerStyle.width,height:this.state.containerStyle.height})){var a,o,u,l;this.setState({containerStyle:{top:(a=s.top)!==null&&a!==void 0?a:0,left:(o=s.left)!==null&&o!==void 0?o:0,width:(u=s.width)!==null&&u!==void 0?u:0,height:(l=s.height)!==null&&l!==void 0?l:0,position:"absolute"}})}}),K(this,"draw",()=>{this.onPositionElement()}),K(this,"onRemove",()=>{var n,i;this.setState(()=>({paneEl:null})),(n=(i=this.props).onUnmount)===null||n===void 0||n.call(i,this.overlayView)}),this.containerRef=c.createRef();var r=new google.maps.OverlayView;r.onAdd=this.onAdd,r.draw=this.draw,r.onRemove=this.onRemove,this.overlayView=r}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var r=Hd(e.position),n=Hd(this.props.position),i=Ud(e.bounds),s=Ud(this.props.bounds);(r!==n||i!==s)&&this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?to.createPortal(C.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:c.Children.only(this.props.children)}),e):null}}K(zr,"FLOAT_PANE","floatPane"),K(zr,"MAP_PANE","mapPane"),K(zr,"MARKER_LAYER","markerLayer"),K(zr,"OVERLAY_LAYER","overlayLayer"),K(zr,"OVERLAY_MOUSE_TARGET","overlayMouseTarget"),K(zr,"contextType",me);function y1(){}function Rd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var qd={onDblClick:"dblclick",onClick:"click"},Gd={opacity(t,e){t.setOpacity(e)}};function C1(t){var{url:e,bounds:r,options:n,visible:i}=t,s=c.useContext(me),a=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east)),o=c.useMemo(()=>new google.maps.GroundOverlay(e,a,n),[]);return c.useEffect(()=>{o!==null&&o.setMap(s)},[s]),c.useEffect(()=>{typeof e<"u"&&o!==null&&(o.set("url",e),o.setMap(s))},[o,e]),c.useEffect(()=>{typeof i<"u"&&o!==null&&o.setOpacity(i?1:0)},[o,i]),c.useEffect(()=>{var u=new google.maps.LatLngBounds(new google.maps.LatLng(r.south,r.west),new google.maps.LatLng(r.north,r.east));typeof r<"u"&&o!==null&&(o.set("bounds",u),o.setMap(s))},[o,r]),null}c.memo(C1);class Zd extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{groundOverlay:null}),K(this,"setGroundOverlayCallback",()=>{this.state.groundOverlay!==null&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)})}componentDidMount(){Ze(!!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 e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Vd(Vd({},this.props.options),{},{map:this.context}));this.registeredEvents=Ce({updaterMap:Gd,eventMap:qd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)}componentDidUpdate(e){this.state.groundOverlay!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Gd,eventMap:qd,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}K(Zd,"defaultProps",{onLoad:y1}),K(Zd,"contextType",me);function Kd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kd(Object(r),!0).forEach(function(n){K(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Yd={},Xd={data(t,e){t.setData(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)}};function b1(t){var{data:e,onLoad:r,onUnmount:n,options:i}=t,s=c.useContext(me),[a,o]=c.useState(null);return c.useEffect(()=>{google.maps.visualization||Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),c.useEffect(()=>{Ze(!!e,"data property is required in HeatmapLayer %s",e)},[e]),c.useEffect(()=>{a!==null&&a.setMap(s)},[s]),c.useEffect(()=>{i&&a!==null&&a.setOptions(i)},[a,i]),c.useEffect(()=>{var u=new google.maps.visualization.HeatmapLayer(Vi(Vi({},i),{},{data:e,map:s}));return o(u),r&&r(u),()=>{a!==null&&(n&&n(a),a.setMap(null))}},[]),null}c.memo(b1);class D1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{heatmapLayer:null}),K(this,"setHeatmapLayerCallback",()=>{this.state.heatmapLayer!==null&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)})}componentDidMount(){Ze(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),Ze(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(Vi(Vi({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=Ce({updaterMap:Xd,eventMap:Yd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)}componentDidUpdate(e){De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Xd,eventMap:Yd,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),De(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}K(D1,"contextType",me);var $d={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Jd={register(t,e,r){t.registerPanoProvider(e,r)},links(t,e){t.setLinks(e)},motionTracking(t,e){t.setMotionTracking(e)},options(t,e){t.setOptions(e)},pano(t,e){t.setPano(e)},position(t,e){t.setPosition(e)},pov(t,e){t.setPov(e)},visible(t,e){t.setVisible(e)},zoom(t,e){t.setZoom(e)}};class E1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{streetViewPanorama:null}),K(this,"setStreetViewPanoramaCallback",()=>{this.state.streetViewPanorama!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)})}componentDidMount(){var e,r,n=(e=(r=this.context)===null||r===void 0?void 0:r.getStreetView())!==null&&e!==void 0?e:null;this.registeredEvents=Ce({updaterMap:Jd,eventMap:$d,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({streetViewPanorama:n}),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){this.state.streetViewPanorama!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:Jd,eventMap:$d,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),De(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}K(E1,"contextType",me);class w1 extends c.PureComponent{constructor(){super(...arguments),K(this,"state",{streetViewService:null}),K(this,"setStreetViewServiceCallback",()=>{this.state.streetViewService!==null&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)})}componentDidMount(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}},this.setStreetViewServiceCallback)}componentWillUnmount(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}K(w1,"contextType",me);var Qd={onDirectionsChanged:"directions_changed"},ep={directions(t,e){t.setDirections(e)},map(t,e){t.setMap(e)},options(t,e){t.setOptions(e)},panel(t,e){t.setPanel(e)},routeIndex(t,e){t.setRouteIndex(e)}};class O1 extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"state",{directionsRenderer:null}),K(this,"setDirectionsRendererCallback",()=>{this.state.directionsRenderer!==null&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))})}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Ce({updaterMap:ep,eventMap:Qd,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)}componentDidUpdate(e){this.state.directionsRenderer!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:ep,eventMap:Qd,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),De(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}K(O1,"contextType",me);var tp={onPlacesChanged:"places_changed"},rp={bounds(t,e){t.setBounds(e)}};class np extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",c.createRef()),K(this,"state",{searchBox:null}),K(this,"setSearchBoxCallback",()=>{this.state.searchBox!==null&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)})}componentDidMount(){if(Ze(!!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 e=this.containerElement.current.querySelector("input");if(e!==null){var r=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=Ce({updaterMap:rp,eventMap:tp,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}}componentDidUpdate(e){this.state.searchBox!==null&&(De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:rp,eventMap:tp,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),De(this.registeredEvents))}render(){return C.jsx("div",{ref:this.containerElement,children:c.Children.only(this.props.children)})}}K(np,"contextType",me);var ip={onPlaceChanged:"place_changed"},sp={bounds(t,e){t.setBounds(e)},restrictions(t,e){t.setComponentRestrictions(e)},fields(t,e){t.setFields(e)},options(t,e){t.setOptions(e)},types(t,e){t.setTypes(e)}};class ap extends c.PureComponent{constructor(){super(...arguments),K(this,"registeredEvents",[]),K(this,"containerElement",c.createRef()),K(this,"state",{autocomplete:null}),K(this,"setAutocompleteCallback",()=>{this.state.autocomplete!==null&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)})}componentDidMount(){var e;Ze(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(e=this.containerElement.current)===null||e===void 0?void 0:e.querySelector("input");if(r){var n=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Ce({updaterMap:sp,eventMap:ip,prevProps:{},nextProps:this.props,instance:n}),this.setState(()=>({autocomplete:n}),this.setAutocompleteCallback)}}componentDidUpdate(e){De(this.registeredEvents),this.registeredEvents=Ce({updaterMap:sp,eventMap:ip,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){this.state.autocomplete!==null&&De(this.registeredEvents)}render(){return C.jsx("div",{ref:this.containerElement,className:this.props.className,children:c.Children.only(this.props.children)})}}K(ap,"defaultProps",{className:""}),K(ap,"contextType",me);function x1({googleMapsApiKey:t,children:e,...r}){return C.jsx(_f,{libraries:["places","marker","maps"],googleMapsApiKey:t,...r,children:e})}function B1(t){const{children:e=!1}=t,[r,n]=c.useState([]);function i(l){return!!r.some(f=>f.key===l)}function s(l){var f;return(f=r.find(p=>p.key===l))==null?void 0:f.data}function a(l,f){const p=i(l);n(p?h=>[...h.filter(v=>v.key!==l),{key:l,data:f}]:[...r,{key:l,data:f}])}function o(l){n(r.filter(f=>f.key!==l))}function u(){n([])}return C.jsx(_a.Provider,{value:{modalIsOpen:i,modalData:s,openModal:a,closeModal:o,closeAll:u},children:e})}let S1={data:""},A1=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||S1,L1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,P1=/\/\*[^]*?\*\/| +/g,op=/\n+/g,tr=(t,e)=>{let r="",n="",i="";for(let s in t){let a=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+a+";":n+=s[1]=="f"?tr(a,s):s+"{"+tr(a,s[1]=="k"?"":e)+"}":typeof a=="object"?n+=tr(a,e?e.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,o):o?o+" "+u:u)):s):a!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=tr.p?tr.p(s,a):s+":"+a+";")}return r+(e&&i?e+"{"+i+"}":i)+n},_t={},up=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+up(t[r]);return e}return t},F1=(t,e,r,n,i)=>{let s=up(t),a=_t[s]||(_t[s]=(u=>{let l=0,f=11;for(;l<u.length;)f=101*f+u.charCodeAt(l++)>>>0;return"go"+f})(s));if(!_t[a]){let u=s!==t?t:(l=>{let f,p,h=[{}];for(;f=L1.exec(l.replace(P1,""));)f[4]?h.shift():f[3]?(p=f[3].replace(op," ").trim(),h.unshift(h[0][p]=h[0][p]||{})):h[0][f[1]]=f[2].replace(op," ").trim();return h[0]})(t);_t[a]=tr(i?{["@keyframes "+a]:u}:u,r?"":"."+a)}let o=r&&_t.g?_t.g:null;return r&&(_t.g=_t[a]),((u,l,f,p)=>{p?l.data=l.data.replace(p,u):l.data.indexOf(u)===-1&&(l.data=f?u+l.data:l.data+u)})(_t[a],e,n,o),a},T1=(t,e,r)=>t.reduce((n,i,s)=>{let a=e[s];if(a&&a.call){let o=a(r),u=o&&o.props&&o.props.className||/^go/.test(o)&&o;a=u?"."+u:o&&typeof o=="object"?o.props?"":tr(o,""):o===!1?"":o}return n+i+(a??"")},"");function qi(t){let e=this||{},r=t.call?t(e.p):t;return F1(r.unshift?r.raw?T1(r,[].slice.call(arguments,1),e.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(e.p):i),{}):r,A1(e.target),e.g,e.o,e.k)}let lp,Xa,$a;qi.bind({g:1});let zt=qi.bind({k:1});function M1(t,e,r,n){tr.p=e,lp=t,Xa=r,$a=n}function rr(t,e){let r=this||{};return function(){let n=arguments;function i(s,a){let o=Object.assign({},s),u=o.className||i.className;r.p=Object.assign({theme:Xa&&Xa()},o),r.o=/ *go\d+/.test(u),o.className=qi.apply(r,n)+(u?" "+u:"");let l=t;return t[0]&&(l=o.as||t,delete o.as),$a&&l[0]&&$a(o),lp(l,o)}return i}}var k1=t=>typeof t=="function",Gi=(t,e)=>k1(t)?t(e):t,j1=(()=>{let t=0;return()=>(++t).toString()})(),cp=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),I1=20,Zi=new Map,N1=1e3,fp=t=>{if(Zi.has(t))return;let e=setTimeout(()=>{Zi.delete(t),Or({type:4,toastId:t})},N1);Zi.set(t,e)},_1=t=>{let e=Zi.get(t);e&&clearTimeout(e)},Ja=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,I1)};case 1:return e.toast.id&&_1(e.toast.id),{...t,toasts:t.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:r}=e;return t.toasts.find(s=>s.id===r.id)?Ja(t,{type:1,toast:r}):Ja(t,{type:0,toast:r});case 3:let{toastId:n}=e;return n?fp(n):t.toasts.forEach(s=>{fp(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,visible:!1}:s)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.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(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},Ki=[],Yi={toasts:[],pausedAt:void 0},Or=t=>{Yi=Ja(Yi,t),Ki.forEach(e=>{e(Yi)})},z1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},W1=(t={})=>{let[e,r]=c.useState(Yi);c.useEffect(()=>(Ki.push(r),()=>{let i=Ki.indexOf(r);i>-1&&Ki.splice(i,1)}),[e]);let n=e.toasts.map(i=>{var s,a;return{...t,...t[i.type],...i,duration:i.duration||((s=t[i.type])==null?void 0:s.duration)||(t==null?void 0:t.duration)||z1[i.type],style:{...t.style,...(a=t[i.type])==null?void 0:a.style,...i.style}}});return{...e,toasts:n}},H1=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:(r==null?void 0:r.id)||j1()}),Bn=t=>(e,r)=>{let n=H1(e,t,r);return Or({type:2,toast:n}),n.id},yt=(t,e)=>Bn("blank")(t,e);yt.error=Bn("error"),yt.success=Bn("success"),yt.loading=Bn("loading"),yt.custom=Bn("custom"),yt.dismiss=t=>{Or({type:3,toastId:t})},yt.remove=t=>Or({type:4,toastId:t}),yt.promise=(t,e,r)=>{let n=yt.loading(e.loading,{...r,...r==null?void 0:r.loading});return t.then(i=>(yt.success(Gi(e.success,i),{id:n,...r,...r==null?void 0:r.success}),i)).catch(i=>{yt.error(Gi(e.error,i),{id:n,...r,...r==null?void 0:r.error})}),t};var U1=(t,e)=>{Or({type:1,toast:{id:t,height:e}})},R1=()=>{Or({type:5,time:Date.now()})},V1=t=>{let{toasts:e,pausedAt:r}=W1(t);c.useEffect(()=>{if(r)return;let s=Date.now(),a=e.map(o=>{if(o.duration===1/0)return;let u=(o.duration||0)+o.pauseDuration-(s-o.createdAt);if(u<0){o.visible&&yt.dismiss(o.id);return}return setTimeout(()=>yt.dismiss(o.id),u)});return()=>{a.forEach(o=>o&&clearTimeout(o))}},[e,r]);let n=c.useCallback(()=>{r&&Or({type:6,time:Date.now()})},[r]),i=c.useCallback((s,a)=>{let{reverseOrder:o=!1,gutter:u=8,defaultPosition:l}=a||{},f=e.filter(y=>(y.position||l)===(s.position||l)&&y.height),p=f.findIndex(y=>y.id===s.id),h=f.filter((y,v)=>v<p&&y.visible).length;return f.filter(y=>y.visible).slice(...o?[h+1]:[0,h]).reduce((y,v)=>y+(v.height||0)+u,0)},[e]);return{toasts:e,handlers:{updateHeight:U1,startPause:R1,endPause:n,calculateOffset:i}}},q1=zt`
97
97
  from {
98
98
  transform: scale(0) rotate(45deg);
99
99
  opacity: 0;
@@ -269,7 +269,7 @@ to {
269
269
  > * {
270
270
  pointer-events: auto;
271
271
  }
272
- `,Xi=16,gO=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:i,containerStyle:s,containerClassName:a})=>{let{toasts:o,handlers:u}=V1(r);return Xe.createElement("div",{style:{position:"fixed",zIndex:9999,top:Xi,left:Xi,right:Xi,bottom:Xi,pointerEvents:"none",...s},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},o.map(l=>{let f=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:n,defaultPosition:e}),h=hO(f,p);return Xe.createElement(pO,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?vO:"",style:h},l.type==="custom"?Gi(l.message,l):i?i(l):Xe.createElement(dO,{toast:l,position:f}))}))},dp=yt;function mO({children:t}){function e(r){switch(r.type){case"success":return dp.success(r.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return dp.error(r.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return C.jsxs(Ef.Provider,{value:{showToast:e},children:[C.jsx(gO,{position:"top-right",containerStyle:{zIndex:999999999999999}}),t]})}function pp({children:t,fallback:e=null}){return Bf()?C.jsx(C.Fragment,{children:t()}):C.jsx(C.Fragment,{children:e})}function yO({coordinates:t,zoom:e=18,draggable:r=!1,className:n,...i}){return t?C.jsx("div",{className:"arkynGoogleMapPinned "+n,...i,children:C.jsx(XE,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:C.jsx(Xf,{draggable:r,position:t})})}):C.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+n,...i,children:C.jsx(he.MapPinned,{})})}function CO({onChange:t,onPlaceChanged:e,options:r,...n}){const[i,s]=c.useState(null),a=u=>s(u),o=()=>{var y,v,g,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const E=f.find(B=>B.types[0]===D);return E?E.long_name:""}function h(D){const E=f.find(B=>B.types[0]===D);return E?E.short_name:""}if(l){const D=p("route"),E=p("street_number"),B=p("sublocality_level_1"),w=p("administrative_area_level_2"),b=p("administrative_area_level_1"),x=h("administrative_area_level_1"),A=p("postal_code"),U=(v=(y=l.geometry)==null?void 0:y.location)==null?void 0:v.lat(),P=(d=(g=l.geometry)==null?void 0:g.location)==null?void 0:d.lng();e&&e({street:D,city:w,state:b,district:B,cep:A,streetNumber:E,stateShortName:x,coordinates:{lat:U,lng:P}})}};return C.jsx(np,{onLoad:a,onPlacesChanged:o,options:r,children:C.jsx(nn,{type:"text",onChange:u=>t(u.target.value),...n})})}function hp(t){const{dataLayer:e,dataLayerName:r}=t;return`
272
+ `,Xi=16,gO=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:i,containerStyle:s,containerClassName:a})=>{let{toasts:o,handlers:u}=V1(r);return Xe.createElement("div",{style:{position:"fixed",zIndex:9999,top:Xi,left:Xi,right:Xi,bottom:Xi,pointerEvents:"none",...s},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},o.map(l=>{let f=l.position||e,p=u.calculateOffset(l,{reverseOrder:t,gutter:n,defaultPosition:e}),h=hO(f,p);return Xe.createElement(pO,{id:l.id,key:l.id,onHeightUpdate:u.updateHeight,className:l.visible?vO:"",style:h},l.type==="custom"?Gi(l.message,l):i?i(l):Xe.createElement(dO,{toast:l,position:f}))}))},dp=yt;function mO({children:t}){function e(r){switch(r.type){case"success":return dp.success(r.message,{style:{background:"#10B981",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#059669",secondary:"#ffffff"}});case"danger":return dp.error(r.message,{style:{background:"#E11D48",color:"#ffffff",padding:"12px 16px",fontSize:"14px",fontWeight:600},iconTheme:{primary:"#BE123C",secondary:"#ffffff"}})}}return C.jsxs(Ef.Provider,{value:{showToast:e},children:[C.jsx(gO,{position:"top-right",containerStyle:{zIndex:999999999999999}}),t]})}function pp({children:t,fallback:e=null}){return Bf()?C.jsx(C.Fragment,{children:t()}):C.jsx(C.Fragment,{children:e})}function yO({coordinates:t,zoom:e=18,draggable:r=!1,className:n,...i}){return t?C.jsx("div",{className:"arkynGoogleMapPinned "+n,...i,children:C.jsx(XE,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:C.jsx(Xf,{draggable:r,position:t})})}):C.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+n,...i,children:C.jsx(he.MapPinned,{})})}function CO({onChange:t,onPlaceChanged:e,options:r,...n}){const[i,s]=c.useState(null),a=u=>s(u),o=()=>{var y,v,g,d;const l=i.getPlaces()[0],f=l==null?void 0:l.address_components;function p(D){const E=f.find(B=>B.types[0]===D);return E?E.long_name:""}function h(D){const E=f.find(B=>B.types[0]===D);return E?E.short_name:""}if(l){const D=p("route"),E=p("street_number"),B=p("sublocality_level_1"),w=p("administrative_area_level_2"),b=p("administrative_area_level_1"),x=h("administrative_area_level_1"),S=p("postal_code"),U=(v=(y=l.geometry)==null?void 0:y.location)==null?void 0:v.lat(),P=(d=(g=l.geometry)==null?void 0:g.location)==null?void 0:d.lng();e&&e({street:D,city:w,state:b,district:B,cep:S,streetNumber:E,stateShortName:x,coordinates:{lat:U,lng:P}})}};return C.jsx(np,{onLoad:a,onPlacesChanged:o,options:r,children:C.jsx(nn,{type:"text",onChange:u=>t(u.target.value),...n})})}function hp(t){const{dataLayer:e,dataLayerName:r}=t;return`
273
273
  window.${r} = window.${r} || [];
274
274
  window.${r}.push(${JSON.stringify(e)})`}function bO(t){const{id:e,events:r,dataLayer:n,dataLayerName:i,preview:s,auth:a}=t,o=`&gtm_auth=${a}`,u=`&gtm_preview=${s}`;e||console.warn("GTM Id is required");const l=`
275
275
  <iframe src="https://www.googletagmanager.com/ns.html?id=${e}${o}${u}&gtm_cookies_win=x"