@platox/pivot-table 0.0.2

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.
@@ -0,0 +1,178 @@
1
+ (function(Hn,z){typeof exports=="object"&&typeof module<"u"?z(exports,require("react"),require("react-dom"),require("antd")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","antd"],z):(Hn=typeof globalThis<"u"?globalThis:Hn||self,z(Hn["pivot-table"]={},Hn.react,Hn["react-dom"],Hn.antd))})(this,function(Hn,z,sl,ee){"use strict";function vO(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Ye=vO(z);var Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zm(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Lh={exports:{}},Cs={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var jm;function pO(){if(jm)return Cs;jm=1;var t=z,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var f,c={},h=null,d=null;l!==void 0&&(h=""+l),u.key!==void 0&&(h=""+u.key),u.ref!==void 0&&(d=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(c[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)c[f]===void 0&&(c[f]=u[f]);return{$$typeof:e,type:s,key:h,ref:d,props:c,_owner:i.current}}return Cs.Fragment=r,Cs.jsx=o,Cs.jsxs=o,Cs}var ws={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Vm;function gO(){return Vm||(Vm=1,process.env.NODE_ENV!=="production"&&function(){var t=z,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function p(H){if(H===null||typeof H!="object")return null;var oe=v&&H[v]||H[g];return typeof oe=="function"?oe:null}var m=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(H){{for(var oe=arguments.length,he=new Array(oe>1?oe-1:0),Te=1;Te<oe;Te++)he[Te-1]=arguments[Te];b("error",H,he)}}function b(H,oe,he){{var Te=m.ReactDebugCurrentFrame,at=Te.getStackAddendum();at!==""&&(oe+="%s",he=he.concat([at]));var ct=he.map(function(qe){return String(qe)});ct.unshift("Warning: "+oe),Function.prototype.apply.call(console[H],console,ct)}}var C=!1,w=!1,D=!1,_=!1,x=!1,S;S=Symbol.for("react.module.reference");function O(H){return!!(typeof H=="string"||typeof H=="function"||H===n||H===a||x||H===i||H===l||H===f||_||H===d||C||w||D||typeof H=="object"&&H!==null&&(H.$$typeof===h||H.$$typeof===c||H.$$typeof===o||H.$$typeof===s||H.$$typeof===u||H.$$typeof===S||H.getModuleId!==void 0))}function E(H,oe,he){var Te=H.displayName;if(Te)return Te;var at=oe.displayName||oe.name||"";return at!==""?he+"("+at+")":he}function P(H){return H.displayName||"Context"}function F(H){if(H==null)return null;if(typeof H.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof H=="function")return H.displayName||H.name||null;if(typeof H=="string")return H;switch(H){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof H=="object")switch(H.$$typeof){case s:var oe=H;return P(oe)+".Consumer";case o:var he=H;return P(he._context)+".Provider";case u:return E(H,H.render,"ForwardRef");case c:var Te=H.displayName||null;return Te!==null?Te:F(H.type)||"Memo";case h:{var at=H,ct=at._payload,qe=at._init;try{return F(qe(ct))}catch{return null}}}return null}var M=Object.assign,B=0,R,V,k,W,I,q,Z;function J(){}J.__reactDisabledLog=!0;function ne(){{if(B===0){R=console.log,V=console.info,k=console.warn,W=console.error,I=console.group,q=console.groupCollapsed,Z=console.groupEnd;var H={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:H,log:H,warn:H,error:H,group:H,groupCollapsed:H,groupEnd:H})}B++}}function G(){{if(B--,B===0){var H={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},H,{value:R}),info:M({},H,{value:V}),warn:M({},H,{value:k}),error:M({},H,{value:W}),group:M({},H,{value:I}),groupCollapsed:M({},H,{value:q}),groupEnd:M({},H,{value:Z})})}B<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var L=m.ReactCurrentDispatcher,Y;function j(H,oe,he){{if(Y===void 0)try{throw Error()}catch(at){var Te=at.stack.trim().match(/\n( *(at )?)/);Y=Te&&Te[1]||""}return`
18
+ `+Y+H}}var U=!1,Q;{var K=typeof WeakMap=="function"?WeakMap:Map;Q=new K}function X(H,oe){if(!H||U)return"";{var he=Q.get(H);if(he!==void 0)return he}var Te;U=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ct;ct=L.current,L.current=null,ne();try{if(oe){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch(wr){Te=wr}Reflect.construct(H,[],qe)}else{try{qe.call()}catch(wr){Te=wr}H.call(qe.prototype)}}else{try{throw Error()}catch(wr){Te=wr}H()}}catch(wr){if(wr&&Te&&typeof wr.stack=="string"){for(var He=wr.stack.split(`
19
+ `),sr=Te.stack.split(`
20
+ `),Et=He.length-1,Ot=sr.length-1;Et>=1&&Ot>=0&&He[Et]!==sr[Ot];)Ot--;for(;Et>=1&&Ot>=0;Et--,Ot--)if(He[Et]!==sr[Ot]){if(Et!==1||Ot!==1)do if(Et--,Ot--,Ot<0||He[Et]!==sr[Ot]){var en=`
21
+ `+He[Et].replace(" at new "," at ");return H.displayName&&en.includes("<anonymous>")&&(en=en.replace("<anonymous>",H.displayName)),typeof H=="function"&&Q.set(H,en),en}while(Et>=1&&Ot>=0);break}}}finally{U=!1,L.current=ct,G(),Error.prepareStackTrace=at}var bs=H?H.displayName||H.name:"",Qa=bs?j(bs):"";return typeof H=="function"&&Q.set(H,Qa),Qa}function le(H,oe,he){return X(H,!1)}function se(H){var oe=H.prototype;return!!(oe&&oe.isReactComponent)}function ye(H,oe,he){if(H==null)return"";if(typeof H=="function")return X(H,se(H));if(typeof H=="string")return j(H);switch(H){case l:return j("Suspense");case f:return j("SuspenseList")}if(typeof H=="object")switch(H.$$typeof){case u:return le(H.render);case c:return ye(H.type,oe,he);case h:{var Te=H,at=Te._payload,ct=Te._init;try{return ye(ct(at),oe,he)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,Le={},be=m.ReactDebugCurrentFrame;function De(H){if(H){var oe=H._owner,he=ye(H.type,H._source,oe?oe.type:null);be.setExtraStackFrame(he)}else be.setExtraStackFrame(null)}function it(H,oe,he,Te,at){{var ct=Function.call.bind(pe);for(var qe in H)if(ct(H,qe)){var He=void 0;try{if(typeof H[qe]!="function"){var sr=Error((Te||"React class")+": "+he+" type `"+qe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof H[qe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw sr.name="Invariant Violation",sr}He=H[qe](oe,qe,Te,he,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Et){He=Et}He&&!(He instanceof Error)&&(De(at),y("%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).",Te||"React class",he,qe,typeof He),De(null)),He instanceof Error&&!(He.message in Le)&&(Le[He.message]=!0,De(at),y("Failed %s type: %s",he,He.message),De(null))}}}var St=Array.isArray;function Ve(H){return St(H)}function lt(H){{var oe=typeof Symbol=="function"&&Symbol.toStringTag,he=oe&&H[Symbol.toStringTag]||H.constructor.name||"Object";return he}}function Mr(H){try{return Qe(H),!1}catch{return!0}}function Qe(H){return""+H}function ft(H){if(Mr(H))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lt(H)),Qe(H)}var Fr=m.ReactCurrentOwner,Kt={key:!0,ref:!0,__self:!0,__source:!0},Lr,Vn,Cr;Cr={};function al(H){if(pe.call(H,"ref")){var oe=Object.getOwnPropertyDescriptor(H,"ref").get;if(oe&&oe.isReactWarning)return!1}return H.ref!==void 0}function Ja(H){if(pe.call(H,"key")){var oe=Object.getOwnPropertyDescriptor(H,"key").get;if(oe&&oe.isReactWarning)return!1}return H.key!==void 0}function $i(H,oe){if(typeof H.ref=="string"&&Fr.current&&oe&&Fr.current.stateNode!==oe){var he=F(Fr.current.type);Cr[he]||(y('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',F(Fr.current.type),H.ref),Cr[he]=!0)}}function Mm(H,oe){{var he=function(){Lr||(Lr=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};he.isReactWarning=!0,Object.defineProperty(H,"key",{get:he,configurable:!0})}}function Fm(H,oe){{var he=function(){Vn||(Vn=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};he.isReactWarning=!0,Object.defineProperty(H,"ref",{get:he,configurable:!0})}}var Lm=function(H,oe,he,Te,at,ct,qe){var He={$$typeof:e,type:H,key:oe,ref:he,props:qe,_owner:ct};return He._store={},Object.defineProperty(He._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(He,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.defineProperty(He,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(He.props),Object.freeze(He)),He};function Rm(H,oe,he,Te,at){{var ct,qe={},He=null,sr=null;he!==void 0&&(ft(he),He=""+he),Ja(oe)&&(ft(oe.key),He=""+oe.key),al(oe)&&(sr=oe.ref,$i(oe,at));for(ct in oe)pe.call(oe,ct)&&!Kt.hasOwnProperty(ct)&&(qe[ct]=oe[ct]);if(H&&H.defaultProps){var Et=H.defaultProps;for(ct in Et)qe[ct]===void 0&&(qe[ct]=Et[ct])}if(He||sr){var Ot=typeof H=="function"?H.displayName||H.name||"Unknown":H;He&&Mm(qe,Ot),sr&&Fm(qe,Ot)}return Lm(H,He,sr,at,Te,Fr.current,qe)}}var ol=m.ReactCurrentOwner,Fh=m.ReactDebugCurrentFrame;function ys(H){if(H){var oe=H._owner,he=ye(H.type,H._source,oe?oe.type:null);Fh.setExtraStackFrame(he)}else Fh.setExtraStackFrame(null)}var Im;Im=!1;function Nm(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function uO(){{if(ol.current){var H=F(ol.current.type);if(H)return`
22
+
23
+ Check the render method of \``+H+"`."}return""}}function OU(H){return""}var lO={};function PU(H){{var oe=uO();if(!oe){var he=typeof H=="string"?H:H.displayName||H.name;he&&(oe=`
24
+
25
+ Check the top-level render call using <`+he+">.")}return oe}}function fO(H,oe){{if(!H._store||H._store.validated||H.key!=null)return;H._store.validated=!0;var he=PU(oe);if(lO[he])return;lO[he]=!0;var Te="";H&&H._owner&&H._owner!==ol.current&&(Te=" It was passed a child from "+F(H._owner.type)+"."),ys(H),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',he,Te),ys(null)}}function cO(H,oe){{if(typeof H!="object")return;if(Ve(H))for(var he=0;he<H.length;he++){var Te=H[he];Nm(Te)&&fO(Te,oe)}else if(Nm(H))H._store&&(H._store.validated=!0);else if(H){var at=p(H);if(typeof at=="function"&&at!==H.entries)for(var ct=at.call(H),qe;!(qe=ct.next()).done;)Nm(qe.value)&&fO(qe.value,oe)}}}function BU(H){{var oe=H.type;if(oe==null||typeof oe=="string")return;var he;if(typeof oe=="function")he=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===u||oe.$$typeof===c))he=oe.propTypes;else return;if(he){var Te=F(oe);it(he,H.props,"prop",Te,H)}else if(oe.PropTypes!==void 0&&!Im){Im=!0;var at=F(oe);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function MU(H){{for(var oe=Object.keys(H.props),he=0;he<oe.length;he++){var Te=oe[he];if(Te!=="children"&&Te!=="key"){ys(H),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Te),ys(null);break}}H.ref!==null&&(ys(H),y("Invalid attribute `ref` supplied to `React.Fragment`."),ys(null))}}var hO={};function dO(H,oe,he,Te,at,ct){{var qe=O(H);if(!qe){var He="";(H===void 0||typeof H=="object"&&H!==null&&Object.keys(H).length===0)&&(He+=" 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 sr=OU();sr?He+=sr:He+=uO();var Et;H===null?Et="null":Ve(H)?Et="array":H!==void 0&&H.$$typeof===e?(Et="<"+(F(H.type)||"Unknown")+" />",He=" Did you accidentally export a JSX literal instead of a component?"):Et=typeof H,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Et,He)}var Ot=Rm(H,oe,he,at,ct);if(Ot==null)return Ot;if(qe){var en=oe.children;if(en!==void 0)if(Te)if(Ve(en)){for(var bs=0;bs<en.length;bs++)cO(en[bs],H);Object.freeze&&Object.freeze(en)}else y("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 cO(en,H)}if(pe.call(oe,"key")){var Qa=F(H),wr=Object.keys(oe).filter(function(kU){return kU!=="key"}),km=wr.length>0?"{key: someKey, "+wr.join(": ..., ")+": ...}":"{key: someKey}";if(!hO[Qa+km]){var NU=wr.length>0?"{"+wr.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,km,Qa,NU,Qa),hO[Qa+km]=!0}}return H===n?MU(Ot):BU(Ot),Ot}}function FU(H,oe,he){return dO(H,oe,he,!0)}function LU(H,oe,he){return dO(H,oe,he,!1)}var RU=LU,IU=FU;ws.Fragment=n,ws.jsx=RU,ws.jsxs=IU}()),ws}process.env.NODE_ENV==="production"?Lh.exports=pO():Lh.exports=gO();var T=Lh.exports,Hm={exports:{}},Ds={},Rh={exports:{}};(function(t,e){(function(r,n){n(e)})(Gi,function(r){function n(j){return function(Q,K,X,le,se,ye,pe){return j(Q,K,pe)}}function i(j){return function(Q,K,X,le){if(!Q||!K||typeof Q!="object"||typeof K!="object")return j(Q,K,X,le);var se=le.get(Q),ye=le.get(K);if(se&&ye)return se===K&&ye===Q;le.set(Q,K),le.set(K,Q);var pe=j(Q,K,X,le);return le.delete(Q),le.delete(K),pe}}function a(j,U){var Q={};for(var K in j)Q[K]=j[K];for(var K in U)Q[K]=U[K];return Q}function o(j){return j.constructor===Object||j.constructor==null}function s(j){return typeof j.then=="function"}function u(j,U){return j===U||j!==j&&U!==U}var l="[object Arguments]",f="[object Boolean]",c="[object Date]",h="[object RegExp]",d="[object Map]",v="[object Number]",g="[object Object]",p="[object Set]",m="[object String]",y=Object.prototype.toString;function b(j){var U=j.areArraysEqual,Q=j.areDatesEqual,K=j.areMapsEqual,X=j.areObjectsEqual,le=j.areRegExpsEqual,se=j.areSetsEqual,ye=j.createIsNestedEqual,pe=ye(Le);function Le(be,De,it){if(be===De)return!0;if(!be||!De||typeof be!="object"||typeof De!="object")return be!==be&&De!==De;if(o(be)&&o(De))return X(be,De,pe,it);var St=Array.isArray(be),Ve=Array.isArray(De);if(St||Ve)return St===Ve&&U(be,De,pe,it);var lt=y.call(be);return lt!==y.call(De)?!1:lt===c?Q(be,De,pe,it):lt===h?le(be,De,pe,it):lt===d?K(be,De,pe,it):lt===p?se(be,De,pe,it):lt===g||lt===l?s(be)||s(De)?!1:X(be,De,pe,it):lt===f||lt===v||lt===m?u(be.valueOf(),De.valueOf()):!1}return Le}function C(j,U,Q,K){var X=j.length;if(U.length!==X)return!1;for(;X-- >0;)if(!Q(j[X],U[X],X,X,j,U,K))return!1;return!0}var w=i(C);function D(j,U){return u(j.valueOf(),U.valueOf())}function _(j,U,Q,K){var X=j.size===U.size;if(!X)return!1;if(!j.size)return!0;var le={},se=0;return j.forEach(function(ye,pe){if(X){var Le=!1,be=0;U.forEach(function(De,it){!Le&&!le[be]&&(Le=Q(pe,it,se,be,j,U,K)&&Q(ye,De,pe,it,j,U,K))&&(le[be]=!0),be++}),se++,X=Le}}),X}var x=i(_),S="_owner",O=Object.prototype.hasOwnProperty;function E(j,U,Q,K){var X=Object.keys(j),le=X.length;if(Object.keys(U).length!==le)return!1;for(var se;le-- >0;){if(se=X[le],se===S){var ye=!!j.$$typeof,pe=!!U.$$typeof;if((ye||pe)&&ye!==pe)return!1}if(!O.call(U,se)||!Q(j[se],U[se],se,se,j,U,K))return!1}return!0}var P=i(E);function F(j,U){return j.source===U.source&&j.flags===U.flags}function M(j,U,Q,K){var X=j.size===U.size;if(!X)return!1;if(!j.size)return!0;var le={};return j.forEach(function(se,ye){if(X){var pe=!1,Le=0;U.forEach(function(be,De){!pe&&!le[Le]&&(pe=Q(se,be,ye,De,j,U,K))&&(le[Le]=!0),Le++}),X=pe}}),X}var B=i(M),R=Object.freeze({areArraysEqual:C,areDatesEqual:D,areMapsEqual:_,areObjectsEqual:E,areRegExpsEqual:F,areSetsEqual:M,createIsNestedEqual:n}),V=Object.freeze({areArraysEqual:w,areDatesEqual:D,areMapsEqual:x,areObjectsEqual:P,areRegExpsEqual:F,areSetsEqual:B,createIsNestedEqual:n}),k=b(R);function W(j,U){return k(j,U,void 0)}var I=b(a(R,{createIsNestedEqual:function(){return u}}));function q(j,U){return I(j,U,void 0)}var Z=b(V);function J(j,U){return Z(j,U,new WeakMap)}var ne=b(a(V,{createIsNestedEqual:function(){return u}}));function G(j,U){return ne(j,U,new WeakMap)}function L(j){return b(a(R,j(R)))}function Y(j){var U=b(a(V,j(V)));return function(Q,K,X){return X===void 0&&(X=new WeakMap),U(Q,K,X)}}r.circularDeepEqual=J,r.circularShallowEqual=G,r.createCustomCircularEqual=Y,r.createCustomEqual=L,r.deepEqual=W,r.sameValueZeroEqual=u,r.shallowEqual=q,Object.defineProperty(r,"__esModule",{value:!0})})})(Rh,Rh.exports);var Ih=Rh.exports,Nh={exports:{}};function Wm(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Wm(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function $m(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Wm(t))&&(n&&(n+=" "),n+=e);return n}Nh.exports=$m,Nh.exports.clsx=$m;var kh=Nh.exports,Ne={},mO=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.bottom=zh,Ne.childrenEqual=wO,Ne.cloneLayout=Um,Ne.cloneLayoutItem=Ui,Ne.collides=ul,Ne.compact=Ym,Ne.compactItem=Xm,Ne.compactType=PO,Ne.correctBounds=Km,Ne.fastPositionEqual=DO,Ne.fastRGLPropsEqual=void 0,Ne.getAllCollisions=Zm,Ne.getFirstCollision=qi,Ne.getLayoutItem=Vh,Ne.getStatics=Hh,Ne.modifyLayout=qm,Ne.moveElement=xs,Ne.moveElementAwayFromCollision=Wh,Ne.noop=void 0,Ne.perc=xO,Ne.resizeItemInDirection=EO,Ne.setTopLeft=TO,Ne.setTransform=AO,Ne.sortLayoutItems=Xh,Ne.sortLayoutItemsByColRow=ry,Ne.sortLayoutItemsByRowCol=ty,Ne.synchronizeLayoutWithChildren=OO,Ne.validateLayout=ny,Ne.withLayoutItem=CO;var Gm=Ih,_s=yO(z);function yO(t){return t&&t.__esModule?t:{default:t}}const bO=process.env.NODE_ENV==="production";function zh(t){let e=0,r;for(let n=0,i=t.length;n<i;n++)r=t[n].y+t[n].h,r>e&&(e=r);return e}function Um(t){const e=Array(t.length);for(let r=0,n=t.length;r<n;r++)e[r]=Ui(t[r]);return e}function qm(t,e){const r=Array(t.length);for(let n=0,i=t.length;n<i;n++)e.i===t[n].i?r[n]=e:r[n]=t[n];return r}function CO(t,e,r){let n=Vh(t,e);return n?(n=r(Ui(n)),t=qm(t,n),[t,n]):[t,null]}function Ui(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:!!t.moved,static:!!t.static,isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function wO(t,e){return(0,Gm.deepEqual)(_s.default.Children.map(t,r=>r==null?void 0:r.key),_s.default.Children.map(e,r=>r==null?void 0:r.key))&&(0,Gm.deepEqual)(_s.default.Children.map(t,r=>r==null?void 0:r.props["data-grid"]),_s.default.Children.map(e,r=>r==null?void 0:r.props["data-grid"]))}Ne.fastRGLPropsEqual=mO;function DO(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function ul(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function Ym(t,e,r,n){const i=Hh(t),a=Xh(t,e),o=Array(t.length);for(let s=0,u=a.length;s<u;s++){let l=Ui(a[s]);l.static||(l=Xm(i,l,e,r,a,n),i.push(l)),o[t.indexOf(a[s])]=l,l.moved=!1}return o}const _O={x:"w",y:"h"};function jh(t,e,r,n){const i=_O[n];e[n]+=1;const a=t.map(o=>o.i).indexOf(e.i);for(let o=a+1;o<t.length;o++){const s=t[o];if(!s.static){if(s.y>e.y+e.h)break;ul(e,s)&&jh(t,s,r+e[i],n)}}e[n]=r}function Xm(t,e,r,n,i,a){const o=r==="vertical",s=r==="horizontal";if(o)for(e.y=Math.min(zh(t),e.y);e.y>0&&!qi(t,e);)e.y--;else if(s)for(;e.x>0&&!qi(t,e);)e.x--;let u;for(;(u=qi(t,e))&&!(r===null&&a);)if(s?jh(i,e,u.x+u.w,"x"):jh(i,e,u.y+u.h,"y"),s&&e.x+e.w>n)for(e.x=n-e.w,e.y++;e.x>0&&!qi(t,e);)e.x--;return e.y=Math.max(e.y,0),e.x=Math.max(e.x,0),e}function Km(t,e){const r=Hh(t);for(let n=0,i=t.length;n<i;n++){const a=t[n];if(a.x+a.w>e.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),!a.static)r.push(a);else for(;qi(r,a);)a.y++}return t}function Vh(t,e){for(let r=0,n=t.length;r<n;r++)if(t[r].i===e)return t[r]}function qi(t,e){for(let r=0,n=t.length;r<n;r++)if(ul(t[r],e))return t[r]}function Zm(t,e){return t.filter(r=>ul(r,e))}function Hh(t){return t.filter(e=>e.static)}function xs(t,e,r,n,i,a,o,s,u){if(e.static&&e.isDraggable!==!0||e.y===n&&e.x===r)return t;`${e.i}${String(r)}${String(n)}${e.x}${e.y}`;const l=e.x,f=e.y;typeof r=="number"&&(e.x=r),typeof n=="number"&&(e.y=n),e.moved=!0;let c=Xh(t,o);(o==="vertical"&&typeof n=="number"?f>=n:o==="horizontal"&&typeof r=="number"?l>=r:!1)&&(c=c.reverse());const d=Zm(c,e),v=d.length>0;if(v&&u)return Um(t);if(v&&a)return`${e.i}`,e.x=l,e.y=f,e.moved=!1,t;for(let g=0,p=d.length;g<p;g++){const m=d[g];`${e.i}${e.x}${e.y}${m.i}${m.x}${m.y}`,!m.moved&&(m.static?t=Wh(t,m,e,i,o):t=Wh(t,e,m,i,o))}return t}function Wh(t,e,r,n,i,a){const o=i==="horizontal",s=i==="vertical",u=e.static;if(n){n=!1;const c={x:o?Math.max(e.x-r.w,0):r.x,y:s?Math.max(e.y-r.h,0):r.y,w:r.w,h:r.h,i:"-1"},h=qi(t,c),d=h&&h.y+h.h>e.y,v=h&&e.x+e.w>h.x;if(h){if(d&&s)return xs(t,r,void 0,e.y+1,n,u,i);if(d&&i==null)return e.y=r.y,r.y=r.y+r.h,t;if(v&&o)return xs(t,e,r.x,void 0,n,u,i)}else return`${r.i}${c.x}${c.y}`,xs(t,r,o?c.x:void 0,s?c.y:void 0,n,u,i)}const l=o?r.x+1:void 0,f=s?r.y+1:void 0;return l==null&&f==null?t:xs(t,r,o?r.x+1:void 0,s?r.y+1:void 0,n,u,i)}function xO(t){return t*100+"%"}const Jm=(t,e,r,n)=>t+r>n?e:r,Qm=(t,e,r)=>t<0?e:r,ey=t=>Math.max(0,t),$h=t=>Math.max(0,t),Gh=(t,e,r)=>{let{left:n,height:i,width:a}=e;const o=t.top-(i-t.height);return{left:n,width:a,height:Qm(o,t.height,i),top:$h(o)}},Uh=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{top:n,height:a,width:Jm(t.left,t.width,o,r),left:ey(i)}},qh=(t,e,r)=>{let{top:n,height:i,width:a}=e;const o=t.left-(a-t.width);return{height:i,width:o<0?t.width:Jm(t.left,t.width,a,r),top:$h(n),left:ey(o)}},Yh=(t,e,r)=>{let{top:n,left:i,height:a,width:o}=e;return{width:o,left:i,height:Qm(n,t.height,a),top:$h(n)}},SO={n:Gh,ne:function(){return Gh(arguments.length<=0?void 0:arguments[0],Uh(...arguments))},e:Uh,se:function(){return Yh(arguments.length<=0?void 0:arguments[0],Uh(...arguments))},s:Yh,sw:function(){return Yh(arguments.length<=0?void 0:arguments[0],qh(...arguments))},w:qh,nw:function(){return Gh(arguments.length<=0?void 0:arguments[0],qh(...arguments))}};function EO(t,e,r,n){const i=SO[t];return i?i(e,{...e,...r},n):r}function AO(t){let{top:e,left:r,width:n,height:i}=t;const a=`translate(${r}px,${e}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${n}px`,height:`${i}px`,position:"absolute"}}function TO(t){let{top:e,left:r,width:n,height:i}=t;return{top:`${e}px`,left:`${r}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function Xh(t,e){return e==="horizontal"?ry(t):e==="vertical"?ty(t):t}function ty(t){return t.slice(0).sort(function(e,r){return e.y>r.y||e.y===r.y&&e.x>r.x?1:e.y===r.y&&e.x===r.x?0:-1})}function ry(t){return t.slice(0).sort(function(e,r){return e.x>r.x||e.x===r.x&&e.y>r.y?1:-1})}function OO(t,e,r,n,i){t=t||[];const a=[];_s.default.Children.forEach(e,s=>{if((s==null?void 0:s.key)==null)return;const u=Vh(t,String(s.key)),l=s.props["data-grid"];u&&l==null?a.push(Ui(u)):l?(bO||ny([l],"ReactGridLayout.children"),a.push(Ui({...l,i:s.key}))):a.push(Ui({w:1,h:1,x:0,y:zh(a),i:String(s.key)}))});const o=Km(a,{cols:r});return i?o:Ym(o,n,r)}function ny(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const r=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(let n=0,i=t.length;n<i;n++){const a=t[n];for(let o=0;o<r.length;o++){const s=r[o],u=a[s];if(typeof u!="number"||Number.isNaN(u))throw new Error(`ReactGridLayout: ${e}[${n}].${s} must be a number! Received: ${u} (${typeof u})`)}if(typeof a.i<"u"&&typeof a.i!="string")throw new Error(`ReactGridLayout: ${e}[${n}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function PO(t){const{verticalCompact:e,compactType:r}=t||{};return e===!1?null:r}function WU(){}const BO=()=>{};Ne.noop=BO;var vn={};Object.defineProperty(vn,"__esModule",{value:!0}),vn.calcGridColWidth=ll,vn.calcGridItemPosition=MO,vn.calcGridItemWHPx=Kh,vn.calcWH=LO,vn.calcXY=FO,vn.clamp=Yi;function ll(t){const{margin:e,containerPadding:r,containerWidth:n,cols:i}=t;return(n-e[0]*(i-1)-r[0]*2)/i}function Kh(t,e,r){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*r):t}function MO(t,e,r,n,i,a){const{margin:o,containerPadding:s,rowHeight:u}=t,l=ll(t),f={};return a&&a.resizing?(f.width=Math.round(a.resizing.width),f.height=Math.round(a.resizing.height)):(f.width=Kh(n,l,o[0]),f.height=Kh(i,u,o[1])),a&&a.dragging?(f.top=Math.round(a.dragging.top),f.left=Math.round(a.dragging.left)):a&&a.resizing&&typeof a.resizing.top=="number"&&typeof a.resizing.left=="number"?(f.top=Math.round(a.resizing.top),f.left=Math.round(a.resizing.left)):(f.top=Math.round((u+o[1])*r+s[1]),f.left=Math.round((l+o[0])*e+s[0])),f}function FO(t,e,r,n,i){const{margin:a,containerPadding:o,cols:s,rowHeight:u,maxRows:l}=t,f=ll(t);let c=Math.round((r-o[0])/(f+a[0])),h=Math.round((e-o[1])/(u+a[1]));return c=Yi(c,0,s-n),h=Yi(h,0,l-i),{x:c,y:h}}function LO(t,e,r,n,i,a){const{margin:o,maxRows:s,cols:u,rowHeight:l}=t,f=ll(t);let c=Math.round((e+o[0])/(f+o[0])),h=Math.round((r+o[1])/(l+o[1])),d=Yi(c,0,u-n),v=Yi(h,0,s-i);return["sw","w","nw"].indexOf(a)!==-1&&(d=Yi(c,0,u)),["nw","n","ne"].indexOf(a)!==-1&&(v=Yi(h,0,s)),{w:d,h:v}}function Yi(t,e,r){return Math.max(Math.min(t,r),e)}var fl={},Zh={exports:{}},cl={exports:{}},et={};/** @license React v16.13.1
31
+ * react-is.production.min.js
32
+ *
33
+ * Copyright (c) Facebook, Inc. and its affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */var iy;function RO(){if(iy)return et;iy=1;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,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var D=w.$$typeof;switch(D){case e:switch(w=w.type,w){case u:case l:case n:case a:case i:case c:return w;default:switch(w=w&&w.$$typeof,w){case s:case f:case v:case d:case o:return w;default:return D}}case r:return D}}}function C(w){return b(w)===l}return et.AsyncMode=u,et.ConcurrentMode=l,et.ContextConsumer=s,et.ContextProvider=o,et.Element=e,et.ForwardRef=f,et.Fragment=n,et.Lazy=v,et.Memo=d,et.Portal=r,et.Profiler=a,et.StrictMode=i,et.Suspense=c,et.isAsyncMode=function(w){return C(w)||b(w)===u},et.isConcurrentMode=C,et.isContextConsumer=function(w){return b(w)===s},et.isContextProvider=function(w){return b(w)===o},et.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},et.isForwardRef=function(w){return b(w)===f},et.isFragment=function(w){return b(w)===n},et.isLazy=function(w){return b(w)===v},et.isMemo=function(w){return b(w)===d},et.isPortal=function(w){return b(w)===r},et.isProfiler=function(w){return b(w)===a},et.isStrictMode=function(w){return b(w)===i},et.isSuspense=function(w){return b(w)===c},et.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===l||w===a||w===i||w===c||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===v||w.$$typeof===d||w.$$typeof===o||w.$$typeof===s||w.$$typeof===f||w.$$typeof===p||w.$$typeof===m||w.$$typeof===y||w.$$typeof===g)},et.typeOf=b,et}var tt={};/** @license React v16.13.1
38
+ * react-is.development.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */var ay;function IO(){return ay||(ay=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,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,c=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,y=t?Symbol.for("react.scope"):60119;function b(X){return typeof X=="string"||typeof X=="function"||X===n||X===l||X===a||X===i||X===c||X===h||typeof X=="object"&&X!==null&&(X.$$typeof===v||X.$$typeof===d||X.$$typeof===o||X.$$typeof===s||X.$$typeof===f||X.$$typeof===p||X.$$typeof===m||X.$$typeof===y||X.$$typeof===g)}function C(X){if(typeof X=="object"&&X!==null){var le=X.$$typeof;switch(le){case e:var se=X.type;switch(se){case u:case l:case n:case a:case i:case c:return se;default:var ye=se&&se.$$typeof;switch(ye){case s:case f:case v:case d:case o:return ye;default:return le}}case r:return le}}}var w=u,D=l,_=s,x=o,S=e,O=f,E=n,P=v,F=d,M=r,B=a,R=i,V=c,k=!1;function W(X){return k||(k=!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.")),I(X)||C(X)===u}function I(X){return C(X)===l}function q(X){return C(X)===s}function Z(X){return C(X)===o}function J(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function ne(X){return C(X)===f}function G(X){return C(X)===n}function L(X){return C(X)===v}function Y(X){return C(X)===d}function j(X){return C(X)===r}function U(X){return C(X)===a}function Q(X){return C(X)===i}function K(X){return C(X)===c}tt.AsyncMode=w,tt.ConcurrentMode=D,tt.ContextConsumer=_,tt.ContextProvider=x,tt.Element=S,tt.ForwardRef=O,tt.Fragment=E,tt.Lazy=P,tt.Memo=F,tt.Portal=M,tt.Profiler=B,tt.StrictMode=R,tt.Suspense=V,tt.isAsyncMode=W,tt.isConcurrentMode=I,tt.isContextConsumer=q,tt.isContextProvider=Z,tt.isElement=J,tt.isForwardRef=ne,tt.isFragment=G,tt.isLazy=L,tt.isMemo=Y,tt.isPortal=j,tt.isProfiler=U,tt.isStrictMode=Q,tt.isSuspense=K,tt.isValidElementType=b,tt.typeOf=C}()),tt}var oy;function sy(){return oy||(oy=1,process.env.NODE_ENV==="production"?cl.exports=RO():cl.exports=IO()),cl.exports}/*
45
+ object-assign
46
+ (c) Sindre Sorhus
47
+ @license MIT
48
+ */var Jh,uy;function NO(){if(uy)return Jh;uy=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jh=i()?Object.assign:function(a,o){for(var s,u=n(a),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var c in s)e.call(s,c)&&(u[c]=s[c]);if(t){l=t(s);for(var h=0;h<l.length;h++)r.call(s,l[h])&&(u[l[h]]=s[l[h]])}}return u},Jh}var Qh,ly;function ed(){if(ly)return Qh;ly=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qh=t,Qh}var td,fy;function cy(){return fy||(fy=1,td=Function.call.bind(Object.prototype.hasOwnProperty)),td}var rd,hy;function kO(){if(hy)return rd;hy=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=ed(),r={},n=cy();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var c;try{if(typeof a[f]!="function"){var h=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=a[f](o,f,u,s,null,e)}catch(v){c=v}if(c&&!(c instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in r)){r[c.message]=!0;var d=l?l():"";t("Failed "+s+" type: "+c.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},rd=i,rd}var nd,dy;function zO(){if(dy)return nd;dy=1;var t=sy(),e=NO(),r=ed(),n=cy(),i=kO(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return nd=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function c(I){var q=I&&(l&&I[l]||I[f]);if(typeof q=="function")return q}var h="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:y(),arrayOf:b,element:C(),elementType:w(),instanceOf:D,node:O(),objectOf:x,oneOf:_,oneOfType:S,shape:P,exact:F};function v(I,q){return I===q?I!==0||1/I===1/q:I!==I&&q!==q}function g(I,q){this.message=I,this.data=q&&typeof q=="object"?q:{},this.stack=""}g.prototype=Error.prototype;function p(I){if(process.env.NODE_ENV!=="production")var q={},Z=0;function J(G,L,Y,j,U,Q,K){if(j=j||h,Q=Q||Y,K!==r){if(u){var X=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 X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=j+":"+Y;!q[le]&&Z<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+j+"`. 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."),q[le]=!0,Z++)}}return L[Y]==null?G?L[Y]===null?new g("The "+U+" `"+Q+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new g("The "+U+" `"+Q+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:I(L,Y,j,U,Q)}var ne=J.bind(null,!1);return ne.isRequired=J.bind(null,!0),ne}function m(I){function q(Z,J,ne,G,L,Y){var j=Z[J],U=R(j);if(U!==I){var Q=V(j);return new g("Invalid "+G+" `"+L+"` of type "+("`"+Q+"` supplied to `"+ne+"`, expected ")+("`"+I+"`."),{expectedType:I})}return null}return p(q)}function y(){return p(o)}function b(I){function q(Z,J,ne,G,L){if(typeof I!="function")return new g("Property `"+L+"` of component `"+ne+"` has invalid PropType notation inside arrayOf.");var Y=Z[J];if(!Array.isArray(Y)){var j=R(Y);return new g("Invalid "+G+" `"+L+"` of type "+("`"+j+"` supplied to `"+ne+"`, expected an array."))}for(var U=0;U<Y.length;U++){var Q=I(Y,U,ne,G,L+"["+U+"]",r);if(Q instanceof Error)return Q}return null}return p(q)}function C(){function I(q,Z,J,ne,G){var L=q[Z];if(!s(L)){var Y=R(L);return new g("Invalid "+ne+" `"+G+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return p(I)}function w(){function I(q,Z,J,ne,G){var L=q[Z];if(!t.isValidElementType(L)){var Y=R(L);return new g("Invalid "+ne+" `"+G+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return p(I)}function D(I){function q(Z,J,ne,G,L){if(!(Z[J]instanceof I)){var Y=I.name||h,j=W(Z[J]);return new g("Invalid "+G+" `"+L+"` of type "+("`"+j+"` supplied to `"+ne+"`, expected ")+("instance of `"+Y+"`."))}return null}return p(q)}function _(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function q(Z,J,ne,G,L){for(var Y=Z[J],j=0;j<I.length;j++)if(v(Y,I[j]))return null;var U=JSON.stringify(I,function(K,X){var le=V(X);return le==="symbol"?String(X):X});return new g("Invalid "+G+" `"+L+"` of value `"+String(Y)+"` "+("supplied to `"+ne+"`, expected one of "+U+"."))}return p(q)}function x(I){function q(Z,J,ne,G,L){if(typeof I!="function")return new g("Property `"+L+"` of component `"+ne+"` has invalid PropType notation inside objectOf.");var Y=Z[J],j=R(Y);if(j!=="object")return new g("Invalid "+G+" `"+L+"` of type "+("`"+j+"` supplied to `"+ne+"`, expected an object."));for(var U in Y)if(n(Y,U)){var Q=I(Y,U,ne,G,L+"."+U,r);if(Q instanceof Error)return Q}return null}return p(q)}function S(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var q=0;q<I.length;q++){var Z=I[q];if(typeof Z!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(Z)+" at index "+q+"."),o}function J(ne,G,L,Y,j){for(var U=[],Q=0;Q<I.length;Q++){var K=I[Q],X=K(ne,G,L,Y,j,r);if(X==null)return null;X.data&&n(X.data,"expectedType")&&U.push(X.data.expectedType)}var le=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new g("Invalid "+Y+" `"+j+"` supplied to "+("`"+L+"`"+le+"."))}return p(J)}function O(){function I(q,Z,J,ne,G){return M(q[Z])?null:new g("Invalid "+ne+" `"+G+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return p(I)}function E(I,q,Z,J,ne){return new g((I||"React class")+": "+q+" type `"+Z+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ne+"`.")}function P(I){function q(Z,J,ne,G,L){var Y=Z[J],j=R(Y);if(j!=="object")return new g("Invalid "+G+" `"+L+"` of type `"+j+"` "+("supplied to `"+ne+"`, expected `object`."));for(var U in I){var Q=I[U];if(typeof Q!="function")return E(ne,G,L,U,V(Q));var K=Q(Y,U,ne,G,L+"."+U,r);if(K)return K}return null}return p(q)}function F(I){function q(Z,J,ne,G,L){var Y=Z[J],j=R(Y);if(j!=="object")return new g("Invalid "+G+" `"+L+"` of type `"+j+"` "+("supplied to `"+ne+"`, expected `object`."));var U=e({},Z[J],I);for(var Q in U){var K=I[Q];if(n(I,Q)&&typeof K!="function")return E(ne,G,L,Q,V(K));if(!K)return new g("Invalid "+G+" `"+L+"` key `"+Q+"` supplied to `"+ne+"`.\nBad object: "+JSON.stringify(Z[J],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(I),null," "));var X=K(Y,Q,ne,G,L+"."+Q,r);if(X)return X}return null}return p(q)}function M(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(M);if(I===null||s(I))return!0;var q=c(I);if(q){var Z=q.call(I),J;if(q!==I.entries){for(;!(J=Z.next()).done;)if(!M(J.value))return!1}else for(;!(J=Z.next()).done;){var ne=J.value;if(ne&&!M(ne[1]))return!1}}else return!1;return!0;default:return!1}}function B(I,q){return I==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function R(I){var q=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":B(q,I)?"symbol":q}function V(I){if(typeof I>"u"||I===null)return""+I;var q=R(I);if(q==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return q}function k(I){var q=V(I);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function W(I){return!I.constructor||!I.constructor.name?h:I.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},nd}var id,vy;function jO(){if(vy)return id;vy=1;var t=ed();function e(){}function r(){}return r.resetWarningCache=e,id=function(){function n(o,s,u,l,f,c){if(c!==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 a={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 a.PropTypes=a,a},id}if(process.env.NODE_ENV!=="production"){var VO=sy(),HO=!0;Zh.exports=zO()(VO.isElement,HO)}else Zh.exports=jO()();var li=Zh.exports,hl={exports:{}},py={};function gy(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=gy(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function my(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=gy(t))&&(n&&(n+=" "),n+=e);return n}const WO=zm(Object.freeze(Object.defineProperty({__proto__:null,clsx:my,default:my},Symbol.toStringTag,{value:"Module"})));var mt={},pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.dontSetMe=YO,pn.findInArray=$O,pn.int=qO,pn.isFunction=GO,pn.isNum=UO;function $O(t,e){for(let r=0,n=t.length;r<n;r++)if(e.apply(e,[t[r],r,t]))return t[r]}function GO(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Function]"}function UO(t){return typeof t=="number"&&!isNaN(t)}function qO(t){return parseInt(t,10)}function YO(t,e,r){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(r," - do not set this, set it on the child."))}var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.browserPrefixToKey=by,Xi.browserPrefixToStyle=XO,Xi.default=void 0,Xi.getPrefix=yy;const ad=["Moz","Webkit","O","ms"];function yy(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const r=(t=window.document)===null||t===void 0||(t=t.documentElement)===null||t===void 0?void 0:t.style;if(!r||e in r)return"";for(let n=0;n<ad.length;n++)if(by(e,ad[n])in r)return ad[n];return""}function by(t,e){return e?"".concat(e).concat(KO(t)):t}function XO(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t}function KO(t){let e="",r=!0;for(let n=0;n<t.length;n++)r?(e+=t[n].toUpperCase(),r=!1):t[n]==="-"?r=!0:e+=t[n];return e}Xi.default=yy(),Object.defineProperty(mt,"__esModule",{value:!0}),mt.addClassName=_y,mt.addEvent=QO,mt.addUserSelectStyles=fP,mt.createCSSTransform=oP,mt.createSVGTransform=sP,mt.getTouch=uP,mt.getTouchIdentifier=lP,mt.getTranslation=od,mt.innerHeight=nP,mt.innerWidth=iP,mt.matchesSelector=Dy,mt.matchesSelectorAndParentsTo=JO,mt.offsetXYFromParent=aP,mt.outerHeight=tP,mt.outerWidth=rP,mt.removeClassName=xy,mt.removeEvent=eP,mt.removeUserSelectStyles=cP;var Dr=pn,Cy=ZO(Xi);function wy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(wy=function(n){return n?r:e})(t)}function ZO(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=wy(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}let dl="";function Dy(t,e){return dl||(dl=(0,Dr.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(r){return(0,Dr.isFunction)(t[r])})),(0,Dr.isFunction)(t[dl])?t[dl](e):!1}function JO(t,e,r){let n=t;do{if(Dy(n,e))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1}function QO(t,e,r,n){if(!t)return;const i={capture:!0,...n};t.addEventListener?t.addEventListener(e,r,i):t.attachEvent?t.attachEvent("on"+e,r):t["on"+e]=r}function eP(t,e,r,n){if(!t)return;const i={capture:!0,...n};t.removeEventListener?t.removeEventListener(e,r,i):t.detachEvent?t.detachEvent("on"+e,r):t["on"+e]=null}function tP(t){let e=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,Dr.int)(r.borderTopWidth),e+=(0,Dr.int)(r.borderBottomWidth),e}function rP(t){let e=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,Dr.int)(r.borderLeftWidth),e+=(0,Dr.int)(r.borderRightWidth),e}function nP(t){let e=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,Dr.int)(r.paddingTop),e-=(0,Dr.int)(r.paddingBottom),e}function iP(t){let e=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,Dr.int)(r.paddingLeft),e-=(0,Dr.int)(r.paddingRight),e}function aP(t,e,r){const i=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect(),a=(t.clientX+e.scrollLeft-i.left)/r,o=(t.clientY+e.scrollTop-i.top)/r;return{x:a,y:o}}function oP(t,e){const r=od(t,e,"px");return{[(0,Cy.browserPrefixToKey)("transform",Cy.default)]:r}}function sP(t,e){return od(t,e,"")}function od(t,e,r){let{x:n,y:i}=t,a="translate(".concat(n).concat(r,",").concat(i).concat(r,")");if(e){const o="".concat(typeof e.x=="string"?e.x:e.x+r),s="".concat(typeof e.y=="string"?e.y:e.y+r);a="translate(".concat(o,", ").concat(s,")")+a}return a}function uP(t,e){return t.targetTouches&&(0,Dr.findInArray)(t.targetTouches,r=>e===r.identifier)||t.changedTouches&&(0,Dr.findInArray)(t.changedTouches,r=>e===r.identifier)}function lP(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier}function fP(t){if(!t)return;let e=t.getElementById("react-draggable-style-el");e||(e=t.createElement("style"),e.type="text/css",e.id="react-draggable-style-el",e.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
50
+ `,e.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
51
+ `,t.getElementsByTagName("head")[0].appendChild(e)),t.body&&_y(t.body,"react-draggable-transparent-selection")}function cP(t){if(t)try{if(t.body&&xy(t.body,"react-draggable-transparent-selection"),t.selection)t.selection.empty();else{const e=(t.defaultView||window).getSelection();e&&e.type!=="Caret"&&e.removeAllRanges()}}catch{}}function _y(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function xy(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}var gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.canDragX=vP,gn.canDragY=pP,gn.createCoreData=mP,gn.createDraggableData=yP,gn.getBoundPosition=hP,gn.getControlPosition=gP,gn.snapToGrid=dP;var _r=pn,to=mt;function hP(t,e,r){if(!t.props.bounds)return[e,r];let{bounds:n}=t.props;n=typeof n=="string"?n:bP(n);const i=sd(t);if(typeof n=="string"){const{ownerDocument:a}=i,o=a.defaultView;let s;if(n==="parent"?s=i.parentNode:s=a.querySelector(n),!(s instanceof o.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const u=s,l=o.getComputedStyle(i),f=o.getComputedStyle(u);n={left:-i.offsetLeft+(0,_r.int)(f.paddingLeft)+(0,_r.int)(l.marginLeft),top:-i.offsetTop+(0,_r.int)(f.paddingTop)+(0,_r.int)(l.marginTop),right:(0,to.innerWidth)(u)-(0,to.outerWidth)(i)-i.offsetLeft+(0,_r.int)(f.paddingRight)-(0,_r.int)(l.marginRight),bottom:(0,to.innerHeight)(u)-(0,to.outerHeight)(i)-i.offsetTop+(0,_r.int)(f.paddingBottom)-(0,_r.int)(l.marginBottom)}}return(0,_r.isNum)(n.right)&&(e=Math.min(e,n.right)),(0,_r.isNum)(n.bottom)&&(r=Math.min(r,n.bottom)),(0,_r.isNum)(n.left)&&(e=Math.max(e,n.left)),(0,_r.isNum)(n.top)&&(r=Math.max(r,n.top)),[e,r]}function dP(t,e,r){const n=Math.round(e/t[0])*t[0],i=Math.round(r/t[1])*t[1];return[n,i]}function vP(t){return t.props.axis==="both"||t.props.axis==="x"}function pP(t){return t.props.axis==="both"||t.props.axis==="y"}function gP(t,e,r){const n=typeof e=="number"?(0,to.getTouch)(t,e):null;if(typeof e=="number"&&!n)return null;const i=sd(r),a=r.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,to.offsetXYFromParent)(n||t,a,r.props.scale)}function mP(t,e,r){const n=!(0,_r.isNum)(t.lastX),i=sd(t);return n?{node:i,deltaX:0,deltaY:0,lastX:e,lastY:r,x:e,y:r}:{node:i,deltaX:e-t.lastX,deltaY:r-t.lastY,lastX:t.lastX,lastY:t.lastY,x:e,y:r}}function yP(t,e){const r=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/r,y:t.state.y+e.deltaY/r,deltaX:e.deltaX/r,deltaY:e.deltaY/r,lastX:t.state.x,lastY:t.state.y}}function bP(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function sd(t){const e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var vl={},pl={};Object.defineProperty(pl,"__esModule",{value:!0}),pl.default=CP;function CP(){}Object.defineProperty(vl,"__esModule",{value:!0}),vl.default=void 0;var ud=DP(z),ur=fd(li),wP=fd(sl),jt=mt,fi=gn,ld=pn,Ss=fd(pl);function fd(t){return t&&t.__esModule?t:{default:t}}function Sy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Sy=function(n){return n?r:e})(t)}function DP(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Sy(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function Zt(t,e,r){return e=_P(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _P(t){var e=xP(t,"string");return typeof e=="symbol"?e:String(e)}function xP(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}const tn={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let ci=tn.mouse,gl=class extends ud.Component{constructor(){super(...arguments),Zt(this,"dragging",!1),Zt(this,"lastX",NaN),Zt(this,"lastY",NaN),Zt(this,"touchIdentifier",null),Zt(this,"mounted",!1),Zt(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button=="number"&&e.button!==0)return!1;const r=this.findDOMNode();if(!r||!r.ownerDocument||!r.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=r;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,jt.matchesSelectorAndParentsTo)(e.target,this.props.handle,r)||this.props.cancel&&(0,jt.matchesSelectorAndParentsTo)(e.target,this.props.cancel,r))return;e.type==="touchstart"&&e.preventDefault();const i=(0,jt.getTouchIdentifier)(e);this.touchIdentifier=i;const a=(0,fi.getControlPosition)(e,i,this);if(a==null)return;const{x:o,y:s}=a,u=(0,fi.createCoreData)(this,o,s);(0,Ss.default)("DraggableCore: handleDragStart: %j",u),(0,Ss.default)("calling",this.props.onStart),!(this.props.onStart(e,u)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,jt.addUserSelectStyles)(n),this.dragging=!0,this.lastX=o,this.lastY=s,(0,jt.addEvent)(n,ci.move,this.handleDrag),(0,jt.addEvent)(n,ci.stop,this.handleDragStop))}),Zt(this,"handleDrag",e=>{const r=(0,fi.getControlPosition)(e,this.touchIdentifier,this);if(r==null)return;let{x:n,y:i}=r;if(Array.isArray(this.props.grid)){let s=n-this.lastX,u=i-this.lastY;if([s,u]=(0,fi.snapToGrid)(this.props.grid,s,u),!s&&!u)return;n=this.lastX+s,i=this.lastY+u}const a=(0,fi.createCoreData)(this,n,i);if((0,Ss.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(e,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const u=document.createEvent("MouseEvents");u.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(u)}return}this.lastX=n,this.lastY=i}),Zt(this,"handleDragStop",e=>{if(!this.dragging)return;const r=(0,fi.getControlPosition)(e,this.touchIdentifier,this);if(r==null)return;let{x:n,y:i}=r;if(Array.isArray(this.props.grid)){let u=n-this.lastX||0,l=i-this.lastY||0;[u,l]=(0,fi.snapToGrid)(this.props.grid,u,l),n=this.lastX+u,i=this.lastY+l}const a=(0,fi.createCoreData)(this,n,i);if(this.props.onStop(e,a)===!1||this.mounted===!1)return!1;const s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,jt.removeUserSelectStyles)(s.ownerDocument),(0,Ss.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,Ss.default)("DraggableCore: Removing handlers"),(0,jt.removeEvent)(s.ownerDocument,ci.move,this.handleDrag),(0,jt.removeEvent)(s.ownerDocument,ci.stop,this.handleDragStop))}),Zt(this,"onMouseDown",e=>(ci=tn.mouse,this.handleDragStart(e))),Zt(this,"onMouseUp",e=>(ci=tn.mouse,this.handleDragStop(e))),Zt(this,"onTouchStart",e=>(ci=tn.touch,this.handleDragStart(e))),Zt(this,"onTouchEnd",e=>(ci=tn.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,jt.addEvent)(e,tn.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:r}=e;(0,jt.removeEvent)(r,tn.mouse.move,this.handleDrag),(0,jt.removeEvent)(r,tn.touch.move,this.handleDrag),(0,jt.removeEvent)(r,tn.mouse.stop,this.handleDragStop),(0,jt.removeEvent)(r,tn.touch.stop,this.handleDragStop),(0,jt.removeEvent)(e,tn.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,jt.removeUserSelectStyles)(r)}}findDOMNode(){var e,r;return(e=this.props)!==null&&e!==void 0&&e.nodeRef?(r=this.props)===null||r===void 0||(r=r.nodeRef)===null||r===void 0?void 0:r.current:wP.default.findDOMNode(this)}render(){return ud.cloneElement(ud.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};vl.default=gl,Zt(gl,"displayName","DraggableCore"),Zt(gl,"propTypes",{allowAnyClick:ur.default.bool,children:ur.default.node.isRequired,disabled:ur.default.bool,enableUserSelectHack:ur.default.bool,offsetParent:function(t,e){if(t[e]&&t[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:ur.default.arrayOf(ur.default.number),handle:ur.default.string,cancel:ur.default.string,nodeRef:ur.default.object,onStart:ur.default.func,onDrag:ur.default.func,onStop:ur.default.func,onMouseDown:ur.default.func,scale:ur.default.number,className:ld.dontSetMe,style:ld.dontSetMe,transform:ld.dontSetMe}),Zt(gl,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),t.default=void 0;var e=h(z),r=f(li),n=f(sl),i=f(WO),a=mt,o=gn,s=pn,u=f(vl),l=f(pl);function f(y){return y&&y.__esModule?y:{default:y}}function c(y){if(typeof WeakMap!="function")return null;var b=new WeakMap,C=new WeakMap;return(c=function(w){return w?C:b})(y)}function h(y,b){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var C=c(b);if(C&&C.has(y))return C.get(y);var w={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in y)if(_!=="default"&&Object.prototype.hasOwnProperty.call(y,_)){var x=D?Object.getOwnPropertyDescriptor(y,_):null;x&&(x.get||x.set)?Object.defineProperty(w,_,x):w[_]=y[_]}return w.default=y,C&&C.set(y,w),w}function d(){return d=Object.assign?Object.assign.bind():function(y){for(var b=1;b<arguments.length;b++){var C=arguments[b];for(var w in C)Object.prototype.hasOwnProperty.call(C,w)&&(y[w]=C[w])}return y},d.apply(this,arguments)}function v(y,b,C){return b=g(b),b in y?Object.defineProperty(y,b,{value:C,enumerable:!0,configurable:!0,writable:!0}):y[b]=C,y}function g(y){var b=p(y,"string");return typeof b=="symbol"?b:String(b)}function p(y,b){if(typeof y!="object"||y===null)return y;var C=y[Symbol.toPrimitive];if(C!==void 0){var w=C.call(y,b||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(y)}class m extends e.Component{static getDerivedStateFromProps(b,C){let{position:w}=b,{prevPropsPosition:D}=C;return w&&(!D||w.x!==D.x||w.y!==D.y)?((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:w,prevPropsPosition:D}),{x:w.x,y:w.y,prevPropsPosition:{...w}}):null}constructor(b){super(b),v(this,"onDragStart",(C,w)=>{if((0,l.default)("Draggable: onDragStart: %j",w),this.props.onStart(C,(0,o.createDraggableData)(this,w))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),v(this,"onDrag",(C,w)=>{if(!this.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",w);const D=(0,o.createDraggableData)(this,w),_={x:D.x,y:D.y,slackX:0,slackY:0};if(this.props.bounds){const{x:S,y:O}=_;_.x+=this.state.slackX,_.y+=this.state.slackY;const[E,P]=(0,o.getBoundPosition)(this,_.x,_.y);_.x=E,_.y=P,_.slackX=this.state.slackX+(S-_.x),_.slackY=this.state.slackY+(O-_.y),D.x=_.x,D.y=_.y,D.deltaX=_.x-this.state.x,D.deltaY=_.y-this.state.y}if(this.props.onDrag(C,D)===!1)return!1;this.setState(_)}),v(this,"onDragStop",(C,w)=>{if(!this.state.dragging||this.props.onStop(C,(0,o.createDraggableData)(this,w))===!1)return!1;(0,l.default)("Draggable: onDragStop: %j",w);const _={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:S,y:O}=this.props.position;_.x=S,_.y=O}this.setState(_)}),this.state={dragging:!1,dragged:!1,x:b.position?b.position.x:b.defaultPosition.x,y:b.position?b.position.y:b.defaultPosition.y,prevPropsPosition:{...b.position},slackX:0,slackY:0,isElementSVG:!1},b.position&&!(b.onDrag||b.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var b,C;return(b=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&b!==void 0?b:n.default.findDOMNode(this)}render(){const{axis:b,bounds:C,children:w,defaultPosition:D,defaultClassName:_,defaultClassNameDragging:x,defaultClassNameDragged:S,position:O,positionOffset:E,scale:P,...F}=this.props;let M={},B=null;const V=!!!O||this.state.dragging,k=O||D,W={x:(0,o.canDragX)(this)&&V?this.state.x:k.x,y:(0,o.canDragY)(this)&&V?this.state.y:k.y};this.state.isElementSVG?B=(0,a.createSVGTransform)(W,E):M=(0,a.createCSSTransform)(W,E);const I=(0,i.default)(w.props.className||"",_,{[x]:this.state.dragging,[S]:this.state.dragged});return e.createElement(u.default,d({},F,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(w),{className:I,style:{...w.props.style,...M},transform:B}))}}t.default=m,v(m,"displayName","Draggable"),v(m,"propTypes",{...u.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),v(m,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(py);const{default:Ey,DraggableCore:SP}=py;hl.exports=Ey,hl.exports.default=Ey,hl.exports.DraggableCore=SP;var Ay=hl.exports,ml={exports:{}},Es={},cd={};cd.__esModule=!0,cd.cloneElement=BP;var EP=AP(z);function AP(t){return t&&t.__esModule?t:{default:t}}function Ty(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 Oy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ty(Object(r),!0).forEach(function(n){TP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function TP(t,e,r){return e=OP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OP(t){var e=PP(t,"string");return typeof e=="symbol"?e:String(e)}function PP(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BP(t,e){return e.style&&t.props.style&&(e.style=Oy(Oy({},t.props.style),e.style)),e.className&&t.props.className&&(e.className=t.props.className+" "+e.className),EP.default.cloneElement(t,e)}var As={};As.__esModule=!0,As.resizableProps=void 0;var Fe=MP(li);function MP(t){return t&&t.__esModule?t:{default:t}}var FP={axis:Fe.default.oneOf(["both","x","y","none"]),className:Fe.default.string,children:Fe.default.element.isRequired,draggableOpts:Fe.default.shape({allowAnyClick:Fe.default.bool,cancel:Fe.default.string,children:Fe.default.node,disabled:Fe.default.bool,enableUserSelectHack:Fe.default.bool,offsetParent:Fe.default.node,grid:Fe.default.arrayOf(Fe.default.number),handle:Fe.default.string,nodeRef:Fe.default.object,onStart:Fe.default.func,onDrag:Fe.default.func,onStop:Fe.default.func,onMouseDown:Fe.default.func,scale:Fe.default.number}),height:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(i.axis==="both"||i.axis==="y"){var a;return(a=Fe.default.number).isRequired.apply(a,r)}return Fe.default.number.apply(Fe.default,r)},handle:Fe.default.oneOfType([Fe.default.node,Fe.default.func]),handleSize:Fe.default.arrayOf(Fe.default.number),lockAspectRatio:Fe.default.bool,maxConstraints:Fe.default.arrayOf(Fe.default.number),minConstraints:Fe.default.arrayOf(Fe.default.number),onResizeStop:Fe.default.func,onResizeStart:Fe.default.func,onResize:Fe.default.func,resizeHandles:Fe.default.arrayOf(Fe.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:Fe.default.number,width:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(i.axis==="both"||i.axis==="x"){var a;return(a=Fe.default.number).isRequired.apply(a,r)}return Fe.default.number.apply(Fe.default,r)}};As.resizableProps=FP,Es.__esModule=!0,Es.default=void 0;var Ts=kP(z),LP=Ay,RP=cd,IP=As,NP=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function Py(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Py=function(i){return i?r:e})(t)}function kP(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Py(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function hd(){return hd=Object.assign?Object.assign.bind():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},hd.apply(this,arguments)}function zP(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function By(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?By(Object(r),!0).forEach(function(n){jP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):By(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jP(t,e,r){return e=VP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VP(t){var e=HP(t,"string");return typeof e=="symbol"?e:String(e)}function HP(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WP(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,vd(t,e)}function vd(t,e){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vd(t,e)}var pd=function(t){WP(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var r=e.prototype;return r.componentWillUnmount=function(){this.resetData()},r.resetData=function(){this.lastHandleRect=this.slack=null},r.runConstraints=function(i,a){var o=this.props,s=o.minConstraints,u=o.maxConstraints,l=o.lockAspectRatio;if(!s&&!u&&!l)return[i,a];if(l){var f=this.props.width/this.props.height,c=i-this.props.width,h=a-this.props.height;Math.abs(c)>Math.abs(h*f)?a=i/f:i=a*f}var d=i,v=a,g=this.slack||[0,0],p=g[0],m=g[1];return i+=p,a+=m,s&&(i=Math.max(s[0],i),a=Math.max(s[1],a)),u&&(i=Math.min(u[0],i),a=Math.min(u[1],a)),this.slack=[p+(d-i),m+(v-a)],[i,a]},r.resizeHandler=function(i,a){var o=this;return function(s,u){var l=u.node,f=u.deltaX,c=u.deltaY;i==="onResizeStart"&&o.resetData();var h=(o.props.axis==="both"||o.props.axis==="x")&&a!=="n"&&a!=="s",d=(o.props.axis==="both"||o.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!h&&!d)){var v=a[0],g=a[a.length-1],p=l.getBoundingClientRect();if(o.lastHandleRect!=null){if(g==="w"){var m=p.left-o.lastHandleRect.left;f+=m}if(v==="n"){var y=p.top-o.lastHandleRect.top;c+=y}}o.lastHandleRect=p,g==="w"&&(f=-f),v==="n"&&(c=-c);var b=o.props.width+(h?f/o.props.transformScale:0),C=o.props.height+(d?c/o.props.transformScale:0),w=o.runConstraints(b,C);b=w[0],C=w[1];var D=b!==o.props.width||C!==o.props.height,_=typeof o.props[i]=="function"?o.props[i]:null,x=i==="onResize"&&!D;_&&!x&&(s.persist==null||s.persist(),_(s,{node:l,size:{width:b,height:C},handle:a})),i==="onResizeStop"&&o.resetData()}}},r.renderResizeHandle=function(i,a){var o=this.props.handle;if(!o)return Ts.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+i,ref:a});if(typeof o=="function")return o(i,a);var s=typeof o.type=="string",u=dd({ref:a},s?{}:{handleAxis:i});return Ts.cloneElement(o,u)},r.render=function(){var i=this,a=this.props,o=a.children,s=a.className,u=a.draggableOpts;a.width,a.height,a.handle,a.handleSize,a.lockAspectRatio,a.axis,a.minConstraints,a.maxConstraints,a.onResize,a.onResizeStop,a.onResizeStart;var l=a.resizeHandles;a.transformScale;var f=zP(a,NP);return(0,RP.cloneElement)(o,dd(dd({},f),{},{className:(s?s+" ":"")+"react-resizable",children:[].concat(o.props.children,l.map(function(c){var h,d=(h=i.handleRefs[c])!=null?h:i.handleRefs[c]=Ts.createRef();return Ts.createElement(LP.DraggableCore,hd({},u,{nodeRef:d,key:"resizableHandle-"+c,onStop:i.resizeHandler("onResizeStop",c),onStart:i.resizeHandler("onResizeStart",c),onDrag:i.resizeHandler("onResize",c)}),i.renderResizeHandle(c,d))}))}))},e}(Ts.Component);Es.default=pd,pd.propTypes=IP.resizableProps,pd.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var yl={};yl.__esModule=!0,yl.default=void 0;var gd=YP(z),$P=My(li),GP=My(Es),UP=As,qP=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function My(t){return t&&t.__esModule?t:{default:t}}function Fy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Fy=function(i){return i?r:e})(t)}function YP(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Fy(e);if(r&&r.has(t))return r.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function md(){return md=Object.assign?Object.assign.bind():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},md.apply(this,arguments)}function Ly(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 bl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ly(Object(r),!0).forEach(function(n){XP(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ly(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function XP(t,e,r){return e=KP(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KP(t){var e=ZP(t,"string");return typeof e=="symbol"?e:String(e)}function ZP(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JP(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function QP(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yd(t,e)}function yd(t,e){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yd(t,e)}var Ry=function(t){QP(e,t);function e(){for(var n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=t.call.apply(t,[this].concat(a))||this,n.state={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(s,u){var l=u.size;n.props.onResize?(s.persist==null||s.persist(),n.setState(l,function(){return n.props.onResize&&n.props.onResize(s,u)})):n.setState(l)},n}e.getDerivedStateFromProps=function(i,a){return a.propsWidth!==i.width||a.propsHeight!==i.height?{width:i.width,height:i.height,propsWidth:i.width,propsHeight:i.height}:null};var r=e.prototype;return r.render=function(){var i=this.props,a=i.handle,o=i.handleSize;i.onResize;var s=i.onResizeStart,u=i.onResizeStop,l=i.draggableOpts,f=i.minConstraints,c=i.maxConstraints,h=i.lockAspectRatio,d=i.axis;i.width,i.height;var v=i.resizeHandles,g=i.style,p=i.transformScale,m=JP(i,qP);return gd.createElement(GP.default,{axis:d,draggableOpts:l,handle:a,handleSize:o,height:this.state.height,lockAspectRatio:h,maxConstraints:c,minConstraints:f,onResizeStart:s,onResize:this.onResize,onResizeStop:u,resizeHandles:v,transformScale:p,width:this.state.width},gd.createElement("div",md({},m,{style:bl(bl({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},e}(gd.Component);yl.default=Ry,Ry.propTypes=bl(bl({},UP.resizableProps),{},{children:$P.default.element}),ml.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ml.exports.Resizable=Es.default,ml.exports.ResizableBox=yl.default;var eB=ml.exports,Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.resizeHandleType=Wn.resizeHandleAxesType=Wn.default=void 0;var Re=Iy(li),tB=Iy(z);function Iy(t){return t&&t.__esModule?t:{default:t}}const rB=Wn.resizeHandleAxesType=Re.default.arrayOf(Re.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),nB=Wn.resizeHandleType=Re.default.oneOfType([Re.default.node,Re.default.func]);Wn.default={className:Re.default.string,style:Re.default.object,width:Re.default.number,autoSize:Re.default.bool,cols:Re.default.number,draggableCancel:Re.default.string,draggableHandle:Re.default.string,verticalCompact:function(t){t.verticalCompact===!1&&process.env.NODE_ENV!=="production"&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:Re.default.oneOf(["vertical","horizontal"]),layout:function(t){var e=t.layout;e!==void 0&&Ne.validateLayout(e,"layout")},margin:Re.default.arrayOf(Re.default.number),containerPadding:Re.default.arrayOf(Re.default.number),rowHeight:Re.default.number,maxRows:Re.default.number,isBounded:Re.default.bool,isDraggable:Re.default.bool,isResizable:Re.default.bool,allowOverlap:Re.default.bool,preventCollision:Re.default.bool,useCSSTransforms:Re.default.bool,transformScale:Re.default.number,isDroppable:Re.default.bool,resizeHandles:rB,resizeHandle:nB,onLayoutChange:Re.default.func,onDragStart:Re.default.func,onDrag:Re.default.func,onDragStop:Re.default.func,onResizeStart:Re.default.func,onResize:Re.default.func,onResizeStop:Re.default.func,onDrop:Re.default.func,droppingItem:Re.default.shape({i:Re.default.string.isRequired,w:Re.default.number.isRequired,h:Re.default.number.isRequired}),children:function(t,e){const r=t[e],n={};tB.default.Children.forEach(r,function(i){if((i==null?void 0:i.key)!=null){if(n[i.key])throw new Error('Duplicate child key "'+i.key+'" found! This will cause problems in ReactGridLayout.');n[i.key]=!0}})},innerRef:Re.default.any},Object.defineProperty(fl,"__esModule",{value:!0}),fl.default=void 0;var ro=bd(z),Ze=bd(li),iB=Ay,aB=eB,no=Ne,Rt=vn,Ny=Wn,oB=bd(kh);function bd(t){return t&&t.__esModule?t:{default:t}}function mn(t,e,r){return e=sB(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sB(t){var e=uB(t,"string");return typeof e=="symbol"?e:String(e)}function uB(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Cd extends ro.default.Component{constructor(){super(...arguments),mn(this,"state",{resizing:null,dragging:null,className:""}),mn(this,"elementRef",ro.default.createRef()),mn(this,"onDragStart",(e,r)=>{let{node:n}=r;const{onDragStart:i,transformScale:a}=this.props;if(!i)return;const o={top:0,left:0},{offsetParent:s}=n;if(!s)return;const u=s.getBoundingClientRect(),l=n.getBoundingClientRect(),f=l.left/a,c=u.left/a,h=l.top/a,d=u.top/a;o.left=f-c+s.scrollLeft,o.top=h-d+s.scrollTop,this.setState({dragging:o});const{x:v,y:g}=(0,Rt.calcXY)(this.getPositionParams(),o.top,o.left,this.props.w,this.props.h);return i.call(this,this.props.i,v,g,{e,node:n,newPosition:o})}),mn(this,"onDrag",(e,r)=>{let{node:n,deltaX:i,deltaY:a}=r;const{onDrag:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let s=this.state.dragging.top+a,u=this.state.dragging.left+i;const{isBounded:l,i:f,w:c,h,containerWidth:d}=this.props,v=this.getPositionParams();if(l){const{offsetParent:y}=n;if(y){const{margin:b,rowHeight:C,containerPadding:w}=this.props,D=y.clientHeight-(0,Rt.calcGridItemWHPx)(h,C,b[1]);s=(0,Rt.clamp)(s-w[1],0,D);const _=(0,Rt.calcGridColWidth)(v),x=d-(0,Rt.calcGridItemWHPx)(c,_,b[0]);u=(0,Rt.clamp)(u-w[0],0,x)}}const g={top:s,left:u};this.setState({dragging:g});const{x:p,y:m}=(0,Rt.calcXY)(v,s,u,c,h);return o.call(this,f,p,m,{e,node:n,newPosition:g})}),mn(this,"onDragStop",(e,r)=>{let{node:n}=r;const{onDragStop:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:a,h:o,i:s}=this.props,{left:u,top:l}=this.state.dragging,f={top:l,left:u};this.setState({dragging:null});const{x:c,y:h}=(0,Rt.calcXY)(this.getPositionParams(),l,u,a,o);return i.call(this,s,c,h,{e,node:n,newPosition:f})}),mn(this,"onResizeStop",(e,r,n)=>this.onResizeHandler(e,r,n,"onResizeStop")),mn(this,"onResizeStart",(e,r,n)=>this.onResizeHandler(e,r,n,"onResizeStart")),mn(this,"onResize",(e,r,n)=>this.onResizeHandler(e,r,n,"onResize"))}shouldComponentUpdate(e,r){if(this.props.children!==e.children||this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,Rt.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),i=(0,Rt.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,r);return!(0,no.fastPositionEqual)(n,i)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:r}=this.props;if(!r)return;const n=this.elementRef.current;if(!n)return;const i=e.droppingPosition||{left:0,top:0},{dragging:a}=this.state,o=a&&r.left!==i.left||r.top!==i.top;if(!a)this.onDragStart(r.e,{node:n,deltaX:r.left,deltaY:r.top});else if(o){const s=r.left-a.left,u=r.top-a.top;this.onDrag(r.e,{node:n,deltaX:s,deltaY:u})}}getPositionParams(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:r,containerWidth:n,useCSSTransforms:i}=this.props;let a;return i?a=(0,no.setTransform)(e):(a=(0,no.setTopLeft)(e),r&&(a.left=(0,no.perc)(e.left/n),a.width=(0,no.perc)(e.width/n))),a}mixinDraggable(e,r){return ro.default.createElement(iB.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,r){return(n,i)=>r(n,i,e)}mixinResizable(e,r,n){const{cols:i,minW:a,minH:o,maxW:s,maxH:u,transformScale:l,resizeHandles:f,resizeHandle:c}=this.props,h=this.getPositionParams(),d=(0,Rt.calcGridItemPosition)(h,0,0,i,0).width,v=(0,Rt.calcGridItemPosition)(h,0,0,a,o),g=(0,Rt.calcGridItemPosition)(h,0,0,s,u),p=[v.width,v.height],m=[Math.min(g.width,d),Math.min(g.height,1/0)];return ro.default.createElement(aB.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:r.width,height:r.height,minConstraints:p,maxConstraints:m,onResizeStop:this.curryResizeHandler(r,this.onResizeStop),onResizeStart:this.curryResizeHandler(r,this.onResizeStart),onResize:this.curryResizeHandler(r,this.onResize),transformScale:l,resizeHandles:f,handle:c},e)}onResizeHandler(e,r,n,i){let{node:a,size:o,handle:s}=r;const u=this.props[i];if(!u)return;const{x:l,y:f,i:c,maxH:h,minH:d,containerWidth:v}=this.props,{minW:g,maxW:p}=this.props;let m=o;a&&(m=(0,no.resizeItemInDirection)(s,n,o,v),this.setState({resizing:i==="onResizeStop"?null:m}));let{w:y,h:b}=(0,Rt.calcWH)(this.getPositionParams(),m.width,m.height,l,f,s);y=(0,Rt.clamp)(y,Math.max(g,1),p),b=(0,Rt.clamp)(b,d,h),u.call(this,c,y,b,{e,node:a,size:m,handle:s})}render(){const{x:e,y:r,w:n,h:i,isDraggable:a,isResizable:o,droppingPosition:s,useCSSTransforms:u}=this.props,l=(0,Rt.calcGridItemPosition)(this.getPositionParams(),e,r,n,i,this.state),f=ro.default.Children.only(this.props.children);let c=ro.default.cloneElement(f,{ref:this.elementRef,className:(0,oB.default)("react-grid-item",f.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!s,cssTransforms:u}),style:{...this.props.style,...f.props.style,...this.createStyle(l)}});return c=this.mixinResizable(c,l,o),c=this.mixinDraggable(c,a),c}}fl.default=Cd,mn(Cd,"propTypes",{children:Ze.default.element,cols:Ze.default.number.isRequired,containerWidth:Ze.default.number.isRequired,rowHeight:Ze.default.number.isRequired,margin:Ze.default.array.isRequired,maxRows:Ze.default.number.isRequired,containerPadding:Ze.default.array.isRequired,x:Ze.default.number.isRequired,y:Ze.default.number.isRequired,w:Ze.default.number.isRequired,h:Ze.default.number.isRequired,minW:function(t,e){const r=t[e];if(typeof r!="number")return new Error("minWidth not Number");if(r>t.w||r>t.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(t,e){const r=t[e];if(typeof r!="number")return new Error("maxWidth not Number");if(r<t.w||r<t.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(t,e){const r=t[e];if(typeof r!="number")return new Error("minHeight not Number");if(r>t.h||r>t.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(t,e){const r=t[e];if(typeof r!="number")return new Error("maxHeight not Number");if(r<t.h||r<t.minH)return new Error("maxHeight smaller than item height/minHeight")},i:Ze.default.string.isRequired,resizeHandles:Ny.resizeHandleAxesType,resizeHandle:Ny.resizeHandleType,onDragStop:Ze.default.func,onDragStart:Ze.default.func,onDrag:Ze.default.func,onResizeStop:Ze.default.func,onResizeStart:Ze.default.func,onResize:Ze.default.func,isDraggable:Ze.default.bool.isRequired,isResizable:Ze.default.bool.isRequired,isBounded:Ze.default.bool.isRequired,static:Ze.default.bool,useCSSTransforms:Ze.default.bool.isRequired,transformScale:Ze.default.number,className:Ze.default.string,handle:Ze.default.string,cancel:Ze.default.string,droppingPosition:Ze.default.shape({e:Ze.default.object.isRequired,left:Ze.default.number.isRequired,top:Ze.default.number.isRequired})}),mn(Cd,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=void 0;var Ki=hB(z),wd=Ih,lB=Dd(kh),Se=Ne,fB=vn,ky=Dd(fl),cB=Dd(Wn);function Dd(t){return t&&t.__esModule?t:{default:t}}function zy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(zy=function(n){return n?r:e})(t)}function hB(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=zy(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function Vt(t,e,r){return e=dB(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dB(t){var e=vB(t,"string");return typeof e=="symbol"?e:String(e)}function vB(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}const jy="react-grid-layout";let Vy=!1;try{Vy=/firefox/i.test(navigator.userAgent)}catch{}class Cl extends Ki.Component{constructor(){super(...arguments),Vt(this,"state",{activeDrag:null,layout:(0,Se.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,Se.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),Vt(this,"dragEnterCounter",0),Vt(this,"onDragStart",(e,r,n,i)=>{let{e:a,node:o}=i;const{layout:s}=this.state,u=(0,Se.getLayoutItem)(s,e);if(!u)return;const l={w:u.w,h:u.h,x:u.x,y:u.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,Se.cloneLayoutItem)(u),oldLayout:s,activeDrag:l}),this.props.onDragStart(s,u,u,null,a,o)}),Vt(this,"onDrag",(e,r,n,i)=>{let{e:a,node:o}=i;const{oldDragItem:s}=this.state;let{layout:u}=this.state;const{cols:l,allowOverlap:f,preventCollision:c}=this.props,h=(0,Se.getLayoutItem)(u,e);if(!h)return;const d={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};u=(0,Se.moveElement)(u,h,r,n,!0,c,(0,Se.compactType)(this.props),l,f),this.props.onDrag(u,s,h,d,a,o),this.setState({layout:f?u:(0,Se.compact)(u,(0,Se.compactType)(this.props),l),activeDrag:d})}),Vt(this,"onDragStop",(e,r,n,i)=>{let{e:a,node:o}=i;if(!this.state.activeDrag)return;const{oldDragItem:s}=this.state;let{layout:u}=this.state;const{cols:l,preventCollision:f,allowOverlap:c}=this.props,h=(0,Se.getLayoutItem)(u,e);if(!h)return;u=(0,Se.moveElement)(u,h,r,n,!0,f,(0,Se.compactType)(this.props),l,c);const v=c?u:(0,Se.compact)(u,(0,Se.compactType)(this.props),l);this.props.onDragStop(v,s,h,null,a,o);const{oldLayout:g}=this.state;this.setState({activeDrag:null,layout:v,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(v,g)}),Vt(this,"onResizeStart",(e,r,n,i)=>{let{e:a,node:o}=i;const{layout:s}=this.state,u=(0,Se.getLayoutItem)(s,e);u&&(this.setState({oldResizeItem:(0,Se.cloneLayoutItem)(u),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,u,u,null,a,o))}),Vt(this,"onResize",(e,r,n,i)=>{let{e:a,node:o,size:s,handle:u}=i;const{oldResizeItem:l}=this.state,{layout:f}=this.state,{cols:c,preventCollision:h,allowOverlap:d}=this.props;let v=!1,g,p,m;const[y,b]=(0,Se.withLayoutItem)(f,e,w=>{let D;return p=w.x,m=w.y,["sw","w","nw","n","ne"].indexOf(u)!==-1&&(["sw","nw","w"].indexOf(u)!==-1&&(p=w.x+(w.w-r),r=w.x!==p&&p<0?w.w:r,p=p<0?0:p),["ne","n","nw"].indexOf(u)!==-1&&(m=w.y+(w.h-n),n=w.y!==m&&m<0?w.h:n,m=m<0?0:m),v=!0),h&&!d&&(D=(0,Se.getAllCollisions)(f,{...w,w:r,h:n,x:p,y:m}).filter(x=>x.i!==w.i).length>0,D&&(m=w.y,n=w.h,p=w.x,r=w.w,v=!1)),w.w=r,w.h=n,w});if(!b)return;g=y,v&&(g=(0,Se.moveElement)(y,b,p,m,!0,this.props.preventCollision,(0,Se.compactType)(this.props),c,d));const C={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(g,l,b,C,a,o),this.setState({layout:d?g:(0,Se.compact)(g,(0,Se.compactType)(this.props),c),activeDrag:C})}),Vt(this,"onResizeStop",(e,r,n,i)=>{let{e:a,node:o}=i;const{layout:s,oldResizeItem:u}=this.state,{cols:l,allowOverlap:f}=this.props,c=(0,Se.getLayoutItem)(s,e),h=f?s:(0,Se.compact)(s,(0,Se.compactType)(this.props),l);this.props.onResizeStop(h,u,c,null,a,o);const{oldLayout:d}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,d)}),Vt(this,"onDragOver",e=>{var y;if(e.preventDefault(),e.stopPropagation(),Vy&&!((y=e.nativeEvent.target)!=null&&y.classList.contains(jy)))return!1;const{droppingItem:r,onDropDragOver:n,margin:i,cols:a,rowHeight:o,maxRows:s,width:u,containerPadding:l,transformScale:f}=this.props,c=n==null?void 0:n(e);if(c===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const h={...r,...c},{layout:d}=this.state,v=e.currentTarget.getBoundingClientRect(),g=e.clientX-v.left,p=e.clientY-v.top,m={left:g/f,top:p/f,e};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:b,top:C}=this.state.droppingPosition;(b!=g||C!=p)&&this.setState({droppingPosition:m})}}else{const b={cols:a,margin:i,maxRows:s,rowHeight:o,containerWidth:u,containerPadding:l||i},C=(0,fB.calcXY)(b,p,g,h.w,h.h);this.setState({droppingDOMNode:Ki.createElement("div",{key:h.i}),droppingPosition:m,layout:[...d,{...h,x:C.x,y:C.y,static:!1,isDraggable:!0}]})}}),Vt(this,"removeDroppingPlaceholder",()=>{const{droppingItem:e,cols:r}=this.props,{layout:n}=this.state,i=(0,Se.compact)(n.filter(a=>a.i!==e.i),(0,Se.compactType)(this.props),r,this.props.allowOverlap);this.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),Vt(this,"onDragLeave",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),Vt(this,"onDragEnter",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++}),Vt(this,"onDrop",e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:r}=this.props,{layout:n}=this.state,i=n.find(a=>a.i===r.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,i,e)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,r){let n;return r.activeDrag?null:(!(0,wd.deepEqual)(e.layout,r.propsLayout)||e.compactType!==r.compactType?n=e.layout:(0,Se.childrenEqual)(e.children,r.children)||(n=r.layout),n?{layout:(0,Se.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,Se.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}shouldComponentUpdate(e,r){return this.props.children!==e.children||!(0,Se.fastRGLPropsEqual)(this.props,e,wd.deepEqual)||this.state.activeDrag!==r.activeDrag||this.state.mounted!==r.mounted||this.state.droppingPosition!==r.droppingPosition}componentDidUpdate(e,r){if(!this.state.activeDrag){const n=this.state.layout,i=r.layout;this.onLayoutMaybeChanged(n,i)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,Se.bottom)(this.state.layout),r=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+r*2+"px"}onLayoutMaybeChanged(e,r){r||(r=this.state.layout),(0,wd.deepEqual)(r,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:e}=this.state;if(!e)return null;const{width:r,cols:n,margin:i,containerPadding:a,rowHeight:o,maxRows:s,useCSSTransforms:u,transformScale:l}=this.props;return Ki.createElement(ky.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:r,cols:n,margin:i,containerPadding:a||i,maxRows:s,rowHeight:o,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:u,transformScale:l},Ki.createElement("div",null))}processGridItem(e,r){if(!e||!e.key)return;const n=(0,Se.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;const{width:i,cols:a,margin:o,containerPadding:s,rowHeight:u,maxRows:l,isDraggable:f,isResizable:c,isBounded:h,useCSSTransforms:d,transformScale:v,draggableCancel:g,draggableHandle:p,resizeHandles:m,resizeHandle:y}=this.props,{mounted:b,droppingPosition:C}=this.state,w=typeof n.isDraggable=="boolean"?n.isDraggable:!n.static&&f,D=typeof n.isResizable=="boolean"?n.isResizable:!n.static&&c,_=n.resizeHandles||m,x=w&&h&&n.isBounded!==!1;return Ki.createElement(ky.default,{containerWidth:i,cols:a,margin:o,containerPadding:s||o,maxRows:l,rowHeight:u,cancel:g,handle:p,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:w,isResizable:D,isBounded:x,useCSSTransforms:d&&b,usePercentages:!b,transformScale:v,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:r?C:void 0,resizeHandles:_,resizeHandle:y},e)}render(){const{className:e,style:r,isDroppable:n,innerRef:i}=this.props,a=(0,lB.default)(jy,e),o={height:this.containerHeight(),...r};return Ki.createElement("div",{ref:i,className:a,style:o,onDrop:n?this.onDrop:Se.noop,onDragLeave:n?this.onDragLeave:Se.noop,onDragEnter:n?this.onDragEnter:Se.noop,onDragOver:n?this.onDragOver:Se.noop},Ki.Children.map(this.props.children,s=>this.processGridItem(s)),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}Ds.default=Cl,Vt(Cl,"displayName","ReactGridLayout"),Vt(Cl,"propTypes",cB.default),Vt(Cl,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:Se.noop,onDragStart:Se.noop,onDrag:Se.noop,onDragStop:Se.noop,onResizeStart:Se.noop,onResize:Se.noop,onResizeStop:Se.noop,onDrop:Se.noop,onDropDragOver:Se.noop});var wl={},Zi={};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.findOrGenerateResponsiveLayout=mB,Zi.getBreakpointFromWidth=pB,Zi.getColsFromBreakpoint=gB,Zi.sortBreakpoints=_d;var Dl=Ne;function pB(t,e){const r=_d(t);let n=r[0];for(let i=1,a=r.length;i<a;i++){const o=r[i];e>t[o]&&(n=o)}return n}function gB(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]}function mB(t,e,r,n,i,a){if(t[r])return(0,Dl.cloneLayout)(t[r]);let o=t[n];const s=_d(e),u=s.slice(s.indexOf(r));for(let l=0,f=u.length;l<f;l++){const c=u[l];if(t[c]){o=t[c];break}}return o=(0,Dl.cloneLayout)(o||[]),(0,Dl.compact)((0,Dl.correctBounds)(o,{cols:i}),a,i)}function _d(t){return Object.keys(t).sort(function(r,n){return t[r]-t[n]})}Object.defineProperty(wl,"__esModule",{value:!0}),wl.default=void 0;var Hy=bB(z),lr=Wy(li),xd=Ih,io=Ne,Ji=Zi,yB=Wy(Ds);function Wy(t){return t&&t.__esModule?t:{default:t}}function $y(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return($y=function(n){return n?r:e})(t)}function bB(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=$y(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function Sd(){return Sd=Object.assign?Object.assign.bind():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},Sd.apply(this,arguments)}function _l(t,e,r){return e=CB(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CB(t){var e=wB(t,"string");return typeof e=="symbol"?e:String(e)}function wB(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}const Gy=t=>Object.prototype.toString.call(t);function xl(t,e){return t==null?null:Array.isArray(t)?t:t[e]}let Ed=class extends Hy.Component{constructor(){super(...arguments),_l(this,"state",this.generateInitialState()),_l(this,"onLayoutChange",e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})})}generateInitialState(){const{width:e,breakpoints:r,layouts:n,cols:i}=this.props,a=(0,Ji.getBreakpointFromWidth)(r,e),o=(0,Ji.getColsFromBreakpoint)(a,i),s=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,Ji.findOrGenerateResponsiveLayout)(n,r,a,a,o,s),breakpoint:a,cols:o}}static getDerivedStateFromProps(e,r){if(!(0,xd.deepEqual)(e.layouts,r.layouts)){const{breakpoint:n,cols:i}=r;return{layout:(0,Ji.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,i,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){(this.props.width!=e.width||this.props.breakpoint!==e.breakpoint||!(0,xd.deepEqual)(this.props.breakpoints,e.breakpoints)||!(0,xd.deepEqual)(this.props.cols,e.cols))&&this.onWidthChange(e)}onWidthChange(e){const{breakpoints:r,cols:n,layouts:i,compactType:a}=this.props,o=this.props.breakpoint||(0,Ji.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),s=this.state.breakpoint,u=(0,Ji.getColsFromBreakpoint)(o,n),l={...i};if(s!==o||e.breakpoints!==r||e.cols!==n){s in l||(l[s]=(0,io.cloneLayout)(this.state.layout));let h=(0,Ji.findOrGenerateResponsiveLayout)(l,r,o,s,u,a);h=(0,io.synchronizeLayoutWithChildren)(h,this.props.children,u,a,this.props.allowOverlap),l[o]=h,this.props.onBreakpointChange(o,u),this.props.onLayoutChange(h,l),this.setState({breakpoint:o,layout:h,cols:u})}const f=xl(this.props.margin,o),c=xl(this.props.containerPadding,o);this.props.onWidthChange(this.props.width,f,u,c)}render(){const{breakpoint:e,breakpoints:r,cols:n,layouts:i,margin:a,containerPadding:o,onBreakpointChange:s,onLayoutChange:u,onWidthChange:l,...f}=this.props;return Hy.createElement(yB.default,Sd({},f,{margin:xl(a,this.state.breakpoint),containerPadding:xl(o,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};wl.default=Ed,_l(Ed,"propTypes",{breakpoint:lr.default.string,breakpoints:lr.default.object,allowOverlap:lr.default.bool,cols:lr.default.object,margin:lr.default.oneOfType([lr.default.array,lr.default.object]),containerPadding:lr.default.oneOfType([lr.default.array,lr.default.object]),layouts(t,e){if(Gy(t[e])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+Gy(t[e]));Object.keys(t[e]).forEach(r=>{if(!(r in t.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,io.validateLayout)(t.layouts[r],"layouts."+r)})},width:lr.default.number.isRequired,onBreakpointChange:lr.default.func,onLayoutChange:lr.default.func,onWidthChange:lr.default.func}),_l(Ed,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:io.noop,onLayoutChange:io.noop,onWidthChange:io.noop});var Ad={},Uy=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];r.call(n,o[1],o[0])}},e}()}(),Td=typeof window<"u"&&typeof document<"u"&&window.document===document,Sl=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),DB=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Sl):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),_B=2;function xB(t,e){var r=!1,n=!1,i=0;function a(){r&&(r=!1,t()),n&&s()}function o(){DB(a)}function s(){var u=Date.now();if(r){if(u-i<_B)return;n=!0}else r=!0,n=!1,setTimeout(o,e);i=u}return s}var SB=20,EB=["top","right","bottom","left","width","height","size","weight"],AB=typeof MutationObserver<"u",TB=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=xB(this.refresh.bind(this),SB)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!Td||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),AB?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Td||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=EB.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),qy=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},ao=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Sl},Yy=Al(0,0,0,0);function El(t){return parseFloat(t)||0}function Xy(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var a=t["border-"+i+"-width"];return n+El(a)},0)}function OB(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var a=i[n],o=t["padding-"+a];r[a]=El(o)}return r}function PB(t){var e=t.getBBox();return Al(0,0,e.width,e.height)}function BB(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return Yy;var n=ao(t).getComputedStyle(t),i=OB(n),a=i.left+i.right,o=i.top+i.bottom,s=El(n.width),u=El(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Xy(n,"left","right")+a),Math.round(u+o)!==r&&(u-=Xy(n,"top","bottom")+o)),!FB(t)){var l=Math.round(s+a)-e,f=Math.round(u+o)-r;Math.abs(l)!==1&&(s-=l),Math.abs(f)!==1&&(u-=f)}return Al(i.left,i.top,s,u)}var MB=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ao(t).SVGGraphicsElement}:function(t){return t instanceof ao(t).SVGElement&&typeof t.getBBox=="function"}}();function FB(t){return t===ao(t).document.documentElement}function LB(t){return Td?MB(t)?PB(t):BB(t):Yy}function RB(t){var e=t.x,r=t.y,n=t.width,i=t.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return qy(o,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),o}function Al(t,e,r,n){return{x:t,y:e,width:r,height:n}}var IB=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Al(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=LB(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),NB=function(){function t(e,r){var n=RB(r);qy(this,{target:e,contentRect:n})}return t}(),kB=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new Uy,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ao(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new IB(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ao(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new NB(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Ky=typeof WeakMap<"u"?new WeakMap:new Uy,Zy=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=TB.getInstance(),n=new kB(e,r,this);Ky.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Zy.prototype[t]=function(){var e;return(e=Ky.get(this))[t].apply(e,arguments)}});var zB=function(){return typeof Sl.ResizeObserver<"u"?Sl.ResizeObserver:Zy}();const jB=zm(Object.freeze(Object.defineProperty({__proto__:null,default:zB},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(Ad,"__esModule",{value:!0}),Ad.default=YB;var Tl=$B(z),VB=Od(li),HB=Od(jB),WB=Od(kh);function Od(t){return t&&t.__esModule?t:{default:t}}function Jy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Jy=function(n){return n?r:e})(t)}function $B(t,e){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Jy(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=t[a]}return n.default=t,r&&r.set(t,n),n}function Pd(){return Pd=Object.assign?Object.assign.bind():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},Pd.apply(this,arguments)}function oo(t,e,r){return e=GB(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GB(t){var e=UB(t,"string");return typeof e=="symbol"?e:String(e)}function UB(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}const qB="react-grid-layout";function YB(t){var e;return e=class extends Tl.Component{constructor(){super(...arguments),oo(this,"state",{width:1280}),oo(this,"elementRef",Tl.createRef()),oo(this,"mounted",!1),oo(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new HB.default(i=>{if(this.elementRef.current instanceof HTMLElement){const o=i[0].contentRect.width;this.setState({width:o})}});const n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.observe(n)}componentWillUnmount(){this.mounted=!1;const n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.unobserve(n),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:n,...i}=this.props;return n&&!this.mounted?Tl.createElement("div",{className:(0,WB.default)(this.props.className,qB),style:this.props.style,ref:this.elementRef}):Tl.createElement(t,Pd({innerRef:this.elementRef},i,this.state))}},oo(e,"defaultProps",{measureBeforeMount:!1}),oo(e,"propTypes",{measureBeforeMount:VB.default.bool}),e}(function(t){t.exports=Ds.default,t.exports.utils=Ne,t.exports.calculateUtils=vn,t.exports.Responsive=wl.default,t.exports.Responsive.utils=Zi,t.exports.WidthProvider=Ad.default})(Hm);var Qy=Hm.exports,XB=JB,e1="֑-߿יִ-﷽ﹰ-ﻼ",t1="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",KB=new RegExp("^[^"+t1+"]*["+e1+"]"),ZB=new RegExp("^[^"+e1+"]*["+t1+"]");function JB(t){return t=String(t||""),KB.test(t)?"rtl":ZB.test(t)?"ltr":"neutral"}const r1=eo(XB);function QB(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bd=QB,eM=typeof Gi=="object"&&Gi&&Gi.Object===Object&&Gi,tM=eM,rM=tM,nM=typeof self=="object"&&self&&self.Object===Object&&self,iM=rM||nM||Function("return this")(),n1=iM,aM=n1,oM=function(){return aM.Date.now()},sM=oM,uM=/\s/;function lM(t){for(var e=t.length;e--&&uM.test(t.charAt(e)););return e}var fM=lM,cM=fM,hM=/^\s+/;function dM(t){return t&&t.slice(0,cM(t)+1).replace(hM,"")}var vM=dM,pM=n1,gM=pM.Symbol,i1=gM,a1=i1,o1=Object.prototype,mM=o1.hasOwnProperty,yM=o1.toString,Os=a1?a1.toStringTag:void 0;function bM(t){var e=mM.call(t,Os),r=t[Os];try{t[Os]=void 0;var n=!0}catch{}var i=yM.call(t);return n&&(e?t[Os]=r:delete t[Os]),i}var CM=bM,wM=Object.prototype,DM=wM.toString;function _M(t){return DM.call(t)}var xM=_M,s1=i1,SM=CM,EM=xM,AM="[object Null]",TM="[object Undefined]",u1=s1?s1.toStringTag:void 0;function OM(t){return t==null?t===void 0?TM:AM:u1&&u1 in Object(t)?SM(t):EM(t)}var PM=OM;function BM(t){return t!=null&&typeof t=="object"}var MM=BM,FM=PM,LM=MM,RM="[object Symbol]";function IM(t){return typeof t=="symbol"||LM(t)&&FM(t)==RM}var NM=IM,kM=vM,l1=Bd,zM=NM,f1=NaN,jM=/^[-+]0x[0-9a-f]+$/i,VM=/^0b[01]+$/i,HM=/^0o[0-7]+$/i,WM=parseInt;function $M(t){if(typeof t=="number")return t;if(zM(t))return f1;if(l1(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=l1(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=kM(t);var r=VM.test(t);return r||HM.test(t)?WM(t.slice(2),r?2:8):jM.test(t)?f1:+t}var GM=$M,UM=Bd,Md=sM,c1=GM,qM="Expected a function",YM=Math.max,XM=Math.min;function KM(t,e,r){var n,i,a,o,s,u,l=0,f=!1,c=!1,h=!0;if(typeof t!="function")throw new TypeError(qM);e=c1(e)||0,UM(r)&&(f=!!r.leading,c="maxWait"in r,a=c?YM(c1(r.maxWait)||0,e):a,h="trailing"in r?!!r.trailing:h);function d(D){var _=n,x=i;return n=i=void 0,l=D,o=t.apply(x,_),o}function v(D){return l=D,s=setTimeout(m,e),f?d(D):o}function g(D){var _=D-u,x=D-l,S=e-_;return c?XM(S,a-x):S}function p(D){var _=D-u,x=D-l;return u===void 0||_>=e||_<0||c&&x>=a}function m(){var D=Md();if(p(D))return y(D);s=setTimeout(m,g(D))}function y(D){return s=void 0,h&&n?d(D):(n=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),l=0,n=u=i=s=void 0}function C(){return s===void 0?o:y(Md())}function w(){var D=Md(),_=p(D);if(n=arguments,i=this,u=D,_){if(s===void 0)return v(u);if(c)return clearTimeout(s),s=setTimeout(m,e),d(u)}return s===void 0&&(s=setTimeout(m,e)),o}return w.cancel=b,w.flush=C,w}var h1=KM;const ZM=eo(h1);var JM=h1,QM=Bd,e3="Expected a function";function t3(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(e3);return QM(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),JM(t,e,{leading:n,maxWait:e,trailing:i})}var r3=t3;const n3=eo(r3),d1=t=>typeof t=="object"&&t!=null&&t.nodeType===1,v1=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Fd=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return v1(r.overflowY,e)||v1(r.overflowX,e)||(n=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(t)}return!1},Ol=(t,e,r,n,i,a,o,s)=>a<t&&o>e||a>t&&o<e?0:a<=t&&s<=r||o>=e&&s>=r?a-t-n:o>e&&s<r||a<t&&s>r?o-e+i:0,i3=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},p1=(t,e)=>{var r,n,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:l,skipOverflowHiddenElements:f}=e,c=typeof l=="function"?l:R=>R!==l;if(!d1(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,d=[];let v=t;for(;d1(v)&&c(v);){if(v=i3(v),v===h){d.push(v);break}v!=null&&v===document.body&&Fd(v)&&!Fd(document.documentElement)||v!=null&&Fd(v,f)&&d.push(v)}const g=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,p=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:C,top:w,right:D,bottom:_,left:x}=t.getBoundingClientRect(),{top:S,right:O,bottom:E,left:P}=(R=>{const V=window.getComputedStyle(R);return{top:parseFloat(V.scrollMarginTop)||0,right:parseFloat(V.scrollMarginRight)||0,bottom:parseFloat(V.scrollMarginBottom)||0,left:parseFloat(V.scrollMarginLeft)||0}})(t);let F=s==="start"||s==="nearest"?w-S:s==="end"?_+E:w+b/2-S+E,M=u==="center"?x+C/2-P+O:u==="end"?D+O:x-P;const B=[];for(let R=0;R<d.length;R++){const V=d[R],{height:k,width:W,top:I,right:q,bottom:Z,left:J}=V.getBoundingClientRect();if(o==="if-needed"&&w>=0&&x>=0&&_<=p&&D<=g&&w>=I&&_<=Z&&x>=J&&D<=q)return B;const ne=getComputedStyle(V),G=parseInt(ne.borderLeftWidth,10),L=parseInt(ne.borderTopWidth,10),Y=parseInt(ne.borderRightWidth,10),j=parseInt(ne.borderBottomWidth,10);let U=0,Q=0;const K="offsetWidth"in V?V.offsetWidth-V.clientWidth-G-Y:0,X="offsetHeight"in V?V.offsetHeight-V.clientHeight-L-j:0,le="offsetWidth"in V?V.offsetWidth===0?0:W/V.offsetWidth:0,se="offsetHeight"in V?V.offsetHeight===0?0:k/V.offsetHeight:0;if(h===V)U=s==="start"?F:s==="end"?F-p:s==="nearest"?Ol(y,y+p,p,L,j,y+F,y+F+b,b):F-p/2,Q=u==="start"?M:u==="center"?M-g/2:u==="end"?M-g:Ol(m,m+g,g,G,Y,m+M,m+M+C,C),U=Math.max(0,U+y),Q=Math.max(0,Q+m);else{U=s==="start"?F-I-L:s==="end"?F-Z+j+X:s==="nearest"?Ol(I,Z,k,L,j+X,F,F+b,b):F-(I+k/2)+X/2,Q=u==="start"?M-J-G:u==="center"?M-(J+W/2)+K/2:u==="end"?M-q+Y+K:Ol(J,q,W,G,Y+K,M,M+C,C);const{scrollLeft:ye,scrollTop:pe}=V;U=se===0?0:Math.max(0,Math.min(pe+U/se,V.scrollHeight-k/se+X)),Q=le===0?0:Math.max(0,Math.min(ye+Q/le,V.scrollWidth-W/le+K)),F+=pe-U,M+=ye-Q}B.push({el:V,top:U,left:Q})}return B},a3=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function o3(t,e){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const r=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(p1(t,e));const n=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:a,left:o}of p1(t,a3(e))){const s=a-r.top+r.bottom,u=o-r.left+r.right;i.scroll({top:s,left:u,behavior:n})}}/*!
52
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
53
+ *
54
+ * Copyright (c) 2014-2017, Jon Schlinkert.
55
+ * Released under the MIT License.
56
+ */function g1(t){return Object.prototype.toString.call(t)==="[object Object]"}function It(t){var e,r;return g1(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(g1(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var m1=Symbol.for("immer-nothing"),y1=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state"),s3=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 fr(t,...e){if(process.env.NODE_ENV!=="production"){const r=s3[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 so=Object.getPrototypeOf;function Qi(t){return!!t&&!!t[xr]}function ea(t){var e;return t?b1(t)||Array.isArray(t)||!!t[y1]||!!((e=t.constructor)!=null&&e[y1])||Ml(t)||Fl(t):!1}var u3=Object.prototype.constructor.toString();function b1(t){if(!t||typeof t!="object")return!1;const e=so(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)===u3}function Pl(t,e){Bl(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Bl(t){const e=t[xr];return e?e.type_:Array.isArray(t)?1:Ml(t)?2:Fl(t)?3:0}function Ld(t,e){return Bl(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function C1(t,e,r){const n=Bl(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function l3(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Ml(t){return t instanceof Map}function Fl(t){return t instanceof Set}function ta(t){return t.copy_||t.base_}function Rd(t,e){if(Ml(t))return new Map(t);if(Fl(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=b1(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[xr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(so(t),n)}else{const n=so(t);if(n!==null&&r)return{...t};const i=Object.create(n);return Object.assign(i,t)}}function Id(t,e=!1){return Ll(t)||Qi(t)||!ea(t)||(Bl(t)>1&&(t.set=t.add=t.clear=t.delete=f3),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Id(n,!0))),t}function f3(){fr(2)}function Ll(t){return Object.isFrozen(t)}var c3={};function ra(t){const e=c3[t];return e||fr(0,t),e}var Ps;function w1(){return Ps}function h3(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function D1(t,e){e&&(ra("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Nd(t){kd(t),t.drafts_.forEach(d3),t.drafts_=null}function kd(t){t===Ps&&(Ps=t.parent_)}function _1(t){return Ps=h3(Ps,t)}function d3(t){const e=t[xr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function x1(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[xr].modified_&&(Nd(e),fr(4)),ea(t)&&(t=Rl(e,t),e.parent_||Il(e,t)),e.patches_&&ra("Patches").generateReplacementPatches_(r[xr].base_,t,e.patches_,e.inversePatches_)):t=Rl(e,r,[]),Nd(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==m1?t:void 0}function Rl(t,e,r){if(Ll(e))return e;const n=e[xr];if(!n)return Pl(e,(i,a)=>S1(t,n,e,i,a,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return Il(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),Pl(a,(s,u)=>S1(t,n,i,s,u,r,o)),Il(t,i,!1),r&&t.patches_&&ra("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function S1(t,e,r,n,i,a,o){if(process.env.NODE_ENV!=="production"&&i===r&&fr(5),Qi(i)){const s=a&&e&&e.type_!==3&&!Ld(e.assigned_,n)?a.concat(n):void 0,u=Rl(t,i,s);if(C1(r,n,u),Qi(u))t.canAutoFreeze_=!1;else return}else o&&r.add(i);if(ea(i)&&!Ll(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Rl(t,i),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Il(t,i)}}function Il(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Id(e,r)}function v3(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:w1(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=zd;r&&(i=[n],a=Bs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var zd={get(t,e){if(e===xr)return t;const r=ta(t);if(!Ld(r,e))return p3(t,r,e);const n=r[e];return t.finalized_||!ea(n)?n:n===jd(t.base_,e)?(Hd(t),t.copy_[e]=Wd(n,t)):n},has(t,e){return e in ta(t)},ownKeys(t){return Reflect.ownKeys(ta(t))},set(t,e,r){const n=E1(ta(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const i=jd(ta(t),e),a=i==null?void 0:i[xr];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(l3(r,i)&&(r!==void 0||Ld(t.base_,e)))return!0;Hd(t),Vd(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 jd(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Hd(t),Vd(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=ta(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){fr(11)},getPrototypeOf(t){return so(t.base_)},setPrototypeOf(){fr(12)}},Bs={};Pl(zd,(t,e)=>{Bs[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Bs.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&fr(13),Bs.set.call(this,t,e,void 0)},Bs.set=function(t,e,r){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&fr(14),zd.set.call(this,t[0],e,r,t[0])};function jd(t,e){const r=t[xr];return(r?ta(r):t)[e]}function p3(t,e,r){var i;const n=E1(e,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(t.draft_):void 0}function E1(t,e){if(!(e in t))return;let r=so(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=so(r)}}function Vd(t){t.modified_||(t.modified_=!0,t.parent_&&Vd(t.parent_))}function Hd(t){t.copy_||(t.copy_=Rd(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var g3=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const a=r;r=e;const o=this;return function(u=a,...l){return o.produce(u,f=>r.call(this,f,...l))}}typeof r!="function"&&fr(6),n!==void 0&&typeof n!="function"&&fr(7);let i;if(ea(e)){const a=_1(this),o=Wd(e,void 0);let s=!0;try{i=r(o),s=!1}finally{s?Nd(a):kd(a)}return D1(a,n),x1(i,a)}else if(!e||typeof e!="object"){if(i=r(e),i===void 0&&(i=e),i===m1&&(i=void 0),this.autoFreeze_&&Id(i,!0),n){const a=[],o=[];ra("Patches").generateReplacementPatches_(e,i,a,o),n(a,o)}return i}else fr(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let n,i;return[this.produce(e,r,(o,s)=>{n=o,i=s}),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){ea(t)||fr(8),Qi(t)&&(t=m3(t));const e=_1(this),r=Wd(t,void 0);return r[xr].isManual_=!0,kd(e),r}finishDraft(t,e){const r=t&&t[xr];(!r||!r.isManual_)&&fr(9);const{scope_:n}=r;return D1(n,e),x1(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=ra("Patches").applyPatches_;return Qi(t)?n(t,e):this.produce(t,i=>n(i,e))}};function Wd(t,e){const r=Ml(t)?ra("MapSet").proxyMap_(t,e):Fl(t)?ra("MapSet").proxySet_(t,e):v3(t,e);return(e?e.scope_:w1()).drafts_.push(r),r}function m3(t){return Qi(t)||fr(10,t),A1(t)}function A1(t){if(!ea(t)||Ll(t))return t;const e=t[xr];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Rd(t,e.scope_.immer_.useStrictShallowCopy_)}else r=Rd(t,!0);return Pl(r,(n,i)=>{C1(r,n,A1(i))}),e&&(e.finalized_=!1),r}var Sr=new g3,$d=Sr.produce;Sr.produceWithPatches.bind(Sr),Sr.setAutoFreeze.bind(Sr),Sr.setUseStrictShallowCopy.bind(Sr),Sr.applyPatches.bind(Sr);var T1=Sr.createDraft.bind(Sr),O1=Sr.finishDraft.bind(Sr),y3={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=$.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},b3={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=Ie.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},C3={transform(t,e){var{current:r,affinity:n}=t;if(r!=null){var i=te.transform(r,e,{affinity:n});t.current=i,i==null&&t.unref()}}},Nl=new WeakMap,kl=new WeakMap,Ms=new WeakMap,P1=new WeakMap,B1=new WeakMap,M1=new WeakMap,F1=new WeakMap,$={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,n=$.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],a=e[n];if(i!==a)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),a=t[r],o=e[r];return $.equals(n,i)&&a>o},endsAt(t,e){var r=t.length,n=t.slice(0,r),i=e.slice(0,r);return $.equals(n,i)},endsBefore(t,e){var r=t.length-1,n=t.slice(0,r),i=e.slice(0,r),a=t[r],o=e[r];return $.equals(n,i)&&a<o},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 $.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&$.compare(t,e)===0},isBefore(t,e){return $.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&$.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&$.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&$.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&$.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],a=e[e.length-1];return i!==a&&$.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(!$.isAncestor(e,t)&&!$.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:a}=e;($.equals(a,n)||$.endsBefore(a,n)||$.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if($.equals(o,n)||$.isAncestor(o,n))return null;$.endsBefore(o,n)&&(n[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;$.equals(s,n)||$.endsBefore(s,n)?n[s.length-1]-=1:$.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=u);break}case"split_node":{var{path:l,position:f}=e;if($.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else $.endsBefore(l,n)?n[l.length-1]+=1:$.isAncestor(l,n)&&t[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:h}=e;if($.equals(c,h))return n;if($.isAncestor(c,n)||$.equals(c,n)){var d=h.slice();return $.endsBefore(c,h)&&c.length<h.length&&(d[c.length-1]-=1),d.concat(n.slice(c.length))}else $.isSibling(c,h)&&($.isAncestor(h,n)||$.equals(h,n))?$.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:$.endsBefore(h,n)||$.equals(h,n)||$.isAncestor(h,n)?($.endsBefore(c,n)&&(n[c.length-1]-=1),n[h.length-1]+=1):$.endsBefore(c,n)&&($.equals(h,n)&&(n[h.length-1]+=1),n[c.length-1]-=1);break}}return n}};function Fs(t){"@babel/helpers - typeof";return Fs=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},Fs(t)}function w3(t,e){if(Fs(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function D3(t){var e=w3(t,"string");return Fs(e)==="symbol"?e:String(e)}function Jt(t,e,r){return e=D3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function L1(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 Ls(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?L1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var _3=(t,e,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,a=ue.parent(t,n),o=n[n.length-1];if(o>a.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(a.children.splice(o,0,i),e)for(var[s,u]of te.points(e))e[u]=Ie.transform(s,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var h=ue.leaf(t,l),d=h.text.slice(0,f),v=h.text.slice(f);if(h.text=d+c+v,e)for(var[g,p]of te.points(e))e[p]=Ie.transform(g,r);break}case"merge_node":{var{path:m}=r,y=ue.get(t,m),b=$.previous(m),C=ue.get(t,b),w=ue.parent(t,m),D=m[m.length-1];if(ve.isText(y)&&ve.isText(C))C.text+=y.text;else if(!ve.isText(y)&&!ve.isText(C))C.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(Ft.stringify(y)," ").concat(Ft.stringify(C)));if(w.children.splice(D,1),e)for(var[_,x]of te.points(e))e[x]=Ie.transform(_,r);break}case"move_node":{var{path:S,newPath:O}=r;if($.isAncestor(S,O))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(O,"] because the destination is inside itself."));var E=ue.get(t,S),P=ue.parent(t,S),F=S[S.length-1];P.children.splice(F,1);var M=$.transform(S,r),B=ue.get(t,$.parent(M)),R=M[M.length-1];if(B.children.splice(R,0,E),e)for(var[V,k]of te.points(e))e[k]=Ie.transform(V,r);break}case"remove_node":{var{path:W}=r,I=W[W.length-1],q=ue.parent(t,W);if(q.children.splice(I,1),e)for(var[Z,J]of te.points(e)){var ne=Ie.transform(Z,r);if(e!=null&&ne!=null)e[J]=ne;else{var G=void 0,L=void 0;for(var[Y,j]of ue.texts(t))if($.compare(j,W)===-1)G=[Y,j];else{L=[Y,j];break}var U=!1;G&&L&&($.equals(L[1],W)?U=!$.hasPrevious(L[1]):U=$.common(G[1],W).length<$.common(L[1],W).length),G&&!U?(Z.path=G[1],Z.offset=G[0].text.length):L?(Z.path=L[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:Q,offset:K,text:X}=r;if(X.length===0)break;var le=ue.leaf(t,Q),se=le.text.slice(0,K),ye=le.text.slice(K+X.length);if(le.text=se+ye,e)for(var[pe,Le]of te.points(e))e[Le]=Ie.transform(pe,r);break}case"set_node":{var{path:be,properties:De,newProperties:it}=r;if(be.length===0)throw new Error("Cannot set properties on the root node!");var St=ue.get(t,be);for(var Ve in it){if(Ve==="children"||Ve==="text")throw new Error('Cannot set the "'.concat(Ve,'" property of nodes!'));var lt=it[Ve];lt==null?delete St[Ve]:St[Ve]=lt}for(var Mr in De)it.hasOwnProperty(Mr)||delete St[Mr];break}case"set_selection":{var{newProperties:Qe}=r;if(Qe==null)e=Qe;else{if(e==null){if(!te.isRange(Qe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ft.stringify(Qe)," when there is no current selection."));e=Ls({},Qe)}for(var ft in Qe){var Fr=Qe[ft];if(Fr==null){if(ft==="anchor"||ft==="focus")throw new Error('Cannot remove the "'.concat(ft,'" selection property'));delete e[ft]}else e[ft]=Fr}}break}case"split_node":{var{path:Kt,position:Lr,properties:Vn}=r;if(Kt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Kt,"] because the root node cannot be split."));var Cr=ue.get(t,Kt),al=ue.parent(t,Kt),Ja=Kt[Kt.length-1],$i;if(ve.isText(Cr)){var Mm=Cr.text.slice(0,Lr),Fm=Cr.text.slice(Lr);Cr.text=Mm,$i=Ls(Ls({},Vn),{},{text:Fm})}else{var Lm=Cr.children.slice(0,Lr),Rm=Cr.children.slice(Lr);Cr.children=Lm,$i=Ls(Ls({},Vn),{},{children:Rm})}if(al.children.splice(Ja+1,0,$i),e)for(var[ol,Fh]of te.points(e))e[Fh]=Ie.transform(ol,r);break}}return e},x3={transform(t,e){t.children=T1(t.children);var r=t.selection&&T1(t.selection);try{r=_3(t,r,e)}finally{t.children=O1(t.children),r?t.selection=Qi(r)?O1(r):r:t.selection=null}}},S3={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)}},E3={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)}},R1=(t,e)=>{for(var r in t){var n=t[r],i=e[r];if(It(n)&&It(i)){if(!R1(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==i[a])return!1}else if(n!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function A3(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function $n(t,e){if(t==null)return{};var r=A3(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var T3=["anchor","focus"];function I1(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 O3(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?I1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var te={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=e,{anchor:n,focus:i}=t;return te.isBackward(t)===r?[n,i]:[i,n]},end(t){var[,e]=te.edges(t);return e},equals(t,e){return Ie.equals(t.anchor,e.anchor)&&Ie.equals(t.focus,e.focus)},surrounds(t,e){var r=te.intersection(t,e);return r?te.equals(r,e):!1},includes(t,e){if(te.isRange(e)){if(te.includes(t,e.anchor)||te.includes(t,e.focus))return!0;var[r,n]=te.edges(t),[i,a]=te.edges(e);return Ie.isBefore(r,i)&&Ie.isAfter(n,a)}var[o,s]=te.edges(t),u=!1,l=!1;return Ie.isPoint(e)?(u=Ie.compare(e,o)>=0,l=Ie.compare(e,s)<=0):(u=$.compare(e,o.path)>=0,l=$.compare(e,s.path)<=0),u&&l},intersection(t,e){var r=$n(t,T3),[n,i]=te.edges(t),[a,o]=te.edges(e),s=Ie.isBefore(n,a)?a:n,u=Ie.isBefore(i,o)?i:o;return Ie.isBefore(u,s)?null:O3({anchor:s,focus:u},r)},isBackward(t){var{anchor:e,focus:r}=t;return Ie.isAfter(e,r)},isCollapsed(t){var{anchor:e,focus:r}=t;return Ie.equals(e,r)},isExpanded(t){return!te.isCollapsed(t)},isForward(t){return!te.isBackward(t)},isRange(t){return It(t)&&Ie.isPoint(t.anchor)&&Ie.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=te.edges(t);return e},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return $d(t,n=>{if(n===null)return null;var{affinity:i="inward"}=r,a,o;if(i==="inward"){var s=te.isCollapsed(n);te.isForward(n)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?te.isForward(n)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=Ie.transform(n.anchor,e,{affinity:a}),l=Ie.transform(n.focus,e,{affinity:o});if(!u||!l)return null;n.anchor=u,n.focus=l})}},N1=t=>It(t)&&ue.isNodeList(t.children)&&!A.isEditor(t),de={isAncestor(t){return It(t)&&ue.isNodeList(t.children)},isElement:N1,isElementList(t){return Array.isArray(t)&&t.every(e=>de.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 N1(e)&&e[n]===r},matches(t,e){for(var r in e)if(r!=="children"&&t[r]!==e[r])return!1;return!0}},P3=["children"],B3=["text"],k1=new WeakMap,ue={ancestor(t,e){var r=ue.get(t,e);if(ve.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(Ft.stringify(r)));return r},ancestors(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.ancestors(e,r)){var i=ue.ancestor(t,n),a=[i,n];yield a}}()},child(t,e){if(ve.isText(t))throw new Error("Cannot get the child of a text node: ".concat(Ft.stringify(t)));var r=t.children[e];if(r==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(Ft.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=ue.ancestor(t,e),{children:a}=i,o=n?a.length-1:0;n?o>=0:o<a.length;){var s=ue.child(i,o),u=e.concat(o);yield[s,u],o=n?o-1:o+1}}()},common(t,e,r){var n=$.common(e,r),i=ue.get(t,n);return[i,n]},descendant(t,e){var r=ue.get(t,e);if(A.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(Ft.stringify(r)));return r},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of ue.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 ue.nodes(t,e))de.isElement(r)&&(yield[r,n])}()},extractProps(t){if(de.isAncestor(t)){var e=$n(t,P3);return e}else{var e=$n(t,B3);return e}},first(t,e){for(var r=e.slice(),n=ue.get(t,r);n&&!(ve.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(t,e){if(ve.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ft.stringify(t)));var r=$d({children:t.children},n=>{var[i,a]=te.edges(e),o=ue.nodes(n,{reverse:!0,pass:h=>{var[,d]=h;return!te.includes(e,d)}});for(var[,s]of o){if(!te.includes(e,s)){var u=ue.parent(n,s),l=s[s.length-1];u.children.splice(l,1)}if($.equals(s,a.path)){var f=ue.leaf(n,s);f.text=f.text.slice(0,a.offset)}if($.equals(s,i.path)){var c=ue.leaf(n,s);c.text=c.text.slice(i.offset)}}A.isEditor(n)&&(n.selection=null)});return r.children},get(t,e){var r=ue.getIf(t,e);if(r===void 0)throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(Ft.stringify(t)));return r},getIf(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ve.isText(r)||!r.children[i])return;r=r.children[i]}return r},has(t,e){for(var r=t,n=0;n<e.length;n++){var i=e[n];if(ve.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(t){return ve.isText(t)||de.isElement(t)||A.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=k1.get(t);if(e!==void 0)return e;var r=t.every(n=>ue.isNode(n));return k1.set(t,r),r},last(t,e){for(var r=e.slice(),n=ue.get(t,r);n&&!(ve.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=ue.get(t,e);if(!ve.isText(r))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(Ft.stringify(r)));return r},levels(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var n of $.levels(e,r)){var i=ue.get(t,n);yield[i,n]}}()},matches(t,e){return de.isElement(t)&&de.isElementProps(e)&&de.matches(t,e)||ve.isText(t)&&ve.isTextProps(e)&&ve.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:a}=e,o=new Set,s=[],u=t;!(a&&(n?$.isBefore(s,a):$.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ve.isText(u)&&u.children.length!==0&&(r==null||r([u,s])===!1)){o.add(u);var l=n?u.children.length-1:0;$.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=ue.get(t,s);continue}if(s.length===0)break;if(!n){var f=$.next(s);if(ue.has(t,f)){s=f,u=ue.get(t,s);continue}}if(n&&s[s.length-1]!==0){var c=$.previous(s);s=c,u=ue.get(t,s);continue}s=$.parent(s),u=ue.get(t,s),o.add(u)}}()},parent(t,e){var r=$.parent(e),n=ue.get(t,r);if(ve.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 ve.isText(t)?t.text:t.children.map(ue.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[r,n]of ue.nodes(t,e))ve.isText(r)&&(yield[r,n])}()}};function z1(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 dt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?z1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var hi={isNodeOperation(t){return hi.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!It(t))return!1;switch(t.type){case"insert_node":return $.isPath(t.path)&&ue.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"merge_node":return typeof t.position=="number"&&$.isPath(t.path)&&It(t.properties);case"move_node":return $.isPath(t.path)&&$.isPath(t.newPath);case"remove_node":return $.isPath(t.path)&&ue.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&$.isPath(t.path);case"set_node":return $.isPath(t.path)&&It(t.properties)&&It(t.newProperties);case"set_selection":return t.properties===null&&te.isRange(t.newProperties)||t.newProperties===null&&te.isRange(t.properties)||It(t.properties)&&It(t.newProperties);case"split_node":return $.isPath(t.path)&&typeof t.position=="number"&&It(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>hi.isOperation(e))},isSelectionOperation(t){return hi.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return hi.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return dt(dt({},t),{},{type:"remove_node"});case"insert_text":return dt(dt({},t),{},{type:"remove_text"});case"merge_node":return dt(dt({},t),{},{type:"split_node",path:$.previous(t.path)});case"move_node":{var{newPath:e,path:r}=t;if($.equals(e,r))return t;if($.isSibling(r,e))return dt(dt({},t),{},{path:e,newPath:r});var n=$.transform(r,t),i=$.transform($.next(r),t);return dt(dt({},t),{},{path:n,newPath:i})}case"remove_node":return dt(dt({},t),{},{type:"insert_node"});case"remove_text":return dt(dt({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return dt(dt({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?dt(dt({},t),{},{properties:u,newProperties:null}):u==null?dt(dt({},t),{},{properties:null,newProperties:s}):dt(dt({},t),{},{properties:u,newProperties:s})}case"split_node":return dt(dt({},t),{},{type:"merge_node",path:$.next(t.path)})}}},j1=new WeakMap,M3=t=>{var e=j1.get(t);if(e!==void 0)return e;if(!It(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||It(t.marks))&&(t.selection===null||te.isRange(t.selection))&&ue.isNodeList(t.children)&&hi.isOperationList(t.operations);return j1.set(t,r),r},A={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 M3(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)},F3={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every($.isPath)}};function V1(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?V1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ie={compare(t,e){var r=$.compare(t.path,e.path);return r===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:r},isAfter(t,e){return Ie.compare(t,e)===1},isBefore(t,e){return Ie.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&$.equals(t.path,e.path)},isPoint(t){return It(t)&&typeof t.offset=="number"&&$.isPath(t.path)},transform(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return $d(t,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:a,offset:o}=n;switch(e.type){case"insert_node":case"move_node":{n.path=$.transform(a,e,r);break}case"insert_text":{$.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(n.offset+=e.text.length);break}case"merge_node":{$.equals(e.path,a)&&(n.offset+=e.position),n.path=$.transform(a,e,r);break}case"remove_text":{$.equals(e.path,a)&&e.offset<=o&&(n.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if($.equals(e.path,a)||$.isAncestor(e.path,a))return null;n.path=$.transform(a,e,r);break}case"split_node":{if($.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(n.offset-=e.position,n.path=$.transform(a,e,H1(H1({},r),{},{affinity:"forward"})))}else n.path=$.transform(a,e,r);break}}})}},W1=void 0,Ft={setScrubber(t){W1=t},stringify(t){return JSON.stringify(t,W1)}},L3=["text"],R3=["anchor","focus"];function $1(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 Gn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ve={equals(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(a){var o=$n(a,L3);return o}return R1(n?i(t):t,n?i(e):e)},isText(t){return It(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ve.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=[Gn({},t)];for(var n of e){var i=$n(n,R3),[a,o]=te.edges(n),s=[],u=0,l=a.offset,f=o.offset;for(var c of r){var{length:h}=c.text,d=u;if(u+=h,l<=d&&u<=f){Object.assign(c,i),s.push(c);continue}if(l!==f&&(l===u||f===d)||l>u||f<d||f===d&&d!==0){s.push(c);continue}var v=c,g=void 0,p=void 0;if(f<u){var m=f-d;p=Gn(Gn({},v),{},{text:v.text.slice(m)}),v=Gn(Gn({},v),{},{text:v.text.slice(0,m)})}if(l>d){var y=l-d;g=Gn(Gn({},v),{},{text:v.text.slice(0,y)}),v=Gn(Gn({},v),{},{text:v.text.slice(y)})}Object.assign(v,i),g&&s.push(g),s.push(v),p&&s.push(p)}r=s}return r}},Gd=t=>t.selection?t.selection:t.children.length>0?A.end(t,[]):[0],uo=(t,e)=>{var[r]=A.node(t,e);return n=>n===r},Ud=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?V3(e):e,a=Oe.None,o=Oe.None,s=0,u=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var h=Q3(f,c);if([a,o]=n?[o,h]:[h,a],lo(a,Oe.ZWJ)&&lo(o,Oe.ExtPict)&&(n?u=G1(e.substring(0,s)):u=G1(e.substring(0,e.length-s)),!u)||lo(a,Oe.RI)&&lo(o,Oe.RI)&&(l!==null?l=!l:n?l=!0:l=iF(e.substring(0,e.length-s)),!l)||a!==Oe.None&&o!==Oe.None&&tF(a,o))break;s+=f.length}return s||1},I3=/\s/,N3=/[\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]/,k3=/['\u2018\u2019]/,z3=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;e.length>0;){var a=Ud(e,r),[o,s]=qd(e,a,r);if(j3(o,s,r))i=!0,n+=a;else if(!i)n+=a;else break;e=s}return n},qd=(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)]},j3=function t(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(I3.test(e))return!1;if(k3.test(e)){var i=Ud(r,n),[a,o]=qd(r,i,n);if(t(a,o,n))return!0}return!N3.test(e)},V3=function*(e){for(var r=e.length-1,n=0;n<e.length;n++){var i=e.charAt(r-n);if(W3(i.charCodeAt(0))){var a=e.charAt(r-n-1);if(H3(a.charCodeAt(0))){yield a+i,n++;continue}}yield i}},H3=t=>t>=55296&&t<=56319,W3=t=>t>=56320&&t<=57343,Oe;(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"})(Oe||(Oe={}));var $3=/^(?:[\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])$/,G3=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,U3=/^(?:[\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])$/,q3=/^[\u1100-\u115F\uA960-\uA97C]$/,Y3=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,X3=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,K3=/^[\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]$/,Z3=/^[\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]$/,J3=/^(?:[\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])$/,Q3=(t,e)=>{var r=Oe.Any;return t.search($3)!==-1&&(r|=Oe.Extend),e===8205&&(r|=Oe.ZWJ),e>=127462&&e<=127487&&(r|=Oe.RI),t.search(G3)!==-1&&(r|=Oe.Prepend),t.search(U3)!==-1&&(r|=Oe.SpacingMark),t.search(q3)!==-1&&(r|=Oe.L),t.search(Y3)!==-1&&(r|=Oe.V),t.search(X3)!==-1&&(r|=Oe.T),t.search(K3)!==-1&&(r|=Oe.LV),t.search(Z3)!==-1&&(r|=Oe.LVT),t.search(J3)!==-1&&(r|=Oe.ExtPict),r};function lo(t,e){return(t&e)!==0}var eF=[[Oe.L,Oe.L|Oe.V|Oe.LV|Oe.LVT],[Oe.LV|Oe.V,Oe.V|Oe.T],[Oe.LVT|Oe.T,Oe.T],[Oe.Any,Oe.Extend|Oe.ZWJ],[Oe.Any,Oe.SpacingMark],[Oe.Prepend,Oe.Any],[Oe.ZWJ,Oe.ExtPict],[Oe.RI,Oe.RI]];function tF(t,e){return eF.findIndex(r=>lo(t,r[0])&&lo(e,r[1]))===-1}var rF=/(?:[\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$/,G1=t=>t.search(rF)!==-1,nF=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,iF=t=>{var e=t.match(nF);if(e===null)return!1;var r=e[0].length/2;return r%2===1},aF={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]:{};A.withoutNormalizing(t,()=>{var{voids:n=!1}=r,{at:i=Gd(t)}=r;if($.isPath(i)&&(i=A.range(t,i)),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var a=te.end(i);if(!n&&A.void(t,{at:a}))return;var o=te.start(i),s=A.pointRef(t,o),u=A.pointRef(t,a);ie.delete(t,{at:i,voids:n});var l=s.unref(),f=u.unref();i=l||f,ie.setSelection(t,{anchor:i,focus:i})}if(!(!n&&A.void(t,{at:i})||A.elementReadOnly(t,{at:i}))){var{path:c,offset:h}=i;e.length>0&&t.apply({type:"insert_text",path:c,offset:h,text:e})}})}};function U1(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 zl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?U1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var ie=zl(zl(zl(zl({},x3),S3),E3),aF),jl=new WeakMap,oF=t=>jl.get(t)||!1,sF=(t,e,r)=>{var n=jl.get(t)||!1;jl.set(t,!0);try{e(),r()}finally{jl.set(t,n)}};function q1(t,e,r){var n=Nl.get(t)||[],i=kl.get(t)||new Set,a,o,s=c=>{if(c){var h=c.join(",");o.has(h)||(o.add(h),a.push(c))}};if(r){a=[],o=new Set;for(var u of n){var l=r(u);s(l)}}else a=n,o=i;for(var f of e)s(f);Nl.set(t,a),kl.set(t,o)}var uF=(t,e)=>{for(var r of A.pathRefs(t))y3.transform(r,e);for(var n of A.pointRefs(t))b3.transform(n,e);for(var i of A.rangeRefs(t))C3.transform(i,e);if(!oF(t)){var a=$.operationCanTransformPath(e)?o=>$.transform(o,e):void 0;q1(t,t.getDirtyPaths(e),a)}ie.transform(t,e),t.operations.push(e),A.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Ms.get(t)||(Ms.set(t,!0),Promise.resolve().then(()=>{Ms.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},lF=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=e;return $.levels(r)}case"insert_node":{var{node:n,path:i}=e,a=$.levels(i),o=ve.isText(n)?[]:Array.from(ue.nodes(n),O=>{var[,E]=O;return i.concat(E)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=$.ancestors(s),l=$.previous(s);return[...u,l]}case"move_node":{var{path:f,newPath:c}=e;if($.equals(f,c))return[];var h=[],d=[];for(var v of $.ancestors(f)){var g=$.transform(v,e);h.push(g)}for(var p of $.ancestors(c)){var m=$.transform(p,e);d.push(m)}var y=d[d.length-1],b=c[c.length-1],C=y.concat(b);return[...h,...d,C]}case"remove_node":{var{path:w}=e,D=$.ancestors(w);return[...D]}case"split_node":{var{path:_}=e,x=$.levels(_),S=$.next(_);return[...x,S]}default:return[]}},fF=t=>{var{selection:e}=t;return e?ue.fragment(t,e):[]},cF=(t,e)=>{var[r,n]=e;if(!ve.isText(r)){if(de.isElement(r)&&r.children.length===0){var i={text:""};ie.insertNodes(t,i,{at:n.concat(0),voids:!0});return}for(var a=A.isEditor(r)?!1:de.isElement(r)&&(t.isInline(r)||r.children.length===0||ve.isText(r.children[0])||t.isInline(r.children[0])),o=0,s=0;s<r.children.length;s++,o++){var u=ue.get(t,n);if(!ve.isText(u)){var l=u.children[o],f=u.children[o-1],c=s===r.children.length-1,h=ve.isText(l)||de.isElement(l)&&t.isInline(l);if(h!==a)ie.removeNodes(t,{at:n.concat(o),voids:!0}),o--;else if(de.isElement(l)){if(t.isInline(l)){if(f==null||!ve.isText(f)){var d={text:""};ie.insertNodes(t,d,{at:n.concat(o),voids:!0}),o++}else if(c){var v={text:""};ie.insertNodes(t,v,{at:n.concat(o+1),voids:!0}),o++}}}else{if(!ve.isText(l)&&!("children"in l)){var g=l;g.children=[]}f!=null&&ve.isText(f)&&(ve.equals(l,f,{loose:!0})?(ie.mergeNodes(t,{at:n.concat(o),voids:!0}),o--):f.text===""?(ie.removeNodes(t,{at:n.concat(o-1),voids:!0}),o--):l.text===""&&(ie.removeNodes(t,{at:n.concat(o),voids:!0}),o--))}}}}},hF=(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},dF=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:i="lowest",at:a=e.selection,match:o}=r;if(a){var s=A.path(e,a),u=i==="lowest";for(var[l,f]of A.levels(e,{at:s,voids:n,match:o,reverse:u}))if(!ve.isText(l)){if(te.isRange(a)){if($.isAncestor(f,a.anchor.path)&&$.isAncestor(f,a.focus.path))return[l,f]}else if(!$.equals(s,f))return[l,f]}}};function Y1(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 X1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var vF=(t,e,r)=>{var{selection:n}=t;if(n){var i=(c,h)=>{if(!ve.isText(c))return!1;var[d,v]=A.parent(t,h);return!t.isVoid(d)||t.markableVoid(d)},a=te.isExpanded(n),o=!1;if(!a){var[s,u]=A.node(t,n);if(s&&i(s,u)){var[l]=A.parent(t,u);o=l&&t.markableVoid(l)}}if(a||o)ie.setNodes(t,{[e]:r},{match:i,split:!0,voids:!0});else{var f=X1(X1({},A.marks(t)||{}),{},{[e]:r});t.marks=f,Ms.get(t)||t.onChange()}}};function K1(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 Z1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?K1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var pF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=A.point(e,r,{edge:"end"}),a=A.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of A.positions(e,Z1(Z1({},n),{},{at:o}))){if(u>s)break;u!==0&&(l=f),u++}return l};function J1(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 Q1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?J1(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J1(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var gF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=A.start(e,[]),a=A.point(e,r,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=n,u=0,l;for(var f of A.positions(e,Q1(Q1({},n),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(l=f),u++}return l},mF=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ie.delete(t,{unit:e,reverse:!0})},yF=(t,e)=>{var{selection:r}=t;r&&te.isCollapsed(r)&&ie.delete(t,{unit:e})},bF=function(e){var{direction:r="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e;n&&te.isExpanded(n)&&ie.delete(e,{reverse:r==="backward"})},CF=(t,e)=>[A.start(t,e),A.end(t,e)];function eb(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 tb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eb(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wF=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A.above(e,tb(tb({},r),{},{match:n=>de.isElement(n)&&A.isElementReadOnly(e,n)}))},DF=(t,e)=>A.point(t,e,{edge:"end"}),_F=(t,e)=>{var r=A.path(t,e,{edge:"start"});return A.node(t,r)},xF=(t,e)=>{var r=A.range(t,e);return ue.fragment(t,r)};function rb(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 nb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rb(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var SF=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A.above(e,nb(nb({},r),{},{match:n=>de.isElement(n)&&A.isVoid(e,n)}))},EF=(t,e)=>e.children.some(r=>de.isElement(r)&&A.isBlock(t,r)),AF=(t,e)=>e.children.some(r=>ve.isText(r)||A.isInline(t,r)),TF=(t,e)=>ue.has(t,e),OF=(t,e)=>e.children.every(r=>ve.isText(r)),PF=t=>{ie.splitNodes(t,{always:!0})},BF=(t,e,r)=>{ie.insertNodes(t,e,r)},MF=t=>{ie.splitNodes(t,{always:!0})};function ib(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 FF(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ib(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ib(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var LF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=FF({text:r},a);ie.insertNodes(e,o,{at:n.at,voids:n.voids})}else ie.insertText(e,r,n);e.marks=null}},RF=(t,e)=>!t.isInline(e),IF=(t,e,r)=>A.isStart(t,e,r)||A.isEnd(t,e,r),NF=(t,e)=>{var{children:r}=e,[n]=r;return r.length===0||r.length===1&&ve.isText(n)&&n.text===""&&!t.isVoid(e)},kF=(t,e,r)=>{var n=A.end(t,r);return Ie.equals(e,n)},zF=t=>{var e=P1.get(t);return e===void 0?!0:e},jF=(t,e,r)=>{if(e.offset!==0)return!1;var n=A.start(t,r);return Ie.equals(e,n)},VF=(t,e)=>{var r=A.path(t,e,{edge:"end"});return A.node(t,r)},HF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=A.path(e,r,n),a=ue.leaf(e,i);return[a,i]};function WF(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:a}=e;if(a==null&&(a=()=>!0),!!r){var o=[],s=A.path(t,r);for(var[u,l]of ue.levels(t,s))if(a(u,l)&&(o.push([u,l]),!i&&de.isElement(u)&&A.isVoid(t,u)))break;n&&o.reverse(),yield*o}}()}var $F=["text"],GF=["text"],UF=function(e){var{marks:r,selection:n}=e;if(!n)return null;var{anchor:i,focus:a}=n;if(r)return r;if(te.isExpanded(n)){var o=te.isBackward(n);o&&([a,i]=[i,a]);var s=A.isEnd(e,i,i.path);if(s){var u=A.after(e,i);u&&(i=u)}var[l]=A.nodes(e,{match:ve.isText,at:{anchor:i,focus:a}});if(l){var[f]=l,c=$n(f,$F);return c}else return{}}var{path:h}=i,[d]=A.leaf(e,h);if(i.offset===0){var v=A.previous(e,{at:h,match:ve.isText}),g=A.above(e,{match:w=>de.isElement(w)&&A.isVoid(e,w)&&e.markableVoid(w)});if(!g){var p=A.above(e,{match:w=>de.isElement(w)&&A.isBlock(e,w)});if(v&&p){var[m,y]=v,[,b]=p;$.isAncestor(b,y)&&(d=m)}}}var C=$n(d,GF);return C},qF=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=A.after(e,o,{voids:i});if(s){var[,u]=A.last(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if($.isPath(o)){var[f]=A.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=A.nodes(e,{at:l,match:a,mode:n,voids:i});return c}}},YF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=A.path(e,r,n),a=ue.get(e,i);return[a,i]};function XF(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:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!r){var l,f;if(F3.isSpan(r))l=r[0],f=r[1];else{var c=A.path(t,r,{edge:"start"}),h=A.path(t,r,{edge:"end"});l=a?h:c,f=a?c:h}var d=ue.nodes(t,{reverse:a,from:l,to:f,pass:C=>{var[w]=C;return de.isElement(w)?!!(!o&&(A.isVoid(t,w)||A.isElementReadOnly(t,w))||s&&!A.isSelectable(t,w)):!1}}),v=[],g;for(var[p,m]of d)if(!(s&&de.isElement(p)&&!A.isSelectable(t,p))){var y=g&&$.compare(m,g[1])===0;if(!(n==="highest"&&y)){if(!u(p,m)){if(i&&!y&&ve.isText(p))return;continue}if(n==="lowest"&&y){g=[p,m];continue}var b=n==="lowest"?g:[p,m];b&&(i?v.push(b):yield b),g=[p,m]}}n==="lowest"&&g&&(i?v.push(g):yield g),i&&(yield*v)}}()}var KF=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1,operation:i}=r,a=f=>Nl.get(f)||[],o=f=>kl.get(f)||new Set,s=f=>{var c=a(f).pop(),h=c.join(",");return o(f).delete(h),c};if(A.isNormalizing(e)){if(n){var u=Array.from(ue.nodes(e),f=>{var[,c]=f;return c}),l=new Set(u.map(f=>f.join(",")));Nl.set(e,u),kl.set(e,l)}a(e).length!==0&&A.withoutNormalizing(e,()=>{for(var f of a(e))if(ue.has(e,f)){var c=A.node(e,f),[h,d]=c;de.isElement(h)&&h.children.length===0&&e.normalizeNode(c,{operation:i})}for(var v=a(e),g=v.length,p=0;v.length!==0;){if(!e.shouldNormalize({dirtyPaths:v,iteration:p,initialDirtyPathsLength:g,operation:i}))return;var m=s(e);if(ue.has(e,m)){var y=A.node(e,m);e.normalizeNode(y,{operation:i})}p++,v=a(e)}})}},ZF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=A.path(e,r,n),a=$.parent(i),o=A.node(e,a);return o},JF=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=A.pathRefs(e);return u.delete(a),a.current=null,s}},o=A.pathRefs(e);return o.add(a),a},QF=t=>{var e=B1.get(t);return e||(e=new Set,B1.set(t,e)),e},eL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=n;if($.isPath(r)){if(a==="start"){var[,o]=ue.first(e,r);r=o}else if(a==="end"){var[,s]=ue.last(e,r);r=s}}return te.isRange(r)&&(a==="start"?r=te.start(r):a==="end"?r=te.end(r):r=$.common(r.anchor.path,r.focus.path)),Ie.isPoint(r)&&(r=r.path),i!=null&&(r=r.slice(0,i)),r},tL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=A.pointRefs(e);return u.delete(a),a.current=null,s}},o=A.pointRefs(e);return o.add(a),a},rL=t=>{var e=M1.get(t);return e||(e=new Set,M1.set(t,e)),e},nL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=n;if($.isPath(r)){var a;if(i==="end"){var[,o]=ue.last(e,r);a=o}else{var[,s]=ue.first(e,r);a=s}var u=ue.get(e,a);if(!ve.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:a,offset:i==="end"?u.text.length:0}}if(te.isRange(r)){var[l,f]=te.edges(r);return i==="start"?l:f}return r};function iL(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:a=!1,ignoreNonSelectable:o=!1}=e;if(!r)return;var s=A.range(t,r),[u,l]=te.edges(s),f=i?l:u,c=!1,h="",d=0,v=0,g=0;for(var[p,m]of A.nodes(t,{at:r,reverse:i,voids:a,ignoreNonSelectable:o})){if(de.isElement(p)){if(!a&&(t.isVoid(p)||t.isElementReadOnly(p))){yield A.start(t,m);continue}if(t.isInline(p))continue;if(A.hasInlines(t,p)){var y=$.isAncestor(m,l.path)?l:A.end(t,m),b=$.isAncestor(m,u.path)?u:A.start(t,m);h=A.string(t,{anchor:b,focus:y},{voids:a}),c=!0}}if(ve.isText(p)){var C=$.equals(m,f.path);for(C?(v=i?f.offset:p.text.length-f.offset,g=f.offset):(v=p.text.length,g=i?v:0),(C||c||n==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(h==="")break;d=w(h,n,i),h=qd(h,d,i)[1]}if(g=i?g-d:g+d,v=v-d,v<0){d=-v;break}d=0,yield{path:m,offset:g}}}}function w(D,_,x){return _==="character"?Ud(D,x):_==="word"?z3(D,x):_==="line"||_==="block"?D.length:1}}()}var aL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection}=r;if(o){var s=A.before(e,o,{voids:i});if(s){var[,u]=A.first(e,[]),l=[s.path,u];if($.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if($.isPath(o)){var[f]=A.parent(e,o);a=h=>f.children.includes(h)}else a=()=>!0;var[c]=A.nodes(e,{reverse:!0,at:l,match:a,mode:n,voids:i});return c}}},oL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=n,a={current:r,affinity:i,unref(){var{current:s}=a,u=A.rangeRefs(e);return u.delete(a),a.current=null,s}},o=A.rangeRefs(e);return o.add(a),a},sL=t=>{var e=F1.get(t);return e||(e=new Set,F1.set(t,e)),e},uL=(t,e,r)=>{if(te.isRange(e)&&!r)return e;var n=A.start(t,e),i=A.end(t,r||e);return{anchor:n,focus:i}};function ab(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 lL(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ab(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ab(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var fL=(t,e)=>{var{selection:r}=t;if(r){var n=(f,c)=>{if(!ve.isText(f))return!1;var[h,d]=A.parent(t,c);return!t.isVoid(h)||t.markableVoid(h)},i=te.isExpanded(r),a=!1;if(!i){var[o,s]=A.node(t,r);if(o&&n(o,s)){var[u]=A.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ie.unsetNodes(t,e,{match:n,split:!0,voids:!0});else{var l=lL({},A.marks(t)||{});delete l[e],t.marks=l,Ms.get(t)||t.onChange()}}},cL=(t,e)=>{P1.set(t,e)},hL=(t,e)=>A.point(t,e,{edge:"start"}),dL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,a=A.range(e,r),[o,s]=te.edges(a),u="";for(var[l,f]of A.nodes(e,{at:a,match:ve.isText,voids:i})){var c=l.text;$.equals(f,s.path)&&(c=c.slice(0,s.offset)),$.equals(f,o.path)&&(c=c.slice(o.offset)),u+=c}return u},vL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=n,[a,o]=te.edges(r);if(a.offset!==0||o.offset!==0||te.isCollapsed(r)||$.hasPrevious(o.path))return r;var s=A.above(e,{at:o,match:v=>de.isElement(v)&&A.isBlock(e,v),voids:i}),u=s?s[1]:[],l=A.start(e,a),f={anchor:l,focus:o},c=!0;for(var[h,d]of A.nodes(e,{at:f,match:ve.isText,reverse:!0,voids:i})){if(c){c=!1;continue}if(h.text!==""||$.isBefore(d,u)){o={path:d,offset:h.text.length};break}}return{anchor:a,focus:o}},pL=(t,e)=>{var r=A.isNormalizing(t);A.setNormalizing(t,!1);try{e()}finally{A.setNormalizing(t,r)}A.normalize(t)},gL=(t,e,r)=>{var[n,i]=e;return de.isElement(n)&&A.isEmpty(t,n)||ve.isText(n)&&n.text===""&&i[i.length-1]!==0},mL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var n,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=r,{at:l=e.selection,hanging:f=!1}=r;if(l){var c=!1;if(te.isRange(l)&&te.isCollapsed(l)&&(c=!0,l=l.anchor),Ie.isPoint(l)){var h=A.void(e,{at:l,mode:"highest"});if(!u&&h){var[,d]=h;l=d}else{var v={unit:o,distance:s},g=a?A.before(e,l,v)||A.start(e,[]):A.after(e,l,v)||A.end(e,[]);l={anchor:l,focus:g},f=!0}}if($.isPath(l)){ie.removeNodes(e,{at:l,voids:u});return}if(!te.isCollapsed(l)){if(!f){var[,p]=te.edges(l),m=A.end(e,[]);Ie.equals(p,m)||(l=A.unhangRange(e,l,{voids:u}))}var[y,b]=te.edges(l),C=A.above(e,{match:se=>de.isElement(se)&&A.isBlock(e,se),at:y,voids:u}),w=A.above(e,{match:se=>de.isElement(se)&&A.isBlock(e,se),at:b,voids:u}),D=C&&w&&!$.equals(C[1],w[1]),_=$.equals(y.path,b.path),x=u?null:(n=A.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:A.elementReadOnly(e,{at:y,mode:"highest"}),S=u?null:(i=A.void(e,{at:b,mode:"highest"}))!==null&&i!==void 0?i:A.elementReadOnly(e,{at:b,mode:"highest"});if(x){var O=A.before(e,y);O&&C&&$.isAncestor(C[1],O.path)&&(y=O)}if(S){var E=A.after(e,b);E&&w&&$.isAncestor(w[1],E.path)&&(b=E)}var P=[],F;for(var M of A.nodes(e,{at:l,voids:u})){var[B,R]=M;F&&$.compare(R,F)===0||(!u&&de.isElement(B)&&(A.isVoid(e,B)||A.isElementReadOnly(e,B))||!$.isCommon(R,y.path)&&!$.isCommon(R,b.path))&&(P.push(M),F=R)}var V=Array.from(P,se=>{var[,ye]=se;return A.pathRef(e,ye)}),k=A.pointRef(e,y),W=A.pointRef(e,b),I="";if(!_&&!x){var q=k.current,[Z]=A.leaf(e,q),{path:J}=q,{offset:ne}=y,G=Z.text.slice(ne);G.length>0&&(e.apply({type:"remove_text",path:J,offset:ne,text:G}),I=G)}if(V.reverse().map(se=>se.unref()).filter(se=>se!==null).forEach(se=>ie.removeNodes(e,{at:se,voids:u})),!S){var L=W.current,[Y]=A.leaf(e,L),{path:j}=L,U=_?y.offset:0,Q=Y.text.slice(U,b.offset);Q.length>0&&(e.apply({type:"remove_text",path:j,offset:U,text:Q}),I=Q)}!_&&D&&W.current&&k.current&&ie.mergeNodes(e,{at:W.current,hanging:!0,voids:u}),c&&a&&o==="character"&&I.length>1&&I.match(/[\u0E00-\u0E7F]+/)&&ie.insertText(e,I.slice(0,I.length-s));var K=k.unref(),X=W.unref(),le=a?K||X:X||K;r.at==null&&le&&ie.select(e,le)}}})},yL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};A.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=n,{at:o=Gd(e),batchDirty:s=!0}=n;if(r.length){if(te.isRange(o))if(i||(o=A.unhangRange(e,o,{voids:a})),te.isCollapsed(o))o=o.anchor;else{var[,u]=te.edges(o);if(!a&&A.void(e,{at:u}))return;var l=A.pointRef(e,u);ie.delete(e,{at:o}),o=l.unref()}else $.isPath(o)&&(o=A.start(e,o));if(!(!a&&A.void(e,{at:o}))){var f=A.above(e,{at:o,match:G=>de.isElement(G)&&A.isInline(e,G),mode:"highest",voids:a});if(f){var[,c]=f;if(A.isEnd(e,o,c)){var h=A.after(e,c);o=h}else if(A.isStart(e,o,c)){var d=A.before(e,c);o=d}}var v=A.above(e,{match:G=>de.isElement(G)&&A.isBlock(e,G),at:o,voids:a}),[,g]=v,p=A.isStart(e,o,g),m=A.isEnd(e,o,g),y=p&&m,b=!p||p&&m,C=!m,[,w]=ue.first({children:r},[]),[,D]=ue.last({children:r},[]),_=[],x=G=>{var[L,Y]=G,j=Y.length===0;return j?!1:y?!0:!(b&&$.isAncestor(Y,w)&&de.isElement(L)&&!e.isVoid(L)&&!e.isInline(L)||C&&$.isAncestor(Y,D)&&de.isElement(L)&&!e.isVoid(L)&&!e.isInline(L))};for(var S of ue.nodes({children:r},{pass:x}))x(S)&&_.push(S);var O=[],E=[],P=[],F=!0,M=!1;for(var[B]of _)de.isElement(B)&&!e.isInline(B)?(F=!1,M=!0,E.push(B)):F?O.push(B):P.push(B);var[R]=A.nodes(e,{at:o,match:G=>ve.isText(G)||A.isInline(e,G),mode:"highest",voids:a}),[,V]=R,k=A.isStart(e,o,V),W=A.isEnd(e,o,V),I=A.pathRef(e,m&&!P.length?$.next(g):g),q=A.pathRef(e,W?$.next(V):V);ie.splitNodes(e,{at:o,match:G=>M?de.isElement(G)&&A.isBlock(e,G):ve.isText(G)||A.isInline(e,G),mode:M?"lowest":"highest",always:M&&(!p||O.length>0)&&(!m||P.length>0),voids:a});var Z=A.pathRef(e,!k||k&&W?$.next(V):V);if(ie.insertNodes(e,O,{at:Z.current,match:G=>ve.isText(G)||A.isInline(e,G),mode:"highest",voids:a,batchDirty:s}),y&&!O.length&&E.length&&!P.length&&ie.delete(e,{at:g,voids:a}),ie.insertNodes(e,E,{at:I.current,match:G=>de.isElement(G)&&A.isBlock(e,G),mode:"lowest",voids:a,batchDirty:s}),ie.insertNodes(e,P,{at:q.current,match:G=>ve.isText(G)||A.isInline(e,G),mode:"highest",voids:a,batchDirty:s}),!n.at){var J;if(P.length>0&&q.current?J=$.previous(q.current):E.length>0&&I.current?J=$.previous(I.current):Z.current&&(J=$.previous(Z.current)),J){var ne=A.end(e,J);ie.select(e,ne)}}Z.unref(),I.unref(),q.unref()}}})},bL=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")ie.select(e,i.anchor);else if(n==="focus")ie.select(e,i.focus);else if(n==="start"){var[a]=te.edges(i);ie.select(e,a)}else if(n==="end"){var[,o]=te.edges(i);ie.select(e,o)}}else return},CL=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},wL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:i=1,unit:a="character",reverse:o=!1}=r,{edge:s=null}=r;if(n){s==="start"&&(s=te.isBackward(n)?"focus":"anchor"),s==="end"&&(s=te.isBackward(n)?"anchor":"focus");var{anchor:u,focus:l}=n,f={distance:i,unit:a,ignoreNonSelectable:!0},c={};if(s==null||s==="anchor"){var h=o?A.before(e,u,f):A.after(e,u,f);h&&(c.anchor=h)}if(s==null||s==="focus"){var d=o?A.before(e,l,f):A.after(e,l,f);d&&(c.focus=d)}ie.setSelection(e,c)}},DL=(t,e)=>{var{selection:r}=t;if(e=A.range(t,e),r){ie.setSelection(t,e);return}if(!te.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(Ft.stringify(e)));t.apply({type:"set_selection",properties:r,newProperties:e})};function ob(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 sb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ob(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var _L=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=n;if(i){a==="start"&&(a=te.isBackward(i)?"focus":"anchor"),a==="end"&&(a=te.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ie.setSelection(e,{[a==="anchor"?"anchor":"focus"]:sb(sb({},u),r)})}},xL=(t,e)=>{var{selection:r}=t,n={},i={};if(r){for(var a in e)(a==="anchor"&&e.anchor!=null&&!Ie.equals(e.anchor,r.anchor)||a==="focus"&&e.focus!=null&&!Ie.equals(e.focus,r.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==r[a])&&(n[a]=r[a],i[a]=e[a]);Object.keys(n).length>0&&t.apply({type:"set_selection",properties:n,newProperties:i})}},SL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};A.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=n,{at:u,match:l,select:f}=n;if(ue.isNode(r)&&(r=[r]),r.length!==0){var[c]=r;if(u||(u=Gd(e),f!==!1&&(f=!0)),f==null&&(f=!1),te.isRange(u))if(i||(u=A.unhangRange(e,u,{voids:a})),te.isCollapsed(u))u=u.anchor;else{var[,h]=te.edges(u),d=A.pointRef(e,h);ie.delete(e,{at:u}),u=d.unref()}if(Ie.isPoint(u)){l==null&&(ve.isText(c)?l=O=>ve.isText(O):e.isInline(c)?l=O=>ve.isText(O)||A.isInline(e,O):l=O=>de.isElement(O)&&A.isBlock(e,O));var[v]=A.nodes(e,{at:u.path,match:l,mode:o,voids:a});if(v){var[,g]=v,p=A.pathRef(e,g),m=A.isEnd(e,u,g);ie.splitNodes(e,{at:u,match:l,mode:o,voids:a});var y=p.unref();u=m?$.next(y):y}else return}var b=$.parent(u),C=u[u.length-1];if(!(!a&&A.void(e,{at:b}))){if(s){var w=[],D=$.levels(b);sF(e,()=>{var O=function(){var F=b.concat(C);C++;var M={type:"insert_node",path:F,node:E};e.apply(M),u=$.next(u),w.push(M),ve.isText?D.push(...Array.from(ue.nodes(E),B=>{var[,R]=B;return F.concat(R)})):D.push(F)};for(var E of r)O()},()=>{q1(e,D,O=>{var E=O;for(var P of w)if($.operationCanTransformPath(P)&&(E=$.transform(E,P),!E))return null;return E})})}else for(var _ of r){var x=b.concat(C);C++,e.apply({type:"insert_node",path:x,node:_}),u=$.next(u)}if(u=$.previous(u),f){var S=A.end(e,u);S&&ie.select(e,S)}}}})},EL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:i="lowest",voids:a=!1}=r,{match:o}=r;if(o==null&&(o=$.isPath(n)?uo(e,n):C=>de.isElement(C)&&A.isBlock(e,C)),!!n){var s=A.nodes(e,{at:n,match:o,mode:i,voids:a}),u=Array.from(s,C=>{var[,w]=C;return A.pathRef(e,w)});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 c=A.node(e,$.parent(f)),[h,d]=c,v=f[f.length-1],{length:g}=h.children;if(g===1){var p=$.next(d);ie.moveNodes(e,{at:f,to:p,voids:a}),ie.removeNodes(e,{at:d,voids:a})}else if(v===0)ie.moveNodes(e,{at:f,to:d,voids:a});else if(v===g-1){var m=$.next(d);ie.moveNodes(e,{at:f,to:m,voids:a})}else{var y=$.next(f),b=$.next(d);ie.splitNodes(e,{at:y,voids:a}),ie.moveNodes(e,{at:f,to:b,voids:a})}}}})},AL=["text"],TL=["children"],ub=(t,e)=>{if(de.isElement(e)){var r=e;return A.isVoid(t,e)?!0:r.children.length===1?ub(t,r.children[0]):!1}else return!A.isEditor(e)},OL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=r;if(i){if(n==null)if($.isPath(i)){var[u]=A.parent(e,i);n=O=>u.children.includes(O)}else n=O=>de.isElement(O)&&A.isBlock(e,O);if(!a&&te.isRange(i)&&(i=A.unhangRange(e,i,{voids:o})),te.isRange(i))if(te.isCollapsed(i))i=i.anchor;else{var[,l]=te.edges(i),f=A.pointRef(e,l);ie.delete(e,{at:i}),i=f.unref(),r.at==null&&ie.select(e,i)}var[c]=A.nodes(e,{at:i,match:n,voids:o,mode:s}),h=A.previous(e,{at:i,match:n,voids:o,mode:s});if(!(!c||!h)){var[d,v]=c,[g,p]=h;if(!(v.length===0||p.length===0)){var m=$.next(p),y=$.common(v,p),b=$.isSibling(v,p),C=Array.from(A.levels(e,{at:v}),O=>{var[E]=O;return E}).slice(y.length).slice(0,-1),w=A.above(e,{at:v,mode:"highest",match:O=>C.includes(O)&&ub(e,O)}),D=w&&A.pathRef(e,w[1]),_,x;if(ve.isText(d)&&ve.isText(g)){var S=$n(d,AL);x=g.text.length,_=S}else if(de.isElement(d)&&de.isElement(g)){var S=$n(d,TL);x=g.children.length,_=S}else throw new Error("Cannot merge the node at path [".concat(v,"] with the previous sibling because it is not the same kind: ").concat(Ft.stringify(d)," ").concat(Ft.stringify(g)));b||ie.moveNodes(e,{at:v,to:m,voids:o}),D&&ie.removeNodes(e,{at:D.current,voids:o}),A.shouldMergeNodesRemovePrevNode(e,h,c)?ie.removeNodes(e,{at:p,voids:o}):e.apply({type:"merge_node",path:m,position:x,properties:_}),D&&D.unref()}}}})},PL=(t,e)=>{A.withoutNormalizing(t,()=>{var{to:r,at:n=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(n){o==null&&(o=$.isPath(n)?uo(t,n):d=>de.isElement(d)&&A.isBlock(t,d));var s=A.pathRef(t,r),u=A.nodes(t,{at:n,match:o,mode:i,voids:a}),l=Array.from(u,d=>{var[,v]=d;return A.pathRef(t,v)});for(var f of l){var c=f.unref(),h=s.current;c.length!==0&&t.apply({type:"move_node",path:c,newPath:h}),s.current&&$.isSibling(h,c)&&$.isAfter(h,c)&&(s.current=$.next(s.current))}s.unref()}})},BL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:a="lowest"}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?uo(e,o):d=>de.isElement(d)&&A.isBlock(e,d)),!n&&te.isRange(o)&&(o=A.unhangRange(e,o,{voids:i}));var u=A.nodes(e,{at:o,match:s,mode:a,voids:i}),l=Array.from(u,d=>{var[,v]=d;return A.pathRef(e,v)});for(var f of l){var c=f.unref();if(c){var[h]=A.node(e,c);e.apply({type:"remove_node",path:c,node:h})}}}})},ML=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};A.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=n,{hanging:u=!1,mode:l="lowest",split:f=!1,voids:c=!1}=n;if(a){if(i==null&&(i=$.isPath(a)?uo(e,a):x=>de.isElement(x)&&A.isBlock(e,x)),!u&&te.isRange(a)&&(a=A.unhangRange(e,a,{voids:c})),f&&te.isRange(a)){if(te.isCollapsed(a)&&A.leaf(e,a.anchor)[0].text.length>0)return;var h=A.rangeRef(e,a,{affinity:"inward"}),[d,v]=te.edges(a),g=l==="lowest"?"lowest":"highest",p=A.isEnd(e,v,v.path);ie.splitNodes(e,{at:v,match:i,mode:g,voids:c,always:!p});var m=A.isStart(e,d,d.path);ie.splitNodes(e,{at:d,match:i,mode:g,voids:c,always:!m}),a=h.unref(),n.at==null&&ie.select(e,a)}o||(o=(x,S)=>x!==S);for(var[y,b]of A.nodes(e,{at:a,match:i,mode:l,voids:c})){var C={},w={};if(b.length!==0){var D=!1;for(var _ in r)_==="children"||_==="text"||o(r[_],y[_])&&(D=!0,y.hasOwnProperty(_)&&(C[_]=y[_]),s?r[_]!=null&&(w[_]=s(y[_],r[_])):r[_]!=null&&(w[_]=r[_]));D&&e.apply({type:"set_node",path:b,properties:C,newProperties:w})}}}})},FL=(t,e)=>{if(te.isCollapsed(e))return e.anchor;var[,r]=te.edges(e),n=A.pointRef(t,r);return ie.delete(t,{at:e}),n.unref()},LL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:i=!1}=r,{match:a,at:o=e.selection,height:s=0,always:u=!1}=r;if(a==null&&(a=W=>de.isElement(W)&&A.isBlock(e,W)),te.isRange(o)&&(o=FL(e,o)),$.isPath(o)){var l=o,f=A.point(e,l),[c]=A.parent(e,l);a=W=>W===c,s=f.path.length-l.length+1,o=f,u=!0}if(o){var h=A.pointRef(e,o,{affinity:"backward"}),d;try{var[v]=A.nodes(e,{at:o,match:a,mode:n,voids:i});if(!v)return;var g=A.void(e,{at:o,mode:"highest"}),p=0;if(!i&&g){var[m,y]=g;if(de.isElement(m)&&e.isInline(m)){var b=A.after(e,y);if(!b){var C={text:""},w=$.next(y);ie.insertNodes(e,C,{at:w,voids:i}),b=A.point(e,w)}o=b,u=!0}var D=o.path.length-y.length;s=D+1,u=!0}d=A.pointRef(e,o);var _=o.path.length-s,[,x]=v,S=o.path.slice(0,_),O=s===0?o.offset:o.path[_]+p;for(var[E,P]of A.levels(e,{at:S,reverse:!0,voids:i})){var F=!1;if(P.length<x.length||P.length===0||!i&&de.isElement(E)&&A.isVoid(e,E))break;var M=h.current,B=A.isEnd(e,M,P);if(u||!h||!A.isEdge(e,M,P)){F=!0;var R=ue.extractProps(E);e.apply({type:"split_node",path:P,position:O,properties:R})}O=P[P.length-1]+(F||B?1:0)}if(r.at==null){var V=d.current||A.end(e,[]);ie.select(e,V)}}finally{var k;h.unref(),(k=d)===null||k===void 0||k.unref()}}})},RL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(r)||(r=[r]);var i={};for(var a of r)i[a]=null;ie.setNodes(e,i,n)},IL=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};A.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:a=!1}=r,{at:o=e.selection,match:s}=r;if(o){s==null&&(s=$.isPath(o)?uo(e,o):d=>de.isElement(d)&&A.isBlock(e,d)),$.isPath(o)&&(o=A.range(e,o));var u=te.isRange(o)?A.rangeRef(e,o):null,l=A.nodes(e,{at:o,match:s,mode:n,voids:a}),f=Array.from(l,d=>{var[,v]=d;return A.pathRef(e,v)}).reverse(),c=function(){var v=h.unref(),[g]=A.node(e,v),p=A.range(e,v);i&&u&&(p=te.intersection(u.current,p)),ie.liftNodes(e,{at:p,match:m=>de.isAncestor(g)&&g.children.includes(m),voids:a})};for(var h of f)c();u&&u.unref()}})};function lb(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 fb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lb(Object(r),!0).forEach(function(n){Jt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var NL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};A.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=n,{match:s,at:u=e.selection}=n;if(u){if(s==null&&($.isPath(u)?s=uo(e,u):e.isInline(r)?s=p=>de.isElement(p)&&A.isInline(e,p)||ve.isText(p):s=p=>de.isElement(p)&&A.isBlock(e,p)),a&&te.isRange(u)){var[l,f]=te.edges(u),c=A.rangeRef(e,u,{affinity:"inward"});ie.splitNodes(e,{at:f,match:s,voids:o}),ie.splitNodes(e,{at:l,match:s,voids:o}),u=c.unref(),n.at==null&&ie.select(e,u)}var h=Array.from(A.nodes(e,{at:u,match:e.isInline(r)?p=>de.isElement(p)&&A.isBlock(e,p):p=>A.isEditor(p),mode:"lowest",voids:o})),d=function(){var m=te.isRange(u)?te.intersection(u,A.range(e,g)):u;if(!m)return 0;var y=Array.from(A.nodes(e,{at:m,match:s,mode:i,voids:o}));if(y.length>0){var[b]=y,C=y[y.length-1],[,w]=b,[,D]=C;if(w.length===0&&D.length===0)return 0;var _=$.equals(w,D)?$.parent(w):$.common(w,D),x=A.range(e,w,D),S=A.node(e,_),[O]=S,E=_.length+1,P=$.next(D.slice(0,E)),F=fb(fb({},r),{},{children:[]});ie.insertNodes(e,F,{at:P,voids:o}),ie.moveNodes(e,{at:x,match:M=>de.isAncestor(O)&&O.children.includes(M),to:P.concat(0),voids:o})}},v;for(var[,g]of h)v=d()}})},kL=()=>{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 uF(t,...n)},addMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vF(t,...n)},deleteBackward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mF(t,...n)},deleteForward:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yF(t,...n)},deleteFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bF(t,...n)},getFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fF(t,...n)},insertBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PF(t,...n)},insertSoftBreak:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return MF(t,...n)},insertFragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return yL(t,...n)},insertNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return BF(t,...n)},insertText:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LF(t,...n)},normalizeNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cF(t,...n)},removeMark:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return fL(t,...n)},getDirtyPaths:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return lF(t,...n)},shouldNormalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hF(t,...n)},above:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dF(t,...n)},after:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pF(t,...n)},before:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gF(t,...n)},collapse:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return bL(t,...n)},delete:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return mL(t,...n)},deselect:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CL(t,...n)},edges:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return CF(t,...n)},elementReadOnly:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wF(t,...n)},end:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DF(t,...n)},first:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _F(t,...n)},fragment:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xF(t,...n)},getMarks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return UF(t,...n)},hasBlocks:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return EF(t,...n)},hasInlines:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return AF(t,...n)},hasPath:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return TF(t,...n)},hasTexts:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OF(t,...n)},insertNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return SL(t,...n)},isBlock:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return RF(t,...n)},isEdge:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return IF(t,...n)},isEmpty:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return NF(t,...n)},isEnd:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return kF(t,...n)},isNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return zF(t,...n)},isStart:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return jF(t,...n)},last:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return VF(t,...n)},leaf:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return HF(t,...n)},levels:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return WF(t,...n)},liftNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return EL(t,...n)},mergeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return OL(t,...n)},move:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return wL(t,...n)},moveNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return PL(t,...n)},next:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return qF(t,...n)},node:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return YF(t,...n)},nodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return XF(t,...n)},normalize:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return KF(t,...n)},parent:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ZF(t,...n)},path:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return eL(t,...n)},pathRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return JF(t,...n)},pathRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return QF(t,...n)},point:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return nL(t,...n)},pointRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return tL(t,...n)},pointRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return rL(t,...n)},positions:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return iL(t,...n)},previous:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return aL(t,...n)},range:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return uL(t,...n)},rangeRef:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return oL(t,...n)},rangeRefs:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return sL(t,...n)},removeNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return BL(t,...n)},select:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return DL(t,...n)},setNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return ML(t,...n)},setNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cL(t,...n)},setPoint:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _L(t,...n)},setSelection:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return xL(t,...n)},splitNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return LL(t,...n)},start:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return hL(t,...n)},string:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return dL(t,...n)},unhangRange:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return vL(t,...n)},unsetNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return RL(t,...n)},unwrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return IL(t,...n)},void:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return SF(t,...n)},withoutNormalizing:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return pL(t,...n)},wrapNodes:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return NL(t,...n)},shouldMergeNodesRemovePrevNode:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return gL(t,...n)}};return t},na=[],zL=function(){return na.some(function(t){return t.activeTargets.length>0})},jL=function(){return na.some(function(t){return t.skippedTargets.length>0})},cb="ResizeObserver loop completed with undelivered notifications.",VL=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:cb}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=cb),window.dispatchEvent(t)},Rs;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Rs||(Rs={}));var ia=function(t){return Object.freeze(t)},HL=function(){function t(e,r){this.inlineSize=e,this.blockSize=r,ia(this)}return t}(),hb=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,ia(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,l=e.height;return{x:r,y:n,top:i,right:a,bottom:o,left:s,width:u,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Yd=function(t){return t instanceof SVGElement&&"getBBox"in t},db=function(t){if(Yd(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},vb=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)},WL=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},Is=typeof window<"u"?window:{},Vl=new WeakMap,pb=/auto|scroll/,$L=/^tb|vertical/,GL=/msie|trident/i.test(Is.navigator&&Is.navigator.userAgent),yn=function(t){return parseFloat(t||"0")},fo=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new HL((r?e:t)||0,(r?t:e)||0)},gb=ia({devicePixelContentBoxSize:fo(),borderBoxSize:fo(),contentBoxSize:fo(),contentRect:new hb(0,0,0,0)}),mb=function(t,e){if(e===void 0&&(e=!1),Vl.has(t)&&!e)return Vl.get(t);if(db(t))return Vl.set(t,gb),gb;var r=getComputedStyle(t),n=Yd(t)&&t.ownerSVGElement&&t.getBBox(),i=!GL&&r.boxSizing==="border-box",a=$L.test(r.writingMode||""),o=!n&&pb.test(r.overflowY||""),s=!n&&pb.test(r.overflowX||""),u=n?0:yn(r.paddingTop),l=n?0:yn(r.paddingRight),f=n?0:yn(r.paddingBottom),c=n?0:yn(r.paddingLeft),h=n?0:yn(r.borderTopWidth),d=n?0:yn(r.borderRightWidth),v=n?0:yn(r.borderBottomWidth),g=n?0:yn(r.borderLeftWidth),p=c+l,m=u+f,y=g+d,b=h+v,C=s?t.offsetHeight-b-t.clientHeight:0,w=o?t.offsetWidth-y-t.clientWidth:0,D=i?p+y:0,_=i?m+b:0,x=n?n.width:yn(r.width)-D-w,S=n?n.height:yn(r.height)-_-C,O=x+p+w+y,E=S+m+C+b,P=ia({devicePixelContentBoxSize:fo(Math.round(x*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:fo(O,E,a),contentBoxSize:fo(x,S,a),contentRect:new hb(c,u,x,S)});return Vl.set(t,P),P},yb=function(t,e,r){var n=mb(t,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(e){case Rs.DEVICE_PIXEL_CONTENT_BOX:return o;case Rs.BORDER_BOX:return i;default:return a}},UL=function(){function t(e){var r=mb(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=ia([r.borderBoxSize]),this.contentBoxSize=ia([r.contentBoxSize]),this.devicePixelContentBoxSize=ia([r.devicePixelContentBoxSize])}return t}(),bb=function(t){if(db(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},qL=function(){var t=1/0,e=[];na.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(l){var f=new UL(l.target),c=bb(l.target);s.push(f),l.lastReportedSize=yb(l.target,l.observedBox),c<t&&(t=c)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},Cb=function(t){na.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(bb(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},YL=function(){var t=0;for(Cb(t);zL();)t=qL(),Cb(t);return jL()&&VL(),t>0},Xd,wb=[],XL=function(){return wb.splice(0).forEach(function(t){return t()})},KL=function(t){if(!Xd){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return XL()}).observe(r,n),Xd=function(){r.textContent="".concat(e?e--:e++)}}wb.push(t),Xd()},ZL=function(t){KL(function(){requestAnimationFrame(t)})},Hl=0,JL=function(){return!!Hl},QL=250,eR={attributes:!0,characterData:!0,childList:!0,subtree:!0},Db=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],_b=function(t){return t===void 0&&(t=0),Date.now()+t},Kd=!1,tR=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=QL),!Kd){Kd=!0;var n=_b(e);ZL(function(){var i=!1;try{i=YL()}finally{if(Kd=!1,e=n-_b(),!JL())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,eR)};document.body?r():Is.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Db.forEach(function(r){return Is.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Db.forEach(function(r){return Is.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t}(),Zd=new tR,xb=function(t){!Hl&&t>0&&Zd.start(),Hl+=t,!Hl&&Zd.stop()},rR=function(t){return!Yd(t)&&!WL(t)&&getComputedStyle(t).display==="inline"},nR=function(){function t(e,r){this.target=e,this.observedBox=r||Rs.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=yb(this.target,this.observedBox,!0);return rR(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),iR=function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t}(),Wl=new WeakMap,Sb=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},$l=function(){function t(){}return t.connect=function(e,r){var n=new iR(e,r);Wl.set(e,n)},t.observe=function(e,r,n){var i=Wl.get(e),a=i.observationTargets.length===0;Sb(i.observationTargets,r)<0&&(a&&na.push(i),i.observationTargets.push(new nR(r,n&&n.box)),xb(1),Zd.schedule())},t.unobserve=function(e,r){var n=Wl.get(e),i=Sb(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&na.splice(na.indexOf(n),1),n.observationTargets.splice(i,1),xb(-1))},t.disconnect=function(e){var r=this,n=Wl.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t}(),aR=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.");$l.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(!vb(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");$l.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(!vb(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");$l.unobserve(this,e)},t.prototype.disconnect=function(){$l.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Un={};Object.defineProperty(Un,"__esModule",{value:!0});for(var oR=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Jd={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Eb={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:oR?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Qd={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},Gl=1;Gl<20;Gl++)Qd["f"+Gl]=111+Gl;function Ul(t,e,r){e&&!("byKey"in e)&&(r=e,e=null),Array.isArray(t)||(t=[t]);var n=t.map(function(o){return Ab(o,e)}),i=function(s){return n.some(function(u){return Tb(u,s)})},a=r==null?i:i(r);return a}function sR(t,e){return Ul(t,e)}function uR(t,e){return Ul(t,{byKey:!0},e)}function Ab(t,e){var r=e&&e.byKey,n={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in Jd)n[Jd[o]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(s=(c=f.next()).done);s=!0){var h=c.value,d=h.endsWith("?")&&h.length>1;d&&(h=h.slice(0,-1));var v=ev(h),g=Jd[v];if(h.length>1&&!g&&!Eb[h]&&!Qd[v])throw new TypeError('Unknown modifier: "'+h+'"');(a===1||!g)&&(r?n.key=v:n.which=Ob(h)),g&&(n[g]=d?null:!0)}}catch(p){u=!0,l=p}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return n}function Tb(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 Ob(t){t=ev(t);var e=Qd[t]||t.toUpperCase().charCodeAt(0);return e}function ev(t){return t=t.toLowerCase(),t=Eb[t]||t,t}Un.default=Ul;var tv=Un.isHotkey=Ul;Un.isCodeHotkey=sR,Un.isKeyHotkey=uR,Un.parseHotkey=Ab,Un.compareHotkey=Tb,Un.toKeyCode=Ob,Un.toKeyName=ev;function lR(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function co(t,e){if(t==null)return{};var r=lR(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ns(t){"@babel/helpers - typeof";return Ns=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},Ns(t)}function fR(t,e){if(Ns(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ns(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cR(t){var e=fR(t,"string");return Ns(e)==="symbol"?e:String(e)}function Rr(t,e,r){return e=cR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var rv=z.createContext(null),di=()=>{var t=z.useContext(rv);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},nv,iv,Pb=parseInt(z.version.split(".")[0],10),Bb=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Mb=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Qt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),ho=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),aa=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),hR=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Fb=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),dR=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),vR=Qt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),pR=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),gR=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),mR=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ql=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((nv=navigator.userAgent.match(/Version\/(\d+)/))!==null&&nv!==void 0&&nv[1]&&parseInt((iv=navigator.userAgent.match(/Version\/(\d+)/))===null||iv===void 0?void 0:iv[1],10)<17);var vi=(!dR||!vR)&&!hR&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",vo=new WeakMap,av=new WeakMap,ov=new WeakMap,Lb=new WeakMap,Yl=new WeakMap,sv=new WeakMap,ks=new WeakMap,oa=new WeakMap,Xl=new WeakMap,Kl=new WeakMap,uv=new WeakMap,pi=new WeakMap,sa=new WeakMap,zs=new WeakMap,lv=new WeakMap,fv=new WeakMap,rn=new WeakMap,qn=new WeakMap,cr=new WeakMap,gi=new WeakMap,mi=new WeakMap,Rb=new WeakMap,po=Symbol("placeholder"),Ib=Symbol("mark-placeholder"),Nb=globalThis.Node,yR=globalThis.Text,cv=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,bR=t=>yi(t)&&t.nodeType===8,Ir=t=>yi(t)&&t.nodeType===1,yi=t=>{var e=cv(t);return!!e&&t instanceof e.Node},hv=t=>{var e=t&&t.anchorNode&&cv(t.anchorNode);return!!e&&t instanceof e.Selection},kb=t=>yi(t)&&t.nodeType===3,CR=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,wR=t=>{var[e,r]=t;if(Ir(e)&&e.childNodes.length){var n=r===e.childNodes.length,i=n?r-1:r;for([e,i]=zb(e,i,n?"backward":"forward"),n=i<r;Ir(e)&&e.childNodes.length;){var a=n?e.childNodes.length-1:0;e=_R(e,a,n?"backward":"forward")}r=n&&e.textContent!=null?e.textContent.length:0}return[e,r]},DR=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},zb=(t,e,r)=>{for(var{childNodes:n}=t,i=n[e],a=e,o=!1,s=!1;(bR(i)||Ir(i)&&i.childNodes.length===0||Ir(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=n.length){o=!0,a=e-1,r="backward";continue}if(a<0){s=!0,a=e+1,r="forward";continue}i=n[a],e=a,a+=r==="forward"?1:-1}return[i,e]},_R=(t,e,r)=>{var[n]=zb(t,e,r);return n},jb=t=>{var e="";if(kb(t)&&t.nodeValue)return t.nodeValue;if(Ir(t)){for(var r of Array.from(t.childNodes))e+=jb(r);var n=getComputedStyle(t).getPropertyValue("display");(n==="block"||n==="list"||t.tagName==="BR")&&(e+=`
57
+ `)}return e},xR=/data-slate-fragment="(.+?)"/m,SR=t=>{var e=t.getData("text/html"),[,r]=e.match(xR)||[];return r},js=t=>t.getSelection!=null?t.getSelection():document.getSelection(),dv=(t,e,r)=>{var{target:n}=e;if(Ir(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:i}=re.getWindow(t);if(i.contains(n))return re.hasDOMNode(t,n,{editable:!0});var a=r.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var l of s)if(l===n||l.contains(n))return!0;for(var f of u)if(f===n||f.contains(n))return!0});return!a||a===e?!1:dv(t,a,r)},ER=()=>{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},Vb=(t,e)=>!!(t.compareDocumentPosition(e)&Nb.DOCUMENT_POSITION_PRECEDING),AR=(t,e)=>!!(t.compareDocumentPosition(e)&Nb.DOCUMENT_POSITION_FOLLOWING),TR=0;class OR{constructor(){Rr(this,"id",void 0),this.id="".concat(TR++)}}var re={androidPendingDiffs:t=>cr.get(t),androidScheduleFlush:t=>{var e;(e=fv.get(t))===null||e===void 0||e()},blur:t=>{var e=re.toDOMNode(t,t),r=re.findDocumentOrShadowRoot(t);pi.set(t,!1),r.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,r=re.findDocumentOrShadowRoot(t),n=js(r);n&&n.rangeCount>0&&n.removeAllRanges(),e&&ie.deselect(t)},findDocumentOrShadowRoot:t=>{var e=re.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 a=re.toSlateNode(t,e.target),o=re.findPath(t,a);if(de.isElement(a)&&A.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?r-s.left<s.left+s.width-r:n-s.top<s.top+s.height-n,l=A.point(t,o,{edge:u?"start":"end"}),f=u?A.before(t,l):A.after(t,l);if(f){var c=A.range(t,f);return c}}var h,{document:d}=re.getWindow(t);if(d.caretRangeFromPoint)h=d.caretRangeFromPoint(r,n);else{var v=d.caretPositionFromPoint(r,n);v&&(h=d.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=re.toSlateRange(t,h,{exactMatch:!1,suppressThrow:!1});return g},findKey:(t,e)=>{var r=Xl.get(e);return r||(r=new OR,Xl.set(e,r)),r},findPath:(t,e)=>{for(var r=[],n=e;;){var i=ov.get(n);if(i==null){if(A.isEditor(n))return r;break}var a=av.get(n);if(a==null)break;r.unshift(a),n=i}throw new Error("Unable to find the path for Slate node: ".concat(Ft.stringify(e)))},focus:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!pi.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(()=>{re.focus(e,{retries:r.retries-1})},10);return}var n=re.toDOMNode(e,e),i=re.findDocumentOrShadowRoot(e);if(i.activeElement!==n){if(e.selection&&i instanceof Document){var a=js(i),o=re.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ie.select(e,A.start(e,[])),pi.set(e,!0),n.focus({preventScroll:!0})}}},getWindow:t=>{var e=Lb.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,a=re.toDOMNode(e,e),o;try{o=Ir(r)?r:r.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>yi(e)&&re.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:r,focus:n}=e;return A.hasPath(t,r.path)&&A.hasPath(t,n.path)},hasSelectableTarget:(t,e)=>re.hasEditableTarget(t,e)||re.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>yi(e)&&re.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!sa.get(t),isFocused:t=>!!pi.get(t),isReadOnly:t=>!!uv.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(uv.get(t))return!1;var r=re.hasTarget(t,e)&&re.toSlateNode(t,e);return de.isElement(r)&&A.isVoid(t,r)},setFragmentData:(t,e,r)=>t.setFragmentData(e,r),toDOMNode:(t,e)=>{var r=Kl.get(t),n=A.isEditor(e)?Yl.get(t):r==null?void 0:r.get(re.findKey(t,e));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Ft.stringify(e)));return n},toDOMPoint:(t,e)=>{var[r]=A.node(t,e.path),n=re.toDOMNode(t,r),i;A.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(n.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var l=o[u],f=l.childNodes[0];if(!(f==null||f.textContent==null)){var{length:c}=f.textContent,h=l.getAttribute("data-slate-length"),d=h==null?c:parseInt(h,10),v=s+d,g=o[u+1];if(e.offset===v&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var p,m=g.childNodes[0];i=[m instanceof yR?m:g,(p=g.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(e.offset<=v){var y=Math.min(c,Math.max(0,e.offset-s));i=[f,y];break}s=v}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Ft.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:r,focus:n}=e,i=te.isBackward(e),a=re.toDOMPoint(t,r),o=te.isCollapsed(e)?a:re.toDOMPoint(t,n),s=re.getWindow(t),u=s.document.createRange(),[l,f]=i?o:a,[c,h]=i?a:o,d=Ir(l)?l:l.parentElement,v=!!d.getAttribute("data-slate-zero-width"),g=Ir(c)?c:c.parentElement,p=!!g.getAttribute("data-slate-zero-width");return u.setStart(l,v?1:f),u.setEnd(c,p?1:h),u},toSlateNode:(t,e)=>{var r=Ir(e)?e:e.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?ks.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:a="backward"}=r,[o,s]=n?e:wR(e),u=o.parentNode,l=null,f=0;if(u){var c,h,d=re.toDOMNode(t,t),v=u.closest('[data-slate-void="true"]'),g=v&&d.contains(v)?v:null,p=u.closest('[contenteditable="false"]'),m=p&&d.contains(p)?p:null,y=u.closest("[data-slate-leaf]"),b=null;if(y){if(l=y.closest('[data-slate-node="text"]'),l){var C=re.getWindow(t),w=C.document.createRange();w.setStart(l,0),w.setEnd(o,s);var D=w.cloneContents(),_=[...Array.prototype.slice.call(D.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(D.querySelectorAll("[contenteditable=false]"))];_.forEach(J=>{if(Qt&&!n&&J.hasAttribute("data-slate-zero-width")&&J.textContent.length>0&&J.textContext!=="\uFEFF"){J.textContent.startsWith("\uFEFF")&&(J.textContent=J.textContent.slice(1));return}J.parentNode.removeChild(J)}),f=D.textContent.length,b=l}}else if(g){for(var x=g.querySelectorAll("[data-slate-leaf]"),S=0;S<x.length;S++){var O=x[S];if(re.hasDOMNode(t,O)){y=O;break}}y?(l=y.closest('[data-slate-node="text"]'),b=y,f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(J=>{f-=J.textContent.length})):f=1}else if(m){var E=J=>J?J.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=m.closest('[data-slate-node="element"]');if(a==="forward"){var F,M=[...E(P),...E(P==null?void 0:P.nextElementSibling)];y=(F=M.find(J=>AR(m,J)))!==null&&F!==void 0?F:null}else{var B,R=[...E(P==null?void 0:P.previousElementSibling),...E(P)];y=(B=R.findLast(J=>Vb(m,J)))!==null&&B!==void 0?B:null}y&&(l=y.closest('[data-slate-node="text"]'),b=y,a==="forward"?f=0:(f=b.textContent.length,b.querySelectorAll("[data-slate-zero-width]").forEach(J=>{f-=J.textContent.length})))}b&&f===b.textContent.length&&Qt&&b.getAttribute("data-slate-zero-width")==="z"&&(c=b.textContent)!==null&&c!==void 0&&c.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||ho&&(h=b.textContent)!==null&&h!==void 0&&h.endsWith(`
58
+
59
+ `))&&f--}if(Qt&&!l&&!n){var V=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(V&&re.hasDOMNode(t,V,{editable:!0})){var k=re.toSlateNode(t,V),{path:W,offset:I}=A.start(t,re.findPath(t,k));return V.querySelector("[data-slate-leaf]")||(I=s),{path:W,offset:I}}}if(!l){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var q=re.toSlateNode(t,l),Z=re.findPath(t,q);return{path:Z,offset:f}},toSlateRange:(t,e,r)=>{var n,{exactMatch:i,suppressThrow:a}=r,o=hv(e)?e.anchorNode:e.startContainer,s,u,l,f,c;if(o)if(hv(e)){if(ho&&e.rangeCount>1){l=e.focusNode;var h=e.getRangeAt(0),d=e.getRangeAt(e.rangeCount-1);if(l instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement){let D=function(_){return _.childElementCount>0?D(_.children[0]):_};var v=h.startContainer,g=d.startContainer,p=D(v.children[h.startOffset]),m=D(g.children[d.startOffset]);f=0,m.childNodes.length>0?s=m.childNodes[0]:s=m,p.childNodes.length>0?l=p.childNodes[0]:l=p,m instanceof HTMLElement?u=m.innerHTML.length:u=0}else h.startContainer===l?(s=d.endContainer,u=d.endOffset,f=h.startOffset):(s=h.startContainer,u=h.endOffset,f=d.startOffset)}else s=e.anchorNode,u=e.anchorOffset,l=e.focusNode,f=e.focusOffset;Fb&&DR(s)||ho?c=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:c=e.isCollapsed}else s=e.startContainer,u=e.startOffset,l=e.endContainer,f=e.endOffset,c=e.collapsed;if(s==null||l==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));ho&&(n=l.textContent)!==null&&n!==void 0&&n.endsWith(`
60
+
61
+ `)&&f===l.textContent.length&&f--;var y=re.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!y)return null;var b=Vb(s,l)||s===l&&f<u,C=c?y:re.toSlatePoint(t,[l,f],{exactMatch:i,suppressThrow:a,searchDirection:b?"forward":"backward"});if(!C)return null;var w={anchor:y,focus:C};return te.isExpanded(w)&&te.isForward(w)&&Ir(l)&&A.void(t,{at:w.focus,mode:"highest"})&&(w=A.unhangRange(t,w,{voids:!0})),w}};function PR(t,e){var{path:r,diff:n}=e;if(!A.hasPath(t,r))return!1;var i=ue.get(t,r);if(!ve.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 a=$.next(r);if(!A.hasPath(t,a))return!1;var o=ue.get(t,a);return ve.isText(o)&&o.text.startsWith(n.text)}function Hb(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,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function BR(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 MR(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 Wb(t,e){var{start:r,end:n,text:i}=e,a=t.slice(r,n),o=BR(a,i),s=Math.min(a.length-o,i.length-o),u=MR(a,i,s),l={start:r+o,end:n-u,text:i.slice(o,i.length-u)};return l.start===l.end&&l.text.length===0?null:l}function FR(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),a=Hb(t,e,r),o=Math.max(r.start+r.text.length,e.start+e.text.length+(e.start+e.text.length>r.start?r.text.length:0)-i),s=a.slice(n,o),u=Math.max(e.end,r.end-e.text.length+(e.end-e.start));return Wb(t,{start:n,end:u,text:s})}function LR(t){var{path:e,diff:r}=t;return{anchor:{path:e,offset:r.start},focus:{path:e,offset:r.end}}}function vv(t,e){var{path:r,offset:n}=e;if(!A.hasPath(t,r))return null;var i=ue.get(t,r);if(!ve.isText(i))return null;var a=A.above(t,{match:s=>de.isElement(s)&&A.isBlock(t,s),at:r});if(!a)return null;for(;n>i.text.length;){var o=A.next(t,{at:r,match:ve.isText});if(!o||!$.isDescendant(o[1],a[1]))return null;n-=i.text.length,i=o[0],r=o[1]}return{path:r,offset:n}}function $b(t,e){var r=vv(t,e.anchor);if(!r)return null;if(te.isCollapsed(e))return{anchor:r,focus:r};var n=vv(t,e.focus);return n?{anchor:r,focus:n}:null}function pv(t,e,r){var n=cr.get(t),i=n==null?void 0:n.find(f=>{var{path:c}=f;return $.equals(c,e.path)});if(!i||e.offset<=i.diff.start)return Ie.transform(e,r,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=Ie.transform(o,r,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},l=Ie.transform(u,r,{affinity:"backward"});return l?r.type==="split_node"&&$.equals(r.path,e.path)&&u.offset<r.position&&a.start<r.position?l:{path:l.path,offset:l.offset+a.text.length-a.end+a.start}:null}function Gb(t,e,r){var n=pv(t,e.anchor,r);if(!n)return null;if(te.isCollapsed(e))return{anchor:n,focus:n};var i=pv(t,e.focus,r);return i?{anchor:n,focus:i}:null}function RR(t,e){var{path:r,diff:n,id:i}=t;switch(e.type){case"insert_text":return!$.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!$.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!$.equals(e.path,r)||e.position>=n.end?{diff:n,id:i,path:$.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:$.transform(r,e,{affinity:"forward"})};case"merge_node":return $.equals(e.path,r)?{diff:{start:n.start+e.position,end:n.end+e.position,text:n.text},id:i,path:$.transform(r,e)}:{diff:n,id:i,path:$.transform(r,e)}}var a=$.transform(r,e);return a?{diff:n,path:a,id:i}:null}function Ub(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 Zl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ub(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var IR=25,NR=200,kR=function(){},zR=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function jR(t){var{editor:e,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=t,i=!1,a=null,o=null,s=null,u=0,l=!1,f=()=>{var P=mi.get(e);if(mi.delete(e),P){var{selection:F}=e,M=$b(e,P);M&&(!F||!te.equals(M,F))&&ie.select(e,M)}},c=()=>{var P=gi.get(e);if(gi.delete(e),!!P){if(P.at){var F=Ie.isPoint(P.at)?vv(e,P.at):$b(e,P.at);if(!F)return;var M=A.range(e,F);(!e.selection||!te.equals(e.selection,M))&&ie.select(e,F)}P.run()}},h=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!C()&&!b()){f();return}i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var P=e.selection&&A.rangeRef(e,e.selection,{affinity:"forward"});qn.set(e,e.marks),kR("flush",gi.get(e),cr.get(e));for(var F=C(),M;M=(B=cr.get(e))===null||B===void 0?void 0:B[0];){var B,R,V=rn.get(e);V!==void 0&&(rn.delete(e),e.marks=V),V&&l===!1&&(l=null);var k=LR(M);(!e.selection||!te.equals(e.selection,k))&&ie.select(e,k),M.diff.text?A.insertText(e,M.diff.text):A.deleteFragment(e),cr.set(e,(R=cr.get(e))===null||R===void 0?void 0:R.filter(q=>{var{id:Z}=q;return Z!==M.id})),PR(e,M)||(F=!1,gi.delete(e),qn.delete(e),i="action",mi.delete(e),r.cancel(),n.cancel(),P==null||P.unref())}var W=P==null?void 0:P.unref();if(W&&!mi.get(e)&&(!e.selection||!te.equals(W,e.selection))&&ie.select(e,W),b()){c();return}F&&r(),r.flush(),n.flush(),f();var I=qn.get(e);qn.delete(e),I!==void 0&&(e.marks=I,e.onChange())},d=P=>{a&&clearTimeout(a),a=setTimeout(()=>{sa.set(e,!1),h()},IR)},v=P=>{sa.set(e,!0),a&&(clearTimeout(a),a=null)},g=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,M=sv.get(e);if(M){if(C()||F){M.style.display="none";return}M.style.removeProperty("display")}},p=(P,F)=>{var M,B=(M=cr.get(e))!==null&&M!==void 0?M:[];cr.set(e,B);var R=ue.leaf(e,P),V=B.findIndex(I=>$.equals(I.path,P));if(V<0){var k=Wb(R.text,F);k&&B.push({path:P,diff:F,id:u++}),g();return}var W=FR(R.text,B[V].diff,F);if(!W){B.splice(V,1),g();return}B[V]=Zl(Zl({},B[V]),{},{diff:W})},m=function(F){var{at:M}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l=!1,mi.delete(e),r.cancel(),n.cancel(),b()&&h(),gi.set(e,{at:M,run:F}),s=setTimeout(h)},y=P=>{var F;if(o&&(clearTimeout(o),o=null),!vo.get(e)){var{inputType:M}=P,B=null,R=P.dataTransfer||P.data||void 0;l!==!1&&M!=="insertText"&&M!=="insertCompositionText"&&(l=!1);var[V]=P.getTargetRanges();V&&(B=re.toSlateRange(e,V,{exactMatch:!1,suppressThrow:!0}));var k=re.getWindow(e),W=k.getSelection();if(!B&&W&&(V=W,B=re.toSlateRange(e,W,{exactMatch:!1,suppressThrow:!0})),B=(F=B)!==null&&F!==void 0?F:e.selection,!!B){var I=!0;if(M.startsWith("delete")){if(te.isExpanded(B)){var[q,Z]=te.edges(B),J=ue.leaf(e,q.path);if(J.text.length===q.offset&&Z.offset===0){var ne=A.next(e,{at:q.path,match:ve.isText});ne&&$.equals(ne[1],Z.path)&&(B={anchor:Z,focus:Z})}}var G=M.endsWith("Backward")?"backward":"forward",[L,Y]=te.edges(B),[j,U]=A.leaf(e,L.path),Q={text:"",start:L.offset,end:Y.offset},K=cr.get(e),X=K==null?void 0:K.find(Kt=>$.equals(Kt.path,U)),le=X?[X.diff,Q]:[Q],se=Hb(j.text,...le);if(se.length===0&&(I=!1),te.isExpanded(B)){if(I&&$.equals(B.anchor.path,B.focus.path)){var ye={path:B.anchor.path,offset:L.offset},pe=A.range(e,ye,ye);return _(pe),p(B.anchor.path,{text:"",end:Y.offset,start:L.offset})}return m(()=>A.deleteFragment(e,{direction:G}),{at:B})}}switch(M){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return m(()=>A.deleteFragment(e),{at:B});case"deleteContent":case"deleteContentForward":{var{anchor:Le}=B;if(I&&te.isCollapsed(B)){var be=ue.leaf(e,Le.path);if(Le.offset<be.text.length)return p(Le.path,{text:"",start:Le.offset,end:Le.offset+1})}return m(()=>A.deleteForward(e),{at:B})}case"deleteContentBackward":{var De,{anchor:it}=B,St=hv(V)?V.isCollapsed:!!((De=V)!==null&&De!==void 0&&De.collapsed);return I&&St&&te.isCollapsed(B)&&it.offset>0?p(it.path,{text:"",start:it.offset-1,end:it.offset}):m(()=>A.deleteBackward(e),{at:B})}case"deleteEntireSoftLine":return m(()=>{A.deleteBackward(e,{unit:"line"}),A.deleteForward(e,{unit:"line"})},{at:B});case"deleteHardLineBackward":return m(()=>A.deleteBackward(e,{unit:"block"}),{at:B});case"deleteSoftLineBackward":return m(()=>A.deleteBackward(e,{unit:"line"}),{at:B});case"deleteHardLineForward":return m(()=>A.deleteForward(e,{unit:"block"}),{at:B});case"deleteSoftLineForward":return m(()=>A.deleteForward(e,{unit:"line"}),{at:B});case"deleteWordBackward":return m(()=>A.deleteBackward(e,{unit:"word"}),{at:B});case"deleteWordForward":return m(()=>A.deleteForward(e,{unit:"word"}),{at:B});case"insertLineBreak":return m(()=>A.insertSoftBreak(e),{at:B});case"insertParagraph":return m(()=>A.insertBreak(e),{at:B});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(zR(R))return m(()=>re.insertData(e,R),{at:B});var Ve=R??"";if(rn.get(e)&&(Ve=Ve.replace("\uFEFF","")),M==="insertText"&&/.*\n.*\n$/.test(Ve)&&(Ve=Ve.slice(0,-1)),Ve.includes(`
62
+ `))return m(()=>{var Kt=Ve.split(`
63
+ `);Kt.forEach((Lr,Vn)=>{Lr&&A.insertText(e,Lr),Vn!==Kt.length-1&&A.insertSoftBreak(e)})},{at:B});if($.equals(B.anchor.path,B.focus.path)){var[lt,Mr]=te.edges(B),Qe={start:lt.offset,end:Mr.offset,text:Ve};if(Ve&&l&&M==="insertCompositionText"){var ft=l.start+l.text.search(/\S|$/),Fr=Qe.start+Qe.text.search(/\S|$/);Fr===ft+1&&Qe.end===l.start+l.text.length?(Qe.start-=1,l=null,O()):l=!1}else M==="insertText"?l===null?l=Qe:l&&te.isCollapsed(B)&&l.end+l.text.length===lt.offset?l=Zl(Zl({},l),{},{text:l.text+Ve}):l=!1:l=!1;if(I){p(lt.path,Qe);return}}return m(()=>A.insertText(e,Ve),{at:B})}}}}},b=()=>!!gi.get(e),C=()=>{var P;return!!((P=cr.get(e))!==null&&P!==void 0&&P.length)},w=()=>b()||C(),D=()=>i,_=P=>{mi.set(e,P),o&&(clearTimeout(o),o=null);var{selection:F}=e;if(P){var M=!F||!$.equals(F.anchor.path,P.anchor.path),B=!F||!$.equals(F.anchor.path.slice(0,-1),P.anchor.path.slice(0,-1));(M&&l||B)&&(l=!1),(M||C())&&(o=setTimeout(h,NR))}},x=()=>{(b()||!C())&&h()},S=P=>{C()||(g(!0),setTimeout(g))},O=()=>{b()||(s=setTimeout(h))},E=P=>{if(!(C()||b())&&P.some(M=>dv(e,M,P))){var F;(F=Rb.get(e))===null||F===void 0||F()}};return{flush:h,scheduleFlush:O,hasPendingDiffs:C,hasPendingAction:b,hasPendingChanges:w,isFlushing:D,handleUserSelect:_,handleCompositionEnd:d,handleCompositionStart:v,handleDOMBeforeInput:y,handleKeyDown:S,handleDomMutations:E,handleInput:x}}function VR(){var t=z.useRef(!1);return z.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var Vs=ql?z.useLayoutEffect:z.useEffect;function HR(t,e,r){var[n]=z.useState(()=>new MutationObserver(e));Vs(()=>{n.takeRecords()}),z.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 WR=["node"];function qb(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?qb(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var GR={subtree:!0,childList:!0,characterData:!0},UR=Qt?t=>{var{node:e}=t,r=co(t,WR);if(!Qt)return null;var n=di(),i=VR(),[a]=z.useState(()=>jR($R({editor:n},r)));return HR(e,a.handleDomMutations,GR),fv.set(n,a.scheduleFlush),i&&a.flush(),a}:()=>null,qR=["anchor","focus"],YR=["anchor","focus"],XR=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>e.hasOwnProperty(r)&&t[r]===e[r]),Yb=(t,e)=>{var r=co(t,qR),n=co(e,YR);return t[po]===e[po]&&XR(r,n)},KR=(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(!te.equals(n,i)||!Yb(n,i))return!1}return!0},ZR=(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||!Yb(n,i))return!1}return!0};function Xb(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?Xb(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var QR=t=>{var{isLast:e,leaf:r,parent:n,text:i}=t,a=di(),o=re.findPath(a,i),s=$.parent(o),u=!!r[Ib];return a.isVoid(n)?z.createElement(gv,{length:ue.string(n).length}):r.text===""&&n.children[n.children.length-1]===i&&!a.isInline(n)&&A.string(a,s)===""?z.createElement(gv,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?z.createElement(gv,{isMarkPlaceholder:u}):e&&r.text.slice(-1)===`
64
+ `?z.createElement(Kb,{isTrailing:!0,text:r.text}):z.createElement(Kb,{text:r.text})},Kb=t=>{var{text:e,isTrailing:r=!1}=t,n=z.useRef(null),i=()=>"".concat(e??"").concat(r?`
65
+ `:""),[a]=z.useState(i);return Vs(()=>{var o=i();n.current&&n.current.textContent!==o&&(n.current.textContent=o)}),z.createElement(eI,{ref:n},a)},eI=z.memo(z.forwardRef((t,e)=>z.createElement("span",{"data-slate-string":!0,ref:e},t.children))),gv=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),z.createElement("span",JR({},i),!(Qt||Bb)||!r?"\uFEFF":null,r?z.createElement("br",null):null)};function Zb(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 Jb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zb(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var tI=Qt?300:0;function rI(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function Qb(t){t.current&&(clearTimeout(t.current),t.current=null)}var nI=t=>{var{leaf:e,isLast:r,text:n,parent:i,renderPlaceholder:a,renderLeaf:o=y=>z.createElement(aI,Jb({},y))}=t,s=di(),u=z.useRef(null),l=z.useRef(null),[f,c]=z.useState(!1),h=z.useRef(null),d=z.useCallback(y=>{if(rI(u,y==null),y==null){var b;sv.delete(s),(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,null)}else{if(sv.set(s,y),!u.current){var C=window.ResizeObserver||aR;u.current=new C(()=>{var w;(w=e.onPlaceholderResize)===null||w===void 0||w.call(e,y)})}u.current.observe(y),l.current=y}},[l,e,s]),v=z.createElement(QR,{isLast:r,leaf:e,parent:i,text:n}),g=!!e[po];if(z.useEffect(()=>(g?h.current||(h.current=setTimeout(()=>{c(!0),h.current=null},tI)):(Qb(h),c(!1)),()=>Qb(h)),[g,c]),g&&f){var p={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:aa?"inherit":void 0},contentEditable:!1,ref:d}};v=z.createElement(z.Fragment,null,a(p),v)}var m={"data-slate-leaf":!0};return o({attributes:m,children:v,leaf:e,text:n})},iI=z.memo(nI,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ve.equals(e.leaf,t.leaf)&&e.leaf[po]===t.leaf[po]),aI=t=>{var{attributes:e,children:r}=t;return z.createElement("span",Jb({},e),r)},oI=t=>{for(var{decorations:e,isLast:r,parent:n,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=di(),u=z.useRef(null),l=ve.decorations(o,e),f=re.findKey(s,o),c=[],h=0;h<l.length;h++){var d=l[h];c.push(z.createElement(iI,{isLast:r&&h===l.length-1,key:"".concat(f.id,"-").concat(h),renderPlaceholder:i,leaf:d,text:o,parent:n,renderLeaf:a}))}var v=z.useCallback(g=>{var p=Kl.get(s);g?(p==null||p.set(f,g),oa.set(o,g),ks.set(g,o)):(p==null||p.delete(f),oa.delete(o),u.current&&ks.delete(u.current)),u.current=g},[u,s,f,o]);return z.createElement("span",{"data-slate-node":"text",ref:v},c)},eC=z.memo(oI,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ZR(e.decorations,t.decorations));function tC(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 mv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var sI=t=>{var{decorations:e,element:r,renderElement:n=y=>z.createElement(lI,mv({},y)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=di(),u=hI(),l=s.isInline(r),f=re.findKey(s,r),c=z.useCallback(y=>{var b=Kl.get(s);y?(b==null||b.set(f,y),oa.set(r,y),ks.set(y,r)):(b==null||b.delete(f),oa.delete(r))},[s,f,r]),h=nC({decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}),d={"data-slate-node":"element",ref:c};if(l&&(d["data-slate-inline"]=!0),!l&&A.hasInlines(s,r)){var v=ue.string(r),g=r1(v);g==="rtl"&&(d.dir=g)}if(A.isVoid(s,r)){d["data-slate-void"]=!0,!u&&l&&(d.contentEditable=!1);var p=l?"span":"div",[[m]]=ue.texts(r);h=z.createElement(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},z.createElement(eC,{renderPlaceholder:i,decorations:[],isLast:!1,parent:r,text:m})),av.set(m,0),ov.set(m,r)}return n({attributes:d,children:h,element:r})},uI=z.memo(sI,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&KR(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&te.equals(t.selection,e.selection))),lI=t=>{var{attributes:e,children:r,element:n}=t,i=di(),a=i.isInline(n)?"span":"div";return z.createElement(a,mv(mv({},e),{},{style:{position:"relative"}}),r)},rC=z.createContext(()=>[]),fI=()=>z.useContext(rC),cI=z.createContext(!1),nC=t=>{var{decorations:e,node:r,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=fI(),u=di();vo.set(u,!1);for(var l=re.findPath(u,r),f=[],c=de.isElement(r)&&!u.isInline(r)&&A.hasInlines(u,r),h=0;h<r.children.length;h++){var d=l.concat(h),v=r.children[h],g=re.findKey(u,v),p=A.range(u,d),m=o&&te.intersection(p,o),y=s([v,d]);for(var b of e){var C=te.intersection(b,p);C&&y.push(C)}de.isElement(v)?f.push(z.createElement(cI.Provider,{key:"provider-".concat(g.id),value:!!m},z.createElement(uI,{decorations:y,element:v,key:g.id,renderElement:n,renderPlaceholder:i,renderLeaf:a,selection:m}))):f.push(z.createElement(eC,{decorations:y,key:g.id,isLast:c&&h===r.children.length-1,parent:r,renderPlaceholder:i,renderLeaf:a,text:v})),av.set(v,h),ov.set(v,r)}return f},iC=z.createContext(!1),hI=()=>z.useContext(iC),aC=z.createContext(null),Jl=()=>{var t=z.useContext(aC);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function dI(){var t=di(),e=z.useRef(!1),r=z.useRef(0),n=z.useCallback(()=>{if(!e.current){e.current=!0;var i=re.getWindow(t);i.cancelAnimationFrame(r.current),r.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return z.useEffect(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:e,onUserInput:n}}var vI=3,pI={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"},gI={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"},mI={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},vt=t=>{var e=pI[t],r=gI[t],n=mI[t],i=e&&tv(e),a=r&&tv(r),o=n&&tv(n);return s=>!!(i&&i(s)||Mb&&a&&a(s)||!Mb&&o&&o(s))},gt={isBold:vt("bold"),isCompose:vt("compose"),isMoveBackward:vt("moveBackward"),isMoveForward:vt("moveForward"),isDeleteBackward:vt("deleteBackward"),isDeleteForward:vt("deleteForward"),isDeleteLineBackward:vt("deleteLineBackward"),isDeleteLineForward:vt("deleteLineForward"),isDeleteWordBackward:vt("deleteWordBackward"),isDeleteWordForward:vt("deleteWordForward"),isExtendBackward:vt("extendBackward"),isExtendForward:vt("extendForward"),isExtendLineBackward:vt("extendLineBackward"),isExtendLineForward:vt("extendLineForward"),isItalic:vt("italic"),isMoveLineBackward:vt("moveLineBackward"),isMoveLineForward:vt("moveLineForward"),isMoveWordBackward:vt("moveWordBackward"),isMoveWordForward:vt("moveWordForward"),isRedo:vt("redo"),isSoftBreak:vt("insertSoftBreak"),isSplitBlock:vt("splitBlock"),isTransposeCharacter:vt("transposeCharacter"),isUndo:vt("undo")},yI=(t,e)=>{var r=[],n=()=>{r=[]},i=o=>{if(e.current){var s=o.filter(u=>dv(t,u,o));r.push(...s)}};function a(){r.length>0&&(r.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),n())}return{registerMutations:i,restoreDOM:a,clear:n}},bI={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class oC extends z.Component{constructor(){super(...arguments),Rr(this,"context",null),Rr(this,"manager",null),Rr(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,bI)}componentDidMount(){var{receivedUserInput:e}=this.props,r=this.context;this.manager=yI(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 a;(a=this.manager)===null||a===void 0||a.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}}Rr(oC,"contextType",rv);var CI=Qt?oC:t=>{var{children:e}=t;return z.createElement(z.Fragment,null,e)},wI=z.createContext(!1),DI=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],_I=["text"];function sC(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 bn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var xI=t=>z.createElement(z.Fragment,null,nC(t)),SI=z.forwardRef((t,e)=>{var r=z.useCallback(L=>z.createElement(EI,bn({},L)),[]),{autoFocus:n,decorate:i=AI,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:l,renderPlaceholder:f=r,scrollSelectionIntoView:c=TI,style:h={},as:d="div",disableDefaultStyles:v=!1}=t,g=co(t,DI),p=Jl(),[m,y]=z.useState(!1),b=z.useRef(null),C=z.useRef([]),[w,D]=z.useState(),_=z.useRef(!1),{onUserInput:x,receivedUserInput:S}=dI(),[,O]=z.useReducer(L=>L+1,0);Rb.set(p,O),uv.set(p,s);var E=z.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);z.useEffect(()=>{b.current&&n&&b.current.focus()},[n]);var P=z.useRef(),F=z.useMemo(()=>n3(()=>{if(vo.get(p)){F();return}var L=re.toDOMNode(p,p),Y=L.getRootNode();if(!_.current&&aa&&Y instanceof ShadowRoot){_.current=!0;var j=ER();j?document.execCommand("indent"):ie.deselect(p),_.current=!1;return}var U=P.current;if((Qt||!re.isComposing(p))&&(!E.isUpdatingSelection||U!=null&&U.isFlushing())&&!E.isDraggingInternally){var Q=re.findDocumentOrShadowRoot(p),{activeElement:K}=Q,X=re.toDOMNode(p,p),le=js(Q);if(K===X?(E.latestElement=K,pi.set(p,!0)):pi.delete(p),!le)return ie.deselect(p);var{anchorNode:se,focusNode:ye}=le,pe=re.hasEditableTarget(p,se)||re.isTargetInsideNonReadonlyVoid(p,se),Le=re.hasTarget(p,ye);if(pe&&Le){var be=re.toSlateRange(p,le,{exactMatch:!1,suppressThrow:!0});be&&(!re.isComposing(p)&&!(U!=null&&U.hasPendingChanges())&&!(U!=null&&U.isFlushing())?ie.select(p,be):U==null||U.handleUserSelect(be))}s&&(!pe||!Le)&&ie.deselect(p)}},100),[p,s,E]),M=z.useMemo(()=>ZM(F,0),[F]);P.current=UR({node:b,onDOMSelectionChange:F,scheduleOnDOMSelectionChange:M}),Vs(()=>{var L,Y,j;b.current&&(j=cv(b.current))?(Lb.set(p,j),Yl.set(p,b.current),oa.set(p,b.current),ks.set(b.current,p)):oa.delete(p);var{selection:U}=p,Q=re.findDocumentOrShadowRoot(p),K=js(Q);if(!(!K||!re.isFocused(p)||(L=P.current)!==null&&L!==void 0&&L.hasPendingAction())){var X=pe=>{var Le=K.type!=="None";if(!(!U&&!Le)){var be=K.focusNode,De;if(ho&&K.rangeCount>1){var it=K.getRangeAt(0),St=K.getRangeAt(K.rangeCount-1);it.startContainer===be?De=St.endContainer:De=it.startContainer}else De=K.anchorNode;var Ve=Yl.get(p),lt=!1;if(Ve.contains(De)&&Ve.contains(be)&&(lt=!0),Le&&lt&&U&&!pe){var Mr=re.toSlateRange(p,K,{exactMatch:!0,suppressThrow:!0});if(Mr&&te.equals(Mr,U)){var Qe;if(!E.hasMarkPlaceholder||(Qe=De)!==null&&Qe!==void 0&&(Qe=Qe.parentElement)!==null&&Qe!==void 0&&Qe.hasAttribute("data-slate-mark-placeholder"))return}}if(U&&!re.hasRange(p,U)){p.selection=re.toSlateRange(p,K,{exactMatch:!1,suppressThrow:!0});return}E.isUpdatingSelection=!0;var ft=U&&re.toDOMRange(p,U);return ft?(re.isComposing(p)&&!Qt?K.collapseToEnd():te.isBackward(U)?K.setBaseAndExtent(ft.endContainer,ft.endOffset,ft.startContainer,ft.startOffset):K.setBaseAndExtent(ft.startContainer,ft.startOffset,ft.endContainer,ft.endOffset),c(p,ft)):K.removeAllRanges(),ft}};K.rangeCount<=1&&X();var le=((Y=P.current)===null||Y===void 0?void 0:Y.isFlushing())==="action";if(!Qt||!le){setTimeout(()=>{E.isUpdatingSelection=!1});return}var se=null,ye=requestAnimationFrame(()=>{if(le){var pe=Le=>{try{var be=re.toDOMNode(p,p);be.focus(),X(Le)}catch{}};pe(),se=setTimeout(()=>{pe(!0),E.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ye),se&&clearTimeout(se)}}});var B=z.useCallback(L=>{var Y=re.toDOMNode(p,p),j=Y.getRootNode();if(_!=null&&_.current&&aa&&j instanceof ShadowRoot){var U=L.getTargetRanges(),Q=U[0],K=new window.Range;K.setStart(Q.startContainer,Q.startOffset),K.setEnd(Q.endContainer,Q.endOffset);var X=re.toSlateRange(p,K,{exactMatch:!1,suppressThrow:!1});ie.select(p,X),L.preventDefault(),L.stopImmediatePropagation();return}if(x(),!s&&re.hasEditableTarget(p,L.target)&&!OI(L,a)){var le;if(P.current)return P.current.handleDOMBeforeInput(L);M.flush(),F.flush();var{selection:se}=p,{inputType:ye}=L,pe=L.dataTransfer||L.data||void 0,Le=ye==="insertCompositionText"||ye==="deleteCompositionText";if(Le&&re.isComposing(p))return;var be=!1;if(ye==="insertText"&&se&&te.isCollapsed(se)&&L.data&&L.data.length===1&&/[a-z ]/i.test(L.data)&&se.anchor.offset!==0&&(be=!0,p.marks&&(be=!1),!vo.get(p))){var De,it,{anchor:St}=se,[Ve,lt]=re.toDOMPoint(p,St),Mr=(De=Ve.parentElement)===null||De===void 0?void 0:De.closest("a"),Qe=re.getWindow(p);if(be&&Mr&&re.hasDOMNode(p,Mr)){var ft,Fr=Qe==null?void 0:Qe.document.createTreeWalker(Mr,NodeFilter.SHOW_TEXT).lastChild();Fr===Ve&&((ft=Fr.textContent)===null||ft===void 0?void 0:ft.length)===lt&&(be=!1)}if(be&&Ve.parentElement&&(Qe==null||(it=Qe.getComputedStyle(Ve.parentElement))===null||it===void 0?void 0:it.whiteSpace)==="pre"){var Kt=A.above(p,{at:St.path,match:$i=>de.isElement($i)&&A.isBlock(p,$i)});Kt&&ue.string(Kt[0]).includes(" ")&&(be=!1)}}if((!ye.startsWith("delete")||ye.startsWith("deleteBy"))&&!vo.get(p)){var[Lr]=L.getTargetRanges();if(Lr){var Vn=re.toSlateRange(p,Lr,{exactMatch:!1,suppressThrow:!1});if(!se||!te.equals(se,Vn)){be=!1;var Cr=!Le&&p.selection&&A.rangeRef(p,p.selection);ie.select(p,Vn),Cr&&zs.set(p,Cr)}}}if(Le)return;if(be||L.preventDefault(),se&&te.isExpanded(se)&&ye.startsWith("delete")){var al=ye.endsWith("Backward")?"backward":"forward";A.deleteFragment(p,{direction:al});return}switch(ye){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{A.deleteFragment(p);break}case"deleteContent":case"deleteContentForward":{A.deleteForward(p);break}case"deleteContentBackward":{A.deleteBackward(p);break}case"deleteEntireSoftLine":{A.deleteBackward(p,{unit:"line"}),A.deleteForward(p,{unit:"line"});break}case"deleteHardLineBackward":{A.deleteBackward(p,{unit:"block"});break}case"deleteSoftLineBackward":{A.deleteBackward(p,{unit:"line"});break}case"deleteHardLineForward":{A.deleteForward(p,{unit:"block"});break}case"deleteSoftLineForward":{A.deleteForward(p,{unit:"line"});break}case"deleteWordBackward":{A.deleteBackward(p,{unit:"word"});break}case"deleteWordForward":{A.deleteForward(p,{unit:"word"});break}case"insertLineBreak":A.insertSoftBreak(p);break;case"insertParagraph":{A.insertBreak(p);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{ye==="insertFromComposition"&&re.isComposing(p)&&(y(!1),sa.set(p,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?re.insertData(p,pe):typeof pe=="string"&&(be?C.current.push(()=>A.insertText(p,pe)):A.insertText(p,pe));break}}var Ja=(le=zs.get(p))===null||le===void 0?void 0:le.unref();zs.delete(p),Ja&&(!p.selection||!te.equals(p.selection,Ja))&&ie.select(p,Ja)}},[p,F,x,a,s,M]),R=z.useCallback(L=>{L==null?(F.cancel(),M.cancel(),Yl.delete(p),oa.delete(p),b.current&&vi&&b.current.removeEventListener("beforeinput",B)):vi&&L.addEventListener("beforeinput",B),b.current=L,typeof e=="function"?e(L):e&&(e.current=L)},[F,M,p,B,e]);Vs(()=>{var L=re.getWindow(p);L.document.addEventListener("selectionchange",M);var Y=()=>{E.isDraggingInternally=!1};return L.document.addEventListener("dragend",Y),L.document.addEventListener("drop",Y),()=>{L.document.removeEventListener("selectionchange",M),L.document.removeEventListener("dragend",Y),L.document.removeEventListener("drop",Y)}},[M,E]);var V=i([p,[]]),k=o&&p.children.length===1&&Array.from(ue.texts(p)).length===1&&ue.string(p)===""&&!m,W=z.useCallback(L=>{if(L&&k){var Y;D((Y=L.getBoundingClientRect())===null||Y===void 0?void 0:Y.height)}else D(void 0)},[k]);if(k){var I=A.start(p,[]);V.push({[po]:!0,placeholder:o,onPlaceholderResize:W,anchor:I,focus:I})}var{marks:q}=p;if(E.hasMarkPlaceholder=!1,p.selection&&te.isCollapsed(p.selection)&&q){var{anchor:Z}=p.selection,J=ue.leaf(p,Z.path),ne=co(J,_I);if(!ve.equals(J,q,{loose:!0})){E.hasMarkPlaceholder=!0;var G=Object.fromEntries(Object.keys(ne).map(L=>[L,null]));V.push(bn(bn(bn({[Ib]:!0},G),q),{},{anchor:Z,focus:Z}))}}return z.useEffect(()=>{setTimeout(()=>{var{selection:L}=p;if(L){var{anchor:Y}=L,j=ue.leaf(p,Y.path);if(q&&!ve.equals(j,q,{loose:!0})){rn.set(p,q);return}}rn.delete(p)})}),z.createElement(iC.Provider,{value:s},z.createElement(wI.Provider,{value:m},z.createElement(rC.Provider,{value:i},z.createElement(CI,{node:b,receivedUserInput:S},z.createElement(d,bn(bn({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},g),{},{spellCheck:vi||!ql?g.spellCheck:!1,autoCorrect:vi||!ql?g.autoCorrect:"false",autoCapitalize:vi||!ql?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:R,style:bn(bn({},v?{}:bn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},w?{minHeight:w}:{})),h),onBeforeInput:z.useCallback(L=>{if(!vi&&!s&&!er(L,g.onBeforeInput)&&re.hasSelectableTarget(p,L.target)&&(L.preventDefault(),!re.isComposing(p))){var Y=L.data;A.insertText(p,Y)}},[g.onBeforeInput,p,s]),onInput:z.useCallback(L=>{if(!er(L,g.onInput)){if(P.current){P.current.handleInput();return}for(var Y of C.current)Y();if(C.current=[],!re.isFocused(p)){var j=L.nativeEvent,U=p;if(j.inputType==="historyUndo"&&typeof U.undo=="function"){U.undo();return}if(j.inputType==="historyRedo"&&typeof U.redo=="function"){U.redo();return}}}},[g.onInput,p]),onBlur:z.useCallback(L=>{if(!(s||E.isUpdatingSelection||!re.hasSelectableTarget(p,L.target)||er(L,g.onBlur))){var Y=re.findDocumentOrShadowRoot(p);if(E.latestElement!==Y.activeElement){var{relatedTarget:j}=L,U=re.toDOMNode(p,p);if(j!==U&&!(Ir(j)&&j.hasAttribute("data-slate-spacer"))){if(j!=null&&yi(j)&&re.hasDOMNode(p,j)){var Q=re.toSlateNode(p,j);if(de.isElement(Q)&&!p.isVoid(Q))return}if(aa){var K=js(Y);K==null||K.removeAllRanges()}pi.delete(p)}}}},[s,E.isUpdatingSelection,E.latestElement,p,g.onBlur]),onClick:z.useCallback(L=>{if(re.hasTarget(p,L.target)&&!er(L,g.onClick)&&yi(L.target)){var Y=re.toSlateNode(p,L.target),j=re.findPath(p,Y);if(!A.hasPath(p,j)||ue.get(p,j)!==Y)return;if(L.detail===vI&&j.length>=1){var U=j;if(!(de.isElement(Y)&&A.isBlock(p,Y))){var Q,K=A.above(p,{match:be=>de.isElement(be)&&A.isBlock(p,be),at:j});U=(Q=K==null?void 0:K[1])!==null&&Q!==void 0?Q:j.slice(0,1)}var X=A.range(p,U);ie.select(p,X);return}if(s)return;var le=A.start(p,j),se=A.end(p,j),ye=A.void(p,{at:le}),pe=A.void(p,{at:se});if(ye&&pe&&$.equals(ye[1],pe[1])){var Le=A.range(p,le);ie.select(p,Le)}}},[p,g.onClick,s]),onCompositionEnd:z.useCallback(L=>{if(re.hasSelectableTarget(p,L.target)){var Y;if(re.isComposing(p)&&Promise.resolve().then(()=>{y(!1),sa.set(p,!1)}),(Y=P.current)===null||Y===void 0||Y.handleCompositionEnd(L),er(L,g.onCompositionEnd)||Qt)return;if(!aa&&!pR&&!Bb&&!mR&&!gR&&L.data){var j=rn.get(p);rn.delete(p),j!==void 0&&(qn.set(p,p.marks),p.marks=j),A.insertText(p,L.data);var U=qn.get(p);qn.delete(p),U!==void 0&&(p.marks=U)}}},[g.onCompositionEnd,p]),onCompositionUpdate:z.useCallback(L=>{re.hasSelectableTarget(p,L.target)&&!er(L,g.onCompositionUpdate)&&(re.isComposing(p)||(y(!0),sa.set(p,!0)))},[g.onCompositionUpdate,p]),onCompositionStart:z.useCallback(L=>{if(re.hasSelectableTarget(p,L.target)){var Y;if((Y=P.current)===null||Y===void 0||Y.handleCompositionStart(L),er(L,g.onCompositionStart)||Qt)return;y(!0);var{selection:j}=p;if(j&&te.isExpanded(j)){A.deleteFragment(p);return}}},[g.onCompositionStart,p]),onCopy:z.useCallback(L=>{re.hasSelectableTarget(p,L.target)&&!er(L,g.onCopy)&&!uC(L)&&(L.preventDefault(),re.setFragmentData(p,L.clipboardData,"copy"))},[g.onCopy,p]),onCut:z.useCallback(L=>{if(!s&&re.hasSelectableTarget(p,L.target)&&!er(L,g.onCut)&&!uC(L)){L.preventDefault(),re.setFragmentData(p,L.clipboardData,"cut");var{selection:Y}=p;if(Y)if(te.isExpanded(Y))A.deleteFragment(p);else{var j=ue.parent(p,Y.anchor.path);A.isVoid(p,j)&&ie.delete(p)}}},[s,p,g.onCut]),onDragOver:z.useCallback(L=>{if(re.hasTarget(p,L.target)&&!er(L,g.onDragOver)){var Y=re.toSlateNode(p,L.target);de.isElement(Y)&&A.isVoid(p,Y)&&L.preventDefault()}},[g.onDragOver,p]),onDragStart:z.useCallback(L=>{if(!s&&re.hasTarget(p,L.target)&&!er(L,g.onDragStart)){var Y=re.toSlateNode(p,L.target),j=re.findPath(p,Y),U=de.isElement(Y)&&A.isVoid(p,Y)||A.void(p,{at:j,voids:!0});if(U){var Q=A.range(p,j);ie.select(p,Q)}E.isDraggingInternally=!0,re.setFragmentData(p,L.dataTransfer,"drag")}},[s,p,g.onDragStart,E]),onDrop:z.useCallback(L=>{if(!s&&re.hasTarget(p,L.target)&&!er(L,g.onDrop)){L.preventDefault();var Y=p.selection,j=re.findEventRange(p,L),U=L.dataTransfer;ie.select(p,j),E.isDraggingInternally&&Y&&!te.equals(Y,j)&&!A.void(p,{at:j,voids:!0})&&ie.delete(p,{at:Y}),re.insertData(p,U),re.isFocused(p)||re.focus(p)}},[s,p,g.onDrop,E]),onDragEnd:z.useCallback(L=>{!s&&E.isDraggingInternally&&g.onDragEnd&&re.hasTarget(p,L.target)&&g.onDragEnd(L)},[s,E,g,p]),onFocus:z.useCallback(L=>{if(!s&&!E.isUpdatingSelection&&re.hasEditableTarget(p,L.target)&&!er(L,g.onFocus)){var Y=re.toDOMNode(p,p),j=re.findDocumentOrShadowRoot(p);if(E.latestElement=j.activeElement,ho&&L.target!==Y){Y.focus();return}pi.set(p,!0)}},[s,E,p,g.onFocus]),onKeyDown:z.useCallback(L=>{if(!s&&re.hasEditableTarget(p,L.target)){var Y;(Y=P.current)===null||Y===void 0||Y.handleKeyDown(L);var{nativeEvent:j}=L;if(re.isComposing(p)&&j.isComposing===!1&&(sa.set(p,!1),y(!1)),er(L,g.onKeyDown)||re.isComposing(p))return;var{selection:U}=p,Q=p.children[U!==null?U.focus.path[0]:0],K=r1(ue.string(Q))==="rtl";if(gt.isRedo(j)){L.preventDefault();var X=p;typeof X.redo=="function"&&X.redo();return}if(gt.isUndo(j)){L.preventDefault();var le=p;typeof le.undo=="function"&&le.undo();return}if(gt.isMoveLineBackward(j)){L.preventDefault(),ie.move(p,{unit:"line",reverse:!0});return}if(gt.isMoveLineForward(j)){L.preventDefault(),ie.move(p,{unit:"line"});return}if(gt.isExtendLineBackward(j)){L.preventDefault(),ie.move(p,{unit:"line",edge:"focus",reverse:!0});return}if(gt.isExtendLineForward(j)){L.preventDefault(),ie.move(p,{unit:"line",edge:"focus"});return}if(gt.isMoveBackward(j)){L.preventDefault(),U&&te.isCollapsed(U)?ie.move(p,{reverse:!K}):ie.collapse(p,{edge:K?"end":"start"});return}if(gt.isMoveForward(j)){L.preventDefault(),U&&te.isCollapsed(U)?ie.move(p,{reverse:K}):ie.collapse(p,{edge:K?"start":"end"});return}if(gt.isMoveWordBackward(j)){L.preventDefault(),U&&te.isExpanded(U)&&ie.collapse(p,{edge:"focus"}),ie.move(p,{unit:"word",reverse:!K});return}if(gt.isMoveWordForward(j)){L.preventDefault(),U&&te.isExpanded(U)&&ie.collapse(p,{edge:"focus"}),ie.move(p,{unit:"word",reverse:K});return}if(vi){if((Fb||aa)&&U&&(gt.isDeleteBackward(j)||gt.isDeleteForward(j))&&te.isCollapsed(U)){var se=ue.parent(p,U.anchor.path);if(de.isElement(se)&&A.isVoid(p,se)&&(A.isInline(p,se)||A.isBlock(p,se))){L.preventDefault(),A.deleteBackward(p,{unit:"block"});return}}}else{if(gt.isBold(j)||gt.isItalic(j)||gt.isTransposeCharacter(j)){L.preventDefault();return}if(gt.isSoftBreak(j)){L.preventDefault(),A.insertSoftBreak(p);return}if(gt.isSplitBlock(j)){L.preventDefault(),A.insertBreak(p);return}if(gt.isDeleteBackward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"backward"}):A.deleteBackward(p);return}if(gt.isDeleteForward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"forward"}):A.deleteForward(p);return}if(gt.isDeleteLineBackward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"backward"}):A.deleteBackward(p,{unit:"line"});return}if(gt.isDeleteLineForward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"forward"}):A.deleteForward(p,{unit:"line"});return}if(gt.isDeleteWordBackward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"backward"}):A.deleteBackward(p,{unit:"word"});return}if(gt.isDeleteWordForward(j)){L.preventDefault(),U&&te.isExpanded(U)?A.deleteFragment(p,{direction:"forward"}):A.deleteForward(p,{unit:"word"});return}}}},[s,p,g.onKeyDown]),onPaste:z.useCallback(L=>{!s&&re.hasEditableTarget(p,L.target)&&!er(L,g.onPaste)&&(!vi||CR(L.nativeEvent)||aa)&&(L.preventDefault(),re.insertData(p,L.clipboardData))},[s,p,g.onPaste])}),z.createElement(xI,{decorations:V,node:p,renderElement:u,renderPlaceholder:f,renderLeaf:l,selection:p.selection}))))))}),EI=t=>{var{attributes:e,children:r}=t;return z.createElement("span",bn({},e),r,Qt&&z.createElement("br",null))},AI=()=>[],TI=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&te.isCollapsed(t.selection))){var r=e.startContainer.parentElement;r.getBoundingClientRect=e.getBoundingClientRect.bind(e),o3(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},er=(t,e)=>{if(!e)return!1;var r=e(t);return r??(t.isDefaultPrevented()||t.isPropagationStopped())},uC=t=>yi(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),OI=(t,e)=>{if(!e)return!1;var r=e(t);return r??t.defaultPrevented},lC=z.createContext(!1),PI=()=>z.useContext(lC),BI=z.createContext({});function MI(t){var e=z.useRef([]).current,r=z.useRef({editor:t}).current,n=z.useCallback(a=>{r.editor=a,e.forEach(o=>o(a))},[e,r]),i=z.useMemo(()=>({getSlate:()=>r.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,r]);return{selectorContext:i,onChange:n}}var FI=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],LI=t=>{var{editor:e,children:r,onChange:n,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=co(t,FI),[u,l]=z.useState(()=>{if(!ue.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Ft.stringify(o)));if(!A.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(Ft.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:c}=MI(e),h=z.useCallback(g=>{var p;switch(n&&n(e.children),g==null||(p=g.operation)===null||p===void 0?void 0:p.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}l(m=>({v:m.v+1,editor:e})),c(e)},[e,c,n,i,a]);z.useEffect(()=>(lv.set(e,h),()=>{lv.set(e,()=>{})}),[e,h]);var[d,v]=z.useState(re.isFocused(e));return z.useEffect(()=>{v(re.isFocused(e))},[e]),Vs(()=>{var g=()=>v(re.isFocused(e));return Pb>=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)})},[]),z.createElement(BI.Provider,{value:f},z.createElement(aC.Provider,{value:u},z.createElement(rv.Provider,{value:u.editor},z.createElement(lC.Provider,{value:d},r))))},fC=(t,e)=>{var r=(e.top+e.bottom)/2;return t.top<=r&&t.bottom>=r},cC=(t,e,r)=>{var n=re.toDOMRange(t,e).getBoundingClientRect(),i=re.toDOMRange(t,r).getBoundingClientRect();return fC(n,i)&&fC(i,n)},RI=(t,e)=>{var r=A.range(t,te.end(e)),n=Array.from(A.positions(t,{at:e})),i=0,a=n.length,o=Math.floor(a/2);if(cC(t,A.range(t,n[i]),r))return A.range(t,n[i],r);if(n.length<2)return A.range(t,n[n.length-1],r);for(;o!==n.length&&o!==i;)cC(t,A.range(t,n[o]),r)?a=o:i=o,o=Math.floor((i+a)/2);return A.range(t,n[a],r)};function hC(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 dC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var II=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",n=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=n;return Kl.set(n,new WeakMap),n.addMark=(l,f)=>{var c,h;(c=fv.get(n))===null||c===void 0||c(),!rn.get(n)&&(h=cr.get(n))!==null&&h!==void 0&&h.length&&rn.set(n,null),qn.delete(n),s(l,f)},n.removeMark=l=>{var f;!rn.get(n)&&(f=cr.get(n))!==null&&f!==void 0&&f.length&&rn.set(n,null),qn.delete(n),u(l)},n.deleteBackward=l=>{if(l!=="line")return o(l);if(n.selection&&te.isCollapsed(n.selection)){var f=A.above(n,{match:v=>de.isElement(v)&&A.isBlock(n,v),at:n.selection});if(f){var[,c]=f,h=A.range(n,c,n.selection.anchor),d=RI(n,h);te.isCollapsed(d)||ie.delete(n,{at:d})}}},n.apply=l=>{var f=[],c=[],h=cr.get(n);if(h!=null&&h.length){var d=h.map(M=>RR(M,l)).filter(Boolean);cr.set(n,d)}var v=mi.get(n);v&&mi.set(n,Gb(n,v,l));var g=gi.get(n);if(g!=null&&g.at){var p=Ie.isPoint(g==null?void 0:g.at)?pv(n,g.at,l):Gb(n,g.at,l);gi.set(n,p?dC(dC({},g),{},{at:p}):null)}switch(l.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...go(n,l.path));break}case"set_selection":{var m;(m=zs.get(n))===null||m===void 0||m.unref(),zs.delete(n);break}case"insert_node":case"remove_node":{f.push(...go(n,$.parent(l.path)));break}case"merge_node":{var y=$.previous(l.path);f.push(...go(n,y));break}case"move_node":{var b=$.common($.parent(l.path),$.parent(l.newPath));f.push(...go(n,b));var C;$.isBefore(l.path,l.newPath)?(f.push(...go(n,$.parent(l.path))),C=l.newPath):(f.push(...go(n,$.parent(l.newPath))),C=l.path);var w=ue.get(e,$.parent(C)),D=re.findKey(n,w),_=A.pathRef(n,$.parent(C));c.push([_,D]);break}}switch(i(l),l.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":vo.set(n,!0)}for(var[x,S]of f){var[O]=A.node(n,x);Xl.set(O,S)}for(var[E,P]of c){if(E.current){var[F]=A.node(n,E.current);Xl.set(F,P)}E.unref()}},n.setFragmentData=l=>{var{selection:f}=n;if(f){var[c,h]=te.edges(f),d=A.void(n,{at:c.path}),v=A.void(n,{at:h.path});if(!(te.isCollapsed(f)&&!d)){var g=re.toDOMRange(n,f),p=g.cloneContents(),m=p.childNodes[0];if(p.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(m=O)}),v){var[y]=v,b=g.cloneRange(),C=re.toDOMNode(n,y);b.setEndAfter(C),p=b.cloneContents()}if(d&&(m=p.querySelector("[data-slate-spacer]")),Array.from(p.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var E=O.getAttribute("data-slate-zero-width")==="n";O.textContent=E?`
66
+ `:""}),kb(m)){var w=m.ownerDocument.createElement("span");w.style.whiteSpace="pre",w.appendChild(m),p.appendChild(w),m=w}var D=n.getFragment(),_=JSON.stringify(D),x=window.btoa(encodeURIComponent(_));m.setAttribute("data-slate-fragment",x),l.setData("application/".concat(r),x);var S=p.ownerDocument.createElement("div");return S.appendChild(p),S.setAttribute("hidden","true"),p.ownerDocument.body.appendChild(S),l.setData("text/html",S.innerHTML),l.setData("text/plain",jb(S)),p.ownerDocument.body.removeChild(S),l}}},n.insertData=l=>{n.insertFragmentData(l)||n.insertTextData(l)},n.insertFragmentData=l=>{var f=l.getData("application/".concat(r))||SR(l);if(f){var c=decodeURIComponent(window.atob(f)),h=JSON.parse(c);return n.insertFragment(h),!0}return!1},n.insertTextData=l=>{var f=l.getData("text/plain");if(f){var c=f.split(/\r\n|\r|\n/),h=!1;for(var d of c)h&&ie.splitNodes(n,{always:!0}),n.insertText(d),h=!0;return!0}return!1},n.onChange=l=>{var f=Pb<18?sl.unstable_batchedUpdates:c=>c();f(()=>{var c=lv.get(n);c&&c(l),a(l)})},n},go=(t,e)=>{var r=[];for(var[n,i]of A.levels(t,{at:e})){var a=re.findKey(t,n);r.push([i,a])}return r},NI={isHistory(t){return It(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||hi.isOperationList(t.redos[0].operations))&&(t.undos.length===0||hi.isOperationList(t.undos[0].operations))}},yv=new WeakMap,Hs=new WeakMap,ua={isHistoryEditor(t){return NI.isHistory(t.history)&&A.isEditor(t)},isMerging(t){return Hs.get(t)},isSaving(t){return yv.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var r=ua.isMerging(t);Hs.set(t,!0),e(),Hs.set(t,r)},withoutMerging(t,e){var r=ua.isMerging(t);Hs.set(t,!1),e(),Hs.set(t,r)},withoutSaving(t,e){var r=ua.isSaving(t);yv.set(t,!1),e(),yv.set(t,r)}},kI=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 a=i[i.length-1];a.selectionBefore&&ie.setSelection(e,a.selectionBefore),ua.withoutSaving(e,()=>{A.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),n.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:n}=e,{undos:i}=n;if(i.length>0){var a=i[i.length-1];ua.withoutSaving(e,()=>{A.withoutNormalizing(e,()=>{var o=a.operations.map(hi.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ie.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),n.undos.pop()}},e.apply=n=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],l=ua.isSaving(e),f=ua.isMerging(e);if(l==null&&(l=jI(n)),l){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=zI(n,u)),s&&f)s.operations.push(n);else{var c={operations:[n],selectionBefore:e.selection};e.writeHistory("undos",c)}for(;o.length>100;)o.shift();a.redos=[]}r(n)},e.writeHistory=(n,i)=>{e.history[n].push(i)},e},zI=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&$.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&$.equals(t.path,e.path)),jI=(t,e)=>t.type!=="set_selection",vC=z.createContext({});function Nt(){return Nt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Nt.apply(null,arguments)}function VI(t){if(Array.isArray(t))return t}function HI(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function pC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function WI(t,e){if(t){if(typeof t=="string")return pC(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pC(t,e):void 0}}function $I(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gC(t,e){return VI(t)||HI(t,e)||WI(t,e)||$I()}function la(t){"@babel/helpers - typeof";return la=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},la(t)}function GI(t,e){if(la(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(la(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UI(t){var e=GI(t,"string");return la(e)=="symbol"?e:e+""}function bv(t,e,r){return(e=UI(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qI(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 mC(t,e){if(t==null)return{};var r,n,i=qI(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.includes(r)||{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var yC={exports:{}};/*!
68
+ Copyright (c) 2018 Jed Watson.
69
+ Licensed under the MIT License (MIT), see
70
+ http://jedwatson.github.io/classnames
71
+ */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var a="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(a=i(a,n(s)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var o="";for(var s in a)e.call(a,s)&&a[s]&&(o=i(o,s));return o}function i(a,o){return o?a?a+" "+o:a+o:a}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(yC);var YI=yC.exports;const XI=eo(YI);function Nr(t,e){KI(t)&&(t="100%");var r=ZI(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function KI(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function ZI(t){return typeof t=="string"&&t.indexOf("%")!==-1}function JI(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ql(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Cv(t){return t.length===1?"0"+t:String(t)}function QI(t,e,r){return{r:Nr(t,255)*255,g:Nr(e,255)*255,b:Nr(r,255)*255}}function wv(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function e5(t,e,r){var n,i,a;if(t=Nr(t,360),e=Nr(e,100),r=Nr(r,100),e===0)i=r,a=r,n=r;else{var o=r<.5?r*(1+e):r+e-r*e,s=2*r-o;n=wv(s,o,t+1/3),i=wv(s,o,t),a=wv(s,o,t-1/3)}return{r:n*255,g:i*255,b:a*255}}function t5(t,e,r){t=Nr(t,255),e=Nr(e,255),r=Nr(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),a=0,o=n,s=n-i,u=n===0?0:s/n;if(n===i)a=0;else{switch(n){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4;break}a/=6}return{h:a,s:u,v:o}}function r5(t,e,r){t=Nr(t,360)*6,e=Nr(e,100),r=Nr(r,100);var n=Math.floor(t),i=t-n,a=r*(1-e),o=r*(1-i*e),s=r*(1-(1-i)*e),u=n%6,l=[r,o,a,a,s,r][u],f=[s,r,r,o,a,a][u],c=[a,a,s,r,r,o][u];return{r:l*255,g:f*255,b:c*255}}function n5(t,e,r,n){var i=[Cv(Math.round(t).toString(16)),Cv(Math.round(e).toString(16)),Cv(Math.round(r).toString(16))];return i.join("")}function bC(t){return Er(t)/255}function Er(t){return parseInt(t,16)}var CC={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ws(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return typeof t=="string"&&(t=o5(t)),typeof t=="object"&&(Yn(t.r)&&Yn(t.g)&&Yn(t.b)?(e=QI(t.r,t.g,t.b),o=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Yn(t.h)&&Yn(t.s)&&Yn(t.v)?(n=Ql(t.s),i=Ql(t.v),e=r5(t.h,n,i),o=!0,s="hsv"):Yn(t.h)&&Yn(t.s)&&Yn(t.l)&&(n=Ql(t.s),a=Ql(t.l),e=e5(t.h,n,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=JI(r),{ok:o,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var i5="[-\\+]?\\d+%?",a5="[-\\+]?\\d*\\.\\d+%?",bi="(?:".concat(a5,")|(?:").concat(i5,")"),Dv="[\\s|\\(]+(".concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")\\s*\\)?"),_v="[\\s|\\(]+(".concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")\\s*\\)?"),nn={CSS_UNIT:new RegExp(bi),rgb:new RegExp("rgb"+Dv),rgba:new RegExp("rgba"+_v),hsl:new RegExp("hsl"+Dv),hsla:new RegExp("hsla"+_v),hsv:new RegExp("hsv"+Dv),hsva:new RegExp("hsva"+_v),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function o5(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(CC[t])t=CC[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=nn.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=nn.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=nn.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=nn.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=nn.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=nn.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=nn.hex8.exec(t),r?{r:Er(r[1]),g:Er(r[2]),b:Er(r[3]),a:bC(r[4]),format:e?"name":"hex8"}:(r=nn.hex6.exec(t),r?{r:Er(r[1]),g:Er(r[2]),b:Er(r[3]),format:e?"name":"hex"}:(r=nn.hex4.exec(t),r?{r:Er(r[1]+r[1]),g:Er(r[2]+r[2]),b:Er(r[3]+r[3]),a:bC(r[4]+r[4]),format:e?"name":"hex8"}:(r=nn.hex3.exec(t),r?{r:Er(r[1]+r[1]),g:Er(r[2]+r[2]),b:Er(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function Yn(t){return!!nn.CSS_UNIT.exec(String(t))}var ef=2,wC=.16,s5=.05,u5=.05,l5=.15,DC=5,_C=4,f5=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function xC(t){var e=t.r,r=t.g,n=t.b,i=t5(e,r,n);return{h:i.h*360,s:i.s,v:i.v}}function tf(t){var e=t.r,r=t.g,n=t.b;return"#".concat(n5(e,r,n))}function c5(t,e,r){var n=r/100,i={r:(e.r-t.r)*n+t.r,g:(e.g-t.g)*n+t.g,b:(e.b-t.b)*n+t.b};return i}function SC(t,e,r){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-ef*e:Math.round(t.h)+ef*e:n=r?Math.round(t.h)+ef*e:Math.round(t.h)-ef*e,n<0?n+=360:n>=360&&(n-=360),n}function EC(t,e,r){if(t.h===0&&t.s===0)return t.s;var n;return r?n=t.s-wC*e:e===_C?n=t.s+wC:n=t.s+s5*e,n>1&&(n=1),r&&e===DC&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function AC(t,e,r){var n;return r?n=t.v+u5*e:n=t.v-l5*e,n>1&&(n=1),Number(n.toFixed(2))}function h5(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=Ws(t),i=DC;i>0;i-=1){var a=xC(n),o=tf(Ws({h:SC(a,i,!0),s:EC(a,i,!0),v:AC(a,i,!0)}));r.push(o)}r.push(tf(n));for(var s=1;s<=_C;s+=1){var u=xC(n),l=tf(Ws({h:SC(u,s),s:EC(u,s),v:AC(u,s)}));r.push(l)}return e.theme==="dark"?f5.map(function(f){var c=f.index,h=f.opacity,d=tf(c5(Ws(e.backgroundColor||"#141414"),Ws(r[c]),h*100));return d}):r}var xv=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];xv.primary=xv[5];function TC(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 Cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?TC(Object(r),!0).forEach(function(n){bv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):TC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function d5(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function v5(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var r=e;r;){if(r===t)return!0;r=r.parentNode}return!1}var OC="data-rc-order",PC="data-rc-priority",p5="rc-util-key",Sv=new Map;function BC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):p5}function Ev(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function g5(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Av(t){return Array.from((Sv.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function MC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d5())return null;var r=e.csp,n=e.prepend,i=e.priority,a=i===void 0?0:i,o=g5(n),s=o==="prependQueue",u=document.createElement("style");u.setAttribute(OC,o),s&&a&&u.setAttribute(PC,"".concat(a)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=t;var l=Ev(e),f=l.firstChild;if(n){if(s){var c=(e.styles||Av(l)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(OC)))return!1;var d=Number(h.getAttribute(PC)||0);return a>=d});if(c.length)return l.insertBefore(u,c[c.length-1].nextSibling),u}l.insertBefore(u,f)}else l.appendChild(u);return u}function m5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Ev(e);return(e.styles||Av(r)).find(function(n){return n.getAttribute(BC(e))===t})}function y5(t,e){var r=Sv.get(t);if(!r||!v5(document,r)){var n=MC("",e),i=n.parentNode;Sv.set(t,i),t.removeChild(n)}}function b5(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ev(r),i=Av(n),a=Cn(Cn({},r),{},{styles:i});y5(n,a);var o=m5(e,a);if(o){var s,u;if((s=a.csp)!==null&&s!==void 0&&s.nonce&&o.nonce!==((u=a.csp)===null||u===void 0?void 0:u.nonce)){var l;o.nonce=(l=a.csp)===null||l===void 0?void 0:l.nonce}return o.innerHTML!==t&&(o.innerHTML=t),o}var f=MC(t,a);return f.setAttribute(BC(a),e),f}function FC(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function C5(t){return FC(t)instanceof ShadowRoot}function w5(t){return C5(t)?FC(t):null}var Tv={},Ov=[],D5=function(e){Ov.push(e)};function _5(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var r=Ov.reduce(function(n,i){return i(n??"","warning")},e);r&&console.error("Warning: ".concat(r))}}function x5(t,e){if(process.env.NODE_ENV!=="production"&&!t&&console!==void 0){var r=Ov.reduce(function(n,i){return i(n??"","note")},e);r&&console.warn("Note: ".concat(r))}}function S5(){Tv={}}function LC(t,e,r){!e&&!Tv[r]&&(t(!1,r),Tv[r]=!0)}function rf(t,e){LC(_5,t,e)}function E5(t,e){LC(x5,t,e)}rf.preMessage=D5,rf.resetWarned=S5,rf.noteOnce=E5;function A5(t){return t.replace(/-(.)/g,function(e,r){return r.toUpperCase()})}function T5(t,e){rf(t,"[@ant-design/icons] ".concat(e))}function RC(t){return la(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(la(t.icon)==="object"||typeof t.icon=="function")}function IC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,r){var n=t[r];switch(r){case"class":e.className=n,delete e.class;break;default:delete e[r],e[A5(r)]=n}return e},{})}function Pv(t,e,r){return r?z.createElement(t.tag,Cn(Cn({key:e},IC(t.attrs)),r),(t.children||[]).map(function(n,i){return Pv(n,"".concat(e,"-").concat(t.tag,"-").concat(i))})):z.createElement(t.tag,Cn({key:e},IC(t.attrs)),(t.children||[]).map(function(n,i){return Pv(n,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function NC(t){return h5(t)[0]}function kC(t){return t?Array.isArray(t)?t:[t]:[]}var O5=`
72
+ .anticon {
73
+ display: inline-flex;
74
+ align-items: center;
75
+ color: inherit;
76
+ font-style: normal;
77
+ line-height: 0;
78
+ text-align: center;
79
+ text-transform: none;
80
+ vertical-align: -0.125em;
81
+ text-rendering: optimizeLegibility;
82
+ -webkit-font-smoothing: antialiased;
83
+ -moz-osx-font-smoothing: grayscale;
84
+ }
85
+
86
+ .anticon > * {
87
+ line-height: 1;
88
+ }
89
+
90
+ .anticon svg {
91
+ display: inline-block;
92
+ }
93
+
94
+ .anticon::before {
95
+ display: none;
96
+ }
97
+
98
+ .anticon .anticon-icon {
99
+ display: block;
100
+ }
101
+
102
+ .anticon[tabindex] {
103
+ cursor: pointer;
104
+ }
105
+
106
+ .anticon-spin::before,
107
+ .anticon-spin {
108
+ display: inline-block;
109
+ -webkit-animation: loadingCircle 1s infinite linear;
110
+ animation: loadingCircle 1s infinite linear;
111
+ }
112
+
113
+ @-webkit-keyframes loadingCircle {
114
+ 100% {
115
+ -webkit-transform: rotate(360deg);
116
+ transform: rotate(360deg);
117
+ }
118
+ }
119
+
120
+ @keyframes loadingCircle {
121
+ 100% {
122
+ -webkit-transform: rotate(360deg);
123
+ transform: rotate(360deg);
124
+ }
125
+ }
126
+ `,P5=function(e){var r=z.useContext(vC),n=r.csp,i=r.prefixCls,a=O5;i&&(a=a.replace(/anticon/g,i)),z.useEffect(function(){var o=e.current,s=w5(o);b5(a,"@ant-design-icons",{prepend:!0,csp:n,attachTo:s})},[])},B5=["icon","className","onClick","style","primaryColor","secondaryColor"],$s={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function M5(t){var e=t.primaryColor,r=t.secondaryColor;$s.primaryColor=e,$s.secondaryColor=r||NC(e),$s.calculated=!!r}function F5(){return Cn({},$s)}var mo=function(e){var r=e.icon,n=e.className,i=e.onClick,a=e.style,o=e.primaryColor,s=e.secondaryColor,u=mC(e,B5),l=Ye.useRef(),f=$s;if(o&&(f={primaryColor:o,secondaryColor:s||NC(o)}),P5(l),T5(RC(r),"icon should be icon definiton, but got ".concat(r)),!RC(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Cn(Cn({},c),{},{icon:c.icon(f.primaryColor,f.secondaryColor)})),Pv(c.icon,"svg-".concat(c.name),Cn(Cn({className:n,onClick:i,style:a,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:l}))};mo.displayName="IconReact",mo.getTwoToneColors=F5,mo.setTwoToneColors=M5;function zC(t){var e=kC(t),r=gC(e,2),n=r[0],i=r[1];return mo.setTwoToneColors({primaryColor:n,secondaryColor:i})}function L5(){var t=mo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var R5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];zC(xv.primary);var kt=Ye.forwardRef(function(t,e){var r=t.className,n=t.icon,i=t.spin,a=t.rotate,o=t.tabIndex,s=t.onClick,u=t.twoToneColor,l=mC(t,R5),f=Ye.useContext(vC),c=f.prefixCls,h=c===void 0?"anticon":c,d=f.rootClassName,v=XI(d,h,bv(bv({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),r),g=o;g===void 0&&s&&(g=-1);var p=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,m=kC(u),y=gC(m,2),b=y[0],C=y[1];return Ye.createElement("span",Nt({role:"img","aria-label":n.name},l,{ref:e,tabIndex:g,onClick:s,className:v}),Ye.createElement(mo,{icon:n,primaryColor:b,secondaryColor:C,style:p}))});kt.displayName="AntdIcon",kt.getTwoToneColor=L5,kt.setTwoToneColor=zC;var I5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-center",theme:"outlined"},N5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:I5}))},jC=Ye.forwardRef(N5);process.env.NODE_ENV!=="production"&&(jC.displayName="AlignCenterOutlined");var k5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"},z5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:k5}))},VC=Ye.forwardRef(z5);process.env.NODE_ENV!=="production"&&(VC.displayName="AlignLeftOutlined");var j5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-right",theme:"outlined"},V5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:j5}))},HC=Ye.forwardRef(V5);process.env.NODE_ENV!=="production"&&(HC.displayName="AlignRightOutlined");var H5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"}}]},name:"bold",theme:"outlined"},W5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:H5}))},WC=Ye.forwardRef(W5);process.env.NODE_ENV!=="production"&&(WC.displayName="BoldOutlined");var $5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},G5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:$5}))},$C=Ye.forwardRef(G5);process.env.NODE_ENV!=="production"&&($C.displayName="CheckOutlined");var U5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},q5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:U5}))},nf=Ye.forwardRef(q5);process.env.NODE_ENV!=="production"&&(nf.displayName="CloseOutlined");var Y5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"}}]},name:"column-width",theme:"outlined"},X5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:Y5}))},GC=Ye.forwardRef(X5);process.env.NODE_ENV!=="production"&&(GC.displayName="ColumnWidthOutlined");var K5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},Z5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:K5}))},UC=Ye.forwardRef(Z5);process.env.NODE_ENV!=="production"&&(UC.displayName="ExclamationCircleOutlined");var J5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"italic",theme:"outlined"},Q5=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:J5}))},qC=Ye.forwardRef(Q5);process.env.NODE_ENV!=="production"&&(qC.displayName="ItalicOutlined");var e4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},t4=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:e4}))},YC=Ye.forwardRef(t4);process.env.NODE_ENV!=="production"&&(YC.displayName="MinusCircleOutlined");var r4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M920 760H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-568H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H336c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM216 712H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h72.4v20.5h-35.7c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h35.7V838H100c-2.2 0-4 1.8-4 4v34c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4V716c0-2.2-1.8-4-4-4zM100 188h38v120c0 2.2 1.8 4 4 4h40c2.2 0 4-1.8 4-4V152c0-4.4-3.6-8-8-8h-78c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4zm116 240H100c-2.2 0-4 1.8-4 4v36c0 2.2 1.8 4 4 4h68.4l-70.3 77.7a8.3 8.3 0 00-2.1 5.4V592c0 2.2 1.8 4 4 4h116c2.2 0 4-1.8 4-4v-36c0-2.2-1.8-4-4-4h-68.4l70.3-77.7a8.3 8.3 0 002.1-5.4V432c0-2.2-1.8-4-4-4z"}}]},name:"ordered-list",theme:"outlined"},n4=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:r4}))},XC=Ye.forwardRef(n4);process.env.NODE_ENV!=="production"&&(XC.displayName="OrderedListOutlined");var i4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a4=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:i4}))},KC=Ye.forwardRef(a4);process.env.NODE_ENV!=="production"&&(KC.displayName="PlusOutlined");var o4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824 804H200c-4.4 0-8 3.4-8 7.6v60.8c0 4.2 3.6 7.6 8 7.6h624c4.4 0 8-3.4 8-7.6v-60.8c0-4.2-3.6-7.6-8-7.6zm-312-76c69.4 0 134.6-27.1 183.8-76.2C745 602.7 772 537.4 772 468V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 97-79 176-176 176s-176-79-176-176V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 69.4 27.1 134.6 76.2 183.8C377.3 701 442.6 728 512 728z"}}]},name:"underline",theme:"outlined"},s4=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:o4}))},ZC=Ye.forwardRef(s4);process.env.NODE_ENV!=="production"&&(ZC.displayName="UnderlineOutlined");var u4={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"},l4=function(e,r){return Ye.createElement(kt,Nt({},e,{ref:r,icon:u4}))},JC=Ye.forwardRef(l4);process.env.NODE_ENV!=="production"&&(JC.displayName="UnorderedListOutlined");const QC=(t,e)=>{const r=z.useRef(null),n=(...i)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(...i)},e)};return z.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),n},ew=["numbered-list","bulleted-list"],af=["left","center","right","justify"],f4=({children:t})=>typeof document=="object"?sl.createPortal(t,document.body):null,c4=({defaultValue:t,onChange:e})=>{const r=z.useCallback(o=>T.jsx(d4,{...o}),[]),n=z.useCallback(o=>T.jsx(v4,{...o}),[]),i=z.useMemo(()=>kI(II(kL())),[]),a=QC(o=>{e==null||e(o)},300);return T.jsx("div",{style:{padding:"0px 10px 10px",width:"100%",height:"100%"},children:T.jsxs(LI,{editor:i,initialValue:t,onChange:a,children:[T.jsx(p4,{}),T.jsx(SI,{style:{width:"100%",height:"100%",outline:"none"},renderElement:r,renderLeaf:n,spellCheck:!0,autoFocus:!0,placeholder:"Enter some text...",onDOMBeforeInput:o=>{switch(o.inputType){case"formatBold":return o.preventDefault(),of(i,"bold");case"formatItalic":return o.preventDefault(),of(i,"italic");case"formatUnderline":return o.preventDefault(),of(i,"underlined")}}})]})})},h4=(t,e)=>{const r=tw(t,e,af.includes(e)?"align":"type"),n=ew.includes(e);ie.unwrapNodes(t,{match:a=>!A.isEditor(a)&&de.isElement(a)&&ew.includes(a.type)&&!af.includes(e),split:!0});const i={};if(af.includes(e)?i.align=r?void 0:e:i.type=r?"paragraph":n?"list-item":e,ie.setNodes(t,i),!r&&n){const a={type:e,children:[]};ie.wrapNodes(t,a)}},of=(t,e)=>{rw(t,e)?A.removeMark(t,e):A.addMark(t,e,!0)},tw=(t,e,r="type")=>{const{selection:n}=t;if(!n)return!1;const[i]=Array.from(A.nodes(t,{at:A.unhangRange(t,n),match:a=>!A.isEditor(a)&&de.isElement(a)&&a[r]===e}));return!!i},rw=(t,e)=>{const r=A.marks(t);return r?r[e]===!0:!1},d4=({attributes:t,children:e,element:r})=>{const n={textAlign:r.align};switch(r.type){case"block-quote":return T.jsx("blockquote",{style:n,...t,children:e});case"bulleted-list":return T.jsx("ul",{style:n,...t,children:e});case"heading-one":return T.jsx("h1",{style:n,...t,children:e});case"heading-two":return T.jsx("h2",{style:n,...t,children:e});case"list-item":return T.jsx("li",{style:n,...t,children:e});case"numbered-list":return T.jsx("ol",{style:n,...t,children:e});default:return T.jsx("p",{style:n,...t,children:e})}},v4=({attributes:t,children:e,leaf:r})=>(r.bold&&(e=T.jsx("strong",{children:e})),r.code&&(e=T.jsx("code",{children:e})),r.italic&&(e=T.jsx("em",{children:e})),r.underline&&(e=T.jsx("u",{children:e})),T.jsx("span",{...t,children:e})),p4=()=>{const t=z.useRef(null),e=Jl(),r=PI();return z.useEffect(()=>{const n=t.current,{selection:i}=e;if(!n)return;if(!i||!r||te.isCollapsed(i)||A.string(e,i)===""){n.removeAttribute("style");return}const a=window.getSelection(),o=a==null?void 0:a.getRangeAt(0),s=o==null?void 0:o.getBoundingClientRect();n.style.opacity="1",s&&(n.style.top=`${s.top+window.pageYOffset-n.offsetHeight}px`,n.style.left=`${s.left+window.pageXOffset-n.offsetWidth/2+s.width/2}px`)}),T.jsx(f4,{children:T.jsxs("div",{ref:t,className:"editor-menu",onMouseDown:n=>{n.preventDefault()},children:[T.jsx(Bv,{format:"bold",icon:T.jsx(WC,{})}),T.jsx(Bv,{format:"italic",icon:T.jsx(qC,{})}),T.jsx(Bv,{format:"underline",icon:T.jsx(ZC,{})}),T.jsx(yo,{format:"numbered-list",icon:T.jsx(XC,{})}),T.jsx(yo,{format:"bulleted-list",icon:T.jsx(JC,{})}),T.jsx(yo,{format:"left",icon:T.jsx(VC,{})}),T.jsx(yo,{format:"center",icon:T.jsx(jC,{})}),T.jsx(yo,{format:"right",icon:T.jsx(HC,{})}),T.jsx(yo,{format:"justify",icon:T.jsx(GC,{})})]})})},Bv=({format:t,icon:e})=>{const r=Jl();return T.jsx(ee.Button,{onClick:()=>of(r,t),icon:e,color:rw(r,t)?"primary":"default",variant:"text"})},yo=({format:t,icon:e})=>{const r=Jl();return T.jsx(ee.Button,{color:tw(r,t,af.includes(t)?"align":"type")?"primary":"default",icon:e,variant:"text",onClick:()=>{h4(r,t)}})},g4=({defaultValue:t,defaultTileValue:e,onChange:r,onTitleChange:n})=>{const i=QC(a=>{n==null||n(a)},300);return T.jsxs("div",{style:{width:"100%",height:"100%"},children:[T.jsx(ee.Input,{variant:"borderless",defaultValue:e,style:{position:"absolute",top:"-30px",width:120,left:0,zIndex:9999,fontSize:"20px"},onChange:a=>i(a.target.value)}),T.jsx(c4,{defaultValue:t,onChange:r})]})};function m4(t,e){return e===null?null:typeof e=="number"?parseFloat(t||"0"):Array.isArray(e)?t?[t]:[]:t}function nw(t,e,r=!1){return t==null?void 0:t.filter(n=>{const i=e==null?void 0:e.map(a=>{const o=n[a.field],s=m4(a.val,o);switch(a.condition){case"equalto":return o===s;case"notequalto":return o!==s;case"notcontain":return typeof o=="string"&&!o.includes(s);case"contain":return Array.isArray(o)&&o.includes(s);case"null":return o===null;case"notnull":return o!=null;default:return!1}});return r?i==null?void 0:i.every(Boolean):i==null?void 0:i.some(Boolean)})}function y4(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");return new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(t)}function Gs(t,e=0){if(!Number.isFinite(t))throw new Error("Value must be a finite number.");const r=new Intl.NumberFormat(void 0,{minimumFractionDigits:0,maximumFractionDigits:e}).format(t),[n,i]=r.split("."),a=(i||"").padEnd(e,"0");return`${n}${e>0?".":""}${a}`}const iw=({moduleDataApi:t,customData:e,customeStyle:r})=>{const[n,i]=z.useState(),a=z.useCallback(async()=>{e?t==null||t(e==null?void 0:e.dataSourceId).then(s=>{i(s)}):i([])},[e==null?void 0:e.dataSourceId]);z.useEffect(()=>{e&&a()},[e==null?void 0:e.dataSourceId]);const o=z.useMemo(()=>{if(!n)return"";let s=[];const{conditionData:u,statisticalMethod:l,statisticalType:f,field:c}=e||{};if(u!=null&&u.conditionList){const d=u.conditionType==="all";s=nw(n,u.conditionList,d)}else s=n;let h=0;if(s.length&&l==="fieldValue"&&c){const d=s.map(v=>v[c]).filter(v=>typeof v=="number");switch(f){case"sum":h=d.reduce((v,g)=>v+g,0);break;case"max":h=Math.max(...d);break;case"min":h=Math.min(...d);break;case"average":h=d.length?d.reduce((v,g)=>v+g,0)/d.length:0;break;default:h=0}}else l==="recordTotal"&&(h=s.length);if(r!=null&&r.unit){const{unit:d,precision:v}=r;switch(d){case"4":h=`¥${Gs(h,v)}`;break;case"5":h=`$${Gs(h,v)}`;break;case"1":h=Gs(h,v);break;case"3":h=y4(h,v);break;default:h=Gs(h,v)}}else h=Gs(h,r==null?void 0:r.precision);return h},[n,e,r]);return T.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:T.jsxs("div",{style:{marginTop:"-5%"},children:[T.jsx("div",{className:"stat-text",style:{color:r==null?void 0:r.color,fontSize:"120px",textAlign:"center",lineHeight:"120px"},children:o}),r!=null&&r.desc?T.jsx("div",{className:"stat-description-text",style:{color:r==null?void 0:r.color,fontSize:"16px",textAlign:"center"},children:r==null?void 0:r.desc}):null]})})};var aw={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Gi,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",f="week",c="month",h="quarter",d="year",v="date",g="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var B=["th","st","nd","rd"],R=M%100;return"["+M+(B[(R-20)%10]||B[R]||B[0])+"]"}},b=function(M,B,R){var V=String(M);return!V||V.length>=B?M:""+Array(B+1-V.length).join(R)+M},C={s:b,z:function(M){var B=-M.utcOffset(),R=Math.abs(B),V=Math.floor(R/60),k=R%60;return(B<=0?"+":"-")+b(V,2,"0")+":"+b(k,2,"0")},m:function M(B,R){if(B.date()<R.date())return-M(R,B);var V=12*(R.year()-B.year())+(R.month()-B.month()),k=B.clone().add(V,c),W=R-k<0,I=B.clone().add(V+(W?-1:1),c);return+(-(V+(R-k)/(W?k-I:I-k))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:c,y:d,w:f,d:l,D:v,h:u,m:s,s:o,ms:a,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},w="en",D={};D[w]=y;var _="$isDayjsObject",x=function(M){return M instanceof P||!(!M||!M[_])},S=function M(B,R,V){var k;if(!B)return w;if(typeof B=="string"){var W=B.toLowerCase();D[W]&&(k=W),R&&(D[W]=R,k=W);var I=B.split("-");if(!k&&I.length>1)return M(I[0])}else{var q=B.name;D[q]=B,k=q}return!V&&k&&(w=k),k||!V&&w},O=function(M,B){if(x(M))return M.clone();var R=typeof B=="object"?B:{};return R.date=M,R.args=arguments,new P(R)},E=C;E.l=S,E.i=x,E.w=function(M,B){return O(M,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var P=function(){function M(R){this.$L=S(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[_]=!0}var B=M.prototype;return B.parse=function(R){this.$d=function(V){var k=V.date,W=V.utc;if(k===null)return new Date(NaN);if(E.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var I=k.match(p);if(I){var q=I[2]-1||0,Z=(I[7]||"0").substring(0,3);return W?new Date(Date.UTC(I[1],q,I[3]||1,I[4]||0,I[5]||0,I[6]||0,Z)):new Date(I[1],q,I[3]||1,I[4]||0,I[5]||0,I[6]||0,Z)}}return new Date(k)}(R),this.init()},B.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},B.$utils=function(){return E},B.isValid=function(){return this.$d.toString()!==g},B.isSame=function(R,V){var k=O(R);return this.startOf(V)<=k&&k<=this.endOf(V)},B.isAfter=function(R,V){return O(R)<this.startOf(V)},B.isBefore=function(R,V){return this.endOf(V)<O(R)},B.$g=function(R,V,k){return E.u(R)?this[V]:this.set(k,R)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(R,V){var k=this,W=!!E.u(V)||V,I=E.p(R),q=function(U,Q){var K=E.w(k.$u?Date.UTC(k.$y,Q,U):new Date(k.$y,Q,U),k);return W?K:K.endOf(l)},Z=function(U,Q){return E.w(k.toDate()[U].apply(k.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(Q)),k)},J=this.$W,ne=this.$M,G=this.$D,L="set"+(this.$u?"UTC":"");switch(I){case d:return W?q(1,0):q(31,11);case c:return W?q(1,ne):q(0,ne+1);case f:var Y=this.$locale().weekStart||0,j=(J<Y?J+7:J)-Y;return q(W?G-j:G+(6-j),ne);case l:case v:return Z(L+"Hours",0);case u:return Z(L+"Minutes",1);case s:return Z(L+"Seconds",2);case o:return Z(L+"Milliseconds",3);default:return this.clone()}},B.endOf=function(R){return this.startOf(R,!1)},B.$set=function(R,V){var k,W=E.p(R),I="set"+(this.$u?"UTC":""),q=(k={},k[l]=I+"Date",k[v]=I+"Date",k[c]=I+"Month",k[d]=I+"FullYear",k[u]=I+"Hours",k[s]=I+"Minutes",k[o]=I+"Seconds",k[a]=I+"Milliseconds",k)[W],Z=W===l?this.$D+(V-this.$W):V;if(W===c||W===d){var J=this.clone().set(v,1);J.$d[q](Z),J.init(),this.$d=J.set(v,Math.min(this.$D,J.daysInMonth())).$d}else q&&this.$d[q](Z);return this.init(),this},B.set=function(R,V){return this.clone().$set(R,V)},B.get=function(R){return this[E.p(R)]()},B.add=function(R,V){var k,W=this;R=Number(R);var I=E.p(V),q=function(ne){var G=O(W);return E.w(G.date(G.date()+Math.round(ne*R)),W)};if(I===c)return this.set(c,this.$M+R);if(I===d)return this.set(d,this.$y+R);if(I===l)return q(1);if(I===f)return q(7);var Z=(k={},k[s]=n,k[u]=i,k[o]=r,k)[I]||1,J=this.$d.getTime()+R*Z;return E.w(J,this)},B.subtract=function(R,V){return this.add(-1*R,V)},B.format=function(R){var V=this,k=this.$locale();if(!this.isValid())return k.invalidDate||g;var W=R||"YYYY-MM-DDTHH:mm:ssZ",I=E.z(this),q=this.$H,Z=this.$m,J=this.$M,ne=k.weekdays,G=k.months,L=k.meridiem,Y=function(Q,K,X,le){return Q&&(Q[K]||Q(V,W))||X[K].slice(0,le)},j=function(Q){return E.s(q%12||12,Q,"0")},U=L||function(Q,K,X){var le=Q<12?"AM":"PM";return X?le.toLowerCase():le};return W.replace(m,function(Q,K){return K||function(X){switch(X){case"YY":return String(V.$y).slice(-2);case"YYYY":return E.s(V.$y,4,"0");case"M":return J+1;case"MM":return E.s(J+1,2,"0");case"MMM":return Y(k.monthsShort,J,G,3);case"MMMM":return Y(G,J);case"D":return V.$D;case"DD":return E.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return Y(k.weekdaysMin,V.$W,ne,2);case"ddd":return Y(k.weekdaysShort,V.$W,ne,3);case"dddd":return ne[V.$W];case"H":return String(q);case"HH":return E.s(q,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return U(q,Z,!0);case"A":return U(q,Z,!1);case"m":return String(Z);case"mm":return E.s(Z,2,"0");case"s":return String(V.$s);case"ss":return E.s(V.$s,2,"0");case"SSS":return E.s(V.$ms,3,"0");case"Z":return I}return null}(Q)||I.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(R,V,k){var W,I=this,q=E.p(V),Z=O(R),J=(Z.utcOffset()-this.utcOffset())*n,ne=this-Z,G=function(){return E.m(I,Z)};switch(q){case d:W=G()/12;break;case c:W=G();break;case h:W=G()/3;break;case f:W=(ne-J)/6048e5;break;case l:W=(ne-J)/864e5;break;case u:W=ne/i;break;case s:W=ne/n;break;case o:W=ne/r;break;default:W=ne}return k?W:E.a(W)},B.daysInMonth=function(){return this.endOf(c).$D},B.$locale=function(){return D[this.$L]},B.locale=function(R,V){if(!R)return this.$L;var k=this.clone(),W=S(R,V,!0);return W&&(k.$L=W),k},B.clone=function(){return E.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},M}(),F=P.prototype;return O.prototype=F,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",c],["$y",d],["$D",v]].forEach(function(M){F[M[1]]=function(B){return this.$g(B,M[0],M[1])}}),O.extend=function(M,B){return M.$i||(M(B,P,O),M.$i=!0),O},O.locale=S,O.isDayjs=x,O.unix=function(M){return O(1e3*M)},O.en=D[w],O.Ls=D,O.p={},O})})(aw);var b4=aw.exports;const Us=eo(b4);var ow={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Gi,function(){return function(r,n,i){n.prototype.isBetween=function(a,o,s,u){var l=i(a),f=i(o),c=(u=u||"()")[0]==="(",h=u[1]===")";return(c?this.isAfter(l,s):!this.isBefore(l,s))&&(h?this.isBefore(f,s):!this.isAfter(f,s))||(c?this.isBefore(l,s):!this.isAfter(l,s))&&(h?this.isAfter(f,s):!this.isBefore(f,s))}}})})(ow);var C4=ow.exports;const w4=eo(C4),sw=z.createContext(void 0),D4=({children:t,initialData:e})=>{const[r,n]=z.useState(e);return T.jsx(sw.Provider,{value:{globalData:r,setGlobalData:n},children:t})},bo=()=>{const t=z.useContext(sw);if(!t)throw new Error("useAppContext must be used within an AppProvider");return t},_4=(...t)=>{console!=null&&console.warn&&(fa(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t))},uw={},Mv=(...t)=>{fa(t[0])&&uw[t[0]]||(fa(t[0])&&(uw[t[0]]=new Date),_4(...t))},lw=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},fw=(t,e,r)=>{t.loadNamespaces(e,lw(t,r))},cw=(t,e,r,n)=>{fa(r)&&(r=[r]),r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,lw(t,n))},x4=(t,e,r={})=>!e.languages||!e.languages.length?(Mv("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,i)=>{var a;if(((a=r.bindI18n)==null?void 0:a.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}),fa=t=>typeof t=="string",S4=t=>typeof t=="object"&&t!==null,E4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,A4={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},T4=t=>A4[t];let Fv={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(E4,T4)};const O4=(t={})=>{Fv={...Fv,...t}},P4=()=>Fv;let hw;const B4=t=>{hw=t},M4=()=>hw,F4={type:"3rdParty",init(t){O4(t.options.react),B4(t)}},L4=z.createContext();class R4{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const I4=(t,e)=>{const r=z.useRef();return z.useEffect(()=>{r.current=t},[t,e]),r.current},dw=(t,e,r,n)=>t.getFixedT(e,r,n),N4=(t,e,r,n)=>z.useCallback(dw(t,e,r,n),[t,e,r,n]),kr=(t,e={})=>{var C,w,D,_;const{i18n:r}=e,{i18n:n,defaultNS:i}=z.useContext(L4)||{},a=r||n||M4();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new R4),!a){Mv("You will need to pass in an i18next instance by using initReactI18next");const x=(O,E)=>fa(E)?E:S4(E)&&fa(E.defaultValue)?E.defaultValue:Array.isArray(O)?O[O.length-1]:O,S=[x,{},!1];return S.t=x,S.i18n={},S.ready=!1,S}(C=a.options.react)!=null&&C.wait&&Mv("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...P4(),...a.options.react,...e},{useSuspense:s,keyPrefix:u}=o;let l=i||((w=a.options)==null?void 0:w.defaultNS);l=fa(l)?[l]:l||["translation"],(_=(D=a.reportNamespaces).addUsedNamespaces)==null||_.call(D,l);const f=(a.isInitialized||a.initializedStoreOnce)&&l.every(x=>x4(x,a,o)),c=N4(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),h=()=>c,d=()=>dw(a,e.lng||null,o.nsMode==="fallback"?l:l[0],u),[v,g]=z.useState(h);let p=l.join();e.lng&&(p=`${e.lng}${p}`);const m=I4(p),y=z.useRef(!0);z.useEffect(()=>{const{bindI18n:x,bindI18nStore:S}=o;y.current=!0,!f&&!s&&(e.lng?cw(a,e.lng,l,()=>{y.current&&g(d)}):fw(a,l,()=>{y.current&&g(d)})),f&&m&&m!==p&&y.current&&g(d);const O=()=>{y.current&&g(d)};return x&&(a==null||a.on(x,O)),S&&(a==null||a.store.on(S,O)),()=>{y.current=!1,a&&(x==null||x.split(" ").forEach(E=>a.off(E,O))),S&&a&&S.split(" ").forEach(E=>a.store.off(E,O))}},[a,p]),z.useEffect(()=>{y.current&&f&&g(h)},[a,u,f]);const b=[v,a,f];if(b.t=v,b.i18n=a,b.ready=f,f||!f&&!s)return b;throw new Promise(x=>{e.lng?cw(a,e.lng,l,()=>x()):fw(a,l,()=>x())})};Us.extend(w4);const vw=({moduleDataApi:t,customData:e})=>{const{t:r}=kr(),{globalData:n}=bo(),[i,a]=z.useState(),[o,s]=z.useState(),u=z.useCallback(async()=>{e?t==null||t(e==null?void 0:e.dataSourceId).then(c=>{a(c)}):a([])},[e,t]);z.useEffect(()=>{e&&u()},[u,e==null?void 0:e.dataSourceId,e]),z.useEffect(()=>{var c,h;n!=null&&n.sourceData&&(e!=null&&e.dataSourceId)&&(s((c=n==null?void 0:n.sourceData.find(d=>d.value===(e==null?void 0:e.dataSourceId)))==null?void 0:c.fields),console.log((h=n==null?void 0:n.sourceData.find(d=>d.value===(e==null?void 0:e.dataSourceId)))==null?void 0:h.fields))},[n,e]);const l=z.useMemo(()=>c=>{const h=i==null?void 0:i.filter(d=>e!=null&&e.startDateField&&(e!=null&&e.endDateField)?c.isBetween(Us(d[e==null?void 0:e.startDateField]),Us(d[e==null?void 0:e.endDateField]),"day"):e!=null&&e.startDateField?(e==null?void 0:e.startDateField)&&c.isSame(Us(d[e==null?void 0:e.startDateField]),"day"):e!=null&&e.endDateField?(e==null?void 0:e.endDateField)&&c.isSame(Us(d[e==null?void 0:e.endDateField]),"day"):!1);return T.jsx("div",{className:"events",children:h==null?void 0:h.map((d,v)=>T.jsx("div",{children:T.jsx(ee.Popover,{placement:"right",trigger:"click",content:T.jsx("div",{style:{width:"200px",height:"300px",overflowY:"auto"},children:o!=null&&o.length?T.jsx(ee.Descriptions,{column:1,title:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null,items:o==null?void 0:o.map((g,p)=>({key:p,label:g.label,children:g!=null&&g.name?d[g.name]||r("unnamedRecord"):null}))}):null}),children:T.jsx(ee.Badge,{status:"warning",text:e!=null&&e.titleField?d[e==null?void 0:e.titleField]||r("unnamedRecord"):null})})},v))})},[i,e==null?void 0:e.endDateField,e==null?void 0:e.startDateField,e==null?void 0:e.titleField]),f=z.useMemo(()=>(c,h)=>h.type==="date"?l(c):h.originNode,[l]);return T.jsx("div",{className:"box-calendar-module",children:T.jsx(ee.Calendar,{cellRender:f})})};/*! *****************************************************************************
127
+ Copyright (c) Microsoft Corporation.
128
+
129
+ Permission to use, copy, modify, and/or distribute this software for any
130
+ purpose with or without fee is hereby granted.
131
+
132
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
133
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
134
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
135
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
136
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
137
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
138
+ PERFORMANCE OF THIS SOFTWARE.
139
+ ***************************************************************************** */var Lv=function(t,e){return Lv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Lv(t,e)};function fe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Lv(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var k4=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),z4=function(){function t(){this.browser=new k4,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t}(),Pe=new z4;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Pe.wxa=!0,Pe.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Pe.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Pe.node=!0,Pe.svgSupported=!0):j4(navigator.userAgent,Pe);function j4(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}var Rv=12,V4="sans-serif",ca=Rv+"px "+V4,H4=20,W4=100,$4="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function G4(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r<t.length;r++){var n=String.fromCharCode(r+32),i=(t.charCodeAt(r)-H4)/W4;e[n]=i}return e}var U4=G4($4),Co={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var t,e;return function(r,n){if(!t){var i=Co.createCanvas();t=i&&i.getContext("2d")}if(t)return e!==n&&(e=t.font=n||ca),t.measureText(r);r=r||"",n=n||ca;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Rv,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=U4[r[u]];s+=l==null?o:l*o}return{width:s}}}(),loadImage:function(t,e,r){var n=new Image;return n.onload=e,n.onerror=r,n.src=t,n}},pw=Xn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),gw=Xn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),wo=Object.prototype.toString,sf=Array.prototype,q4=sf.forEach,Y4=sf.filter,Iv=sf.slice,X4=sf.map,mw=(function(){}).constructor,uf=mw?mw.prototype:null,Nv="__proto__",K4=2311;function yw(){return K4++}function ha(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function We(t){if(t==null||typeof t!="object")return t;var e=t,r=wo.call(t);if(r==="[object Array]"){if(!qs(t)){e=[];for(var n=0,i=t.length;n<i;n++)e[n]=We(t[n])}}else if(gw[r]){if(!qs(t)){var a=t.constructor;if(a.from)e=a.from(t);else{e=new a(t.length);for(var n=0,i=t.length;n<i;n++)e[n]=t[n]}}}else if(!pw[r]&&!qs(t)&&!Do(t)){e={};for(var o in t)t.hasOwnProperty(o)&&o!==Nv&&(e[o]=We(t[o]))}return e}function Je(t,e,r){if(!Ce(e)||!Ce(t))return r?We(e):t;for(var n in e)if(e.hasOwnProperty(n)&&n!==Nv){var i=t[n],a=e[n];Ce(a)&&Ce(i)&&!ce(a)&&!ce(i)&&!Do(a)&&!Do(i)&&!bw(a)&&!bw(i)&&!qs(a)&&!qs(i)?Je(i,a,r):(r||!(n in t))&&(t[n]=We(e[n]))}return t}function ae(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==Nv&&(t[r]=e[r]);return t}function ke(t,e,r){for(var n=Xe(e),i=0;i<n.length;i++){var a=n[i];t[a]==null&&(t[a]=e[a])}return t}function $e(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r}return-1}function Z4(t,e){var r=t.prototype;function n(){}n.prototype=e.prototype,t.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(t.prototype[i]=r[i]);t.prototype.constructor=t,t.superClass=e}function wn(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&t[a]==null&&(t[a]=e[a])}else ke(t,e)}function Ht(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function N(t,e,r){if(t&&e)if(t.forEach&&t.forEach===q4)t.forEach(e,r);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e.call(r,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function ge(t,e,r){if(!t)return[];if(!e)return kv(t);if(t.map&&t.map===X4)return t.map(e,r);for(var n=[],i=0,a=t.length;i<a;i++)n.push(e.call(r,t[i],i,t));return n}function Xn(t,e,r,n){if(t&&e){for(var i=0,a=t.length;i<a;i++)r=e.call(n,r,t[i],i,t);return r}}function yt(t,e,r){if(!t)return[];if(!e)return kv(t);if(t.filter&&t.filter===Y4)return t.filter(e,r);for(var n=[],i=0,a=t.length;i<a;i++)e.call(r,t[i],i,t)&&n.push(t[i]);return n}function Xe(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}function J4(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return t.apply(e,r.concat(Iv.call(arguments)))}}var ht=uf&&_e(uf.bind)?uf.call.bind(uf.bind):J4;function wt(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(Iv.call(arguments)))}}function ce(t){return Array.isArray?Array.isArray(t):wo.call(t)==="[object Array]"}function _e(t){return typeof t=="function"}function me(t){return typeof t=="string"}function lf(t){return wo.call(t)==="[object String]"}function rt(t){return typeof t=="number"}function Ce(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function bw(t){return!!pw[wo.call(t)]}function tr(t){return!!gw[wo.call(t)]}function Do(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function ff(t){return t.colorStops!=null}function Q4(t){return t.image!=null}function Cw(t){return wo.call(t)==="[object RegExp]"}function _o(t){return t!==t}function da(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,n=t.length;r<n;r++)if(t[r]!=null)return t[r]}function Be(t,e){return t??e}function va(t,e,r){return t??e??r}function kv(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return Iv.apply(t,e)}function ww(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function Ee(t,e){if(!t)throw new Error(e)}function Dn(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Dw="__ec_primitive__";function cf(t){t[Dw]=!0}function qs(t){return t[Dw]}var e8=function(){function t(){this.data={}}return t.prototype.delete=function(e){var r=this.has(e);return r&&delete this.data[e],r},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,r){return this.data[e]=r,this},t.prototype.keys=function(){return Xe(this.data)},t.prototype.forEach=function(e){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&e(r[n],n)},t}(),_w=typeof Map=="function";function t8(){return _w?new Map:new e8}var r8=function(){function t(e){var r=ce(e);this.data=t8();var n=this;e instanceof t?e.each(i):e&&N(e,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,r){return this.data.set(e,r),r},t.prototype.each=function(e,r){this.data.forEach(function(n,i){e.call(r,n,i)})},t.prototype.keys=function(){var e=this.data.keys();return _w?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t}();function Ae(t){return new r8(t)}function n8(t,e){for(var r=new t.constructor(t.length+e.length),n=0;n<t.length;n++)r[n]=t[n];for(var i=t.length,n=0;n<e.length;n++)r[n+i]=e[n];return r}function hf(t,e){var r;if(Object.create)r=Object.create(t);else{var n=function(){};n.prototype=t,r=new n}return e&&ae(r,e),r}function xw(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function xe(t,e){return t.hasOwnProperty(e)}function hr(){}var i8=180/Math.PI;function xo(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function a8(t){return[t[0],t[1]]}function Sw(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function o8(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function s8(t){return Math.sqrt(u8(t))}function u8(t){return t[0]*t[0]+t[1]*t[1]}function zv(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function l8(t,e){var r=s8(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function jv(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Vv=jv;function f8(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var So=f8;function df(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t}function zr(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t}function Eo(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Ao(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var To=function(){function t(e,r){this.target=e,this.topTarget=r&&r.topTarget}return t}(),c8=function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var r=e.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new To(r,e),"dragstart",e.event))},t.prototype._drag=function(e){var r=this._draggingTarget;if(r){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,e),this.handler.dispatchToElement(new To(r,e),"drag",e.event);var s=this.handler.findHover(n,i,r).target,u=this._dropTarget;this._dropTarget=s,r!==s&&(u&&s!==u&&this.handler.dispatchToElement(new To(u,e),"dragleave",e.event),s&&s!==u&&this.handler.dispatchToElement(new To(s,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new To(r,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new To(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t}(),_n=function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!e)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var u={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=a[e].length-1,f=a[e][l];return f&&f.callAtLast?a[e].splice(l,0,u):a[e].push(u),this},t.prototype.isSilent=function(e){var r=this._$handlers;return!r||!r[e]||!r[e].length},t.prototype.off=function(e,r){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(r){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==r&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},t.prototype.trigger=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,u=0;u<s;u++){var l=i[u];if(!(a&&a.filter&&l.query!=null&&!a.filter(e,l.query)))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,r[0]);break;case 2:l.h.call(l.ctx,r[0],r[1]);break;default:l.h.apply(l.ctx,r);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],u=i.length,l=0;l<u;l++){var f=i[l];if(!(a&&a.filter&&f.query!=null&&!a.filter(e,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,r[0]);break;case 2:f.h.call(s,r[0],r[1]);break;default:f.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},t}(),h8=Math.log(2);function Hv(t,e,r,n,i,a){var o=n+"-"+i,s=t.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var u=Math.round(Math.log((1<<s)-1&~i)/h8);return t[r][u]}for(var l=n|1<<r,f=r+1;n&1<<f;)f++;for(var c=0,h=0,d=0;h<s;h++){var v=1<<h;v&i||(c+=(d%2?-1:1)*t[r][h]*Hv(t,e-1,f,l,i|v,a),d++)}return a[o]=c,c}function Ew(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},i=Hv(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Hv(r,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(u,l,f){var c=l*a[6]+f*a[7]+1;u[0]=(l*a[0]+f*a[1]+a[2])/c,u[1]=(l*a[3]+f*a[4]+a[5])/c}}}var Aw="___zrEVENTSAVED",Wv=[];function d8(t,e,r,n,i){return $v(Wv,e,n,i,!0)&&$v(t,r,Wv[0],Wv[1])}function $v(t,e,r,n,i){if(e.getBoundingClientRect&&Pe.domSupported&&!Tw(e)){var a=e[Aw]||(e[Aw]={}),o=v8(e,a),s=p8(o,a,i);if(s)return s(t,r,n),!0}return!1}function v8(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,u=a%2,l=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[u]+":0",i[l]+":0",n[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function p8(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],u=!0,l=0;l<4;l++){var f=t[l].getBoundingClientRect(),c=2*l,h=f.left,d=f.top;o.push(h,d),u=u&&a&&h===a[c]&&d===a[c+1],s.push(t[l].offsetLeft,t[l].offsetTop)}return u&&i?i:(e.srcCoords=o,e[n]=r?Ew(s,o):Ew(o,s))}function Tw(t){return t.nodeName.toUpperCase()==="CANVAS"}var g8=/([&<>"'])/g,m8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ar(t){return t==null?"":(t+"").replace(g8,function(e,r){return m8[r]})}var y8=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gv=[],b8=Pe.browser.firefox&&+Pe.browser.version.split(".")[0]<39;function Uv(t,e,r,n){return r=r||{},n?Ow(t,e,r):b8&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Ow(t,e,r),r}function Ow(t,e,r){if(Pe.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(Tw(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if($v(Gv,t,n,i)){r.zrX=Gv[0],r.zrY=Gv[1];return}}r.zrX=r.zrY=0}function qv(t){return t||window.event}function jr(t,e,r){if(e=qv(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Uv(t,o,e,r)}else{Uv(t,e,e,r);var a=C8(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&y8.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function C8(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function w8(t,e,r,n){t.addEventListener(e,r,n)}function D8(t,e,r,n){t.removeEventListener(e,r,n)}var Pw=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},_8=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o<s;o++){var u=i[o],l=Uv(n,u,{});a.points.push([l.zrX,l.zrY]),a.touches.push(u)}this._track.push(a)}},t.prototype._recognize=function(e){for(var r in Yv)if(Yv.hasOwnProperty(r)){var n=Yv[r](this._track,e);if(n)return n}},t}();function Bw(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function x8(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var Yv={pinch:function(t,e){var r=t.length;if(r){var n=(t[r-1]||{}).points,i=(t[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Bw(n)/Bw(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=x8(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function Oo(){return[1,0,0,1,0,0]}function Xv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function S8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Po(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],u=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t}function Kv(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Zv(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],u=e[3],l=e[5],f=Math.sin(r),c=Math.cos(r);return t[0]=i*c+s*f,t[1]=-i*f+s*c,t[2]=a*c+u*f,t[3]=-a*f+c*u,t[4]=c*(o-n[0])+f*(l-n[1])+n[0],t[5]=c*(l-n[1])-f*(o-n[0])+n[1],t}function E8(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function vf(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],u=r*o-a*n;return u?(u=1/u,t[0]=o*u,t[1]=-a*u,t[2]=-n*u,t[3]=r*u,t[4]=(n*s-o*i)*u,t[5]=(a*i-r*s)*u,t):null}var we=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),pf=Math.min,gf=Math.max,pa=new we,ga=new we,ma=new we,ya=new we,Ys=new we,Xs=new we,Ge=function(){function t(e,r,n,i){n<0&&(e=e+n,n=-n),i<0&&(r=r+i,i=-i),this.x=e,this.y=r,this.width=n,this.height=i}return t.prototype.union=function(e){var r=pf(e.x,this.x),n=pf(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gf(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gf(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=Oo();return Kv(a,a,[-r.x,-r.y]),E8(a,a,[n,i]),Kv(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,u=e.x,l=e.x+e.width,f=e.y,c=e.y+e.height,h=!(a<u||l<i||s<f||c<o);if(r){var d=1/0,v=0,g=Math.abs(a-u),p=Math.abs(l-i),m=Math.abs(s-f),y=Math.abs(c-o),b=Math.min(g,p),C=Math.min(m,y);a<u||l<i?b>v&&(v=b,g<p?we.set(Xs,-g,0):we.set(Xs,p,0)):b<d&&(d=b,g<p?we.set(Ys,g,0):we.set(Ys,-p,0)),s<f||c<o?C>v&&(v=C,m<y?we.set(Xs,0,-m):we.set(Xs,0,y)):b<d&&(d=b,m<y?we.set(Ys,0,m):we.set(Ys,0,-y))}return r&&we.copy(r,h?Ys:Xs),h},t.prototype.contain=function(e,r){var n=this;return e>=n.x&&e<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}pa.x=ma.x=r.x,pa.y=ya.y=r.y,ga.x=ya.x=r.x+r.width,ga.y=ma.y=r.y+r.height,pa.transform(n),ya.transform(n),ga.transform(n),ma.transform(n),e.x=pf(pa.x,ga.x,ma.x,ya.x),e.y=pf(pa.y,ga.y,ma.y,ya.y);var u=gf(pa.x,ga.x,ma.x,ya.x),l=gf(pa.y,ga.y,ma.y,ya.y);e.width=u-e.x,e.height=l-e.y},t}(),Mw="silent";function A8(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:T8}}function T8(){Pw(this.event)}var O8=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(_n),Ks=function(){function t(e,r){this.x=e,this.y=r}return t}(),P8=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Jv=new Ge(0,0,0,0),Fw=function(t){fe(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new Ks(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new O8,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new c8(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(N(P8,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=Rw(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var u=this._hovered=a?new Ks(n,i):this.findHover(n,i),l=u.target,f=this.proxy;f.setCursor&&f.setCursor(l?l.cursor:"default"),s&&l!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(u,"mousemove",r),l&&l!==s&&this.dispatchToElement(u,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new Ks(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=A8(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(u){typeof u[o]=="function"&&u[o].call(u,s),u.trigger&&u.trigger(n,s)}))}},e.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new Ks(r,n);if(Lw(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],u=this._pointerSize,l=u/2,f=new Ge(r-l,n-l,u,u),c=a.length-1;c>=0;c--){var h=a[c];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Jv.copy(h.getBoundingRect()),h.transform&&Jv.applyTransform(h.transform),Jv.intersect(f)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,g=Math.PI*2,p=0;p<l;p+=d)for(var m=0;m<g;m+=v){var y=r+p*Math.cos(m),b=n+p*Math.sin(m);if(Lw(s,o,y,b,i),o.target)return o}}return o},e.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new _8);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new Ks;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(_n);N(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Fw.prototype[t]=function(e){var r=e.zrX,n=e.zrY,i=Rw(this,r,n),a,o;if((t!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||Vv(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function B8(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?Mw:!0}return!1}function Lw(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=B8(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==Mw)){e.target=o;break}}}function Rw(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var Iw=32,Zs=7;function M8(t){for(var e=0;t>=Iw;)e|=t&1,t>>=1;return t+e}function Nw(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i<r&&n(t[i],t[i-1])<0;)i++;F8(t,e,i)}else for(;i<r&&n(t[i],t[i-1])>=0;)i++;return i-e}function F8(t,e,r){for(r--;e<r;){var n=t[e];t[e++]=t[r],t[r--]=n}}function kw(t,e,r,n,i){for(n===e&&n++;n<r;n++){for(var a=t[n],o=e,s=n,u;o<s;)u=o+s>>>1,i(a,t[u])<0?s=u:o=u+1;var l=n-o;switch(l){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;l>0;)t[o+l]=t[o+l-1],l--}t[o]=a}}function Qv(t,e,r,n,i,a){var o=0,s=0,u=1;if(a(t,e[r+i])>0){for(s=n-i;u<s&&a(t,e[r+i+u])>0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}else{for(s=i+1;u<s&&a(t,e[r+i-u])<=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var l=o;o=i-u,u=i-l}for(o++;o<u;){var f=o+(u-o>>>1);a(t,e[r+f])>0?o=f+1:u=f}return u}function ep(t,e,r,n,i,a){var o=0,s=0,u=1;if(a(t,e[r+i])<0){for(s=i+1;u<s&&a(t,e[r+i-u])<0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s);var l=o;o=i-u,u=i-l}else{for(s=n-i;u<s&&a(t,e[r+i+u])>=0;)o=u,u=(u<<1)+1,u<=0&&(u=s);u>s&&(u=s),o+=i,u+=i}for(o++;o<u;){var f=o+(u-o>>>1);a(t,e[r+f])<0?u=f:o=f+1}return u}function L8(t,e){var r=Zs,n,i,a=0,o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function u(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;f(d)}}function l(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,f(d)}}function f(d){var v=n[d],g=i[d],p=n[d+1],m=i[d+1];i[d]=g+m,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var y=ep(t[p],t,v,g,0,e);v+=y,g-=y,g!==0&&(m=Qv(t[v+g-1],t,p,m,m-1,e),m!==0&&(g<=m?c(v,g,p,m):h(v,g,p,m)))}function c(d,v,g,p){var m=0;for(m=0;m<v;m++)o[m]=t[d+m];var y=0,b=g,C=d;if(t[C++]=t[b++],--p===0){for(m=0;m<v;m++)t[C+m]=o[y+m];return}if(v===1){for(m=0;m<p;m++)t[C+m]=t[b+m];t[C+p]=o[y];return}for(var w=r,D,_,x;;){D=0,_=0,x=!1;do if(e(t[b],o[y])<0){if(t[C++]=t[b++],_++,D=0,--p===0){x=!0;break}}else if(t[C++]=o[y++],D++,_=0,--v===1){x=!0;break}while((D|_)<w);if(x)break;do{if(D=ep(t[b],o,y,v,0,e),D!==0){for(m=0;m<D;m++)t[C+m]=o[y+m];if(C+=D,y+=D,v-=D,v<=1){x=!0;break}}if(t[C++]=t[b++],--p===0){x=!0;break}if(_=Qv(o[y],t,b,p,0,e),_!==0){for(m=0;m<_;m++)t[C+m]=t[b+m];if(C+=_,b+=_,p-=_,p===0){x=!0;break}}if(t[C++]=o[y++],--v===1){x=!0;break}w--}while(D>=Zs||_>=Zs);if(x)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),v===1){for(m=0;m<p;m++)t[C+m]=t[b+m];t[C+p]=o[y]}else{if(v===0)throw new Error;for(m=0;m<v;m++)t[C+m]=o[y+m]}}function h(d,v,g,p){var m=0;for(m=0;m<p;m++)o[m]=t[g+m];var y=d+v-1,b=p-1,C=g+p-1,w=0,D=0;if(t[C--]=t[y--],--v===0){for(w=C-(p-1),m=0;m<p;m++)t[w+m]=o[m];return}if(p===1){for(C-=v,y-=v,D=C+1,w=y+1,m=v-1;m>=0;m--)t[D+m]=t[w+m];t[C]=o[b];return}for(var _=r;;){var x=0,S=0,O=!1;do if(e(o[b],t[y])<0){if(t[C--]=t[y--],x++,S=0,--v===0){O=!0;break}}else if(t[C--]=o[b--],S++,x=0,--p===1){O=!0;break}while((x|S)<_);if(O)break;do{if(x=v-ep(o[b],t,d,v,v-1,e),x!==0){for(C-=x,y-=x,v-=x,D=C+1,w=y+1,m=x-1;m>=0;m--)t[D+m]=t[w+m];if(v===0){O=!0;break}}if(t[C--]=o[b--],--p===1){O=!0;break}if(S=p-Qv(t[y],o,0,p,p-1,e),S!==0){for(C-=S,b-=S,p-=S,D=C+1,w=b+1,m=0;m<S;m++)t[D+m]=o[w+m];if(p<=1){O=!0;break}}if(t[C--]=t[y--],--v===0){O=!0;break}_--}while(x>=Zs||S>=Zs);if(O)break;_<0&&(_=0),_+=2}if(r=_,r<1&&(r=1),p===1){for(C-=v,y-=v,D=C+1,w=y+1,m=v-1;m>=0;m--)t[D+m]=t[w+m];t[C]=o[b]}else{if(p===0)throw new Error;for(w=C-(p-1),m=0;m<p;m++)t[w+m]=o[m]}}return{mergeRuns:u,forceMergeRuns:l,pushRun:s}}function mf(t,e,r,n){r||(r=0),n||(n=t.length);var i=n-r;if(!(i<2)){var a=0;if(i<Iw){a=Nw(t,r,n,e),kw(t,r,n,r+a,e);return}var o=L8(t,e),s=M8(i);do{if(a=Nw(t,r,n,e),a<s){var u=i;u>s&&(u=s),kw(t,r,r+u,r+a,e),a=u}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Tr=1,Js=2,Bo=4,zw=!1;function tp(){zw||(zw=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function jw(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var R8=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jw}return t.prototype.traverse=function(e,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,r)},t.prototype.getDisplayList=function(e,r){r=r||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(r),n},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var r=this._roots,n=this._displayList,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,e);n.length=this._displayListLen,mf(n,jw)},t.prototype._updateAndAddDisplayable=function(e,r,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath();if(e.ignoreClip)r=null;else if(i){r?r=r.slice():r=[];for(var a=i,o=e;a;)a.parent=o,a.updateTransform(),r.push(a),o=a,a=a.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),u=0;u<s.length;u++){var l=s[u];e.__dirty&&(l.__dirty|=Tr),this._updateAndAddDisplayable(l,r,n)}e.__dirty=0}else{var f=e;r&&r.length?f.__clipPaths=r:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(tp(),f.z=0),isNaN(f.z2)&&(tp(),f.z2=0),isNaN(f.zlevel)&&(tp(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,r,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,r,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r<n;r++)this.delRoot(e[r]);return}var i=$e(this._roots,e);i>=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),yf;yf=Pe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var Qs={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Qs.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Qs.bounceIn(t*2)*.5:Qs.bounceOut(t*2-1)*.5+.5}},bf=Math.pow,Ci=Math.sqrt,Cf=1e-8,Vw=1e-4,Hw=Ci(3),wf=1/3,xn=xo(),Vr=xo(),Mo=xo();function wi(t){return t>-Cf&&t<Cf}function Ww(t){return t>Cf||t<-Cf}function Pt(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function $w(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function Df(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),u=3*(e-t),l=t-i,f=s*s-3*o*u,c=s*u-9*o*l,h=u*u-3*s*l,d=0;if(wi(f)&&wi(c))if(wi(s))a[0]=0;else{var v=-u/s;v>=0&&v<=1&&(a[d++]=v)}else{var g=c*c-4*f*h;if(wi(g)){var p=c/f,v=-s/o+p,m=-p/2;v>=0&&v<=1&&(a[d++]=v),m>=0&&m<=1&&(a[d++]=m)}else if(g>0){var y=Ci(g),b=f*s+1.5*o*(-c+y),C=f*s+1.5*o*(-c-y);b<0?b=-bf(-b,wf):b=bf(b,wf),C<0?C=-bf(-C,wf):C=bf(C,wf);var v=(-s-(b+C))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var w=(2*f*s-3*o*c)/(2*Ci(f*f*f)),D=Math.acos(w)/3,_=Ci(f),x=Math.cos(D),v=(-s-2*_*x)/(3*o),m=(-s+_*(x+Hw*Math.sin(D)))/(3*o),S=(-s+_*(x-Hw*Math.sin(D)))/(3*o);v>=0&&v<=1&&(a[d++]=v),m>=0&&m<=1&&(a[d++]=m),S>=0&&S<=1&&(a[d++]=S)}}return d}function Gw(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,u=0;if(wi(o)){if(Ww(a)){var l=-s/a;l>=0&&l<=1&&(i[u++]=l)}}else{var f=a*a-4*o*s;if(wi(f))i[0]=-a/(2*o);else if(f>0){var c=Ci(f),l=(-a+c)/(2*o),h=(-a-c)/(2*o);l>=0&&l<=1&&(i[u++]=l),h>=0&&h<=1&&(i[u++]=h)}}return u}function Di(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,u=(n-r)*i+r,l=(s-o)*i+o,f=(u-s)*i+s,c=(f-l)*i+l;a[0]=t,a[1]=o,a[2]=l,a[3]=c,a[4]=c,a[5]=f,a[6]=u,a[7]=n}function Uw(t,e,r,n,i,a,o,s,u,l,f){var c,h=.005,d=1/0,v,g,p,m;xn[0]=u,xn[1]=l;for(var y=0;y<1;y+=.05)Vr[0]=Pt(t,r,i,o,y),Vr[1]=Pt(e,n,a,s,y),p=So(xn,Vr),p<d&&(c=y,d=p);d=1/0;for(var b=0;b<32&&!(h<Vw);b++)v=c-h,g=c+h,Vr[0]=Pt(t,r,i,o,v),Vr[1]=Pt(e,n,a,s,v),p=So(Vr,xn),v>=0&&p<d?(c=v,d=p):(Mo[0]=Pt(t,r,i,o,g),Mo[1]=Pt(e,n,a,s,g),m=So(Mo,xn),g<=1&&m<d?(c=g,d=m):h*=.5);return f&&(f[0]=Pt(t,r,i,o,c),f[1]=Pt(e,n,a,s,c)),Ci(d)}function I8(t,e,r,n,i,a,o,s,u){for(var l=t,f=e,c=0,h=1/u,d=1;d<=u;d++){var v=d*h,g=Pt(t,r,i,o,v),p=Pt(e,n,a,s,v),m=g-l,y=p-f;c+=Math.sqrt(m*m+y*y),l=g,f=p}return c}function Wt(t,e,r,n){var i=1-n;return i*(i*t+2*n*e)+n*n*r}function qw(t,e,r,n){return 2*((1-n)*(e-t)+n*(r-e))}function N8(t,e,r,n,i){var a=t-2*e+r,o=2*(e-t),s=t-n,u=0;if(wi(a)){if(Ww(o)){var l=-s/o;l>=0&&l<=1&&(i[u++]=l)}}else{var f=o*o-4*a*s;if(wi(f)){var l=-o/(2*a);l>=0&&l<=1&&(i[u++]=l)}else if(f>0){var c=Ci(f),l=(-o+c)/(2*a),h=(-o-c)/(2*a);l>=0&&l<=1&&(i[u++]=l),h>=0&&h<=1&&(i[u++]=h)}}return u}function Yw(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function _f(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function Xw(t,e,r,n,i,a,o,s,u){var l,f=.005,c=1/0;xn[0]=o,xn[1]=s;for(var h=0;h<1;h+=.05){Vr[0]=Wt(t,r,i,h),Vr[1]=Wt(e,n,a,h);var d=So(xn,Vr);d<c&&(l=h,c=d)}c=1/0;for(var v=0;v<32&&!(f<Vw);v++){var g=l-f,p=l+f;Vr[0]=Wt(t,r,i,g),Vr[1]=Wt(e,n,a,g);var d=So(Vr,xn);if(g>=0&&d<c)l=g,c=d;else{Mo[0]=Wt(t,r,i,p),Mo[1]=Wt(e,n,a,p);var m=So(Mo,xn);p<=1&&m<c?(l=p,c=m):f*=.5}}return u&&(u[0]=Wt(t,r,i,l),u[1]=Wt(e,n,a,l)),Ci(c)}function k8(t,e,r,n,i,a,o){for(var s=t,u=e,l=0,f=1/o,c=1;c<=o;c++){var h=c*f,d=Wt(t,r,i,h),v=Wt(e,n,a,h),g=d-s,p=v-u;l+=Math.sqrt(g*g+p*p),s=d,u=v}return l}var z8=/cubic-bezier\(([0-9,\.e ]+)\)/;function Kw(t){var e=t&&z8.exec(t);if(e){var r=e[1].split(","),n=+Dn(r[0]),i=+Dn(r[1]),a=+Dn(r[2]),o=+Dn(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(u){return u<=0?0:u>=1?1:Df(0,n,a,1,u,s)&&Pt(0,i,o,1,s[0])}}}var j8=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||hr,this.ondestroy=e.ondestroy||hr,this.onrestart=e.onrestart||hr,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var u=i%n;this._startTime=e-u,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=_e(e)?e:Qs[e]||Kw(e)},t}(),Zw=function(){function t(e){this.value=e}return t}(),V8=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new Zw(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),eu=function(){function t(e){this._list=new V8,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=n.head;n.remove(u),delete i[u.key],a=u.value,this._lastRemovedEntry=u}s?s.value=r:s=new Zw(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Jw={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _i(t){return t=Math.round(t),t<0?0:t>255?255:t}function rp(t){return t<0?0:t>1?1:t}function np(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?_i(parseFloat(e)/100*255):_i(parseInt(e,10))}function tu(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?rp(parseFloat(e)/100):rp(parseFloat(e))}function ip(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function xf(t,e,r){return t+(e-t)*r}function Hr(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function ap(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Qw=new eu(20),Sf=null;function Fo(t,e){Sf&&ap(Sf,e),Sf=Qw.put(t,Sf||e.slice())}function Kn(t,e){if(t){e=e||[];var r=Qw.get(t);if(r)return ap(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in Jw)return ap(e,Jw[n]),Fo(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Hr(e,0,0,0,1);return}return Hr(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Fo(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hr(e,0,0,0,1);return}return Hr(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Fo(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var u=n.substr(0,o),l=n.substr(o+1,s-(o+1)).split(","),f=1;switch(u){case"rgba":if(l.length!==4)return l.length===3?Hr(e,+l[0],+l[1],+l[2],1):Hr(e,0,0,0,1);f=tu(l.pop());case"rgb":if(l.length>=3)return Hr(e,np(l[0]),np(l[1]),np(l[2]),l.length===3?f:tu(l[3])),Fo(t,e),e;Hr(e,0,0,0,1);return;case"hsla":if(l.length!==4){Hr(e,0,0,0,1);return}return l[3]=tu(l[3]),eD(l,e),Fo(t,e),e;case"hsl":if(l.length!==3){Hr(e,0,0,0,1);return}return eD(l,e),Fo(t,e),e;default:return}}Hr(e,0,0,0,1)}}function eD(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=tu(t[1]),i=tu(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Hr(e,_i(ip(o,a,r+1/3)*255),_i(ip(o,a,r)*255),_i(ip(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function tD(t,e){var r=Kn(t);if(r){for(var n=0;n<3;n++)r[n]=r[n]*(1-e)|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Ef(r,r.length===4?"rgba":"rgb")}}function H8(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Kn(e[i]),s=Kn(e[a]),u=n-i,l=Ef([_i(xf(o[0],s[0],u)),_i(xf(o[1],s[1],u)),_i(xf(o[2],s[2],u)),rp(xf(o[3],s[3],u))],"rgba");return r?{color:l,leftIndex:i,rightIndex:a,value:n}:l}}function Ef(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Af(t,e){var r=Kn(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var rD=new eu(100);function nD(t){if(me(t)){var e=rD.get(t);return e||(e=tD(t,-.1),rD.put(t,e)),e}else if(ff(t)){var r=ae({},t);return r.colorStops=ge(t.colorStops,function(n){return{offset:n.offset,color:tD(n.color,-.1)}}),r}return t}function W8(t){return t.type==="linear"}function $8(t){return t.type==="radial"}(function(){return Pe.hasGlobalWindow&&_e(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return process.env.NODE_ENV!=="production"&&ha("Base64 isn't natively supported in the current environment."),null}})();var op=Array.prototype.slice;function Zn(t,e,r){return(e-t)*r+t}function sp(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=Zn(e[a],r[a],n);return t}function G8(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=Zn(e[o][s],r[o][s],n)}return t}function Tf(t,e,r,n){for(var i=e.length,a=0;a<i;a++)t[a]=e[a]+r[a]*n;return t}function iD(t,e,r,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){t[o]||(t[o]=[]);for(var s=0;s<a;s++)t[o][s]=e[o][s]+r[o][s]*n}return t}function U8(t,e){for(var r=t.length,n=e.length,i=r>n?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function q8(t,e,r){var n=t,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var u=a;u<o;u++)n.push(r===1?i[u]:op.call(i[u]))}for(var l=n[0]&&n[0].length,u=0;u<n.length;u++)if(r===1)isNaN(n[u])&&(n[u]=i[u]);else for(var f=0;f<l;f++)isNaN(n[u][f])&&(n[u][f]=i[u][f])}}function ru(t){if(Ht(t)){var e=t.length;if(Ht(t[0])){for(var r=[],n=0;n<e;n++)r.push(op.call(t[n]));return r}return op.call(t)}return t}function Of(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function Y8(t){return Ht(t&&t[0])?2:1}var Pf=0,Bf=1,aD=2,nu=3,up=4,lp=5,oD=6;function sD(t){return t===up||t===lp}function Mf(t){return t===Bf||t===aD}var iu=[0,0,0,0],X8=function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=oD,u=r;if(Ht(r)){var l=Y8(r);s=l,(l===1&&!rt(r[0])||l===2&&!rt(r[0][0]))&&(o=!0)}else if(rt(r)&&!_o(r))s=Pf;else if(me(r))if(!isNaN(+r))s=Pf;else{var f=Kn(r);f&&(u=f,s=nu)}else if(ff(r)){var c=ae({},u);c.colorStops=ge(r.colorStops,function(d){return{offset:d.offset,color:Kn(d.color)}}),W8(r)?s=up:$8(r)&&(s=lp),u=c}a===0?this.valType=s:(s!==this.valType||s===oD)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:u,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=_e(n)?n:Qs[n]||Kw(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,p){return g.time-p.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,u=Mf(i),l=sD(i),f=0;f<a;f++){var c=n[f],h=c.value,d=o.value;c.percent=c.time/e,s||(u&&f!==a-1?q8(h,d,i):l&&U8(h.colorStops,d.colorStops))}if(!s&&i!==lp&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var v=n[0].value,f=0;f<a;f++)i===Pf?n[f].additiveValue=n[f].value-v:i===nu?n[f].additiveValue=Tf([],n[f].value,v,-1):Mf(i)&&(n[f].additiveValue=i===Bf?Tf([],n[f].value,v,-1):iD([],n[f].value,v,-1))}},t.prototype.step=function(e,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,u=this.propName,l=a===nu,f,c=this._lastFr,h=Math.min,d,v;if(s===1)d=v=o[0];else{if(r<0)f=0;else if(r<this._lastFrP){var g=h(c+1,s-1);for(f=g;f>=0&&!(o[f].percent<=r);f--);f=h(f,s-2)}else{for(f=c;f<s&&!(o[f].percent>r);f++);f=h(f-1,s-2)}v=o[f+1],d=o[f]}if(d&&v){this._lastFr=f,this._lastFrP=r;var p=v.percent-d.percent,m=p===0?1:h((r-d.percent)/p,1);v.easingFunc&&(m=v.easingFunc(m));var y=n?this._additiveValue:l?iu:e[u];if((Mf(a)||l)&&!y&&(y=this._additiveValue=[]),this.discrete)e[u]=m<1?d.rawValue:v.rawValue;else if(Mf(a))a===Bf?sp(y,d[i],v[i],m):G8(y,d[i],v[i],m);else if(sD(a)){var b=d[i],C=v[i],w=a===up;e[u]={type:w?"linear":"radial",x:Zn(b.x,C.x,m),y:Zn(b.y,C.y,m),colorStops:ge(b.colorStops,function(_,x){var S=C.colorStops[x];return{offset:Zn(_.offset,S.offset,m),color:Of(sp([],_.color,S.color,m))}}),global:C.global},w?(e[u].x2=Zn(b.x2,C.x2,m),e[u].y2=Zn(b.y2,C.y2,m)):e[u].r=Zn(b.r,C.r,m)}else if(l)sp(y,d[i],v[i],m),n||(e[u]=Of(y));else{var D=Zn(d[i],v[i],m);n?this._additiveValue=D:e[u]=D}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Pf?e[n]=e[n]+i:r===nu?(Kn(e[n],iu),Tf(iu,iu,i,1),e[n]=Of(iu)):r===Bf?Tf(e[n],e[n],i,1):r===aD&&iD(e[n],e[n],i,1)},t}(),fp=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){ha("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Xe(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],u=a[s];if(!u){u=a[s]=new X8(s);var l=void 0,f=this._getAdditiveTrack(s);if(f){var c=f.keyframes,h=c[c.length-1];l=h&&h.value,f.valType===nu&&l&&(l=Of(l))}else l=this._target[s];if(l==null)continue;e>0&&u.addKeyframe(0,ru(l),i),this._trackKeys.push(s)}u.addKeyframe(e,ru(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n<r;n++)e[n].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,r=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)e[r[n]].setFinished()},t.prototype._getAdditiveTrack=function(e){var r,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(r=a)}return r},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],u=this._getAdditiveTrack(o),l=s.keyframes,f=l.length;if(s.prepare(i,u),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var c=l[f-1];c&&(r._target[s.propName]=c.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new j8({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){r._started=2;var v=r._additiveAnimators;if(v){for(var g=!1,p=0;p<v.length;p++)if(v[p]._clip){g=!0;break}g||(r._additiveAnimators=null)}for(var p=0;p<n.length;p++)n[p].step(r._target,d);var m=r._onframeCbs;if(m)for(var p=0;p<m.length;p++)m[p](r._target,d)},ondestroy:function(){r._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var r=this._clip;e&&r.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return ge(this._trackKeys,function(r){return e._tracks[r]})},t.prototype.stopTracks=function(e,r){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},t.prototype.saveTo=function(e,r,n){if(e){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,u=s[n?0:s.length-1];u&&(e[a]=ru(u.rawValue))}}}},t.prototype.__changeFinalValue=function(e,r){r=r||Xe(e);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function Lo(){return new Date().getTime()}var K8=function(t){fe(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=Lo()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(yf(n),!r._paused&&r.update())}yf(n)},e.prototype.start=function(){this._running||(this._time=Lo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Lo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Lo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new fp(r,n.loop);return this.addAnimator(i),i},e}(_n),Z8=300,cp=Pe.domSupported,hp=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=ge(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),uD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lD=!1;function dp(t){var e=t.pointerType;return e==="pen"||e==="touch"}function J8(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function vp(t){t&&(t.zrByTouch=!0)}function Q8(t,e){return jr(t.dom,new eN(t,e),!0)}function fD(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var eN=function(){function t(e,r){this.stopPropagation=hr,this.stopImmediatePropagation=hr,this.preventDefault=hr,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),an={mousedown:function(t){t=jr(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=jr(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=jr(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=jr(this.dom,t);var e=t.toElement||t.relatedTarget;fD(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){lD=!0,t=jr(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){lD||(t=jr(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=jr(this.dom,t),vp(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),an.mousemove.call(this,t),an.mousedown.call(this,t)},touchmove:function(t){t=jr(this.dom,t),vp(t),this.handler.processGesture(t,"change"),an.mousemove.call(this,t)},touchend:function(t){t=jr(this.dom,t),vp(t),this.handler.processGesture(t,"end"),an.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<Z8&&an.click.call(this,t)},pointerdown:function(t){an.mousedown.call(this,t)},pointermove:function(t){dp(t)||an.mousemove.call(this,t)},pointerup:function(t){an.mouseup.call(this,t)},pointerout:function(t){dp(t)||an.mouseout.call(this,t)}};N(["click","dblclick","contextmenu"],function(t){an[t]=function(e){e=jr(this.dom,e),this.trigger(t,e)}});var pp={pointermove:function(t){dp(t)||pp.mousemove.call(this,t)},pointerup:function(t){pp.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function tN(t,e){var r=e.domHandlers;Pe.pointerEventsSupported?N(hp.pointer,function(n){Ff(e,n,function(i){r[n].call(t,i)})}):(Pe.touchEventsSupported&&N(hp.touch,function(n){Ff(e,n,function(i){r[n].call(t,i),J8(e)})}),N(hp.mouse,function(n){Ff(e,n,function(i){i=qv(i),e.touching||r[n].call(t,i)})}))}function rN(t,e){Pe.pointerEventsSupported?N(uD.pointer,r):Pe.touchEventsSupported||N(uD.mouse,r);function r(n){function i(a){a=qv(a),fD(t,a.target)||(a=Q8(t,a),e.domHandlers[n].call(t,a))}Ff(e,n,i,{capture:!0})}}function Ff(t,e,r,n){t.mounted[e]=r,t.listenerOpts[e]=n,w8(t.domTarget,e,r,n)}function gp(t){var e=t.mounted;for(var r in e)e.hasOwnProperty(r)&&D8(t.domTarget,r,e[r],t.listenerOpts[r]);t.mounted={}}var cD=function(){function t(e,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=r}return t}(),nN=function(t){fe(e,t);function e(r,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new cD(r,an),cp&&(i._globalHandlerScope=new cD(document,pp)),tN(i,i._localHandlerScope),i}return e.prototype.dispose=function(){gp(this._localHandlerScope),cp&&gp(this._globalHandlerScope)},e.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},e.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,cp&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?rN(this,n):gp(n)}},e}(_n),hD=1;Pe.hasGlobalWindow&&(hD=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Lf=hD,mp=.4,yp="#333",bp="#ccc",iN="#eee",dD=Xv,vD=5e-5;function ba(t){return t>vD||t<-vD}var Ca=[],Ro=[],Cp=Oo(),wp=Math.abs,au=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return ba(this.rotation)||ba(this.x)||ba(this.y)||ba(this.scaleX-1)||ba(this.scaleY-1)||ba(this.skewX)||ba(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(dD(n),this.invTransform=null);return}n=n||Oo(),r?this.getLocalTransform(n):dD(n),e&&(r?Po(n,e,n):S8(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ca);var n=Ca[0]<0?-1:1,i=Ca[1]<0?-1:1,a=((Ca[0]-n)*r+n)/Ca[0]||0,o=((Ca[1]-i)*r+i)/Ca[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Oo(),vf(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Oo(),Po(Ro,e.invTransform,r),r=Ro);var n=this.originX,i=this.originY;(n||i)&&(Cp[4]=n,Cp[5]=i,Po(Ro,r,Cp),Ro[4]-=n,Ro[5]-=i,r=Ro),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&zr(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&zr(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&wp(e[0]-1)>1e-10&&wp(e[3]-1)>1e-10?Math.sqrt(wp(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){aN(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,u=e.anchorY,l=e.rotation||0,f=e.x,c=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||u){var v=n+s,g=i+u;r[4]=-v*a-h*g*o,r[5]=-g*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=h*o,l&&Zv(r,r,l),r[4]+=n+f,r[5]+=i+c,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Sn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function aN(t,e){for(var r=0;r<Sn.length;r++){var n=Sn[r];t[n]=e[n]}}var pD={};function Or(t,e){e=e||ca;var r=pD[e];r||(r=pD[e]=new eu(500));var n=r.get(t);return n==null&&(n=Co.measureText(t,e).width,r.put(t,n)),n}function gD(t,e,r,n){var i=Or(t,e),a=_p(e),o=ou(0,i,r),s=Io(0,a,n),u=new Ge(o,s,i,a);return u}function Dp(t,e,r,n){var i=((t||"")+"").split(`
140
+ `),a=i.length;if(a===1)return gD(i[0],e,r,n);for(var o=new Ge(0,0,0,0),s=0;s<i.length;s++){var u=gD(i[s],e,r,n);s===0?o.copy(u):o.union(u)}return o}function ou(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function Io(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function _p(t){return Or("国",t)}function xi(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Rf(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,u=r.x,l=r.y,f="left",c="top";if(n instanceof Array)u+=xi(n[0],r.width),l+=xi(n[1],r.height),f=null,c=null;else switch(n){case"left":u-=i,l+=s,f="right",c="middle";break;case"right":u+=i+o,l+=s,c="middle";break;case"top":u+=o/2,l-=i,f="center",c="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",c="middle";break;case"insideLeft":u+=i,l+=s,c="middle";break;case"insideRight":u+=o-i,l+=s,f="right",c="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",c="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,c="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",c="bottom";break}return t=t||{},t.x=u,t.y=l,t.align=f,t.verticalAlign=c,t}var xp="__zr_normal__",Sp=Sn.concat(["ignore"]),oN=Xn(Sn,function(t,e){return t[e]=!0,t},{ignore:!1}),No={},sN=new Ge(0,0,0,0),If=function(){function t(e){this.id=yw(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,u=!1;a.parent=i?this:null;var l=!1;if(a.copyTransform(r),n.position!=null){var f=sN;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(No,n,f):Rf(No,n,f),a.x=No.x,a.y=No.y,o=No.align,s=No.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var h=void 0,d=void 0;c==="center"?(h=f.width*.5,d=f.height*.5):(h=xi(c[0],f.width),d=xi(c[1],f.height)),l=!0,a.originX=-a.x+h+(i?0:f.x),a.originY=-a.y+d+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],l||(a.originX=-v[0],a.originY=-v[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,b=void 0;g&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),b=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),b=!0)),m=m||"#000",(m!==p.fill||y!==p.stroke||b!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(u=!0,p.fill=m,p.stroke=y,p.autoStroke=b,p.align=o,p.verticalAlign=s,r.setDefaultTextStyle(p)),r.__dirty|=Tr,u&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?bp:yp},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Kn(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Ef(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},ae(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(Ce(e))for(var n=e,i=Xe(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==xp)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},t.prototype._innerSaveToNormal=function(e){var r=this._normalState;r||(r=this._normalState={}),e.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(e,r,Sp)},t.prototype._savePrimaryToNormal=function(e,r,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in r)&&(r[a]=this[a])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(xp,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===xp,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,u=this.stateTransition;if(!($e(s,e)>=0&&(r||s.length===1))){var l;if(this.stateProxy&&!a&&(l=this.stateProxy(e)),l||(l=this.states&&this.states[e]),!l&&!a){ha("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(l);var f=!!(l&&l.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,l,this._normalState,r,!n&&!this.__inHover&&u&&u.duration>0,u);var c=this._textContent,h=this._textGuide;return c&&c.useState(e,r,n,f),h&&h.useState(e,r,n,f),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tr),l}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var u=0;u<o;u++)if(e[u]!==a[u]){s=!1;break}}if(s)return;for(var u=0;u<o;u++){var l=e[u],f=void 0;this.stateProxy&&(f=this.stateProxy(l,e)),f||(f=this.states[l]),f&&i.push(f)}var c=i[o-1],h=!!(c&&c.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!r&&!this.__inHover&&v&&v.duration>0,v);var g=this._textContent,p=this._textGuide;g&&g.useStates(e,r,h),p&&p.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Tr)}},t.prototype.isSilent=function(){for(var e=this.silent,r=this.parent;!e&&r;){if(r.silent){e=!0;break}r=r.parent}return e},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var r=this.animators[e];r.targetName&&r.changeTarget(this[r.targetName])}},t.prototype.removeState=function(e){var r=$e(this.currentStates,e);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=$e(i,e),o=$e(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i<e.length;i++){var a=e[i];ae(r,a),a.textConfig&&(n=n||{},ae(n,a.textConfig))}return n&&(r.textConfig=n),r},t.prototype._applyStateObj=function(e,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=ae({},i?this.textConfig:n.textConfig),ae(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var u={},l=!1,f=0;f<Sp.length;f++){var c=Sp[f],h=a&&oN[c];r&&r[c]!=null?h?(l=!0,u[c]=r[c]):this[c]=r[c]:s&&n[c]!=null&&(h?(l=!0,u[c]=n[c]):this[c]=n[c])}if(!a)for(var f=0;f<this.animators.length;f++){var d=this.animators[f],v=d.targetName;d.getLoop()||d.__changeFinalValue(v?(r||n)[v]:r||n)}l&&this._transitionState(e,u,o)},t.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var r=this.__zr;r&&e.addSelfToZr(r),e.__zr=r,e.__hostTarget=this},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var r=this._textContent;if(r!==e){if(r&&r!==e&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new au,this._attachComponent(e),this._textContent=e,this.markRedraw()}},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ae(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=Tr;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=e),n&&(n.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)e.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,r,n){var i=e?this[e]:this;if(process.env.NODE_ENV!=="production"&&!i){ha('Property "'+e+'" is not existed in element '+this.id);return}var a=new fp(i,r,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},t.prototype.addAnimator=function(e,r){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=$e(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},t.prototype.animateTo=function(e,r,n){Ep(this,e,r,n)},t.prototype.animateFrom=function(e,r,n){Ep(this,e,r,n,!0)},t.prototype._transitionState=function(e,r,n,i){for(var a=Ep(this,r,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Tr;var r={};function n(a,o,s){r[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),r[a+o+s]=!0)}function i(a,o,s,u){Object.defineProperty(e,a,{get:function(){if(process.env.NODE_ENV!=="production"&&n(a,s,u),!this[o]){var f=this[o]=[];l(this,f)}return this[o]},set:function(f){process.env.NODE_ENV!=="production"&&n(a,s,u),this[s]=f[0],this[u]=f[1],this[o]=f,l(this,f)}});function l(f,c){Object.defineProperty(c,0,{get:function(){return f[s]},set:function(h){f[s]=h}}),Object.defineProperty(c,1,{get:function(){return f[u]},set:function(h){f[u]=h}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();wn(If,_n),wn(If,au);function Ep(t,e,r,n,i){r=r||{};var a=[];mD(t,"",t,e,r,n,a,i);var o=a.length,s=!1,u=r.done,l=r.aborted,f=function(){s=!0,o--,o<=0&&(s?u&&u():l&&l())},c=function(){o--,o<=0&&(s?u&&u():l&&l())};o||u&&u(),a.length>0&&r.during&&a[0].during(function(v,g){r.during(g)});for(var h=0;h<a.length;h++){var d=a[h];f&&d.done(f),c&&d.aborted(c),r.force&&d.duration(r.duration),d.start(r.easing)}return a}function Ap(t,e,r){for(var n=0;n<r;n++)t[n]=e[n]}function uN(t){return Ht(t[0])}function lN(t,e,r){if(Ht(e[r]))if(Ht(t[r])||(t[r]=[]),tr(e[r])){var n=e[r].length;t[r].length!==n&&(t[r]=new e[r].constructor(n),Ap(t[r],e[r],n))}else{var i=e[r],a=t[r],o=i.length;if(uN(i))for(var s=i[0].length,u=0;u<o;u++)a[u]?Ap(a[u],i[u],s):a[u]=Array.prototype.slice.call(i[u]);else Ap(a,i,o);a.length=i.length}else t[r]=e[r]}function fN(t,e){return t===e||Ht(t)&&Ht(e)&&cN(t,e)}function cN(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function mD(t,e,r,n,i,a,o,s){for(var u=Xe(n),l=i.duration,f=i.delay,c=i.additive,h=i.setToFinal,d=!Ce(a),v=t.animators,g=[],p=0;p<u.length;p++){var m=u[p],y=n[m];if(y!=null&&r[m]!=null&&(d||a[m]))if(Ce(y)&&!Ht(y)&&!ff(y)){if(e){s||(r[m]=y,t.updateDuringAnimation(e));continue}mD(t,m,r[m],y,i,a&&a[m],o,s)}else g.push(m);else s||(r[m]=y,t.updateDuringAnimation(e),g.push(m))}var b=g.length;if(!c&&b)for(var C=0;C<v.length;C++){var w=v[C];if(w.targetName===e){var D=w.stopTracks(g);if(D){var _=$e(v,w);v.splice(_,1)}}}if(i.force||(g=yt(g,function(E){return!fN(n[E],r[E])}),b=g.length),b>0||i.force&&!o.length){var x=void 0,S=void 0,O=void 0;if(s){S={},h&&(x={});for(var C=0;C<b;C++){var m=g[C];S[m]=r[m],h?x[m]=n[m]:r[m]=n[m]}}else if(h){O={};for(var C=0;C<b;C++){var m=g[C];O[m]=ru(r[m]),lN(r,n,m)}}var w=new fp(r,!1,!1,c?yt(v,function(P){return P.targetName===e}):null);w.targetName=e,i.scope&&(w.scope=i.scope),h&&x&&w.whenWithKeys(0,x,g),O&&w.whenWithKeys(0,O,g),w.whenWithKeys(l??500,s?S:n,g).delay(f||0),t.addAnimator(w,e),o.push(w)}}var Lt=function(t){fe(e,t);function e(r){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(r){return this._children[r]},e.prototype.childOfName=function(r){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(r){if(r&&(r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),process.env.NODE_ENV!=="production"&&r.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=$e(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=$e(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},e.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},e.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},e.prototype.getBoundingRect=function(r){for(var n=new Ge(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var u=i[s];if(!(u.ignore||u.invisible)){var l=u.getBoundingRect(),f=u.getLocalTransform(a);f?(Ge.applyTransform(n,l,f),o=o||n.clone(),o.union(n)):(o=o||l.clone(),o.union(l))}}return o||n},e}(If);Lt.prototype.type="group";/*!
141
+ * ZRender, a high performance 2d drawing library.
142
+ *
143
+ * Copyright (c) 2013, Baidu Inc.
144
+ * All rights reserved.
145
+ *
146
+ * LICENSE
147
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
148
+ */var su={},yD={};function hN(t){delete yD[t]}function dN(t){if(!t)return!1;if(typeof t=="string")return Af(t,1)<mp;if(t.colorStops){for(var e=t.colorStops,r=0,n=e.length,i=0;i<n;i++)r+=Af(e[i].color,1);return r/=n,r<mp}return!1}var vN=function(){function t(e,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=e;var a=new R8,o=n.renderer||"canvas";if(su[o]||(o=Xe(su)[0]),process.env.NODE_ENV!=="production"&&!su[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new su[o](r,a,n,e),u=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var l=!Pe.node&&!Pe.worker&&!u?new nN(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,c=f==null||f==="auto"?Pe.touchEventsSupported:!!f,h=44,d;c&&(d=Be(n.pointerSize,h)),this.handler=new Fw(a,s,l,s.root,d),this.animation=new K8({stage:{update:u?null:function(){return i._flush(!0)}}}),u||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,r),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=dN(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var r,n=Lo();this._needsRefresh&&(r=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=Lo();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r<e.length;r++)e[r]instanceof Lt&&e[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,hN(this.id))},t}();function bD(t,e){var r=new vN(yw(),t,e);return yD[r.id]=r,r}function pN(t,e){su[t]=e}var CD=1e-4,wD=20;function gN(t){return t.replace(/^\s+|\s+$/g,"")}function Tp(t,e,r,n){var i=e[0],a=e[1],o=r[0],s=r[1],u=a-i,l=s-o;if(u===0)return l===0?o:(o+s)/2;if(n)if(u>0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/u*l+o}function st(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return me(t)?gN(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function At(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),wD),t=(+t).toFixed(e),r?t:+t}function Jn(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return Op(t)}function Op(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function mN(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function yN(t,e){var r=Xn(t,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=ge(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=ge(i,function(d){return Math.floor(d)}),s=Xn(o,function(d,v){return d+v},0),u=ge(i,function(d,v){return d-o[v]});s<a;){for(var l=Number.NEGATIVE_INFINITY,f=null,c=0,h=u.length;c<h;++c)u[c]>l&&(l=u[c],f=c);++o[f],u[f]=0,++s}return ge(o,function(d){return d/n})}function bN(t,e){var r=Math.max(Jn(t),Jn(e)),n=t+e;return r>wD?n:At(n,r)}function DD(t){var e=Math.PI*2;return(t%e+e)%e}function Nf(t){return t>-CD&&t<CD}var CN=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Qn(t){if(t instanceof Date)return t;if(me(t)){var e=CN.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(r-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function wN(t){return Math.pow(10,kf(t))}function kf(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function _D(t,e){var r=kf(t),n=Math.pow(10,r),i=t/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function Si(t){var e=parseFloat(t);return e==t&&(e!==0||!me(t)||t.indexOf("x")<=0)?e:NaN}function xD(t){return!isNaN(Si(t))}function SD(){return Math.round(Math.random()*9)}function ED(t,e){return e===0?t:ED(e,t%e)}function AD(t,e){return t==null?e:e==null?t:t*e/ED(t,e)}var DN="[ECharts] ",TD={},_N=typeof console<"u"&&console.warn&&console.log;function zf(t,e,r){if(_N){if(r){if(TD[e])return;TD[e]=!0}console[t](DN+e)}}function xN(t,e){zf("log",t,e)}function Dt(t,e){zf("warn",t,e)}function $t(t,e){zf("error",t,e)}function En(t){process.env.NODE_ENV!=="production"&&zf("warn","DEPRECATED: "+t,!0)}function Bt(t,e,r){process.env.NODE_ENV!=="production"&&En((r?"["+r+"]":"")+(t+" is deprecated, use "+e+" instead."))}function dr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r="";if(process.env.NODE_ENV!=="production"){var n=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":_o(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":_e(i)?"function () { ... }":Cw(i)?i+"":null};r=ge(t,function(i){if(me(i))return i;var a=n(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var u=n(s);return u??s})}catch{return"?"}else return"?"}).join(" ")}return r}function Ue(t){throw new Error(t)}function OD(t,e,r){return(e-t)*r+t}var PD="series\0",SN="\0_ec_\0";function pt(t){return t instanceof Array?t:t==null?[]:[t]}function Pp(t,e,r){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var BD=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function uu(t){return Ce(t)&&!ce(t)&&!(t instanceof Date)?t.value:t}function EN(t){return Ce(t)&&!(t instanceof Array)}function MD(t,e,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";t=t||[],e=(e||[]).slice();var o=Ae();N(e,function(u,l){if(!Ce(u)){e[l]=null;return}process.env.NODE_ENV!=="production"&&(u.id!=null&&!RD(u.id)&&LD(u.id),u.name!=null&&!RD(u.name)&&LD(u.name))});var s=AN(t,o,r);return(n||i)&&TN(s,t,o,e),n&&ON(s,e),n||i?PN(s,e,i):a&&BN(s,e),MN(s),s}function AN(t,e,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<t.length;i++){var a=t[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:r==="replaceMerge"||ko(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function TN(t,e,r,n){N(n,function(i,a){if(!(!i||i.id==null)){var o=lu(i.id),s=r.get(o);if(s!=null){var u=t[s];Ee(!u.newOption,'Duplicated option on id "'+o+'".'),u.newOption=i,u.existing=e[s],n[a]=null}}})}function ON(t,e){N(e,function(r,n){if(!(!r||r.name==null))for(var i=0;i<t.length;i++){var a=t[i].existing;if(!t[i].newOption&&a&&(a.id==null||r.id==null)&&!ko(r)&&!ko(a)&&FD("name",a,r)){t[i].newOption=r,e[n]=null;return}}})}function PN(t,e,r){N(e,function(n){if(n){for(var i,a=0;(i=t[a])&&(i.newOption||ko(i.existing)||i.existing&&n.id!=null&&!FD("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):t.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function BN(t,e){N(e,function(r){t.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function MN(t){var e=Ae();N(t,function(r){var n=r.existing;n&&e.set(n.id,r)}),N(t,function(r){var n=r.newOption;Ee(!n||n.id==null||!e.get(n.id)||e.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),N(t,function(r,n){var i=r.existing,a=r.newOption,o=r.keyInfo;if(Ce(a)){if(o.name=a.name!=null?lu(a.name):i?i.name:PD+n,i)o.id=lu(i.id);else if(a.id!=null)o.id=lu(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function FD(t,e,r){var n=vr(e[t],null),i=vr(r[t],null);return n!=null&&i!=null&&n===i}function lu(t){if(process.env.NODE_ENV!=="production"&&t==null)throw new Error;return vr(t,"")}function vr(t,e){return t==null?e:me(t)?t:rt(t)||lf(t)?t+"":e}function LD(t){process.env.NODE_ENV!=="production"&&Dt("`"+t+"` is invalid id or name. Must be a string or number.")}function RD(t){return lf(t)||xD(t)}function Bp(t){var e=t.name;return!!(e&&e.indexOf(PD))}function ko(t){return t&&t.id!=null&&lu(t.id).indexOf(SN)===0}function FN(t,e,r){N(t,function(n){var i=n.newOption;Ce(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=LN(e,i,n.existing,r))})}function LN(t,e,r,n){var i=e.type?e.type:r?r.subType:n.determineSubType(t,e);return i}function wa(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return ce(e.dataIndex)?ge(e.dataIndex,function(r){return t.indexOfRawIndex(r)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return ce(e.name)?ge(e.name,function(r){return t.indexOfName(r)}):t.indexOfName(e.name)}function ut(){var t="__ec_inner_"+RN++;return function(e){return e[t]||(e[t]={})}}var RN=SD();function Mp(t,e,r){var n=Fp(e,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,u=r?r.defaultMainType:null;return!i&&u&&a.set(u,{}),a.each(function(l,f){var c=fu(t,f,l,{useDefault:u===f,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[f+"Models"]=c.models,s[f+"Model"]=c.models[0]}),s}function Fp(t,e){var r;if(me(t)){var n={};n[t+"Index"]=0,r=n}else r=t;var i=Ae(),a={},o=!1;return N(r,function(s,u){if(u==="dataIndex"||u==="dataIndexInside"){a[u]=s;return}var l=u.match(/^(\w+)(Index|Id|Name)$/)||[],f=l[1],c=(l[2]||"").toLowerCase();if(!(!f||!c||e&&e.includeMainTypes&&$e(e.includeMainTypes,f)<0)){o=o||!!f;var h=i.get(f)||i.set(f,{});h[c]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var on={useDefault:!0,enableAll:!1,enableNone:!1};function fu(t,e,r,n){n=n||on;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var u=void 0;return s.models=n.useDefault&&(u=t.getComponent(e))?[u]:[],s}return i==="none"||i===!1?(Ee(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(Ee(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=t.queryComponents({mainType:e,index:i,id:a,name:o}),s)}function ID(t,e,r){t.setAttribute?t.setAttribute(e,r):t[e]=r}function IN(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function NN(t){return t==="auto"?Pe.domSupported?"html":"richText":t||"html"}function ND(t,e,r,n,i){var a=e==null||e==="auto";if(n==null)return n;if(rt(n)){var o=OD(r||0,n,i);return At(o,a?Math.max(Jn(r||0),Jn(n)):e)}else{if(me(n))return i<1?r:n;for(var s=[],u=r,l=n,f=Math.max(u?u.length:0,l.length),c=0;c<f;++c){var h=t.getDimensionInfo(c);if(h&&h.type==="ordinal")s[c]=(i<1&&u?u:l)[c];else{var d=u&&u[c]?u[c]:0,v=l[c],o=OD(d,v,i);s[c]=At(o,a?Math.max(Jn(d),Jn(v)):e)}}return s}}var kN=".",Da="___EC__COMPONENT__CONTAINER___",kD="___EC__EXTENDED_CLASS___";function An(t){var e={main:"",sub:""};if(t){var r=t.split(kN);e.main=r[0]||"",e.sub=r[1]||""}return e}function zN(t){Ee(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function jN(t){return!!(t&&t[kD])}function Lp(t,e){t.$constructor=t,t.extend=function(r){process.env.NODE_ENV!=="production"&&N(e,function(a){r[a]||console.warn("Method `"+a+"` should be implemented"+(r.type?" in "+r.type:"")+".")});var n=this,i;return VN(n)?i=function(a){fe(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},Z4(i,this)),ae(i.prototype,r),i[kD]=!0,i.extend=this.extend,i.superCall=$N,i.superApply=GN,i.superClass=n,i}}function VN(t){return _e(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function zD(t,e){t.extend=e.extend}var HN=Math.round(Math.random()*10);function WN(t){var e=["__\0is_clz",HN++].join("_");t.prototype[e]=!0,process.env.NODE_ENV!=="production"&&Ee(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(r){return!!(r&&r[e])}}function $N(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[e].apply(t,r)}function GN(t,e,r){return this.superClass.prototype[e].apply(t,r)}function jf(t){var e={};t.registerClass=function(n){var i=n.type||n.prototype.type;if(i){zN(i),n.prototype.type=i;var a=An(i);if(!a.sub)process.env.NODE_ENV!=="production"&&e[a.main]&&console.warn(a.main+" exists."),e[a.main]=n;else if(a.sub!==Da){var o=r(a);o[a.sub]=n}}return n},t.getClass=function(n,i,a){var o=e[n];if(o&&o[Da]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},t.getClassesByMainType=function(n){var i=An(n),a=[],o=e[i.main];return o&&o[Da]?N(o,function(s,u){u!==Da&&a.push(s)}):a.push(o),a},t.hasClass=function(n){var i=An(n);return!!e[i.main]},t.getAllClassMainTypes=function(){var n=[];return N(e,function(i,a){n.push(a)}),n},t.hasSubTypes=function(n){var i=An(n),a=e[i.main];return a&&a[Da]};function r(n){var i=e[n.main];return(!i||!i[Da])&&(i=e[n.main]={},i[Da]=!0),i}}function cu(t,e){for(var r=0;r<t.length;r++)t[r][1]||(t[r][1]=t[r][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<t.length;s++){var u=t[s][1];if(!(i&&$e(i,u)>=0||a&&$e(a,u)<0)){var l=n.getShallow(u,e);l!=null&&(o[t[s][0]]=l)}}return o}}var UN=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],qN=cu(UN),YN=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return qN(this,e,r)},t}(),Rp=new eu(50);function XN(t){if(typeof t=="string"){var e=Rp.get(t);return e&&e.image}else return t}function jD(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Rp.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Vf(e)&&a.pending.push(o)):(e=Co.loadImage(t,VD,VD),e.__zrImageSrc=t,Rp.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function VD(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function Vf(t){return t&&t.width&&t.height}var Ip=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function KN(t,e,r,n,i){if(!e)return"";var a=(t+"").split(`
149
+ `);i=HD(e,r,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=WD(a[o],i);return a.join(`
150
+ `)}function HD(t,e,r,n){n=n||{};var i=ae({},n);i.font=e,r=Be(r,"..."),i.maxIterations=Be(n.maxIterations,2);var a=i.minChar=Be(n.minChar,0);i.cnCharWidth=Or("国",e);var o=i.ascCharWidth=Or("a",e);i.placeholder=Be(n.placeholder,"");for(var s=t=Math.max(0,t-1),u=0;u<a&&s>=o;u++)s-=o;var l=Or(r,e);return l>s&&(r="",l=0),s=t-l,i.ellipsis=r,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=t,i}function WD(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var a=Or(t,n);if(a<=r)return t;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?ZN(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;t=t.substr(0,s),a=Or(t,n)}return t===""&&(t=e.placeholder),t}function ZN(t,e,r,n){for(var i=0,a=0,o=t.length;a<o&&i<e;a++){var s=t.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function JN(t,e){t!=null&&(t+="");var r=e.overflow,n=e.padding,i=e.font,a=r==="truncate",o=_p(i),s=Be(e.lineHeight,o),u=!!e.backgroundColor,l=e.lineOverflow==="truncate",f=e.width,c;f!=null&&(r==="break"||r==="breakAll")?c=t?GD(t,e.font,f,r==="breakAll",0).lines:[]:c=t?t.split(`
151
+ `):[];var h=c.length*s,d=Be(e.height,h);if(h>d&&l){var v=Math.floor(d/s);c=c.slice(0,v)}if(t&&a&&f!=null)for(var g=HD(f,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),p=0;p<c.length;p++)c[p]=WD(c[p],g);for(var m=d,y=0,p=0;p<c.length;p++)y=Math.max(Or(c[p],i),y);f==null&&(f=y);var b=y;return n&&(m+=n[0]+n[2],b+=n[1]+n[3],f+=n[1]+n[3]),u&&(b=f),{lines:c,height:d,outerWidth:b,outerHeight:m,lineHeight:s,calculatedLineHeight:o,contentWidth:y,contentHeight:h,width:f}}var QN=function(){function t(){}return t}(),$D=function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t}(),ek=function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return t}();function tk(t,e){var r=new ek;if(t!=null&&(t+=""),!t)return r;for(var n=e.width,i=e.height,a=e.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=Ip.lastIndex=0,u;(u=Ip.exec(t))!=null;){var l=u.index;l>s&&Np(r,t.substring(s,l),e,o),Np(r,u[2],e,o,u[1]),s=Ip.lastIndex}s<t.length&&Np(r,t.substring(s,t.length),e,o);var f=[],c=0,h=0,d=e.padding,v=a==="truncate",g=e.lineOverflow==="truncate";function p(k,W,I){k.width=W,k.lineHeight=I,c+=I,h=Math.max(h,W)}e:for(var m=0;m<r.lines.length;m++){for(var y=r.lines[m],b=0,C=0,w=0;w<y.tokens.length;w++){var D=y.tokens[w],_=D.styleName&&e.rich[D.styleName]||{},x=D.textPadding=_.padding,S=x?x[1]+x[3]:0,O=D.font=_.font||e.font;D.contentHeight=_p(O);var E=Be(_.height,D.contentHeight);if(D.innerHeight=E,x&&(E+=x[0]+x[2]),D.height=E,D.lineHeight=va(_.lineHeight,e.lineHeight,E),D.align=_&&_.align||e.align,D.verticalAlign=_&&_.verticalAlign||"middle",g&&i!=null&&c+D.lineHeight>i){w>0?(y.tokens=y.tokens.slice(0,w),p(y,C,b),r.lines=r.lines.slice(0,m+1)):r.lines=r.lines.slice(0,m);break e}var P=_.width,F=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")D.percentWidth=P,f.push(D),D.contentWidth=Or(D.text,O);else{if(F){var M=_.backgroundColor,B=M&&M.image;B&&(B=XN(B),Vf(B)&&(D.width=Math.max(D.width,B.width*E/B.height)))}var R=v&&n!=null?n-C:null;R!=null&&R<D.width?!F||R<S?(D.text="",D.width=D.contentWidth=0):(D.text=KN(D.text,R-S,O,e.ellipsis,{minChar:e.truncateMinChar}),D.width=D.contentWidth=Or(D.text,O)):D.contentWidth=Or(D.text,O)}D.width+=S,C+=D.width,_&&(b=Math.max(b,D.lineHeight))}p(y,C,b)}r.outerWidth=r.width=Be(n,h),r.outerHeight=r.height=Be(i,c),r.contentHeight=c,r.contentWidth=h,d&&(r.outerWidth+=d[1]+d[3],r.outerHeight+=d[0]+d[2]);for(var m=0;m<f.length;m++){var D=f[m],V=D.percentWidth;D.width=parseInt(V,10)/100*r.width}return r}function Np(t,e,r,n,i){var a=e==="",o=i&&r.rich[i]||{},s=t.lines,u=o.font||r.font,l=!1,f,c;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var v=xi(o.width,n.width)+d;s.length>0&&v+n.accumWidth>n.width&&(f=e.split(`
152
+ `),l=!0),n.accumWidth=v}else{var g=GD(e,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,c=g.linesWidths,f=g.lines}}else f=e.split(`
153
+ `);for(var p=0;p<f.length;p++){var m=f[p],y=new QN;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=c?c[p]:Or(m,u),!p&&!l){var b=(s[s.length-1]||(s[0]=new $D)).tokens,C=b.length;C===1&&b[0].isLineHolder?b[0]=y:(m||!C||a)&&b.push(y)}else s.push(new $D([y]))}}function rk(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var nk=Xn(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function ik(t){return rk(t)?!!nk[t]:!0}function GD(t,e,r,n,i){for(var a=[],o=[],s="",u="",l=0,f=0,c=0;c<t.length;c++){var h=t.charAt(c);if(h===`
154
+ `){u&&(s+=u,f+=l),a.push(s),o.push(f),s="",u="",l=0,f=0;continue}var d=Or(h,e),v=n?!1:!ik(h);if(a.length?f+d>r:i+f+d>r){f?(s||u)&&(v?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=h,l+=d,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=h,f=d)):v?(a.push(u),o.push(l),u=h,l=d):(a.push(h),o.push(d));continue}f+=d,v?(u+=h,l+=d):(u&&(s+=u,u="",l=0),s+=h)}return!a.length&&!s&&(s=t,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var kp="__zr_style_"+Math.round(Math.random()*10),_a={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Hf={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};_a[kp]=!0;var UD=["z","z2","invisible"],ak=["invisible"],Ei=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Xe(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):t.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ok(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},e.prototype.contain=function(r,n){return this.rectContain(r,n)},e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,u=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Ge(0,0,0,0)),n?Ge.applyTransform(r,i,n):r.copy(i),(o||s||u)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(u),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+u-o));var l=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-l),r.y=Math.floor(r.y-l),r.width=Math.ceil(r.width+1+l*2),r.height=Math.ceil(r.height+1+l*2))}return r},e.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Ge(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(r){return this.animate("style",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(r,n){r!=="style"?t.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:ae(this.style,r),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Js,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Js)},e.prototype.styleUpdated=function(){this.__dirty&=~Js},e.prototype.createStyle=function(r){return hf(_a,r)},e.prototype.useStyle=function(r){r[kp]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},e.prototype.isStyleObject=function(r){return r[kp]},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,UD)},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.style?o?a?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var f=this.style;if(this.style=this.createStyle(u?{}:f),u)for(var c=Xe(f),h=0;h<c.length;h++){var d=c[h];d in l&&(l[d]=l[d],this.style[d]=f[d])}for(var v=Xe(l),h=0;h<v.length;h++){var d=v[h];this.style[d]=this.style[d]}this._transitionState(r,{style:l},s,this.getAnimationStyleProps())}else this.useStyle(l);for(var g=this.__inHover?ak:UD,h=0;h<g.length;h++){var d=g[h];n&&n[d]!=null?this[d]=n[d]:u&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(r,n){return ae(r,n),r},e.prototype.getAnimationStyleProps=function(){return Hf},e.initDefaultProps=function(){var r=e.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Tr|Js}(),e}(If),zp=new Ge(0,0,0,0),jp=new Ge(0,0,0,0);function ok(t,e,r){return zp.copy(t.getBoundingRect()),t.transform&&zp.applyTransform(t.transform),jp.width=e,jp.height=r,!zp.intersect(jp)}var pr=Math.min,gr=Math.max,Vp=Math.sin,Hp=Math.cos,xa=Math.PI*2,Wf=xo(),$f=xo(),Gf=xo();function qD(t,e,r){if(t.length!==0){for(var n=t[0],i=n[0],a=n[0],o=n[1],s=n[1],u=1;u<t.length;u++)n=t[u],i=pr(i,n[0]),a=gr(a,n[0]),o=pr(o,n[1]),s=gr(s,n[1]);e[0]=i,e[1]=o,r[0]=a,r[1]=s}}function YD(t,e,r,n,i,a){i[0]=pr(t,r),i[1]=pr(e,n),a[0]=gr(t,r),a[1]=gr(e,n)}var XD=[],KD=[];function sk(t,e,r,n,i,a,o,s,u,l){var f=Gw,c=Pt,h=f(t,r,i,o,XD);u[0]=1/0,u[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var d=0;d<h;d++){var v=c(t,r,i,o,XD[d]);u[0]=pr(v,u[0]),l[0]=gr(v,l[0])}h=f(e,n,a,s,KD);for(var d=0;d<h;d++){var g=c(e,n,a,s,KD[d]);u[1]=pr(g,u[1]),l[1]=gr(g,l[1])}u[0]=pr(t,u[0]),l[0]=gr(t,l[0]),u[0]=pr(o,u[0]),l[0]=gr(o,l[0]),u[1]=pr(e,u[1]),l[1]=gr(e,l[1]),u[1]=pr(s,u[1]),l[1]=gr(s,l[1])}function uk(t,e,r,n,i,a,o,s){var u=Yw,l=Wt,f=gr(pr(u(t,r,i),1),0),c=gr(pr(u(e,n,a),1),0),h=l(t,r,i,f),d=l(e,n,a,c);o[0]=pr(t,i,h),o[1]=pr(e,a,d),s[0]=gr(t,i,h),s[1]=gr(e,a,d)}function lk(t,e,r,n,i,a,o,s,u){var l=Eo,f=Ao,c=Math.abs(i-a);if(c%xa<1e-4&&c>1e-4){s[0]=t-r,s[1]=e-n,u[0]=t+r,u[1]=e+n;return}if(Wf[0]=Hp(i)*r+t,Wf[1]=Vp(i)*n+e,$f[0]=Hp(a)*r+t,$f[1]=Vp(a)*n+e,l(s,Wf,$f),f(u,Wf,$f),i=i%xa,i<0&&(i=i+xa),a=a%xa,a<0&&(a=a+xa),i>a&&!o?a+=xa:i<a&&o&&(i+=xa),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(Gf[0]=Hp(d)*r+t,Gf[1]=Vp(d)*n+e,l(s,Gf,s),f(u,Gf,u))}var nt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Sa=[],Ea=[],Tn=[],Ai=[],On=[],Pn=[],Wp=Math.min,$p=Math.max,Aa=Math.cos,Ta=Math.sin,ei=Math.abs,Gp=Math.PI,Ti=Gp*2,Up=typeof Float32Array<"u",hu=[];function qp(t){var e=Math.round(t/Gp*1e8)/1e8;return e%2*Gp}function ZD(t,e){var r=qp(t[0]);r<0&&(r+=Ti);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ti?i=r+Ti:e&&r-i>=Ti?i=r-Ti:!e&&r>i?i=r+(Ti-qp(r-i)):e&&r<i&&(i=r-(Ti-qp(i-r))),t[0]=r,t[1]=i}var ti=function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,r,n){n=n||0,n>0&&(this._ux=ei(n/Lf/e)||0,this._uy=ei(n/Lf/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(nt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=ei(e-this._xi),i=ei(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(nt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(nt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(nt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),hu[0]=i,hu[1]=a,ZD(hu,o),i=hu[0],a=hu[1];var s=a-i;return this.addData(nt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Aa(a)*n+e,this._yi=Ta(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(nt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(nt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&Up&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=e[n];this._len=r},t.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var r=e.length,n=0,i=this._len,a=0;a<r;a++)n+=e[a].len();Up&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<r;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},t.prototype.addData=function(e,r,n,i,a,o,s,u,l){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var c=0;c<arguments.length;c++)f[this._len++]=arguments[c]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r<this._len;r++)e[r]=this.data[r];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Up&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Tn[0]=Tn[1]=On[0]=On[1]=Number.MAX_VALUE,Ai[0]=Ai[1]=Pn[0]=Pn[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],u=o===1;switch(u&&(r=e[o],n=e[o+1],i=r,a=n),s){case nt.M:r=i=e[o++],n=a=e[o++],On[0]=i,On[1]=a,Pn[0]=i,Pn[1]=a;break;case nt.L:YD(r,n,e[o],e[o+1],On,Pn),r=e[o++],n=e[o++];break;case nt.C:sk(r,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],On,Pn),r=e[o++],n=e[o++];break;case nt.Q:uk(r,n,e[o++],e[o++],e[o],e[o+1],On,Pn),r=e[o++],n=e[o++];break;case nt.A:var l=e[o++],f=e[o++],c=e[o++],h=e[o++],d=e[o++],v=e[o++]+d;o+=1;var g=!e[o++];u&&(i=Aa(d)*c+l,a=Ta(d)*h+f),lk(l,f,c,h,d,v,g,On,Pn),r=Aa(v)*c+l,n=Ta(v)*h+f;break;case nt.R:i=r=e[o++],a=n=e[o++];var p=e[o++],m=e[o++];YD(i,a,i+p,a+m,On,Pn);break;case nt.Z:r=i,n=a;break}Eo(Tn,Tn,On),Ao(Ai,Ai,Pn)}return o===0&&(Tn[0]=Tn[1]=Ai[0]=Ai[1]=0),new Ge(Tn[0],Tn[1],Ai[0]-Tn[0],Ai[1]-Tn[1])},t.prototype._calculateLength=function(){var e=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,u=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,f=0,c=0,h=0;h<r;){var d=e[h++],v=h===1;v&&(a=e[h],o=e[h+1],s=a,u=o);var g=-1;switch(d){case nt.M:a=s=e[h++],o=u=e[h++];break;case nt.L:{var p=e[h++],m=e[h++],y=p-a,b=m-o;(ei(y)>n||ei(b)>i||h===r-1)&&(g=Math.sqrt(y*y+b*b),a=p,o=m);break}case nt.C:{var C=e[h++],w=e[h++],p=e[h++],m=e[h++],D=e[h++],_=e[h++];g=I8(a,o,C,w,p,m,D,_,10),a=D,o=_;break}case nt.Q:{var C=e[h++],w=e[h++],p=e[h++],m=e[h++];g=k8(a,o,C,w,p,m,10),a=p,o=m;break}case nt.A:var x=e[h++],S=e[h++],O=e[h++],E=e[h++],P=e[h++],F=e[h++],M=F+P;h+=1,v&&(s=Aa(P)*O+x,u=Ta(P)*E+S),g=$p(O,E)*Wp(Ti,Math.abs(F)),a=Aa(M)*O+x,o=Ta(M)*E+S;break;case nt.R:{s=a=e[h++],u=o=e[h++];var B=e[h++],R=e[h++];g=B*2+R*2;break}case nt.Z:{var y=s-a,b=u-o;g=Math.sqrt(y*y+b*b),a=s,o=u;break}}g>=0&&(l[c++]=g,f+=g)}return this._pathLen=f,f},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,u,l,f,c,h,d=r<1,v,g,p=0,m=0,y,b=0,C,w;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,g=this._pathLen,y=r*g,!y)))e:for(var D=0;D<o;){var _=n[D++],x=D===1;switch(x&&(l=n[D],f=n[D+1],s=l,u=f),_!==nt.L&&b>0&&(e.lineTo(C,w),b=0),_){case nt.M:s=l=n[D++],u=f=n[D++],e.moveTo(l,f);break;case nt.L:{c=n[D++],h=n[D++];var S=ei(c-l),O=ei(h-f);if(S>i||O>a){if(d){var E=v[m++];if(p+E>y){var P=(y-p)/E;e.lineTo(l*(1-P)+c*P,f*(1-P)+h*P);break e}p+=E}e.lineTo(c,h),l=c,f=h,b=0}else{var F=S*S+O*O;F>b&&(C=c,w=h,b=F)}break}case nt.C:{var M=n[D++],B=n[D++],R=n[D++],V=n[D++],k=n[D++],W=n[D++];if(d){var E=v[m++];if(p+E>y){var P=(y-p)/E;Di(l,M,R,k,P,Sa),Di(f,B,V,W,P,Ea),e.bezierCurveTo(Sa[1],Ea[1],Sa[2],Ea[2],Sa[3],Ea[3]);break e}p+=E}e.bezierCurveTo(M,B,R,V,k,W),l=k,f=W;break}case nt.Q:{var M=n[D++],B=n[D++],R=n[D++],V=n[D++];if(d){var E=v[m++];if(p+E>y){var P=(y-p)/E;_f(l,M,R,P,Sa),_f(f,B,V,P,Ea),e.quadraticCurveTo(Sa[1],Ea[1],Sa[2],Ea[2]);break e}p+=E}e.quadraticCurveTo(M,B,R,V),l=R,f=V;break}case nt.A:var I=n[D++],q=n[D++],Z=n[D++],J=n[D++],ne=n[D++],G=n[D++],L=n[D++],Y=!n[D++],j=Z>J?Z:J,U=ei(Z-J)>.001,Q=ne+G,K=!1;if(d){var E=v[m++];p+E>y&&(Q=ne+G*(y-p)/E,K=!0),p+=E}if(U&&e.ellipse?e.ellipse(I,q,Z,J,L,ne,Q,Y):e.arc(I,q,j,ne,Q,Y),K)break e;x&&(s=Aa(ne)*Z+I,u=Ta(ne)*J+q),l=Aa(Q)*Z+I,f=Ta(Q)*J+q;break;case nt.R:s=l=n[D],u=f=n[D+1],c=n[D++],h=n[D++];var X=n[D++],le=n[D++];if(d){var E=v[m++];if(p+E>y){var se=y-p;e.moveTo(c,h),e.lineTo(c+Wp(se,X),h),se-=X,se>0&&e.lineTo(c+X,h+Wp(se,le)),se-=le,se>0&&e.lineTo(c+$p(X-se,0),h+le),se-=X,se>0&&e.lineTo(c,h+$p(le-se,0));break e}p+=E}e.rect(c,h,X,le);break;case nt.Z:if(d){var E=v[m++];if(p+E>y){var P=(y-p)/E;e.lineTo(l*(1-P)+s*P,f*(1-P)+u*P);break e}p+=E}e.closePath(),l=s,f=u}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=nt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function zo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,u=0,l=t;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>r+s||a<t-s&&a<r-s)return!1;if(t!==r)u=(e-n)/(t-r),l=(t*n-r*e)/(t-r);else return Math.abs(a-t)<=s/2;var f=u*a-o+l,c=f*f/(u*u+1);return c<=s/2*s/2}function fk(t,e,r,n,i,a,o,s,u,l,f){if(u===0)return!1;var c=u;if(f>e+c&&f>n+c&&f>a+c&&f>s+c||f<e-c&&f<n-c&&f<a-c&&f<s-c||l>t+c&&l>r+c&&l>i+c&&l>o+c||l<t-c&&l<r-c&&l<i-c&&l<o-c)return!1;var h=Uw(t,e,r,n,i,a,o,s,l,f,null);return h<=c/2}function ck(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;if(u>e+l&&u>n+l&&u>a+l||u<e-l&&u<n-l&&u<a-l||s>t+l&&s>r+l&&s>i+l||s<t-l&&s<r-l&&s<i-l)return!1;var f=Xw(t,e,r,n,i,a,s,u,null);return f<=l/2}var JD=Math.PI*2;function ri(t){return t%=JD,t<0&&(t+=JD),t}var du=Math.PI*2;function hk(t,e,r,n,i,a,o,s,u){if(o===0)return!1;var l=o;s-=t,u-=e;var f=Math.sqrt(s*s+u*u);if(f-l>r||f+l<r)return!1;if(Math.abs(n-i)%du<1e-4)return!0;if(a){var c=n;n=ri(i),i=ri(c)}else n=ri(n),i=ri(i);n>i&&(i+=du);var h=Math.atan2(u,s);return h<0&&(h+=du),h>=n&&h<=i||h+du>=n&&h+du<=i}function Oa(t,e,r,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var u=o*(r-t)+t;return u===i?1/0:u>i?s:0}var Oi=ti.CMD,Pa=Math.PI*2,dk=1e-4;function vk(t,e){return Math.abs(t-e)<dk}var rr=[-1,-1,-1],Wr=[-1,-1];function pk(){var t=Wr[0];Wr[0]=Wr[1],Wr[1]=t}function gk(t,e,r,n,i,a,o,s,u,l){if(l>e&&l>n&&l>a&&l>s||l<e&&l<n&&l<a&&l<s)return 0;var f=Df(e,n,a,s,l,rr);if(f===0)return 0;for(var c=0,h=-1,d=void 0,v=void 0,g=0;g<f;g++){var p=rr[g],m=p===0||p===1?.5:1,y=Pt(t,r,i,o,p);y<u||(h<0&&(h=Gw(e,n,a,s,Wr),Wr[1]<Wr[0]&&h>1&&pk(),d=Pt(e,n,a,s,Wr[0]),h>1&&(v=Pt(e,n,a,s,Wr[1]))),h===2?p<Wr[0]?c+=d<e?m:-m:p<Wr[1]?c+=v<d?m:-m:c+=s<v?m:-m:p<Wr[0]?c+=d<e?m:-m:c+=s<d?m:-m)}return c}function mk(t,e,r,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var u=N8(e,n,a,s,rr);if(u===0)return 0;var l=Yw(e,n,a);if(l>=0&&l<=1){for(var f=0,c=Wt(e,n,a,l),h=0;h<u;h++){var d=rr[h]===0||rr[h]===1?.5:1,v=Wt(t,r,i,rr[h]);v<o||(rr[h]<l?f+=c<e?d:-d:f+=a<c?d:-d)}return f}else{var d=rr[0]===0||rr[0]===1?.5:1,v=Wt(t,r,i,rr[0]);return v<o?0:a<e?d:-d}}function yk(t,e,r,n,i,a,o,s){if(s-=e,s>r||s<-r)return 0;var u=Math.sqrt(r*r-s*s);rr[0]=-u,rr[1]=u;var l=Math.abs(n-i);if(l<1e-4)return 0;if(l>=Pa-1e-4){n=0,i=Pa;var f=a?1:-1;return o>=rr[0]+t&&o<=rr[1]+t?f:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=Pa,i+=Pa);for(var h=0,d=0;d<2;d++){var v=rr[d];if(v+t>o){var g=Math.atan2(s,v),f=a?1:-1;g<0&&(g=Pa+g),(g>=n&&g<=i||g+Pa>=n&&g+Pa<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(f=-f),h+=f)}}return h}function QD(t,e,r,n,i){for(var a=t.data,o=t.len(),s=0,u=0,l=0,f=0,c=0,h,d,v=0;v<o;){var g=a[v++],p=v===1;switch(g===Oi.M&&v>1&&(r||(s+=Oa(u,l,f,c,n,i))),p&&(u=a[v],l=a[v+1],f=u,c=l),g){case Oi.M:f=a[v++],c=a[v++],u=f,l=c;break;case Oi.L:if(r){if(zo(u,l,a[v],a[v+1],e,n,i))return!0}else s+=Oa(u,l,a[v],a[v+1],n,i)||0;u=a[v++],l=a[v++];break;case Oi.C:if(r){if(fk(u,l,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=gk(u,l,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;u=a[v++],l=a[v++];break;case Oi.Q:if(r){if(ck(u,l,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=mk(u,l,a[v++],a[v++],a[v],a[v+1],n,i)||0;u=a[v++],l=a[v++];break;case Oi.A:var m=a[v++],y=a[v++],b=a[v++],C=a[v++],w=a[v++],D=a[v++];v+=1;var _=!!(1-a[v++]);h=Math.cos(w)*b+m,d=Math.sin(w)*C+y,p?(f=h,c=d):s+=Oa(u,l,h,d,n,i);var x=(n-m)*C/b+m;if(r){if(hk(m,y,C,w,w+D,_,e,x,i))return!0}else s+=yk(m,y,C,w,w+D,_,x,i);u=Math.cos(w+D)*b+m,l=Math.sin(w+D)*C+y;break;case Oi.R:f=u=a[v++],c=l=a[v++];var S=a[v++],O=a[v++];if(h=f+S,d=c+O,r){if(zo(f,c,h,c,e,n,i)||zo(h,c,h,d,e,n,i)||zo(h,d,f,d,e,n,i)||zo(f,d,f,c,e,n,i))return!0}else s+=Oa(h,c,h,d,n,i),s+=Oa(f,d,f,c,n,i);break;case Oi.Z:if(r){if(zo(u,l,f,c,e,n,i))return!0}else s+=Oa(u,l,f,c,n,i);u=f,l=c;break}}return!r&&!vk(l,c)&&(s+=Oa(u,l,f,c,n,i)||0),s!==0}function bk(t,e,r){return QD(t,0,!1,e,r)}function Ck(t,e,r,n){return QD(t,e,!0,r,n)}var e_=ke({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},_a),wk={style:ke({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Hf.style)},Yp=Sn.concat(["invisible","culling","z","z2","zlevel","parent"]),ze=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(u){r.buildPath(u,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<Yp.length;++s)i[Yp[s]]=this[Yp[s]];i.__dirty|=Tr}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Xe(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?ae(this.style,s):this.useStyle(s):o==="shape"?ae(this.shape,s):t.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(me(r)){var n=Af(r,0);return n>.5?yp:n>.2?iN:bp}else if(r)return bp}return yp},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(me(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Af(r,0)<mp;if(a===o)return n}},e.prototype.buildPath=function(r,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~Bo},e.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},e.prototype.createPathProxy=function(){this.path=new ti(!1)},e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Bo)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var u=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;l=Math.max(l,f??4)}u>1e-10&&(s.width+=l/u,s.height+=l/u,s.x-=l/u/2,s.y-=l/u/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var u=o.lineWidth,l=o.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),Ck(s,u/l,r,n)))return!0}if(this.hasFill())return bk(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Bo,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:ae(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Bo)},e.prototype.createStyle=function(r){return hf(e_,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=ae({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.shape?o?a?l=n.shape:(l=ae({},i.shape),ae(l,n.shape)):(l=ae({},a?this.shape:i.shape),ae(l,n.shape)):u&&(l=i.shape),l)if(o){this.shape=ae({},this.shape);for(var f={},c=Xe(l),h=0;h<c.length;h++){var d=c[h];typeof l[d]=="object"?this.shape[d]=l[d]:f[d]=l[d]}this._transitionState(r,{shape:f},s)}else this.shape=l,this.dirtyShape()},e.prototype._mergeStates=function(r){for(var n=t.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return wk},e.prototype.isZeroArea=function(){return!1},e.extend=function(r){var n=function(a){fe(o,a);function o(s){var u=a.call(this,s)||this;return r.init&&r.init.call(u,s),u}return o.prototype.getDefaultStyle=function(){return We(r.style)},o.prototype.getDefaultShape=function(){return We(r.shape)},o}(e);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);return n},e.initDefaultProps=function(){var r=e.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=Tr|Js|Bo}(),e}(Ei),Dk=ke({strokeFirst:!0,font:ca,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},e_),Uf=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return n!=null&&n!=="none"&&r.lineWidth>0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return hf(Dk,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=Dp(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(Ei);Uf.prototype.type="tspan";var _k=ke({x:0,y:0},_a),xk={style:ke({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Hf.style)};function Sk(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var ni=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return hf(_k,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=Sk(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return xk},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Ge(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Ei);ni.prototype.type="image";function Ek(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,u,l,f;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=u=l=f=o:o instanceof Array?o.length===1?s=u=l=f=o[0]:o.length===2?(s=l=o[0],u=f=o[1]):o.length===3?(s=o[0],u=f=o[1],l=o[2]):(s=o[0],u=o[1],l=o[2],f=o[3]):s=u=l=f=0;var c;s+u>i&&(c=s+u,s*=i/c,u*=i/c),l+f>i&&(c=l+f,l*=i/c,f*=i/c),u+l>a&&(c=u+l,u*=a/c,l*=a/c),s+f>a&&(c=s+f,s*=a/c,f*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-u,n),u!==0&&t.arc(r+i-u,n+u,u,-Math.PI/2,0),t.lineTo(r+i,n+a-l),l!==0&&t.arc(r+i-l,n+a-l,l,0,Math.PI/2),t.lineTo(r+f,n+a),f!==0&&t.arc(r+f,n+a-f,f,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var jo=Math.round;function t_(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(jo(n*2)===jo(i*2)&&(t.x1=t.x2=Ba(n,s,!0)),jo(a*2)===jo(o*2)&&(t.y1=t.y2=Ba(a,s,!0))),t}}function r_(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Ba(n,s,!0),t.y=Ba(i,s,!0),t.width=Math.max(Ba(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Ba(i+o,s,!1)-t.y,o===0?0:1)),t}}function Ba(t,e,r){if(!e)return t;var n=jo(t*2);return(n+jo(e))%2===0?n/2:(n+(r?1:-1))/2}var Ak=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Tk={},_t=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Ak},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=r_(Tk,n,this.style);i=u.x,a=u.y,o=u.width,s=u.height,u.r=n.r,n=u}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Ek(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ze);_t.prototype.type="rect";var n_={fill:"#000"},i_=2,Ok={style:ke({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Hf.style)},Tt=function(t){fe(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=n_,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r<this._children.length;r++){var n=this._children[r];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):t.prototype.getLocalTransform.call(this,r)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Lk(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(r){t.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},e.prototype.removeSelfFromZr=function(r){t.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Ge(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],u=s.getBoundingRect(),l=s.getLocalTransform(i);l?(r.copy(u),r.applyTransform(l),a=a||r.clone(),a.union(r)):(a=a||u.clone(),a.union(u))}this._rect=a||r}return this._rect},e.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||n_},e.prototype.setTextContent=function(r){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},e.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return ae(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},e.prototype._mergeRich=function(r,n){for(var i=Xe(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},ae(r[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Ok},e.prototype._getOrCreateChild=function(r){var n=this._children[this._childCursor];return(!n||!(n instanceof r))&&(n=new r),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||ca,i=r.padding,a=c_(r),o=JN(a,r),s=Xp(r),u=!!r.backgroundColor,l=o.outerHeight,f=o.outerWidth,c=o.contentWidth,h=o.lines,d=o.lineHeight,v=this._defaultStyle,g=r.x||0,p=r.y||0,m=r.align||v.align||"left",y=r.verticalAlign||v.verticalAlign||"top",b=g,C=Io(p,o.contentHeight,y);if(s||i){var w=ou(g,f,m),D=Io(p,l,y);s&&this._renderBackground(r,r,w,D,f,l)}C+=d/2,i&&(b=f_(g,m,i),y==="top"?C+=i[0]:y==="bottom"&&(C-=i[2]));for(var _=0,x=!1,S=l_("fill"in r?r.fill:(x=!0,v.fill)),O=u_("stroke"in r?r.stroke:!u&&(!v.autoStroke||x)?(_=i_,v.stroke):null),E=r.textShadowBlur>0,P=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),F=o.calculatedLineHeight,M=0;M<h.length;M++){var B=this._getOrCreateChild(Uf),R=B.createStyle();B.useStyle(R),R.text=h[M],R.x=b,R.y=C,m&&(R.textAlign=m),R.textBaseline="middle",R.opacity=r.opacity,R.strokeFirst=!0,E&&(R.shadowBlur=r.textShadowBlur||0,R.shadowColor=r.textShadowColor||"transparent",R.shadowOffsetX=r.textShadowOffsetX||0,R.shadowOffsetY=r.textShadowOffsetY||0),R.stroke=O,R.fill=S,O&&(R.lineWidth=r.lineWidth||_,R.lineDash=r.lineDash,R.lineDashOffset=r.lineDashOffset||0),R.font=n,o_(R,r),C+=d,P&&B.setBoundingRect(new Ge(ou(R.x,r.width,R.textAlign),Io(R.y,F,R.textBaseline),c,F))}},e.prototype._updateRichTexts=function(){var r=this.style,n=c_(r),i=tk(n,r),a=i.width,o=i.outerWidth,s=i.outerHeight,u=r.padding,l=r.x||0,f=r.y||0,c=this._defaultStyle,h=r.align||c.align,d=r.verticalAlign||c.verticalAlign,v=ou(l,o,h),g=Io(f,s,d),p=v,m=g;u&&(p+=u[3],m+=u[0]);var y=p+a;Xp(r)&&this._renderBackground(r,r,v,g,o,s);for(var b=!!r.backgroundColor,C=0;C<i.lines.length;C++){for(var w=i.lines[C],D=w.tokens,_=D.length,x=w.lineHeight,S=w.width,O=0,E=p,P=y,F=_-1,M=void 0;O<_&&(M=D[O],!M.align||M.align==="left");)this._placeToken(M,r,x,m,E,"left",b),S-=M.width,E+=M.width,O++;for(;F>=0&&(M=D[F],M.align==="right");)this._placeToken(M,r,x,m,P,"right",b),S-=M.width,P-=M.width,F--;for(E+=(a-(E-p)-(y-P)-S)/2;O<=F;)M=D[O],this._placeToken(M,r,x,m,E+M.width/2,"center",b),E+=M.width,O++;m+=x}},e.prototype._placeToken=function(r,n,i,a,o,s,u){var l=n.rich[r.styleName]||{};l.text=r.text;var f=r.verticalAlign,c=a+i/2;f==="top"?c=a+r.height/2:f==="bottom"&&(c=a+i-r.height/2);var h=!r.isLineHolder&&Xp(l);h&&this._renderBackground(l,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!l.backgroundColor,v=r.textPadding;v&&(o=f_(o,s,v),c-=r.height/2-v[0]-r.innerHeight/2);var g=this._getOrCreateChild(Uf),p=g.createStyle();g.useStyle(p);var m=this._defaultStyle,y=!1,b=0,C=l_("fill"in l?l.fill:"fill"in n?n.fill:(y=!0,m.fill)),w=u_("stroke"in l?l.stroke:"stroke"in n?n.stroke:!d&&!u&&(!m.autoStroke||y)?(b=i_,m.stroke):null),D=l.textShadowBlur>0||n.textShadowBlur>0;p.text=r.text,p.x=o,p.y=c,D&&(p.shadowBlur=l.textShadowBlur||n.textShadowBlur||0,p.shadowColor=l.textShadowColor||n.textShadowColor||"transparent",p.shadowOffsetX=l.textShadowOffsetX||n.textShadowOffsetX||0,p.shadowOffsetY=l.textShadowOffsetY||n.textShadowOffsetY||0),p.textAlign=s,p.textBaseline="middle",p.font=r.font||ca,p.opacity=va(l.opacity,n.opacity,1),o_(p,l),w&&(p.lineWidth=va(l.lineWidth,n.lineWidth,b),p.lineDash=Be(l.lineDash,n.lineDash),p.lineDashOffset=n.lineDashOffset||0,p.stroke=w),C&&(p.fill=C);var _=r.contentWidth,x=r.contentHeight;g.setBoundingRect(new Ge(ou(p.x,_,p.textAlign),Io(p.y,x,p.textBaseline),_,x))},e.prototype._renderBackground=function(r,n,i,a,o,s){var u=r.backgroundColor,l=r.borderWidth,f=r.borderColor,c=u&&u.image,h=u&&!c,d=r.borderRadius,v=this,g,p;if(h||r.lineHeight||l&&f){g=this._getOrCreateChild(_t),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(h){var y=g.style;y.fill=u||null,y.fillOpacity=Be(r.fillOpacity,1)}else if(c){p=this._getOrCreateChild(ni),p.onload=function(){v.dirtyStyle()};var b=p.style;b.image=u.image,b.x=i,b.y=a,b.width=o,b.height=s}if(l&&f){var y=g.style;y.lineWidth=l,y.stroke=f,y.strokeOpacity=Be(r.strokeOpacity,1),y.lineDash=r.borderDash,y.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var C=(g||p).style;C.shadowBlur=r.shadowBlur||0,C.shadowColor=r.shadowColor||"transparent",C.shadowOffsetX=r.shadowOffsetX||0,C.shadowOffsetY=r.shadowOffsetY||0,C.opacity=va(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return Fk(r)&&(n=[r.fontStyle,r.fontWeight,Mk(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Dn(n)||r.textFont||r.font},e}(Ei),Pk={left:!0,right:1,center:1},Bk={top:1,bottom:1,middle:1},a_=["fontStyle","fontWeight","fontSize","fontFamily"];function Mk(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?Rv+"px":t+"px"}function o_(t,e){for(var r=0;r<a_.length;r++){var n=a_[r],i=e[n];i!=null&&(t[n]=i)}}function Fk(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function Lk(t){return s_(t),N(t.rich,s_),t}function s_(t){if(t){t.font=Tt.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||Pk[e]?e:"left";var r=t.verticalAlign;r==="center"&&(r="middle"),t.verticalAlign=r==null||Bk[r]?r:"top";var n=t.padding;n&&(t.padding=ww(t.padding))}}function u_(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function l_(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function f_(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function c_(t){var e=t.text;return e!=null&&(e+=""),e}function Xp(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var je=ut(),Rk=function(t,e,r,n){if(n){var i=je(n);i.dataIndex=r,i.dataType=e,i.seriesIndex=t,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=je(a);o.seriesIndex=t,o.dataIndex=r,o.dataType=e,o.ssrType="chart"})}},h_=1,d_={},v_=ut(),Kp=ut(),Zp=0,qf=1,Yf=2,$r=["emphasis","blur","select"],Xf=["normal","emphasis","blur","select"],Ik=10,Nk=9,Ma="highlight",Kf="downplay",vu="select",Zf="unselect",pu="toggleSelect";function Vo(t){return t!=null&&t!=="none"}function Jf(t,e,r){t.onHoverStateChange&&(t.hoverState||0)!==r&&t.onHoverStateChange(e),t.hoverState=r}function p_(t){Jf(t,"emphasis",Yf)}function g_(t){t.hoverState===Yf&&Jf(t,"normal",Zp)}function Jp(t){Jf(t,"blur",qf)}function m_(t){t.hoverState===qf&&Jf(t,"normal",Zp)}function kk(t){t.selected=!0}function zk(t){t.selected=!1}function y_(t,e,r){e(t,r)}function ii(t,e,r){y_(t,e,r),t.isGroup&&t.traverse(function(n){y_(n,e,r)})}function b_(t,e){switch(e){case"emphasis":t.hoverState=Yf;break;case"normal":t.hoverState=Zp;break;case"blur":t.hoverState=qf;break;case"select":t.selected=!0}}function jk(t,e,r,n){for(var i=t.style,a={},o=0;o<e.length;o++){var s=e[o],u=i[s];a[s]=u??(n&&n[s])}for(var o=0;o<t.animators.length;o++){var l=t.animators[o];l.__fromStateTransition&&l.__fromStateTransition.indexOf(r)<0&&l.targetName==="style"&&l.saveTo(a,e)}return a}function Vk(t,e,r,n){var i=r&&$e(r,"select")>=0,a=!1;if(t instanceof ze){var o=v_(t),s=i&&o.selectFill||o.normalFill,u=i&&o.selectStroke||o.normalStroke;if(Vo(s)||Vo(u)){n=n||{};var l=n.style||{};l.fill==="inherit"?(a=!0,n=ae({},n),l=ae({},l),l.fill=s):!Vo(l.fill)&&Vo(s)?(a=!0,n=ae({},n),l=ae({},l),l.fill=nD(s)):!Vo(l.stroke)&&Vo(u)&&(a||(n=ae({},n),l=ae({},l)),l.stroke=nD(u)),n.style=l}}if(n&&n.z2==null){a||(n=ae({},n));var f=t.z2EmphasisLift;n.z2=t.z2+(f??Ik)}return n}function Hk(t,e,r){if(r&&r.z2==null){r=ae({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Nk)}return r}function Wk(t,e,r){var n=$e(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:jk(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=ae({},r),o=ae({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Qp(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Vk(this,t,e,r);if(t==="blur")return Wk(this,t,r);if(t==="select")return Hk(this,t,r)}return r}function $k(t){t.stateProxy=Qp;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Qp),r&&(r.stateProxy=Qp)}function C_(t,e){!S_(t,e)&&!t.__highByOuter&&ii(t,p_)}function w_(t,e){!S_(t,e)&&!t.__highByOuter&&ii(t,g_)}function Qf(t,e){t.__highByOuter|=1<<(e||0),ii(t,p_)}function ec(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&ii(t,g_)}function Gk(t){ii(t,Jp)}function D_(t){ii(t,m_)}function __(t){ii(t,kk)}function x_(t){ii(t,zk)}function S_(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function E_(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=Kp(a),s=i==="series",u=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(u),o.isBlured&&(u.group.traverse(function(l){m_(l)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function eg(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(l,f){for(var c=0;c<f.length;c++){var h=l.getItemGraphicEl(f[c]);h&&D_(h)}}if(t!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(t),s=o.coordinateSystem;s&&s.master&&(s=s.master);var u=[];i.eachSeries(function(l){var f=o===l,c=l.coordinateSystem;c&&c.master&&(c=c.master);var h=c&&s?c===s:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!h||e==="series"&&f)){var d=n.getViewOfSeriesModel(l);if(d.group.traverse(function(p){p.__highByOuter&&f&&e==="self"||Jp(p)}),Ht(e))a(l.getData(),e);else if(Ce(e))for(var v=Xe(e),g=0;g<v.length;g++)a(l.getData(v[g]),e[v[g]]);u.push(l),Kp(l).isBlured=!0}}),i.eachComponent(function(l,f){if(l!=="series"){var c=n.getViewOfComponentModel(f);c&&c.toggleBlurSeries&&c.toggleBlurSeries(u,!0,i)}})}}function tg(t,e,r){if(!(t==null||e==null)){var n=r.getModel().getComponent(t,e);if(n){Kp(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){Jp(a)})}}}function Uk(t,e,r){var n=t.seriesIndex,i=t.getData(e.dataType);if(!i){process.env.NODE_ENV!=="production"&&$t("Unknown dataType "+e.dataType);return}var a=wa(i,e);a=(ce(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),u=0;!o&&u<s;)o=i.getItemGraphicEl(u++);if(o){var l=je(o);eg(n,l.focus,l.blurScope,r)}else{var f=t.get(["emphasis","focus"]),c=t.get(["emphasis","blurScope"]);f!=null&&eg(n,f,c,r)}}function rg(t,e,r,n){var i={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||r==null)return i;var a=n.getModel().getComponent(t,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),u,l=0;l<s.length;l++)if(process.env.NODE_ENV!=="production"&&!Ho(s[l])&&$t("param should be highDownDispatcher"),je(s[l]).focus==="self"){u=!0;break}return{focusSelf:u,dispatchers:s}}function qk(t,e,r){process.env.NODE_ENV!=="production"&&!Ho(t)&&$t("param should be highDownDispatcher");var n=je(t),i=rg(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&tg(n.componentMainType,n.componentIndex,r),N(a,function(s){return C_(s,e)})):(eg(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&tg(n.componentMainType,n.componentIndex,r),C_(t,e))}function Yk(t,e,r){process.env.NODE_ENV!=="production"&&!Ho(t)&&$t("param should be highDownDispatcher"),E_(r);var n=je(t),i=rg(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?N(i,function(a){return w_(a,e)}):w_(t,e)}function Xk(t,e,r){if(ig(e)){var n=e.dataType,i=t.getData(n),a=wa(i,e);ce(a)||(a=[a]),t[e.type===pu?"toggleSelect":e.type===vu?"select":"unselect"](a,n)}}function A_(t){var e=t.getAllData();N(e,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){t.isSelected(o,i)?__(a):x_(a)})})}function Kk(t){var e=[];return t.eachSeries(function(r){var n=r.getAllData();N(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function ng(t,e,r){O_(t,!0),ii(t,$k),Jk(t,e,r)}function Zk(t){O_(t,!1)}function gu(t,e,r,n){n?Zk(t):ng(t,e,r)}function Jk(t,e,r){var n=je(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var T_=["emphasis","blur","select"],Qk={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function tc(t,e,r,n){r=r||"itemStyle";for(var i=0;i<T_.length;i++){var a=T_[i],o=e.getModel([a,r]),s=t.ensureState(a);s.style=o[Qk[r]]()}}function O_(t,e){var r=e===!1,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function Ho(t){return!!(t&&t.__highDownDispatcher)}function e6(t){var e=d_[t];return e==null&&h_<=32&&(e=d_[t]=h_++),e}function ig(t){var e=t.type;return e===vu||e===Zf||e===pu}function P_(t){var e=t.type;return e===Ma||e===Kf}function t6(t){var e=v_(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var r=t.states.select||{};e.selectFill=r.style&&r.style.fill||null,e.selectStroke=r.style&&r.style.stroke||null}var Wo=ti.CMD,r6=[[],[],[]],B_=Math.sqrt,n6=Math.atan2;function M_(t,e){if(e){var r=t.data,n=t.len(),i,a,o,s,u,l,f=Wo.M,c=Wo.C,h=Wo.L,d=Wo.R,v=Wo.A,g=Wo.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case f:a=1;break;case h:a=1;break;case c:a=3;break;case g:a=2;break;case v:var p=e[4],m=e[5],y=B_(e[0]*e[0]+e[1]*e[1]),b=B_(e[2]*e[2]+e[3]*e[3]),C=n6(-e[1]/b,e[0]/y);r[o]*=y,r[o++]+=p,r[o]*=b,r[o++]+=m,r[o++]*=y,r[o++]*=b,r[o++]+=C,r[o++]+=C,o+=2,s=o;break;case d:l[0]=r[o++],l[1]=r[o++],zr(l,l,e),r[s++]=l[0],r[s++]=l[1],l[0]+=r[o++],l[1]+=r[o++],zr(l,l,e),r[s++]=l[0],r[s++]=l[1]}for(u=0;u<a;u++){var w=r6[u];w[0]=r[o++],w[1]=r[o++],zr(w,w,e),r[s++]=w[0],r[s++]=w[1]}}t.increaseVersion()}}var ag=Math.sqrt,rc=Math.sin,nc=Math.cos,mu=Math.PI;function F_(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function og(t,e){return(t[0]*e[0]+t[1]*e[1])/(F_(t)*F_(e))}function L_(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(og(t,e))}function R_(t,e,r,n,i,a,o,s,u,l,f){var c=u*(mu/180),h=nc(c)*(t-r)/2+rc(c)*(e-n)/2,d=-1*rc(c)*(t-r)/2+nc(c)*(e-n)/2,v=h*h/(o*o)+d*d/(s*s);v>1&&(o*=ag(v),s*=ag(v));var g=(i===a?-1:1)*ag((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,p=g*o*d/s,m=g*-s*h/o,y=(t+r)/2+nc(c)*p-rc(c)*m,b=(e+n)/2+rc(c)*p+nc(c)*m,C=L_([1,0],[(h-p)/o,(d-m)/s]),w=[(h-p)/o,(d-m)/s],D=[(-1*h-p)/o,(-1*d-m)/s],_=L_(w,D);if(og(w,D)<=-1&&(_=mu),og(w,D)>=1&&(_=0),_<0){var x=Math.round(_/mu*1e6)/1e6;_=mu*2+x%2*mu}f.addData(l,y,b,o,s,C,_,c,a)}var i6=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,a6=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function o6(t){var e=new ti;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ti.CMD,u=t.match(i6);if(!u)return e;for(var l=0;l<u.length;l++){for(var f=u[l],c=f.charAt(0),h=void 0,d=f.match(a6)||[],v=d.length,g=0;g<v;g++)d[g]=parseFloat(d[g]);for(var p=0;p<v;){var m=void 0,y=void 0,b=void 0,C=void 0,w=void 0,D=void 0,_=void 0,x=r,S=n,O=void 0,E=void 0;switch(c){case"l":r+=d[p++],n+=d[p++],h=s.L,e.addData(h,r,n);break;case"L":r=d[p++],n=d[p++],h=s.L,e.addData(h,r,n);break;case"m":r+=d[p++],n+=d[p++],h=s.M,e.addData(h,r,n),i=r,a=n,c="l";break;case"M":r=d[p++],n=d[p++],h=s.M,e.addData(h,r,n),i=r,a=n,c="L";break;case"h":r+=d[p++],h=s.L,e.addData(h,r,n);break;case"H":r=d[p++],h=s.L,e.addData(h,r,n);break;case"v":n+=d[p++],h=s.L,e.addData(h,r,n);break;case"V":n=d[p++],h=s.L,e.addData(h,r,n);break;case"C":h=s.C,e.addData(h,d[p++],d[p++],d[p++],d[p++],d[p++],d[p++]),r=d[p-2],n=d[p-1];break;case"c":h=s.C,e.addData(h,d[p++]+r,d[p++]+n,d[p++]+r,d[p++]+n,d[p++]+r,d[p++]+n),r+=d[p-2],n+=d[p-1];break;case"S":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=d[p++],S=d[p++],r=d[p++],n=d[p++],e.addData(h,m,y,x,S,r,n);break;case"s":m=r,y=n,O=e.len(),E=e.data,o===s.C&&(m+=r-E[O-4],y+=n-E[O-3]),h=s.C,x=r+d[p++],S=n+d[p++],r+=d[p++],n+=d[p++],e.addData(h,m,y,x,S,r,n);break;case"Q":x=d[p++],S=d[p++],r=d[p++],n=d[p++],h=s.Q,e.addData(h,x,S,r,n);break;case"q":x=d[p++]+r,S=d[p++]+n,r+=d[p++],n+=d[p++],h=s.Q,e.addData(h,x,S,r,n);break;case"T":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r=d[p++],n=d[p++],h=s.Q,e.addData(h,m,y,r,n);break;case"t":m=r,y=n,O=e.len(),E=e.data,o===s.Q&&(m+=r-E[O-4],y+=n-E[O-3]),r+=d[p++],n+=d[p++],h=s.Q,e.addData(h,m,y,r,n);break;case"A":b=d[p++],C=d[p++],w=d[p++],D=d[p++],_=d[p++],x=r,S=n,r=d[p++],n=d[p++],h=s.A,R_(x,S,r,n,D,_,b,C,w,h,e);break;case"a":b=d[p++],C=d[p++],w=d[p++],D=d[p++],_=d[p++],x=r,S=n,r+=d[p++],n+=d[p++],h=s.A,R_(x,S,r,n,D,_,b,C,w,h,e);break}}(c==="z"||c==="Z")&&(h=s.Z,e.addData(h),r=i,n=a),o=h}return e.toStatic(),e}var I_=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(r){},e}(ze);function N_(t){return t.setData!=null}function k_(t,e){var r=o6(t),n=ae({},e);return n.buildPath=function(i){if(N_(i)){i.setData(r.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;r.rebuildPath(a,1)}},n.applyTransform=function(i){M_(r,i),this.dirtyShape()},n}function s6(t,e){return new I_(k_(t,e))}function u6(t,e){var r=k_(t,e),n=function(i){fe(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(I_);return n}function l6(t,e){for(var r=[],n=t.length,i=0;i<n;i++){var a=t[i];r.push(a.getUpdatedPathProxy(!0))}var o=new ze(e);return o.createPathProxy(),o.buildPath=function(s){if(N_(s)){s.appendPath(r);var u=s.getContext();u&&s.rebuildPath(u,1)}},o}function sg(t,e){e=e||{};var r=new ze;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?M_(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var f6=function(){function t(){this.cx=0,this.cy=0,this.r=0}return t}(),ic=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new f6},e.prototype.buildPath=function(r,n){r.moveTo(n.cx+n.r,n.cy),r.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(ze);ic.prototype.type="circle";var c6=function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t}(),ug=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new c6},e.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,u=n.ry,l=s*i,f=u*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-f,a-l,o-u,a,o-u),r.bezierCurveTo(a+l,o-u,a+s,o-f,a+s,o),r.bezierCurveTo(a+s,o+f,a+l,o+u,a,o+u),r.bezierCurveTo(a-l,o+u,a-s,o+f,a-s,o),r.closePath()},e}(ze);ug.prototype.type="ellipse";var z_=Math.PI,lg=z_*2,Fa=Math.sin,$o=Math.cos,h6=Math.acos,Gt=Math.atan2,j_=Math.abs,yu=Math.sqrt,bu=Math.max,Bn=Math.min,sn=1e-4;function d6(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=c*u-f*l;if(!(h*h<sn))return h=(f*(e-a)-c*(t-i))/h,[t+h*u,e+h*l]}function ac(t,e,r,n,i,a,o){var s=t-r,u=e-n,l=(o?a:-a)/yu(s*s+u*u),f=l*u,c=-l*s,h=t+f,d=e+c,v=r+f,g=n+c,p=(h+v)/2,m=(d+g)/2,y=v-h,b=g-d,C=y*y+b*b,w=i-a,D=h*g-v*d,_=(b<0?-1:1)*yu(bu(0,w*w*C-D*D)),x=(D*b-y*_)/C,S=(-D*y-b*_)/C,O=(D*b+y*_)/C,E=(-D*y+b*_)/C,P=x-p,F=S-m,M=O-p,B=E-m;return P*P+F*F>M*M+B*B&&(x=O,S=E),{cx:x,cy:S,x0:-f,y0:-c,x1:x*(i/w-1),y1:S*(i/w-1)}}function v6(t){var e;if(ce(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function p6(t,e){var r,n=bu(e.r,0),i=bu(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var u=e.startAngle,l=e.endAngle;if(!(isNaN(u)||isNaN(l))){var f=e.cx,c=e.cy,h=!!e.clockwise,d=j_(l-u),v=d>lg&&d%lg;if(v>sn&&(d=v),!(n>sn))t.moveTo(f,c);else if(d>lg-sn)t.moveTo(f+n*$o(u),c+n*Fa(u)),t.arc(f,c,n,u,l,!h),i>sn&&(t.moveTo(f+i*$o(l),c+i*Fa(l)),t.arc(f,c,i,l,u,h));else{var g=void 0,p=void 0,m=void 0,y=void 0,b=void 0,C=void 0,w=void 0,D=void 0,_=void 0,x=void 0,S=void 0,O=void 0,E=void 0,P=void 0,F=void 0,M=void 0,B=n*$o(u),R=n*Fa(u),V=i*$o(l),k=i*Fa(l),W=d>sn;if(W){var I=e.cornerRadius;I&&(r=v6(I),g=r[0],p=r[1],m=r[2],y=r[3]);var q=j_(n-i)/2;if(b=Bn(q,m),C=Bn(q,y),w=Bn(q,g),D=Bn(q,p),S=_=bu(b,C),O=x=bu(w,D),(_>sn||x>sn)&&(E=n*$o(l),P=n*Fa(l),F=i*$o(u),M=i*Fa(u),d<z_)){var Z=d6(B,R,F,M,E,P,V,k);if(Z){var J=B-Z[0],ne=R-Z[1],G=E-Z[0],L=P-Z[1],Y=1/Fa(h6((J*G+ne*L)/(yu(J*J+ne*ne)*yu(G*G+L*L)))/2),j=yu(Z[0]*Z[0]+Z[1]*Z[1]);S=Bn(_,(n-j)/(Y+1)),O=Bn(x,(i-j)/(Y-1))}}}if(!W)t.moveTo(f+B,c+R);else if(S>sn){var U=Bn(m,S),Q=Bn(y,S),K=ac(F,M,B,R,n,U,h),X=ac(E,P,V,k,n,Q,h);t.moveTo(f+K.cx+K.x0,c+K.cy+K.y0),S<_&&U===Q?t.arc(f+K.cx,c+K.cy,S,Gt(K.y0,K.x0),Gt(X.y0,X.x0),!h):(U>0&&t.arc(f+K.cx,c+K.cy,U,Gt(K.y0,K.x0),Gt(K.y1,K.x1),!h),t.arc(f,c,n,Gt(K.cy+K.y1,K.cx+K.x1),Gt(X.cy+X.y1,X.cx+X.x1),!h),Q>0&&t.arc(f+X.cx,c+X.cy,Q,Gt(X.y1,X.x1),Gt(X.y0,X.x0),!h))}else t.moveTo(f+B,c+R),t.arc(f,c,n,u,l,!h);if(!(i>sn)||!W)t.lineTo(f+V,c+k);else if(O>sn){var U=Bn(g,O),Q=Bn(p,O),K=ac(V,k,E,P,i,-Q,h),X=ac(B,R,F,M,i,-U,h);t.lineTo(f+K.cx+K.x0,c+K.cy+K.y0),O<x&&U===Q?t.arc(f+K.cx,c+K.cy,O,Gt(K.y0,K.x0),Gt(X.y0,X.x0),!h):(Q>0&&t.arc(f+K.cx,c+K.cy,Q,Gt(K.y0,K.x0),Gt(K.y1,K.x1),!h),t.arc(f,c,i,Gt(K.cy+K.y1,K.cx+K.x1),Gt(X.cy+X.y1,X.cx+X.x1),h),U>0&&t.arc(f+X.cx,c+X.cy,U,Gt(X.y1,X.x1),Gt(X.y0,X.x0),!h))}else t.lineTo(f+V,c+k),t.arc(f,c,i,l,u,h)}t.closePath()}}}var g6=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Mn=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new g6},e.prototype.buildPath=function(r,n){p6(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ze);Mn.prototype.type="sector";var m6=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),fg=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new m6},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(ze);fg.prototype.type="ring";function y6(t,e,r,n){var i=[],a=[],o=[],s=[],u,l,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var h=0,d=t.length;h<d;h++)Eo(f,f,t[h]),Ao(c,c,t[h]);Eo(f,f,n[0]),Ao(c,c,n[1])}for(var h=0,d=t.length;h<d;h++){var v=t[h];if(r)u=t[h?h-1:d-1],l=t[(h+1)%d];else if(h===0||h===d-1){i.push(a8(t[h]));continue}else u=t[h-1],l=t[h+1];o8(a,l,u),zv(a,a,e);var g=jv(v,u),p=jv(v,l),m=g+p;m!==0&&(g/=m,p/=m),zv(o,a,-g),zv(s,a,p);var y=Sw([],v,o),b=Sw([],v,s);n&&(Ao(y,y,f),Eo(y,y,c),Ao(b,b,f),Eo(b,b,c)),i.push(y),i.push(b)}return r&&i.push(i.shift()),i}function V_(t,e,r){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=y6(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var u=a[s*2],l=a[s*2+1],f=i[(s+1)%o];t.bezierCurveTo(u[0],u[1],l[0],l[1],f[0],f[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}r&&t.closePath()}}var b6=function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t}(),oc=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new b6},e.prototype.buildPath=function(r,n){V_(r,n,!0)},e}(ze);oc.prototype.type="polygon";var C6=function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t}(),Cu=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new C6},e.prototype.buildPath=function(r,n){V_(r,n,!1)},e}(ze);Cu.prototype.type="polyline";var w6={},D6=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t}(),Pi=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new D6},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var u=t_(w6,n,this.style);i=u.x1,a=u.y1,o=u.x2,s=u.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var l=n.percent;l!==0&&(r.moveTo(i,a),l<1&&(o=i*(1-l)+o*l,s=a*(1-l)+s*l),r.lineTo(o,s))},e.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},e}(ze);Pi.prototype.type="line";var mr=[],_6=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t}();function H_(t,e,r){var n=t.cpx2,i=t.cpy2;return n!=null||i!=null?[(r?$w:Pt)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?$w:Pt)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?qw:Wt)(t.x1,t.cpx1,t.x2,e),(r?qw:Wt)(t.y1,t.cpy1,t.y2,e)]}var cg=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new _6},e.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,u=n.cpx1,l=n.cpy1,f=n.cpx2,c=n.cpy2,h=n.percent;h!==0&&(r.moveTo(i,a),f==null||c==null?(h<1&&(_f(i,u,o,h,mr),u=mr[1],o=mr[2],_f(a,l,s,h,mr),l=mr[1],s=mr[2]),r.quadraticCurveTo(u,l,o,s)):(h<1&&(Di(i,u,f,o,h,mr),u=mr[1],f=mr[2],o=mr[3],Di(a,l,c,s,h,mr),l=mr[1],c=mr[2],s=mr[3]),r.bezierCurveTo(u,l,f,c,o,s)))},e.prototype.pointAt=function(r){return H_(this.shape,r,!1)},e.prototype.tangentAt=function(r){var n=H_(this.shape,r,!0);return l8(n,n)},e}(ze);cg.prototype.type="bezier-curve";var x6=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),sc=function(t){fe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new x6},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,u=n.endAngle,l=n.clockwise,f=Math.cos(s),c=Math.sin(s);r.moveTo(f*o+i,c*o+a),r.arc(i,a,o,s,u,!l)},e}(ze);sc.prototype.type="arc";var S6=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="compound",r}return e.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),ze.prototype.getBoundingRect.call(this)},e}(ze),W_=function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,r){this.colorStops.push({offset:e,color:r})},t}(),$_=function(t){fe(e,t);function e(r,n,i,a,o,s){var u=t.call(this,o)||this;return u.x=r??0,u.y=n??0,u.x2=i??1,u.y2=a??0,u.type="linear",u.global=s||!1,u}return e}(W_),E6=function(t){fe(e,t);function e(r,n,i,a,o){var s=t.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return e}(W_),La=[0,0],Ra=[0,0],uc=new we,lc=new we,fc=function(){function t(e,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new we;for(var n=0;n<2;n++)this._axes[n]=new we;e&&this.fromBoundingRect(e,r)}return t.prototype.fromBoundingRect=function(e,r){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,u=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,u),n[3].set(a,u),r)for(var l=0;l<4;l++)n[l].transform(r);we.sub(i[0],n[1],n[0]),we.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},t.prototype.intersect=function(e,r){var n=!0,i=!r;return uc.set(1/0,1/0),lc.set(0,0),!this._intersectCheckOneSide(this,e,uc,lc,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,uc,lc,i,-1)&&(n=!1,i)||i||we.copy(r,n?uc:lc),n},t.prototype._intersectCheckOneSide=function(e,r,n,i,a,o){for(var s=!0,u=0;u<2;u++){var l=this._axes[u];if(this._getProjMinMaxOnAxis(u,e._corners,La),this._getProjMinMaxOnAxis(u,r._corners,Ra),La[1]<Ra[0]||La[0]>Ra[1]){if(s=!1,a)return s;var f=Math.abs(Ra[0]-La[1]),c=Math.abs(La[0]-Ra[1]);Math.min(f,c)>i.len()&&(f<c?we.scale(i,l,-f*o):we.scale(i,l,c*o))}else if(n){var f=Math.abs(Ra[0]-La[1]),c=Math.abs(La[0]-Ra[1]);Math.min(f,c)<n.len()&&(f<c?we.scale(n,l,f*o):we.scale(n,l,-c*o))}}return s},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,u=o,l=1;l<r.length;l++){var f=r[l].dot(i)+a[e];s=Math.min(f,s),u=Math.max(f,u)}n[0]=s,n[1]=u},t}(),A6=[],T6=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return e.prototype.traverse=function(r,n){r.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},e.prototype.addDisplayables=function(r,n){n=n||!1;for(var i=0;i<r.length;i++)this.addDisplayable(r[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(r){for(var n=this._cursor;n<this._displayables.length;n++)r&&r(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)r&&r(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var r=this._cursor;r<this._displayables.length;r++){var n=this._displayables[r];n.parent=this,n.update(),n.parent=null}for(var r=0;r<this._temporaryDisplayables.length;r++){var n=this._temporaryDisplayables[r];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Ge(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(A6)),r.union(a)}this._rect=r}return this._rect},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},e}(Ei),G_=ut();function Go(t,e,r,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),u=t==="update";if(s){var l=void 0,f=void 0,c=void 0;n?(l=Be(n.duration,200),f=Be(n.easing,"cubicOut"),c=0):(l=e.getShallow(u?"animationDurationUpdate":"animationDuration"),f=e.getShallow(u?"animationEasingUpdate":"animationEasing"),c=e.getShallow(u?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(c=a.delay)),_e(c)&&(c=c(r,i)),_e(l)&&(l=l(r));var h={duration:l||0,delay:c,easing:f};return h}else return null}function hg(t,e,r,n,i,a,o){var s=!1,u;_e(i)?(o=a,a=i,i=null):Ce(i)&&(a=i.cb,o=i.during,s=i.isFrom,u=i.removeOpt,i=i.dataIndex);var l=t==="leave";l||e.stopAnimation("leave");var f=Go(t,n,i,l?u||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(f&&f.duration>0){var c=f.duration,h=f.delay,d=f.easing,v={duration:c,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!l,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Mt(t,e,r,n,i,a){hg("update",t,e,r,n,i,a)}function Ut(t,e,r,n,i,a){hg("enter",t,e,r,n,i,a)}function Uo(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var r=t.animators[e];if(r.scope==="leave")return!0}return!1}function cc(t,e,r,n,i,a){Uo(t)||hg("leave",t,e,r,n,i,a)}function U_(t,e,r,n){t.removeTextContent(),t.removeTextGuideLine(),cc(t,{style:{opacity:0}},e,r,n)}function hc(t,e,r){function n(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(i){i.isGroup||U_(i,e,r,n)}):U_(t,e,r,n)}function dg(t){G_(t).oldStyle=t.style}function O6(t){return G_(t).oldStyle}var dc=Math.max,vc=Math.min,vg={};function P6(t){return ze.extend(t)}var B6=u6;function M6(t,e){return B6(t,e)}function un(t,e){vg[t]=e}function q_(t){if(vg.hasOwnProperty(t))return vg[t]}function pg(t,e,r,n){var i=s6(t,e);return r&&(n==="center"&&(r=X_(r,i.getBoundingRect())),K_(i,r)),i}function Y_(t,e,r){var n=new ni({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(X_(e,a))}}});return n}function X_(t,e){var r=e.width/e.height,n=t.height*r,i;n<=t.width?i=t.height:(n=t.width,i=n/r);var a=t.x+t.width/2,o=t.y+t.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var F6=l6;function K_(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}}function wu(t,e){return t_(t,t,{lineWidth:e}),t}function L6(t){return r_(t.shape,t.shape,t.style),t}var R6=Ba;function I6(t,e){for(var r=Xv([]);t&&t!==e;)Po(r,t.getLocalTransform(),r),t=t.parent;return r}function gg(t,e,r){return e&&!Ht(e)&&(e=au.getLocalTransform(e)),r&&(e=vf([],e)),zr([],t,e)}function N6(t,e,r){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[t==="left"?-n:t==="right"?n:0,t==="top"?-i:t==="bottom"?i:0];return a=gg(a,e,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Z_(t){return!t.isGroup}function k6(t){return t.shape!=null}function J_(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(u){Z_(u)&&u.anid&&(s[u.anid]=u)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return k6(o)&&(s.shape=ae({},o.shape)),s}var a=n(t);e.traverse(function(o){if(Z_(o)&&o.anid){var s=a[o.anid];if(s){var u=i(o);o.attr(i(s)),Mt(o,u,r,je(o).dataIndex)}}})}function z6(t,e){return ge(t,function(r){var n=r[0];n=dc(n,e.x),n=vc(n,e.x+e.width);var i=r[1];return i=dc(i,e.y),i=vc(i,e.y+e.height),[n,i]})}function j6(t,e){var r=dc(t.x,e.x),n=vc(t.x+t.width,e.x+e.width),i=dc(t.y,e.y),a=vc(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function mg(t,e,r){var n=ae({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),ke(i,r),new ni(n)):pg(t.replace("path://",""),n,r,"center")}function V6(t,e,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Q_(t,e,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Q_(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=yg(f,c,u,l);if(H6(h))return!1;var d=t-i,v=e-a,g=yg(d,v,u,l)/h;if(g<0||g>1)return!1;var p=yg(d,v,f,c)/h;return!(p<0||p>1)}function yg(t,e,r,n){return t*n-r*e}function H6(t){return t<=1e-6&&t>=-1e-6}function pc(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=me(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var u=t.formatterParamsExtra;u&&N(Xe(u),function(f){xe(s,f)||(s[f]=u[f],s.$vars.push(f))});var l=je(t.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:n,option:ke({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function ex(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function gc(t,e){if(t)if(ce(t))for(var r=0;r<t.length;r++)ex(t[r],e);else ex(t,e)}un("circle",ic),un("ellipse",ug),un("sector",Mn),un("ring",fg),un("polygon",oc),un("polyline",Cu),un("rect",_t),un("line",Pi),un("bezierCurve",cg),un("arc",sc);const W6=Object.freeze(Object.defineProperty({__proto__:null,Arc:sc,BezierCurve:cg,BoundingRect:Ge,Circle:ic,CompoundPath:S6,Ellipse:ug,Group:Lt,Image:ni,IncrementalDisplayable:T6,Line:Pi,LinearGradient:$_,OrientedBoundingRect:fc,Path:ze,Point:we,Polygon:oc,Polyline:Cu,RadialGradient:E6,Rect:_t,Ring:fg,Sector:Mn,Text:Tt,applyTransform:gg,clipPointsByRect:z6,clipRectByRect:j6,createIcon:mg,extendPath:M6,extendShape:P6,getShapeClass:q_,getTransform:I6,groupTransition:J_,initProps:Ut,isElementRemoved:Uo,lineLineIntersect:Q_,linePolygonIntersect:V6,makeImage:Y_,makePath:pg,mergePath:F6,registerShape:un,removeElement:cc,removeElementWithFadeOut:hc,resizePath:K_,setTooltipConfig:pc,subPixelOptimize:R6,subPixelOptimizeLine:wu,subPixelOptimizeRect:L6,transformDirection:N6,traverseElements:gc,updateProps:Mt},Symbol.toStringTag,{value:"Module"}));var mc={};function tx(t,e){for(var r=0;r<$r.length;r++){var n=$r[r],i=e[n],a=t.ensureState(n);a.style=a.style||{},a.style.text=i}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function bg(t,e,r){var n=t.labelFetcher,i=t.labelDataIndex,a=t.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=_e(t.defaultText)?t.defaultText(i,t,r):t.defaultText);for(var u={normal:s},l=0;l<$r.length;l++){var f=$r[l],c=e[f];u[f]=Be(n?n.getFormattedLabel(i,f,null,a,c&&c.get("formatter")):null,s)}return u}function Du(t,e,r,n){r=r||mc;for(var i=t instanceof Tt,a=!1,o=0;o<Xf.length;o++){var s=e[Xf[o]];if(s&&s.getShallow("show")){a=!0;break}}var u=i?t:t.getTextContent();if(a){i||(u||(u=new Tt,t.setTextContent(u)),t.stateProxy&&(u.stateProxy=t.stateProxy));var l=bg(r,e),f=e.normal,c=!!f.getShallow("show"),h=Bi(f,n&&n.normal,r,!1,!i);h.text=l.normal,i||t.setTextConfig(rx(f,r,!1));for(var o=0;o<$r.length;o++){var d=$r[o],s=e[d];if(s){var v=u.ensureState(d),g=!!Be(s.getShallow("show"),c);if(g!==c&&(v.ignore=!g),v.style=Bi(s,n&&n[d],r,!0,!i),v.style.text=l[d],!i){var p=t.ensureState(d);p.textConfig=rx(s,r,!0)}}}u.silent=!!f.getShallow("silent"),u.style.x!=null&&(h.x=u.style.x),u.style.y!=null&&(h.y=u.style.y),u.ignore=!c,u.useStyle(h),u.dirty(),r.enableTextSetter&&(qo(u).setLabelText=function(m){var y=bg(r,e,m);tx(u,y)})}else u&&(u.ignore=!0);t.dirty()}function _u(t,e){e=e||"label";for(var r={normal:t.getModel(e)},n=0;n<$r.length;n++){var i=$r[n];r[i]=t.getModel([i,e])}return r}function Bi(t,e,r,n,i){var a={};return $6(a,t,r,n,i),e&&ae(a,e),a}function rx(t,e,r){e=e||{};var n={},i,a=t.getShallow("rotate"),o=Be(t.getShallow("distance"),r?null:5),s=t.getShallow("offset");return i=t.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",n}function $6(t,e,r,n,i){r=r||mc;var a=e.ecModel,o=a&&a.option.textStyle,s=G6(e),u;if(s){u={};for(var l in s)if(s.hasOwnProperty(l)){var f=e.getModel(["rich",l]);ox(u[l]={},f,o,r,n,i,!1,!0)}}u&&(t.rich=u);var c=e.get("overflow");c&&(t.overflow=c);var h=e.get("minMargin");h!=null&&(t.margin=h),ox(t,e,o,r,n,i,!0,!1)}function G6(t){for(var e;t&&t!==t.ecModel;){var r=(t.option||mc).rich;if(r){e=e||{};for(var n=Xe(r),i=0;i<n.length;i++){var a=n[i];e[a]=1}}t=t.parentModel}return e}var nx=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ix=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],ax=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function ox(t,e,r,n,i,a,o,s){r=!i&&r||mc;var u=n&&n.inheritColor,l=e.getShallow("color"),f=e.getShallow("textBorderColor"),c=Be(e.getShallow("opacity"),r.opacity);(l==="inherit"||l==="auto")&&(process.env.NODE_ENV!=="production"&&l==="auto"&&Bt("color: 'auto'","color: 'inherit'"),u?l=u:l=null),(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&Bt("color: 'auto'","color: 'inherit'"),u?f=u:f=null),a||(l=l||r.color,f=f||r.textBorderColor),l!=null&&(t.fill=l),f!=null&&(t.stroke=f);var h=Be(e.getShallow("textBorderWidth"),r.textBorderWidth);h!=null&&(t.lineWidth=h);var d=Be(e.getShallow("textBorderType"),r.textBorderType);d!=null&&(t.lineDash=d);var v=Be(e.getShallow("textBorderDashOffset"),r.textBorderDashOffset);v!=null&&(t.lineDashOffset=v),!i&&c==null&&!s&&(c=n&&n.defaultOpacity),c!=null&&(t.opacity=c),!i&&!a&&t.fill==null&&n.inheritColor&&(t.fill=n.inheritColor);for(var g=0;g<nx.length;g++){var p=nx[g],m=Be(e.getShallow(p),r[p]);m!=null&&(t[p]=m)}for(var g=0;g<ix.length;g++){var p=ix[g],m=e.getShallow(p);m!=null&&(t[p]=m)}if(t.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(t.verticalAlign=y)}if(!o||!n.disableBox){for(var g=0;g<ax.length;g++){var p=ax[g],m=e.getShallow(p);m!=null&&(t[p]=m)}var b=e.getShallow("borderType");b!=null&&(t.borderDash=b),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.backgroundColor==="auto"&&Bt("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=u),(t.borderColor==="auto"||t.borderColor==="inherit")&&u&&(process.env.NODE_ENV!=="production"&&t.borderColor==="auto"&&Bt("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=u)}}function U6(t,e){var r=e&&e.getModel("textStyle");return Dn([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var qo=ut();function q6(t,e,r,n){if(t){var i=qo(t);i.prevValue=i.value,i.value=r;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function Y6(t,e,r,n,i){var a=qo(t);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=Be(a.interpolatedValue,a.prevValue),u=a.value;function l(f){var c=ND(r,a.precision,s,u,f);a.interpolatedValue=f===1?null:c;var h=bg({labelDataIndex:e,labelFetcher:i,defaultText:o?o(c):c+""},a.statesModels,c);tx(t,h)}t.percent=0,(a.prevValue==null?Ut:Mt)(t,{percent:1},n,e,null,l)}var X6=["textStyle","color"],Cg=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],wg=new Tt,K6=function(){function t(){}return t.prototype.getTextColor=function(e){var r=this.ecModel;return this.getShallow("color")||(!e&&r?r.get(X6):null)},t.prototype.getFont=function(){return U6({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var r={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Cg.length;n++)r[Cg[n]]=this.getShallow(Cg[n]);return wg.useStyle(r),wg.update(),wg.getBoundingRect()},t}(),sx=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Z6=cu(sx),J6=function(){function t(){}return t.prototype.getLineStyle=function(e){return Z6(this,e)},t}(),ux=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Q6=cu(ux),e9=function(){function t(){}return t.prototype.getItemStyle=function(e,r){return Q6(this,e,r)},t}(),bt=function(){function t(e,r,n){this.parentModel=r,this.ecModel=n,this.option=e}return t.prototype.init=function(e,r,n){},t.prototype.mergeOption=function(e,r){Je(this.option,e,!0)},t.prototype.get=function(e,r){return e==null?this.option:this._doGet(this.parsePath(e),!r&&this.parentModel)},t.prototype.getShallow=function(e,r){var n=this.option,i=n==null?n:n[e];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},t.prototype.getModel=function(e,r){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new t(a,r,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(We(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Pe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,r){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(e),r.parentModel)),n},t}();Lp(bt),WN(bt),wn(bt,J6),wn(bt,e9),wn(bt,YN),wn(bt,K6);var t9=Math.round(Math.random()*10);function yc(t){return[t||"",t9++].join("_")}function r9(t){var e={};t.registerSubTypeDefaulter=function(r,n){var i=An(r);e[i.main]=n},t.determineSubType=function(r,n){var i=n.type;if(!i){var a=An(r).main;t.hasSubTypes(r)&&e[a]&&(i=e[a](n))}return i}}function n9(t,e){t.topologicalTravel=function(a,o,s,u){if(!a.length)return;var l=r(o),f=l.graph,c=l.noEntryList,h={};for(N(a,function(y){h[y]=!0});c.length;){var d=c.pop(),v=f[d],g=!!h[d];g&&(s.call(u,d,v.originalDeps.slice()),delete h[d]),N(v.successor,g?m:p)}N(h,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=dr("Circular dependency may exists: ",h,a,o)),new Error(y)});function p(y){f[y].entryCount--,f[y].entryCount===0&&c.push(y)}function m(y){h[y]=!0,p(y)}};function r(a){var o={},s=[];return N(a,function(u){var l=n(o,u),f=l.originalDeps=e(u),c=i(f,a);l.entryCount=c.length,l.entryCount===0&&s.push(u),N(c,function(h){$e(l.predecessor,h)<0&&l.predecessor.push(h);var d=n(o,h);$e(d.successor,h)<0&&d.successor.push(u)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return N(a,function(u){$e(o,u)>=0&&s.push(u)}),s}}function lx(t,e){return Je(Je({},t,!0),e,!0)}const i9={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},a9={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var bc="ZH",Dg="EN",Yo=Dg,Cc={},_g={},fx=Pe.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Yo).toUpperCase();return t.indexOf(bc)>-1?bc:Yo}():Yo;function cx(t,e){t=t.toUpperCase(),_g[t]=new bt(e),Cc[t]=e}function o9(t){if(me(t)){var e=Cc[t.toUpperCase()]||{};return t===bc||t===Dg?We(e):Je(We(e),We(Cc[Yo]),!1)}else return Je(We(t),We(Cc[Yo]),!1)}function s9(t){return _g[t]}function u9(){return _g[Yo]}cx(Dg,i9),cx(bc,a9);var xg=1e3,Sg=xg*60,xu=Sg*60,Gr=xu*24,hx=Gr*365,Su={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},wc="{yyyy}-{MM}-{dd}",dx={year:"{yyyy}",month:"{yyyy}-{MM}",day:wc,hour:wc+" "+Su.hour,minute:wc+" "+Su.minute,second:wc+" "+Su.second,millisecond:Su.none},Eg=["year","month","day","hour","minute","second","millisecond"],vx=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Mi(t,e){return t+="","0000".substr(0,e-t.length)+t}function Xo(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function l9(t){return t===Xo(t)}function f9(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Dc(t,e,r,n){var i=Qn(t),a=i[Ag(r)](),o=i[Ko(r)]()+1,s=Math.floor((o-1)/3)+1,u=i[_c(r)](),l=i["get"+(r?"UTC":"")+"Day"](),f=i[Eu(r)](),c=(f-1)%12+1,h=i[xc(r)](),d=i[Sc(r)](),v=i[Ec(r)](),g=f>=12?"pm":"am",p=g.toUpperCase(),m=n instanceof bt?n:s9(n||fx)||u9(),y=m.getModel("time"),b=y.get("month"),C=y.get("monthAbbr"),w=y.get("dayOfWeek"),D=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,p+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Mi(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,C[o-1]).replace(/{MM}/g,Mi(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Mi(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,w[l]).replace(/{ee}/g,D[l]).replace(/{e}/g,l+"").replace(/{HH}/g,Mi(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Mi(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Mi(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Mi(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Mi(v,3)).replace(/{S}/g,v+"")}function c9(t,e,r,n,i){var a=null;if(me(r))a=r;else if(_e(r))a=r(t.value,e,{level:t.level});else{var o=ae({},Su);if(t.level>0)for(var s=0;s<Eg.length;++s)o[Eg[s]]="{primary|"+o[Eg[s]]+"}";var u=r?r.inherit===!1?r:ke(r,o):o,l=px(t.value,i);if(u[l])a=u[l];else if(u.inherit){for(var f=vx.indexOf(l),s=f-1;s>=0;--s)if(u[l]){a=u[l];break}a=a||o.none}if(ce(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return Dc(new Date(t.value),a,i,n)}function px(t,e){var r=Qn(t),n=r[Ko(e)]()+1,i=r[_c(e)](),a=r[Eu(e)](),o=r[xc(e)](),s=r[Sc(e)](),u=r[Ec(e)](),l=u===0,f=l&&s===0,c=f&&o===0,h=c&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":c?"hour":f?"minute":l?"second":"millisecond"}function gx(t,e,r){var n=rt(t)?Qn(t):t;switch(e=e||px(t,r),e){case"year":return n[Ag(r)]();case"half-year":return n[Ko(r)]()>=6?1:0;case"quarter":return Math.floor((n[Ko(r)]()+1)/4);case"month":return n[Ko(r)]();case"day":return n[_c(r)]();case"half-day":return n[Eu(r)]()/24;case"hour":return n[Eu(r)]();case"minute":return n[xc(r)]();case"second":return n[Sc(r)]();case"millisecond":return n[Ec(r)]()}}function Ag(t){return t?"getUTCFullYear":"getFullYear"}function Ko(t){return t?"getUTCMonth":"getMonth"}function _c(t){return t?"getUTCDate":"getDate"}function Eu(t){return t?"getUTCHours":"getHours"}function xc(t){return t?"getUTCMinutes":"getMinutes"}function Sc(t){return t?"getUTCSeconds":"getSeconds"}function Ec(t){return t?"getUTCMilliseconds":"getMilliseconds"}function h9(t){return t?"setUTCFullYear":"setFullYear"}function mx(t){return t?"setUTCMonth":"setMonth"}function yx(t){return t?"setUTCDate":"setDate"}function bx(t){return t?"setUTCHours":"setHours"}function Cx(t){return t?"setUTCMinutes":"setMinutes"}function Dx(t){return t?"setUTCSeconds":"setSeconds"}function _x(t){return t?"setUTCMilliseconds":"setMilliseconds"}function xx(t){if(!xD(t))return me(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Sx(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Ac=ww;function Tg(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Dn(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=t instanceof Date;if(o||s){var u=o?Qn(t):t;if(isNaN(+u)){if(s)return"-"}else return Dc(u,n,r)}if(e==="ordinal")return lf(t)?i(t):rt(t)&&a(t)?t+"":"-";var l=Si(t);return a(l)?xx(l):lf(t)?i(t):typeof t=="boolean"?t+"":"-"}var Ex=["a","b","c","d","e","f","g"],Og=function(t,e){return"{"+t+(e??"")+"}"};function Ax(t,e,r){ce(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=Ex[a];t=t.replace(Og(o),Og(o,0))}for(var s=0;s<n;s++)for(var u=0;u<i.length;u++){var l=e[s][i[u]];t=t.replace(Og(Ex[u],s),r?Ar(l):l)}return t}function d9(t,e){var r=me(t)?{color:t,extraCssText:e}:t||{},n=r.color,i=r.type;e=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ar(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Ar(n)+";"+(e||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Ia(t,e){return e=e||"transparent",me(t)?t:Ce(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Tx(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var Tc=N,Ox=["left","right","top","bottom","width","height"],Oc=[["width","left","right"],["height","top","bottom"]];function Pg(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(u,l){var f=u.getBoundingRect(),c=e.childAt(l+1),h=c&&c.getBoundingRect(),d,v;if(t==="horizontal"){var g=f.width+(h?-h.x+f.x:0);d=a+g,d>n||u.newline?(a=0,d=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var p=f.height+(h?-h.y+f.y:0);v=o+p,v>i||u.newline?(a+=s+r,o=0,v=p,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),t==="horizontal"?a=d+r:o=v+r)})}var Au=Pg;wt(Pg,"vertical"),wt(Pg,"horizontal");function Na(t,e,r){r=Ac(r||0);var n=e.width,i=e.height,a=st(t.left,n),o=st(t.top,i),s=st(t.right,n),u=st(t.bottom,i),l=st(t.width,n),f=st(t.height,i),c=r[2]+r[0],h=r[1]+r[3],d=t.aspect;switch(isNaN(l)&&(l=n-s-h-a),isNaN(f)&&(f=i-u-c-o),d!=null&&(isNaN(l)&&isNaN(f)&&(d>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=d*f),isNaN(f)&&(f=l/d)),isNaN(a)&&(a=n-s-l-h),isNaN(o)&&(o=i-u-f-c),t.left||t.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-c;break}a=a||0,o=o||0,isNaN(l)&&(l=n-h-a-(s||0)),isNaN(f)&&(f=i-c-o-(u||0));var v=new Ge(a+r[3],o+r[0],l,f);return v.margin=r,v}function v9(t,e,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var l;if(u==="raw")l=t.type==="group"?new Ge(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();l=l.clone(),l.applyTransform(f)}var c=Na(ke({width:l.width,height:l.height},e),r,n),h=o?c.x-l.x:0,d=s?c.y-l.y:0;return u==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===t&&t.markRedraw(),!0}function Tu(t){var e=t.layoutMode||t.constructor.layoutMode;return Ce(e)?e:e?{type:e}:null}function ka(t,e,r){var n=r&&r.ignoreSize;!ce(n)&&(n=[n,n]);var i=o(Oc[0],0),a=o(Oc[1],1);l(Oc[0],t,i),l(Oc[1],t,a);function o(f,c){var h={},d=0,v={},g=0,p=2;if(Tc(f,function(b){v[b]=t[b]}),Tc(f,function(b){s(e,b)&&(h[b]=v[b]=e[b]),u(h,b)&&d++,u(v,b)&&g++}),n[c])return u(e,f[1])?v[f[2]]=null:u(e,f[2])&&(v[f[1]]=null),v;if(g===p||!d)return v;if(d>=p)return h;for(var m=0;m<f.length;m++){var y=f[m];if(!s(h,y)&&s(t,y)){h[y]=t[y];break}}return h}function s(f,c){return f.hasOwnProperty(c)}function u(f,c){return f[c]!=null&&f[c]!=="auto"}function l(f,c,h){Tc(f,function(d){c[d]=h[d]})}}function Pc(t){return Px({},t)}function Px(t,e){return e&&t&&Tc(Ox,function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var p9=ut(),Ke=function(t){fe(e,t);function e(r,n,i){var a=t.call(this,r,n,i)||this;return a.uid=yc("ec_cpt_model"),a}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Tu(this),a=i?Pc(r):{},o=n.getTheme();Je(r,o.get(this.mainType)),Je(r,this.getDefaultOption()),i&&ka(r,a,i)},e.prototype.mergeOption=function(r,n){Je(this.option,r,!0);var i=Tu(this);i&&ka(this.option,r,i)},e.prototype.optionUpdated=function(r,n){},e.prototype.getDefaultOption=function(){var r=this.constructor;if(!jN(r))return r.defaultOption;var n=p9(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},u=i.length-1;u>=0;u--)s=Je(s,i[u],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return fu(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(bt);zD(Ke,bt),jf(Ke),r9(Ke),n9(Ke,g9);function g9(t){var e=[];return N(Ke.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=ge(e,function(r){return An(r).main}),t!=="dataset"&&$e(e,"dataset")<=0&&e.unshift("dataset"),e}var Bx="";typeof navigator<"u"&&(Bx=navigator.platform||"");var Zo="rgba(0, 0, 0, 0.2)";const m9={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Zo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Zo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Zo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Zo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Zo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Zo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Bx.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Bg=Ae(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ur="original",nr="arrayRows",qr="objectRows",Fn="keyedColumns",ai="typedArray",Mx="unknown",Ln="column",Jo="row",zt={Must:1,Might:2,Not:3},Fx=ut();function y9(t){Fx(t).datasetMap=Ae()}function b9(t,e,r){var n={},i=Mg(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,u=Fx(s).datasetMap,l=i.uid+"_"+r.seriesLayoutBy,f,c;t=t.slice(),N(t,function(g,p){var m=Ce(g)?g:t[p]={name:g};m.type==="ordinal"&&f==null&&(f=p,c=v(m)),n[m.name]=[]});var h=u.get(l)||u.set(l,{categoryWayDim:c,valueWayDim:0});N(t,function(g,p){var m=g.name,y=v(g);if(f==null){var b=h.valueWayDim;d(n[m],b,y),d(o,b,y),h.valueWayDim+=y}else if(f===p)d(n[m],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[m],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(g,p,m){for(var y=0;y<m;y++)g.push(p+y)}function v(g){var p=g.dimsDef;return p?p.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function C9(t,e,r){var n={},i=Mg(t);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===qr||a===Fn)&&N(o,function(f,c){(Ce(f)?f.name:f)==="name"&&(s=c)});var u=function(){for(var f={},c={},h=[],d=0,v=Math.min(5,r);d<v;d++){var g=Rx(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);h.push(g);var p=g===zt.Not;if(p&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v||!p&&h[f.n]===zt.Not)&&(f.n=d),m(f)&&h[f.n]!==zt.Not)return f;p||(g===zt.Might&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v)&&(c.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(f)?f:m(c)?c:null}();if(u){n.value=[u.v];var l=s??u.n;n.itemName=[l],n.seriesName=[l]}return n}function Mg(t){var e=t.get("data",!0);if(!e)return fu(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},on).models[0]}function w9(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:fu(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},on).models}function Lx(t,e){return Rx(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Rx(t,e,r,n,i,a){var o,s=5;if(tr(t))return zt.Not;var u,l;if(n){var f=n[a];Ce(f)?(u=f.name,l=f.type):me(f)&&(u=f)}if(l!=null)return l==="ordinal"?zt.Must:zt.Not;if(e===nr){var c=t;if(r===Jo){for(var h=c[a],d=0;d<(h||[]).length&&d<s;d++)if((o=C(h[i+d]))!=null)return o}else for(var d=0;d<c.length&&d<s;d++){var v=c[i+d];if(v&&(o=C(v[a]))!=null)return o}}else if(e===qr){var g=t;if(!u)return zt.Not;for(var d=0;d<g.length&&d<s;d++){var p=g[d];if(p&&(o=C(p[u]))!=null)return o}}else if(e===Fn){var m=t;if(!u)return zt.Not;var h=m[u];if(!h||tr(h))return zt.Not;for(var d=0;d<h.length&&d<s;d++)if((o=C(h[d]))!=null)return o}else if(e===Ur)for(var y=t,d=0;d<y.length&&d<s;d++){var p=y[d],b=uu(p);if(!ce(b))return zt.Not;if((o=C(b[a]))!=null)return o}function C(w){var D=me(w);if(w!=null&&Number.isFinite(Number(w))&&w!=="")return D?zt.Might:zt.Not;if(D&&w!=="-")return zt.Must}return zt.Not}var D9=Ae();function _9(t,e,r){var n=D9.get(e);if(!n)return r;var i=n(t);if(!i)return r;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)Ee(ko(i[a]));return r.concat(i)}var Ix=ut();ut();var Fg=function(){function t(){}return t.prototype.getColorFromPalette=function(e,r,n){var i=pt(this.get("color",!0)),a=this.get("colorLayer",!0);return S9(this,Ix,i,a,e,r,n)},t.prototype.clearColorPalette=function(){E9(this,Ix)},t}();function x9(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n].length>e)return t[n];return t[r-1]}function S9(t,e,r,n,i,a,o){a=a||t;var s=e(a),u=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var f=o==null||!n?r:x9(n,o);if(f=f||r,!(!f||!f.length)){var c=f[u];return i&&(l[i]=c),s.paletteIdx=(u+1)%f.length,c}}function E9(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Bc,Ou,Nx,Lg="\0_ec_inner",kx=1,A9={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},T9={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Mc={};function O9(t){N(t,function(e,r){if(!Ke.hasClass(r)){var n=A9[r];n&&!Mc[n]&&($t("Component "+r+` is used but not imported.
155
+ import { `+n+` } from 'echarts/components';
156
+ echarts.use([`+n+"]);"),Mc[n]=!0)}})}var Rg=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new bt(a),this._locale=new bt(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){process.env.NODE_ENV!=="production"&&(Ee(r!=null,"option is null/undefined"),Ee(r[Lg]!==kx,"please use chart.getOption()"));var a=Vx(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Vx(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");process.env.NODE_ENV!=="production"&&O9(o),!this.option||r==="recreate"?Nx(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var u=a.getMediaOption(this);u.length&&N(u,function(l){i=!0,this._mergeOption(l,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],u=Ae(),l=n&&n.replaceMergeMainTypeMap;y9(this),N(r,function(c,h){c!=null&&(Ke.hasClass(h)?h&&(s.push(h),u.set(h,!0)):i[h]=i[h]==null?We(c):Je(i[h],c,!0))}),l&&l.each(function(c,h){Ke.hasClass(h)&&!u.get(h)&&(s.push(h),u.set(h,!0))}),Ke.topologicalTravel(s,Ke.getAllClassMainTypes(),f,this);function f(c){var h=_9(this,c,pt(r[c])),d=a.get(c),v=d?l&&l.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=MD(d,h,v);FN(g,c,Ke),i[c]=null,a.set(c,null),o.set(c,0);var p=[],m=[],y=0,b,C;N(g,function(w,D){var _=w.existing,x=w.newOption;if(!x)_&&(_.mergeOption({},this),_.optionUpdated({},!1));else{var S=c==="series",O=Ke.getClass(c,w.keyInfo.subType,!S);if(!O){if(process.env.NODE_ENV!=="production"){var E=w.keyInfo.subType,P=T9[E];Mc[E]||(Mc[E]=!0,$t(P?"Series "+E+` is used but not imported.
157
+ import { `+P+` } from 'echarts/charts';
158
+ echarts.use([`+P+"]);":"Unknown series "+E))}return}if(c==="tooltip"){if(b){process.env.NODE_ENV!=="production"&&(C||(Dt("Currently only one tooltip component is allowed."),C=!0));return}b=!0}if(_&&_.constructor===O)_.name=w.keyInfo.name,_.mergeOption(x,this),_.optionUpdated(x,!1);else{var F=ae({componentIndex:D},w.keyInfo);_=new O(x,this,this,F),ae(_,F),w.brandNew&&(_.__requireNewView=!0),_.init(x,this,this),_.optionUpdated(null,!0)}}_?(p.push(_.option),m.push(_),y++):(p.push(void 0),m.push(void 0))},this),i[c]=p,a.set(c,m),o.set(c,y),c==="series"&&Bc(this)}this._seriesIndices||Bc(this)},e.prototype.getOption=function(){var r=We(this.option);return N(r,function(n,i){if(Ke.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,u=o-1;u>=0;u--)a[u]&&!ko(a[u])?s=!0:(a[u]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Lg],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var u;return i!=null?(u=[],N(pt(i),function(l){s[l]&&u.push(s[l])})):a!=null?u=zx("id",a,s):o!=null?u=zx("name",o,s):u=yt(s,function(l){return!!l}),jx(u,r)},e.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):yt(this._componentsMap.get(i),function(l){return!!l});return u(jx(o,r));function s(l){var f=i+"Index",c=i+"Id",h=i+"Name";return l&&(l[f]!=null||l[c]!=null||l[h]!=null)?{mainType:i,index:l[f],id:l[c],name:l[h]}:null}function u(l){return r.filter?yt(l,r.filter):l}},e.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(_e(r)){var o=n,s=r;a.each(function(c,h){for(var d=0;c&&d<c.length;d++){var v=c[d];v&&s.call(o,h,v,v.componentIndex)}})}else for(var u=me(r)?a.get(r):Ce(r)?this.findComponents(r):null,l=0;u&&l<u.length;l++){var f=u[l];f&&n.call(i,f,f.componentIndex)}},e.prototype.getSeriesByName=function(r){var n=vr(r,null);return yt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},e.prototype.getSeriesByType=function(r){return yt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},e.prototype.getSeries=function(){return yt(this._componentsMap.get("series"),function(r){return!!r})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(r,n){Ou(this),N(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},e.prototype.eachRawSeries=function(r,n){N(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(r,n,i){Ou(this),N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(r,n,i){return N(this.getSeriesByType(r),n,i)},e.prototype.isSeriesFiltered=function(r){return Ou(this),this._seriesIndicesMap.get(r.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(r,n){Ou(this);var i=[];N(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=Ae(i)},e.prototype.restoreData=function(r){Bc(this);var n=this._componentsMap,i=[];n.each(function(a,o){Ke.hasClass(o)&&i.push(o)}),Ke.topologicalTravel(i,Ke.getAllClassMainTypes(),function(a){N(n.get(a),function(o){o&&(a!=="series"||!P9(o,r))&&o.restoreData()})})},e.internalField=function(){Bc=function(r){var n=r._seriesIndices=[];N(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=Ae(n)},Ou=function(r){if(process.env.NODE_ENV!=="production"&&!r._seriesIndices)throw new Error("Option should contains series.")},Nx=function(r,n){r.option={},r.option[Lg]=kx,r._componentsMap=Ae({series:[]}),r._componentsCount=Ae();var i=n.aria;Ce(i)&&i.enabled==null&&(i.enabled=!0),B9(n,r._theme.option),Je(n,m9,!1),r._mergeOption(n,null)}}(),e}(bt);function P9(t,e){if(e){var r=e.seriesIndex,n=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||n!=null&&t.id!==n||i!=null&&t.name!==i}}function B9(t,e){var r=t.color&&!t.colorLayer;N(e,function(n,i){i==="colorLayer"&&r||Ke.hasClass(i)||(typeof n=="object"?t[i]=t[i]?Je(t[i],n,!1):We(n):t[i]==null&&(t[i]=n))})}function zx(t,e,r){if(ce(e)){var n=Ae();return N(e,function(a){if(a!=null){var o=vr(a,null);o!=null&&n.set(a,!0)}}),yt(r,function(a){return a&&n.get(a[t])})}else{var i=vr(e,null);return yt(r,function(a){return a&&i!=null&&a[t]===i})}}function jx(t,e){return e.hasOwnProperty("subType")?yt(t,function(r){return r&&r.subType===e.subType}):t}function Vx(t){var e=Ae();return t&&N(pt(t.replaceMerge),function(r){process.env.NODE_ENV!=="production"&&Ee(Ke.hasClass(r),'"'+r+'" is not valid component main type in "replaceMerge"'),e.set(r,!0)}),{replaceMergeMainTypeMap:e}}wn(Rg,Fg);var M9=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Hx=function(){function t(e){N(M9,function(r){this[r]=ht(e[r],e)},this)}return t}(),Ig={},Ng=function(){function t(){this._coordinateSystems=[]}return t.prototype.create=function(e,r){var n=[];N(Ig,function(i,a){var o=i.create(e,r);n=n.concat(o||[])}),this._coordinateSystems=n},t.prototype.update=function(e,r){N(this._coordinateSystems,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},t.register=function(e,r){Ig[e]=r},t.get=function(e){return Ig[e]},t}(),F9=/^(min|max)?(.+)$/,L9=function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,r,n){e&&(N(pt(e.series),function(o){o&&o.data&&tr(o.data)&&cf(o.data)}),N(pt(e.dataset),function(o){o&&o.source&&tr(o.source)&&cf(o.source)})),e=We(e);var i=this._optionBackup,a=R9(e,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},t.prototype.mountOption=function(e){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],We(e?r.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var r,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(r=We(n[i.getCurrentIndex()]))}return r},t.prototype.getMediaOption=function(e){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var u=0,l=i.length;u<l;u++)I9(i[u].query,r,n)&&o.push(u);return!o.length&&a&&(o=[-1]),o.length&&!k9(o,this._currentMediaIndices)&&(s=ge(o,function(f){return We(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},t}();function R9(t,e,r){var n=[],i,a,o=t.baseOption,s=t.timeline,u=t.options,l=t.media,f=!!t.media,c=!!(u||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((c||f)&&(t.options=t.media=null),a=t),f&&(ce(l)?N(l,function(d){process.env.NODE_ENV!=="production"&&d&&!d.option&&Ce(d.query)&&Ce(d.query.option)&&$t("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),d&&d.option&&(d.query?n.push(d):i||(i=d))}):process.env.NODE_ENV!=="production"&&$t("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),h(a),N(u,function(d){return h(d)}),N(n,function(d){return h(d.option)});function h(d){N(e,function(v){v(d,r)})}return{baseOption:a,timelineOptions:u||[],mediaDefault:i,mediaList:n}}function I9(t,e,r){var n={width:e,height:r,aspectratio:e/r},i=!0;return N(t,function(a,o){var s=o.match(F9);if(!(!s||!s[1]||!s[2])){var u=s[1],l=s[2].toLowerCase();N9(n[l],a,u)||(i=!1)}}),i}function N9(t,e,r){return r==="min"?t>=e:r==="max"?t<=e:t===e}function k9(t,e){return t.join(",")===e.join(",")}var Yr=N,Pu=Ce,Wx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function kg(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Wx.length;r<n;r++){var i=Wx[r],a=e.normal,o=e.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&Bt("itemStyle.normal."+i,i),t[i]=t[i]||{},t[i].normal?Je(t[i].normal,a[i]):t[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&Bt("itemStyle.emphasis."+i,"emphasis."+i),t[i]=t[i]||{},t[i].emphasis?Je(t[i].emphasis,o[i]):t[i].emphasis=o[i],o[i]=null)}}function qt(t,e,r){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,i=t[e].emphasis;n&&(process.env.NODE_ENV!=="production"&&En("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),r?(t[e].normal=t[e].emphasis=null,ke(t[e],n)):t[e]=n),i&&(process.env.NODE_ENV!=="production"&&En(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},t.emphasis[e]=i,i.focus&&(t.emphasis.focus=i.focus),i.blurScope&&(t.emphasis.blurScope=i.blurScope))}}function Bu(t){qt(t,"itemStyle"),qt(t,"lineStyle"),qt(t,"areaStyle"),qt(t,"label"),qt(t,"labelLine"),qt(t,"upperLabel"),qt(t,"edgeLabel")}function xt(t,e){var r=Pu(t)&&t[e],n=Pu(r)&&r.textStyle;if(n){process.env.NODE_ENV!=="production"&&En("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var i=0,a=BD.length;i<a;i++){var o=BD[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}}function Xr(t){t&&(Bu(t),xt(t,"label"),t.emphasis&&xt(t.emphasis,"label"))}function z9(t){if(Pu(t)){kg(t),Bu(t),xt(t,"label"),xt(t,"upperLabel"),xt(t,"edgeLabel"),t.emphasis&&(xt(t.emphasis,"label"),xt(t.emphasis,"upperLabel"),xt(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(kg(e),Xr(e));var r=t.markLine;r&&(kg(r),Xr(r));var n=t.markArea;n&&Xr(n);var i=t.data;if(t.type==="graph"){i=i||t.nodes;var a=t.links||t.edges;if(a&&!tr(a))for(var o=0;o<a.length;o++)Xr(a[o]);N(t.categories,function(l){Bu(l)})}if(i&&!tr(i))for(var o=0;o<i.length;o++)Xr(i[o]);if(e=t.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)Xr(s[o]);if(r=t.markLine,r&&r.data)for(var u=r.data,o=0;o<u.length;o++)ce(u[o])?(Xr(u[o][0]),Xr(u[o][1])):Xr(u[o]);t.type==="gauge"?(xt(t,"axisLabel"),xt(t,"title"),xt(t,"detail")):t.type==="treemap"?(qt(t.breadcrumb,"itemStyle"),N(t.levels,function(l){Bu(l)})):t.type==="tree"&&Bu(t.leaves)}}function oi(t){return ce(t)?t:t?[t]:[]}function $x(t){return(ce(t)?t[0]:t)||{}}function j9(t,e){Yr(oi(t.series),function(n){Pu(n)&&z9(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Yr(r,function(n){Yr(oi(t[n]),function(i){i&&(xt(i,"axisLabel"),xt(i.axisPointer,"label"))})}),Yr(oi(t.parallel),function(n){var i=n&&n.parallelAxisDefault;xt(i,"axisLabel"),xt(i&&i.axisPointer,"label")}),Yr(oi(t.calendar),function(n){qt(n,"itemStyle"),xt(n,"dayLabel"),xt(n,"monthLabel"),xt(n,"yearLabel")}),Yr(oi(t.radar),function(n){xt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&En("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&En("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Yr(n.indicator,function(i){i.text&&Bt("text","name","radar.indicator")})}),Yr(oi(t.geo),function(n){Pu(n)&&(Xr(n),Yr(oi(n.regions),function(i){Xr(i)}))}),Yr(oi(t.timeline),function(n){Xr(n),qt(n,"label"),qt(n,"itemStyle"),qt(n,"controlStyle",!0);var i=n.data;ce(i)&&N(i,function(a){Ce(a)&&(qt(a,"label"),qt(a,"itemStyle"))})}),Yr(oi(t.toolbox),function(n){qt(n,"iconStyle"),Yr(n.feature,function(i){qt(i,"iconStyle")})}),xt($x(t.axisPointer),"label"),xt($x(t.tooltip).axisPointer,"label")}function V9(t,e){for(var r=e.split(","),n=t,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function H9(t,e,r,n){for(var i=e.split(","),a=t,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function Gx(t){t&&N(W9,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var W9=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],$9=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],zg=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Mu(t){var e=t&&t.itemStyle;if(e)for(var r=0;r<zg.length;r++){var n=zg[r][1],i=zg[r][0];e[n]!=null&&(e[i]=e[n],process.env.NODE_ENV!=="production"&&Bt(n,i))}}function Ux(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&Bt("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function qx(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,process.env.NODE_ENV!=="production"&&Bt("downplay","blur","sunburst"))}function G9(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&Bt("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),t.emphasis.focus="adjacency"))}function Yx(t,e){if(t)for(var r=0;r<t.length;r++)e(t[r]),t[r]&&Yx(t[r].children,e)}function Xx(t,e){j9(t,e),t.series=pt(t.series),N(t.series,function(r){if(Ce(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow,process.env.NODE_ENV!=="production"&&Bt("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise,process.env.NODE_ENV!=="production"&&Bt("clockWise","clockwise")),Ux(r.label);var i=r.data;if(i&&!tr(i))for(var a=0;a<i.length;a++)Ux(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&Bt("hoverOffset","emphasis.scaleSize"),r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=V9(r,"pointer.color");o!=null&&H9(r,"itemStyle.color",o)}else if(n==="bar"){Mu(r),Mu(r.backgroundStyle),Mu(r.emphasis);var i=r.data;if(i&&!tr(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Mu(i[a]),Mu(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s,process.env.NODE_ENV!=="production"&&Bt("highlightPolicy","emphasis.focus","sunburst"))),qx(r),Yx(r.data,qx)}else n==="graph"||n==="sankey"?G9(r):n==="map"&&(r.mapType&&!r.map&&(process.env.NODE_ENV!=="production"&&Bt("mapType","map","map"),r.map=r.mapType),r.mapLocation&&(process.env.NODE_ENV!=="production"&&En("`mapLocation` is not used anymore."),ke(r,r.mapLocation)));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&Bt("hoverAnimation","emphasis.scale"),r.emphasis.scale=r.hoverAnimation)),Gx(r)}}),t.dataRange&&(t.visualMap=t.dataRange),N($9,function(r){var n=t[r];n&&(ce(n)||(n=[n]),N(n,function(i){Gx(i)}))})}function U9(t){var e=Ae();t.eachSeries(function(r){var n=r.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(q9)}function q9(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,u=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(l,f,c){var h=o.get(e.stackedDimension,c);if(isNaN(h))return i;var d,v;s?v=o.getRawIndex(c):d=o.get(e.stackedByDimension,c);for(var g=NaN,p=r-1;p>=0;p--){var m=t[p];if(s||(v=m.data.rawIndexOf(m.stackedByDimension,d)),v>=0){var y=m.data.getByRawIndex(m.stackResultDimension,v);if(u==="all"||u==="positive"&&y>0||u==="negative"&&y<0||u==="samesign"&&h>=0&&y>0||u==="samesign"&&h<=0&&y<0){h=bN(h,y),g=y;break}}}return n[0]=h,n[1]=g,n})})}var Fc=function(){function t(e){this.data=e.data||(e.sourceFormat===Fn?{}:[]),this.sourceFormat=e.sourceFormat||Mx,this.seriesLayoutBy=e.seriesLayoutBy||Ln,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var i=r[n];i.type==null&&Lx(this,n)===zt.Must&&(i.type="ordinal")}}return t}();function jg(t){return t instanceof Fc}function Vg(t,e,r){r=r||Zx(t);var n=e.seriesLayoutBy,i=X9(t,r,n,e.sourceHeader,e.dimensions),a=new Fc({data:t,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:We(e)});return a}function Kx(t){return new Fc({data:t,sourceFormat:tr(t)?ai:Ur})}function Y9(t){return new Fc({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:We(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function Zx(t){var e=Mx;if(tr(t))e=ai;else if(ce(t)){t.length===0&&(e=nr);for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i!=null){if(ce(i)||tr(i)){e=nr;break}else if(Ce(i)){e=qr;break}}}}else if(Ce(t)){for(var a in t)if(xe(t,a)&&Ht(t[a])){e=Fn;break}}return e}function X9(t,e,r,n,i){var a,o;if(!t)return{dimensionsDefine:Jx(i),startIndex:o,dimensionsDetectedCount:a};if(e===nr){var s=t;n==="auto"||n==null?Qx(function(l){l!=null&&l!=="-"&&(me(l)?o==null&&(o=1):o=0)},r,s,10):o=rt(n)?n:n?1:0,!i&&o===1&&(i=[],Qx(function(l,f){i[f]=l!=null?l+"":""},r,s,1/0)),a=i?i.length:r===Jo?s.length:s[0]?s[0].length:null}else if(e===qr)i||(i=K9(t));else if(e===Fn)i||(i=[],N(t,function(l,f){i.push(f)}));else if(e===Ur){var u=uu(t[0]);a=ce(u)&&u.length||1}else e===ai&&process.env.NODE_ENV!=="production"&&Ee(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:Jx(i),dimensionsDetectedCount:a}}function K9(t){for(var e=0,r;e<t.length&&!(r=t[e++]););if(r)return Xe(r)}function Jx(t){if(t){var e=Ae();return ge(t,function(r,n){r=Ce(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function Qx(t,e,r,n){if(e===Jo)for(var i=0;i<r.length&&i<n;i++)t(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)t(a[i],i)}function eS(t){var e=t.sourceFormat;return e===qr||e===Fn}var za,ja,Va,tS,rS,nS=function(){function t(e,r){var n=jg(e)?e:Kx(e);this._source=n;var i=this._data=n.data;if(n.sourceFormat===ai){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=r,this._data=i}rS(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,r){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=function(){var e=t.prototype;e.pure=!1,e.persistent=!0}(),t.internalField=function(){var e;rS=function(o,s,u){var l=u.sourceFormat,f=u.seriesLayoutBy,c=u.startIndex,h=u.dimensionsDefine,d=tS[Wg(l,f)];if(process.env.NODE_ENV!=="production"&&Ee(d,"Invalide sourceFormat: "+l),ae(o,d),l===ai)o.getItem=r,o.count=i,o.fillStorage=n;else{var v=aS(l,f);o.getItem=ht(v,null,s,c,h);var g=sS(l,f);o.count=ht(g,null,s,c,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var u=this._data,l=this._dimSize,f=l*o,c=0;c<l;c++)s[c]=u[f+c];return s},n=function(o,s,u,l){for(var f=this._data,c=this._dimSize,h=0;h<c;h++){for(var d=l[h],v=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],p=s-o,m=u[h],y=0;y<p;y++){var b=f[y*c+h];m[o+y]=b,b<v&&(v=b),b>g&&(g=b)}d[0]=v,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};tS=(e={},e[nr+"_"+Ln]={pure:!0,appendData:a},e[nr+"_"+Jo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[qr]={pure:!0,appendData:a},e[Fn]={pure:!0,appendData:function(o){var s=this._data;N(o,function(u,l){for(var f=s[l]||(s[l]=[]),c=0;c<(u||[]).length;c++)f.push(u[c])})}},e[Ur]={appendData:a},e[ai]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&Ee(tr(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),t}(),iS=function(t,e,r,n){return t[n]},Z9=(za={},za[nr+"_"+Ln]=function(t,e,r,n){return t[n+e]},za[nr+"_"+Jo]=function(t,e,r,n,i){n+=e;for(var a=i||[],o=t,s=0;s<o.length;s++){var u=o[s];a[s]=u?u[n]:null}return a},za[qr]=iS,za[Fn]=function(t,e,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var u=t[s];a[o]=u?u[n]:null}return a},za[Ur]=iS,za);function aS(t,e){var r=Z9[Wg(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support get item on "'+t+'", "'+e+'".'),r}var oS=function(t,e,r){return t.length},J9=(ja={},ja[nr+"_"+Ln]=function(t,e,r){return Math.max(0,t.length-e)},ja[nr+"_"+Jo]=function(t,e,r){var n=t[0];return n?Math.max(0,n.length-e):0},ja[qr]=oS,ja[Fn]=function(t,e,r){var n=r[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var i=t[n];return i?i.length:0},ja[Ur]=oS,ja);function sS(t,e){var r=J9[Wg(t,e)];return process.env.NODE_ENV!=="production"&&Ee(r,'Do not support count on "'+t+'", "'+e+'".'),r}var Hg=function(t,e,r){return t[e]},Q9=(Va={},Va[nr]=Hg,Va[qr]=function(t,e,r){return t[r]},Va[Fn]=Hg,Va[Ur]=function(t,e,r){var n=uu(t);return n instanceof Array?n[e]:n},Va[ai]=Hg,Va);function uS(t){var e=Q9[t];return process.env.NODE_ENV!=="production"&&Ee(e,'Do not support get value on "'+t+'".'),e}function Wg(t,e){return t===nr?t+"_"+e:t}function Qo(t,e,r){if(t){var n=t.getRawDataItem(e);if(n!=null){var i=t.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=t.getDimensionIndex(r),s=i.getDimensionProperty(o);return uS(a)(n,o,s)}else{var u=n;return a===Ur&&(u=uu(n)),u}}}}var e7=/\{@(.+?)\}/g,t7=function(){function t(){}return t.prototype.getDataParams=function(e,r){var n=this.getData(r),i=this.getRawValue(e,r),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),u=n.getItemVisual(e,"style"),l=u&&u[n.getItemVisual(e,"drawType")||"fill"],f=u&&u.stroke,c=this.mainType,h=c==="series",d=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:l,borderColor:f,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,r,n,i,a,o){r=r||"normal";var s=this.getData(n),u=this.getDataParams(e,n);if(o&&(u.value=o.interpolatedValue),i!=null&&ce(u.value)&&(u.value=u.value[i]),!a){var l=s.getItemModel(e);a=l.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(_e(a))return u.status=r,u.dimensionIndex=i,a(u);if(me(a)){var f=Ax(a,u);return f.replace(e7,function(c,h){var d=h.length,v=h;v.charAt(0)==="["&&v.charAt(d-1)==="]"&&(v=+v.slice(1,d-1),process.env.NODE_ENV!=="production"&&isNaN(v)&&$t("Invalide label formatter: @"+h+", only support @[0], @[1], @[2], ..."));var g=Qo(s,e,v);if(o&&ce(o.interpolatedValue)){var p=s.getDimensionIndex(v);p>=0&&(g=o.interpolatedValue[p])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return Qo(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function lS(t){var e,r;return Ce(t)?t.type?r=t:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+dr(t)):e=t,{text:e,frag:r}}function Fu(t){return new r7(t)}var r7=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,u=f(e&&e.modBy),l=e&&e.modDataCount||0;(o!==u||s!==l)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=u,this._modDataCount=l;var h=e&&e.step;if(r?(process.env.NODE_ENV!=="production"&&Ee(r._outputDueEnd!=null),this._dueEnd=r._outputDueEnd):(process.env.NODE_ENV!=="production"&&Ee(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||d<v)){var g=this._progress;if(ce(g))for(var p=0;p<g.length;p++)this._doProgress(g[p],d,v,u,l);else this._doProgress(g,d,v,u,l)}this._dueIndex=v;var m=this._settedOutputEnd!=null?this._settedOutputEnd:v;process.env.NODE_ENV!=="production"&&Ee(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,r,n,i,a){fS.reset(r,n,i,a),this._callingProgress=e,this._callingProgress({start:r,end:n,count:n-r,next:fS.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!e&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),ce(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){process.env.NODE_ENV!=="production"&&Ee(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t}(),fS=function(){var t,e,r,n,i,a={reset:function(u,l,f,c){e=u,t=l,r=f,n=c,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var u=e%i*r+Math.ceil(e/i),l=e>=t?null:u<n?u:e;return e++,l}}();function Lc(t,e){var r=e&&e.type;return r==="ordinal"?t:(r==="time"&&!rt(t)&&t!=null&&t!=="-"&&(t=+Qn(t)),t==null||t===""?NaN:Number(t))}var n7=Ae({number:function(t){return parseFloat(t)},time:function(t){return+Qn(t)},trim:function(t){return me(t)?Dn(t):t}});function cS(t){return n7.get(t)}var hS={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return t>e},gte:function(t,e){return t>=e}},i7=function(){function t(e,r){if(!rt(r)){var n="";process.env.NODE_ENV!=="production"&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Ue(n)}this._opFn=hS[e],this._rvalFloat=Si(r)}return t.prototype.evaluate=function(e){return rt(e)?this._opFn(e,this._rvalFloat):this._opFn(Si(e),this._rvalFloat)},t}(),dS=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=rt(e)?e:Si(e),i=rt(r)?r:Si(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=me(e),u=me(r);s&&(n=u?e:0),u&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},t}(),a7=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=Si(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Si(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function o7(t,e){return t==="eq"||t==="ne"?new a7(t==="eq",e):xe(hS,t)?new i7(t,e):null}var s7=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return Lc(e,r)},t}();function u7(t,e){var r=new s7,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Ln&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Ue(o));var s=[],u={},l=t.dimensionsDefine;if(l)N(l,function(g,p){var m=g.name,y={index:p,name:m,displayName:g.displayName};if(s.push(y),m!=null){var b="";xe(u,m)&&(process.env.NODE_ENV!=="production"&&(b='dimension name "'+m+'" duplicated.'),Ue(b)),u[m]=y}});else for(var f=0;f<t.dimensionsDetectedCount;f++)s.push({index:f});var c=aS(i,Ln);e.__isBuiltIn&&(r.getRawDataItem=function(g){return c(n,a,s,g)},r.getRawData=ht(l7,null,t)),r.cloneRawData=ht(f7,null,t);var h=sS(i,Ln);r.count=ht(h,null,n,a,s);var d=uS(i);r.retrieveValue=function(g,p){var m=c(n,a,s,g);return v(m,p)};var v=r.retrieveValueFromItem=function(g,p){if(g!=null){var m=s[p];if(m)return d(g,p,m.name)}};return r.getDimensionInfo=ht(c7,null,s,u),r.cloneAllDimensionInfo=ht(h7,null,s),r}function l7(t){var e=t.sourceFormat;if(!$g(e)){var r="";process.env.NODE_ENV!=="production"&&(r="`getRawData` is not supported in source format "+e),Ue(r)}return t.data}function f7(t){var e=t.sourceFormat,r=t.data;if(!$g(e)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+e),Ue(n)}if(e===nr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(e===qr){for(var i=[],a=0,o=r.length;a<o;a++)i.push(ae({},r[a]));return i}}function c7(t,e,r){if(r!=null){if(rt(r)||!isNaN(r)&&!xe(e,r))return t[r];if(xe(e,r))return e[r]}}function h7(t){return We(t)}var vS=Ae();function d7(t){t=We(t);var e=t.type,r="";e||(process.env.NODE_ENV!=="production"&&(r="Must have a `type` when `registerTransform`."),Ue(r));var n=e.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(r='Name must include namespace like "ns:regression".'),Ue(r));var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),t.__isBuiltIn=i,vS.set(e,t)}function v7(t,e,r){var n=pt(t),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),Ue(a));for(var o=0,s=i;o<s;o++){var u=n[o];e=p7(u,e,r,i===1?null:o),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function p7(t,e,r,n){var i="";e.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),Ue(i)),Ce(t)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof t+"."),Ue(i));var a=t.type,o=vS.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),Ue(i));var s=ge(e,function(f){return u7(f,o)}),u=pt(o.transform({upstream:s[0],upstreamList:s,config:We(t.config)}));if(process.env.NODE_ENV!=="production"&&t.print){var l=ge(u,function(f){var c=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+r.datasetIndex+c+" ===","- transform result data:",dr(f.data),"- transform result dimensions:",dr(f.dimensions)].join(`
159
+ `)}).join(`
160
+ `);xN(l)}return ge(u,function(f,c){var h="";Ce(f)||(process.env.NODE_ENV!=="production"&&(h="A transform should not return some empty results."),Ue(h)),f.data||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be not be null or undefined"),Ue(h));var d=Zx(f.data);$g(d)||(process.env.NODE_ENV!=="production"&&(h="Transform result data should be array rows or object rows."),Ue(h));var v,g=e[0];if(g&&c===0&&!f.dimensions){var p=g.startIndex;p&&(f.data=g.data.slice(0,p).concat(f.data)),v={seriesLayoutBy:Ln,sourceHeader:p,dimensions:g.metaRawOption.dimensions}}else v={seriesLayoutBy:Ln,sourceHeader:0,dimensions:f.dimensions};return Vg(f.data,v,null)})}function $g(t){return t===nr||t===qr}var Rc="undefined",g7=typeof Uint32Array===Rc?Array:Uint32Array,m7=typeof Uint16Array===Rc?Array:Uint16Array,pS=typeof Int32Array===Rc?Array:Int32Array,gS=typeof Float64Array===Rc?Array:Float64Array,mS={float:gS,int:pS,ordinal:Array,number:Array,time:gS},Gg;function Lu(t){return t>65535?g7:m7}function es(){return[1/0,-1/0]}function y7(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function yS(t,e,r,n,i){var a=mS[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var u=new a(n),l=0;l<s;l++)u[l]=o[l];t[e]=u}}else t[e]=new a(n)}var Ug=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Ae()}return t.prototype.initData=function(e,r,n){process.env.NODE_ENV!=="production"&&Ee(_e(e.getItem)&&_e(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=Gg[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=eS(i);this._dimensions=ge(r,function(s){return process.env.NODE_ENV!=="production"&&o&&Ee(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,r){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(e,a),this._chunks[a]=new mS[r||"float"](this._rawCount),this._rawExtent[a]=es(),a},t.prototype.collectOrdinalMeta=function(e,r){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=es());for(var u=a[e],l=o;l<s;l++){var f=n[l]=r.parseAndCollect(n[l]);isNaN(f)||(u[0]=Math.min(f,u[0]),u[1]=Math.max(f,u[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var r=this._dimensions[e],n=r.ordinalMeta;return n},t.prototype.getDimensionProperty=function(e){var r=this._dimensions[e];return r&&r.property},t.prototype.appendData=function(e){process.env.NODE_ENV!=="production"&&Ee(!this._indices,"appendData can only be called on raw data.");var r=this._provider,n=this.count();r.appendData(e);var i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},t.prototype.appendValues=function(e,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),u=s+Math.max(e.length,r||0),l=0;l<a;l++){var f=i[l];yS(n,l,f.type,u,!0)}for(var c=[],h=s;h<u;h++)for(var d=h-s,v=0;v<a;v++){var f=i[v],g=Gg.arrayRows.call(this,e[d]||c,f.property,d,v);n[v][h]=g;var p=o[v];g<p[0]&&(p[0]=g),g>p[1]&&(p[1]=g)}return this._rawCount=this._count=u,{start:s,end:u}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,u=this._rawExtent,l=ge(o,function(y){return y.property}),f=0;f<s;f++){var c=o[f];u[f]||(u[f]=es()),yS(a,f,c.type,r,n)}if(i.fillStorage)i.fillStorage(e,r,a,u);else for(var h=[],d=e;d<r;d++){h=i.getItem(d,h);for(var v=0;v<s;v++){var g=a[v],p=this._dimValueGetter(h,l[v],d,v);g[d]=p;var m=u[v];p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(r)]:NaN},t.prototype.getValues=function(e,r){var n=[],i=[];if(r==null){r=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],r));return n},t.prototype.getByRawIndex=function(e,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[e];return n?n[r]:NaN},t.prototype.getSum=function(e){var r=this._chunks[e],n=0;if(r)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},t.prototype.getMedian=function(e){var r=[];this.each([e],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<e)i=o+1;else if(r[o]>e)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,u=-1,l=0,f=0,c=this.count();f<c;f++){var h=this.getRawIndex(f),d=r-a[h],v=Math.abs(d);v<=n&&((v<s||v===s&&d>=0&&u<0)&&(s=v,u=d,l=0),d===u&&(o[l++]=f))}return o.length=l,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=r[a]}else e=new n(r.buffer,0,i)}else{var n=Lu(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},t.prototype.filter=function(e,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Lu(n._rawCount),o=new a(i),s=[],u=e.length,l=0,f=e[0],c=n._chunks,h=0;h<i;h++){var d=void 0,v=n.getRawIndex(h);if(u===0)d=r(h);else if(u===1){var g=c[f][v];d=r(g,h)}else{for(var p=0;p<u;p++)s[p]=c[e[p]][v];s[p]=h,d=r.apply(null,s)}d&&(o[l++]=v)}return l<i&&(n._indices=o),n._count=l,n._extent=[],n._updateGetRawIdx(),n},t.prototype.selectRange=function(e){var r=this.clone(),n=r._count;if(!n)return this;var i=Xe(e),a=i.length;if(!a)return this;var o=r.count(),s=Lu(r._rawCount),u=new s(o),l=0,f=i[0],c=e[f][0],h=e[f][1],d=r._chunks,v=!1;if(!r._indices){var g=0;if(a===1){for(var p=d[i[0]],m=0;m<n;m++){var y=p[m];(y>=c&&y<=h||isNaN(y))&&(u[l++]=g),g++}v=!0}else if(a===2){for(var p=d[i[0]],b=d[i[1]],C=e[i[1]][0],w=e[i[1]][1],m=0;m<n;m++){var y=p[m],D=b[m];(y>=c&&y<=h||isNaN(y))&&(D>=C&&D<=w||isNaN(D))&&(u[l++]=g),g++}v=!0}}if(!v)if(a===1)for(var m=0;m<o;m++){var _=r.getRawIndex(m),y=d[i[0]][_];(y>=c&&y<=h||isNaN(y))&&(u[l++]=_)}else for(var m=0;m<o;m++){for(var x=!0,_=r.getRawIndex(m),S=0;S<a;S++){var O=i[S],y=d[O][_];(y<e[O][0]||y>e[O][1])&&(x=!1)}x&&(u[l++]=r.getRawIndex(m))}return l<o&&(r._indices=u),r._count=l,r._extent=[],r._updateGetRawIdx(),r},t.prototype.map=function(e,r){var n=this.clone(e);return this._updateDims(n,e,r),n},t.prototype.modify=function(e,r){this._updateDims(this,e,r)},t.prototype._updateDims=function(e,r,n){for(var i=e._chunks,a=[],o=r.length,s=e.count(),u=[],l=e._rawExtent,f=0;f<r.length;f++)l[r[f]]=es();for(var c=0;c<s;c++){for(var h=e.getRawIndex(c),d=0;d<o;d++)u[d]=i[r[d]][h];u[o]=c;var v=n&&n.apply(null,u);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var f=0;f<v.length;f++){var g=r[f],p=v[f],m=l[g],y=i[g];y&&(y[h]=p),p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,u=Math.floor(1/r),l=this.getRawIndex(0),f,c,h,d=new(Lu(this._rawCount))(Math.min((Math.ceil(o/u)+2)*2,o));d[s++]=l;for(var v=1;v<o-1;v+=u){for(var g=Math.min(v+u,o-1),p=Math.min(v+u*2,o),m=(p+g)/2,y=0,b=g;b<p;b++){var C=this.getRawIndex(b),w=a[C];isNaN(w)||(y+=w)}y/=p-g;var D=v,_=Math.min(v+u,o),x=v-1,S=a[l];f=-1,h=D;for(var O=-1,E=0,b=D;b<_;b++){var C=this.getRawIndex(b),w=a[C];if(isNaN(w)){E++,O<0&&(O=C);continue}c=Math.abs((x-m)*(w-S)-(x-b)*(y-S)),c>f&&(f=c,h=C)}E>0&&E<_-D&&(d[s++]=Math.min(O,h),h=Math.max(O,h)),d[s++]=h,l=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},t.prototype.downSample=function(e,r,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],u=Math.floor(1/r),l=o[e],f=this.count(),c=a._rawExtent[e]=es(),h=new(Lu(this._rawCount))(Math.ceil(f/u)),d=0,v=0;v<f;v+=u){u>f-v&&(u=f-v,s.length=u);for(var g=0;g<u;g++){var p=this.getRawIndex(v+g);s[g]=l[p]}var m=n(s),y=this.getRawIndex(Math.min(v+i(s,m)||0,f-1));l[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[e[0]][s],a);break;case 2:r(i[e[0]][s],i[e[1]][s],a);break;default:for(var u=0,l=[];u<n;u++)l[u]=i[e[u]][s];l[u]=a,r.apply(null,l)}}},t.prototype.getDataExtent=function(e){var r=this._chunks[e],n=es();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],u=o[1],l=0;l<i;l++){var f=this.getRawIndex(l),c=r[f];c<s&&(s=c),c>u&&(u=c)}return o=[s,u],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},t.prototype.clone=function(e,r){var n=new t,i=this._chunks,a=e&&Xn(e,function(s,u){return s[u]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?y7(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=We(this._extent),e._rawExtent=We(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,r=void 0;if(e===Array){var n=this._indices.length;r=new e(n);for(var i=0;i<n;i++)r[i]=this._indices[i]}else r=new e(this._indices);return r}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return Lc(r[a],this._dimensions[a])}Gg={arrayRows:e,objectRows:function(r,n,i,a){return Lc(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Lc(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),bS=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Ru(e)){var o=e,s=void 0,u=void 0,l=void 0;if(n){var f=r[0];f.prepareSource(),l=f.getSource(),s=l.data,u=l.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),u=tr(s)?ai:Ur,a=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=Be(c.seriesLayoutBy,h.seriesLayoutBy)||null,v=Be(c.sourceHeader,h.sourceHeader),g=Be(c.dimensions,h.dimensions),p=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||g;i=p?[Vg(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:g},u)]:[]}else{var m=e;if(n){var y=this._applyTransform(r);i=y.sourceList,a=y.upstreamSignList}else{var b=m.get("source",!0);i=[Vg(b,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&Ee(i&&a),this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&Ee(i!=null||n!=null),i!=null){var a="";e.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),wS(a))}var o,s=[],u=[];return N(e,function(l){l.prepareSource();var f=l.getSource(i||0),c="";i!=null&&!f&&(process.env.NODE_ENV!=="production"&&(c="Can not retrieve result by `fromTransformResult`: "+i),wS(c)),s.push(f),u.push(l._getVersionSign())}),n?o=v7(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[Y9(s[0])]),{sourceList:o,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r<e.length;r++){var n=e[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var r=this._sourceList[e];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return r},t.prototype.getSharedDataStore=function(e){process.env.NODE_ENV!=="production"&&Ee(Ru(this._sourceHost),"Can only call getDataStore on series source manager.");var r=e.makeStoreSchema();return this._innerGetDataStore(r.dimensions,e.source,r.hash)},t.prototype._innerGetDataStore=function(e,r,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var u=this._getUpstreamSourceManagers()[0];Ru(this._sourceHost)&&u?s=u._innerGetDataStore(e,r,n):(s=new Ug,s.initData(new nS(r,e.length),e)),o[n]=s}return s},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Ru(e)){var r=Mg(e);return r?[r.getSourceManager()]:[]}else return ge(w9(e),function(n){return n.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,r,n,i;if(Ru(e))r=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},t}();function CS(t){var e=t.option.transform;e&&cf(t.option.transform)}function Ru(t){return t.mainType==="series"}function wS(t){throw new Error(t)}var DS="line-height:1";function _S(t,e){var r=t.color||"#6e7079",n=t.fontSize||12,i=t.fontWeight||"400",a=t.color||"#464646",o=t.fontSize||14,s=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Ar(n+"")+"px;color:"+Ar(r)+";font-weight:"+Ar(i+""),valueStyle:"font-size:"+Ar(o+"")+"px;color:"+Ar(a)+";font-weight:"+Ar(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var b7=[0,10,20,30],C7=["",`
161
+ `,`
162
+
163
+ `,`
164
+
165
+
166
+ `];function Iu(t,e){return e.type=t,e}function qg(t){return t.type==="section"}function xS(t){return qg(t)?w7:D7}function SS(t){if(qg(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=SS(i);a>=e&&(e=a+ +(n&&(!a||qg(i)&&!i.noHeader)))}),e}return 0}function w7(t,e,r,n){var i=e.noHeader,a=_7(SS(e)),o=[],s=e.blocks||[];Ee(!s||ce(s)),s=s||[];var u=t.orderMode;if(e.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(xe(l,u)){var f=new dS(l[u],null);s.sort(function(v,g){return f.evaluate(v.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}N(s,function(v,g){var p=e.valueFormatter,m=xS(v)(p?ae(ae({},t),{valueFormatter:p}):t,v,g>0?a.html:0,n);m!=null&&o.push(m)});var c=t.renderMode==="richText"?o.join(a.richText):Yg(o.join(""),i?r:a.html);if(i)return c;var h=Tg(e.header,"ordinal",t.useUTC),d=_S(n,t.renderMode).nameStyle;return t.renderMode==="richText"?AS(t,h,d)+a.richText+c:Yg('<div style="'+d+";"+DS+';">'+Ar(h)+"</div>"+c,r)}function D7(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,u=e.name,l=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(C){return C=ce(C)?C:[C],ge(C,function(w,D){return Tg(w,ce(d)?d[D]:d,l)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":Tg(u,"ordinal",l),d=e.valueType,v=o?[]:f(e.value,e.dataIndex),g=!s||!a,p=!s&&a,m=_S(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":AS(t,h,y))+(o?"":E7(t,v,g,p,b)):Yg((s?"":c)+(a?"":x7(h,!s,y))+(o?"":S7(v,g,p,b)),r)}}function ES(t,e,r,n,i,a){if(t){var o=xS(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function _7(t){return{html:b7[t],richText:C7[t]}}function Yg(t,e){var r='<div style="clear:both"></div>',n="margin: "+e+"px 0 0";return'<div style="'+n+";"+DS+';">'+t+r+"</div>"}function x7(t,e,r){var n=e?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Ar(t)+"</span>"}function S7(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ce(t)?t:[t],'<span style="'+a+";"+n+'">'+ge(t,function(o){return Ar(o)}).join("&nbsp;&nbsp;")+"</span>"}function AS(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function E7(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ce(e)?e.join(" "):e,a)}function A7(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ia(n)}function TS(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var Xg=function(){function t(){this.richTextStyles={},this._nextStyleNameId=SD()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=d9({color:r,type:e,renderMode:n,markerId:i});return me(a)?a:(process.env.NODE_ENV!=="production"&&Ee(i),this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ce(r)?N(r,function(a){return ae(n,a)}):ae(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function T7(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),u=ce(s),l=A7(e,r),f,c,h,d;if(o>1||u&&!o){var v=O7(s,e,r,a,l);f=v.inlineValues,c=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=f=Qo(i,r,a[0]),c=g.type}else d=f=u?s[0]:s;var p=Bp(e),m=p&&e.name||"",y=i.getName(r),b=n?m:y;return Iu("section",{header:m,noHeader:n||!p,sortParam:d,blocks:[Iu("nameValue",{markerType:"item",markerColor:l,name:b,noName:!Dn(b),value:f,valueType:c,dataIndex:r})].concat(h||[])})}function O7(t,e,r,n,i){var a=e.getData(),o=Xn(t,function(c,h,d){var v=a.getDimensionInfo(d);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],u=[],l=[];n.length?N(n,function(c){f(Qo(a,r,c),c)}):N(t,f);function f(c,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?l.push(Iu("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),u.push(d.type)))}return{inlineValues:s,inlineValueTypes:u,blocks:l}}var Fi=ut();function Ic(t,e){return t.getName(e)||t.getId(e)}var Nc="__universalTransitionEnabled",ln=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Fu({count:B7,reset:M7}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Fi(this).sourceManager=new bS(this);a.prepareSource();var o=this.getInitialData(r,i);PS(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&Ee(o,"getInitialData returned invalid data."),Fi(this).dataBeforeProcessed=o,OS(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Tu(this),a=i?Pc(r):{},o=this.subType;Ke.hasClass(o)&&(o+="Series"),Je(r,n.getTheme().get(this.subType)),Je(r,this.getDefaultOption()),Pp(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&ka(r,a,i)},e.prototype.mergeOption=function(r,n){r=Je(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Tu(this);i&&ka(this.option,r,i);var a=Fi(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);PS(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Fi(this).dataBeforeProcessed=o,OS(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!tr(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&Pp(r[i],"label",n)},e.prototype.getInitialData=function(r,n){},e.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},e.prototype.getData=function(r){var n=Kg(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return Fi(this).data},e.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},e.prototype.setData=function(r){var n=Kg(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}Fi(this).data=r},e.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Ae(r)},e.prototype.getSourceManager=function(){return Fi(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Fi(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},e.prototype.formatTooltip=function(r,n,i){return T7({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Pe.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=Fg.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var u=r[s],l=Ic(o,u);i[l]=!1,this._selectedDataIndicesMap[l]=-1}}},e.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=Xe(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Ic(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Nc])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,u=n.length;if(!(!s||!u)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Ce(o.selectedMap)||(o.selectedMap={});for(var l=o.selectedMap,f=0;f<u;f++){var c=n[f],h=Ic(r,c);l[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(c)}}else if(s==="single"||s===!0){var d=n[u-1],h=Ic(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ke.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ke);wn(ln,t7),wn(ln,Fg),zD(ln,Ke);function OS(t){var e=t.name;Bp(t)||(t.name=P7(t)||e)}function P7(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function B7(t){return t.model.getRawData().count()}function M7(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),F7}function F7(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function PS(t,e){N(n8(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,wt(L7,e))})}function L7(t,e){var r=Kg(t);return r&&r.setOutputEnd((e||this).count()),e}function Kg(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var Pr=function(){function t(){this.group=new Lt,this.uid=yc("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();Lp(Pr),jf(Pr);function Zg(){var t=ut();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var BS=ut(),R7=Zg(),Kr=function(){function t(){this.group=new Lt,this.uid=yc("viewChart"),this.renderTask=Fu({plan:I7,reset:N7}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&$t("Unknown dataType "+i.dataType);return}FS(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&$t("Unknown dataType "+i.dataType);return}FS(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){gc(this.group,e)},t.markUpdateMethod=function(e,r){BS(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function MS(t,e,r){t&&Ho(t)&&(e==="emphasis"?Qf:ec)(t,r)}function FS(t,e,r){var n=wa(t,e),i=e&&e.highlightKey!=null?e6(e.highlightKey):null;n!=null?N(pt(n),function(a){MS(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){MS(a,r,i)})}Lp(Kr,["dispose"]),jf(Kr);function I7(t){return R7(t.model)}function N7(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&BS(i).updateMethod,u=a?"incrementalPrepareRender":s&&o[s]?s:"render";return u!=="render"&&o[u](e,r,n,i),k7[u]}var k7={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},kc="\0__throttleOriginMethod",LS="\0__throttleRate",RS="\0__throttleType";function Jg(t,e,r){var n,i=0,a=0,o=null,s,u,l,f;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(u,l||[])}var h=function(){for(var d=[],v=0;v<arguments.length;v++)d[v]=arguments[v];n=new Date().getTime(),u=this,l=d;var g=f||e,p=f||r;f=null,s=n-(p?i:a)-g,clearTimeout(o),p?o=setTimeout(c,g):s>=0?c():o=setTimeout(c,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){f=d},h}function IS(t,e,r,n){var i=t[e];if(i){var a=i[kc]||i,o=i[RS],s=i[LS];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=Jg(a,r,n==="debounce"),i[kc]=a,i[RS]=n,i[LS]=r}return i}}function Qg(t,e){var r=t[e];r&&r[kc]&&(r.clear&&r.clear(),t[e]=r[kc])}var NS=ut(),kS={itemStyle:cu(ux,!0),lineStyle:cu(sx,!0)},z7={lineStyle:"stroke",itemStyle:"fill"};function zS(t,e){var r=t.visualStyleMapper||kS[e];return r||(console.warn("Unknown style type '"+e+"'."),kS.itemStyle)}function jS(t,e){var r=t.visualDrawType||z7[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var j7={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=zS(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var u=jS(t,n),l=o[u],f=_e(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[u]||f||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[u]||(o[u]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||_e(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||_e(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",u),!e.isSeriesFiltered(t)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var g=t.getDataParams(v),p=ae({},o);p[u]=f(g),d.setItemVisual(v,"style",p)}}}},Nu=new bt,V7={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=zS(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var u=o.getRawDataItem(s);if(u&&u[n]){Nu.option=u[n];var l=i(Nu),f=o.ensureUniqueItemVisual(s,"style");ae(f,l),Nu.option.decal&&(o.setItemVisual(s,"decal",Nu.option.decal),Nu.option.decal.dirty=!0),a in l&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},H7={performRawSeries:!0,overallReset:function(t){var e=Ae();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),NS(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=NS(r).scope,s=r.visualStyleAccessPath||"itemStyle",u=jS(r,s);a.each(function(l){var f=a.getRawIndex(l);i[f]=l}),n.each(function(l){var f=i[l],c=a.getItemVisual(f,"colorFromPalette");if(c){var h=a.ensureUniqueItemVisual(f,"style"),d=n.getName(l)||l+"",v=n.count();h[u]=r.getColorFromPalette(d,o,v)}})}})}},zc=Math.PI;function W7(t,e){e=e||{},ke(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Lt,n=new _t({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Tt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new _t({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new sc({shape:{startAngle:-zc/2,endAngle:-zc/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:zc*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:zc*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,u=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-u*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:u),f=t.getHeight()/2;e.showSpinner&&o.setShape({cx:l,cy:f}),a.setShape({x:l-u,y:f-u,width:u*2,height:u*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var VS=function(){function t(e,r,n,i){this._stageTaskMap=Ae(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,u=s!=null?Math.ceil(s/o):null;return{step:o,modBy:u,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),u=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:u,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ae();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),Ee(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(u,l){if(!(i.visualType&&i.visualType!==u.visualType)){var f=o._stageTaskMap.get(u.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(p){s(i,p)&&(p.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);v.each(function(p){p.perform(g)}),h.perform(g)&&(a=!0)}else c&&c.each(function(p,m){s(i,p)&&p.dirty();var y=o.getPerformArgs(p,i.block);y.skip=!u.performRawSeries&&r.isSeriesFiltered(p.context.model),o.updatePayload(p,n),p.perform(y)&&(a=!0)})}});function s(u,l){return u.setDirty&&(!u.dirtyMap||u.dirtyMap.get(l.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ae(),u=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):u?n.eachRawSeriesByType(u,f):l&&l(n,i).each(f);function f(c){var h=c.uid,d=s.set(h,o&&o.get(h)||Fu({plan:Y7,reset:X7,count:Z7}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||Fu({reset:$7});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,u=o.agentStubMap=Ae(),l=e.seriesType,f=e.getTargetSeries,c=!0,h=!1,d="";process.env.NODE_ENV!=="production"&&(d='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Ee(!e.createOnAllSeries,d),l?n.eachRawSeriesByType(l,v):f?f(n,i).each(v):(c=!1,N(n.getSeries(),v));function v(g){var p=g.uid,m=u.set(p,s&&s.get(p)||(h=!0,Fu({reset:G7,onDirty:q7})));m.context={model:g,overallProgress:c},m.agent=o,m.__block=c,a._pipe(g,m)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return _e(e)&&(e={overallReset:e,seriesType:J7(e)}),e.uid=yc("stageHandler"),r&&(e.visualType=r),e},t}();function $7(t){t.overallReset(t.ecModel,t.api,t.payload)}function G7(t){return t.overallProgress&&U7}function U7(){this.agent.dirty(),this.getDownstream().dirty()}function q7(){this.agent&&this.agent.dirty()}function Y7(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function X7(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=pt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?ge(e,function(r,n){return HS(n)}):K7}var K7=HS(0);function HS(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Z7(t){return t.data.count()}function J7(t){jc=null;try{t(ku,WS)}catch{}return jc}var ku={},WS={},jc;$S(ku,Rg),$S(WS,Hx),ku.eachSeriesByType=ku.eachRawSeriesByType=function(t){jc=t},ku.eachComponent=function(t){t.mainType==="series"&&t.subType&&(jc=t.subType)};function $S(t,e){for(var r in e.prototype)t[r]=hr}var GS=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Q7={color:GS,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],GS]};var ir="#B9B8CE",US="#100C2A",Vc=function(){return{axisLine:{lineStyle:{color:ir}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},qS=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],YS={darkMode:!0,color:qS,backgroundColor:US,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:ir}},textStyle:{color:ir},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:ir}},dataZoom:{borderColor:"#71708A",textStyle:{color:ir},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:ir}},timeline:{lineStyle:{color:ir},label:{color:ir},controlStyle:{color:ir,borderColor:ir}},calendar:{itemStyle:{color:US},dayLabel:{color:ir},monthLabel:{color:ir},yearLabel:{color:ir}},timeAxis:Vc(),logAxis:Vc(),valueAxis:Vc(),categoryAxis:Vc(),line:{symbol:"circle"},graph:{color:qS},gauge:{title:{color:ir},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:ir},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};YS.categoryAxis.splitLine.show=!1;var ez=function(){function t(){}return t.prototype.normalizeQuery=function(e){var r={},n={},i={};if(me(e)){var a=An(e);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};N(e,function(u,l){for(var f=!1,c=0;c<o.length;c++){var h=o[c],d=l.lastIndexOf(h);if(d>0&&d===l.length-h.length){var v=l.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=u,f=!0)}}s.hasOwnProperty(l)&&(n[l]=u,f=!0),f||(i[l]=u)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var u=r.cptQuery,l=r.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(l,a,"name")&&f(l,a,"dataIndex")&&f(l,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function f(c,h,d,v){return c[d]==null||h[v||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),e0=["symbol","symbolSize","symbolRotate","symbolOffset"],XS=e0.concat(["symbolKeepAspect"]),tz={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<e0.length;o++){var s=e0[o],u=t.get(s);_e(u)?(a=!0,i[s]=u):n[s]=u}if(n.symbol=n.symbol||t.defaultSymbol,r.setVisual(ae({legendIcon:t.legendIcon||n.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},n)),e.isSeriesFiltered(t))return;var l=Xe(i);function f(c,h){for(var d=t.getRawValue(h),v=t.getDataParams(h),g=0;g<l.length;g++){var p=l[g];c.setItemVisual(h,p,i[p](d,v))}}return{dataEach:a?f:null}}},rz={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var r=t.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<XS.length;s++){var u=XS[s],l=o.getShallow(u,!0);l!=null&&i.setItemVisual(a,u,l)}}return{dataEach:r.hasItemOption?n:null}}};function nz(t,e,r){switch(r){case"color":var n=t.getItemVisual(e,"style");return n[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,r);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+r)}}function iz(t,e){switch(e){case"color":var r=t.getVisual("style");return r[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function az(t,e){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:t,query:i},function(o){a.push(o.seriesIndex)}),a}N([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=ae({},i),process.env.NODE_ENV!=="production"&&Bt(i.type,n[1]),o.dispatchAction(ae(i,{type:n[1],seriesIndex:r(a,i)}))})})}function ts(t,e,r,n,i){var a=t+e;r.isSilent(a)||(process.env.NODE_ENV!=="production"&&En("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,u=o.option.selectedMap,l=i.selected,f=0;f<l.length;f++)if(l[f].seriesIndex===s){var c=o.getData(),h=wa(c,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:ce(h)?c.getName(h[0]):c.getName(h),selected:me(u)?u:ae({},u)})}}))}function oz(t,e,r){t.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(ts("map","selectchanged",e,i,n),ts("pie","selectchanged",e,i,n)):n.fromAction==="select"?(ts("map","selected",e,i,n),ts("pie","selected",e,i,n)):n.fromAction==="unselect"&&(ts("map","unselected",e,i,n),ts("pie","unselected",e,i,n))})}function zu(t,e,r){for(var n;t&&!(e(t)&&(n=t,r));)t=t.__hostTarget||t.parent;return n}var sz=Math.round(Math.random()*9),uz=typeof Object.defineProperty=="function",lz=function(){function t(){this._id="__ec_inner_"+sz++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,r){var n=this._guard(e);return uz?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t}(),fz=ze.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n+a),t.lineTo(r-i,n+a),t.closePath()}}),cz=ze.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,n=e.cy,i=e.width/2,a=e.height/2;t.moveTo(r,n-a),t.lineTo(r+i,n),t.lineTo(r,n+a),t.lineTo(r-i,n),t.closePath()}}),hz=ze.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),u=n-a+o+s,l=Math.asin(s/o),f=Math.cos(l)*o,c=Math.sin(l),h=Math.cos(l),d=o*.6,v=o*.7;t.moveTo(r-f,u+s),t.arc(r,u,o,Math.PI-l,Math.PI*2+l),t.bezierCurveTo(r+f-c*d,u+s+h*d,r,n-v,r,n),t.bezierCurveTo(r,n-v,r-f+c*d,u+s+h*d,r-f,u+s),t.closePath()}}),dz=ze.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var r=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;t.moveTo(i,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r/4*3),t.lineTo(i-o,a+r),t.lineTo(i,a),t.closePath()}}),vz={line:Pi,rect:_t,roundRect:_t,square:_t,circle:ic,diamond:cz,pin:hz,arrow:dz,triangle:fz},pz={line:function(t,e,r,n,i){i.x1=t,i.y1=e+n/2,i.x2=t+r,i.y2=e+n/2},rect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n},roundRect:function(t,e,r,n,i){i.x=t,i.y=e,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(t,e,r,n,i){var a=Math.min(r,n);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.r=Math.min(r,n)/2},diamond:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n},pin:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},arrow:function(t,e,r,n,i){i.x=t+r/2,i.y=e+n/2,i.width=r,i.height=n},triangle:function(t,e,r,n,i){i.cx=t+r/2,i.cy=e+n/2,i.width=r,i.height=n}},t0={};N(vz,function(t,e){t0[e]=new t});var gz=ze.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,r){var n=Rf(t,e,r),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(t,e,r){var n=e.symbolType;if(n!=="none"){var i=t0[n];i||(n="rect",i=t0[n]),pz[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,r)}}});function mz(t,e){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=t,r.fill=e||"#fff",r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=t:r.fill=t,this.markRedraw()}}function rs(t,e,r,n,i,a,o){var s=t.indexOf("empty")===0;s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var u;return t.indexOf("image://")===0?u=Y_(t.slice(8),new Ge(e,r,n,i),o?"center":"cover"):t.indexOf("path://")===0?u=pg(t.slice(7),{},new Ge(e,r,n,i),o?"center":"cover"):u=new gz({shape:{symbolType:t,x:e,y:r,width:n,height:i}}),u.__isEmptyBrush=s,u.setColor=mz,a&&u.setColor(a),u}function yz(t){return ce(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function KS(t,e){if(t!=null)return ce(t)||(t=[t,t]),[st(t[0],e[0])||0,st(Be(t[1],t[0]),e[1])||0]}function Ha(t){return isFinite(t)}function bz(t,e,r){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Ha(n)?n:0,i=Ha(i)?i:1,a=Ha(a)?a:0,o=Ha(o)?o:0;var s=t.createLinearGradient(n,a,i,o);return s}function Cz(t,e,r){var n=r.width,i=r.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,u=e.r==null?.5:e.r;e.global||(o=o*n+r.x,s=s*i+r.y,u=u*a),o=Ha(o)?o:.5,s=Ha(s)?s:.5,u=u>=0&&Ha(u)?u:.5;var l=t.createRadialGradient(o,s,0,o,s,u);return l}function r0(t,e,r){for(var n=e.type==="radial"?Cz(t,e,r):bz(t,e,r),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function wz(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!0;return!1}function Hc(t){return parseInt(t,10)}function Wc(t,e,r){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(t);return(t[i]||Hc(s[n])||Hc(t.style[n]))-(Hc(s[a])||0)-(Hc(s[o])||0)|0}function Dz(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:rt(t)?[t]:ce(t)?t:null}function ZS(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Dz(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=ge(r,function(a){return a/i}),n/=i)}return[r,n]}var _z=new ti(!0);function $c(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function JS(t){return typeof t=="string"&&t!=="none"}function Gc(t){var e=t.fill;return e!=null&&e!=="none"}function QS(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function eE(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function n0(t,e,r){var n=jD(e.image,e.__image,r);if(Vf(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*i8),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function xz(t,e,r,n){var i,a=$c(r),o=Gc(r),s=r.strokePercent,u=s<1,l=!e.path;(!e.silent||u)&&l&&e.createPathProxy();var f=e.path||_z,c=e.__dirty;if(!n){var h=r.fill,d=r.stroke,v=o&&!!h.colorStops,g=a&&!!d.colorStops,p=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,C=void 0,w=void 0,D=void 0;(v||g)&&(D=e.getBoundingRect()),v&&(y=c?r0(t,h,D):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=c?r0(t,d,D):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),p&&(C=c||!e.__canvasFillPattern?n0(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=C),m&&(w=c||!e.__canvasStrokePattern?n0(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),v?t.fillStyle=y:p&&(C?t.fillStyle=C:o=!1),g?t.strokeStyle=b:m&&(w?t.strokeStyle=w:a=!1)}var _=e.getGlobalScale();f.setScale(_[0],_[1],e.segmentIgnoreThreshold);var x,S;t.setLineDash&&r.lineDash&&(i=ZS(e),x=i[0],S=i[1]);var O=!0;(l||c&Bo)&&(f.setDPR(t.dpr),u?f.setContext(null):(f.setContext(t),O=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),O&&f.rebuildPath(t,u?s:1),x&&(t.setLineDash(x),t.lineDashOffset=S),n||(r.strokeFirst?(a&&eE(t,r),o&&QS(t,r)):(o&&QS(t,r),a&&eE(t,r))),x&&t.setLineDash([])}function Sz(t,e,r){var n=e.__image=jD(r.image,e.__image,e,e.onload);if(!(!n||!Vf(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),u=n.width/n.height;if(o==null&&s!=null?o=s*u:s==null&&o!=null?s=o/u:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var l=r.sx||0,f=r.sy||0;t.drawImage(n,l,f,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var l=r.sx,f=r.sy,c=o-l,h=s-f;t.drawImage(n,l,f,c,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Ez(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||ca,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=ZS(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?($c(r)&&t.strokeText(i,r.x,r.y),Gc(r)&&t.fillText(i,r.x,r.y)):(Gc(r)&&t.fillText(i,r.x,r.y),$c(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var tE=["shadowBlur","shadowOffsetX","shadowOffsetY"],rE=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function nE(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){yr(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?_a.opacity:o}(n||e.blend!==r.blend)&&(a||(yr(t,i),a=!0),t.globalCompositeOperation=e.blend||_a.blend);for(var s=0;s<tE.length;s++){var u=tE[s];(n||e[u]!==r[u])&&(a||(yr(t,i),a=!0),t[u]=t.dpr*(e[u]||0))}return(n||e.shadowColor!==r.shadowColor)&&(a||(yr(t,i),a=!0),t.shadowColor=e.shadowColor||_a.shadowColor),a}function iE(t,e,r,n,i){var a=ju(e,i.inHover),o=n?null:r&&ju(r,i.inHover)||{};if(a===o)return!1;var s=nE(t,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(yr(t,i),s=!0),JS(a.fill)&&(t.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(yr(t,i),s=!0),JS(a.stroke)&&(t.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(yr(t,i),s=!0),t.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var u=a.lineWidth,l=u/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(yr(t,i),s=!0),t.lineWidth=l)}for(var f=0;f<rE.length;f++){var c=rE[f],h=c[0];(n||a[h]!==o[h])&&(s||(yr(t,i),s=!0),t[h]=a[h]||c[1])}return s}function Az(t,e,r,n,i){return nE(t,ju(e,i.inHover),r&&ju(r,i.inHover),n,i)}function aE(t,e){var r=e.transform,n=t.dpr||1;r?t.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):t.setTransform(n,0,0,n,0,0)}function Tz(t,e,r){for(var n=!1,i=0;i<t.length;i++){var a=t[i];n=n||a.isZeroArea(),aE(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}r.allClipped=n}function Oz(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var oE=1,sE=2,uE=3,lE=4;function Pz(t){var e=Gc(t),r=$c(t);return!(t.lineDash||!(+e^+r)||e&&typeof t.fill!="string"||r&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function yr(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function ju(t,e){return e&&t.__hoverStyle||t.style}function fE(t,e){Wa(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Wa(t,e,r,n){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){e.__dirty&=~Tr,e.__isRendered=!1;return}var a=e.__clipPaths,o=r.prevElClipPaths,s=!1,u=!1;if((!o||wz(a,o))&&(o&&o.length&&(yr(t,r),t.restore(),u=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(yr(t,r),t.save(),Tz(a,t,r),s=!0),r.prevElClipPaths=a),r.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var l=r.prevEl;l||(u=s=!0);var f=e instanceof ze&&e.autoBatch&&Pz(e.style);s||Oz(i,l.transform)?(yr(t,r),aE(t,e)):f||yr(t,r);var c=ju(e,r.inHover);e instanceof ze?(r.lastDrawType!==oE&&(u=!0,r.lastDrawType=oE),iE(t,e,l,u,r),(!f||!r.batchFill&&!r.batchStroke)&&t.beginPath(),xz(t,e,c,f),f&&(r.batchFill=c.fill||"",r.batchStroke=c.stroke||"")):e instanceof Uf?(r.lastDrawType!==uE&&(u=!0,r.lastDrawType=uE),iE(t,e,l,u,r),Ez(t,e,c)):e instanceof ni?(r.lastDrawType!==sE&&(u=!0,r.lastDrawType=sE),Az(t,e,l,u,r),Sz(t,e,c)):e.getTemporalDisplayables&&(r.lastDrawType!==lE&&(u=!0,r.lastDrawType=lE),Bz(t,e,r)),f&&n&&yr(t,r),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),r.prevEl=e,e.__dirty=0,e.__isRendered=!0}function Bz(t,e,r){var n=e.getDisplayables(),i=e.getTemporalDisplayables();t.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var u=n[o];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Wa(t,u,a,o===s-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}for(var l=0,f=i.length;l<f;l++){var u=i[l];u.beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),Wa(t,u,a,l===f-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),a.prevEl=u}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var i0=new lz,cE=new eu(100),hE=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function a0(t,e){if(t==="none")return null;var r=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";t.dirty&&i0.delete(t);var a=i0.get(t);if(a)return a;var o=ke(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return u(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,i0.set(t,s),t.dirty=!1,s;function u(l){for(var f=[r],c=!0,h=0;h<hE.length;++h){var d=o[hE[h]];if(d!=null&&!ce(d)&&!me(d)&&!rt(d)&&typeof d!="boolean"){c=!1;break}f.push(d)}var v;if(c){v=f.join(",")+(i?"-svg":"");var g=cE.get(v);g&&(i?l.svgElement=g:l.image=g)}var p=vE(o.dashArrayX),m=Mz(o.dashArrayY),y=dE(o.symbol),b=Fz(p),C=pE(m),w=!i&&Co.createCanvas(),D=i&&{tag:"g",attrs:{},key:"dcl",children:[]},_=S(),x;w&&(w.width=_.width*r,w.height=_.height*r,x=w.getContext("2d")),O(),c&&cE.put(v,w||D),l.image=w,l.svgElement=D,l.svgWidth=_.width,l.svgHeight=_.height;function S(){for(var E=1,P=0,F=b.length;P<F;++P)E=AD(E,b[P]);for(var M=1,P=0,F=y.length;P<F;++P)M=AD(M,y[P].length);E*=M;var B=C*b.length*y.length;if(process.env.NODE_ENV!=="production"){var R=function(V){console.warn("Calculated decal size is greater than "+V+" due to decal option settings so "+V+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+V+" to be larger to avoid incontinuity.")};E>o.maxTileWidth&&R("maxTileWidth"),B>o.maxTileHeight&&R("maxTileHeight")}return{width:Math.max(1,Math.min(E,o.maxTileWidth)),height:Math.max(1,Math.min(B,o.maxTileHeight))}}function O(){x&&(x.clearRect(0,0,w.width,w.height),o.backgroundColor&&(x.fillStyle=o.backgroundColor,x.fillRect(0,0,w.width,w.height)));for(var E=0,P=0;P<m.length;++P)E+=m[P];if(E<=0)return;for(var F=-C,M=0,B=0,R=0;F<_.height;){if(M%2===0){for(var V=B/2%y.length,k=0,W=0,I=0;k<_.width*2;){for(var q=0,P=0;P<p[R].length;++P)q+=p[R][P];if(q<=0)break;if(W%2===0){var Z=(1-o.symbolSize)*.5,J=k+p[R][W]*Z,ne=F+m[M]*Z,G=p[R][W]*o.symbolSize,L=m[M]*o.symbolSize,Y=I/2%y[V].length;j(J,ne,G,L,y[V][Y])}k+=p[R][W],++I,++W,W===p[R].length&&(W=0)}++R,R===p.length&&(R=0)}F+=m[M],++B,++M,M===m.length&&(M=0)}function j(U,Q,K,X,le){var se=i?1:r,ye=rs(le,U*se,Q*se,K*se,X*se,o.color,o.symbolKeepAspect);if(i){var pe=n.painter.renderOneToVNode(ye);pe&&D.children.push(pe)}else fE(x,ye)}}}}function dE(t){if(!t||t.length===0)return[["rect"]];if(me(t))return[[t]];for(var e=!0,r=0;r<t.length;++r)if(!me(t[r])){e=!1;break}if(e)return dE([t]);for(var n=[],r=0;r<t.length;++r)me(t[r])?n.push([t[r]]):n.push(t[r]);return n}function vE(t){if(!t||t.length===0)return[[0,0]];if(rt(t)){var e=Math.ceil(t);return[[e,e]]}for(var r=!0,n=0;n<t.length;++n)if(!rt(t[n])){r=!1;break}if(r)return vE([t]);for(var i=[],n=0;n<t.length;++n)if(rt(t[n])){var e=Math.ceil(t[n]);i.push([e,e])}else{var e=ge(t[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function Mz(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(rt(t)){var e=Math.ceil(t);return[e,e]}var r=ge(t,function(n){return Math.ceil(n)});return t.length%2?r.concat(r):r}function Fz(t){return ge(t,function(e){return pE(e)})}function pE(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return t.length%2===1?e*2:e}function Lz(t,e){t.eachRawSeries(function(r){if(!t.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var u=n.ensureUniqueItemVisual(o,"style");u.decal=a0(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=a0(i,e)}}})}var fn=new _n,Uc={};function Rz(t,e){process.env.NODE_ENV!=="production"&&Uc[t]&&$t("Already has an implementation of "+t+"."),Uc[t]=e}function Iz(t){return process.env.NODE_ENV!=="production"&&(Uc[t]||$t("Implementation of "+t+" doesn't exists.")),Uc[t]}var Nz=1,kz=800,zz=900,jz=1e3,Vz=2e3,Hz=5e3,gE=1e3,Wz=1100,o0=2e3,mE=3e3,$z=4e3,qc=4500,Gz=4600,Uz=5e3,qz=6e3,yE=7e3,Yz={PROCESSOR:{FILTER:jz,SERIES_FILTER:kz,STATISTIC:Hz},VISUAL:{LAYOUT:gE,PROGRESSIVE_LAYOUT:Wz,GLOBAL:o0,CHART:mE,POST_CHART_LAYOUT:Gz,COMPONENT:$z,BRUSH:Uz,CHART_ITEM:qc,ARIA:qz,DECAL:yE}},Yt="__flagInMainProcess",br="__pendingUpdate",s0="__needsUpdateStatus",bE=/^[a-zA-Z0-9_]+$/,u0="__connectUpdateStatus",CE=0,Xz=1,Kz=2;function wE(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.isDisposed()){Br(this.id);return}return _E(this,t,e)}}function DE(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return _E(this,t,e)}}function _E(t,e,r){return r[0]=r[0]&&r[0].toLowerCase(),_n.prototype[e].apply(t,r)}var xE=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(_n),SE=xE.prototype;SE.on=DE("on"),SE.off=DE("off");var ns,l0,Yc,Li,f0,c0,h0,Vu,Hu,EE,AE,d0,TE,Xc,OE,PE,Zr,BE,ME=function(t){fe(e,t);function e(r,n,i){var a=t.call(this,new ez)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},me(n)&&(n=FE[n]),a._dom=r;var o="canvas",s="auto",u=!1;if(process.env.NODE_ENV!=="production"){var l=Pe.hasGlobalWindow?window:global;l&&(o=Be(l.__ECHARTS__DEFAULT__RENDERER__,o),s=Be(l.__ECHARTS__DEFAULT__COARSE_POINTER,s),u=Be(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,u))}i.ssr;var f=a._zr=bD(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Be(i.useDirtyRect,u),useCoarsePointer:Be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=Jg(ht(f.flush,f),17),n=We(n),n&&Xx(n,!0),a._theme=n,a._locale=o9(i.locale||fx),a._coordSysMgr=new Ng;var c=a._api=OE(a);function h(d,v){return d.__prio-v.__prio}return mf(Zc,h),mf(p0,h),a._scheduler=new VS(a,c,p0,Zc),a._messageCenter=new xE,a._initEvents(),a.resize=ht(a.resize,a),f.animation.on("frame",a._onframe,a),EE(f,a),AE(f,a),cf(a),a}return e.prototype._onframe=function(){if(!this._disposed){BE(this);var r=this._scheduler;if(this[br]){var n=this[br].silent;this[Yt]=!0;try{ns(this),Li.update.call(this,null,this[br].updateParams)}catch(u){throw this[Yt]=!1,this[br]=null,u}this._zr.flush(),this[Yt]=!1,this[br]=null,Vu.call(this,n),Hu.call(this,n)}else if(r.unfinished){var i=Nz,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),c0(this,a),r.performVisualTasks(a),Xc(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(this[Yt]){process.env.NODE_ENV!=="production"&&$t("`setOption` should not be called during main process.");return}if(this._disposed){Br(this.id);return}var a,o,s;if(Ce(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Yt]=!0,!this._model||n){var u=new L9(this._api),l=this._theme,f=this._model=new Rg;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,l,this._locale,u)}this._model.setOption(r,{replaceMerge:o},g0);var c={seriesTransition:s,optionChanged:!0};if(i)this[br]={silent:a,updateParams:c},this[Yt]=!1,this.getZr().wakeUp();else{try{ns(this),Li.update.call(this,null,c)}catch(h){throw this[br]=null,this[Yt]=!1,h}this._ssr||this._zr.flush(),this[br]=null,this[Yt]=!1,Vu.call(this,a),Hu.call(this,a)}},e.prototype.setTheme=function(){En("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return process.env.NODE_ENV!=="production"&&Bt("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(Pe.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){Br(this.id);return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(u){i.eachComponent({mainType:u},function(l){var f=o._componentsMap[l.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(u){u.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){Br(this.id);return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(LE[i]){var u=s,l=s,f=-s,c=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();N($u,function(b,C){if(b.group===i){var w=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(We(r)),D=b.getDom().getBoundingClientRect();u=a(D.left,u),l=a(D.top,l),f=o(D.right,f),c=o(D.bottom,c),h.push({dom:w,left:D.left,top:D.top})}}),u*=d,l*=d,f*=d,c*=d;var v=f-u,g=c-l,p=Co.createCanvas(),m=bD(p,{renderer:n?"svg":"canvas"});if(m.resize({width:v,height:g}),n){var y="";return N(h,function(b){var C=b.left-u,w=b.top-l;y+='<g transform="translate('+C+","+w+')">'+b.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,r.connectedBackgroundColor&&m.painter.setBackgroundColor(r.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return r.connectedBackgroundColor&&m.add(new _t({shape:{x:0,y:0,width:v,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(b){var C=new ni({style:{x:b.left*d-u,y:b.top*d-l,image:b.dom}});m.add(C)}),m.refreshImmediately(),p.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return f0(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return f0(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){Br(this.id);return}var i=this._model,a,o=Mp(i,r);return N(o,function(s,u){u.indexOf("Models")>=0&&N(s,function(l){var f=l.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(u==="seriesModels"){var c=this._chartsMap[l.__viewId];c&&c.containPoint?a=a||c.containPoint(n,l):process.env.NODE_ENV!=="production"&&Dt(u+": "+(c?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Dt(u+": containPoint is not supported")},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Mp(i,r,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Dt("There is no specified series model"));var s=o.getData(),u=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return u!=null?nz(s,u,n):iz(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(Zz,function(n){var i=function(a){var o=r.getModel(),s=a.target,u,l=n==="globalout";if(l?u={}:s&&zu(s,function(v){var g=je(v);if(g&&g.dataIndex!=null){var p=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return u=p&&p.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return u=ae({},g.eventData),!0},!0),u){var f=u.componentType,c=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=u.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),d=h&&r[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];process.env.NODE_ENV!=="production"&&!l&&!(h&&d)&&Dt("model or view can not be found by params"),u.event=a,u.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:u,model:h,view:d},r.trigger(n,u)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),N(Wu,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),N(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),oz(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){Br(this.id);return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){Br(this.id);return}this._disposed=!0;var r=this.getDom();r&&ID(this.getDom(),y0,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete $u[n.id]},e.prototype.resize=function(r){if(this[Yt]){process.env.NODE_ENV!=="production"&&$t("`resize` should not be called during main process.");return}if(this._disposed){Br(this.id);return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[br]&&(a==null&&(a=this[br].silent),i=!0,this[br]=null),this[Yt]=!0;try{i&&ns(this),Li.update.call(this,{type:"resize",animation:ae({duration:0},r&&r.animation)})}catch(o){throw this[Yt]=!1,o}this[Yt]=!1,Vu.call(this,a),Hu.call(this,a)}},e.prototype.showLoading=function(r,n){if(this._disposed){Br(this.id);return}if(Ce(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!m0[r]){process.env.NODE_ENV!=="production"&&Dt("Loading effects "+r+" not exists.");return}var i=m0[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},e.prototype.hideLoading=function(){if(this._disposed){Br(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=ae({},r);return n.type=Wu[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){Br(this.id);return}if(Ce(n)||(n={silent:!!n}),!!Kc[r.type]&&this._model){if(this[Yt]){this._pendingActions.push(r);return}var i=n.silent;h0.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),Vu.call(this,i),Hu.call(this,i)}},e.prototype.updateLabelLayout=function(){fn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){Br(this.id);return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&Ee(r.data&&a),a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ns=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),l0(c,!0),l0(c,!1),h.plan()},l0=function(c,h){for(var d=c._model,v=c._scheduler,g=h?c._componentsViews:c._chartsViews,p=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(D,_){D!=="series"&&C(_)}):d.eachSeries(C);function C(D){var _=D.__requireNewView;D.__requireNewView=!1;var x="_ec_"+D.id+"_"+D.type,S=!_&&p[x];if(!S){var O=An(D.type),E=h?Pr.getClass(O.main,O.sub):Kr.getClass(O.sub);process.env.NODE_ENV!=="production"&&Ee(E,O.sub+" does not exist."),S=new E,S.init(d,y),p[x]=S,g.push(S),m.add(S.group)}D.__viewId=S.__id=x,S.__alive=!0,S.__model=D,S.group.__ecComponentInfo={mainType:D.mainType,index:D.componentIndex},!h&&v.prepareView(S,D,d,y)}for(var b=0;b<g.length;){var w=g[b];w.__alive?b++:(!h&&w.renderTask.dispose(),m.remove(w.group),w.dispose(d,y),g.splice(b,1),p[w.__id]===w&&delete p[w.__id],w.__id=w.group.__ecComponentInfo=null)}},Yc=function(c,h,d,v,g){var p=c._model;if(p.setUpdatePayload(d),!v){N([].concat(c._componentsViews).concat(c._chartsViews),w);return}var m={};m[v+"Id"]=d[v+"Id"],m[v+"Index"]=d[v+"Index"],m[v+"Name"]=d[v+"Name"];var y={mainType:v,query:m};g&&(y.subType=g);var b=d.excludeSeriesId,C;b!=null&&(C=Ae(),N(pt(b),function(D){var _=vr(D,null);_!=null&&C.set(_,!0)})),p&&p.eachComponent(y,function(D){var _=C&&C.get(D.id)!=null;if(!_)if(P_(d))if(D instanceof ln)d.type===Ma&&!d.notBlur&&!D.get(["emphasis","disabled"])&&Uk(D,d,c._api);else{var x=rg(D.mainType,D.componentIndex,d.name,c._api),S=x.focusSelf,O=x.dispatchers;d.type===Ma&&S&&!d.notBlur&&tg(D.mainType,D.componentIndex,c._api),O&&N(O,function(E){d.type===Ma?Qf(E):ec(E)})}else ig(d)&&D instanceof ln&&(Xk(D,d,c._api),A_(D),Zr(c))},c),p&&p.eachComponent(y,function(D){var _=C&&C.get(D.id)!=null;_||w(c[v==="series"?"_chartsMap":"_componentsMap"][D.__viewId])},c);function w(D){D&&D.__alive&&D[h]&&D[h](D.__model,p,c._api,d)}},Li={prepareAndUpdate:function(c){ns(this),Li.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var d=this._model,v=this._api,g=this._zr,p=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(c),m.restoreData(d,c),m.performSeriesTasks(d),p.create(d,v),m.performDataProcessorTasks(d,c),c0(this,d),p.update(d,v),r(d),m.performVisualTasks(d,c),d0(this,d,v,c,h);var y=d.get("backgroundColor")||"transparent",b=d.get("darkMode");g.setBackgroundColor(y),b!=null&&b!=="auto"&&g.setDarkMode(b),fn.trigger("afterupdate",d,v)}},updateTransform:function(c){var h=this,d=this._model,v=this._api;if(d){d.setUpdatePayload(c);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var b=h.getViewOfComponentModel(y);if(b&&b.__alive)if(b.updateTransform){var C=b.updateTransform(y,d,v,c);C&&C.update&&g.push(b)}else g.push(b)}});var p=Ae();d.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var b=y.updateTransform(m,d,v,c);b&&b.update&&p.set(m.uid,1)}else p.set(m.uid,1)}),r(d),this._scheduler.performVisualTasks(d,c,{setDirty:!0,dirtyMap:p}),Xc(this,d,v,c,{},p),fn.trigger("afterupdate",d,v)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),Kr.markUpdateMethod(c,"updateView"),r(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),d0(this,h,this._api,c,{}),fn.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,d=this._model;d&&(d.setUpdatePayload(c),d.eachSeries(function(v){v.getData().clearAllVisual()}),Kr.markUpdateMethod(c,"updateVisual"),r(d),this._scheduler.performVisualTasks(d,c,{visualType:"visual",setDirty:!0}),d.eachComponent(function(v,g){if(v!=="series"){var p=h.getViewOfComponentModel(g);p&&p.__alive&&p.updateVisual(g,d,h._api,c)}}),d.eachSeries(function(v){var g=h._chartsMap[v.__viewId];g.updateVisual(v,d,h._api,c)}),fn.trigger("afterupdate",d,this._api))},updateLayout:function(c){Li.update.call(this,c)}},f0=function(c,h,d,v){if(c._disposed){Br(c.id);return}for(var g=c._model,p=c._coordSysMgr.getCoordinateSystems(),m,y=Mp(g,d),b=0;b<p.length;b++){var C=p[b];if(C[h]&&(m=C[h](g,y,v))!=null)return m}process.env.NODE_ENV!=="production"&&Dt("No coordinate system that supports "+h+" found by the given finder.")},c0=function(c,h){var d=c._chartsMap,v=c._scheduler;h.eachSeries(function(g){v.updateStreamModes(g,d[g.__viewId])})},h0=function(c,h){var d=this,v=this.getModel(),g=c.type,p=c.escapeConnect,m=Kc[g],y=m.actionInfo,b=(y.update||"update").split(":"),C=b.pop(),w=b[0]!=null&&An(b[0]);this[Yt]=!0;var D=[c],_=!1;c.batch&&(_=!0,D=ge(c.batch,function(M){return M=ke(ae({},M),c),M.batch=null,M}));var x=[],S,O=ig(c),E=P_(c);if(E&&E_(this._api),N(D,function(M){if(S=m.action(M,d._model,d._api),S=S||ae({},M),S.type=y.event||S.type,x.push(S),E){var B=Fp(c),R=B.queryOptionMap,V=B.mainTypeSpecified,k=V?R.keys()[0]:"series";Yc(d,C,M,k),Zr(d)}else O?(Yc(d,C,M,"series"),Zr(d)):w&&Yc(d,C,M,w.main,w.sub)}),C!=="none"&&!E&&!O&&!w)try{this[br]?(ns(this),Li.update.call(this,c),this[br]=null):Li[C].call(this,c)}catch(M){throw this[Yt]=!1,M}if(_?S={type:y.event||g,escapeConnect:p,batch:x}:S=x[0],this[Yt]=!1,!h){var P=this._messageCenter;if(P.trigger(S.type,S),O){var F={type:"selectchanged",escapeConnect:p,selected:Kk(v),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};P.trigger(F.type,F)}}},Vu=function(c){for(var h=this._pendingActions;h.length;){var d=h.shift();h0.call(this,d,c)}},Hu=function(c){!c&&this.trigger("updated")},EE=function(c,h){c.on("rendered",function(d){h.trigger("rendered",d),c.animation.isFinished()&&!h[br]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},AE=function(c,h){c.on("mouseover",function(d){var v=d.target,g=zu(v,Ho);g&&(qk(g,d,h._api),Zr(h))}).on("mouseout",function(d){var v=d.target,g=zu(v,Ho);g&&(Yk(g,d,h._api),Zr(h))}).on("click",function(d){var v=d.target,g=zu(v,function(y){return je(y).dataIndex!=null},!0);if(g){var p=g.selected?"unselect":"select",m=je(g);h._api.dispatchAction({type:p,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function r(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],d=[],v=!1;if(c.eachComponent(function(y,b){var C=b.get("zlevel")||0,w=b.get("z")||0,D=b.getZLevelKey();v=v||!!D,(y==="series"?d:h).push({zlevel:C,z:w,idx:b.componentIndex,type:y,key:D})}),v){var g=h.concat(d),p,m;mf(g,function(y,b){return y.zlevel===b.zlevel?y.z-b.z:y.zlevel-b.zlevel}),N(g,function(y){var b=c.getComponent(y.type,y.idx),C=y.zlevel,w=y.key;p!=null&&(C=Math.max(p,C)),w?(C===p&&w!==m&&C++,m=w):m&&(C===p&&C++,m=""),p=C,b.setZLevel(C)})}}d0=function(c,h,d,v,g){n(h),TE(c,h,d,v,g),N(c._chartsViews,function(p){p.__alive=!1}),Xc(c,h,d,v,g),N(c._chartsViews,function(p){p.__alive||p.remove(h,d)})},TE=function(c,h,d,v,g,p){N(p||c._componentsViews,function(m){var y=m.__model;l(y,m),m.render(y,h,d,v),s(y,m),f(y,m)})},Xc=function(c,h,d,v,g,p){var m=c._scheduler;g=ae(g||{},{updatedSeries:h.getSeries()}),fn.trigger("series:beforeupdate",h,d,g);var y=!1;h.eachSeries(function(b){var C=c._chartsMap[b.__viewId];C.__alive=!0;var w=C.renderTask;m.updatePayload(w,v),l(b,C),p&&p.get(b.uid)&&w.dirty(),w.perform(m.getPerformArgs(w))&&(y=!0),C.group.silent=!!b.get("silent"),o(b,C),A_(b)}),m.unfinished=y||m.unfinished,fn.trigger("series:layoutlabels",h,d,g),fn.trigger("series:transition",h,d,g),h.eachSeries(function(b){var C=c._chartsMap[b.__viewId];s(b,C),f(b,C)}),a(c,h),fn.trigger("series:afterupdate",h,d,g)},Zr=function(c){c[s0]=!0,c.getZr().wakeUp()},BE=function(c){c[s0]&&(c.getZr().storage.traverse(function(h){Uo(h)||i(h)}),c[s0]=!1)};function i(c){for(var h=[],d=c.currentStates,v=0;v<d.length;v++){var g=d[v];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}c.selected&&c.states.select&&h.push("select"),c.hoverState===Yf&&c.states.emphasis?h.push("emphasis"):c.hoverState===qf&&c.states.blur&&h.push("blur"),c.useStates(h)}function a(c,h){var d=c._zr,v=d.storage,g=0;v.traverse(function(p){p.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&h.eachSeries(function(p){if(!p.preventUsingHoverLayer){var m=c._chartsMap[p.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var d=c.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function s(c,h){if(!c.preventAutoZ){var d=c.get("z")||0,v=c.get("zlevel")||0;h.eachRendered(function(g){return u(g,d,v,-1/0),!0})}}function u(c,h,d,v){var g=c.getTextContent(),p=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),b=0;b<y.length;b++)v=Math.max(u(y[b],h,d,v),v);else c.z=h,c.zlevel=d,v=Math.max(c.z2,v);if(g&&(g.z=h,g.zlevel=d,isFinite(v)&&(g.z2=v+2)),p){var C=c.textGuideLineConfig;p.z=h,p.zlevel=d,isFinite(v)&&(p.z2=v+(C&&C.showAbove?1:-1))}return v}function l(c,h){h.eachRendered(function(d){if(!Uo(d)){var v=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function f(c,h){var d=c.getModel("stateAnimation"),v=c.isAnimationEnabled(),g=d.get("duration"),p=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Uo(m))return;if(m instanceof ze&&t6(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(v){m.stateTransition=p;var b=m.getTextContent(),C=m.getTextGuideLine();b&&(b.stateTransition=p),C&&(C.stateTransition=p)}m.__dirty&&i(m)}})}OE=function(c){return new(function(h){fe(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var g=v.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);v=v.parent}},d.prototype.enterEmphasis=function(v,g){Qf(v,g),Zr(c)},d.prototype.leaveEmphasis=function(v,g){ec(v,g),Zr(c)},d.prototype.enterBlur=function(v){Gk(v),Zr(c)},d.prototype.leaveBlur=function(v){D_(v),Zr(c)},d.prototype.enterSelect=function(v){__(v),Zr(c)},d.prototype.leaveSelect=function(v){x_(v),Zr(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(v){return c.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return c.getViewOfSeriesModel(v)},d}(Hx))(c)},PE=function(c){function h(d,v){for(var g=0;g<d.length;g++){var p=d[g];p[u0]=v}}N(Wu,function(d,v){c._messageCenter.on(v,function(g){if(LE[c.group]&&c[u0]!==CE){if(g&&g.escapeConnect)return;var p=c.makeActionFromEvent(g),m=[];N($u,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,CE),N(m,function(y){y[u0]!==Xz&&y.dispatchAction(p)}),h(m,Kz)}})})}}(),e}(_n),v0=ME.prototype;v0.on=wE("on"),v0.off=wE("off"),v0.one=function(t,e,r){var n=this;En("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(t,i)}this.on.call(this,t,i,r)};var Zz=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Br(t){process.env.NODE_ENV!=="production"&&Dt("Instance "+t+" has been disposed")}var Kc={},Wu={},p0=[],g0=[],Zc=[],FE={},m0={},$u={},LE={},Jz=+new Date-0,y0="_echarts_instance_";function Qz(t,e,r){{if(process.env.NODE_ENV!=="production"&&!t)throw new Error("Initialize failed: invalid dom.");var n=ej(t);if(n)return process.env.NODE_ENV!=="production"&&Dt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&Do(t)&&t.nodeName.toUpperCase()!=="CANVAS"&&(!t.clientWidth&&!r||!t.clientHeight&&!r)&&Dt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new ME(t,e,r);return i.id="ec_"+Jz++,$u[i.id]=i,ID(t,y0,i.id),PE(i),fn.trigger("afterinit",i),i}function ej(t){return $u[IN(t,y0)]}function RE(t,e){FE[t]=e}function IE(t){$e(g0,t)<0&&g0.push(t)}function NE(t,e){C0(p0,t,e,Vz)}function tj(t){b0("afterinit",t)}function rj(t){b0("afterupdate",t)}function b0(t,e){fn.on(t,e)}function is(t,e,r){_e(e)&&(r=e,e="");var n=Ce(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,!Wu[e]&&(Ee(bE.test(n)&&bE.test(e)),Kc[n]||(Kc[n]={action:r,actionInfo:t}),Wu[e]=n)}function nj(t,e){Ng.register(t,e)}function ij(t,e){C0(Zc,t,e,gE,"layout")}function $a(t,e){C0(Zc,t,e,mE,"visual")}var kE=[];function C0(t,e,r,n,i){if((_e(e)||Ce(e))&&(r=e,e=n),process.env.NODE_ENV!=="production"){if(isNaN(e)||e==null)throw new Error("Illegal priority");N(t,function(o){Ee(o.__raw!==r)})}if(!($e(kE,r)>=0)){kE.push(r);var a=VS.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function zE(t,e){m0[t]=e}function aj(t,e,r){var n=Iz("registerMap");n&&n(t,e,r)}var oj=d7;$a(o0,j7),$a(qc,V7),$a(qc,H7),$a(o0,tz),$a(qc,rz),$a(yE,Lz),IE(Xx),NE(zz,U9),zE("default",W7),is({type:Ma,event:Ma,update:Ma},hr),is({type:Kf,event:Kf,update:Kf},hr),is({type:vu,event:vu,update:vu},hr),is({type:Zf,event:Zf,update:Zf},hr),is({type:pu,event:pu,update:pu},hr),RE("light",Q7),RE("dark",YS);function Gu(t){return t==null?0:t.length||1}function jE(t){return t}var w0=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||jE,this._newKeyGetter=i||jE,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],u=n[s],l=Gu(u);if(l>1){var f=u.shift();u.length===1&&(n[s]=u[0]),this._update&&this._update(f,o)}else l===1?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var u=a[s],l=n[u],f=i[u],c=Gu(l),h=Gu(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,l),i[u]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,l),i[u]=null;else if(c===1&&h===1)this._update&&this._update(f,l),i[u]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,l),i[u]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},t.prototype._performRestAdd=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],a=r[i],o=Gu(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},t.prototype._initIndexMap=function(e,r,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!r){var u=r[s],l=Gu(u);l===0?(r[s]=o,a&&n.push(s)):l===1?r[s]=[u,o]:u.push(o)}}},t}(),sj=function(){function t(e,r){this._encode=e,this._schema=r}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function uj(t,e){var r={},n=r.encode={},i=Ae(),a=[],o=[],s={};N(t.dimensions,function(h){var d=t.getDimensionInfo(h),v=d.coordDim;if(v){process.env.NODE_ENV!=="production"&&Ee(Bg.get(v)==null);var g=d.coordDimIndex;D0(n,v)[g]=h,d.isExtraCoord||(i.set(v,1),fj(d.type)&&(a[0]=h),D0(s,v)[g]=t.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}Bg.each(function(p,m){var y=D0(n,m),b=d.otherDims[m];b!=null&&b!==!1&&(y[b]=d.name)})});var u=[],l={};i.each(function(h,d){var v=n[d];l[d]=v[0],u=u.concat(v)}),r.dataDimsOnCoord=u,r.dataDimIndicesOnCoord=ge(u,function(h){return t.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=l;var f=n.label;f&&f.length&&(a=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new sj(s,e),r}function D0(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function lj(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function fj(t){return!(t==="ordinal"||t==="time")}var Jc=function(){function t(e){this.otherDims={},e!=null&&ae(this,e)}return t}(),cj=ut(),hj={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},VE=function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=$E(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Be(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var r=this.source.dimensionsDefine;if(r)return r[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,r=eS(this.source),n=!GE(e),i="",a=[],o=0,s=0;o<e;o++){var u=void 0,l=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)u=r?c.name:null,l=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(u=r?h.name:null,l=h.type)}a.push({property:u,type:l,ordinalMeta:f}),r&&u!=null&&(!c||!c.isCalculationCoord)&&(i+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),i+="$",i+=hj[l]||"f",f&&(i+=f.uid),i+="$"}var d=this.source,v=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:v}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}e.push(i)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function HE(t){return t instanceof VE}function WE(t){for(var e=Ae(),r=0;r<(t||[]).length;r++){var n=t[r],i=Ce(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,r)}return e}function $E(t){var e=cj(t);return e.dimNameMap||(e.dimNameMap=WE(t.dimensionsDefine))}function GE(t){return t>30}var Uu=Ce,Ri=ge,dj=typeof Int32Array>"u"?Array:Int32Array,vj="e\0\0",UE=-1,pj=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],gj=["_approximateExtent"],qE,Qc,qu,as,_0,eh,x0,YE=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;HE(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},u=!1,l={},f=0;f<n.length;f++){var c=n[f],h=me(c)?new Jc({name:c}):c instanceof Jc?c:new Jc(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var v=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,l[d]!=null&&(u=!0),h.createInvertedIndices&&(s[d]=[]),v.itemName===0&&(this._nameDimIdx=f),v.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&Ee(i||h.storeDimIndex>=0),i&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(u),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=Ae();N(o,function(p){g.set(a[p].storeDimIndex,p)})}}return t.prototype.getDimension=function(e){var r=this._recognizeDimIndex(e);if(r==null)return e;if(r=e,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var i=this._schema.getSourceDimension(r);if(i)return i.name},t.prototype.getDimensionIndex=function(e){var r=this._recognizeDimIndex(e);if(r!=null)return r;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(rt(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var r=this.getDimensionIndex(e);if(process.env.NODE_ENV!=="production"&&r==null)throw new Error("Unknown dimension "+e);return r},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var r=this._dimInfos;this._getDimInfo=e?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[r]:null},t.prototype.mapDimensionsAll=function(e){var r=this._dimSummary,n=r.encode[e];return(n||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,r,n){var i=this,a;if(e instanceof Ug&&(a=e),!a){var o=this.dimensions,s=jg(e)||Ht(e)?new nS(e,o.length):e;a=new Ug;var u=Ri(o,function(l){return{type:i._dimInfos[l].type,property:l}});a.initData(s,u,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=uj(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var r=this._store.appendData(e);this._doInit(r[0],r[1])},t.prototype.appendValues=function(e,r){var n=this._store.appendValues(e,r.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var u=s-i;this._nameList[s]=r[u],o&&x0(this,s)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==ai&&!e.fillStorage},t.prototype._doInit=function(e,r){if(!(e>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,u=s===Ur;if(u&&!i.pure)for(var l=[],f=e;f<r;f++){var c=i.getItem(f,l);if(!this.hasItemOption&&EN(c)&&(this.hasItemOption=!0),c){var h=c.name;a[f]==null&&h!=null&&(a[f]=vr(h,null));var d=c.id;o[f]==null&&d!=null&&(o[f]=vr(d,null))}}if(this._shouldMakeIdFromName())for(var f=e;f<r;f++)x0(this,f);qE(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,r){r=this.getDimension(r),this._approximateExtent[r]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,r){Uu(e)?ae(this._calculationInfo,e):this._calculationInfo[e]=r},t.prototype.getName=function(e){var r=this.getRawIndex(e),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=qu(this,this._nameDimIdx,r)),n==null&&(n=""),n},t.prototype._getCategory=function(e,r){var n=this._store.get(e,r),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},t.prototype.getId=function(e){return Qc(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,r)},t.prototype.getByRawIndex=function(e,r){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,r)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,r){var n=this,i=this._store;return ce(e)?i.getValues(Ri(e,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(e)},t.prototype.hasValue=function(e){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;n++)if(isNaN(this._store.get(r[n],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===e)return r;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,r){var n=e&&this._invertedIndicesMap[e];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n[r];return i==null||isNaN(i)?UE:i},t.prototype.indicesOfNearest=function(e,r,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),r,n)},t.prototype.each=function(e,r,n){_e(e)&&(n=r,r=e,e=[]);var i=n||this,a=Ri(as(e),this._getStoreDimIndex,this);this._store.each(a,i?ht(r,i):r)},t.prototype.filterSelf=function(e,r,n){_e(e)&&(n=r,r=e,e=[]);var i=n||this,a=Ri(as(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ht(r,i):r),this},t.prototype.selectRange=function(e){var r=this,n={},i=Xe(e);return N(i,function(a){var o=r._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},t.prototype.mapArray=function(e,r,n){_e(e)&&(n=r,r=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(r&&r.apply(this,arguments))},n),i},t.prototype.map=function(e,r,n,i){var a=n||i||this,o=Ri(as(e),this._getStoreDimIndex,this),s=eh(this);return s._store=this._store.map(o,a?ht(r,a):r),s},t.prototype.modify=function(e,r,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&N(as(e),function(u){var l=a.getDimensionInfo(u);l.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Ri(as(e),this._getStoreDimIndex,this);this._store.modify(s,o?ht(r,o):r)},t.prototype.downSample=function(e,r,n,i){var a=eh(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),r,n,i),a},t.prototype.lttbDownSample=function(e,r){var n=eh(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),r),n},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var r=this.hostModel,n=this.getRawDataItem(e);return new bt(n,r,r&&r.ecModel)},t.prototype.diff=function(e){var r=this;return new w0(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return Qc(e,n)},function(n){return Qc(r,n)})},t.prototype.getVisual=function(e){var r=this._visual;return r&&r[e]},t.prototype.setVisual=function(e,r){this._visual=this._visual||{},Uu(e)?ae(this._visual,e):this._visual[e]=r},t.prototype.getItemVisual=function(e,r){var n=this._itemVisuals[e],i=n&&n[r];return i??this.getVisual(r)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ce(a)?a=a.slice():Uu(a)&&(a=ae({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,Uu(r)?ae(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){Uu(e)?ae(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?ae(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Rk(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Ri(this.dimensions,this._getDimInfo,this),this.hostModel)),_0(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];_e(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(kv(arguments)))})},t.internalField=function(){qE=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new dj(o.categories.length);for(var u=0;u<n.length;u++)n[u]=UE;for(var u=0;u<s.count();u++)n[s.get(a.storeDimIndex,u)]=u}})},qu=function(e,r,n){return vr(e._getCategory(r,n),null)},Qc=function(e,r){var n=e._idList[r];return n==null&&e._idDimIdx!=null&&(n=qu(e,e._idDimIdx,r)),n==null&&(n=vj+r),n},as=function(e){return ce(e)||(e=e!=null?[e]:[]),e},eh=function(e){var r=new t(e._schema?e._schema:Ri(e.dimensions,e._getDimInfo,e),e.hostModel);return _0(r,e),r},_0=function(e,r){N(pj.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(e[n]=r[n])}),e.__wrappedMethods=r.__wrappedMethods,N(gj,function(n){e[n]=We(r[n])}),e._calculationInfo=ae({},r._calculationInfo)},x0=function(e,r){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[r],u=i[r];if(s==null&&a!=null&&(n[r]=s=qu(e,a,r)),u==null&&o!=null&&(i[r]=u=qu(e,o,r)),u==null&&s!=null){var l=e._nameRepeatCount,f=l[s]=(l[s]||0)+1;u=s,f>1&&(u+="__ec__"+f),i[r]=u}}}(),t}();function XE(t,e){jg(t)||(t=Kx(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ae(),a=[],o=yj(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&GE(o),u=n===t.dimensionsDefine,l=u?$E(t):WE(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(t,o));for(var c=Ae(f),h=new pS(o),d=0;d<h.length;d++)h[d]=-1;function v(S){var O=h[S];if(O<0){var E=n[S],P=Ce(E)?E:{name:E},F=new Jc,M=P.name;M!=null&&l.get(M)!=null&&(F.name=F.displayName=M),P.type!=null&&(F.type=P.type),P.displayName!=null&&(F.displayName=P.displayName);var B=a.length;return h[S]=B,F.storeDimIndex=S,a.push(F),F}return a[O]}if(!s)for(var d=0;d<o;d++)v(d);c.each(function(S,O){var E=pt(S).slice();if(E.length===1&&!me(E[0])&&E[0]<0){c.set(O,!1);return}var P=c.set(O,[]);N(E,function(F,M){var B=me(F)?l.get(F):F;B!=null&&B<o&&(P[M]=B,p(v(B),O,M))})});var g=0;N(r,function(S){var O,E,P,F;if(me(S))O=S,F={};else{F=S,O=F.name;var M=F.ordinalMeta;F.ordinalMeta=null,F=ae({},F),F.ordinalMeta=M,E=F.dimsDef,P=F.otherDims,F.name=F.coordDim=F.coordDimIndex=F.dimsDef=F.otherDims=null}var B=c.get(O);if(B!==!1){if(B=pt(B),!B.length)for(var R=0;R<(E&&E.length||1);R++){for(;g<o&&v(g).coordDim!=null;)g++;g<o&&B.push(g++)}N(B,function(V,k){var W=v(V);if(u&&F.type!=null&&(W.type=F.type),p(ke(W,F),O,k),W.name==null&&E){var I=E[k];!Ce(I)&&(I={name:I}),W.name=W.displayName=I.name,W.defaultTooltip=I.defaultTooltip}P&&ke(W.otherDims,P)})}});function p(S,O,E){Bg.get(O)!=null?S.otherDims[O]=E:(S.coordDim=O,S.coordDimIndex=E,i.set(O,!0))}var m=e.generateCoord,y=e.generateCoordCount,b=y!=null;y=m?y||1:0;var C=m||"value";function w(S){S.name==null&&(S.name=S.coordDim)}if(s)N(a,function(S){w(S)}),a.sort(function(S,O){return S.storeDimIndex-O.storeDimIndex});else for(var D=0;D<o;D++){var _=v(D),x=_.coordDim;x==null&&(_.coordDim=bj(C,i,b),_.coordDimIndex=0,(!m||y<=0)&&(_.isExtraCoord=!0),y--),w(_),_.type==null&&(Lx(t,D)===zt.Must||_.isExtraCoord&&(_.otherDims.itemName!=null||_.otherDims.seriesName!=null))&&(_.type="ordinal")}return mj(a),new VE({source:t,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function mj(t){for(var e=Ae(),r=0;r<t.length;r++){var n=t[r],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function yj(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;Ce(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function bj(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Cj=function(){function t(e){this.coordSysDims=[],this.axisMap=Ae(),this.categoryAxisMap=Ae(),this.coordSysName=e}return t}();function wj(t){var e=t.get("coordinateSystem"),r=new Cj(e),n=Dj[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Dj={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",on).models[0],a=t.getReferringComponents("yAxis",on).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+da(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+da(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),os(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),os(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",on).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],r.set("single",i),os(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",on).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),os(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),os(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,u){var l=i.getComponent("parallelAxis",s),f=o[u];r.set(f,l),os(l)&&(n.set(f,l),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=u))})}};function os(t){return t.get("type")==="category"}function _j(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;xj(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var u=!!(t&&t.get("stack")),l,f,c,h;if(N(a,function(y,b){me(y)&&(a[b]=y={name:y}),u&&!y.isExtraCoord&&(!n&&!l&&y.ordinalMeta&&(l=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!l&&(n=!0),f){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=f.coordDim,v=f.type,g=0;N(a,function(y){y.coordDim===d&&g++});var p={name:c,coordDim:d,coordDimIndex:g,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(p.storeDimIndex=s.ensureCalculationDimension(h,v),m.storeDimIndex=s.ensureCalculationDimension(c,v)),o.appendCalculationDimension(p),o.appendCalculationDimension(m)):(a.push(p),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:l&&l.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function xj(t){return!HE(t.schema)}function ss(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Sj(t,e){return ss(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ej(t,e){var r=t.get("coordinateSystem"),n=Ng.get(r),i;return e&&e.coordSysDims&&(i=ge(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var u=s.get("type");o.type=lj(u)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Aj(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,u=r.categoryAxisMap.get(s);u&&(n==null&&(n=o),a.ordinalMeta=u.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function S0(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Ur;var o=wj(e),s=Ej(e,o),u=r.useEncodeDefaulter,l=_e(u)?u:u?wt(b9,s,e):null,f={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},c=XE(i,f),h=Aj(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),v=_j(e,{schema:c,store:d}),g=new YE(c,e);g.setCalculationInfo(v);var p=h!=null&&Tj(i)?function(m,y,b,C){return C===h?b:this.defaultDimValueGetter(m,y,b,C)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,p),g}function Tj(t){if(t.sourceFormat===Ur){var e=Oj(t.data||[]);return!ce(uu(e))}}function Oj(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}var Rn=function(){function t(e){this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype.unionExtent=function(e){var r=this._extent;e[0]<r[0]&&(r[0]=e[0]),e[1]>r[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();jf(Rn);var Pj=0,E0=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Pj}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&ge(n,Bj);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!me(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ae(this.categories))},t}();function Bj(t){return Ce(t)&&t.value!=null?t.value:t+""}function Mj(t){var e=Math.pow(10,kf(Math.abs(t))),r=Math.abs(t/e);return r===0||r===1||r===2||r===3||r===5}function A0(t){return t.type==="interval"||t.type==="log"}function Fj(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=_D(a/e);r!=null&&o<r&&(o=i.interval=r),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=KE(o),u=i.niceTickExtent=[At(Math.ceil(t[0]/o)*o,s),At(Math.floor(t[1]/o)*o,s)];return Lj(u,t),i}function T0(t){var e=Math.pow(10,kf(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,At(r*e)}function KE(t){return Jn(t)+2}function ZE(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Lj(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ZE(t,0,e),ZE(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function th(t,e){return t>=e[0]&&t<=e[1]}function rh(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function nh(t,e){return t*(e[1]-e[0])+e[0]}var O0=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new E0({})),ce(i)&&(i=new E0({categories:ge(i,function(a){return Ce(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:me(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),th(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),rh(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(nh(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,u=Math.min(s,n.length);o<u;++o){var l=n[o];i[o]=l,a[l]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},e.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},e.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Rn);Rn.registerClass(O0);var Ga=At,us=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return th(r,this._extent)},e.prototype.normalize=function(r){return rh(r,this._extent)},e.prototype.scale=function(r){return nh(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]<n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=KE(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var u=1e4;i[0]<a[0]&&(r?s.push({value:Ga(a[0]-n,o)}):s.push({value:i[0]}));for(var l=a[0];l<=a[1]&&(s.push({value:l}),l=Ga(l+n,o),l!==s[s.length-1].value);)if(s.length>u)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(r?s.push({value:Ga(f+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],u=n[o-1],l=0,f=[],c=s.value-u.value,h=c/r;l<r-1;){var d=Ga(u.value+(l+1)*h);d>a[0]&&d<a[1]&&f.push(d),l++}i.push(f)}return i},e.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Jn(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Ga(r.value,i,!0);return xx(a)},e.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=Fj(a,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval;r.fixMin||(n[0]=Ga(Math.floor(n[0]/o)*o)),r.fixMax||(n[1]=Ga(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},e.type="interval",e}(Rn);Rn.registerClass(us);var JE=typeof Float32Array<"u",Rj=JE?Float32Array:Array;function si(t){return ce(t)?JE?new Float32Array(t):t:new Rj(t)}var Ij="__ec_stack_";function P0(t){return t.get("stack")||Ij+t.seriesIndex}function B0(t){return t.dim+t.index}function QE(t,e){var r=[];return e.eachSeriesByType(t,function(n){t2(n)&&r.push(n)}),r}function Nj(t){var e={};N(t,function(u){var l=u.coordinateSystem,f=l.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=u.getData(),h=f.dim+"_"+f.index,d=c.getDimensionIndex(c.mapDimension(f.dim)),v=c.getStore(),g=0,p=v.count();g<p;++g){var m=v.get(d,g);e[h]?e[h].push(m):e[h]=[m]}});var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(u,l){return u-l});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function e2(t){var e=Nj(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var u=a.dim+"_"+a.index,l=e[u],f=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=l?f/h*l:f}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=st(n.get("barWidth"),s),g=st(n.get("barMaxWidth"),s),p=st(n.get("barMinWidth")||(r2(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:B0(a),stackId:P0(n)})}),kj(r)}function kj(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},u=s.stacks;e[a]=s;var l=n.stackId;u[l]||s.autoWidthCount++,u[l]=u[l]||{width:0,maxWidth:0};var f=n.barWidth;f&&!u[l].width&&(u[l].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(u[l].maxWidth=c);var h=n.barMinWidth;h&&(u[l].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var u=Xe(a).length;s=Math.max(35-u*4,15)+"%"}var l=st(s,o),f=st(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,d=(c-l)/(h+(h-1)*f);d=Math.max(d,0),N(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var C=m.width;y&&(C=Math.min(C,y)),b&&(C=Math.max(C,b)),m.width=C,c-=C+f*C,h--}else{var C=d;y&&y<C&&(C=Math.min(y,c)),b&&b>C&&(C=b),C!==d&&(m.width=C,c-=C+f*C,h--)}}),d=(c-l)/(h+(h-1)*f),d=Math.max(d,0);var v=0,g;N(a,function(m,y){m.width||(m.width=d),g=m,v+=m.width*(1+f)}),g&&(v-=g.width*f);var p=-v/2;N(a,function(m,y){r[i][y]=r[i][y]||{bandWidth:o,offset:p,width:m.width},p+=m.width*(1+f)})}),r}function zj(t,e,r){if(t&&e){var n=t[B0(e)];return n!=null&&r!=null?n[P0(r)]:n}}function jj(t,e){var r=QE(t,e),n=e2(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),u=P0(i),l=n[B0(s)][u],f=l.offset,c=l.width;a.setLayout({bandWidth:l.bandWidth,offset:f,size:c})})}function Vj(t){return{seriesType:t,plan:Zg(),reset:function(e){if(t2(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),u=e.get("showBackground",!0),l=r.mapDimension(a.dim),f=r.getCalculationInfo("stackResultDimension"),c=ss(r,l)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=Hj(i,a),v=r2(e),g=e.get("barMinHeight")||0,p=f&&r.getDimensionIndex(f),m=r.getLayout("size"),y=r.getLayout("offset");return{progress:function(b,C){for(var w=b.count,D=v&&si(w*3),_=v&&u&&si(w*3),x=v&&si(w),S=n.master.getRect(),O=h?S.width:S.height,E,P=C.getStore(),F=0;(E=b.next())!=null;){var M=P.get(c?p:o,E),B=P.get(s,E),R=d,V=void 0;c&&(V=+M-P.get(o,E));var k=void 0,W=void 0,I=void 0,q=void 0;if(h){var Z=n.dataToPoint([M,B]);if(c){var J=n.dataToPoint([V,B]);R=J[0]}k=R,W=Z[1]+y,I=Z[0]-R,q=m,Math.abs(I)<g&&(I=(I<0?-1:1)*g)}else{var Z=n.dataToPoint([B,M]);if(c){var J=n.dataToPoint([B,V]);R=J[1]}k=Z[0]+y,W=R,I=m,q=Z[1]-R,Math.abs(q)<g&&(q=(q<=0?-1:1)*g)}v?(D[F]=k,D[F+1]=W,D[F+2]=h?I:q,_&&(_[F]=h?S.x:k,_[F+1]=h?W:S.y,_[F+2]=O),x[E]=E):C.setItemLayout(E,{x:k,y:W,width:I,height:q}),F+=3}v&&C.setLayout({largePoints:D,largeDataIndices:x,largeBackgroundPoints:_,valueAxisHorizontal:h})}}}}}}function t2(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function r2(t){return t.pipelineContext&&t.pipelineContext.large}function Hj(t,e){var r=e.model.get("startValue");return r||(r=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?r>0?r:1:r))}var Wj=function(t,e,r,n){for(;r<n;){var i=r+n>>>1;t[i][1]<e?r=i+1:n=i}return r},n2=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="time",n}return e.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return Dc(r.value,dx[f9(Xo(this._minLevelUnit))]||dx.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return c9(r,n,i,o,a)},e.prototype.getTicks=function(){var r=this._interval,n=this._extent,i=[];if(!r)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=Kj(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(r){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Gr,n[1]+=Gr),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Gr}this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},e.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=ih.length,u=Math.min(Wj(ih,this._approxInterval,0,s),s-1);this._interval=ih[u][1],this._minLevelUnit=ih[Math.max(u-1,0)][0]},e.prototype.parse=function(r){return rt(r)?r:+Qn(r)},e.prototype.contain=function(r){return th(this.parse(r),this._extent)},e.prototype.normalize=function(r){return rh(this.parse(r),this._extent)},e.prototype.scale=function(r){return nh(r,this._extent)},e.type="time",e}(us),ih=[["second",xg],["minute",Sg],["hour",xu],["quarter-day",xu*6],["half-day",xu*12],["day",Gr*1.2],["half-week",Gr*3.5],["week",Gr*7],["month",Gr*31],["quarter",Gr*95],["half-year",hx/2],["year",hx]];function $j(t,e,r,n){var i=Qn(e),a=Qn(r),o=function(v){return gx(i,v,n)===gx(a,v,n)},s=function(){return o("year")},u=function(){return s()&&o("month")},l=function(){return u()&&o("day")},f=function(){return l()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},d=function(){return h()&&o("millisecond")};switch(t){case"year":return s();case"month":return u();case"day":return l();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return d()}}function Gj(t,e){return t/=Gr,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Uj(t){var e=30*Gr;return t/=e,t>6?6:t>3?3:t>2?2:1}function qj(t){return t/=xu,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function i2(t,e){return t/=e?Sg:xg,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Yj(t){return _D(t)}function Xj(t,e,r){var n=new Date(t);switch(Xo(e)){case"year":case"month":n[mx(r)](0);case"day":n[yx(r)](1);case"hour":n[bx(r)](0);case"minute":n[Cx(r)](0);case"second":n[Dx(r)](0),n[_x(r)](0)}return n.getTime()}function Kj(t,e,r,n){var i=1e4,a=vx,o=0;function s(O,E,P,F,M,B,R){for(var V=new Date(E),k=E,W=V[F]();k<P&&k<=n[1];)R.push({value:k}),W+=O,V[M](W),k=V.getTime();R.push({value:k,notAdd:!0})}function u(O,E,P){var F=[],M=!E.length;if(!$j(Xo(O),n[0],n[1],r)){M&&(E=[{value:Xj(new Date(n[0]),O,r)},{value:n[1]}]);for(var B=0;B<E.length-1;B++){var R=E[B].value,V=E[B+1].value;if(R!==V){var k=void 0,W=void 0,I=void 0,q=!1;switch(O){case"year":k=Math.max(1,Math.round(e/Gr/365)),W=Ag(r),I=h9(r);break;case"half-year":case"quarter":case"month":k=Uj(e),W=Ko(r),I=mx(r);break;case"week":case"half-week":case"day":k=Gj(e),W=_c(r),I=yx(r),q=!0;break;case"half-day":case"quarter-day":case"hour":k=qj(e),W=Eu(r),I=bx(r);break;case"minute":k=i2(e,!0),W=xc(r),I=Cx(r);break;case"second":k=i2(e,!1),W=Sc(r),I=Dx(r);break;case"millisecond":k=Yj(e),W=Ec(r),I=_x(r);break}s(k,R,V,W,I,q,F),O==="year"&&P.length>1&&B===0&&P.unshift({value:P[0].value-k})}}for(var B=0;B<F.length;B++)P.push(F[B]);return F}}for(var l=[],f=[],c=0,h=0,d=0;d<a.length&&o++<i;++d){var v=Xo(a[d]);if(l9(a[d])){u(a[d],l[l.length-1]||[],f);var g=a[d+1]?Xo(a[d+1]):null;if(v!==g){if(f.length){h=c,f.sort(function(O,E){return O.value-E.value});for(var p=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(p.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var b=(n[1]-n[0])/e;if(c>b*1.5&&h>b/1.5||(l.push(p),c>b||t===a[d]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&Dt("Exceed safe limit.");for(var C=yt(ge(l,function(O){return yt(O,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(O){return O.length>0}),w=[],D=C.length-1,d=0;d<C.length;++d)for(var _=C[d],x=0;x<_.length;++x)w.push({value:_[x].value,level:D-d});w.sort(function(O,E){return O.value-E.value});for(var S=[],d=0;d<w.length;++d)(d===0||w[d].value!==w[d-1].value)&&S.push(w[d]);return S}Rn.registerClass(n2);var a2=Rn.prototype,Yu=us.prototype,Zj=At,Jj=Math.floor,Qj=Math.ceil,ah=Math.pow,cn=Math.log,M0=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new us,r._interval=0,r}return e.prototype.getTicks=function(r){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=Yu.getTicks.call(this,r);return ge(o,function(s){var u=s.value,l=At(ah(this.base,u));return l=u===i[0]&&this._fixMin?oh(l,a[0]):l,l=u===i[1]&&this._fixMax?oh(l,a[1]):l,{value:l}},this)},e.prototype.setExtent=function(r,n){var i=cn(this.base);r=cn(Math.max(0,r))/i,n=cn(Math.max(0,n))/i,Yu.setExtent.call(this,r,n)},e.prototype.getExtent=function(){var r=this.base,n=a2.getExtent.call(this);n[0]=ah(r,n[0]),n[1]=ah(r,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=oh(n[0],a[0])),this._fixMax&&(n[1]=oh(n[1],a[1])),n},e.prototype.unionExtent=function(r){this._originalScale.unionExtent(r);var n=this.base;r[0]=cn(r[0])/cn(n),r[1]=cn(r[1])/cn(n),a2.unionExtent.call(this,r)},e.prototype.unionExtentFromData=function(r,n){this.unionExtent(r.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=wN(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[At(Qj(n[0]/a)*a),At(Jj(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){Yu.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=cn(r)/cn(this.base),th(r,this._extent)},e.prototype.normalize=function(r){return r=cn(r)/cn(this.base),rh(r,this._extent)},e.prototype.scale=function(r){return r=nh(r,this._extent),ah(this.base,r)},e.type="log",e}(Rn),o2=M0.prototype;o2.getMinorTicks=Yu.getMinorTicks,o2.getLabel=Yu.getLabel;function oh(t,e){return Zj(t,Jn(e))}Rn.registerClass(M0);var eV=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;_e(o)?this._modelMinNum=sh(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=sh(e,o));var s=this._modelMaxRaw=r.get("max",!0);if(_e(s)?this._modelMaxNum=sh(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=sh(e,s)),i)this._axisDataLen=r.getCategories().length;else{var u=r.get("boundaryGap"),l=ce(u)?u:[u||0,u||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[xi(l[0],1),xi(l[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,u=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,l=s!=null,f=u!=null;s==null&&(s=e?i?0:NaN:r-a[0]*o),u==null&&(u=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(u==null||!isFinite(u))&&(u=NaN);var c=_o(s)||_o(u)||e&&!i;this._needCrossZero&&(s>0&&u>0&&!l&&(s=0),s<0&&u<0&&!f&&(u=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,l=!0),d!=null&&(u=d,f=!0),{min:s,max:u,minFixed:l,maxFixed:f,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){process.env.NODE_ENV!=="production"&&Ee(!this.frozen),this[rV[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=tV[e];process.env.NODE_ENV!=="production"&&Ee(!this.frozen&&this[n]==null),this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),tV={min:"_determinedMin",max:"_determinedMax"},rV={min:"_dataMin",max:"_dataMax"};function nV(t,e,r){var n=t.rawExtentInfo;return n||(n=new eV(t,e,r),t.rawExtentInfo=n,n)}function sh(t,e){return e==null?null:_o(e)?NaN:t.parse(e)}function s2(t,e){var r=t.type,n=nV(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=QE("bar",o),u=!1;if(N(s,function(c){u=u||c.getBaseAxis()===e.axis}),u){var l=e2(s),f=iV(i,a,e,l);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function iV(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=zj(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(d){s=Math.min(d.offset,s)});var u=-1/0;N(o,function(d){u=Math.max(d.offset+d.width,u)}),s=Math.abs(s),u=Math.abs(u);var l=s+u,f=e-t,c=1-(s+u)/a,h=f/c-f;return e+=h*(u/l),t-=h*(s/l),{min:t,max:e}}function u2(t,e){var r=e,n=s2(t,r),i=n.extent,a=r.get("splitNumber");t instanceof M0&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),u=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:u?r.get("minInterval"):null,maxInterval:u?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function aV(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new O0({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new n2({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Rn.getClass(e)||us)}}function oV(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function ls(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):me(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):_e(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(F0(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function F0(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function sV(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof O0?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=ls(t),u,l=1;i>40&&(l=Math.ceil(i/40));for(var f=0;f<i;f+=l){var c=n?n[f]:{value:a[0]+f},h=s(c,f),d=o.getTextRect(h),v=uV(d,o.get("rotate")||0);u?u.union(v):u=v}return u}}function uV(t,e){var r=e*Math.PI/180,n=t.width,i=t.height,a=n*Math.abs(Math.cos(r))+Math.abs(i*Math.sin(r)),o=n*Math.abs(Math.sin(r))+Math.abs(i*Math.cos(r)),s=new Ge(t.x,t.y,a,o);return s}function L0(t){var e=t.get("interval");return e??"auto"}function l2(t){return t.type==="category"&&L0(t.getLabelModel())===0}function lV(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[Sj(t,n)]=!0}),Xe(r)}var fV=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),f2=[],cV={registerPreprocessor:IE,registerProcessor:NE,registerPostInit:tj,registerPostUpdate:rj,registerUpdateLifecycle:b0,registerAction:is,registerCoordinateSystem:nj,registerLayout:ij,registerVisual:$a,registerTransform:oj,registerLoading:zE,registerMap:aj,registerImpl:Rz,PRIORITY:Yz,ComponentModel:Ke,ComponentView:Pr,SeriesModel:ln,ChartView:Kr,registerComponentModel:function(t){Ke.registerClass(t)},registerComponentView:function(t){Pr.registerClass(t)},registerSeriesModel:function(t){ln.registerClass(t)},registerChartView:function(t){Kr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Ke.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){pN(t,e)}};function Ii(t){if(ce(t)){N(t,function(e){Ii(e)});return}$e(f2,t)>=0||(f2.push(t),_e(t)&&(t={install:t}),t.install(cV))}var Xu=ut();function c2(t,e){var r=ge(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function hV(t){var e=t.getLabelModel().get("customValues");if(e){var r=ls(t);return{labels:c2(t,e).map(function(n){var i={value:n};return{formattedLabel:r(i),rawLabel:t.scale.getLabel(i),tickValue:n}})}}return t.type==="category"?vV(t):gV(t)}function dV(t,e){var r=t.getTickModel().get("customValues");return r?{ticks:c2(t,r)}:t.type==="category"?pV(t,e):{ticks:ge(t.scale.getTicks(),function(n){return n.value})}}function vV(t){var e=t.getLabelModel(),r=h2(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function h2(t,e){var r=d2(t,"labels"),n=L0(e),i=v2(r,n);if(i)return i;var a,o;return _e(n)?a=m2(t,n):(o=n==="auto"?mV(t):n,a=g2(t,o)),p2(r,n,{labels:a,labelCategoryInterval:o})}function pV(t,e){var r=d2(t,"ticks"),n=L0(e),i=v2(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),_e(n))a=m2(t,n,!0);else if(n==="auto"){var s=h2(t,t.getLabelModel());o=s.labelCategoryInterval,a=ge(s.labels,function(u){return u.tickValue})}else o=n,a=g2(t,o,!0);return p2(r,n,{ticks:a,tickCategoryInterval:o})}function gV(t){var e=t.scale.getTicks(),r=ls(t);return{labels:ge(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function d2(t,e){return Xu(t)[e]||(Xu(t)[e]=[])}function v2(t,e){for(var r=0;r<t.length;r++)if(t[r].key===e)return t[r].value}function p2(t,e,r){return t.push({key:e,value:r}),r}function mV(t){var e=Xu(t).autoInterval;return e??(Xu(t).autoInterval=t.calculateCategoryInterval())}function yV(t){var e=bV(t),r=ls(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var u=a[0],l=t.dataToCoord(u+1)-t.dataToCoord(u),f=Math.abs(l*Math.cos(n)),c=Math.abs(l*Math.sin(n)),h=0,d=0;u<=a[1];u+=s){var v=0,g=0,p=Dp(r({value:u}),e.font,"center","top");v=p.width*1.3,g=p.height*1.3,h=Math.max(h,v,7),d=Math.max(d,g,7)}var m=h/f,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),C=Xu(t.model),w=t.getExtent(),D=C.lastAutoInterval,_=C.lastTickCount;return D!=null&&_!=null&&Math.abs(D-b)<=1&&Math.abs(_-o)<=1&&D>b&&C.axisExtent0===w[0]&&C.axisExtent1===w[1]?b=D:(C.lastTickCount=o,C.lastAutoInterval=b,C.axisExtent0=w[0],C.axisExtent1=w[1]),b}function bV(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function g2(t,e,r){var n=ls(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],u=Math.max((e||0)+1,1),l=a[0],f=i.count();l!==0&&u>1&&f/u>2&&(l=Math.round(Math.ceil(l/u)*u));var c=l2(t),h=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;h&&l!==a[0]&&g(a[0]);for(var v=l;v<=a[1];v+=u)g(v);d&&v-u!==a[1]&&g(a[1]);function g(p){var m={value:p};s.push(r?p:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:p})}return s}function m2(t,e,r){var n=t.scale,i=ls(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),u=o.value;e(o.value,s)&&a.push(r?u:{formattedLabel:i(o),rawLabel:s,tickValue:u})}),a}var y2=[0,1],CV=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return mN(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),b2(n,i.count())),Tp(e,y2,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),b2(n,i.count()));var a=Tp(e,n,y2,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=dV(this,r),i=n.ticks,a=ge(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return wV(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=ge(n,function(a){return ge(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return hV(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return yV(this)},t}();function b2(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function wV(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var u=e[i-1].tickValue-e[0].tickValue,l=(e[i-1].coord-e[0].coord)/u;N(e,function(d){d.coord-=l/2});var f=t.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+l*s},e.push(o)}var c=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,v){return d=At(d),v=At(v),c?d>v:d<v}}var Ku=Math.PI*2,Ua=ti.CMD,DV=["top","right","bottom","left"];function _V(t,e,r,n,i){var a=r.width,o=r.height;switch(t){case"top":n.set(r.x+a/2,r.y-e),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+e),i.set(0,1);break;case"left":n.set(r.x-e,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+e,r.y+o/2),i.set(1,0);break}}function xV(t,e,r,n,i,a,o,s,u){o-=t,s-=e;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var f=o*r+t,c=s*r+e;if(Math.abs(n-i)%Ku<1e-4)return u[0]=f,u[1]=c,l-r;if(a){var h=n;n=ri(i),i=ri(h)}else n=ri(n),i=ri(i);n>i&&(i+=Ku);var d=Math.atan2(s,o);if(d<0&&(d+=Ku),d>=n&&d<=i||d+Ku>=n&&d+Ku<=i)return u[0]=f,u[1]=c,l-r;var v=r*Math.cos(n)+t,g=r*Math.sin(n)+e,p=r*Math.cos(i)+t,m=r*Math.sin(i)+e,y=(v-o)*(v-o)+(g-s)*(g-s),b=(p-o)*(p-o)+(m-s)*(m-s);return y<b?(u[0]=v,u[1]=g,Math.sqrt(y)):(u[0]=p,u[1]=m,Math.sqrt(b))}function uh(t,e,r,n,i,a,o,s){var u=i-t,l=a-e,f=r-t,c=n-e,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var d=u*f+l*c,v=d/h;s&&(v=Math.min(Math.max(v,0),1)),v*=h;var g=o[0]=t+v*f,p=o[1]=e+v*c;return Math.sqrt((g-i)*(g-i)+(p-a)*(p-a))}function C2(t,e,r,n,i,a,o){r<0&&(t=t+r,r=-r),n<0&&(e=e+n,n=-n);var s=t+r,u=e+n,l=o[0]=Math.min(Math.max(i,t),s),f=o[1]=Math.min(Math.max(a,e),u);return Math.sqrt((l-i)*(l-i)+(f-a)*(f-a))}var hn=[];function SV(t,e,r){var n=C2(e.x,e.y,e.width,e.height,t.x,t.y,hn);return r.set(hn[0],hn[1]),n}function EV(t,e,r){for(var n=0,i=0,a=0,o=0,s,u,l=1/0,f=e.data,c=t.x,h=t.y,d=0;d<f.length;){var v=f[d++];d===1&&(n=f[d],i=f[d+1],a=n,o=i);var g=l;switch(v){case Ua.M:a=f[d++],o=f[d++],n=a,i=o;break;case Ua.L:g=uh(n,i,f[d],f[d+1],c,h,hn,!0),n=f[d++],i=f[d++];break;case Ua.C:g=Uw(n,i,f[d++],f[d++],f[d++],f[d++],f[d],f[d+1],c,h,hn),n=f[d++],i=f[d++];break;case Ua.Q:g=Xw(n,i,f[d++],f[d++],f[d],f[d+1],c,h,hn),n=f[d++],i=f[d++];break;case Ua.A:var p=f[d++],m=f[d++],y=f[d++],b=f[d++],C=f[d++],w=f[d++];d+=1;var D=!!(1-f[d++]);s=Math.cos(C)*y+p,u=Math.sin(C)*b+m,d<=1&&(a=s,o=u);var _=(c-p)*b/y+p;g=xV(p,m,b,C,C+w,D,_,h,hn),n=Math.cos(C+w)*y+p,i=Math.sin(C+w)*b+m;break;case Ua.R:a=n=f[d++],o=i=f[d++];var x=f[d++],S=f[d++];g=C2(a,o,x,S,c,h,hn);break;case Ua.Z:g=uh(n,i,a,o,c,h,hn,!0),n=a,i=o;break}g<l&&(l=g,r.set(hn[0],hn[1]))}return l}var dn=new we,ot=new we,Ct=new we,In=new we,Nn=new we;function w2(t,e){if(t){var r=t.getTextGuideLine(),n=t.getTextContent();if(n&&r){var i=t.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||DV,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var u=1/0,l=i.anchor,f=t.getComputedTransform(),c=f&&vf([],f),h=e.get("length2")||0;l&&Ct.copy(l);for(var d=0;d<o.length;d++){var v=o[d];_V(v,0,s,dn,In),we.scaleAndAdd(ot,dn,In,h),ot.transform(c);var g=t.getBoundingRect(),p=l?l.distance(ot):t instanceof ze?EV(ot,t.path,Ct):SV(ot,g,Ct);p<u&&(u=p,ot.transform(f),Ct.transform(f),Ct.toArray(a[0]),ot.toArray(a[1]),dn.toArray(a[2]))}D2(a,e.get("minTurnAngle")),r.setShape({points:a})}}}var lh=[],ar=new we;function D2(t,e){if(e<=180&&e>0){e=e/180*Math.PI,dn.fromArray(t[0]),ot.fromArray(t[1]),Ct.fromArray(t[2]),we.sub(In,dn,ot),we.sub(Nn,Ct,ot);var r=In.len(),n=Nn.len();if(!(r<.001||n<.001)){In.scale(1/r),Nn.scale(1/n);var i=In.dot(Nn),a=Math.cos(e);if(a<i){var o=uh(ot.x,ot.y,Ct.x,Ct.y,dn.x,dn.y,lh,!1);ar.fromArray(lh),ar.scaleAndAdd(Nn,o/Math.tan(Math.PI-e));var s=Ct.x!==ot.x?(ar.x-ot.x)/(Ct.x-ot.x):(ar.y-ot.y)/(Ct.y-ot.y);if(isNaN(s))return;s<0?we.copy(ar,ot):s>1&&we.copy(ar,Ct),ar.toArray(t[1])}}}}function AV(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,dn.fromArray(t[0]),ot.fromArray(t[1]),Ct.fromArray(t[2]),we.sub(In,ot,dn),we.sub(Nn,Ct,ot);var n=In.len(),i=Nn.len();if(!(n<.001||i<.001)){In.scale(1/n),Nn.scale(1/i);var a=In.dot(e),o=Math.cos(r);if(a<o){var s=uh(ot.x,ot.y,Ct.x,Ct.y,dn.x,dn.y,lh,!1);ar.fromArray(lh);var u=Math.PI/2,l=Math.acos(Nn.dot(e)),f=u+l-r;if(f>=u)we.copy(ar,Ct);else{ar.scaleAndAdd(Nn,s/Math.tan(Math.PI/2-f));var c=Ct.x!==ot.x?(ar.x-ot.x)/(Ct.x-ot.x):(ar.y-ot.y)/(Ct.y-ot.y);if(isNaN(c))return;c<0?we.copy(ar,ot):c>1&&we.copy(ar,Ct)}ar.toArray(t[1])}}}}function R0(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function TV(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Vv(n[0],n[1]),a=Vv(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=df([],n[1],n[0],o/i),u=df([],n[1],n[2],o/a),l=df([],s,u,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),t.bezierCurveTo(u[0],u[1],u[0],u[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)t.lineTo(n[f][0],n[f][1])}function _2(t,e,r){var n=t.getTextGuideLine(),i=t.getTextContent();if(!i){n&&t.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,u=0;u<Xf.length;u++){var l=Xf[u],f=e[l],c=l==="normal";if(f){var h=f.get("show"),d=c?s:Be(i.states[l]&&i.states[l].ignore,s);if(d||!Be(h,o)){var v=c?n:n&&n.states[l];v&&(v.ignore=!0),n&&R0(n,!0,l,f);continue}n||(n=new Cu,t.setTextGuideLine(n),!c&&(s||!o)&&R0(n,!0,"normal",e.normal),t.stateProxy&&(n.stateProxy=t.stateProxy)),R0(n,!1,l,f)}}if(n){ke(n.style,r),n.style.fill=null;var g=a.get("showAbove"),p=t.textGuideLineConfig=t.textGuideLineConfig||{};p.showAbove=g||!1,n.buildPath=TV}}function x2(t,e){e=e||"labelLine";for(var r={normal:t.getModel(e)},n=0;n<$r.length;n++){var i=$r[n];r[i]=t.getModel([i,e])}return r}function S2(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,u=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=u/2,l.y-=u/2,l.width+=u,l.height+=u;var f=s?new fc(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:l,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function E2(t,e,r,n,i,a){var o=t.length;if(o<2)return;t.sort(function(x,S){return x.rect[e]-S.rect[e]});for(var s=0,u,l=!1,f=0,c=0;c<o;c++){var h=t[c],d=h.rect;u=d[e]-s,u<0&&(d[e]-=u,h.label[e]-=u,l=!0);var v=Math.max(-u,0);f+=v,s=d[e]+d[r]}f>0&&a&&w(-f/o,0,o);var g=t[0],p=t[o-1],m,y;b(),m<0&&D(-m,.8),y<0&&D(y,.8),b(),C(m,y,1),C(y,m,-1),b(),m<0&&_(-m),y<0&&_(y);function b(){m=g.rect[e]-n,y=i-p.rect[e]-p.rect[r]}function C(x,S,O){if(x<0){var E=Math.min(S,-x);if(E>0){w(E*O,0,o);var P=E+x;P<0&&D(-P*O,1)}else D(-x*O,1)}}function w(x,S,O){x!==0&&(l=!0);for(var E=S;E<O;E++){var P=t[E],F=P.rect;F[e]+=x,P.label[e]+=x}}function D(x,S){for(var O=[],E=0,P=1;P<o;P++){var F=t[P-1].rect,M=Math.max(t[P].rect[e]-F[e]-F[r],0);O.push(M),E+=M}if(E){var B=Math.min(Math.abs(x)/E,S);if(x>0)for(var P=0;P<o-1;P++){var R=O[P]*B;w(R,0,P+1)}else for(var P=o-1;P>0;P--){var R=O[P-1]*B;w(-R,P,o)}}}function _(x){var S=x<0?-1:1;x=Math.abs(x);for(var O=Math.ceil(x/(o-1)),E=0;E<o-1;E++)if(S>0?w(O,0,E+1):w(-O,o-E-1,o),x-=O,x<=0)return}return l}function OV(t,e,r,n){return E2(t,"x","width",e,r,n)}function A2(t,e,r,n){return E2(t,"y","height",e,r,n)}function T2(t){var e=[];t.sort(function(g,p){return p.priority-g.priority});var r=new Ge(0,0,0,0);function n(g){if(!g.ignore){var p=g.ensureState("emphasis");p.ignore==null&&(p.ignore=!1)}g.ignore=!0}for(var i=0;i<t.length;i++){var a=t[i],o=a.axisAligned,s=a.localRect,u=a.transform,l=a.label,f=a.labelLine;r.copy(a.rect),r.width-=.1,r.height-=.1,r.x+=.05,r.y+=.05;for(var c=a.obb,h=!1,d=0;d<e.length;d++){var v=e[d];if(r.intersect(v.rect)){if(o&&v.axisAligned){h=!0;break}if(v.obb||(v.obb=new fc(v.localRect,v.transform)),c||(c=new fc(s,u)),c.intersect(v.obb)){h=!0;break}}}h?(n(l),f&&n(f)):(l.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function PV(t){if(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].slice());return e}}function BV(t,e){var r=t.label,n=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:PV(n&&n.shape.points)}}var O2=["align","verticalAlign","width","height","fontSize"],or=new au,I0=ut(),MV=ut();function fh(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];e[i]!=null&&(t[i]=e[i])}}var ch=["x","y","rotation"],FV=function(){function t(){this._labelList=[],this._chartViewList=[]}return t.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},t.prototype._addLabel=function(e,r,n,i,a){var o=i.style,s=i.__hostTarget,u=s.textConfig||{},l=i.getComputedTransform(),f=i.getBoundingRect().plain();Ge.applyTransform(f,f,l),l?or.setLocalTransform(l):(or.x=or.y=or.rotation=or.originX=or.originY=0,or.scaleX=or.scaleY=1),or.rotation=ri(or.rotation);var c=i.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var d=c.getComputedTransform();Ge.applyTransform(h,h,d)}var v=h&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:v,seriesModel:n,dataIndex:e,dataType:r,layoutOption:a,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:v&&v.ignore,x:or.x,y:or.y,scaleX:or.scaleX,scaleY:or.scaleY,rotation:or.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:u.position,attachedRot:u.rotation}})},t.prototype.addLabelsOfSeries=function(e){var r=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(_e(i)||Xe(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=je(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},t.prototype.updateLayoutConfig=function(e){var r=e.getWidth(),n=e.getHeight();function i(b,C){return function(){w2(b,C)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,u=s.__hostTarget,l=o.defaultAttr,f=void 0;_e(o.layoutOption)?f=o.layoutOption(BV(o,u)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;u&&u.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:l.attachedPos,rotation:f.rotate!=null?f.rotate*c:l.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=st(f.x,r),s.setStyle("x",0),h=!0):(s.x=l.x,s.setStyle("x",l.style.x)),f.y!=null?(s.y=st(f.y,n),s.setStyle("y",0),h=!0):(s.y=l.y,s.setStyle("y",l.style.y)),f.labelLinePoints){var d=u.getTextGuideLine();d&&(d.setShape({points:f.labelLinePoints}),h=!1)}var v=I0(s);v.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:l.rotation,s.scaleX=l.scaleX,s.scaleY=l.scaleY;for(var g=0;g<O2.length;g++){var p=O2[g];s.setStyle(p,f[p]!=null?f[p]:l.style[p])}if(f.draggable){if(s.draggable=!0,s.cursor="move",u){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(u,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=l.cursor}},t.prototype.layout=function(e){var r=e.getWidth(),n=e.getHeight(),i=S2(this._labelList),a=yt(i,function(u){return u.layoutOption.moveOverlap==="shiftX"}),o=yt(i,function(u){return u.layoutOption.moveOverlap==="shiftY"});OV(a,0,r),A2(o,0,n);var s=yt(i,function(u){return u.layoutOption.hideOverlap});T2(s)},t.prototype.processLabelsOverall=function(){var e=this;N(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,u=o.getTextContent();!s&&u&&(s=I0(u).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},t.prototype._updateLabelLine=function(e,r){var n=e.getTextContent(),i=je(e),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),u={},l=o.getItemVisual(a,"style");if(l){var f=o.getVisual("drawType");u.stroke=l[f]}var c=s.getModel("labelLine");_2(e,x2(s),u),w2(e,c)}},t.prototype._animateLabels=function(e,r){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Uo(e))){var a=I0(n),o=a.oldLayout,s=je(e),u=s.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},f=r.getData(s.dataType);if(o){n.attr(o);var h=e.prevStates;h&&($e(h,"select")>=0&&n.attr(a.oldLayoutSelect),$e(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Mt(n,l,r,u)}else if(n.attr(l),!qo(n).valueAnimation){var c=Be(n.style.opacity,1);n.style.opacity=0,Ut(n,{style:{opacity:c}},r,u)}if(a.oldLayout=l,n.states.select){var d=a.oldLayoutSelect={};fh(d,l,ch),fh(d,n.states.select,ch)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};fh(v,l,ch),fh(v,n.states.emphasis,ch)}Y6(n,u,f,r,r)}if(i&&!i.ignore&&!i.invisible){var a=MV(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Mt(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,Ut(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),N0=ut();function LV(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=N0(r).labelManager;i||(i=N0(r).labelManager=new FV),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=N0(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var RV=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r){if(process.env.NODE_ENV!=="production"){var n=r.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return S0(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(r){var n=new Lt,i=rs("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,u=r.itemHeight*.8,l=rs(s,(r.itemWidth-u)/2,(r.itemHeight-u)/2,u,u,r.itemStyle.fill);n.add(l),l.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return l.rotation=f*Math.PI/180,l.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ln);function k0(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Qo(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Qo(t,e,r[o]));return a.join(" ")}}function P2(t,e){var r=t.mapDimensionsAll("defaultedLabel");if(!ce(e))return e+"";for(var n=[],i=0;i<r.length;i++){var a=t.getDimensionIndex(r[i]);a>=0&&n.push(e[a])}return n.join(" ")}var z0=function(t){fe(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=rs(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=IV,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Qf(this.childAt(0))},e.prototype.downplay=function(){ec(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,u=e.getSymbolSize(r,n),l=o!==this._symbolType,f=a&&a.disableAnimation;if(l){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,u,c)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:u[0]/2,scaleY:u[1]/2};f?h.attr(d):Mt(h,d,s,n),dg(h)}if(this._updateCommon(r,n,u,i,a),l){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Ut(h,d,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),u=r.hostModel,l,f,c,h,d,v,g,p,m;if(a&&(l=a.emphasisItemStyle,f=a.blurItemStyle,c=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,p=a.hoverScale,m=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var y=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=y.getModel("emphasis");l=b.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),v=b.get("disabled"),g=_u(y),p=b.getShallow("scale"),m=y.getShallow("cursor")}var C=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(C||0)*Math.PI/180||0);var w=KS(r.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var D=r.getItemVisual(n,"style"),_=D.fill;if(s instanceof ni){var x=s.style;s.useStyle(ae({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},D))}else s.__isEmptyBrush?s.useStyle(ae({},D)):s.useStyle(D),s.style.decal=null,s.setColor(_,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var S=r.getItemVisual(n,"liftZ"),O=this._z2;S!=null?O==null&&(this._z2=s.z2,s.z2+=S):O!=null&&(s.z2=O,this._z2=null);var E=o&&o.useNameLabel;Du(s,g,{labelFetcher:u,labelDataIndex:n,defaultText:P,inheritColor:_,defaultOpacity:D.opacity});function P(B){return E?r.getName(B):k0(r,B)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var F=s.ensureState("emphasis");F.style=l,s.ensureState("select").style=c,s.ensureState("blur").style=f;var M=p==null||p===!0?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;F.scaleX=this._sizeX*M,F.scaleY=this._sizeY*M,this.setSymbolScale(1),gu(this,h,d,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=je(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var u=a.getTextContent();u&&cc(u,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();cc(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return yz(r.getItemVisual(n,"symbolSize"))},e}(Lt);function IV(t,e){this.parent.drift(t,e)}function j0(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function B2(t){return t!=null&&!Ce(t)&&(t={isIgnore:t}),t||{}}function M2(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:_u(e),cursorStyle:e.get("cursor")}}var NV=function(){function t(e){this.group=new Lt,this._SymbolCtor=e||z0}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=B2(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,u=M2(e),l={disableAnimation:s},f=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var h=f(c);if(j0(e,h,c,r)){var d=new o(e,c,u,l);d.setPosition(h),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,h){var d=a.getItemGraphicEl(h),v=f(c);if(!j0(e,v,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",p=d&&d.getSymbolType&&d.getSymbolType();if(!d||p&&p!==g)n.remove(d),d=new o(e,c,u,l),d.setPosition(v);else{d.updateData(e,c,u,l);var m={x:v[0],y:v[1]};s?d.attr(m):Mt(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var h=a.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=f,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=M2(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=B2(n);function i(u){u.isGroup||(u.incremental=!0,u.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=r.getItemLayout(a);if(j0(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},t.prototype.eachRendered=function(e){gc(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var r=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},t}();function F2(t,e,r){var n=t.getBaseAxis(),i=t.getOtherAxis(n),a=kV(i,r),o=n.dim,s=i.dim,u=e.mapDimension(s),l=e.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=ge(t.dimensions,function(v){return e.mapDimension(v)}),h=!1,d=e.getCalculationInfo("stackResultDimension");return ss(e,c[0])&&(h=!0,c[0]=d),ss(e,c[1])&&(h=!0,c[1]=d),{dataDimsForPoint:c,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:u,baseDim:l,baseDataOffset:f,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function kV(t,e){var r=0,n=t.scale.getExtent();return e==="start"?r=n[0]:e==="end"?r=n[1]:rt(e)&&!isNaN(e)?r=e:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function L2(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function zV(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function jV(t,e,r,n,i,a,o,s){for(var u=zV(t,e),l=[],f=[],c=[],h=[],d=[],v=[],g=[],p=F2(i,e,o),m=t.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b<u.length;b++){var C=u[b],w=!0,D=void 0,_=void 0;switch(C.cmd){case"=":D=C.idx*2,_=C.idx1*2;var x=m[D],S=m[D+1],O=y[_],E=y[_+1];(isNaN(x)||isNaN(S))&&(x=O,S=E),l.push(x,S),f.push(O,E),c.push(r[D],r[D+1]),h.push(n[_],n[_+1]),g.push(e.getRawIndex(C.idx1));break;case"+":var P=C.idx,F=p.dataDimsForPoint,M=i.dataToPoint([e.get(F[0],P),e.get(F[1],P)]);_=P*2,l.push(M[0],M[1]),f.push(y[_],y[_+1]);var B=L2(p,i,e,P);c.push(B[0],B[1]),h.push(n[_],n[_+1]),g.push(e.getRawIndex(P));break;case"-":w=!1}w&&(d.push(C),v.push(v.length))}v.sort(function(G,L){return g[G]-g[L]});for(var R=l.length,V=si(R),k=si(R),W=si(R),I=si(R),q=[],b=0;b<v.length;b++){var Z=v[b],J=b*2,ne=Z*2;V[J]=l[ne],V[J+1]=l[ne+1],k[J]=f[ne],k[J+1]=f[ne+1],W[J]=c[ne],W[J+1]=c[ne+1],I[J]=h[ne],I[J+1]=h[ne+1],q[b]=d[Z]}return{current:V,next:k,stackedOnCurrent:W,stackedOnNext:I,status:q}}var Ni=Math.min,ki=Math.max;function qa(t,e){return isNaN(t)||isNaN(e)}function V0(t,e,r,n,i,a,o,s,u){for(var l,f,c,h,d,v,g=r,p=0;p<n;p++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(qa(m,y)){if(u){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var b=m-l,C=y-f;if(b*b+C*C<.5){g+=a;continue}if(o>0){for(var w=g+a,D=e[w*2],_=e[w*2+1];D===m&&_===y&&p<n;)p++,w+=a,g+=a,D=e[w*2],_=e[w*2+1],m=e[g*2],y=e[g*2+1],b=m-l,C=y-f;var x=p+1;if(u)for(;qa(D,_)&&x<n;)x++,w+=a,D=e[w*2],_=e[w*2+1];var S=.5,O=0,E=0,P=void 0,F=void 0;if(x>=n||qa(D,_))d=m,v=y;else{O=D-l,E=_-f;var M=m-l,B=D-m,R=y-f,V=_-y,k=void 0,W=void 0;if(s==="x"){k=Math.abs(M),W=Math.abs(B);var I=O>0?1:-1;d=m-I*k*o,v=y,P=m+I*W*o,F=y}else if(s==="y"){k=Math.abs(R),W=Math.abs(V);var q=E>0?1:-1;d=m,v=y-q*k*o,P=m,F=y+q*W*o}else k=Math.sqrt(M*M+R*R),W=Math.sqrt(B*B+V*V),S=W/(W+k),d=m-O*o*(1-S),v=y-E*o*(1-S),P=m+O*o*S,F=y+E*o*S,P=Ni(P,ki(D,m)),F=Ni(F,ki(_,y)),P=ki(P,Ni(D,m)),F=ki(F,Ni(_,y)),O=P-m,E=F-y,d=m-O*k/W,v=y-E*k/W,d=Ni(d,ki(l,m)),v=Ni(v,ki(f,y)),d=ki(d,Ni(l,m)),v=ki(v,Ni(f,y)),O=m-d,E=y-v,P=m+O*W/k,F=y+E*W/k}t.bezierCurveTo(c,h,d,v,m,y),c=P,h=F}else t.lineTo(m,y)}l=m,f=y,g+=a}return p}var R2=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),VV=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new R2},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&qa(i[o*2-2],i[o*2-1]);o--);for(;a<o&&qa(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=V0(r,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=ti.CMD,s,u,l=n==="x",f=[],c=0;c<a.length;){var h=a[c++],d=void 0,v=void 0,g=void 0,p=void 0,m=void 0,y=void 0,b=void 0;switch(h){case o.M:s=a[c++],u=a[c++];break;case o.L:if(d=a[c++],v=a[c++],b=l?(r-s)/(d-s):(r-u)/(v-u),b<=1&&b>=0){var C=l?(v-u)*b+u:(d-s)*b+s;return l?[r,C]:[C,r]}s=d,u=v;break;case o.C:d=a[c++],v=a[c++],g=a[c++],p=a[c++],m=a[c++],y=a[c++];var w=l?Df(s,d,g,m,r,f):Df(u,v,p,y,r,f);if(w>0)for(var D=0;D<w;D++){var _=f[D];if(_<=1&&_>=0){var C=l?Pt(u,v,p,y,_):Pt(s,d,g,m,_);return l?[r,C]:[C,r]}}s=m,u=y;break}}},e}(ze),HV=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(R2),WV=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new HV},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,u=n.smoothMonotone;if(n.connectNulls){for(;s>0&&qa(i[s*2-2],i[s*2-1]);s--);for(;o<s&&qa(i[o*2],i[o*2+1]);o++);}for(;o<s;){var l=V0(r,i,o,s,s,1,n.smooth,u,n.connectNulls);V0(r,a,o+l-1,l,s,-1,n.stackedOnSmooth,u,n.connectNulls),o+=l+1,r.closePath()}},e}(ze);function I2(t,e,r,n,i){var a=t.getArea(),o=a.x,s=a.y,u=a.width,l=a.height,f=r.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,u+=f,l+=f,u=Math.ceil(u),o!==Math.floor(o)&&(o=Math.floor(o),u++);var c=new _t({shape:{x:o,y:s,width:u,height:l}});if(e){var h=t.getBaseAxis(),d=h.isHorizontal(),v=h.inverse;d?(v&&(c.shape.x+=u),c.shape.width=0):(v||(c.shape.y+=l),c.shape.height=0);var g=_e(i)?function(p){i(p,c)}:null;Ut(c,{shape:{width:u,height:l,x:o,y:s}},r,null,n,g)}return c}function N2(t,e,r){var n=t.getArea(),i=At(n.r0,1),a=At(n.r,1),o=new Mn({shape:{cx:At(t.cx,1),cy:At(t.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=t.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Ut(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function $V(t,e,r,n,i){if(t){if(t.type==="polar")return N2(t,e,r);if(t.type==="cartesian2d")return I2(t,e,r,n,i)}else return null;return null}function H0(t,e){return t.type===e}function k2(t,e){if(t.length===e.length){for(var r=0;r<t.length;r++)if(t[r]!==e[r])return;return!0}}function z2(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[e,r],[n,i]]}function j2(t,e){var r=z2(t),n=r[0],i=r[1],a=z2(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function V2(t){return rt(t)?t:t?.5:0}function GV(t,e,r){if(!r.valueDim)return[];for(var n=e.count(),i=si(n*2),a=0;a<n;a++){var o=L2(r,t,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function zi(t,e,r,n){var i=e.getBaseAxis(),a=i.dim==="x"||i.dim==="radius"?0:1,o=[],s=0,u=[],l=[],f=[],c=[];if(n){for(s=0;s<t.length;s+=2)!isNaN(t[s])&&!isNaN(t[s+1])&&c.push(t[s],t[s+1]);t=c}for(s=0;s<t.length-2;s+=2)switch(f[0]=t[s+2],f[1]=t[s+3],l[0]=t[s],l[1]=t[s+1],o.push(l[0],l[1]),r){case"end":u[a]=f[a],u[1-a]=l[1-a],o.push(u[0],u[1]);break;case"middle":var h=(l[a]+f[a])/2,d=[];u[a]=d[a]=h,u[1-a]=l[1-a],d[1-a]=f[1-a],o.push(u[0],u[1]),o.push(d[0],d[1]);break;default:u[a]=l[a],u[1-a]=f[1-a],o.push(u[0],u[1])}return o.push(t[s++],t[s++]),o}function UV(t,e){var r=[],n=t.length,i,a;function o(f,c,h){var d=f.coord,v=(h-d)/(c.coord-d),g=H8(v,[f.color,c.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var u=t[s],l=u.coord;if(l<0)i=u;else if(l>e){a?r.push(o(a,u,e)):i&&r.push(o(i,u,0),o(i,u,e));break}else i&&(r.push(o(i,u,0)),i=null),r.push(u),a=u}return r}function qV(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())){if(e.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(i),l=ge(a.stops,function(b){return{coord:u.toGlobalCoord(u.dataToCoord(b.value)),color:b.color}}),f=l.length,c=a.outerColors.slice();f&&l[0].coord>l[f-1].coord&&(l.reverse(),c.reverse());var h=UV(l,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&f)return l[0].coord<0?c[1]?c[1]:l[f-1].color:c[0]?c[0]:l[0].color;var v=10,g=h[0].coord-v,p=h[d-1].coord+v,m=p-g;if(m<.001)return"transparent";N(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:c[0]||"transparent"});var y=new $_(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=p,y}}function YV(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&XV(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(u){var l=a.scale.getRawOrdinalNumber(u.tickValue);s[l]=1}),function(u){return!s.hasOwnProperty(e.get(o,u))}}}}function XV(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(z0.getSymbolSize(e,o)[t.isHorizontal()?1:0]*1.5>n)return!1;return!0}function KV(t,e){return isNaN(t)||isNaN(e)}function ZV(t){for(var e=t.length/2;e>0&&KV(t[e*2-2],t[e*2-1]);e--);return e-1}function H2(t,e){return[t[e*2],t[e*2+1]]}function JV(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,u=-1,l=0;l<n;l++)if(o=t[l*2+i],!(isNaN(o)||isNaN(t[l*2+1-i]))){if(l===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){u=l;break}s=l,a=o}return{range:[s,u],t:(e-a)/(o-a)}}function W2(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<$r.length;e++)if(t.get([$r[e],"endLabel","show"]))return!0;return!1}function W0(t,e,r,n){if(H0(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},u=W2(n)?function(d,v){t._endLabelOnDuring(d,v,o,s,a,i,e)}:null,l=e.getBaseAxis().isHorizontal(),f=I2(e,r,n,function(){var d=t._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},u);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);l?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return u&&u(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),N2(e,r,n)}function QV(t,e){var r=e.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||o}}}var eH=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var r=new Lt,n=new NV;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=this.group,u=r.getData(),l=r.getModel("lineStyle"),f=r.getModel("areaStyle"),c=u.getLayout("points")||[],h=o.type==="polar",d=this._coordSys,v=this._symbolDraw,g=this._polyline,p=this._polygon,m=this._lineGroup,y=!n.ssr&&r.get("animation"),b=!f.isEmpty(),C=f.get("origin"),w=F2(o,u,C),D=b&&GV(o,u,w),_=r.get("showSymbol"),x=r.get("connectNulls"),S=_&&!h&&YV(r,u,o),O=this._data;O&&O.eachItemGraphicEl(function(L,Y){L.__temp&&(s.remove(L),O.setItemGraphicEl(Y,null))}),_||v.remove(),s.add(m);var E=h?!1:r.get("step"),P;o&&o.getArea&&r.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var F=qV(u,o,i)||u.getVisual("style")[u.getVisual("drawType")];if(!(g&&d.type===o.type&&E===this._step))_&&v.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),y&&this._initSymbolLabelAnimation(u,o,P),E&&(c=zi(c,o,E,x),D&&(D=zi(D,o,E,x))),g=this._newPolyline(c),b?p=this._newPolygon(c,D):p&&(m.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ia(F)),m.setClipPath(W0(this,o,!0,r));else{b&&!p?p=this._newPolygon(c,D):p&&!b&&(m.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(r,o,Ia(F));var M=m.getClipPath();if(M){var B=W0(this,o,!1,r);Ut(M,{shape:B.shape},r)}else m.setClipPath(W0(this,o,!0,r));_&&v.updateData(u,{isIgnore:S,clipShape:P,disableAnimation:!0,getSymbolPoint:function(L){return[c[L*2],c[L*2+1]]}}),(!k2(this._stackedOnPoints,D)||!k2(this._points,c))&&(y?this._doUpdateAnimation(u,D,o,i,E,C,x):(E&&(c=zi(c,o,E,x),D&&(D=zi(D,o,E,x))),g.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:D})))}var R=r.getModel("emphasis"),V=R.get("focus"),k=R.get("blurScope"),W=R.get("disabled");if(g.useStyle(ke(l.getLineStyle(),{fill:"none",stroke:F,lineJoin:"bevel"})),tc(g,r,"lineStyle"),g.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var I=g.getState("emphasis").style;I.lineWidth=+g.style.lineWidth+1}je(g).seriesIndex=r.seriesIndex,gu(g,V,k,W);var q=V2(r.get("smooth")),Z=r.get("smoothMonotone");if(g.setShape({smooth:q,smoothMonotone:Z,connectNulls:x}),p){var J=u.getCalculationInfo("stackedOnSeries"),ne=0;p.useStyle(ke(f.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),J&&(ne=V2(J.get("smooth"))),p.setShape({smooth:q,stackedOnSmooth:ne,smoothMonotone:Z,connectNulls:x}),tc(p,r,"areaStyle"),je(p).seriesIndex=r.seriesIndex,gu(p,V,k,W)}var G=function(L){a._changePolyState(L)};u.eachItemGraphicEl(function(L){L&&(L.onHoverStateChange=G)}),this._polyline.onHoverStateChange=G,this._data=u,this._coordSys=o,this._stackedOnPoints=D,this._points=c,this._step=E,this._valueOrigin=C,r.get("triggerLineEvent")&&(this.packEventData(r,g),p&&this.packEventData(r,p))},e.prototype.packEventData=function(r,n){je(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=wa(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var u=o.getLayout("points"),l=o.getItemGraphicEl(s);if(!l){var f=u[s*2],c=u[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=r.get("zlevel")||0,d=r.get("z")||0;l=new z0(o,s),l.x=f,l.y=c,l.setZ(h,d);var v=l.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),l.__temp=!0,o.setItemGraphicEl(s,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else Kr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=wa(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var u=o.getItemGraphicEl(s);u&&(u.__temp?(o.setItemGraphicEl(s,null),this.group.remove(u)):u.downplay())}else Kr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;b_(this._polyline,r),n&&b_(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new VV({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new WV({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),u=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var l=r.hostModel,f=l.get("animationDuration");_e(f)&&(f=f(null));var c=l.get("animationDelay")||0,h=_e(c)?c(null):c;r.eachItemGraphicEl(function(d,v){var g=d;if(g){var p=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var C=i,w=n.pointToCoord(p);a?(m=C.startAngle,y=C.endAngle,b=-w[1]/180*Math.PI):(m=C.r0,y=C.r,b=w[0])}else{var D=i;a?(m=D.x,y=D.x+D.width,b=d.x):(m=D.y+D.height,y=D.y,b=d.y)}var _=y===m?0:(b-m)/(y-m);u&&(_=1-_);var x=_e(c)?c(v):f*_+h,S=g.getSymbolPath(),O=S.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:x}),S.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(W2(r)){var o=r.getData(),s=this._polyline,u=o.getLayout("points");if(!u){s.removeTextContent(),this._endLabel=null;return}var l=this._endLabel;l||(l=this._endLabel=new Tt({z2:200}),l.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=ZV(u);f>=0&&(Du(s,_u(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:f,defaultText:function(c,h,d){return d!=null?P2(o,d):k0(o,c)},enableTextSetter:!0},QV(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,u){var l=this._endLabel,f=this._polyline;if(l){r<1&&a.originalX==null&&(a.originalX=l.x,a.originalY=l.y);var c=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),g=s.get("distance")||0,p=u.getBaseAxis(),m=p.isHorizontal(),y=p.inverse,b=n.shape,C=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,w=(m?g:0)*(y?-1:1),D=(m?0:-g)*(y?-1:1),_=m?"x":"y",x=JV(c,C,_),S=x.range,O=S[1]-S[0],E=void 0;if(O>=1){if(O>1&&!d){var P=H2(c,S[0]);l.attr({x:P[0]+w,y:P[1]+D}),o&&(E=h.getRawValue(S[0]))}else{var P=f.getPointOn(C,_);P&&l.attr({x:P[0]+w,y:P[1]+D});var F=h.getRawValue(S[0]),M=h.getRawValue(S[1]);o&&(E=ND(i,v,F,M,x.t))}a.lastFrameIndex=S[0]}else{var B=r===1||a.lastFrameIndex>0?S[0]:0,P=H2(c,B);o&&(E=h.getRawValue(B)),l.attr({x:P[0]+w,y:P[1]+D})}if(o){var R=qo(l);typeof R.setLabelText=="function"&&R.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,u){var l=this._polyline,f=this._polygon,c=r.hostModel,h=jV(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,g=h.next,p=h.stackedOnNext;if(o&&(d=zi(h.current,i,o,u),v=zi(h.stackedOnCurrent,i,o,u),g=zi(h.next,i,o,u),p=zi(h.stackedOnNext,i,o,u)),j2(d,g)>3e3||f&&j2(v,p)>3e3){l.stopAnimation(),l.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:p}));return}l.shape.__points=h.current,l.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),l.stopAnimation(),Mt(l,m,c),f&&(f.setShape({points:d,stackedOnPoints:v}),f.stopAnimation(),Mt(f,{shape:{stackedOnPoints:p}},c),l.shape.points!==f.shape.points&&(f.shape.points=l.shape.points));for(var y=[],b=h.status,C=0;C<b.length;C++){var w=b[C].cmd;if(w==="="){var D=r.getItemGraphicEl(b[C].idx1);D&&y.push({el:D,ptIdx:C})}}l.animators&&l.animators.length&&l.animators[0].during(function(){f&&f.dirtyShape();for(var _=l.shape.__points,x=0;x<y.length;x++){var S=y[x].el,O=y[x].ptIdx*2;S.x=_[O],S.y=_[O+1],S.markRedraw()}})},e.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(Kr);function tH(t,e){return{seriesType:t,plan:Zg(),reset:function(r){var n=r.getData(),i=r.coordinateSystem;if(r.pipelineContext,!!i){var a=ge(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),o=a.length,s=n.getCalculationInfo("stackResultDimension");ss(n,a[0])&&(a[0]=s),ss(n,a[1])&&(a[1]=s);var u=n.getStore(),l=n.getDimensionIndex(a[0]),f=n.getDimensionIndex(a[1]);return o&&{progress:function(c,h){for(var d=c.end-c.start,v=si(d*o),g=[],p=[],m=c.start,y=0;m<c.end;m++){var b=void 0;if(o===1){var C=u.get(l,m);b=i.dataToPoint(C,null,p)}else g[0]=u.get(l,m),g[1]=u.get(f,m),b=i.dataToPoint(g,null,p);v[y++]=b[0],v[y++]=b[1]}h.setLayout("points",v)}}}}}}var rH={average:function(t){for(var e=0,r=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],r++);return r===0?NaN:e/r},sum:function(t){for(var e=0,r=0;r<t.length;r++)e+=t[r]||0;return e},max:function(t){for(var e=-1/0,r=0;r<t.length;r++)t[r]>e&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r<t.length;r++)t[r]<e&&(e=t[r]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,r=-1/0,n=0;n<t.length;n++){var i=t[n],a=Math.abs(i);a>e&&(e=a,r=i)}return isFinite(r)?r:NaN},nearest:function(t){return t[0]}},nH=function(t){return Math.round(t.length/2)};function $2(t){return{seriesType:t,reset:function(e,r,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var u=o.getBaseAxis(),l=o.getOtherAxis(u),f=u.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var v=void 0;me(a)?v=rH[a]:_e(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(l.dim),1/d,v,nH))}}}}}function iH(t){t.registerChartView(eH),t.registerSeriesModel(RV),t.registerLayout(tH("line")),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,$2("line"))}var $0=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return S0(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var v=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),p=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(p+=1),v.length<2)return;if(v.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,C=1,w=0;w<v.length;w++){var D=v[w].coord,_=w===v.length-1?v[w-1].tickValue+C:v[w].tickValue;if(_===p){b=D;break}else if(_<p)y=D;else if(y!=null&&_>p){b=(D+y)/2;break}w===1&&(C=_-v[0].tickValue)}b==null&&(y?y&&(b=v[v.length-1].coord):b=v[0].coord),s[d]=h.toGlobalCoord(b)}});else{var u=this.getData(),l=u.getLayout("offset"),f=u.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=l+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(ln);ln.registerClass($0);var aH=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return S0(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=lx($0.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}($0),oH=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),G2=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new oH},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),u=(s-o)*.5,l=o+u,f=n.startAngle,c=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?c-f<d:f-c<d;v||(f=c-(h?d:-d));var g=Math.cos(f),p=Math.sin(f),m=Math.cos(c),y=Math.sin(c);v?(r.moveTo(g*o+i,p*o+a),r.arc(g*l+i,p*l+a,u,-Math.PI+f,f,!h)):r.moveTo(g*s+i,p*s+a),r.arc(i,a,s,f,c,!h),r.arc(m*l+i,y*l+a,u,c-Math.PI*2,c-Math.PI,!h),o!==0&&r.arc(i,a,o,c,f,h)},e}(ze);function sH(t,e){e=e||{};var r=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Rf(n,i,a);var s=t(o),u=i.distance!=null?i.distance:5,l=this.shape,f=l.cx,c=l.cy,h=l.r,d=l.r0,v=(h+d)/2,g=l.startAngle,p=l.endAngle,m=(g+p)/2,y=r?Math.abs(h-d)/2:0,b=Math.cos,C=Math.sin,w=f+h*b(g),D=c+h*C(g),_="left",x="top";switch(s){case"startArc":w=f+(d-u)*b(m),D=c+(d-u)*C(m),_="center",x="top";break;case"insideStartArc":w=f+(d+u)*b(m),D=c+(d+u)*C(m),_="center",x="bottom";break;case"startAngle":w=f+v*b(g)+hh(g,u+y,!1),D=c+v*C(g)+dh(g,u+y,!1),_="right",x="middle";break;case"insideStartAngle":w=f+v*b(g)+hh(g,-u+y,!1),D=c+v*C(g)+dh(g,-u+y,!1),_="left",x="middle";break;case"middle":w=f+v*b(m),D=c+v*C(m),_="center",x="middle";break;case"endArc":w=f+(h+u)*b(m),D=c+(h+u)*C(m),_="center",x="bottom";break;case"insideEndArc":w=f+(h-u)*b(m),D=c+(h-u)*C(m),_="center",x="top";break;case"endAngle":w=f+v*b(p)+hh(p,u+y,!0),D=c+v*C(p)+dh(p,u+y,!0),_="left",x="middle";break;case"insideEndAngle":w=f+v*b(p)+hh(p,-u+y,!0),D=c+v*C(p)+dh(p,-u+y,!0),_="right",x="middle";break;default:return Rf(n,i,a)}return n=n||{},n.x=w,n.y=D,n.align=_,n.verticalAlign=x,n}}function uH(t,e,r,n){if(rt(n)){t.setTextConfig({rotation:n});return}else if(ce(e)){t.setTextConfig({rotation:0});return}var i=t.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,u,l=r(e);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":u=s;break;case"startAngle":case"insideStartAngle":u=a;break;case"endAngle":case"insideEndAngle":u=o;break;default:t.setTextConfig({rotation:0});return}var f=Math.PI*1.5-u;l==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),t.setTextConfig({rotation:f})}function hh(t,e,r){return e*Math.sin(t)*(r?-1:1)}function dh(t,e,r){return e*Math.cos(t)*(r?1:-1)}function Zu(t,e,r){var n=t.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;ce(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:ge(n,function(a){return xi(a,i)})}}var G0=Math.max,U0=Math.min;function lH(t,e){var r=t.getArea&&t.getArea();if(H0(t,"cartesian2d")){var n=t.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var fH=function(t){fe(e,t);function e(){var r=t.call(this)||this;return r.type=e.type,r._isFirstFrame=!0,r}return e.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a)):process.env.NODE_ENV!=="production"&&Dt("Only cartesian2d and polar supported for bar.")},e.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},e.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},e.prototype.eachRendered=function(r){gc(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r,n,i,a){var o=this.group,s=r.getData(),u=this._data,l=r.coordinateSystem,f=l.getBaseAxis(),c;l.type==="cartesian2d"?c=f.isHorizontal():l.type==="polar"&&(c=f.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=cH(r,l);d&&this._enableRealtimeSort(d,s,i);var v=r.get("clip",!0)||d,g=lH(l,s);o.removeClipPath();var p=r.get("roundCap",!0),m=r.get("showBackground",!0),y=r.getModel("backgroundStyle"),b=y.get("borderRadius")||0,C=[],w=this._backgroundEls,D=a&&a.isInitSort,_=a&&a.type==="changeAxisOrder";function x(E){var P=vh[l.type](s,E),F=yH(l,c,P);return F.useStyle(y.getItemStyle()),l.type==="cartesian2d"?F.setShape("r",b):F.setShape("cornerRadius",b),C[E]=F,F}s.diff(u).add(function(E){var P=s.getItemModel(E),F=vh[l.type](s,E,P);if(m&&x(E),!(!s.hasValue(E)||!K2[l.type](F))){var M=!1;v&&(M=U2[l.type](g,F));var B=q2[l.type](r,s,E,F,c,h,f.model,!1,p);d&&(B.forceLabelAnimation=!0),J2(B,s,E,P,F,r,c,l.type==="polar"),D?B.attr({shape:F}):d?Y2(d,h,B,F,E,c,!1,!1):Ut(B,{shape:F},r,E),s.setItemGraphicEl(E,B),o.add(B),B.ignore=M}}).update(function(E,P){var F=s.getItemModel(E),M=vh[l.type](s,E,F);if(m){var B=void 0;w.length===0?B=x(P):(B=w[P],B.useStyle(y.getItemStyle()),l.type==="cartesian2d"?B.setShape("r",b):B.setShape("cornerRadius",b),C[E]=B);var R=vh[l.type](s,E),V=rA(c,R,l);Mt(B,{shape:V},h,E)}var k=u.getItemGraphicEl(P);if(!s.hasValue(E)||!K2[l.type](M)){o.remove(k);return}var W=!1;if(v&&(W=U2[l.type](g,M),W&&o.remove(k)),k?dg(k):k=q2[l.type](r,s,E,M,c,h,f.model,!!k,p),d&&(k.forceLabelAnimation=!0),_){var I=k.getTextContent();if(I){var q=qo(I);q.prevValue!=null&&(q.prevValue=q.value)}}else J2(k,s,E,F,M,r,c,l.type==="polar");D?k.attr({shape:M}):d?Y2(d,h,k,M,E,c,!0,_):Mt(k,{shape:M},r,E,null),s.setItemGraphicEl(E,k),k.ignore=W,o.add(k)}).remove(function(E){var P=u.getItemGraphicEl(E);P&&hc(P,r,E)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Lt);S.removeAll();for(var O=0;O<C.length;++O)S.add(C[O]);o.add(S),this._backgroundEls=C,this._data=s},e.prototype._renderLarge=function(r,n,i){this._clear(),eA(r,this.group),this._updateLargeClip(r)},e.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),eA(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&$V(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(u){var l=n.getItemGraphicEl(u),f=l&&l.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var u=i(s);u=u??NaN,a.push({dataIndex:s,mappedValue:u,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:ge(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,u=0,l=a.getOrdinalMeta().categories.length;u<l;++u){var f=r.rawIndexOf(o,a.getRawOrdinalNumber(u)),c=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){hc(a,r,je(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Kr),U2={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=G0(e.x,t.x),s=U0(e.x+e.width,i),u=G0(e.y,t.y),l=U0(e.y+e.height,a),f=s<o,c=l<u;return e.x=f&&o>i?s:o,e.y=c&&u>a?l:u,e.width=f?0:s-o,e.height=c?0:l-u,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=U0(e.r,t.r),a=G0(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},q2={cartesian2d:function(t,e,r,n,i,a,o,s,u){var l=new _t({shape:ae({},n),z2:1});if(l.__dataIndex=r,l.name="item",a){var f=l.shape,c=i?"height":"width";f[c]=0}return l},polar:function(t,e,r,n,i,a,o,s,u){var l=!i&&u?G2:Mn,f=new l({shape:n,z2:1});f.name="item";var c=Z2(i);if(f.calculateTextPosition=sH(c,{isRoundCap:l===G2}),a){var h=f.shape,d=i?"r":"endAngle",v={};h[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?Mt:Ut)(f,{shape:v},a)}return f}};function cH(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(process.env.NODE_ENV!=="production"&&r&&(n.type!=="category"&&Dt("`realtimeSort` will not work because this bar series is not based on a category axis."),e.type!=="cartesian2d"&&Dt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function Y2(t,e,r,n,i,a,o,s){var u,l;a?(l={x:n.x,width:n.width},u={y:n.y,height:n.height}):(l={y:n.y,height:n.height},u={x:n.x,width:n.width}),s||(o?Mt:Ut)(r,{shape:u},e,i,null);var f=e?t.baseAxis.model:null;(o?Mt:Ut)(r,{shape:l},f,i)}function X2(t,e){for(var r=0;r<e.length;r++)if(!isFinite(t[e[r]]))return!0;return!1}var hH=["x","y","width","height"],dH=["cx","cy","r","startAngle","endAngle"],K2={cartesian2d:function(t){return!X2(t,hH)},polar:function(t){return!X2(t,dH)}},vh={cartesian2d:function(t,e,r){var n=t.getItemLayout(e),i=r?pH(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function vH(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function Z2(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function J2(t,e,r,n,i,a,o,s){var u=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var f=t.shape,c=Zu(n.getModel("itemStyle"),f,!0);ae(f,c),t.setShape(f)}}else{var l=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",l)}t.useStyle(u);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=_u(n);Du(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:k0(a.getData(),r),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var p=n.get(["label","position"]);t.textConfig.inside=p==="middle"?!0:null,uH(t,p==="outside"?d:p,Z2(o),n.get(["label","rotate"]))}q6(g,v,a.getRawValue(r),function(y){return P2(e,y)});var m=n.getModel(["emphasis"]);gu(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),tc(t,n),vH(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function pH(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var gH=function(){function t(){}return t}(),Q2=function(t){fe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new gH},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],u=[],l=this.barWidth,f=0;f<i.length;f+=3)u[a]=l,u[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],r.rect(s[0],s[1],u[0],u[1])},e}(ze);function eA(t,e,r,n){var i=t.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=t.getModel("backgroundStyle"),l=i.getLayout("largeBackgroundPoints");if(l){var f=new Q2({shape:{points:l},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(u.getItemStyle()),e.add(f),r&&r.push(f)}var c=new Q2({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,e.add(c),c.useStyle(i.getVisual("style")),je(c).seriesIndex=t.seriesIndex,t.get("silent")||(c.on("mousedown",tA),c.on("mousemove",tA)),r&&r.push(c)}var tA=Jg(function(t){var e=this,r=mH(e,t.offsetX,t.offsetY);je(e).dataIndex=r>=0?r:null},30,!1);function mH(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],u=[],l=t.barWidth,f=0,c=a.length/3;f<c;f++){var h=f*3;if(u[n]=l,u[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),e>=s[0]&&e<=s[0]+u[0]&&r>=s[1]&&r<=s[1]+u[1])return o[f]}return-1}function rA(t,e,r){if(H0(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function yH(t,e,r){var n=t.type==="polar"?Mn:_t;return new n({shape:rA(e,r,t),silent:!0,z2:0})}function bH(t){t.registerChartView(fH),t.registerSeriesModel(aH),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,wt(jj,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Vj("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,$2("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var nA=Math.PI*2,ph=Math.PI/180;function iA(t,e){return Na(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function aA(t,e){var r=iA(t,e),n=t.get("center"),i=t.get("radius");ce(i)||(i=[0,i]);var a=st(r.width,e.getWidth()),o=st(r.height,e.getHeight()),s=Math.min(a,o),u=st(i[0],s/2),l=st(i[1],s/2),f,c,h=t.coordinateSystem;if(h){var d=h.dataToPoint(n);f=d[0]||0,c=d[1]||0}else ce(n)||(n=[n,n]),f=st(n[0],a)+r.x,c=st(n[1],o)+r.y;return{cx:f,cy:c,r0:u,r:l}}function CH(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=iA(n,r),s=aA(n,r),u=s.cx,l=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*ph,d=n.get("endAngle"),v=n.get("padAngle")*ph;d=d==="auto"?h-nA:-d*ph;var g=n.get("minAngle")*ph,p=g+v,m=0;i.each(a,function(V){!isNaN(V)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,C=n.get("clockwise"),w=n.get("roseType"),D=n.get("stillShowZeroSum"),_=i.getDataExtent(a);_[0]=0;var x=C?1:-1,S=[h,d],O=x*v/2;ZD(S,!C),h=S[0],d=S[1];var E=oA(n);E.startAngle=h,E.endAngle=d,E.clockwise=C;var P=Math.abs(d-h),F=P,M=0,B=h;if(i.setLayout({viewRect:o,r:f}),i.each(a,function(V,k){var W;if(isNaN(V)){i.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:u,cy:l,r0:c,r:w?NaN:f});return}w!=="area"?W=y===0&&D?b:V*b:W=P/m,W<p?(W=p,F-=p):M+=V;var I=B+x*W,q=0,Z=0;v>W?(q=B+x*W/2,Z=q):(q=B+O,Z=I-O),i.setItemLayout(k,{angle:W,startAngle:q,endAngle:Z,clockwise:C,cx:u,cy:l,r0:c,r:w?Tp(V,_,[c,f]):f}),B=I}),F<nA&&m)if(F<=.001){var R=P/m;i.each(a,function(V,k){if(!isNaN(V)){var W=i.getItemLayout(k);W.angle=R;var I=0,q=0;R<v?(I=h+x*(k+1/2)*R,q=I):(I=h+x*k*R+O,q=h+x*(k+1)*R-O),W.startAngle=I,W.endAngle=q}})}else b=F/M,B=h,i.each(a,function(V,k){if(!isNaN(V)){var W=i.getItemLayout(k),I=W.angle===p?p:V*b,q=0,Z=0;I<v?(q=B+x*I/2,Z=q):(q=B+O,Z=B+x*I-O),W.startAngle=q,W.endAngle=Z,B+=x*I}})})}var oA=ut();function wH(t){return{seriesType:t,reset:function(e,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var DH=Math.PI/180;function sA(t,e,r,n,i,a,o,s,u,l){if(t.length<2)return;function f(g){for(var p=g.rB,m=p*p,y=0;y<g.list.length;y++){var b=g.list[y],C=Math.abs(b.label.y-r),w=n+b.len,D=w*w,_=Math.sqrt((1-Math.abs(C*C/m))*D),x=e+(_+b.len2)*i,S=x-b.label.x,O=b.targetTextWidth-S*i;uA(b,O,!0),b.label.x=x}}function c(g){for(var p={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var b=g[y],C=b.label.y>r?m:p,w=Math.abs(b.label.y-r);if(w>=C.maxY){var D=b.label.x-e-b.len2*i,_=n+b.len,x=Math.abs(D)<_?Math.sqrt(w*w/(1-D*D/_/_)):_;C.rB=x,C.maxY=w}C.list.push(b)}f(p),f(m)}for(var h=t.length,d=0;d<h;d++)if(t[d].position==="outer"&&t[d].labelAlignTo==="labelLine"){var v=t[d].label.x-l;t[d].linePoints[1][0]+=v,t[d].label.x=l}A2(t,u,u+o)&&c(t)}function _H(t,e,r,n,i,a,o,s){for(var u=[],l=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<t.length;h++){var d=t[h].label;q0(t[h])||(d.x<e?(f=Math.min(f,d.x),u.push(t[h])):(c=Math.max(c,d.x),l.push(t[h])))}for(var h=0;h<t.length;h++){var v=t[h];if(!q0(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var d=v.label,g=v.linePoints,p=void 0;v.labelAlignTo==="edge"?d.x<e?p=g[2][0]-v.labelDistance-o-v.edgeDistance:p=o+i-v.edgeDistance-g[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?d.x<e?p=f-o-v.bleedMargin:p=o+i-c-v.bleedMargin:d.x<e?p=d.x-o-v.bleedMargin:p=o+i-d.x-v.bleedMargin,v.targetTextWidth=p,uA(v,p)}}sA(l,e,r,n,1,i,a,o,s,c),sA(u,e,r,n,-1,i,a,o,s,f);for(var h=0;h<t.length;h++){var v=t[h];if(!q0(v)&&v.linePoints){var d=v.label,g=v.linePoints,m=v.labelAlignTo==="edge",y=d.style.padding,b=y?y[1]+y[3]:0,C=d.style.backgroundColor?0:b,w=v.rect.width+C,D=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+v.edgeDistance+w+v.labelDistance:g[2][0]=o+i-v.edgeDistance-w-v.labelDistance:(d.x<e?g[2][0]=d.x+v.labelDistance:g[2][0]=d.x-v.labelDistance,g[1][0]=g[2][0]+D),g[1][1]=g[2][1]=d.y}}}function uA(t,e,r){if(r===void 0&&(r=!1),t.labelStyleWidth==null){var n=t.label,i=n.style,a=t.rect,o=i.backgroundColor,s=i.padding,u=s?s[1]+s[3]:0,l=i.overflow,f=a.width+(o?0:u);if(e<f||r){var c=a.height;if(l&&l.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-u);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var d=e-u,v=e<f?d:r?d>t.unconstrainedWidth?null:d:null;n.setStyle("width",v)}var g=n.getBoundingRect();a.width=g.width;var p=(n.style.margin||0)+2.1;a.height=g.height+p,a.y-=(a.height-c)/2}}}function q0(t){return t.position==="center"}function xH(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*DH,s=e.getLayout("viewRect"),u=e.getLayout("r"),l=s.width,f=s.x,c=s.y,h=s.height;function d(D){D.ignore=!0}function v(D){if(!D.ignore)return!0;for(var _ in D.states)if(D.states[_].ignore===!1)return!0;return!1}e.each(function(D){var _=e.getItemGraphicEl(D),x=_.shape,S=_.getTextContent(),O=_.getTextGuideLine(),E=e.getItemModel(D),P=E.getModel("label"),F=P.get("position")||E.get(["emphasis","label","position"]),M=P.get("distanceToLabelLine"),B=P.get("alignTo"),R=st(P.get("edgeDistance"),l),V=P.get("bleedMargin"),k=E.getModel("labelLine"),W=k.get("length");W=st(W,l);var I=k.get("length2");if(I=st(I,l),Math.abs(x.endAngle-x.startAngle)<o){N(S.states,d),S.ignore=!0,O&&(N(O.states,d),O.ignore=!0);return}if(v(S)){var q=(x.startAngle+x.endAngle)/2,Z=Math.cos(q),J=Math.sin(q),ne,G,L,Y;n=x.cx,i=x.cy;var j=F==="inside"||F==="inner";if(F==="center")ne=x.cx,G=x.cy,Y="center";else{var U=(j?(x.r+x.r0)/2*Z:x.r*Z)+n,Q=(j?(x.r+x.r0)/2*J:x.r*J)+i;if(ne=U+Z*3,G=Q+J*3,!j){var K=U+Z*(W+u-x.r),X=Q+J*(W+u-x.r),le=K+(Z<0?-1:1)*I,se=X;B==="edge"?ne=Z<0?f+R:f+l-R:ne=le+(Z<0?-M:M),G=se,L=[[U,Q],[K,X],[le,se]]}Y=j?"center":B==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var ye=Math.PI,pe=0,Le=P.get("rotate");if(rt(Le))pe=Le*(ye/180);else if(F==="center")pe=0;else if(Le==="radial"||Le===!0){var be=Z<0?-q+ye:-q;pe=be}else if(Le==="tangential"&&F!=="outside"&&F!=="outer"){var De=Math.atan2(Z,J);De<0&&(De=ye*2+De);var it=J>0;it&&(De=ye+De),pe=De-ye}if(a=!!pe,S.x=ne,S.y=G,S.rotation=pe,S.setStyle({verticalAlign:"middle"}),j){S.setStyle({align:Y});var lt=S.states.select;lt&&(lt.x+=S.x,lt.y+=S.y)}else{var St=S.getBoundingRect().clone();St.applyTransform(S.getComputedTransform());var Ve=(S.style.margin||0)+2.1;St.y-=Ve/2,St.height+=Ve,r.push({label:S,labelLine:O,position:F,len:W,len2:I,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new we(Z,J),linePoints:L,textAlign:Y,labelDistance:M,labelAlignTo:B,edgeDistance:R,bleedMargin:V,rect:St,unconstrainedWidth:St.width,labelStyleWidth:S.style.width})}_.setTextConfig({inside:j})}}),!a&&t.get("avoidLabelOverlap")&&_H(r,n,i,u,l,h,f,c);for(var g=0;g<r.length;g++){var p=r[g],m=p.label,y=p.labelLine,b=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:p.textAlign}),b&&(N(m.states,d),m.ignore=!0);var C=m.states.select;C&&(C.x+=m.x,C.y+=m.y)}if(y){var w=p.linePoints;b||!w?(N(y.states,d),y.ignore=!0):(D2(w,p.minTurnAngle),AV(w,p.surfaceNormal,p.maxSurfaceAngle),y.setShape({points:w}),m.__hostTarget.textGuideLineConfig={anchor:new we(w[0][0],w[0][1])})}}}var SH=function(t){fe(e,t);function e(r,n,i){var a=t.call(this)||this;a.z2=2;var o=new Tt;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,u=r.getItemModel(n),l=u.getModel("emphasis"),f=r.getItemLayout(n),c=ae(Zu(u.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(a){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(Ut(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,Ut(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Ut(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Mt(o,{shape:{endAngle:f.endAngle}},s,n))}else dg(o),Mt(o,{shape:c},s,n);o.useStyle(r.getItemVisual(n,"style")),tc(o,u);var d=(f.startAngle+f.endAngle)/2,v=s.get("selectedOffset"),g=Math.cos(d)*v,p=Math.sin(d)*v,m=u.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=ae({r:f.r+(l.get("scale")&&l.get("scaleSize")||0)},Zu(l.getModel("itemStyle"),f)),ae(o.ensureState("select"),{x:g,y:p,shape:Zu(u.getModel(["select","itemStyle"]),f)}),ae(o.ensureState("blur"),{shape:Zu(u.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),b=o.getTextContent();y&&ae(y.ensureState("select"),{x:g,y:p}),ae(b.ensureState("select"),{x:g,y:p}),gu(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),u=n.getItemVisual(i,"style"),l=u&&u.fill,f=u&&u.opacity;Du(a,_u(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:l,defaultOpacity:f,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var c=a.getTextContent();a.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=r.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Cu,this.setTextGuideLine(d)),_2(this,x2(o),{stroke:l,opacity:va(s.get(["lineStyle","opacity"]),f,1)})}},e}(Mn),EH=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,u=this.group,l;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(l=f.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=oA(r),d=new Mn({shape:ae(aA(r,i),h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}o.diff(s).add(function(v){var g=new SH(o,v,l);o.setItemGraphicEl(v,g),u.add(g)}).update(function(v,g){var p=s.getItemGraphicEl(g);p.updateData(o,v,l),p.off("click"),u.add(p),o.setItemGraphicEl(v,p)}).remove(function(v){var g=s.getItemGraphicEl(v);hc(g,r,v)}).execute(),xH(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,u=Math.sqrt(o*o+s*s);return u<=a.r&&u>=a.r0}},e.type="pie",e}(Kr);function AH(t,e,r){e=ce(e)&&{coordDimensions:e}||ae({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=XE(n,e).dimensions,a=new YE(i,t);return a.initData(n,r),a}var TH=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),OH=ut(),PH=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new TH(ht(this.getData,this),ht(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return AH(this,{coordDimensions:["value"],encodeDefaulter:wt(C9,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=OH(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(u){o.push(u)}),a=i.seats=yN(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Pp(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ln);function BH(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(rt(o)&&!isNaN(o)&&o<0)})}}}function MH(t){t.registerChartView(EH),t.registerSeriesModel(PH),az("pie",t.registerAction),t.registerLayout(wt(CH,"pie")),t.registerProcessor(wH("pie")),t.registerProcessor(BH("pie"))}var FH=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Ke),Y0=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",on).models[0]},e.type="cartesian2dAxis",e}(Ke);wn(Y0,fV);var lA={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},LH=Je({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},lA),X0=Je({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},lA),RH=Je({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},X0),IH=ke({logBase:10},X0);const NH={category:LH,value:X0,time:RH,log:IH};var kH={value:1,category:1,time:1,log:1};function fA(t,e,r,n){N(kH,function(i,a){var o=Je(Je({},NH[a],!0),n,!0),s=function(u){fe(l,u);function l(){var f=u!==null&&u.apply(this,arguments)||this;return f.type=e+"Axis."+a,f}return l.prototype.mergeDefaultAndTheme=function(f,c){var h=Tu(this),d=h?Pc(f):{},v=c.getTheme();Je(f,v.get(a+"Axis")),Je(f,this.getDefaultOption()),f.type=cA(f),h&&ka(f,d,h)},l.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=E0.createByAxisModel(this))},l.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},l.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},l.type=e+"Axis."+a,l.defaultOption=o,l}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",cA)}function cA(t){return t.type||(t.data?"category":"value")}var zH=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return ge(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),yt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),K0=["x","y"];function hA(t){return t.type==="interval"||t.type==="time"}var jH=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=K0,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!hA(r)||!hA(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),u=i[1]-i[0],l=a[1]-a[0];if(!(!u||!l)){var f=(s[0]-o[0])/u,c=(s[1]-o[1])/l,h=o[0]-i[0]*f,d=o[1]-a[0]*c,v=this._transform=[f,0,0,c,h,d];this._invTransform=vf([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ge(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return zr(i,r,this._transform);var s=this.getAxis("x"),u=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=u.toGlobalCoord(u.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),u=i.parse(r[0]),l=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return zr(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,u=Math.max(i[0],i[1])-o+r;return new Ge(a,o,s,u)},e}(zH),VH=function(t){fe(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(CV);function Z0(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,u=o?"onZero":s,l=i.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,v=l==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));v[h.onZero]=Math.max(Math.min(g,v[1]),v[0])}a.position=[l==="y"?v[h[u]]:c[0],l==="x"?v[h[u]]:c[3]],a.rotation=Math.PI/2*(l==="x"?0:1);var p={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=p[s],a.labelOffset=o?v[h[s]]-v[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),da(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=u==="top"?-m:m,a.z2=1,a}function dA(t){return t.get("coordinateSystem")==="cartesian2d"}function vA(t){var e={xAxisModel:null,yAxisModel:null};return N(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,on).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+va(t.get(i+"Index"),t.get(i+"Id"),0)+'" not found');e[n]=a}),e}var J0=Math.log;function HH(t,e,r){var n=us.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),u=s2(t,e),l=u.extent,f=u.fixMin,c=u.fixMax;if(t.type==="log"){var h=J0(t.base);l=[J0(l[0])/h,J0(l[1])/h]}t.setExtent(l[0],l[1]),t.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var d=n.getExtent.call(t);f&&(l[0]=d[0]),c&&(l[1]=d[1]);var v=n.getInterval.call(t),g=l[0],p=l[1];if(f&&c)v=(p-g)/o;else if(f)for(p=l[0]+v*o;p<l[1]&&isFinite(p)&&isFinite(l[1]);)v=T0(v),p=l[0]+v*o;else if(c)for(g=l[1]-v*o;g>l[0]&&isFinite(g)&&isFinite(l[0]);)v=T0(v),g=l[1]-v*o;else{var m=t.getTicks().length-1;m>o&&(v=T0(v));var y=v*o;p=Math.ceil(l[1]/v)*v,g=At(p-y),g<0&&l[0]>=0?(g=0,p=At(y)):p>0&&l[1]<=0&&(p=0,g=-At(y))}var b=(i[0].value-a[0].value)/s,C=(i[o].value-a[o].value)/s;if(n.setExtent.call(t,g+v*b,p+v*C),n.setInterval.call(t,v),(b||C)&&n.setNiceExtent.call(t,g+v,p-v),process.env.NODE_ENV!=="production"){var w=n.getTicks.call(t);w[1]&&(!Mj(v)||Op(w[1].value)>Op(v))&&Dt("The ticks may be not readable when set min: "+e.get("min")+", max: "+e.get("max")+" and alignTicks: true")}}var WH=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=K0,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,u=Xe(o),l=u.length;if(l){for(var f=[],c=l-1;c>=0;c--){var h=+u[c],d=o[h],v=d.model,g=d.scale;A0(g)&&v.get("alignTicks")&&v.get("interval")==null?f.push(d):(u2(g,v),A0(g)&&(s=d))}f.length&&(s||(s=f.pop(),u2(s.scale,s.model)),N(f,function(p){HH(p.scale,p.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){pA(n,"y",o,a)}),N(n.y,function(o){pA(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Na(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;u(),a&&(N(s,function(l){if(!l.model.get(["axisLabel","inside"])){var f=sV(l);if(f){var c=l.isHorizontal()?"height":"width",h=l.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,l.position==="top"?o.y+=f.height+h:l.position==="left"&&(o.x+=f.width+h)}}}),u()),N(this._coordsList,function(l){l.calcAffineTransform()});function u(){N(s,function(l){var f=l.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=l.inverse?1:0;l.setExtent(c[h],c[1-h]),$H(l,f?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}Ce(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===r)return a[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},t.prototype.convertFromPixel=function(e,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},t.prototype._findConvertTarget=function(e){var r=e.seriesModel,n=e.xAxisModel||r&&r.getReferringComponents("xAxis",on).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",on).models[0],a=e.gridModel,o=this._coordsList,s,u;if(r)s=r.coordinateSystem,$e(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)u=this.getAxis("x",n.componentIndex);else if(i)u=this.getAxis("y",i.componentIndex);else if(a){var l=a.coordinateSystem;l===this&&(s=this._coordsList[0])}return{cartesian:s,axis:u}},t.prototype.containPoint=function(e){var r=this._coordsList[0];if(r)return r.containPoint(e)},t.prototype._initCartesian=function(e,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},u={x:0,y:0};if(r.eachComponent("xAxis",l("x"),this),r.eachComponent("yAxis",l("y"),this),!u.x||!u.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,N(s.x,function(f,c){N(s.y,function(h,d){var v="x"+c+"y"+d,g=new jH(v);g.master=i,g.model=e,i._coordsMap[v]=g,i._coordsList.push(g),g.addAxis(f),g.addAxis(h)})});function l(f){return function(c,h){if(Q0(c,e)){var d=c.get("position");f==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var v=new VH(f,aV(c),[0,0],c.get("type"),d),g=v.type==="category";v.onBand=g&&c.get("boundaryGap"),v.inverse=c.get("inverse"),c.axis=v,v.model=c,v.grid=a,v.index=h,a._axesList.push(v),s[f][h]=v,u[f]++}}}},t.prototype._updateScale=function(e,r){N(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(dA(i)){var a=vA(i),o=a.xAxisModel,s=a.yAxisModel;if(!Q0(o,r)||!Q0(s,r))return;var u=this.getCartesian(o.componentIndex,s.componentIndex),l=i.getData(),f=u.getAxis("x"),c=u.getAxis("y");n(l,f),n(l,c)}},this);function n(i,a){N(lV(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},t.prototype.getTooltipAxes=function(e){var r=[],n=[];return N(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);$e(r,a)<0&&r.push(a),$e(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},t.create=function(e,r){var n=[];return e.eachComponent("grid",function(i,a){var o=new t(i,e,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(dA(i)){var a=vA(i),o=a.xAxisModel,s=a.yAxisModel,u=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!u)throw new Error('Grid "'+va(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var l=u.coordinateSystem;i.coordinateSystem=l.getCartesian(o.componentIndex,s.componentIndex)}}),n},t.dimensions=K0,t}();function Q0(t,e){return t.getCoordSysModel()===e}function pA(t,e,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=t[e],a,o=r.model,s=o.get(["axisLine","onZero"]),u=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(u!=null)gA(i[u])&&(a=i[u]);else for(var l in i)if(i.hasOwnProperty(l)&&gA(i[l])&&!n[f(i[l])]){a=i[l];break}a&&(n[f(a)]=!0);function f(c){return c.dim+"_"+c.index}}function gA(t){return t&&t.type!=="category"&&t.type!=="time"&&oV(t)}function $H(t,e){var r=t.getExtent(),n=r[0]+r[1];t.toGlobalCoord=t.dim==="x"?function(i){return i+e}:function(i){return n-i+e},t.toLocalCoord=t.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}var ji=Math.PI,Vi=function(){function t(e,r){this.group=new Lt,this.opt=r,this.axisModel=e,ke(r,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Lt({x:r.position[0],y:r.position[1],rotation:r.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(e){return!!mA[e]},t.prototype.add=function(e){mA[e](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(e,r,n){var i=DD(r-e),a,o;return Nf(i)?(o=n>0?"top":"bottom",a="center"):Nf(i-ji)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<ji?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),mA={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],u=[a[1],0],l=s[0]>u[0];o&&(zr(s,s,o),zr(u,u,o));var f=ae({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Pi({shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:f,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});wu(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);me(h)&&(h=[h,h]),(me(d)||rt(d))&&(d=[d,d]);var v=KS(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],p=d[1];N([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=rs(h[y],-g/2,-p/2,g,p,f.stroke,!0),C=m.r+m.offset,w=l?u:s;b.attr({rotation:m.rotate,x:w[0]+C*Math.cos(t.rotation),y:w[1]-C*Math.sin(t.rotation),silent:!0,z2:11}),r.add(b)}})}}},axisTickLabel:function(t,e,r,n){var i=qH(r,n,e,t),a=XH(r,n,e,t);if(UH(e,a,i),YH(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=S2(ge(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));T2(o)}},axisName:function(t,e,r,n){var i=da(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,l=e.axis.getExtent(),f=l[0]>l[1]?-1:1,c=[a==="start"?l[0]-f*u:a==="end"?l[1]+f*u:(l[0]+l[1])/2,bA(a)?t.labelOffset+o*u:0],h,d=e.get("nameRotate");d!=null&&(d=d*ji/180);var v;bA(a)?h=Vi.innerTextLayout(t.rotation,d??t.rotation,o):(h=GH(t.rotation,a,d||0,l),v=t.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(h.rotation)),!isFinite(v)&&(v=null)));var g=s.getFont(),p=e.get("nameTruncate",!0)||{},m=p.ellipsis,y=da(t.nameTruncateMaxWidth,p.maxWidth,v),b=new Tt({x:c[0],y:c[1],rotation:h.rotation,silent:Vi.isLabelSilent(e),style:Bi(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(pc({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var C=Vi.makeAxisEventDataBase(e);C.targetType="axisName",C.name=i,je(b).eventData=C}n.add(b),b.updateTransform(),r.add(b),b.decomposeTransform()}}};function GH(t,e,r,n){var i=DD(r-t),a,o,s=n[0]>n[1],u=e==="start"&&!s||e!=="start"&&s;return Nf(i-ji/2)?(o=u?"bottom":"top",a="center"):Nf(i-ji*1.5)?(o=u?"top":"bottom",a="center"):(o="middle",i<ji*1.5&&i>ji/2?a=u?"left":"right":a=u?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function UH(t,e,r){if(!l2(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],u=e[e.length-2],l=r[0],f=r[1],c=r[r.length-1],h=r[r.length-2];n===!1?(Jr(a),Jr(l)):yA(a,o)&&(n?(Jr(o),Jr(f)):(Jr(a),Jr(l))),i===!1?(Jr(s),Jr(c)):yA(u,s)&&(i?(Jr(u),Jr(h)):(Jr(s),Jr(c)))}}function Jr(t){t&&(t.ignore=!0)}function yA(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=Xv([]);return Zv(i,i,-t.rotation),r.applyTransform(Po([],i,t.getLocalTransform())),n.applyTransform(Po([],i,e.getLocalTransform())),r.intersect(n)}}function bA(t){return t==="middle"||t==="center"}function CA(t,e,r,n,i){for(var a=[],o=[],s=[],u=0;u<t.length;u++){var l=t[u].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=r,e&&(zr(o,o,e),zr(s,s,e));var f=new Pi({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});wu(f.shape,f.style.lineWidth),f.anid=i+"_"+t[u].tickValue,a.push(f)}return a}function qH(t,e,r,n){var i=r.axis,a=r.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),u=n.tickDirection*a.get("length"),l=i.getTicksCoords(),f=CA(l,e.transform,u,ke(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)t.add(f[c]);return f}}function YH(t,e,r,n){var i=r.axis,a=r.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),u=n*a.get("length"),l=ke(s.getLineStyle(),ke(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=CA(o[f],e.transform,u,l,"minorticks_"+f),h=0;h<c.length;h++)t.add(c[h])}}function XH(t,e,r,n){var i=r.axis,a=da(n.axisLabelShow,r.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=r.getModel("axisLabel"),s=o.get("margin"),u=i.getViewLabels(),l=(da(n.labelRotate,o.get("rotate"))||0)*ji/180,f=Vi.innerTextLayout(n.rotation,l,n.labelDirection),c=r.getCategories&&r.getCategories(!0),h=[],d=Vi.isLabelSilent(r),v=r.get("triggerEvent");return N(u,function(g,p){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,b=g.rawLabel,C=o;if(c&&c[m]){var w=c[m];Ce(w)&&w.textStyle&&(C=new bt(w.textStyle,o,r.ecModel))}var D=C.getTextColor()||r.get(["axisLine","lineStyle","color"]),_=i.dataToCoord(m),x=C.getShallow("align",!0)||f.textAlign,S=Be(C.getShallow("alignMinLabel",!0),x),O=Be(C.getShallow("alignMaxLabel",!0),x),E=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||f.textVerticalAlign,P=Be(C.getShallow("verticalAlignMinLabel",!0),E),F=Be(C.getShallow("verticalAlignMaxLabel",!0),E),M=new Tt({x:_,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:d,z2:10+(g.level||0),style:Bi(C,{text:y,align:p===0?S:p===u.length-1?O:x,verticalAlign:p===0?P:p===u.length-1?F:E,fill:_e(D)?D(i.type==="category"?b:i.type==="value"?m+"":m,p):D})});if(M.anid="label_"+m,v){var B=Vi.makeAxisEventDataBase(r);B.targetType="axisLabel",B.value=b,B.tickIndex=p,i.type==="category"&&(B.dataIndex=m),je(M).eventData=B}e.add(M),M.updateTransform(),h.push(M),t.add(M),M.decomposeTransform()}),h}}function KH(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return ZH(r,t,e),r.seriesInvolved&&QH(r,t),r}function ZH(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var u=Ju(s.model),l=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=s;var f=s.model,c=f.getModel("tooltip",n);if(N(s.getAxes(),wt(g,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",d=c.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||d)&&N(v.baseAxes,wt(g,d?"cross":!0,h)),d&&N(v.otherAxes,wt(g,"cross",!1))}function g(p,m,y){var b=y.model.getModel("axisPointer",i),C=b.get("show");if(!(!C||C==="auto"&&!p&&!rm(b))){m==null&&(m=b.get("triggerTooltip")),b=p?JH(y,c,i,e,p,m):b;var w=b.get("snap"),D=b.get("triggerEmphasis"),_=Ju(y.model),x=m||w||y.type==="category",S=t.axesInfo[_]={key:_,axis:y,coordSys:s,axisPointerModel:b,triggerTooltip:m,triggerEmphasis:D,involveSeries:x,snap:w,useHandle:rm(b),seriesModels:[],linkGroup:null};l[_]=S,t.seriesInvolved=t.seriesInvolved||x;var O=eW(a,y);if(O!=null){var E=o[O]||(o[O]={axesInfo:{}});E.axesInfo[_]=S,E.mapper=a[O].mapper,S.linkGroup=E}}}})}function JH(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],u={};N(s,function(h){u[h]=We(o.get(h))}),u.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(u.type="line");var l=u.label||(u.label={});if(l.show==null&&(l.show=!1),i==="cross"){var f=o.get(["label","show"]);if(l.show=f??!0,!a){var c=u.lineStyle=o.get("crossStyle");c&&ke(l,c.textStyle)}}return t.model.getModel("axisPointer",new bt(u,r,n))}function QH(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[Ju(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function eW(t,e){for(var r=e.model,n=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(em(a[n+"AxisId"],r.id)||em(a[n+"AxisIndex"],r.componentIndex)||em(a[n+"AxisName"],r.name))return i}}function em(t,e){return t==="all"||ce(t)&&$e(t,e)>=0||t===e}function tW(t){var e=tm(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=rm(r);a==null&&(i.status=s?"show":"hide");var u=n.getExtent().slice();u[0]>u[1]&&u.reverse(),(o==null||o>u[1])&&(o=u[1]),o<u[0]&&(o=u[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function tm(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ju(t)]}function rW(t){var e=tm(t);return e&&e.axisPointerModel}function rm(t){return!!t.get(["handle","show"])}function Ju(t){return t.type+"||"+t.id}var nm={},wA=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){this.axisPointerClass&&tW(r),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},e.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},e.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(r,n){this._disposeAxisPointer(n),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=rW(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},e.registerAxisPointerClass=function(r,n){if(process.env.NODE_ENV!=="production"&&nm[r])throw new Error("axisPointer "+r+" exists");nm[r]=n},e.getAxisPointerClass=function(r){return r&&nm[r]},e.type="axis",e}(Pr),im=ut();function nW(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),u=n.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,clamp:!0});if(l.length){var f=s.length,c=im(t).splitAreaColors,h=Ae(),d=0;if(c)for(var v=0;v<l.length;v++){var g=c.get(l[v].tickValue);if(g!=null){d=(g+(f-1)*v)%f;break}}var p=i.toGlobalCoord(l[0].coord),m=o.getAreaStyle();s=ce(s)?s:[s];for(var v=1;v<l.length;v++){var y=i.toGlobalCoord(l[v].coord),b=void 0,C=void 0,w=void 0,D=void 0;i.isHorizontal()?(b=p,C=u.y,w=y-b,D=u.height,p=b+w):(b=u.x,C=p,w=u.width,D=y-C,p=C+D);var _=l[v-1].tickValue;_!=null&&h.set(_,d),e.add(new _t({anid:_!=null?"area_"+_:null,shape:{x:b,y:C,width:w,height:D},style:ke({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%f}im(t).splitAreaColors=h}}}function iW(t){im(t).splitAreaColors=null}var aW=["axisLine","axisTickLabel","axisName"],oW=["splitArea","splitLine","minorSplitLine"],DA=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="CartesianAxisPointer",r}return e.prototype.render=function(r,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Lt,this.group.add(this._axisGroup),!!r.get("show")){var s=r.getCoordSysModel(),u=Z0(s,r),l=new Vi(r,ae({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),d=0;d<h.length;d++)if(A0(h[d].getOtherAxis(r.axis).scale))return!0;return!1}},u));N(aW,l.add,l),this._axisGroup.add(l.getGroup()),N(oW,function(c){r.get([c,"show"])&&sW[c](this,this._axisGroup,r,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||J_(o,this._axisGroup,r),t.prototype.render.call(this,r,n,i,a)}},e.prototype.remove=function(){iW(this)},e.type="cartesianAxis",e}(wA),sW={splitLine:function(t,e,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=ce(s)?s:[s];for(var u=n.coordinateSystem.getRect(),l=i.isHorizontal(),f=0,c=i.getTicksCoords({tickModel:a}),h=[],d=[],v=o.getLineStyle(),g=0;g<c.length;g++){var p=i.toGlobalCoord(c[g].coord);l?(h[0]=p,h[1]=u.y,d[0]=p,d[1]=u.y+u.height):(h[0]=u.x,h[1]=p,d[0]=u.x+u.width,d[1]=p);var m=f++%s.length,y=c[g].tickValue,b=new Pi({anid:y!=null?"line_"+c[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:ke({stroke:s[m]},v),silent:!0});wu(b.shape,v.lineWidth),e.add(b)}}},minorSplitLine:function(t,e,r,n){var i=r.axis,a=r.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),u=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var f=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var v=0;v<l[d].length;v++){var g=i.toGlobalCoord(l[d][v].coord);u?(f[0]=g,f[1]=s.y,c[0]=g,c[1]=s.y+s.height):(f[0]=s.x,f[1]=g,c[0]=s.x+s.width,c[1]=g);var p=new Pi({anid:"minor_line_"+l[d][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});wu(p.shape,h.lineWidth),e.add(p)}},splitArea:function(t,e,r,n){nW(t,e,r,n)}},_A=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="xAxis",e}(DA),uW=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=_A.type,r}return e.type="yAxis",e}(DA),lW=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="grid",r}return e.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new _t({shape:r.coordinateSystem.getRect(),style:ke({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(Pr),xA={offset:0};function fW(t){t.registerComponentView(lW),t.registerComponentModel(FH),t.registerCoordinateSystem("cartesian2d",WH),fA(t,"x",Y0,xA),fA(t,"y",Y0,xA),t.registerComponentView(_A),t.registerComponentView(uW),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function cW(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||xe(t,"text")))}function hW(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},xe(n,"text")&&(o.text=n.text),xe(n,"rich")&&(o.rich=n.rich),xe(n,"textFill")&&(o.fill=n.textFill),xe(n,"textStroke")&&(o.stroke=n.textStroke),xe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),xe(n,"fontSize")&&(o.fontSize=n.fontSize),xe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),xe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=xe(n,"textPosition");i.position=s?n.textPosition:"inside",xe(n,"textPosition")&&(i.position=n.textPosition),xe(n,"textOffset")&&(i.offset=n.textOffset),xe(n,"textRotation")&&(i.rotation=n.textRotation),xe(n,"textDistance")&&(i.distance=n.textDistance)}return SA(o,t),N(o.rich,function(u){SA(u,u)}),{textConfig:i,textContent:a}}function SA(t,e){e&&(e.font=e.textFont||e.font,xe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),xe(e,"textAlign")&&(t.align=e.textAlign),xe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),xe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),xe(e,"textWidth")&&(t.width=e.textWidth),xe(e,"textHeight")&&(t.height=e.textHeight),xe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),xe(e,"textPadding")&&(t.padding=e.textPadding),xe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),xe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),xe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),xe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),xe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),xe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),xe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}var EA={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},AA=Xe(EA),gh=Xn(Sn,function(t,e){return t[e]=1,t},{}),TA=Sn.join(", "),mh=["","style","shape","extra"],fs=ut();function am(t,e,r,n,i){var a=t+"Animation",o=Go(t,n,i)||{},s=fs(e).userDuring;return o.duration>0&&(o.during=s?ht(yW,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),ae(o,r[a]),o}function om(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),u=fs(t),l=e.style;u.userDuring=e.during;var f={},c={};if(CW(t,e,c),BA("shape",e,c),BA("extra",e,c),!a&&s&&(bW(t,e,f),PA("shape",t,e,f),PA("extra",t,e,f),wW(t,e,l,f)),c.style=l,vW(t,c,o),gW(t,e),s)if(a){var h={};N(mh,function(v){var g=v?e[v]:e;g&&g.enterFrom&&(v&&(h[v]=h[v]||{}),ae(v?h[v]:h,g.enterFrom))});var d=am("enter",t,e,r,i);d.duration>0&&t.animateFrom(h,d)}else pW(t,e,i||0,r,f);OA(t,e),l?t.dirty():t.markRedraw()}function OA(t,e){for(var r=fs(t).leaveToProps,n=0;n<mh.length;n++){var i=mh[n],a=i?e[i]:e;a&&a.leaveTo&&(r||(r=fs(t).leaveToProps={}),i&&(r[i]=r[i]||{}),ae(i?r[i]:r,a.leaveTo))}}function dW(t,e,r,n){if(t){var i=t.parent,a=fs(t).leaveToProps;if(a){var o=am("update",t,e,r,0);o.done=function(){i.remove(t)},t.animateTo(a,o)}else i.remove(t)}}function Ya(t){return t==="all"}function vW(t,e,r){var n=e.style;if(!t.isGroup&&n){if(r){t.useStyle({});for(var i=t.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(t.style)}}t.setStyle(n)}e&&(e.style=null,e&&t.attr(e),e.style=n)}function pW(t,e,r,n,i){if(i){var a=am("update",t,e,n,r);a.duration>0&&t.animateFrom(i,a)}}function gW(t,e){xe(e,"silent")&&(t.silent=e.silent),xe(e,"ignore")&&(t.ignore=e.ignore),t instanceof Ei&&xe(e,"invisible")&&(t.invisible=e.invisible),t instanceof ze&&xe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var kn={},mW={setTransform:function(t,e){return process.env.NODE_ENV!=="production"&&Ee(xe(gh,t),"Only "+TA+" available in `setTransform`."),kn.el[t]=e,this},getTransform:function(t){return process.env.NODE_ENV!=="production"&&Ee(xe(gh,t),"Only "+TA+" available in `getTransform`."),kn.el[t]},setShape:function(t,e){process.env.NODE_ENV!=="production"&&cs(t);var r=kn.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){process.env.NODE_ENV!=="production"&&cs(t);var e=kn.el.shape;if(e)return e[t]},setStyle:function(t,e){process.env.NODE_ENV!=="production"&&cs(t);var r=kn.el,n=r.style;return n&&(process.env.NODE_ENV!=="production"&&_o(e)&&Dt("style."+t+" must not be assigned with NaN."),n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){process.env.NODE_ENV!=="production"&&cs(t);var e=kn.el.style;if(e)return e[t]},setExtra:function(t,e){process.env.NODE_ENV!=="production"&&cs(t);var r=kn.el.extra||(kn.el.extra={});return r[t]=e,this},getExtra:function(t){process.env.NODE_ENV!=="production"&&cs(t);var e=kn.el.extra;if(e)return e[t]}};function cs(t){if(process.env.NODE_ENV!=="production"&&(t==="transition"||t==="enterFrom"||t==="leaveTo"))throw new Error('key must not be "'+t+'"')}function yW(){var t=this,e=t.el;if(e){var r=fs(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}kn.el=e,n(mW)}}function PA(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,u=i.transition;if(u)if(!o&&(o=n[t]={}),Ya(u))ae(o,a);else for(var l=pt(u),f=0;f<l.length;f++){var c=l[f],h=a[c];o[c]=h}else if(Ya(s)||$e(s,t)>=0){!o&&(o=n[t]={});for(var d=Xe(a),f=0;f<d.length;f++){var c=d[f],h=a[c];DW(i[c],h)&&(o[c]=h)}}}}}function BA(t,e,r){var n=e[t];if(n)for(var i=r[t]={},a=Xe(n),o=0;o<a.length;o++){var s=a[o];i[s]=ru(n[s])}}function bW(t,e,r){for(var n=e.transition,i=Ya(n)?Sn:pt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=t[o];process.env.NODE_ENV!=="production"&&MA(o,"el.transition"),r[o]=s}}}function CW(t,e,r){for(var n=0;n<AA.length;n++){var i=AA[n],a=EA[i],o=e[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Sn.length;n++){var s=Sn[n];e[s]!=null&&(r[s]=e[s])}}function wW(t,e,r,n){if(r){var i=t.style,a;if(i){var o=r.transition,s=e.transition;if(o&&!Ya(o)){var u=pt(o);!a&&(a=n.style={});for(var l=0;l<u.length;l++){var f=u[l],c=i[f];a[f]=c}}else if(t.getAnimationStyleProps&&(Ya(s)||Ya(o)||$e(s,"style")>=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var v=Xe(r),l=0;l<v.length;l++){var f=v[l];if(d[f]){var c=i[f];a[f]=c}}}}}}}function DW(t,e){return Ht(t)?t!==e:t!=null&&isFinite(t)}var MA;process.env.NODE_ENV!=="production"&&(MA=function(t,e){xe(gh,t)||Dt("Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+Xe(gh).join("`, `")+"` are permitted.")});var FA=ut(),_W=["percent","easing","shape","style","extra"];function xW(t){t.stopAnimation("keyframe"),t.attr(FA(t))}function sm(t,e,r){if(!(!r.isAnimationEnabled()||!e)){if(ce(e)){N(e,function(s){sm(t,s,r)});return}var n=e.keyframes,i=e.duration;if(r&&i==null){var a=Go("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=FA(t);N(mh,function(s){if(!(s&&!t[s])){var u,l=!1;n.sort(function(f,c){return f.percent-c.percent}),N(n,function(f){var c=t.animators,h=s?f[s]:f;if(process.env.NODE_ENV!=="production"&&f.percent>=1&&(l=!0),!!h){var d=Xe(h);if(s||(d=yt(d,function(p){return $e(_W,p)<0})),!!d.length){u||(u=t.animate(s,e.loop,!0),u.scope="keyframe");for(var v=0;v<c.length;v++)c[v]!==u&&c[v].targetName===u.targetName&&c[v].stopTracks(d);s&&(o[s]=o[s]||{});var g=s?o[s]:o;N(d,function(p){g[p]=((s?t[s]:t)||{})[p]}),u.whenWithKeys(i*f.percent,h,d,f.easing)}}}),u&&(process.env.NODE_ENV!=="production"&&(l||Dt("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),u.delay(e.delay||0).duration(i).start(e.easing))}})}}}var Xa=ut(),LA=We,um=ht,SW=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,u=this._handle;if(!o||o==="hide"){s&&s.hide(),u&&u.hide();return}s&&s.show(),u&&u.show();var l={};this.makeElOption(l,a,e,r,n);var f=l.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new Lt,this.createPointerEl(s,l,e,r),this.createLabelEl(s,l,e,r),n.getZr().add(s);else{var h=wt(RA,r,c);this.updatePointerEl(s,l,h),this.updateLabelEl(s,l,h,r)}kA(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var u=tm(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/u>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=Xa(e).pointerEl=new W6[a.type](LA(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=Xa(e).labelEl=new Tt(LA(r.label));e.add(a),NA(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=Xa(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=Xa(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),NA(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=mg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(l){Pw(l.event)},onmousedown:um(this._onHandleDragMove,this,0,0),drift:um(this._onHandleDragMove,this),ondragend:um(this._onHandleDragEnd,this)}),n.add(i)),kA(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=a.get("size");ce(u)||(u=[u,u]),i.scaleX=u[0]/2,i.scaleY=u[1]/2,IS(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){RA(this._axisPointerModel,!r&&this._moveAnimation,this._handle,lm(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(lm(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(lm(i)),Xa(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Qg(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function RA(t,e,r,n){IA(Xa(r).lastProp,n)||(Xa(r).lastProp=n,e?Mt(r,n,t):(r.stopAnimation(),r.attr(n)))}function IA(t,e){if(Ce(t)&&Ce(e)){var r=!0;return N(e,function(n,i){r=r&&IA(t[i],n)}),!!r}else return t===e}function NA(t,e){t[e.get(["label","show"])?"show":"hide"]()}function lm(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function kA(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function EW(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function AW(t,e,r,n,i){var a=r.get("value"),o=zA(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),u=Ac(s.get("padding")||0),l=s.getFont(),f=Dp(o,l),c=i.position,h=f.width+u[1]+u[3],d=f.height+u[0]+u[2],v=i.align;v==="right"&&(c[0]-=h),v==="center"&&(c[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),TW(c,h,d,n);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Bi(s,{text:o,font:l,fill:s.getTextColor(),padding:u,backgroundColor:p}),z2:10}}function TW(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function zA(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:F0(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(u){var l=r.getSeriesByIndex(u.seriesIndex),f=u.dataIndexInside,c=l&&l.getDataParams(f);c&&s.seriesData.push(c)}),me(o)?a=o.replace("{value}",a):_e(o)&&(a=o(s))}return a}function jA(t,e,r){var n=Oo();return Zv(n,n,r.rotation),Kv(n,n,r.position),gg([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function OW(t,e,r,n,i,a){var o=Vi.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),AW(e,n,i,a,{position:jA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function PW(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function BW(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}var MW=function(t){fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,u=s.grid,l=a.get("type"),f=VA(u,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(l&&l!=="none"){var h=EW(a),d=FW[l](s,c,f);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=Z0(u.model,i);OW(n,r,v,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Z0(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=jA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,u=o.getGlobalExtent(!0),l=VA(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[r.x,r.y];c[f]+=n[f],c[f]=Math.min(u[1],c[f]),c[f]=Math.max(u[0],c[f]);var h=(l[1]+l[0])/2,d=[h,h];d[f]=c[f];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[f]}},e}(SW);function VA(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var FW={line:function(t,e,r){var n=PW([e,r[0]],[e,r[1]],HA(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:BW([e-n/2,r[0]],[n,i],HA(t))}}};function HA(t){return t.dim==="x"?0:1}var LW=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Ke),ui=ut(),RW=N;function WA(t,e,r){if(!Pe.node){var n=e.getZr();ui(n).records||(ui(n).records={}),IW(n,e);var i=ui(n).records[t]||(ui(n).records[t]={});i.handler=r}}function IW(t,e){if(ui(t).initialized)return;ui(t).initialized=!0,r("click",wt($A,"click")),r("mousemove",wt($A,"mousemove")),r("globalout",kW);function r(n,i){t.on(n,function(a){var o=zW(e);RW(ui(t).records,function(s){s&&i(s,a,o.dispatchAction)}),NW(o.pendings,e)})}}function NW(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function kW(t,e,r){t.handler("leave",null,r)}function $A(t,e,r,n){e.handler(t,r,n)}function zW(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function fm(t,e){if(!Pe.node){var r=e.getZr(),n=(ui(r).records||{})[t];n&&(ui(r).records[t]=null)}}var jW=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";WA("axisPointer",i,function(s,u,l){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&l({type:"updateAxisPointer",currTrigger:s,x:u&&u.offsetX,y:u&&u.offsetY})})},e.prototype.remove=function(r,n){fm("axisPointer",n)},e.prototype.dispose=function(r,n){fm("axisPointer",n)},e.type="axisPointer",e}(Pr);function GA(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=wa(a,t);if(o==null||o<0||ce(o))return{point:[]};var s=a.getItemGraphicEl(o),u=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(u&&u.dataToPoint)if(t.isStacked){var l=u.getBaseAxis(),f=u.getOtherAxis(l),c=f.dim,h=l.dim,d=c==="x"||c==="radius"?1:0,v=a.mapDimension(h),g=[];g[d]=a.get(v,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=u.dataToPoint(g)||[]}else r=u.dataToPoint(a.getValues(ge(u.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),r=[p.x+p.width/2,p.y+p.height/2]}return{point:r,el:s}}var UA=ut();function VW(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||ht(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){yh(i)&&(i=GA({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var u=yh(i),l=a.axesInfo,f=s.axesInfo,c=n==="leave"||yh(i),h={},d={},v={list:[],map:{}},g={showPointer:wt(WW,d),showTooltip:wt($W,v)};N(s.coordSysMap,function(m,y){var b=u||m.containPoint(i);N(s.coordSysAxesInfo[y],function(C,w){var D=C.axis,_=YW(l,C);if(!c&&b&&(!l||_)){var x=_&&_.value;x==null&&!u&&(x=D.pointToData(i)),x!=null&&qA(C,x,g,!1,h)}})});var p={};return N(f,function(m,y){var b=m.linkGroup;b&&!d[y]&&N(b.axesInfo,function(C,w){var D=d[w];if(C!==m&&D){var _=D.value;b.mapper&&(_=m.axis.scale.parse(b.mapper(_,YA(C),YA(m)))),p[m.key]=_}})}),N(p,function(m,y){qA(f[y],m,g,!0,h)}),GW(d,f,h),UW(v,i,t,o),qW(f,o,r),h}}function qA(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=HW(e,t),s=o.payloadBatch,u=o.snapToValue;s[0]&&i.seriesIndex==null&&ae(i,s[0]),!n&&t.snap&&a.containData(u)&&u!=null&&(e=u),r.showPointer(t,e,s),r.showTooltip(t,o,u)}}function HW(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(u,l){var f=u.getData().mapDimensionsAll(n),c,h;if(u.getAxisTooltipData){var d=u.getAxisTooltipData(f,t,r);h=d.dataIndices,c=d.nestestValue}else{if(h=u.getData().indicesOfNearest(f[0],t,r.type==="category"?.5:null),!h.length)return;c=u.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var v=t-c,g=Math.abs(v);g<=o&&((g<o||v>=0&&s<0)&&(o=g,s=v,i=c,a.length=0),N(h,function(p){a.push({seriesIndex:u.seriesIndex,dataIndexInside:p,dataIndex:u.getData().getRawIndex(p)})}))}}),{payloadBatch:a,snapToValue:i}}function WW(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function $W(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var u=e.coordSys.model,l=Ju(u),f=t.map[l];f||(f=t.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},t.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function GW(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function UW(t,e,r,n){if(yh(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function qW(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=UA(n)[i]||{},o=UA(n)[i]={};N(t,function(l,f){var c=l.axisPointerModel.option;c.status==="show"&&l.triggerEmphasis&&N(c.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],u=[];N(a,function(l,f){!o[f]&&u.push(l)}),N(o,function(l,f){!a[f]&&s.push(l)}),u.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:u}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function YW(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function YA(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function yh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function XA(t){wA.registerAxisPointerClass("CartesianAxisPointer",MW),t.registerComponentModel(LW),t.registerComponentView(jW),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ce(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=KH(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},VW)}function XW(t){Ii(fW),Ii(XA)}function KW(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function KA(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function ZW(t,e,r){var n=ae({},r),i=t[e],a=r.$action||"merge";if(a==="merge")if(i){if(process.env.NODE_ENV!=="production"){var o=r.type;Ee(!o||i.type===o,'Please set $action: "replace" to change `type`')}Je(i,n,!0),ka(i,n,{ignoreSize:!0}),Px(r,i),bh(r,i),bh(r,i,"shape"),bh(r,i,"style"),bh(r,i,"extra"),r.clipPath=i.clipPath}else t[e]=n;else a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var ZA=["transition","enterFrom","leaveTo"],JW=ZA.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function bh(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?ZA:JW,i=0;i<n.length;i++){var a=n[i];t[a]==null&&e[a]!=null&&(t[a]=e[a])}}function QW(t,e){if(t&&(t.hv=e.hv=[KA(e,["left","right"]),KA(e,["top","bottom"])],t.type==="group")){var r=t,n=e;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var e$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.mergeOption=function(r,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,r,n),this.option.elements=i},e.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var u=MD(o,s,"normalMerge"),l=this._elOptionsToUpdate=[];N(u,function(f,c){var h=f.newOption;process.env.NODE_ENV!=="production"&&Ee(Ce(h)||f.existing,"Empty graphic option definition"),h&&(l.push(h),KW(f,h),ZW(o,c,h),QW(o[c],h))},this),i.elements=yt(o,function(f){return f&&delete f.$action,f!=null})},e.prototype._flatten=function(r,n,i){N(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},e.type="graphic",e.defaultOption={elements:[]},e}(Ke),JA={path:null,compoundPath:null,group:Lt,image:ni,text:Tt},Qr=ut(),t$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this._elMap=Ae()},e.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},e.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");N(n,function(u){var l=vr(u.id,null),f=l!=null?i.get(l):null,c=vr(u.parentId,null),h=c!=null?i.get(c):a,d=u.type,v=u.style;d==="text"&&v&&u.hv&&u.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var g=u.textContent,p=u.textConfig;if(v&&cW(v,d,!!p,!!g)){var m=hW(v,d);!p&&m.textConfig&&(p=u.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=r$(u);process.env.NODE_ENV!=="production"&&f&&Ee(h===f.parent,"Changing parent is not supported.");var b=u.$action||"merge",C=b==="merge",w=b==="replace";if(C){var D=!f,_=f;D?_=QA(l,h,u.type,i):(_&&(Qr(_).isNew=!1),xW(_)),_&&(om(_,y,r,{isInit:D}),eT(_,u,o,s))}else if(w){Ch(f,u,i,r);var x=QA(l,h,u.type,i);x&&(om(x,y,r,{isInit:!0}),eT(x,u,o,s))}else b==="remove"&&(OA(f,u),Ch(f,u,i,r));var S=i.get(l);if(S&&g)if(C){var O=S.getTextContent();O?O.attr(g):S.setTextContent(new Tt(g))}else w&&S.setTextContent(new Tt(g));if(S){var E=u.clipPath;if(E){var P=E.type,F=void 0,D=!1;if(C){var M=S.getClipPath();D=!M||Qr(M).type!==P,F=D?cm(P):M}else w&&(D=!0,F=cm(P));S.setClipPath(F),om(F,E,r,{isInit:D}),sm(F,E.keyframeAnimation,r)}var B=Qr(S);S.setTextConfig(p),B.option=u,n$(S,r,u),pc({el:S,componentModel:r,itemName:S.name,itemTooltipOption:u.tooltip}),sm(S,u.keyframeAnimation,r)}})}},e.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),u=n.getHeight(),l=["x","y"],f=0;f<i.length;f++){var c=i[f],h=vr(c.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var v=d.parent,g=v===a,p=Qr(d),m=Qr(v);p.width=st(p.option.width,g?s:m.width)||0,p.height=st(p.option.height,g?u:m.height)||0}}for(var f=i.length-1;f>=0;f--){var c=i[f],h=vr(c.id,null),d=h!=null?o.get(h):null;if(d){var v=d.parent,m=Qr(v),y=v===a?{width:s,height:u}:{width:m.width,height:m.height},b={},C=v9(d,c,y,null,{hv:c.hv,boundingMode:c.bounding},b);if(!Qr(d).isNew&&C){for(var w=c.transition,D={},_=0;_<l.length;_++){var x=l[_],S=b[x];w&&(Ya(w)||$e(w,x)>=0)?D[x]=S:d[x]=S}Mt(d,D,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Ch(i,Qr(i).option,n,r._lastGraphicModel)}),this._elMap=Ae()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Pr);function cm(t){process.env.NODE_ENV!=="production"&&Ee(t,"graphic type MUST be set");var e=xe(JA,t)?JA[t]:q_(t);process.env.NODE_ENV!=="production"&&Ee(e,"graphic type "+t+" can not be found");var r=new e({});return Qr(r).type=t,r}function QA(t,e,r,n){var i=cm(r);return e.add(i),n.set(t,i),Qr(i).id=t,Qr(i).isNew=!0,i}function Ch(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Ch(a,e,r,n)}),dW(t,e,n),r.removeKey(Qr(t).id))}function eT(t,e,r,n){t.isGroup||N([["cursor",Ei.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];xe(e,a)?t[a]=Be(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Xe(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=_e(a)?a:null}}),xe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function r$(t){return t=ae({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Ox),function(e){delete t[e]}),t}function n$(t,e,r){var n=je(t).eventData;!t.silent&&!t.ignore&&!n&&(n=je(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function i$(t){t.registerComponentModel(e$),t.registerComponentView(t$),t.registerPreprocessor(function(e){var r=e.graphic;ce(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}function a$(t,e){var r=Ac(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new _t({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var o$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Ke);function tT(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function rT(t){if(Pe.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r<n;r++)if(t[r]in e)return t[r]}}var nT=rT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),s$=rT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function iT(t,e){if(!t)return e;e=Sx(e,!0);var r=t.indexOf(e);return t=r===-1?e:"-"+t.slice(0,r)+"-"+e,t.toLowerCase()}function u$(t,e){var r=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return r?r[e]:null}var l$=iT(s$,"transition"),hm=iT(nT,"transform"),f$="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Pe.transform3dSupported?"will-change:transform;":"");function c$(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function h$(t,e,r){if(!me(r)||r==="inside")return"";var n=t.get("backgroundColor"),i=t.get("borderWidth");e=Ia(e);var a=c$(r),o=Math.max(Math.round(i)*1.5,6),s="",u=hm+":",l;$e(["left","right"],a)>-1?(s+="top:50%",u+="translateY(-50%) rotate("+(l=a==="left"?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l=a==="top"?225:45)+"deg)");var f=l*Math.PI/180,c=o+i,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+u+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function d$(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=Pe.transformSupported?","+hm+n:",left"+n+",top"+n),l$+":"+i}function aT(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Pe.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Pe.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+hm+":"+o+";":[["top",0],["left",0],[nT,o]]}function v$(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),N(["decoration","align"],function(u){var l=t.get(u);l&&e.push("text-"+u+":"+l)}),e.join(";")}function p$(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),u=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),f=t.getModel("textStyle"),c=TS(t,"html"),h=u+"px "+l+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(d$(i,r)),a&&n.push("background-color:"+a),N(["width","color","radius"],function(d){var v="border-"+d,g=Sx(v),p=t.get(g);p!=null&&n.push(v+":"+p+(d==="color"?"":"px"))}),n.push(v$(f)),c!=null&&n.push("padding:"+Ac(c).join("px ")+"px"),n.join(";")+";"}function oT(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&d8(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var g$=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(me(a)?document.querySelector(a):Do(a)?a:_e(a)&&a(e.getDom()));oT(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(u){if(u=u||window.event,!s._enterable){var l=i.handler,f=i.painter.getViewportRoot();jr(f,u,!0),l.dispatch("mousemove",u)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=u$(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=f$+p$(e,!this._firstShow,this._longHide)+aT(a[0],a[1],!0)+("border-color:"+Ia(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(me(a)&&n.get("trigger")==="item"&&!tT(n)&&(s=h$(n,i,a)),me(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ce(e)||(e=[e]);for(var u=0;u<e.length;u++)Do(e[u])&&e[u].parentNode!==o&&o.appendChild(e[u]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},t.prototype.moveTo=function(e,r){var n=this._styleCoord;if(oT(n,this._zr,this._container,e,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=aT(n[0],n[1]);N(a,function(o){i[o[0]]=o[1]})}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){var e=this,r=this.el.style;r.visibility="hidden",r.opacity="0",Pe.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ht(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},t}(),m$=function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),uT(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var r=e.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,r,n,i,a){var o=this;Ce(e)&&Ue(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Tt({style:{rich:r.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:TS(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),N(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(l){o.el.style[l]=n.get(l)}),N(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(l){o.el.style[l]=s.get(l)||0}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,r=this.el.getBoundingRect(),n=sT(e.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},t.prototype.moveTo=function(e,r){var n=this.el;if(n){var i=this._styleCoord;uT(i,this._zr,e,r),e=i[0],r=i[1];var a=n.style,o=Hi(a.borderWidth||0),s=sT(a);n.x=e+o+s.left,n.y=r+o+s.top,n.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),r*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ht(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function Hi(t){return Math.max(0,t)}function sT(t){var e=Hi(t.shadowBlur||0),r=Hi(t.shadowOffsetX||0),n=Hi(t.shadowOffsetY||0);return{left:Hi(e-r),right:Hi(e+r),top:Hi(e-n),bottom:Hi(e+n)}}function uT(t,e,r,n){t[0]=r,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var y$=new _t({shape:{x:-1,y:-1,width:2,height:2}}),b$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){if(!(Pe.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=NN(i.get("renderMode"));this._tooltipContent=a==="richText"?new m$(n):new g$(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(r,n,i){if(!(Pe.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?IS(this,"_updatePosition",50,"fixRate"):Qg(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");WA("itemTooltip",this._api,ht(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Pe.node||!i.getDom())){var o=lT(a,i);this._ticket="";var s=a.dataByCoordSys,u=_$(a,n,i);if(u){var l=u.el.getBoundingRect().clone();l.applyTransform(u.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:u.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=y$;f.x=a.x,f.y=a.y,f.update(),je(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=GA(a,n),h=c.point[0],d=c.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(lT(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,u=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||u==null)){var l=n.getSeriesByIndex(o);if(l){var f=l.getData(),c=Qu([f.getItemModel(s),l,(l.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=je(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var u,l;zu(i,function(f){if(je(f).dataIndex!=null)return u=f,!0;if(je(f).tooltipConfig!=null)return l=f,!0},!0),u?this._showSeriesItemTooltip(r,u,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=ht(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Qu([n.tooltipOption],a),u=this._renderMode,l=[],f=Iu("section",{blocks:[],noHeader:!0}),c=[],h=new Xg;N(r,function(y){N(y.dataByAxis,function(b){var C=i.getComponent(b.axisDim+"Axis",b.axisIndex),w=b.value;if(!(!C||w==null)){var D=zA(w,C.axis,i,b.seriesDataIndices,b.valueLabelOpt),_=Iu("section",{header:D,noHeader:!Dn(D),sortBlocks:!0,blocks:[]});f.blocks.push(_),N(b.seriesDataIndices,function(x){var S=i.getSeriesByIndex(x.seriesIndex),O=x.dataIndexInside,E=S.getDataParams(O);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=F0(C.axis,{value:w}),E.axisValueLabel=D,E.marker=h.makeTooltipMarker("item",Ia(E.color),u);var P=lS(S.formatTooltip(O,!0,null)),F=P.frag;if(F){var M=Qu([S],a).get("valueFormatter");_.blocks.push(M?ae({valueFormatter:M},F):F)}P.text&&c.push(P.text),l.push(E)}})}})}),f.blocks.reverse(),c.reverse();var d=n.position,v=s.get("order"),g=ES(f,h,u,v,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var p=u==="richText"?`
167
+
168
+ `:"<br/>",m=c.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,m,l,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=je(n),s=o.seriesIndex,u=a.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,c=o.dataType,h=l.getData(c),d=this._renderMode,v=r.positionDefault,g=Qu([h.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var m=l.getDataParams(f,c),y=new Xg;m.marker=y.makeTooltipMarker("item",Ia(m.color),d);var b=lS(l.formatTooltip(f,!1,c)),C=g.get("order"),w=g.get("valueFormatter"),D=b.frag,_=D?ES(w?ae({valueFormatter:w},D):D,y,d,C,a.get("useUTC"),g.get("textStyle")):b.text,x="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,_,m,x,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=je(n),s=o.tooltipConfig,u=s.option||{},l=u.encodeHTMLContent;if(me(u)){var f=u;u={content:f,formatter:f},l=!0}l&&a&&u.content&&(u=We(u),u.content=Ar(u.content));var c=[u],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&c.push(h),c.push({formatter:u.content});var d=r.positionDefault,v=Qu(c,this._tooltipModel,d?{position:d}:null),g=v.get("content"),p=Math.random()+"",m=new Xg;this._showOrMove(v,function(){var y=We(v.get("formatterParams")||{});this._showTooltipContent(v,g,y,p,r.offsetX,r.offsetY,r.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var h=r.get("formatter");u=u||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=v.color;if(h)if(me(h)){var p=r.ecModel.get("useUTC"),m=ce(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=Dc(m.axisValue,d,p)),d=Ax(d,i,!0)}else if(_e(h)){var b=ht(function(C,w){C===this._ticket&&(c.setContent(w,f,r,g,u),this._updatePosition(r,u,o,s,c,i,l))},this);this._ticket=a,d=h(i,a,b)}else d=h;c.setContent(d,f,r,g,u),c.show(r,g),this._updatePosition(r,u,o,s,c,i,l)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ce(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ce(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=u&&u.getBoundingRect().clone();if(u&&v.applyTransform(u.transform),_e(n)&&(n=n([i,a],s,o.el,v,{viewSize:[l,f],contentSize:c.slice()})),ce(n))i=st(n[0],l),a=st(n[1],f);else if(Ce(n)){var g=n;g.width=c[0],g.height=c[1];var p=Na(g,{width:l,height:f});i=p.x,a=p.y,h=null,d=null}else if(me(n)&&u){var m=D$(n,v,c,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=C$(i,a,o,l,f,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=fT(h)?c[0]/2:h==="right"?c[0]:0),d&&(a-=fT(d)?c[1]/2:d==="bottom"?c[1]:0),tT(r)){var m=w$(i,a,o,l,f);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},c=f.dataByAxis||[];o=o&&l.length===c.length,o&&N(l,function(h,d){var v=c[d]||{},g=h.seriesDataIndices||[],p=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&g.length===p.length,o&&N(g,function(m,y){var b=p[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&N(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],C=a[y];b&&C&&C.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Pe.node||!n.getDom()||(Qg(this,"_updatePosition"),this._tooltipContent.dispose(),fm("itemTooltip",n))},e.type="tooltip",e}(Pr);function Qu(t,e,r){var n=e.ecModel,i;r?(i=new bt(r,n,n),i=new bt(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof bt&&(o=o.get("tooltip",!0)),me(o)&&(o={formatter:o}),o&&(i=new bt(o,i,n)))}return i}function lT(t,e){return t.dispatchAction||ht(e.dispatchAction,e)}function C$(t,e,r,n,i,a,o){var s=r.getSize(),u=s[0],l=s[1];return a!=null&&(t+u+a+2>n?t-=u+a:t+=a),o!=null&&(e+l+o>i?e-=l+o:e+=o),[t,e]}function w$(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function D$(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,u=0,l=e.width,f=e.height;switch(t){case"inside":s=e.x+l/2-i/2,u=e.y+f/2-a/2;break;case"top":s=e.x+l/2-i/2,u=e.y-a-o;break;case"bottom":s=e.x+l/2-i/2,u=e.y+f+o;break;case"left":s=e.x-i-o,u=e.y+f/2-a/2;break;case"right":s=e.x+l+o,u=e.y+f/2-a/2}return[s,u]}function fT(t){return t==="center"||t==="middle"}function _$(t,e,r){var n=Fp(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=fu(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),u;if(s.group.traverse(function(l){var f=je(l).tooltipConfig;if(f&&f.name===t.name)return u=l,!0}),u)return{componentMainType:i,componentIndex:o.componentIndex,el:u}}}}function x$(t){Ii(XA),t.registerComponentModel(o$),t.registerComponentView(b$),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},hr),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},hr)}var S$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Ke),E$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),u=r.get("textAlign"),l=Be(r.get("textBaseline"),r.get("textVerticalAlign")),f=new Tt({style:Bi(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=r.get("subtext"),d=new Tt({style:Bi(s,{text:h,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),g=r.get("sublink"),p=r.get("triggerEvent",!0);f.silent=!v&&!p,d.silent=!g&&!p,v&&f.on("click",function(){Tx(v,"_"+r.get("target"))}),g&&d.on("click",function(){Tx(g,"_"+r.get("subtarget"))}),je(f).eventData=je(d).eventData=p?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(f),h&&a.add(d);var m=a.getBoundingRect(),y=r.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=Na(y,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));u||(u=r.get("left")||r.get("right"),u==="middle"&&(u="center"),u==="right"?b.x+=b.width:u==="center"&&(b.x+=b.width/2)),l||(l=r.get("top")||r.get("bottom"),l==="center"&&(l="middle"),l==="bottom"?b.y+=b.height:l==="middle"&&(b.y+=b.height/2),l=l||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var C={align:u,verticalAlign:l};f.setStyle(C),d.setStyle(C),m=a.getBoundingRect();var w=b.margin,D=r.getItemStyle(["color","opacity"]);D.fill=r.get("backgroundColor");var _=new _t({shape:{x:m.x-w[3],y:m.y-w[0],width:m.width+w[1]+w[3],height:m.height+w[0]+w[2],r:r.get("borderRadius")},style:D,subPixelOptimize:!0,silent:!0});a.add(_)}},e.type="title",e}(Pr);function A$(t){t.registerComponentModel(S$),t.registerComponentView(E$)}var T$=function(t,e){if(e==="all")return{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}},dm=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),r.selected=r.selected||{},this._updateSelector(r)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},e.prototype._updateSelector=function(r){var n=r.selector,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ce(n)&&N(n,function(a,o){me(a)&&(a={type:a}),n[o]=Je(a,T$(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},e.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(u){var l=u.name;i.push(l);var f;if(u.legendVisualProvider){var c=u.legendVisualProvider,h=c.getAllNames();r.isSeriesFiltered(u)||(i=i.concat(h)),h.length?n=n.concat(h):f=!0}else f=!0;f&&Bp(u)&&n.push(u.name)}),this._availableNames=i;var a=this.get("data")||n,o=Ae(),s=ge(a,function(u){return(me(u)||rt(u))&&(u={name:u}),o.get(u.name)?null:(o.set(u.name,!0),new bt(u,this,this.ecModel))},this);this._data=yt(s,function(u){return!!u})},e.prototype.getData=function(){return this._data},e.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;N(a,function(o){n[o.get("name")]=!1})}n[r]=!0},e.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},e.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},e.prototype.allSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;N(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&$e(this._availableNames,r)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Ke),hs=wt,vm=N,wh=Lt,cT=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new wh),this.group.add(this._selectorGroup=new wh),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var u=r.get("selector",!0),l=r.get("selectorPosition",!0);u&&(!l||l==="auto")&&(l=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,u,s,l);var f=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},h=r.get("padding"),d=Na(f,c,h),v=this.layoutInner(r,o,d,a,u,l),g=Na(ke({width:v.width,height:v.height},f),c,h);this.group.x=g.x-v.x,this.group.y=g.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=a$(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this.getContentGroup(),f=Ae(),c=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),vm(n.getData(),function(d,v){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
169
+ `)){var p=new wh;p.newline=!0,l.add(p);return}var m=i.getSeriesByName(g)[0];if(!f.get(g)){if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},C=y.getVisual("legendIcon"),w=y.getVisual("style"),D=this._createItem(m,g,v,d,n,r,b,w,C,c,a);D.on("click",hs(hT,g,null,a,h)).on("mouseover",hs(pm,m.name,null,a,h)).on("mouseout",hs(gm,m.name,null,a,h)),i.ssr&&D.eachChild(function(_){var x=je(_);x.seriesIndex=m.seriesIndex,x.dataIndex=v,x.ssrType="legend"}),f.set(g,!0)}else i.eachRawSeries(function(_){if(!f.get(g)&&_.legendVisualProvider){var x=_.legendVisualProvider;if(!x.containName(g))return;var S=x.indexOfName(g),O=x.getItemVisual(S,"style"),E=x.getItemVisual(S,"legendIcon"),P=Kn(O.fill);P&&P[3]===0&&(P[3]=.2,O=ae(ae({},O),{fill:Ef(P,"rgba")}));var F=this._createItem(_,g,v,d,n,r,{},O,E,c,a);F.on("click",hs(hT,null,g,a,h)).on("mouseover",hs(pm,null,g,a,h)).on("mouseout",hs(gm,null,g,a,h)),i.ssr&&F.eachChild(function(M){var B=je(M);B.seriesIndex=_.seriesIndex,B.dataIndex=v,B.ssrType="legend"}),f.set(g,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(g)||console.warn(g+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,u)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();vm(r,function(l){var f=l.type,c=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Du(c,{normal:h,emphasis:d},{defaultText:l.title}),ng(c)})},e.prototype._createItem=function(r,n,i,a,o,s,u,l,f,c,h){var d=r.visualDrawType,v=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");f=b||f||"roundRect";var C=O$(f,a,u,l,d,p,h),w=new wh,D=a.getModel("textStyle");if(_e(r.getLegendIcon)&&(!b||b==="inherit"))w.add(r.getLegendIcon({itemWidth:v,itemHeight:g,icon:f,iconRotate:m,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:y}));else{var _=b==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;w.add(P$({itemWidth:v,itemHeight:g,icon:f,iconRotate:_,itemStyle:C.itemStyle,lineStyle:C.lineStyle,symbolKeepAspect:y}))}var x=s==="left"?v+5:-5,S=s,O=o.get("formatter"),E=n;me(O)&&O?E=O.replace("{name}",n??""):_e(O)&&(E=O(n));var P=p?D.getTextColor():a.get("inactiveColor");w.add(new Tt({style:Bi(D,{text:E,x,y:g/2,fill:P,align:S,verticalAlign:"middle"},{inheritColor:P})}));var F=new _t({shape:w.getBoundingRect(),style:{fill:"transparent"}}),M=a.getModel("tooltip");return M.get("show")&&pc({el:F,componentModel:o,itemName:n,itemTooltipOption:M.option}),w.add(F),w.eachChild(function(B){B.silent=!0}),F.silent=!c,this.getContentGroup().add(w),ng(w),w.__legendDataIndex=i,w},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Au(r.get("orient"),u,r.get("itemGap"),i.width,i.height);var f=u.getBoundingRect(),c=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Au("horizontal",l,r.get("selectorItemGap",!0));var h=l.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),g=r.getOrient().index,p=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=f[p]+v:c[g]+=h[p]+v,d[1-g]+=f[m]/2-h[m]/2,l.x=d[0],l.y=d[1],u.x=c[0],u.y=c[1];var b={x:0,y:0};return b[p]=f[p]+v+h[p],b[m]=Math.max(f[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return u.x=c[0],u.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Pr);function O$(t,e,r,n,i,a,o){function s(p,m){p.lineWidth==="auto"&&(p.lineWidth=m.lineWidth>0?2:0),vm(p,function(y,b){p[b]==="inherit"&&(p[b]=m[b])})}var u=e.getModel("itemStyle"),l=u.getItemStyle(),f=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=u.getShallow("decal");l.decal=!c||c==="inherit"?n.decal:a0(c,o),l.fill==="inherit"&&(l.fill=n[i]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(i==="fill"?n:r).opacity),s(l,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=e.get("inactiveBorderWidth"),g=l[f];l.lineWidth=v==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=e.get("inactiveColor"),l.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:l,lineStyle:d}}function P$(t){var e=t.icon||"roundRect",r=rs(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function hT(t,e,r,n){gm(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),pm(t,e,r,n)}function dT(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;n<i&&!(r=e[n].states.emphasis);)n++;return r&&r.hoverLayer}function pm(t,e,r,n){dT(r)||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function gm(t,e,r,n){dT(r)||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function B$(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var n=0;n<e.length;n++)if(!e[n].isSelected(r.name))return!1;return!0})}function el(t,e,r){var n={},i=t==="toggleSelected",a;return r.eachComponent("legend",function(o){i&&a!=null?o[a?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),a=o.isSelected(e.name));var s=o.getData();N(s,function(u){var l=u.get("name");if(!(l===`
170
+ `||l==="")){var f=o.isSelected(l);n.hasOwnProperty(l)?n[l]=n[l]&&f:n[l]=f}})}),t==="allSelect"||t==="inverseSelect"?{selected:n}:{name:e.name,selected:n}}function M$(t){t.registerAction("legendToggleSelect","legendselectchanged",wt(el,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",wt(el,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",wt(el,"inverseSelect")),t.registerAction("legendSelect","legendselected",wt(el,"select")),t.registerAction("legendUnSelect","legendunselected",wt(el,"unSelect"))}function vT(t){t.registerComponentModel(dm),t.registerComponentView(cT),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,B$),t.registerSubTypeDefaulter("legend",function(){return"plain"}),M$(t)}var F$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},e.prototype.init=function(r,n,i){var a=Pc(r);t.prototype.init.call(this,r,n,i),pT(this,r,a)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),pT(this,this.option,r)},e.type="legend.scroll",e.defaultOption=lx(dm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(dm);function pT(t,e,r){var n=t.getOrient(),i=[1,1];i[n.index]=0,ka(e,r,{type:"box",ignoreSize:!!i})}var gT=Lt,mm=["width","height"],ym=["x","y"],L$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!0,r._currentIndex=0,r}return e.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new gT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new gT)},e.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(r,n,i,a,o,s,u){var l=this;t.prototype.renderInner.call(this,r,n,i,a,o,s,u);var f=this._controllerGroup,c=n.get("pageIconSize",!0),h=ce(c)?c:[c,c];v("pagePrev",0);var d=n.getModel("pageTextStyle");f.add(new Tt({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(g,p){var m=g+"DataIndex",y=mg(n.get("pageIcons",!0)[n.getOrient().name][p],{onclick:ht(l._pageGo,l,m,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=g,f.add(y)}},e.prototype.layoutInner=function(r,n,i,a,o,s){var u=this.getSelectorGroup(),l=r.getOrient().index,f=mm[l],c=ym[l],h=mm[1-l],d=ym[1-l];o&&Au("horizontal",u,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),g=u.getBoundingRect(),p=[-g.x,-g.y],m=We(i);o&&(m[f]=i[f]-g[f]-v);var y=this._layoutContentAndController(r,a,m,l,f,h,d,c);if(o){if(s==="end")p[l]+=y[f]+v;else{var b=g[f]+v;p[l]-=b,y[c]-=b}y[f]+=g[f]+v,p[1-l]+=y[d]+y[h]/2-g[h]/2,y[h]=Math.max(y[h],g[h]),y[d]=Math.min(y[d],g[d]+p[1-l]),u.x=p[0],u.y=p[1],u.markRedraw()}return y},e.prototype._layoutContentAndController=function(r,n,i,a,o,s,u,l){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;Au(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Au("horizontal",h,r.get("pageButtonItemGap",!0));var d=f.getBoundingRect(),v=h.getBoundingRect(),g=this._showController=d[o]>i[o],p=[-d.x,-d.y];n||(p[a]=f[l]);var m=[0,0],y=[-v.x,-v.y],b=Be(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var C=r.get("pageButtonPosition",!0);C==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+b}y[1-a]+=d[s]/2-v[s]/2,f.setPosition(p),c.setPosition(m),h.setPosition(y);var w={x:0,y:0};if(w[o]=g?i[o]:d[o],w[s]=Math.max(d[s],v[s]),w[u]=Math.min(0,v[u]+y[1-a]),c.__rectSize=i[o],g){var D={x:0,y:0};D[o]=Math.max(i[o]-v[o]-b,0),D[s]=w[s],c.setClipPath(new _t({shape:D})),c.__rectSize=D[o]}else h.eachChild(function(x){x.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(r);return _.pageIndex!=null&&Mt(f,{x:_.contentPosition[0],y:_.contentPosition[1]},g?r:null),this._updatePageInfoView(r,_),w},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,d=i.childOfName(f);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,u=s!=null?s+1:0,l=n.pageCount;a&&o&&a.setStyle("text",me(o)?o.replace("{current}",u==null?"":u+"").replace("{total}",l==null?"":l+""):o({current:u,total:l}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=mm[o],u=ym[o],l=this._findTargetItemIndex(n),f=i.children(),c=f[l],h=f.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var g=C(c);v.contentPosition[o]=-g.s;for(var p=l+1,m=g,y=g,b=null;p<=h;++p)b=C(f[p]),(!b&&y.e>m.s+a||b&&!w(b,m.s))&&(y.i>m.i?m=y:m=b,m&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=m.i),++v.pageCount)),y=b;for(var p=l-1,m=g,y=g,b=null;p>=-1;--p)b=C(f[p]),(!b||!w(y,b.s))&&m.i<y.i&&(y=m,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=m.i),++v.pageCount,++v.pageIndex),m=b;return v;function C(D){if(D){var _=D.getBoundingRect(),x=_[u]+D[u];return{s:x,e:x+_[s],i:D.__legendDataIndex}}}function w(D,_){return D.e>=_&&D.s<=_+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var u=o.__legendDataIndex;a==null&&u!=null&&(a=s),u===r&&(n=s)}),n??a},e.type="legend.scroll",e}(cT);function R$(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function I$(t){Ii(vT),t.registerComponentModel(F$),t.registerComponentView(L$),R$(t)}function N$(t){Ii(vT),Ii(I$)}var mT={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},k$=function(){function t(e){var r=this._condVal=me(e)?new RegExp(e):Cw(e)?e:null;if(r==null){var n="";process.env.NODE_ENV!=="production"&&(n=dr("Illegal regexp",e,"in")),Ue(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return me(r)?this._condVal.test(e):rt(r)?this._condVal.test(e+""):!1},t}(),z$=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),j$=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(!e[r].evaluate())return!1;return!0},t}(),V$=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r<e.length;r++)if(e[r].evaluate())return!0;return!1},t}(),H$=function(){function t(){}return t.prototype.evaluate=function(){return!this.child.evaluate()},t}(),W$=function(){function t(){}return t.prototype.evaluate=function(){for(var e=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},t}();function bm(t,e){if(t===!0||t===!1){var r=new z$;return r.value=t,r}var n="";return bT(t)||(process.env.NODE_ENV!=="production"&&(n=dr("Illegal config. Expect a plain object but actually",t)),Ue(n)),t.and?yT("and",t,e):t.or?yT("or",t,e):t.not?$$(t,e):G$(t,e)}function yT(t,e,r){var n=e[t],i="";process.env.NODE_ENV!=="production"&&(i=dr('"and"/"or" condition should only be `'+t+": [...]` and must not be empty array.","Illegal condition:",e)),ce(n)||Ue(i),n.length||Ue(i);var a=t==="and"?new j$:new V$;return a.children=ge(n,function(o){return bm(o,r)}),a.children.length||Ue(i),a}function $$(t,e){var r=t.not,n="";process.env.NODE_ENV!=="production"&&(n=dr('"not" condition should only be `not: {}`.',"Illegal condition:",t)),bT(r)||Ue(n);var i=new H$;return i.child=bm(r,e),i.child||Ue(n),i}function G$(t,e){for(var r="",n=e.prepareGetValue(t),i=[],a=Xe(t),o=t.parser,s=o?cS(o):null,u=0;u<a.length;u++){var l=a[u];if(!(l==="parser"||e.valueGetterAttrMap.get(l))){var f=xe(mT,l)?mT[l]:l,c=t[l],h=s?s(c):c,d=o7(f,h)||f==="reg"&&new k$(h);d||(process.env.NODE_ENV!=="production"&&(r=dr('Illegal relational operation: "'+l+'" in condition:',t)),Ue(r)),i.push(d)}}i.length||(process.env.NODE_ENV!=="production"&&(r=dr("Relational condition must have at least one operator.","Illegal condition:",t)),Ue(r));var v=new W$;return v.valueGetterParam=n,v.valueParser=s,v.getValue=e.getValue,v.subCondList=i,v}function bT(t){return Ce(t)&&!Ht(t)}var U$=function(){function t(e,r){this._cond=bm(e,r)}return t.prototype.evaluate=function(){return this._cond.evaluate()},t}();function q$(t,e){return new U$(t,e)}var Y$={type:"echarts:filter",transform:function(t){for(var e=t.upstream,r,n=q$(t.config,{valueGetterAttrMap:Ae({dimension:!0}),prepareGetValue:function(s){var u="",l=s.dimension;xe(s,"dimension")||(process.env.NODE_ENV!=="production"&&(u=dr('Relation condition must has prop "dimension" specified.',"Illegal condition:",s)),Ue(u));var f=e.getDimensionInfo(l);return f||(process.env.NODE_ENV!=="production"&&(u=dr("Can not find dimension info via: "+l+`.
171
+ `,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
172
+ `,"Illegal condition:",s,`.
173
+ `)),Ue(u)),{dimIdx:f.index}},getValue:function(s){return e.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)r=e.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},Cm="";process.env.NODE_ENV!=="production"&&(Cm=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var X$={type:"echarts:sort",transform:function(t){var e=t.upstream,r=t.config,n="",i=pt(r);i.length||(process.env.NODE_ENV!=="production"&&(n="Empty `config` in sort transform."),Ue(n));var a=[];N(i,function(f){var c=f.dimension,h=f.order,d=f.parser,v=f.incomparable;if(c==null&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "dimension" specified.'+Cm),Ue(n)),h!=="asc"&&h!=="desc"&&(process.env.NODE_ENV!=="production"&&(n='Sort transform config must has "order" specified.'+Cm),Ue(n)),v&&v!=="min"&&v!=="max"){var g="";process.env.NODE_ENV!=="production"&&(g='incomparable must be "min" or "max" rather than "'+v+'".'),Ue(g)}if(h!=="asc"&&h!=="desc"){var p="";process.env.NODE_ENV!=="production"&&(p='order must be "asc" or "desc" rather than "'+h+'".'),Ue(p)}var m=e.getDimensionInfo(c);m||(process.env.NODE_ENV!=="production"&&(n=dr("Can not find dimension info via: "+c+`.
174
+ `,"Existing dimensions: ",e.cloneAllDimensionInfo(),`.
175
+ `,"Illegal config:",f,`.
176
+ `)),Ue(n));var y=d?cS(d):null;d&&!y&&(process.env.NODE_ENV!=="production"&&(n=dr("Invalid parser name "+d+`.
177
+ `,"Illegal config:",f,`.
178
+ `)),Ue(n)),a.push({dimIdx:m.index,parser:y,comparator:new dS(h,v)})});var o=e.sourceFormat;o!==nr&&o!==qr&&(process.env.NODE_ENV!=="production"&&(n='sourceFormat "'+o+'" is not supported yet'),Ue(n));for(var s=[],u=0,l=e.count();u<l;u++)s.push(e.getRawDataItem(u));return s.sort(function(f,c){for(var h=0;h<a.length;h++){var d=a[h],v=e.retrieveValueFromItem(f,d.dimIdx),g=e.retrieveValueFromItem(c,d.dimIdx);d.parser&&(v=d.parser(v),g=d.parser(g));var p=d.comparator.evaluate(v,g);if(p!==0)return p}return 0}),{data:s}}};function K$(t){t.registerTransform(Y$),t.registerTransform(X$)}var Z$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.prototype.init=function(r,n,i){t.prototype.init.call(this,r,n,i),this._sourceManager=new bS(this),CS(this)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.call(this,r,n),CS(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ln},e}(Ke),J$=function(t){fe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataset",r}return e.type="dataset",e}(Pr);function Q$(t){t.registerComponentModel(Z$),t.registerComponentView(J$)}var zn=ti.CMD;function ds(t,e){return Math.abs(t-e)<1e-5}function wm(t){var e=t.data,r=t.len(),n=[],i,a=0,o=0,s=0,u=0;function l(F,M){i&&i.length>2&&n.push(i),i=[F,M]}function f(F,M,B,R){ds(F,B)&&ds(M,R)||i.push(F,M,B,R,B,R)}function c(F,M,B,R,V,k){var W=Math.abs(M-F),I=Math.tan(W/4)*4/3,q=M<F?-1:1,Z=Math.cos(F),J=Math.sin(F),ne=Math.cos(M),G=Math.sin(M),L=Z*V+B,Y=J*k+R,j=ne*V+B,U=G*k+R,Q=V*I*q,K=k*I*q;i.push(L-Q*J,Y+K*Z,j+Q*G,U-K*ne,j,U)}for(var h,d,v,g,p=0;p<r;){var m=e[p++],y=p===1;switch(y&&(a=e[p],o=e[p+1],s=a,u=o,(m===zn.L||m===zn.C||m===zn.Q)&&(i=[s,u])),m){case zn.M:a=s=e[p++],o=u=e[p++],l(s,u);break;case zn.L:h=e[p++],d=e[p++],f(a,o,h,d),a=h,o=d;break;case zn.C:i.push(e[p++],e[p++],e[p++],e[p++],a=e[p++],o=e[p++]);break;case zn.Q:h=e[p++],d=e[p++],v=e[p++],g=e[p++],i.push(a+2/3*(h-a),o+2/3*(d-o),v+2/3*(h-v),g+2/3*(d-g),v,g),a=v,o=g;break;case zn.A:var b=e[p++],C=e[p++],w=e[p++],D=e[p++],_=e[p++],x=e[p++]+_;p+=1;var S=!e[p++];h=Math.cos(_)*w+b,d=Math.sin(_)*D+C,y?(s=h,u=d,l(s,u)):f(a,o,h,d),a=Math.cos(x)*w+b,o=Math.sin(x)*D+C;for(var O=(S?-1:1)*Math.PI/2,E=_;S?E>x:E<x;E+=O){var P=S?Math.max(E+O,x):Math.min(E+O,x);c(E,P,b,C,w,D)}break;case zn.R:s=a=e[p++],u=o=e[p++],h=s+e[p++],d=u+e[p++],l(h,u),f(h,u,h,d),f(h,d,s,d),f(s,d,s,u),f(s,u,h,u);break;case zn.Z:i&&f(a,o,s,u),a=s,o=u;break}}return i&&i.length>2&&n.push(i),n}function Dm(t,e,r,n,i,a,o,s,u,l){if(ds(t,r)&&ds(e,n)&&ds(i,o)&&ds(a,s)){u.push(o,s);return}var f=2/l,c=f*f,h=o-t,d=s-e,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var g=r-t,p=n-e,m=i-o,y=a-s,b=g*g+p*p,C=m*m+y*y;if(b<c&&C<c){u.push(o,s);return}var w=h*g+d*p,D=-h*m-d*y,_=b-w*w,x=C-D*D;if(_<c&&w>=0&&x<c&&D>=0){u.push(o,s);return}var S=[],O=[];Di(t,r,i,o,.5,S),Di(e,n,a,s,.5,O),Dm(S[0],O[0],S[1],O[1],S[2],O[2],S[3],O[3],u,l),Dm(S[4],O[4],S[5],O[5],S[6],O[6],S[7],O[7],u,l)}function eG(t,e){var r=wm(t),n=[];e=e||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],u=a[1];o.push(s,u);for(var l=2;l<a.length;){var f=a[l++],c=a[l++],h=a[l++],d=a[l++],v=a[l++],g=a[l++];Dm(s,u,f,c,h,d,v,g,o,e),s=v,u=g}n.push(o)}return n}function CT(t,e,r){var n=t[e],i=t[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var u=[],l=0;l<o;l++)u.push(s);var f=o*s,c=r-f;if(c>0)for(var l=0;l<c;l++)u[l%o]+=1;return u}function wT(t,e,r){for(var n=t.r0,i=t.r,a=t.startAngle,o=t.endAngle,s=Math.abs(o-a),u=s*i,l=i-n,f=u>Math.abs(l),c=CT([u,l],f?0:1,e),h=(f?s:l)/c.length,d=0;d<c.length;d++)for(var v=(f?l:s)/c[d],g=0;g<c[d];g++){var p={};f?(p.startAngle=a+h*d,p.endAngle=a+h*(d+1),p.r0=n+v*g,p.r=n+v*(g+1)):(p.startAngle=a+v*g,p.endAngle=a+v*(g+1),p.r0=n+h*d,p.r=n+h*(d+1)),p.clockwise=t.clockwise,p.cx=t.cx,p.cy=t.cy,r.push(p)}}function tG(t,e,r){for(var n=t.width,i=t.height,a=n>i,o=CT([n,i],a?0:1,e),s=a?"width":"height",u=a?"height":"width",l=a?"x":"y",f=a?"y":"x",c=t[s]/o.length,h=0;h<o.length;h++)for(var d=t[u]/o[h],v=0;v<o[h];v++){var g={};g[l]=h*c,g[f]=v*d,g[s]=c,g[u]=d,g.x+=t.x,g.y+=t.y,r.push(g)}}function DT(t,e,r,n){return t*n-r*e}function rG(t,e,r,n,i,a,o,s){var u=r-t,l=n-e,f=o-i,c=s-a,h=DT(f,c,u,l);if(Math.abs(h)<1e-6)return null;var d=t-i,v=e-a,g=DT(d,v,f,c)/h;return g<0||g>1?null:new we(g*u+t,g*l+e)}function nG(t,e,r){var n=new we;we.sub(n,r,e),n.normalize();var i=new we;we.sub(i,t,e);var a=i.dot(n);return a}function vs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function iG(t,e,r){for(var n=t.length,i=[],a=0;a<n;a++){var o=t[a],s=t[(a+1)%n],u=rG(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);u&&i.push({projPt:nG(u,e,r),pt:u,idx:a})}if(i.length<2)return[{points:t},{points:t}];i.sort(function(p,m){return p.projPt-m.projPt});var l=i[0],f=i[i.length-1];if(f.idx<l.idx){var c=l;l=f,f=c}for(var h=[l.pt.x,l.pt.y],d=[f.pt.x,f.pt.y],v=[h],g=[d],a=l.idx+1;a<=f.idx;a++)vs(v,t[a].slice());vs(v,d),vs(v,h);for(var a=f.idx+1;a<=l.idx+n;a++)vs(g,t[a%n].slice());return vs(g,h),vs(g,d),[{points:v},{points:g}]}function _T(t){var e=t.points,r=[],n=[];qD(e,r,n);var i=new Ge(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,u=i.y,l=new we,f=new we;return a>o?(l.x=f.x=s+a/2,l.y=u,f.y=u+o):(l.y=f.y=u+o/2,l.x=s,f.x=s+a),iG(e,l,f)}function Dh(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Dh(t,a[0],i,n),Dh(t,a[1],r-i,n)}return n}function aG(t,e){for(var r=[],n=0;n<e;n++)r.push(sg(t));return r}function oG(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function sG(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function uG(t,e){var r=[],n=t.shape,i;switch(t.type){case"rect":tG(n,e,r),i=_t;break;case"sector":wT(n,e,r),i=Mn;break;case"circle":wT({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),i=Mn;break;default:var a=t.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=ge(eG(t.getUpdatedPathProxy(),o),function(m){return sG(m)}),u=s.length;if(u===0)Dh(_T,{points:s[0]},e,r);else if(u===e)for(var l=0;l<u;l++)r.push({points:s[l]});else{var f=0,c=ge(s,function(m){var y=[],b=[];qD(m,y,b);var C=(b[1]-y[1])*(b[0]-y[0]);return f+=C,{poly:m,area:C}});c.sort(function(m,y){return y.area-m.area});for(var h=e,l=0;l<u;l++){var d=c[l];if(h<=0)break;var v=l===u-1?h:Math.ceil(d.area/f*e);v<0||(Dh(_T,{points:d.poly},v,r),h-=v)}}i=oc;break}if(!i)return aG(t,e);for(var g=[],l=0;l<r.length;l++){var p=new i;p.setShape(r[l]),oG(t,p),g.push(p)}return g}function lG(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var i=[],a=[],o=r<n?t:e,s=Math.min(r,n),u=Math.abs(n-r)/6,l=(s-2)/6,f=Math.ceil(u/l)+1,c=[o[0],o[1]],h=u,d=2;d<s;){var v=o[d-2],g=o[d-1],p=o[d++],m=o[d++],y=o[d++],b=o[d++],C=o[d++],w=o[d++];if(h<=0){c.push(p,m,y,b,C,w);continue}for(var D=Math.min(h,f-1)+1,_=1;_<=D;_++){var x=_/D;Di(v,p,y,C,x,i),Di(g,m,b,w,x,a),v=i[3],g=a[3],c.push(i[1],a[1],i[2],a[2],v,g),p=i[5],m=a[5],y=i[6],b=a[6]}h-=D-1}return o===t?[c,e]:[t,c]}function xT(t,e){for(var r=t.length,n=t[r-2],i=t[r-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function fG(t,e){for(var r,n,i,a=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var u=t[s],l=e[s],f=void 0,c=void 0;u?l?(r=lG(u,l),f=r[0],c=r[1],n=f,i=c):(c=xT(i||u,u),f=u):(f=xT(n||l,l),c=l),a.push(f),o.push(c)}return[a,o]}function ST(t){for(var e=0,r=0,n=0,i=t.length,a=0,o=i-2;a<i;o=a,a+=2){var s=t[o],u=t[o+1],l=t[a],f=t[a+1],c=s*f-l*u;e+=c,r+=(s+l)*c,n+=(u+f)*c}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function cG(t,e,r,n){for(var i=(t.length-2)/6,a=1/0,o=0,s=t.length,u=s-2,l=0;l<i;l++){for(var f=l*6,c=0,h=0;h<s;h+=2){var d=h===0?f:(f+h-2)%u+2,v=t[d]-r[0],g=t[d+1]-r[1],p=e[h]-n[0],m=e[h+1]-n[1],y=p-v,b=m-g;c+=y*y+b*b}c<a&&(a=c,o=l)}return o}function hG(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function dG(t,e,r,n){for(var i=[],a,o=0;o<t.length;o++){var s=t[o],u=e[o],l=ST(s),f=ST(u);a==null&&(a=l[2]<0!=f[2]<0);var c=[],h=[],d=0,v=1/0,g=[],p=s.length;a&&(s=hG(s));for(var m=cG(s,u,l,f)*6,y=p-2,b=0;b<y;b+=2){var C=(m+b)%y+2;c[b+2]=s[C]-l[0],c[b+3]=s[C+1]-l[1]}c[0]=s[m]-l[0],c[1]=s[m+1]-l[1];for(var w=n/r,D=-n/2;D<=n/2;D+=w){for(var _=Math.sin(D),x=Math.cos(D),S=0,b=0;b<s.length;b+=2){var O=c[b],E=c[b+1],P=u[b]-f[0],F=u[b+1]-f[1],M=P*x-F*_,B=P*_+F*x;g[b]=M,g[b+1]=B;var R=M-O,V=B-E;S+=R*R+V*V}if(S<v){v=S,d=D;for(var k=0;k<g.length;k++)h[k]=g[k]}}i.push({from:c,to:h,fromCp:l,toCp:f,rotation:-d})}return i}function _h(t){return t.__isCombineMorphing}var ET="__mOriginal_";function xh(t,e,r){var n=ET+e,i=t[n]||t[e];t[n]||(t[n]=t[e]);var a=r.replace,o=r.after,s=r.before;t[e]=function(){var u=arguments,l;return s&&s.apply(this,u),a?l=a.apply(this,u):l=i.apply(this,u),o&&o.apply(this,u),l}}function tl(t,e){var r=ET+e;t[r]&&(t[e]=t[r],t[r]=null)}function AT(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function TT(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=fG(wm(r),wm(n)),a=i[0],o=i[1],s=t.getComputedTransform(),u=e.getComputedTransform();function l(){this.transform=null}s&&AT(a,s),u&&AT(o,u),xh(e,"updateTransform",{replace:l}),e.transform=null;var f=dG(a,o,10,Math.PI),c=[];xh(e,"buildPath",{replace:function(h){for(var d=e.__morphT,v=1-d,g=[],p=0;p<f.length;p++){var m=f[p],y=m.from,b=m.to,C=m.rotation*d,w=m.fromCp,D=m.toCp,_=Math.sin(C),x=Math.cos(C);df(g,w,D,d);for(var S=0;S<y.length;S+=2){var O=y[S],E=y[S+1],P=b[S],F=b[S+1],M=O*v+P*d,B=E*v+F*d;c[S]=M*x-B*_+g[0],c[S+1]=M*_+B*x+g[1]}var R=c[0],V=c[1];h.moveTo(R,V);for(var S=2;S<y.length;){var P=c[S++],F=c[S++],k=c[S++],W=c[S++],I=c[S++],q=c[S++];R===P&&V===F&&k===I&&W===q?h.lineTo(I,q):h.bezierCurveTo(P,F,k,W,I,q),R=I,V=q}}}})}function _m(t,e,r){if(!t||!e)return e;var n=r.done,i=r.during;TT(t,e),e.__morphT=0;function a(){tl(e,"buildPath"),tl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},ke({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),e}function vG(t,e,r,n,i,a){var o=16;t=i===r?0:Math.round(32767*(t-r)/(i-r)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,u,l=(1<<o)/2;l>0;l/=2){var f=0,c=0;(t&l)>0&&(f=1),(e&l)>0&&(c=1),s+=l*l*(3*f^c),c===0&&(f===1&&(t=l-1-t,e=l-1-e),u=t,t=e,e=u)}return s}function Sh(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=ge(t,function(s){var u=s.getBoundingRect(),l=s.getComputedTransform(),f=u.x+u.width/2+(l?l[4]:0),c=u.y+u.height/2+(l?l[5]:0);return e=Math.min(f,e),r=Math.min(c,r),n=Math.max(f,n),i=Math.max(c,i),[f,c]}),o=ge(a,function(s,u){return{cp:s,z:vG(s[0],s[1],e,r,n,i),path:t[u]}});return o.sort(function(s,u){return s.z-u.z}).map(function(s){return s.path})}function OT(t){return uG(t.path,t.count)}function xm(){return{fromIndividuals:[],toIndividuals:[],count:0}}function pG(t,e,r){var n=[];function i(w){for(var D=0;D<w.length;D++){var _=w[D];_h(_)?i(_.childrenRef()):_ instanceof ze&&n.push(_)}}i(t);var a=n.length;if(!a)return xm();var o=r.dividePath||OT,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),xm();n=Sh(n),s=Sh(s);for(var u=r.done,l=r.during,f=r.individualDelay,c=new au,h=0;h<a;h++){var d=n[h],v=s[h];v.parent=e,v.copyTransform(c),f||TT(d,v)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(w){for(var D=0;D<s.length;D++)s[D].addSelfToZr(w)}xh(e,"addSelfToZr",{after:function(w){g(w)}}),xh(e,"removeSelfFromZr",{after:function(w){for(var D=0;D<s.length;D++)s[D].removeSelfFromZr(w)}});function p(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,tl(e,"addSelfToZr"),tl(e,"removeSelfFromZr")}var m=s.length;if(f)for(var y=m,b=function(){y--,y===0&&(p(),u&&u())},h=0;h<m;h++){var C=f?ke({delay:(r.delay||0)+f(h,m,n[h],s[h]),done:b},r):r;_m(n[h],s[h],C)}else e.__morphT=0,e.animateTo({__morphT:1},ke({during:function(w){for(var D=0;D<m;D++){var _=s[D];_.__morphT=e.__morphT,_.dirtyShape()}l&&l(w)},done:function(){p();for(var w=0;w<t.length;w++)tl(t[w],"updateTransform");u&&u()}},r));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function gG(t,e,r){var n=e.length,i=[],a=r.dividePath||OT;function o(d){for(var v=0;v<d.length;v++){var g=d[v];_h(g)?o(g.childrenRef()):g instanceof ze&&i.push(g)}}if(_h(t)){o(t.childrenRef());var s=i.length;if(s<n)for(var u=0,l=s;l<n;l++)i.push(sg(i[u++%s]));i.length=n}else{i=a({path:t,count:n});for(var f=t.getComputedTransform(),l=0;l<i.length;l++)i[l].setLocalTransform(f);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),xm()}i=Sh(i),e=Sh(e);for(var c=r.individualDelay,l=0;l<n;l++){var h=c?ke({delay:(r.delay||0)+c(l,n,i[l],e[l])},r):r;_m(i[l],e[l],h)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function PT(t){return ce(t[0])}function BT(t,e){for(var r=[],n=t.length,i=0;i<n;i++)r.push({one:t[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var u=r[s].many;if(u.length<=1)if(s)s=0;else return r;var a=u.length,l=Math.ceil(a/2);r[i].many=u.slice(l,a),r[s].many=u.slice(0,l),s++}return r}var mG={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var i=sg(t.path);i.setStyle("opacity",r),e.push(i)}return e},split:null};function Sm(t,e,r,n,i,a){if(!t.length||!e.length)return;var o=Go("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},o),l,f;PT(t)&&(l=t,f=e),PT(e)&&(l=e,f=t);function c(m,y,b,C,w){var D=m.many,_=m.one;if(D.length===1&&!w){var x=y?D[0]:_,S=y?_:D[0];if(_h(x))c({many:[x],one:S},!0,b,C,!0);else{var O=s?ke({delay:s(b,C)},u):u;_m(x,S,O),a(x,S,x,S,O)}}else for(var E=ke({dividePath:mG[r],individualDelay:s&&function(V,k,W,I){return s(V+b,C)}},u),P=y?pG(D,_,E):gG(_,D,E),F=P.fromIndividuals,M=P.toIndividuals,B=F.length,R=0;R<B;R++){var O=s?ke({delay:s(R,B)},u):u;a(F[R],M[R],y?D[R]:m.one,y?m.one:D[R],O)}}for(var h=l?l===t:t.length>e.length,d=l?BT(f,l):BT(h?e:t,[h?t:e]),v=0,g=0;g<d.length;g++)v+=d[g].many.length;for(var p=0,g=0;g<d.length;g++)c(d[g],h,p,v),p+=d[g].many.length}function Ka(t){if(!t)return[];if(ce(t)){for(var e=[],r=0;r<t.length;r++)e.push(Ka(t[r]));return e}var n=[];return t.traverse(function(i){i instanceof ze&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var MT=1e4,yG=0,FT=1,LT=2,bG=ut();function CG(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var i=t.getDimensionInfo(r[n]);if(i&&i.otherDims[e]===0)return r[n]}}function wG(t,e,r){var n=t.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=t.get(n.name,e);return i&&i.categories[a]||a+""}}function RT(t,e,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=CG(t,i);if(a){var o=wG(t,e,a);return o}var s=t.getRawDataItem(e),u=n?"childGroupId":"groupId";if(s&&s[u])return s[u]+"";if(!n)return r||t.getId(e)}function IT(t){var e=[];return N(t,function(r){var n=r.data,i=r.dataGroupId;if(n.count()>MT){process.env.NODE_ENV!=="production"&&Dt("Universal transition is disabled on large data > 10k.");return}for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:RT(n,o,i,!1),childGroupId:RT(n,o,i,!0),divide:r.divide,dataIndex:o})}),e}function Em(t,e,r){t.traverse(function(n){n instanceof ze&&Ut(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Am(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function ps(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function DG(t,e,r){var n=Go("update",r,e);n&&t.traverse(function(i){if(i instanceof Ei){var a=O6(i);a&&i.animateFrom({style:a},n)}})}function _G(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var i=t[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function NT(t,e,r){var n=IT(t),i=IT(e);function a(b,C,w,D,_){(w||b)&&C.animateFrom({style:w&&w!==b?ae(ae({},w.style),b.style):b.style},_)}var o=!1,s=yG,u=Ae(),l=Ae();n.forEach(function(b){b.groupId&&u.set(b.groupId,!0),b.childGroupId&&l.set(b.childGroupId,!0)});for(var f=0;f<i.length;f++){var c=i[f].groupId;if(l.get(c)){s=FT;break}var h=i[f].childGroupId;if(h&&u.get(h)){s=LT;break}}function d(b,C){return function(w){var D=w.data,_=w.dataIndex;return C?D.getId(_):b?s===FT?w.childGroupId:w.groupId:s===LT?w.childGroupId:w.groupId}}var v=_G(n,i),g={};if(!v)for(var f=0;f<i.length;f++){var p=i[f],m=p.data.getItemGraphicEl(p.dataIndex);m&&(g[m.id]=!0)}function y(b,C){var w=n[C],D=i[b],_=D.data.hostModel,x=w.data.getItemGraphicEl(w.dataIndex),S=D.data.getItemGraphicEl(D.dataIndex);if(x===S){S&&DG(S,D.dataIndex,_);return}x&&g[x.id]||S&&(ps(S),x?(ps(x),Am(x),o=!0,Sm(Ka(x),Ka(S),D.divide,_,b,a)):Em(S,_,b))}new w0(n,i,d(!0,v),d(!1,v),null,"multiple").update(y).updateManyToOne(function(b,C){var w=i[b],D=w.data,_=D.hostModel,x=D.getItemGraphicEl(w.dataIndex),S=yt(ge(C,function(O){return n[O].data.getItemGraphicEl(n[O].dataIndex)}),function(O){return O&&O!==x&&!g[O.id]});x&&(ps(x),S.length?(N(S,function(O){ps(O),Am(O)}),o=!0,Sm(Ka(S),Ka(x),w.divide,_,b,a)):Em(x,_,w.dataIndex))}).updateOneToMany(function(b,C){var w=n[C],D=w.data.getItemGraphicEl(w.dataIndex);if(!(D&&g[D.id])){var _=yt(ge(b,function(S){return i[S].data.getItemGraphicEl(i[S].dataIndex)}),function(S){return S&&S!==D}),x=i[b[0]].data.hostModel;_.length&&(N(_,function(S){return ps(S)}),D?(ps(D),Am(D),o=!0,Sm(Ka(D),Ka(_),w.divide,x,b[0],a)):N(_,function(S){return Em(S,x,b[0])}))}}).updateManyToMany(function(b,C){new w0(C,b,function(w){return n[w].data.getId(n[w].dataIndex)},function(w){return i[w].data.getId(i[w].dataIndex)}).update(function(w,D){y(b[w],C[D])}).execute()}).execute(),o&&N(e,function(b){var C=b.data,w=C.hostModel,D=w&&r.getViewOfSeriesModel(w),_=Go("update",w,0);D&&w.isAnimationEnabled()&&_&&_.duration>0&&D.group.traverse(function(x){x instanceof ze&&!x.animators.length&&x.animateFrom({style:{opacity:0}},_)})})}function kT(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function zT(t){return ce(t)?t.sort().join(","):t}function Wi(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function xG(t,e){var r=Ae(),n=Ae(),i=Ae();N(t.oldSeries,function(o,s){var u=t.oldDataGroupIds[s],l=t.oldData[s],f=kT(o),c=zT(f);n.set(c,{dataGroupId:u,data:l}),ce(f)&&N(f,function(h){i.set(h,{key:c,dataGroupId:u,data:l})})});function a(o){r.get(o)&&Dt("Duplicated seriesKey in universalTransition "+o)}return N(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),u=o.getData(),l=kT(o),f=zT(l),c=n.get(f);if(c)process.env.NODE_ENV!=="production"&&a(f),r.set(f,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Wi(c.data),data:c.data}],newSeries:[{dataGroupId:s,divide:Wi(u),data:u}]});else if(ce(l)){process.env.NODE_ENV!=="production"&&a(f);var h=[];N(l,function(g){var p=n.get(g);p.data&&h.push({dataGroupId:p.dataGroupId,divide:Wi(p.data),data:p.data})}),h.length&&r.set(f,{oldSeries:h,newSeries:[{dataGroupId:s,data:u,divide:Wi(u)}]})}else{var d=i.get(l);if(d){var v=r.get(d.key);v||(v={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Wi(d.data)}],newSeries:[]},r.set(d.key,v)),v.newSeries.push({dataGroupId:s,data:u,divide:Wi(u)})}}}}),r}function jT(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function SG(t,e,r,n){var i=[],a=[];N(pt(t.from),function(o){var s=jT(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Wi(e.oldData[s]),groupIdDim:o.dimension})}),N(pt(t.to),function(o){var s=jT(r.updatedSeries,o);if(s>=0){var u=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:u,divide:Wi(u),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&NT(i,a,n)}function EG(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(pt(n.seriesTransition),function(i){N(pt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][Nc]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var i=bG(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)N(pt(a),function(d){SG(d,i,n,r)});else{var o=xG(i,n);N(o.keys(),function(d){var v=o.get(d);NT(v.oldSeries,v.newSeries,r)})}N(n.updatedSeries,function(d){d[Nc]&&(d[Nc]=!1)})}for(var s=e.getSeries(),u=i.oldSeries=[],l=i.oldDataGroupIds=[],f=i.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<MT&&(u.push(s[c]),l.push(s[c].get("dataGroupId")),f.push(h))}})}function VT(t,e,r){var n=Co.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=i*r,n.height=a*r,n}var Tm=function(t){fe(e,t);function e(r,n,i){var a=t.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||Lf,typeof r=="string"?o=VT(r,n,i):Ce(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(xw(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=VT("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},e.prototype.createRepaintRects=function(r,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,u=!1,l=new Ge(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var b=new Ge(0,0,0,0);b.copy(y),o.push(b)}else{for(var C=!1,w=1/0,D=0,_=0;_<o.length;++_){var x=o[_];if(x.intersect(y)){var S=new Ge(0,0,0,0);S.copy(x),S.union(y),o[_]=S,C=!0;break}else if(u){l.copy(y),l.union(x);var O=y.width*y.height,E=x.width*x.height,P=l.width*l.height,F=P-O-E;F<w&&(w=F,D=_)}}if(u&&(o[D].union(y),C=!0),!C){var b=new Ge(0,0,0,0);b.copy(y),o.push(b)}u||(u=o.length>=s)}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=r[c];if(h){var d=h.shouldBePainted(i,a,!0,!0),v=h.__isRendered&&(h.__dirty&Tr||!d)?h.getPrevPaintRect():null;v&&f(v);var g=d&&(h.__dirty&Tr||!h.__isRendered)?h.getPaintRect():null;g&&f(g)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=n[c],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var v=h.getPrevPaintRect();v&&f(v)}}var p;do{p=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}for(var m=c+1;m<o.length;)o[c].intersect(o[m])?(p=!0,o[c].union(o[m]),o.splice(m,1)):m++;c++}}while(p);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,u=a.height;n=n||this.clearColor;var l=this.motionBlur&&!r,f=this.lastFrameAlpha,c=this.dpr,h=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/c,u/c));var d=this.domBack;function v(g,p,m,y){if(o.clearRect(g,p,m,y),n&&n!=="transparent"){var b=void 0;if(ff(n)){var C=n.global||n.__width===m&&n.__height===y;b=C&&n.__canvasGradient||r0(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=b,n.__width=m,n.__height=y}else Q4(n)&&(n.scaleX=n.scaleX||c,n.scaleY=n.scaleY||c,b=n0(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,p,m,y),o.restore()}l&&(o.save(),o.globalAlpha=f,o.drawImage(d,g,p,m,y),o.restore())}!i||l?v(0,0,s,u):i.length&&N(i,function(g){v(g.x*c,g.y*c,g.width*c,g.height*c)})},e}(_n),HT=1e5,Za=314159,Eh=.01,AG=.001;function TG(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function OG(t,e){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}var PG=function(){function t(e,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=ae({},n||{}),this.dpr=n.devicePixelRatio||Lf,this._singleCanvas=a,this.root=e;var o=e.style;o&&(xw(e),e.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var u=this._layers;if(a){var f=e,c=f.width,h=f.height;n.width!=null&&(c=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,f.width=c*this.dpr,f.height=h*this.dpr,this._width=c,this._height=h;var d=new Tm(f,this,this.dpr);d.__builtin__=!0,d.initContext(),u[Za]=d,d.zlevel=Za,s.push(Za),this._domRoot=e}else{this._width=Wc(e,0,n),this._height=Wc(e,1,n);var l=this._domRoot=OG(this._width,this._height);e.appendChild(l)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var r=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var u=a===0?this._backgroundColor:null;s.refresh(u)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var r=e.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(HT)),a||(a=n.ctx,a.save()),Wa(a,s,i,o===r-1))}a&&a.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(HT)},t.prototype.paintOne=function(e,r){fE(e,r)},t.prototype._paintList=function(e,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(l){l.afterBrush&&l.afterBrush()});else{var u=this;yf(function(){u._paintList(e,r,n,i)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(Za).ctx,r=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,r,n)})},t.prototype._doPaintList=function(e,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var u=this._zlevelList[s],l=this._layers[u];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&a.push(l)}for(var f=!0,c=!1,h=function(g){var p=a[g],m=p.ctx,y=o&&p.createRepaintRects(e,r,d._width,d._height),b=n?p.__startIndex:p.__drawIndex,C=!n&&p.incremental&&Date.now,w=C&&Date.now(),D=p.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(p.__startIndex===p.__endIndex)p.clear(!1,D,y);else if(b===p.__startIndex){var _=e[b];(!_.incremental||!_.notClear||n)&&p.clear(!1,D,y)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=p.__startIndex);var x,S=function(F){var M={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(x=b;x<p.__endIndex;x++){var B=e[x];if(B.__inHover&&(c=!0),i._doPaintEl(B,p,o,F,M,x===p.__endIndex-1),C){var R=Date.now()-w;if(R>15)break}}M.prevElClipPaths&&m.restore()};if(y)if(y.length===0)x=p.__endIndex;else for(var O=d.dpr,E=0;E<y.length;++E){var P=y[E];m.save(),m.beginPath(),m.rect(P.x*O,P.y*O,P.width*O,P.height*O),m.clip(),S(P),m.restore()}else m.save(),S(),m.restore();p.__drawIndex=x,p.__drawIndex<p.__endIndex&&(f=!1)},d=this,v=0;v<a.length;v++)h(v);return Pe.wxa&&N(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:c}},t.prototype._doPaintEl=function(e,r,n,i,a,o){var s=r.ctx;if(n){var u=e.getPaintRect();(!i||u&&u.intersect(i))&&(Wa(s,e,a,o),e.setPrevPaintRect(u))}else Wa(s,e,a,o)},t.prototype.getLayer=function(e,r){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Za);var n=this._layers[e];return n||(n=new Tm("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Je(n,this._layerConfig[e],!0):this._layerConfig[e-Eh]&&Je(n,this._layerConfig[e-Eh],!0),r&&(n.virtual=r),this.insertLayer(e,n),n.initContext()),n},t.prototype.insertLayer=function(e,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,u=-1;if(n[e]){process.env.NODE_ENV!=="production"&&ha("ZLevel "+e+" has been used already");return}if(!TG(r)){process.env.NODE_ENV!=="production"&&ha("Layer of zlevel "+e+" is not valid");return}if(a>0&&e>i[0]){for(u=0;u<a-1&&!(i[u]<e&&i[u+1]>e);u++);s=n[i[u]]}if(i.splice(u+1,0,e),n[e]=r,!r.virtual)if(s){var l=s.dom;l.nextSibling?o.insertBefore(r.dom,l.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];e.call(r,this._layers[a],a)}},t.prototype.eachBuiltinLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(r,o,a)}},t.prototype.eachOtherLayer=function(e,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(r,o,a)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(c,h){c.__dirty=c.__used=!1});function r(c){a&&(a.__endIndex!==c&&(a.__dirty=!0),a.__endIndex=c)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,u;for(u=0;u<e.length;u++){var i=e[u],l=i.zlevel,f=void 0;s!==l&&(s=l,o=0),i.incremental?(f=this.getLayer(l+AG,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(l+(o>0?Eh:0),this._needsManuallyCompositing),f.__builtin__||ha("ZLevel "+l+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==u&&(f.__dirty=!0),f.__startIndex=u,f.incremental?f.__drawIndex=-1:f.__drawIndex=u,r(u),a=f),i.__dirty&Tr&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=u))}r(u),this.eachBuiltinLayer(function(c,h){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Je(n[e],r,!0):n[e]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+Eh){var o=this._layers[a];Je(o,n[e],!0)}}}},t.prototype.delLayer=function(e){var r=this._layers,n=this._zlevelList,i=r[e];i&&(i.dom.parentNode.removeChild(i.dom),delete r[e],n.splice($e(n,e),1))},t.prototype.resize=function(e,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),r!=null&&(i.height=r),e=Wc(a,0,i),r=Wc(a,1,i),n.style.display="",this._width!==e||r!==this._height){n.style.width=e+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,r);this.refresh(!0)}this._width=e,this._height=r}else{if(e==null||r==null)return;this._width=e,this._height=r,this.getLayer(Za).resize(e,r)}return this},t.prototype.clearLayer=function(e){var r=this._layers[e];r&&r.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Za].dom;var r=new Tm("image",this,e.pixelRatio||this.dpr);r.initContext(),r.clear(!1,e.backgroundColor||this._backgroundColor);var n=r.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=r.dom.width,a=r.dom.height;this.eachLayer(function(c){c.__builtin__?n.drawImage(c.dom,0,0,i,a):c.renderToCanvas&&(n.save(),c.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),u=0,l=s.length;u<l;u++){var f=s[u];Wa(n,f,o,u===l-1)}return r.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();function BG(t){t.registerPainter("canvas",PG)}Ii([i$,N$,A$,x$,XW,Q$,K$,bH,iH,MH,LV,EG,BG]);const MG=z.memo(({type:t,options:e,echartRef:r})=>{const n=z.useRef(null),i=z.useRef(null);return z.useEffect(()=>(n.current&&(i.current=Qz(n.current)),()=>{i.current&&i.current.dispose()}),[]),z.useEffect(()=>{i.current&&i.current.setOption({...e})},[t,e]),z.useImperativeHandle(r,()=>({resize:()=>{i.current&&i.current.resize()}})),T.jsx("div",{ref:n,style:{width:"100%",height:"100%"}})}),WT=({moduleDataApi:t,customData:e,customeStyle:r,width:n,height:i})=>{const{globalData:a}=bo(),[o,s]=z.useState(),[u,l]=z.useState(),[f,c]=z.useState(),h=z.useRef(),d=z.useCallback(async()=>{e?t==null||t(e==null?void 0:e.dataSourceId).then(v=>{l(v)}):l([])},[e==null?void 0:e.dataSourceId,t]);return z.useEffect(()=>{e&&d()},[d,e==null?void 0:e.dataSourceId]),z.useEffect(()=>{var v,g,p,m,y,b,C,w,D,_,x,S,O,E;if(e&&u&&e.type){let P=[];c([]);const{conditionData:F}=e||{},M=(F==null?void 0:F.conditionType)==="all";P=F!=null&&F.conditionList?nw(u,F.conditionList,M):u;const B={},R={};let V=0;if(e.yAxis==="recordTotal")P.forEach(G=>{const L=G[e==null?void 0:e.xAxis];B[L]=(B[L]||0)+1,V+=1});else if(e.yAxis==="fieldValue"){P.forEach(G=>{const L=G[e==null?void 0:e.xAxis],Y=G[e==null?void 0:e.yAxisField],j=typeof Y=="number"?Y:0;R[L]=R[L]||[],R[L].push(j),V+=1});for(const G in R)switch(e==null?void 0:e.yAxisFieldType){case"sum":B[G]=R[G].reduce((L,Y)=>L+Y,0);break;case"max":B[G]=Math.max(...R[G]);break;case"min":B[G]=Math.min(...R[G]);break;case"average":B[G]=R[G].length?R[G].reduce((L,Y)=>L+Y,0)/R[G].length:0;break;default:B[G]=0}}const k={show:(v=e==null?void 0:e.chartOptions)==null?void 0:v.includes("label"),position:"top",formatter:"{c}"},W=Object.keys(B),I=Object.values(B),q={"chart-bar":{xAxis:{type:"category",data:W},yAxis:{type:"value"},series:[{data:I,type:"bar"}]},"chart-bar-pile":{xAxis:{type:"category",data:W},yAxis:{type:"value"},series:[{data:I,type:"bar"}]},"chart-bar-percentage":{xAxis:{type:"category",data:W},yAxis:{type:"value",max:100},series:[{data:W.map(G=>B[G]/V*100),type:"bar"}]},"chart-line":{xAxis:{type:"category",data:W},yAxis:{type:"value"},series:[{data:I,type:"line"}]},"chart-line-smooth":{xAxis:{type:"category",data:W},yAxis:{type:"value"},series:[{data:I,type:"line",smooth:!0}]},"chart-pie":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:I,type:"pie",radius:"50%"}]},"chart-pie-circular":{xAxis:{show:!1},yAxis:{show:!1},series:[{data:I,type:"pie",radius:["40%","70%"]}]},"chart-strip-bar":{xAxis:{type:"value"},yAxis:{type:"category",data:W},series:[{data:I,type:"bar"}]},"chart-strip-bar-pile":{xAxis:{type:"value"},yAxis:{type:"category",data:W},series:[{data:I,type:"bar"}]},"chart-strip-bar-percentage":{xAxis:{type:"value",max:100},yAxis:{type:"category",data:W},series:[{data:W.map(G=>B[G]/V*100),type:"bar"}]}},Z=(g=e==null?void 0:e.chartOptions)==null?void 0:g.includes("legend"),J=q[e.type]||{},ne={legend:{left:"center",right:"center",top:"2%",show:Z},grid:{top:"20%",bottom:"20%",right:"12%",left:"12%"},graphic:{elements:[r!=null&&r.xtitle?{type:"text",left:"center",bottom:"5%",style:{text:r==null?void 0:r.xtitle,fill:"#333",fontSize:12,fontWeight:"bold"}}:null,r!=null&&r.ytitle?{type:"text",left:"1%",top:"center",style:{text:r==null?void 0:r.ytitle,fill:"#333",fontSize:12,fontWeight:"bold"},rotation:Math.PI/2}:null]},xAxis:{...J.xAxis,axisTick:{show:(p=e==null?void 0:e.chartOptions)==null?void 0:p.includes("axis")},axisLine:{show:((m=e==null?void 0:e.chartOptions)==null?void 0:m.includes("axis"))||((y=r==null?void 0:r.xchartOptions)==null?void 0:y.includes("axisLine"))},axisLabel:{show:((b=e==null?void 0:e.chartOptions)==null?void 0:b.includes("axis"))||((C=r==null?void 0:r.xchartOptions)==null?void 0:C.includes("label"))},splitLine:{show:(w=e==null?void 0:e.chartOptions)==null?void 0:w.includes("splitLine")}},yAxis:{...J.yAxis,axisTick:{show:(D=e==null?void 0:e.chartOptions)==null?void 0:D.includes("axis")},axisLine:{show:((_=e==null?void 0:e.chartOptions)==null?void 0:_.includes("axis"))||((x=r==null?void 0:r.ychartOptions)==null?void 0:x.includes("axisLine"))},axisLabel:{show:((S=e==null?void 0:e.chartOptions)==null?void 0:S.includes("axis"))||((O=r==null?void 0:r.ychartOptions)==null?void 0:O.includes("label"))},splitLine:{show:(E=e==null?void 0:e.chartOptions)==null?void 0:E.includes("splitLine")}},series:[...J.series.map(G=>{var L;return{...G,label:k,name:e.yAxis==="recordTotal"?"统计":(L=o==null?void 0:o.find(Y=>Y.value===e.yAxisField))==null?void 0:L.label}})]};console.log("options",ne),c(ne)}},[e,r,u]),z.useEffect(()=>{var v;a!=null&&a.sourceData&&(e!=null&&e.dataSourceId)&&s((v=a==null?void 0:a.sourceData.find(g=>g.value===(e==null?void 0:e.dataSourceId)))==null?void 0:v.fields)},[a,e]),z.useEffect(()=>{var v;(n||i)&&((v=h==null?void 0:h.current)==null||v.resize())},[n,i]),T.jsx("div",{style:{width:"100%",height:"100%"},children:T.jsx(MG,{echartRef:h,type:"bar",options:f})})},FG=z.memo(({module:t,onUpdate:e,moduleDataApi:r})=>{var n;return T.jsx("div",{className:"chart-content",children:T.jsxs("div",{className:"dashboard-grid-container",children:[t.type==="text"?T.jsx(g4,{defaultValue:t.customData.editor,defaultTileValue:t.customData.title,onTitleChange:i=>{t.id&&e(t.id,{type:"text",customData:{editor:t.customData.editor,title:i}})},onChange:i=>{t.id&&e(t.id,{type:"text",customData:{title:t.customData.title,editor:i}})}}):null,t.type==="statistics"?T.jsx(iw,{customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null,t.type==="calendar"?T.jsx(vw,{customData:t.customData,moduleDataApi:r}):null,(n=t.type)!=null&&n.includes("chart")?T.jsx(WT,{width:t.w,height:t.h,customData:t.customData,customeStyle:t.customeStyle,moduleDataApi:r}):null]})})}),$T=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"17",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"28",y:"24",width:"6",height:"16",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"39",y:"8",width:"6",height:"32",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),GT=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M17 33.5L29.5 15L45 23L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),T.jsx("path",{d:"M16.5 15L30 31.5L45 28L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),UT=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("circle",{cx:"16",cy:"16",r:"16",transform:"matrix(-1 0 0 1 52 8)",fill:"#5b65f4"}),T.jsx("path",{d:"M36 8.5C36 8.22386 36.224 7.99918 36.5 8.00781C40.5621 8.13468 44.4312 9.80377 47.3137 12.6863C50.3143 15.6869 52 19.7565 52 24C52 28.2435 50.3143 32.3131 47.3137 35.3137C44.4312 38.1962 40.5621 39.8653 36.5 39.9922C36.224 40.0008 36 39.7761 36 39.5L36 24V8.5Z",fill:"#959bee"}),T.jsx("path",{d:"M46.9602 34.9602C47.1554 35.1554 47.1559 35.4726 46.9547 35.6617C45.5468 36.9842 43.91 38.0418 42.1229 38.7821C40.3358 39.5223 38.4306 39.9318 36.4999 39.9922C36.2239 40.0008 36 39.7761 36 39.5L36 25.2071C36 24.7617 36.5386 24.5386 36.8536 24.8536L46.9602 34.9602Z",fill:"#cdcff9"})]}),qT=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"31",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 31 11)",fill:"#5b65f5"}),T.jsx("rect",{x:"44",y:"18",width:"4",height:"28",rx:"0.5",transform:"rotate(90 44 18)",fill:"#5b65f5"}),T.jsx("rect",{x:"56",y:"25",width:"4",height:"40",rx:"0.5",transform:"rotate(90 56 25)",fill:"#5b65f5"}),T.jsx("rect",{x:"36",y:"32",width:"4",height:"20",rx:"0.5",transform:"rotate(90 36 32)",fill:"#5b65f5"})]}),LG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M59.3348 27.8581C59.3348 28.6621 59.0708 29.2801 58.5428 29.7121C58.0268 30.1441 57.3848 30.3601 56.6168 30.3601C55.8488 30.3601 55.2008 30.1441 54.6728 29.7121C54.1568 29.2801 53.8988 28.6621 53.8988 27.8581V26.1481C53.8988 25.3441 54.1568 24.7261 54.6728 24.2941C55.2008 23.8621 55.8488 23.6461 56.6168 23.6461C57.3848 23.6461 58.0268 23.8621 58.5428 24.2941C59.0708 24.7261 59.3348 25.3441 59.3348 26.1481V27.8581ZM50.9648 21.5401C50.9648 22.3441 50.7008 22.9621 50.1728 23.3941C49.6568 23.8261 49.0148 24.0421 48.2468 24.0421C47.4788 24.0421 46.8308 23.8261 46.3028 23.3941C45.7868 22.9621 45.5288 22.3441 45.5288 21.5401V19.8301C45.5288 19.0261 45.7868 18.4081 46.3028 17.9761C46.8308 17.5441 47.4788 17.3281 48.2468 17.3281C49.0148 17.3281 49.6568 17.5441 50.1728 17.9761C50.7008 18.4081 50.9648 19.0261 50.9648 19.8301V21.5401ZM56.6168 17.4361L50.5148 30.2521H48.2468L54.3488 17.4361H56.6168ZM48.8768 21.4681V19.9021C48.8768 19.4341 48.6668 19.2001 48.2468 19.2001C47.8268 19.2001 47.6168 19.4341 47.6168 19.9021V21.4681C47.6168 21.9361 47.8268 22.1701 48.2468 22.1701C48.6668 22.1701 48.8768 21.9361 48.8768 21.4681ZM57.2468 27.7861V26.2201C57.2468 25.7521 57.0368 25.5181 56.6168 25.5181C56.1968 25.5181 55.9868 25.7521 55.9868 26.2201V27.7861C55.9868 28.2541 56.1968 28.4881 56.6168 28.4881C57.0368 28.4881 57.2468 28.2541 57.2468 27.7861Z",fill:"#5b65f4"}),T.jsx("path",{d:"M44.0049 26.4181C44.0049 27.6901 43.5969 28.6681 42.7809 29.3521C41.9649 30.0241 40.9509 30.3601 39.7389 30.3601C38.9829 30.3601 38.2929 30.2341 37.6689 29.9821C37.0569 29.7181 36.5349 29.2741 36.1029 28.6501C35.6829 28.0261 35.4729 27.2581 35.4729 26.3461H38.4249C38.4249 26.7781 38.5449 27.1141 38.7849 27.3541C39.0369 27.5821 39.3549 27.6961 39.7389 27.6961C40.1349 27.6961 40.4529 27.5821 40.6929 27.3541C40.9329 27.1141 41.0529 26.7721 41.0529 26.3281C41.0529 25.9441 40.9209 25.6261 40.6569 25.3741C40.4049 25.1101 40.0809 24.9781 39.6849 24.9781H39.2709V22.4221H39.6849C40.0929 22.4221 40.3989 22.3021 40.6029 22.0621C40.8069 21.8221 40.9089 21.5401 40.9089 21.2161C40.9089 20.8321 40.7949 20.5321 40.5669 20.3161C40.3389 20.1001 40.0629 19.9921 39.7389 19.9921C39.4149 19.9921 39.1389 20.1001 38.9109 20.3161C38.6829 20.5321 38.5689 20.8261 38.5689 21.1981H35.6169C35.6169 20.0221 36.0069 19.0861 36.7869 18.3901C37.5789 17.6821 38.5629 17.3281 39.7389 17.3281C40.9269 17.3281 41.9109 17.6881 42.6909 18.4081C43.4709 19.1161 43.8609 20.0221 43.8609 21.1261C43.8609 22.2301 43.4169 23.0641 42.5289 23.6281C43.5129 24.3121 44.0049 25.2421 44.0049 26.4181Z",fill:"#5b65f4"}),T.jsx("path",{d:"M33.9128 30.2521H25.6688V27.5881L30.3128 22.5481C30.7448 22.0801 30.9608 21.6241 30.9608 21.1801C30.9608 20.8201 30.8588 20.5321 30.6548 20.3161C30.4628 20.1001 30.1808 19.9921 29.8088 19.9921C29.4848 19.9921 29.2028 20.0881 28.9628 20.2801C28.7348 20.4721 28.6208 20.7901 28.6208 21.2341H25.6688C25.6688 20.0221 26.0648 19.0681 26.8568 18.3721C27.6608 17.6761 28.6448 17.3281 29.8088 17.3281C31.0208 17.3281 32.0048 17.6761 32.7608 18.3721C33.5288 19.0681 33.9128 20.0101 33.9128 21.1981C33.9128 21.8221 33.7928 22.3501 33.5528 22.7821C33.3128 23.2141 32.9048 23.7361 32.3288 24.3481L29.2688 27.5881H33.9128V30.2521Z",fill:"#5b65f4"}),T.jsx("path",{d:"M22.021 30.2525H19.069V20.5865L16.333 22.9625V19.8125L19.069 17.4365H22.021V30.2525Z",fill:"#5b65f4"})]}),RG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"58",y:"25",width:"4",height:"44",rx:"0.5",transform:"rotate(90 58 25)",fill:"#5b65f4"}),T.jsx("rect",{x:"29.5",y:"33",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 29.5 33)",fill:"#959bee"}),T.jsx("path",{d:"M14.584 19L17.085 12.2832H18.8377L21.3008 19H19.7566L19.264 17.5695H16.5829L16.0808 19H14.584ZM17.0377 16.2716H18.8093L17.9282 13.7232L17.0377 16.2716ZM22.1459 19V12.2832H24.609C25.9259 12.2832 26.6933 13.0505 26.6933 14.0832C26.6933 14.7842 26.2575 15.3432 25.708 15.5232C26.3333 15.6747 26.9017 16.2432 26.9017 17.1053C26.9017 18.2042 26.068 19 24.808 19H22.1459ZM23.529 15.0116H24.3911C24.9406 15.0116 25.3006 14.7084 25.3006 14.2347C25.3006 13.7705 24.9785 13.4674 24.3722 13.4674H23.529V15.0116ZM23.529 17.8347H24.5143C25.1206 17.8347 25.4901 17.5126 25.4901 17.0105C25.4901 16.5179 25.1396 16.1768 24.5238 16.1768H23.529V17.8347ZM31.0425 19.1421C29.1383 19.1421 27.5751 17.7684 27.5751 15.6558C27.5751 13.5432 29.1762 12.1411 31.0236 12.1411C32.9751 12.1411 33.8941 13.3726 34.1309 14.3863L32.7951 14.8126C32.672 14.2726 32.1983 13.5147 31.0236 13.5147C30.0857 13.5147 29.0436 14.1968 29.0436 15.6558C29.0436 16.9821 30.0099 17.7305 31.0425 17.7305C32.2078 17.7305 32.7004 16.9726 32.8615 16.4232L34.2067 16.8211C33.9699 17.7968 33.0509 19.1421 31.0425 19.1421Z",fill:"#5b65f4"})]}),IG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{width:"26",height:"19",rx:"1",transform:"matrix(1 0 0 -1 23 36.5)",fill:"#E9EAFB"}),T.jsx("rect",{width:"26",height:"3",rx:"1",transform:"matrix(1 0 0 -1 23 14.5)",fill:"#5b65f4"}),T.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 27 25.5)",fill:"#5b65f4"}),T.jsx("rect",{width:"11",height:"3",rx:"0.5",transform:"matrix(1 0 0 -1 34 31.5)",fill:"#959bee"})]}),NG=({onOk:t})=>{const{t:e}=kr(),r=[{title:e("add.t1"),child:[{title:e("add.t2"),type:"chart-bar",icon:T.jsx($T,{})},{title:e("add.t3"),type:"chart-line",icon:T.jsx(GT,{})},{title:e("add.t4"),type:"chart-pie",icon:T.jsx(UT,{})},{title:e("add.t5"),type:"chart-strip-bar",icon:T.jsx(qT,{})}]},{title:e("add.t6"),child:[{title:e("add.t7"),type:"statistics",icon:T.jsx(LG,{})},{title:e("add.t8"),type:"text",icon:T.jsx(RG,{})},{title:e("add.t9"),type:"calendar",icon:T.jsx(IG,{})}]}],[n,i]=z.useState(!1),a=o=>{i(!1),t==null||t(o)};return T.jsx(T.Fragment,{children:T.jsx(ee.Popover,{placement:"bottomRight",open:n,onOpenChange:i,content:T.jsx("div",{className:"pivot-table-modal box-widget-popover-item-container",children:r.map((o,s)=>T.jsxs("div",{className:"box-widget-popover-item-group",children:[T.jsx("p",{className:"box-widget-popover-item-group-header",children:o.title}),T.jsx("div",{className:"box-widget-popover-item-group-content",children:o.child.map((u,l)=>T.jsxs("div",{onClick:()=>{a(u.type)},className:"box-widget-popover-item",children:[T.jsx("div",{className:"img",children:u.icon}),T.jsx("div",{className:"title",children:u.title})]},l))})]},s))}),trigger:"click",children:T.jsx(ee.Button,{children:e("add.t10")})})})},YT=({open:t,onClose:e,onOk:r,fieldOptions:n,value:i})=>{const[a]=ee.Form.useForm(),{t:o}=kr();return z.useEffect(()=>{i!=null&&i.conditionList?a.setFieldsValue(i):a.setFieldsValue({conditionList:void 0,conditionType:"all"})},[i]),T.jsx(T.Fragment,{children:T.jsx(ee.Modal,{title:o("setFilteringCriteria"),open:t,width:"600px",onOk:()=>{e==null||e(),r==null||r(a.getFieldsValue())},onCancel:()=>{e==null||e()},children:T.jsxs(ee.Form,{name:"dynamicForm",form:a,initialValues:{conditionType:"all"},style:{maxWidth:600,marginTop:"30px"},children:[T.jsx(ee.Form.Item,{noStyle:!0,dependencies:["conditionList"],children:({getFieldValue:s})=>{var u;return((u=s("conditionList"))==null?void 0:u.length)>1?T.jsxs(ee.Flex,{align:"center",gap:5,style:{marginBottom:"20px"},children:[o("conformTo"),T.jsx(ee.Form.Item,{name:"conditionType",noStyle:!0,children:T.jsx(ee.Select,{style:{width:"100px"},options:[{label:o("all"),value:"all"},{label:o("everyone"),value:"one"}]})})," ",o("condition")]}):null}}),T.jsx(ee.Form.List,{name:"conditionList",children:(s,{add:u,remove:l})=>T.jsxs(T.Fragment,{children:[s.map(({key:f,name:c,...h})=>T.jsxs(ee.Space,{style:{display:"flex",marginBottom:8},align:"baseline",children:[T.jsx(ee.Form.Item,{...h,name:[c,"field"],noStyle:!0,children:T.jsx(ee.Select,{style:{width:"100px"},options:n||[]})}),T.jsx(ee.Form.Item,{...h,name:[c,"condition"],noStyle:!0,children:T.jsx(ee.Select,{style:{width:"100px"},options:[{value:"equalto",label:o("equalto")},{value:"notequalto",label:o("notequalto")},{value:"contain",label:o("contain")},{value:"notcontain",label:o("notcontain")},{value:"null",label:o("null")},{value:"notnull",label:o("notnull")}]})}),T.jsx(ee.Form.Item,{noStyle:!0,dependencies:[["conditionList",c,"field"]],children:({getFieldValue:d})=>{var v,g;return T.jsxs(T.Fragment,{children:[((v=n==null?void 0:n.find(p=>p.value===d(["conditionList",c,"field"])))==null?void 0:v.type)!=="int"?T.jsx(ee.Form.Item,{...h,name:[c,"val"],noStyle:!0,children:T.jsx(ee.Input,{placeholder:o("pleaseEnter")})}):null,((g=n==null?void 0:n.find(p=>p.value===d(["conditionList",c,"field"])))==null?void 0:g.type)==="int"?T.jsx(ee.Form.Item,{...h,name:[c,"val"],noStyle:!0,children:T.jsx(ee.InputNumber,{placeholder:o("pleaseEnter")})}):null]})}}),T.jsx(YC,{onClick:()=>l(c)})]},f)),T.jsx(ee.Form.Item,{children:T.jsx(ee.Button,{type:"dashed",onClick:()=>{u({field:n==null?void 0:n[0].value,condition:"equalto"})},block:!0,icon:T.jsx(KC,{}),children:o("addCondition")})})]})})]})})})},kG=({selectModuleData:t,onAllValuesChange:e})=>{var g;const{globalData:r}=bo(),[n]=ee.Form.useForm(),[i,a]=z.useState(),[o,s]=z.useState(!1),u=z.useRef(),[l,f]=z.useState(0),{t:c}=kr(),h={dataSourceId:"",dataRange:"all",statisticalMethod:"recordTotal",field:""},d=()=>{setTimeout(()=>{e==null||e({...n.getFieldsValue(),conditionData:u.current})})},v=p=>{var y,b;const m=(b=(y=r==null?void 0:r.sourceData)==null?void 0:y.find(C=>C.value===p))==null?void 0:b.fields;a(m)};return z.useEffect(()=>{var p,m,y;if(t!=null&&t.customData){const b=t.customData;n.setFieldsValue(b),a(b==null?void 0:b.dataSourceId),v(b==null?void 0:b.dataSourceId),f((m=(p=b==null?void 0:b.conditionData)==null?void 0:p.conditionList)==null?void 0:m.length)}else{const b=(y=r==null?void 0:r.sourceData)==null?void 0:y[0];n.setFieldsValue({...h,dataSourceId:b==null?void 0:b.value}),v(b==null?void 0:b.value),d(),f(0)}},[t,r]),T.jsxs(T.Fragment,{children:[T.jsxs(ee.Form,{form:n,name:"customData",layout:"vertical",initialValues:h,children:[T.jsx(ee.Form.Item,{label:c("dataSource"),name:"dataSourceId",children:T.jsx(ee.Select,{options:r==null?void 0:r.sourceData,onChange:p=>{n.setFieldsValue({statisticalMethod:"recordTotal"}),v(p),d()}})}),T.jsx(ee.Form.Item,{label:c("dataRange"),name:"dataRange",extra:T.jsxs(ee.Flex,{align:"center",children:[T.jsx(ee.Button,{style:{marginLeft:"-5px"},onClick:()=>{s(!0)},type:"link",children:c("filterData")}),l>0?`${c("selectNcondition",{n:l})}`:null]}),children:T.jsx(ee.Select,{onChange:()=>{d()},options:[{value:"all",label:c("allData")}]})}),T.jsx(ee.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),T.jsx(ee.Form.Item,{label:c("statisticstMethods"),name:"statisticalMethod",children:T.jsx(ee.Select,{onChange:p=>{n.setFieldsValue({field:p==="fieldValue"?i==null?void 0:i[0].value:"",statisticalType:"sum"}),d()},options:[{value:"recordTotal",label:c("statisticstRecordNum")},{value:"fieldValue",label:c("statisticstFieldVal")}]})}),T.jsx(ee.Form.Item,{dependencies:["statisticalMethod"],children:({getFieldValue:p})=>p("statisticalMethod")==="fieldValue"?T.jsx(ee.Form.Item,{label:c("selectField"),children:T.jsxs(ee.Space.Compact,{children:[T.jsx(ee.Form.Item,{noStyle:!0,name:"field",children:T.jsx(ee.Select,{style:{width:"100px"},onChange:()=>{d()},options:i})}),T.jsx(ee.Form.Item,{name:"statisticalType",noStyle:!0,children:T.jsx(ee.Select,{style:{width:"100px"},onChange:()=>{d()},options:[{value:"sum",label:c("sumVal")},{value:"max",label:c("maxVal")},{value:"min",label:c("minVal")},{value:"average",label:c("averageVal")}]})})]})}):null})]}),T.jsx(YT,{open:o,value:(g=t==null?void 0:t.customData)==null?void 0:g.conditionData,fieldOptions:i,onClose:()=>{s(!1)},onOk:p=>{var m;u.current=p,f(((m=p==null?void 0:p.conditionList)==null?void 0:m.length)||0),d()}})]})},zG=({value:t,onChange:e})=>{const[r,n]=z.useState(),i=["#373c43","#3370ff","#4954e6","#34c724","#14c0ff","#ffc60a","#f80","#f76964"];return z.useEffect(()=>{n(t)},[t]),T.jsx("div",{className:"pane-item-body item-body-column",children:T.jsx("div",{className:"panel-single-color-selector",children:i.map((a,o)=>T.jsxs("div",{className:"panel-single-color-selector-color-item",onClick:()=>{n(a),e==null||e(a)},children:[T.jsx("div",{className:"panel-single-color-selector-color-item-background",style:{background:a}}),r===a?T.jsx("span",{className:"panel-icon",children:T.jsx($C,{})}):null]},o))})})},jG=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=ee.Form.useForm(),{t:n}=kr(),i={color:"#373c43",unit:"1",precision:"",desc:""},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return z.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),T.jsxs(ee.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[T.jsx(ee.Form.Item,{label:n("statistics.t1"),name:"color",children:T.jsx(zG,{onChange:()=>{a()}})}),T.jsx(ee.Form.Item,{label:n("statistics.t2"),extra:n("statistics.t3"),children:T.jsxs(ee.Space.Compact,{children:[T.jsx(ee.Form.Item,{name:"precision",noStyle:!0,children:T.jsx(ee.InputNumber,{min:1,max:10,style:{width:"60%"},placeholder:n("statistics.t4"),onChange:()=>{a()}})}),T.jsx(ee.Form.Item,{name:"unit",noStyle:!0,children:T.jsxs(ee.Select,{onChange:()=>{a()},children:[T.jsx(ee.Select.Option,{value:"1",children:n("statistics.t5")}),T.jsx(ee.Select.Option,{value:"2",children:n("statistics.t6")}),T.jsx(ee.Select.Option,{value:"3",children:n("statistics.t7")}),T.jsx(ee.Select.Option,{value:"4",children:n("statistics.t8")}),T.jsx(ee.Select.Option,{value:"5",children:n("statistics.t9")})]})})]})}),T.jsx(ee.Form.Item,{label:n("statistics.t10"),name:"desc",children:T.jsx(ee.Input,{onChange:()=>{a()}})})]})},VG=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=kr(),[o,s]=z.useState(),[u,l]=z.useState(),f=()=>{e==null||e()};return z.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),T.jsx(T.Fragment,{children:T.jsx(ee.Modal,{width:"65%",title:a("statisticsText"),footer:null,open:t,onOk:f,onCancel:e,closeIcon:T.jsx(nf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:T.jsxs("div",{className:"config-widget-dialog-container",children:[T.jsx("div",{className:"config-widget-dialog-content",children:T.jsx("div",{className:"config-widget-dialog-preview",children:T.jsx(iw,{customData:o,customeStyle:u,moduleDataApi:n})})}),T.jsxs("div",{className:"config-widget-dialog-panel",children:[T.jsx("div",{className:"bitable-dashboard edit-panel-container",children:T.jsx(ee.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:T.jsx(kG,{selectModuleData:i,onAllValuesChange:c=>{s(c)}})},{key:"2",label:a("customStyle"),children:T.jsx(jG,{selectModuleData:i,onAllValuesChange:c=>{l(c)}})}]})}),T.jsx("div",{className:"button-container",children:T.jsx(ee.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},HG=({selectModuleData:t,onAllValuesChange:e})=>{const{globalData:r}=bo(),[n]=ee.Form.useForm(),[i,a]=z.useState(),[o,s]=z.useState(),{t:u}=kr(),l={dataSourceId:"",dataRange:"all",startDateField:"",endDateField:"",titleField:""},f=()=>{setTimeout(()=>{e==null||e(n.getFieldsValue())})},c=h=>{var v,g;const d=(g=(v=r==null?void 0:r.sourceData)==null?void 0:v.find(p=>p.value===h))==null?void 0:g.fields;a(d),s(d==null?void 0:d.filter(p=>p.type==="timestamp"))};return z.useEffect(()=>{var h,d,v,g,p;if(t!=null&&t.customData)n.setFieldsValue(t.customData),c((h=t==null?void 0:t.customData)==null?void 0:h.dataSourceId);else{const m=(d=r==null?void 0:r.sourceData)==null?void 0:d[0],y=(v=m==null?void 0:m.fields)==null?void 0:v.filter(b=>b.type==="timestamp");n.setFieldsValue({...l,dataSourceId:m==null?void 0:m.value,titleField:(p=(g=m==null?void 0:m.fields)==null?void 0:g[0])==null?void 0:p.value,startDateField:y==null?void 0:y[0].value,endDateField:y==null?void 0:y[0].value}),c(m==null?void 0:m.value),f()}},[t,r]),T.jsxs(ee.Form,{form:n,name:"customData",labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:l,children:[T.jsx("div",{style:{fontSize:"14px",marginBottom:"5px"},children:u("data")}),T.jsx(ee.Form.Item,{label:u("dataSource"),name:"dataSourceId",children:T.jsx(ee.Select,{options:r==null?void 0:r.sourceData,onChange:h=>{a(h),f()}})}),T.jsx(ee.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),T.jsx(ee.Form.Item,{label:u("dataRange"),name:"dataRange",children:T.jsx(ee.Select,{onChange:()=>{f()},options:[{value:"all",label:u("allData")}]})}),T.jsx(ee.Divider,{orientation:"left",orientationMargin:"0",children:u("calendar.t1")}),T.jsx(ee.Form.Item,{label:u("calendar.t2"),name:"startDateField",children:T.jsx(ee.Select,{onChange:()=>{f()},options:o})}),T.jsx(ee.Form.Item,{label:u("calendar.t3"),name:"endDateField",children:T.jsx(ee.Select,{onChange:()=>{f()},options:o})}),T.jsx(ee.Form.Item,{label:u("calendar.t4"),name:"titleField",children:T.jsx(ee.Select,{onChange:()=>{f()},options:i})})]})},WG=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=kr(),[o,s]=z.useState(),u=()=>{e==null||e()};return z.useEffect(()=>{i&&s(i==null?void 0:i.customData)},[i]),T.jsx(T.Fragment,{children:T.jsx(ee.Modal,{width:"65%",title:a("calendarText"),footer:null,open:t,onOk:u,onCancel:e,closeIcon:T.jsx(nf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:T.jsxs("div",{className:"config-widget-dialog-container",children:[T.jsx("div",{className:"config-widget-dialog-content",children:T.jsx("div",{className:"config-widget-dialog-preview",style:{height:"50vh"},children:T.jsx(vw,{customData:o,moduleDataApi:n})})}),T.jsxs("div",{className:"config-widget-dialog-panel",children:[T.jsx("div",{className:"bitable-dashboard edit-panel-container",children:T.jsx(HG,{selectModuleData:i,onAllValuesChange:l=>{s(l)}})}),T.jsx("div",{className:"button-container",children:T.jsx(ee.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,customData:o})},children:a("confirm")})})]})]})})})},$G=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"17",y:"8",width:"6",height:"15.5",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"17",y:"24.5",width:"6",height:"15.5",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"28",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"28",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"50",y:"8",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"50",y:"18",width:"6",height:"22",rx:"0.5",fill:"#5b65f5"})]}),GG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"17",y:"21",width:"6",height:"6",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"17",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"28",y:"24",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"28",y:"34",width:"6",height:"6",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"39",y:"8",width:"6",height:"19",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"39",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"}),T.jsx("rect",{x:"50",y:"18",width:"6",height:"9",rx:"0.5",fill:"#959bee"}),T.jsx("rect",{x:"50",y:"28",width:"6",height:"12",rx:"0.5",fill:"#5b65f5"})]}),UG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"58",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 58 11)",fill:"#959bee"}),T.jsx("rect",{x:"42",y:"11",width:"4",height:"28",rx:"0.5",transform:"rotate(90 42 11)",fill:"#5b65f5"}),T.jsx("rect",{x:"58",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 58 18)",fill:"#959bee"}),T.jsx("rect",{x:"35.5",y:"18",width:"4",height:"21.5",rx:"0.5",transform:"rotate(90 35.5 18)",fill:"#5b65f5"}),T.jsx("rect",{x:"58",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 58 25)",fill:"#959bee"}),T.jsx("rect",{x:"23",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 23 25)",fill:"#5b65f5"}),T.jsx("rect",{x:"58",y:"32",width:"4",height:"17",rx:"0.5",transform:"rotate(90 58 32)",fill:"#959bee"}),T.jsx("rect",{x:"40",y:"32",width:"4",height:"26",rx:"0.5",transform:"rotate(90 40 32)",fill:"#5b65f5"})]}),qG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("rect",{x:"40",y:"11",width:"4",height:"15",rx:"0.5",transform:"rotate(90 40 11)",fill:"#959bee"}),T.jsx("rect",{x:"24",y:"11",width:"4",height:"8",rx:"0.5",transform:"rotate(90 24 11)",fill:"#5b65f5"}),T.jsx("rect",{x:"48",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 48 18)",fill:"#959bee"}),T.jsx("rect",{x:"31.5",y:"18",width:"4",height:"15.5",rx:"0.5",transform:"rotate(90 31.5 18)",fill:"#5b65f5"}),T.jsx("rect",{x:"60",y:"25",width:"4",height:"34",rx:"0.5",transform:"rotate(90 60 25)",fill:"#959bee"}),T.jsx("rect",{x:"25",y:"25",width:"4",height:"9",rx:"0.5",transform:"rotate(90 25 25)",fill:"#5b65f5"}),T.jsx("rect",{x:"43",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 43 32)",fill:"#959bee"}),T.jsx("rect",{x:"29",y:"32",width:"4",height:"13",rx:"0.5",transform:"rotate(90 29 32)",fill:"#5b65f5"})]}),YG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M15.5 33.5C20.2023 32.3804 23.5007 28.5533 25.7095 24.6682C28.3082 20.0974 34.0857 17.3668 38.758 19.7783L39.8066 20.3195C42.9001 21.9162 46.671 21.329 49.1326 18.8674L58 10",stroke:"#959bee",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),T.jsx("path",{d:"M16.5 15L26.844 27.6427C28.7759 30.0039 31.8825 31.0607 34.8535 30.3675L42.3359 28.6216C44.0629 28.2187 45.8748 28.401 47.4869 29.1398L57 33.5",stroke:"#5b65f4",strokeWidth:"1.5",strokeLinecap:"round"})]}),XG=()=>T.jsxs("svg",{width:"72",height:"48",viewBox:"0 0 72 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M20 24C20 32.8366 27.1634 40 36 40C44.8366 40 52 32.8366 52 24C52 15.1634 44.8366 8 36 8C27.1634 8 20 15.1634 20 24ZM46.3944 24C46.3944 29.7407 41.7407 34.3944 36 34.3944C30.2593 34.3944 25.6056 29.7407 25.6056 24C25.6056 18.2593 30.2593 13.6056 36 13.6056C41.7407 13.6056 46.3944 18.2593 46.3944 24Z",fill:"#5b65f4"}),T.jsx("path",{d:"M52 24C52 19.7565 50.3143 15.6869 47.3137 12.6863C44.3131 9.68571 40.2435 8 36 8V13.6056C38.7568 13.6056 41.4006 14.7007 43.35 16.65C45.2993 18.5994 46.3944 21.2432 46.3944 24H52Z",fill:"#959bee"}),T.jsx("path",{d:"M52 24C52 20.9896 51.1507 18.0403 49.5497 15.4909L44.8026 18.4721C45.8427 20.1283 46.3944 22.0443 46.3944 24H52Z",fill:"#cdcff9"})]}),KG=({selectModuleData:t,onAllValuesChange:e})=>{var p;const{globalData:r}=bo(),[n]=ee.Form.useForm(),[i,a]=z.useState(),[o,s]=z.useState(0),[u,l]=z.useState(!1),f=z.useRef(),{t:c}=kr(),h=ee.Form.useWatch("type",n),d={dataSourceId:"",dataRange:"all",yAxis:"recordTotal",chartOptions:["legend","label","axis","splitLine"]},v=()=>{setTimeout(()=>{e==null||e({...n.getFieldsValue(),conditionData:f.current})})},g=m=>{var b,C,w;const y=(C=(b=r==null?void 0:r.sourceData)==null?void 0:b.find(D=>D.value===m))==null?void 0:C.fields;n.setFieldsValue({xAxis:(w=y==null?void 0:y[0])==null?void 0:w.value}),a(y)};return z.useEffect(()=>{var m,y,b;if(t!=null&&t.customData){const C=t.customData;n.setFieldsValue(C),a(C==null?void 0:C.dataSourceId),g(C==null?void 0:C.dataSourceId),s((y=(m=C==null?void 0:C.conditionData)==null?void 0:m.conditionList)==null?void 0:y.length)}else{const C=(b=r==null?void 0:r.sourceData)==null?void 0:b[0];n.setFieldsValue({...d,dataSourceId:C==null?void 0:C.value,type:t==null?void 0:t.type}),g(C==null?void 0:C.value),v(),s(0)}},[t,r]),T.jsxs("div",{style:{height:"50vh",overflowX:"auto"},children:[T.jsxs(ee.Form,{form:n,name:"customData",layout:"vertical",initialValues:d,children:[T.jsx(ee.Form.Item,{label:c("dataSource"),name:"dataSourceId",children:T.jsx(ee.Select,{options:r==null?void 0:r.sourceData,onChange:m=>{n.setFieldsValue({yAxis:"recordTotal"}),a(m),v()}})}),T.jsx(ee.Form.Item,{label:c("dataRange"),name:"dataRange",extra:T.jsxs(ee.Flex,{align:"center",children:[T.jsx(ee.Button,{style:{marginLeft:"-5px"},onClick:()=>{l(!0)},type:"link",children:c("filterData")}),o>0?`${c("selectNcondition",{n:o})}`:null]}),children:T.jsx(ee.Select,{onChange:()=>{v()},options:[{value:"all",label:c("allData")}]})}),T.jsx(ee.Form.Item,{label:c("chart.t1"),name:"type",children:T.jsx(ee.Select,{onChange:()=>{v()},options:[{label:c("chart.t2"),value:"chart-bar",icon:T.jsx($T,{})},{label:c("chart.t3"),value:"chart-bar-pile",icon:T.jsx(GG,{})},{label:c("chart.t4"),value:"chart-bar-percentage",icon:T.jsx($G,{})},{label:c("chart.t5"),value:"chart-strip-bar",icon:T.jsx(qT,{})},{label:c("chart.t6"),value:"chart-strip-bar-pile",icon:T.jsx(qG,{})},{label:c("chart.t7"),value:"chart-strip-bar-percentage",icon:T.jsx(UG,{})},{label:c("chart.t8"),value:"chart-line",icon:T.jsx(GT,{})},{label:c("chart.t9"),value:"chart-line-smooth",icon:T.jsx(YG,{})},{label:c("chart.t10"),value:"chart-pie",icon:T.jsx(UT,{})},{label:c("chart.t11"),value:"chart-pie-circular",icon:T.jsx(XG,{})}],optionRender:m=>T.jsxs(ee.Flex,{align:"center",children:[T.jsx("span",{role:"img",style:{marginTop:"5px"},"aria-label":m.data.label,children:m.data.icon}),m.data.label]})})}),T.jsx(ee.Form.Item,{name:"chartOptions",label:c("chart.t12"),children:T.jsx(ee.Checkbox.Group,{onChange:()=>{v()},children:T.jsxs(ee.Row,{children:[T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"legend",style:{lineHeight:"32px"},children:c("chart.t13")})}),T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"label",style:{lineHeight:"32px"},children:c("chart.t14")})}),T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"axis",style:{lineHeight:"32px"},children:c("chart.t15")})}),T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"splitLine",style:{lineHeight:"32px"},children:c("chart.t16")})})]})})}),T.jsx(ee.Divider,{style:{borderColor:"#e2e2e2",marginTop:0}}),T.jsx(ee.Form.Item,{label:h!=null&&h.includes("pie")?c("chart.t17"):c("chart.t18"),name:"xAxis",children:T.jsx(ee.Select,{onChange:()=>{v()},options:i})}),T.jsx(ee.Form.Item,{label:h!=null&&h.includes("pie")?c("chart.t19"):c("chart.t20"),name:"yAxis",children:T.jsx(ee.Select,{onChange:m=>{n.setFieldsValue({yAxisField:m==="fieldValue"?i==null?void 0:i[0].value:"",yAxisFieldType:"sum"}),v()},options:[{value:"recordTotal",label:c("statisticstRecordNum")},{value:"fieldValue",label:c("statisticstFieldVal")}]})}),T.jsx(ee.Form.Item,{dependencies:["yAxis"],children:({getFieldValue:m})=>m("yAxis")==="fieldValue"?T.jsx(ee.Form.Item,{label:c("selectField"),children:T.jsxs(ee.Space.Compact,{children:[T.jsx(ee.Form.Item,{noStyle:!0,name:"yAxisField",children:T.jsx(ee.Select,{style:{width:"100px"},onChange:()=>{v()},options:i})}),T.jsx(ee.Form.Item,{name:"yAxisFieldType",noStyle:!0,children:T.jsx(ee.Select,{style:{width:"100px"},onChange:()=>{v()},options:[{value:"sum",label:c("sumVal")},{value:"max",label:c("maxVal")},{value:"min",label:c("minVal")},{value:"average",label:c("averageVal")}]})})]})}):null})]}),T.jsx(YT,{open:u,value:(p=t==null?void 0:t.customData)==null?void 0:p.conditionData,fieldOptions:i,onClose:()=>{l(!1)},onOk:m=>{var y;f.current=m,s(((y=m==null?void 0:m.conditionList)==null?void 0:y.length)||0),v()}})]})},ZG=({selectModuleData:t,onAllValuesChange:e})=>{const[r]=ee.Form.useForm(),{t:n}=kr(),i={xtitle:"",ytitle:"",xchartOptions:[],ychartOptions:[]},a=()=>{setTimeout(()=>{e==null||e(r.getFieldsValue())})};return z.useEffect(()=>{t!=null&&t.customeStyle?r.setFieldsValue(t.customeStyle):r.setFieldsValue(i)},[t]),T.jsx("div",{style:{height:"50vh",overflowX:"auto"},children:T.jsxs(ee.Form,{form:r,name:"customeStyle",layout:"vertical",initialValues:i,children:[T.jsx(ee.Divider,{orientation:"left",orientationMargin:"0",children:n("chart.t21")}),T.jsx(ee.Form.Item,{label:n("chart.t22"),name:"xtitle",children:T.jsx(ee.Input,{onChange:()=>{a()}})}),T.jsx(ee.Form.Item,{name:"xchartOptions",label:n("chart.t23"),children:T.jsx(ee.Checkbox.Group,{onChange:()=>{a()},children:T.jsxs(ee.Row,{children:[T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"label",style:{lineHeight:"32px"},children:n("chart.t24")})}),T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:n("chart.t25")})})]})})}),T.jsx(ee.Divider,{orientation:"left",orientationMargin:"0",children:n("chart.t26")}),T.jsx(ee.Form.Item,{label:n("chart.t27"),name:"ytitle",children:T.jsx(ee.Input,{onChange:()=>{a()}})}),T.jsx(ee.Form.Item,{name:"ychartOptions",label:n("chart.t28"),children:T.jsx(ee.Checkbox.Group,{onChange:()=>{a()},children:T.jsxs(ee.Row,{children:[T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"label",style:{lineHeight:"32px"},children:n("chart.t29")})}),T.jsx(ee.Col,{span:12,children:T.jsx(ee.Checkbox,{value:"axisLine",style:{lineHeight:"32px"},children:n("chart.t30")})})]})})})]})})},JG=({open:t,onClose:e,onOk:r,moduleDataApi:n,selectModuleData:i})=>{const{t:a}=kr(),[o,s]=z.useState(),[u,l]=z.useState(),f=()=>{e==null||e()};return z.useEffect(()=>{i&&(s(i==null?void 0:i.customData),l(i==null?void 0:i.customeStyle))},[i]),T.jsx(T.Fragment,{children:T.jsx(ee.Modal,{width:"65%",title:a("chartText"),footer:null,open:t,onOk:f,onCancel:e,closeIcon:T.jsx(nf,{style:{marginTop:"10px"}}),styles:{header:{padding:"20px",borderBottom:"1px solid #dee0e3",marginBottom:0},content:{padding:0},body:{overflowY:"auto",flex:1}},children:T.jsxs("div",{className:"config-widget-dialog-container",children:[T.jsx("div",{className:"config-widget-dialog-content",children:T.jsx("div",{className:"config-widget-dialog-preview",children:T.jsx(WT,{customData:o,customeStyle:u,moduleDataApi:n})})}),T.jsxs("div",{className:"config-widget-dialog-panel",children:[T.jsx("div",{className:"bitable-dashboard edit-panel-container",children:T.jsx(ee.Tabs,{defaultActiveKey:"1",items:[{key:"1",label:a("typeData"),children:T.jsx(KG,{selectModuleData:i,onAllValuesChange:c=>{s(c)}})},{key:"2",label:a("customStyle"),children:T.jsx(ZG,{selectModuleData:i,onAllValuesChange:c=>{l(c)}})}]})}),T.jsx("div",{className:"button-container",children:T.jsx(ee.Button,{type:"primary",onClick:()=>{r==null||r({id:i==null?void 0:i.id,type:i==null?void 0:i.type,customData:o,customeStyle:u})},children:a("confirm")})})]})]})})})},Me=t=>typeof t=="string",rl=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},XT=t=>t==null?"":""+t,QG=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},eU=/###/g,KT=t=>t&&t.indexOf("###")>-1?t.replace(eU,"."):t,ZT=t=>!t||Me(t),nl=(t,e,r)=>{const n=Me(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(ZT(t))return{};const a=KT(n[i]);!t[a]&&r&&(t[a]=new r),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++i}return ZT(t)?{}:{obj:t,k:KT(n[i])}},JT=(t,e,r)=>{const{obj:n,k:i}=nl(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=nl(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=nl(t,o,Object),s&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},tU=(t,e,r,n)=>{const{obj:i,k:a}=nl(t,e,Object);i[a]=i[a]||[],i[a].push(r)},Ah=(t,e)=>{const{obj:r,k:n}=nl(t,e);if(r)return r[n]},rU=(t,e,r)=>{const n=Ah(t,r);return n!==void 0?n:Ah(e,r)},QT=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?Me(t[n])||t[n]instanceof String||Me(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):QT(t[n],e[n],r):t[n]=e[n]);return t},gs=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var nU={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const iU=t=>Me(t)?t.replace(/[&<>"'\/]/g,e=>nU[e]):t;class aU{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const oU=[" ",",","?","!",";"],sU=new aU(20),uU=(t,e,r)=>{e=e||"",r=r||"";const n=oU.filter(o=>e.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=sU.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},Om=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let i=t;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},Th=t=>t&&t.replace("_","-"),lU={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Oh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||lU,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}warn(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}error(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"error","")}deprecate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(Me(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new Oh(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oh(this.logger,e)}}var jn=new Oh;class Ph{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[s,u]=o;for(let l=0;l<u;l++)s.apply(s,[e,...n])})}}class eO extends Ph{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):Me(n)&&a?s.push(...n.split(a)):s.push(n)));const u=Ah(this.data,s);return!u&&!r&&!n&&e.indexOf(".")>-1&&(e=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Me(n)?u:Om(this.data&&this.data[e]&&this.data[e][r],n,a)}addResource(e,r,n,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),JT(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in n)(Me(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,r];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=Ah(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?QT(u,n,a):u={...u,...n},JT(this.data,s,u),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var tO={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,n,i))}),e}};const rO={};class Bh extends Ph{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),QG(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=jn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!uU(e,n,i);if(o&&!s){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const l=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(i)}return Me(a)&&(a=[a]),{key:e,namespaces:a}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],r),u=s[s.length-1],l=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const C=r.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${C}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${C}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:o}const c=this.resolve(e,r);let h=c&&c.res;const d=c&&c.usedKey||o,v=c&&c.exactUsedKey||o,g=Object.prototype.toString.apply(h),p=["[object Number]","[object Function]","[object RegExp]"],m=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Me(h)&&typeof h!="boolean"&&typeof h!="number";if(y&&h&&b&&p.indexOf(g)<0&&!(Me(m)&&Array.isArray(h))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...r,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(c.res=C,c.usedParams=this.getUsedParamsDetails(r),c):C}if(a){const C=Array.isArray(h),w=C?[]:{},D=C?v:d;for(const _ in h)if(Object.prototype.hasOwnProperty.call(h,_)){const x=`${D}${a}${_}`;w[_]=this.translate(x,{...r,joinArrays:!1,ns:s}),w[_]===x&&(w[_]=h[_])}h=w}}else if(y&&Me(m)&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,e,r,n));else{let C=!1,w=!1;const D=r.count!==void 0&&!Me(r.count),_=Bh.hasDefaultValue(r),x=D?this.pluralResolver.getSuffix(l,r.count,r):"",S=r.ordinal&&D?this.pluralResolver.getSuffix(l,r.count,{ordinal:!1}):"",O=D&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),E=O&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${S}`]||r.defaultValue;!this.isValidLookup(h)&&_&&(C=!0,h=E),this.isValidLookup(h)||(w=!0,h=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&w?void 0:h,M=_&&E!==h&&this.options.updateMissing;if(w||C||M){if(this.logger.log(M?"updateKey":"missingKey",l,u,o,M?E:h),a){const k=this.resolve(o,{...r,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let B=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let k=0;k<R.length;k++)B.push(R[k]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(r.lng||this.language):B.push(r.lng||this.language);const V=(k,W,I)=>{const q=_&&I!==h?I:F;this.options.missingKeyHandler?this.options.missingKeyHandler(k,u,W,q,M,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(k,u,W,q,M,r),this.emit("missingKey",k,u,W,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?B.forEach(k=>{const W=this.pluralResolver.getSuffixes(k,r);O&&r[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(I=>{V([k],o+I,r[`defaultValue${I}`]||E)})}):V(B,o,E))}h=this.extendTranslation(h,e,r,c,n),w&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${o}`),(w||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,C?h:void 0):h=this.options.parseMissingKeyHandler(h))}return i?(c.res=h,c.usedParams=this.getUsedParamsDetails(r),c):h}extendTranslation(e,r,n,i,a){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const l=Me(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let c=n.replace&&!Me(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||i.usedLng,n),l){const h=e.match(this.interpolator.nestingRegexp),d=h&&h.length;f<d&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,d=new Array(h),v=0;v<h;v++)d[v]=arguments[v];return a&&a[0]===d[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):o.translate(...d,r)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,u=Me(s)?[s]:s;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=tO.handle(u,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Me(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const h=r.count!==void 0&&!Me(r.count),d=h&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),v=r.context!==void 0&&(Me(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach(p=>{this.isValidLookup(n)||(s=p,!rO[`${g[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(rO[`${g[0]}-${p}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(n))return;o=m;const y=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,f,m,p,r);else{let C;h&&(C=this.pluralResolver.getSuffix(m,r.count,r));const w=`${this.options.pluralSeparator}zero`,D=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(y.push(f+C),r.ordinal&&C.indexOf(D)===0&&y.push(f+C.replace(D,this.options.pluralSeparator)),d&&y.push(f+w)),v){const _=`${f}${this.options.contextSeparator}${r.context}`;y.push(_),h&&(y.push(_+C),r.ordinal&&C.indexOf(D)===0&&y.push(_+C.replace(D,this.options.pluralSeparator)),d&&y.push(_+w))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(a=b,n=this.getResource(m,p,b,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Me(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}const Pm=t=>t.charAt(0).toUpperCase()+t.slice(1);class nO{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jn.create("languageUtils")}getScriptPartFromCode(e){if(e=Th(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Th(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(Me(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=Pm(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=Pm(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=Pm(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),Me(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Me(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Me(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}let fU=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],cU={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const hU=["v1","v2","v3"],dU=["v4"],iO={zero:0,one:1,two:2,few:3,many:4,other:5},vU=()=>{const t={};return fU.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:cU[e.fc]}})}),t};class pU{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=jn.create("pluralResolver"),(!this.options.compatibilityJSON||dU.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=vU(),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Th(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(n,{type:i});return this.pluralRulesCache[a]=o,o}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,a)=>iO[i]-iO[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!hU.includes(this.options.compatibilityJSON)}}const aO=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=rU(t,e,r);return!a&&i&&Me(r)&&(a=Om(t,r,n),a===void 0&&(a=Om(e,r,n))),a},Bm=t=>t.replace(/\$/g,"$$$$");class gU{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:v,nestingSuffixEscaped:g,nestingOptionsSeparator:p,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:iU,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?gs(a):o||"{{",this.suffix=s?gs(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=h?gs(h):d||gs("$t("),this.nestingSuffix=v?gs(v):g||gs(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=d=>{if(d.indexOf(this.formatSeparator)<0){const m=aO(r,u,d,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...i,...r,interpolationkey:d}):m}const v=d.split(this.formatSeparator),g=v.shift().trim(),p=v.join(this.formatSeparator).trim();return this.format(aO(r,u,g,this.options.keySeparator,this.options.ignoreJSONStructure),p,n,{...i,...r,interpolationkey:g})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:d=>Bm(d)},{regex:this.regexp,safeValue:d=>this.escapeValue?Bm(this.escape(d)):Bm(d)}].forEach(d=>{for(s=0;a=d.regex.exec(e);){const v=a[1].trim();if(o=l(v),o===void 0)if(typeof f=="function"){const p=f(e,a,i);o=Me(p)?p:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),o="";else!Me(o)&&!this.useRawValueToEscape&&(o=XT(o));const g=d.safeValue(o);if(e=e.replace(a[0],g),c?(d.regex.lastIndex+=o.length,d.regex.lastIndex-=a[0].length):d.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o;const s=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${f}[ ]*{`));let h=`{${c[1]}`;u=c[0],h=this.interpolate(h,o);const d=h.match(/'/g),v=h.match(/"/g);(d&&d.length%2===0&&!v||v.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),l&&(o={...l,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,g),`${u}${f}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&!Me(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(c=>c.trim());i[1]=f.shift(),u=f,l=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!Me(a))return a;Me(a)||(a=XT(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l&&(a=u.reduce((f,c)=>this.format(f,c,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const mU=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();r[f]||(r[f]=l),l==="false"&&(r[f]=!1),l==="true"&&(r[f]=!0),isNaN(l)||(r[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:r}},ms=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(Th(n),i),e[o]=s),s(r)}};class yU{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jn.create("formatter"),this.options=e,this.formats={number:ms((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return a=>i.format(a)}),currency:ms((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return a=>i.format(a)}),datetime:ms((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return a=>i.format(a)}),relativetime:ms((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return a=>i.format(a,n.range||"day")}),list:ms((r,n)=>{const i=new Intl.ListFormat(r,{...n});return a=>i.format(a)})},this.init(e)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=ms(r)}format(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:f}=mU(u);if(this.formats[l]){let c=s;try{const h=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},d=h.locale||h.lng||i.locale||i.lng||n;c=this.formats[l](s,d,{...f,...i,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}const bU=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class CU extends Ph{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=jn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},u={};return e.forEach(l=>{let f=!0;r.forEach(c=>{const h=`${l}|${c}`;!n.reload&&this.store.hasResourceBundle(l,c)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,f=!1,o[h]===void 0&&(o[h]=!0),a[h]===void 0&&(a[h]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(u=>{tU(u.loaded,[a],o),bU(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{s[l][c]===void 0&&(s[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,i+1,a*2,o)},a);return}o(l,f)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(e,r);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return u(e,r,s)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Me(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Me(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,r,n,i,u):f=l(e,r,n,i),f&&typeof f.then=="function"?f.then(c=>s(null,c)).catch(s):s(null,f)}catch(f){s(f)}else l(e,r,n,i,s,u)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const oO=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Me(t[1])&&(e.defaultValue=t[1]),Me(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),sO=t=>(Me(t.ns)&&(t.ns=[t.ns]),Me(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Me(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Mh=()=>{},wU=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class il extends Ph{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sO(e),this.services={},this.logger=jn,this.modules={external:[]},wU(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(Me(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=oO();this.options={...i,...this.options,...sO(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const a=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?jn.init(a(this.modules.logger),this.options):jn.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=yU);const c=new nO(this.options);this.store=new eO(this.options.resources,this.options);const h=this.services;h.logger=jn,h.resourceStore=this.store,h.languageUtils=c,h.pluralResolver=new pU(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=a(f),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new gU(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new CU(a(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(d){for(var v=arguments.length,g=new Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];e.emit(d,...g)}),this.modules.languageDetector&&(h.languageDetector=a(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=a(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new Bh(this.services,this.options),this.translator.on("*",function(d){for(var v=arguments.length,g=new Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];e.emit(d,...g)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Mh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const u=rl(),l=()=>{const f=(c,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(c,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mh;const i=Me(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,r,n){const i=rl();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=Mh),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&tO.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const i=rl();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,l)=>{l?(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(u,function(){return n.t(...arguments)})},s=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const l=Me(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||a(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{o(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,r,n){var i=this;const a=function(o,s){let u;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),c=2;c<l;c++)f[c-2]=arguments[c];u=i.options.overloadTranslationOptionHandler([o,s].concat(f))}else u={...s};u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs,u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||a.keyPrefix);const h=i.options.keySeparator||".";let d;return u.keyPrefix&&Array.isArray(o)?d=o.map(v=>`${u.keyPrefix}${h}${v}`):d=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o,i.t(d,u)};return Me(e)?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=n,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=rl();return this.options.ns?(Me(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=rl();Me(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new nO(oO());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new il(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new il(i);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new eO(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Bh(a.services,i),a.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),f=1;f<u;f++)l[f-1]=arguments[f];a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Xt=il.createInstance();Xt.createInstance=il.createInstance,Xt.createInstance,Xt.dir,Xt.init,Xt.loadResources,Xt.reloadResources,Xt.use,Xt.changeLanguage,Xt.getFixedT,Xt.t,Xt.exists,Xt.setDefaultNamespace,Xt.hasLoadedNamespace,Xt.loadNamespaces,Xt.loadLanguages;const DU={...{title:"仪表盘",text:"文本",confirm:"确定",pleaseEnter:"请输入",configuration:"配置",copy:"复制",delete:"删除",calendarText:"日历",chartText:"图表",promptTitle:"提示",promptContentDeleteComponents:"确认删除组件?",unnamedRecord:"未命名记录",setFilteringCriteria:"设置筛选条件",all:"所有",everyone:"任一",condition:"条件",addCondition:"添加条件",equalto:"等于",notequalto:"不等于",contain:"包含",notcontain:"不包含",null:"为空",notnull:"不为空",conformTo:"符合以下",statisticsText:"统计文字",typeData:"类型与数据",customStyle:"自定义样式",dataSource:"数据源",dataRange:"数据范围",data:"数据",filterData:"筛选数据",selectNcondition:"已选{n}个条件",allData:"全部数据",statisticstMethods:"统计方式",statisticstRecordNum:"统计记录总数",statisticstFieldVal:"统计字段数值",selectField:"选择字段",sumVal:"求和",maxVal:"最大值",minVal:"最小值",averageVal:"平均值"},statistics:{t1:"配色方案",t2:"数值设置",t3:"小数位数与格式",t4:"请输入小数位数",t5:"数字(千分位)",t6:"数字",t7:"百分比",t8:"人名币",t9:"美元",t10:"统计数值说明",t11:"",t12:"",t13:""},chart:{t1:"图表类型",t2:"基础柱状图",t3:"堆积柱状图",t4:"百分比柱状图",t5:"基础条形图",t6:"堆积条形图",t7:"百分比堆积条形图",t8:"折线图",t9:"平滑折线图",t10:"饼图",t11:"环形图",t12:"图标选项",t13:"图例",t14:"数据标签",t15:"坐标轴",t16:"网格线",t17:"扇形分区",t18:"横轴(类别)",t19:"扇形数值",t20:"纵轴(字段)",t21:"横轴",t22:"横轴标题",t23:"坐标轴选项",t24:"显示标签",t25:"显示轴线",t26:"纵轴",t27:"纵轴标题",t28:"坐标轴选项",t29:"显示标签",t30:"显示轴线"},calendar:{t1:"视图配置",t2:"开始日期",t3:"结束日期",t4:"标题展示"},add:{t1:"图表",t2:"柱状图",t3:"折线图",t4:"饼图",t5:"条形图",t6:"其他",t7:"统计数字",t8:"文本",t9:"日历",t10:"添加组件"}},_U={...{title:"Dashboard",text:"Text",confirm:"Confirm",pleaseEnter:"Please enter",configuration:"Configuration",copy:"Copy",delete:"Delete",calendarText:"Calendar",chartText:"Chart",promptTitle:"Prompt",promptContentDeleteComponents:"Are you sure you want to delete this component?",unnamedRecord:"Unnamed Record",setFilteringCriteria:"Set filtering criteria",all:"All",everyone:"Anyone",condition:"Condition",addCondition:"Add condition",equalto:"Equal to",notequalto:"Not equal to",contain:"Contains",notcontain:"Does not contain",null:"Is empty",notnull:"Is not empty",conformTo:"Conform to the following",statisticsText:"Statistics Text",typeData:"Type and Data",customStyle:"Custom Style",dataSource:"Data Source",dataRange:"Data Range",data:"Data",filterData:"Filter Data",selectNcondition:"Selected {n} conditions",allData:"All Data",statisticstMethods:"Statistical Methods",statisticstRecordNum:"Total Number of Records",statisticstFieldVal:"Statistical Field Values",selectField:"Select Field",sumVal:"Sum",maxVal:"Maximum Value",minVal:"Minimum Value",averageVal:"Average Value"},statistics:{t1:"Color Scheme",t2:"Value Settings",t3:"Decimal Places and Format",t4:"Please enter decimal places",t5:"Number (Thousand Separator)",t6:"Number",t7:"Percentage",t8:"Renminbi",t9:"Dollar",t10:"Statistical Value Description",t11:"",t12:"",t13:""},chart:{t1:"Chart Type",t2:"Basic Bar Chart",t3:"Stacked Bar Chart",t4:"Percentage Bar Chart",t5:"Basic Horizontal Bar Chart",t6:"Stacked Horizontal Bar Chart",t7:"Percentage Stacked Horizontal Bar Chart",t8:"Line Chart",t9:"Smooth Line Chart",t10:"Pie Chart",t11:"Doughnut Chart",t12:"Chart Options",t13:"Legend",t14:"Data Label",t15:"Axis",t16:"Grid Line",t17:"Sector Division",t18:"Horizontal Axis (Category)",t19:"Sector Value",t20:"Vertical Axis (Field)",t21:"Horizontal Axis",t22:"Horizontal Axis Title",t23:"Axis Options",t24:"Show Labels",t25:"Show Axis Line",t26:"Vertical Axis",t27:"Vertical Axis Title",t28:"Axis Options",t29:"Show Labels",t30:"Show Axis Line"},calendar:{t1:"View Configuration",t2:"Start Date",t3:"End Date",t4:"Title Display"},add:{t1:"Chart",t2:"Bar Chart",t3:"Line Chart",t4:"Pie Chart",t5:"Horizontal Bar Chart",t6:"Other",t7:"Statistical Number",t8:"Text",t9:"Calendar",t10:"Add Component"}};Xt.use(F4).init({resources:{zh_CN:{translation:DU},en_US:{translation:_U}},lng:"zh_CN",fallbackLng:"zh_CN",interpolation:{escapeValue:!1}});const xU=()=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"MoreVerticalOutlined",children:T.jsx("path",{d:"M12 5.5A1.75 1.75 0 1 1 12 2a1.75 1.75 0 0 1 0 3.5Zm0 8.225a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5ZM12 22a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5Z",fill:"currentColor"})}),SU=()=>T.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"DragOutlined",children:T.jsx("path",{d:"M8.25 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm0 7.25a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Zm1.75 5.5a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0ZM14.753 6.5a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5ZM16.5 12a1.75 1.75 0 1 1-3.5 0 1.75 1.75 0 0 1 3.5 0Zm-1.747 9a1.75 1.75 0 1 0 0-3.5 1.75 1.75 0 0 0 0 3.5Z",fill:"#999"})}),EU=Qy.WidthProvider(Qy.Responsive),AU=({sourceData:t,moduleConfigData:e,fieldMap:r,moduleDataApi:n,onCreateModule:i,onUpdateModule:a,onDeleteModule:o,lang:s,onLayoutChange:u,className:l="layout",cols:f={lg:12,md:10,sm:6,xs:4,xxs:2},rowHeight:c=79})=>{const h=[10,10],{setGlobalData:d}=bo(),[v,g]=z.useState([]),[p,m]=z.useState(0),[y,b]=z.useState(),[C,w]=z.useState(),[D,_]=z.useState(!1),{i18n:x,t:S}=kr(),[O,E]=z.useState(!1),[P,F]=z.useState(!1),[M,B]=z.useState(!1),R={text:"",calendar:S("calendar"),statistics:S("chart")},[V,k]=z.useState(f.lg),W=async G=>{const L=G.type==="calendar"?5:4,Y=G.type==="calendar"?5:3;if(Array.isArray(v)&&G.type){const j={x:0,y:0,w:L,h:Y,...G,type:G.type},U=await(i==null?void 0:i(j));console.log("res",{...j,i:U.id,id:U.id}),g([...v,{...j,i:U.id,id:U.id}])}},I=async(G,L)=>{if(v!=null&&v.length){const Y={...v.find(U=>U.id===G),...L},j=v.map(U=>U.id===G?Y:U);g(j),await(a==null?void 0:a(Y))}},q=async G=>{v!=null&&v.length&&(g(v.filter(L=>L.id!==G)),await(o==null?void 0:o(G||"")))},Z=(G,L)=>{console.log("handleLayoutChange-currentLayout:",G),console.log("handleLayoutChange-allLayouts:",L),u==null||u(G)},J=(G,L)=>{console.log("onBreakpointChange-breakpoint",G),console.log("onBreakpointChange-cols",L),console.log(V),k(L)},ne=G=>{if(G==="text"){const L={type:G,customData:{title:S("text"),editor:[{type:"paragraph",children:[{text:S("pleaseEnter")}]}]}};W(L)}else G==="statistics"?E(!0):G==="calendar"?F(!0):G!=null&&G.includes("chart")&&B(!0);w({type:G,w:0,h:0,x:0,y:0})};return z.useEffect(()=>{console.log("modules:",JSON.stringify(v))},[v]),z.useEffect(()=>{d({fieldMap:r,sourceData:t})},[r,d,t]),z.useEffect(()=>{g(e||[])},[e]),z.useEffect(()=>{x.changeLanguage(s||"zh_CN")},[x,s]),T.jsxs("div",{className:"pivot-table",children:[T.jsxs("div",{className:"bitable-block-dashboard",children:[T.jsx("div",{className:"bitable-block-dashboard-toolbar bitable-toolbar",children:T.jsxs("div",{className:"bitable-block-dashboard-toolbar--left",children:[T.jsx("div",{className:"bitable-block-name",children:T.jsx("div",{children:S("title")})}),T.jsx(NG,{onOk:G=>{ne(G)}})]})}),T.jsx("div",{className:"bitable-block-dashboard__mount",children:T.jsx("div",{className:"dashboard-container",children:T.jsx("div",{className:"dashboard-content-container",children:T.jsx(EU,{onLayoutChange:Z,onBreakpointChange:J,className:l,compactType:"vertical",cols:f,margin:h,rowHeight:c,draggableHandle:".handle",onWidthChange:(G,L,Y,j)=>{console.log("onWidthChange:",G,L,Y,j),m(G/Y-1)},onDragStart:()=>{_(!0)},onDragStop:(G,L,Y)=>{I(Y.i,{...Y}),_(!1)},onResizeStart:()=>{_(!0)},onResizeStop:(G,L,Y)=>{I(Y.i,{...Y}),_(!1)},onDrop:(G,L,Y)=>{console.log("onDrop:",G,L,Y)},style:{backgroundSize:`${p}px ${c+h[0]}px`,backgroundImage:D?"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAABPCAYAAAAp8KG9AAAAAXNSR0IArs4c6QAAAlpJREFUeF7t3UFu01AYReGYfaBCuxDUnXVniIUArdgHrVwpJIPgPv3Skc7gMEKqfd/N/TADZ9Dt5++Xp9PBn4evd4c/P99aztGKpxO5z6rR3nD79fzn+/6X19e/P25VXg0jP9B1r/pcHtBt+/Rt3+b+y+fH439ul59uZ6jVIVeDu45fYGIXOO+CnRA4Nq0zOHCnC9YqcGxaZ3DgThesVeDYtM7gEbjzo9SKWmCjgst1LhC40wVrFTg2rTM4cKcL1ipwbFpncOBOF6xV4Ni0zuC+LXO6LLUavXiZ3LTUpovwBSZ2PeE4C3dA4Ny2yuTAlSxcqcC5bZXJgStZuFKBc9sqk0fgyk9SKWyB3rRh0zqDA3e6YK0Cx6Z1BgfudMFaBY5N6wwO3OmCtQocm9YZ3LdlTpelVqMXL5Obltp0Eb7AxK4nHGfhDgic21aZHLiShSsVOLetMjlwJQtXKnBuW2XyCFz5SSqFLdCbNmxaZ3DgThesVeDYtM7gwJ0uWKvAsWmdwYE7XbBWgWPTOoP7tszpstRq9OJlctNSmy7CF5jY9YTjLNwBgXPbKpMDV7JwpQLntlUmB65k4UoFzm2rTB6BKz9JpbAFetOGTesMDtzpgrUKHJvWGRy40wVrFTg2rTM4cKcL1ipwbFpncN+WOV2WWo1evExuWmrTRfgCE7t/T/j/2q3+Ivnz4eXcXoDcZ9Vobxb4B88hCXV99CrarT6r976D4//vdIBqgcBVHHyZwPmNVScEruLgywTOb6w6IXAVB18mcH5j1QmBqzj4MoHzG6tOCFzFwZd5Azm6fF+PNKX9AAAAAElFTkSuQmCC)":void 0,backgroundPosition:`${h[0]}px ${h[0]}px`,minHeight:"100vh"},children:v==null?void 0:v.map(G=>T.jsxs("div",{className:`box-dashboard ${y===G.id?"active":""}`,onClick:()=>{b(G.id)},"data-grid":{i:G.id,x:G.x,y:G.y,w:G.w,h:G.h},children:[T.jsxs("div",{className:"layout-item-head isCanDrag",children:[T.jsxs("div",{className:"head-inner",children:[T.jsx("span",{className:"handle title",children:T.jsx("span",{className:"title-child",children:G.type?G.type.includes("chart")?S("chartText"):R[G.type]||"":null})}),T.jsx("div",{className:"menu-slot",children:T.jsx(ee.Dropdown,{trigger:["click"],menu:{items:[G.type!=="text"?{label:S("configuration"),key:"edit"}:null,{label:S("copy"),key:"copy"},{key:"delete",danger:!0,label:S("delete")}],onClick:({key:L})=>{var Y;if(L==="edit")b(G.id),w(G),G.type==="statistics"&&E(!0),(Y=G.type)!=null&&Y.includes("chart")&&B(!0),G.type==="calendar"&&F(!0);else if(L==="delete")ee.Modal.confirm({title:S("promptTitle"),icon:T.jsx(UC,{}),content:S("promptContentDeleteComponents"),onOk(){q(G.id)}});else if(L==="copy"){const j=JSON.parse(JSON.stringify(G));delete j.id,delete j.i,W(j)}}},children:T.jsx("button",{type:"button",className:"dashboard-grid-menu-button",children:T.jsx("span",{className:"universe-icon",children:T.jsx(xU,{})})})})})]}),T.jsx("div",{className:"handle drag isCanDrag",children:T.jsx("span",{className:"universe-icon drag-icon",children:T.jsx(SU,{})})})]}),T.jsx(FG,{module:G,onUpdate:I,moduleDataApi:n,activeId:y,onClick:()=>{b(G.id)},onEdit:()=>{var L;b(G.id),w(G),G.type==="statistics"&&E(!0),(L=G.type)!=null&&L.includes("chart")&&B(!0),G.type==="calendar"&&F(!0)},onDelete:()=>{q(G.id)},onCopy:()=>{const L=JSON.parse(JSON.stringify(G));delete L.id,delete L.i,W(L)},onStartDragOrResize:()=>{_(!0)},onStopDragOrResize:()=>{_(!1)}})]},G.id))})})})})]}),T.jsx(VG,{open:O,selectModuleData:C,onClose:()=>{E(!1)},onOk:({id:G,customData:L,customeStyle:Y})=>{G?I(G,{type:"statistics",customData:L,customeStyle:Y}):W({type:"statistics",customData:L,customeStyle:Y}),E(!1)},moduleDataApi:n}),T.jsx(WG,{open:P,selectModuleData:C,onClose:()=>{F(!1)},onOk:({id:G,customData:L})=>{G?I(G,{type:"calendar",customData:L}):W({type:"calendar",customData:L}),F(!1)},moduleDataApi:n}),T.jsx(JG,{open:M,selectModuleData:C,onClose:()=>{B(!1)},onOk:({id:G,type:L,customData:Y,customeStyle:j})=>{G?I(G,{type:L,customData:Y,customeStyle:j}):W({type:L,customData:Y,customeStyle:j}),B(!1)},moduleDataApi:n})]})},TU=t=>T.jsx(D4,{children:T.jsx(AU,{...t})});Hn.PivotTable=TU,Object.defineProperty(Hn,Symbol.toStringTag,{value:"Module"})});