@xeplr/monitor 1.0.1 → 1.1.0

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,75 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();function fH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function e_(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var LC={exports:{}},Kv={};var Tj;function GK(){if(Tj)return Kv;Tj=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:o,ref:a!==void 0?a:null,props:i}}return Kv.Fragment=t,Kv.jsx=r,Kv.jsxs=r,Kv}var Aj;function HK(){return Aj||(Aj=1,LC.exports=GK()),LC.exports}var _=HK(),IC={exports:{}},ft={};var Dj;function UK(){if(Dj)return ft;Dj=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),v=Symbol.for("react.view_transition"),p=Symbol.iterator;function m(U){return U===null||typeof U!="object"?null:(U=p&&U[p]||U["@@iterator"],typeof U=="function"?U:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,b={};function w(U,K,se){this.props=U,this.context=K,this.refs=b,this.updater=se||y}w.prototype.isReactComponent={},w.prototype.setState=function(U,K){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,K,"setState")},w.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function C(){}C.prototype=w.prototype;function A(U,K,se){this.props=U,this.context=K,this.refs=b,this.updater=se||y}var M=A.prototype=new C;M.constructor=A,x(M,w.prototype),M.isPureReactComponent=!0;var R=Array.isArray;function E(){}var N={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function O(U,K,se){var ge=se.ref;return{$$typeof:e,type:U,key:K,ref:ge!==void 0?ge:null,props:se}}function I(U,K){return O(U.type,K,U.props)}function z(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function V(U){var K={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(se){return K[se]})}var Y=/\/+/g;function H(U,K){return typeof U=="object"&&U!==null&&U.key!=null?V(""+U.key):K.toString(36)}function F(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(E,E):(U.status="pending",U.then(function(K){U.status==="pending"&&(U.status="fulfilled",U.value=K)},function(K){U.status==="pending"&&(U.status="rejected",U.reason=K)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function X(U,K,se,ge,ue){var de=typeof U;(de==="undefined"||de==="boolean")&&(U=null);var me=!1;if(U===null)me=!0;else switch(de){case"bigint":case"string":case"number":me=!0;break;case"object":switch(U.$$typeof){case e:case t:me=!0;break;case f:return me=U._init,X(me(U._payload),K,se,ge,ue)}}if(me)return ue=ue(U),me=ge===""?"."+H(U,0):ge,R(ue)?(se="",me!=null&&(se=me.replace(Y,"$&/")+"/"),X(ue,K,se,"",function(nt){return nt})):ue!=null&&(z(ue)&&(ue=I(ue,se+(ue.key==null||U&&U.key===ue.key?"":(""+ue.key).replace(Y,"$&/")+"/")+me)),K.push(ue)),1;me=0;var ae=ge===""?".":ge+":";if(R(U))for(var ye=0;ye<U.length;ye++)ge=U[ye],de=ae+H(ge,ye),me+=X(ge,K,se,de,ue);else if(ye=m(U),typeof ye=="function")for(U=ye.call(U),ye=0;!(ge=U.next()).done;)ge=ge.value,de=ae+H(ge,ye++),me+=X(ge,K,se,de,ue);else if(de==="object"){if(typeof U.then=="function")return X(F(U),K,se,ge,ue);throw K=String(U),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return me}function P(U,K,se){if(U==null)return U;var ge=[],ue=0;return X(U,ge,"","",function(de){return K.call(se,de,ue++)}),ge}function q(U){if(U._status===-1){var K=U._result,se=K();se.then(function(ge){(U._status===0||U._status===-1)&&(U._status=1,U._result=ge,se.status===void 0&&(se.status="fulfilled",se.value=ge))},function(ge){(U._status===0||U._status===-1)&&(U._status=2,U._result=ge,se.status===void 0&&(se.status="rejected",se.reason=ge))}),U._status===-1&&(U._status=0,U._result=se)}if(U._status===1)return U._result.default;throw U._result}var G=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)};function W(U){var K=N.T,se={};se.types=K!==null?K.types:null,N.T=se;try{var ge=U(),ue=N.S;ue!==null&&ue(se,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(E,G)}catch(de){G(de)}finally{K!==null&&se.types!==null&&(K.types=se.types),N.T=K}}function Z(U){var K=N.T;if(K!==null){var se=K.types;se===null?K.types=[U]:se.indexOf(U)===-1&&se.push(U)}else W(Z.bind(null,U))}var Q={map:P,forEach:function(U,K,se){P(U,function(){K.apply(this,arguments)},se)},count:function(U){var K=0;return P(U,function(){K++}),K},toArray:function(U){return P(U,function(K){return K})||[]},only:function(U){if(!z(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return ft.Activity=h,ft.Children=Q,ft.Component=w,ft.Fragment=r,ft.Profiler=a,ft.PureComponent=A,ft.StrictMode=n,ft.Suspense=s,ft.ViewTransition=v,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,ft.__COMPILER_RUNTIME={__proto__:null,c:function(U){return N.H.useMemoCache(U)}},ft.addTransitionType=Z,ft.cache=function(U){return function(){return U.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(U,K,se){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var ge=x({},U.props),ue=U.key;if(K!=null)for(de in K.key!==void 0&&(ue=""+K.key),K)!L.call(K,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&K.ref===void 0||(ge[de]=K[de]);var de=arguments.length-2;if(de===1)ge.children=se;else if(1<de){for(var me=Array(de),ae=0;ae<de;ae++)me[ae]=arguments[ae+2];ge.children=me}return O(U.type,ue,ge)},ft.createContext=function(U){return U={$$typeof:o,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:i,_context:U},U},ft.createElement=function(U,K,se){var ge,ue={},de=null;if(K!=null)for(ge in K.key!==void 0&&(de=""+K.key),K)L.call(K,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(ue[ge]=K[ge]);var me=arguments.length-2;if(me===1)ue.children=se;else if(1<me){for(var ae=Array(me),ye=0;ye<me;ye++)ae[ye]=arguments[ye+2];ue.children=ae}if(U&&U.defaultProps)for(ge in me=U.defaultProps,me)ue[ge]===void 0&&(ue[ge]=me[ge]);return O(U,de,ue)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(U){return{$$typeof:l,render:U}},ft.isValidElement=z,ft.lazy=function(U){return{$$typeof:f,_payload:{_status:-1,_result:U},_init:q}},ft.memo=function(U,K){return{$$typeof:c,type:U,compare:K===void 0?null:K}},ft.startTransition=W,ft.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},ft.use=function(U){return N.H.use(U)},ft.useActionState=function(U,K,se){return N.H.useActionState(U,K,se)},ft.useCallback=function(U,K){return N.H.useCallback(U,K)},ft.useContext=function(U){return N.H.useContext(U)},ft.useDebugValue=function(){},ft.useDeferredValue=function(U,K){return N.H.useDeferredValue(U,K)},ft.useEffect=function(U,K){return N.H.useEffect(U,K)},ft.useEffectEvent=function(U){return N.H.useEffectEvent(U)},ft.useId=function(){return N.H.useId()},ft.useImperativeHandle=function(U,K,se){return N.H.useImperativeHandle(U,K,se)},ft.useInsertionEffect=function(U,K){return N.H.useInsertionEffect(U,K)},ft.useLayoutEffect=function(U,K){return N.H.useLayoutEffect(U,K)},ft.useMemo=function(U,K){return N.H.useMemo(U,K)},ft.useOptimistic=function(U,K){return N.H.useOptimistic(U,K)},ft.useReducer=function(U,K,se){return N.H.useReducer(U,K,se)},ft.useRef=function(U){return N.H.useRef(U)},ft.useState=function(U){return N.H.useState(U)},ft.useSyncExternalStore=function(U,K,se){return N.H.useSyncExternalStore(U,K,se)},ft.useTransition=function(){return N.H.useTransition()},ft.version="19.3.1",ft}var Mj;function Dd(){return Mj||(Mj=1,IC.exports=UK()),IC.exports}var j=Dd();const YK=fH(j);var OC={exports:{}},Qv={},kC={exports:{}},PC={};var Rj;function $K(){return Rj||(Rj=1,(function(e){function t(F,X){var P=F.length;F.push(X);e:for(;0<P;){var q=P-1>>>1,G=F[q];if(0<a(G,X))F[q]=X,F[P]=G,P=q;else break e}}function r(F){return F.length===0?null:F[0]}function n(F){if(F.length===0)return null;var X=F[0],P=F.pop();if(P!==X){F[0]=P;e:for(var q=0,G=F.length,W=G>>>1;q<W;){var Z=2*(q+1)-1,Q=F[Z],U=Z+1,K=F[U];if(0>a(Q,P))U<G&&0>a(K,Q)?(F[q]=K,F[U]=P,q=U):(F[q]=Q,F[Z]=P,q=Z);else if(U<G&&0>a(K,P))F[q]=K,F[U]=P,q=U;else break e}}return X}function a(F,X){var P=F.sortIndex-X.sortIndex;return P!==0?P:F.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var s=[],c=[],f=1,h=null,v=3,p=!1,m=!1,y=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(F){for(var X=r(c);X!==null;){if(X.callback===null)n(c);else if(X.startTime<=F)n(c),X.sortIndex=X.expirationTime,t(s,X);else break;X=r(c)}}function M(F){if(y=!1,A(F),!m)if(r(s)!==null)m=!0,R||(R=!0,z());else{var X=r(c);X!==null&&H(M,X.startTime-F)}}var R=!1,E=-1,N=5,L=-1;function O(){return x?!0:!(e.unstable_now()-L<N)}function I(){if(x=!1,R){var F=e.unstable_now();L=F;var X=!0;try{e:{m=!1,y&&(y=!1,w(E),E=-1),p=!0;var P=v;try{t:{for(A(F),h=r(s);h!==null&&!(h.expirationTime>F&&O());){var q=h.callback;if(typeof q=="function"){h.callback=null,v=h.priorityLevel;var G=q(h.expirationTime<=F);if(F=e.unstable_now(),typeof G=="function"){h.callback=G,A(F),X=!0;break t}h===r(s)&&n(s),A(F)}else n(s);h=r(s)}if(h!==null)X=!0;else{var W=r(c);W!==null&&H(M,W.startTime-F),X=!1}}break e}finally{h=null,v=P,p=!1}X=void 0}}finally{X?z():R=!1}}}var z;if(typeof C=="function")z=function(){C(I)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,Y=V.port2;V.port1.onmessage=I,z=function(){Y.postMessage(null)}}else z=function(){b(I,0)};function H(F,X){E=b(function(){F(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var P=v;v=X;try{return F()}finally{v=P}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(F,X){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var P=v;v=F;try{return X()}finally{v=P}},e.unstable_scheduleCallback=function(F,X,P){var q=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?q+P:q):P=q,F){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=P+G,F={id:f++,callback:X,priorityLevel:F,startTime:P,expirationTime:G,sortIndex:-1},P>q?(F.sortIndex=P,t(c,F),r(s)===null&&F===r(c)&&(y?(w(E),E=-1):y=!0,H(M,P-q))):(F.sortIndex=G,t(s,F),m||p||(m=!0,R||(R=!0,z()))),F},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(F){var X=v;return function(){var P=v;v=X;try{return F.apply(this,arguments)}finally{v=P}}}})(PC)),PC}var Ej;function WK(){return Ej||(Ej=1,kC.exports=$K()),kC.exports}var jC={exports:{}},hn={};var Nj;function qK(){if(Nj)return hn;Nj=1;var e=Dd();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal"),i=Symbol.for("react.recoverable"),o=Symbol.for("react.optimistic_key");function l(f,h,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:p===o?o:""+p,children:f,containerInfo:h,implementation:v}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,hn.browser=function(f){return{$$typeof:i,_reason:f}},hn.createPortal=function(f,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,v)},hn.flushSync=function(f){var h=s.T,v=n.p;try{if(s.T=null,n.p=2,f)return f()}finally{s.T=h,n.p=v,n.d.f()}},hn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},hn.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},hn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var v=h.as,p=c(v,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,y=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:y}):v==="script"&&n.d.X(f,{crossOrigin:p,integrity:m,fetchPriority:y,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=c(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}}else h==null&&n.d.M(f)},hn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,p=c(v,h.crossOrigin);n.d.L(f,v,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},hn.preloadModule=function(f,h){if(typeof f=="string")if(h){var v=c(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0})}else n.d.m(f)},hn.requestFormReset=function(f){n.d.r(f)},hn.unstable_batchedUpdates=function(f,h){return f(h)},hn.useFormState=function(f,h,v){return s.H.useFormState(f,h,v)},hn.useFormStatus=function(){return s.H.useHostTransitionStatus()},hn.version="19.3.1",hn}var Lj;function hH(){if(Lj)return jC.exports;Lj=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jC.exports=qK(),jC.exports}var Ij;function XK(){if(Ij)return Qv;Ij=1;var e=WK(),t=Dd(),r=hH();function n(u){var d="https://react.dev/errors/"+u;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)d+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function i(u){for(var d=u,g=d;g&&!g.alternate;)d=g,(d.flags&4098)!==0&&(u=d.return),g=d.return;for(;d.return;)d=d.return;return d.tag===3?u:null}function o(u){if(u.tag===13){var d=u.memoizedState;if(d===null&&(u=u.alternate,u!==null&&(d=u.memoizedState)),d!==null)return d.dehydrated}return null}function l(u){if(u.tag===31){var d=u.memoizedState;if(d===null&&(u=u.alternate,u!==null&&(d=u.memoizedState)),d!==null)return d.dehydrated}return null}function s(u){if(i(u)!==u)throw Error(n(188))}function c(u){var d=u.alternate;if(!d){if(d=i(u),d===null)throw Error(n(188));return d!==u?null:u}for(var g=u,S=d;;){var T=g.return;if(T===null)break;var D=T.alternate;if(D===null){if(S=T.return,S!==null){g=S;continue}break}if(T.child===D.child){for(D=T.child;D;){if(D===g)return s(T),u;if(D===S)return s(T),d;D=D.sibling}throw Error(n(188))}if(g.return!==S.return)g=T,S=D;else{for(var k=!1,$=T.child;$;){if($===g){k=!0,g=T,S=D;break}if($===S){k=!0,S=T,g=D;break}$=$.sibling}if(!k){for($=D.child;$;){if($===g){k=!0,g=D,S=T;break}if($===S){k=!0,S=D,g=T;break}$=$.sibling}if(!k)throw Error(n(189))}}if(g.alternate!==S)throw Error(n(190))}if(g.tag!==3)throw Error(n(188));return g.stateNode.current===g?u:d}function f(u){var d=u.tag;if(d===5||d===26||d===27||d===6)return u;for(u=u.child;u!==null;){if(d=f(u),d!==null)return d;u=u.sibling}return null}function h(u,d,g,S,T,D){for(;u!==null;){if((u.tag===5||u.tag===27||u.tag===6)&&g(u,S,T,D)||(u.tag!==22||u.memoizedState===null)&&(d||u.tag!==5&&u.tag!==27)&&h(u.child,d,g,S,T,D))return!0;u=u.sibling}return!1}function v(u){for(u=u.return;u!==null;){if(u.tag===3||u.tag===5||u.tag===27)return u;u=u.return}return null}function p(u){var d=!1;for(u=u.return;u!==null&&(u.tag===4&&(d=!0),!(u.tag===3||u.tag===5||u.tag===27));)u=u.return;return d}function m(u){var d=[null,null],g=v(u);return g===null||y(d,u,g.child,{foundSelf:!1}),d}function y(u,d,g,S){for(;g!==null;){if(g===d)S.foundSelf=!0;else if(g.tag===5||g.tag===27||g.tag===6){if(S.foundSelf)return u[1]=g,!0;u[0]=g}else if((g.tag!==22||g.memoizedState===null)&&y(u,d,g.child,S))return!0;g=g.sibling}return!1}function x(u){switch(u.tag){case 5:case 27:case 6:return u.stateNode;case 3:return u.stateNode.containerInfo;default:throw Error(n(559))}}var b=null,w=null;function C(u,d,g){return u===g?!0:u===d?(b=u,!0):!1}function A(u,d,g){return u===g?(w=u,!1):u===d?(w!==null&&(b=u),!0):!1}function M(u){if(u===null)return null;do u=u===null?null:u.return;while(u&&u.tag!==5&&u.tag!==27&&u.tag!==3);return u||null}function R(u,d,g){for(var S=0,T=u;T;T=g(T))S++;T=0;for(var D=d;D;D=g(D))T++;for(;0<S-T;)u=g(u),S--;for(;0<T-S;)d=g(d),T--;for(;S--;){if(u===d||d!==null&&u===d.alternate)return u;u=g(u),d=g(d)}return null}var E=Object.assign,N=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),H=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Z=Symbol.for("react.legacy_hidden"),Q=Symbol.for("react.memo_cache_sentinel"),U=Symbol.for("react.view_transition"),K=Symbol.for("react.recoverable"),se=Symbol.iterator;function ge(u){return u===null||typeof u!="object"?null:(u=se&&u[se]||u["@@iterator"],typeof u=="function"?u:null)}var ue=Symbol.for("react.client.reference");function de(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===ue?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case I:return"Fragment";case V:return"Profiler";case z:return"StrictMode";case X:return"Suspense";case P:return"SuspenseList";case W:return"Activity";case U:return"ViewTransition"}if(typeof u=="object")switch(u.$$typeof){case O:return"Portal";case H:return u.displayName||"Context";case Y:return(u._context.displayName||"Context")+".Consumer";case F:var d=u.render;return u=u.displayName,u||(u=d.displayName||d.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case q:return d=u.displayName||null,d!==null?d:de(u.type)||"Memo";case G:d=u._payload,u=u._init;try{return de(u(d))}catch{}}return null}var me=Array.isArray,ae=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,nt={pending:!1,data:null,method:null,action:null},be=[],Te=-1;function Me(u){return{current:u}}function Oe(u){0>Te||(u.current=be[Te],be[Te]=null,Te--)}function Ye(u,d){Te++,be[Te]=u.current,u.current=d}var _e=Me(null),ce=Me(null),Ce=Me(null),Ae=Me(null);function Xe(u,d){switch(Ye(Ce,d),Ye(ce,u),Ye(_e,null),d.nodeType){case 9:case 11:u=(u=d.documentElement)&&(u=u.namespaceURI)?OP(u):0;break;default:if(u=d.tagName,d=d.namespaceURI)d=OP(d),u=kP(d,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}Oe(_e),Ye(_e,u)}function Ge(){Oe(_e),Oe(ce),Oe(Ce)}function ut(u){var d=u.memoizedState;d!==null&&(ah._currentValue=d.memoizedState,Ye(Ae,u)),d=_e.current;var g=kP(d,u.type);d!==g&&(Ye(ce,u),Ye(_e,g))}function zt(u){ce.current===u&&(Oe(_e),Oe(ce)),Ae.current===u&&(Oe(Ae),ah._currentValue=nt)}var yr,Vt;function or(u){if(yr===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);yr=d&&d[1]||"",Vt=-1<g.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+yr+u+Vt}var Wt=!1;function Rt(u,d){if(!u||Wt)return"";Wt=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(d){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(ke){var ne=ke}Reflect.construct(u,[],we)}else{try{we.call()}catch(ke){ne=ke}we=!1;try{var fe=Object.getOwnPropertyDescriptor(u.prototype,"props");Object.defineProperty(u.prototype,"props",{configurable:!0,set:function(){throw Error()}}),we=!0,new u}finally{we&&(fe!==void 0?Object.defineProperty(u.prototype,"props",fe):delete u.prototype.props)}}}else{try{throw Error()}catch(ke){ne=ke}(we=u())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(ke){if(ke&&ne&&typeof ke.stack=="string")return[ke.stack,ne.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=S.DetermineComponentFrameRoot(),k=D[0],$=D[1];if(k&&$){var J=k.split(`
4
+ `),oe=$.split(`
5
+ `);for(T=S=0;S<J.length&&!J[S].includes("DetermineComponentFrameRoot");)S++;for(;T<oe.length&&!oe[T].includes("DetermineComponentFrameRoot");)T++;if(S===J.length||T===oe.length)for(S=J.length-1,T=oe.length-1;1<=S&&0<=T&&J[S]!==oe[T];)T--;for(;1<=S&&0<=T;S--,T--)if(J[S]!==oe[T]){if(S!==1||T!==1)do if(S--,T--,0>T||J[S]!==oe[T]){var ve=`
6
+ `+J[S].replace(" at new "," at ");return u.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",u.displayName)),ve}while(1<=S&&0<=T);break}}}finally{Wt=!1,Error.prepareStackTrace=g}return(g=u?u.displayName||u.name:"")?or(g):""}function Qn(u,d){switch(u.tag){case 26:case 27:case 5:return or(u.type);case 16:return or("Lazy");case 13:return u.child!==d&&d!==null?or("Suspense Fallback"):or("Suspense");case 19:return or("SuspenseList");case 0:case 15:return Rt(u.type,!1);case 11:return Rt(u.type.render,!1);case 1:return Rt(u.type,!0);case 31:return or("Activity");case 30:return or("ViewTransition");default:return""}}function Zr(u){try{var d="",g=null;do d+=Qn(u,g),g=u,u=u.return;while(u);return d}catch(S){return`
7
+ Error generating stack: `+S.message+`
8
+ `+S.stack}}var Fr=Object.prototype.hasOwnProperty,bn=e.unstable_scheduleCallback,tu=e.unstable_cancelCallback,ko=e.unstable_shouldYield,gf=e.unstable_requestPaint,_n=e.unstable_now,Wm=e.unstable_getCurrentPriorityLevel,tv=e.unstable_ImmediatePriority,rv=e.unstable_UserBlockingPriority,ru=e.unstable_NormalPriority,mf=e.unstable_LowPriority,nu=e.unstable_IdlePriority,nv=e.log,av=e.unstable_setDisableYieldValue,ji=null,pr=null;function Bi(u){if(typeof nv=="function"&&av(u),pr&&typeof pr.setStrictMode=="function")try{pr.setStrictMode(ji,u)}catch{}}var cr=Math.clz32?Math.clz32:Gr,Lt=Math.log,At=Math.LN2;function Gr(u){return u>>>=0,u===0?32:31-(Lt(u)/At|0)|0}var zi=256,vi=262144,au=4194304;function iu(u){var d=u&42;if(d!==0)return d;switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return u&-u;case 262144:case 524288:case 1048576:case 2097152:return u&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function qm(u,d,g){var S=u.pendingLanes;if(S===0)return 0;var T=0,D=u.suspendedLanes,k=u.pingedLanes;u=u.warmLanes;var $=S&134217727;return $!==0?(S=$&~D,S!==0?T=iu(S):(k&=$,k!==0?T=iu(k):g||(g=$&~u,g!==0&&(T=iu(g))))):($=S&~D,$!==0?T=iu($):k!==0?T=iu(k):g||(g=S&~u,g!==0&&(T=iu(g)))),T===0?0:d!==0&&d!==T&&(d&D)===0&&(D=T&-T,g=d&-d,D>=g||D===32&&(g&4194048)!==0)?d:T}function iv(u,d){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&d)===0}function oI(u,d){(d&8)!==0&&(d|=d&32);var g=u.entangledLanes;if(g!==0)for(u=u.entanglements,g&=d;0<g;){var S=31-cr(g),T=1<<S;d|=u[S],g&=~T}return d}function rX(u,d){switch(u){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lI(){var u=au;return au<<=1,(au&62914560)===0&&(au=4194304),u}function i1(u){for(var d=[],g=0;31>g;g++)d.push(u);return d}function ov(u,d){u.pendingLanes|=d,d!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function nX(u,d,g,S,T,D){var k=u.pendingLanes;u.pendingLanes=g,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=g,u.entangledLanes&=g,u.errorRecoveryDisabledLanes&=g,u.shellSuspendCounter=0;var $=u.entanglements,J=u.expirationTimes,oe=u.hiddenUpdates;for(g=k&~g;0<g;){var ve=31-cr(g),we=1<<ve;$[ve]=0,J[ve]=-1;var ne=oe[ve];if(ne!==null)for(oe[ve]=null,ve=0;ve<ne.length;ve++){var fe=ne[ve];fe!==null&&(fe.lane&=-536870913)}g&=~we}S!==0&&sI(u,S,0),D!==0&&T===0&&u.tag!==0&&(u.suspendedLanes|=D&~(k&~d))}function sI(u,d,g){u.pendingLanes|=d,u.suspendedLanes&=~d;var S=31-cr(d);u.entangledLanes|=d,u.entanglements[S]=u.entanglements[S]|1073741824|g&261930}function uI(u,d){var g=u.entangledLanes|=d;for(u=u.entanglements;g;){var S=31-cr(g),T=1<<S;T&d|u[S]&d&&(u[S]|=d),g&=~T}}function cI(u,d){var g=d&-d;return g=(g&42)!==0?1:o1(g),(g&(u.suspendedLanes|d))!==0?0:g}function o1(u){switch(u){case 2:u=1;break;case 8:u=4;break;case 32:u=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:u=128;break;case 268435456:u=134217728;break;default:u=0}return u}function l1(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function fI(){var u=ye.p;return u!==0?u:(u=window.event,u===void 0?32:yj(u.type))}function hI(u,d){var g=ye.p;try{return ye.p=u,d()}finally{ye.p=g}}var Po=Math.random().toString(36).slice(2),on="__reactFiber$"+Po,Jn="__reactProps$"+Po,yf="__reactContainer$"+Po,dI="__reactEvents$"+Po,aX="__reactListeners$"+Po,iX="__reactHandles$"+Po,vI="__reactResources$"+Po,lv="__reactMarker$"+Po,Xm="__reactLoad$"+Po;function Zm(u){delete u[on],delete u[Jn],delete u[aX],delete u[iX]}function ou(u){var d;if(d=u[on])return d;for(var g=u.parentNode;g;){if(d=g[yf]||g[on]){if(g=d.alternate,d.child!==null||g!==null&&g.child!==null)for(u=QP(u);u!==null;){if(g=u[on])return g;u=QP(u)}return d}u=g,g=u.parentNode}return null}function xf(u){if(u=u[on]||u[yf]){var d=u.tag;if(d===5||d===6||d===13||d===31||d===26||d===27||d===3)return u}return null}function sv(u){var d=u.tag;if(d===5||d===26||d===27||d===6)return u.stateNode;throw Error(n(33))}function Sf(u){var d=u[vI];return d||(d=u[vI]={hoistableStyles:new Map,hoistableScripts:new Map}),d}function Kr(u){u[lv]=!0}function pI(u){u[Xm]=void 0}var gI=new Set,mI={};function lu(u,d){bf(u,d),bf(u+"Capture",d)}function bf(u,d){for(mI[u]=d,u=0;u<d.length;u++)gI.add(d[u])}var oX=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),yI={},xI={};function lX(u){return Fr.call(xI,u)?!0:Fr.call(yI,u)?!1:oX.test(u)?xI[u]=!0:(yI[u]=!0,!1)}var jt=!1;function SI(){var u=jt;return jt=!1,u}function Km(u,d,g){if(lX(d))if(g===null)u.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":u.removeAttribute(d);return;case"boolean":var S=d.toLowerCase().slice(0,5);if(S!=="data-"&&S!=="aria-"){u.removeAttribute(d);return}}u.setAttribute(d,g)}}function Qm(u,d,g){if(g===null)u.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(d);return}u.setAttribute(d,g)}}function jo(u,d,g,S){if(S===null)u.removeAttribute(g);else{switch(typeof S){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(g);return}u.setAttributeNS(d,g,S)}}function ha(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function bI(u){var d=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function sX(u,d,g){var S=Object.getOwnPropertyDescriptor(u.constructor.prototype,d);if(!u.hasOwnProperty(d)&&typeof S<"u"&&typeof S.get=="function"&&typeof S.set=="function"){var T=S.get,D=S.set;return Object.defineProperty(u,d,{configurable:!0,get:function(){return T.call(this)},set:function(k){g=""+k,D.call(this,k)}}),Object.defineProperty(u,d,{enumerable:S.enumerable}),{getValue:function(){return g},setValue:function(k){g=""+k},stopTracking:function(){u._valueTracker=null,delete u[d]}}}}function s1(u){if(!u._valueTracker){var d=bI(u)?"checked":"value";u._valueTracker=sX(u,d,""+u[d])}}function _I(u){if(!u)return!1;var d=u._valueTracker;if(!d)return!0;var g=d.getValue(),S="";return u&&(S=bI(u)?u.checked?"true":"false":u.value),u=S,u!==g?(d.setValue(u),!0):!1}var uX=/[\n"\\]/g;function Na(u){return u.replace(uX,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function u1(u,d,g,S,T,D,k,$){u.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?u.type=k:u.removeAttribute("type"),d!=null?k==="number"?(d===0&&u.value===""||u.value!=d)&&(u.value=""+ha(d)):u.value!==""+ha(d)&&(u.value=""+ha(d)):k!=="submit"&&k!=="reset"||u.removeAttribute("value"),d!=null?k==="number"&&u.value==d?c1(u,ha(u.value)):c1(u,ha(d)):g!=null?c1(u,ha(g)):S!=null&&u.removeAttribute("value"),T==null&&D!=null&&(u.defaultChecked=!!D),T!=null&&(u.checked=T&&typeof T!="function"&&typeof T!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?u.name=""+ha($):u.removeAttribute("name")}function wI(u,d,g,S,T,D,k,$){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(u.type=D),d!=null||g!=null){if(!(D!=="submit"&&D!=="reset"||d!=null)){s1(u);return}g=g!=null?""+ha(g):"",d=d!=null?""+ha(d):g,$||d===u.value||(u.value=d),u.defaultValue=d}S=S??T,S=typeof S!="function"&&typeof S!="symbol"&&!!S,u.checked=$?u.checked:!!S,u.defaultChecked=!!S,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(u.name=k),s1(u)}function c1(u,d){u.defaultValue!==""+d&&(u.defaultValue=""+d)}function _f(u,d,g,S){if(u=u.options,d){d={};for(var T=0;T<g.length;T++)d["$"+g[T]]=!0;for(g=0;g<u.length;g++)T=d.hasOwnProperty("$"+u[g].value),u[g].selected!==T&&(u[g].selected=T),T&&S&&(u[g].defaultSelected=!0)}else{for(g=""+ha(g),d=null,T=0;T<u.length;T++){if(u[T].value===g){u[T].selected=!0,S&&(u[T].defaultSelected=!0);return}d!==null||u[T].disabled||(d=u[T])}d!==null&&(d.selected=!0)}}function CI(u,d,g){if(d!=null&&(d=""+ha(d),d!==u.value&&(u.value=d),g==null)){u.defaultValue!==d&&(u.defaultValue=d);return}u.defaultValue=g!=null?""+ha(g):""}function TI(u,d,g,S){if(d==null){if(S!=null){if(g!=null)throw Error(n(92));if(me(S)){if(1<S.length)throw Error(n(93));S=S[0]}g=S}g==null&&(g=""),d=g}g=ha(d),u.defaultValue=g,S=u.textContent,S===g&&S!==""&&S!==null&&(u.value=S),s1(u)}function wf(u,d){if(d){var g=u.firstChild;if(g&&g===u.lastChild&&g.nodeType===3){g.nodeValue=d;return}}u.textContent=d}var cX=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function AI(u,d,g){var S=d.indexOf("--")===0;g==null||typeof g=="boolean"||g===""?S?u.setProperty(d,""):d==="float"?u.cssFloat="":u[d]="":S?u.setProperty(d,g):typeof g!="number"||g===0||cX.has(d)?d==="float"?u.cssFloat=g:u[d]=(""+g).trim():u[d]=g+"px"}function DI(u,d,g){if(d!=null&&typeof d!="object")throw Error(n(62));if(u=u.style,g!=null){for(var S in g)!g.hasOwnProperty(S)||d!=null&&d.hasOwnProperty(S)||(S.indexOf("--")===0?u.setProperty(S,""):S==="float"?u.cssFloat="":u[S]="",jt=!0);for(var T in d)S=d[T],d.hasOwnProperty(T)&&g[T]!==S&&(AI(u,T,S),jt=!0)}else for(var D in d)d.hasOwnProperty(D)&&AI(u,D,d[D])}function f1(u){if(u.indexOf("-")===-1)return!1;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fX=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hX=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Jm(u){return hX.test(""+u)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":u}function Vi(){}var h1=null;function d1(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var Cf=null,Tf=null;function MI(u){var d=xf(u);if(d&&(u=d.stateNode)){var g=u[Jn]||null;e:switch(u=d.stateNode,d.type){case"input":if(u1(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name),d=g.name,g.type==="radio"&&d!=null){for(g=u;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll('input[name="'+Na(""+d)+'"][type="radio"]'),d=0;d<g.length;d++){var S=g[d];if(S!==u&&S.form===u.form){var T=S[Jn]||null;if(!T)throw Error(n(90));u1(S,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(d=0;d<g.length;d++)S=g[d],S.form===u.form&&_I(S)}break e;case"textarea":CI(u,g.value,g.defaultValue);break e;case"select":d=g.value,d!=null&&_f(u,!!g.multiple,d,!1)}}}var v1=!1;function RI(u,d,g){if(v1)return u(d,g);v1=!0;try{var S=u(d);return S}finally{if(v1=!1,(Cf!==null||Tf!==null)&&(Jy(),Cf&&(d=Cf,u=Tf,Tf=Cf=null,MI(d),u)))for(d=0;d<u.length;d++)MI(u[d])}}function uv(u,d){var g=u.stateNode;if(g===null)return null;var S=g[Jn]||null;if(S===null)return null;g=S[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(u=u.type,S=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!S;break e;default:u=!1}if(u)return null;if(g&&typeof g!="function")throw Error(n(231,d,typeof g));return g}var Bo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p1=!1;if(Bo)try{var cv={};Object.defineProperty(cv,"passive",{get:function(){p1=!0}}),window.addEventListener("test",cv,cv),window.removeEventListener("test",cv,cv)}catch{p1=!1}var Ll=null,g1=null,ey=null;function EI(){if(ey)return ey;var u,d=g1,g=d.length,S,T="value"in Ll?Ll.value:Ll.textContent,D=T.length;for(u=0;u<g&&d[u]===T[u];u++);var k=g-u;for(S=1;S<=k&&d[g-S]===T[D-S];S++);return ey=T.slice(u,1<S?1-S:void 0)}function ty(u){var d=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&d===13&&(u=13)):u=d,u===10&&(u=13),32<=u||u===13?u:0}function ry(){return!0}function NI(){return!1}function kn(u){function d(g,S,T,D,k){this._reactName=g,this._targetInst=T,this.type=S,this.nativeEvent=D,this.target=k,this.currentTarget=null;for(var $ in u)u.hasOwnProperty($)&&(g=u[$],this[$]=g?g(D):D[$]);return this.isDefaultPrevented=(D.defaultPrevented!=null?D.defaultPrevented:D.returnValue===!1)?ry:NI,this.isPropagationStopped=NI,this}return E(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=ry)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=ry)},persist:function(){},isPersistent:ry}),d}var Il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ny=kn(Il),fv=E({},Il,{view:0,detail:0}),dX=kn(fv),m1,y1,hv,ay=E({},fv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:S1,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==hv&&(hv&&u.type==="mousemove"?(m1=u.screenX-hv.screenX,y1=u.screenY-hv.screenY):y1=m1=0,hv=u),m1)},movementY:function(u){return"movementY"in u?u.movementY:y1}}),LI=kn(ay),vX=E({},ay,{dataTransfer:0}),pX=kn(vX),gX=E({},fv,{relatedTarget:0}),x1=kn(gX),mX=E({},Il,{animationName:0,elapsedTime:0,pseudoElement:0}),yX=kn(mX),xX=E({},Il,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),SX=kn(xX),bX=E({},Il,{data:0}),II=kn(bX),_X={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wX={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},CX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TX(u){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(u):(u=CX[u])?!!d[u]:!1}function S1(){return TX}var AX=E({},fv,{key:function(u){if(u.key){var d=_X[u.key]||u.key;if(d!=="Unidentified")return d}return u.type==="keypress"?(u=ty(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?wX[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:S1,charCode:function(u){return u.type==="keypress"?ty(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?ty(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),DX=kn(AX),MX=E({},ay,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OI=kn(MX),RX=E({},Il,{submitter:0}),EX=kn(RX),NX=E({},fv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:S1}),LX=kn(NX),IX=E({},Il,{propertyName:0,elapsedTime:0,pseudoElement:0}),OX=kn(IX),kX=E({},ay,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),PX=kn(kX),jX=E({},Il,{newState:0,oldState:0,source:0}),BX=kn(jX),zX=[9,13,27,32],b1=Bo&&"CompositionEvent"in window,dv=null;Bo&&"documentMode"in document&&(dv=document.documentMode);var VX=Bo&&"TextEvent"in window&&!dv,kI=Bo&&(!b1||dv&&8<dv&&11>=dv),PI=" ",jI=!1;function BI(u,d){switch(u){case"keyup":return zX.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zI(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Af=!1;function FX(u,d){switch(u){case"compositionend":return zI(d);case"keypress":return d.which!==32?null:(jI=!0,PI);case"textInput":return u=d.data,u===PI&&jI?null:u;default:return null}}function GX(u,d){if(Af)return u==="compositionend"||!b1&&BI(u,d)?(u=EI(),ey=g1=Ll=null,Af=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return kI&&d.locale!=="ko"?null:d.data;default:return null}}var HX={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function VI(u){var d=u&&u.nodeName&&u.nodeName.toLowerCase();return d==="input"?!!HX[u.type]:d==="textarea"}function FI(u,d,g,S){Cf?Tf?Tf.push(S):Tf=[S]:Cf=S,d=i0(d,"onChange"),0<d.length&&(g=new ny("onChange","change",null,g,S),u.push({event:g,listeners:d}))}var vv=null,pv=null;function UX(u){MP(u,0)}function iy(u){var d=sv(u);if(_I(d))return u}function GI(u,d){if(u==="change")return d}var HI=!1;if(Bo){var _1;if(Bo){var w1="oninput"in document;if(!w1){var UI=document.createElement("div");UI.setAttribute("oninput","return;"),w1=typeof UI.oninput=="function"}_1=w1}else _1=!1;HI=_1&&(!document.documentMode||9<document.documentMode)}function YI(){vv&&(vv.detachEvent("onpropertychange",$I),pv=vv=null)}function $I(u){if(u.propertyName==="value"&&iy(pv)){var d=[];FI(d,pv,u,d1(u)),RI(UX,d)}}function YX(u,d,g){u==="focusin"?(YI(),vv=d,pv=g,vv.attachEvent("onpropertychange",$I)):u==="focusout"&&YI()}function $X(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return iy(pv)}function WX(u,d){if(u==="click")return iy(d)}function qX(u,d){if(u==="input"||u==="change")return iy(d)}function XX(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var da=typeof Object.is=="function"?Object.is:XX;function gv(u,d){if(da(u,d))return!0;if(typeof u!="object"||u===null||typeof d!="object"||d===null)return!1;var g=Object.keys(u),S=Object.keys(d);if(g.length!==S.length)return!1;for(S=0;S<g.length;S++){var T=g[S];if(!Fr.call(d,T)||!da(u[T],d[T]))return!1}return!0}function C1(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}function WI(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function qI(u,d){var g=WI(u);u=0;for(var S;g;){if(g.nodeType===3){if(S=u+g.textContent.length,u<=d&&S>=d)return{node:g,offset:d-u};u=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=WI(g)}}function XI(u,d){return u&&d?u===d?!0:u&&u.nodeType===3?!1:d&&d.nodeType===3?XI(u,d.parentNode):"contains"in u?u.contains(d):u.compareDocumentPosition?!!(u.compareDocumentPosition(d)&16):!1:!1}function ZI(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var d=C1(u.document);d instanceof u.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)u=d.contentWindow;else break;d=C1(u.document)}return d}function T1(u){var d=u&&u.nodeName&&u.nodeName.toLowerCase();return d&&(d==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||d==="textarea"||u.contentEditable==="true")}var ZX=Bo&&"documentMode"in document&&11>=document.documentMode,Df=null,A1=null,mv=null,D1=!1;function KI(u,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;D1||Df==null||Df!==C1(S)||(S=Df,"selectionStart"in S&&T1(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),mv&&gv(mv,S)||(mv=S,S=i0(A1,"onSelect"),0<S.length&&(d=new ny("onSelect","select",null,d,g),u.push({event:d,listeners:S}),d.target=Df)))}function su(u,d){var g={};return g[u.toLowerCase()]=d.toLowerCase(),g["Webkit"+u]="webkit"+d,g["Moz"+u]="moz"+d,g}var Mf={animationend:su("Animation","AnimationEnd"),animationiteration:su("Animation","AnimationIteration"),animationstart:su("Animation","AnimationStart"),transitionrun:su("Transition","TransitionRun"),transitionstart:su("Transition","TransitionStart"),transitioncancel:su("Transition","TransitionCancel"),transitionend:su("Transition","TransitionEnd")},M1={},QI={};Bo&&(QI=document.createElement("div").style,"AnimationEvent"in window||(delete Mf.animationend.animation,delete Mf.animationiteration.animation,delete Mf.animationstart.animation),"TransitionEvent"in window||delete Mf.transitionend.transition);function uu(u){if(M1[u])return M1[u];if(!Mf[u])return u;var d=Mf[u],g;for(g in d)if(d.hasOwnProperty(g)&&g in QI)return M1[u]=d[g];return u}var JI=uu("animationend"),eO=uu("animationiteration"),tO=uu("animationstart"),KX=uu("transitionrun"),QX=uu("transitionstart"),JX=uu("transitioncancel"),rO=uu("transitionend"),nO=new Map,R1="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");R1.push("scrollEnd");function pi(u,d){nO.set(u,d),lu(d,[u])}var eZ=0;function zo(u,d){if(u.name!=null&&u.name!=="auto")return u.name;if(d.autoName!==null)return d.autoName;u=xi.identifierPrefix;var g=eZ++;return u="_"+u+"t_"+g.toString(32)+"_",d.autoName=u}function aO(u){if(u==null||typeof u=="string")return u;var d=null,g=qf;if(g!==null)for(var S=0;S<g.length;S++){var T=u[g[S]];if(T!=null){if(T==="none")return"none";d=d==null?T:d+(" "+T)}}return d??u.default}function Vo(u,d){return u=aO(u),d=aO(d),d==null?u==="auto"?null:u:d==="auto"?null:d}var oy=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},La=[],Rf=0,E1=0;function ly(){for(var u=Rf,d=E1=Rf=0;d<u;){var g=La[d];La[d++]=null;var S=La[d];La[d++]=null;var T=La[d];La[d++]=null;var D=La[d];if(La[d++]=null,S!==null&&T!==null){var k=S.pending;k===null?T.next=T:(T.next=k.next,k.next=T),S.pending=T}D!==0&&iO(g,T,D)}}function sy(u,d,g,S){La[Rf++]=u,La[Rf++]=d,La[Rf++]=g,La[Rf++]=S,E1|=S,u.lanes|=S,u=u.alternate,u!==null&&(u.lanes|=S)}function N1(u,d,g,S){return sy(u,d,g,S),uy(u)}function cu(u,d){return sy(u,null,null,d),uy(u)}function iO(u,d,g){u.lanes|=g;var S=u.alternate;S!==null&&(S.lanes|=g);for(var T=!1,D=u.return;D!==null;)D.childLanes|=g,S=D.alternate,S!==null&&(S.childLanes|=g),D.tag===22&&(u=D.stateNode,u===null||u._visibility&1||(T=!0)),u=D,D=D.return;return u.tag===3?(D=u.stateNode,T&&d!==null&&(T=31-cr(g),u=D.hiddenUpdates,S=u[T],S===null?u[T]=[d]:S.push(d),d.lane=g|536870912),D):null}function uy(u){if(50<zv)throw zv=0,Qy=null,Error(n(185));for(var d=u.return;d!==null;)u=d,d=u.return;return u.tag===3?u.stateNode:null}var Ef={};function tZ(u,d,g,S){this.tag=u,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ea(u,d,g,S){return new tZ(u,d,g,S)}function L1(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Fo(u,d){var g=u.alternate;return g===null?(g=ea(u.tag,d,u.key,u.mode),g.elementType=u.elementType,g.type=u.type,g.stateNode=u.stateNode,g.alternate=u,u.alternate=g):(g.pendingProps=d,g.type=u.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=u.flags&1206910976,g.childLanes=u.childLanes,g.lanes=u.lanes,g.child=u.child,g.memoizedProps=u.memoizedProps,g.memoizedState=u.memoizedState,g.updateQueue=u.updateQueue,d=u.dependencies,g.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},g.sibling=u.sibling,g.index=u.index,g.ref=u.ref,g.refCleanup=u.refCleanup,g}function oO(u,d){u.flags&=1206910978;var g=u.alternate;return g===null?(u.childLanes=0,u.lanes=d,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=g.childLanes,u.lanes=g.lanes,u.child=g.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=g.memoizedProps,u.memoizedState=g.memoizedState,u.updateQueue=g.updateQueue,u.type=g.type,d=g.dependencies,u.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),u}function cy(u,d,g,S,T,D){var k=0;if(S=u,typeof S=="function")L1(S)&&(k=1);else if(typeof S=="string")k=RK(u,g,_e.current)?26:u==="html"||u==="head"||u==="body"?27:5;else e:switch(S){case W:return u=ea(31,g,d,T),u.elementType=W,u.lanes=D,u;case I:return fu(g.children,T,D,d);case z:k=8,T|=24;break;case V:return u=ea(12,g,d,T|2),u.elementType=V,u.lanes=D,u;case X:return u=ea(13,g,d,T),u.elementType=X,u.lanes=D,u;case P:return u=ea(19,g,d,T),u.elementType=P,u.lanes=D,u;case Z:case U:return u=T|32,u=ea(30,g,d,u),u.elementType=U,u.lanes=D,u.stateNode={autoName:null,paired:null,clones:null,ref:null},u;default:if(typeof S=="object"&&S!==null)switch(S.$$typeof){case H:k=10;break e;case Y:k=9;break e;case F:k=11;break e;case q:k=14;break e;case G:k=16,S=null;break e}k=29,g=Error(n(130,u===null?"null":typeof u,"")),S=null}return d=ea(k,g,d,T),d.elementType=u,d.type=S,d.lanes=D,d}function fu(u,d,g,S){return u=ea(7,u,S,d),u.lanes=g,u}function I1(u,d,g){return u=ea(6,u,null,d),u.lanes=g,u}function lO(u){var d=ea(18,null,null,0);return d.stateNode=u,d}function O1(u,d,g){return d=ea(4,u.children!==null?u.children:[],u.key,d),d.lanes=g,d.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},d}var sO=new WeakMap;function Ia(u,d){if(typeof u=="object"&&u!==null){var g=sO.get(u);return g!==void 0?g:(d={value:u,source:d,stack:Zr(d)},sO.set(u,d),d)}return{value:u,source:d,stack:Zr(d)}}var Nf=[],Lf=0,fy=null,yv=0,Oa=[],ka=0,Ol=null,Fi=1,Gi="";function Go(u,d){Nf[Lf++]=yv,Nf[Lf++]=fy,fy=u,yv=d}function uO(u,d,g){Oa[ka++]=Fi,Oa[ka++]=Gi,Oa[ka++]=Ol,Ol=u;var S=Fi;u=Gi;var T=32-cr(S)-1;S&=~(1<<T),g+=1;var D=32-cr(d)+T;if(30<D){var k=T-T%5;D=(S&(1<<k)-1).toString(32),S>>=k,T-=k,Fi=1<<32-cr(d)+T|g<<T|S,Gi=D+u}else Fi=1<<D|g<<T|S,Gi=u}function hy(u){u.return!==null&&(Go(u,1),uO(u,1,0))}function k1(u){for(;u===fy;)fy=Nf[--Lf],Nf[Lf]=null,yv=Nf[--Lf],Nf[Lf]=null;for(;u===Ol;)Ol=Oa[--ka],Oa[ka]=null,Gi=Oa[--ka],Oa[ka]=null,Fi=Oa[--ka],Oa[ka]=null}function cO(u,d){Oa[ka++]=Fi,Oa[ka++]=Gi,Oa[ka++]=Ol,Fi=d.id,Gi=d.overflow,Ol=u}var Qr=null,tr=null,bt=!1,kl=null,Pa=!1,P1=Error(n(519));function Pl(u){var d=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xv(Ia(d,u)),P1}function fO(u){var d=u.stateNode,g=u.type,S=u.memoizedProps;switch(d[on]=u,d[Jn]=S,g){case"dialog":Mt("cancel",d),Mt("close",d);break;case"iframe":case"object":case"embed":Mt("load",d);break;case"video":case"audio":for(g=0;g<Fv.length;g++)Mt(Fv[g],d);break;case"source":Mt("error",d);break;case"img":case"image":case"link":Mt("error",d),Mt("load",d);break;case"details":Mt("toggle",d);break;case"input":Mt("invalid",d),wI(d,S.value,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name,!0);break;case"select":Mt("invalid",d);break;case"textarea":Mt("invalid",d),TI(d,S.value,S.defaultValue,S.children)}g=S.children,typeof g!="string"&&typeof g!="number"&&typeof g!="bigint"||d.textContent===""+g||S.suppressHydrationWarning===!0||LP(d.textContent,g)?(S.popover!=null&&(Mt("beforetoggle",d),Mt("toggle",d)),S.onScroll!=null&&Mt("scroll",d),S.onScrollEnd!=null&&Mt("scrollend",d),S.onClick!=null&&(d.onclick=Vi),d=!0):d=!1,d||Pl(u,!0)}function dy(u){for(Qr=u.return;Qr;)switch(Qr.tag){case 5:case 31:case 13:Pa=!1;return;case 27:case 3:Pa=!0;return;default:Qr=Qr.return}}function If(u){if(u!==Qr)return!1;if(!bt)return dy(u),bt=!0,!1;var d=u.tag,g;if((g=d!==3&&d!==27)&&((g=d===5)&&(g=u.type,g=!(g!=="form"&&g!=="button")||hC(u.type,u.memoizedProps)),g=!g),g&&tr&&Pl(u),dy(u),d===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));tr=KP(u)}else if(d===31){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(317));tr=KP(u)}else d===27?(d=tr,Ql(u.type)?(u=bC,bC=null,tr=u):tr=d):tr=Qr?Ba(u.stateNode.nextSibling):null;return!0}function hu(){tr=Qr=null,bt=!1}function j1(){var u=kl;return u!==null&&(na===null?na=u:na.push.apply(na,u),kl=null),u}function xv(u){kl===null?kl=[u]:kl.push(u)}var B1=Me(null),du=null,Ho=null;function jl(u,d,g){Ye(B1,d._currentValue),d._currentValue=g}function Uo(u){u._currentValue=B1.current,Oe(B1)}function vy(u,d,g){for(;u!==null;){var S=u.alternate;if((u.childLanes&d)!==d?(u.childLanes|=d,S!==null&&(S.childLanes|=d)):S!==null&&(S.childLanes&d)!==d&&(S.childLanes|=d),u===g)break;u=u.return}}function z1(u,d,g,S){var T=u.child;for(T!==null&&(T.return=u);T!==null;){var D=T.dependencies;if(D!==null){var k=T.child;D=D.firstContext;e:for(;D!==null;){var $=D;D=T;for(var J=0;J<d.length;J++)if($.context===d[J]){D.lanes|=g,$=D.alternate,$!==null&&($.lanes|=g),vy(D.return,g,u),S||(k=null);break e}D=$.next}}else if(T.tag===18){if(k=T.return,k===null)throw Error(n(341));k.lanes|=g,D=k.alternate,D!==null&&(D.lanes|=g),vy(k,g,u),k=null}else T.tag===13&&T.memoizedState!==null&&T.memoizedState.dehydrated===null?(T.lanes|=g,k=T.alternate,k!==null&&(k.lanes|=g),vy(T.return,g,u),k=T.child,k=k!==null?k.sibling:null):k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===u){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}}function vu(u,d,g,S){u=null;for(var T=d,D=!1;T!==null;){if(!D){if((T.flags&524288)!==0)D=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var k=T.alternate;if(k===null)throw Error(n(387));if(k=k.memoizedProps,k!==null){var $=T.type;da(T.pendingProps.value,k.value)||(u!==null?u.push($):u=[$])}}else if(T===Ae.current){if(k=T.alternate,k===null)throw Error(n(387));k.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(u!==null?u.push(ah):u=[ah])}T=T.return}return u!==null&&z1(d,u,g,S),d.flags|=262144,u!==null}function py(u){for(u=u.firstContext;u!==null;){if(!da(u.context._currentValue,u.memoizedValue))return!0;u=u.next}return!1}function pu(u){du=u,Ho=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function ln(u){return hO(du,u)}function gy(u,d){return du===null&&pu(u),hO(u,d)}function hO(u,d){var g=d._currentValue;if(d={context:d,memoizedValue:g,next:null},Ho===null){if(u===null)throw Error(n(308));Ho=d,u.dependencies={lanes:0,firstContext:d},u.flags|=524288}else Ho=Ho.next=d;return g}var rZ=typeof AbortController<"u"?AbortController:function(){var u=[],d=this.signal={aborted:!1,addEventListener:function(g,S){u.push(S)}};this.abort=function(){d.aborted=!0,u.forEach(function(g){return g()})}},nZ=e.unstable_scheduleCallback,aZ=e.unstable_NormalPriority,Er={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function V1(){return{controller:new rZ,data:new Map,refCount:0}}function Sv(u){u.refCount--,u.refCount===0&&nZ(aZ,function(){u.controller.abort()})}function dO(u,d){if((u.pendingLanes&4194048)!==0){var g=u.transitionTypes;for(g===null&&(g=u.transitionTypes=[]),u=0;u<d.length;u++){var S=d[u];g.indexOf(S)===-1&&g.push(S)}}}var bv=null;function iZ(u){var d=u.transitionTypes;return u.transitionTypes=null,d}var _v=null,F1=0,gu=0,Of=null;function oZ(u,d){if(_v===null){var g=_v=[];F1=0,gu=nC(),Of={status:"pending",value:void 0,then:function(S){g.push(S)}}}return F1++,d.then(vO,vO),d}function vO(){if(--F1===0&&(bv=null,_v!==null)){Of!==null&&(Of.status="fulfilled");var u=_v;_v=null,gu=0,Of=null;for(var d=0;d<u.length;d++)(0,u[d])()}}function lZ(u,d){var g=[],S={status:"pending",value:null,reason:null,then:function(T){g.push(T)}};return u.then(function(){S.status="fulfilled",S.value=d;for(var T=0;T<g.length;T++)(0,g[T])(d)},function(T){for(S.status="rejected",S.reason=T,T=0;T<g.length;T++)(0,g[T])(void 0)}),S}var pO=ae.S;ae.S=function(u,d){if(lP=_n(),typeof d=="object"&&d!==null&&typeof d.then=="function"&&oZ(u,d),bv!==null)for(var g=Qf;g!==null;)dO(g,bv),g=g.next;if(g=u.types,g!==null){for(var S=Qf;S!==null;)dO(S,g),S=S.next;if(gu!==0){S=bv,S===null&&(S=bv=[]);for(var T=0;T<g.length;T++){var D=g[T];S.indexOf(D)===-1&&S.push(D)}}}pO!==null&&pO(u,d)};var mu=Me(null);function G1(){var u=mu.current;return u!==null?u:Jt.pooledCache}function my(u,d){d===null?Ye(mu,mu.current):Ye(mu,d.pool)}function gO(){var u=G1();return u===null?null:{parent:Er._currentValue,pool:u}}var kf=Error(n(460)),H1=Error(n(474)),yy=Error(n(542)),xy={then:function(){}};function mO(u){return u=u.status,u==="fulfilled"||u==="rejected"}function yO(u,d,g){switch(g=u[g],g===void 0?u.push(d):g!==d&&(d.then(Vi,Vi),d=g),d.status){case"fulfilled":return d.value;case"rejected":throw u=d.reason,SO(u),u===void 0&&!("reason"in d)?Error(n(600)):u;default:if(typeof d.status=="string")d.then(Vi,Vi);else{if(u=Jt,u!==null&&100<u.shellSuspendCounter)throw Error(n(482));u=d,u.status="pending",u.then(function(S){if(d.status==="pending"){var T=d;T.status="fulfilled",T.value=S}},function(S){if(d.status==="pending"){var T=d;T.status="rejected",T.reason=S}})}switch(d.status){case"fulfilled":return d.value;case"rejected":throw u=d.reason,SO(u),u}throw xu=d,kf}}function yu(u){try{var d=u._init;return d(u._payload)}catch(g){throw g!==null&&typeof g=="object"&&typeof g.then=="function"?(xu=g,kf):g}}var xu=null;function xO(){if(xu===null)throw Error(n(459));var u=xu;return xu=null,u}function SO(u){if(u===kf||u===yy)throw Error(n(483))}var Pf=null,wv=0;function Sy(u){var d=wv;return wv+=1,Pf===null&&(Pf=[]),yO(Pf,u,d)}function Bl(u,d){d=d.props.ref,u.ref=d!==void 0?d:null}function by(u,d){throw d.$$typeof===N?Error(n(525)):(u=Object.prototype.toString.call(d),Error(n(31,u==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":u)))}function bO(u){function d(ie,te){if(u){var le=ie.deletions;le===null?(ie.deletions=[te],ie.flags|=16):le.push(te)}}function g(ie,te){if(!u)return null;for(;te!==null;)d(ie,te),te=te.sibling;return null}function S(ie){for(var te=new Map;ie!==null;)ie.key===null?te.set(ie.index,ie):te.set(ie.key,ie),ie=ie.sibling;return te}function T(ie,te){return ie=Fo(ie,te),ie.index=0,ie.sibling=null,ie}function D(ie,te,le){return ie.index=le,u?(le=ie.alternate,le!==null?(le=le.index,le<te?(ie.flags|=2,te):le):(ie.flags|=134217730,te)):(ie.flags|=1048576,te)}function k(ie){return u&&ie.alternate===null&&(ie.flags|=134217730),ie}function $(ie,te,le,Se){return te===null||te.tag!==6?(te=I1(le,ie.mode,Se),te.return=ie,te):(te=T(te,le),te.return=ie,te)}function J(ie,te,le,Se){var He=le.type;return He===I?(ie=ve(ie,te,le.props.children,Se,le.key),Bl(ie,le),ie):te!==null&&(te.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===G&&yu(He)===te.type)?(te=T(te,le.props),Bl(te,le),te.return=ie,te):(te=cy(le.type,le.key,le.props,null,ie.mode,Se),Bl(te,le),te.return=ie,te)}function oe(ie,te,le,Se){return te===null||te.tag!==4||te.stateNode.containerInfo!==le.containerInfo||te.stateNode.implementation!==le.implementation?(te=O1(le,ie.mode,Se),te.return=ie,te):(te=T(te,le.children||[]),te.return=ie,te)}function ve(ie,te,le,Se,He){return te===null||te.tag!==7?(te=fu(le,ie.mode,Se,He),te.return=ie,te):(te=T(te,le),te.return=ie,te)}function we(ie,te,le){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=I1(""+te,ie.mode,le),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case L:return le=cy(te.type,te.key,te.props,null,ie.mode,le),Bl(le,te),le.return=ie,le;case O:return te=O1(te,ie.mode,le),te.return=ie,te;case G:return te=yu(te),we(ie,te,le)}if(me(te)||ge(te))return te=fu(te,ie.mode,le,null),te.return=ie,te;if(typeof te.then=="function")return we(ie,Sy(te),le);if(te.$$typeof===H)return we(ie,gy(ie,te),le);by(ie,te)}return null}function ne(ie,te,le,Se){var He=te!==null?te.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return He!==null?null:$(ie,te,""+le,Se);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case L:return le.key===He?J(ie,te,le,Se):null;case O:return le.key===He?oe(ie,te,le,Se):null;case G:return le=yu(le),ne(ie,te,le,Se)}if(me(le)||ge(le))return He!==null?null:ve(ie,te,le,Se,null);if(typeof le.then=="function")return ne(ie,te,Sy(le),Se);if(le.$$typeof===H)return ne(ie,te,gy(ie,le),Se);by(ie,le)}return null}function fe(ie,te,le,Se,He){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ie=ie.get(le)||null,$(te,ie,""+Se,He);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case L:return ie=ie.get(Se.key===null?le:Se.key)||null,J(te,ie,Se,He);case O:return ie=ie.get(Se.key===null?le:Se.key)||null,oe(te,ie,Se,He);case G:return Se=yu(Se),fe(ie,te,le,Se,He)}if(me(Se)||ge(Se))return ie=ie.get(le)||null,ve(te,ie,Se,He,null);if(typeof Se.then=="function")return fe(ie,te,le,Sy(Se),He);if(Se.$$typeof===H)return fe(ie,te,le,gy(te,Se),He);by(te,Se)}return null}function ke(ie,te,le,Se){for(var He=null,Nt=null,Ke=te,ot=te=0,Ir=null;Ke!==null&&ot<le.length;ot++){Ke.index>ot?(Ir=Ke,Ke=null):Ir=Ke.sibling;var Ot=ne(ie,Ke,le[ot],Se);if(Ot===null){Ke===null&&(Ke=Ir);break}u&&Ke&&Ot.alternate===null&&d(ie,Ke),te=D(Ot,te,ot),Nt===null?He=Ot:Nt.sibling=Ot,Nt=Ot,Ke=Ir}if(ot===le.length)return g(ie,Ke),bt&&Go(ie,ot),He;if(Ke===null){for(;ot<le.length;ot++)Ke=we(ie,le[ot],Se),Ke!==null&&(te=D(Ke,te,ot),Nt===null?He=Ke:Nt.sibling=Ke,Nt=Ke);return bt&&Go(ie,ot),He}for(Ke=S(Ke);ot<le.length;ot++)Ir=fe(Ke,ie,ot,le[ot],Se),Ir!==null&&(u&&(Ot=Ir.alternate,Ot!==null&&Ke.delete(Ot.key===null?ot:Ot.key)),te=D(Ir,te,ot),Nt===null?He=Ir:Nt.sibling=Ir,Nt=Ir);return u&&Ke.forEach(function(ns){return d(ie,ns)}),bt&&Go(ie,ot),He}function We(ie,te,le,Se){if(le==null)throw Error(n(151));for(var He=null,Nt=null,Ke=te,ot=te=0,Ir=null,Ot=le.next();Ke!==null&&!Ot.done;ot++,Ot=le.next()){Ke.index>ot?(Ir=Ke,Ke=null):Ir=Ke.sibling;var ns=ne(ie,Ke,Ot.value,Se);if(ns===null){Ke===null&&(Ke=Ir);break}u&&Ke&&ns.alternate===null&&d(ie,Ke),te=D(ns,te,ot),Nt===null?He=ns:Nt.sibling=ns,Nt=ns,Ke=Ir}if(Ot.done)return g(ie,Ke),bt&&Go(ie,ot),He;if(Ke===null){for(;!Ot.done;ot++,Ot=le.next())Ot=we(ie,Ot.value,Se),Ot!==null&&(te=D(Ot,te,ot),Nt===null?He=Ot:Nt.sibling=Ot,Nt=Ot);return bt&&Go(ie,ot),He}for(Ke=S(Ke);!Ot.done;ot++,Ot=le.next())Ot=fe(Ke,ie,ot,Ot.value,Se),Ot!==null&&(u&&(Ir=Ot.alternate,Ir!==null&&Ke.delete(Ir.key===null?ot:Ir.key)),te=D(Ot,te,ot),Nt===null?He=Ot:Nt.sibling=Ot,Nt=Ot);return u&&Ke.forEach(function(FK){return d(ie,FK)}),bt&&Go(ie,ot),He}function mt(ie,te,le,Se){if(typeof le=="object"&&le!==null&&le.type===I&&le.key===null&&le.props.ref===void 0&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case L:e:{for(var He=le.key;te!==null;){if(te.key===He){if(He=le.type,He===I){if(te.tag===7){g(ie,te.sibling),Se=T(te,le.props.children),Bl(Se,le),Se.return=ie,ie=Se;break e}}else if(te.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===G&&yu(He)===te.type){g(ie,te.sibling),Se=T(te,le.props),Bl(Se,le),Se.return=ie,ie=Se;break e}g(ie,te);break}else d(ie,te);te=te.sibling}le.type===I?(Se=fu(le.props.children,ie.mode,Se,le.key),Bl(Se,le),Se.return=ie,ie=Se):(Se=cy(le.type,le.key,le.props,null,ie.mode,Se),Bl(Se,le),Se.return=ie,ie=Se)}return k(ie);case O:e:{for(He=le.key;te!==null;){if(te.key===He)if(te.tag===4&&te.stateNode.containerInfo===le.containerInfo&&te.stateNode.implementation===le.implementation){g(ie,te.sibling),Se=T(te,le.children||[]),Se.return=ie,ie=Se;break e}else{g(ie,te);break}else d(ie,te);te=te.sibling}Se=O1(le,ie.mode,Se),Se.return=ie,ie=Se}return k(ie);case G:return le=yu(le),mt(ie,te,le,Se)}if(me(le))return ke(ie,te,le,Se);if(ge(le)){if(He=ge(le),typeof He!="function")throw Error(n(150));return le=He.call(le),We(ie,te,le,Se)}if(typeof le.then=="function")return mt(ie,te,Sy(le),Se);if(le.$$typeof===H)return mt(ie,te,gy(ie,le),Se);by(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,te!==null&&te.tag===6?(g(ie,te.sibling),Se=T(te,le),Se.return=ie,ie=Se):(g(ie,te),Se=I1(le,ie.mode,Se),Se.return=ie,ie=Se),k(ie)):g(ie,te)}return function(ie,te,le,Se){try{wv=0;var He=mt(ie,te,le,Se);return Pf=null,He}catch(Ke){if(Ke===kf||Ke===yy)throw Ke;var Nt=ea(29,Ke,null,ie.mode);return Nt.lanes=Se,Nt.return=ie,Nt}}}var Su=bO(!0),_O=bO(!1),zl=!1;function U1(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Y1(u,d){u=u.updateQueue,d.updateQueue===u&&(d.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function Vl(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function Fl(u,d,g){var S=u.updateQueue;if(S===null)return null;if(S=S.shared,(Ft&2)!==0){var T=S.pending;return T===null?d.next=d:(d.next=T.next,T.next=d),S.pending=d,d=uy(u),iO(u,null,g),d}return sy(u,S,d,g),uy(u)}function Cv(u,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=u.pendingLanes,g|=S,d.lanes=g,uI(u,g)}}function $1(u,d){var g=u.updateQueue,S=u.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var T=null,D=null;if(g=g.firstBaseUpdate,g!==null){do{var k={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};D===null?T=D=k:D=D.next=k,g=g.next}while(g!==null);D===null?T=D=d:D=D.next=d}else T=D=d;g={baseState:S.baseState,firstBaseUpdate:T,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},u.updateQueue=g;return}u=g.lastBaseUpdate,u===null?g.firstBaseUpdate=d:u.next=d,g.lastBaseUpdate=d}var W1=!1;function Tv(){if(W1){var u=Of;if(u!==null)throw u}}function Av(u,d,g,S){W1=!1;var T=u.updateQueue;zl=!1;var D=T.firstBaseUpdate,k=T.lastBaseUpdate,$=T.shared.pending;if($!==null){T.shared.pending=null;var J=$,oe=J.next;J.next=null,k===null?D=oe:k.next=oe,k=J;var ve=u.alternate;ve!==null&&(ve=ve.updateQueue,$=ve.lastBaseUpdate,$!==k&&($===null?ve.firstBaseUpdate=oe:$.next=oe,ve.lastBaseUpdate=J))}if(D!==null){var we=T.baseState;k=0,ve=oe=J=null,$=D;do{var ne=$.lane&-536870913,fe=ne!==$.lane;if(fe?(Et&ne)===ne:(S&ne)===ne){ne!==0&&ne===gu&&(W1=!0),ve!==null&&(ve=ve.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var ke=u,We=$;ne=d;var mt=g;switch(We.tag){case 1:if(ke=We.payload,typeof ke=="function"){we=ke.call(mt,we,ne);break e}we=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=We.payload,ne=typeof ke=="function"?ke.call(mt,we,ne):ke,ne==null)break e;we=E({},we,ne);break e;case 2:zl=!0}}ne=$.callback,ne!==null&&(u.flags|=64,fe&&(u.flags|=8192),fe=T.callbacks,fe===null?T.callbacks=[ne]:fe.push(ne))}else fe={lane:ne,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ve===null?(oe=ve=fe,J=we):ve=ve.next=fe,k|=ne;if($=$.next,$===null){if($=T.shared.pending,$===null)break;fe=$,$=fe.next,fe.next=null,T.lastBaseUpdate=fe,T.shared.pending=null}}while(!0);ve===null&&(J=we),T.baseState=J,T.firstBaseUpdate=oe,T.lastBaseUpdate=ve,D===null&&(T.shared.lanes=0),ql|=k,u.lanes=k,u.memoizedState=we}}function wO(u,d){if(typeof u!="function")throw Error(n(191,u));u.call(d)}function CO(u,d){var g=u.callbacks;if(g!==null)for(u.callbacks=null,u=0;u<g.length;u++)wO(g[u],d)}var Gl=Me(null),_y=Me(0);function TO(u,d){u=Xo,Ye(_y,u),Ye(Gl,d),Xo=u|d.baseLanes}function q1(){Ye(_y,Xo),Ye(Gl,Gl.current)}function X1(){Xo=_y.current,Oe(Gl),Oe(_y)}var sn=Me(null),wn=null;function Hl(u){var d=u.alternate;Ye(un,un.current&1),Ye(sn,u),wn===null&&(d===null||Gl.current!==null||d.memoizedState!==null)&&(wn=u)}function Z1(u){Ye(un,un.current),Ye(sn,u),wn===null&&(wn=u)}function AO(u){u.tag===22?(Ye(un,un.current),Ye(sn,u),wn===null&&(wn=u)):Ul()}function Ul(){Ye(un,un.current),Ye(sn,sn.current)}function va(u){Oe(sn),wn===u&&(wn=null),Oe(un)}var un=Me(0);function Dv(u,d){Ye(sn,sn.current),Ye(un,d)}function K1(u){Oe(un),Oe(sn),wn===u&&(wn=null)}function wy(u){for(var d=u;d!==null;){if(d.tag===13){var g=d.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||xC(g)||SC(g)))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!=="independent"){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var Yo=0,gt=null,Kt=null,Nr=null,Cy=!1,jf=!1,bu=!1,Ty=0,Mv=0,Bf=null,sZ=0;function xr(){throw Error(n(321))}function Q1(u,d){if(d===null)return!1;for(var g=0;g<d.length&&g<u.length;g++)if(!da(u[g],d[g]))return!1;return!0}function J1(u,d,g,S,T,D){return Yo=D,gt=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,ae.H=u===null||u.memoizedState===null?uk:ck,bu=!1,D=g(S,T),bu=!1,jf&&(D=MO(d,g,S,T)),DO(u),D}function DO(u){ae.H=Ly;var d=Kt!==null&&Kt.next!==null;if(Yo=0,Nr=Kt=gt=null,Cy=!1,Mv=0,Bf=null,d)throw Error(n(300));u===null||Lr||(u=u.dependencies,u!==null&&py(u)&&(Lr=!0))}function MO(u,d,g,S){gt=u;var T=0;do{if(jf&&(Bf=null),Mv=0,jf=!1,25<=T)throw Error(n(301));if(T+=1,Nr=Kt=null,u.updateQueue!=null){var D=u.updateQueue;D.lastEffect=null,D.events=null,D.stores=null,D.memoCache!=null&&(D.memoCache.index=0)}ae.H=gZ,D=d(g,S)}while(jf);return D}function uZ(){var u=ae.H,d=u.useState()[0];return d=typeof d.then=="function"?Rv(d):d,u=u.useState()[0],(Kt!==null?Kt.memoizedState:null)!==u&&(gt.flags|=1024),d}function ew(){var u=Ty!==0;return Ty=0,u}function tw(u,d,g){d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~g}function rw(u){if(Cy){for(u=u.memoizedState;u!==null;){var d=u.queue;d!==null&&(d.pending=null),u=u.next}Cy=!1}Yo=0,Nr=Kt=gt=null,jf=!1,Mv=Ty=0,Bf=null}function Pn(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nr===null?gt.memoizedState=Nr=u:Nr=Nr.next=u,Nr}function Tr(){if(Kt===null){var u=gt.alternate;u=u!==null?u.memoizedState:null}else u=Kt.next;var d=Nr===null?gt.memoizedState:Nr.next;if(d!==null)Nr=d,Kt=u;else{if(u===null)throw gt.alternate===null?Error(n(467)):Error(n(310));Kt=u,u={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},Nr===null?gt.memoizedState=Nr=u:Nr=Nr.next=u}return Nr}function Ay(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rv(u){var d=Mv;return Mv+=1,Bf===null&&(Bf=[]),u=yO(Bf,u,d),d=gt,(Nr===null?d.memoizedState:Nr.next)===null&&(d=d.alternate,ae.H=d===null||d.memoizedState===null?uk:ck),u}function Dy(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return Rv(u);if(u.$$typeof===K)return;if(u.$$typeof===H)return ln(u)}throw Error(n(438,String(u)))}function nw(u){var d=null,g=gt.updateQueue;if(g!==null&&(d=g.memoCache),d==null){var S=gt.alternate;S!==null&&(S=S.updateQueue,S!==null&&(S=S.memoCache,S!=null&&(d={data:S.data.map(function(T){return T.slice()}),index:0})))}if(d==null&&(d={data:[],index:0}),g===null&&(g=Ay(),gt.updateQueue=g),g.memoCache=d,g=d.data[d.index],g===void 0)for(g=d.data[d.index]=Array(u),S=0;S<u;S++)g[S]=Q;return d.index++,g}function $o(u,d){return typeof d=="function"?d(u):d}function My(u){var d=Tr();return aw(d,Kt,u)}function aw(u,d,g){var S=u.queue;if(S===null)throw Error(n(311));S.lastRenderedReducer=g;var T=u.baseQueue,D=S.pending;if(D!==null){if(T!==null){var k=T.next;T.next=D.next,D.next=k}d.baseQueue=T=D,S.pending=null}if(D=u.baseState,T===null)u.memoizedState=D;else{d=T.next;var $=k=null,J=null,oe=d,ve=!1;do{var we=oe.lane&-536870913;if(we!==oe.lane?(Et&we)===we:(Yo&we)===we){var ne=oe.revertLane;if(ne===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),we===gu&&(ve=!0);else if((Yo&ne)===ne){oe=oe.next,ne===gu&&(ve=!0);continue}else we={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},J===null?($=J=we,k=D):J=J.next=we,gt.lanes|=ne,ql|=ne;we=oe.action,bu&&g(D,we),D=oe.hasEagerState?oe.eagerState:g(D,we)}else ne={lane:we,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},J===null?($=J=ne,k=D):J=J.next=ne,gt.lanes|=we,ql|=we;oe=oe.next}while(oe!==null&&oe!==d);if(J===null?k=D:J.next=$,!da(D,u.memoizedState)&&(Lr=!0,ve&&(g=Of,g!==null)))throw g;u.memoizedState=D,u.baseState=k,u.baseQueue=J,S.lastRenderedState=D}return T===null&&(S.lanes=0),[u.memoizedState,S.dispatch]}function iw(u){var d=Tr(),g=d.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=u;var S=g.dispatch,T=g.pending,D=d.memoizedState;if(T!==null){g.pending=null;var k=T=T.next;do D=u(D,k.action),k=k.next;while(k!==T);da(D,d.memoizedState)||(Lr=!0),d.memoizedState=D,d.baseQueue===null&&(d.baseState=D),g.lastRenderedState=D}return[D,S]}function RO(u,d,g){var S=gt,T=Tr(),D=bt;if(D){if(g===void 0)throw Error(n(407));g=g()}else g=d();var k=!da((Kt||T).memoizedState,g);if(k&&(T.memoizedState=g,Lr=!0),T=T.queue,sw(LO.bind(null,S,T,u),[u]),u=T.getSnapshot!==d||k||Nr!==null&&(Nr.memoizedState.tag&1)!==0,zf(u?9:8,{destroy:void 0},NO.bind(null,S,T,g,d),null),u){if(S.flags|=2048,Jt===null)throw Error(n(349));D||(Yo&127)!==0||EO(S,d,g)}return g}function EO(u,d,g){u.flags|=16384,u={getSnapshot:d,value:g},d=gt.updateQueue,d===null?(d=Ay(),gt.updateQueue=d,d.stores=[u]):(g=d.stores,g===null?d.stores=[u]:g.push(u))}function NO(u,d,g,S){d.value=g,d.getSnapshot=S,IO(d)&&OO(u)}function LO(u,d,g){return g(function(){IO(d)&&OO(u)})}function IO(u){var d=u.getSnapshot;u=u.value;try{var g=d();return!da(u,g)}catch{return!0}}function OO(u){var d=cu(u,2);d!==null&&aa(d,u,2)}function ow(u){var d=Pn();if(typeof u=="function"){var g=u;if(u=g(),bu){Bi(!0);try{g()}finally{Bi(!1)}}}return d.memoizedState=d.baseState=u,d.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:u},d}function kO(u,d,g,S){return u.baseState=g,aw(u,Kt,typeof S=="function"?S:$o)}function cZ(u,d,g,S,T){if(Ny(u))throw Error(n(485));if(u=d.action,u!==null){var D={payload:T,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){D.listeners.push(k)}};ae.T!==null?g(!0):D.isTransition=!1,S(D),g=d.pending,g===null?(D.next=d.pending=D,PO(d,D)):(D.next=g.next,d.pending=g.next=D)}}function PO(u,d){var g=d.action,S=d.payload,T=u.state;if(d.isTransition){var D=ae.T,k={};k.types=D!==null?D.types:null,ae.T=k;try{var $=g(T,S),J=ae.S;J!==null&&J(k,$),jO(u,d,$)}catch(oe){lw(u,d,oe)}finally{D!==null&&k.types!==null&&(D.types=k.types),ae.T=D}}else try{D=g(T,S),jO(u,d,D)}catch(oe){lw(u,d,oe)}}function jO(u,d,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(S){BO(u,d,S)},function(S){return lw(u,d,S)}):BO(u,d,g)}function BO(u,d,g){d.status="fulfilled",d.value=g,zO(d),u.state=g,d=u.pending,d!==null&&(g=d.next,g===d?u.pending=null:(g=g.next,d.next=g,PO(u,g)))}function lw(u,d,g){var S=u.pending;if(u.pending=null,S!==null){S=S.next;do d.status="rejected",d.reason=g,zO(d),d=d.next;while(d!==S)}u.action=null}function zO(u){u=u.listeners;for(var d=0;d<u.length;d++)(0,u[d])()}function VO(u,d){return d}function FO(u,d){if(bt){var g=Jt.formState;if(g!==null){e:{var S=gt;if(bt){if(tr){t:{for(var T=tr,D=Pa;T.nodeType!==8;){if(!D){T=null;break t}if(T=Ba(T.nextSibling),T===null){T=null;break t}}D=T.data,T=D==="F!"||D==="F"?T:null}if(T){tr=Ba(T.nextSibling),S=T.data==="F!";break e}}Pl(S)}S=!1}S&&(d=g[0])}}return g=Pn(),g.memoizedState=g.baseState=d,S={pending:null,lanes:0,dispatch:null,lastRenderedReducer:VO,lastRenderedState:d},g.queue=S,g=ok.bind(null,gt,S),S.dispatch=g,S=ow(!1),D=dw.bind(null,gt,!1,S.queue),S=Pn(),T={state:d,dispatch:null,action:u,pending:null},S.queue=T,g=cZ.bind(null,gt,T,D,g),T.dispatch=g,S.memoizedState=u,[d,g,!1]}function GO(u){var d=Tr();return HO(d,Kt,u)}function HO(u,d,g){if(d=aw(u,d,VO)[0],u=My($o)[0],typeof d=="object"&&d!==null&&typeof d.then=="function")try{var S=Rv(d)}catch(k){throw k===kf?yy:k}else S=d;d=Tr();var T=d.queue,D=T.dispatch;return g!==d.memoizedState&&(gt.flags|=2048,zf(9,{destroy:void 0},fZ.bind(null,T,g),null)),[S,D,u]}function fZ(u,d){u.action=d}function UO(u){var d=Tr(),g=Kt;if(g!==null)return HO(d,g,u);Tr(),d=d.memoizedState,g=Tr();var S=g.queue.dispatch;return g.memoizedState=u,[d,S,!1]}function zf(u,d,g,S){return u={tag:u,create:g,deps:S,inst:d,next:null},d=gt.updateQueue,d===null&&(d=Ay(),gt.updateQueue=d),g=d.lastEffect,g===null?d.lastEffect=u.next=u:(S=g.next,g.next=u,u.next=S,d.lastEffect=u),u}function YO(){return Tr().memoizedState}function Ry(u,d,g,S){var T=Pn();gt.flags|=u,T.memoizedState=zf(1|d,{destroy:void 0},g,S===void 0?null:S)}function Ey(u,d,g,S){var T=Tr();S=S===void 0?null:S;var D=T.memoizedState.inst;Kt!==null&&S!==null&&Q1(S,Kt.memoizedState.deps)?T.memoizedState=zf(d,D,g,S):(gt.flags|=u,T.memoizedState=zf(1|d,D,g,S))}function $O(u,d){Ry(8390656,8,u,d)}function sw(u,d){Ey(2048,8,u,d)}function hZ(u){gt.flags|=4;var d=gt.updateQueue;if(d===null)d=Ay(),gt.updateQueue=d,d.events=[u];else{var g=d.events;g===null?d.events=[u]:g.push(u)}}function WO(u){var d=Tr().memoizedState;return hZ({ref:d,nextImpl:u}),function(){if((Ft&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}function qO(u,d){return Ey(4,2,u,d)}function XO(u,d){return Ey(4,4,u,d)}function ZO(u,d){if(typeof d=="function"){u=u();var g=d(u);return function(){typeof g=="function"?g():d(null)}}if(d!=null)return u=u(),d.current=u,function(){d.current=null}}function KO(u,d,g){g=g!=null?g.concat([u]):null,Ey(4,4,ZO.bind(null,d,u),g)}function uw(){}function QO(u,d){var g=Tr();d=d===void 0?null:d;var S=g.memoizedState;return d!==null&&Q1(d,S[1])?S[0]:(g.memoizedState=[u,d],u)}function JO(u,d){var g=Tr();d=d===void 0?null:d;var S=g.memoizedState;if(d!==null&&Q1(d,S[1]))return S[0];if(S=u(),bu){Bi(!0);try{u()}finally{Bi(!1)}}return g.memoizedState=[S,d],S}function cw(u,d,g){return g===void 0||(Yo&1073741824)!==0&&(Et&261930)===0?u.memoizedState=d:(u.memoizedState=g,u=uP(),gt.lanes|=u,ql|=u,g)}function ek(u,d,g,S){return da(g,d)?g:Gl.current!==null?(u=cw(u,g,S),da(u,d)||(Lr=!0),u):(Yo&106)===0||(Yo&1073741824)!==0&&(Et&261930)===0?(Lr=!0,u.memoizedState=g):(u=uP(),gt.lanes|=u,ql|=u,d)}function tk(u,d,g,S,T){var D=ye.p;ye.p=D!==0&&8>D?D:8;var k=ae.T,$={};$.types=k!==null?k.types:null,ae.T=$,dw(u,!1,d,g);try{var J=T(),oe=ae.S;if(oe!==null&&oe($,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var ve=lZ(J,S);Ev(u,d,ve,ya(u))}else Ev(u,d,S,ya(u))}catch(we){Ev(u,d,{then:function(){},status:"rejected",reason:we},ya())}finally{ye.p=D,k!==null&&$.types!==null&&(k.types=$.types),ae.T=k}}function dZ(){}function fw(u,d,g,S){if(u.tag!==5)throw Error(n(476));var T=rk(u).queue;tk(u,T,d,nt,g===null?dZ:function(){return nk(u),g(S)})}function rk(u){var d=u.memoizedState;if(d!==null)return d;d={memoizedState:nt,baseState:nt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:nt},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:g},next:null},u.memoizedState=d,u=u.alternate,u!==null&&(u.memoizedState=d),d}function nk(u){var d=rk(u);d.next===null&&(d=u.alternate.memoizedState),Ev(u,d.next.queue,{},ya())}function hw(){return ln(ah)}function ak(){return Tr().memoizedState}function ik(){return Tr().memoizedState}function vZ(u){for(var d=u.return;d!==null;){switch(d.tag){case 24:case 3:var g=ya();u=Vl(g);var S=Fl(d,u,g);S!==null&&(aa(S,d,g),Cv(S,d,g)),d={cache:V1()},u.payload=d;return}d=d.return}}function pZ(u,d,g){var S=ya();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Ny(u)?lk(d,g):(g=N1(u,d,g,S),g!==null&&(aa(g,u,S),sk(g,d,S)))}function ok(u,d,g){var S=ya();Ev(u,d,g,S)}function Ev(u,d,g,S){var T={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Ny(u))lk(d,T);else{var D=u.alternate;if(u.lanes===0&&(D===null||D.lanes===0)&&(D=d.lastRenderedReducer,D!==null))try{var k=d.lastRenderedState,$=D(k,g);if(T.hasEagerState=!0,T.eagerState=$,da($,k))return sy(u,d,T,0),Jt===null&&ly(),!1}catch{}if(g=N1(u,d,T,S),g!==null)return aa(g,u,S),sk(g,d,S),!0}return!1}function dw(u,d,g,S){if(S={lane:2,revertLane:nC(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Ny(u)){if(d)throw Error(n(479))}else d=N1(u,g,S,2),d!==null&&aa(d,u,2)}function Ny(u){var d=u.alternate;return u===gt||d!==null&&d===gt}function lk(u,d){jf=Cy=!0;var g=u.pending;g===null?d.next=d:(d.next=g.next,g.next=d),u.pending=d}function sk(u,d,g){if((g&4194048)!==0){var S=d.lanes;S&=u.pendingLanes,g|=S,d.lanes=g,uI(u,g)}}var Ly={readContext:ln,use:Dy,useCallback:xr,useContext:xr,useEffect:xr,useImperativeHandle:xr,useLayoutEffect:xr,useInsertionEffect:xr,useMemo:xr,useReducer:xr,useRef:xr,useState:xr,useDebugValue:xr,useDeferredValue:xr,useTransition:xr,useSyncExternalStore:xr,useId:xr,useHostTransitionStatus:xr,useFormState:xr,useActionState:xr,useOptimistic:xr,useMemoCache:xr,useCacheRefresh:xr,useEffectEvent:xr},uk={readContext:ln,use:Dy,useCallback:function(u,d){return Pn().memoizedState=[u,d===void 0?null:d],u},useContext:ln,useEffect:$O,useImperativeHandle:function(u,d,g){g=g!=null?g.concat([u]):null,Ry(4194308,4,ZO.bind(null,d,u),g)},useLayoutEffect:function(u,d){return Ry(4194308,4,u,d)},useInsertionEffect:function(u,d){Ry(4,2,u,d)},useMemo:function(u,d){var g=Pn();d=d===void 0?null:d;var S=u();if(bu){Bi(!0);try{u()}finally{Bi(!1)}}return g.memoizedState=[S,d],S},useReducer:function(u,d,g){var S=Pn();if(g!==void 0){var T=g(d);if(bu){Bi(!0);try{g(d)}finally{Bi(!1)}}}else T=d;return S.memoizedState=S.baseState=T,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:T},S.queue=u,u=u.dispatch=pZ.bind(null,gt,u),[S.memoizedState,u]},useRef:function(u){var d=Pn();return u={current:u},d.memoizedState=u},useState:function(u){u=ow(u);var d=u.queue,g=ok.bind(null,gt,d);return d.dispatch=g,[u.memoizedState,g]},useDebugValue:uw,useDeferredValue:function(u,d){var g=Pn();return cw(g,u,d)},useTransition:function(){var u=ow(!1);return u=tk.bind(null,gt,u.queue,!0,!1),Pn().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,d,g){var S=gt,T=Pn();if(bt){if(g===void 0)throw Error(n(407));g=g()}else{if(g=d(),Jt===null)throw Error(n(349));(Et&127)!==0||EO(S,d,g)}T.memoizedState=g;var D={value:g,getSnapshot:d};return T.queue=D,$O(LO.bind(null,S,D,u),[u]),S.flags|=2048,zf(9,{destroy:void 0},NO.bind(null,S,D,g,d),null),g},useId:function(){var u=Pn(),d=Jt.identifierPrefix;if(bt){var g=Gi,S=Fi;g=(S&~(1<<32-cr(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=Ty++,0<g&&(d+="H"+g.toString(32)),d+="_"}else g=sZ++,d="_"+d+"r_"+g.toString(32)+"_";return u.memoizedState=d},useHostTransitionStatus:hw,useFormState:FO,useActionState:FO,useOptimistic:function(u){var d=Pn();d.memoizedState=d.baseState=u;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return d.queue=g,d=dw.bind(null,gt,!0,g),g.dispatch=d,[u,d]},useMemoCache:nw,useCacheRefresh:function(){return Pn().memoizedState=vZ.bind(null,gt)},useEffectEvent:function(u){var d=Pn(),g={impl:u};return d.memoizedState=g,function(){if((Ft&2)!==0)throw Error(n(440));return g.impl.apply(void 0,arguments)}}},ck={readContext:ln,use:Dy,useCallback:QO,useContext:ln,useEffect:sw,useImperativeHandle:KO,useInsertionEffect:qO,useLayoutEffect:XO,useMemo:JO,useReducer:My,useRef:YO,useState:function(){return My($o)},useDebugValue:uw,useDeferredValue:function(u,d){var g=Tr();return ek(g,Kt.memoizedState,u,d)},useTransition:function(){var u=My($o)[0],d=Tr().memoizedState;return[typeof u=="boolean"?u:Rv(u),d]},useSyncExternalStore:RO,useId:ak,useHostTransitionStatus:hw,useFormState:GO,useActionState:GO,useOptimistic:function(u,d){var g=Tr();return kO(g,Kt,u,d)},useMemoCache:nw,useCacheRefresh:ik,useEffectEvent:WO},gZ={readContext:ln,use:Dy,useCallback:QO,useContext:ln,useEffect:sw,useImperativeHandle:KO,useInsertionEffect:qO,useLayoutEffect:XO,useMemo:JO,useReducer:iw,useRef:YO,useState:function(){return iw($o)},useDebugValue:uw,useDeferredValue:function(u,d){var g=Tr();return Kt===null?cw(g,u,d):ek(g,Kt.memoizedState,u,d)},useTransition:function(){var u=iw($o)[0],d=Tr().memoizedState;return[typeof u=="boolean"?u:Rv(u),d]},useSyncExternalStore:RO,useId:ak,useHostTransitionStatus:hw,useFormState:UO,useActionState:UO,useOptimistic:function(u,d){var g=Tr();return Kt!==null?kO(g,Kt,u,d):(g.baseState=u,[u,g.queue.dispatch])},useMemoCache:nw,useCacheRefresh:ik,useEffectEvent:WO};function vw(u,d,g,S){d=u.memoizedState,g=g(S,d),g=g==null?d:E({},d,g),u.memoizedState=g,u.lanes===0&&(u.updateQueue.baseState=g)}var pw={enqueueSetState:function(u,d,g){u=u._reactInternals;var S=ya(),T=Vl(S);T.payload=d,g!=null&&(T.callback=g),d=Fl(u,T,S),d!==null&&(aa(d,u,S),Cv(d,u,S))},enqueueReplaceState:function(u,d,g){u=u._reactInternals;var S=ya(),T=Vl(S);T.tag=1,T.payload=d,g!=null&&(T.callback=g),d=Fl(u,T,S),d!==null&&(aa(d,u,S),Cv(d,u,S))},enqueueForceUpdate:function(u,d){u=u._reactInternals;var g=ya(),S=Vl(g);S.tag=2,d!=null&&(S.callback=d),d=Fl(u,S,g),d!==null&&(aa(d,u,g),Cv(d,u,g))}};function fk(u,d,g,S,T,D,k){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(S,D,k):d.prototype&&d.prototype.isPureReactComponent?!gv(g,S)||!gv(T,D):!0}function hk(u,d,g,S){u=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(g,S),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(g,S),d.state!==u&&pw.enqueueReplaceState(d,d.state,null)}function _u(u,d){var g=d;if("ref"in d){g={};for(var S in d)S!=="ref"&&(g[S]=d[S])}if(u=u.defaultProps){g===d&&(g=E({},g));for(var T in u)g[T]===void 0&&(g[T]=u[T])}return g}function dk(u){oy(u)}function vk(u){console.error(u)}function pk(u){oy(u)}function Iy(u,d){try{var g=u.onUncaughtError;g(d.value,{componentStack:d.stack})}catch(S){setTimeout(function(){throw S})}}function gk(u,d,g){try{var S=u.onCaughtError;S(g.value,{componentStack:g.stack,errorBoundary:d.tag===1?d.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function gw(u,d,g){return g=Vl(g),g.tag=3,g.payload={element:null},g.callback=function(){Iy(u,d)},g}function mk(u){return u=Vl(u),u.tag=3,u}function yk(u,d,g,S){var T=g.type.getDerivedStateFromError;if(typeof T=="function"){var D=S.value;u.payload=function(){return T(D)},u.callback=function(){gk(d,g,S)}}var k=g.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(u.callback=function(){gk(d,g,S),typeof T!="function"&&(Xl===null?Xl=new Set([this]):Xl.add(this));var $=S.stack;this.componentDidCatch(S.value,{componentStack:$!==null?$:""})})}function mZ(u,d,g,S,T){if(g.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(d=g.alternate,d!==null&&vu(d,g,T,!0),g=sn.current,g!==null){switch(g.tag){case 31:case 13:case 19:return wn===null?e0():g.alternate===null&&Sr===0&&(Sr=3),g.flags&=-257,g.flags|=65536,g.lanes=T,S===xy?g.flags|=16384:(d=g.updateQueue,d===null?g.updateQueue=new Set([S]):d.add(S),eC(u,S,T)),!1;case 22:return g.flags|=65536,S===xy?g.flags|=16384:(d=g.updateQueue,d===null?(d={transitions:null,markerInstances:null,retryQueue:new Set([S])},g.updateQueue=d):(g=d.retryQueue,g===null?d.retryQueue=new Set([S]):g.add(S)),eC(u,S,T)),!1}throw Error(n(435,g.tag))}return eC(u,S,T),e0(),!1}if(bt)return d=sn.current,d!==null?((d.flags&65536)===0&&(d.flags|=256),d.flags|=65536,d.lanes=T,S!==P1&&(u=Error(n(422),{cause:S}),xv(Ia(u,g)))):(S!==P1&&(d=Error(n(423),{cause:S}),xv(Ia(d,g))),u=u.current.alternate,u.flags|=65536,T&=-T,u.lanes|=T,S=Ia(S,g),T=gw(u.stateNode,S,T),$1(u,T),Sr!==4&&(Sr=2)),!1;var D=Error(n(520),{cause:S});if(D=Ia(D,g),Bv===null?Bv=[D]:Bv.push(D),Sr!==4&&(Sr=2),d===null)return!0;S=Ia(S,g),g=d;do{switch(g.tag){case 3:return g.flags|=65536,u=T&-T,g.lanes|=u,u=gw(g.stateNode,S,u),$1(g,u),!1;case 1:if(d=g.type,D=g.stateNode,(g.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Xl===null||!Xl.has(D))))return g.flags|=65536,T&=-T,g.lanes|=T,T=mk(T),yk(T,u,g,S),$1(g,T),!1;break;case 22:if(g.memoizedState!==null)return g.flags|=65536,!1}g=g.return}while(g!==null);return!1}var mw=Error(n(461)),Lr=!1;function Hr(u,d,g,S){d.child=u===null?_O(d,null,g,S):Su(d,u.child,g,S)}function xk(u,d,g,S,T){g=g.render;var D=d.ref;if("ref"in S){var k={};for(var $ in S)$!=="ref"&&(k[$]=S[$])}else k=S;return pu(d),S=J1(u,d,g,k,D,T),$=ew(),u!==null&&!Lr?(tw(u,d,T),Wo(u,d,T)):(bt&&$&&hy(d),d.flags|=1,Hr(u,d,S,T),d.child)}function Sk(u,d,g,S,T){if(u===null){var D=g.type;return typeof D=="function"&&!L1(D)&&D.defaultProps===void 0&&g.compare===null?(d.tag=15,d.type=D,bk(u,d,D,S,T)):(u=cy(g.type,null,S,d,d.mode,T),u.ref=d.ref,u.return=d,d.child=u)}if(D=u.child,!Tw(u,T)){var k=D.memoizedProps;if(g=g.compare,g=g!==null?g:gv,g(k,S)&&u.ref===d.ref)return Wo(u,d,T)}return d.flags|=1,u=Fo(D,S),u.ref=d.ref,u.return=d,d.child=u}function bk(u,d,g,S,T){if(u!==null){var D=u.memoizedProps;if(gv(D,S)&&u.ref===d.ref)if(Lr=!1,d.pendingProps=S=D,Tw(u,T))(u.flags&131072)!==0&&(Lr=!0);else return d.lanes=u.lanes,Wo(u,d,T)}return yw(u,d,g,S,T)}function _k(u,d,g,S){var T=S.children,D=u!==null?u.memoizedState:null;if(u===null&&d.stateNode===null&&(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),S.mode==="hidden"){if((d.flags&128)!==0){if(D=D!==null?D.baseLanes|g:g,u!==null){for(S=d.child=u.child,T=0;S!==null;)T=T|S.lanes|S.childLanes,S=S.sibling;S=T&~D}else S=0,d.child=null;return wk(u,d,D,g,S)}if((g&536870912)!==0)d.memoizedState={baseLanes:0,cachePool:null},u!==null&&my(d,D!==null?D.cachePool:null),D!==null?TO(d,D):q1(),AO(d);else return S=d.lanes=536870912,wk(u,d,D!==null?D.baseLanes|g:g,g,S)}else D!==null?(my(d,D.cachePool),TO(d,D),Ul(),d.memoizedState=null):(u!==null&&my(d,null),q1(),Ul());return Hr(u,d,T,g),d.child}function Nv(u,d){return u!==null&&u.tag===22||d.stateNode!==null||(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.sibling}function wk(u,d,g,S,T){var D=G1();return D=D===null?null:{parent:Er._currentValue,pool:D},d.memoizedState={baseLanes:g,cachePool:D},u!==null&&my(d,null),q1(),AO(d),u!==null&&vu(u,d,S,!0),d.childLanes=T,null}function Oy(u,d){return d=ky({mode:d.mode,children:d.children},u.mode),d.ref=u.ref,u.child=d,d.return=u,d}function Ck(u,d,g){return Su(d,u.child,null,g),u=Oy(d,d.pendingProps),u.flags|=2,va(d),d.memoizedState=null,u}function yZ(u,d,g){var S=d.pendingProps,T=(d.flags&128)!==0;if(d.flags&=-129,u===null){if(bt){if(S.mode==="hidden")return u=Oy(d,S),d.lanes=536870912,u.memoizedState={baseLanes:0,cachePool:null},Nv(null,u);if(Z1(d),(u=tr)?(u=ZP(u,Pa),u=u!==null&&u.data==="&"?u:null,u!==null&&(d.memoizedState={dehydrated:u,treeContext:Ol!==null?{id:Fi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},g=lO(u),g.return=d,d.child=g,Qr=d,tr=null)):u=null,u===null)throw Pl(d);return d.lanes=536870912,null}return Oy(d,S)}var D=u.memoizedState;if(D!==null){var k=D.dehydrated;if(Z1(d),T)if(d.flags&256)d.flags&=-257,d=Ck(u,d,g);else if(d.memoizedState!==null)d.child=u.child,d.flags|=128,d=null;else throw Error(n(558));else if(Lr||vu(u,d,g,!1),T=(g&u.childLanes)!==0,Lr||T){if(Gl.current===null){if(S=Jt,S!==null&&(k=cI(S,g),k!==0&&k!==D.retryLane))throw D.retryLane=k,cu(u,k),aa(S,u,k),mw;e0()}d=Ck(u,d,g)}else u=D.treeContext,tr=Ba(k.nextSibling),Qr=d,bt=!0,kl=null,Pa=!1,u!==null&&cO(d,u),d=Oy(d,S),d.flags|=134221824;return d}return u=Fo(u.child,{mode:S.mode,children:S.children}),u.ref=d.ref,d.child=u,u.return=d,u}function Vf(u,d){var g=d.ref;if(g===null)u!==null&&u.ref!==null&&(d.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(n(284));(u===null||u.ref!==g)&&(d.flags|=4194816)}}function yw(u,d,g,S,T){return pu(d),g=J1(u,d,g,S,void 0,T),S=ew(),u!==null&&!Lr?(tw(u,d,T),Wo(u,d,T)):(bt&&S&&hy(d),d.flags|=1,Hr(u,d,g,T),d.child)}function Tk(u,d,g,S,T,D){return pu(d),d.updateQueue=null,g=MO(d,S,g,T),DO(u),S=ew(),u!==null&&!Lr?(tw(u,d,D),Wo(u,d,D)):(bt&&S&&hy(d),d.flags|=1,Hr(u,d,g,D),d.child)}function Ak(u,d,g,S,T){if(pu(d),d.stateNode===null){var D=Ef,k=g.contextType;typeof k=="object"&&k!==null&&(D=ln(k)),D=new g(S,D),d.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=pw,d.stateNode=D,D._reactInternals=d,D=d.stateNode,D.props=S,D.state=d.memoizedState,D.refs={},U1(d),k=g.contextType,D.context=typeof k=="object"&&k!==null?ln(k):Ef,D.state=d.memoizedState,k=g.getDerivedStateFromProps,typeof k=="function"&&(vw(d,g,k,S),D.state=d.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(k=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),k!==D.state&&pw.enqueueReplaceState(D,D.state,null),Av(d,S,D,T),Tv(),D.state=d.memoizedState),typeof D.componentDidMount=="function"&&(d.flags|=4194308),S=!0}else if(u===null){D=d.stateNode;var $=d.memoizedProps,J=_u(g,$);D.props=J;var oe=D.context,ve=g.contextType;k=Ef,typeof ve=="object"&&ve!==null&&(k=ln(ve));var we=g.getDerivedStateFromProps;ve=typeof we=="function"||typeof D.getSnapshotBeforeUpdate=="function",$=d.pendingProps!==$,ve||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||($||oe!==k)&&hk(d,D,S,k),zl=!1;var ne=d.memoizedState;D.state=ne,Av(d,S,D,T),Tv(),oe=d.memoizedState,$||ne!==oe||zl?(typeof we=="function"&&(vw(d,g,we,S),oe=d.memoizedState),(J=zl||fk(d,g,J,S,ne,oe,k))?(ve||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(d.flags|=4194308)):(typeof D.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=S,d.memoizedState=oe),D.props=S,D.state=oe,D.context=k,S=J):(typeof D.componentDidMount=="function"&&(d.flags|=4194308),S=!1)}else{D=d.stateNode,Y1(u,d),k=d.memoizedProps,ve=_u(g,k),D.props=ve,we=d.pendingProps,ne=D.context,oe=g.contextType,J=Ef,typeof oe=="object"&&oe!==null&&(J=ln(oe)),$=g.getDerivedStateFromProps,(oe=typeof $=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(k!==we||ne!==J)&&hk(d,D,S,J),zl=!1,ne=d.memoizedState,D.state=ne,Av(d,S,D,T),Tv();var fe=d.memoizedState;k!==we||ne!==fe||zl||u!==null&&u.dependencies!==null&&py(u.dependencies)?(typeof $=="function"&&(vw(d,g,$,S),fe=d.memoizedState),(ve=zl||fk(d,g,ve,S,ne,fe,J)||u!==null&&u.dependencies!==null&&py(u.dependencies))?(oe||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(S,fe,J),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(S,fe,J)),typeof D.componentDidUpdate=="function"&&(d.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof D.componentDidUpdate!="function"||k===u.memoizedProps&&ne===u.memoizedState||(d.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||k===u.memoizedProps&&ne===u.memoizedState||(d.flags|=1024),d.memoizedProps=S,d.memoizedState=fe),D.props=S,D.state=fe,D.context=J,S=ve):(typeof D.componentDidUpdate!="function"||k===u.memoizedProps&&ne===u.memoizedState||(d.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||k===u.memoizedProps&&ne===u.memoizedState||(d.flags|=1024),S=!1)}return D=S,Vf(u,d),S=(d.flags&128)!==0,D||S?(D=d.stateNode,g=S&&typeof g.getDerivedStateFromError!="function"?null:D.render(),d.flags|=1,u!==null&&S?(d.child=Su(d,u.child,null,T),d.child=Su(d,null,g,T)):Hr(u,d,g,T),d.memoizedState=D.state,u=d.child):u=Wo(u,d,T),u}function Dk(u,d,g,S){return hu(),d.flags|=256,Hr(u,d,g,S),d.child}var xw={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sw(u){return{baseLanes:u,cachePool:gO()}}function bw(u,d,g){return u=u!==null?u.childLanes&~g:0,d&&(u|=ma),u}function Mk(u,d,g){var S=d.pendingProps,T=!1,D=(d.flags&128)!==0,k;if((k=D)||(k=u!==null&&u.memoizedState===null?!1:(un.current&2)!==0),k&&(T=!0,d.flags&=-129),k=(d.flags&32)!==0,d.flags&=-33,u===null){if(bt){if(T?Hl(d):Ul(),(u=tr)?(u=ZP(u,Pa),u=u!==null&&u.data!=="&"?u:null,u!==null&&(d.memoizedState={dehydrated:u,treeContext:Ol!==null?{id:Fi,overflow:Gi}:null,retryLane:536870912,hydrationErrors:null},g=lO(u),g.return=d,d.child=g,Qr=d,tr=null)):u=null,u===null)throw Pl(d);return SC(u)?d.lanes=32:d.lanes=536870912,null}return D=S.children,S=S.fallback,T?(Ul(),T=d.mode,D=ky({mode:"hidden",children:D},T),S=fu(S,T,g,null),D.return=d,S.return=d,D.sibling=S,d.child=D,S=d.child,S.memoizedState=Sw(g),S.childLanes=bw(u,k,g),d.memoizedState=xw,Nv(null,S)):(Hl(d),_w(d,D))}var $=u.memoizedState;if($!==null){var J=$.dehydrated;if(J!==null)return xZ(u,d,D,k,S,J,$,g)}return T?(Ul(),T=S.fallback,D=d.mode,$=u.child,J=$.sibling,S=Fo($,{mode:"hidden",children:S.children}),S.subtreeFlags=$.subtreeFlags&1206910976,J!==null?T=Fo(J,T):(T=fu(T,D,g,null),T.flags|=2),T.return=d,S.return=d,S.sibling=T,d.child=S,Nv(null,S),S=d.child,T=u.child.memoizedState,T===null?T=Sw(g):(D=T.cachePool,D!==null?($=Er._currentValue,D=D.parent!==$?{parent:$,pool:$}:D):D=gO(),T={baseLanes:T.baseLanes|g,cachePool:D}),S.memoizedState=T,S.childLanes=bw(u,k,g),d.memoizedState=xw,Nv(u.child,S)):(Hl(d),g=u.child,u=g.sibling,g=Fo(g,{mode:"visible",children:S.children}),g.return=d,g.sibling=null,u!==null&&(k=d.deletions,k===null?(d.deletions=[u],d.flags|=16):k.push(u)),d.child=g,d.memoizedState=null,g)}function _w(u,d){return d=ky({mode:"visible",children:d},u.mode),d.return=u,u.child=d}function ky(u,d){return u=ea(22,u,null,d),u.lanes=0,u}function Py(u,d,g){return Su(d,u.child,null,g),u=_w(d,d.pendingProps.children),u.flags|=2,d.memoizedState=null,u}function xZ(u,d,g,S,T,D,k,$){if(g)return d.flags&256?(Hl(d),d.flags&=-257,Py(u,d,$)):d.memoizedState!==null?(Ul(),d.child=u.child,d.flags|=128,null):(Ul(),D=T.fallback,k=d.mode,T=ky({mode:"visible",children:T.children},k),D=fu(D,k,$,null),D.flags|=2,T.return=d,D.return=d,T.sibling=D,d.child=T,Su(d,u.child,null,$),T=d.child,T.memoizedState=Sw($),T.childLanes=bw(u,S,$),d.memoizedState=xw,Nv(null,T));if(Hl(d),SC(D)){if(S=D.nextSibling&&D.nextSibling.dataset,S)var J=S.dgst;return S=J,S!==""&&(T=Error(n(419)),T.stack="",T.digest=S,xv({value:T,source:null,stack:null})),Py(u,d,$)}if(Lr||vu(u,d,$,!1),S=($&u.childLanes)!==0,Lr||S){if(Gl.current!==null)return Py(u,d,$);if(S=Jt,S!==null&&(T=cI(S,$),T!==0&&T!==k.retryLane))throw k.retryLane=T,cu(u,T),aa(S,u,T),mw;return xC(D)||e0(),Py(u,d,$)}return xC(D)?(d.flags|=192,d.child=u.child,null):(u=k.treeContext,tr=Ba(D.nextSibling),Qr=d,bt=!0,kl=null,Pa=!1,u!==null&&cO(d,u),d=_w(d,T.children),d.flags|=134221824,d)}function Rk(u,d,g){u.lanes|=d;var S=u.alternate;S!==null&&(S.lanes|=d),vy(u.return,d,g)}function Ek(u){for(var d=null;u!==null;){var g=u.alternate;g!==null&&wy(g)===null&&(d=u),u=u.sibling}return d}function jy(u,d,g,S,T,D){var k=u.memoizedState;k===null?u.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:S,tail:g,tailMode:T,treeForkCount:D}:(k.isBackwards=d,k.rendering=null,k.renderingStartTime=0,k.last=S,k.tail=g,k.tailMode=T,k.treeForkCount=D)}function ww(u){var d=u.child;for(u.child=null;d!==null;){var g=d.sibling;d.sibling=u.child,u.child=d,d=g}}function Cw(u,d,g){var S=d.pendingProps,T=S.revealOrder,D=S.tail;S=S.children;var k=un.current;if(d.flags&128)return Dv(d,k),null;var $=(k&2)!==0;if($?(k=k&1|2,d.flags|=128):k&=1,Dv(d,k),T==="backwards"&&u!==null?(ww(u),Hr(u,d,S,g),ww(u)):Hr(u,d,S,g),S=bt?yv:0,!$&&u!==null&&(u.flags&128)!==0)e:for(u=d.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Rk(u,g,d);else if(u.tag===19)Rk(u,g,d);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===d)break e;for(;u.sibling===null;){if(u.return===null||u.return===d)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}switch(T){case"backwards":g=Ek(d.child),g===null?(T=d.child,d.child=null):(T=g.sibling,g.sibling=null,ww(d)),jy(d,!0,T,null,D,S);break;case"unstable_legacy-backwards":for(g=null,T=d.child,d.child=null;T!==null;){if(u=T.alternate,u!==null&&wy(u)===null){d.child=T;break}u=T.sibling,T.sibling=g,g=T,T=u}jy(d,!0,g,null,D,S);break;case"together":jy(d,!1,null,null,void 0,S);break;case"independent":d.memoizedState=null;break;default:g=Ek(d.child),g===null?(T=d.child,d.child=null):(T=g.sibling,g.sibling=null),jy(d,!1,T,g,D,S)}return d.child}function Nk(u,d,g){var S=d.pendingProps;return jl(d,d.type,S.value),Hr(u,d,S.children,g),d.child}function Wo(u,d,g){if(u!==null&&(d.dependencies=u.dependencies),ql|=d.lanes,(g&d.childLanes)===0)if(u!==null){if(vu(u,d,g,!1),(g&d.childLanes)===0)return null}else return null;if(u!==null&&d.child!==u.child)throw Error(n(153));if(d.child!==null){for(u=d.child,g=Fo(u,u.pendingProps),d.child=g,g.return=d;u.sibling!==null;)u=u.sibling,g=g.sibling=Fo(u,u.pendingProps),g.return=d;g.sibling=null}return d.child}function Tw(u,d){return(u.lanes&d)!==0?!0:(u=u.dependencies,!!(u!==null&&py(u)))}function SZ(u,d,g){switch(d.tag){case 3:Xe(d,d.stateNode.containerInfo),jl(d,Er,u.memoizedState.cache),hu();break;case 27:case 5:ut(d);break;case 4:Xe(d,d.stateNode.containerInfo);break;case 10:jl(d,d.type,d.memoizedProps.value);break;case 31:if(d.memoizedState!==null)return d.flags|=128,Z1(d),null;break;case 13:var S=d.memoizedState;if(S!==null){if(S.dehydrated!==null)return Hl(d),d.flags|=128,null;S=vu(u,d,g,!1);var T=d.child.childLanes;return S||(g&T)!==0?Mk(u,d,g):(Hl(d),u=Wo(u,d,g),u!==null?u.sibling:null)}Hl(d);break;case 19:if(d.flags&128)return Cw(u,d,g);if(T=(u.flags&128)!==0,S=(g&d.childLanes)!==0,S||(vu(u,d,g,!1),S=(g&d.childLanes)!==0),T){if(S)return Cw(u,d,g);d.flags|=128}if(T=d.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),Dv(d,un.current),S)break;return null;case 22:return d.lanes=0,_k(u,d,g,d.pendingProps);case 24:jl(d,Er,u.memoizedState.cache)}return Wo(u,d,g)}function Lk(u,d,g){if(u!==null)if(u.memoizedProps!==d.pendingProps)Lr=!0;else{if(!Tw(u,g)&&(d.flags&128)===0)return Lr=!1,SZ(u,d,g);Lr=(u.flags&131072)!==0}else Lr=!1,bt&&(d.flags&1048576)!==0&&uO(d,yv,d.index);switch(d.lanes=0,d.tag){case 16:e:{var S=d.pendingProps;if(u=yu(d.elementType),d.type=u,typeof u=="function")L1(u)?(S=_u(u,S),d.tag=1,d=Ak(null,d,u,S,g)):(d.tag=0,d=yw(null,d,u,S,g));else{if(u!=null){var T=u.$$typeof;if(T===F){d.tag=11,d=xk(null,d,u,S,g);break e}else if(T===q){d.tag=14,d=Sk(null,d,u,S,g);break e}else if(T===H){d.tag=10,d.type=u,d=Nk(null,d,g);break e}}throw d=de(u)||u,Error(n(306,d,""))}}return d;case 0:return yw(u,d,d.type,d.pendingProps,g);case 1:return S=d.type,T=_u(S,d.pendingProps),Ak(u,d,S,T,g);case 3:e:{if(Xe(d,d.stateNode.containerInfo),u===null)throw Error(n(387));S=d.pendingProps;var D=d.memoizedState;T=D.element,Y1(u,d),Av(d,S,null,g);var k=d.memoizedState;if(S=k.cache,jl(d,Er,S),S!==D.cache&&z1(d,[Er],g,!0),Tv(),S=k.element,D.isDehydrated)if(D={element:S,isDehydrated:!1,cache:k.cache},d.updateQueue.baseState=D,d.memoizedState=D,d.flags&256){d=Dk(u,d,S,g);break e}else if(S!==T){T=Ia(Error(n(424)),d),xv(T),d=Dk(u,d,S,g);break e}else for(u=d.stateNode.containerInfo,u.nodeType===9?u=u.body:u=u.nodeName==="HTML"?u.ownerDocument.body:u,tr=Ba(u.firstChild),Qr=d,bt=!0,kl=null,Pa=!0,g=_O(d,null,S,g),d.child=g;g;)g.flags=g.flags&-3|134221824,g=g.sibling;else{if(hu(),S===T){d=Wo(u,d,g);break e}Hr(u,d,S,g)}d=d.child}return d;case 26:return Vf(u,d),u===null?(g=nj(d.type,null,d.pendingProps,null))?d.memoizedState=g:bt||(d.stateNode=PP(d.type,d.pendingProps,Ce.current,d)):d.memoizedState=nj(d.type,u.memoizedProps,d.pendingProps,u.memoizedState),null;case 27:return ut(d),u===null&&bt&&(S=d.stateNode=JP(d.type,d.pendingProps,Ce.current),Qr=d,Pa=!0,T=tr,Ql(d.type)?(bC=T,tr=Ba(S.firstChild)):tr=T),Hr(u,d,d.pendingProps.children,g),Vf(u,d),u===null&&(d.flags|=4194304),d.child;case 5:return u===null&&bt&&((T=S=tr)&&(S=vK(S,d.type,d.pendingProps,Pa),S!==null?(d.stateNode=S,Qr=d,tr=Ba(S.firstChild),Pa=!1,T=!0):T=!1),T||Pl(d)),ut(d),T=d.type,D=d.pendingProps,k=u!==null?u.memoizedProps:null,S=D.children,hC(T,D)?S=null:k!==null&&hC(T,k)&&(d.flags|=32),d.memoizedState!==null&&(T=J1(u,d,uZ,null,null,g),ah._currentValue=T),Vf(u,d),Hr(u,d,S,g),d.child;case 6:return u===null&&bt&&((u=g=tr)&&(g=pK(g,d.pendingProps,Pa),g!==null?(d.stateNode=g,Qr=d,tr=null,u=!0):u=!1),u||Pl(d)),null;case 13:return Mk(u,d,g);case 4:return Xe(d,d.stateNode.containerInfo),S=d.pendingProps,u===null?d.child=Su(d,null,S,g):Hr(u,d,S,g),d.child;case 11:return xk(u,d,d.type,d.pendingProps,g);case 7:return S=d.pendingProps,Vf(u,d),Hr(u,d,S,g),d.child;case 8:return Hr(u,d,d.pendingProps.children,g),d.child;case 12:return Hr(u,d,d.pendingProps.children,g),d.child;case 10:return Nk(u,d,g);case 9:return T=d.type._context,S=d.pendingProps.children,pu(d),T=ln(T),S=S(T),d.flags|=1,Hr(u,d,S,g),d.child;case 14:return Sk(u,d,d.type,d.pendingProps,g);case 15:return bk(u,d,d.type,d.pendingProps,g);case 19:return Cw(u,d,g);case 31:return yZ(u,d,g);case 22:return _k(u,d,g,d.pendingProps);case 24:return pu(d),S=ln(Er),u===null?(T=G1(),T===null&&(T=Jt,D=V1(),T.pooledCache=D,D.refCount++,D!==null&&(T.pooledCacheLanes|=g),T=D),d.memoizedState={parent:S,cache:T},U1(d),jl(d,Er,T)):((u.lanes&g)!==0&&(Y1(u,d),Av(d,null,null,g),Tv()),T=u.memoizedState,D=d.memoizedState,T.parent!==S?(T={parent:S,cache:S},d.memoizedState=T,d.lanes===0&&(d.memoizedState=d.updateQueue.baseState=T),jl(d,Er,S)):(S=D.cache,jl(d,Er,S),S!==T.cache&&z1(d,[Er],g,!0))),Hr(u,d,d.pendingProps.children,g),d.child;case 30:return d.stateNode===null&&(d.stateNode={autoName:null,paired:null,clones:null,ref:null}),S=d.pendingProps,S.name!=null&&S.name!=="auto"?d.flags|=u===null?18882560:18874368:bt&&hy(d),u!==null&&u.memoizedProps.name!==S.name?d.flags|=4194816:Vf(u,d),Hr(u,d,S.children,g),d.child;case 29:throw d.pendingProps}throw Error(n(156,d.tag))}function qo(u){u.flags|=4}function Aw(u,d,g,S,T){var D;if((D=(u.mode&32)!==0)&&(D=g===null?lj(d,S):lj(d,S)&&(S.src!==g.src||S.srcSet!==g.srcSet)),D){if(u.flags|=16777216,(T&335544128)===T)if(u.stateNode.complete)u.flags|=8192;else if(dP())u.flags|=8192;else throw xu=xy,H1}else u.flags&=-16777217}function Ik(u,d){if(d.type!=="stylesheet"||(d.state.loading&4)!==0)u.flags&=-16777217;else if(u.flags|=16777216,!sj(d))if(dP())u.flags|=8192;else throw xu=xy,H1}function By(u,d){d!==null&&(u.flags|=4),u.flags&16384&&(d=u.tag!==22?lI():536870912,u.lanes|=d,Yf|=d)}function Lv(u,d){if(!bt)switch(u.tailMode){case"visible":break;case"collapsed":for(var g=u.tail,S=null;g!==null;)g.alternate!==null&&(S=g),g=g.sibling;S===null?d||u.tail===null?u.tail=null:u.tail.sibling=null:S.sibling=null;break;default:for(d=u.tail,g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?u.tail=null:g.sibling=null}}function rr(u){var d=u.alternate!==null&&u.alternate.child===u.child,g=0,S=0;if(d)for(var T=u.child;T!==null;)g|=T.lanes|T.childLanes,S|=T.subtreeFlags&1206910976,S|=T.flags&1206910976,T.return=u,T=T.sibling;else for(T=u.child;T!==null;)g|=T.lanes|T.childLanes,S|=T.subtreeFlags,S|=T.flags,T.return=u,T=T.sibling;return u.subtreeFlags|=S,u.childLanes=g,d}function bZ(u,d,g){var S=d.pendingProps;switch(k1(d),d.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rr(d),null;case 1:return rr(d),null;case 3:return g=d.stateNode,S=null,u!==null&&(S=u.memoizedState.cache),d.memoizedState.cache!==S&&(d.flags|=2048),Uo(Er),Ge(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(u===null||u.child===null)&&(If(d)?qo(d):u===null||u.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,j1())),rr(d),null;case 26:var T=d.type,D=d.memoizedState;return u===null?(qo(d),D!==null?(rr(d),Ik(d,D)):(rr(d),Aw(d,T,null,S,g))):D?D!==u.memoizedState?(qo(d),rr(d),Ik(d,D)):(rr(d),d.flags&=-16777217):(u=u.memoizedProps,u!==S&&qo(d),rr(d),Aw(d,T,u,S,g)),null;case 27:if(zt(d),g=Ce.current,T=d.type,u!==null&&d.stateNode!=null)u.memoizedProps!==S&&qo(d);else{if(!S){if(d.stateNode===null)throw Error(n(166));return rr(d),d.subtreeFlags&=-33554433,null}u=_e.current,If(d)?fO(d):(u=JP(T,S,g),d.stateNode=u,qo(d))}return rr(d),d.subtreeFlags&=-33554433,null;case 5:if(zt(d),T=d.type,u!==null&&d.stateNode!=null)u.memoizedProps!==S&&qo(d);else{if(!S){if(d.stateNode===null)throw Error(n(166));return rr(d),d.subtreeFlags&=-33554433,null}if(D=_e.current,If(d))fO(d);else{var k=Hv(Ce.current);switch(D){case 1:D=k.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:D=k.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":D=k.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":D=k.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":D=k.createElement("div"),D.innerHTML="<script><\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof S.is=="string"?k.createElement("select",{is:S.is}):k.createElement("select"),S.multiple?D.multiple=!0:S.size&&(D.size=S.size);break;default:D=typeof S.is=="string"?k.createElement(T,{is:S.is}):k.createElement(T)}}D[on]=d,D[Jn]=S;e:for(k=d.child;k!==null;){if(k.tag===5||k.tag===6)D.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===d)break e;for(;k.sibling===null;){if(k.return===null||k.return===d)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}d.stateNode=D;e:switch(fn(D,T,S),T){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&qo(d)}}return rr(d),d.subtreeFlags&=-33554433,Aw(d,d.type,u===null?null:u.memoizedProps,d.pendingProps,g),null;case 6:if(u&&d.stateNode!=null)u.memoizedProps!==S&&qo(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(n(166));if(u=Ce.current,If(d)){if(u=d.stateNode,g=d.memoizedProps,S=null,T=Qr,T!==null)switch(T.tag){case 27:case 5:S=T.memoizedProps}u[on]=d,u=!!(u.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||LP(u.nodeValue,g)),u||Pl(d,!0)}else u=Hv(u).createTextNode(S),u[on]=d,d.stateNode=u}return rr(d),null;case 31:if(g=d.memoizedState,u===null||u.memoizedState!==null){if(S=If(d),g!==null){if(u===null){if(!S)throw Error(n(318));if(u=d.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(n(557));u[on]=d}else hu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;rr(d),u=!1}else g=j1(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=g),u=!0;if(!u)return d.flags&256?(va(d),d):(va(d),null);if((d.flags&128)!==0)throw Error(n(558))}return rr(d),null;case 13:if(S=d.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(T=If(d),S!==null&&S.dehydrated!==null){if(u===null){if(!T)throw Error(n(318));if(T=d.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[on]=d}else hu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;rr(d),T=!1}else T=j1(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=T),T=!0;if(!T)return d.flags&256?(va(d),d):(va(d),null)}return va(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,u=u!==null&&u.memoizedState!==null,g&&(S=d.child,T=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(T=S.alternate.memoizedState.cachePool.pool),D=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(D=S.memoizedState.cachePool.pool),D!==T&&(S.flags|=2048)),g!==u&&g&&(d.child.flags|=8192),By(d,d.updateQueue),rr(d),null);case 4:return Ge(),u===null&&lC(d.stateNode.containerInfo),d.flags|=67108864,rr(d),null;case 10:return Uo(d.type),rr(d),null;case 19:if(K1(d),S=d.memoizedState,S===null)return rr(d),null;if(T=(d.flags&128)!==0,D=S.rendering,D===null)if(T)Lv(S,!1);else{if(Sr!==0||u!==null&&(u.flags&128)!==0)for(u=d.child;u!==null;){if(D=wy(u),D!==null){for(d.flags|=128,Lv(S,!1),u=D.updateQueue,d.updateQueue=u,By(d,u),d.subtreeFlags=0,u=g,g=d.child;g!==null;)oO(g,u),g=g.sibling;return Dv(d,un.current&1|2),bt&&Go(d,S.treeForkCount),d.child}u=u.sibling}S.tail!==null&&_n()>Zy&&(d.flags|=128,T=!0,Lv(S,!1),d.lanes=4194304)}else{if(!T)if(u=wy(D),u!==null){if(d.flags|=128,T=!0,u=u.updateQueue,d.updateQueue=u,By(d,u),Lv(S,!0),S.tail===null&&S.tailMode!=="collapsed"&&S.tailMode!=="visible"&&!D.alternate&&!bt)return rr(d),null}else 2*_n()-S.renderingStartTime>Zy&&g!==536870912&&(d.flags|=128,T=!0,Lv(S,!1),d.lanes=4194304);S.isBackwards?(D.sibling=d.child,d.child=D):(u=S.last,u!==null?u.sibling=D:d.child=D,S.last=D)}if(S.tail!==null){u=S.tail;e:{for(g=u;g!==null;){if(g.alternate!==null){g=!1;break e}g=g.sibling}g=!0}return S.rendering=u,S.tail=u.sibling,S.renderingStartTime=_n(),u.sibling=null,D=un.current,D=T?D&1|2:D&1,S.tailMode==="visible"||S.tailMode==="collapsed"||!g||bt?Dv(d,D):(g=D,Ye(sn,d),Ye(un,g),wn===null&&(wn=d)),bt&&Go(d,S.treeForkCount),u}return rr(d),null;case 22:case 23:return va(d),X1(),S=d.memoizedState!==null,u!==null?u.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(rr(d),d.subtreeFlags&6&&(d.flags|=8192)):rr(d),g=d.updateQueue,g!==null&&By(d,g.retryQueue),g=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),u!==null&&Oe(mu),null;case 24:return g=null,u!==null&&(g=u.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Uo(Er),rr(d),null;case 25:return null;case 30:return d.flags|=33554432,rr(d),null}throw Error(n(156,d.tag))}function _Z(u,d){switch(k1(d),d.tag){case 1:return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 3:return Uo(Er),Ge(),u=d.flags,(u&65536)!==0&&(u&128)===0?(d.flags=u&-65537|128,d):null;case 26:case 27:case 5:return zt(d),null;case 31:if(d.memoizedState!==null){if(va(d),d.alternate===null)throw Error(n(340));hu()}return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 13:if(va(d),u=d.memoizedState,u!==null&&u.dehydrated!==null){if(d.alternate===null)throw Error(n(340));hu()}return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 19:return K1(d),u=d.flags,u&65536?(d.flags=u&-65537|128,u=d.memoizedState,u!==null&&(u.rendering=null,u.tail=null),d.flags|=4,d):null;case 4:return Ge(),null;case 10:return Uo(d.type),null;case 22:case 23:return va(d),X1(),u!==null&&Oe(mu),u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 24:return Uo(Er),null;case 25:return null;default:return null}}function Ok(u,d){switch(k1(d),d.tag){case 3:Uo(Er),Ge();break;case 26:case 27:case 5:zt(d);break;case 4:Ge();break;case 31:d.memoizedState!==null&&va(d);break;case 13:va(d);break;case 19:K1(d);break;case 10:Uo(d.type);break;case 22:case 23:va(d),X1(),u!==null&&Oe(mu);break;case 24:Uo(Er)}}function Iv(u,d){try{var g=d.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var T=S.next;g=T;do{if((g.tag&u)===u){S=void 0;var D=g.create,k=g.inst;S=D(),k.destroy=S}g=g.next}while(g!==T)}}catch($){Xt(d,d.return,$)}}function Yl(u,d,g){try{var S=d.updateQueue,T=S!==null?S.lastEffect:null;if(T!==null){var D=T.next;S=D;do{if((S.tag&u)===u){var k=S.inst,$=k.destroy;if($!==void 0){k.destroy=void 0,T=d;var J=g,oe=$;try{oe()}catch(ve){Xt(T,J,ve)}}}S=S.next}while(S!==D)}}catch(ve){Xt(d,d.return,ve)}}function kk(u){var d=u.updateQueue;if(d!==null){var g=u.stateNode;try{CO(d,g)}catch(S){Xt(u,u.return,S)}}}function Pk(u,d,g){g.props=_u(u.type,u.memoizedProps),g.state=u.memoizedState;try{g.componentWillUnmount()}catch(S){Xt(u,d,S)}}function Hi(u,d){try{var g=u.ref;if(g!==null){switch(u.tag){case 26:case 27:case 5:var S=u.stateNode;break;case 30:var T=u.stateNode,D=zo(u.memoizedProps,T);(T.ref===null||T.ref.name!==D)&&(T.ref=HP(D)),S=T.ref;break;case 7:if(u.stateNode===null){var k=new xa(u);h(u.child,!1,hK,k,void 0,void 0),u.stateNode=k}S=u.stateNode;break;default:S=u.stateNode}typeof g=="function"?u.refCleanup=g(S):g.current=S}}catch($){Xt(u,d,$)}}function cn(u,d){var g=u.ref,S=u.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(T){Xt(u,d,T)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(T){Xt(u,d,T)}else g.current=null}function zy(u,d){if((u.tag===5||u.tag===27||u.tag===6)&&u.alternate===null&&d!==null)for(var g=0;g<d.length;g++)XP(u.stateNode,d[g])}function jk(u){for(var d=u.return;d!==null&&(Mw(d)&&XP(u.stateNode,d.stateNode),!Dw(d));)d=d.return}function Ov(u){for(var d=u.return;d!==null&&(Mw(d)&&dK(u.stateNode,d.stateNode),!Dw(d));)d=d.return}function Dw(u){return u.tag===5||u.tag===3||u.tag===27}function Mw(u){return u&&u.tag===7&&u.stateNode!==null}function Rw(u){var d=u.type,g=u.memoizedProps,S=u.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(T){Xt(u,u.return,T)}}function Ew(u,d,g){try{var S=u.stateNode;qZ(S,u.type,g,d),S[Jn]=d}catch(T){Xt(u,u.return,T)}}function Bk(u){return u.tag===5||u.tag===3||u.tag===26||u.tag===27&&Ql(u.type)||u.tag===4}function Nw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Bk(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.tag===27&&Ql(u.type)||u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Lw(u,d,g,S){var T=u.tag;if(T===5||T===6)T=u.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(T,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(T),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Vi)),zy(u,S),jt=!0;else if(T!==4&&(T===27&&(zy(u,S),S=null,Ql(u.type)&&(g=u.stateNode,d=null)),u=u.child,u!==null))for(Lw(u,d,g,S),u=u.sibling;u!==null;)Lw(u,d,g,S),u=u.sibling}function Vy(u,d,g,S){var T=u.tag;if(T===5||T===6)T=u.stateNode,d?g.insertBefore(T,d):g.appendChild(T),zy(u,S),jt=!0;else if(T!==4&&(T===27&&(zy(u,S),S=null,Ql(u.type)&&(g=u.stateNode)),u=u.child,u!==null))for(Vy(u,d,g,S),u=u.sibling;u!==null;)Vy(u,d,g,S),u=u.sibling}function zk(u){var d=u.stateNode,g=u.memoizedProps;try{for(var S=u.type,T=d.attributes;T.length;)d.removeAttributeNode(T[0]);fn(d,S,g),d[on]=u,d[Jn]=g}catch(D){Xt(u,u.return,D)}}var Fy=!1,pa=null;function Vk(u){(u.tag===30||(u.subtreeFlags&33554432)!==0)&&(Fy=!0)}var Ui=null;function Fk(){var u=Ui;return Ui=null,u}var ta=0;function Ff(u,d,g,S,T){return ta=0,Gk(u.child,d,g,S,T)}function Gk(u,d,g,S,T){for(var D=!1;u!==null;){if(u.tag===5){var k=u.stateNode;if(S!==null){var $=pC(k);S.push($),$.view&&(D=!0)}else D||pC(k).view&&(D=!0);Fy=!0,FP(k,ta===0?d:d+"_"+ta,g),ta++}else(u.tag!==22||u.memoizedState===null)&&(u.tag===30&&T||Gk(u.child,d,g,S,T)&&(D=!0));u=u.sibling}return D}function Yi(u,d){for(;u!==null;)u.tag===5?GP(u.stateNode,u.memoizedProps):(u.tag!==22||u.memoizedState===null)&&(u.tag===30&&d||Yi(u.child,d)),u=u.sibling}function Gy(u){if((u.subtreeFlags&18874368)!==0)for(u=u.child;u!==null;){if((u.tag!==22||u.memoizedState===null)&&(Gy(u),u.tag===30&&(u.flags&18874368)!==0&&u.stateNode.paired)){var d=u.memoizedProps;if(d.name==null||d.name==="auto")throw Error(n(544));var g=d.name;d=Vo(d.default,d.share),d!=="none"&&(Ff(u,g,d,null,!1)||Yi(u.child,!1))}u=u.sibling}}function Iw(u,d){if(u.tag===30){var g=u.stateNode,S=u.memoizedProps,T=zo(S,g),D=Vo(S.default,g.paired?S.share:S.enter);D!=="none"?Ff(u,T,D,null,!1)?(Gy(u),g.paired||d||Xf(u,S.onEnter)):Yi(u.child,!1):Gy(u)}else if((u.subtreeFlags&33554432)!==0)for(u=u.child;u!==null;)Iw(u,d),u=u.sibling;else Gy(u)}function Ow(u){if(pa!==null&&pa.size!==0){var d=pa;if((u.subtreeFlags&18874368)!==0)for(u=u.child;u!==null;){if(u.tag!==22||u.memoizedState===null){if(u.tag===30&&(u.flags&18874368)!==0){var g=u.memoizedProps,S=g.name;if(S!=null&&S!=="auto"){var T=d.get(S);if(T!==void 0){var D=Vo(g.default,g.share);if(D!=="none"&&(Ff(u,S,D,null,!1)?(D=u.stateNode,T.paired=D,D.paired=T,Xf(u,g.onShare)):Yi(u.child,!1)),d.delete(S),d.size===0)break}}}Ow(u)}u=u.sibling}}}function kw(u){if(u.tag===30){var d=u.memoizedProps,g=zo(d,u.stateNode),S=pa!==null?pa.get(g):void 0,T=Vo(d.default,S!==void 0?d.share:d.exit);T!=="none"&&(Ff(u,g,T,null,!1)?S!==void 0?(T=u.stateNode,S.paired=T,T.paired=S,pa.delete(g),Xf(u,d.onShare)):Xf(u,d.onExit):Yi(u.child,!1)),pa!==null&&Ow(u)}else if((u.subtreeFlags&33554432)!==0)for(u=u.child;u!==null;)kw(u),u=u.sibling;else pa!==null&&Ow(u)}function Hk(u){for(u=u.child;u!==null;){if(u.tag===30){var d=u.memoizedProps,g=zo(d,u.stateNode);d=Vo(d.default,d.update),u.flags&=-5,d!=="none"&&Ff(u,g,d,u.memoizedState=[],!1)}else(u.subtreeFlags&33554432)!==0&&Hk(u);u=u.sibling}}function Pw(u){if((u.subtreeFlags&18874368)!==0)for(u=u.child;u!==null;){if(u.tag!==22||u.memoizedState===null){if(u.tag===30&&(u.flags&18874368)!==0){var d=u.stateNode;d.paired!==null&&(d.paired=null,Yi(u.child,!1))}Pw(u)}u=u.sibling}}function Hy(u){if(u.tag===30)u.stateNode.paired=null,Yi(u.child,!1),Pw(u);else if((u.subtreeFlags&33554432)!==0)for(u=u.child;u!==null;)Hy(u),u=u.sibling;else Pw(u)}function Uk(u){for(u=u.child;u!==null;)u.tag===30?Yi(u.child,!1):(u.subtreeFlags&33554432)!==0&&Uk(u),u=u.sibling}function jw(u,d,g,S,T,D,k){for(var $=!1;d!==null;){if(d.tag===5){var J=d.stateNode;if(D!==null&&ta<D.length){var oe=D[ta],ve=pC(J);(oe.view||ve.view)&&($=!0);var we;if(we=(u.flags&4)===0)if(ve.clip)we=!0;else{we=oe.rect;var ne=ve.rect;we=we.y!==ne.y||we.x!==ne.x||we.height!==ne.height||we.width!==ne.width}we&&(u.flags|=4),ve.abs?ve=!oe.abs:(oe=oe.rect,ve=ve.rect,ve=oe.height!==ve.height||oe.width!==ve.width),ve&&(u.flags|=32)}else u.flags|=32;(u.flags&4)!==0&&FP(J,ta===0?g:g+"_"+ta,T),$&&(u.flags&4)!==0||(Ui===null&&(Ui=[]),Ui.push(J,ta===0?S:S+"_"+ta,d.memoizedProps)),ta++}else(d.tag!==22||d.memoizedState===null)&&(d.tag===30&&k?u.flags|=d.flags&32:jw(u,d.child,g,S,T,D,k)&&($=!0));d=d.sibling}return $}function Yk(u,d){for(u=u.child;u!==null;){if(u.tag===30){var g=u.memoizedProps,S=u.stateNode,T=zo(g,S),D=Vo(g.default,g.update),k;k=u.memoizedState,u.memoizedState=null,S=u;var $=u.child;ta=0,T=jw(S,$,T,T,D,k,!1),(u.flags&4)!==0&&T&&Xf(u,g.onUpdate)}else(u.subtreeFlags&33554432)!==0&&Yk(u);u=u.sibling}}var Jr=!1,Ut=!1,$i=!1,Bw=!1,$k=typeof WeakSet=="function"?WeakSet:Set,en=null,Wi=!1,kv=!1,Uy=!1,zw=!1;function wZ(u,d,g){if(u=u.containerInfo,cC=ih,u=ZI(u),T1(u)){if("selectionStart"in u)var S={start:u.selectionStart,end:u.selectionEnd};else e:{S=(S=u.ownerDocument)&&S.defaultView||window;var T=S.getSelection&&S.getSelection();if(T&&T.rangeCount!==0){S=T.anchorNode;var D=T.anchorOffset,k=T.focusNode;T=T.focusOffset;try{S.nodeType,k.nodeType}catch{S=null;break e}var $=0,J=-1,oe=-1,ve=0,we=0,ne=u,fe=null;t:for(;;){for(var ke;ne!==S||D!==0&&ne.nodeType!==3||(J=$+D),ne!==k||T!==0&&ne.nodeType!==3||(oe=$+T),ne.nodeType===3&&($+=ne.nodeValue.length),(ke=ne.firstChild)!==null;)fe=ne,ne=ke;for(;;){if(ne===u)break t;if(fe===S&&++ve===D&&(J=$),fe===k&&++we===T&&(oe=$),(ke=ne.nextSibling)!==null)break;ne=fe,fe=ne.parentNode}ne=ke}S=J===-1||oe===-1?null:{start:J,end:oe}}else S=null}S=S||{start:0,end:0}}else S=null;for(fC={focusedElem:u,selectionRange:S},ih=!1,g=(g&335544064)===g,en=d,d=g?9270:1024;en!==null;){if(u=en,g&&(S=u.deletions,S!==null))for(D=0;D<S.length;D++)g&&kw(S[D]);if(u.alternate===null&&(u.flags&2)!==0)g&&Vk(u),Yy(g);else{if(u.tag===22){if(S=u.alternate,u.memoizedState!==null){S!==null&&S.memoizedState===null&&g&&kw(S),Yy(g);continue}else if(S!==null&&S.memoizedState!==null){g&&Vk(u),Yy(g);continue}}S=u.child,(u.subtreeFlags&d)!==0&&S!==null?(S.return=u,en=S):(g&&Hk(u),Yy(g))}}pa=null}function Yy(u){for(;en!==null;){var d=en,g=u,S=d.alternate,T=d.flags;switch(d.tag){case 0:case 11:case 15:break;case 1:if((T&1024)!==0&&S!==null){g=void 0,T=S.memoizedProps,S=S.memoizedState;var D=d.stateNode;try{var k=_u(d.type,T);g=D.getSnapshotBeforeUpdate(k,S),D.__reactInternalSnapshotBeforeUpdate=g}catch($){Xt(d,d.return,$)}}break;case 3:if((T&1024)!==0){if(S=d.stateNode.containerInfo,g=S.nodeType,g===9)yC(S);else if(g===1)switch(S.nodeName){case"HEAD":case"HTML":case"BODY":yC(S);break;default:S.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:g&&S!==null&&(g=zo(S.memoizedProps,S.stateNode),T=d.memoizedProps,T=Vo(T.default,T.update),T!=="none"&&Ff(S,g,T,S.memoizedState=[],!0));break;default:if((T&1024)!==0)throw Error(n(163))}if(S=d.sibling,S!==null){S.return=d.return,en=S;break}en=d.return}}function Wk(u,d,g){var S=g.flags;switch(g.tag){case 0:case 11:case 15:qi(u,g),S&4&&Iv(5,g);break;case 1:if(qi(u,g),S&4)if(u=g.stateNode,d===null)try{u.componentDidMount()}catch(k){Xt(g,g.return,k)}else{var T=_u(g.type,d.memoizedProps);d=d.memoizedState;try{u.componentDidUpdate(T,d,u.__reactInternalSnapshotBeforeUpdate)}catch(k){Xt(g,g.return,k)}}S&64&&kk(g),S&512&&Hi(g,g.return);break;case 3:if(qi(u,g),S&64&&(u=g.updateQueue,u!==null)){if(d=null,g.child!==null)switch(g.child.tag){case 27:case 5:d=g.child.stateNode;break;case 1:d=g.child.stateNode}try{CO(u,d)}catch(k){Xt(g,g.return,k)}}break;case 27:d===null&&S&4&&zk(g);case 26:case 5:qi(u,g),d===null&&S&4&&Rw(g),S&512&&Hi(g,g.return);break;case 12:qi(u,g);break;case 31:qi(u,g),S&4&&Kk(u,g);break;case 13:qi(u,g),S&4&&Qk(u,g),S&64&&(u=g.memoizedState,u!==null&&(u=u.dehydrated,u!==null&&(g=kZ.bind(null,g),gK(u,g))));break;case 22:if(S=g.memoizedState!==null||Jr,!S){var D=d!==null&&d.memoizedState!==null||Ut;d=Jr,T=Ut,Jr=S,(Ut=D)&&!T?(S=2,(g.subtreeFlags&8772)!==0&&(S|=1),yi(u,g,S)):qi(u,g),Jr=d,Ut=T}break;case 30:qi(u,g),S&512&&Hi(g,g.return);break;case 7:S&512&&Hi(g,g.return);default:qi(u,g)}}function Vw(u,d){for(u=u.child;u!==null;)qk(u,d),u=u.sibling}function qk(u,d){switch(u.tag){case 5:case 26:try{var g=u.stateNode;if(d){var S=g.style;typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"}else{var T=u.stateNode,D=u.memoizedProps.style,k=D!=null&&D.hasOwnProperty("display")?D.display:null;T.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(J){Xt(u,u.return,J)}Fw(u,d);break;case 6:try{u.stateNode.nodeValue=d?"":u.memoizedProps,jt=!0}catch(J){Xt(u,u.return,J)}break;case 18:try{var $=u.stateNode;d?VP($,!0):VP(u.stateNode,!1)}catch(J){Xt(u,u.return,J)}break;case 22:case 23:u.memoizedState===null&&Vw(u,d);break;default:Vw(u,d)}}function Fw(u,d){if(u.subtreeFlags&67108864)for(u=u.child;u!==null;){e:{var g=u,S=d;switch(g.tag){case 4:qk(g,S);break e;case 22:g.memoizedState===null&&Fw(g,S);break e;default:Fw(g,S)}}u=u.sibling}}function Xk(u){var d=u.alternate;d!==null&&(u.alternate=null,Xk(d)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(d=u.stateNode,d!==null&&Zm(d)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}var fr=null,ra=!1;function gi(u,d,g){for(g=g.child;g!==null;)Zk(u,d,g),g=g.sibling}function Zk(u,d,g){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(ji,g)}catch{}switch(g.tag){case 26:Ut||cn(g,d),gi(u,d,g),g.memoizedState?g.memoizedState.count--:g.stateNode&&!Ut&&(g=g.stateNode,g.parentNode.removeChild(g));break;case 27:Ut||cn(g,d),Ov(g);var S=fr,T=ra;Ql(g.type)&&(fr=g.stateNode,ra=!1),gi(u,d,g),ej(g.stateNode,g.type,g.memoizedProps),fr=S,ra=T;break;case 5:Ut||cn(g,d),Ov(g);case 6:if(g.tag===6&&Ov(g),S=fr,T=ra,fr=null,gi(u,d,g),fr=S,ra=T,fr!==null)if(ra)try{(fr.nodeType===9?fr.body:fr.nodeName==="HTML"?fr.ownerDocument.body:fr).removeChild(g.stateNode),jt=!0}catch(D){Xt(g,d,D)}else try{fr.removeChild(g.stateNode),jt=!0}catch(D){Xt(g,d,D)}break;case 18:fr!==null&&(ra?(u=fr,zP(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,g.stateNode),oh(u)):zP(fr,g.stateNode));break;case 4:S=fr,T=ra,fr=g.stateNode.containerInfo,ra=!0,gi(u,d,g),fr=S,ra=T;break;case 0:case 11:case 14:case 15:Yl(2,g,d),Ut||Yl(4,g,d),gi(u,d,g);break;case 1:Ut||(cn(g,d),S=g.stateNode,typeof S.componentWillUnmount=="function"&&Pk(g,d,S)),gi(u,d,g);break;case 21:gi(u,d,g);break;case 22:Ut=(S=Ut)||g.memoizedState!==null,gi(u,d,g),Ut=S;break;case 30:cn(g,d),gi(u,d,g);break;case 7:Ut||cn(g,d),gi(u,d,g);break;default:gi(u,d,g)}}function Kk(u,d){if(d.memoizedState===null&&(u=d.alternate,u!==null&&(u=u.memoizedState,u!==null))){u=u.dehydrated;try{oh(u)}catch(g){Xt(d,d.return,g)}}}function Qk(u,d){if(d.memoizedState===null&&(u=d.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{oh(u)}catch(g){Xt(d,d.return,g)}}function CZ(u){switch(u.tag){case 31:case 13:case 19:var d=u.stateNode;return d===null&&(d=u.stateNode=new $k),d;case 22:return u=u.stateNode,d=u._retryCache,d===null&&(d=u._retryCache=new $k),d;default:throw Error(n(435,u.tag))}}function $y(u,d){var g=CZ(u);d.forEach(function(S){if(!g.has(S)){g.add(S);var T=PZ.bind(null,u,S);S.then(T,T)}})}function jn(u,d,g){var S=d.deletions;if(S!==null)for(var T=0;T<S.length;T++){var D=S[T],k=u,$=d,J=$;e:for(;J!==null;){switch(J.tag){case 27:if(Ql(J.type)){fr=J.stateNode,ra=!1;break e}break;case 5:fr=J.stateNode,ra=!1;break e;case 3:case 4:fr=J.stateNode.containerInfo,ra=!0;break e}J=J.return}if(fr===null)throw Error(n(160));Zk(k,$,D),fr=null,ra=!1,k=D.alternate,k!==null&&(k.return=null),D.return=null}if(d.subtreeFlags&13886)for(d=d.child;d!==null;)Jk(d,u,g),d=d.sibling}var mi=null;function Jk(u,d,g){var S=u.alternate,T=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(T&4&&(S=u.updateQueue,S=S!==null?S.events:null,S!==null))for(var D=0;D<S.length;D++){var k=S[D];k.ref.impl=k.nextImpl}jn(d,u,g),Bn(u),T&4&&(Yl(3,u,u.return),Iv(3,u),Yl(5,u,u.return));break;case 1:jn(d,u,g),Bn(u),T&512&&(Ut||S===null||cn(S,S.return)),T&64&&Jr&&(u=u.updateQueue,u!==null&&(d=u.callbacks,d!==null&&(g=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=g===null?d:g.concat(d))));break;case 26:if(D=mi,jn(d,u,g),Bn(u),T&512&&(Ut||S===null||cn(S,S.return)),T&4)if(T=S!==null?S.memoizedState:null,g=u.memoizedState,S===null)if(g===null)if(u.stateNode===null)if(Jr)u.stateNode=PP(u.type,u.memoizedProps,d.containerInfo,u);else{e:{d=u.type,g=u.memoizedProps,T=D.ownerDocument||D;t:switch(d){case"title":S=T.getElementsByTagName("title")[0],(!S||S[lv]||S[on]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=T.createElement(d),T.head.insertBefore(S,T.querySelector("head > title"))),fn(S,d,g),S[on]=u,Kr(S),d=S;break e;case"link":if(D=oj("link","href",T).get(d+(g.href||""))){for(k=0;k<D.length;k++)if(S=D[k],S.getAttribute("href")===(g.href==null||g.href===""?null:g.href)&&S.getAttribute("rel")===(g.rel==null?null:g.rel)&&S.getAttribute("title")===(g.title==null?null:g.title)&&S.getAttribute("crossorigin")===(g.crossOrigin==null?null:g.crossOrigin)){D.splice(k,1);break t}}S=T.createElement(d),fn(S,d,g),T.head.appendChild(S);break;case"meta":if(D=oj("meta","content",T).get(d+(g.content||""))){for(k=0;k<D.length;k++)if(S=D[k],S.getAttribute("content")===(g.content==null?null:""+g.content)&&S.getAttribute("name")===(g.name==null?null:g.name)&&S.getAttribute("property")===(g.property==null?null:g.property)&&S.getAttribute("http-equiv")===(g.httpEquiv==null?null:g.httpEquiv)&&S.getAttribute("charset")===(g.charSet==null?null:g.charSet)){D.splice(k,1);break t}}S=T.createElement(d),fn(S,d,g),T.head.appendChild(S);break;default:throw Error(n(468,d))}S[on]=u,Kr(S),d=S}u.stateNode=d}else Jr||TC(D,u.type,u.stateNode);else u.stateNode=ij(D,g,u.memoizedProps);else T!==g?(T===null?(d=S.stateNode,d===null||Ut||d.parentNode.removeChild(d)):T.count--,g===null?Jr||TC(D,u.type,u.stateNode):ij(D,g,u.memoizedProps)):g===null&&u.stateNode!==null&&Ew(u,u.memoizedProps,S.memoizedProps);break;case 27:jn(d,u,g),Bn(u),T&512&&(Ut||S===null||cn(S,S.return)),S!==null&&T&4&&Ew(u,u.memoizedProps,S.memoizedProps);break;case 5:if(D=$i,$i=!1,jn(d,u,g),$i=D,Bn(u),T&512&&(Ut||S===null||cn(S,S.return)),u.flags&32){d=u.stateNode;try{wf(d,""),jt=!0}catch(ve){Xt(u,u.return,ve)}}T&4&&u.stateNode!=null&&(d=u.memoizedProps,Ew(u,d,S!==null?S.memoizedProps:d)),T&1024&&(Bw=!0);break;case 6:if(jn(d,u,g),Bn(u),T&4){if(u.stateNode===null)throw Error(n(162));d=u.memoizedProps,g=u.stateNode;try{g.nodeValue=d,jt=!0}catch(ve){Xt(u,u.return,ve)}}break;case 3:if(jt=!1,l0=null,D=mi,mi=Uv(d.containerInfo),jn(d,u,g),mi=D,Bn(u),T&4&&S!==null&&S.memoizedState.isDehydrated)try{oh(d.containerInfo)}catch(ve){Xt(u,u.return,ve)}Bw&&(Bw=!1,eP(u)),jt=!1;break;case 4:T=$i,$i=Jr,S=SI(),D=mi,mi=Uv(u.stateNode.containerInfo),jn(d,u,g),Bn(u),mi=D,jt&&kv&&(Uy=!0),jt=S,$i=T;break;case 12:jn(d,u,g),Bn(u);break;case 31:jn(d,u,g),Bn(u),T&4&&(d=u.updateQueue,d!==null&&(u.updateQueue=null,$y(u,d)));break;case 13:jn(d,u,g),Bn(u),u.child.flags&8192&&u.memoizedState!==null!=(S!==null&&S.memoizedState!==null)&&(Xy=_n()),T&4&&(d=u.updateQueue,d!==null&&(u.updateQueue=null,$y(u,d)));break;case 22:D=u.memoizedState!==null,k=S!==null&&S.memoizedState!==null;var $=Jr,J=Ut,oe=$i;Jr=$||D,$i=oe||D,Ut=J||k,jn(d,u,g),Ut=J,$i=oe,Jr=$,Bn(u),T&8192&&(d=u.stateNode,d._visibility=D?d._visibility&-2:d._visibility|1,!D||S===null||k||Jr||Ut||(d=k||Ut,g=Jr,S=Ut,Jr=D||Jr,Ut=d,$l(u,2),Jr=g,Ut=S),!D&&$i||Vw(u,D)),T&4&&(d=u.updateQueue,d!==null&&(g=d.retryQueue,g!==null&&(d.retryQueue=null,$y(u,g))));break;case 19:jn(d,u,g),Bn(u),T&4&&(d=u.updateQueue,d!==null&&(u.updateQueue=null,$y(u,d)));break;case 30:T&512&&(Ut||S===null||cn(S,S.return)),T=SI(),D=kv,k=(g&335544064)===g,$=u.memoizedProps,kv=k&&Vo($.default,$.update)!=="none",jn(d,u,g),Bn(u),k&&S!==null&&jt&&(u.flags|=4),kv=D,jt=T;break;case 21:break;case 7:T&512&&(Ut||S===null||cn(S,S.return)),S&&S.stateNode!==null&&(S.stateNode._fragmentFiber=u);default:jn(d,u,g),Bn(u)}}function Bn(u){var d=u.flags;if(d&2){try{for(var g,S=u.return;S!==null;){if(Bk(S)){g=S;break}S=S.return}S=null;for(var T=u.return;T!==null;){if(Mw(T)){var D=T.stateNode;S===null?S=[D]:S.push(D)}if(Dw(T))break;T=T.return}var k=S;if(g==null)throw Error(n(160));switch(g.tag){case 27:var $=g.stateNode,J=Nw(u);Vy(u,J,$,k);break;case 5:var oe=g.stateNode;g.flags&32&&(wf(oe,""),g.flags&=-33);var ve=Nw(u);Vy(u,ve,oe,k);break;case 3:case 4:var we=g.stateNode.containerInfo,ne=Nw(u);Lw(u,ne,we,k);break;default:throw Error(n(161))}}catch(fe){Xt(u,u.return,fe)}u.flags&=-3}d&4096&&(u.flags&=-4097)}function eP(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var d=u;eP(d),d.tag===5&&d.flags&1024&&(d=d.stateNode,ih=!0,d.reset(),ih=!1),u=u.sibling}}function Gf(u,d){if(d.subtreeFlags&9270)for(d=d.child;d!==null;)tP(d,u),d=d.sibling;else Yk(d)}function tP(u,d){var g=u.alternate;if(g===null)Iw(u,!1);else switch(u.tag){case 3:if(zw=Wi=!1,Fk(),Gf(d,u),!Wi&&!Uy){if(u=Ui,u!==null)for(var S=0;S<u.length;S+=3){g=u[S];var T=u[S+1];GP(g,u[S+2]),g=g.ownerDocument.documentElement,g!==null&&g.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+T+")"})}u=d.containerInfo,u=u.nodeType===9?u.documentElement:u.ownerDocument.documentElement,u!==null&&u.style.viewTransitionName===""&&(u.style.viewTransitionName="none",u.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),u.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),zw=!0}Ui=null;break;case 5:Gf(d,u);break;case 4:S=Wi,Wi=!1,Gf(d,u),Wi&&(Uy=!0),Wi=S;break;case 22:u.memoizedState===null&&(g.memoizedState!==null?Iw(u,!1):Gf(d,u));break;case 30:S=Wi,T=Fk(),Wi=!1,Gf(d,u),Wi&&(u.flags|=4);var D=u.memoizedProps,k=u.stateNode;d=zo(D,k),k=zo(g.memoizedProps,k);var $=Vo(D.default,D.update);$==="none"?d=!1:(D=g.memoizedState,g.memoizedState=null,g=u.child,ta=0,d=jw(u,g,d,k,$,D,!0),ta!==(D===null?0:D.length)&&(u.flags|=32)),(u.flags&4)!==0&&d?(Xf(u,u.memoizedProps.onUpdate),Ui=T):T!==null&&(T.push.apply(T,Ui),Ui=T),Wi=(u.flags&32)!==0?!0:S;break;default:Gf(d,u)}}function qi(u,d){if(d.subtreeFlags&8772)for(d=d.child;d!==null;)Wk(u,d.alternate,d),d=d.sibling}function $l(u,d){for(u=u.child;u!==null;){var g=u,S=d;switch(g.tag){case 0:case 11:case 14:case 15:Yl(4,g,g.return),$l(g,S);break;case 1:cn(g,g.return);var T=g.stateNode;typeof T.componentWillUnmount=="function"&&Pk(g,g.return,T),$l(g,S);break;case 27:(S&2)!==0&&ej(g.stateNode,g.type,g.memoizedProps);case 5:cn(g,g.return),g.tag!==5&&g.tag!==27||Ov(g),$l(g,S);break;case 6:Ov(g);break;case 26:cn(g,g.return),T=g.stateNode,g.memoizedState!==null||T===null||Ut||T.parentNode.removeChild(T),$l(g,S);break;case 22:g.memoizedState===null&&$l(g,S);break;case 30:cn(g,g.return),$l(g,S);break;case 7:cn(g,g.return);default:$l(g,S)}u=u.sibling}}function yi(u,d,g){for(g=(d.subtreeFlags&8772)!==0?g:g&-2,d=d.child;d!==null;){var S=d.alternate,T=u,D=d,k=D.flags,$=(g&1)!==0;switch(D.tag){case 0:case 11:case 15:yi(T,D,g),Iv(4,D);break;case 1:if(yi(T,D,g),S=D,T=S.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(ve){Xt(S,S.return,ve)}if(S=D,T=S.updateQueue,T!==null){var J=S.stateNode;try{var oe=T.shared.hiddenCallbacks;if(oe!==null)for(T.shared.hiddenCallbacks=null,T=0;T<oe.length;T++)wO(oe[T],J)}catch(ve){Xt(S,S.return,ve)}}$&&k&64&&kk(D),Hi(D,D.return);break;case 27:(g&2)!==0&&zk(D);case 5:D.tag!==5&&D.tag!==27||jk(D),yi(T,D,g),$&&S===null&&k&4&&Rw(D),Hi(D,D.return);break;case 6:jk(D);break;case 26:J=D.stateNode,D.memoizedState!==null||J===null||Jr||TC(Uv(J.ownerDocument),D.type,J),yi(T,D,g),$&&S===null&&k&4&&Rw(D),Hi(D,D.return);break;case 12:yi(T,D,g);break;case 31:yi(T,D,g),$&&k&4&&Kk(T,D);break;case 13:yi(T,D,g),$&&k&4&&Qk(T,D);break;case 22:D.memoizedState===null&&yi(T,D,g),Hi(D,D.return);break;case 30:yi(T,D,g),Hi(D,D.return);break;case 7:Hi(D,D.return);default:yi(T,D,g)}d=d.sibling}}function Gw(u,d){var g=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),u=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(u=d.memoizedState.cachePool.pool),u!==g&&(u!=null&&u.refCount++,g!=null&&Sv(g))}function Hw(u,d){u=null,d.alternate!==null&&(u=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==u&&(d.refCount++,u!=null&&Sv(u))}function ja(u,d,g,S){var T=(g&335544064)===g;if(d.subtreeFlags&(T?10262:10256))for(d=d.child;d!==null;)rP(u,d,g,S),d=d.sibling;else T&&Uk(d)}function rP(u,d,g,S){var T=(g&335544064)===g;T&&d.alternate===null&&d.return!==null&&d.return.alternate!==null&&Hy(d);var D=d.flags;switch(d.tag){case 0:case 11:case 15:ja(u,d,g,S),D&2048&&Iv(9,d);break;case 1:ja(u,d,g,S);break;case 3:ja(u,d,g,S),T&&zw&&(u=u.containerInfo,u=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,u.style.viewTransitionName==="root"&&(u.style.viewTransitionName=""),u=u.ownerDocument.documentElement,u!==null&&u.style.viewTransitionName==="none"&&(u.style.viewTransitionName="")),D&2048&&(D=null,d.alternate!==null&&(D=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==D&&(d.refCount++,D!=null&&Sv(D)));break;case 12:if(D&2048){ja(u,d,g,S),D=d.stateNode;try{var k=d.memoizedProps,$=k.id,J=k.onPostCommit;typeof J=="function"&&J($,d.alternate===null?"mount":"update",D.passiveEffectDuration,-0)}catch(oe){Xt(d,d.return,oe)}}else ja(u,d,g,S);break;case 31:ja(u,d,g,S);break;case 13:ja(u,d,g,S);break;case 23:break;case 22:k=d.stateNode,$=d.alternate,d.memoizedState!==null?(T&&$!==null&&$.memoizedState===null&&Hy($),k._visibility&2?ja(u,d,g,S):Pv(u,d)):(T&&$!==null&&$.memoizedState!==null&&Hy(d),k._visibility&2?ja(u,d,g,S):(k._visibility|=2,Hf(u,d,g,S,(d.subtreeFlags&10256)!==0||!1))),D&2048&&Gw($,d);break;case 24:ja(u,d,g,S),D&2048&&Hw(d.alternate,d);break;case 30:T&&(D=d.alternate,D!==null&&(Yi(D.child,!0),Yi(d.child,!0))),ja(u,d,g,S);break;default:ja(u,d,g,S)}}function Hf(u,d,g,S,T){for(T=T&&((d.subtreeFlags&10256)!==0||!1),d=d.child;d!==null;){var D=u,k=d,$=g,J=S,oe=k.flags;switch(k.tag){case 0:case 11:case 15:Hf(D,k,$,J,T),Iv(8,k);break;case 23:break;case 22:var ve=k.stateNode;k.memoizedState!==null?ve._visibility&2?Hf(D,k,$,J,T):Pv(D,k):(ve._visibility|=2,Hf(D,k,$,J,T)),T&&oe&2048&&Gw(k.alternate,k);break;case 24:Hf(D,k,$,J,T),T&&oe&2048&&Hw(k.alternate,k);break;default:Hf(D,k,$,J,T)}d=d.sibling}}function Pv(u,d){if(d.subtreeFlags&10256)for(d=d.child;d!==null;){var g=u,S=d,T=S.flags;switch(S.tag){case 22:Pv(g,S),T&2048&&Gw(S.alternate,S);break;case 24:Pv(g,S),T&2048&&Hw(S.alternate,S);break;default:Pv(g,S)}d=d.sibling}}var wu=8192;function Cu(u,d,g){if(u.subtreeFlags&wu)for(u=u.child;u!==null;)nP(u,d,g),u=u.sibling}function nP(u,d,g){switch(u.tag){case 26:Cu(u,d,g),u.flags&wu&&(u.memoizedState!==null?EK(g,mi,u.memoizedState,u.memoizedProps):(u=u.stateNode,(d&335544128)===d&&cj(g,u)));break;case 5:Cu(u,d,g),u.flags&wu&&(u=u.stateNode,(d&335544128)===d&&cj(g,u));break;case 3:case 4:var S=mi;mi=Uv(u.stateNode.containerInfo),Cu(u,d,g),mi=S;break;case 22:u.memoizedState===null&&(S=u.alternate,S!==null&&S.memoizedState!==null?(S=wu,wu=16777216,Cu(u,d,g),wu=S):Cu(u,d,g));break;case 30:if((u.flags&wu)!==0&&(S=u.memoizedProps.name,S!=null&&S!=="auto")){var T=u.stateNode;T.paired=null,pa===null&&(pa=new Map),pa.set(S,T)}Cu(u,d,g);break;default:Cu(u,d,g)}}function aP(u){var d=u.alternate;if(d!==null&&(u=d.child,u!==null)){d.child=null;do d=u.sibling,u.sibling=null,u=d;while(u!==null)}}function jv(u){var d=u.deletions;if((u.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var S=d[g];en=S,oP(S,u)}aP(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)iP(u),u=u.sibling}function iP(u){switch(u.tag){case 0:case 11:case 15:jv(u),u.flags&2048&&Yl(9,u,u.return);break;case 3:jv(u);break;case 12:jv(u);break;case 22:var d=u.stateNode;u.memoizedState!==null&&d._visibility&2&&(u.return===null||u.return.tag!==13)?(d._visibility&=-3,Wy(u)):jv(u);break;default:jv(u)}}function Wy(u){var d=u.deletions;if((u.flags&16)!==0){if(d!==null)for(var g=0;g<d.length;g++){var S=d[g];en=S,oP(S,u)}aP(u)}for(u=u.child;u!==null;){switch(d=u,d.tag){case 0:case 11:case 15:Yl(8,d,d.return),Wy(d);break;case 22:g=d.stateNode,g._visibility&2&&(g._visibility&=-3,Wy(d));break;default:Wy(d)}u=u.sibling}}function oP(u,d){for(;en!==null;){var g=en;switch(g.tag){case 0:case 11:case 15:Yl(8,g,d);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var S=g.memoizedState.cachePool.pool;S!=null&&S.refCount++}break;case 24:Sv(g.memoizedState.cache)}if(S=g.child,S!==null)S.return=g,en=S;else e:for(g=u;en!==null;){S=en;var T=S.sibling,D=S.return;if(Xk(S),S===g){en=null;break e}if(T!==null){T.return=D,en=T;break e}en=D}}}var TZ={getCacheForType:function(u){var d=ln(Er),g=d.data.get(u);return g===void 0&&(g=u(),d.data.set(u,g)),g},cacheSignal:function(){return ln(Er).controller.signal}},AZ=typeof WeakMap=="function"?WeakMap:Map,Ft=0,Jt=null,Dt=null,Et=0,qt=0,ga=null,Wl=!1,Uf=!1,Uw=!1,Xo=0,Sr=0,ql=0,Tu=0,qy=0,ma=0,Yf=0,Bv=null,na=null,Yw=!1,Xy=0,lP=0,Zy=1/0,Ky=null,Xl=null,gr=0,xi=null,Au=null,Xi=0,$w=0,Ww=null,sP=null,$f=null,Wf=null,qf=null,zv=0,Qy=null;function ya(){return(Ft&2)!==0&&Et!==0?Et&-Et:ae.T!==null?nC():fI()}function uP(){if(ma===0)if((Et&536870912)===0||bt){var u=vi;vi<<=1,(vi&3932160)===0&&(vi=262144),ma=u}else ma=536870912;return u=sn.current,u!==null&&(u.flags|=32),ma}function Xf(u,d){if(d!=null){var g=u.stateNode,S=g.ref;S===null&&(S=g.ref=HP(zo(u.memoizedProps,g))),Wf===null&&(Wf=[]),Wf.push(d.bind(null,S))}}function aa(u,d,g){(u===Jt&&(qt===2||qt===9)||u.cancelPendingCommit!==null)&&(Zf(u,0),Zl(u,Et,ma,!1)),ov(u,g),((Ft&2)===0||u!==Jt)&&(u===Jt&&((Ft&2)===0&&(Tu|=g),Sr===4&&Zl(u,Et,ma,!1)),Zi(u))}function cP(u,d,g){if((Ft&6)!==0)throw Error(n(327));var S=!g&&(d&127)===0&&(d&u.expiredLanes)===0||iv(u,d),T=S?RZ(u,d):Xw(u,d,!0),D=S;do{if(T===0){Uf&&!S&&Zl(u,d,0,!1);break}else{if(g=u.current.alternate,D&&!DZ(g)){T=Xw(u,d,!1),D=!1;continue}if(T===2){if(D=d,u.errorRecoveryDisabledLanes&D)var k=0;else k=u.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){d=k;e:{var $=u;T=Bv;var J=$.current.memoizedState.isDehydrated;if(J&&(Zf($,k).flags|=256),k=Xw($,k,!1),k!==2&&k!==6){if(Uw&&!J){$.errorRecoveryDisabledLanes|=D,Tu|=D,T=4;break e}D=na,na=T,D!==null&&(na===null?na=D:na.push.apply(na,D))}T=k}if(D=!1,T!==2)continue}}if(T===1){Zf(u,0),Zl(u,d,0,!0);break}e:{switch(S=u,D=T,D){case 0:case 1:throw Error(n(345));case 4:if((d&4194048)!==d&&(d&62914560)!==d)break;case 6:Zl(S,d,ma,!Wl);break e;case 2:na=null;break;case 3:case 5:break;default:throw Error(n(329))}if((d&62914560)===d&&(T=Xy+300-_n(),10<T)){if(Zl(S,d,ma,!Wl),qm(S,0,!0)!==0)break e;Xi=d,S.timeoutHandle=vC(fP.bind(null,S,g,na,Ky,Yw,d,ma,Tu,Yf,Wl,D,"Throttled",-0,0),T);break e}fP(S,g,na,Ky,Yw,d,ma,Tu,Yf,Wl,D,null,-0,0)}}break}while(!0);Zi(u)}function fP(u,d,g,S,T,D,k,$,J,oe,ve,we,ne,fe){u.timeoutHandle=-1;var ke=d.subtreeFlags,We=(D&335544064)===D;if(we=null,(We||ke&8192||(ke&16785408)===16785408)&&(we={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vi},pa=null,nP(d,D,we),We&&(ke=we,We=u.containerInfo,We=(We.nodeType===9?We:We.ownerDocument).__reactViewTransition,We!=null&&(ke.count++,ke.waitingForViewTransition=!0,ke=Wv.bind(ke),We.finished.then(ke,ke))),ke=(D&62914560)===D?Xy-_n():(D&4194048)===D?lP-_n():0,ke=NK(we,ke),ke!==null)){Xi=D,u.cancelPendingCommit=ke(xP.bind(null,u,d,D,g,S,T,k,$,J,oe,ve,we,null,ne,fe)),Zl(u,D,k,!oe);return}xP(u,d,D,g,S,T,k,$,J,oe,ve,we)}function DZ(u){for(var d=u;;){var g=d.tag;if((g===0||g===11||g===15)&&d.flags&16384&&(g=d.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var S=0;S<g.length;S++){var T=g[S],D=T.getSnapshot;T=T.value;try{if(!da(D(),T))return!1}catch{return!1}}if(g=d.child,d.subtreeFlags&16384&&g!==null)g.return=d,d=g;else{if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Zl(u,d,g,S){d=oI(u,d),d&=~qy,d&=~Tu,u.suspendedLanes|=d,u.pingedLanes&=~d,S&&(u.warmLanes|=d),S=u.expirationTimes;for(var T=d;0<T;){var D=31-cr(T),k=1<<D;S[D]=-1,T&=~k}g!==0&&sI(u,g,d)}function Jy(){return(Ft&6)===0?(Vv(0),!1):!0}function qw(){if(Dt!==null){if(qt===0)var u=Dt.return;else u=Dt,Ho=du=null,rw(u),Pf=null,wv=0,u=Dt;for(;u!==null;)Ok(u.alternate,u),u=u.return;Dt=null}}function Zf(u,d){var g=u.timeoutHandle;return g!==-1&&(u.timeoutHandle=-1,KZ(g)),g=u.cancelPendingCommit,g!==null&&(u.cancelPendingCommit=null,g()),Xi=0,qw(),Jt=u,Dt=g=Fo(u.current,null),Et=d,qt=0,ga=null,Wl=!1,Uf=iv(u,d),Uw=!1,Yf=ma=qy=Tu=ql=Sr=0,na=Bv=null,Yw=!1,Xo=oI(u,d),ly(),g}function hP(u,d){gt=null,ae.H=Ly,d===kf||d===yy?(d=xO(),qt=3):d===H1?(d=xO(),qt=4):qt=d===mw?8:d!==null&&typeof d=="object"&&typeof d.then=="function"?6:1,ga=d,Dt===null&&(Sr=1,Iy(u,Ia(d,u.current)))}function dP(){var u=sn.current;return u===null?!0:(Et&4194048)===Et?wn===null:(Et&62914560)===Et||(Et&536870912)!==0?u===wn:!1}function vP(){var u=ae.H;return ae.H=Ly,u===null?Ly:u}function pP(){var u=ae.A;return ae.A=TZ,u}function e0(){Sr=4,Wl||(Et&4194048)!==Et&&sn.current!==null||(Uf=!0),(ql&134217727)===0&&(Tu&134217727)===0||Jt===null||Zl(Jt,Et,ma,!1)}function Xw(u,d,g){var S=Ft;Ft|=2;var T=vP(),D=pP();(Jt!==u||Et!==d)&&(Ky=null,Zf(u,d)),d=!1;var k=Sr;e:do try{if(qt!==0&&Dt!==null){var $=Dt,J=ga;switch(qt){case 8:qw(),k=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(d=!0);var oe=qt;if(qt=0,ga=null,Kf(u,$,J,oe),g&&Uf){k=0;break e}break;default:oe=qt,qt=0,ga=null,Kf(u,$,J,oe)}}MZ(),k=Sr;break}catch(ve){hP(u,ve)}while(!0);return d&&u.shellSuspendCounter++,Ho=du=null,Ft=S,ae.H=T,ae.A=D,Dt===null&&(Jt=null,Et=0,ly()),k}function MZ(){for(;Dt!==null;)gP(Dt)}function RZ(u,d){var g=Ft;Ft|=2;var S=vP(),T=pP();Jt!==u||Et!==d?(Ky=null,Zy=_n()+500,Zf(u,d)):Uf=iv(u,d);e:do try{if(qt!==0&&Dt!==null){d=Dt;var D=ga;t:switch(qt){case 1:qt=0,ga=null,Kf(u,d,D,1);break;case 2:case 9:if(mO(D)){qt=0,ga=null,mP(d);break}d=function(){qt!==2&&qt!==9||Jt!==u||(qt=7),Zi(u)},D.then(d,d);break e;case 3:qt=7;break e;case 4:qt=5;break e;case 7:mO(D)?(qt=0,ga=null,mP(d)):(qt=0,ga=null,Kf(u,d,D,7));break;case 5:var k=null;switch(Dt.tag){case 26:k=Dt.memoizedState;case 5:case 27:var $=Dt;if(k?sj(k):$.stateNode.complete){qt=0,ga=null;var J=$.sibling;if(J!==null)Dt=J;else{var oe=$.return;oe!==null?(Dt=oe,t0(oe)):Dt=null}break t}}qt=0,ga=null,Kf(u,d,D,5);break;case 6:qt=0,ga=null,Kf(u,d,D,6);break;case 8:qw(),Sr=6;break e;default:throw Error(n(462))}}EZ();break}catch(ve){hP(u,ve)}while(!0);return Ho=du=null,ae.H=S,ae.A=T,Ft=g,Dt!==null?0:(Jt=null,Et=0,ly(),Sr)}function EZ(){for(;Dt!==null&&!ko();)gP(Dt)}function gP(u){var d=Lk(u.alternate,u,Xo);u.memoizedProps=u.pendingProps,d===null?t0(u):Dt=d}function mP(u){var d=u,g=d.alternate;switch(d.tag){case 15:case 0:d=Tk(g,d,d.pendingProps,d.type,void 0,Et);break;case 11:d=Tk(g,d,d.pendingProps,d.type.render,d.ref,Et);break;case 5:rw(d);var S=d;S===Qr&&(bt?(dy(S),S.tag===5&&S.stateNode!=null&&(tr=S.stateNode)):(dy(S),bt=!0));default:Ok(g,d),d=Dt=oO(d,Xo),d=Lk(g,d,Xo)}u.memoizedProps=u.pendingProps,d===null?t0(u):Dt=d}function Kf(u,d,g,S){Ho=du=null,rw(d),Pf=null,wv=0;var T=d.return;try{if(mZ(u,T,d,g,Et)){Sr=1,Iy(u,Ia(g,u.current)),Dt=null;return}}catch(D){if(T!==null)throw Dt=T,D;Sr=1,Iy(u,Ia(g,u.current)),Dt=null;return}d.flags&32768?(bt||S===1?u=!0:Uf||(Et&536870912)!==0?u=!1:(Wl=u=!0,(S===2||S===9||S===3||S===6)&&(S=sn.current,S!==null&&S.tag===13&&(S.flags|=16384))),yP(d,u)):t0(d)}function t0(u){var d=u;do{if((d.flags&32768)!==0){yP(d,Wl);return}u=d.return;var g=bZ(d.alternate,d,Xo);if(g!==null){Dt=g;return}if(d=d.sibling,d!==null){Dt=d;return}Dt=d=u}while(d!==null);Sr===0&&(Sr=5)}function yP(u,d){do{var g=_Z(u.alternate,u);if(g!==null){g.flags&=32767,Dt=g;return}if(g=u.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!d&&(u=u.sibling,u!==null)){Dt=u;return}Dt=u=g}while(u!==null);Sr=6,Dt=null}function xP(u,d,g,S,T,D,k,$,J,oe,ve,we){u.cancelPendingCommit=null;do r0();while(gr!==0);if((Ft&6)!==0)throw Error(n(327));if(d!==null){if(d===u.current)throw Error(n(177));u===Jt&&(Dt=Jt=null,Et=0),Au=d,xi=u,Xi=g,Ww=T,sP=S,NZ(u,d,g,k,$,J,we)}}function NZ(u,d,g,S,T,D,k){var $=d.lanes|d.childLanes;if($w=$,$|=E1,nX(u,g,$,S,T,D),Wf=null,(g&335544064)===g?(qf=iZ(u),S=10262):(qf=null,S=10256),(d.subtreeFlags&S)!==0||(d.flags&S)!==0?(u.callbackNode=null,u.callbackPriority=0,jZ(ru,function(){return Jw(),null})):(u.callbackNode=null,u.callbackPriority=0),Fy=!1,S=(d.flags&13878)!==0,(d.subtreeFlags&13878)!==0||S){S=ae.T,ae.T=null,T=ye.p,ye.p=2,D=Ft,Ft|=4;try{wZ(u,d,g)}finally{Ft=D,ye.p=T,ae.T=S}}gr=1,Fy?$f=nK(k,u.containerInfo,qf,Zw,Kw,IZ,Qw,Jw,LZ):(Zw(),Kw(),Qw())}function LZ(u){if(gr!==0){var d=xi.onRecoverableError;d(u,{componentStack:null})}}function IZ(){gr===3&&(gr=0,tP(Au,xi),gr=4)}function Zw(){if(gr===1){gr=0;var u=xi,d=Au,g=Xi,S=(d.flags&13878)!==0;if((d.subtreeFlags&13878)!==0||S){S=ae.T,ae.T=null;var T=ye.p;ye.p=2;var D=Ft;Ft|=4;try{kv=Uy=!1,Jk(d,u,g),g=fC;var k=ZI(u.containerInfo),$=g.focusedElem,J=g.selectionRange;if(k!==$&&$&&$.ownerDocument&&XI($.ownerDocument.documentElement,$)){if(J!==null&&T1($)){var oe=J.start,ve=J.end;if(ve===void 0&&(ve=oe),"selectionStart"in $)$.selectionStart=oe,$.selectionEnd=Math.min(ve,$.value.length);else{var we=$.ownerDocument||document,ne=we&&we.defaultView||window;if(ne.getSelection){var fe=ne.getSelection(),ke=$.textContent.length,We=Math.min(J.start,ke),mt=J.end===void 0?We:Math.min(J.end,ke);!fe.extend&&We>mt&&(k=mt,mt=We,We=k);var ie=qI($,We),te=qI($,mt);if(ie&&te&&(fe.rangeCount!==1||fe.anchorNode!==ie.node||fe.anchorOffset!==ie.offset||fe.focusNode!==te.node||fe.focusOffset!==te.offset)){var le=we.createRange();le.setStart(ie.node,ie.offset),fe.removeAllRanges(),We>mt?(fe.addRange(le),fe.extend(te.node,te.offset)):(le.setEnd(te.node,te.offset),fe.addRange(le))}}}}for(we=[],fe=$;fe=fe.parentNode;)fe.nodeType===1&&we.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<we.length;$++){var Se=we[$];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}ih=!!cC,fC=cC=null}finally{Ft=D,ye.p=T,ae.T=S}}u.current=d,gr=2}}function Kw(){if(gr===2){gr=0;var u=xi,d=Au,g=(d.flags&8772)!==0;if((d.subtreeFlags&8772)!==0||g){g=ae.T,ae.T=null;var S=ye.p;ye.p=2;var T=Ft;Ft|=4;try{Wk(u,d.alternate,d)}finally{Ft=T,ye.p=S,ae.T=g}}gr=3}}function Qw(){if(gr===4||gr===3){gr=0;var u=$f;$f=null,gf();var d=xi,g=Au,S=Xi,T=sP,D=(S&335544064)===S?10262:10256;if((g.subtreeFlags&D)!==0||(g.flags&D)!==0?gr=5:(gr=0,Au=xi=null,SP(d,d.pendingLanes)),D=d.pendingLanes,D===0&&(Xl=null),l1(S),g=g.stateNode,pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(ji,g,void 0,(g.current.flags&128)===128)}catch{}if(T!==null){g=ae.T,D=ye.p,ye.p=2,ae.T=null;try{for(var k=d.onRecoverableError,$=0;$<T.length;$++){var J=T[$];k(J.value,{componentStack:J.stack})}}finally{ae.T=g,ye.p=D}}if(T=Wf,k=qf,qf=null,T!==null&&(Wf=null,k===null&&(k=[]),u!==null))for(J=0;J<T.length;J++)g=(0,T[J])(k),g!==void 0&&u.finished.finally(g);(Xi&3)!==0&&r0(),Zi(d),D=d.pendingLanes,(S&261930)!==0&&(D&42)!==0?d===Qy?zv++:(zv=0,Qy=d):(zv=0,Qy=null),Vv(0)}}function SP(u,d){(u.pooledCacheLanes&=d)===0&&(d=u.pooledCache,d!=null&&(u.pooledCache=null,Sv(d)))}function r0(){return $f!==null&&($f.skipTransition(),$f=null),Zw(),Kw(),Qw(),Jw()}function Jw(){if(gr!==5)return!1;var u=xi,d=$w;$w=0;var g=l1(Xi),S=ae.T,T=ye.p;try{ye.p=32>g?32:g,ae.T=null,g=Ww,Ww=null;var D=xi,k=Xi;if(gr=0,Au=xi=null,Xi=0,(Ft&6)!==0)throw Error(n(331));var $=Ft;if(Ft|=4,iP(D.current),rP(D,D.current,k,g),Ft=$,Vv(0,!1),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(ji,D)}catch{}return!0}finally{ye.p=T,ae.T=S,SP(u,d)}}function bP(u,d,g){d=Ia(g,d),d=gw(u.stateNode,d,2),u=Fl(u,d,2),u!==null&&(ov(u,2),Zi(u))}function Xt(u,d,g){if(u.tag===3)bP(u,u,g);else for(;d!==null;){if(d.tag===3){bP(d,u,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Xl===null||!Xl.has(S))){u=Ia(g,u),g=mk(2),S=Fl(d,g,2),S!==null&&(yk(g,S,d,u),ov(S,2),Zi(S));break}}d=d.return}}function eC(u,d,g){var S=u.pingCache;if(S===null){S=u.pingCache=new AZ;var T=new Set;S.set(d,T)}else T=S.get(d),T===void 0&&(T=new Set,S.set(d,T));T.has(g)||(Uw=!0,T.add(g),u=OZ.bind(null,u,d,g),d.then(u,u))}function OZ(u,d,g){var S=u.pingCache;S!==null&&S.delete(d),u.pingedLanes|=u.suspendedLanes&g,u.warmLanes&=~g,Jt===u&&(Et&g)===g&&((Sr===4||Sr===3&&(Et&62914560)===Et&&300>_n()-Xy)&&(Ft&2)===0?Zf(u,0):qy|=g,Yf===Et&&(Yf=0)),Zi(u)}function _P(u,d){d===0&&(d=lI()),u=cu(u,d),u!==null&&(ov(u,d),Zi(u))}function kZ(u){var d=u.memoizedState,g=0;d!==null&&(g=d.retryLane),_P(u,g)}function PZ(u,d){var g=0;switch(u.tag){case 31:case 13:var S=u.stateNode,T=u.memoizedState;T!==null&&(g=T.retryLane);break;case 19:S=u.stateNode;break;case 22:S=u.stateNode._retryCache;break;default:throw Error(n(314))}S!==null&&S.delete(d),_P(u,g)}function jZ(u,d){return bn(u,d)}var Qf=null,Jf=null,tC=!1,n0=!1,rC=!1,Kl=0;function Zi(u){u!==Jf&&u.next===null&&(Jf===null?Qf=Jf=u:Jf=Jf.next=u),n0=!0,tC||(tC=!0,zZ())}function Vv(u,d){if(!rC&&n0){rC=!0;do for(var g=!1,S=Qf;S!==null;){if(u!==0){var T=S.pendingLanes;if(T===0)var D=0;else{var k=S.suspendedLanes,$=S.pingedLanes;D=(1<<31-cr(42|u)+1)-1,D&=T&~(k&~$),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(g=!0,AP(S,D))}else D=Et,D=qm(S,S===Jt?D:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(D&3)===0||iv(S,D)||(g=!0,AP(S,D));S=S.next}while(g);rC=!1}}function BZ(){wP()}function wP(){n0=tC=!1;var u=0;Kl!==0&&ZZ()&&(u=Kl);for(var d=_n(),g=null,S=Qf;S!==null;){var T=S.next,D=CP(S,d);D===0?(S.next=null,g===null?Qf=T:g.next=T,T===null&&(Jf=g)):(g=S,(u!==0||(D&3)!==0)&&(n0=!0)),S=T}gr!==0&&gr!==5||Vv(u),Kl!==0&&(Kl=0)}function CP(u,d){for(var g=u.suspendedLanes,S=u.pingedLanes,T=u.expirationTimes,D=u.pendingLanes&-62914561;0<D;){var k=31-cr(D),$=1<<k,J=T[k];J===-1?(($&g)===0||($&S)!==0)&&(T[k]=rX($,d)):J<=d&&(u.expiredLanes|=$),D&=~$}if(d=Jt,g=Et,g=qm(u,u===d?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),S=u.callbackNode,g===0||u===d&&(qt===2||qt===9)||u.cancelPendingCommit!==null)return S!==null&&S!==null&&tu(S),u.callbackNode=null,u.callbackPriority=0;if((g&3)===0||iv(u,g)){if(d=g&-g,d===u.callbackPriority)return d;switch(S!==null&&tu(S),l1(g)){case 2:case 8:g=rv;break;case 32:g=ru;break;case 268435456:g=nu;break;default:g=ru}return S=TP.bind(null,u),g=bn(g,S),u.callbackPriority=d,u.callbackNode=g,d}return S!==null&&S!==null&&tu(S),u.callbackPriority=2,u.callbackNode=null,2}function TP(u,d){if(gr!==0&&gr!==5)return u.callbackNode=null,u.callbackPriority=0,null;var g=u.callbackNode;if(r0()&&u.callbackNode!==g)return null;var S=Et;return S=qm(u,u===Jt?S:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),S===0?null:(cP(u,S,d),CP(u,_n()),u.callbackNode!=null&&u.callbackNode===g?TP.bind(null,u):null)}function AP(u,d){if(r0())return null;cP(u,d,!0)}function zZ(){QZ(function(){(Ft&6)!==0?bn(tv,BZ):wP()})}function nC(){if(Kl===0){var u=gu;u===0&&(u=zi,zi<<=1,(zi&261888)===0&&(zi=256)),Kl=u}return Kl}function DP(u){return u==null||typeof u=="symbol"||typeof u=="boolean"?null:typeof u=="function"?u:Jm(u)}function VZ(u,d,g,S,T){if(d==="submit"&&g&&g.stateNode===T){var D=DP((T[Jn]||null).action),k=S.submitter;k&&(d=(d=k[Jn]||null)?DP(d.formAction):k.getAttribute("formAction"),d!==null&&(D=d,k=null));var $=new ny("action","action",null,S,T);u.push({event:$,listeners:[{instance:null,listener:function(){if(S.defaultPrevented){if(Kl!==0){var J=new FormData(T,k);fw(g,{pending:!0,data:J,method:T.method,action:D},null,J)}}else typeof D=="function"&&($.preventDefault(),J=new FormData(T,k),fw(g,{pending:!0,data:J,method:T.method,action:D},D,J))},currentTarget:T}]})}}for(var aC=0;aC<R1.length;aC++){var iC=R1[aC],FZ=iC.toLowerCase(),GZ=iC[0].toUpperCase()+iC.slice(1);pi(FZ,"on"+GZ)}pi(JI,"onAnimationEnd"),pi(eO,"onAnimationIteration"),pi(tO,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(KX,"onTransitionRun"),pi(QX,"onTransitionStart"),pi(JX,"onTransitionCancel"),pi(rO,"onTransitionEnd"),bf("onMouseEnter",["mouseout","mouseover"]),bf("onMouseLeave",["mouseout","mouseover"]),bf("onPointerEnter",["pointerout","pointerover"]),bf("onPointerLeave",["pointerout","pointerover"]),lu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),lu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),lu("onBeforeInput",["compositionend","keypress","textInput","paste"]),lu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),lu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),lu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fv="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),HZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fv));function MP(u,d){d=(d&4)!==0;for(var g=0;g<u.length;g++){var S=u[g],T=S.event;S=S.listeners;e:{var D=void 0;if(d)for(var k=S.length-1;0<=k;k--){var $=S[k],J=$.instance,oe=$.currentTarget;if($=$.listener,J!==D&&T.isPropagationStopped())break e;D=$,T.currentTarget=oe;try{D(T)}catch(ve){oy(ve)}T.currentTarget=null,D=J}else for(k=0;k<S.length;k++){if($=S[k],J=$.instance,oe=$.currentTarget,$=$.listener,J!==D&&T.isPropagationStopped())break e;D=$,T.currentTarget=oe;try{D(T)}catch(ve){oy(ve)}T.currentTarget=null,D=J}}}}function Mt(u,d){var g=d[dI];g===void 0&&(g=d[dI]=new Set);var S=u+"__bubble";g.has(S)||(RP(d,u,2,!1),g.add(S))}function oC(u,d,g){var S=0;d&&(S|=4),RP(g,u,S,d)}var a0="_reactListening"+Math.random().toString(36).slice(2);function lC(u){if(!u[a0]){u[a0]=!0,gI.forEach(function(g){g!=="selectionchange"&&(HZ.has(g)||oC(g,!1,u),oC(g,!0,u))});var d=u.nodeType===9?u:u.ownerDocument;d===null||d[a0]||(d[a0]=!0,oC("selectionchange",!1,d))}}function RP(u,d,g,S){switch(yj(d)){case 2:var T=kK;break;case 8:T=PK;break;default:T=DC}g=T.bind(null,d,g,u),T=void 0,!p1||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(T=!0),S?T!==void 0?u.addEventListener(d,g,{capture:!0,passive:T}):u.addEventListener(d,g,!0):T!==void 0?u.addEventListener(d,g,{passive:T}):u.addEventListener(d,g,!1)}function sC(u,d,g,S,T){var D=S;if((d&1)===0&&(d&2)===0&&S!==null)e:for(;;){if(S===null)return;var k=S.tag;if(k===3||k===4){var $=S.stateNode.containerInfo;if($===T)break;if(k===4)for(k=S.return;k!==null;){var J=k.tag;if((J===3||J===4)&&k.stateNode.containerInfo===T)return;k=k.return}for(;$!==null;){if(k=ou($),k===null)return;if(J=k.tag,J===5||J===6||J===26||J===27){S=D=k;continue e}$=$.parentNode}}S=S.return}RI(function(){var oe=D,ve=d1(g),we=[];e:{var ne=nO.get(u);if(ne!==void 0){var fe=ny,ke=u;switch(u){case"keypress":if(ty(g)===0)break e;case"keydown":case"keyup":fe=DX;break;case"focusin":ke="focus",fe=x1;break;case"focusout":ke="blur",fe=x1;break;case"beforeblur":case"afterblur":fe=x1;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=LI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=pX;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=LX;break;case JI:case eO:case tO:fe=yX;break;case rO:fe=OX;break;case"scroll":case"scrollend":fe=dX;break;case"wheel":fe=PX;break;case"copy":case"cut":case"paste":fe=SX;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=OI;break;case"submit":fe=EX;break;case"toggle":case"beforetoggle":fe=BX}var We=(d&4)!==0,mt=!We&&(u==="scroll"||u==="scrollend"),ie=We?ne!==null?ne+"Capture":null:ne;We=[];for(var te=oe,le;te!==null;){var Se=te;if(le=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||le===null||ie===null||(Se=uv(te,ie),Se!=null&&We.push(Gv(te,Se,le))),mt)break;te=te.return}0<We.length&&(ne=new fe(ne,ke,null,g,ve),we.push({event:ne,listeners:We}))}}if((d&7)===0){e:{if(fe=u==="mouseover"||u==="pointerover",ne=u==="mouseout"||u==="pointerout",fe&&g!==h1&&(ke=g.relatedTarget||g.fromElement)&&(ou(ke)||ke[yf]))break e;(ne||fe)&&(ke=ve.window===ve?ve:(fe=ve.ownerDocument)?fe.defaultView||fe.parentWindow:window,ne?(fe=g.relatedTarget||g.toElement,ne=oe,fe=fe?ou(fe):null,fe!==null&&(mt=i(fe),We=fe.tag,fe!==mt||We!==5&&We!==27&&We!==6)&&(fe=null)):(ne=null,fe=oe),ne!==fe&&(We=LI,Se="onMouseLeave",ie="onMouseEnter",te="mouse",(u==="pointerout"||u==="pointerover")&&(We=OI,Se="onPointerLeave",ie="onPointerEnter",te="pointer"),mt=ne==null?ke:sv(ne),le=fe==null?ke:sv(fe),ke=new We(Se,te+"leave",ne,g,ve),ke.target=mt,ke.relatedTarget=le,Se=null,ou(ve)===oe&&(We=new We(ie,te+"enter",fe,g,ve),We.target=le,We.relatedTarget=mt,Se=We),mt=Se,We=ne&&fe?R(ne,fe,UZ):null,ne!==null&&EP(we,ke,ne,We,!1),fe!==null&&mt!==null&&EP(we,mt,fe,We,!0)))}e:{if(ne=oe?sv(oe):window,fe=ne.nodeName&&ne.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ne.type==="file")var He=GI;else if(VI(ne))if(HI)He=qX;else{He=$X;var Nt=YX}else fe=ne.nodeName,!fe||fe.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?oe&&f1(oe.elementType)&&(He=GI):He=WX;if(He&&(He=He(u,oe))){FI(we,He,g,ve);break e}Nt&&Nt(u,ne,oe)}switch(Nt=oe?sv(oe):window,u){case"focusin":(VI(Nt)||Nt.contentEditable==="true")&&(Df=Nt,A1=oe,mv=null);break;case"focusout":mv=A1=Df=null;break;case"mousedown":D1=!0;break;case"contextmenu":case"mouseup":case"dragend":D1=!1,KI(we,g,ve);break;case"selectionchange":if(ZX)break;case"keydown":case"keyup":KI(we,g,ve)}var Ke;if(b1)e:{switch(u){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else Af?BI(u,g)&&(ot="onCompositionEnd"):u==="keydown"&&g.keyCode===229&&(ot="onCompositionStart");ot&&(kI&&g.locale!=="ko"&&(Af||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&Af&&(Ke=EI()):(Ll=ve,g1="value"in Ll?Ll.value:Ll.textContent,Af=!0)),Nt=i0(oe,ot),0<Nt.length&&(ot=new II(ot,u,null,g,ve),we.push({event:ot,listeners:Nt}),Ke?ot.data=Ke:(Ke=zI(g),Ke!==null&&(ot.data=Ke)))),(Ke=VX?FX(u,g):GX(u,g))&&(ot=i0(oe,"onBeforeInput"),0<ot.length&&(Nt=new II("onBeforeInput","beforeinput",null,g,ve),we.push({event:Nt,listeners:ot}),Nt.data=Ke)),VZ(we,u,oe,g,ve)}MP(we,d)})}function Gv(u,d,g){return{instance:u,listener:d,currentTarget:g}}function i0(u,d){for(var g=d+"Capture",S=[];u!==null;){var T=u,D=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||D===null||(T=uv(u,g),T!=null&&S.unshift(Gv(u,T,D)),T=uv(u,d),T!=null&&S.push(Gv(u,T,D))),u.tag===3)return S;u=u.return}return[]}function UZ(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5&&u.tag!==27);return u||null}function EP(u,d,g,S,T){for(var D=d._reactName,k=[];g!==null&&g!==S;){var $=g,J=$.alternate,oe=$.stateNode;if($=$.tag,J!==null&&J===S)break;$!==5&&$!==26&&$!==27||oe===null||(J=oe,T?(oe=uv(g,D),oe!=null&&k.unshift(Gv(g,oe,J))):T||(oe=uv(g,D),oe!=null&&k.push(Gv(g,oe,J)))),g=g.return}k.length!==0&&u.push({event:d,listeners:k})}var YZ=/\r\n?/g,$Z=/\u0000|\uFFFD/g;function NP(u){return(typeof u=="string"?u:""+u).replace(YZ,`
9
+ `).replace($Z,"")}function LP(u,d){return d=NP(d),NP(u)===d}function Zt(u,d,g,S,T,D){switch(g){case"children":if(typeof S=="string")d==="body"||d==="textarea"&&S===""||wf(u,S);else if(typeof S=="number"||typeof S=="bigint")d!=="body"&&wf(u,""+S);else return;break;case"className":Qm(u,"class",S);break;case"tabIndex":Qm(u,"tabindex",S);break;case"dir":case"role":case"viewBox":case"width":case"height":Qm(u,g,S);break;case"style":DI(u,S,D);return;case"data":if(d!=="object"){Qm(u,"data",S);break}case"src":case"href":if(S===""&&(d!=="a"||g!=="href")){u.removeAttribute(g);break}if(S==null||typeof S=="function"||typeof S=="symbol"||typeof S=="boolean"){u.removeAttribute(g);break}S=Jm(S),u.setAttribute(g,S);break;case"action":case"formAction":if(typeof S=="function"){u.setAttribute(g,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof D=="function"&&(g==="formAction"?(d!=="input"&&Zt(u,d,"name",T.name,T,null),Zt(u,d,"formEncType",T.formEncType,T,null),Zt(u,d,"formMethod",T.formMethod,T,null),Zt(u,d,"formTarget",T.formTarget,T,null)):(Zt(u,d,"encType",T.encType,T,null),Zt(u,d,"method",T.method,T,null),Zt(u,d,"target",T.target,T,null)));if(S==null||typeof S=="symbol"||typeof S=="boolean"){u.removeAttribute(g);break}S=Jm(S),u.setAttribute(g,S);break;case"onClick":S!=null&&(u.onclick=Vi);return;case"onScroll":S!=null&&Mt("scroll",u);return;case"onScrollEnd":S!=null&&Mt("scrollend",u);return;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(n(61));if(g=S.__html,g!=null){if(T.children!=null)throw Error(n(60));D?.__html!==g&&(u.innerHTML=g)}}break;case"multiple":u.multiple=S&&typeof S!="function"&&typeof S!="symbol";break;case"muted":u.muted=S&&typeof S!="function"&&typeof S!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(S==null||typeof S=="function"||typeof S=="boolean"||typeof S=="symbol"){u.removeAttribute("xlink:href");break}g=Jm(S),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",g);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":S!=null&&typeof S!="function"&&typeof S!="symbol"?u.setAttribute(g,S):u.removeAttribute(g);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":S&&typeof S!="function"&&typeof S!="symbol"?u.setAttribute(g,""):u.removeAttribute(g);break;case"capture":case"download":S===!0?u.setAttribute(g,""):S!==!1&&S!=null&&typeof S!="function"&&typeof S!="symbol"?u.setAttribute(g,S):u.removeAttribute(g);break;case"cols":case"rows":case"size":case"span":S!=null&&typeof S!="function"&&typeof S!="symbol"&&!isNaN(S)&&1<=S?u.setAttribute(g,S):u.removeAttribute(g);break;case"rowSpan":case"start":S==null||typeof S=="function"||typeof S=="symbol"||isNaN(S)?u.removeAttribute(g):u.setAttribute(g,S);break;case"popover":Mt("beforetoggle",u),Mt("toggle",u),Km(u,"popover",S);break;case"xlinkActuate":jo(u,"http://www.w3.org/1999/xlink","xlink:actuate",S);break;case"xlinkArcrole":jo(u,"http://www.w3.org/1999/xlink","xlink:arcrole",S);break;case"xlinkRole":jo(u,"http://www.w3.org/1999/xlink","xlink:role",S);break;case"xlinkShow":jo(u,"http://www.w3.org/1999/xlink","xlink:show",S);break;case"xlinkTitle":jo(u,"http://www.w3.org/1999/xlink","xlink:title",S);break;case"xlinkType":jo(u,"http://www.w3.org/1999/xlink","xlink:type",S);break;case"xmlBase":jo(u,"http://www.w3.org/XML/1998/namespace","xml:base",S);break;case"xmlLang":jo(u,"http://www.w3.org/XML/1998/namespace","xml:lang",S);break;case"xmlSpace":jo(u,"http://www.w3.org/XML/1998/namespace","xml:space",S);break;case"is":Km(u,"is",S);break;case"innerText":case"textContent":return;default:if(!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")g=fX.get(g)||g,Km(u,g,S);else return}jt=!0}function uC(u,d,g,S,T,D){switch(g){case"style":DI(u,S,D);return;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(n(61));if(g=S.__html,g!=null){if(T.children!=null)throw Error(n(60));D?.__html!==g&&(u.innerHTML=g)}}break;case"children":if(typeof S=="string")wf(u,S);else if(typeof S=="number"||typeof S=="bigint")wf(u,""+S);else return;break;case"onScroll":S!=null&&Mt("scroll",u);return;case"onScrollEnd":S!=null&&Mt("scrollend",u);return;case"onClick":S!=null&&(u.onclick=Vi);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!mI.hasOwnProperty(g))e:{if(g[0]==="o"&&g[1]==="n"&&(T=g.endsWith("Capture"),D=g.slice(2,T?g.length-7:void 0),d=u[Jn]||null,d=d!=null?d[g]:null,typeof d=="function"&&u.removeEventListener(D,d,T),typeof S=="function")){typeof d!="function"&&d!==null&&(g in u?u[g]=null:u.hasAttribute(g)&&u.removeAttribute(g)),u.addEventListener(D,S,T);break e}jt=!0,g in u?u[g]=S:S===!0?u.setAttribute(g,""):Km(u,g,S)}return}jt=!0}function fn(u,d,g){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mt("error",u),Mt("load",u);var S=!1,T=!1,D;for(D in g)if(g.hasOwnProperty(D)){var k=g[D];if(k!=null)switch(D){case"src":S=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,d));default:Zt(u,d,D,k,g,null)}}T&&Zt(u,d,"srcSet",g.srcSet,g,null),S&&Zt(u,d,"src",g.src,g,null);return;case"input":Mt("invalid",u);var $=D=k=T=null,J=null,oe=null;for(S in g)if(g.hasOwnProperty(S)){var ve=g[S];if(ve!=null)switch(S){case"name":T=ve;break;case"type":k=ve;break;case"checked":J=ve;break;case"defaultChecked":oe=ve;break;case"value":D=ve;break;case"defaultValue":$=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(n(137,d));break;default:Zt(u,d,S,ve,g,null)}}wI(u,D,$,J,oe,k,T,!1);return;case"select":Mt("invalid",u),S=k=D=null;for(T in g)if(g.hasOwnProperty(T)&&($=g[T],$!=null))switch(T){case"value":D=$;break;case"defaultValue":k=$;break;case"multiple":S=$;default:Zt(u,d,T,$,g,null)}d=D,g=k,u.multiple=!!S,d!=null?_f(u,!!S,d,!1):g!=null&&_f(u,!!S,g,!0);return;case"textarea":Mt("invalid",u),D=T=S=null;for(k in g)if(g.hasOwnProperty(k)&&($=g[k],$!=null))switch(k){case"value":S=$;break;case"defaultValue":T=$;break;case"children":D=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(n(91));break;default:Zt(u,d,k,$,g,null)}TI(u,S,T,D);return;case"option":for(J in g)g.hasOwnProperty(J)&&(S=g[J],S!=null)&&(J==="selected"?u.selected=S&&typeof S!="function"&&typeof S!="symbol":Zt(u,d,J,S,g,null));return;case"dialog":Mt("beforetoggle",u),Mt("toggle",u),Mt("cancel",u),Mt("close",u);break;case"iframe":case"object":Mt("load",u);break;case"video":case"audio":for(S=0;S<Fv.length;S++)Mt(Fv[S],u);break;case"image":Mt("error",u),Mt("load",u);break;case"details":Mt("toggle",u);break;case"embed":case"source":case"link":Mt("error",u),Mt("load",u);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in g)if(g.hasOwnProperty(oe)&&(S=g[oe],S!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,d));default:Zt(u,d,oe,S,g,null)}return;default:if(f1(d)){for(ve in g)g.hasOwnProperty(ve)&&(S=g[ve],S!==void 0&&uC(u,d,ve,S,g,void 0));return}}for($ in g)g.hasOwnProperty($)&&(S=g[$],S!=null&&Zt(u,d,$,S,g,null))}var WZ={};function qZ(u,d,g,S){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,D=null,k=null,$=null,J=null,oe=null,ve=null;for(fe in g){var we=g[fe];if(g.hasOwnProperty(fe)&&we!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":J=we;default:S.hasOwnProperty(fe)||Zt(u,d,fe,null,S,we)}}for(var ne in S){var fe=S[ne];if(we=g[ne],S.hasOwnProperty(ne)&&(fe!=null||we!=null))switch(ne){case"type":fe!==we&&(jt=!0),D=fe;break;case"name":fe!==we&&(jt=!0),T=fe;break;case"checked":fe!==we&&(jt=!0),oe=fe;break;case"defaultChecked":fe!==we&&(jt=!0),ve=fe;break;case"value":fe!==we&&(jt=!0),k=fe;break;case"defaultValue":fe!==we&&(jt=!0),$=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(n(137,d));break;default:fe!==we&&Zt(u,d,ne,fe,S,we)}}u1(u,k,$,J,oe,ve,D,T);return;case"select":fe=k=$=ne=null;for(D in g)if(J=g[D],g.hasOwnProperty(D)&&J!=null)switch(D){case"value":break;case"multiple":fe=J;default:S.hasOwnProperty(D)||Zt(u,d,D,null,S,J)}for(T in S)if(D=S[T],J=g[T],S.hasOwnProperty(T)&&(D!=null||J!=null))switch(T){case"value":D!==J&&(jt=!0),ne=D;break;case"defaultValue":D!==J&&(jt=!0),$=D;break;case"multiple":D!==J&&(jt=!0),k=D;default:D!==J&&Zt(u,d,T,D,S,J)}d=$,g=k,S=fe,ne!=null?_f(u,!!g,ne,!1):!!S!=!!g&&(d!=null?_f(u,!!g,d,!0):_f(u,!!g,g?[]:"",!1));return;case"textarea":fe=ne=null;for($ in g)if(T=g[$],g.hasOwnProperty($)&&T!=null&&!S.hasOwnProperty($))switch($){case"value":break;case"children":break;default:Zt(u,d,$,null,S,T)}for(k in S)if(T=S[k],D=g[k],S.hasOwnProperty(k)&&(T!=null||D!=null))switch(k){case"value":T!==D&&(jt=!0),ne=T;break;case"defaultValue":T!==D&&(jt=!0),fe=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(n(91));break;default:T!==D&&Zt(u,d,k,T,S,D)}CI(u,ne,fe);return;case"option":for(var ke in g)ne=g[ke],g.hasOwnProperty(ke)&&ne!=null&&!S.hasOwnProperty(ke)&&(ke==="selected"?u.selected=!1:Zt(u,d,ke,null,S,ne));for(J in S)ne=S[J],fe=g[J],S.hasOwnProperty(J)&&ne!==fe&&(ne!=null||fe!=null)&&(J==="selected"?(ne!==fe&&(jt=!0),u.selected=ne&&typeof ne!="function"&&typeof ne!="symbol"):Zt(u,d,J,ne,S,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var We in g)ne=g[We],g.hasOwnProperty(We)&&ne!=null&&!S.hasOwnProperty(We)&&Zt(u,d,We,null,S,ne);for(oe in S)if(ne=S[oe],fe=g[oe],S.hasOwnProperty(oe)&&ne!==fe&&(ne!=null||fe!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(n(137,d));break;default:Zt(u,d,oe,ne,S,fe)}return;default:if(f1(d)){for(var mt in g)ne=g[mt],g.hasOwnProperty(mt)&&ne!==void 0&&!S.hasOwnProperty(mt)&&uC(u,d,mt,void 0,S,ne);for(ve in S)ne=S[ve],fe=g[ve],!S.hasOwnProperty(ve)||ne===fe||ne===void 0&&fe===void 0||uC(u,d,ve,ne,S,fe);return}}for(var ie in g)ne=g[ie],g.hasOwnProperty(ie)&&ne!=null&&!S.hasOwnProperty(ie)&&Zt(u,d,ie,null,S,ne);for(we in S)ne=S[we],fe=g[we],!S.hasOwnProperty(we)||ne===fe||ne==null&&fe==null||Zt(u,d,we,ne,S,fe)}function IP(u){switch(u){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XZ(){if(typeof performance.getEntriesByType=="function"){for(var u=0,d=0,g=performance.getEntriesByType("resource"),S=0;S<g.length;S++){var T=g[S],D=T.transferSize,k=T.initiatorType,$=T.duration;if(D&&$&&IP(k)){for(k=0,$=T.responseEnd,S+=1;S<g.length;S++){var J=g[S],oe=J.startTime;if(oe>$)break;var ve=J.transferSize,we=J.initiatorType;ve&&IP(we)&&(J=J.responseEnd,k+=ve*(J<$?1:($-oe)/(J-oe)))}if(--S,d+=8*(D+k)/(T.duration/1e3),u++,10<u)break}}if(0<u)return d/u/1e6}return navigator.connection&&(u=navigator.connection.downlink,typeof u=="number")?u:5}var cC=null,fC=null;function Hv(u){return u.nodeType===9?u:u.ownerDocument}function OP(u){switch(u){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kP(u,d){if(u===0)switch(d){case"svg":return 1;case"math":return 2;default:return 0}return u===1&&d==="foreignObject"?0:u}function PP(u,d,g,S){return g=Hv(g).createElement(u),g[on]=S,g[Jn]=d,fn(g,u,d),Kr(g),g}function hC(u,d){return u==="textarea"||u==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.children=="bigint"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var dC=null;function ZZ(){var u=window.event;return u&&u.type==="popstate"?u===dC?!1:(dC=u,!0):(dC=null,!1)}var vC=typeof setTimeout=="function"?setTimeout:void 0,KZ=typeof clearTimeout=="function"?clearTimeout:void 0,jP=typeof Promise=="function"?Promise:void 0,BP=typeof requestAnimationFrame=="function"?requestAnimationFrame:vC,QZ=typeof queueMicrotask=="function"?queueMicrotask:typeof jP<"u"?function(u){return jP.resolve(null).then(u).catch(JZ)}:vC;function JZ(u){setTimeout(function(){throw u})}function Ql(u){return u==="head"}function zP(u,d){var g=d,S=0;do{var T=g.nextSibling;if(u.removeChild(g),T&&T.nodeType===8)if(g=T.data,g==="/$"||g==="/&"){if(S===0){u.removeChild(T),oh(d);return}S--}else if(g==="$"||g==="$?"||g==="$~"||g==="$!"||g==="&")S++;else if(g==="html")_C(u.ownerDocument.documentElement);else if(g==="head"){g=u.ownerDocument.head,_C(g);for(var D=g.firstChild;D;){var k=D.nextSibling,$=D.nodeName;D[lv]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&D.rel.toLowerCase()==="stylesheet"||g.removeChild(D),D=k}}else g==="body"&&_C(u.ownerDocument.body);g=T}while(g);oh(d)}function VP(u,d){var g=u;u=0;do{var S=g.nextSibling;if(g.nodeType===1?d?(g._stashedDisplay=g.style.display,g.style.display="none"):(g.style.display=g._stashedDisplay||"",g.getAttribute("style")===""&&g.removeAttribute("style")):g.nodeType===3&&(d?(g._stashedText=g.nodeValue,g.nodeValue=""):g.nodeValue=g._stashedText||""),S&&S.nodeType===8)if(g=S.data,g==="/$"){if(u===0)break;u--}else g!=="$"&&g!=="$?"&&g!=="$~"&&g!=="$!"||u++;g=S}while(g)}function FP(u,d,g){if(d=CSS.escape(d)!==d?"r-"+btoa(d).replace(/=/g,""):d,u.style.viewTransitionName=d,g!=null&&(u.style.viewTransitionClass=g),g=getComputedStyle(u),g.display==="inline"){if(d=u.getClientRects(),d.length===1)var S=1;else for(var T=S=0;T<d.length;T++){var D=d[T];0<D.width&&0<D.height&&S++}S===1&&(u=u.style,u.display=d.length===1?"inline-block":"block",u.marginTop="-"+g.paddingTop,u.marginBottom="-"+g.paddingBottom)}}function GP(u,d){u=u.style,d=d.style;var g=d!=null?d.hasOwnProperty("viewTransitionName")?d.viewTransitionName:d.hasOwnProperty("view-transition-name")?d["view-transition-name"]:null:null;u.viewTransitionName=g==null||typeof g=="boolean"?"":(""+g).trim(),g=d!=null?d.hasOwnProperty("viewTransitionClass")?d.viewTransitionClass:d.hasOwnProperty("view-transition-class")?d["view-transition-class"]:null:null,u.viewTransitionClass=g==null||typeof g=="boolean"?"":(""+g).trim(),u.display==="inline-block"&&(d==null?u.display=u.margin="":(g=d.display,u.display=g==null||typeof g=="boolean"?"":g,g=d.margin,g!=null?u.margin=g:(g=d.hasOwnProperty("marginTop")?d.marginTop:d["margin-top"],u.marginTop=g==null||typeof g=="boolean"?"":g,d=d.hasOwnProperty("marginBottom")?d.marginBottom:d["margin-bottom"],u.marginBottom=d==null||typeof d=="boolean"?"":d)))}function eK(u,d,g){return g=g.ownerDocument.defaultView,{rect:u,abs:d.position==="absolute"||d.position==="fixed",clip:d.clipPath!=="none"||d.overflow!=="visible"||d.filter!=="none"||d.mask!=="none"||d.mask!=="none"||d.borderRadius!=="0px",view:0<=u.bottom&&0<=u.right&&u.top<=g.innerHeight&&u.left<=g.innerWidth}}function pC(u){var d=u.getBoundingClientRect(),g=getComputedStyle(u);return eK(d,g,u)}function tK(u){return u.documentElement.clientHeight}function rK(u){this.addEventListener("load",u),this.addEventListener("error",u)}function nK(u,d,g,S,T,D,k,$,J){var oe=d.nodeType===9?d:d.ownerDocument;try{var ve=oe.startViewTransition({update:function(){var ne=oe.defaultView,fe=ne.navigation&&ne.navigation.transition,ke=oe.fonts.status;S();var We=[];if(ke==="loaded"&&(tK(oe),oe.fonts.status==="loading"&&We.push(oe.fonts.ready)),ke=We.length,u!==null)for(var mt=u.suspenseyImages,ie=0,te=0;te<mt.length;te++){var le=mt[te];if(!le.complete){var Se=le.getBoundingClientRect();if(0<Se.bottom&&0<Se.right&&Se.top<ne.innerHeight&&Se.left<ne.innerWidth){if(ie+=uj(le),ie>s0){We.length=ke;break}le=new Promise(rK.bind(le)),We.push(le)}}}if(0<We.length)return ne=Promise.race([Promise.all(We),new Promise(function(He){return setTimeout(He,500)})]).then(T,T),(fe?Promise.allSettled([fe.finished,ne]):ne).then(D,D);if(T(),fe)return fe.finished.then(D,D);D()},types:g});oe.__reactViewTransition=ve;var we=[];return ve.ready.then(function(){for(var ne=oe.documentElement.getAnimations({subtree:!0}),fe=0;fe<ne.length;fe++){var ke=ne[fe],We=ke.effect,mt=We.pseudoElement;if(mt!=null&&mt.startsWith("::view-transition")){we.push(ke),ke=We.getKeyframes();for(var ie=mt=void 0,te=!0,le=0;le<ke.length;le++){var Se=ke[le],He=Se.width;if(mt===void 0)mt=He;else if(mt!==He){te=!1;break}if(He=Se.height,ie===void 0)ie=He;else if(ie!==He){te=!1;break}delete Se.width,delete Se.height,Se.transform==="none"&&delete Se.transform}te&&mt!==void 0&&ie!==void 0&&(We.setKeyframes(ke),te=getComputedStyle(We.target,We.pseudoElement),te.width!==mt||te.height!==ie)&&(te=ke[0],te.width=mt,te.height=ie,te=ke[ke.length-1],te.width=mt,te.height=ie,We.setKeyframes(ke))}}k()},function(ne){oe.__reactViewTransition===ve&&(oe.__reactViewTransition=null);try{typeof ne=="object"&&ne!==null&&ne.name==="InvalidStateError"&&(ne.message==="View transition was skipped because document visibility state is hidden."||ne.message==="Skipping view transition because document visibility state has become hidden."||ne.message==="Skipping view transition because viewport size changed."||ne.message==="Transition was aborted because of invalid state")&&(ne=null),ne!==null&&J(ne)}finally{S(),T(),k()}}),ve.finished.finally(function(){for(var ne=0;ne<we.length;ne++)we[ne].cancel();oe.__reactViewTransition===ve&&(oe.__reactViewTransition=null),$()}),ve}catch{return S(),T(),k(),null}}function Du(u,d){this._scope=document.documentElement,this._selector="::view-transition-"+u+"("+d+")"}Du.prototype.animate=function(u,d){return d=typeof d=="number"?{duration:d}:E({},d),d.pseudoElement=this._selector,this._scope.animate(u,d)},Du.prototype.getAnimations=function(){for(var u=this._scope,d=this._selector,g=u.getAnimations({subtree:!0}),S=[],T=0;T<g.length;T++){var D=g[T].effect;D!==null&&D.target===u&&D.pseudoElement===d&&S.push(g[T])}return S},Du.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function HP(u){return{name:u,group:new Du("group",u),imagePair:new Du("image-pair",u),old:new Du("old",u),new:new Du("new",u)}}function xa(u){this._fragmentFiber=u,this._observers=this._eventListeners=null}xa.prototype.addEventListener=function(u,d,g){var S=null,T=null;if(!(g!=null&&typeof g!="boolean"&&(S=g.signal||null,S!==null&&S.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var D=this._eventListeners;if(YP(D,u,d,g)===-1){var k=this,$=d;g!=null&&typeof g!="boolean"&&g.once===!0&&($=function(J){k.removeEventListener(u,d,g),typeof d=="function"?d.call(this,J):d.handleEvent(J)}),S!==null&&(T=k.removeEventListener.bind(k,u,d,g),S.addEventListener("abort",T,{once:!0}),T=S.removeEventListener.bind(S,"abort",T)),S=eh(g),D.push({type:u,listener:d,optionsOrUseCapture:g,attachedListener:$,cleanup:T}),h(this._fragmentFiber.child,!1,aK,u,$,S)}this._eventListeners=D}};function aK(u,d,g,S){return x(u).addEventListener(d,g,S),!1}xa.prototype.removeEventListener=function(u,d,g){var S=this._eventListeners;if(S!==null&&(d=YP(S,u,d,g),d!==-1)){var T=S[d];g=T.attachedListener;var D=T.cleanup;T=eh(T.optionsOrUseCapture),h(this._fragmentFiber.child,!1,iK,u,g,T),S.splice(d,1),D!==null&&D()}};function iK(u,d,g,S){return x(u).removeEventListener(d,g,S),!1}function eh(u){return u!=null&&typeof u!="boolean"&&(u.once===!0||u.signal instanceof AbortSignal)?{capture:u.capture,passive:u.passive}:u}function UP(u){return u==null?"c=0":typeof u=="boolean"?"c="+(u?"1":"0"):"c="+(u.capture?"1":"0")}function YP(u,d,g,S){if(u.length===0)return-1;S=UP(S);for(var T=0;T<u.length;T++){var D=u[T];if(D.type===d&&D.listener===g&&UP(D.optionsOrUseCapture)===S)return T}return-1}xa.prototype.dispatchEvent=function(u){var d=v(this._fragmentFiber);if(d===null)return!0;d=x(d);var g=this._eventListeners;if(g!==null&&0<g.length||!u.bubbles){var S=d.nodeType===9?d.createComment(""):document.createTextNode("");if(g)for(var T=0;T<g.length;T++){var D=g[T];S.addEventListener(D.type,D.attachedListener,eh(D.optionsOrUseCapture))}if(d.appendChild(S),u=S.dispatchEvent(u),g)for(T=0;T<g.length;T++)D=g[T],S.removeEventListener(D.type,D.attachedListener,eh(D.optionsOrUseCapture));return d.removeChild(S),u}return d.dispatchEvent(u)},xa.prototype.focus=function(u){h(this._fragmentFiber.child,!0,$P,u,void 0,void 0)};function $P(u,d){return u.tag===6?!1:(u=x(u),mK(u,d))}xa.prototype.focusLast=function(u){var d=[];h(this._fragmentFiber.child,!0,gC,d,void 0,void 0);for(var g=d.length-1;0<=g&&!$P(d[g],u);g--);};function gC(u,d){return d.push(u),!1}xa.prototype.blur=function(){var u=v(this._fragmentFiber);u!==null&&(u=x(u),u=Hv(u).activeElement,u!==null&&h(this._fragmentFiber.child,!1,oK,u,void 0,void 0))};function oK(u,d){return u.tag===6?!1:(u=x(u),u===d||u.contains(d)?(d.blur(),!0):!1)}xa.prototype.observeUsing=function(u){this._observers===null&&(this._observers=new Set),this._observers.add(u),h(this._fragmentFiber.child,!1,lK,u,void 0,void 0)};function lK(u,d){return u.tag===6||(u=x(u),d.observe(u)),!1}xa.prototype.unobserveUsing=function(u){var d=this._observers;if(d!==null&&d.has(u)){d.delete(u),h(this._fragmentFiber.child,!1,sK,u,void 0,void 0);for(var g=d=0;g<Si.length;g++){var S=Si[g];S.fragmentInstance===this&&S.observer===u?u.unobserve(S.instance):Si[d++]=S}Si.length=d}};function sK(u,d){return u.tag===6||(u=x(u),d.unobserve(u)),!1}var Si=[],mC=!1;function uK(u,d,g){Si.push({fragmentInstance:u,observer:d,instance:g}),mC||(mC=!0,yK(function(){mC=!1;var S=Si;Si=[];for(var T=0;T<S.length;T++){var D=S[T];D.observer.unobserve(D.instance)}}))}xa.prototype.getClientRects=function(){var u=[];return h(this._fragmentFiber.child,!1,cK,u,void 0,void 0),u};function cK(u,d){if(u.tag===6){u=u.stateNode;var g=u.ownerDocument.createRange();g.selectNodeContents(u),d.push.apply(d,g.getClientRects())}else u=x(u),d.push.apply(d,u.getClientRects());return!1}xa.prototype.getRootNode=function(u){var d=v(this._fragmentFiber);return d===null?this:x(d).getRootNode(u)},xa.prototype.compareDocumentPosition=function(u){var d=v(this._fragmentFiber);if(d===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var g=[];h(this._fragmentFiber.child,!1,gC,g,void 0,void 0);var S=x(d);if(g.length===0){if(g=S,p(this._fragmentFiber)){e:{for(d=this._fragmentFiber.return;d!==null;){if(d.tag===4){d=d.stateNode.containerInfo;break e}if(d.tag===3||d.tag===5||d.tag===27)break;d=d.return}d=null}d!=null&&(g=d)}d=this._fragmentFiber;var T=S=g.compareDocumentPosition(u);return g===u?T=Node.DOCUMENT_POSITION_CONTAINS:S&Node.DOCUMENT_POSITION_CONTAINED_BY&&(g=m(d)[1],g===null?T=Node.DOCUMENT_POSITION_PRECEDING:(u=x(g).compareDocumentPosition(u),T=u===0||u&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),T|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}d=x(g[0]),T=x(g[g.length-1]);var D=p(this._fragmentFiber)?d.parentElement:S;if(D==null)return Node.DOCUMENT_POSITION_DISCONNECTED;S=D.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY,D=D.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_CONTAINED_BY;var k=d.compareDocumentPosition(u),$=T.compareDocumentPosition(u),J=k&Node.DOCUMENT_POSITION_CONTAINED_BY||$&Node.DOCUMENT_POSITION_CONTAINED_BY;return $=S&&D&&k&Node.DOCUMENT_POSITION_FOLLOWING&&$&Node.DOCUMENT_POSITION_PRECEDING,d=S&&d===u||D&&T===u||J||$?Node.DOCUMENT_POSITION_CONTAINED_BY:!S&&d===u||!D&&T===u?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:k,d&Node.DOCUMENT_POSITION_DISCONNECTED||d&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||fK(d,this._fragmentFiber,g[0],g[g.length-1],u)?d:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function fK(u,d,g,S,T){var D=ou(T);if(u&Node.DOCUMENT_POSITION_CONTAINED_BY){if(g=!!D)e:{for(;D!==null;){if(D.tag===7&&(D===d||D.alternate===d)){g=!0;break e}D=D.return}g=!1}return g}if(u&Node.DOCUMENT_POSITION_CONTAINS){if(D===null)return D=T.ownerDocument,T===D||T===D.documentElement||T===D.body;e:{for(D=d,d=v(d);D!==null;){if(!(D.tag!==5&&D.tag!==3&&D.tag!==27||D!==d&&D.alternate!==d)){D=!0;break e}D=D.return}D=!1}return D}return u&Node.DOCUMENT_POSITION_PRECEDING?((d=!!D)&&!(d=D===g)&&(d=R(g,D,M),d===null?d=!1:(h(d,!0,C,D,g),D=b,b=null,d=D!==null)),d):u&Node.DOCUMENT_POSITION_FOLLOWING?((d=!!D)&&!(d=D===S)&&(d=R(S,D,M),d===null?d=!1:(h(d,!0,A,D,S),D=b,w=b=null,d=D!==null)),d):!1}function WP(u,d){var g=u.ownerDocument.createRange();g.selectNodeContents(u),u=g.getBoundingClientRect(),window.scrollTo(window.scrollX+u.left,d?window.scrollY+u.top:window.scrollY+u.bottom-window.innerHeight)}xa.prototype.scrollIntoView=function(u){if(typeof u=="object")throw Error(n(566));var d=[];h(this._fragmentFiber.child,!1,gC,d,void 0,void 0);var g=u!==!1;if(d.length===0){var S=m(this._fragmentFiber);if(S=g?S[1]||S[0]||v(this._fragmentFiber):S[0]||S[1],S===null)return;if(S.tag===6){u=x(S),WP(u,g);return}if(S=x(S),S.nodeType!==9){if(S.nodeType===11){g="host"in S?S.host:null,g!==null&&g.scrollIntoView(u);return}S.scrollIntoView(u)}}for(S=g?d.length-1:0;S!==(g?-1:d.length);){var T=d[S];T.tag===6?(T=x(T),WP(T,g)):x(T).scrollIntoView(u),S+=g?-1:1}};function hK(u,d){return u=x(u),qP(u,d),!1}function qP(u,d){u.reactFragments==null&&(u.reactFragments=new Set),u.reactFragments.add(d)}function XP(u,d){var g=d._eventListeners;if(g!==null)for(var S=0;S<g.length;S++){var T=g[S];u.addEventListener(T.type,T.attachedListener,eh(T.optionsOrUseCapture))}u.nodeType!==3&&(g=d._observers,g!==null&&g.forEach(function(D){for(var k=0,$=0;$<Si.length;$++){var J=Si[$];(J.fragmentInstance!==d||J.observer!==D||J.instance!==u)&&(Si[k++]=J)}Si.length=k,D.observe(u)}),qP(u,d))}function dK(u,d){var g=d._eventListeners;if(g!==null)for(var S=0;S<g.length;S++){var T=g[S];u.removeEventListener(T.type,T.attachedListener,eh(T.optionsOrUseCapture))}u.nodeType!==3&&(g=d._observers,g!==null&&g.forEach(function(D){typeof D.rootMargin=="string"?uK(d,D,u):D.unobserve(u)}),u.reactFragments!=null&&u.reactFragments.delete(d))}function yC(u){var d=u.firstChild;for(d&&d.nodeType===10&&(d=d.nextSibling);d;){var g=d;switch(d=d.nextSibling,g.nodeName){case"HTML":case"HEAD":case"BODY":yC(g),Zm(g);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(g.rel.toLowerCase()==="stylesheet")continue}u.removeChild(g)}}function vK(u,d,g,S){for(;u.nodeType===1;){var T=g;if(u.nodeName.toLowerCase()!==d.toLowerCase()){if(!S&&(u.nodeName!=="INPUT"||u.type!=="hidden"))break}else if(S){if(!u[lv])switch(d){case"meta":if(!u.hasAttribute("itemprop"))break;return u;case"link":if(D=u.getAttribute("rel"),D==="stylesheet"&&u.hasAttribute("data-precedence"))break;if(D!==T.rel||u.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||u.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||u.getAttribute("title")!==(T.title==null?null:T.title))break;return u;case"style":if(u.hasAttribute("data-precedence"))break;return u;case"script":if(D=u.getAttribute("src"),(D!==(T.src==null?null:T.src)||u.getAttribute("type")!==(T.type==null?null:T.type)||u.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&D&&u.hasAttribute("async")&&!u.hasAttribute("itemprop"))break;return u;default:return u}}else if(d==="input"&&u.type==="hidden"){var D=T.name==null?null:""+T.name;if(T.type==="hidden"&&u.getAttribute("name")===D)return u}else return u;if(u=Ba(u.nextSibling),u===null)break}return null}function pK(u,d,g){if(d==="")return null;for(;u.nodeType!==3;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!g||(u=Ba(u.nextSibling),u===null))return null;return u}function ZP(u,d){for(;u.nodeType!==8;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!d||(u=Ba(u.nextSibling),u===null))return null;return u}function xC(u){return u.data==="$?"||u.data==="$~"}function SC(u){return u.data==="$!"||u.data==="$?"&&u.ownerDocument.readyState!=="loading"}function gK(u,d){var g=u.ownerDocument;if(u.data==="$~")u._reactRetry=d;else if(u.data!=="$?"||g.readyState!=="loading")d();else{var S=function(){d(),g.removeEventListener("DOMContentLoaded",S)};g.addEventListener("DOMContentLoaded",S),u._reactRetry=S}}function Ba(u){for(;u!=null;u=u.nextSibling){var d=u.nodeType;if(d===1||d===3)break;if(d===8){if(d=u.data,d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"||d==="F!"||d==="F")break;if(d==="/$"||d==="/&")return null}}return u}var bC=null;function KP(u){u=u.nextSibling;for(var d=0;u;){if(u.nodeType===8){var g=u.data;if(g==="/$"||g==="/&"){if(d===0)return Ba(u.nextSibling);d--}else g!=="$"&&g!=="$!"&&g!=="$?"&&g!=="$~"&&g!=="&"||d++}u=u.nextSibling}return null}function QP(u){u=u.previousSibling;for(var d=0;u;){if(u.nodeType===8){var g=u.data;if(g==="$"||g==="$!"||g==="$?"||g==="$~"||g==="&"){if(d===0)return u;d--}else g!=="/$"&&g!=="/&"||d++}u=u.previousSibling}return null}function mK(u,d){function g(){S=!0}if(u.ownerDocument.activeElement===u)return!0;var S=!1;try{u.ownerDocument.addEventListener("focus",g,!0),(u.focus||HTMLElement.prototype.focus).call(u,d)}finally{u.ownerDocument.removeEventListener("focus",g,!0)}return S}function yK(u){BP(function(){BP(function(d){return u(d)})})}function JP(u,d,g){switch(d=Hv(g),u){case"html":if(u=d.documentElement,!u)throw Error(n(452));return u;case"head":if(u=d.head,!u)throw Error(n(453));return u;case"body":if(u=d.body,!u)throw Error(n(454));return u;default:throw Error(n(451))}}function ej(u,d,g){for(var S in g){var T=g[S];g.hasOwnProperty(S)&&T!=null&&Zt(u,d,S,null,WZ,T)}g.dangerouslySetInnerHTML!=null&&(u.textContent=""),u.onclick===Vi&&(u.onclick=null),Zm(u)}function _C(u){for(var d=u.attributes;d.length;)u.removeAttributeNode(d[0]);Zm(u)}var za=new Map,tj=new Set;function Uv(u){if(typeof u.getRootNode=="function"){var d=u.getRootNode();if(d.nodeType===9||d.nodeType===11)return d}return u.nodeType===9?u:u.ownerDocument}var Zo=ye.d;ye.d={f:xK,r:SK,D:bK,C:_K,L:wK,m:CK,X:AK,S:TK,M:DK};function xK(){var u=Zo.f(),d=Jy();return u||d}function SK(u){var d=xf(u);d!==null&&d.tag===5&&d.type==="form"?nk(d):Zo.r(u)}var th=typeof document>"u"?null:document;function rj(u,d,g){var S=th;if(S&&typeof d=="string"&&d){var T=Na(d);T='link[rel="'+u+'"][href="'+T+'"]',typeof g=="string"&&(T+='[crossorigin="'+g+'"]'),tj.has(T)||(tj.add(T),u={rel:u,crossOrigin:g,href:d},S.querySelector(T)===null&&(d=S.createElement("link"),fn(d,"link",u),Kr(d),S.head.appendChild(d)))}}function bK(u){Zo.D(u),rj("dns-prefetch",u,null)}function _K(u,d){Zo.C(u,d),rj("preconnect",u,d)}function wK(u,d,g){Zo.L(u,d,g);var S=th;if(S&&u&&d){var T='link[rel="preload"][as="'+Na(d)+'"]';d==="image"&&g&&g.imageSrcSet?(T+='[imagesrcset="'+Na(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(T+='[imagesizes="'+Na(g.imageSizes)+'"]')):T+='[href="'+Na(u)+'"]';var D=T;switch(d){case"style":D=rh(u);break;case"script":D=nh(u)}if(!(za.has(D)||(u=E({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:u,as:d},g),za.set(D,u),S.querySelector(T)!==null||d==="style"&&S.querySelector(Yv(D))||d==="script"&&S.querySelector($v(D))))){var k=S.createElement("link");fn(k,"link",u),d==="style"&&(k[Xm]=!0,k.onload=k.onerror=function(){pI(k)}),Kr(k),S.head.appendChild(k)}}}function CK(u,d){Zo.m(u,d);var g=th;if(g&&u){var S=d&&typeof d.as=="string"?d.as:"script",T='link[rel="modulepreload"][as="'+Na(S)+'"][href="'+Na(u)+'"]',D=T;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=nh(u)}if(!za.has(D)&&(u=E({rel:"modulepreload",href:u},d),za.set(D,u),g.querySelector(T)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector($v(D)))return}S=g.createElement("link"),fn(S,"link",u),Kr(S),g.head.appendChild(S)}}}function TK(u,d,g){Zo.S(u,d,g);var S=th;if(S&&u){var T=Sf(S).hoistableStyles,D=rh(u);d=d||"default";var k=T.get(D);if(!k){var $={loading:0,preload:null};if(k=S.querySelector(Yv(D)))$.loading=5;else{u=E({rel:"stylesheet",href:u,"data-precedence":d},g),(g=za.get(D))&&wC(u,g);var J=k=S.createElement("link");Kr(J),fn(J,"link",u),J._p=new Promise(function(oe,ve){J.onload=oe,J.onerror=ve}),J.addEventListener("load",function(){$.loading|=1}),J.addEventListener("error",function(){$.loading|=2}),$.loading|=4,o0(k,d,S)}k={type:"stylesheet",instance:k,count:1,state:$},T.set(D,k)}}}function AK(u,d){Zo.X(u,d);var g=th;if(g&&u){var S=Sf(g).hoistableScripts,T=nh(u),D=S.get(T);D||(D=g.querySelector($v(T)),D||(u=E({src:u,async:!0},d),(d=za.get(T))&&CC(u,d),D=g.createElement("script"),Kr(D),fn(D,"link",u),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(T,D))}}function DK(u,d){Zo.M(u,d);var g=th;if(g&&u){var S=Sf(g).hoistableScripts,T=nh(u),D=S.get(T);D||(D=g.querySelector($v(T)),D||(u=E({src:u,async:!0,type:"module"},d),(d=za.get(T))&&CC(u,d),D=g.createElement("script"),Kr(D),fn(D,"link",u),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(T,D))}}function nj(u,d,g,S){var T=(T=Ce.current)?Uv(T):null;if(!T)throw Error(n(446));switch(u){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(g=rh(g.href),d=Sf(T).hoistableStyles,S=d.get(g),S||(S={type:"style",instance:null,count:0,state:null},d.set(g,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){u=rh(g.href);var D=Sf(T).hoistableStyles,k=D.get(u);if(k||(T=T.ownerDocument||T,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(u,k),(D=T.querySelector(Yv(u)))?D._p||(k.instance=D,k.state.loading=5):(D=za.get(u),D||(D={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},za.set(u,D)),MK(T,u,D,k.state))),d&&S===null)throw Error(n(528,""));return k}if(d&&S!==null)throw Error(n(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(g=nh(g),d=Sf(T).hoistableScripts,S=d.get(g),S||(S={type:"script",instance:null,count:0,state:null},d.set(g,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,u))}}function rh(u){return'href="'+Na(u)+'"'}function Yv(u){return'link[rel="stylesheet"]['+u+"]"}function aj(u){return E({},u,{"data-precedence":u.precedence,precedence:null})}function MK(u,d,g,S){if(d=u.querySelector('link[rel="preload"][as="style"]['+d+"]")){if(d[Xm]!==!0){S.loading=1;return}}else d=u.createElement("link"),d[Xm]=!0,d.onload=d.onerror=pI.bind(null,d),fn(d,"link",g),Kr(d),u.head.appendChild(d);S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2})}function nh(u){return'[src="'+Na(u)+'"]'}function $v(u){return"script[async]"+u}function ij(u,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=u.querySelector('style[data-href~="'+Na(g.href)+'"]');if(S)return d.instance=S,Kr(S),S;var T=E({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(u.ownerDocument||u).createElement("style"),Kr(S),fn(S,"style",T),o0(S,g.precedence,u),d.instance=S;case"stylesheet":T=rh(g.href);var D=u.querySelector(Yv(T));if(D)return d.state.loading|=4,d.instance=D,Kr(D),D;S=aj(g),(T=za.get(T))&&wC(S,T),D=(u.ownerDocument||u).createElement("link"),Kr(D);var k=D;return k._p=new Promise(function($,J){k.onload=$,k.onerror=J}),fn(D,"link",S),d.state.loading|=4,o0(D,g.precedence,u),d.instance=D;case"script":return D=nh(g.src),(T=u.querySelector($v(D)))?(d.instance=T,Kr(T),T):(S=g,(T=za.get(D))&&(S=E({},g),CC(S,T)),u=u.ownerDocument||u,T=u.createElement("script"),Kr(T),fn(T,"link",S),u.head.appendChild(T),d.instance=T);case"void":return null;default:throw Error(n(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,o0(S,g.precedence,u));return d.instance}function o0(u,d,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=S.length?S[S.length-1]:null,D=T,k=0;k<S.length;k++){var $=S[k];if($.dataset.precedence===d)D=$;else if(D!==T)break}D?D.parentNode.insertBefore(u,D.nextSibling):(d=g.nodeType===9?g.head:g,d.insertBefore(u,d.firstChild))}function wC(u,d){u.crossOrigin==null&&(u.crossOrigin=d.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=d.referrerPolicy),u.title==null&&(u.title=d.title)}function CC(u,d){u.crossOrigin==null&&(u.crossOrigin=d.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=d.referrerPolicy),u.integrity==null&&(u.integrity=d.integrity)}var l0=null;function oj(u,d,g){if(l0===null){var S=new Map,T=l0=new Map;T.set(g,S)}else T=l0,S=T.get(g),S||(S=new Map,T.set(g,S));if(S.has(u))return S;for(S.set(u,null),g=g.getElementsByTagName(u),T=0;T<g.length;T++){var D=g[T];if(!(D[lv]||D[on]||u==="link"&&D.getAttribute("rel")==="stylesheet")&&D.namespaceURI!=="http://www.w3.org/2000/svg"){var k=D.getAttribute(d)||"";k=u+k;var $=S.get(k);$?$.push(D):S.set(k,[D])}}return S}function TC(u,d,g){u=u.ownerDocument||u,u.head.insertBefore(g,d==="title"?u.querySelector("head > title"):null)}function RK(u,d,g){if(g===1||d.itemProp!=null)return!1;switch(u){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;return d.rel==="stylesheet"?(u=d.disabled,typeof d.precedence=="string"&&u==null):!0;case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function lj(u,d){return u==="img"&&d.src!=null&&d.src!==""&&d.onLoad==null&&d.loading!=="lazy"}function sj(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}function uj(u){return(u.width||100)*(u.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function cj(u,d){typeof d.decode=="function"&&(u.imgCount++,d.complete||(u.imgBytes+=uj(d),u.suspenseyImages.push(d)),u=LK.bind(u),d.decode().then(u,u))}function EK(u,d,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var T=rh(S.href),D=d.querySelector(Yv(T));if(D){d=D._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(u.count++,u=Wv.bind(u),d.then(u,u)),g.state.loading|=4,g.instance=D,Kr(D);return}D=d.ownerDocument||d,S=aj(S),(T=za.get(T))&&wC(S,T),D=D.createElement("link"),Kr(D);var k=D;k._p=new Promise(function($,J){k.onload=$,k.onerror=J}),fn(D,"link",S),g.instance=D}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(u.count++,g=Wv.bind(u),d.addEventListener("load",g),d.addEventListener("error",g))}}var s0=0;function NK(u,d){return u.stylesheets&&u.count===0&&c0(u,u.stylesheets),0<u.count||0<u.imgCount?function(g){var S=setTimeout(function(){if(u.stylesheets&&c0(u,u.stylesheets),u.unsuspend){var D=u.unsuspend;u.unsuspend=null,D()}},6e4+d);0<u.imgBytes&&s0===0&&(s0=62500*XZ());var T=setTimeout(function(){if(u.waitingForImages=!1,u.count===0&&(u.stylesheets&&c0(u,u.stylesheets),u.unsuspend)){var D=u.unsuspend;u.unsuspend=null,D()}},(u.imgBytes>s0?50:800)+d);return u.unsuspend=g,function(){u.unsuspend=null,clearTimeout(S),clearTimeout(T)}}:null}function fj(u){if(u.count===0&&(u.imgCount===0||!u.waitingForImages)){if(u.stylesheets)c0(u,u.stylesheets);else if(u.unsuspend){var d=u.unsuspend;u.unsuspend=null,d()}}}function Wv(){this.count--,fj(this)}function LK(){this.imgCount--,fj(this)}var u0=null;function c0(u,d){u.stylesheets=null,u.unsuspend!==null&&(u.count++,u0=new Map,d.forEach(IK,u),u0=null,Wv.call(u))}function IK(u,d){if(!(d.state.loading&4)){var g=u0.get(u);if(g)var S=g.get(null);else{g=new Map,u0.set(u,g);for(var T=u.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D<T.length;D++){var k=T[D];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(g.set(k.dataset.precedence,k),S=k)}S&&g.set(null,S)}T=d.instance,k=T.getAttribute("data-precedence"),D=g.get(k)||S,D===S&&g.set(null,T),g.set(k,T),this.count++,S=Wv.bind(this),T.addEventListener("load",S),T.addEventListener("error",S),D?D.parentNode.insertBefore(T,D.nextSibling):(u=u.nodeType===9?u.head:u,u.insertBefore(T,u.firstChild)),d.state.loading|=4}}var ah={$$typeof:H,Provider:null,Consumer:null,_currentValue:nt,_currentValue2:nt,_threadCount:0};function OK(u,d,g,S,T,D,k,$,J){this.tag=1,this.containerInfo=u,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=i1(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=i1(0),this.hiddenUpdates=i1(null),this.identifierPrefix=S,this.onUncaughtError=T,this.onCaughtError=D,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.transitionTypes=null,this.incompleteTransitions=new Map}function hj(u,d,g,S,T,D,k,$,J,oe,ve,we){return u=new OK(u,d,g,k,J,oe,ve,we,$),d=1,D===!0&&(d|=24),D=ea(3,null,null,d),u.current=D,D.stateNode=u,d=V1(),d.refCount++,u.pooledCache=d,d.refCount++,D.memoizedState={element:S,isDehydrated:g,cache:d},U1(D),u}function dj(u){return u?(u=Ef,u):Ef}function vj(u,d,g,S,T,D){T=dj(T),S.context===null?S.context=T:S.pendingContext=T,S=Vl(d),S.payload={element:g},D=D===void 0?null:D,D!==null&&(S.callback=D),g=Fl(u,S,d),g!==null&&(aa(g,u,d),Cv(g,u,d))}function pj(u,d){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var g=u.retryLane;u.retryLane=g!==0&&g<d?g:d}}function AC(u,d){pj(u,d),(u=u.alternate)&&pj(u,d)}function gj(u){if(u.tag===13||u.tag===31){var d=cu(u,67108864);d!==null&&aa(d,u,67108864),AC(u,67108864)}}function mj(u){if(u.tag===13||u.tag===31){var d=ya();d=o1(d);var g=cu(u,d);g!==null&&aa(g,u,d),AC(u,d)}}var ih=!0;function kK(u,d,g,S){var T=ae.T;ae.T=null;var D=ye.p;try{ye.p=2,DC(u,d,g,S)}finally{ye.p=D,ae.T=T}}function PK(u,d,g,S){var T=ae.T;ae.T=null;var D=ye.p;try{ye.p=8,DC(u,d,g,S)}finally{ye.p=D,ae.T=T}}function DC(u,d,g,S){if(ih){var T=MC(S);if(T===null)sC(u,d,S,f0,g),xj(u,S);else if(BK(T,u,d,g,S))S.stopPropagation();else if(xj(u,S),d&4&&-1<jK.indexOf(u)){for(;T!==null;){var D=xf(T);if(D!==null)switch(D.tag){case 3:if(D=D.stateNode,D.current.memoizedState.isDehydrated){var k=iu(D.pendingLanes);if(k!==0){var $=D;for($.pendingLanes|=2,$.entangledLanes|=2;k;){var J=1<<31-cr(k);$.entanglements[1]|=J,k&=~J}Zi(D),(Ft&6)===0&&(Zy=_n()+500,Vv(0))}}break;case 31:case 13:$=cu(D,2),$!==null&&aa($,D,2),Jy(),AC(D,2)}if(D=MC(S),D===null&&sC(u,d,S,f0,g),D===T)break;T=D}T!==null&&S.stopPropagation()}else sC(u,d,S,null,g)}}function MC(u){return u=d1(u),RC(u)}var f0=null;function RC(u){if(f0=null,u=ou(u),u!==null){var d=i(u);if(d===null)u=null;else{var g=d.tag;if(g===13){if(u=o(d),u!==null)return u;u=null}else if(g===31){if(u=l(d),u!==null)return u;u=null}else if(g===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;u=null}else d!==u&&(u=null)}}return f0=u,null}function yj(u){switch(u){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Wm()){case tv:return 2;case rv:return 8;case ru:case mf:return 32;case nu:return 268435456;default:return 32}default:return 32}}var EC=!1,Jl=null,es=null,ts=null,qv=new Map,Xv=new Map,rs=[],jK="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function xj(u,d){switch(u){case"focusin":case"focusout":Jl=null;break;case"dragenter":case"dragleave":es=null;break;case"mouseover":case"mouseout":ts=null;break;case"pointerover":case"pointerout":qv.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xv.delete(d.pointerId)}}function Zv(u,d,g,S,T,D){return u===null||u.nativeEvent!==D?(u={blockedOn:d,domEventName:g,eventSystemFlags:S,nativeEvent:D,targetContainers:[T]},d!==null&&(d=xf(d),d!==null&&gj(d)),u):(u.eventSystemFlags|=S,d=u.targetContainers,T!==null&&d.indexOf(T)===-1&&d.push(T),u)}function BK(u,d,g,S,T){switch(d){case"focusin":return Jl=Zv(Jl,u,d,g,S,T),!0;case"dragenter":return es=Zv(es,u,d,g,S,T),!0;case"mouseover":return ts=Zv(ts,u,d,g,S,T),!0;case"pointerover":var D=T.pointerId;return qv.set(D,Zv(qv.get(D)||null,u,d,g,S,T)),!0;case"gotpointercapture":return D=T.pointerId,Xv.set(D,Zv(Xv.get(D)||null,u,d,g,S,T)),!0}return!1}function Sj(u){var d=ou(u.target);if(d!==null){var g=i(d);if(g!==null){if(d=g.tag,d===13){if(d=o(g),d!==null){u.blockedOn=d,hI(u.priority,function(){mj(g)});return}}else if(d===31){if(d=l(g),d!==null){u.blockedOn=d,hI(u.priority,function(){mj(g)});return}}else if(d===3&&g.stateNode.current.memoizedState.isDehydrated){u.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}u.blockedOn=null}function h0(u){if(u.blockedOn!==null)return!1;for(var d=u.targetContainers;0<d.length;){var g=MC(u.nativeEvent);if(g===null){g=u.nativeEvent;var S=new g.constructor(g.type,g);h1=S,g.target.dispatchEvent(S),h1=null}else return d=xf(g),d!==null&&gj(d),u.blockedOn=g,!1;d.shift()}return!0}function bj(u,d,g){h0(u)&&g.delete(d)}function zK(){EC=!1,Jl!==null&&h0(Jl)&&(Jl=null),es!==null&&h0(es)&&(es=null),ts!==null&&h0(ts)&&(ts=null),qv.forEach(bj),Xv.forEach(bj)}function d0(u,d){u.blockedOn===d&&(u.blockedOn=null,EC||(EC=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,zK)))}var v0=null;function _j(u){v0!==u&&(v0=u,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){v0===u&&(v0=null);for(var d=0;d<u.length;d+=3){var g=u[d],S=u[d+1],T=u[d+2];if(typeof S!="function"){if(RC(S||g)===null)continue;break}var D=xf(g);D!==null&&(u.splice(d,3),d-=3,fw(D,{pending:!0,data:T,method:g.method,action:S},S,T))}}))}function oh(u){function d(J){return d0(J,u)}Jl!==null&&d0(Jl,u),es!==null&&d0(es,u),ts!==null&&d0(ts,u),qv.forEach(d),Xv.forEach(d);for(var g=0;g<rs.length;g++){var S=rs[g];S.blockedOn===u&&(S.blockedOn=null)}for(;0<rs.length&&(g=rs[0],g.blockedOn===null);)Sj(g),g.blockedOn===null&&rs.shift();if(g=(u.ownerDocument||u).$$reactFormReplay,g!=null)for(S=0;S<g.length;S+=3){var T=g[S],D=g[S+1],k=T[Jn]||null;if(typeof D=="function")k||_j(g);else if(k){var $=null;if(D&&D.hasAttribute("formAction")){if(T=D,k=D[Jn]||null)$=k.formAction;else if(RC(T)!==null)continue}else $=k.action;typeof $=="function"?g[S+1]=$:(g.splice(S,3),S-=3),_j(g)}}}function wj(){function u(D){D.canIntercept&&D.info==="react-transition"&&D.intercept({handler:function(){return new Promise(function(k){return T=k})},focusReset:"manual",scroll:"manual"})}function d(){T!==null&&(T(),T=null),S||setTimeout(g,20)}function g(){if(!S&&!navigation.transition){var D=navigation.currentEntry;D&&D.url!=null&&navigation.navigate(D.url,{state:D.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var S=!1,T=null;return navigation.addEventListener("navigate",u),navigation.addEventListener("navigatesuccess",d),navigation.addEventListener("navigateerror",d),setTimeout(g,100),function(){S=!0,navigation.removeEventListener("navigate",u),navigation.removeEventListener("navigatesuccess",d),navigation.removeEventListener("navigateerror",d),T!==null&&(T(),T=null)}}}function NC(u){this._internalRoot=u}p0.prototype.render=NC.prototype.render=function(u){var d=this._internalRoot;if(d===null)throw Error(n(409));var g=d.current,S=ya();vj(g,S,u,d,null,null)},p0.prototype.unmount=NC.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var d=u.containerInfo;vj(u.current,2,null,u,null,null),Jy(),d[yf]=null}};function p0(u){this._internalRoot=u}p0.prototype.unstable_scheduleHydration=function(u){if(u){var d=fI();u={blockedOn:null,target:u,priority:d};for(var g=0;g<rs.length&&d!==0&&d<rs[g].priority;g++);rs.splice(g,0,u),g===0&&Sj(u)}};var Cj=t.version;if(Cj!=="19.3.1")throw Error(n(527,Cj,"19.3.1"));ye.findDOMNode=function(u){var d=u._reactInternals;if(d===void 0)throw typeof u.render=="function"?Error(n(188)):(u=Object.keys(u).join(","),Error(n(268,u)));return u=c(d),u=u!==null?f(u):null,u=u===null?null:u.stateNode,u};var VK={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g0.isDisabled&&g0.supportsFiber)try{ji=g0.inject(VK),pr=g0}catch{}}return Qv.createRoot=function(u,d){if(!a(u))throw Error(n(299));var g=!1,S="",T=dk,D=vk,k=pk;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(S=d.identifierPrefix),d.onUncaughtError!==void 0&&(T=d.onUncaughtError),d.onCaughtError!==void 0&&(D=d.onCaughtError),d.onRecoverableError!==void 0&&(k=d.onRecoverableError)),d=hj(u,1,!1,null,null,g,S,null,T,D,k,wj),u[yf]=d.current,lC(u),new NC(d)},Qv.hydrateRoot=function(u,d,g){if(!a(u))throw Error(n(299));var S=!1,T="",D=dk,k=vk,$=pk,J=null;return g!=null&&(g.unstable_strictMode===!0&&(S=!0),g.identifierPrefix!==void 0&&(T=g.identifierPrefix),g.onUncaughtError!==void 0&&(D=g.onUncaughtError),g.onCaughtError!==void 0&&(k=g.onCaughtError),g.onRecoverableError!==void 0&&($=g.onRecoverableError),g.formState!==void 0&&(J=g.formState)),d=hj(u,1,!0,d,g??null,S,T,J,D,k,$,wj),d.context=dj(null),g=d.current,S=ya(),S=o1(S),T=Vl(S),T.callback=null,Fl(g,T,S),g=S,d.current.lanes=g,ov(d,g),Zi(d),u[yf]=d.current,lC(u),new p0(d)},Qv.version="19.3.1",Qv}var Oj;function ZK(){if(Oj)return OC.exports;Oj=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),OC.exports=XK(),OC.exports}var KK=ZK();const QK=fH(KK);var w2=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,dH=/^[\\/]{2}/;function JK(e,t){return t+e.replace(/\\/g,"/")}var kj="popstate";function Pj(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function eQ(e={}){function t(n,a){let i=a.state?.masked,{pathname:o,search:l,hash:s}=i||n.location;return tM("",{pathname:o,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:Mc(a)}return rQ(t,r,null,e)}function vr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ai(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tQ(){return Math.random().toString(36).substring(2,10)}function jj(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function tM(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Md(t):t,state:r,key:t&&t.key||n||tQ(),mask:a}}function Mc({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Md(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function rQ(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,l="POP",s=null,c=f();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function f(){return(o.state||{idx:null}).idx}function h(){l="POP";let x=f(),b=x==null?null:x-c;c=x,s&&s({action:l,location:y.location,delta:b})}function v(x,b){l="PUSH";let w=Pj(x)?x:tM(y.location,x,b);c=f()+1;let C=jj(w,c),A=y.createHref(w.mask||w);try{o.pushState(C,"",A)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;a.location.assign(A)}i&&s&&s({action:l,location:y.location,delta:1})}function p(x,b){l="REPLACE";let w=Pj(x)?x:tM(y.location,x,b);c=f();let C=jj(w,c),A=y.createHref(w.mask||w);o.replaceState(C,"",A),i&&s&&s({action:l,location:y.location,delta:0})}function m(x){return nQ(a,x)}let y={get action(){return l},get location(){return e(a,o)},listen(x){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(kj,h),s=x,()=>{a.removeEventListener(kj,h),s=null}},createHref(x){return t(a,x)},createURL:m,encodeLocation(x){let b=m(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:v,replace:p,go(x){return o.go(x)}};return y}function nQ(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),vr(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Mc(t);return a=a.replace(/ $/,"%20"),!r&&dH.test(a)&&(a=n+a),new URL(a,n)}function vH(e,t,r="/"){return aQ(e,t,r,!1)}function aQ(e,t,r,n,a){let i=typeof t=="string"?Md(t):t,o=Sl(i.pathname||"/",r);if(o==null)return null;let l=iQ(e),s=null,c=gQ(o);for(let f=0;s==null&&f<l.length;++f)s=pQ(l[f],c,n);return s}function iQ(e){let t=pH(e);return oQ(t),t}function pH(e,t=[],r=[],n="",a=!1){let i=(o,l,s=a,c)=>{let f={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&s)return;vr(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let h=Ci([n,f.relativePath]),v=r.concat(f);o.children&&o.children.length>0&&(vr(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),pH(o.children,t,v,h,s)),!(o.path==null&&!o.index)&&t.push({path:h,score:dQ(h,o.index),routesMeta:v.map((p,m)=>{let[y,x]=yH(p.relativePath,p.caseSensitive,m===v.length-1);return{...p,matcher:y,compiledParams:x}})})};return e.forEach((o,l)=>{if(o.path===""||!o.path?.includes("?"))i(o,l);else for(let s of gH(o.path))i(o,l,!0,s)}),t}function gH(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=gH(n.join("/")),l=[];return l.push(...o.map(s=>s===""?i:[i,s].join("/"))),a&&l.push(...o),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function oQ(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vQ(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var lQ=/^:[\w-]+$/,sQ=3,uQ=2,cQ=1,fQ=10,hQ=-2,Bj=e=>e==="*";function dQ(e,t){let r=e.split("/"),n=r.length;return r.some(Bj)&&(n+=hQ),t&&(n+=uQ),r.filter(a=>!Bj(a)).reduce((a,i)=>a+(lQ.test(i)?sQ:i===""?cQ:fQ),n)}function vQ(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function pQ(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",o=[];for(let l=0;l<n.length;++l){let s=n[l],c=l===n.length-1,f=i==="/"?t:t.slice(i.length)||"/",h={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},v=s.matcher&&s.compiledParams?mH(h,f,s.matcher,s.compiledParams):_S(h,f),p=s.route;if(!v&&c&&r&&!n[n.length-1].route.index&&(v=_S({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!v)return null;Object.assign(a,v.params),o.push({params:a,pathname:Ci([i,v.pathname]),pathnameBase:xQ(Ci([i,v.pathnameBase])),route:p}),v.pathnameBase!=="/"&&(i=Ci([i,v.pathnameBase]))}return o}function _S(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=yH(e.path,e.caseSensitive,e.end);return mH(e,t,r,n)}function mH(e,t,r,n){let a=t.match(r);if(!a)return null;let i=a[0],o=td(i,1),l=a.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:h},v)=>{if(f==="*"){let m=l[v]||"";o=td(i.slice(0,i.length-m.length),1)}const p=l[v];return h&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function yH(e,t=!1,r=!0){ai(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,s,c,f)=>{if(n.push({paramName:l,isOptional:s!=null}),s){let h=f.charAt(c+o.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function gQ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ai(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Sl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function mQ(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Md(e):e,i;return r?(r=xH(r),r.startsWith("/")||r.startsWith("\\")?i=zj(r.substring(1),"/"):i=zj(r,t)):i=t,{pathname:i,search:SQ(n),hash:bQ(a)}}function zj(e,t){let r=td(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function BC(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yQ(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function C2(e){let t=yQ(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function t_(e,t,r,n=!1){let a;typeof e=="string"?a=Md(e):(a={...e},vr(!a.pathname||!a.pathname.includes("?"),BC("?","pathname","search",a)),vr(!a.pathname||!a.pathname.includes("#"),BC("#","pathname","hash",a)),vr(!a.search||!a.search.includes("#"),BC("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),h-=1;a.pathname=v.join("/")}l=h>=0?t[h]:"/"}let s=mQ(a,l),c=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(c||f)&&(s.pathname+="/"),s}var xH=e=>e.replace(/[\\/]{2,}/g,"/"),Ci=e=>xH(e.join("/"));function td(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var xQ=e=>td(e).replace(/^\/*/,"/"),SQ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bQ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_Q=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function wQ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function CQ(e){let t=e.map(r=>r.route.path).filter(Boolean);return Ci(t)||"/"}var SH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bH(e,t){let r=e;if(typeof r!="string"||!w2.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(SH)try{let i=new URL(window.location.href),o=dH.test(r)?new URL(JK(r,i.protocol)):new URL(r),l=Sl(o.pathname,t);o.origin===i.origin&&l!=null?r=l+o.search+o.hash:a=!0}catch{ai(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Vj=new URL("http://localhost");function T2(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Vj)}catch{return Vj}}function zC(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function TQ(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function A2(e,t,r,n){let a=null;try{a=e==null?null:new URL(e,r)}catch{}let i=new URL(t,r),o=a!=null&&!zC(a,r),l=!zC(i,r);if(n==="reject"){if(o||l)throw new Error("External navigation is not allowed")}else if(l&&(a==null||!TQ(e,a)||!zC(a,i)))throw new Error("External navigation is not allowed")}var _H=["POST","PUT","PATCH","DELETE"];new Set(_H);var AQ=["GET",..._H];new Set(AQ);var DQ=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function MQ(e){try{return DQ.includes(new URL(e).protocol)}catch{return!1}}var Rd=j.createContext(null);Rd.displayName="DataRouter";var r_=j.createContext(null);r_.displayName="DataRouterState";var wH=j.createContext(!1);function RQ(){return j.useContext(wH)}var CH=j.createContext({isTransitioning:!1});CH.displayName="ViewTransition";var EQ=j.createContext(new Map);EQ.displayName="Fetchers";var NQ=j.createContext(null);NQ.displayName="Await";var Aa=j.createContext(null);Aa.displayName="Navigation";var mm=j.createContext(null);mm.displayName="Location";var Ii=j.createContext({outlet:null,matches:[],isDataRoute:!1});Ii.displayName="Route";var D2=j.createContext(null);D2.displayName="RouteError";var TH="REACT_ROUTER_ERROR",LQ="REDIRECT",IQ="ROUTE_ERROR_RESPONSE";function OQ(e){if(e.startsWith(`${TH}:${LQ}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function kQ(e){if(e.startsWith(`${TH}:${IQ}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new _Q(t.status,t.statusText,t.data)}catch{}}function PQ(e,{relative:t}={}){vr(Jc(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=j.useContext(Aa),{hash:a,pathname:i,search:o}=ym(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:Ci([r,i])),n.createHref({pathname:l,search:o,hash:a})}function Jc(){return j.useContext(mm)!=null}function Da(){return vr(Jc(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(mm).location}var AH="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function DH(e){j.useContext(Aa).static||j.useLayoutEffect(e)}function ef(){let{isDataRoute:e}=j.useContext(Ii);return e?KQ():jQ()}function jQ(){vr(Jc(),"useNavigate() may be used only in the context of a <Router> component.");let e=j.useContext(Rd),{basename:t,navigator:r}=j.useContext(Aa),{matches:n}=j.useContext(Ii),{pathname:a}=Da(),i=JSON.stringify(C2(n)),o=j.useRef(!1);return DH(()=>{o.current=!0}),j.useCallback((s,c={})=>{if(ai(o.current,AH),!o.current)return;if(typeof s=="number"){r.go(s);return}let f=t_(s,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ci([t,f.pathname])),A2(typeof s=="string"?s:Mc(s),r.createHref(f),T2(r),"reject"),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,i,a,e])}var BQ=j.createContext(null);function zQ(e){let t=j.useContext(Ii).outlet;return j.useMemo(()=>t&&j.createElement(BQ.Provider,{value:e},t),[t,e])}function ym(e,{relative:t}={}){let{matches:r}=j.useContext(Ii),{pathname:n}=Da(),a=JSON.stringify(C2(r));return j.useMemo(()=>t_(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function VQ(e,t){return MH(e,t)}function MH(e,t,r){vr(Jc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=j.useContext(Aa),{matches:a}=j.useContext(Ii),i=a[a.length-1],o=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",c=i&&i.route;{let x=c&&c.path||"";EH(l,!c||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let f=Da(),h;if(t){let x=typeof t=="string"?Md(t):t;vr(s==="/"||x.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${x.pathname}" was given in the \`location\` prop.`),h=x}else h=f;let v=h.pathname||"/",p=v;if(s!=="/"){let x=s.replace(/^\//,"").split("/");p="/"+v.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=r&&r.state.matches.length?r.state.matches.map(x=>Object.assign(x,{route:r.manifest[x.route.id]||x.route})):vH(e,{pathname:p});ai(c||m!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),ai(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=YQ(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:Ci([s,n.encodeLocation?n.encodeLocation(x.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?s:Ci([s,n.encodeLocation?n.encodeLocation(x.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),a,r);return t&&y?j.createElement(mm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},y):y}function FQ(){let e=ZQ(),t=wQ(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:i},"ErrorBoundary")," or"," ",j.createElement("code",{style:i},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:a},r):null,o)}var GQ=j.createElement(FQ,null),RH=class extends j.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=kQ(e.digest);r&&(e=r)}let t=e!==void 0?j.createElement(Ii.Provider,{value:this.props.routeContext},j.createElement(D2.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?j.createElement(HQ,{error:e},t):t}};RH.contextType=wH;var VC=new WeakMap;function HQ({children:e,error:t}){let{basename:r,navigator:n}=j.useContext(Aa);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=OQ(t.digest);if(a){let i=VC.get(t);if(i)throw i;let o=bH(a.location,r),l=o.absoluteURL||o.to;if(A2(a.location,l,T2(n),"allow-explicit"),MQ(l))throw new Error("Invalid redirect location");if(SH&&!VC.get(t))if(o.isExternal||a.reloadDocument)window.location.href=l;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw VC.set(t,s),s}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function UQ({routeContext:e,match:t,children:r}){let n=j.useContext(Rd);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),j.createElement(Ii.Provider,{value:e},r)}function YQ(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,i=n?.errors;if(i!=null){let f=a.findIndex(h=>h.route.id&&i?.[h.route.id]!==void 0);vr(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let o=!1,l=-1;if(r&&n){o=n.renderFallback;for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=f),h.route.id){let{loaderData:v,errors:p}=n,m=h.route.loader&&!v.hasOwnProperty(h.route.id)&&(!p||p[h.route.id]===void 0);if(h.route.lazy||m){r.isStatic&&(o=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let s=r?.onError,c=n&&s?(f,h)=>{s(f,{location:n.location,params:n.matches?.[0]?.params??{},pattern:CQ(n.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,v)=>{let p,m=!1,y=null,x=null;n&&(p=i&&h.route.id?i[h.route.id]:void 0,y=h.route.errorElement||GQ,o&&(l<0&&v===0?(EH("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,x=null):l===v&&(m=!0,x=h.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,v+1)),w=()=>{let C;return p?C=y:m?C=x:h.route.Component?C=j.createElement(h.route.Component,null):h.route.element?C=h.route.element:C=f,j.createElement(UQ,{match:h,routeContext:{outlet:f,matches:b,isDataRoute:n!=null},children:C})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?j.createElement(RH,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0},onError:c}):w()},null)}function M2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $Q(e){let t=j.useContext(Rd);return vr(t,M2(e)),t}function WQ(e){let t=j.useContext(r_);return vr(t,M2(e)),t}function qQ(e){let t=j.useContext(Ii);return vr(t,M2(e)),t}function R2(e){let t=qQ(e),r=t.matches[t.matches.length-1];return vr(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function XQ(){return R2("useRouteId")}function ZQ(){let e=j.useContext(D2),t=WQ("useRouteError"),r=R2("useRouteError");return e!==void 0?e:t.errors?.[r]}function KQ(){let{router:e}=$Q("useNavigate"),t=R2("useNavigate"),r=j.useRef(!1);return DH(()=>{r.current=!0}),j.useCallback(async(a,i={})=>{ai(r.current,AH),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var Fj={};function EH(e,t,r){!t&&!Fj[e]&&(Fj[e]=!0,ai(!1,r))}j.memo(QQ);function QQ({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:i}){return MH(e,void 0,{manifest:t,state:n,isStatic:a,onError:i})}function eg({to:e,replace:t,state:r,relative:n}){vr(Jc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:i}=j.useContext(Aa);ai(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=j.useContext(Ii),{pathname:l}=Da(),s=ef(),c=t_(e,C2(o),l,n==="path");A2(typeof e=="string"?e:Mc(e),i.createHref(c),T2(i),"reject");let f=JSON.stringify(c);return j.useEffect(()=>{s(JSON.parse(f),{replace:t,state:r,relative:n})},[s,f,n,t,r]),null}function JQ(e){return zQ(e.context)}function oa(e){vr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function eJ({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1,useTransitions:o}){vr(!Jc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=j.useMemo(()=>({basename:l,navigator:a,static:i,useTransitions:o,future:{}}),[l,a,i,o]);typeof r=="string"&&(r=Md(r));let{pathname:c="/",search:f="",hash:h="",state:v=null,key:p="default",mask:m}=r,y=j.useMemo(()=>{let x=Sl(c,l);return x==null?null:{location:{pathname:x,search:f,hash:h,state:v,key:p,mask:m},navigationType:n}},[l,c,f,h,v,p,n,m]);return ai(y!=null,`<Router basename="${l}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:j.createElement(Aa.Provider,{value:s},j.createElement(mm.Provider,{children:t,value:y}))}function tJ({children:e,location:t}){return VQ(rM(e),t)}function rM(e,t=[]){let r=[];return j.Children.forEach(e,(n,a)=>{if(!j.isValidElement(n))return;let i=[...t,a];if(n.type===j.Fragment){r.push.apply(r,rM(n.props.children,i));return}vr(n.type===oa,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vr(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=rM(n.props.children,i)),r.push(o)}),r}var Ux="get",Yx="application/x-www-form-urlencoded";function n_(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rJ(e){return n_(e)&&e.tagName.toLowerCase()==="button"}function nJ(e){return n_(e)&&e.tagName.toLowerCase()==="form"}function aJ(e){return n_(e)&&e.tagName.toLowerCase()==="input"}function iJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oJ(e,t){return e.button===0&&(!t||t==="_self")&&!iJ(e)}function nM(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function lJ(e,t){let r=nM(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}var m0=null;function sJ(){if(m0===null)try{new FormData(document.createElement("form"),0),m0=!1}catch{m0=!0}return m0}var uJ=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function FC(e){return e!=null&&!uJ.has(e)?(ai(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yx}"`),null):e}function cJ(e,t){let r,n,a,i,o;if(nJ(e)){let l=e.getAttribute("action");n=l?Sl(l,t):null,r=e.getAttribute("method")||Ux,a=FC(e.getAttribute("enctype"))||Yx,i=new FormData(e)}else if(rJ(e)||aJ(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?Sl(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Ux,a=FC(e.getAttribute("formenctype"))||FC(l.getAttribute("enctype"))||Yx,i=new FormData(l,e),!sJ()){let{name:c,type:f,value:h}=e;if(f==="image"){let v=c?`${c}.`:"";i.append(`${v}x`,"0"),i.append(`${v}y`,"0")}else c&&i.append(c,h)}}else{if(n_(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ux,n=null,a=Yx,o=e}return i&&a==="text/plain"&&(o=i,i=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function E2(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function NH(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Sl(a.pathname,t)==="/"?a.pathname=`${td(t)}/_root.${n}`:a.pathname=`${td(a.pathname)}.${n}`,a}async function fJ(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hJ(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function dJ(e,t,r){let n=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let o=await fJ(i,r);return o.links?o.links():[]}return[]}));return mJ(n.flat(1).filter(hJ).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Gj(e,t,r,n,a,i){let o=(s,c)=>r[c]?s.route.id!==r[c].route.id:!0,l=(s,c)=>r[c].pathname!==s.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==s.params["*"];return i==="assets"?t.filter((s,c)=>o(s,c)||l(s,c)):i==="data"?t.filter((s,c)=>{let f=n.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(o(s,c)||l(s,c))return!0;if(s.route.shouldRevalidate){let h=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function vJ(e,t,{includeHydrateFallback:r}={}){return pJ(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function pJ(e){return[...new Set(e)]}function gJ(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function mJ(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let i=JSON.stringify(gJ(a));return r.has(i)||(r.add(i),n.push({key:i,link:a})),n},[])}function N2(){let e=j.useContext(Rd);return E2(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function yJ(){let e=j.useContext(r_);return E2(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var L2=j.createContext(void 0);L2.displayName="FrameworkContext";function a_(){let e=j.useContext(L2);return E2(e,"You must render this element inside a <HydratedRouter> element"),e}function xJ(e,t){let r=j.useContext(L2),[n,a]=j.useState(!1),[i,o]=j.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,v=j.useRef(null);j.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let y=b=>{b.forEach(w=>{o(w.isIntersecting)})},x=new IntersectionObserver(y,{threshold:.5});return v.current&&x.observe(v.current),()=>{x.disconnect()}}},[e]),j.useEffect(()=>{if(n){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[n]);let p=()=>{a(!0)},m=()=>{a(!1),o(!1)};return r?e!=="intent"?[i,v,{}]:[i,v,{onFocus:Jv(l,p),onBlur:Jv(s,m),onMouseEnter:Jv(c,p),onMouseLeave:Jv(f,m),onTouchStart:Jv(h,p)}]:[!1,v,{}]}function Jv(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function SJ({page:e,...t}){let r=RQ(),{nonce:n}=a_(),{router:a}=N2(),i=j.useMemo(()=>vH(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?(t.nonce==null&&n&&(t={...t,nonce:n}),r?j.createElement(_J,{page:e,matches:i,...t}):j.createElement(wJ,{page:e,matches:i,...t})):null}function bJ(e){let{manifest:t,routeModules:r}=a_(),[n,a]=j.useState([]);return j.useEffect(()=>{let i=!1;return dJ(e,t,r).then(o=>{i||a(o)}),()=>{i=!0}},[e,t,r]),n}function _J({page:e,matches:t,...r}){let n=Da(),{future:a}=a_(),{basename:i}=N2(),o=j.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let l=NH(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:c.push(f.route.id);return s&&c.length>0&&l.searchParams.set("_routes",c.join(",")),[l.pathname+l.search]},[i,a.v8_trailingSlashAwareDataRequests,e,n,t]);return j.createElement(j.Fragment,null,o.map(l=>j.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function wJ({page:e,matches:t,...r}){let n=Da(),{future:a,manifest:i,routeModules:o}=a_(),{basename:l}=N2(),{loaderData:s,matches:c}=yJ(),f=j.useMemo(()=>Gj(e,t,c,i,n,"data"),[e,t,c,i,n]),h=j.useMemo(()=>Gj(e,t,c,i,n,"assets"),[e,t,c,i,n]),v=j.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,x=!1;if(t.forEach(w=>{let C=i.routes[w.route.id];!C||!C.hasLoader||(!f.some(A=>A.route.id===w.route.id)&&w.route.id in s&&o[w.route.id]?.shouldRevalidate||C.hasClientLoader?x=!0:y.add(w.route.id))}),y.size===0)return[];let b=NH(e,l,a.v8_trailingSlashAwareDataRequests,"data");return x&&y.size>0&&b.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[b.pathname+b.search]},[l,a.v8_trailingSlashAwareDataRequests,s,n,i,f,t,e,o]),p=j.useMemo(()=>vJ(h,i),[h,i]),m=bJ(h);return j.createElement(j.Fragment,null,v.map(y=>j.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),p.map(y=>j.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),m.map(({key:y,link:x})=>j.createElement("link",{key:y,nonce:r.nonce,...x,crossOrigin:x.crossOrigin??r.crossOrigin})))}function CJ(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var TJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{TJ&&(window.__reactRouterVersion="7.18.5")}catch{}function AJ({basename:e,children:t,useTransitions:r,window:n}){let a=j.useRef();a.current==null&&(a.current=eQ({window:n,v5Compat:!0}));let i=a.current,[o,l]=j.useState({action:i.action,location:i.location}),s=j.useCallback(c=>{r===!1?l(c):j.startTransition(()=>l(c))},[r]);return j.useLayoutEffect(()=>i.listen(s),[i,s]),j.createElement(eJ,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,useTransitions:r})}var hr=j.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:i,replace:o,mask:l,state:s,target:c,to:f,preventScrollReset:h,viewTransition:v,defaultShouldRevalidate:p,...m},y){let{basename:x,navigator:b,useTransitions:w}=j.useContext(Aa),C=typeof f=="string"&&w2.test(f),A=bH(f,x);f=A.to;let M=PQ(f,{relative:a}),R=Da(),E=null;if(l){let H=t_(l,[],R.mask?R.mask.pathname:"/",!0);x!=="/"&&(H.pathname=H.pathname==="/"?x:Ci([x,H.pathname])),E=b.createHref(H)}let[N,L,O]=xJ(n,m),I=RJ(f,{replace:o,mask:l,state:s,target:c,preventScrollReset:h,relative:a,viewTransition:v,defaultShouldRevalidate:p,useTransitions:w});function z(H){t&&t(H),H.defaultPrevented||I(H)}let V=!(A.isExternal||i),Y=j.createElement("a",{...m,...O,href:(V?E:void 0)||A.absoluteURL||M,onClick:V?z:t,ref:CJ(y,L),target:c,"data-discover":!C&&r==="render"?"true":void 0});return N&&!C?j.createElement(j.Fragment,null,Y,j.createElement(SJ,{page:M})):Y});hr.displayName="Link";var LH=j.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:i,to:o,viewTransition:l,children:s,...c},f){let h=ym(o,{relative:c.relative}),v=Da(),p=j.useContext(r_),{navigator:m,basename:y}=j.useContext(Aa),x=p!=null&&OJ(h)&&l===!0,b=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,w=v.pathname,C=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(w=w.toLowerCase(),C=C?C.toLowerCase():null,b=b.toLowerCase()),C&&y&&(C=Sl(C,y)||C);const A=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let M=w===b||!a&&w.startsWith(b)&&w.charAt(A)==="/",R=C!=null&&(C===b||!a&&C.startsWith(b)&&C.charAt(b.length)==="/"),E={isActive:M,isPending:R,isTransitioning:x},N=M?t:void 0,L;typeof n=="function"?L=n(E):L=[n,M?"active":null,R?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let O=typeof i=="function"?i(E):i;return j.createElement(hr,{...c,"aria-current":N,className:L,ref:f,style:O,to:o,viewTransition:l},typeof s=="function"?s(E):s)});LH.displayName="NavLink";var DJ=j.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:i,method:o=Ux,action:l,onSubmit:s,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:v,...p},m)=>{let{useTransitions:y}=j.useContext(Aa),x=LJ(),b=IJ(l,{relative:c}),w=o.toLowerCase()==="get"?"get":"post",C=typeof l=="string"&&w2.test(l),A=M=>{if(s&&s(M),M.defaultPrevented)return;M.preventDefault();let R=M.nativeEvent.submitter,E=R?.getAttribute("formmethod")||o,N=()=>x(R||M.currentTarget,{fetcherKey:t,method:E,navigate:r,replace:a,state:i,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:v});y&&r!==!1?j.startTransition(()=>N()):N()};return j.createElement("form",{ref:m,method:w,action:b,onSubmit:n?s:A,...p,"data-discover":!C&&e==="render"?"true":void 0})});DJ.displayName="Form";function MJ(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function IH(e){let t=j.useContext(Rd);return vr(t,MJ(e)),t}function RJ(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:s,useTransitions:c}={}){let f=ef(),h=Da(),v=ym(e,{relative:o});return j.useCallback(p=>{if(oJ(p,t)){p.preventDefault();let m=r!==void 0?r:Mc(h)===Mc(v),y=()=>f(e,{replace:m,mask:n,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:s});c?j.startTransition(()=>y()):y()}},[h,f,v,r,n,a,t,e,i,o,l,s,c])}function xm(e){ai(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=j.useRef(nM(e)),r=j.useRef(!1),n=Da(),a=j.useMemo(()=>lJ(n.search,r.current?null:t.current),[n.search]),i=ef(),o=j.useCallback((l,s)=>{const c=nM(typeof l=="function"?l(new URLSearchParams(a)):l);r.current=!0,i("?"+c,s)},[i,a]);return[a,o]}var EJ=0,NJ=()=>`__${String(++EJ)}__`;function LJ(){let{router:e}=IH("useSubmit"),{basename:t}=j.useContext(Aa),r=XQ(),n=e.fetch,a=e.navigate;return j.useCallback(async(i,o={})=>{let{action:l,method:s,encType:c,formData:f,body:h}=cJ(i,t);if(o.navigate===!1){let v=o.fetcherKey||NJ();await n(v,r,o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:h,formMethod:o.method||s,formEncType:o.encType||c,flushSync:o.flushSync})}else await a(o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:f,body:h,formMethod:o.method||s,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,t,r])}function IJ(e,{relative:t}={}){let{basename:r}=j.useContext(Aa),n=j.useContext(Ii);vr(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),i={...ym(e||".",{relative:t})},o=Da();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(f=>f==="")){l.delete("index"),s.filter(h=>h).forEach(h=>l.append("index",h));let f=l.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Ci([r,i.pathname])),Mc(i)}function OJ(e,{relative:t}={}){let r=j.useContext(CH);vr(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=IH("useViewTransitionState"),a=ym(e,{relative:t});if(!r.isTransitioning)return!1;let i=Sl(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=Sl(r.nextLocation.pathname,n)||r.nextLocation.pathname;return _S(a.pathname,o)!=null||_S(a.pathname,i)!=null}var kJ=hH();const I2="accessToken",O2="refreshToken",OH="user";function xg(){return localStorage.getItem(I2)}function k2(e){localStorage.setItem(I2,e)}function kH(){return localStorage.getItem(O2)}function PH(e){localStorage.setItem(O2,e)}function jH(){const e=localStorage.getItem(OH);return e?JSON.parse(e):null}function aM(){localStorage.removeItem(I2),localStorage.removeItem(O2),localStorage.removeItem(OH)}const wS="xeplr:activeScope:",BH="xeplr:activeScope@owner";function PJ(){try{const e=jH();return e&&e.id||null}catch{return null}}function jJ(){try{return localStorage.getItem(BH)}catch{return null}}const iM="xeplr:activeScopeChanged";function zH(e){try{typeof window<"u"&&typeof window.dispatchEvent=="function"&&typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent(iM,{detail:{level:e}}))}catch{}}function P2(e){try{const t=localStorage.getItem(wS+e);return t?JSON.parse(t):null}catch{return null}}function BJ(e,t){const r=(P2(e)||{}).id||null;try{t||localStorage.removeItem(wS+e);const n=PJ()}catch{}r!==null&&zH(e)}function zJ(e){const t={};return(e||[]).forEach(function(r){const n=P2(r);n&&n.id&&(t[r]=String(n.id))}),Object.keys(t).length?t:null}function CS(e){if(e){BJ(e,null);return}try{for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);n&&n.indexOf(wS)===0&&t.push(n)}t.forEach(function(a){localStorage.removeItem(a)}),localStorage.removeItem(BH),t.forEach(function(a){zH(a.slice(wS.length))})}catch{}}var VJ={slots:{}};function VH(){return{slots:Object.assign({},VJ.slots)}}let FH="",kh=null,ep=null;function FJ(e,t={}){FH=e,t.onSessionExpired&&(kh=t.onSessionExpired)}function Hj(e){kh=e||null}function Sg(){return FH||""}const GC=600;function GJ(e,t){const r=(e||"").trim();if(!r)return"the body was empty";const n=r.slice(0,200).toLowerCase();return n.startsWith("<!doctype html")||n.startsWith("<html")?"the body is an HTML page, not JSON — something other than the API answered (a proxy, a dev server, or a login redirect)":n.startsWith("<")?"the body is markup, not JSON":n.startsWith("<?xml")?"the body is XML, not JSON":t&&t.indexOf("json")===-1?`the body is ${t}, not JSON`:"the body starts like JSON but does not parse — it is probably truncated"}async function j2(e,t){const r=e.headers&&e.headers.get("content-type")||"",n=t?`${t.method||"GET"} ${t.url||""}`:e.url||"request";let a;try{a=await e.text()}catch(i){console.error(`[api] ${n} — the response body could not be read (status ${e.status}): ${i.message}`);const o=new Error("The connection dropped while the server was replying. Please try again.");return o.status=e.status,Promise.reject(o)}try{return JSON.parse(a)}catch(i){const o=GJ(a,r),l=(a||"").slice(0,GC);console.error(`[api] ${n} — could not read the reply as JSON.
12
+ status : ${e.status}${e.statusText?" "+e.statusText:""}
13
+ content-type : ${r||"(none sent)"}
14
+ body length : ${(a||"").length} character(s)
15
+ looks like : ${o}
16
+ parser said : ${i.message}
17
+ body starts : ${l||"(nothing)"}`+((a||"").length>GC?`
18
+ (truncated — ${(a||"").length-GC} more character(s))`:""));const s=new Error(e.ok?`The server sent back something we could not read (${o}). Please try again.`:`The server is not responding correctly (status ${e.status}). It may be restarting — please try again in a moment.`);throw s.status=e.status,s.contentType=r||null,s.rawBody=l,s.bodyLength=(a||"").length,s.parseError=i.message,s.request=n,s}}function HJ(e){return e?typeof e.error=="string"&&e.error?e.error:e.error&&typeof e.error.message=="string"&&e.error.message?e.error.message:typeof e.message=="string"&&e.message?e.message:"Something went wrong":"Something went wrong"}function B2(e,t,r){const n=new Error(HJ(e));n.status=t?t.status:0,n.body=e||null,e&&typeof e=="object"&&(e.busy!==void 0&&(n.busy=e.busy),e.code!==void 0&&(n.code=e.code));const a=r?`${r.method||"GET"} ${r.url||""}`:t&&t.url||"request";n.request=a;const i=e&&typeof e=="object"&&e.error&&typeof e.error=="object"?e.error:null;return console.error(`[api] ${a} failed — ${t?t.status:0}${t&&t.statusText?" "+t.statusText:""}: ${n.message}`+(n.code!==void 0?`
19
+ code : ${n.code}`:"")+(n.busy!==void 0?`
20
+ busy : ${n.busy}`:"")+(i&&i.name?`
21
+ name : ${i.name}`:"")+(i&&i.nativeError?`
22
+ native : ${typeof i.nativeError=="string"?i.nativeError:JSON.stringify(i.nativeError)}`:"")),n}async function UJ(){if(ep)return ep;ep=(async()=>{const e=kH();if(!e)return aM(),kh&&kh(),!1;try{const t=await fetch(`${Sg()}/auth/api/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e})});if(!t.ok)return aM(),kh&&kh(),!1;const r=await t.json();return k2(r.accessToken),PH(r.refreshToken),!0}catch(t){const r=new Error("Could not reach the server. Check your connection and try again.");throw r.cause=t,r}})();try{return await ep}finally{ep=null}}function HC(e){try{const t=e.headers.get("X-New-Token");t&&k2(t)}catch{}}async function Tt(e,t={}){const{res:r,url:n}=await GH(e,t),a=await j2(r,{method:t.method||"GET",url:n});if(!r.ok)throw B2(a,r,{method:t.method||"GET",url:n});return a}function YJ(e){const t=[],r=String(e).replace(/\r\n/g,`
23
+ `).split(`
24
+
25
+ `),n=r.pop();return r.forEach(a=>{let i="message";const o=[];a.split(`
26
+ `).forEach(l=>{if(!l||l[0]===":")return;const s=l.indexOf(":"),c=s<0?l:l.slice(0,s),f=s<0?"":l.slice(s+1).replace(/^ /,"");c==="event"?i=f:c==="data"&&o.push(f)}),(o.length||i!=="message")&&t.push({event:i,data:o.join(`
27
+ `)})}),{events:t,rest:n}}function $J(e,{onEvent:t,onOpen:r,onError:n}={}){const a=new AbortController;let i=!1;return(async()=>{try{const{res:o,url:l}=await GH(e,{headers:{Accept:"text/event-stream"},signal:a.signal});if(!o.ok){const h=await j2(o,{method:"GET",url:l}).catch(()=>null);throw B2(h,o,{method:"GET",url:l})}r&&r();const s=o.body.getReader(),c=new TextDecoder;let f="";for(;;){const{done:h,value:v}=await s.read();if(h)break;const p=YJ(f+c.decode(v,{stream:!0}));f=p.rest,p.events.forEach(m=>{t&&t(m)})}!i&&n&&n(new Error("The stream ended"))}catch(o){!i&&n&&n(o)}})(),function(){i=!0,a.abort()}}async function GH(e,t){const r=e.startsWith("http")?e:`${Sg()}${e}`,a={...typeof FormData<"u"&&t.body instanceof FormData?{}:{"Content-Type":"application/json"},...t.headers},i=xg();i&&(a.Authorization=`Bearer ${i}`);const o=VH(),l={};Object.keys(o.slots).forEach(f=>{const h=o.slots[f],v=P2(f);v&&v.id&&(a[h.header]=v.id,l[f]=h.header)});let s=await fetch(r,{...t,headers:a});HC(s),s.status===401&&await UJ()&&(a.Authorization=`Bearer ${xg()}`,s=await fetch(r,{...t,headers:a}),HC(s));const c=Object.keys(l);if(s.status===403&&c.length){const f=await s.clone().json().catch(()=>null);if(f&&f.code==="NOT_A_MEMBER"){const h=/\b(l[1-4])\b/.exec(f.error||""),v=h?h[1]:"l1";v==="l1"?CS():CS(v),(!t.method||t.method==="GET")&&(c.forEach(p=>{(p===v||v==="l1")&&delete a[l[p]]}),s=await fetch(r,{...t,headers:a}),HC(s))}}return{res:s,url:r}}async function Ws(e,t={}){const r=await fetch(`${Sg()}${e}`,{headers:{"Content-Type":"application/json"},...t}),n={method:t.method||"GET",url:`${Sg()}${e}`},a=await j2(r,n);if(!r.ok)throw B2(a,r,n);return a}function WJ({email:e,password:t,name:r,phoneNumber:n}){return Ws("/auth/api/register",{method:"POST",body:JSON.stringify({email:e,password:t,name:r,phoneNumber:n})})}function qJ({email:e}){return Ws("/auth/api/resend-activation",{method:"POST",body:JSON.stringify({email:e})})}function XJ(e){return Ws("/auth/api/invite-preview?token="+encodeURIComponent(e))}function ZJ({token:e,name:t,password:r}){return Ws("/auth/api/invite-accept",{method:"POST",body:JSON.stringify({token:e,name:t,password:r})})}function KJ(e,t){var r="/auth/api/activate?token="+encodeURIComponent(e);return t&&(r+="&workflowKey="+encodeURIComponent(t)),Ws(r)}function QJ({email:e,password:t}){return Ws("/auth/api/login",{method:"POST",body:JSON.stringify({email:e,password:t})})}function JJ({email:e}){return Ws("/auth/api/forgot-password",{method:"POST",body:JSON.stringify({email:e})})}function eee({token:e,newPassword:t}){return Ws("/auth/api/reset-password",{method:"POST",body:JSON.stringify({token:e,newPassword:t})})}function tee({currentPassword:e,newPassword:t}){return Tt("/auth/api/change-password",{method:"POST",body:JSON.stringify({oldPassword:e,newPassword:t})})}async function ree(){const e=zJ(Object.keys(VH().slots));if(!e)return Tt("/auth/api/me");try{return await Tt("/auth/api/me",{headers:{"x-verify-tenant":JSON.stringify(e)}})}catch(t){if(t&&t.code==="NOT_A_MEMBER")return Tt("/auth/api/me");throw t}}function nee(){return Tt("/auth/api/profile")}function aee(e){return Tt("/auth/api/profile",{method:"PUT",body:JSON.stringify(e)})}function HH(){const e=kH(),t=xg();if(aM(),CS(),e){const r={"Content-Type":"application/json"};t&&(r.Authorization=`Bearer ${t}`),fetch(`${Sg()}/auth/api/logout`,{method:"POST",headers:r,body:JSON.stringify({refreshToken:e})}).catch(()=>{})}}const TS="xeplr:returnTo";function iee(e){if(!z2)try{sessionStorage.setItem(TS,e.pathname+e.search)}catch{}}let z2=!1;function oee(){z2=!0;try{sessionStorage.removeItem(TS)}catch{}}function lee(){z2=!1;try{const e=sessionStorage.getItem(TS);return sessionStorage.removeItem(TS),e}catch{return null}}function i_(e,t){var r=j.useRef(null);return j.useEffect(function(){if(r.current){for(var n=[],a=0;a<t.length;a++){var i=t[a],o=!1;if(i.id)o=!!r.current.querySelector("#"+i.id);else if(i.role)o=!!r.current.querySelector('[role="'+i.role+'"]');else if(i.anyOf)for(var l=0;l<i.anyOf.length&&!o;l++)o=!!r.current.querySelector(i.anyOf[l]);else i.selector&&(o=!!r.current.querySelector(i.selector));if(!o){var s=i.id?' (id="'+i.id+'")':i.anyOf?" (one of: "+i.anyOf.join(", ")+")":i.selector?" ("+i.selector+")":"";n.push(i.label+s)}}if(n.length>0){var c="[xeplr-ui-utils] "+e+` design is missing required elements:
28
+ `+n.map(function(f){return" - "+f}).join(`
29
+ `);console.error(c),r.current.setAttribute("data-xeplr-design-invalid",e),r.current.setAttribute("title",c)}}},[]),r}function see(e){return e.id?["#"+e.id]:e.role?['[role="'+e.role+'"]']:e.anyOf?e.anyOf.slice():e.selector?[e.selector]:[]}function uee(e,t){return!e.when||!!e.when(t)}function cee(e){var t=e.id?' (id="'+e.id+'")':e.anyOf?" (one of: "+e.anyOf.join(", ")+")":e.selector?" ("+e.selector+")":e.role?' (role="'+e.role+'")':"";return e.label+t}function fee(e,t,r){return e?(t||[]).filter(function(n){return uee(n,r)?!see(n).some(function(a){return e.querySelector(a)}):!1}).map(cee):[]}function o_(e,t){var r=j.useRef(null),n=j.useState([]),a=n[0],i=n[1];return j.useLayoutEffect(function(){if(!a.length){var o=fee(r.current,e,t);o.length&&(console.error(`[xeplr-ui-utils] design is missing required elements:
30
+ `+o.map(function(l){return" - "+l}).join(`
31
+ `)),i(o))}}),{ref:r,missing:a}}function hee(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function ms(e,t){return typeof e=="function"?e(t):e}function Ta(e,t){return r=>{t.setState(n=>({...n,[e]:ms(r,n[e])}))}}function l_(e){return e instanceof Function}function dee(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function vee(e,t){const r=[],n=a=>{a.forEach(i=>{r.push(i);const o=t(i);o!=null&&o.length&&n(o)})};return n(e),r}function tt(e,t,r){let n=[],a;return i=>{let o;r.key&&r.debug&&(o=Date.now());const l=e(i);if(!(l.length!==n.length||l.some((f,h)=>n[h]!==f)))return a;n=l;let c;if(r.key&&r.debug&&(c=Date.now()),a=t(...l),r==null||r.onChange==null||r.onChange(a),r.key&&r.debug&&r!=null&&r.debug()){const f=Math.round((Date.now()-o)*100)/100,h=Math.round((Date.now()-c)*100)/100,v=h/16,p=(m,y)=>{for(m=String(m);m.length<y;)m=" "+m;return m};console.info(`%c⏱ ${p(h,5)} /${p(f,5)} ms`,`
32
+ font-size: .6rem;
33
+ font-weight: bold;
34
+ color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,r?.key)}return a}}function rt(e,t,r,n){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:n}}function pee(e,t,r,n){const a=()=>{var o;return(o=i.getValue())!=null?o:e.options.renderFallbackValue},i={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:a,getContext:tt(()=>[e,r,t,i],(o,l,s,c)=>({table:o,column:l,row:s,cell:c,getValue:c.getValue,renderValue:c.renderValue}),rt(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(i,r,t,e)},{}),i}function gee(e,t,r,n){var a,i;const l={...e._getDefaultColumnDef(),...t},s=l.accessorKey;let c=(a=(i=l.id)!=null?i:s?typeof String.prototype.replaceAll=="function"?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)!=null?a:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:s&&(s.includes(".")?f=v=>{let p=v;for(const y of s.split(".")){var m;p=(m=p)==null?void 0:m[y]}return p}:f=v=>v[l.accessorKey]),!c)throw new Error;let h={id:`${String(c)}`,accessorFn:f,parent:n,depth:r,columnDef:l,columns:[],getFlatColumns:tt(()=>[!0],()=>{var v;return[h,...(v=h.columns)==null?void 0:v.flatMap(p=>p.getFlatColumns())]},rt(e.options,"debugColumns")),getLeafColumns:tt(()=>[e._getOrderColumnsFn()],v=>{var p;if((p=h.columns)!=null&&p.length){let m=h.columns.flatMap(y=>y.getLeafColumns());return v(m)}return[h]},rt(e.options,"debugColumns"))};for(const v of e._features)v.createColumn==null||v.createColumn(h,e);return h}const Cn="debugHeaders";function Uj(e,t,r){var n;let i={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],l=s=>{s.subHeaders&&s.subHeaders.length&&s.subHeaders.map(l),o.push(s)};return l(i),o},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(i,e)}),i}const mee={createTable:e=>{e.getHeaderGroups=tt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>{var i,o;const l=(i=n?.map(h=>r.find(v=>v.id===h)).filter(Boolean))!=null?i:[],s=(o=a?.map(h=>r.find(v=>v.id===h)).filter(Boolean))!=null?o:[],c=r.filter(h=>!(n!=null&&n.includes(h.id))&&!(a!=null&&a.includes(h.id)));return y0(t,[...l,...c,...s],e)},rt(e.options,Cn)),e.getCenterHeaderGroups=tt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>(r=r.filter(i=>!(n!=null&&n.includes(i.id))&&!(a!=null&&a.includes(i.id))),y0(t,r,e,"center")),rt(e.options,Cn)),e.getLeftHeaderGroups=tt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var a;const i=(a=n?.map(o=>r.find(l=>l.id===o)).filter(Boolean))!=null?a:[];return y0(t,i,e,"left")},rt(e.options,Cn)),e.getRightHeaderGroups=tt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var a;const i=(a=n?.map(o=>r.find(l=>l.id===o)).filter(Boolean))!=null?a:[];return y0(t,i,e,"right")},rt(e.options,Cn)),e.getFooterGroups=tt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),rt(e.options,Cn)),e.getLeftFooterGroups=tt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),rt(e.options,Cn)),e.getCenterFooterGroups=tt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),rt(e.options,Cn)),e.getRightFooterGroups=tt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),rt(e.options,Cn)),e.getFlatHeaders=tt(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),rt(e.options,Cn)),e.getLeftFlatHeaders=tt(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),rt(e.options,Cn)),e.getCenterFlatHeaders=tt(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),rt(e.options,Cn)),e.getRightFlatHeaders=tt(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),rt(e.options,Cn)),e.getCenterLeafHeaders=tt(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),rt(e.options,Cn)),e.getLeftLeafHeaders=tt(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),rt(e.options,Cn)),e.getRightLeafHeaders=tt(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),rt(e.options,Cn)),e.getLeafHeaders=tt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var a,i,o,l,s,c;return[...(a=(i=t[0])==null?void 0:i.headers)!=null?a:[],...(o=(l=r[0])==null?void 0:l.headers)!=null?o:[],...(s=(c=n[0])==null?void 0:c.headers)!=null?s:[]].map(f=>f.getLeafHeaders()).flat()},rt(e.options,Cn))}};function y0(e,t,r,n){var a,i;let o=0;const l=function(v,p){p===void 0&&(p=1),o=Math.max(o,p),v.filter(m=>m.getIsVisible()).forEach(m=>{var y;(y=m.columns)!=null&&y.length&&l(m.columns,p+1)},0)};l(e);let s=[];const c=(v,p)=>{const m={depth:p,id:[n,`${p}`].filter(Boolean).join("_"),headers:[]},y=[];v.forEach(x=>{const b=[...y].reverse()[0],w=x.column.depth===m.depth;let C,A=!1;if(w&&x.column.parent?C=x.column.parent:(C=x.column,A=!0),b&&b?.column===C)b.subHeaders.push(x);else{const M=Uj(r,C,{id:[n,p,C.id,x?.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${y.filter(R=>R.column===C).length}`:void 0,depth:p,index:y.length});M.subHeaders.push(x),y.push(M)}m.headers.push(x),x.headerGroup=m}),s.push(m),p>0&&c(y,p-1)},f=t.map((v,p)=>Uj(r,v,{depth:o,index:p}));c(f,o-1),s.reverse();const h=v=>v.filter(m=>m.column.getIsVisible()).map(m=>{let y=0,x=0,b=[0];m.subHeaders&&m.subHeaders.length?(b=[],h(m.subHeaders).forEach(C=>{let{colSpan:A,rowSpan:M}=C;y+=A,b.push(M)})):y=1;const w=Math.min(...b);return x=x+w,m.colSpan=y,m.rowSpan=x,{colSpan:y,rowSpan:x}});return h((a=(i=s[0])==null?void 0:i.headers)!=null?a:[]),s}const V2=(e,t,r,n,a,i,o)=>{let l={id:t,index:n,original:r,depth:a,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:s=>{if(l._valuesCache.hasOwnProperty(s))return l._valuesCache[s];const c=e.getColumn(s);if(c!=null&&c.accessorFn)return l._valuesCache[s]=c.accessorFn(l.original,n),l._valuesCache[s]},getUniqueValues:s=>{if(l._uniqueValuesCache.hasOwnProperty(s))return l._uniqueValuesCache[s];const c=e.getColumn(s);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(l._uniqueValuesCache[s]=c.columnDef.getUniqueValues(l.original,n),l._uniqueValuesCache[s]):(l._uniqueValuesCache[s]=[l.getValue(s)],l._uniqueValuesCache[s])},renderValue:s=>{var c;return(c=l.getValue(s))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>vee(l.subRows,s=>s.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let s=[],c=l;for(;;){const f=c.getParentRow();if(!f)break;s.push(f),c=f}return s.reverse()},getAllCells:tt(()=>[e.getAllLeafColumns()],s=>s.map(c=>pee(e,l,c,c.id)),rt(e.options,"debugRows")),_getAllCellsByColumnId:tt(()=>[l.getAllCells()],s=>s.reduce((c,f)=>(c[f.column.id]=f,c),{}),rt(e.options,"debugRows"))};for(let s=0;s<e._features.length;s++){const c=e._features[s];c==null||c.createRow==null||c.createRow(l,e)}return l},yee={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},UH=(e,t,r)=>{var n,a;const i=r==null||(n=r.toString())==null?void 0:n.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(i))};UH.autoRemove=e=>Ti(e);const YH=(e,t,r)=>{var n;return!!(!((n=e.getValue(t))==null||(n=n.toString())==null)&&n.includes(r))};YH.autoRemove=e=>Ti(e);const $H=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===r?.toLowerCase()};$H.autoRemove=e=>Ti(e);const WH=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};WH.autoRemove=e=>Ti(e);const qH=(e,t,r)=>!r.some(n=>{var a;return!((a=e.getValue(t))!=null&&a.includes(n))});qH.autoRemove=e=>Ti(e)||!(e!=null&&e.length);const XH=(e,t,r)=>r.some(n=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(n)});XH.autoRemove=e=>Ti(e)||!(e!=null&&e.length);const ZH=(e,t,r)=>e.getValue(t)===r;ZH.autoRemove=e=>Ti(e);const KH=(e,t,r)=>e.getValue(t)==r;KH.autoRemove=e=>Ti(e);const F2=(e,t,r)=>{let[n,a]=r;const i=e.getValue(t);return i>=n&&i<=a};F2.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!="number"?parseFloat(t):t,a=typeof r!="number"?parseFloat(r):r,i=t===null||Number.isNaN(n)?-1/0:n,o=r===null||Number.isNaN(a)?1/0:a;if(i>o){const l=i;i=o,o=l}return[i,o]};F2.autoRemove=e=>Ti(e)||Ti(e[0])&&Ti(e[1]);const rl={includesString:UH,includesStringSensitive:YH,equalsString:$H,arrIncludes:WH,arrIncludesAll:qH,arrIncludesSome:XH,equals:ZH,weakEquals:KH,inNumberRange:F2};function Ti(e){return e==null||e===""}const xee={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ta("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);return typeof n=="string"?rl.includesString:typeof n=="number"?rl.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?rl.equals:Array.isArray(n)?rl.arrIncludes:rl.weakEquals},e.getFilterFn=()=>{var r,n;return l_(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(n=t.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?r:rl[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,n,a;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((n=t.options.enableColumnFilters)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(n=>n.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,n;return(r=(n=t.getState().columnFilters)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(n=>{const a=e.getFilterFn(),i=n?.find(f=>f.id===e.id),o=ms(r,i?i.value:void 0);if(Yj(a,o,e)){var l;return(l=n?.filter(f=>f.id!==e.id))!=null?l:[]}const s={id:e.id,value:o};if(i){var c;return(c=n?.map(f=>f.id===e.id?s:f))!=null?c:[]}return n!=null&&n.length?[...n,s]:[s]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const r=e.getAllLeafColumns(),n=a=>{var i;return(i=ms(t,a))==null?void 0:i.filter(o=>{const l=r.find(s=>s.id===o.id);if(l){const s=l.getFilterFn();if(Yj(s,o.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=t=>{var r,n;e.setColumnFilters(t?[]:(r=(n=e.initialState)==null?void 0:n.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Yj(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}const See=(e,t,r)=>r.reduce((n,a)=>{const i=a.getValue(e);return n+(typeof i=="number"?i:0)},0),bee=(e,t,r)=>{let n;return r.forEach(a=>{const i=a.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},_ee=(e,t,r)=>{let n;return r.forEach(a=>{const i=a.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},wee=(e,t,r)=>{let n,a;return r.forEach(i=>{const o=i.getValue(e);o!=null&&(n===void 0?o>=o&&(n=a=o):(n>o&&(n=o),a<o&&(a=o)))}),[n,a]},Cee=(e,t)=>{let r=0,n=0;if(t.forEach(a=>{let i=a.getValue(e);i!=null&&(i=+i)>=i&&(++r,n+=i)}),r)return n/r},Tee=(e,t)=>{if(!t.length)return;const r=t.map(i=>i.getValue(e));if(!dee(r))return;if(r.length===1)return r[0];const n=Math.floor(r.length/2),a=r.sort((i,o)=>i-o);return r.length%2!==0?a[n]:(a[n-1]+a[n])/2},Aee=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),Dee=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,Mee=(e,t)=>t.length,UC={sum:See,min:bee,max:_ee,extent:wee,mean:Cee,median:Tee,unique:Aee,uniqueCount:Dee,count:Mee},Ree={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ta("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(n=>n!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,n;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((n=t.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);if(typeof n=="number")return UC.sum;if(Object.prototype.toString.call(n)==="[object Date]")return UC.extent},e.getAggregationFn=()=>{var r,n;if(!e)throw new Error;return l_(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(n=t.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?r:UC[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,n;e.setGrouping(t?[]:(r=(n=e.initialState)==null?void 0:n.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];const n=t.getColumn(r);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[r]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,n)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=r.subRows)!=null&&a.length)}}};function Eee(e,t,r){if(!(t!=null&&t.length)||!r)return e;const n=e.filter(i=>!t.includes(i.id));return r==="remove"?n:[...t.map(i=>e.find(o=>o.id===i)).filter(Boolean),...n]}const Nee={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ta("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=tt(r=>[tg(t,r)],r=>r.findIndex(n=>n.id===e.id),rt(t.options,"debugColumns")),e.getIsFirstColumn=r=>{var n;return((n=tg(t,r)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=r=>{var n;const a=tg(t,r);return((n=a[a.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=tt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,n)=>a=>{let i=[];if(!(t!=null&&t.length))i=a;else{const o=[...t],l=[...a];for(;l.length&&o.length;){const s=o.shift(),c=l.findIndex(f=>f.id===s);c>-1&&i.push(l.splice(c,1)[0])}i=[...i,...l]}return Eee(i,r,n)},rt(e.options,"debugTable"))}},YC=()=>({left:[],right:[]}),Lee={getInitialState:e=>({columnPinning:YC(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ta("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{const n=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var i,o;if(r==="right"){var l,s;return{left:((l=a?.left)!=null?l:[]).filter(h=>!(n!=null&&n.includes(h))),right:[...((s=a?.right)!=null?s:[]).filter(h=>!(n!=null&&n.includes(h))),...n]}}if(r==="left"){var c,f;return{left:[...((c=a?.left)!=null?c:[]).filter(h=>!(n!=null&&n.includes(h))),...n],right:((f=a?.right)!=null?f:[]).filter(h=>!(n!=null&&n.includes(h)))}}return{left:((i=a?.left)!=null?i:[]).filter(h=>!(n!=null&&n.includes(h))),right:((o=a?.right)!=null?o:[]).filter(h=>!(n!=null&&n.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var a,i,o;return((a=n.columnDef.enablePinning)!=null?a:!0)&&((i=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const r=e.getLeafColumns().map(l=>l.id),{left:n,right:a}=t.getState().columnPinning,i=r.some(l=>n?.includes(l)),o=r.some(l=>a?.includes(l));return i?"left":o?"right":!1},e.getPinnedIndex=()=>{var r,n;const a=e.getIsPinned();return a?(r=(n=t.getState().columnPinning)==null||(n=n[a])==null?void 0:n.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=tt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,n,a)=>{const i=[...n??[],...a??[]];return r.filter(o=>!i.includes(o.column.id))},rt(t.options,"debugRows")),e.getLeftVisibleCells=tt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,n)=>(n??[]).map(i=>r.find(o=>o.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),rt(t.options,"debugRows")),e.getRightVisibleCells=tt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,n)=>(n??[]).map(i=>r.find(o=>o.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),rt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,n;return e.setColumnPinning(t?YC():(r=(n=e.initialState)==null?void 0:n.columnPinning)!=null?r:YC())},e.getIsSomeColumnsPinned=t=>{var r;const n=e.getState().columnPinning;if(!t){var a,i;return!!((a=n.left)!=null&&a.length||(i=n.right)!=null&&i.length)}return!!((r=n[t])!=null&&r.length)},e.getLeftLeafColumns=tt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),rt(e.options,"debugColumns")),e.getRightLeafColumns=tt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),rt(e.options,"debugColumns")),e.getCenterLeafColumns=tt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n)=>{const a=[...r??[],...n??[]];return t.filter(i=>!a.includes(i.id))},rt(e.options,"debugColumns"))}};function Iee(e){return e||(typeof document<"u"?document:null)}const x0={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},$C=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Oee={getDefaultColumnDef:()=>x0,getInitialState:e=>({columnSizing:{},columnSizingInfo:$C(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ta("columnSizing",e),onColumnSizingInfoChange:Ta("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,n,a;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:x0.minSize,(n=i??e.columnDef.size)!=null?n:x0.size),(a=e.columnDef.maxSize)!=null?a:x0.maxSize)},e.getStart=tt(r=>[r,tg(t,r),t.getState().columnSizing],(r,n)=>n.slice(0,e.getIndex(r)).reduce((a,i)=>a+i.getSize(),0),rt(t.options,"debugColumns")),e.getAfter=tt(r=>[r,tg(t,r),t.getState().columnSizing],(r,n)=>n.slice(e.getIndex(r)+1).reduce((a,i)=>a+i.getSize(),0),rt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:n,...a}=r;return a})},e.getCanResize=()=>{var r,n;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((n=t.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0;const n=a=>{if(a.subHeaders.length)a.subHeaders.forEach(n);else{var i;r+=(i=a.column.getSize())!=null?i:0}};return n(e),r},e.getStart=()=>{if(e.index>0){const r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{const n=t.getColumn(e.column.id),a=n?.getCanResize();return i=>{if(!n||!a||(i.persist==null||i.persist(),WC(i)&&i.touches&&i.touches.length>1))return;const o=e.getSize(),l=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[n.id,n.getSize()]],s=WC(i)?Math.round(i.touches[0].clientX):i.clientX,c={},f=(b,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(C=>{var A,M;const R=t.options.columnResizeDirection==="rtl"?-1:1,E=(w-((A=C?.startOffset)!=null?A:0))*R,N=Math.max(E/((M=C?.startSize)!=null?M:0),-.999999);return C.columnSizingStart.forEach(L=>{let[O,I]=L;c[O]=Math.round(Math.max(I+I*N,0)*100)/100}),{...C,deltaOffset:E,deltaPercentage:N}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(C=>({...C,...c})))},h=b=>f("move",b),v=b=>{f("end",b),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=Iee(r),m={moveHandler:b=>h(b.clientX),upHandler:b=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),v(b.clientX)}},y={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),h(b.touches[0].clientX),!1),upHandler:b=>{var w;p?.removeEventListener("touchmove",y.moveHandler),p?.removeEventListener("touchend",y.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),v((w=b.touches[0])==null?void 0:w.clientX)}},x=kee()?{passive:!1}:!1;WC(i)?(p?.addEventListener("touchmove",y.moveHandler,x),p?.addEventListener("touchend",y.upHandler,x)):(p?.addEventListener("mousemove",m.moveHandler,x),p?.addEventListener("mouseup",m.upHandler,x)),t.setColumnSizingInfo(b=>({...b,startOffset:s,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?$C():(r=e.initialState.columnSizingInfo)!=null?r:$C())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0}}};let S0=null;function kee(){if(typeof S0=="boolean")return S0;let e=!1;try{const t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return S0=e,S0}function WC(e){return e.type==="touchstart"}const Pee={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ta("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(n=>({...n,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,n;const a=e.columns;return(r=a.length?a.some(i=>i.getIsVisible()):(n=t.getState().columnVisibility)==null?void 0:n[e.id])!=null?r:!0},e.getCanHide=()=>{var r,n;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((n=t.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=tt(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(n=>n.column.getIsVisible()),rt(t.options,"debugRows")),e.getVisibleCells=tt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,n,a)=>[...r,...n,...a],rt(t.options,"debugRows"))},createTable:e=>{const t=(r,n)=>tt(()=>[n(),n().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),rt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var n;e.setColumnVisibility(r?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=r=>{var n;r=(n=r)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,i)=>({...a,[i.id]:r||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var n;e.toggleAllColumnsVisible((n=r.target)==null?void 0:n.checked)}}};function tg(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const jee={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Bee={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ta("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;const n=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,n,a,i;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableGlobalFilter)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>rl.includesString,e.getGlobalFilterFn=()=>{var t,r;const{globalFilterFn:n}=e.options;return l_(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[n])!=null?t:rl[n]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},zee={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ta("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var a,i;e.setExpanded(n?{}:(a=(i=e.initialState)==null?void 0:i.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const o=i.split(".");n=Math.max(n,o.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(n=>{var a;const i=n===!0?!0:!!(n!=null&&n[e.id]);let o={};if(n===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{o[l]=!0}):o=n,r=(a=r)!=null?a:!i,!i&&r)return{...o,[e.id]:!0};if(i&&!r){const{[e.id]:l,...s}=o;return s}return n})},e.getIsExpanded=()=>{var r;const n=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:n===!0||n?.[e.id])},e.getCanExpand=()=>{var r,n,a;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((n=t.options.enableExpanding)!=null?n:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let r=!0,n=e;for(;r&&n.parentId;)n=t.getRow(n.parentId,!0),r=n.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{const r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},oM=0,lM=10,qC=()=>({pageIndex:oM,pageSize:lM}),Vee={getInitialState:e=>({...e,pagination:{...qC(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ta("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=n=>{const a=i=>ms(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=n=>{var a;e.setPagination(n?qC():(a=e.initialState.pagination)!=null?a:qC())},e.setPageIndex=n=>{e.setPagination(a=>{let i=ms(n,a.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,o)),{...a,pageIndex:i}})},e.resetPageIndex=n=>{var a,i;e.setPageIndex(n?oM:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?a:oM)},e.resetPageSize=n=>{var a,i;e.setPageSize(n?lM:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?a:lM)},e.setPageSize=n=>{e.setPagination(a=>{const i=Math.max(1,ms(n,a.pageSize)),o=a.pageSize*a.pageIndex,l=Math.floor(o/i);return{...a,pageIndex:l,pageSize:i}})},e.setPageCount=n=>e.setPagination(a=>{var i;let o=ms(n,(i=e.options.pageCount)!=null?i:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...a,pageCount:o}}),e.getPageOptions=tt(()=>[e.getPageCount()],n=>{let a=[];return n&&n>0&&(a=[...new Array(n)].fill(null).map((i,o)=>o)),a},rt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:n<a-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},XC=()=>({top:[],bottom:[]}),Fee={getInitialState:e=>({rowPinning:XC(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ta("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,n,a)=>{const i=n?e.getLeafRows().map(s=>{let{id:c}=s;return c}):[],o=a?e.getParentRows().map(s=>{let{id:c}=s;return c}):[],l=new Set([...o,e.id,...i]);t.setRowPinning(s=>{var c,f;if(r==="bottom"){var h,v;return{top:((h=s?.top)!=null?h:[]).filter(y=>!(l!=null&&l.has(y))),bottom:[...((v=s?.bottom)!=null?v:[]).filter(y=>!(l!=null&&l.has(y))),...Array.from(l)]}}if(r==="top"){var p,m;return{top:[...((p=s?.top)!=null?p:[]).filter(y=>!(l!=null&&l.has(y))),...Array.from(l)],bottom:((m=s?.bottom)!=null?m:[]).filter(y=>!(l!=null&&l.has(y)))}}return{top:((c=s?.top)!=null?c:[]).filter(y=>!(l!=null&&l.has(y))),bottom:((f=s?.bottom)!=null?f:[]).filter(y=>!(l!=null&&l.has(y)))}})},e.getCanPin=()=>{var r;const{enableRowPinning:n,enablePinning:a}=t.options;return typeof n=="function"?n(e):(r=n??a)!=null?r:!0},e.getIsPinned=()=>{const r=[e.id],{top:n,bottom:a}=t.getState().rowPinning,i=r.some(l=>n?.includes(l)),o=r.some(l=>a?.includes(l));return i?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var r,n;const a=e.getIsPinned();if(!a)return-1;const i=(r=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(o=>{let{id:l}=o;return l});return(n=i?.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,n;return e.setRowPinning(t?XC():(r=(n=e.initialState)==null?void 0:n.rowPinning)!=null?r:XC())},e.getIsSomeRowsPinned=t=>{var r;const n=e.getState().rowPinning;if(!t){var a,i;return!!((a=n.top)!=null&&a.length||(i=n.bottom)!=null&&i.length)}return!!((r=n[t])!=null&&r.length)},e._getPinnedRows=(t,r,n)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(r??[]).map(o=>{const l=e.getRow(o,!0);return l.getIsAllParentsExpanded()?l:null}):(r??[]).map(o=>t.find(l=>l.id===o))).filter(Boolean).map(o=>({...o,position:n}))},e.getTopRows=tt(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),rt(e.options,"debugRows")),e.getBottomRows=tt(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),rt(e.options,"debugRows")),e.getCenterRows=tt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,n)=>{const a=new Set([...r??[],...n??[]]);return t.filter(i=>!a.has(i.id))},rt(e.options,"debugRows"))}},Gee={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ta("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const n={...r},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):a.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{const n=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...r};return e.getRowModel().rows.forEach(i=>{sM(a,i.id,n,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=tt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?ZC(e,r):{rows:[],flatRows:[],rowsById:{}},rt(e.options,"debugTable")),e.getFilteredSelectedRowModel=tt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?ZC(e,r):{rows:[],flatRows:[],rowsById:{}},rt(e.options,"debugTable")),e.getGroupedSelectedRowModel=tt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?ZC(e,r):{rows:[],flatRows:[],rowsById:{}},rt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState();let n=!!(t.length&&Object.keys(r).length);return n&&t.some(a=>a.getCanSelect()&&!r[a.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:r}=e.getState();let n=!!t.length;return n&&t.some(a=>!r[a.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var t;const r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,n)=>{const a=e.getIsSelected();t.setRowSelection(i=>{var o;if(r=typeof r<"u"?r:!a,e.getCanSelect()&&a===r)return i;const l={...i};return sM(l,e.id,r,(o=n?.selectChildren)!=null?o:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:r}=t.getState();return G2(e,r)},e.getIsSomeSelected=()=>{const{rowSelection:r}=t.getState();return uM(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:r}=t.getState();return uM(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{const r=e.getCanSelect();return n=>{var a;r&&e.toggleSelected((a=n.target)==null?void 0:a.checked)}}}},sM=(e,t,r,n,a)=>{var i;const o=a.getRow(t,!0);r?(o.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),o.getCanSelect()&&(e[t]=!0)):delete e[t],n&&(i=o.subRows)!=null&&i.length&&o.getCanSelectSubRows()&&o.subRows.forEach(l=>sM(e,l.id,r,n,a))};function ZC(e,t){const r=e.getState().rowSelection,n=[],a={},i=function(o,l){return o.map(s=>{var c;const f=G2(s,r);if(f&&(n.push(s),a[s.id]=s),(c=s.subRows)!=null&&c.length&&(s={...s,subRows:i(s.subRows)}),f)return s}).filter(Boolean)};return{rows:i(t.rows),flatRows:n,rowsById:a}}function G2(e,t){var r;return(r=t[e.id])!=null?r:!1}function uM(e,t,r){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let a=!0,i=!1;return e.subRows.forEach(o=>{if(!(i&&!a)&&(o.getCanSelect()&&(G2(o,t)?i=!0:a=!1),o.subRows&&o.subRows.length)){const l=uM(o,t);l==="all"?i=!0:(l==="some"&&(i=!0),a=!1)}}),a?"all":i?"some":!1}const cM=/([0-9]+)/gm,Hee=(e,t,r)=>QH(js(e.getValue(r)).toLowerCase(),js(t.getValue(r)).toLowerCase()),Uee=(e,t,r)=>QH(js(e.getValue(r)),js(t.getValue(r))),Yee=(e,t,r)=>H2(js(e.getValue(r)).toLowerCase(),js(t.getValue(r)).toLowerCase()),$ee=(e,t,r)=>H2(js(e.getValue(r)),js(t.getValue(r))),Wee=(e,t,r)=>{const n=e.getValue(r),a=t.getValue(r);return n>a?1:n<a?-1:0},qee=(e,t,r)=>H2(e.getValue(r),t.getValue(r));function H2(e,t){return e===t?0:e>t?1:-1}function js(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function QH(e,t){const r=e.split(cM).filter(Boolean),n=t.split(cM).filter(Boolean);for(;r.length&&n.length;){const a=r.shift(),i=n.shift(),o=parseInt(a,10),l=parseInt(i,10),s=[o,l].sort();if(isNaN(s[0])){if(a>i)return 1;if(i>a)return-1;continue}if(isNaN(s[1]))return isNaN(o)?-1:1;if(o>l)return 1;if(l>o)return-1}return r.length-n.length}const tp={alphanumeric:Hee,alphanumericCaseSensitive:Uee,text:Yee,textCaseSensitive:$ee,datetime:Wee,basic:qee},Xee={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ta("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const r=t.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const a of r){const i=a?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return tp.datetime;if(typeof i=="string"&&(n=!0,i.split(cM).length>1))return tp.alphanumeric}return n?tp.text:tp.basic},e.getAutoSortDir=()=>{const r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,n;if(!e)throw new Error;return l_(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(n=t.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?r:tp[e.columnDef.sortingFn]},e.toggleSorting=(r,n)=>{const a=e.getNextSortingOrder(),i=typeof r<"u"&&r!==null;t.setSorting(o=>{const l=o?.find(p=>p.id===e.id),s=o?.findIndex(p=>p.id===e.id);let c=[],f,h=i?r:a==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&n?l?f="toggle":f="add":o!=null&&o.length&&s!==o.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(i||a||(f="remove")),f==="add"){var v;c=[...o,{id:e.id,desc:h}],c.splice(0,c.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else f==="toggle"?c=o.map(p=>p.id===e.id?{...p,desc:h}:p):f==="remove"?c=o.filter(p=>p.id!==e.id):c=[{id:e.id,desc:h}];return c})},e.getFirstSortDir=()=>{var r,n;return((r=(n=e.columnDef.sortDescFirst)!=null?n:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var n,a;const i=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==i&&((n=t.options.enableSortingRemoval)==null||n)&&(!(r&&(a=t.options.enableMultiRemove)!=null)||a)?!1:o==="desc"?"asc":"desc":i},e.getCanSort=()=>{var r,n;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((n=t.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,n;return(r=(n=e.columnDef.enableMultiSort)!=null?n:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;const n=(r=t.getState().sorting)==null?void 0:r.find(a=>a.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,n;return(r=(n=t.getState().sorting)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const r=e.getCanSort();return n=>{r&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,n;e.setSorting(t?[]:(r=(n=e.initialState)==null?void 0:n.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Zee=[mee,Pee,Nee,Lee,yee,xee,jee,Bee,Xee,Ree,zee,Vee,Fee,Gee,Oee];function Kee(e){var t,r;const n=[...Zee,...(t=e._features)!=null?t:[]];let a={_features:n};const i=a._features.reduce((v,p)=>Object.assign(v,p.getDefaultOptions==null?void 0:p.getDefaultOptions(a)),{}),o=v=>a.options.mergeOptions?a.options.mergeOptions(i,v):{...i,...v};let s={...{},...(r=e.initialState)!=null?r:{}};a._features.forEach(v=>{var p;s=(p=v.getInitialState==null?void 0:v.getInitialState(s))!=null?p:s});const c=[];let f=!1;const h={_features:n,options:{...i,...e},initialState:s,_queue:v=>{c.push(v),f||(f=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();f=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{a.setState(a.initialState)},setOptions:v=>{const p=ms(v,a.options);a.options=o(p)},getState:()=>a.options.state,setState:v=>{a.options.onStateChange==null||a.options.onStateChange(v)},_getRowId:(v,p,m)=>{var y;return(y=a.options.getRowId==null?void 0:a.options.getRowId(v,p,m))!=null?y:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(v,p)=>{let m=(p?a.getPrePaginationRowModel():a.getRowModel()).rowsById[v];if(!m&&(m=a.getCoreRowModel().rowsById[v],!m))throw new Error;return m},_getDefaultColumnDef:tt(()=>[a.options.defaultColumn],v=>{var p;return v=(p=v)!=null?p:{},{header:m=>{const y=m.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:m=>{var y,x;return(y=(x=m.renderValue())==null||x.toString==null?void 0:x.toString())!=null?y:null},...a._features.reduce((m,y)=>Object.assign(m,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...v}},rt(e,"debugColumns")),_getColumnDefs:()=>a.options.columns,getAllColumns:tt(()=>[a._getColumnDefs()],v=>{const p=function(m,y,x){return x===void 0&&(x=0),m.map(b=>{const w=gee(a,b,x,y),C=b;return w.columns=C.columns?p(C.columns,w,x+1):[],w})};return p(v)},rt(e,"debugColumns")),getAllFlatColumns:tt(()=>[a.getAllColumns()],v=>v.flatMap(p=>p.getFlatColumns()),rt(e,"debugColumns")),_getAllFlatColumnsById:tt(()=>[a.getAllFlatColumns()],v=>v.reduce((p,m)=>(p[m.id]=m,p),{}),rt(e,"debugColumns")),getAllLeafColumns:tt(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(v,p)=>{let m=v.flatMap(y=>y.getLeafColumns());return p(m)},rt(e,"debugColumns")),getColumn:v=>a._getAllFlatColumnsById()[v]};Object.assign(a,h);for(let v=0;v<a._features.length;v++){const p=a._features[v];p==null||p.createTable==null||p.createTable(a)}return a}function Qee(){return e=>tt(()=>[e.options.data],t=>{const r={rows:[],flatRows:[],rowsById:{}},n=function(a,i,o){i===void 0&&(i=0);const l=[];for(let c=0;c<a.length;c++){const f=V2(e,e._getRowId(a[c],c,o),a[c],c,i,void 0,o?.id);if(r.flatRows.push(f),r.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var s;f.originalSubRows=e.options.getSubRows(a[c],c),(s=f.originalSubRows)!=null&&s.length&&(f.subRows=n(f.originalSubRows,i+1,f))}}return l};return r.rows=n(t),r},rt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Jee(e){const t=[],r=n=>{var a;t.push(n),(a=n.subRows)!=null&&a.length&&n.getIsExpanded()&&n.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function JH(e,t,r){return r.options.filterFromLeafRows?ete(e,t,r):tte(e,t,r)}function ete(e,t,r){var n;const a=[],i={},o=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,l=function(s,c){c===void 0&&(c=0);const f=[];for(let v=0;v<s.length;v++){var h;let p=s[v];const m=V2(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(h=p.subRows)!=null&&h.length&&c<o){if(m.subRows=l(p.subRows,c+1),p=m,t(p)&&!m.subRows.length){f.push(p),i[p.id]=p,a.push(p);continue}if(t(p)||m.subRows.length){f.push(p),i[p.id]=p,a.push(p);continue}}else p=m,t(p)&&(f.push(p),i[p.id]=p,a.push(p))}return f};return{rows:l(e),flatRows:a,rowsById:i}}function tte(e,t,r){var n;const a=[],i={},o=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,l=function(s,c){c===void 0&&(c=0);const f=[];for(let v=0;v<s.length;v++){let p=s[v];if(t(p)){var h;if((h=p.subRows)!=null&&h.length&&c<o){const y=V2(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);y.subRows=l(p.subRows,c+1),p=y}f.push(p),a.push(p),i[p.id]=p}}return f};return{rows:l(e),flatRows:a,rowsById:i}}function rte(){return(e,t)=>tt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(r,n,a)=>{if(!r.rows.length||!(n!=null&&n.length)&&!a)return r;const i=[...n.map(l=>l.id).filter(l=>l!==t),a?"__global__":void 0].filter(Boolean),o=l=>{for(let s=0;s<i.length;s++)if(l.columnFilters[i[s]]===!1)return!1;return!0};return JH(r.rows,o,e)},rt(e.options,"debugTable"))}function nte(){return(e,t)=>tt(()=>{var r;return[(r=e.getColumn(t))==null?void 0:r.getFacetedRowModel()]},r=>{if(!r)return new Map;let n=new Map;for(let i=0;i<r.flatRows.length;i++){const o=r.flatRows[i].getUniqueValues(t);for(let l=0;l<o.length;l++){const s=o[l];if(n.has(s)){var a;n.set(s,((a=n.get(s))!=null?a:0)+1)}else n.set(s,1)}}return n},rt(e.options,"debugTable"))}function ate(){return e=>tt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,n)=>{if(!t.rows.length||!(r!=null&&r.length)&&!n){for(let v=0;v<t.flatRows.length;v++)t.flatRows[v].columnFilters={},t.flatRows[v].columnFiltersMeta={};return t}const a=[],i=[];(r??[]).forEach(v=>{var p;const m=e.getColumn(v.id);if(!m)return;const y=m.getFilterFn();y&&a.push({id:v.id,filterFn:y,resolvedValue:(p=y.resolveFilterValue==null?void 0:y.resolveFilterValue(v.value))!=null?p:v.value})});const o=(r??[]).map(v=>v.id),l=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter(v=>v.getCanGlobalFilter());n&&l&&s.length&&(o.push("__global__"),s.forEach(v=>{var p;i.push({id:v.id,filterFn:l,resolvedValue:(p=l.resolveFilterValue==null?void 0:l.resolveFilterValue(n))!=null?p:n})}));let c,f;for(let v=0;v<t.flatRows.length;v++){const p=t.flatRows[v];if(p.columnFilters={},a.length)for(let m=0;m<a.length;m++){c=a[m];const y=c.id;p.columnFilters[y]=c.filterFn(p,y,c.resolvedValue,x=>{p.columnFiltersMeta[y]=x})}if(i.length){for(let m=0;m<i.length;m++){f=i[m];const y=f.id;if(f.filterFn(p,y,f.resolvedValue,x=>{p.columnFiltersMeta[y]=x})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const h=v=>{for(let p=0;p<o.length;p++)if(v.columnFilters[o[p]]===!1)return!1;return!0};return JH(t.rows,h,e)},rt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function ite(e){return t=>tt(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,n)=>{if(!n.rows.length)return n;const{pageSize:a,pageIndex:i}=r;let{rows:o,flatRows:l,rowsById:s}=n;const c=a*i,f=c+a;o=o.slice(c,f);let h;t.options.paginateExpandedRows?h={rows:o,flatRows:l,rowsById:s}:h=Jee({rows:o,flatRows:l,rowsById:s}),h.flatRows=[];const v=p=>{h.flatRows.push(p),p.subRows.length&&p.subRows.forEach(v)};return h.rows.forEach(v),h},rt(t.options,"debugTable"))}function ote(){return e=>tt(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;const n=e.getState().sorting,a=[],i=n.filter(s=>{var c;return(c=e.getColumn(s.id))==null?void 0:c.getCanSort()}),o={};i.forEach(s=>{const c=e.getColumn(s.id);c&&(o[s.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const l=s=>{const c=s.map(f=>({...f}));return c.sort((f,h)=>{for(let p=0;p<i.length;p+=1){var v;const m=i[p],y=o[m.id],x=y.sortUndefined,b=(v=m?.desc)!=null?v:!1;let w=0;if(x){const C=f.getValue(m.id),A=h.getValue(m.id),M=C===void 0,R=A===void 0;if(M||R){if(x==="first")return M?-1:1;if(x==="last")return M?1:-1;w=M&&R?0:M?x:-x}}if(w===0&&(w=y.sortingFn(f,h,m.id)),w!==0)return b&&(w*=-1),y.invertSorting&&(w*=-1),w}return f.index-h.index}),c.forEach(f=>{var h;a.push(f),(h=f.subRows)!=null&&h.length&&(f.subRows=l(f.subRows))}),c};return{rows:l(r.rows),flatRows:a,rowsById:r.rowsById}},rt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function fM(e,t){return e?lte(e)?j.createElement(e,t):e:null}function lte(e){return ste(e)||typeof e=="function"||ute(e)}function ste(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function ute(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function cte(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=j.useState(()=>({current:Kee(t)})),[n,a]=j.useState(()=>r.current.initialState);return r.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:o=>{a(o),e.onStateChange==null||e.onStateChange(o)}})),r.current}const Hn={STRING:"string",NUMBER:"number",DATE:"date",BOOLEAN:"boolean"},fte=new Set([!0,!1,0,1,"0","1","true","false","True","False","TRUE","FALSE"]),hte=100;function dte(e,t,r=10){for(var n=new Map,a=!0,i=e.slice(0,hte),o=0;o<t.length;o++){var l=t[o],s=l.accessor;if(l.dataType){n.set(s,l.dataType);continue}for(var c=[],f=0;f<i.length;f++){var h=i[f][s];h!=null&&h!==""&&c.push(h)}if(c.length<r){a=!1,n.set(s,c.length===0?Hn.STRING:$j(c));continue}n.set(s,$j(c))}return{types:n,confident:a}}function $j(e){for(var t=!0,r=0;r<e.length;r++)if(!fte.has(e[r])){t=!1;break}if(t)return Hn.BOOLEAN;for(var n=!0,r=0;r<e.length;r++){if(typeof e[r]=="boolean"){n=!1;break}var a=Number(e[r]);if(isNaN(a)){n=!1;break}}if(n)return Hn.NUMBER;for(var i=!0,r=0;r<e.length;r++){var o=e[r];if(typeof o=="number"||typeof o=="string"&&o.trim()!==""&&!isNaN(Number(o))){i=!1;break}if(isNaN(Date.parse(o))){i=!1;break}}return i?Hn.DATE:Hn.STRING}function s_({isActive:e,children:t,onClear:r}){var[n,a]=j.useState(!1),[i,o]=j.useState(null),l=j.useRef(null),s=j.useRef(null),c=j.useCallback(function(){var h=l.current;if(h){var v=h.getBoundingClientRect(),p=240,m=8,y=Math.min(Math.max(m,v.right-p),Math.max(m,window.innerWidth-p-m));o({top:v.bottom+4,left:y,width:p})}},[]);j.useEffect(function(){if(!n)return;c();function h(p){var m=l.current&&l.current.contains(p.target),y=s.current&&s.current.contains(p.target);!m&&!y&&a(!1)}function v(){a(!1)}return document.addEventListener("mousedown",h),window.addEventListener("scroll",v,!0),window.addEventListener("resize",v),function(){document.removeEventListener("mousedown",h),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",v)}},[n,c]);var f=n&&i?kJ.createPortal(_.jsxs("div",{ref:s,className:"xeplr-table-filter-panel",style:{position:"fixed",top:i.top,left:i.left,width:i.width},children:[t,_.jsxs("div",{className:"xeplr-table-filter-actions",children:[_.jsx("button",{type:"button",className:"xeplr-table-filter-clear-btn",onClick:function(){r(),a(!1)},children:"Clear"}),_.jsx("button",{type:"button",className:"xeplr-table-filter-close-btn",onClick:function(){a(!1)},children:"Done"})]})]}),document.body):null;return _.jsxs("div",{className:"xeplr-table-filter-wrapper",ref:l,children:[_.jsx("button",{className:"xeplr-table-filter-trigger"+(e?" xeplr-table-filter-active":""),onClick:function(){a(!n)},title:"Filter",type:"button",children:_.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:_.jsx("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"})})}),f]})}function vte({column:e}){var t=e.getFilterValue()||{selected:[],isNull:null},[r,n]=j.useState(""),a=j.useMemo(function(){for(var p=new Set,m=e.getFacetedRowModel().rows,y=0;y<m.length;y++){var x=m[y].getValue(e.id);x!=null&&x!==""&&p.add(String(x))}var b=Array.from(p);return b.sort(),b},[e.getFacetedRowModel()]),i=j.useMemo(function(){if(!r)return a;var p=r.toLowerCase();return a.filter(function(m){return m.toLowerCase().includes(p)})},[a,r]),o=new Set(t.selected),l=t.selected.length>0||t.isNull!==null;function s(p){var m=new Set(o);m.has(p)?m.delete(p):m.add(p),e.setFilterValue({selected:Array.from(m),isNull:t.isNull})}function c(){e.setFilterValue({selected:[],isNull:t.isNull})}function f(){e.setFilterValue({selected:["__xeplr_none__"],isNull:t.isNull})}function h(p){var m=t.isNull===p?null:p;e.setFilterValue({selected:t.selected,isNull:m})}function v(){e.setFilterValue(void 0),n("")}return _.jsx(s_,{isActive:l,onClear:v,children:_.jsxs("div",{className:"xeplr-table-string-filter",children:[_.jsx("input",{className:"xeplr-table-filter-search",type:"text",placeholder:"Search...",value:r,onChange:function(p){n(p.target.value)}}),_.jsxs("div",{className:"xeplr-table-filter-bulk",children:[_.jsx("button",{type:"button",onClick:c,children:"Select All"}),_.jsx("button",{type:"button",onClick:f,children:"Clear All"})]}),_.jsxs("div",{className:"xeplr-table-filter-list",children:[i.map(function(p){var m=o.size===0||o.has(p);return _.jsxs("label",{className:"xeplr-table-filter-option",children:[_.jsx("input",{type:"checkbox",checked:m,onChange:function(){s(p)}}),_.jsx("span",{children:p})]},p)}),i.length===0&&_.jsx("div",{className:"xeplr-table-filter-empty",children:"No values"})]}),_.jsxs("div",{className:"xeplr-table-filter-null-controls",children:[_.jsx("button",{type:"button",className:t.isNull===!0?"active":"",onClick:function(){h(!0)},children:"Is Null"}),_.jsx("button",{type:"button",className:t.isNull===!1?"active":"",onClick:function(){h(!1)},children:"Is Not Null"})]})]})})}function eU(e,t,r){if(!r)return!0;var n=e.getValue(t),a=n==null||n==="";return r.isNull===!0?a:r.isNull===!1&&a?!1:r.selected.length===0?!0:r.selected[0]==="__xeplr_none__"?!1:r.selected.includes(String(n))}function rd(e){return e==null||e===""}function pte(e,t,r,n){if(t==="isnull")return rd(e);if(rd(e))return!1;var a=Number(e),i=Number(r);switch(t){case"eq":return a===i;case"neq":return a!==i;case"gt":return a>i;case"gte":return a>=i;case"lt":return a<i;case"lte":return a<=i;case"between":{var o=Number(n);return isNaN(o)?a>=i:a>=i&&a<=o}default:return!1}}function KC(e){var t=new Date(e);return Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}function gte(e,t,r,n){if(t==="isnull")return rd(e);if(rd(e))return!1;var a=KC(e),i=KC(r);if(isNaN(a)||isNaN(i))return!1;switch(t){case"eq":return a===i;case"neq":return a!==i;case"gt":return a>i;case"gte":return a>=i;case"lt":return a<i;case"lte":return a<=i;case"between":{if(!n)return a>=i;var o=KC(n);return a>=i&&a<=o}default:return!1}}var mte=[{value:"eq",label:"= Equals"},{value:"neq",label:"!= Not Equals"},{value:"gt",label:"> Greater Than"},{value:"gte",label:">= Greater or Equal"},{value:"lt",label:"< Less Than"},{value:"lte",label:"<= Less or Equal"},{value:"between",label:"Between"}];function yte({column:e}){var t=e.getFilterValue()||{operator:"eq",value:"",valueTo:"",isNull:null},r=t.value!==""||t.isNull!==null;function n(o){e.setFilterValue(Object.assign({},t,o))}function a(o){var l=t.isNull===o?null:o;n({isNull:l})}function i(){e.setFilterValue(void 0)}return _.jsx(s_,{isActive:r,onClear:i,children:_.jsxs("div",{className:"xeplr-table-number-filter",children:[_.jsx("select",{className:"xeplr-table-filter-operator",value:t.operator,onChange:function(o){n({operator:o.target.value})},children:mte.map(function(o){return _.jsx("option",{value:o.value,children:o.label},o.value)})}),_.jsx("input",{className:"xeplr-table-filter-input",type:"number",placeholder:t.operator==="between"?"Min":"Value",value:t.value,onChange:function(o){n({value:o.target.value})}}),t.operator==="between"&&_.jsx("input",{className:"xeplr-table-filter-input",type:"number",placeholder:"Max",value:t.valueTo,onChange:function(o){n({valueTo:o.target.value})}}),_.jsxs("div",{className:"xeplr-table-filter-null-controls",children:[_.jsx("button",{type:"button",className:t.isNull===!0?"active":"",onClick:function(){a(!0)},children:"Is Null"}),_.jsx("button",{type:"button",className:t.isNull===!1?"active":"",onClick:function(){a(!1)},children:"Is Not Null"})]})]})})}function xte(e,t,r){if(!r)return!0;var n=e.getValue(t);return r.isNull===!0?rd(n):r.isNull===!1&&rd(n)?!1:r.value===""||r.value===void 0?!0:pte(n,r.operator,r.value,r.valueTo)}var Ste=[{value:"eq",label:"Equals"},{value:"neq",label:"Not Equals"},{value:"gt",label:"After"},{value:"gte",label:"On or After"},{value:"lt",label:"Before"},{value:"lte",label:"On or Before"},{value:"between",label:"Between"}];function bte({column:e}){var t=e.getFilterValue()||{operator:"eq",value:"",valueTo:""},r=t.value!=="";function n(i){e.setFilterValue(Object.assign({},t,i))}function a(){e.setFilterValue(void 0)}return _.jsx(s_,{isActive:r,onClear:a,children:_.jsxs("div",{className:"xeplr-table-date-filter",children:[_.jsx("select",{className:"xeplr-table-filter-operator",value:t.operator,onChange:function(i){n({operator:i.target.value})},children:Ste.map(function(i){return _.jsx("option",{value:i.value,children:i.label},i.value)})}),_.jsx("input",{className:"xeplr-table-filter-input",type:"date",value:t.value,onChange:function(i){n({value:i.target.value})}}),t.operator==="between"&&_.jsx("input",{className:"xeplr-table-filter-input",type:"date",value:t.valueTo,onChange:function(i){n({valueTo:i.target.value})}})]})})}function _te(e,t,r){if(!r||!r.value)return!0;var n=e.getValue(t);return n==null||n===""?!1:gte(n,r.operator,r.value,r.valueTo)}function wte({column:e}){var t=e.getFilterValue()||{value:null},r=t.value!==null;function n(i){e.setFilterValue(t.value===i?{value:null}:{value:i})}function a(){e.setFilterValue(void 0)}return _.jsx(s_,{isActive:r,onClear:a,children:_.jsxs("div",{className:"xeplr-table-boolean-filter",children:[_.jsx("button",{type:"button",className:"xeplr-table-bool-btn"+(t.value===null?" active":""),onClick:function(){e.setFilterValue(void 0)},children:"All"}),_.jsx("button",{type:"button",className:"xeplr-table-bool-btn"+(t.value===!0?" active":""),onClick:function(){n(!0)},children:"True"}),_.jsx("button",{type:"button",className:"xeplr-table-bool-btn"+(t.value===!1?" active":""),onClick:function(){n(!1)},children:"False"})]})})}function Cte(e){return e===!0||e===1||e==="1"||e==="true"||e==="True"||e==="TRUE"?!0:e===!1||e===0||e==="0"||e==="false"||e==="False"||e==="FALSE"?!1:null}function Tte(e,t,r){if(!r||r.value===null||r.value===void 0)return!0;var n=e.getValue(t),a=Cte(n);return a===r.value}function tU(e){if(!e)return"·";var t=String(e).trim().split(/\s+/).slice(0,2);return t.map(function(r){return r.charAt(0).toUpperCase()}).join("")}var Wj=[["#d4af37","#8a6f1f"],["#5b8def","#2d4f99"],["#4ade80","#1d7a3f"],["#ef5b5b","#a02020"],["#a78bfa","#5e3fa3"],["#f97316","#a23f0a"],["#22d3ee","#0d6e80"],["#fb7185","#9b1c33"]];function rU(e){for(var t=String(e||""),r=0,n=0;n<t.length;n++)r=r*31+t.charCodeAt(n)|0;var a=Wj[Math.abs(r)%Wj.length];return"linear-gradient(135deg, "+a[0]+" 0%, "+a[1]+" 100%)"}var Ate={INR:"₹",USD:"$",EUR:"€",GBP:"£",JPY:"¥",AUD:"A$",CAD:"C$",SGD:"S$",AED:"د.إ"};function Dte(e){return Ate[e]||e}function Mte(e,t){if(e==null||e==="")return"";var r=Number(e);return isFinite(r)?typeof t=="number"?r.toLocaleString(void 0,{minimumFractionDigits:t,maximumFractionDigits:t}):r.toLocaleString():""}function Rte(e){var t=e&&e.subKey,r=e&&e.size||"md",n=e&&e.imgKey,a=e&&e.imgPrefix||"";return function(o){var l=o.getValue(),s=t?o.row.original[t]:null,c=n?o.row.original[n]:null;return _.jsxs("div",{className:"xeplr-r-avatarname xeplr-r-avatarname-"+r,children:[c?_.jsx("img",{className:"xeplr-r-avatar xeplr-r-avatar-img",src:a+c,alt:""}):_.jsx("div",{className:"xeplr-r-avatar",style:{background:rU(l)},children:tU(l)}),_.jsxs("div",{className:"xeplr-r-avatarname-text",children:[_.jsx("div",{className:"xeplr-r-avatarname-name",children:l}),s&&_.jsx("div",{className:"xeplr-r-avatarname-sub",children:s})]})]})}}function Ete(e){var t=e&&e.variant||"gold",r=e&&e.max;return function(a){var i=a.getValue();if(!i)return null;var o=Array.isArray(i)?i:String(i).split(",").map(function(c){return c.trim()}).filter(Boolean),l=r?o.slice(0,r):o,s=r?Math.max(o.length-r,0):0;return _.jsxs("div",{className:"xeplr-r-tags",children:[l.map(function(c,f){return _.jsx("span",{className:"xeplr-r-tag xeplr-r-tag-"+t,children:c},f)}),s>0&&_.jsxs("span",{className:"xeplr-r-tag-more",children:["+",s]})]})}}function Nte(e){var t=e&&e.currency||"INR",r=e&&e.position||"before",n=e&&typeof e.decimals=="number"?e.decimals:0,a=e&&e.bold!==!1,i=Dte(t);return function(l){var s=l.getValue();if(s==null||s==="")return null;var c=Mte(s,n),f="xeplr-r-currency"+(a?" xeplr-r-currency-bold":"");return _.jsxs("span",{className:f,children:[r==="before"&&_.jsx("span",{className:"xeplr-r-currency-sym",children:i}),_.jsx("span",{className:"xeplr-r-currency-value",children:c}),r==="after"&&_.jsx("span",{className:"xeplr-r-currency-sym xeplr-r-currency-sym-after",children:i})]})}}function Lte(e){var t=e&&e.max||3,r=e&&e.nameKey||"name",n=e&&e.imgKey,a=e&&e.imgPrefix||"";return function(o){var l=o.getValue();if(!Array.isArray(l)||l.length===0)return null;var s=l.slice(0,t),c=Math.max(l.length-t,0);return _.jsxs("div",{className:"xeplr-r-chips",children:[s.map(function(f,h){var v=f&&f[r]?f[r]:"",p=n&&f?f[n]:null;return _.jsxs("span",{className:"xeplr-r-chip",children:[p?_.jsx("img",{className:"xeplr-r-chip-avatar xeplr-r-chip-avatar-img",src:a+p,alt:""}):_.jsx("span",{className:"xeplr-r-chip-avatar",style:{background:rU(v)},children:tU(v)}),_.jsx("span",{className:"xeplr-r-chip-name",children:v})]},h)}),c>0&&_.jsxs("span",{className:"xeplr-r-chip-more",children:["+",c]})]})}}function Ite(e){var t=e&&e.subKey;return function(n){var a=n.getValue(),i=t?n.row.original[t]:null;return _.jsxs("div",{className:"xeplr-r-twoline",children:[_.jsx("div",{className:"xeplr-r-twoline-primary",children:a}),i&&_.jsx("div",{className:"xeplr-r-twoline-sub",children:i})]})}}function Ote(e){var t=e&&e.map||{},r=e&&e.default||{bg:"#232540",color:"#b8bbe0"};return function(a){var i=a.getValue();if(i==null||i==="")return null;var o=t[i]||r,l=o.label||String(i),s={background:o.bg,color:o.color,borderColor:o.border||o.bg};return _.jsx("span",{className:"xeplr-r-badge",style:s,children:l})}}function hM(e){return e<10?"0"+e:""+e}var kte=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U2(e){return hM(e.getDate())+" "+kte[e.getMonth()]+" "+e.getFullYear()}function Pte(e){return U2(e)+" "+hM(e.getHours())+":"+hM(e.getMinutes())}function jte(e,t){var r=(t-e)/1e3,n=Math.abs(r);return n<60?"just now":n<3600?Math.round(n/60)+"m "+(r>0?"ago":"from now"):n<86400?Math.round(n/3600)+"h "+(r>0?"ago":"from now"):n<86400*30?Math.round(n/86400)+"d "+(r>0?"ago":"from now"):U2(e)}function Bte(e){var t=e&&e.format||"date";return function(n){var a=n.getValue();if(!a)return null;var i=a instanceof Date?a:new Date(a);if(isNaN(i.getTime()))return null;var o;return t==="datetime"?o=Pte(i):t==="relative"?o=jte(i,new Date):o=U2(i),_.jsx("span",{className:"xeplr-r-date",children:o})}}function zte(e){var t=e&&e.onClick,r=e&&e.hrefKey,n=e&&e.target;return function(i){var o=i.getValue();if(o==null||o==="")return null;if(r){var l=i.row.original[r];return _.jsx("a",{className:"xeplr-r-link",href:l,target:n,children:o})}return _.jsx("span",{className:"xeplr-r-link",onClick:function(){t&&t(i.row.original)},children:o})}}var qj={avatarName:Rte,tags:Ete,currency:Nte,memberChips:Lte,twoLine:Ite,statusBadge:Ote,dateDisplay:Bte,link:zte},Vte={[Hn.STRING]:eU,[Hn.NUMBER]:xte,[Hn.DATE]:_te,[Hn.BOOLEAN]:Tte},Xj=hee();function nU(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];n.columns&&n.columns.length?t=t.concat(nU(n.columns)):t.push(n)}return t}function Fte(e){var t=e.data||[],r=e.columns||[],n=e.minDetectionRows??10,a=e.pageSize??20,i=e.enableSorting!==!1,o=e.enableFiltering!==!1,l=e.enablePagination!==!1,s=j.useRef({types:null,confident:!1,dataRef:null}),c=j.useMemo(function(){var E=s.current;if(E.types&&E.confident&&E.dataRef===t||E.types&&E.confident)return E.types;var N=dte(t,nU(r),n);return s.current={types:N.types,confident:N.confident,dataRef:t},N.types},[t,r,n]),f=j.useMemo(function(){function E(N){if(N.columns&&N.columns.length)return Xj.group({id:N.id||N.header,header:N.header,columns:N.columns.map(E)});var L=c.get(N.accessor)||Hn.STRING,O=Vte[L]||eU,I={header:N.header||N.accessor,filterFn:O,meta:{dataType:L,cellStyle:N.cellStyle||null},enableSorting:N.enableSorting!==!1,enableColumnFilter:N.enableColumnFilter!==!1};if(N.cell)I.cell=N.cell;else if(N.render){var z=typeof N.render=="string"?N.render:N.render.type,V=qj[z];if(!V)throw new Error('[xeplr-ui-table] Unknown renderer "'+z+'". Available: '+Object.keys(qj).join(", "));var Y=typeof N.render=="string"?{}:N.render;I.cell=V(Y)}return Xj.accessor(N.accessor,I)}return r.map(E)},[r,c]),h=e.sorting!==void 0,[v,p]=j.useState([]),m=h?e.sorting:v,y=function(E){var N=typeof E=="function"?E(m):E;if(h){e.onSortingChange&&e.onSortingChange(N);return}p(N)},[x,b]=j.useState([]),[w,C]=j.useState({pageIndex:0,pageSize:a}),A=cte({data:t,columns:f,state:{sorting:m,columnFilters:x,pagination:w},onSortingChange:y,onColumnFiltersChange:b,onPaginationChange:C,getCoreRowModel:Qee(),getFilteredRowModel:o?ate():void 0,getSortedRowModel:i&&!h?ote():void 0,manualSorting:h,getPaginationRowModel:l?ite():void 0,getFacetedRowModel:rte(),getFacetedUniqueValues:nte(),enableSorting:i,enableFilters:o});function M(){b([])}function R(){y([])}return{table:A,detectedTypes:c,resetFilters:M,resetSorting:R}}function dM(e,t,r){const n=new URLSearchParams(e||"");return Object.keys(t||{}).forEach(a=>{let i=t[a];i===!0&&(i="1"),i===!1||i===null||i===void 0||i===""||r&&r[a]!==void 0&&String(r[a])===String(i)?n.delete(a):n.set(a,String(i))}),n}function aU(e,t,r){const n=e.get(t);return n===null||n===""?r===void 0?null:r:n}let rg=null,vM=null;function Gte(e,t,r){const n=e.toString(),i=dM(rg!==null&&vM===n?rg:e,t,r);return rg=i,vM=n,i}function Hte(e){return rg!==null&&vM===e.toString()?rg:e}function iU(e,t){return t&&typeof window<"u"?new URLSearchParams(window.location.search):Hte(e)}function Ute(e){return typeof window<"u"&&window.location&&("?"+e.toString()).replace(/^\?$/,"")===window.location.search.replace(/^\?$/,"")}function qs(e,t){const r=Jc(),n=r&&!(t&&t.inUrl===!1),[a,i]=j.useState(()=>new URLSearchParams),o=r?xm():[null,null],l=n?o[0]:a,s=o[1],c=n&&Ute(l),f=j.useCallback(v=>aU(l,v,e?e[v]:void 0),[l,e]),h=j.useCallback((v,p)=>{if(!n){i(x=>dM(x,v,e));return}const m=iU(l,c),y=c?dM(m,v,e):Gte(l,v,e);y.toString()!==m.toString()&&s(y,{replace:!!(p&&p.replace)})},[n,c,l,s,e]);return{get:f,set:h,params:l,inUrl:n,browserBacked:c}}function Zj(e,t){const r=t||{},n=r.default!==void 0?{[e]:r.default}:void 0,a=qs(n,{inUrl:r.inUrl}),i=a.get(e),o=a.params,l=a.set,s=j.useCallback((c,f)=>{const h=f&&f.replace!==void 0?f.replace:!!r.replace,v=typeof c=="function"?aU(a.inUrl?iU(o,a.browserBacked):o,e,r.default):null;l({[e]:typeof c=="function"?c(v):c},{replace:h})},[l,o,a.inUrl,a.browserBacked,e,r.default,r.replace]);return[i,s]}function oU(e,t,r,n){n=n||0;for(var a=r[n+1],i=a?a.key:null,o=[],l=n+1;r[l];)l===n+1&&o.push(r[l].key),l++;for(var s=new Map,c=0;c<e.length;c++)s.set(e[c].id,e[c]);for(var f=new Map,c=0;c<t.length;c++){var h=t[c],v=h._tempId||h.id;f.set(v,h)}var p=[];return f.forEach(function(m){var y=!!m._tempId||!m.id;if(y)p.push(lU(m,i));else{var x=s.get(m.id);if(!x)return;var b=Yte(x,m,o),w=null;if(i){var C=x[i]||[],A=m[i]||[],M=oU(C,A,r,n+1);M.length>0&&(w=M)}if(b||w){var R=b?Object.assign({id:m.id},b):{id:m.id};w&&(R[i]=w),p.push(R)}}}),s.forEach(function(m,y){f.has(y)||p.push({id:y,deleted:!0})}),p}function lU(e,t){for(var r={},n=Object.keys(e),a=0;a<n.length;a++){var i=n[a];i!=="_tempId"&&(i===t&&Array.isArray(e[i])?r[i]=e[i].map(function(o){return lU(o,null)}):r[i]=e[i])}return r}function Yte(e,t,r){for(var n=null,a=Object.keys(t),i=0;i<a.length;i++){var o=a[i];o==="id"||o==="_tempId"||r.indexOf(o)===-1&&t[o]!==e[o]&&(n||(n={}),n[o]=t[o])}return n}function $te(e){return e?{row:e+"Row",edit:e+"Edit"}:null}function oo(e){if(!e)return null;var t=e._tempId||e.id;return t==null||t===""?null:t}function AS(e,t){if(t==null||t===""||!e)return null;for(var r=String(t),n=0;n<e.length;n++){var a=oo(e[n]);if(a!==null&&String(a)===r)return e[n]}return null}var sU={view:!0,edit:!0,add:!0,copy:!0};function Wte(e){if(!e||!sU[e.mode])return null;var t=[];if(e.path&&e.path.length){t.push(e.rootId);for(var r=0;r<e.path.length;r++)t.push(e.path[r])}if(e.mode!=="add"){if(e.id===void 0||e.id===null||e.id==="")return null;t.push(e.id)}return t.length===0?e.mode:e.mode+":"+t.map(function(n){return encodeURIComponent(String(n))}).join("/")}function qte(e){if(!e||typeof e!="string")return null;var t=e.indexOf(":"),r=t===-1?e:e.slice(0,t);if(!sU[r])return null;var n=t===-1?[]:e.slice(t+1).split("/").map(Xte);if(n.some(function(i){return i===null||i===""}))return null;var a=null;if(r!=="add"){if(n.length===0)return null;a=n.pop()}return n.length===0?{mode:r,id:a,rootId:null,path:null}:n.length<2||(n.length-1)%2!==1?null:{mode:r,id:a,rootId:n[0],path:n.slice(1)}}function Xte(e){try{return decodeURIComponent(e)}catch{return null}}function Zte(e,t){if(!t)return null;if(!t.path)return{rows:e||[],context:{level:"parent"}};var r=AS(e,t.rootId);if(!r)return null;for(var n=[],a=r,i=0;i<t.path.length;i++)if(i%2===0)n.push(t.path[i]),a=a?a[t.path[i]]:null;else{var o=Array.isArray(a)?AS(a,t.path[i]):null;if(!o)return null;n.push(oo(o)),a=o}return Array.isArray(a)||(a=[]),{rows:a,context:{level:"nested",rootId:oo(r),path:n}}}function Kte(e){var t=e.onCommit||null,r=e.schema||{},n=e.data||[],a=!!t,i=a,o=a;r[1]&&r[1].key;var l=j.useRef(0);function s(){return l.current++,"__new_"+l.current}var[c,f]=j.useState([]),h=c.length,v=h>0,p=j.useMemo(function(){if(c.length===0)return n;for(var ce=new Map,Ce=[],Ae=0;Ae<n.length;Ae++)ce.set(n[Ae].id,Ph(n[Ae])),Ce.push(n[Ae].id);for(var Xe=0;Xe<c.length;Xe++){var Ge=c[Xe];if(Ge.type==="save"){var ut=Ge.record,zt=ut._tempId||ut.id;if(ce.has(zt)){var yr=ce.get(zt),Vt=Object.assign({},ut);uU(yr,Vt),ce.set(zt,Vt)}else ce.set(zt,Ph(ut)),Ce.push(zt)}else if(Ge.type==="delete")for(var or=0;or<Ge.ids.length;or++){ce.delete(Ge.ids[or]);var Wt=Ce.indexOf(Ge.ids[or]);Wt!==-1&&Ce.splice(Wt,1)}else if(Ge.type==="nested-save"){var Rt=ce.get(Ge.rootId);if(!Rt)continue;Rt=Ph(Rt),Qte(Rt,Ge.path,Ge.record),ce.set(Ge.rootId,Rt)}else if(Ge.type==="nested-delete"){var Qn=ce.get(Ge.rootId);if(!Qn)continue;Qn=Ph(Qn),Jte(Qn,Ge.path,Ge.ids),ce.set(Ge.rootId,Qn)}}for(var Zr=[],Fr=0;Fr<Ce.length;Fr++){var bn=ce.get(Ce[Fr]);bn&&Zr.push(bn)}return Zr},[n,c]),[m,y]=j.useState(new Set),x=j.useCallback(function(ce){y(function(Ce){var Ae=new Set(Ce);return Ae.has(ce)?Ae.delete(ce):Ae.add(ce),Ae})},[]),b=j.useCallback(function(ce){y(function(Ce){var Ae=ce.length>0&&ce.every(function(Xe){return Ce.has(Xe)});return Ae?new Set:new Set(ce)})},[]),w=j.useCallback(function(){y(new Set)},[]),[C,A]=j.useState(new Set),M=j.useCallback(function(ce){A(function(Ce){var Ae=new Set(Ce);return Ae.has(ce)?Ae.delete(ce):Ae.add(ce),Ae})},[]),R=$te(e.urlKey),E=!!R,[N,L]=Zj(E?R.row:"row",{inUrl:E}),O=j.useMemo(function(){return AS(p,N)},[p,N]),I=j.useCallback(function(ce){L(oo(ce))},[L]),z=j.useCallback(function(){L(null)},[L]),[V,Y]=Zj(E?R.edit:"edit",{inUrl:E}),[H,F]=j.useState({value:null,record:null}),X=j.useMemo(function(){var ce=qte(V),Ce=Zte(p,ce);if(!Ce)return null;var Ae;if(ce.mode==="add"){var Xe=Ce.context.path?(Ce.context.path.length+1)/2:0;Ae=tre(r,Xe,Xe===0?n:Ce.rows)}else{var Ge=AS(Ce.rows,ce.id);if(!Ge)return null;Ae=Object.assign({},Ge),ce.mode==="copy"&&(Ae.id="",delete Ae._tempId)}return{mode:ce.mode==="copy"?"add":ce.mode,record:Ae,context:Ce.context}},[V,p,r,n]),P=!!X&&H.value===V&&!!H.record,q=X?{mode:X.mode,record:P?H.record:X.record,context:X.context}:{mode:null,record:null,context:null},G=j.useCallback(function(ce){F({value:null,record:null}),Y(Wte(ce),{replace:!!V})},[Y,V]),W=j.useCallback(function(ce){G({mode:"view",id:oo(ce)})},[G]),Z=j.useCallback(function(ce){G({mode:"edit",id:oo(ce)})},[G]),Q=j.useCallback(function(ce){G({mode:"copy",id:oo(ce)})},[G]),U=j.useCallback(function(){G({mode:"add"})},[G]),K=j.useCallback(function(ce,Ce,Ae){G({mode:"view",rootId:ce,path:Ce,id:oo(Ae)})},[G]),se=j.useCallback(function(ce,Ce,Ae){G({mode:"edit",rootId:ce,path:Ce,id:oo(Ae)})},[G]),ge=j.useCallback(function(ce,Ce,Ae){G({mode:"copy",rootId:ce,path:Ce,id:oo(Ae)})},[G]),ue=j.useCallback(function(ce,Ce){G({mode:"add",rootId:ce,path:Ce})},[G]),de=j.useCallback(function(){F({value:null,record:null}),Y(null)},[Y]),me=X?X.record:null,ae=j.useCallback(function(ce,Ce){F(function(Ae){var Xe=Ae.value===V&&Ae.record?Ae.record:me;if(!Xe)return Ae;var Ge=Object.assign({},Xe);return Ge[ce]=Ce,{value:V,record:Ge}})},[V,me]),ye=j.useCallback(function(){if(!(!q.record||!q.context)){var ce=Object.assign({},q.record),Ce=q.context;!ce.id&&!ce._tempId&&(ce._tempId=s()),Ce.level==="parent"?f(function(Ae){return Ae.concat({type:"save",record:ce})}):Ce.level==="nested"&&f(function(Ae){return Ae.concat({type:"nested-save",rootId:Ce.rootId,path:Ce.path,record:ce})}),de()}},[q.record,q.context,de]),nt=j.useCallback(function(ce){f(function(Ce){return Ce.concat({type:"delete",ids:[ce]})}),y(function(Ce){if(!Ce.has(ce))return Ce;var Ae=new Set(Ce);return Ae.delete(ce),Ae})},[]),be=j.useCallback(function(){if(m.size!==0){var ce=Array.from(m);f(function(Ce){return Ce.concat({type:"delete",ids:ce})}),w()}},[m,w]),Te=j.useCallback(function(ce,Ce,Ae){f(function(Xe){return Xe.concat({type:"nested-delete",rootId:ce,path:Ce,ids:[Ae]})})},[]),[Me,Oe]=j.useState(!1),Ye=j.useCallback(function(){if(!(c.length===0||!t)){var ce=oU(n,p,r,0);if(ce.length===0){f([]);return}Oe(!0),Promise.resolve(t(ce)).then(function(){Oe(!1),f([]),w()}).catch(function(){Oe(!1)})}},[c,n,p,r,t,w]),_e=j.useCallback(function(){f([]),w(),A(new Set)},[w]);return{hasActions:a,hasSave:i,hasDelete:o,queue:c,pendingCount:h,hasPending:v,stagedData:p,selectedIds:m,toggleSelect:x,toggleSelectAll:b,clearSelection:w,expandedIds:C,toggleExpand:M,detailRow:O,openDetail:I,closeDetail:z,modal:q,openView:W,openEdit:Z,openCopy:Q,openAdd:U,openNestedView:K,openNestedEdit:se,openNestedCopy:ge,openNestedAdd:ue,closeModal:de,updateField:ae,handleSave:ye,handleDeleteRow:nt,handleDeleteSelected:be,handleNestedDelete:Te,handleCommit:Ye,handleDiscard:_e,committing:Me,schema:r}}function Ph(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(Ph);for(var t={},r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=Ph(e[r[n]]);return t}function uU(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)Array.isArray(e[r[n]])&&!t[r[n]]&&(t[r[n]]=e[r[n]])}function Qte(e,t,r){var n=Y2(e,t);if(n){for(var a=r._tempId||r.id,i=!1,o=0;o<n.length;o++){var l=n[o]._tempId||n[o].id;if(l===a){var s=Object.assign({},r);uU(n[o],s),n[o]=s,i=!0;break}}i||n.push(Object.assign({},r))}}function Jte(e,t,r){var n=Y2(e,t);if(n){var a=ere(e,t);a&&(a.obj[a.key]=n.filter(function(i){var o=i._tempId||i.id;return r.indexOf(o)===-1}))}}function Y2(e,t){for(var r=e,n=0;n<t.length;n++)if(n%2===0){if(r=r[t[n]],!r)return null}else{for(var a=t[n],i=null,o=0;o<r.length;o++)if((r[o]._tempId||r[o].id)===a){i=r[o];break}if(!i)return null;r=i}return r}function ere(e,t){if(t.length===1)return{obj:e,key:t[0]};var r=t.slice(0,t.length-1),n=Y2(e,r);return n?{obj:n,key:t[t.length-1]}:null}function tre(e,t,r){var n={id:""},a=e[t];if(r&&r.length>0)for(var i=Object.keys(r[0]),o=0;o<i.length;o++){var l=i[o];l!=="_tempId"&&(Array.isArray(r[0][l])?n[l]=[]:n[l]="")}else if(a&&a.columns)for(var o=0;o<a.columns.length;o++)n[a.columns[o].accessor]="";return n.id="",n}var rre="natural",nre="shrunk",are="floor",ire="pinned";function ore(e,t){if(!e||!(t>0))return null;var r={};return Object.keys(e).forEach(function(n){var a=e[n];typeof a!="number"||!isFinite(a)||a<=0||(r[n]=Math.round(a/100*t))}),r}function lre(e,t){if(!e)return null;var r=e[t];return typeof r!="number"||!isFinite(r)||r<=0?null:Math.ceil(r)}function Kj(e){if(!e)return"";for(var t=String(e).split(/\s+/),r="",n=0;n<t.length;n++)t[n].length>r.length&&(r=t[n]);return r}function Qj(e,t,r){return e<t?t:e>r?r:e}function sre(e){var t=e.columns||[],r=e.rows||[],n=e.measure,a=e.cellPadding||0,i=e.headerPadding||0,o=e.minWidth||0,l=e.maxWidth||1/0,s=e.maxFloor||l;return t.map(function(c,f){var h=lre(e.overrides,f);if(h!==null)return{key:e.keyOf(c),natural:h,floor:h,pinned:!0};for(var v=e.headerOf(c)||"",p=n(v,e.headerFont)+i,m=n(Kj(v),e.headerFont)+i,y=0;y<r.length;y++){var x=e.textOf(r[y],c);if(!(x==null||x==="")){x=String(x);var b=n(x,e.bodyFont)+a;b>p&&(p=b);var w=Kj(x),C=w.length===x.length?b:n(w,e.bodyFont)+a;C>m&&(m=C)}}return p=Qj(Math.ceil(p),o,l),m=Qj(Math.ceil(m),o,Math.min(s,p)),{key:e.keyOf(c),natural:p,floor:m}})}function cU(e,t){if(e=e||[],!e.length)return{widths:[],tableWidth:0,blankWidth:Math.max(0,t||0),overflow:!1,decisions:[]};for(var r=0,n=[],a=[],i=0;i<e.length;i++){if(e[i].pinned){r+=e[i].natural;continue}n.push(e[i]),a.push(i)}if(r>0){var o=t>0,l=o?t-r:t;if(o&&l<=0){var s=e.map(function(N){return N.pinned?N.natural:N.floor});return QC(e,s,t,!0)}for(var c=cU(n,l),f=new Array(e.length),h=0;h<e.length;h++)e[h].pinned&&(f[h]=e[h].natural);for(var v=0;v<a.length;v++)f[a[v]]=c.widths[v];return QC(e,f,t,c.overflow)}for(var p=0,m=0,y=0;y<e.length;y++)p+=e[y].natural,m+=e[y].floor;var x,b=!1;if(!t||t<=0||p<=t)x=e.map(function(N){return N.natural});else if(m>=t)x=e.map(function(N){return N.floor}),b=!0;else{var w=t-m,C=p-m,A=0;x=e.map(function(N){var L=Math.floor(N.floor+(N.natural-N.floor)/C*w);return L>N.natural&&(L=N.natural),A+=L,L});var M=t-A;if(M>0){for(var R=0,E=1;E<e.length;E++)e[E].natural-x[E]>e[R].natural-x[R]&&(R=E);x[R]+=M,x[R]>e[R].natural&&(x[R]=e[R].natural)}}return QC(e,x,t,b)}function QC(e,t,r,n){for(var a=0,i=0;i<t.length;i++)a+=t[i];var o=e.map(function(l,s){var c=t[s],f=rre;return l.pinned?f=ire:n&&c<=l.floor&&l.floor<l.natural?f=are:c<l.natural&&(f=nre),{key:l.key,natural:l.natural,floor:l.floor,width:c,reason:f}});return{widths:t,tableWidth:a,blankWidth:r>0?Math.max(0,r-a):0,overflow:n,decisions:o}}var Jj="@@body-fonts@@",ure=3,b0={sampleRows:200,minWidth:40,maxWidth:420,maxFloor:220},JC=null;function cre(){if(typeof document>"u")return null;JC||(JC=document.createElement("canvas"));var e=JC.getContext("2d");if(!e)return null;var t=new Map;return function(n,a){if(!n)return 0;var i=a+""+n,o=t.get(i);if(o!==void 0)return o;e.font=a;var l=e.measureText(n).width;return t.set(i,l),l}}function eB(e){return(e.fontStyle&&e.fontStyle!=="normal"?e.fontStyle+" ":"")+(e.fontWeight||400)+" "+(e.fontSize||"14px")+" "+(e.fontFamily||"sans-serif")}function fre(e,t,r,n){for(var a=[t,e.length],i=0;i<e.length;i++)a.push(e[i].accessor,e[i].header||"");return a.push(typeof r=="object"?JSON.stringify(r):String(r)),a.push(n?JSON.stringify(n):""),a.join("")}function hre(e,t){if(!e||!t||e.tableWidth!==t.tableWidth||e.widths.length!==t.widths.length)return!1;for(var r=0;r<e.widths.length;r++)if(e.widths[r]!==t.widths[r])return!1;return!0}function tB(e){if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.paddingLeft||0)+parseFloat(t.paddingRight||0)+parseFloat(t.borderLeftWidth||0)+parseFloat(t.borderRightWidth||0)}function dre(e){var t=!!e.enabled,r=e.data,n=e.columns,a=e.sizingKey,i=e.onSizing,o=e.sampleRows||b0.sampleRows,l=e.columnWidths,s=j.useRef(null),c=j.useRef(null),f=j.useRef(0),h=j.useRef(null),v=j.useRef(null),p=j.useRef(null),[m,y]=j.useState(0),[x,b]=j.useState(null),w=e.columnText,C=j.useCallback(function(A,M){if(w)return w(A,M);var R=A?A[M.accessor]:null;return R==null?"":String(R)},[w]);return j.useLayoutEffect(function(){if(!t)return;var A=s.current;if(!A||typeof ResizeObserver>"u")return;function M(){var E=A.clientWidth;Math.abs(E-f.current)<2||(f.current=E,y(E))}M();var R=new ResizeObserver(M);return R.observe(A),function(){R.disconnect()}},[t]),j.useLayoutEffect(function(){if(!t||!m||!n||!n.length){p.current&&(p.current=null,b(null));return}var A=cre(),M=c.current;if(!(!A||!M)){var R=fre(n,m,a,l);if(!(R===h.current&&r===v.current&&p.current)){h.current=R,v.current=r;for(var E=M.querySelector("tbody .xeplr-table-td"),N=M.querySelector("thead .xeplr-table-header-cell"),L=eB(window.getComputedStyle(N||E||M)),O=[],I=M.querySelectorAll("tbody tr .xeplr-table-td:first-child"),z=0;z<I.length&&O.length<ure;z++){var V=eB(window.getComputedStyle(I[z]));O.indexOf(V)===-1&&O.push(V)}O.length||O.push(L);var Y=function(U,K){if(K!==Jj)return A(U,K);for(var se=0,ge=0;ge<O.length;ge++){var ue=A(U,O[ge]);ue>se&&(se=ue)}return se},H=tB(N),F=M.querySelector("thead .xeplr-table-filter-trigger");F?H+=F.offsetWidth+4:H+=16;var X={},P=0;["expand","checkbox","actions"].forEach(function(U){var K=M.querySelector("thead .xeplr-table-th-"+U);if(K){var se=Math.ceil(K.offsetWidth);X[U]=se,P+=se}});var q=r&&r.length>o?r.slice(0,o):r||[],G=m-P,W=ore(l,G),Z=sre({columns:n,rows:q,textOf:C,headerOf:function(U){return U.header||U.accessor},keyOf:function(U){return U.accessor},measure:Y,bodyFont:Jj,headerFont:L,cellPadding:tB(E)||25,headerPadding:H,minWidth:e.minColumnWidth||b0.minWidth,maxWidth:e.maxColumnWidth||b0.maxWidth,maxFloor:e.maxFloorWidth||b0.maxFloor,overrides:W}),Q=cU(Z,m-P);Q.extraWidths=X,Q.tableWidth+=P,!hre(Q,p.current)&&(p.current=Q,b(Q),i&&i(Q))}}},[t,m,r,n,C,o,a,l,e.minColumnWidth,e.maxColumnWidth,e.maxFloorWidth]),{scrollRef:s,tableRef:c,sizing:t?x:null}}var vre=60,pre=140,gre=6;function mre(e,t){return t==="off"?!1:t==="on"?e>0:e>vre}function yre(e){var t=e.widths||[],r=t.length;if(!r)return{start:0,end:0,before:0,after:0};for(var n=e.overscan===void 0?gre:e.overscan,a=e.viewportWidth>0?e.viewportWidth:1600,i=Math.max(0,(e.scrollLeft||0)-(e.leadingWidth||0)),o=i+a,l=0,s=r-1,c=r-1,f=!1,h=0;h<r;h++){var v=t[h]||0;if(!f&&l+v>i&&(s=h,f=!0),l>=o){c=h-1;break}l+=v}f||(s=r-1),c<s&&(c=s);for(var p=Math.max(0,s-n),m=Math.min(r,c+1+n),y=0,x=0,b=0;b<p;b++)y+=t[b]||0;for(var w=m;w<r;w++)x+=t[w]||0;return{start:p,end:m,before:y,after:x}}function xre(e,t,r){for(var n=[],a=0,i=0;i<e.length;i++){var o=e[i].colSpan||1,l=Math.max(a,t),s=Math.min(a+o,r);s>l&&n.push({header:e[i],colSpan:s-l}),a+=o}return n}function Sre({cell:e,anchorRect:t,font:r,onClose:n}){var a=j.useRef(null);return j.useLayoutEffect(function(){var i=a.current;if(!(!i||!t)){var o=8,l=i.getBoundingClientRect(),s=t.left,c=t.top;s+l.width>window.innerWidth-o&&(s=window.innerWidth-l.width-o),c+l.height>window.innerHeight-o&&(c=t.bottom-l.height),i.style.left=Math.max(o,s)+"px",i.style.top=Math.max(o,c)+"px",i.focus()}},[t]),j.useEffect(function(){function i(l){l.key==="Escape"&&n()}function o(l){a.current&&!a.current.contains(l.target)&&n()}return document.addEventListener("keydown",i),document.addEventListener("mousedown",o),window.addEventListener("scroll",n,!0),function(){document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),window.removeEventListener("scroll",n,!0)}},[n]),_.jsxs("div",{ref:a,className:"xeplr-table-cell-zoom",role:"dialog","aria-label":"Enlarged cell",tabIndex:-1,style:{minWidth:t?Math.min(t.width,320)+"px":void 0,fontSize:r?r.fontSize:void 0,fontFamily:r?r.fontFamily:void 0},children:[_.jsx("div",{className:"xeplr-table-cell-zoom-label",children:String(e.column.columnDef.header||"")}),_.jsx("div",{className:"xeplr-table-cell-zoom-value",children:fM(e.column.columnDef.cell,e.getContext())})]})}function fU(e){var t=e.row,r=e.hasSave,n=e.hasDelete,a=e.onView,i=e.onCopy,o=e.onEdit,l=e.onDelete,s=e.rowActions;return s&&s.length>0?_.jsx("div",{className:"xeplr-table-actions-cell",children:s.map(function(c){if(c.visible&&!c.visible(t))return null;var f=c.disabled?c.disabled(t):!1,h="xeplr-table-action-btn xeplr-table-action-"+c.key+(c.icon?"":" xeplr-table-action-label")+(c.variant?" xeplr-table-action-"+c.variant:"");return _.jsx("button",{type:"button",className:h,title:c.label,disabled:f,onClick:function(){c.onClick(t)},children:c.icon||c.label},c.key)})}):_.jsxs("div",{className:"xeplr-table-actions-cell",children:[_.jsx("button",{type:"button",className:"xeplr-table-action-btn xeplr-table-action-view",title:"View",onClick:function(){a(t)},children:_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),_.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),r&&_.jsx("button",{type:"button",className:"xeplr-table-action-btn xeplr-table-action-copy",title:"Copy",onClick:function(){i(t)},children:_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),_.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}),r&&_.jsx("button",{type:"button",className:"xeplr-table-action-btn xeplr-table-action-edit",title:"Edit",onClick:function(){o(t)},children:_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"}),_.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"})]})}),n&&_.jsx("button",{type:"button",className:"xeplr-table-action-btn xeplr-table-action-delete",title:"Delete",onClick:function(){l(t.id)},children:_.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("polyline",{points:"3 6 5 6 21 6"}),_.jsx("path",{d:"M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"}),_.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),_.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]})}var rB=new Set(["if","typeof","is","not","in","then","return","and","or","null","starts","ends","with","contains","contain","does","between"]);function bre(e){for(var t=[],r=0;r<e.length;){if(/\s/.test(e[r])){r++;continue}if(e[r]==="$"){for(var n="";r<e.length&&/[a-zA-Z0-9_.$]/.test(e[r]);)n+=e[r++];t.push({type:"PATH",value:n});continue}if(e[r]===">"&&e[r+1]==="="){t.push({type:"OP",value:">="}),r+=2;continue}if(e[r]===">"){t.push({type:"OP",value:">"}),r++;continue}if(e[r]==="<"&&e[r+1]==="="){t.push({type:"OP",value:"<="}),r+=2;continue}if(e[r]==="<"){t.push({type:"OP",value:"<"}),r++;continue}if(e[r]==="["){r++;for(var a="";r<e.length&&e[r]!=="]";)a+=e[r++];r<e.length&&r++,t.push({type:"ARRAY",value:a.split(",").map(function(f){return f.trim()}).filter(Boolean)});continue}if(e[r]==="'"||e[r]==='"'){for(var i=e[r++],o="";r<e.length&&e[r]!==i;)o+=e[r++];r<e.length&&r++,t.push({type:"STRING",value:o});continue}if(/[0-9]/.test(e[r])||e[r]==="-"&&r+1<e.length&&/[0-9]/.test(e[r+1])){var l="";for(e[r]==="-"&&(l+=e[r++]);r<e.length&&/[0-9.]/.test(e[r]);)l+=e[r++];t.push({type:"NUMBER",value:Number(l)});continue}if(/[a-zA-Z_]/.test(e[r])){for(var s="";r<e.length&&/[a-zA-Z0-9_]/.test(e[r]);)s+=e[r++];var c=s.toLowerCase();t.push({type:rB.has(c)?"KEYWORD":"IDENTIFIER",value:rB.has(c)?c:s});continue}r++}return t}function _re(e){var t=bre(e),r=0;function n(){return t[r]||null}function a(){return t[r++]}var i=n();if(!i||i.type!=="PATH")throw new Error('Condition must start with a $-path, e.g. "$.field is active"');a();var o,l=n();if(l&&l.type==="OP")o=a().value;else if(l&&l.type==="KEYWORD"&&l.value==="is"){a();var s=!1;n()&&n().type==="KEYWORD"&&n().value==="not"&&(a(),s=!0),n()&&n().type==="KEYWORD"&&n().value==="null"?(a(),o=s?"is_not_null":"is_null"):(o="is",s&&(o="is_not"))}else if(l&&l.type==="KEYWORD"&&l.value==="not")if(a(),n()&&n().type==="KEYWORD"&&n().value==="in")a(),o="not_in";else if(n()&&n().type==="KEYWORD"&&(n().value==="contains"||n().value==="contain"))a(),o="not_contains";else throw new Error('Expected "in" or "contains" after "not"');else if(l&&l.type==="KEYWORD"&&l.value==="in")a(),o="in";else if(l&&l.type==="KEYWORD"&&l.value==="starts")a(),n()&&n().value==="with"&&a(),o="starts_with";else if(l&&l.type==="KEYWORD"&&l.value==="ends")a(),n()&&n().value==="with"&&a(),o="ends_with";else if(l&&l.type==="KEYWORD"&&l.value==="contains")a(),o="contains";else if(l&&l.type==="KEYWORD"&&l.value==="does")a(),n()&&n().value==="not"&&a(),n()&&(n().value==="contains"||n().value==="contain")&&a(),o="not_contains";else if(l&&l.type==="KEYWORD"&&l.value==="between")a(),o="between";else throw new Error("Expected operator after path, got: "+(l?l.value:"end of input"));var c=null,f=null;if(o!=="is_null"&&o!=="is_not_null"){var h=n();if(h&&(h.type==="STRING"||h.type==="NUMBER"||h.type==="IDENTIFIER"||h.type==="ARRAY")&&(c=a().value),o==="between"&&n()&&n().type==="KEYWORD"&&n().value==="and"){a();var v=n();v&&(v.type==="NUMBER"||v.type==="STRING"||v.type==="IDENTIFIER")&&(f=a().value)}}return{lhs:i.value,op:o,rhs:c,rhsTo:f}}function rp(e){return typeof e=="number"?e:typeof e=="string"&&!isNaN(e)&&e!==""?Number(e):e}function wre(e,t){for(var r=e.replace(/^\$\.?/,"").split("."),n=t,a=0;a<r.length;a++)if(r[a]){if(n==null)return;n=n[r[a]]}return n}function Cre(e,t){var r=wre(e.lhs,t),n=rp(r),a=rp(e.rhs);switch(e.op){case"is":return n===a;case"is_not":return n!==a;case"is_null":return r==null||r==="";case"is_not_null":return r!=null&&r!=="";case">":return n>a;case"<":return n<a;case">=":return n>=a;case"<=":return n<=a;case"between":{var i=rp(e.rhsTo);return i==null?n>=a:n>=a&&n<=i}case"in":{var o=Array.isArray(e.rhs)?e.rhs:[e.rhs];return o.some(function(s){return rp(s)===n})}case"not_in":{var l=Array.isArray(e.rhs)?e.rhs:[e.rhs];return!l.some(function(s){return rp(s)===n})}case"starts_with":return r!=null&&String(r).toLowerCase().startsWith(String(e.rhs).toLowerCase());case"ends_with":return r!=null&&String(r).toLowerCase().endsWith(String(e.rhs).toLowerCase());case"contains":return r!=null&&String(r).toLowerCase().includes(String(e.rhs).toLowerCase());case"not_contains":return r!=null&&!String(r).toLowerCase().includes(String(e.rhs).toLowerCase());default:return!1}}var nB=new Map;function Tre(e){var t=nB.get(e);if(t)return t;var r=_re(e);return nB.set(e,r),r}function hU(e,t,r,n){if(!t)return null;if(typeof t=="function")return t(e,n)||null;if(!Array.isArray(t)||t.length===0)return null;var a=n?Object.assign({},n):{};a[r]=e;for(var i=0;i<t.length;i++){var o=t[i];if(o.when){var l=Tre(o.when);if(Cre(l,a))return Are(o)}}return null}function Are(e){for(var t={},r=Object.keys(e),n=0;n<r.length;n++)r[n]!=="when"&&(t[r[n]]=e[r[n]]);return Object.keys(t).length>0?t:null}function $2(e){var t=e.rootId,r=e.path,n=e.schemaLevel,a=e.schema,i=e.rows||[],o=e.actions,l=a[n];if(!l)return null;var s=l.columns||[],c=l.header||l.key,f=a[n+1],h=f?f.key:null;function v(p){return p._tempId||p.id}return _.jsxs("div",{className:"xeplr-table-child-container",children:[_.jsxs("div",{className:"xeplr-table-child-header",children:[_.jsx("span",{className:"xeplr-table-child-title",children:c}),o.hasSave&&_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn xeplr-table-toolbar-btn-add xeplr-table-child-add",onClick:function(){o.openNestedAdd(t,r,n)},children:"+ Add"})]}),_.jsxs("table",{className:"xeplr-table xeplr-table-child",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[h&&_.jsx("th",{className:"xeplr-table-th xeplr-table-th-expand"}),s.map(function(p){return _.jsx("th",{className:"xeplr-table-th",children:_.jsx("div",{className:"xeplr-table-header-cell",children:_.jsx("span",{className:"xeplr-table-header-label",children:p.header||p.accessor})})},p.accessor)}),_.jsx("th",{className:"xeplr-table-th xeplr-table-th-actions",children:_.jsx("div",{className:"xeplr-table-header-cell",children:_.jsx("span",{className:"xeplr-table-header-label",children:"Actions"})})})]})}),_.jsxs("tbody",{children:[i.length===0&&_.jsx("tr",{children:_.jsxs("td",{className:"xeplr-table-empty",colSpan:s.length+(h?2:1),children:["No ",c.toLowerCase()]})}),i.map(function(p){var m=v(p),y=!!p._tempId,x=o.expandedIds.has(m),b=[];if(b.push(_.jsxs("tr",{className:"xeplr-table-row"+(y?" xeplr-table-row-new":""),children:[h&&_.jsx("td",{className:"xeplr-table-td xeplr-table-td-expand",children:_.jsx("button",{type:"button",className:"xeplr-table-expand-btn"+(x?" expanded":""),onClick:function(){o.toggleExpand(m)},children:"▸"})}),s.map(function(C){var A=p[C.accessor],M=C.cellStyle,R=M?hU(A,M,C.accessor,p):null,E=A;return C.cell?E=C.cell({getValue:function(){return A},row:{original:p}}):E=A!=null?String(A):"",_.jsx("td",{className:"xeplr-table-td",style:R,children:E},C.accessor)}),_.jsx("td",{className:"xeplr-table-td xeplr-table-td-actions",children:_.jsx(fU,{row:p,hasSave:o.hasSave,hasDelete:o.hasDelete,onView:function(){o.openNestedView(t,r,p)},onCopy:function(){o.openNestedCopy(t,r,p)},onEdit:function(){o.openNestedEdit(t,r,p)},onDelete:function(){o.handleNestedDelete(t,r,m)}})})]},m)),x&&h){var w=r.concat([m,h]);b.push(_.jsx("tr",{className:"xeplr-table-row-expanded",children:_.jsx("td",{colSpan:s.length+2,className:"xeplr-table-td-expanded",children:_.jsx($2,{rootId:t,path:w,schemaLevel:n+1,schema:a,rows:p[h]||[],actions:o})})},m+"-children"))}return b})]})]})]})}function Dre(e){for(var t=e.mode,r=e.record,n=e.schemaColumns||[],a=e.hasSave,i=e.onFieldChange,o=e.onSave,l=e.onEdit,s=e.onClose,c=t==="view",f=t==="view"?"View Record":t==="edit"?"Edit Record":"Add Record",h={},v=0;v<n.length;v++)h[n[v].accessor]=n[v];var p=[];if(r)for(var m=Object.keys(r),v=0;v<m.length;v++){var y=m[v];if(y!=="_tempId"&&!Array.isArray(r[y])){var x=h[y];p.push({accessor:y,header:x&&x.header||y,dataType:x?x.dataType||"string":b(r[y])})}}function b(A){return typeof A=="number"?"number":typeof A=="boolean"?"boolean":"string"}function w(A){switch(A){case"number":return"number";case"date":return"date";case"boolean":return"checkbox";default:return"text"}}function C(A){A.preventDefault(),o()}return _.jsx("div",{className:"xeplr-table-modal-overlay",onClick:s,children:_.jsxs("div",{className:"xeplr-table-modal",onClick:function(A){A.stopPropagation()},children:[_.jsxs("div",{className:"xeplr-table-modal-header",children:[_.jsx("span",{className:"xeplr-table-modal-title",children:f}),_.jsx("button",{type:"button",className:"xeplr-table-modal-close",onClick:s,children:_.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),_.jsxs("form",{className:"xeplr-table-modal-body",onSubmit:C,children:[p.map(function(A){var M=r[A.accessor],R=w(A.dataType),E=A.accessor==="id",N=c||E;return R==="checkbox"?_.jsxs("div",{className:"xeplr-table-modal-field",children:[_.jsx("label",{className:"xeplr-table-modal-label",children:A.header}),_.jsx("input",{type:"checkbox",className:"xeplr-table-modal-checkbox",checked:!!M,disabled:N,onChange:function(L){i(A.accessor,L.target.checked)}})]},A.accessor):_.jsxs("div",{className:"xeplr-table-modal-field",children:[_.jsxs("label",{className:"xeplr-table-modal-label",children:[A.header,E&&_.jsx("span",{className:"xeplr-table-modal-id-badge",children:"ID"})]}),_.jsx("input",{type:R,className:"xeplr-table-modal-input",value:M??"",disabled:N,onChange:function(L){i(A.accessor,L.target.value)}})]},A.accessor)}),_.jsxs("div",{className:"xeplr-table-modal-footer",children:[c&&a&&_.jsx("button",{type:"button",className:"xeplr-table-modal-btn xeplr-table-modal-btn-primary",onClick:function(){l(r)},children:"Edit"}),!c&&_.jsx("button",{type:"submit",className:"xeplr-table-modal-btn xeplr-table-modal-btn-primary",children:"Save"}),_.jsx("button",{type:"button",className:"xeplr-table-modal-btn",onClick:s,children:c?"Close":"Cancel"})]})]})]})})}function Mre(e){for(var t=e.record,r=e.rootId,n=e.schema,a=e.schemaColumns||[],i=e.hasSave,o=e.actions,l=e.onClose,[s,c]=j.useState(!1),[f,h]=j.useState(null),v={},p=0;p<a.length;p++)v[a[p].accessor]=a[p];for(var m=[],y=1;n[y];)y===1&&m.push(n[y].key),y++;var x=[];if(t)for(var b=Object.keys(t),p=0;p<b.length;p++){var w=b[p];if(w!=="_tempId"&&!Array.isArray(t[w])){var C=v[w];x.push({accessor:w,header:C&&C.header||w,dataType:C?C.dataType||"string":A(t[w])})}}function A(L){return typeof L=="number"?"number":typeof L=="boolean"?"boolean":"string"}function M(L){switch(L){case"number":return"number";case"date":return"date";case"boolean":return"checkbox";default:return"text"}}function R(L,O){h(function(I){var z=Object.assign({},I);return z[L]=O,z})}function E(){o.openEdit(t)}var N=s?f:t;return _.jsx("div",{className:"xeplr-table-modal-overlay",onClick:l,children:_.jsxs("div",{className:"xeplr-table-detail",onClick:function(L){L.stopPropagation()},children:[_.jsxs("div",{className:"xeplr-table-modal-header",children:[_.jsx("span",{className:"xeplr-table-modal-title",children:"Record Detail"}),_.jsx("button",{type:"button",className:"xeplr-table-modal-close",onClick:l,children:_.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),_.jsxs("div",{className:"xeplr-table-detail-body",children:[_.jsx("div",{className:"xeplr-table-detail-fields",children:x.map(function(L){var O=N[L.accessor],I=M(L.dataType),z=L.accessor==="id",V=!s||z;return I==="checkbox"?_.jsxs("div",{className:"xeplr-table-detail-field",children:[_.jsx("span",{className:"xeplr-table-detail-label",children:L.header}),_.jsx("input",{type:"checkbox",className:"xeplr-table-modal-checkbox",checked:!!O,disabled:V,onChange:function(Y){R(L.accessor,Y.target.checked)}})]},L.accessor):_.jsxs("div",{className:"xeplr-table-detail-field",children:[_.jsxs("span",{className:"xeplr-table-detail-label",children:[L.header,z&&_.jsx("span",{className:"xeplr-table-modal-id-badge",children:"ID"})]}),s?_.jsx("input",{type:I,className:"xeplr-table-modal-input",value:O??"",disabled:V,onChange:function(Y){R(L.accessor,Y.target.value)}}):_.jsx("span",{className:"xeplr-table-detail-value",children:O!=null?String(O):"—"})]},L.accessor)})}),_.jsx("div",{className:"xeplr-table-detail-actions",children:!s&&i&&_.jsx("button",{type:"button",className:"xeplr-table-modal-btn xeplr-table-modal-btn-primary",onClick:E,children:"Edit"})}),m.map(function(L){var O=n[1];return!O||O.key!==L?null:_.jsx("div",{className:"xeplr-table-detail-children",children:_.jsx($2,{rootId:r,path:[L],schemaLevel:1,schema:n,rows:t[L]||[],actions:o})},L)})]})]})})}var eT=[100,200,500,1e3];function Rre(e){return!e||eT.indexOf(e)!==-1?eT:[e].concat(eT).sort(function(t,r){return t-r})}var Ere={[Hn.STRING]:vte,[Hn.NUMBER]:yte,[Hn.DATE]:bte,[Hn.BOOLEAN]:wte},aB={POPUP:"popup",INNER:"inner"};function Nre(e){var t=e.nativeEvent&&e.nativeEvent.pointerType;return t?t==="touch"||t==="pen":typeof window<"u"&&!!window.matchMedia&&window.matchMedia("(hover: none)").matches}function Sm(e){var t=e.schema||{},r=t[0]||{},n=r.columns||[],a=t[1],i=a?a.key:null,o=!!i,l=e.childDisplay||aB.POPUP,s=l===aB.INNER,c=o&&!s,f=Kte({onCommit:e.onCommit,schema:t,data:e.data,urlKey:e.urlKey}),{table:h,resetFilters:v,resetSorting:p}=Fte({data:f.hasActions?f.stagedData:e.data,columns:n,minDetectionRows:e.minDetectionRows,pageSize:e.pageSize,enableSorting:e.enableSorting,sorting:e.sorting,onSortingChange:e.onSortingChange,enableFiltering:e.enableFiltering,enablePagination:e.enablePagination}),m=e.enableFiltering!==!1,y=e.enablePagination!==!1,x=h.getHeaderGroups(),b=h.getRowModel().rows,w=j.useRef([]),[C,A]=j.useState([]);j.useLayoutEffect(function(){for(var _e=w.current.slice(0,x.length).map(function(Xe){return Xe?Xe.offsetHeight:0}),ce=[],Ce=0,Ae=0;Ae<_e.length;Ae++)ce.push(Ce),Ce+=_e[Ae];A(ce)},[x.length]);function M(_e){return _e._tempId||_e.id}var R=b.map(function(_e){return M(_e.original)}),E=R.length>0&&R.every(function(_e){return f.selectedIds.has(_e)}),N=o&&s,L=f.hasActions||!!(e.rowActions&&e.rowActions.length>0),O=dre({enabled:e.columnSizing==="content",data:e.data,columns:n,columnText:e.columnText,sizingKey:e.sizingKey,columnWidths:e.columnWidths,onSizing:e.onColumnSizing,sampleRows:e.sizingSampleRows,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth}),I=O.sizing,z=h.getVisibleLeafColumns(),V=mre(z.length,e.columnWindowing),Y=Math.max(pre,e.minColumnWidth||0),H=V?z.map(function(_e,ce){var Ce=I&&I.widths?I.widths[ce]:null;return Ce>0?Ce:Y}):null,[F,X]=j.useState({left:0,width:0});j.useLayoutEffect(function(){if(!V)return;var _e=O.scrollRef.current;if(!_e)return;var ce=0;function Ce(){ce=0;var Ge={left:_e.scrollLeft,width:_e.clientWidth};X(function(ut){return ut.left===Ge.left&&ut.width===Ge.width?ut:Ge})}function Ae(){ce||(ce=requestAnimationFrame(Ce))}Ce(),_e.addEventListener("scroll",Ae,{passive:!0});var Xe=typeof ResizeObserver>"u"?null:new ResizeObserver(Ae);return Xe&&Xe.observe(_e),function(){_e.removeEventListener("scroll",Ae),Xe&&Xe.disconnect(),ce&&cancelAnimationFrame(ce)}},[V,O.scrollRef]);var P=(N?I&&I.extraWidths.expand||36:0)+(f.hasDelete?I&&I.extraWidths.checkbox||40:0),q=L?I&&I.extraWidths.actions||80:0,G=V?yre({widths:H,scrollLeft:F.left,viewportWidth:F.width,leadingWidth:P}):null,W=V?P+q+H.reduce(function(_e,ce){return _e+ce},0):0;function Z(_e){return G?xre(_e.headers,G.start,G.end):_e.headers.map(function(ce){return{header:ce,colSpan:ce.colSpan}})}function Q(_e){var ce=_e.getVisibleCells();return G?ce.slice(G.start,G.end):ce}var U=e.columnClassName,K=j.useCallback(function(_e){if(!U)return"";var ce=n.findIndex(function(Ce){return Ce.accessor===_e});return ce<0?"":U(n[ce],ce)||""},[U,n]),[se,ge]=j.useState(null),ue=j.useCallback(function(){ge(null)},[]),de=!!e.cellZoom&&!c,me={rowCount:h.getFilteredRowModel().rows.length,totalCount:(e.data||[]).length,selectedCount:f.selectedIds.size,resetFilters:v,resetSorting:p,enableFiltering:m},ae=G?G.end-G.start+(G.before>0?1:0)+(G.after>0?1:0)||1:x[0]?.headers.length||1;N&&ae++,f.hasDelete&&ae++,L&&ae++;var ye=n;if(f.modal.context&&f.modal.context.level==="nested"&&f.modal.context.path){var nt=f.modal.context.path.filter(function(_e,ce){return ce%2===0}),be=nt.length;t[be]&&t[be].columns&&(ye=t[be].columns)}function Te(_e){c&&f.openDetail(_e)}function Me(_e,ce){!c||!Nre(_e)||_e.target.closest&&_e.target.closest("button, input, select, textarea, a, label")||f.openDetail(ce)}var Oe=null;if(de&&se){var Ye=b.find(function(_e){return _e.id===se.rowId});Ye&&(Oe=Ye.getVisibleCells().find(function(_e){return _e.column.id===se.columnId})||null)}return _.jsxs("div",{className:"xeplr-table-container"+(e.className?" "+e.className:""),children:[(e.showToolbar!==!1||f.hasSave||f.hasDelete||f.hasPending)&&_.jsxs("div",{className:"xeplr-table-toolbar",children:[f.hasSave&&_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn xeplr-table-toolbar-btn-add",onClick:f.openAdd,children:"+ Add New"}),f.hasDelete&&f.selectedIds.size>0&&_.jsxs("button",{type:"button",className:"xeplr-table-toolbar-btn xeplr-table-toolbar-btn-delete",onClick:f.handleDeleteSelected,children:["Delete Selected (",f.selectedIds.size,")"]}),f.hasPending&&_.jsxs("div",{className:"xeplr-table-toolbar-pending",children:[_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn xeplr-table-toolbar-btn-commit",onClick:f.handleCommit,disabled:f.committing,children:f.committing?"Committing...":"Commit ("+f.pendingCount+")"}),_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn xeplr-table-toolbar-btn-discard",onClick:f.handleDiscard,disabled:f.committing,children:"Discard"})]}),e.toolbarLeading&&e.toolbarLeading(me),_.jsx("div",{className:"xeplr-table-toolbar-spacer"}),e.toolbarActions?e.toolbarActions(me):_.jsxs(_.Fragment,{children:[m&&_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn",onClick:v,children:"Clear Filters"}),_.jsx("button",{type:"button",className:"xeplr-table-toolbar-btn",onClick:p,children:"Clear Sort"})]})]}),_.jsx("div",{className:"xeplr-table-scroll",ref:O.scrollRef,children:_.jsxs("table",{ref:O.tableRef,className:"xeplr-table"+(I||G?" xeplr-table-sized":"")+(G?" xeplr-table-windowed":"")+(e.cellStyle?" xeplr-table-styled":""),style:G?{width:W+"px"}:I?{width:I.tableWidth+"px"}:void 0,children:[G?_.jsxs("colgroup",{children:[N&&_.jsx("col",{style:{width:(I&&I.extraWidths.expand||36)+"px"}}),f.hasDelete&&_.jsx("col",{style:{width:(I&&I.extraWidths.checkbox||40)+"px"}}),G.before>0&&_.jsx("col",{style:{width:G.before+"px"}}),H.slice(G.start,G.end).map(function(_e,ce){var Ce=z[G.start+ce];return _.jsx("col",{style:{width:_e+"px"}},Ce?Ce.id:G.start+ce)}),G.after>0&&_.jsx("col",{style:{width:G.after+"px"}}),L&&_.jsx("col",{style:{width:q+"px"}})]}):I&&_.jsxs("colgroup",{children:[N&&_.jsx("col",{style:{width:(I.extraWidths.expand||36)+"px"}}),f.hasDelete&&_.jsx("col",{style:{width:(I.extraWidths.checkbox||40)+"px"}}),I.widths.map(function(_e,ce){return _.jsx("col",{style:{width:_e+"px"}},n[ce]?n[ce].accessor:ce)}),L&&_.jsx("col",{style:{width:(I.extraWidths.actions||80)+"px"}})]}),_.jsx("thead",{children:x.map(function(_e,ce){var Ce=ce<x.length-1,Ae=C[ce]||0;return _.jsxs("tr",{ref:function(Xe){w.current[ce]=Xe},children:[N&&_.jsx("th",{className:"xeplr-table-th xeplr-table-th-expand",style:{top:Ae}}),f.hasDelete&&_.jsx("th",{className:"xeplr-table-th xeplr-table-th-checkbox",style:{top:Ae},children:_.jsx("input",{type:"checkbox",className:"xeplr-table-checkbox",checked:E,onChange:function(){f.toggleSelectAll(R)}})}),G&&G.before>0&&_.jsx("th",{className:"xeplr-table-th xeplr-table-col-spacer","aria-hidden":"true",style:{top:Ae}}),Z(_e).map(function(Xe){var Ge=Xe.header,ut=Ge.column.getCanSort(),zt=Ge.column.getIsSorted(),yr=Ge.column.columnDef.meta?.dataType||Hn.STRING,Vt=Ere[yr],or=Ge.column.getCanFilter()&&m,Wt=!!(Ge.column.columns&&Ge.column.columns.length),Rt=Ge.column.parent&&Ge.column.parent.columns,Qn=Wt||(Rt?Rt[0].id===Ge.column.id:!1),Zr=Wt||(Rt?Rt[Rt.length-1].id===Ge.column.id:!1),Fr=Wt?"":K(Ge.column.id),bn="xeplr-table-th"+(Fr?" "+Fr:"")+(Wt?" xeplr-table-th-group":"")+(Ce?" xeplr-table-th-row-divider":"")+(Qn?" xeplr-table-th-group-start":"")+(Zr?" xeplr-table-th-group-end":"");return _.jsx("th",{colSpan:Xe.colSpan,className:bn,style:Object.assign({},e.headerStyle?e.headerStyle({columnKey:Ge.column.id,isGroupHeader:Wt,depth:Ge.depth}):null,{top:Ae}),children:_.jsxs("div",{className:"xeplr-table-header-cell",children:[_.jsxs("span",{className:"xeplr-table-header-label"+(e.onHeaderClick?" clickable":ut?" sortable":""),onClick:e.onHeaderClick?function(){e.onHeaderClick(Ge.column.id,Wt)}:ut?Ge.column.getToggleSortingHandler():void 0,children:[Ge.isPlaceholder?null:fM(Ge.column.columnDef.header,Ge.getContext()),zt==="asc"&&_.jsx("span",{className:"xeplr-table-sort-icon",children:" ▲"}),zt==="desc"&&_.jsx("span",{className:"xeplr-table-sort-icon",children:" ▼"})]}),or&&Vt&&_.jsx(Vt,{column:Ge.column})]})},Ge.id)}),G&&G.after>0&&_.jsx("th",{className:"xeplr-table-th xeplr-table-col-spacer","aria-hidden":"true",style:{top:Ae}}),L&&_.jsx("th",{className:"xeplr-table-th xeplr-table-th-actions",style:{top:Ae},children:_.jsx("div",{className:"xeplr-table-header-cell",children:_.jsx("span",{className:"xeplr-table-header-label",children:"Actions"})})})]},_e.id)})}),_.jsxs("tbody",{children:[b.length===0&&_.jsx("tr",{children:_.jsx("td",{className:"xeplr-table-empty",colSpan:ae,children:"No data"})}),b.map(function(_e){var ce=_e.original,Ce=M(ce),Ae=f.selectedIds.has(Ce),Xe=s&&f.expandedIds.has(Ce),Ge=!!ce._tempId,ut="xeplr-table-row";if(e.rowClassName){var zt=e.rowClassName(ce);zt&&(ut+=" "+zt)}Ae&&(ut+=" xeplr-table-row-selected"),Ge&&(ut+=" xeplr-table-row-new"),c&&(ut+=" xeplr-table-row-clickable");var yr=[];return yr.push(_.jsxs("tr",{className:ut,onClick:function(Vt){Me(Vt,ce)},onDoubleClick:function(){Te(ce)},children:[N&&_.jsx("td",{className:"xeplr-table-td xeplr-table-td-expand",children:_.jsx("button",{type:"button",className:"xeplr-table-expand-btn"+(Xe?" expanded":""),onClick:function(){f.toggleExpand(Ce)},children:"▸"})}),f.hasDelete&&_.jsx("td",{className:"xeplr-table-td xeplr-table-td-checkbox",children:_.jsx("input",{type:"checkbox",className:"xeplr-table-checkbox",checked:Ae,onChange:function(){f.toggleSelect(Ce)}})}),G&&G.before>0&&_.jsx("td",{className:"xeplr-table-td xeplr-table-col-spacer","aria-hidden":"true"}),Q(_e).map(function(Vt){var or=Vt.column.columnDef.meta,Wt=or?.cellStyle,Rt=Wt?hU(Vt.getValue(),Wt,Vt.column.id,_e.original):null,Qn=e.cellStyle?e.cellStyle({row:_e.original,rowIndex:_e.index,columnKey:Vt.column.id,value:Vt.getValue()}):null,Zr=Rt||Qn?Object.assign({},Rt,Qn):void 0,Fr=Vt.column.parent&&Vt.column.parent.columns,bn=K(Vt.column.id),tu="xeplr-table-td"+(bn?" "+bn:"")+(Fr&&Fr[0].id===Vt.column.id?" xeplr-table-td-group-start":"")+(Fr&&Fr[Fr.length-1].id===Vt.column.id?" xeplr-table-td-group-end":"");return _.jsx("td",{className:tu,style:Zr,onDoubleClick:de?function(ko){ko.stopPropagation();var gf=window.getComputedStyle(ko.currentTarget);ge({rowId:_e.id,columnId:Vt.column.id,rect:ko.currentTarget.getBoundingClientRect(),font:{fontSize:gf.fontSize,fontFamily:gf.fontFamily}})}:void 0,children:fM(Vt.column.columnDef.cell,Vt.getContext())},Vt.id)}),G&&G.after>0&&_.jsx("td",{className:"xeplr-table-td xeplr-table-col-spacer","aria-hidden":"true"}),L&&_.jsx("td",{className:"xeplr-table-td xeplr-table-td-actions",children:_.jsx(fU,{row:ce,hasSave:f.hasSave,hasDelete:f.hasDelete,rowActions:e.rowActions,onView:function(){c?f.openDetail(ce):f.openView(ce)},onCopy:f.openCopy,onEdit:f.openEdit,onDelete:function(){f.handleDeleteRow(Ce)}})})]},_e.id)),Xe&&o&&yr.push(_.jsx("tr",{className:"xeplr-table-row-expanded",children:_.jsx("td",{colSpan:ae,className:"xeplr-table-td-expanded",children:_.jsx($2,{rootId:Ce,path:[i],schemaLevel:1,schema:t,rows:ce[i]||[],actions:f})})},_e.id+"-children")),yr})]})]})}),y&&_.jsxs("div",{className:"xeplr-table-pagination",children:[_.jsx("button",{type:"button",onClick:function(){h.setPageIndex(0)},disabled:!h.getCanPreviousPage(),children:"««"}),_.jsx("button",{type:"button",onClick:function(){h.previousPage()},disabled:!h.getCanPreviousPage(),children:"«"}),_.jsxs("span",{className:"xeplr-table-page-info",children:["Page ",h.getState().pagination.pageIndex+1," of ",h.getPageCount()]}),_.jsx("button",{type:"button",onClick:function(){h.nextPage()},disabled:!h.getCanNextPage(),children:"»"}),_.jsx("button",{type:"button",onClick:function(){h.setPageIndex(h.getPageCount()-1)},disabled:!h.getCanNextPage(),children:"»»"}),_.jsx("select",{className:"xeplr-table-page-size",value:h.getState().pagination.pageSize,onChange:function(_e){h.setPageSize(Number(_e.target.value))},children:Rre(h.getState().pagination.pageSize).map(function(_e){return _.jsxs("option",{value:_e,children:[_e," rows"]},_e)})}),_.jsxs("span",{className:"xeplr-table-row-count",children:["(",h.getFilteredRowModel().rows.length," total)"]})]}),Oe&&_.jsx(Sre,{cell:Oe,anchorRect:se.rect,font:se.font,onClose:ue}),f.detailRow&&c&&_.jsx(Mre,{record:f.detailRow,rootId:M(f.detailRow),schema:t,schemaColumns:n,hasSave:f.hasSave,actions:f,onClose:f.closeDetail}),f.modal.mode&&_.jsx(Dre,{mode:f.modal.mode,record:f.modal.record,schemaColumns:ye,hasSave:f.hasSave,onFieldChange:f.updateField,onSave:f.handleSave,onEdit:f.modal.context?.level==="nested"?function(_e){f.openNestedEdit(f.modal.context.rootId,f.modal.context.path,_e)}:f.openEdit,onClose:f.closeModal})]})}var ol=["px","em","rem"],Lre=[["inherit","Inherit"],["sans-serif","Sans"],["serif","Serif"],["monospace","Mono"]],Ire=[["400","Regular"],["500","Medium"],["600","Semibold"],["700","Bold"]],Ore=[["none","None"],["solid","Solid"],["dashed","Dashed"],["dotted","Dotted"],["double","Double"]],kre=[{key:"text.color",label:"Text color",type:"color",css:"color"},{key:"text.fontFamily",label:"Font",type:"select",css:"fontFamily",options:Lre},{key:"text.fontSize",label:"Size",type:"length",css:"fontSize",units:ol},{key:"text.fontWeight",label:"Weight",type:"select",css:"fontWeight",options:Ire},{key:"text.fontStyle",label:"Style",type:"select",css:"fontStyle",options:[["normal","Normal"],["italic","Italic"]]},{key:"text.textAlign",label:"Align",type:"select",css:"textAlign",options:[["left","Left"],["center","Center"],["right","Right"],["justify","Justify"]]},{key:"text.verticalAlign",label:"Vertical",type:"select",css:"verticalAlign",options:[["top","Top"],["middle","Middle"],["bottom","Bottom"]]},{key:"text.textTransform",label:"Case",type:"select",css:"textTransform",options:[["none","None"],["uppercase","UPPER"],["lowercase","lower"],["capitalize","Capitalize"]]},{key:"text.textDecoration",label:"Decoration",type:"select",css:"textDecoration",options:[["none","None"],["underline","Underline"],["line-through","Strikethrough"]]},{key:"text.lineHeight",label:"Line height",type:"number",css:"lineHeight",min:.8,max:3,step:.1},{key:"text.letterSpacing",label:"Letter spacing",type:"length",css:"letterSpacing",units:ol},{key:"text.whiteSpace",label:"Wrapping",type:"select",css:"whiteSpace",options:[["normal","Wrap"],["nowrap","No wrap"],["pre-wrap","Preserve"]]}],Pre=[{key:"fill.background",label:"Background",type:"color",css:"background"}],jre=[{key:"box.padding.top",label:"Padding top",type:"length",css:"paddingTop",units:ol},{key:"box.padding.right",label:"Padding right",type:"length",css:"paddingRight",units:ol},{key:"box.padding.bottom",label:"Padding bottom",type:"length",css:"paddingBottom",units:ol},{key:"box.padding.left",label:"Padding left",type:"length",css:"paddingLeft",units:ol},{key:"box.height",label:"Height",type:"length",css:"height",units:ol}],dU=["top","right","bottom","left"];function iB(e){var t="border."+e+".",r=e==="all"?null:e.charAt(0).toUpperCase()+e.slice(1);return[{key:t+"width",label:"Width",type:"length",units:ol,css:r&&"border"+r+"Width",side:e},{key:t+"style",label:"Style",type:"select",options:Ore,css:r&&"border"+r+"Style",side:e},{key:t+"color",label:"Color",type:"color",css:r&&"border"+r+"Color",side:e}]}var Bre=[{key:"border.radius",label:"Radius",type:"length",css:"borderRadius",units:ol}].concat(iB("all")).concat(dU.reduce(function(e,t){return e.concat(iB(t))},[])),zre=[{key:"text",label:"Text",fields:kre},{key:"fill",label:"Fill",fields:Pre},{key:"box",label:"Spacing & size",fields:jre},{key:"border",label:"Border",fields:Bre,expandable:dU}],Vre=zre.reduce(function(e,t){return e.concat(t.fields)},[]),Fre={};Vre.forEach(function(e){Fre[e.key]=e});var lh=null,np=null;function Gre(){return lh||(lh=document.createElement("div"),lh.id="xeplr-confirm-root",document.body.appendChild(lh),lh)}function Hre(e){return np&&np(),new Promise(function(t){var r=Gre();function n(v){document.removeEventListener("keydown",i),r.innerHTML="",np===a&&(np=null),t(v)}function a(){n(e.dismissValue)}np=a;function i(v){if(v.key==="Escape"&&n(e.dismissValue),v.key==="Enter"){for(var p=0;p<e.buttons.length;p++)if(e.buttons[p].isDefault)return n(e.buttons[p].value)}}var o=document.createElement("div");o.style.cssText="position:fixed;inset:0;background:var(--xeplr-bg-overlay,rgba(0,0,0,0.55));z-index:100000;display:flex;align-items:center;justify-content:center;",o.onclick=function(v){v.target===o&&n(e.dismissValue)};var l=document.createElement("div");l.style.cssText="background:var(--xeplr-bg-tertiary,#1a1a1a);color:var(--xeplr-text-primary,#e0e0e0);border:1px solid var(--xeplr-border-primary,#333);border-radius:10px;padding:20px;max-width:420px;width:calc(100% - 40px);font:14px/1.5 system-ui,sans-serif;box-shadow:var(--xeplr-shadow-lg,0 12px 32px rgba(0,0,0,0.4));";var s=document.createElement("div");s.style.cssText="font-size:16px;font-weight:600;margin-bottom:8px;",s.textContent=e.title;var c=document.createElement("div");c.style.cssText="color:var(--xeplr-text-secondary,#bbb);margin-bottom:18px;",c.textContent=e.message;var f=document.createElement("div");f.style.cssText="display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;";var h=null;e.buttons.forEach(function(v){var p=document.createElement("button");if(p.type="button",p.textContent=v.label,v.style==="primary"||v.style==="danger"){var m=v.style==="danger"?"var(--xeplr-danger,#dc2626)":"var(--xeplr-accent,#646cff)";p.style.cssText="padding:8px 14px;border:none;border-radius:6px;background:"+m+";color:var(--xeplr-accent-text,#fff);font-size:13px;font-weight:600;cursor:pointer;"}else p.style.cssText="padding:8px 14px;border:1px solid var(--xeplr-border-primary,#444);border-radius:6px;background:var(--xeplr-bg-secondary,#232323);color:var(--xeplr-text-primary,#e0e0e0);font-size:13px;cursor:pointer;";p.onclick=function(){n(v.value)},f.appendChild(p),h=p}),l.appendChild(s),l.appendChild(c),l.appendChild(f),o.appendChild(l),r.appendChild(o),document.addEventListener("keydown",i),h&&h.focus()})}function W2(e,t){return t=t||{},Hre({title:t.title||"Are you sure?",message:e,dismissValue:!1,buttons:[{label:t.cancelLabel||"Cancel",value:!1,style:"plain"},{label:t.confirmLabel||"Confirm",value:!0,isDefault:!0,style:t.danger?"danger":"primary"}]})}var oB=["float","currency","units"];function Ure(e){if(e==null)return"";var t=String(e),r=t.charAt(0)==="-";t=t.replace(/[^0-9.]/g,"");var n=t.split(".");return n.length>2&&(t=n[0]+"."+n.slice(1).join("")),(r?"-":"")+t}function tT(e){if(e==null||e===""||e==="-")return null;var t=Number(e);return isFinite(t)?t:null}function Yre(e,t){if(e==null||e==="")return"";var r=Number(e);return isFinite(r)?typeof t=="number"?r.toLocaleString(void 0,{minimumFractionDigits:t,maximumFractionDigits:t}):r.toLocaleString():""}function $re(e,t,r){return e===null?{valid:!0}:typeof t=="number"&&e<t?{valid:!1,error:"Value must be at least "+t}:typeof r=="number"&&e>r?{valid:!1,error:"Value must be at most "+r}:{valid:!0}}function Wre(e,t){if(t=t||{},e==="currency"){var r=t.currencies||[];if(r.length===0)throw new Error('[xeplr-ui-utils:NumberField] type="currency" requires a `currencies` prop with at least one entry like { code: "INR", symbol: "₹" }');var n=t.defaultCurrency||r[0].code,a=r.find(function(s){return s.code===n})||r[0];return{list:r,selected:a,position:t.currencyPosition||"before",labelKey:"symbol",valueKey:"code"}}if(e==="units"){var i=t.units||[];if(i.length===0)throw new Error('[xeplr-ui-utils:NumberField] type="units" requires a `units` prop with at least one entry like { value: "kg", label: "kg" }');var o=t.defaultUnit||i[0].value,l=i.find(function(s){return s.value===o})||i[0];return{list:i,selected:l,position:t.unitPosition||"after",labelKey:"label",valueKey:"value"}}return null}function qre(e){e=e||{};var t=e.type||"float";if(oB.indexOf(t)===-1)throw new Error("[xeplr-ui-utils:NumberField] Unknown type: "+t+". Expected one of "+oB.join(", "));var r=j.useMemo(function(){return Wre(t,e)},[t,e.currencies,e.defaultCurrency,e.currencyPosition,e.units,e.defaultUnit,e.unitPosition]),n=e.value!==void 0,a=n?e.value:e.defaultValue!==void 0?e.defaultValue:null,[i,o]=j.useState(a==null?"":String(a)),[l,s]=j.useState(r?r.selected:null),[c,f]=j.useState("");j.useEffect(function(){if(n){var y=e.value===null||e.value===void 0?"":String(e.value);o(y)}},[e.value,n]),j.useEffect(function(){r&&s(r.selected)},[r]);function h(y,x){var b=tT(y),w=$re(b,e.min,e.max);f(w.valid?"":w.error),e.onChange&&e.onChange(b,{affix:x})}function v(y){var x=Ure(y.target.value);n||o(x),h(x,l)}function p(y){var x=y.target.value,b=r.list.find(function(w){return w[r.valueKey]===x});b&&(s(b),h(i,b))}function m(){var y=tT(i);if(y!==null&&typeof e.decimals=="number"){var x=y.toFixed(e.decimals);n||o(x)}}return{type:t,raw:i,numeric:tT(i),error:c,placeholder:e.placeholder,disabled:!!e.disabled,decimals:e.decimals,formatDisplay:Yre,affix:r?{list:r.list,selected:l,position:r.position,labelKey:r.labelKey,valueKey:r.valueKey}:null,handleNumberChange:v,handleAffixChange:p,handleBlur:m}}var Xre=[{selector:'input[inputmode="decimal"], input.xeplr-numberfield-input',label:"Numeric input element"}];function Zre({type:e,raw:t,error:r,placeholder:n,disabled:a,affix:i,handleNumberChange:o,handleAffixChange:l,handleBlur:s}){function c(){return i?i.list.length===1?_.jsx("span",{className:"xeplr-numberfield-affix-static",children:i.selected[i.labelKey]}):_.jsx("select",{className:"xeplr-numberfield-affix-select",value:i.selected[i.valueKey],onChange:l,disabled:a,children:i.list.map(function(v){return _.jsx("option",{value:v[i.valueKey],children:v[i.labelKey]},v[i.valueKey])})}):null}var f=i&&i.position==="before",h=i&&i.position==="after";return _.jsxs("div",{className:"xeplr-numberfield xeplr-numberfield-"+e+(r?" xeplr-numberfield-error":""),children:[_.jsxs("div",{className:"xeplr-numberfield-row",children:[f&&c(),_.jsx("input",{type:"text",inputMode:"decimal",className:"xeplr-numberfield-input",value:t,placeholder:n,disabled:a,onChange:o,onBlur:s}),h&&c()]}),r&&_.jsx("div",{className:"xeplr-numberfield-error-text",children:r})]})}function Kre(e){var t=qre(e),r=i_("NumberFieldPage",Xre);return _.jsx("div",{ref:r,children:_.jsx(Zre,{...t})})}var Qre=4;function lB(e){return String(e).padStart(2,"0")}function $t(e,t,r){return`${e}-${lB(t+1)}-${lB(r)}`}function bg(e,t){return new Date(e,t+1,0).getDate()}const vU=[{key:"today",label:"Today"},{key:"yesterday",label:"Yesterday"},{key:"dby",label:"Day before yesterday"},{key:"last_7_days",label:"Last 7 days"},{key:"last_30_days",label:"Last 30 days"},{key:"current_month",label:"Current month"},{key:"current_mtd",label:"Current month-to-date"},{key:"last_month",label:"Last month"},{key:"current_quarter",label:"Current quarter"},{key:"current_qtd",label:"Current quarter-to-date"},{key:"last_quarter",label:"Last quarter"},{key:"current_calendar_year",label:"Current calendar year"},{key:"current_ytd",label:"Current year-to-date"},{key:"last_calendar_year",label:"Last calendar year"},{key:"current_financial_year",label:"Current financial year"},{key:"current_fytd",label:"Current financial year-to-date"},{key:"last_financial_year",label:"Last financial year"}],Jre=new Map(vU.map(e=>[e.key,e.label])),pU=["january","february","march","april","may","june","july","august","september","october","november","december"];function $x(e){const t=String(e||"").trim();if(!t)return null;let r=/^(\d{4})$/.exec(t);if(r){const n=Number(r[1]);return{from:$t(n,0,1),to:$t(n,11,31)}}if(r=/^(\d{4})[-/](\d{1,2})$/.exec(t),r){const n=Number(r[1]),a=Number(r[2])-1;return a<0||a>11?null:{from:$t(n,a,1),to:$t(n,a,bg(n,a))}}if(r=/^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(t),r){const n=Number(r[1]),a=Number(r[2])-1,i=Number(r[3]);return a<0||a>11?null:{from:$t(n,a,i),to:$t(n,a,i)}}if(r=/^([A-Za-z]+)\s+(\d{4})$/.exec(t),r){const n=pU.findIndex(i=>i.startsWith(r[1].toLowerCase()));if(n===-1)return null;const a=Number(r[2]);return{from:$t(a,n,1),to:$t(a,n,bg(a,n))}}if(r=/^(\d{1,2})[-/](\d{1,2})[-/](\d{4})$/.exec(t),r){const n=Number(r[1]),a=Number(r[2])-1,i=Number(r[3]);return a<0||a>11?null:{from:$t(i,a,n),to:$t(i,a,n)}}return null}function sh(e,t){const r=new Date(e.getFullYear(),e.getMonth(),e.getDate()-t);return $t(r.getFullYear(),r.getMonth(),r.getDate())}function rT(e,t){return{from:$t(e,t,1),to:$t(e,t,bg(e,t))}}function ene(e,t,r){const n=String(e||"").trim().toLowerCase(),a=Number(t)||new Date().getFullYear(),i=2;if(!n)return[];if(/^\d{1,4}$/.test(n)){const v=[];for(let p=a+1;p>=a-6;p--)String(p).startsWith(n)&&v.push({value:String(p),label:String(p),note:"the whole year"});return v.slice(0,8)}const o=/^([a-z]+)\s+(\d{1,4})$/.exec(n),l=o?o[1]:n,s=o?o[2]:null;if(!/^[a-z]+$/.test(l))return[];const c=[];if(pU.forEach((v,p)=>{v.startsWith(l)&&c.push({name:v.charAt(0).toUpperCase()+v.slice(1),index:p})}),!c.length)return[];const f=[],h=(v,p)=>{s&&!String(p).startsWith(s)||f.push({value:v.name+" "+p,label:v.name+" "+p,note:null})};c.forEach(v=>h(v,a));for(let v=1;v<=i;v++)c.forEach(p=>h(p,a-v));return c.forEach(v=>h(v,a+1)),f.slice(0,10)}function tne(e,t,r){const n=Qre-1,a=t.getFullYear(),i=t.getMonth(),o=$t(a,i,t.getDate()),l=Math.floor(i/3),s=i>=n?a:a-1;switch(e){case"today":return{from:o,to:o};case"yesterday":return{from:sh(t,1),to:sh(t,1)};case"dby":return{from:sh(t,2),to:sh(t,2)};case"last_7_days":return{from:sh(t,6),to:o};case"last_30_days":return{from:sh(t,29),to:o};case"current_month":return rT(a,i);case"current_mtd":return{from:$t(a,i,1),to:o};case"last_month":return i===0?rT(a-1,11):rT(a,i-1);case"current_quarter":return{from:$t(a,l*3,1),to:$t(a,l*3+2,bg(a,l*3+2))};case"current_qtd":return{from:$t(a,l*3,1),to:o};case"last_quarter":{const c=l===0?a-1:a,f=l===0?3:l-1;return{from:$t(c,f*3,1),to:$t(c,f*3+2,bg(c,f*3+2))}}case"current_calendar_year":return{from:$t(a,0,1),to:$t(a,11,31)};case"current_ytd":return{from:$t(a,0,1),to:o};case"last_calendar_year":return{from:$t(a-1,0,1),to:$t(a-1,11,31)};case"current_financial_year":{const c=new Date(s+1,n,0);return{from:$t(s,n,1),to:$t(c.getFullYear(),c.getMonth(),c.getDate())}}case"current_fytd":return{from:$t(s,n,1),to:o};case"last_financial_year":{const c=new Date(s,n,0);return{from:$t(s-1,n,1),to:$t(c.getFullYear(),c.getMonth(),c.getDate())}}default:return null}}function rne(e,t,r){if(!e)return null;if(e.kind==="quick")return tne(e.preset,t||new Date);if(e.kind==="single")return $x(e.value);if(e.kind==="range"){const n=e.from||null,a=e.to||null;return!n&&!a?null:{from:n,to:a}}return null}function _0(e){return String(e).replace("T"," ")}function gU(e){return e?e.kind==="quick"?Jre.get(e.preset)||e.preset:e.kind==="single"?e.value||null:e.kind==="range"?e.from&&e.to?`${_0(e.from)} → ${_0(e.to)}`:e.from?`From ${_0(e.from)}`:e.to?`Until ${_0(e.to)}`:null:null:null}function nne(e){var t=e&&e.from||"",r=e&&e.to||"";return!t&&!r?"Choose a From or a To date":t&&r&&t>r?"From is after To":null}function ane(e){var t=e.value||null,r=e.onChange||function(){},n=e.onClose,a=e.presets||vU,i=e.allowClear!==!1,o=t&&t.kind?t.kind:"quick",l=j.useState(o),s=l[0],c=l[1],f=j.useState(t&&t.kind==="single"?t.value:""),h=f[0],v=f[1];j.useEffect(function(){t&&t.kind==="single"&&v(t.value||"")},[t]);var p=t&&t.kind==="range"?t:null,m=j.useState({from:p&&p.from||"",to:p&&p.to||""}),y=m[0],x=m[1];j.useEffect(function(){t&&t.kind==="range"&&x({from:t.from||"",to:t.to||""})},[t]);var b=nne(y),w=!p||(p.from||"")!==y.from||(p.to||"")!==y.to,C=h?$x(h):null,A=t&&t.kind==="single"?$x(t.value):null,M=A&&A.from?Number(String(A.from).slice(0,4)):new Date().getFullYear(),R=ene(h,M);function E(Y){v(Y),$x(Y)&&(r({kind:"single",value:Y}),n&&n())}function N(Y){r({kind:"quick",preset:Y}),n&&n()}function L(Y){x(function(H){return{from:Y||"",to:H.to}})}function O(Y){x(function(H){return{from:H.from,to:Y||""}})}function I(){b||(r({kind:"range",from:y.from,to:y.to}),n&&n())}function z(Y){C&&(r({kind:"single",value:h.trim()}),Y&&n&&n())}function V(){i&&(r(null),n&&n())}return{tab:s,setTab:c,presets:a,value:t,label:gU(t),range:y,single:h,setSingle:v,singleParsed:C,suggestions:R,applySuggestion:E,selectPreset:N,setRangeFrom:L,setRangeTo:O,applyRange:I,rangeProblem:b,rangeDirty:w,commitSingle:z,clear:V,allowClear:i,withTime:!!e.withTime,inheritedLabel:e.inheritedLabel||null}}var ine=[{selector:".xeplr-daterange-tabs button, [data-xeplr-daterange-tab]",label:"Tab buttons (quick / range / single)"},{anyOf:[".xeplr-daterange-list button","[data-xeplr-daterange-preset]",'input[type="date"]','input[type="datetime-local"]',".xeplr-daterange-input"],label:"A way to pick a date — a quick preset list, or a date input"}],one=[["quick","Quick date"],["range","Range"],["single","Single"]];function lne(e){return _.jsxs("div",{className:"xeplr-daterange",children:[_.jsx("div",{className:"xeplr-daterange-tabs",children:one.map(function(t){return _.jsx("button",{type:"button","data-xeplr-daterange-tab":t[0],className:e.tab===t[0]?"active":"",onClick:function(){e.setTab(t[0])},children:t[1]},t[0])})}),e.tab==="quick"&&_.jsx("div",{className:"xeplr-daterange-list",children:e.presets.map(function(t){var r=e.value&&e.value.kind==="quick"&&e.value.preset===t.key;return _.jsx("button",{type:"button","data-xeplr-daterange-preset":t.key,className:"xeplr-daterange-item"+(r?" on":""),onClick:function(){e.selectPreset(t.key)},children:t.label},t.key)})}),e.tab==="range"&&_.jsxs("div",{className:"xeplr-daterange-body",children:[_.jsxs("label",{className:"xeplr-daterange-field",children:[_.jsx("span",{children:"From"}),_.jsx("input",{type:e.withTime?"datetime-local":"date",value:e.range.from||"",onChange:function(t){e.setRangeFrom(t.target.value)},onKeyDown:function(t){t.key==="Enter"&&(t.preventDefault(),e.applyRange())}})]}),_.jsxs("label",{className:"xeplr-daterange-field",children:[_.jsx("span",{children:"To"}),_.jsx("input",{type:e.withTime?"datetime-local":"date",value:e.range.to||"",onChange:function(t){e.setRangeTo(t.target.value)},onKeyDown:function(t){t.key==="Enter"&&(t.preventDefault(),e.applyRange())}})]}),_.jsx("div",{className:"xeplr-daterange-note",children:e.rangeProblem&&(e.range.from||e.range.to)?e.rangeProblem:"Leave either side empty for an open-ended range."}),_.jsx("div",{className:"xeplr-daterange-actions",children:_.jsx("button",{type:"button",className:"xeplr-daterange-apply","data-xeplr-daterange-apply":"range",disabled:!!e.rangeProblem||!e.rangeDirty,onClick:e.applyRange,children:"Apply"})})]}),e.tab==="single"&&_.jsxs("div",{className:"xeplr-daterange-body",children:[_.jsx("input",{className:"xeplr-daterange-input",value:e.single,placeholder:"1/1/2022, May 2022, or 2022",onChange:function(t){e.setSingle(t.target.value)},onBlur:function(){e.commitSingle(!1)},onKeyDown:function(t){t.key==="Enter"&&(t.preventDefault(),e.commitSingle(!0))}}),e.suggestions&&e.suggestions.length>0&&_.jsx("ul",{className:"xeplr-daterange-suggest",children:e.suggestions.map(function(t){return _.jsx("li",{children:_.jsxs("button",{type:"button",onMouseDown:function(r){r.preventDefault(),e.applySuggestion(t.value)},children:[_.jsx("span",{children:t.label}),t.note&&_.jsx("span",{className:"xeplr-daterange-suggest-note",children:t.note})]})},t.value)})}),_.jsx("div",{className:"xeplr-daterange-note",children:e.single?e.singleParsed?e.singleParsed.from+" → "+e.singleParsed.to:"Not a date yet":"A day, a whole month, or a whole year."}),_.jsx("div",{className:"xeplr-daterange-actions",children:_.jsx("button",{type:"button",className:"xeplr-daterange-apply","data-xeplr-daterange-apply":"single",disabled:!e.singleParsed,onMouseDown:function(t){t.preventDefault(),e.commitSingle(!0)},children:"Apply"})})]}),_.jsxs("div",{className:"xeplr-daterange-foot",children:[e.allowClear&&_.jsx("button",{type:"button",className:"xeplr-daterange-clear",onClick:e.clear,children:"Clear"}),e.label&&_.jsx("span",{className:"xeplr-daterange-current",children:e.label})]}),e.inheritedLabel&&!e.value&&_.jsxs("div",{className:"xeplr-daterange-inherited",children:["Using ",e.inheritedLabel]})]})}function sne(e){var t=ane(e),r=i_("DateRangePage",ine);return _.jsx("div",{ref:r,children:_.jsx(lne,{...t})})}var sB=["single","multi"];function une(e){var t=Array.isArray(e)&&e.length>=2?e:["id","name"];return{id:t[0],name:t[1],extras:t.slice(2)}}function w0(e,t){if(!Array.isArray(e))return[];var r=e.slice();return r.sort(function(n,a){var i=n==null?"":n[t],o=a==null?"":a[t];return typeof i=="string"&&(i=i.toLowerCase()),typeof o=="string"&&(o=o.toLowerCase()),i<o?-1:i>o?1:0}),r}function cne(e,t,r){if(!t)return e;var n=String(t).toLowerCase();return e.filter(function(a){for(var i=0;i<r.length;i++){var o=a[r[i]];if(o!=null&&String(o).toLowerCase().indexOf(n)!==-1)return!0}return!1})}function uB(e,t,r){if(!t||t.length===0)return[];for(var n={},a=0;a<t.length;a++)n[t[a]]=!0;return e.filter(function(i){return n[i[r]]})}function fne(e){e=e||{};var t=e.mode||"single";if(sB.indexOf(t)===-1)throw new Error("[xeplr-ui-utils:Dropdown] Unknown mode: "+t+". Expected one of "+sB.join(", "));var r=j.useMemo(function(){return une(e.keys)},[e.keys]),n=e.fetchData?"dynamic":"static",a=e.searchable!==!1,i=!!e.onCreate&&e.allowCreate!==!1,[o,l]=j.useState([]),[s,c]=j.useState(!1),[f,h]=j.useState(""),[v,p]=j.useState(""),[m,y]=j.useState(!1),[x,b]=j.useState(!1),[w,C]=j.useState(""),A=e.value!==void 0,M=j.useMemo(function(){var K=A?e.value:e.defaultValue;return K==null?[]:Array.isArray(K)?K.slice():[K]},[A,e.value,e.defaultValue]),[R,E]=j.useState(M);j.useEffect(function(){if(A){var K=e.value;E(K==null?[]:Array.isArray(K)?K.slice():[K])}},[A,e.value]);var N=j.useMemo(function(){return n==="static"?w0(e.options||[],r.name):o},[n,e.options,o,r.name]),L=j.useRef(!1);j.useEffect(function(){n!=="dynamic"||L.current||(L.current=!0,c(!0),h(""),Promise.resolve().then(function(){return e.fetchData()}).then(function(K){l(w0(Array.isArray(K)?K:[],r.name))}).catch(function(K){h(K&&K.message?K.message:"Failed to load options")}).finally(function(){c(!1)}))},[n]);function O(){n==="dynamic"&&(c(!0),h(""),Promise.resolve().then(function(){return e.fetchData()}).then(function(K){l(w0(Array.isArray(K)?K:[],r.name))}).catch(function(K){h(K&&K.message?K.message:"Failed to load options")}).finally(function(){c(!1)}))}var I=j.useMemo(function(){return[r.name].concat(r.extras)},[r]),z=j.useMemo(function(){return cne(N,v,I)},[N,v,I]),V=j.useMemo(function(){return uB(N,R,r.id)},[N,R,r.id]);function Y(){e.disabled||y(!0)}function H(){y(!1),p("")}function F(){m?H():Y()}function X(K,se){var ge=uB(se||N,K,r.id);e.onChange&&e.onChange(t==="single"?K[0]||null:K,ge)}function P(K){var se=String(K??v).trim();return!se||!e.onCreate?Promise.resolve():(b(!0),C(""),Promise.resolve().then(function(){return e.onCreate(se)}).then(function(ge){return n==="dynamic"&&e.fetchData?Promise.resolve(e.fetchData()).then(function(ue){var de=w0(Array.isArray(ue)?ue:[],r.name);return l(de),{created:ge,fresh:de}}):{created:ge,fresh:N}}).then(function(ge){var ue=ge.created,de=ge.fresh,me=null;if(ue&&typeof ue=="object"?me=ue[r.id]:ue!=null&&(me=ue),me==null){var ae=de.filter(function(nt){return nt[r.name]===se})[0];ae&&(me=ae[r.id])}if(me!=null){var ye=t==="single"?[me]:R.indexOf(me)===-1?R.concat(me):R;A||E(ye),X(ye,de),t==="single"&&H()}}).catch(function(ge){C(ge&&ge.message?ge.message:"Failed to add")}).finally(function(){b(!1)}))}function q(K){var se;if(t==="single"){se=[K],A||E(se),X(se),H();return}var ge=R.indexOf(K)!==-1;se=ge?R.filter(function(ue){return ue!==K}):R.concat(K),A||E(se),X(se)}function G(K){var se=R.filter(function(ge){return ge!==K});A||E(se),X(se)}function W(){A||E([]),X([])}function Z(K){p(K.target.value)}var Q=j.useRef(null);j.useEffect(function(){if(!m)return;function K(se){Q.current&&!Q.current.contains(se.target)&&H()}return document.addEventListener("mousedown",K),function(){document.removeEventListener("mousedown",K)}},[m]);var U=j.useCallback(function(K){return R.indexOf(K)!==-1},[R]);return{mode:t,source:n,keys:r,searchable:a,canCreate:i,createLabel:e.createLabel||"Add",creating:x,createError:w,createItem:P,placeholder:e.placeholder||"Select…",disabled:!!e.disabled,items:N,filteredItems:z,selectedItems:V,selection:R,loading:s,error:f,query:v,isOpen:m,rootRef:Q,isSelected:U,open:Y,close:H,toggle:F,selectItem:q,removeSelection:G,clearSelection:W,handleSearch:Z,refresh:O}}var hne=[{selector:'.xeplr-dropdown-trigger, [role="combobox"]',label:"Trigger element (combobox)"},{selector:'.xeplr-dropdown-panel, [role="listbox"]',label:"Options panel (listbox)"}];function dne(e){if(!e)return"·";var t=String(e).trim().split(/\s+/).slice(0,2);return t.map(function(r){return r.charAt(0).toUpperCase()}).join("")}function vne(e,t){for(var r=[],n=0;n<t.length;n++){var a=e[t[n]];a!=null&&a!==""&&r.push(String(a))}return r.join(" · ")}function pne(e,t,r,n){if(e.length===0)return _.jsx("span",{className:"xeplr-dropdown-placeholder",children:n});if(t==="single")return _.jsx("span",{className:"xeplr-dropdown-selected-single",children:e[0][r.name]});var a=e[0][r.name],i=e.length-1;return _.jsxs("span",{className:"xeplr-dropdown-selected-multi",children:[a,i>0?_.jsxs("span",{className:"xeplr-dropdown-selected-more",children:[" +",i]}):null]})}function gne({mode:e,keys:t,searchable:r,placeholder:n,disabled:a,filteredItems:i,selectedItems:o,loading:l,error:s,query:c,isOpen:f,rootRef:h,isSelected:v,toggle:p,selectItem:m,removeSelection:y,clearSelection:x,handleSearch:b,canCreate:w,createLabel:C,creating:A,createError:M,createItem:R}){var E=o.length>0,N=(c||"").trim(),L=i.some(function(I){return String(I[t.name]).toLowerCase()===N.toLowerCase()}),O=w&&N&&!L;return _.jsxs("div",{ref:h,className:"xeplr-dropdown xeplr-dropdown-"+e+(f?" xeplr-dropdown-open":"")+(a?" xeplr-dropdown-disabled":""),children:[_.jsxs("div",{className:"xeplr-dropdown-trigger",role:"combobox","aria-expanded":f,onClick:p,children:[e==="multi"&&E?_.jsx("div",{className:"xeplr-dropdown-chips",children:o.map(function(I){return _.jsxs("span",{className:"xeplr-dropdown-chip",children:[I[t.name],_.jsx("span",{className:"xeplr-dropdown-chip-x",onClick:function(z){z.stopPropagation(),y(I[t.id])},children:"×"})]},I[t.id])})}):pne(o,e,t,n),_.jsx("span",{className:"xeplr-dropdown-caret",children:"⌄"})]}),_.jsxs("div",{className:"xeplr-dropdown-panel"+(f?" xeplr-dropdown-panel-open":""),role:"listbox",children:[r&&_.jsx("div",{className:"xeplr-dropdown-search",children:_.jsx("input",{autoFocus:!0,className:"xeplr-dropdown-search-input",placeholder:"Search…",value:c,onChange:b})}),l&&_.jsx("div",{className:"xeplr-dropdown-state",children:"Loading…"}),s&&_.jsx("div",{className:"xeplr-dropdown-state xeplr-dropdown-state-error",children:s}),!l&&!s&&i.length===0&&!O&&_.jsx("div",{className:"xeplr-dropdown-state",children:w&&!N?"Type a name to add":"No matches"}),!l&&!s&&i.map(function(I){var z=v(I[t.id]),V=vne(I,t.extras);return _.jsxs("div",{role:"option","aria-selected":z,className:"xeplr-dropdown-row"+(z?" xeplr-dropdown-row-selected":""),onClick:function(){m(I[t.id])},children:[e==="multi"&&_.jsx("span",{className:"xeplr-dropdown-check"+(z?" xeplr-dropdown-check-on":""),children:z?"✓":""}),_.jsx("span",{className:"xeplr-dropdown-avatar",children:dne(I[t.name])}),_.jsxs("span",{className:"xeplr-dropdown-info",children:[_.jsx("span",{className:"xeplr-dropdown-name",children:I[t.name]}),V&&_.jsx("span",{className:"xeplr-dropdown-meta",children:V})]})]},I[t.id])}),O&&_.jsxs("div",{role:"option",className:"xeplr-dropdown-row xeplr-dropdown-create",onClick:function(){A||R()},children:[_.jsx("span",{className:"xeplr-dropdown-avatar xeplr-dropdown-create-plus",children:"+"}),_.jsx("span",{className:"xeplr-dropdown-info",children:_.jsx("span",{className:"xeplr-dropdown-name",children:A?"Adding…":C+" “"+N+"”"})})]}),M&&_.jsx("div",{className:"xeplr-dropdown-state xeplr-dropdown-state-error",children:M}),E&&_.jsx("div",{className:"xeplr-dropdown-footer",children:_.jsx("span",{className:"xeplr-dropdown-clear",onClick:x,children:"Clear selection"})})]})]})}function mU(e){var t=fne(e),r=i_("DropdownPage",hne);return _.jsx("div",{ref:r,children:_.jsx(gne,{...t})})}var Mu=null,cB={success:{bg:"var(--xeplr-success, #059669)",color:"var(--xeplr-accent-text, #fff)"},error:{bg:"var(--xeplr-danger, #dc2626)",color:"var(--xeplr-accent-text, #fff)"},default:{bg:"var(--xeplr-accent, #2563eb)",color:"var(--xeplr-accent-text, #fff)"}},mne=3e3;function yne(){return Mu||(Mu=document.createElement("div"),Mu.id="xeplr-snackbar-container",Mu.style.cssText="position:fixed;bottom:24px;right:24px;z-index:99999;display:flex;flex-direction:column-reverse;gap:8px;pointer-events:none;",document.body.appendChild(Mu),Mu)}function xne(e,t,r){var n=cB[t]||cB.default,a=document.createElement("div");return a.style.cssText="padding:12px 20px;border-radius:6px;font:14px/1.4 system-ui,sans-serif;max-width:380px;word-break:break-word;pointer-events:auto;opacity:0;transform:translateY(8px);transition:opacity 0.2s,transform 0.2s;cursor:pointer;background:"+n.bg+";color:"+n.color+";",a.textContent=e,a.onclick=function(){fB(a)},requestAnimationFrame(function(){a.style.opacity="1",a.style.transform="translateY(0)"}),a._timeout=setTimeout(function(){fB(a)},r),a}function fB(e){e._dismissed||(e._dismissed=!0,clearTimeout(e._timeout),e.style.opacity="0",e.style.transform="translateY(8px)",setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},200))}function Ct(e,t){t=t||{};var r=t.design||"default",n=t.duration||mne,a=yne(),i=xne(e,r,n);a.appendChild(i)}var hB=["text","multiline","search","password"];function _g(e){return e==null?"":String(e)}function Sne(e,t){var r=_g(e),n=t||{};return n.trim&&(r=r.trim()),n.maxLength!=null&&r.length>n.maxLength&&(r=r.slice(0,n.maxLength)),r}function bne(e,t){var r=t||{},n=_g(e),a=n.trim();if(r.required&&!a)return r.requiredMessage||"This is required";if(r.minLength!=null&&a.length>0&&a.length<r.minLength)return"At least "+r.minLength+" characters";if(r.maxLength!=null&&n.length>r.maxLength)return"At most "+r.maxLength+" characters";if(r.pattern){var i=r.pattern instanceof RegExp?r.pattern:new RegExp(r.pattern);if(a&&!i.test(a))return r.patternMessage||"That is not a valid value"}return null}function _ne(e,t){return t==null?null:t-_g(e).length}function wne(e){e=e||{};var t=e.type||"text";if(hB.indexOf(t)===-1)throw new Error("[xeplr-ui-utils:TextField] Unknown type: "+t+". Expected one of "+hB.join(", "));var r=e.value!==void 0,[n,a]=j.useState(_g(e.defaultValue)),i=r?_g(e.value):n,[o,l]=j.useState(!1),s=j.useMemo(function(){return{required:e.required,requiredMessage:e.requiredMessage,minLength:e.minLength,maxLength:e.maxLength,pattern:e.pattern,patternMessage:e.patternMessage,trim:e.trim}},[e.required,e.requiredMessage,e.minLength,e.maxLength,e.pattern,e.patternMessage,e.trim]),c=j.useCallback(function(y){var x=y&&y.target?y.target.value:y;e.maxLength!=null&&(x=String(x).slice(0,e.maxLength)),r||a(x),e.onChange&&e.onChange(x)},[r,e.maxLength,e.onChange]),f=j.useCallback(function(y){var x=Sne(y,s);l(!0),!r&&x!==y&&a(x),e.onCommit?e.onCommit(x):x!==y&&e.onChange&&e.onChange(x)},[r,s,e.onChange,e.onCommit]),h=j.useCallback(function(y){f(y&&y.target?y.target.value:i)},[f,i]),v=j.useCallback(function(y){y.key==="Enter"&&t!=="multiline"&&f(y.target.value),y.key==="Escape"&&e.onCancel&&e.onCancel()},[f,t,e.onCancel]),p=j.useCallback(function(){r||a(""),e.onChange&&e.onChange(""),e.onCommit&&e.onCommit("")},[r,e.onChange,e.onCommit]),m=o?bne(i,s):null;return{type:t,raw:i,error:m,remaining:_ne(i,e.maxLength),placeholder:e.placeholder,disabled:e.disabled,required:e.required,maxLength:e.maxLength,rows:e.rows,label:e.label,help:e.help,handleChange:c,handleBlur:h,handleKeyDown:v,handleClear:p}}var Cne=[{selector:'input[type="text"], input[type="search"], input[type="password"], textarea, .xeplr-textfield-input',label:"Text input element"}];function Tne({type:e,raw:t,error:r,remaining:n,placeholder:a,disabled:i,required:o,maxLength:l,rows:s,label:c,help:f,handleChange:h,handleBlur:v,handleKeyDown:p,handleClear:m}){var y=e==="multiline",x=e==="search";return _.jsxs("div",{className:"xeplr-textfield"+(r?" xeplr-textfield-invalid":""),children:[c&&_.jsxs("label",{className:"xeplr-textfield-label",children:[c,o&&_.jsx("span",{className:"xeplr-textfield-required","aria-hidden":"true",children:" *"})]}),_.jsxs("div",{className:"xeplr-textfield-control",children:[y?_.jsx("textarea",{className:"xeplr-textfield-input",value:t,rows:s||4,placeholder:a,disabled:i,maxLength:l,"aria-invalid":r?"true":void 0,onChange:h,onBlur:v}):_.jsx("input",{className:"xeplr-textfield-input",type:x?"search":e==="password"?"password":"text",value:t,placeholder:a,disabled:i,maxLength:l,"aria-invalid":r?"true":void 0,onChange:h,onBlur:v,onKeyDown:p}),x&&t&&!i&&_.jsx("button",{type:"button",className:"xeplr-textfield-clear",onClick:m,title:"Clear",children:"✕"})]}),r?_.jsx("p",{className:"xeplr-textfield-error",children:r}):f?_.jsx("p",{className:"xeplr-textfield-help",children:f}):null,n!=null&&l!=null&&n<=Math.max(10,l*.1)&&_.jsxs("p",{className:"xeplr-textfield-count",children:[n," left"]})]})}function wg(e){var t=wne(e),r=i_("TextFieldPage",Cne);return _.jsx("div",{ref:r,children:_.jsx(Tne,{...t})})}function Ane(e){return Object.entries(e.where||{}).map(([t,r])=>`&${encodeURIComponent(t)}=${encodeURIComponent(r)}`).join("")}function dB(e,t){return Array.isArray(e)?e:e&&e[t.key||"dataArray"]||[]}function Dne(e,t){return Object.entries(e.where||{}).every(([r,n])=>t[r]===n)}function yU(e,t){const r=e||{};function n(o){return!!(o&&r[o])}async function a(o,l){const s=r[o];if(!s)return[];const c=(l&&l.value?`&${encodeURIComponent(l.name)}=${encodeURIComponent(l.value)}`:"")+Ane(s),f=await t(`${s.url}?limit=0${c}`);return dB(f,s).filter(v=>Dne(s,v)).filter(v=>l&&l.clientKey?v[l.clientKey]===l.value:!0).map(v=>({value:v[s.value||"id"],label:v[s.label]||v[s.value||"id"]}))}async function i(o,l){const s=r[o];if(!s)return[];const c=Object.entries(l||{});if(c.some(([,p])=>p==null||p===""))return[];const f=c.map(([p,m])=>`&${encodeURIComponent(p)}=${encodeURIComponent(m)}`).join(""),h=await t(`${s.url}?limit=0${f}`);return dB(h,s).map(p=>String(p[s.value||"value"])).filter(Boolean)}return{has:n,fetchOptions:a,fetchSuggestions:i}}const Mne={db:"Database",sql:"SQL",url:"URL",id:"ID",api:"API",http:"HTTP",ms:"(ms)"};function DS(e){return e?e.label?e.label:String(e.name||"").replace(/Id$/,"").replace(/Info$/,"").replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim().split(" ").map((t,r)=>{const n=Mne[t.toLowerCase()];return n||(r===0?t.charAt(0).toUpperCase()+t.slice(1):t.toLowerCase())}).join(" "):""}const q2=j.createContext(null);function Rne({children:e}){const[t,r]=j.useState(()=>{const A=localStorage.getItem("access");return A?JSON.parse(A):null}),[n,a]=j.useState(()=>jH()),[i,o]=j.useState(()=>!!xg());function l(A){A?localStorage.setItem("access",JSON.stringify(A)):localStorage.removeItem("access"),r(A)}function s(A){A?localStorage.setItem("user",JSON.stringify(A)):localStorage.removeItem("user"),a(A)}function c(){HH(),localStorage.removeItem("access"),r(null),a(null),o(!1)}function f(A){const M=jJ();M&&A.user&&M!==A.user.id&&CS(),o(!0),s(A.user),l(A.access)}const h=j.useRef(0);async function v(){const A=++h.current;try{const M=await ree();return A!==h.current||!M?null:(M.access&&l(M.access),M.user&&s(M.user),M.access||null)}catch(M){return Ct(M.message||"Could not reach the server to refresh your access.",{design:"error"}),null}}j.useEffect(()=>(Hj(c),()=>Hj(null)),[]);const p=j.useRef(!1);j.useEffect(()=>{i&&(p.current||(p.current=!0,v()))},[i]),j.useEffect(()=>{if(!i||typeof window>"u")return;let A=null;function M(){clearTimeout(A),A=setTimeout(()=>{xg()&&v()},0)}return window.addEventListener(iM,M),()=>{clearTimeout(A),window.removeEventListener(iM,M)}},[i]);function m(A){return t?t.pages&&t.pages.includes(A):!1}function y(A){return t?t.apis&&t.apis.includes(A):!1}function x(A){return t?t.menus&&t.menus.includes(A):!1}function b(A){return t?t.elements&&t.elements.includes(A):!1}function w(A){return t?t.roles&&t.roles.includes(A):!1}const C={user:n,access:t,authenticated:i,onLogin:f,logout:c,setAccess:l,refreshAccess:v,hasPage:m,hasApi:y,hasMenu:x,hasElement:b,hasRole:w};return _.jsx(q2.Provider,{value:C,children:e})}function X2(){return j.useContext(q2)}function xU(){const e=j.useContext(q2);if(!e)throw new Error("useAccessStrict must be used within an <AccessProvider>");return e}function Ene(e={}){const[t,r]=j.useState(""),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(!1),c=ef(),f=X2(),h=e.onSuccess||(()=>c(lee()||"/")),v=e.notActivatedPath||"/auth/not-activated";async function p(m){m.preventDefault(),o(""),s(!0);try{const y=await QJ({email:t,password:n});k2(y.accessToken),PH(y.refreshToken),f&&f.onLogin(y),h(y)}catch(y){y.status===403&&y.code==="NOT_ACTIVATED"||y.message==="Please wait, someone will activate you."?c(v):(o(y.message),Ct(y.message,{design:"error"}))}finally{s(!1)}}return{email:t,setEmail:r,password:n,setPassword:a,error:i,loading:l,handleSubmit:p}}function Nne(e={}){const[t,r]=j.useState({name:"",email:"",phoneNumber:"",password:""}),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(!1),c=e.onSuccess||null;function f(v){r({...t,[v.target.name]:v.target.value})}async function h(v){v.preventDefault(),a(""),o(""),s(!0);try{const p=await WJ(t),m="Account created. Check your email for the link to activate it.";o(m),Ct(m,{design:"success"}),r({name:"",email:"",phoneNumber:"",password:""}),c&&c(p)}catch(p){a(p.message),Ct(p.message,{design:"error"})}finally{s(!1)}}return{form:t,error:n,success:i,loading:l,handleChange:f,handleSubmit:h}}function Lne(){const[e,t]=j.useState(""),[r,n]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState(!1);async function s(c){c.preventDefault(),n(""),i(""),l(!0);try{const f=await JJ({email:e});i(f.message),Ct(f.message,{design:"success"})}catch(f){n(f.message),Ct(f.message,{design:"error"})}finally{l(!1)}}return{email:e,setEmail:t,error:r,success:a,loading:o,handleSubmit:s}}function Ine(){const[e]=xm(),t=e.get("token"),[r,n]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState(""),[s,c]=j.useState(!1),f=j.useRef(!1);j.useEffect(function(){!t&&!f.current&&(f.current=!0,Ct("Invalid or expired reset link",{design:"error"}))},[t]);async function h(v){v.preventDefault(),i(""),l(""),c(!0);try{const p=await eee({token:t,newPassword:r});l(p.message),Ct(p.message,{design:"success"})}catch(p){i(p.message),Ct(p.message,{design:"error"})}finally{c(!1)}}return{token:t,password:r,setPassword:n,error:a,success:o,loading:s,handleSubmit:h}}function One(){var[e]=xm(),t=e.get("token"),r=e.get("workflowKey"),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(!1),c=j.useRef(!1);return j.useEffect(function(){if(!t){c.current||(c.current=!0,Ct("Invalid activation link",{design:"error"}));return}c.current||(c.current=!0,s(!0),a(""),o(""),KJ(t,r).then(function(f){var h=f.message||"Account activated successfully";o(h),Ct(h,{design:"success"})}).catch(function(f){a(f.message),Ct(f.message,{design:"error"})}).finally(function(){s(!1)}))},[t,r]),{token:t,error:n,success:i,loading:l}}function kne(e={}){var[t,r]=j.useState(""),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(!1),c=e.onSuccess||null;async function f(h){h.preventDefault(),a(""),o(""),s(!0);try{var v=await qJ({email:t}),p=v.message||"If that account is waiting for activation, a new link has been sent.";o(p),Ct(p,{design:"success"}),c&&c(v)}catch(m){a(m.message),Ct(m.message,{design:"error"})}finally{s(!1)}}return{email:t,setEmail:r,error:n,success:i,loading:l,handleSubmit:f}}function Pne(e={}){var[t]=xm(),r=t.get("token"),[n,a]=j.useState(null),[i,o]=j.useState(""),[l,s]=j.useState(""),[c,f]=j.useState(""),[h,v]=j.useState(""),[p,m]=j.useState(""),[y,x]=j.useState(!!r),[b,w]=j.useState(!1),C=j.useRef(!1),A=e.onSuccess||null;j.useEffect(function(){if(!C.current){if(C.current=!0,!r){v("This invite link is incomplete. Open it again from the invite email.");return}XJ(r).then(function(R){a(R),o(R.name||"")}).catch(function(R){v(R.message),Ct(R.message,{design:"error"})}).finally(function(){x(!1)})}},[r]);async function M(R){if(R.preventDefault(),v(""),l!==c){var E="Passwords do not match";v(E),Ct(E,{design:"error"});return}w(!0);try{var N=await ZJ({token:r,name:i,password:l}),L="Invite accepted. Sign in with your new password.";m(L),Ct(L,{design:"success"}),A&&A(N)}catch(O){v(O.message),Ct(O.message,{design:"error"})}finally{w(!1)}}return{token:r,invitee:n,name:i,setName:o,password:l,setPassword:s,confirmPassword:c,setConfirmPassword:f,error:h,success:p,checking:y,loading:b,handleSubmit:M}}function jne(e={}){var[t,r]=j.useState(""),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(""),[c,f]=j.useState(""),[h,v]=j.useState(!1),p=e.onSuccess||null,m=e.loginPath||"/auth/login",y=ef(),x=X2();async function b(w){if(w.preventDefault(),s(""),f(""),n!==i){var C="Passwords do not match";s(C),Ct(C,{design:"error"});return}v(!0);try{var A=await tee({currentPassword:t,newPassword:n}),M="Password changed. Sign in again with your new password.";f(M),Ct(M,{design:"success"}),r(""),a(""),o(""),oee(),x?x.logout():HH(),p?p(A):y(m)}catch(R){s(R.message),Ct(R.message,{design:"error"})}finally{v(!1)}}return{currentPassword:t,setCurrentPassword:r,newPassword:n,setNewPassword:a,confirmPassword:i,setConfirmPassword:o,error:l,success:c,loading:h,handleSubmit:b}}function Bne(e={}){var[t,r]=j.useState({name:"",email:"",phoneNumber:""}),[n,a]=j.useState(""),[i,o]=j.useState(""),[l,s]=j.useState(!1),[c,f]=j.useState(!0),h=e.onSuccess||null;j.useEffect(function(){v()},[]);async function v(){f(!0);try{var y=await nee();r({name:y.name||"",email:y.email||"",phoneNumber:y.phoneNumber||""})}catch(x){a(x.message),Ct(x.message,{design:"error"})}finally{f(!1)}}function p(y){r({...t,[y.target.name]:y.target.value})}async function m(y){y.preventDefault(),a(""),o(""),s(!0);try{var x=await aee(t),b="Profile updated successfully";o(b),Ct(b,{design:"success"}),h&&h(x)}catch(w){a(w.message),Ct(w.message,{design:"error"})}finally{s(!1)}}return{form:t,error:n,success:i,loading:l,fetching:c,handleChange:p,handleSubmit:m}}function pM(){return Tt("/auth/api/admin/users")}function zne(e){return Tt("/auth/api/admin/users/"+encodeURIComponent(e)+"/activate",{method:"POST"})}function SU(){return Tt("/auth/api/admin/roles")}function Vne(){return Tt("/auth/api/admin/access-items")}function Fne({userId:e,roleId:t,assign:r}){return Tt("/auth/api/admin/user-role",{method:"POST",body:JSON.stringify({userId:e,roleId:t,assign:r})})}function Gne({type:e,itemId:t,roleId:r,assign:n}){return Tt("/auth/api/admin/access-role",{method:"POST",body:JSON.stringify({type:e,itemId:t,roleId:r,assign:n})})}function Hne({module:e,action:t,roleId:r,assign:n}){return Tt("/auth/api/admin/module-role",{method:"POST",body:JSON.stringify({module:e,action:t,roleId:r,assign:n})})}function Une({scope:e,scopeId:t}){var r="?scope="+encodeURIComponent(e)+(t?"&scopeId="+encodeURIComponent(t):"");return Tt("/auth/api/admin/module-states"+r)}function vB({scope:e,scopeId:t,module:r,action:n,roleId:a,state:i}){return Tt("/auth/api/admin/module-state",{method:"POST",body:JSON.stringify({scope:e,scopeId:t,module:r,action:n,roleId:a,state:i})})}function Yne(e){return Tt("/auth/api/admin/master/"+e)}function bU(e,t){return Tt("/auth/api/admin/master/"+e,{method:"POST",body:JSON.stringify(t)})}function $ne(e,t){return Tt("/auth/api/admin/master/"+e+"/delete",{method:"POST",body:JSON.stringify({id:t})})}function Wne(e,t){return Tt("/auth/api/admin/master/apis/scope",{method:"POST",body:JSON.stringify({id:e,scope:t})})}function qne(){var[e,t]=j.useState([]),[r,n]=j.useState([]),[a,i]=j.useState(""),[o,l]=j.useState(!0),[s,c]=j.useState(""),[f,h]=j.useState({}),[v,p]=j.useState(""),[m,y]=j.useState(!1);j.useEffect(function(){x()},[]);async function x(){l(!0),c("");try{var[R,E]=await Promise.all([pM(),SU()]);t(R),n(E.filter(function(N){return N.name!=="Super Admin"}))}catch(N){c(N.message)}finally{l(!1)}}var b=j.useMemo(function(){if(!a.trim())return e;var R=a.toLowerCase();return e.filter(function(E){return E.name&&E.name.toLowerCase().includes(R)||E.email&&E.email.toLowerCase().includes(R)})},[e,a]),w=j.useCallback(async function(R,E,N){var L=R+":"+E;h(function(O){var I={...O};return I[L]=!0,I});try{await Fne({userId:R,roleId:E,assign:!N}),t(function(O){return O.map(function(I){if(I.id!==R)return I;var z;if(N)z=I.roles.filter(function(Y){return Y.id!==E});else{var V=r.find(function(Y){return Y.id===E});z=I.roles.concat(V?[V]:[])}return{...I,roles:z}})})}catch(O){c(O.message)}finally{h(function(O){var I={...O};return delete I[L],I})}},[r]),C=j.useCallback(async function(R){var E=R+":activate";h(function(L){var O={...L};return O[E]=!0,O}),c("");try{await zne(R);var N=await pM();t(N)}catch(L){c(L.message)}finally{h(function(L){var O={...L};return delete O[E],O})}},[]),A=j.useCallback(async function(){var R=v.trim();if(R){y(!0),c("");try{var E=await bU("roles",{name:R});n(function(N){return N.concat([{id:E.id,name:R}])}),p("")}catch(N){c(N.message)}finally{y(!1)}}},[v]);function M(R,E){return R.roles&&R.roles.some(function(N){return N.id===E})}return{users:b,roles:r,search:a,setSearch:i,loading:o,error:s,saving:f,handleToggle:w,handleActivate:C,isAssigned:M,newRoleName:v,setNewRoleName:p,creatingRole:m,createRole:A,reload:x}}var ps="__new__";function jh(e,t){return e===!1?null:e?e+t.charAt(0).toUpperCase()+t.slice(1):t}function Wx(e,t,r){return t.indexOf(e)!==-1?e:r}function Xne(e,t){if(t==null||t==="")return null;if(t===ps)return ps;for(var r=e||[],n=0;n<r.length;n++)if(r[n]&&String(r[n].id)===String(t))return r[n];return null}function Zne(e){var t={};return e.forEach(function(r){t[r.key]=r.type==="boolean"?0:""}),t}function Kne(e,t){var r={};return e.forEach(function(n){r[n.key]=t[n.key]!==void 0?t[n.key]:""}),r}var Z2=["enabled","disabled","hidden"],Qne=["inherit","enabled","disabled","hidden"],pB={inherit:"Inherit",enabled:"Enabled",disabled:"Disabled",hidden:"Hidden",partial:"Mixed"};function zp(e,t,r){return e+":"+t+(r?":"+r:"")}function Jne(e){var t={};return(e||[]).forEach(function(r){!r||!r.module||!r.action||Z2.indexOf(r.state)!==-1&&(t[zp(r.module,r.action,r.roleId)]=r.state)}),t}function eae(e,t){return e==="none"?"hidden":t==="disabled"?e==="all"?"disabled":"partial":e==="all"?"enabled":"partial"}function tae(e){return Z2.indexOf(e)===-1?"inherit":e}function rae(e){if(e==="enabled")return[{call:"grant"},{call:"clearState"}];if(e==="disabled")return[{call:"grant"},{call:"setState",state:"disabled"}];if(e==="hidden")return[{call:"revoke"},{call:"clearState"}];throw new Error("Unknown access state: "+e)}function nae(e,t){return e!=="role"?!0:t==="disabled"}var nT={apis:"apiGroup",pages:"uiPagesGroup",elements:"uiElementsGroup",menus:"menuGroup"},ap=["apis","pages","elements","menus"],aae=["modules","uncategorized"],iae=["role","workspace","user"],C0={view:0,create:1,edit:2,delete:3};function aT(e){if(!e)return null;var t=e.split(":");return t.length!==2||!t[0]||!t[1]?null:{module:t[0],action:t[1]}}function oae(e){e=e||{};var[t,r]=j.useState([]),[n,a]=j.useState({apis:[],pages:[],elements:[],menus:[]}),i=jh(e.urlKey,"view")||"view",o=jh(e.urlKey,"uncat")||"uncat",l=jh(e.urlKey,"appliesTo")||"appliesTo",s=jh(e.urlKey,"scope")||"scope",c=j.useMemo(function(){var be={};return be[i]="modules",be[o]="apis",be[l]="role",be},[i,o,l]),f=qs(c,{inUrl:e.urlKey!==!1}),h=Wx(f.get(i),aae,"modules"),v=Wx(f.get(o),ap,"apis"),p=Wx(f.get(l),iae,"role"),m=p==="role"?"":f.get(s)||"",y=f.set,x=j.useCallback(function(be){var Te={};Te[o]=be,y(Te,{replace:!0})},[y,o]),[b,w]=j.useState(""),[C,A]=j.useState(!0),[M,R]=j.useState(""),[E,N]=j.useState({}),[L,O]=j.useState(e.workspaces||[]),[I,z]=j.useState([]),[V,Y]=j.useState({}),[H,F]=j.useState(null);j.useEffect(function(){if(e.workspaces){O(e.workspaces);return}if(typeof e.loadWorkspaces=="function"){var be=!0;return Promise.resolve(e.loadWorkspaces()).then(function(Te){be&&O(Te||[])}).catch(function(Te){be&&R(Te.message)}),function(){be=!1}}},[e.workspaces,e.loadWorkspaces]);async function X(be,Te){if(be!=="role"&&!Te){Y({});return}try{var Me=await Une({scope:be,scopeId:be==="role"?null:Te});Y(Jne(Me)),F(!0)}catch{Y({}),F(!1)}}j.useEffect(function(){P()},[]),j.useEffect(function(){R(""),X(p,m)},[p,m]),j.useEffect(function(){p!=="user"||I.length>0||pM().then(function(be){z(be||[])}).catch(function(be){R(be.message)})},[p]);async function P(){A(!0),R("");try{var[be,Te]=await Promise.all([SU(),Vne()]);r(be.filter(function(Me){return Me.name!=="Super Admin"})),a(Te)}catch(Me){R(Me.message)}finally{A(!1)}}var q=j.useMemo(function(){var be={};ap.forEach(function(Oe){var Ye=n[Oe]||[],_e=nT[Oe];Ye.forEach(function(ce){var Ce=aT(ce[_e]);if(Ce){var Ae=Ce.module;be[Ae]||(be[Ae]={}),be[Ae][Ce.action]||(be[Ae][Ce.action]={items:[],roleIds:{}});var Xe=be[Ae][Ce.action];Xe.items.push({type:Oe,item:ce});var Ge=(ce.roles||[]).map(function(ut){return ut.id});t.forEach(function(ut){Xe.roleIds[ut.id]===void 0&&(Xe.roleIds[ut.id]={total:0,assigned:0}),Xe.roleIds[ut.id].total++,Ge.indexOf(ut.id)!==-1&&Xe.roleIds[ut.id].assigned++})}})});var Te=b.toLowerCase(),Me=Object.keys(be).sort().filter(function(Oe){return!Te||Oe.toLowerCase().includes(Te)}).map(function(Oe){var Ye=Object.keys(be[Oe]).sort(function(_e,ce){var Ce=C0[_e]!==void 0?C0[_e]:99,Ae=C0[ce]!==void 0?C0[ce]:99;return Ce-Ae}).map(function(_e){var ce=be[Oe][_e];return{action:_e,itemCount:ce.items.length,items:ce.items,getRoleState:Ce,getCellState:function(Ae){return eae(Ce(Ae),V[zp(Oe,_e,Ae)])},getOverrideState:function(){return tae(V[zp(Oe,_e)])}};function Ce(Ae){var Xe=ce.roleIds[Ae];return!Xe||Xe.total===0?"none":Xe.assigned===Xe.total?"all":Xe.assigned>0?"partial":"none"}});return{name:Oe,actions:Ye}});return Me},[n,t,b,V]),G=j.useMemo(function(){var be={},Te=b.toLowerCase();return ap.forEach(function(Me){var Oe=n[Me]||[],Ye=nT[Me];be[Me]=Oe.filter(function(_e){var ce=aT(_e[Ye]);if(ce)return!1;var Ce=!Te||_e.name&&_e.name.toLowerCase().includes(Te);return Ce})}),be},[n,b]),W=j.useMemo(function(){var be=0;return ap.forEach(function(Te){be+=(G[Te]||[]).length}),be},[G]);async function Z(be,Te,Me,Oe){await Hne({module:be,action:Te,roleId:Me,assign:Oe}),a(function(Ye){var _e={};return ap.forEach(function(ce){var Ce=nT[ce];_e[ce]=Ye[ce].map(function(Ae){var Xe=aT(Ae[Ce]);if(!Xe||Xe.module!==be||Xe.action!==Te)return Ae;var Ge;if(Oe){var ut=Ae.roles&&Ae.roles.some(function(yr){return yr.id===Me});if(ut)return Ae;var zt=t.find(function(yr){return yr.id===Me});Ge=(Ae.roles||[]).concat(zt?[zt]:[])}else Ge=(Ae.roles||[]).filter(function(yr){return yr.id!==Me});return{...Ae,roles:Ge}})}),_e})}function Q(be,Te){N(function(Me){var Oe={...Me};return Te?Oe[be]=!0:delete Oe[be],Oe})}var U=j.useCallback(async function(be,Te,Me,Oe){var Ye="module:"+be+":"+Te+":"+Me;Q(Ye,!0);try{await Z(be,Te,Me,Oe!=="all")}catch(_e){R(_e.message)}finally{Q(Ye,!1)}},[t]),K=j.useCallback(async function(be,Te,Me,Oe){if(nae(p,Oe)&&H===!1){R('The server does not store access states yet, so "'+Oe+'" cannot be saved'+(p==="role"?" for a role.":" for a "+p+".")+" Enabled and Hidden on roles work today.");return}var Ye="module:"+be+":"+Te+":"+(Me||p);Q(Ye,!0),R("");try{if(p==="role"){for(var _e=rae(Oe),ce=0;ce<_e.length;ce++){var Ce=_e[ce];Ce.call==="grant"?await Z(be,Te,Me,!0):Ce.call==="revoke"?await Z(be,Te,Me,!1):H&&await vB({scope:"role",scopeId:Me,module:be,action:Te,roleId:Me,state:Ce.call==="setState"?Ce.state:null})}se(zp(be,Te,Me),Oe==="disabled"?"disabled":null)}else await vB({scope:p,scopeId:m,module:be,action:Te,state:Oe==="inherit"?null:Oe}),se(zp(be,Te),Oe==="inherit"?null:Oe)}catch(Ae){R(Ae.message)}finally{Q(Ye,!1)}},[t,p,m,H]);function se(be,Te){Y(function(Me){var Oe={...Me};return Te?Oe[be]=Te:delete Oe[be],Oe})}var ge=j.useCallback(function(be){var Te={};Te[l]=be,Te[s]=null,y(Te,{replace:!0})},[y,l,s]),ue=j.useCallback(function(be){var Te={};Te[s]=be||null,y(Te,{replace:!0})},[y,s]),de=j.useCallback(async function(be,Te,Me,Oe){var Ye="item:"+be+":"+Te+":"+Me;N(function(_e){var ce={..._e};return ce[Ye]=!0,ce});try{await Gne({type:be,itemId:Te,roleId:Me,assign:!Oe}),a(function(_e){var ce={..._e};return ce[be]=_e[be].map(function(Ce){if(Ce.id!==Te)return Ce;var Ae;if(Oe)Ae=Ce.roles.filter(function(Ge){return Ge.id!==Me});else{var Xe=t.find(function(Ge){return Ge.id===Me});Ae=Ce.roles.concat(Xe?[Xe]:[])}return{...Ce,roles:Ae}}),ce})}catch(_e){R(_e.message)}finally{N(function(_e){var ce={..._e};return delete ce[Ye],ce})}},[t]);function me(be,Te){return be.roles&&be.roles.some(function(Me){return Me.id===Te})}function ae(be,Te,Me){return!!E["module:"+be+":"+Te+":"+(Me||p)]}function ye(be,Te,Me){return!!E["item:"+be+":"+Te+":"+Me]}var nt=j.useCallback(function(be){var Te={};Te[i]=be,y(Te,{replace:!0}),w("")},[y,i]);return{roles:t,modules:q,uncategorized:G,uncategorizedCount:W,uncatSubTab:v,setUncatSubTab:x,activeView:h,setActiveView:nt,search:b,setSearch:w,loading:C,error:M,handleModuleToggle:U,handleStateChange:K,handleItemToggle:de,appliesTo:p,setAppliesTo:ge,scopeId:m,setScopeId:ue,workspaces:L,users:I,statesSupported:H,isItemAssigned:me,isModuleSaving:ae,isItemSaving:ye,reload:P}}var qx=[{key:"roles",label:"Roles",fields:[{key:"name",label:"Name",required:!0}]},{key:"apis",label:"APIs",fields:[{key:"name",label:"Name",required:!0},{key:"apiGroup",label:"Group",type:"group",placeholder:"e.g. account:view"},{key:"isPublic",label:"Public",type:"boolean"}]},{key:"pages",label:"Pages",fields:[{key:"name",label:"Name",required:!0},{key:"uiPagesGroup",label:"Group",type:"group",placeholder:"e.g. account:view"},{key:"isPublic",label:"Public",type:"boolean"}]},{key:"elements",label:"Elements",fields:[{key:"name",label:"Name",required:!0},{key:"uiElementsGroup",label:"Group",type:"group",placeholder:"e.g. users:edit"}]},{key:"menus",label:"Menus",fields:[{key:"name",label:"Name",required:!0},{key:"menuGroup",label:"Group",type:"group",placeholder:"e.g. reports:view"},{key:"isPublic",label:"Public",type:"boolean"}]}],lae=qx.map(function(e){return e.key});function sae(e){e=e||{};var t=jh(e.urlKey,"tab")||"tab",r=jh(e.urlKey,"item")||"item",n=j.useMemo(function(){var ue={};return ue[t]="roles",ue},[t]),a=qs(n,{inUrl:e.urlKey!==!1}),i=Wx(a.get(t),lae,"roles"),o=a.get(r),[l,s]=j.useState({}),[c,f]=j.useState(""),[h,v]=j.useState(!0),[p,m]=j.useState(""),[y,x]=j.useState(!1),[b,w]=j.useState({at:null,form:null}),[C,A]=j.useState({}),M=X2(),R=!!(M&&M.hasRole&&M.hasRole("Super Admin"));j.useEffect(function(){E(i)},[i]);async function E(ue){v(!0),m("");try{var de=await Yne(ue);s(function(me){var ae={...me};return ae[ue]=de,ae})}catch(me){m(me.message)}finally{v(!1)}}var N=qx.find(function(ue){return ue.key===i})||qx[0],L=Xne(l[i],o),O=L===ps?ps:L?L.id:null,I=L?i+":"+o:null,z=L===ps?Zne(N.fields):L?Kne(N.fields,L):{},V=I&&b.at===I?b.form:z;function Y(ue){var de={};de[r]=ue,w({at:null,form:null}),a.set(de)}var H={apis:"apiGroup",pages:"uiPagesGroup",elements:"uiElementsGroup",menus:"menuGroup"},F=j.useMemo(function(){var ue={};return["apis","pages","elements","menus"].forEach(function(de){var me=H[de];(l[de]||[]).forEach(function(ae){var ye=ae[me];ye&&ye.indexOf(":")!==-1&&(ue[ye]=!0)})}),Object.keys(ue).sort()},[l]),X=j.useMemo(function(){var ue=l[i]||[];if(i==="roles"&&(ue=ue.filter(function(me){return me.name!=="Super Admin"})),!c.trim())return ue;var de=c.toLowerCase();return ue.filter(function(me){return Object.values(me).some(function(ae){return ae&&String(ae).toLowerCase().includes(de)})})},[l,i,c]),P=a.set,q=j.useCallback(function(ue){var de={};de[t]=ue,de[r]=null,P(de,{replace:!0}),f(""),w({at:null,form:null})},[P,t,r]);function G(){Y(ps)}function W(ue){Y(ue.id)}function Z(){Y(null)}function Q(ue,de){I&&w(function(me){var ae={...me.at===I?me.form:z};return ae[ue]=de,{at:I,form:ae}})}async function U(){x(!0),m("");try{var ue={...V};O!==ps&&(ue.id=O);var de=await bU(i,ue);O===ps?(ue.id=de.id,s(function(me){var ae={...me};return ae[i]=(ae[i]||[]).concat([ue]),ae})):s(function(me){var ae={...me};return ae[i]=(ae[i]||[]).map(function(ye){return ye.id!==O?ye:{...ye,...ue}}),ae}),Y(null)}catch(me){m(me.message)}finally{x(!1)}}async function K(ue){var de=ue.scope==="system"?"company":"system";A(function(me){var ae={...me};return ae[ue.id]=!0,ae}),m("");try{await Wne(ue.id,de),s(function(me){var ae={...me};return ae.apis=(ae.apis||[]).map(function(ye){return ye.id===ue.id?{...ye,scope:de}:ye}),ae})}catch(me){m(me.message)}finally{A(function(me){var ae={...me};return delete ae[ue.id],ae})}}function se(ue){return!!C[ue]}async function ge(ue){x(!0),m("");try{await $ne(i,ue),s(function(de){var me={...de};return me[i]=(me[i]||[]).filter(function(ae){return ae.id!==ue}),me}),O===ue&&Y(null)}catch(de){m(de.message)}finally{x(!1)}}return{tabs:qx,activeTab:i,setActiveTab:q,currentTab:N,items:X,groupNames:F,search:c,setSearch:f,loading:h,error:p,saving:y,editingItem:O,editForm:V,startAdd:G,startEdit:W,cancelEdit:Z,updateField:Q,handleSave:U,handleDelete:ge,isSuperAdmin:R,handleScopeToggle:K,isScopeSaving:se,reload:function(){E(i)}}}function iT(e,t){var r=t&&t.menus||[],n={},a={};return(t&&t.menuItems||[]).forEach(function(i,o){!i||!i.name||(n[i.name]=i.label,a[i.name]=o)}),(e||[]).map(function(i,o){var l=i.key||i.name;return{item:i,key:l,index:o}}).filter(function(i){return i.key&&r.indexOf(i.key)!==-1}).sort(function(i,o){var l=a[i.key]===void 0?1/0:a[i.key],s=a[o.key]===void 0?1/0:a[o.key];return l!==s?l-s:i.index-o.index}).map(function(i){return Object.assign({},i.item,{key:i.key,label:n[i.key]||i.item.label||i.key})})}var _U=[{key:"userRoles",label:"User Roles",path:"/auth/admin/user-roles"},{key:"accessMatrix",label:"Access Matrix",path:"/auth/admin/access-matrix"},{key:"masterSettings",label:"Master Settings",path:"/auth/admin/master-settings"}];function wU({children:e,page:t,roles:r,loginPath:n="/auth/login",deniedPath:a="/auth/login"}){const{authenticated:i,hasPage:o,hasRole:l}=xU(),s=Da();return i?t&&!o(t)?_.jsx(eg,{to:a,replace:!0}):r&&r.length>0&&!r.some(f=>l(f))?_.jsx(eg,{to:a,replace:!0}):e:(iee(s),_.jsx(eg,{to:n,replace:!0}))}function bm({email:e,setEmail:t,password:r,setPassword:n,loading:a,handleSubmit:i,submitLabel:o,links:l}){var[s,c]=j.useState(!1);return _.jsxs("form",{className:"xeplr-login-form",onSubmit:i,children:[_.jsxs("div",{className:"xeplr-login-field",children:[_.jsx("label",{htmlFor:"xeplr-email",children:"Email"}),_.jsx("input",{id:"xeplr-email",type:"email",autoComplete:"email",value:e,onChange:f=>t(f.target.value),required:!0,placeholder:"you@company.com"})]}),_.jsxs("div",{className:"xeplr-login-field",children:[_.jsxs("div",{className:"xeplr-login-field-head",children:[_.jsx("label",{htmlFor:"xeplr-password",children:"Password"}),_.jsx(hr,{className:"xeplr-login-forgot",to:"/auth/forgot-password",children:"Forgot password?"})]}),_.jsxs("div",{className:"xeplr-login-password",children:[_.jsx("input",{id:"xeplr-password",type:s?"text":"password",autoComplete:"current-password",value:r,onChange:f=>n(f.target.value),required:!0,placeholder:"Your password"}),_.jsx("button",{type:"button",className:"xeplr-login-reveal",onClick:()=>c(!s),"aria-label":s?"Hide password":"Show password","aria-pressed":s,children:s?"Hide":"Show"})]})]}),_.jsx("button",{type:"submit",className:"xeplr-login-submit",disabled:a,children:a?"Signing in…":o||"Sign in"}),l!==!1&&_.jsxs("p",{className:"xeplr-login-alt",children:["New here? ",_.jsx(hr,{to:"/auth/register",children:"Create an account"})]})]})}function u_({brand:e}){if(e&&e.logo)return _.jsx("img",{className:"xeplr-login-logo",src:e.logo,alt:""});var t=(e&&e.name||"x").charAt(0).toUpperCase();return _.jsx("span",{className:"xeplr-login-mark","aria-hidden":"true",children:t})}function K2(e){return e&&e.name||""}function CU(e){var t=K2(e.brand);return _.jsx("div",{className:"xeplr-login xeplr-login-d1",children:_.jsxs("div",{className:"xeplr-login-card",children:[_.jsx(u_,{brand:e.brand}),_.jsx("h1",{children:t?"Sign in to "+t:"Welcome back"}),_.jsx("p",{className:"xeplr-login-sub",children:"Enter your details to continue."}),_.jsx(bm,{...e})]})})}function uae(e){var t=e.brand||{};return _.jsxs("div",{className:"xeplr-login xeplr-login-d2",children:[_.jsxs("aside",{className:"xeplr-login-panel",children:[_.jsxs("div",{className:"xeplr-login-panel-brand",children:[_.jsx(u_,{brand:t}),_.jsx("span",{children:t.name||"Your workspace"})]}),_.jsx("div",{className:"xeplr-login-panel-copy",children:_.jsx("h2",{children:t.tagline||"Everything your team needs, in one place."})}),_.jsxs("span",{className:"xeplr-login-panel-foot",children:["© ",new Date().getFullYear()," ",t.name||""]})]}),_.jsx("main",{className:"xeplr-login-main",children:_.jsxs("div",{className:"xeplr-login-inner",children:[_.jsx("h1",{children:"Welcome back"}),_.jsx("p",{className:"xeplr-login-sub",children:"Sign in to your account."}),_.jsx(bm,{...e})]})})]})}function cae(e){var t=K2(e.brand);return _.jsx("div",{className:"xeplr-login xeplr-login-d3",children:_.jsxs("div",{className:"xeplr-login-inner",children:[_.jsx("span",{className:"xeplr-login-eyebrow",children:t||"Sign in"}),_.jsx("h1",{children:"Good to see you again."}),_.jsx(bm,{...e,submitLabel:"Continue"})]})})}function fae(e){var t=K2(e.brand);return _.jsxs("div",{className:"xeplr-login xeplr-login-d4",children:[_.jsx("span",{className:"xeplr-login-glow xeplr-login-glow-a","aria-hidden":"true"}),_.jsx("span",{className:"xeplr-login-glow xeplr-login-glow-b","aria-hidden":"true"}),_.jsxs("div",{className:"xeplr-login-card",children:[_.jsx(u_,{brand:e.brand}),_.jsx("h1",{children:t||"Sign in"}),_.jsx("p",{className:"xeplr-login-sub",children:e.brand&&e.brand.tagline||"Sign in to pick up where you left off."}),_.jsx(bm,{...e})]})]})}function hae(e){var t=e.brand||{};return _.jsxs("div",{className:"xeplr-login xeplr-login-d5",children:[_.jsxs("header",{className:"xeplr-login-bar",children:[_.jsxs("div",{className:"xeplr-login-panel-brand",children:[_.jsx(u_,{brand:t}),_.jsx("span",{children:t.name||"Workspace"})]}),_.jsx(hr,{className:"xeplr-login-bar-action",to:"/auth/register",children:"Create account"})]}),_.jsx("main",{className:"xeplr-login-main",children:_.jsxs("div",{className:"xeplr-login-card",children:[_.jsx("h1",{children:"Sign in"}),_.jsx("p",{className:"xeplr-login-sub",children:"Use your work email and password."}),_.jsx(bm,{...e,links:!1})]})}),_.jsxs("footer",{className:"xeplr-login-footer",children:[_.jsxs("span",{children:["© ",new Date().getFullYear()," ",t.name||""]}),_.jsx(hr,{to:"/auth/forgot-password",children:"Trouble signing in?"})]})]})}function dae({form:e,success:t,loading:r,handleChange:n,handleSubmit:a}){return t?_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Check your email"}),_.jsx("p",{className:"xeplr-auth-note",children:t}),_.jsxs("div",{className:"xeplr-auth-links",children:[_.jsxs("p",{children:["No email? ",_.jsx(hr,{to:"/auth/resend-activation",children:"Send the link again"})]}),_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Back to Login"})})]})]}):_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Register"}),_.jsxs("form",{onSubmit:a,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-name",children:"Name"}),_.jsx("input",{id:"xeplr-name",name:"name",type:"text",value:e.name,onChange:n,placeholder:"Enter your name"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-email",children:"Email"}),_.jsx("input",{id:"xeplr-email",name:"email",type:"email",value:e.email,onChange:n,required:!0,placeholder:"Enter your email"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-phone",children:"Phone Number"}),_.jsx("input",{id:"xeplr-phone",name:"phoneNumber",type:"text",value:e.phoneNumber,onChange:n,placeholder:"Enter your phone number"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-password",children:"Password"}),_.jsx("input",{id:"xeplr-password",name:"password",type:"password",value:e.password,onChange:n,required:!0,placeholder:"Enter your password"})]}),_.jsx("button",{type:"submit",disabled:r,children:r?"Registering...":"Register"})]}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsxs("p",{children:["Already have an account? ",_.jsx(hr,{to:"/auth/login",children:"Login"})]})})]})}function vae({email:e,setEmail:t,loading:r,handleSubmit:n}){return _.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Forgot Password"}),_.jsxs("form",{onSubmit:n,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-email",children:"Email"}),_.jsx("input",{id:"xeplr-email",type:"email",value:e,onChange:a=>t(a.target.value),required:!0,placeholder:"Enter your registered email"})]}),_.jsx("button",{type:"submit",disabled:r,children:r?"Sending...":"Send Reset Link"})]}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Back to Login"})})})]})}function pae({token:e,password:t,setPassword:r,success:n,loading:a,handleSubmit:i}){return!e&&!n?_.jsx("div",{className:"xeplr-auth-container",children:_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/forgot-password",children:"Request a new reset link"})})})}):_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Reset Password"}),n&&_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Go to Login"})})}),!n&&_.jsxs("form",{onSubmit:i,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-password",children:"New Password"}),_.jsx("input",{id:"xeplr-password",type:"password",value:t,onChange:o=>r(o.target.value),required:!0,placeholder:"Enter new password"})]}),_.jsx("button",{type:"submit",disabled:a,children:a?"Resetting...":"Reset Password"})]}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Back to Login"})})})]})}function gae({email:e,setEmail:t,success:r,loading:n,handleSubmit:a}){return _.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Send the activation link again"}),_.jsx("p",{className:"xeplr-auth-note",children:r||"Enter the email you registered with and we will send a new activation link. The old link stops working."}),_.jsxs("form",{onSubmit:a,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-email",children:"Email"}),_.jsx("input",{id:"xeplr-email",type:"email",value:e,onChange:i=>t(i.target.value),required:!0,placeholder:"Enter your email"})]}),_.jsx("button",{type:"submit",disabled:n,children:n?"Sending...":"Send link"})]}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Back to Login"})})})]})}function mae({invitee:e,name:t,setName:r,password:n,setPassword:a,confirmPassword:i,setConfirmPassword:o,error:l,success:s,checking:c,loading:f,handleSubmit:h}){return c?_.jsx("div",{className:"xeplr-auth-container",children:_.jsx("div",{className:"xeplr-auth-alert",children:"Checking your invite..."})}):s?_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"You're in"}),_.jsx("p",{className:"xeplr-auth-note",children:s}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Go to Login"})})})]}):e?_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Accept your invite"}),_.jsxs("p",{className:"xeplr-auth-note",children:["Set a password for ",e.email," to finish creating your account."]}),_.jsxs("form",{onSubmit:h,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-name",children:"Name"}),_.jsx("input",{id:"xeplr-name",type:"text",value:t,onChange:v=>r(v.target.value),placeholder:"Your name"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-password",children:"Password"}),_.jsx("input",{id:"xeplr-password",type:"password",autoComplete:"new-password",value:n,onChange:v=>a(v.target.value),required:!0,placeholder:"Choose a password"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-confirm-password",children:"Confirm password"}),_.jsx("input",{id:"xeplr-confirm-password",type:"password",autoComplete:"new-password",value:i,onChange:v=>o(v.target.value),required:!0,placeholder:"Type it again"})]}),_.jsx("button",{type:"submit",disabled:f,children:f?"Saving...":"Accept invite"})]})]}):_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Invite not valid"}),_.jsxs("p",{className:"xeplr-auth-note",children:[l||"This invite link is not valid."," Ask the person who invited you to send a new invite."]}),_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Go to Login"})})})]})}function yae(){return _.jsxs("div",{className:"xeplr-auth-container",children:[_.jsxs("div",{className:"xeplr-auth-not-activated",children:[_.jsx("h1",{children:"Activate your account"}),_.jsx("p",{className:"xeplr-auth-note",children:"Your account is not activated yet. Open the activation link we emailed you when you registered."})]}),_.jsxs("div",{className:"xeplr-auth-links",children:[_.jsxs("p",{children:["No email? ",_.jsx(hr,{to:"/auth/resend-activation",children:"Send the link again"})]}),_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Back to Login"})})]})]})}function xae({token:e,error:t,success:r,loading:n}){return e?_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Account Activation"}),n&&_.jsx("div",{className:"xeplr-auth-alert",children:"Activating your account..."}),r&&_.jsx("div",{className:"xeplr-auth-links",children:_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Go to Login"})})}),t&&_.jsxs("div",{className:"xeplr-auth-links",children:[_.jsx("p",{children:_.jsx(hr,{to:"/auth/resend-activation",children:"Send a new activation link"})}),_.jsx("p",{children:_.jsx(hr,{to:"/auth/login",children:"Go to Login"})})]})]}):_.jsx("div",{className:"xeplr-auth-container",children:_.jsxs("div",{className:"xeplr-auth-links",children:[_.jsx("p",{children:_.jsx(hr,{to:"/auth/resend-activation",children:"Send a new activation link"})}),_.jsx("p",{children:_.jsx(hr,{to:"/auth/register",children:"Register a new account"})})]})})}function Sae({currentPassword:e,setCurrentPassword:t,newPassword:r,setNewPassword:n,confirmPassword:a,setConfirmPassword:i,loading:o,handleSubmit:l}){return _.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Change Password"}),_.jsxs("form",{onSubmit:l,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-current-password",children:"Current Password"}),_.jsx("input",{id:"xeplr-current-password",type:"password",value:e,onChange:s=>t(s.target.value),required:!0,placeholder:"Enter current password"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-new-password",children:"New Password"}),_.jsx("input",{id:"xeplr-new-password",type:"password",value:r,onChange:s=>n(s.target.value),required:!0,placeholder:"Enter new password"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-confirm-password",children:"Confirm New Password"}),_.jsx("input",{id:"xeplr-confirm-password",type:"password",value:a,onChange:s=>i(s.target.value),required:!0,placeholder:"Confirm new password"})]}),_.jsx("button",{type:"submit",disabled:o,children:o?"Changing...":"Change Password"})]})]})}function bae({form:e,loading:t,fetching:r,handleChange:n,handleSubmit:a}){return r?_.jsx("div",{className:"xeplr-auth-container",children:_.jsx("p",{children:"Loading profile..."})}):_.jsxs("div",{className:"xeplr-auth-container",children:[_.jsx("h1",{children:"Profile"}),_.jsxs("form",{onSubmit:a,children:[_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-profile-name",children:"Name"}),_.jsx("input",{id:"xeplr-profile-name",name:"name",type:"text",value:e.name,onChange:n,placeholder:"Your name"})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-profile-email",children:"Email"}),_.jsx("input",{id:"xeplr-profile-email",name:"email",type:"email",value:e.email,onChange:n,placeholder:"Your email",disabled:!0})]}),_.jsxs("div",{className:"xeplr-auth-form-group",children:[_.jsx("label",{htmlFor:"xeplr-profile-phone",children:"Phone Number"}),_.jsx("input",{id:"xeplr-profile-phone",name:"phoneNumber",type:"text",value:e.phoneNumber,onChange:n,placeholder:"Your phone number"})]}),_.jsx("button",{type:"submit",disabled:t,children:t?"Saving...":"Save Changes"})]})]})}function Q2(){return _.jsx("nav",{className:"xeplr-admin-pages","aria-label":"Admin pages",children:_U.map(function(e){return _.jsx(LH,{to:e.path,end:!0,className:function(t){return"xeplr-admin-page-link"+(t.isActive?" xeplr-admin-page-link-active":"")},children:e.label},e.key)})})}function _ae({users:e,roles:t,search:r,setSearch:n,loading:a,error:i,saving:o,handleToggle:l,handleActivate:s,isAssigned:c,reload:f,newRoleName:h,setNewRoleName:v,creatingRole:p,createRole:m}){return _.jsxs("div",{className:"xeplr-admin-container",children:[_.jsx(Q2,{}),_.jsxs("div",{className:"xeplr-admin-header",children:[_.jsx("h2",{children:"User Roles"}),_.jsxs("div",{className:"xeplr-admin-toolbar",children:[_.jsx("input",{id:"xeplr-admin-user-search",type:"text",placeholder:"Search users by name or email...",value:r,onChange:function(y){n(y.target.value)},className:"xeplr-admin-search"}),_.jsx("button",{type:"button",onClick:f,className:"xeplr-admin-btn-secondary",children:"Refresh"})]})]}),_.jsxs("form",{className:"xeplr-admin-new-role",onSubmit:function(y){y.preventDefault(),m()},children:[_.jsx("input",{id:"xeplr-admin-new-role",type:"text",placeholder:"New role, e.g. Workspace Admin",value:h,onChange:function(y){v(y.target.value)},className:"xeplr-admin-search"}),_.jsx("button",{type:"submit",className:"xeplr-admin-btn-primary",disabled:p||!h.trim(),children:p?"Adding…":"Add role"})]}),i&&_.jsx("div",{className:"xeplr-admin-alert xeplr-admin-alert-error",children:i}),a?_.jsx("div",{className:"xeplr-admin-loading",children:"Loading..."}):_.jsx("div",{className:"xeplr-admin-matrix-wrapper",children:_.jsxs("table",{className:"xeplr-admin-matrix",role:"grid",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"xeplr-admin-sticky-col",children:"User"}),t.map(function(y){return _.jsx("th",{className:"xeplr-admin-role-header",children:y.name},y.id)})]})}),_.jsx("tbody",{children:e.length===0?_.jsx("tr",{children:_.jsx("td",{colSpan:t.length+1,className:"xeplr-admin-empty",children:"No users found"})}):e.map(function(y){return _.jsxs("tr",{children:[_.jsxs("td",{className:"xeplr-admin-sticky-col xeplr-admin-user-cell",children:[_.jsx("div",{className:"xeplr-admin-user-name",children:y.name||"—"}),_.jsx("div",{className:"xeplr-admin-user-email",children:y.email}),y.isActivated===!1&&y.invitePending&&_.jsx("div",{className:"xeplr-admin-user-pending",children:_.jsx("span",{className:"xeplr-admin-pending-badge",children:"Invited"})}),y.isActivated===!1&&!y.invitePending&&s&&_.jsxs("div",{className:"xeplr-admin-user-pending",children:[_.jsx("span",{className:"xeplr-admin-pending-badge",children:"Not activated"}),_.jsx("button",{type:"button",className:"xeplr-admin-btn-link",disabled:!!o[y.id+":activate"],onClick:function(){s(y.id)},children:o[y.id+":activate"]?"Activating…":"Activate"})]})]}),t.map(function(x){var b=c(y,x.id),w=y.id+":"+x.id,C=!!o[w];return _.jsx("td",{className:"xeplr-admin-cell",children:_.jsxs("label",{className:"xeplr-admin-toggle",children:[_.jsx("input",{type:"checkbox",checked:b,disabled:C,onChange:function(){l(y.id,x.id,b)}}),_.jsx("span",{className:"xeplr-admin-checkmark"+(C?" xeplr-admin-saving":"")})]})},x.id)})]},y.id)})})]})})]})}var wae={view:"View Only",create:"Create",edit:"Add / Edit",delete:"Delete"},Cae={view:"xeplr-admin-action-view",create:"xeplr-admin-action-edit",edit:"xeplr-admin-action-edit",delete:"xeplr-admin-action-delete"},Tae=[{key:"apis",label:"APIs"},{key:"pages",label:"Pages"},{key:"elements",label:"Elements"},{key:"menus",label:"Menus"}];function Aae({roles:e,modules:t,uncategorized:r,uncategorizedCount:n,uncatSubTab:a,setUncatSubTab:i,activeView:o,setActiveView:l,search:s,setSearch:c,loading:f,error:h,handleStateChange:v,handleItemToggle:p,isItemAssigned:m,isModuleSaving:y,isItemSaving:x,reload:b,appliesTo:w,setAppliesTo:C,scopeId:A,setScopeId:M,workspaces:R,users:E,statesSupported:N}){return _.jsxs("div",{className:"xeplr-admin-container",children:[_.jsx(Q2,{}),_.jsxs("div",{className:"xeplr-admin-header",children:[_.jsx("h2",{children:"Access Matrix"}),_.jsx("button",{type:"button",onClick:b,className:"xeplr-admin-btn-secondary",children:"Refresh"})]}),_.jsxs("div",{className:"xeplr-admin-tabs",role:"tablist",children:[_.jsx("button",{role:"tab","aria-selected":o==="modules",className:"xeplr-admin-tab"+(o==="modules"?" xeplr-admin-tab-active":""),onClick:function(){l("modules")},children:"Modules"}),_.jsxs("button",{role:"tab","aria-selected":o==="uncategorized",className:"xeplr-admin-tab"+(o==="uncategorized"?" xeplr-admin-tab-active":""),onClick:function(){l("uncategorized")},children:["Uncategorized",n>0&&_.jsx("span",{className:"xeplr-admin-tab-badge",children:n})]})]}),o==="modules"&&Mae(w,C,A,M,R,E),o==="modules"&&N===!1&&_.jsx("div",{className:"xeplr-admin-alert xeplr-admin-alert-info",children:"Workspace and user overrides are not stored yet. Roles work today: Enabled, Disabled and Hidden."}),_.jsx("div",{className:"xeplr-admin-toolbar",children:_.jsx("input",{id:"xeplr-admin-access-search",type:"text",placeholder:o==="modules"?"Search modules...":"Search items...",value:s,onChange:function(L){c(L.target.value)},className:"xeplr-admin-search"})}),h&&_.jsx("div",{className:"xeplr-admin-alert xeplr-admin-alert-error",children:h}),f?_.jsx("div",{className:"xeplr-admin-loading",children:"Loading..."}):o==="modules"?Rae(e,t,v,y,w,A):Eae(e,r,a,i,p,m,x)]})}var Dae=[{key:"role",label:"Roles"},{key:"workspace",label:"Workspace"},{key:"user",label:"User"}];function Mae(e,t,r,n,a,i){var o=e==="workspace"?a||[]:e==="user"?i||[]:[];return _.jsxs("div",{className:"xeplr-admin-scope-bar",children:[_.jsx("span",{className:"xeplr-admin-scope-label",children:"Applies to"}),_.jsx("div",{id:"xeplr-admin-access-scope",role:"radiogroup","aria-label":"Applies to",className:"xeplr-admin-scope-options",children:Dae.map(function(l){var s=e===l.key;return _.jsx("button",{type:"button",role:"radio","aria-checked":s,className:"xeplr-admin-scope-option"+(s?" xeplr-admin-scope-option-active":""),onClick:function(){t(l.key)},children:l.label},l.key)})}),e!=="role"&&_.jsxs("select",{id:"xeplr-admin-access-scope-target",className:"xeplr-admin-scope-select",value:r,onChange:function(l){n(l.target.value)},children:[_.jsx("option",{value:"",children:e==="workspace"?"Choose a workspace…":"Choose a user…"}),o.map(function(l){return _.jsx("option",{value:l.id,children:l.name||l.email||l.id},l.id)})]})]})}function gB(e,t,r,n,a){return _.jsxs("select",{"aria-label":a,value:e,disabled:n,className:"xeplr-admin-state-select xeplr-admin-state-"+e,onChange:function(i){r(i.target.value)},children:[e==="partial"&&_.jsx("option",{value:"partial",disabled:!0,children:pB.partial}),t.map(function(i){return _.jsx("option",{value:i,children:pB[i]},i)})]})}function Rae(e,t,r,n,a,i){if(t.length===0)return _.jsxs("div",{className:"xeplr-admin-empty-box",children:["No modules found. Items need a ",_.jsx("code",{children:"module:action"})," group value to appear here."]});if(a!=="role"&&!i)return _.jsxs("div",{className:"xeplr-admin-empty-box",children:["Choose a ",a," above to see and change its overrides."]});var o=a==="role";return _.jsx("div",{className:"xeplr-admin-matrix-wrapper",children:_.jsxs("table",{className:"xeplr-admin-matrix",role:"grid",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"xeplr-admin-sticky-col xeplr-admin-module-col",children:"Module"}),_.jsx("th",{className:"xeplr-admin-action-col",children:"Action"}),o?e.map(function(l){return _.jsx("th",{className:"xeplr-admin-role-header",children:l.name},l.id)}):_.jsx("th",{className:"xeplr-admin-role-header",children:"State"})]})}),_.jsx("tbody",{children:t.map(function(l){return l.actions.map(function(s,c){var f=wae[s.action]||s.action,h=Cae[s.action]||"";return _.jsxs("tr",{className:c===0?"xeplr-admin-module-first-row":"",children:[c===0&&_.jsx("td",{className:"xeplr-admin-sticky-col xeplr-admin-module-name",rowSpan:l.actions.length,children:l.name}),_.jsx("td",{className:"xeplr-admin-action-cell "+h,children:f}),o?e.map(function(v){return _.jsx("td",{className:"xeplr-admin-cell",children:gB(s.getCellState(v.id),Z2,function(p){r(l.name,s.action,v.id,p)},n(l.name,s.action,v.id),l.name+" "+f+" for "+v.name)},v.id)}):_.jsx("td",{className:"xeplr-admin-cell",children:gB(s.getOverrideState(),Qne,function(v){r(l.name,s.action,null,v)},n(l.name,s.action,null),l.name+" "+f)})]},l.name+":"+s.action)})})})]})})}function Eae(e,t,r,n,a,i,o){var l=t[r]||[];return _.jsxs("div",{children:[_.jsx("div",{className:"xeplr-admin-subtabs",children:Tae.map(function(s){var c=(t[s.key]||[]).length;return _.jsxs("button",{className:"xeplr-admin-subtab"+(r===s.key?" xeplr-admin-subtab-active":""),onClick:function(){n(s.key)},children:[s.label,c>0&&_.jsx("span",{className:"xeplr-admin-subtab-count",children:c})]},s.key)})}),_.jsx("div",{className:"xeplr-admin-matrix-wrapper",children:_.jsxs("table",{className:"xeplr-admin-matrix",role:"grid",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"xeplr-admin-sticky-col",children:"Name"}),e.map(function(s){return _.jsx("th",{className:"xeplr-admin-role-header",children:s.name},s.id)})]})}),_.jsx("tbody",{children:l.length===0?_.jsx("tr",{children:_.jsx("td",{colSpan:e.length+1,className:"xeplr-admin-empty",children:"No uncategorized items"})}):l.map(function(s){return _.jsxs("tr",{children:[_.jsx("td",{className:"xeplr-admin-sticky-col xeplr-admin-item-name",children:s.name}),e.map(function(c){var f=i(s,c.id),h=o(r,s.id,c.id);return _.jsx("td",{className:"xeplr-admin-cell",children:_.jsxs("label",{className:"xeplr-admin-toggle",children:[_.jsx("input",{type:"checkbox",checked:f,disabled:h,onChange:function(){a(r,s.id,c.id,f)}}),_.jsx("span",{className:"xeplr-admin-checkmark"+(h?" xeplr-admin-saving":"")})]})},c.id)})]},s.id)})})]})})]})}function Nae({tabs:e,activeTab:t,setActiveTab:r,currentTab:n,items:a,search:i,setSearch:o,loading:l,error:s,saving:c,editingItem:f,editForm:h,groupNames:v,startAdd:p,startEdit:m,cancelEdit:y,updateField:x,handleSave:b,handleDelete:w,reload:C,isSuperAdmin:A,handleScopeToggle:M,isScopeSaving:R}){var E=t==="apis"&&A;return _.jsxs("div",{className:"xeplr-admin-container",children:[_.jsx(Q2,{}),_.jsxs("div",{className:"xeplr-admin-header",children:[_.jsx("h2",{children:"Master Settings"}),_.jsxs("div",{style:{display:"flex",gap:"8px"},children:[_.jsxs("button",{type:"button",onClick:p,className:"xeplr-admin-btn-primary",disabled:c||f==="__new__",children:["+ Add ",n.label.replace(/s$/,"")]}),_.jsx("button",{type:"button",onClick:C,className:"xeplr-admin-btn-secondary",children:"Refresh"})]})]}),_.jsx("div",{className:"xeplr-admin-tabs",role:"tablist",children:e.map(function(N){return _.jsx("button",{role:"tab","aria-selected":t===N.key,className:"xeplr-admin-tab"+(t===N.key?" xeplr-admin-tab-active":""),onClick:function(){r(N.key)},children:N.label},N.key)})}),_.jsx("div",{className:"xeplr-admin-toolbar",children:_.jsx("input",{id:"xeplr-admin-master-search",type:"text",placeholder:"Search "+n.label.toLowerCase()+"...",value:i,onChange:function(N){o(N.target.value)},className:"xeplr-admin-search"})}),s&&_.jsx("div",{className:"xeplr-admin-alert xeplr-admin-alert-error",children:s}),l?_.jsx("div",{className:"xeplr-admin-loading",children:"Loading..."}):_.jsx("div",{className:"xeplr-admin-matrix-wrapper",children:_.jsxs("table",{className:"xeplr-admin-matrix xeplr-admin-master-table",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[n.fields.map(function(N){return _.jsx("th",{className:N.key==="name"?"xeplr-admin-sticky-col":"",children:N.label},N.key)}),E&&_.jsx("th",{className:"xeplr-admin-scope-col",children:"Super Admin only"}),_.jsx("th",{className:"xeplr-admin-actions-col",children:"Actions"})]})}),_.jsxs("tbody",{children:[f==="__new__"&&_.jsxs("tr",{className:"xeplr-admin-editing-row",children:[n.fields.map(function(N){return _.jsx("td",{className:N.key==="name"?"xeplr-admin-sticky-col":"",children:mB(N,h[N.key],function(L){x(N.key,L)},v)},N.key)}),_.jsx("td",{className:"xeplr-admin-actions-col",children:_.jsxs("div",{className:"xeplr-admin-action-btns",children:[_.jsx("button",{onClick:b,disabled:c,className:"xeplr-admin-btn-save",title:"Save",children:c?"...":"✓"}),_.jsx("button",{onClick:y,className:"xeplr-admin-btn-cancel",title:"Cancel",children:"✕"})]})})]}),a.length===0&&f!=="__new__"?_.jsx("tr",{children:_.jsxs("td",{colSpan:n.fields.length+(E?2:1),className:"xeplr-admin-empty",children:["No ",n.label.toLowerCase()," found"]})}):a.map(function(N){var L=f===N.id;return _.jsxs("tr",{className:L?"xeplr-admin-editing-row":"",children:[n.fields.map(function(O){var I=O.key==="name"?"xeplr-admin-sticky-col":"";return L?_.jsx("td",{className:I,children:mB(O,h[O.key],function(z){x(O.key,z)},v)},O.key):_.jsx("td",{className:I,children:Lae(O,N[O.key])},O.key)}),E&&_.jsx("td",{className:"xeplr-admin-scope-col",children:Iae(N,M,R(N.id))}),_.jsx("td",{className:"xeplr-admin-actions-col",children:L?_.jsxs("div",{className:"xeplr-admin-action-btns",children:[_.jsx("button",{onClick:b,disabled:c,className:"xeplr-admin-btn-save",title:"Save",children:c?"...":"✓"}),_.jsx("button",{onClick:y,className:"xeplr-admin-btn-cancel",title:"Cancel",children:"✕"})]}):_.jsxs("div",{className:"xeplr-admin-action-btns",children:[_.jsx("button",{onClick:function(){m(N)},className:"xeplr-admin-btn-edit",title:N.scope==="system"?"A Super Admin only API cannot be renamed":"Edit",disabled:f!==null||N.scope==="system",children:"✎"}),_.jsx("button",{onClick:function(){confirm("Delete this item?")&&w(N.id)},className:"xeplr-admin-btn-delete",title:N.scope==="system"?"A Super Admin only API cannot be deleted":"Delete",disabled:c||f!==null||N.scope==="system",children:"✕"})]})})]},N.id)})]})]})})]})}function mB(e,t,r,n){return e.type==="boolean"?_.jsxs("label",{className:"xeplr-admin-toggle",children:[_.jsx("input",{type:"checkbox",checked:!!t,onChange:function(a){r(a.target.checked?1:0)}}),_.jsx("span",{className:"xeplr-admin-checkmark"})]}):e.type==="group"?_.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[_.jsxs("select",{className:"xeplr-admin-inline-input xeplr-admin-group-input",style:{flex:1},value:(n||[]).indexOf(t)!==-1?t:"",onChange:function(a){r(a.target.value)},children:[_.jsx("option",{value:"",children:"-- select or type new --"}),(n||[]).map(function(a){return _.jsx("option",{value:a,children:a},a)})]}),_.jsx("input",{type:"text",value:t||"",onChange:function(a){r(a.target.value)},placeholder:e.placeholder||"or type new group",className:"xeplr-admin-inline-input xeplr-admin-group-input",style:{flex:1}})]}):_.jsx("input",{type:"text",value:t||"",onChange:function(a){r(a.target.value)},placeholder:e.placeholder||"",className:"xeplr-admin-inline-input",autoFocus:e.required})}function Lae(e,t){if(e.type==="boolean")return _.jsx("span",{className:t?"xeplr-admin-badge-yes":"xeplr-admin-badge-no",children:t?"Yes":"No"});var r=e.key.toLowerCase().includes("group");return r&&t?_.jsx("span",{className:"xeplr-admin-group-tag",children:t}):_.jsx("span",{className:e.key==="name"?"xeplr-admin-item-name":"",children:t||"—"})}function Iae(e,t,r){var n=e.scope==="system",a=!!e.scopeLocked;return _.jsxs("label",{className:"xeplr-admin-toggle",title:a?"Pinned as Super Admin only by a migration":n?"Only Super Admin can use this API":"Make this API Super Admin only",children:[_.jsx("input",{type:"checkbox",checked:n,disabled:r||a,"aria-label":"Super Admin only: "+e.name,onChange:function(){t(e)}}),_.jsx("span",{className:"xeplr-admin-checkmark"+(r?" xeplr-admin-saving":"")+(a?" xeplr-admin-locked":"")})]})}function Oae({user:e,accountItems:t,placement:r,triggerLabel:n,accountOpen:a,toggleAccount:i,closeAccount:o,accountRef:l,logout:s}){var c=e&&(e.name||e.email)||"Account",f=c.charAt(0).toUpperCase();return _.jsxs("div",{ref:l,className:"xeplr-nav-account"+(a?" xeplr-nav-account-open":""),children:[_.jsxs("button",{type:"button",className:"xeplr-nav-settings-trigger"+(n?" xeplr-nav-settings-trigger-labeled":""),onClick:i,"aria-haspopup":"menu","aria-expanded":a,"aria-label":"Settings",children:[_.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"3"}),_.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),n&&_.jsx("span",{className:"xeplr-nav-settings-trigger-label",children:n})]}),a&&_.jsxs("div",{className:"xeplr-nav-account-menu"+(r==="top"?" xeplr-nav-account-menu-top":""),role:"menu",children:[_.jsxs("div",{className:"xeplr-nav-account-header",children:[e&&e.profilePicUrl?_.jsx("img",{src:e.profilePicUrl,alt:"",className:"xeplr-nav-avatar xeplr-nav-avatar-img"}):_.jsx("span",{className:"xeplr-nav-avatar",children:f}),_.jsxs("div",{className:"xeplr-nav-account-header-text",children:[_.jsx("div",{className:"xeplr-nav-account-name",children:c}),e&&e.email&&e.name&&_.jsx("div",{className:"xeplr-nav-account-email",children:e.email})]})]}),(t||[]).map(function(h){return _.jsx(hr,{to:h.path,className:"xeplr-nav-account-item",role:"menuitem",onClick:o,children:h.label||h.name},h.key||h.name)}),_.jsx("div",{className:"xeplr-nav-account-divider"}),_.jsx("button",{type:"button",className:"xeplr-nav-account-item xeplr-nav-account-logout",role:"menuitem",onClick:s,children:"Logout"})]})]})}const J2=j.memo(Oae);function kae({notifications:e,label:t}){if(!e)return null;var r=e.count;return _.jsxs("button",{type:"button",className:"xeplr-nav-bell"+(t?" xeplr-nav-bell-labeled":""),onClick:e.onClick,"aria-label":r>0?r+" unread notifications":"Notifications",children:[_.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),_.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),r>0&&_.jsx("span",{className:"xeplr-nav-badge",children:r>9?"9+":r}),t&&_.jsx("span",{className:"xeplr-nav-bell-label",children:t})]})}const eE=j.memo(kae);function Pae({logo:e,navMiddle:t,user:r,accountItems:n,notifications:a,accountOpen:i,toggleAccount:o,closeAccount:l,accountRef:s,logout:c}){return _.jsxs("header",{className:"xeplr-nav xeplr-nav-top",children:[_.jsx("div",{className:"xeplr-nav-left",children:e&&_.jsx("img",{src:e,alt:"",className:"xeplr-nav-logo"})}),_.jsx("div",{className:"xeplr-nav-middle",children:t}),_.jsxs("div",{className:"xeplr-nav-right",children:[_.jsx(eE,{notifications:a}),_.jsx(J2,{user:r,accountItems:n,accountOpen:i,toggleAccount:o,closeAccount:l,accountRef:s,logout:c})]})]})}const jae=j.memo(Pae);function Bae(e){var t=[],r=[],n={};return e.forEach(function(a){if(!a.group){t.push(a);return}n[a.group]||(n[a.group]=[],r.push(a.group)),n[a.group].push(a)}),{ungrouped:t,groupOrder:r,groups:n}}function zae(){return typeof window<"u"&&!!window.matchMedia&&window.matchMedia("(max-width: 640px)").matches}function Vae({drawerOpen:e,toggleDrawer:t,closeDrawer:r,drawerItems:n,expandedLogo:a,logo:i,drawerPromo:o,user:l,accountItems:s,notifications:c,accountOpen:f,toggleAccount:h,closeAccount:v,accountRef:p,logout:m,hideFooterIcons:y,drawerWidth:x,drawerResizing:b,startDrawerResize:w,resetDrawerWidth:C,nudgeDrawerWidth:A,drawerWidthBounds:M}){var[R,E]=j.useState(""),N=Da().pathname,L=M||{min:180,max:480,step:16};function O(H){H.key==="ArrowLeft"?(H.preventDefault(),A(-L.step)):H.key==="ArrowRight"?(H.preventDefault(),A(L.step)):H.key==="Home"?(H.preventDefault(),A(-1/0)):H.key==="End"?(H.preventDefault(),A(1/0)):H.key==="Enter"&&(H.preventDefault(),C())}var I=j.useMemo(function(){if(!e||!R.trim())return n;var H=R.trim().toLowerCase();return n.filter(function(F){return String(F.label||F.name).toLowerCase().indexOf(H)!==-1})},[n,R,e]),z=j.useMemo(function(){return Bae(I)},[I]);function V(H){return typeof H.active=="boolean"?H.active:H.path?N===H.path||N.indexOf(H.path.replace(/\/$/,"")+"/")===0:!1}function Y(H){var F=H.badge===0||H.badge==null||H.badge===""?null:H.badge,X=V(H);return _.jsxs("button",{type:"button",className:"xeplr-nav-drawer-link"+(F?" xeplr-nav-drawer-link-badged":"")+(X?" is-current":""),"aria-current":X?"page":void 0,onClick:function(P){H.clickHandler&&H.clickHandler(P),e&&r&&zae()&&r()},title:F?(H.label||H.name)+" ("+F+")":H.label||H.name,children:[H.icon&&_.jsxs("span",{className:"xeplr-nav-drawer-icon",children:[H.icon,F&&!e&&_.jsx("span",{className:"xeplr-nav-drawer-dot","aria-hidden":"true"})]}),e&&_.jsx("span",{className:"xeplr-nav-drawer-label",children:H.label||H.name}),e&&F&&_.jsx("span",{className:"xeplr-nav-drawer-badge",children:F})]},H.key||H.name)}return _.jsxs(_.Fragment,{children:[e&&_.jsx("div",{className:"xeplr-nav-drawer-backdrop",onClick:t,"aria-hidden":"true"}),_.jsxs("aside",{className:"xeplr-nav-drawer"+(e?" xeplr-nav-drawer-expanded":" xeplr-nav-drawer-collapsed")+(b?" xeplr-nav-drawer-resizing":""),style:e&&x?{"--xeplr-nav-drawer-w":x+"px"}:void 0,children:[_.jsxs("button",{type:"button",className:"xeplr-nav-drawer-toggle",onClick:t,"aria-label":e?"Collapse menu":"Expand menu","aria-expanded":e,children:[e&&a?_.jsx("span",{className:"xeplr-nav-drawer-collapse","aria-hidden":"true",children:"«"}):i&&_.jsx("img",{src:i,alt:"",className:"xeplr-nav-drawer-logo"}),!e&&_.jsxs("span",{className:"xeplr-nav-drawer-burger","aria-hidden":"true",children:[_.jsx("span",{}),_.jsx("span",{}),_.jsx("span",{})]})]}),e&&a&&_.jsx("img",{src:a,alt:"",className:"xeplr-nav-drawer-expanded-logo"}),e&&_.jsx("input",{type:"search",className:"xeplr-nav-drawer-search",placeholder:"Search",value:R,onChange:function(H){E(H.target.value)}}),_.jsxs("nav",{className:"xeplr-nav-drawer-links",children:[z.ungrouped.map(Y),z.groupOrder.map(function(H){return _.jsxs("div",{className:"xeplr-nav-drawer-group",children:[e&&_.jsx("div",{className:"xeplr-nav-drawer-group-label",children:H}),z.groups[H].map(Y)]},H)}),I.length===0&&e&&_.jsx("div",{className:"xeplr-nav-drawer-empty",children:"No matches"})]}),e&&o&&_.jsx("div",{className:"xeplr-nav-drawer-promo",children:o}),!y&&_.jsxs("div",{className:"xeplr-nav-drawer-footer",children:[_.jsx(eE,{notifications:c,label:e?"Notifications":void 0}),_.jsx(J2,{placement:"top",triggerLabel:e?"Settings":void 0,user:l,accountItems:s,accountOpen:f,toggleAccount:h,closeAccount:v,accountRef:p,logout:m})]}),e&&_.jsx("div",{className:"xeplr-nav-drawer-resize",role:"separator","aria-orientation":"vertical","aria-label":"Resize menu","aria-valuenow":x,"aria-valuemin":L.min,"aria-valuemax":L.max,tabIndex:0,onPointerDown:w,onDoubleClick:C,onKeyDown:O,title:"Drag to resize — double-click to reset"})]})]})}const Fae=j.memo(Vae);function Gae({user:e,accountItems:t,notifications:r,accountOpen:n,toggleAccount:a,closeAccount:i,accountRef:o,logout:l}){return _.jsxs("div",{className:"xeplr-nav-floating",children:[_.jsx(eE,{notifications:r}),_.jsx(J2,{user:e,accountItems:t,accountOpen:n,toggleAccount:a,closeAccount:i,accountRef:o,logout:l})]})}const Hae=j.memo(Gae);function ci(e,t){var r=j.useRef(null);return j.useEffect(function(){if(r.current){var n=setTimeout(function(){if(r.current)for(var a=[],i=0;i<t.length;i++){var o=t[i],l=!1;if(o.id)l=!!r.current.querySelector("#"+o.id);else if(o.role)l=!!r.current.querySelector('[role="'+o.role+'"]');else if(o.anyOf)for(var s=0;s<o.anyOf.length&&!l;s++)l=!!r.current.querySelector(o.anyOf[s]);else o.selector&&(l=!!r.current.querySelector(o.selector));if(!l){var c=o.id?' (id="'+o.id+'")':o.anyOf?" (one of: "+o.anyOf.join(", ")+")":o.selector?" ("+o.selector+")":"";a.push(o.label+c)}}},3e3);return function(){clearTimeout(n)}}},[]),r}var Uae=[{id:"xeplr-email",label:"Email input"},{id:"xeplr-password",label:"Password input"},{selector:'button[type="submit"]',label:"Submit button"}],Yae=[{id:"xeplr-name",label:"Name input"},{id:"xeplr-email",label:"Email input"},{id:"xeplr-password",label:"Password input"},{selector:'button[type="submit"]',label:"Submit button"}],$ae=[{id:"xeplr-email",label:"Email input"},{selector:'button[type="submit"]',label:"Submit button"}],Wae=[{id:"xeplr-email",label:"Email input"},{selector:'button[type="submit"]',label:"Submit button"}],qae=[{id:"xeplr-password",label:"Password input"},{id:"xeplr-confirm-password",label:"Confirm password input"},{selector:'button[type="submit"]',label:"Submit button"}],Xae=[{id:"xeplr-password",label:"Password input"},{selector:'button[type="submit"]',label:"Submit button"}],Zae=[{id:"xeplr-current-password",label:"Current password input"},{id:"xeplr-new-password",label:"New password input"},{id:"xeplr-confirm-password",label:"Confirm password input"},{selector:'button[type="submit"]',label:"Submit button"}],Kae=[{id:"xeplr-profile-name",label:"Name input"},{id:"xeplr-profile-email",label:"Email input"},{selector:'button[type="submit"]',label:"Submit button"}],Qae=[{id:"xeplr-admin-user-search",label:"User search input"},{role:"grid",label:"Matrix grid table"},{id:"xeplr-admin-new-role",label:"New role name input"}],Jae=[{id:"xeplr-admin-access-search",label:"Access search input"},{role:"tablist",label:"Tab list for Modules/Uncategorized"},{id:"xeplr-admin-access-scope",label:'Applies to: Roles / Workspace / User (role="radiogroup")'}],eie=[{id:"xeplr-admin-master-search",label:"Master search input"},{role:"tablist",label:"Tab list for master types"}],tie=[{selector:'[aria-haspopup="menu"]',label:"Account menu trigger"}],rie={1:CU,2:uae,3:cae,4:fae,5:hae};function nie({design:e,brand:t,...r}){var n=Ene(r),a=ci("LoginPage",Uae),i=typeof e=="number"?rie[e]:e;return i||(e!=null&&console.warn("[xeplr-ui-account] LoginPage: no built-in design "+e+" (use 1–5); showing design 1."),i=CU),_.jsx("div",{ref:a,children:_.jsx(i,{...n,brand:t})})}function aie({design:e,...t}){var r=Nne(t),n=ci("RegisterPage",Yae),a=e||dae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function iie({design:e,...t}){var r=Lne(),n=ci("ForgotPasswordPage",$ae),a=e||vae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function oie({design:e,...t}){var r=Ine(),n=ci("ResetPasswordPage",Xae),a=e||pae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function lie({design:e,...t}){var r=One(),n=e||xae;return _.jsx(n,{...r})}function sie({design:e,...t}){var r=kne(t),n=ci("ResendActivationPage",Wae),a=e||gae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function uie({design:e,...t}){var r=Pne(t),n=ci("AcceptInvitePage",qae),a=e||mae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function cie({design:e}){var t=e||yae;return _.jsx(t,{})}function fie({design:e,...t}){var r=jne(t),n=ci("ChangePasswordPage",Zae),a=e||Sae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function hie({design:e,...t}){var r=Bne(t),n=ci("ProfilePage",Kae),a=e||bae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function die({design:e,...t}){var r=qne(),n=ci("UserRolesPage",Qae),a=e||_ae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function vie({design:e,...t}){var r=oae(t),n=ci("AccessMatrixPage",Jae),a=e||Aae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function pie({design:e,...t}){var r=sae(t),n=ci("MasterSettingsPage",eie),a=e||Nae;return _.jsx("div",{ref:n,children:_.jsx(a,{...r})})}function gie({design:e,logo:t,expandedLogo:r,navMiddle:n,drawerPromo:a,floatingSettings:i,...o}){var l=Aie(o),s=ci("NavPage",tie),c=e||jae,f=l.drawerItems.length>0,h=i&&f;return _.jsxs("div",{ref:s,children:[f?_.jsx(Fae,{...l,logo:t,expandedLogo:r,drawerPromo:a,hideFooterIcons:h}):_.jsx(c,{...l,logo:t,navMiddle:n}),h&&_.jsx(Hae,{...l})]})}var mie=j.memo(gie),TU=[{key:"login",path:"/auth/login",Page:nie,group:"public"},{key:"register",path:"/auth/register",Page:aie,group:"public"},{key:"forgotPassword",path:"/auth/forgot-password",Page:iie,group:"public"},{key:"resetPassword",path:"/auth/reset-password",Page:oie,group:"public"},{key:"activate",path:"/auth/activate",Page:lie,group:"public"},{key:"notActivated",path:"/auth/not-activated",Page:cie,group:"public"},{key:"resendActivation",path:"/auth/resend-activation",Page:sie,group:"public"},{key:"acceptInvite",path:"/auth/accept-invite",Page:uie,group:"public"},{key:"profile",path:"/auth/profile",Page:hie,group:"account"},{key:"changePassword",path:"/auth/change-password",Page:fie,group:"account"},{key:"userRoles",path:oT("userRoles"),Page:die,group:"admin"},{key:"accessMatrix",path:oT("accessMatrix"),Page:vie,group:"admin"},{key:"masterSettings",path:oT("masterSettings"),Page:pie,group:"admin"}];function oT(e){return _U.find(function(t){return t.key===e}).path}var tE={};TU.forEach(function(e){tE[e.key]=e.path});function AU(e){return tE[e]||null}function yie(e){return e.replace(/^\/auth\//,"/_")}function xie(e,t){var r=e.Page;return t?j.isValidElement(t)?t:t.element?t.element:t.design||t.props?_.jsx(r,{design:t.design,...t.props||{}}):_.jsx(r,{}):_.jsx(r,{})}function Sie(e,t){e=e||{},t=t||{};var r=t.loginPath||tE.login,n=[],a=[];function i(o){return _.jsx(wU,{loginPath:r,children:o})}return TU.forEach(function(o){var l=e[o.key];if(!(l===!1||l===null)){var s=l&&l.path||o.path,c=xie(o,l);if(o.group==="public"?n.push(_.jsx(oa,{path:s,element:c},o.key)):t.layout?a.push(_.jsx(oa,{path:s,element:c},o.key)):n.push(_.jsx(oa,{path:s,element:i(c)},o.key)),t.raw!==!1){var f=o.Page,h=o.group==="public"?_.jsx(f,{}):i(_.jsx(f,{}));n.push(_.jsx(oa,{path:yie(o.path),element:h},"_"+o.key))}}}),t.layout&&a.length&&n.push(_.jsx(oa,{element:i(t.layout),children:a},"__auth_layout")),n}var bie=[{menuName:"Profile",authKey:"profile"},{menuName:"Change Password",authKey:"changePassword"}],_ie="Notifications",DU="xeplr-nav-drawer-width",Cg=240,MU=180,RU=480,wie=16,Cie={min:MU,max:RU,step:wie,default:Cg};function gM(e){return typeof e!="number"||isNaN(e)?Cg:Math.min(RU,Math.max(MU,Math.round(e)))}function Tie(){try{var e=window.localStorage.getItem(DU);return e?gM(parseInt(e,10)):Cg}catch{return Cg}}function Aie(e){e=e||{};var t=xU(),r=t.access||{},n=r.menus||[],[a,i]=j.useState(!1),[o,l]=j.useState(!1),[s,c]=j.useState(Tie),[f,h]=j.useState(!1),v=j.useRef(null),p=j.useCallback(function(){i(function(E){return!E})},[]),m=j.useCallback(function(){i(!1)},[]),y=j.useCallback(function(){l(function(E){return!E})},[]),x=j.useCallback(function(){l(!1)},[]),b=j.useCallback(function(E){E&&E.preventDefault&&E.preventDefault(),h(!0)},[]),w=j.useCallback(function(){c(Cg)},[]),C=j.useCallback(function(E){c(function(N){return gM(N+E)})},[]);j.useEffect(function(){if(!f)return;function E(L){c(gM(L.clientX))}function N(){h(!1)}return document.addEventListener("pointermove",E),document.addEventListener("pointerup",N),document.addEventListener("pointercancel",N),document.body.classList.add("xeplr-nav-resizing"),function(){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",N),document.removeEventListener("pointercancel",N),document.body.classList.remove("xeplr-nav-resizing")}},[f]),j.useEffect(function(){if(!f)try{window.localStorage.setItem(DU,String(s))}catch{}},[s,f]),j.useEffect(function(){if(!a)return;function E(N){v.current&&!v.current.contains(N.target)&&m()}return document.addEventListener("mousedown",E),function(){document.removeEventListener("mousedown",E)}},[a,m]);var A=j.useMemo(function(){var E=iT(e.settingsOverrides,r),N=iT(bie.map(function(L){return{key:L.menuName,name:L.menuName,path:AU(L.authKey)}}),r);return E.concat(N)},[n,r,e.settingsOverrides]),M=n.indexOf(_ie)!==-1,R=j.useMemo(function(){return iT(e.drawerItems,r)},[e.drawerItems,r]);return{user:t.user,accountItems:A,notifications:M&&e.notifications||null,logout:t.logout,accountOpen:a,toggleAccount:p,closeAccount:m,accountRef:v,drawerOpen:o,toggleDrawer:y,closeDrawer:x,drawerItems:R,drawerWidth:s,drawerResizing:f,startDrawerResize:b,resetDrawerWidth:w,nudgeDrawerWidth:C,drawerWidthBounds:Cie}}var yB="xeplr-theme",Die="dark",Mie=["dark","light","medium","bright"],Rie=j.createContext(null);function Eie({theme:e,persist:t=!0,children:r}){var[n,a]=j.useState(function(){if(t)try{var l=localStorage.getItem(yB);if(l)return l}catch{}return e||Die}),i=j.useCallback(function(l){if(a(l),t)try{localStorage.setItem(yB,l)}catch{}},[t]),o={theme:n,setTheme:i,themes:Mie,className:"xeplr-theme-"+n};return _.jsx(Rie.Provider,{value:o,children:_.jsx("div",{className:"xeplr-theme-"+n,children:r})})}function Nie(e){if(!e||!Array.isArray(e.groups))return[];const t=e.settings||[];return e.groups.map(r=>({key:r.key,label:r.label,help:r.help||"",status:Lie(r),settings:t.filter(n=>n.group===r.key)})).filter(r=>r.settings.length>0)}function Lie(e){const t=e&&e.needs||[],r=e&&e.key==="core";if(!t.length)return{tone:"good",text:r?"Complete":"On"};const n=t.filter(a=>a.reason);return n.length?{tone:"bad",text:(r?"Wrong value":"Off — wrong value")+": "+n.map(a=>a.reason).join("; ")}:{tone:"warn",text:(r?"Needs ":"Off — needs ")+t.map(a=>a.label).join(", ")}}function xB(e){return e?e.secret?e.set?"Set":"Not set":e.set?e.value:"Not set":""}function Iie(e,t){return t&&Object.prototype.hasOwnProperty.call(t,e.name)?t[e.name]:e.secret?"":e.value||""}function Oie(e,t){const r={};return(e||[]).forEach(n=>{if(!n.editable||!t||!Object.prototype.hasOwnProperty.call(t,n.name))return;const a=String(t[n.name]==null?"":t[n.name]).trim();if(n.secret){a&&(r[n.name]=a);return}a!==String(n.value||"")&&(r[n.name]=a)}),r}function kie(e,t){const r=Number(e)>0?Math.round(Number(e)):15;return"Save "+t+" setting"+(t===1?"":"s")+"? The app restarts to apply this — about "+r+" seconds. Everyone using it is disconnected for that time."}function SB(e){const t=e&&e.body;return t&&Array.isArray(t.problems)&&t.problems.length?t.problems:t&&t.message?[t.message]:t&&t.error&&typeof t.error=="string"&&t.error.indexOf(" ")!==-1?[t.error]:[e&&e.message||"Could not save the settings"]}function Pie(e,t){return e.length?e.find(r=>r.key===t)||e[0]:null}function mM(e){return"xeplr-settings-"+e}function jie(e){return e&&e.status===403?"Only the Super Admin can see the app's settings.":e&&e.message||"Could not load the settings"}function Bie(e,t,r,n,a){return!!(e&&(t||n-r>8e3))}function zie(e){const t=e||globalThis.fetch;return async function(n,a){const i=Object.assign({},a||{});i.headers=Object.assign({"content-type":"application/json"},i.headers||{});const o=await t(n,i),l=await o.text();let s=null;try{s=l?JSON.parse(l):null}catch{s=l}if(!o.ok){const c=new Error(s&&(s.message||s.error)||"HTTP "+o.status);throw c.status=o.status,c.body=s,c}return s}}function Vie(e){if(e=e||{},!e.base)throw new Error("createSettingsApi: base (where settingsRouter is mounted) is required");const t=String(e.base).replace(/\/+$/,""),r=e.fetch||zie(e.rawFetch),n=e.statusUrl||"/setup/status",a=e.rawFetch||((i,o)=>globalThis.fetch(i,o));return{load:()=>r(t),check:i=>r(t+"/check",{method:"POST",body:JSON.stringify({values:i})}),save:i=>r(t,{method:"POST",body:JSON.stringify({values:i})}),serverAnswers:async()=>{try{const i=await a(n,{cache:"no-store"});return i.ok?(await i.json()).mode==="running":!1}catch{return!1}}}}function Fie(e){const{api:t,confirm:r,reload:n,pollMs:a}=e||{};if(!t)throw new Error("useAppSettingsController: api (createSettingsApi) is required");const i=qs(),[o,l]=j.useState(null),[s,c]=j.useState(""),[f,h]=j.useState({}),[v,p]=j.useState([]),[m,y]=j.useState(null),[x,b]=j.useState(""),[w,C]=j.useState(null),A=j.useRef(!1),M=j.useCallback(async()=>{try{l(await t.load()),c("")}catch(H){c(jie(H))}},[t]);j.useEffect(()=>{M()},[M]);const R=j.useMemo(()=>Nie(o),[o]),E=Pie(R,i.get("section")),N=E?Oie(E.settings,f):{},L=Object.keys(N).length;function O(H){p([]),y(null),i.set({section:H},{replace:!0})}function I(H,F){h(X=>({...X,[H]:F}))}function z(){E&&(h(H=>{const F={...H};return E.settings.forEach(X=>{delete F[X.name]}),F}),p([]),y(null))}async function V(){b("checking"),p([]),y(null);try{const H=await t.check(N);p(H.problems||[]),y(H.results||[])}catch(H){p(SB(H))}finally{b("")}}async function Y(){if(!(!L||!(r||(F=>window.confirm(F)))(kie(o&&o.restartSeconds,L)))){b("saving"),p([]),y(null);try{const F=await t.save(N);C({seconds:F.restartSeconds,message:F.message,startedAt:Date.now()})}catch(F){p(SB(F)),F.body&&Array.isArray(F.body.results)&&y(F.body.results)}finally{b("")}}}return j.useEffect(()=>{if(!w||A.current)return;A.current=!0;let H=!1,F=!1,X=null;const P=a||2e3,q=async()=>{if(H)return;const G=await t.serverAnswers();if(G||(F=!0),Bie(G,F,w.startedAt,Date.now())){(n||(()=>window.location.reload()))();return}X=setTimeout(q,P)};return X=setTimeout(q,P),()=>{H=!0,clearTimeout(X)}},[w,t,n,a]),{view:o,error:s,sections:R,section:E,open:O,draft:f,edit:I,discard:z,changes:N,changeCount:L,check:V,save:Y,busy:x,problems:v,checks:m,restart:w,reload:M}}const Bh=e=>!!(e&&e.section&&!e.restart),bB=[{id:"xeplr-settings-sections",label:"Sections list",when:Bh},{id:"xeplr-settings-save",label:"Save button",when:Bh},{id:"xeplr-settings-check",label:"Check button",when:Bh},{id:"xeplr-settings-discard",label:"Discard button",when:Bh}];function Gie(e){const t=e&&e.section;if(!Bh(e))return bB;const r=t.settings.filter(n=>n.editable).map(n=>({id:mM(n.name),label:"Input for "+n.name,when:Bh}));return bB.concat(r)}function Hie({title:e,intro:t,error:r,view:n,sections:a,section:i,open:o,edit:l,draft:s,discard:c,changeCount:f,check:h,save:v,busy:p,problems:m,checks:y,restart:x}){return x?_.jsx("section",{className:"xeplr-settings",children:_.jsxs("div",{className:"xeplr-settings-card",role:"status",children:[_.jsx("h1",{className:"xeplr-settings-title",children:"Restarting with the new settings…"}),_.jsxs("p",{className:"xeplr-settings-sub",children:[x.message," This page reloads by itself when the app answers again."]})]})}):_.jsxs("section",{className:"xeplr-settings",children:[_.jsxs("header",{className:"xeplr-settings-head",children:[_.jsx("h1",{className:"xeplr-settings-title",children:e||"App settings"}),_.jsx("p",{className:"xeplr-settings-sub",children:t||"The settings this install runs with, kept in its env file. Saving one restarts the app to apply it. Secrets are never shown — only whether they are set; type in a Replace box to change one."})]}),r&&_.jsx("p",{className:"xeplr-settings-alert",role:"alert",children:r}),!n&&!r&&_.jsx("p",{className:"xeplr-settings-sub",role:"status",children:"Loading…"}),n&&_.jsxs("div",{className:"xeplr-settings-body",children:[_.jsx("nav",{id:"xeplr-settings-sections",className:"xeplr-settings-nav","aria-label":"Sections",children:a.map(b=>_.jsxs("button",{type:"button",className:"xeplr-settings-tab"+(i&&b.key===i.key?" is-open":""),onClick:()=>o(b.key),children:[_.jsx("span",{className:"xeplr-settings-tab-name",children:b.label}),_.jsx("span",{className:"xeplr-settings-pill is-"+b.status.tone,children:b.status.tone==="good"?b.status.text:"Off"})]},b.key))}),i&&_.jsxs("div",{className:"xeplr-settings-card",children:[_.jsxs("div",{className:"xeplr-settings-section-head",children:[_.jsx("h2",{className:"xeplr-settings-card-title",children:i.label}),i.help&&_.jsx("p",{className:"xeplr-settings-sub",children:i.help}),_.jsx("p",{className:"xeplr-settings-status is-"+i.status.tone,children:i.status.text})]}),_.jsx("ul",{className:"xeplr-settings-list",children:i.settings.map(b=>_.jsxs("li",{className:"xeplr-settings-row",children:[_.jsxs("div",{className:"xeplr-settings-label",children:[_.jsx("label",{htmlFor:mM(b.name),children:b.label}),_.jsx("code",{className:"xeplr-settings-name",children:b.name}),b.help&&_.jsx("p",{className:"xeplr-settings-help",children:b.help})]}),_.jsxs("div",{className:"xeplr-settings-value",children:[b.editable?_.jsxs(_.Fragment,{children:[b.secret&&_.jsx("span",{className:"xeplr-settings-pill "+(b.set?"is-good":"is-neutral"),children:xB(b)}),_.jsx("input",{id:mM(b.name),className:"xeplr-settings-input",autoComplete:"off",spellCheck:!1,type:b.secret?"password":"text",placeholder:b.secret?"Replace — leave empty to keep":b.optional?"Not set":"",value:Iie(b,s),onChange:w=>l(b.name,w.target.value)})]}):_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"xeplr-settings-fixed",children:b.kind==="generated"?b.set?"Generated":"Not generated yet":xB(b)}),_.jsx("p",{className:"xeplr-settings-why",children:b.why})]}),b.problem&&_.jsx("p",{className:"xeplr-settings-problem",children:b.problem})]})]},b.name))}),m.length>0&&_.jsx("ul",{className:"xeplr-settings-alert xeplr-settings-problems",role:"alert",children:m.map(b=>_.jsx("li",{children:b},b))}),y&&y.length>0&&_.jsx("ul",{className:"xeplr-settings-checks",role:"status",children:y.map(b=>_.jsxs("li",{className:b.ok?"is-good":"is-bad",children:[b.label,": ",b.ok?"works":b.error]},b.name))}),_.jsxs("div",{className:"xeplr-settings-actions",children:[_.jsx("button",{id:"xeplr-settings-save",type:"button",className:"xeplr-settings-primary",disabled:!f||!!p,onClick:()=>v(),children:p==="saving"?"Saving…":"Save "+i.label}),_.jsx("button",{id:"xeplr-settings-check",type:"button",className:"xeplr-settings-button",disabled:!f||!!p,onClick:h,children:p==="checking"?"Checking…":"Check"}),_.jsx("button",{id:"xeplr-settings-discard",type:"button",className:"xeplr-settings-button",disabled:!f||!!p,onClick:c,children:"Discard"}),_.jsx("span",{className:"xeplr-settings-count",children:f?f+" change"+(f===1?"":"s"):"No changes"})]})]})]})]})}function Uie({missing:e}){return _.jsx("section",{className:"xeplr-settings",children:_.jsxs("div",{className:"xeplr-settings-broken",role:"alert",children:[_.jsx("strong",{children:"This App settings design cannot load — it is missing:"}),_.jsx("ul",{children:(e||[]).map(t=>_.jsx("li",{children:t},t))})]})})}function Yie({api:e,base:t,fetch:r,statusUrl:n,design:a,title:i,intro:o,confirm:l,reload:s}){const c=j.useMemo(()=>e||Vie({base:t,fetch:r,statusUrl:n}),[e,t,r,n]),f=Fie({api:c,confirm:l,reload:s}),h=o_(Gie(f),f);if(h.missing.length)return _.jsx(Uie,{missing:h.missing});const v=a||Hie;return _.jsx("div",{ref:h.ref,children:_.jsx(v,{...f,title:i,intro:o})})}const $ie=3e3;function Wie({fetch:e,stream:t,base:r="/api/monitor"}={}){if(typeof e!="function")throw new Error("createMonitorApi: pass { fetch: authFetch } from @xeplr/ui-account");const n=String(r).replace(/\/+$/,""),a=(o,l,s,c)=>e(n+l,{method:o,body:s===void 0?void 0:JSON.stringify(s),signal:c}),i=o=>"/services/"+encodeURIComponent(o);return{settings:()=>a("GET","/settings"),host:()=>a("GET","/host"),services:()=>a("GET","/services"),addService:({unit:o,label:l})=>a("POST","/services",{unit:o,label:l}),editService:(o,l)=>a("PATCH",i(o),l),removeService:o=>a("DELETE",i(o)),act:(o,l)=>a("POST",i(o)+"/"+l,{}),logs:(o,l={})=>a("GET",i(o)+"/logs"+ip(l)).then(s=>s.lines),audit:o=>a("GET","/audit"+ip({limit:o})).then(l=>l.entries),history:(o,l={},s)=>a("GET",i(o)+"/history"+ip(l),void 0,s),serverHistory:(o={},l)=>a("GET","/history"+ip(o),void 0,l),traffic:(o={},l)=>a("GET","/traffic"+ip(o),void 0,l),connections:()=>a("GET","/connections").then(o=>o.dataArray||[]),addConnection:o=>a("POST","/connections",o).then(l=>l.connection),editConnection:(o,l)=>a("PATCH","/connections/"+encodeURIComponent(o),l).then(s=>s.connection),removeConnection:o=>a("DELETE","/connections/"+encodeURIComponent(o)),testConnection:o=>a("POST","/connections/"+encodeURIComponent(o)+"/test",{}),follow(o,l,s,c){if(typeof t!="function")throw new Error("createMonitorApi: pass { stream: authEventStream } from @xeplr/ui-account to follow a log live");let f=!1,h=null,v=null;const p=()=>{h=t(n+i(o)+"/logs/live",{onOpen:()=>{c&&c()},onEvent:({event:m,data:y})=>{if(m==="message")try{l(JSON.parse(y))}catch{}else if(m==="problem")try{s&&s(JSON.parse(y).error)}catch{}},onError:m=>{if(!f){if(m&&m.status>=400&&m.status<500){s&&s(m.message);return}s&&s(null),v=setTimeout(p,$ie)}}})};return p(),()=>{f=!0,clearTimeout(v),h&&h()}}}}function ip(e){const t=Object.keys(e||{}).filter(r=>e[r]!==void 0&&e[r]!==null&&e[r]!=="").map(r=>encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.length?"?"+t.join("&"):""}function Tg(e){if(!e)return{text:"Unknown",tone:"unknown"};if(!e.exists)return{text:"Not on this server",tone:"bad"};const t=e.state;return t==="active"?{text:e.subState==="exited"?"Done (exited)":"Running",tone:"good"}:t==="activating"?{text:e.subState==="auto-restart"?"Restarting by itself":"Starting",tone:"busy"}:t==="deactivating"?{text:"Stopping",tone:"busy"}:t==="reloading"?{text:"Reloading",tone:"busy"}:t==="failed"?{text:"Failed"+(e.result&&e.result!=="success"?": "+EU(e.result):""),tone:"bad"}:t==="inactive"?{text:"Stopped",tone:"off"}:{text:t,tone:"unknown"}}function EU(e){return{"exit-code":"it exited with an error",signal:"it was killed","core-dump":"it crashed (core dump)",timeout:"it timed out",watchdog:"its watchdog fired","oom-kill":"out of memory","start-limit-hit":"restarted too often",resources:"it could not get its resources"}[e]||e}function Ai(e){if(e==null)return"—";const t=["B","KB","MB","GB","TB"];let r=0,n=e;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return(n>=10||r===0?Math.round(n):Math.round(n*10)/10)+" "+t[r]}function _m(e,t){if(!e)return"—";const r=Math.max(0,Math.round((Date.now()-new Date(e).getTime())/1e3));if(r<60)return r+"s";if(r<3600)return Math.floor(r/60)+" min";if(r<86400)return Math.floor(r/3600)+" h "+Math.floor(r%3600/60)+" min";const n=Math.floor(r/86400);return n+" day"+(n===1?"":"s")}function qie(e){const t=new Date(e);return isNaN(t)?"":t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}const lT={error:0,warn:1,info:2,debug:3};function Xie(e,t,r){return!(r&&(lT[e.level]===void 0?3:lT[e.level])>lT[r]||t&&String(e.message).toLowerCase().indexOf(String(t).toLowerCase())<0)}function sT(e,t,r){const n=e.concat(t);return n.length>r?n.slice(n.length-r):n}function Zie(e){return e==="stop"||e==="kill"||e==="restart"}function Kie(e,t){return e==="stop"?"Stop "+t+"? It stays stopped until someone starts it.":e==="kill"?"Kill "+t+"? Every process of it ends at once, mid-work. If it is set to restart, systemd starts it again.":e==="restart"?"Restart "+t+"? Requests it is answering now are cut off.":""}function nd(e){return e==null?"—":(e>=10?Math.round(e):Math.round(e*10)/10)+"%"}function Qie(e){if(!e||e.memoryBytes===null||e.memoryBytes===void 0)return"—";const t=e.memoryMaxBytes;return Ai(e.memoryBytes)+(t?" of "+Ai(t)+" ("+Math.round(e.memoryBytes/t*100)+"%)":"")}const Jie={R:"running",S:"waiting",D:"stuck on disk or network",Z:"zombie (ended, not collected)",T:"paused",I:"idle"};function eoe(e){return Jie[e]||e}function MS(e,t){const r=e||{},n=[];if(r.state!=="active")return n;const a=r.memoryBytes;a&&r.memoryMaxBytes&&a>=r.memoryMaxBytes*.9?n.push("Memory is at "+Math.round(a/r.memoryMaxBytes*100)+"% of its limit: past it, systemd kills it"):a&&r.memoryHighBytes&&a>=r.memoryHighBytes&&n.push("Memory is past its MemoryHigh, so it is being slowed down"),r.restarts&&n.push("It has restarted "+r.restarts+" time"+(r.restarts===1?"":"s")+" by itself: see the log around "+(r.since?"when it last started":"the restarts")),r.swapBytes&&n.push(Ai(r.swapBytes)+" of it is in swap: the server is short of memory"),r.tasks&&r.tasksMax&&r.tasks>=r.tasksMax*.8&&n.push(r.tasks+" threads, near its cap of "+r.tasksMax),r.cpuPercent!==null&&r.cpuPercent!==void 0&&r.cpuPercent>=90&&n.push("CPU at "+nd(r.cpuPercent)+": a busy loop or a long job holds it");const i=t||[],o=i.filter(s=>s.state==="D").length,l=i.filter(s=>s.state==="Z").length;return o&&n.push(o+" process"+(o===1?" is":"es are")+" stuck waiting on disk or network"),l&&n.push(l+" zombie process"+(l===1?"":"es")+": ended, never collected by its parent"),n}const toe=[{id:"all",name:"Every line"},{id:"warn",name:"Warnings and errors"},{id:"error",name:"Errors only"}];function roe(e){if(!e)return{since:void 0,until:void 0};const t=(r,n)=>{if(!r)return;const a=/^\d{4}-\d{2}-\d{2}$/.test(r),i=new Date(a?r+"T00:00:00":r);if(!isNaN(i))return n&&i.setTime(i.getTime()+(a?864e5:6e4)-1),i.toISOString()};return{since:t(e.from,!1),until:t(e.to,!0)}}const noe=1024*1024*1024;function Ar(e){return e==null||isNaN(e)?"—":(e/noe).toFixed(2)+" GB"}function ad(e,t){return!t||e===null||e===void 0?null:Math.max(0,Math.min(100,Math.round(e/t*100)))}function aoe(e){if(e==null)return"—";const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60);return t?t+" day"+(t===1?"":"s")+" "+r+" h":r?r+" h "+n+" min":n+" min"}function ioe(e){if(!e||!e.totalBytes)return[];const t=[{key:"used",label:"Used",bytes:e.usedBytes},{key:"cache",label:"Cache & buffers",bytes:(e.cacheBytes||0)+(e.buffersBytes||0)},{key:"free",label:"Free",bytes:e.freeBytes}];let r=100;return t.map((n,a)=>{const i=a===t.length-1?Math.max(0,r):ad(n.bytes,e.totalBytes);return r-=i,Object.assign({},n,{percent:i})})}const ooe={files:"files read or written lately — databases, logs, programs — kept in memory to be read again fast",kernel:"the kernel's own records, mostly of folders and files it has looked up",buffers:"the disk's own bookkeeping, read raw"};function loe(e){const t=e?(e.cacheBytes||0)+(e.buffersBytes||0):0,r=o=>Object.assign({},o,{percent:ad(o.bytes,t)}),n=(e&&e.cacheKinds||[]).map(o=>r(Object.assign({note:ooe[o.key]||""},o))),a=e&&e.cacheBy,i=a?a.groups.map(o=>r({key:o.name,label:soe(o.name),unit:o.name,bytes:o.bytes})):[];return a&&a.othersBytes>0&&i.push(r({key:"others",label:"Everything else",unit:"the kernel itself, programs since stopped",bytes:a.othersBytes})),{wholeBytes:t,kinds:n,groups:i}}function soe(e){return e==="user.slice"?"People signed in":e==="init.scope"?"systemd":e.replace(/\.(service|scope|slice)$/,"")}function yM(e){const t=ad(e.usedBytes,e.totalBytes);return{usedPercent:t,nearlyFull:t!==null&&t>=90}}function uoe(e){if(!e||!e.linux)return[];const t=[],r=e.memory;r&&r.availableBytes!==null&&ad(r.availableBytes,r.totalBytes)<10&&t.push("Only "+Ar(r.availableBytes)+" of memory is available: programs will start to swap"),r&&r.swapTotalBytes&&ad(r.swapUsedBytes,r.swapTotalBytes)>=50&&t.push(Ar(r.swapUsedBytes)+" of swap in use: the server is short of memory"),(e.disks||[]).forEach(a=>{yM(a).nearlyFull&&t.push(a.mount+" is "+yM(a).usedPercent+"% full: "+Ar(a.availableBytes)+" left")});const n=e.cpu;return n&&n.load&&n.cores&&n.load[1]>n.cores&&t.push("Load over 5 minutes ("+n.load[1]+") is more than the "+n.cores+" cores: work is waiting for CPU"),t}function coe({api:e}){const[t,r]=j.useState(null),[n,a]=j.useState(null);return j.useEffect(()=>{let i=!0;return e.settings().then(o=>{i&&r(o)}).catch(o=>{i&&a(o.message)}),()=>{i=!1}},[e]),{self:t&&t.self||null,loading:!t&&!n,error:n}}const foe=5e3;function hoe({api:e,monitorPath:t="/monitor"}){const r=ef(),[n,a]=j.useState(null),[i,o]=j.useState(null),[l,s]=j.useState(null),[c,f]=j.useState(null),h=j.useCallback(()=>Promise.all([e.host().then(p=>{a(p),o(null)}).catch(p=>o(p.message)),e.services().then(p=>{s(p),f(null)}).catch(p=>f(p.message))]),[e]);j.useEffect(()=>{h();const p=setInterval(()=>{document.hidden||h()},foe);return()=>clearInterval(p)},[h]);const v=j.useCallback(p=>r(t+"?service="+encodeURIComponent(p)),[r,t]);return{stats:n,services:l,loading:!n&&!i,error:i,servicesError:c,open:v,reload:h}}const doe=5e3;function voe({api:e,self:t}){const[r,n]=j.useState(null),[a,i]=j.useState(null),o=qs(),[l,s]=j.useState({}),[c,f]=j.useState(null),[h,v]=j.useState(null),[p,m]=j.useState(null),y=j.useCallback(()=>e.services().then(G=>{n(G),i(null)}).catch(G=>{i(G.message)}),[e]);j.useEffect(()=>{y();const G=setInterval(()=>{document.hidden||y()},doe);return()=>clearInterval(G)},[y]);const x=o.get("view")==="audit"||o.get("view")==="traffic"?o.get("view"):"services",b=o.get("service"),w=j.useMemo(()=>(r||[]).find(G=>G.unit===b)||null,[r,b]),C=o.set,A=j.useCallback(G=>C({service:G,view:null,tab:null,grep:null,level:null}),[C]),M=j.useCallback(()=>C({view:"audit",service:null,tab:null,grep:null,level:null}),[C]),R=j.useCallback(()=>C({view:"traffic",service:null,tab:null,grep:null,level:null}),[C]),E=j.useCallback(()=>C({view:null}),[C]);j.useEffect(()=>{x==="audit"&&e.audit(300).then(m).catch(G=>{Ct(G.message,{design:"error",duration:8e3})})},[x,e]);const N=j.useCallback(async(G,W)=>{s(Z=>Object.assign({},Z,{[G]:W}));try{const Z=await e.act(G,W);n(U=>(U||[]).map(K=>K.unit===G?Object.assign({},K,{status:Z.status}):K));const Q=(r||[]).find(U=>U.unit===G);Ct((Q?Q.label:G)+": "+W+" done. Now "+Tg(Z.status).text.toLowerCase()+".",{design:"success",duration:5e3})}catch(Z){Ct(Z.message,{design:"error",duration:12e3})}finally{s(Z=>{const Q=Object.assign({},Z);return delete Q[G],Q}),y()}},[e,r,y]),L=j.useCallback(async(G,W)=>{const Z=(r||[]).find(Q=>Q.unit===G);Zie(W)&&!await W2(Kie(W,Z?Z.label:G),{confirmLabel:"Yes, "+W,danger:W==="kill"||W==="stop"})||N(G,W)},[r,N]),O=j.useCallback(G=>{const W=G&&G.status,Z=W&&(W.state==="active"||W.state==="activating"||W.state==="reloading"),Q=G&&t&&G.unit===t;return{start:!Z,stop:!!Z&&!Q,restart:!0,kill:!!Z&&!Q,own:!!Q}},[t]),I=j.useCallback(()=>f({unit:"",label:"",error:null,busy:!1}),[]),z=j.useCallback(G=>f(W=>W&&Object.assign({},W,G,{error:null})),[]),V=j.useCallback(()=>f(null),[]),Y=j.useCallback(async G=>{if(G&&G.preventDefault&&G.preventDefault(),!c||!c.unit.trim())return f(W=>Object.assign({},W,{error:"Enter the service name, e.g. xeplr-bi-api"}));f(W=>Object.assign({},W,{busy:!0,error:null}));try{const W=await e.addService({unit:c.unit.trim(),label:c.label.trim()});f(null),await y(),A(W.unit)}catch(W){f(Z=>Object.assign({},Z,{busy:!1,error:W.message}))}},[e,c,y,A]),H=j.useCallback(G=>v({unit:G.unit,label:G.label,newUnit:G.unit,error:null,busy:!1}),[]),F=j.useCallback(G=>v(W=>W&&Object.assign({},W,G,{error:null})),[]),X=j.useCallback(()=>v(null),[]),P=j.useCallback(async G=>{if(G&&G.preventDefault&&G.preventDefault(),!!h){v(W=>Object.assign({},W,{busy:!0}));try{const W=await e.editService(h.unit,{label:h.label,unit:h.newUnit});v(null),await y(),W.unit!==h.unit&&b===h.unit&&C({service:W.unit},{replace:!0})}catch(W){v(Z=>Object.assign({},Z,{busy:!1,error:W.message}))}}},[e,h,y,b,C]),q=j.useCallback(async()=>{if(h)try{await e.removeService(h.unit),v(null),b===h.unit&&C({service:null},{replace:!0}),await y()}catch(G){v(W=>Object.assign({},W,{error:G.message}))}},[e,h,y,b,C]);return{list:r,loading:r===null,loadError:a,reload:y,view:x,showAudit:M,showTraffic:R,showServices:E,audit:p,selected:w,selectedUnit:b,select:A,busy:l,ask:L,actionsFor:O,adding:c,openAdd:I,editAdd:z,closeAdd:V,saveAdd:Y,editing:h,openEdit:H,editEdit:F,closeEdit:X,saveEdit:P,removeEditing:q}}const uT=5e3,poe=300;function goe({api:e,unit:t}){const r=qs(),[n,a]=j.useState([]),[i,o]=j.useState("idle"),[l,s]=j.useState(null),[c,f]=j.useState(!1),[h,v]=j.useState([]),[p,m]=j.useState({when:null,lines:1e3}),y=j.useRef(!1),x=r.get("tab")==="history"?"history":"live",b=r.get("grep")||"",w=r.get("level")||"",C=r.set,A=j.useCallback(O=>{s(O.message),o("error")},[]);j.useEffect(()=>{if(a([]),v([]),s(null),f(!1),y.current=!1,!t||x!=="live"){o("idle");return}let O=null,I=!0;return o("loading"),e.logs(t,{lines:poe}).then(z=>{I&&(a(z),O=e.follow(t,V=>{y.current?v(Y=>sT(Y,[V],uT)):a(Y=>sT(Y,[V],uT))},V=>{I&&(V?(s(V),o("error")):o("reconnecting"))},()=>{I&&(o("live"),s(null))}))}).catch(z=>{I&&A(z)}),()=>{I=!1,O&&O()}},[e,t,x,A]);const M=j.useCallback(async()=>{if(t){o("loading"),s(null);try{const O=roe(rne(p.when,new Date)),I=await e.logs(t,{lines:p.lines||1e3,since:O.since,until:O.until,grep:b||void 0,level:w||void 0});a(I),o("ready")}catch(O){A(O)}}},[e,t,p,b,w,A]);j.useEffect(()=>{t&&x==="history"&&M()},[t,x]);const R=j.useCallback(()=>{y.current=!0,f(!0)},[]),E=j.useCallback(()=>{y.current=!1,f(!1),v(O=>(O.length&&a(I=>sT(I,O,uT)),[]))},[]),N=j.useCallback(()=>{a([]),v([])},[]),L=j.useMemo(()=>n.filter(O=>Xie(O,b,w)),[n,b,w]);return{unit:t,mode:x,setMode:j.useCallback(O=>C({tab:O==="history"?"history":null},{replace:!0}),[C]),grep:b,setGrep:j.useCallback(O=>C({grep:O},{replace:!0}),[C]),level:w,setLevel:j.useCallback(O=>C({level:O},{replace:!0}),[C]),range:p,setRange:j.useCallback(O=>m(I=>Object.assign({},I,O)),[]),readHistory:M,lines:L,total:n.length,state:i,error:l,paused:c,held:h.length,pause:R,resume:E,clear:N}}const rE=[{value:"postgres",label:"Postgres",port:5432},{value:"mysql",label:"MySQL",port:3306},{value:"s3",label:"Amazon S3"}],RS="backups",NU="ap-south-1",Ag=e=>rE.find(t=>t.value===e)||null,nE=e=>e==="postgres"||e==="mysql";function moe(e){const t=Ag(e);return t?t.label:String(e||"—")}function yoe(e){const t=e&&e.details||{};return e&&e.kind==="s3"?[t.bucket,t.region,t.prefix?String(t.prefix).replace(/\/*$/,"/"):""].filter(Boolean).join(" · "):t.host?t.host+(t.port?":"+t.port:""):"—"}function xoe(e){const t=e&&e.details||{};return(e&&e.kind==="s3"?t.accessKeyHint:t.user)||"—"}function LU(e="postgres"){const t=Ag(e)||rE[0];return{name:"",kind:t.value,host:"",port:t.port?String(t.port):"",user:"",password:"",bucket:"",region:NU,prefix:RS,accessKeyId:"",secretAccessKey:""}}function Soe(e){const t=e&&e.details||{};return Object.assign(LU(e.kind),{name:e.name||"",kind:e.kind,host:t.host||"",port:t.port?String(t.port):"",user:t.user||"",bucket:t.bucket||"",region:t.region||NU,prefix:t.prefix||RS})}function boe(e,t){const r=Ag(e.kind),n=Ag(t),a=e.port&&(!r||String(r.port)!==String(e.port));return Object.assign({},e,{kind:t,port:a?e.port:n&&n.port?String(n.port):""})}const Ya=e=>!String(e??"").trim();function _oe(e,{editing:t=!1}={}){const r={};if(Ya(e.name)&&(r.name="Give it a name"),Ag(e.kind)||(r.kind="Choose Postgres, MySQL or Amazon S3"),nE(e.kind)){Ya(e.host)?r.host="The server's address":/\s|\//.test(String(e.host).trim())&&(r.host="Only the address, e.g. db.example.com or 10.0.0.5");const n=Number(e.port);(!Number.isInteger(n)||n<1||n>65535)&&(r.port="A port from 1 to 65535"),Ya(e.user)&&(r.user="The user to sign in as"),!t&&Ya(e.password)&&(r.password="The password (stored encrypted)")}else if(e.kind==="s3"){const n=String(e.bucket||"").trim();n?(!/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(n)||/\.\./.test(n))&&(r.bucket="3 to 63 characters: lowercase letters, digits, dots and hyphens"):r.bucket="The bucket's name",/^[a-z]{2}-[a-z]+-\d$/.test(String(e.region||"").trim())||(r.region="A region such as ap-south-1");const a=String(e.prefix||"").trim().replace(/^\/+/,"");a!==RS&&a.indexOf(RS+"/")!==0&&(r.prefix='Starts with "backups" — the key can only write under backups/'),!t&&Ya(e.accessKeyId)&&(r.accessKeyId="The access key ID"),!t&&Ya(e.secretAccessKey)&&(r.secretAccessKey="The secret access key (stored encrypted)"),t&&Ya(e.accessKeyId)!==Ya(e.secretAccessKey)&&(r[Ya(e.accessKeyId)?"accessKeyId":"secretAccessKey"]="A new key is both: the ID and its secret")}return r}function woe(e,{editing:t=!1}={}){const r=i=>String(i??"").trim(),n={name:r(e.name),kind:e.kind};let a;return nE(e.kind)?(n.details={host:r(e.host),port:Number(e.port),user:r(e.user)},a=Ya(e.password)?{}:{password:String(e.password)}):(n.details={bucket:r(e.bucket),region:r(e.region),prefix:r(e.prefix).replace(/^\/+/,"").replace(/\/+$/,"")},a={},Ya(e.accessKeyId)||(a.accessKeyId=r(e.accessKeyId)),Ya(e.secretAccessKey)||(a.secretAccessKey=String(e.secretAccessKey).trim())),(Object.keys(a).length||!t)&&(n.secret=a),n}function Coe({api:e}){const[t,r]=j.useState(null),[n,a]=j.useState(null),[i,o]=j.useState(null),[l,s]=j.useState(null),[c,f]=j.useState({}),[h,v]=j.useState(!1),[p,m]=j.useState(null),y=j.useCallback(()=>e.connections().then(N=>{r(N),a(null)}).catch(N=>a(N.message)),[e]);j.useEffect(()=>{y()},[y]);const x=j.useCallback(()=>{o(null),s(null),f({}),v(!1)},[]),b=j.useCallback(()=>{s(null),f({}),o(LU())},[]),w=j.useCallback(N=>{s(N),f({}),o(Soe(N))},[]),C=j.useCallback((N,L)=>{o(O=>Object.assign({},O,{[N]:L})),f(O=>{if(!O[N])return O;const I=Object.assign({},O);return delete I[N],I})},[]),A=j.useCallback(N=>{o(L=>boe(L,N)),f({})},[]),M=j.useCallback(async N=>{if(N&&N.preventDefault&&N.preventDefault(),!i||h)return;const L={editing:!!l},O=_oe(i,L);if(f(O),!Object.keys(O).length){v(!0);try{const I=woe(i,L);l?await e.editConnection(l.id,I):await e.addConnection(I),Ct((l?"Saved ":"Added ")+I.name+".",{design:"success",duration:4e3}),x(),y()}catch(I){v(!1),f({form:I.message})}}},[e,i,l,h,x,y]),R=j.useCallback(async N=>{m(N.id);try{const L=await e.testConnection(N.id);Ct(N.name+": "+(L.message||(L.ok?"it works":"it did not work")),{design:L.ok?"success":"error",duration:L.ok?6e3:12e3})}catch(L){Ct(N.name+": "+L.message,{design:"error",duration:12e3})}finally{m(null)}},[e]),E=j.useCallback(async N=>{if(await W2("Remove "+N.name+"? Jobs using it will fail.",{confirmLabel:"Yes, remove",danger:!0}))try{await e.removeConnection(N.id),Ct("Removed "+N.name+".",{design:"success",duration:4e3}),l&&l.id===N.id&&x(),y()}catch(O){Ct(O.message,{design:"error",duration:12e3})}},[e,l,x,y]);return{list:t,loading:!t&&!n,error:n,draft:i,editing:l,errors:c,busy:h,testing:p,openAdd:b,openEdit:w,close:x,set:C,setKind:A,save:M,test:R,remove:E,reload:y}}const Dg=[{key:"1h",label:"1 hour",ms:36e5},{key:"24h",label:"24 hours",ms:24*36e5},{key:"7d",label:"7 days",ms:168*36e5},{key:"30d",label:"30 days",ms:720*36e5}],Toe="1h";function Aoe(e,t=Date.now()){const r=Dg.find(n=>n.key===e)||Dg[0];return{from:new Date(t-r.ms).toISOString(),to:new Date(t).toISOString()}}function Doe(e){return Dg.some(t=>t.key===e)?e:Toe}const aE=1024*1024,ES=1024*aE;function IU(e){return e>=2*ES?{div:ES,name:"GB",digits:2}:{div:aE,name:"MB",digits:0}}function Yh(e,t){if(e==null)return null;const r=Math.pow(10,t.digits);return Math.round(e/t.div*r)/r}const NS=e=>String(e).padStart(2,"0"),OU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Moe(e,t){const r=new Date(e),n=NS(r.getHours())+":"+NS(r.getMinutes());return t>=1800?r.getDate()+" "+OU[r.getMonth()]+" "+n:n}function Roe(e){const t=new Set;return["samples","logs","hits"].forEach(r=>(e&&e[r]||[]).forEach(n=>t.add(n.at))),Array.from(t).sort()}function Ed(e,t,r){const n=new Map((e&&e[t]||[]).map(a=>[a.at,a]));return Roe(e).map(a=>Object.assign({time:Moe(a,e.stepSeconds)},r(n.get(a))))}function Eoe(e){return Math.max(0,Math.ceil(e/8)-1)}function Nd({rows:e,series:t,chartType:r="line",colors:n={},unit:a="",min:i}){const o=Object.assign({text:"#9aa2b1",line:"#2a2f3a"},n);return{chartType:r,data:e,axes:{x:{labels:["time"],line:{color:o.line},grid:{show:!1},ticks:{color:o.text,interval:Eoe(e.length)}},y:{labels:t,line:{show:!1},grid:{show:!0,color:o.line},ticks:{color:o.text,formatter:a?l=>l+" "+a:void 0},scale:i===void 0?void 0:!1}},legend:{show:t.length>1,positioning:{position:"top-left"},font:{color:o.text,size:"12px"}},tooltip:{show:!0},marks:{line:{width:"2px",showSymbol:e.length<=30,symbolSize:6},scatter:{symbolSize:8}},chartArea:{margin:{top:t.length>1?"34px":"12px",right:"12px",bottom:"8px",left:"8px"}}}}function Noe(e,t={}){const r=e&&e.samples||[],n=Math.max(0,...r.map(c=>Math.max(c.memoryMax||0,c.spike||0,c.limit||0))),a=IU(n),i=r.some(c=>c.limit),o=r.some(c=>c.spike),l=Ed(e,"samples",c=>({memory:c?Yh(c.memoryMax,a):null,spike:c?Yh(c.spike,a):null,limit:c?Yh(c.limit,a):null})),s=[{field:"memory",name:"Memory",color:t.s1}];return o&&s.push({field:"spike",name:"Spike between readings",type:"scatter",color:t.s2}),i&&s.push({field:"limit",name:"Limit",color:t.muted,line:{style:"dashed",width:"1px"}}),Object.assign(Nd({rows:l,series:s,colors:t,unit:a.name,min:0}),{unit:a.name})}function kU(e,t={}){e&&e.samples;const r=Ed(e,"samples",a=>({highest:a?a.cpuMax:null,average:a?a.cpuAvg:null})),n=e&&e.stepSeconds>60?[{field:"highest",name:"Highest",color:t.s1},{field:"average",name:"Average",color:t.s2}]:[{field:"highest",name:"CPU",color:t.s1}];return Nd({rows:r,series:n,colors:t,unit:"%",min:0})}function Loe(e,t={}){const r=Ed(e,"hits",n=>n?{answered:n.hits-n.failed-n.refused,refused:n.refused,failed:n.failed}:{answered:0,refused:0,failed:0});return Nd({rows:r,chartType:"stackedBar",colors:t,series:[{field:"answered",name:"Answered",color:t.s1},{field:"refused",name:"Refused (4xx)",color:t.warn},{field:"failed",name:"Failed (5xx)",color:t.bad}]})}function Ioe(e,t={}){const r=Ed(e,"hits",n=>({average:n?n.avgMs:null,slowest:n?n.maxMs:null}));return Nd({rows:r,colors:t,unit:"ms",min:0,series:[{field:"average",name:"Average",color:t.s1},{field:"slowest",name:"Slowest",color:t.s2}]})}function Ooe(e,t={}){const r=Ed(e,"logs",n=>({warnings:n?n.warnings:0,errors:n?n.errors:0}));return Nd({rows:r,chartType:"stackedBar",colors:t,series:[{field:"warnings",name:"Warnings",color:t.warn},{field:"errors",name:"Errors",color:t.bad}]})}function koe(e,t={}){const r=e&&e.samples||[],n=IU(Math.max(0,...r.map(i=>i.total||0))),a=Ed(e,"samples",i=>({used:i?Yh(i.usedMax,n):null,cache:i?Yh(i.cache,n):null,total:i?Yh(i.total,n):null}));return Object.assign(Nd({rows:a,colors:t,unit:n.name,min:0,series:[{field:"used",name:"Used",color:t.s1},{field:"cache",name:"Cache & buffers",color:t.s2},{field:"total",name:"Total",color:t.muted,line:{style:"dashed",width:"1px"}}]}),{unit:n.name})}function Poe(e,t={}){return kU({samples:(e&&e.samples||[]).map(r=>({at:r.at,cpuMax:r.cpuMax,cpuAvg:r.cpuAvg})),stepSeconds:e&&e.stepSeconds},t)}function cT(e){const t=new Date(e);return t.getDate()+" "+OU[t.getMonth()]+" "+NS(t.getHours())+":"+NS(t.getMinutes())}function fT(e,t){let r=null;return e.forEach(n=>{const a=t(n);a!=null&&(!r||a>r.v)&&(r={v:a,at:n.at})}),r}function joe(e){return e>=ES?(e/ES).toFixed(2)+" GB":Math.round(e/aE)+" MB"}function Boe(e){if(!e)return[];const t=e.samples||[],r=[],n=fT(t,f=>Math.max(f.memoryMax||0,f.spike||0)||null);n&&r.push({label:"Most memory",value:joe(n.v),at:cT(n.at)});const a=fT(t,f=>f.cpuMax);a&&r.push({label:"Most CPU",value:a.v+"%",at:cT(a.at)});const i=t.filter(f=>f.restarts!==null&&f.restarts!==void 0);if(i.length){const f=Math.max(0,i[i.length-1].restarts-i[0].restarts);r.push({label:"Restarted",value:f===1?"once":f+" times",at:null})}const o=t.reduce((f,h)=>f+(h.down||0),0);o&&r.push({label:"Not running",value:o+" reading"+(o===1?"":"s"),at:null});const l=e.logs||[],s=l.reduce((f,h)=>f+h.errors,0);r.push({label:"Errors in its log",value:String(s),at:s?cT(fT(l,f=>f.errors).at):null});const c=e.hits||[];if(c.length){const f=c.reduce((v,p)=>v+p.hits,0),h=c.reduce((v,p)=>v+p.failed,0);r.push({label:"Requests",value:f.toLocaleString()+(h?" · "+h+" failed":""),at:null})}return r}function zoe(e){return(e||[]).map((t,r)=>({id:r,unit:t.unit,service:String(t.unit||"").replace(/\.service$/,""),method:t.method,path:t.path,hits:t.hits,failed:t.failed,refused:t.refused,errorShare:t.hits?Math.round((t.failed+t.refused)/t.hits*1e3)/10:0,avgMs:t.avgMs,maxMs:t.maxMs}))}const Voe=6e4;function iE(e,t,r){const n=qs(),a=Doe(n.get("range")),[i,o]=j.useState(null),[l,s]=j.useState(null),[c,f]=j.useState(!1),h=j.useRef(null),v=n.set,p=j.useCallback(y=>v({range:y===Dg[0].key?null:y},{replace:!0}),[v]),m=j.useCallback(()=>{if(!t)return;h.current&&h.current.abort();const y=new AbortController;h.current=y,f(!0),e(Aoe(a),y.signal).then(x=>{y.signal.aborted||(o(x),s(null))}).catch(x=>{y.signal.aborted||s(x.message)}).finally(()=>{y.signal.aborted||f(!1)})},[t,e,a]);return j.useEffect(()=>{o(null),m();const y=setInterval(()=>{document.hidden||m()},Voe);return()=>{clearInterval(y),h.current&&h.current.abort()}},[m,r]),{range:a,setRange:p,ranges:Dg,data:i,loading:c,error:l,reload:m}}function Foe({api:e,unit:t}){const r=j.useCallback((n,a)=>e.history(t,n,a),[e,t]);return iE(r,!!t,t)}function Goe({api:e,enabled:t=!0}){const r=j.useCallback((n,a)=>e.serverHistory(n,a),[e]);return iE(r,t,"server")}function Hoe({api:e,enabled:t=!0}){const r=qs(),n=r.get("traffic")||"",a=r.set,i=j.useCallback(l=>a({traffic:l||null},{replace:!0}),[a]),o=j.useCallback((l,s)=>e.traffic(Object.assign({unit:n||void 0,limit:300},l),s),[e,n]);return Object.assign(iE(o,t,n),{unit:n,setUnit:i})}var xM=function(e,t){return xM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},xM(e,t)};function ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xM(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Uoe=(function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e})(),Yoe=(function(){function e(){this.browser=new Uoe,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 e})(),ht=new Yoe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ht.wxa=!0,ht.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ht.worker=!0:!ht.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ht.node=!0,ht.svgSupported=!0):$oe(navigator.userAgent,ht);function $oe(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),a&&(r.ie=!0,r.version=a[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var l=t.domSupported=typeof document<"u";if(l){var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var oE=12,PU="sans-serif",bl=oE+"px "+PU,Woe=20,qoe=100,Xoe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Zoe(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),a=(e.charCodeAt(r)-Woe)/qoe;t[n]=a}return t}var Koe=Zoe(Xoe),Yr={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var e,t;return function(r,n){if(!e){var a=Yr.createCanvas();e=a&&a.getContext("2d")}if(e)return t!==n&&(t=e.font=n||bl),e.measureText(r);r=r||"",n=n||bl;var i=/((?:\d+)?\.?\d*)px/.exec(n),o=i&&+i[1]||oE,l=0;if(n.indexOf("mono")>=0)l=o*r.length;else for(var s=0;s<r.length;s++){var c=Koe[r[s]];l+=c==null?o:c*o}return{width:l}}})(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n},getTime:function(){return Date.now?Date.now():+new Date}};function jU(e){for(var t in Yr)Yr.hasOwnProperty(t)&&e[t]&&(Yr[t]=e[t])}var BU=ii(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),zU=ii(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Ld=Object.prototype.toString,c_=Array.prototype,Qoe=c_.forEach,Joe=c_.filter,lE=c_.slice,ele=c_.map,_B=(function(){}).constructor,T0=_B?_B.prototype:null,sE="__proto__",hT=2311,tle=Math.pow(2,53)-1;function uE(){return hT>=tle&&(hT=0),hT++}function f_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function je(e){if(e==null||typeof e!="object")return e;var t=e,r=Ld.call(e);if(r==="[object Array]"){if(!$h(e)){t=[];for(var n=0,a=e.length;n<a;n++)t[n]=je(e[n])}}else if(zU[r]){if(!$h(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(var n=0,a=e.length;n<a;n++)t[n]=e[n]}}}else if(!BU[r]&&!$h(e)&&!Rc(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==sE&&(t[o]=je(e[o]))}return t}function Je(e,t,r){if(!Ve(t)||!Ve(e))return r?je(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==sE){var a=e[n],i=t[n];Ve(i)&&Ve(a)&&!pe(i)&&!pe(a)&&!Rc(i)&&!Rc(a)&&!SM(i)&&!SM(a)&&!$h(i)&&!$h(a)?Je(a,i,r):(r||!(n in e))&&(e[n]=je(t[n]))}return e}function h_(e,t){for(var r=e[0],n=1,a=e.length;n<a;n++)r=Je(r,e[n],t);return r}function he(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==sE&&(e[r]=t[r]);return e}function VU(e,t,r){e=e||{};for(var n=0;n<r.length;n++){var a=r[n];e[a]=t[a]}return e}function Ue(e,t,r){for(var n=dt(t),a=0,i=n.length;a<i;a++){var o=n[a];(r?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var rle=Yr.createCanvas;function qe(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function cE(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var a in r)r.hasOwnProperty(a)&&(e.prototype[a]=r[a]);e.prototype.constructor=e,e.superClass=t}function Cr(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var i=n[a];i!=="constructor"&&(r?t[i]!=null:e[i]==null)&&(e[i]=t[i])}else Ue(e,t,r)}function Sn(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function B(e,t,r){if(e&&t)if(e.forEach&&e.forEach===Qoe)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,a=e.length;n<a;n++)t.call(r,e[n],n,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i,e)}function xe(e,t,r){if(!e)return[];if(!t)return v_(e);if(e.map&&e.map===ele)return e.map(t,r);for(var n=[],a=0,i=e.length;a<i;a++)n.push(t.call(r,e[a],a,e));return n}function ii(e,t,r,n){if(e&&t){for(var a=0,i=e.length;a<i;a++)r=t.call(n,r,e[a],a,e);return r}}function Bt(e,t,r){if(!e)return[];if(!t)return v_(e);if(e.filter&&e.filter===Joe)return e.filter(t,r);for(var n=[],a=0,i=e.length;a<i;a++)t.call(r,e[a],a,e)&&n.push(e[a]);return n}function d_(e,t,r){if(e&&t){for(var n=0,a=e.length;n<a;n++)if(t.call(r,e[n],n,e))return e[n]}}function dt(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}function nle(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(lE.call(arguments)))}}var Ee=T0&&Be(T0.bind)?T0.call.bind(T0.bind):nle;function et(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(lE.call(arguments)))}}function pe(e){return Array.isArray?Array.isArray(e):Ld.call(e)==="[object Array]"}function Be(e){return typeof e=="function"}function De(e){return typeof e=="string"}function LS(e){return Ld.call(e)==="[object String]"}function pt(e){return typeof e=="number"}function Ve(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function SM(e){return!!BU[Ld.call(e)]}function $n(e){return!!zU[Ld.call(e)]}function Rc(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function wm(e){return e.colorStops!=null}function FU(e){return e.image!=null}function GU(e){return Ld.call(e)==="[object RegExp]"}function xn(e){return e!==e}function En(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e.length;r<n;r++)if(e[r]!=null)return e[r]}function Ie(e,t){return e??t}function ca(e,t,r){return e??t??r}function v_(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return lE.apply(e,t)}function Cm(e){if(typeof e=="number")return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function In(e,t){if(!e)throw new Error(t)}function Ja(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var HU="__ec_primitive__";function Mg(e){e[HU]=!0}function $h(e){return e[HU]}var ale=(function(){function e(){this.data={}}return e.prototype.delete=function(t){var r=this.has(t);return r&&delete this.data[t],r},e.prototype.has=function(t){return this.data.hasOwnProperty(t)},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,r){return this.data[t]=r,this},e.prototype.keys=function(){return dt(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&t(r[n],n)},e})(),UU=typeof Map=="function";function ile(){return UU?new Map:new ale}var YU=(function(){function e(t){var r=pe(t);this.data=ile();var n=this;t instanceof e?t.each(a):t&&B(t,a);function a(i,o){r?n.set(i,o):n.set(o,i)}}return e.prototype.hasKey=function(t){return this.data.has(t)},e.prototype.get=function(t){return this.data.get(t)},e.prototype.set=function(t,r){return this.data.set(t,r),r},e.prototype.each=function(t,r){this.data.forEach(function(n,a){t.call(r,n,a)})},e.prototype.keys=function(){var t=this.data.keys();return UU?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e})();function Le(e){return new YU(e)}function id(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];for(var a=e.length,n=0;n<t.length;n++)r[n+a]=t[n];return r}function Tm(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&he(r,t),r}function fE(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Ne(e,t){return e.hasOwnProperty(t)}function ur(){}var ng=180/Math.PI,ole=Number.EPSILON||Math.pow(2,-52);const lle=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:ole,HashMap:YU,RADIAN_TO_DEGREE:ng,assert:In,assignProps:VU,bind:Ee,clone:je,concatArray:id,createCanvas:rle,createHashMap:Le,createObject:Tm,curry:et,defaults:Ue,disableUserSelect:fE,each:B,eqNaN:xn,extend:he,filter:Bt,find:d_,guid:uE,hasOwn:Ne,indexOf:qe,inherits:cE,isArray:pe,isArrayLike:Sn,isBuiltInObject:SM,isDom:Rc,isFunction:Be,isGradientObject:wm,isImagePatternObject:FU,isNumber:pt,isObject:Ve,isPrimitive:$h,isRegExp:GU,isString:De,isStringSafe:LS,isTypedArray:$n,keys:dt,logError:f_,map:xe,merge:Je,mergeAll:h_,mixin:Cr,noop:ur,normalizeCssArray:Cm,reduce:ii,retrieve:En,retrieve2:Ie,retrieve3:ca,setAsPrimitive:Mg,slice:v_,trim:Ja},Symbol.toStringTag,{value:"Module"}));function Xs(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function vn(e,t){return e[0]=t[0],e[1]=t[1],e}function po(e){return[e[0],e[1]]}function hl(e,t,r){return e[0]=t,e[1]=r,e}function bM(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function IS(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function ys(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function Rg(e){return Math.sqrt(hE(e))}var sle=Rg;function hE(e){return e[0]*e[0]+e[1]*e[1]}var ule=hE;function cle(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function fle(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function hle(e,t){return e[0]*t[0]+e[1]*t[1]}function ag(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function tf(e,t){var r=Rg(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function OS(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var sl=OS;function $U(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Ms=$U;function dle(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Xx(e,t,r,n){return e[0]=t[0]+n*(r[0]-t[0]),e[1]=t[1]+n*(r[1]-t[1]),e}function mr(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[2]*a+r[4],e[1]=r[1]*n+r[3]*a+r[5],e}function ul(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function cl(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}const vle=Object.freeze(Object.defineProperty({__proto__:null,add:bM,applyTransform:mr,clone:po,copy:vn,create:Xs,dist:sl,distSquare:Ms,distance:OS,distanceSquare:$U,div:fle,dot:hle,len:Rg,lenSquare:hE,length:sle,lengthSquare:ule,lerp:Xx,max:cl,min:ul,mul:cle,negate:dle,normalize:tf,scale:ag,scaleAndAdd:IS,set:hl,sub:ys},Symbol.toStringTag,{value:"Module"}));var uh=(function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e})(),ple=(function(){function e(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(t){for(var r=t.target;r&&!r.draggable;)r=r.parent||r.__hostTarget;r&&(this._draggingTarget=r,r.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new uh(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var n=t.offsetX,a=t.offsetY,i=n-this._x,o=a-this._y;this._x=n,this._y=a,r.drift(i,o,t),this.handler.dispatchToElement(new uh(r,t),"drag",t.event);var l=this.handler.findHover(n,a,r).target,s=this._dropTarget;this._dropTarget=l,r!==l&&(s&&l!==s&&this.handler.dispatchToElement(new uh(s,t),"dragleave",t.event),l&&l!==s&&this.handler.dispatchToElement(new uh(l,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new uh(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new uh(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e})(),fi=(function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,n,a){this._$handlers||(this._$handlers={});var i=this._$handlers;if(typeof r=="function"&&(a=n,n=r,r=null),!n||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),i[t]||(i[t]=[]);for(var l=0;l<i[t].length;l++)if(i[t][l].h===n)return this;var s={h:n,query:r,ctx:a||this,callAtLast:n.zrEventfulCallAtLast},c=i[t].length-1,f=i[t][c];return f&&f.callAtLast?i[t].splice(c,0,s):i[t].push(s),this},e.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length},e.prototype.off=function(t,r){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(r){if(n[t]){for(var a=[],i=0,o=n[t].length;i<o;i++)n[t][i].h!==r&&a.push(n[t][i]);n[t]=a}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},e.prototype.trigger=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[t],i=this._$eventProcessor;if(a)for(var o=r.length,l=a.length,s=0;s<l;s++){var c=a[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(t,c.query)))switch(o){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,r[0]);break;case 2:c.h.call(c.ctx,r[0],r[1]);break;default:c.h.apply(c.ctx,r);break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},e.prototype.triggerWithContext=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this._$handlers)return this;var a=this._$handlers[t],i=this._$eventProcessor;if(a)for(var o=r.length,l=r[o-1],s=a.length,c=0;c<s;c++){var f=a[c];if(!(i&&i.filter&&f.query!=null&&!i.filter(t,f.query)))switch(o){case 0:f.h.call(l);break;case 1:f.h.call(l,r[0]);break;case 2:f.h.call(l,r[0],r[1]);break;default:f.h.apply(l,r.slice(1,o-1));break}}return i&&i.afterTrigger&&i.afterTrigger(t),this},e})(),gle=Math.log(2);function _M(e,t,r,n,a,i){var o=n+"-"+a,l=e.length;if(i.hasOwnProperty(o))return i[o];if(t===1){var s=Math.round(Math.log((1<<l)-1&~a)/gle);return e[r][s]}for(var c=n|1<<r,f=r+1;n&1<<f;)f++;for(var h=0,v=0,p=0;v<l;v++){var m=1<<v;m&a||(h+=(p%2?-1:1)*e[r][v]*_M(e,t-1,f,c,a|m,i),p++)}return i[o]=h,h}function wB(e,t){var r=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},a=_M(r,8,0,0,0,n);if(a!==0){for(var i=[],o=0;o<8;o++)for(var l=0;l<8;l++)i[l]==null&&(i[l]=0),i[l]+=((o+l)%2?-1:1)*_M(r,7,o===0?1:0,1<<o,1<<l,n)/a*t[o];return function(s,c,f){var h=c*i[6]+f*i[7]+1;s[0]=(c*i[0]+f*i[1]+i[2])/h,s[1]=(c*i[3]+f*i[4]+i[5])/h}}}var kS="___zrEVENTSAVED",dT=[];function mle(e,t,r,n,a){return wM(dT,t,n,a,!0)&&wM(e,r,dT[0],dT[1])}function yle(e,t){e&&r(e),t&&r(t);function r(n){var a=n[kS];a&&(a.clearMarkers&&a.clearMarkers(),delete n[kS])}}function wM(e,t,r,n,a){if(t.getBoundingClientRect&&ht.domSupported&&!WU(t)){var i=t[kS]||(t[kS]={}),o=xle(t,i),l=Sle(o,i,a);if(l)return l(e,r,n),!0}return!1}function xle(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var n=["left","right"],a=["top","bottom"],i=0;i<4;i++){var o=document.createElement("div"),l=o.style,s=i%2,c=(i>>1)%2;l.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[s]+":0",a[c]+":0",n[1-s]+":auto",a[1-c]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){B(r,function(f){f.parentNode&&f.parentNode.removeChild(f)})},r}function Sle(e,t,r){for(var n=r?"invTrans":"trans",a=t[n],i=t.srcCoords,o=[],l=[],s=!0,c=0;c<4;c++){var f=e[c].getBoundingClientRect(),h=2*c,v=f.left,p=f.top;o.push(v,p),s=s&&i&&v===i[h]&&p===i[h+1],l.push(e[c].offsetLeft,e[c].offsetTop)}return s&&a?a:(t.srcCoords=o,t[n]=r?wB(l,o):wB(o,l))}function WU(e){return e.nodeName.toUpperCase()==="CANVAS"}var ble=/([&<>"'])/g,_le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Mn(e){return e==null?"":(e+"").replace(ble,function(t,r){return _le[r]})}var wle=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,vT=[],Cle=ht.browser.firefox&&+ht.browser.version.split(".")[0]<39;function CM(e,t,r,n){return r=r||{},n?CB(e,t,r):Cle&&t.layerX!=null&&t.layerX!==t.offsetX?(r.zrX=t.layerX,r.zrY=t.layerY):t.offsetX!=null?(r.zrX=t.offsetX,r.zrY=t.offsetY):CB(e,t,r),r}function CB(e,t,r){if(ht.domSupported&&e.getBoundingClientRect){var n=t.clientX,a=t.clientY;if(WU(e)){var i=e.getBoundingClientRect();r.zrX=n-i.left,r.zrY=a-i.top;return}else if(wM(vT,e,n,a)){r.zrX=vT[0],r.zrY=vT[1];return}}r.zrX=r.zrY=0}function dE(e){return e||window.event}function $a(e,t,r){if(t=dE(t),t.zrX!=null)return t;var n=t.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&CM(e,o,t,r)}else{CM(e,t,t,r);var i=Tle(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var l=t.button;return t.which==null&&l!==void 0&&wle.test(t.type)&&(t.which=l&1?1:l&2?3:l&4?2:0),t}function Tle(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var a=Math.abs(n!==0?n:r),i=n>0?-1:n<0?1:r>0?-1:1;return 3*a*i}function TM(e,t,r,n){e.addEventListener(t,r,n)}function Ale(e,t,r,n){e.removeEventListener(t,r,n)}var _l=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function TB(e){return e.which===2||e.which===3}var Dle=(function(){function e(){this._track=[]}return e.prototype.recognize=function(t,r,n){return this._doTrack(t,r,n),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,r,n){var a=t.touches;if(a){for(var i={points:[],touches:[],target:r,event:t},o=0,l=a.length;o<l;o++){var s=a[o],c=CM(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(t){for(var r in pT)if(pT.hasOwnProperty(r)){var n=pT[r](this._track,t);if(n)return n}},e})();function AB(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function Mle(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var pT={pinch:function(e,t){var r=e.length;if(r){var n=(e[r-1]||{}).points,a=(e[r-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var i=AB(n)/AB(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=Mle(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function lr(){return[1,0,0,1,0,0]}function rf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Bs(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function ei(e,t,r){var n=t[0]*r[0]+t[2]*r[1],a=t[1]*r[0]+t[3]*r[1],i=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],l=t[0]*r[4]+t[2]*r[5]+t[4],s=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e}function Ei(e,t,r){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+r[0],e[5]=t[5]+r[1],e}function Zs(e,t,r,n){n===void 0&&(n=[0,0]);var a=t[0],i=t[2],o=t[4],l=t[1],s=t[3],c=t[5],f=Math.sin(r),h=Math.cos(r);return e[0]=a*h+l*f,e[1]=-a*f+l*h,e[2]=i*h+s*f,e[3]=-i*f+h*s,e[4]=h*(o-n[0])+f*(c-n[1])+n[0],e[5]=h*(c-n[1])-f*(o-n[0])+n[1],e}function p_(e,t,r){var n=r[0],a=r[1];return e[0]=t[0]*n,e[1]=t[1]*a,e[2]=t[2]*n,e[3]=t[3]*a,e[4]=t[4]*n,e[5]=t[5]*a,e}function oi(e,t){var r=t[0],n=t[2],a=t[4],i=t[1],o=t[3],l=t[5],s=r*o-i*n;return s?(s=1/s,e[0]=o*s,e[1]=-i*s,e[2]=-n*s,e[3]=r*s,e[4]=(n*l-o*a)*s,e[5]=(i*a-r*l)*s,e):null}function qU(e){var t=lr();return Bs(t,e),t}const Rle=Object.freeze(Object.defineProperty({__proto__:null,clone:qU,copy:Bs,create:lr,identity:rf,invert:oi,mul:ei,rotate:Zs,scale:p_,translate:Ei},Symbol.toStringTag,{value:"Module"}));var Qe=(function(){function e(t,r){this.x=t||0,this.y=r||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,r){return this.x=t,this.y=r,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r,this.y+=t.y*r},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var r=this.x-t.x,n=this.y-t.y;return Math.sqrt(r*r+n*n)},e.prototype.distanceSquare=function(t){var r=this.x-t.x,n=this.y-t.y;return r*r+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var r=this.x,n=this.y;return this.x=t[0]*r+t[2]*n+t[4],this.y=t[1]*r+t[3]*n+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,r,n){t.x=r,t.y=n},e.copy=function(t,r){t.x=r.x,t.y=r.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,r){return t.x*r.x+t.y*r.y},e.add=function(t,r,n){t.x=r.x+n.x,t.y=r.y+n.y},e.sub=function(t,r,n){t.x=r.x-n.x,t.y=r.y-n.y},e.scale=function(t,r,n){t.x=r.x*n,t.y=r.y*n},e.scaleAndAdd=function(t,r,n,a){t.x=r.x+n.x*a,t.y=r.y+n.y*a},e.lerp=function(t,r,n,a){var i=1-a;t.x=i*r.x+a*n.x,t.y=i*r.y+a*n.y},e})(),dc=Math.min,zh=Math.max,AM=Math.abs,DB=["x","y"],Ele=["width","height"],Ru=new Qe,Eu=new Qe,Nu=new Qe,Lu=new Qe,_a=KU(),Vp=_a.minTv,DM=_a.maxTv,ig=[0,0],Fe=(function(){function e(t,r,n,a){gT(this,t,r,n,a)}return e.set=function(t,r,n,a,i){return a<0&&(r=r+a,a=-a),i<0&&(n=n+i,i=-i),t.x=r,t.y=n,t.width=a,t.height=i,t},e.prototype.union=function(t){var r=dc(t.x,this.x),n=dc(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=zh(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=zh(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=r,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){return XU(lr(),this,t)},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,a){n&&Qe.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!r)return!1;t instanceof e||(t=gT(Lle,t.x,t.y,t.width,t.height)),r instanceof e||(r=gT(Ile,r.x,r.y,r.width,r.height));var l=!!n;_a.reset(a,l);var s=_a.touchThreshold,c=t.x+s,f=t.x+t.width-s,h=t.y+s,v=t.y+t.height-s,p=r.x+s,m=r.x+r.width-s,y=r.y+s,x=r.y+r.height-s;if(c>f||h>v||p>m||y>x)return!1;var b=!(f<p||m<c||v<y||x<h);return(l||i)&&(ig[0]=1/0,ig[1]=0,MB(c,f,p,m,0,l,i,o),MB(h,v,y,x,1,l,i,o),l&&Qe.copy(n,b?_a.useDir?_a.dirMinTv:Vp:DM)),b},e.contain=function(t,r,n){return r>=t.x&&r<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},e.prototype.contain=function(t,r){return e.contain(this,t,r)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){od(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(t,r){return t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height,t},e.applyTransform=function(t,r,n){if(!n){t!==r&&od(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],l=n[5];t.x=r.x*a+o,t.y=r.y*i+l,t.width=r.width*a,t.height=r.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Ru.x=Nu.x=r.x,Ru.y=Lu.y=r.y,Eu.x=Lu.x=r.x+r.width,Eu.y=Nu.y=r.y+r.height,Ru.transform(n),Lu.transform(n),Eu.transform(n),Nu.transform(n),t.x=dc(Ru.x,Eu.x,Nu.x,Lu.x),t.y=dc(Ru.y,Eu.y,Nu.y,Lu.y);var s=zh(Ru.x,Eu.x,Nu.x,Lu.x),c=zh(Ru.y,Eu.y,Nu.y,Lu.y);t.width=s-t.x,t.height=c-t.y},e.calculateTransform=function(t,r,n){var a=n.width/r.width,i=n.height/r.height;return t=rf(t||[]),Ei(t,t,hl(mT,-r.x,-r.y)),p_(t,t,hl(mT,a,i)),Ei(t,t,hl(mT,n.x,n.y)),t},e})(),g_=Fe.create,gT=Fe.set,od=Fe.copy,XU=Fe.calculateTransform,ZU=Fe.applyTransform,Nle=Fe.contain,Lle=new Fe(0,0,0,0),Ile=new Fe(0,0,0,0),mT=[];function MB(e,t,r,n,a,i,o,l){var s=AM(t-r),c=AM(n-e),f=dc(s,c),h=DB[a],v=DB[1-a],p=Ele[a];t<r||n<e?s<c?(i&&(DM[h]=-s),l&&(o[h]=t,o[p]=0)):(i&&(DM[h]=c),l&&(o[h]=e,o[p]=0)):(o&&(o[h]=zh(e,r),o[p]=dc(t,n)-o[h]),i&&(f<ig[0]||_a.useDir)&&(ig[0]=dc(f,ig[0]),(s<c||!_a.bidirectional)&&(Vp[h]=s,Vp[v]=0,_a.useDir&&_a.calcDirMTV()),(s>=c||!_a.bidirectional)&&(Vp[h]=-c,Vp[v]=0,_a.useDir&&_a.calcDirMTV())))}function KU(){var e=0,t=new Qe,r=new Qe,n={minTv:new Qe,maxTv:new Qe,useDir:!1,dirMinTv:new Qe,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=zh(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,l=i.y*i.y+i.x*i.x,s=Math.sin(e),c=Math.cos(e),f=s*i.y+c*i.x;if(a(f)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(r.x=l*c/f,r.y=l*s/f,a(r.x)&&a(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function a(i){return AM(i)<1e-10}return n}var QU="silent";function Ole(e,t,r){return{type:e,event:r,target:t.target,topTarget:t.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:kle}}function kle(){_l(this.event)}var Ple=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.handler=null,r}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(fi),op=(function(){function e(t,r){this.x=t,this.y=r}return e})(),jle=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],yT=new Fe(0,0,0,0),JU=(function(e){ee(t,e);function t(r,n,a,i,o){var l=e.call(this)||this;return l._hovered=new op(0,0),l.storage=r,l.painter=n,l.painterRoot=i,l._pointerSize=o,a=a||new Ple,l.proxy=null,l.setHandlerProxy(a),l._draggingMgr=new ple(l),l}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(B(jle,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},t.prototype.mousemove=function(r){var n=r.zrX,a=r.zrY,i=e6(this,n,a),o=this._hovered,l=o.target;l&&!l.__zr&&(o=this.findHover(o.x,o.y),l=o.target);var s=this._hovered=i?new op(n,a):this.findHover(n,a),c=s.target,f=this.proxy;f.setCursor&&f.setCursor(c?c.cursor:"default"),l&&c!==l&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(s,"mousemove",r),c&&c!==l&&this.dispatchToElement(s,"mouseover",r)},t.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})},t.prototype.resize=function(){this._hovered=new op(0,0)},t.prototype.dispatch=function(r,n){var a=this[r];a&&a.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},t.prototype.dispatchToElement=function(r,n,a){r=r||{};var i=r.target;if(!(i&&i.silent)){for(var o="on"+n,l=Ole(n,r,a);i&&(i[o]&&(l.cancelBubble=!!i[o].call(i,l)),i.trigger(n,l),i=i.__hostTarget?i.__hostTarget:i.parent,!l.cancelBubble););l.cancelBubble||(this.trigger(n,l),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(s){typeof s[o]=="function"&&s[o].call(s,l),s.trigger&&s.trigger(n,l)}))}},t.prototype.findHover=function(r,n,a){var i=this.storage.getDisplayList(),o=new op(r,n);if(RB(i,o,r,n,a),this._pointerSize&&!o.target){for(var l=[],s=this._pointerSize,c=s/2,f=new Fe(r-c,n-c,s,s),h=i.length-1;h>=0;h--){var v=i[h];v!==a&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(yT.copy(v.getBoundingRect()),v.transform&&yT.applyTransform(v.transform),yT.intersect(f)&&l.push(v))}if(l.length)for(var p=4,m=Math.PI/12,y=Math.PI*2,x=0;x<c;x+=p)for(var b=0;b<y;b+=m){var w=r+x*Math.cos(b),C=n+x*Math.sin(b);if(RB(l,o,w,C,a),o.target)return o}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new Dle);var a=this._gestureMgr;n==="start"&&a.clear();var i=a.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&a.clear(),i){var o=i.type;r.gestureEvent=o;var l=new op;l.target=i.target,this.dispatchToElement(l,o,i.event)}},t})(fi);B(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){JU.prototype[e]=function(t){var r=t.zrX,n=t.zrY,a=e6(this,r,n),i,o;if((e!=="mouseup"||!a)&&(i=this.findHover(r,n),o=i.target),e==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e==="mouseup")this._upEl=o;else if(e==="click"){if(this._downEl!==this._upEl||!this._downPoint||sl(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}});function Ble(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(a=!0);var l=n.__hostTarget;n=l?n.ignoreHostSilent?null:l:n.parent}return a?QU:!0}return!1}function RB(e,t,r,n,a){for(var i=e.length-1;i>=0;i--){var o=e[i],l=void 0;if(o!==a&&!o.ignore&&(l=Ble(o,r,n))&&(!t.topTarget&&(t.topTarget=o),l!==QU)){t.target=o;break}}}function e6(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var t6=32,lp=7;function zle(e){for(var t=0;e>=t6;)t|=e&1,e>>=1;return e+t}function EB(e,t,r,n){var a=t+1;if(a===r)return 1;if(n(e[a++],e[t])<0){for(;a<r&&n(e[a],e[a-1])<0;)a++;Vle(e,t,a)}else for(;a<r&&n(e[a],e[a-1])>=0;)a++;return a-t}function Vle(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function NB(e,t,r,n,a){for(n===t&&n++;n<r;n++){for(var i=e[n],o=t,l=n,s;o<l;)s=o+l>>>1,a(i,e[s])<0?l=s:o=s+1;var c=n-o;switch(c){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;c>0;)e[o+c]=e[o+c-1],c--}e[o]=i}}function xT(e,t,r,n,a,i){var o=0,l=0,s=1;if(i(e,t[r+a])>0){for(l=n-a;s<l&&i(e,t[r+a+s])>0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l),o+=a,s+=a}else{for(l=a+1;s<l&&i(e,t[r+a-s])<=0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l);var c=o;o=a-s,s=a-c}for(o++;o<s;){var f=o+(s-o>>>1);i(e,t[r+f])>0?o=f+1:s=f}return s}function ST(e,t,r,n,a,i){var o=0,l=0,s=1;if(i(e,t[r+a])<0){for(l=a+1;s<l&&i(e,t[r+a-s])<0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l);var c=o;o=a-s,s=a-c}else{for(l=n-a;s<l&&i(e,t[r+a+s])>=0;)o=s,s=(s<<1)+1,s<=0&&(s=l);s>l&&(s=l),o+=a,s+=a}for(o++;o<s;){var f=o+(s-o>>>1);i(e,t[r+f])<0?s=f:o=f+1}return s}function Fle(e,t){var r=lp,n,a,i=0,o=[];n=[],a=[];function l(p,m){n[i]=p,a[i]=m,i+=1}function s(){for(;i>1;){var p=i-2;if(p>=1&&a[p-1]<=a[p]+a[p+1]||p>=2&&a[p-2]<=a[p]+a[p-1])a[p-1]<a[p+1]&&p--;else if(a[p]>a[p+1])break;f(p)}}function c(){for(;i>1;){var p=i-2;p>0&&a[p-1]<a[p+1]&&p--,f(p)}}function f(p){var m=n[p],y=a[p],x=n[p+1],b=a[p+1];a[p]=y+b,p===i-3&&(n[p+1]=n[p+2],a[p+1]=a[p+2]),i--;var w=ST(e[x],e,m,y,0,t);m+=w,y-=w,y!==0&&(b=xT(e[m+y-1],e,x,b,b-1,t),b!==0&&(y<=b?h(m,y,x,b):v(m,y,x,b)))}function h(p,m,y,x){var b=0;for(b=0;b<m;b++)o[b]=e[p+b];var w=0,C=y,A=p;if(e[A++]=e[C++],--x===0){for(b=0;b<m;b++)e[A+b]=o[w+b];return}if(m===1){for(b=0;b<x;b++)e[A+b]=e[C+b];e[A+x]=o[w];return}for(var M=r,R,E,N;;){R=0,E=0,N=!1;do if(t(e[C],o[w])<0){if(e[A++]=e[C++],E++,R=0,--x===0){N=!0;break}}else if(e[A++]=o[w++],R++,E=0,--m===1){N=!0;break}while((R|E)<M);if(N)break;do{if(R=ST(e[C],o,w,m,0,t),R!==0){for(b=0;b<R;b++)e[A+b]=o[w+b];if(A+=R,w+=R,m-=R,m<=1){N=!0;break}}if(e[A++]=e[C++],--x===0){N=!0;break}if(E=xT(o[w],e,C,x,0,t),E!==0){for(b=0;b<E;b++)e[A+b]=e[C+b];if(A+=E,C+=E,x-=E,x===0){N=!0;break}}if(e[A++]=o[w++],--m===1){N=!0;break}M--}while(R>=lp||E>=lp);if(N)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),m===1){for(b=0;b<x;b++)e[A+b]=e[C+b];e[A+x]=o[w]}else{if(m===0)throw new Error;for(b=0;b<m;b++)e[A+b]=o[w+b]}}function v(p,m,y,x){var b=0;for(b=0;b<x;b++)o[b]=e[y+b];var w=p+m-1,C=x-1,A=y+x-1,M=0,R=0;if(e[A--]=e[w--],--m===0){for(M=A-(x-1),b=0;b<x;b++)e[M+b]=o[b];return}if(x===1){for(A-=m,w-=m,R=A+1,M=w+1,b=m-1;b>=0;b--)e[R+b]=e[M+b];e[A]=o[C];return}for(var E=r;;){var N=0,L=0,O=!1;do if(t(o[C],e[w])<0){if(e[A--]=e[w--],N++,L=0,--m===0){O=!0;break}}else if(e[A--]=o[C--],L++,N=0,--x===1){O=!0;break}while((N|L)<E);if(O)break;do{if(N=m-ST(o[C],e,p,m,m-1,t),N!==0){for(A-=N,w-=N,m-=N,R=A+1,M=w+1,b=N-1;b>=0;b--)e[R+b]=e[M+b];if(m===0){O=!0;break}}if(e[A--]=o[C--],--x===1){O=!0;break}if(L=x-xT(e[w],o,0,x,x-1,t),L!==0){for(A-=L,C-=L,x-=L,R=A+1,M=C+1,b=0;b<L;b++)e[R+b]=o[M+b];if(x<=1){O=!0;break}}if(e[A--]=e[w--],--m===0){O=!0;break}E--}while(N>=lp||L>=lp);if(O)break;E<0&&(E=0),E+=2}if(r=E,r<1&&(r=1),x===1){for(A-=m,w-=m,R=A+1,M=w+1,b=m-1;b>=0;b--)e[R+b]=e[M+b];e[A]=o[C]}else{if(x===0)throw new Error;for(M=A-(x-1),b=0;b<x;b++)e[M+b]=o[b]}}return{mergeRuns:s,forceMergeRuns:c,pushRun:l}}function Zx(e,t,r,n){r||(r=0),n||(n=e.length);var a=n-r;if(!(a<2)){var i=0;if(a<t6){i=EB(e,r,n,t),NB(e,r,n,r+i,t);return}var o=Fle(e,t),l=zle(a);do{if(i=EB(e,r,n,t),i<l){var s=a;s>l&&(s=l),NB(e,r,r+s,r+i,t),i=s}o.pushRun(r,i),o.mergeRuns(),a-=i,r+=i}while(a!==0);o.forceMergeRuns()}}var ua=1,Fp=2,Nh=4,LB=!1;function bT(){LB||(LB=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function IB(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Gle=(function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=IB}return e.prototype.traverse=function(t,r){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,r)},e.prototype.getDisplayList=function(t,r){r=r||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(r),n},e.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var r=this._roots,n=this._displayList,a=0,i=r.length;a<i;a++)this._updateAndAddDisplayable(r[a],null,t);n.length=this._displayListLen,Zx(n,IB)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var a=t.getClipPath(),i=r&&r.length,o=0,l=t.__clipPaths;if(!t.ignoreClip&&(i||a)){if(l||(l=t.__clipPaths=[]),i)for(var s=0;s<r.length;s++)l[o++]=r[s];for(var c=a,f=t;c;)c.parent=f,c.updateTransform(),l[o++]=c,f=c,c=c.getClipPath()}if(l&&(l.length=o),t.childrenRef){for(var h=t.childrenRef(),v=0;v<h.length;v++){var p=h[v];t.__dirty&&(p.__dirty|=ua),this._updateAndAddDisplayable(p,l,n)}t.__dirty=0}else{var m=t;isNaN(m.z)&&(bT(),m.z=0),isNaN(m.z2)&&(bT(),m.z2=0),isNaN(m.zlevel)&&(bT(),m.zlevel=0),this._displayList[this._displayListLen++]=m}var y=t.getDecalElement&&t.getDecalElement();y&&this._updateAndAddDisplayable(y,l,n);var x=t.getTextGuideLine();x&&this._updateAndAddDisplayable(x,l,n);var b=t.getTextContent();b&&this._updateAndAddDisplayable(b,l,n)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,n=t.length;r<n;r++)this.delRoot(t[r]);return}var a=qe(this._roots,t);a>=0&&this._roots.splice(a,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e})(),PS;PS=ht.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var og={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)))},elasticOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},elasticInOut:function(e){var t,r=.1,n=.4;return e===0?0:e===1?1:(!r||r<1?(r=1,t=n/4):t=n*Math.asin(1/r)/(2*Math.PI),(e*=2)<1?-.5*(r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)):r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-og.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?og.bounceIn(e*2)*.5:og.bounceOut(e*2-1)*.5+.5}},A0=Math.pow,Rs=Math.sqrt,jS=1e-8,r6=1e-4,OB=Rs(3),D0=1/3,so=Xs(),Za=Xs(),Wh=Xs();function xs(e){return e>-jS&&e<jS}function n6(e){return e>jS||e<-jS}function mn(e,t,r,n,a){var i=1-a;return i*i*(i*e+3*a*t)+a*a*(a*n+3*i*r)}function kB(e,t,r,n,a){var i=1-a;return 3*(((t-e)*i+2*(r-t)*a)*i+(n-r)*a*a)}function BS(e,t,r,n,a,i){var o=n+3*(t-r)-e,l=3*(r-t*2+e),s=3*(t-e),c=e-a,f=l*l-3*o*s,h=l*s-9*o*c,v=s*s-3*l*c,p=0;if(xs(f)&&xs(h))if(xs(l))i[0]=0;else{var m=-s/l;m>=0&&m<=1&&(i[p++]=m)}else{var y=h*h-4*f*v;if(xs(y)){var x=h/f,m=-l/o+x,b=-x/2;m>=0&&m<=1&&(i[p++]=m),b>=0&&b<=1&&(i[p++]=b)}else if(y>0){var w=Rs(y),C=f*l+1.5*o*(-h+w),A=f*l+1.5*o*(-h-w);C<0?C=-A0(-C,D0):C=A0(C,D0),A<0?A=-A0(-A,D0):A=A0(A,D0);var m=(-l-(C+A))/(3*o);m>=0&&m<=1&&(i[p++]=m)}else{var M=(2*f*l-3*o*h)/(2*Rs(f*f*f)),R=Math.acos(M)/3,E=Rs(f),N=Math.cos(R),m=(-l-2*E*N)/(3*o),b=(-l+E*(N+OB*Math.sin(R)))/(3*o),L=(-l+E*(N-OB*Math.sin(R)))/(3*o);m>=0&&m<=1&&(i[p++]=m),b>=0&&b<=1&&(i[p++]=b),L>=0&&L<=1&&(i[p++]=L)}}return p}function a6(e,t,r,n,a){var i=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,l=3*t-3*e,s=0;if(xs(o)){if(n6(i)){var c=-l/i;c>=0&&c<=1&&(a[s++]=c)}}else{var f=i*i-4*o*l;if(xs(f))a[0]=-i/(2*o);else if(f>0){var h=Rs(f),c=(-i+h)/(2*o),v=(-i-h)/(2*o);c>=0&&c<=1&&(a[s++]=c),v>=0&&v<=1&&(a[s++]=v)}}return s}function zS(e,t,r,n,a,i){var o=(t-e)*a+e,l=(r-t)*a+t,s=(n-r)*a+r,c=(l-o)*a+o,f=(s-l)*a+l,h=(f-c)*a+c;i[0]=e,i[1]=o,i[2]=c,i[3]=h,i[4]=h,i[5]=f,i[6]=s,i[7]=n}function Hle(e,t,r,n,a,i,o,l,s,c,f){var h,v=.005,p=1/0,m,y,x,b;so[0]=s,so[1]=c;for(var w=0;w<1;w+=.05)Za[0]=mn(e,r,a,o,w),Za[1]=mn(t,n,i,l,w),x=Ms(so,Za),x<p&&(h=w,p=x);p=1/0;for(var C=0;C<32&&!(v<r6);C++)m=h-v,y=h+v,Za[0]=mn(e,r,a,o,m),Za[1]=mn(t,n,i,l,m),x=Ms(Za,so),m>=0&&x<p?(h=m,p=x):(Wh[0]=mn(e,r,a,o,y),Wh[1]=mn(t,n,i,l,y),b=Ms(Wh,so),y<=1&&b<p?(h=y,p=b):v*=.5);return Rs(p)}function Ule(e,t,r,n,a,i,o,l,s){for(var c=e,f=t,h=0,v=1/s,p=1;p<=s;p++){var m=p*v,y=mn(e,r,a,o,m),x=mn(t,n,i,l,m),b=y-c,w=x-f;h+=Math.sqrt(b*b+w*w),c=y,f=x}return h}function Rn(e,t,r,n){var a=1-n;return a*(a*e+2*n*t)+n*n*r}function MM(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function Yle(e,t,r,n,a){var i=e-2*t+r,o=2*(t-e),l=e-n,s=0;if(xs(i)){if(n6(o)){var c=-l/o;c>=0&&c<=1&&(a[s++]=c)}}else{var f=o*o-4*i*l;if(xs(f)){var c=-o/(2*i);c>=0&&c<=1&&(a[s++]=c)}else if(f>0){var h=Rs(f),c=(-o+h)/(2*i),v=(-o-h)/(2*i);c>=0&&c<=1&&(a[s++]=c),v>=0&&v<=1&&(a[s++]=v)}}return s}function i6(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function Eg(e,t,r,n,a){var i=(t-e)*n+e,o=(r-t)*n+t,l=(o-i)*n+i;a[0]=e,a[1]=i,a[2]=l,a[3]=l,a[4]=o,a[5]=r}function $le(e,t,r,n,a,i,o,l,s){var c,f=.005,h=1/0;so[0]=o,so[1]=l;for(var v=0;v<1;v+=.05){Za[0]=Rn(e,r,a,v),Za[1]=Rn(t,n,i,v);var p=Ms(so,Za);p<h&&(c=v,h=p)}h=1/0;for(var m=0;m<32&&!(f<r6);m++){var y=c-f,x=c+f;Za[0]=Rn(e,r,a,y),Za[1]=Rn(t,n,i,y);var p=Ms(Za,so);if(y>=0&&p<h)c=y,h=p;else{Wh[0]=Rn(e,r,a,x),Wh[1]=Rn(t,n,i,x);var b=Ms(Wh,so);x<=1&&b<h?(c=x,h=b):f*=.5}}return Rs(h)}function Wle(e,t,r,n,a,i,o){for(var l=e,s=t,c=0,f=1/o,h=1;h<=o;h++){var v=h*f,p=Rn(e,r,a,v),m=Rn(t,n,i,v),y=p-l,x=m-s;c+=Math.sqrt(y*y+x*x),l=p,s=m}return c}var qle=/cubic-bezier\(([0-9,\.e ]+)\)/;function vE(e){var t=e&&qle.exec(e);if(t){var r=t[1].split(","),n=+Ja(r[0]),a=+Ja(r[1]),i=+Ja(r[2]),o=+Ja(r[3]);if(isNaN(n+a+i+o))return;var l=[];return function(s){return s<=0?0:s>=1?1:BS(0,n,i,1,s,l)&&mn(0,a,o,1,l[0])}}}var Xle=(function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||ur,this.ondestroy=t.ondestroy||ur,this.onrestart=t.onrestart||ur,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,r){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,a=t-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,l=o?o(i):i;if(this.onframe(l),i===1)if(this.loop){var s=a%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Be(t)?t:og[t]||vE(t)},e})(),o6=(function(){function e(t){this.value=t}return e})(),Zle=(function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new o6(t);return this.insertEntry(r),r},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var r=t.prev,n=t.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e})(),ld=(function(){function e(t){this._list=new Zle,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,a=this._map,i=null;if(a[t]==null){var o=n.len(),l=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete a[s.key],i=s.value,this._lastRemovedEntry=s}l?l.value=r:l=new o6(r),l.key=t,n.insertEntry(l),a[t]=l}return i},e.prototype.get=function(t){var r=this._map[t],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e})(),PB={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 Di(e){return e=Math.round(e),e<0?0:e>255?255:e}function Kle(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ng(e){return e<0?0:e>1?1:e}function Kx(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Di(parseFloat(t)/100*255):Di(parseInt(t,10))}function dl(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ng(parseFloat(t)/100):Ng(parseFloat(t))}function _T(e,t,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?e+(t-e)*r*6:r*2<1?t:r*3<2?e+(t-e)*(2/3-r)*6:e}function Ss(e,t,r){return e+(t-e)*r}function Ha(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}function RM(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var l6=new ld(20),M0=null;function ch(e,t){M0&&RM(M0,t),M0=l6.put(e,M0||t.slice())}function Nn(e,t){if(e){t=t||[];var r=l6.get(e);if(r)return RM(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in PB)return RM(t,PB[n]),ch(e,t),t;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){Ha(t,0,0,0,1);return}return Ha(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),ch(e,t),t}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){Ha(t,0,0,0,1);return}return Ha(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),ch(e,t),t}return}var o=n.indexOf("("),l=n.indexOf(")");if(o!==-1&&l+1===a){var s=n.substr(0,o),c=n.substr(o+1,l-(o+1)).split(","),f=1;switch(s){case"rgba":if(c.length!==4)return c.length===3?Ha(t,+c[0],+c[1],+c[2],1):Ha(t,0,0,0,1);f=dl(c.pop());case"rgb":if(c.length>=3)return Ha(t,Kx(c[0]),Kx(c[1]),Kx(c[2]),c.length===3?f:dl(c[3])),ch(e,t),t;Ha(t,0,0,0,1);return;case"hsla":if(c.length!==4){Ha(t,0,0,0,1);return}return c[3]=dl(c[3]),EM(c,t),ch(e,t),t;case"hsl":if(c.length!==3){Ha(t,0,0,0,1);return}return EM(c,t),ch(e,t),t;default:return}}Ha(t,0,0,0,1)}}function EM(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=dl(e[1]),a=dl(e[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return t=t||[],Ha(t,Di(_T(o,i,r+1/3)*255),Di(_T(o,i,r)*255),Di(_T(o,i,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Qle(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=i-a,l=(i+a)/2,s,c;if(o===0)s=0,c=0;else{l<.5?c=o/(i+a):c=o/(2-i-a);var f=((i-t)/6+o/2)/o,h=((i-r)/6+o/2)/o,v=((i-n)/6+o/2)/o;t===i?s=v-h:r===i?s=1/3+f-v:n===i&&(s=2/3+h-f),s<0&&(s+=1),s>1&&(s-=1)}var p=[s*360,c,l];return e[3]!=null&&p.push(e[3]),p}}function VS(e,t){var r=Nn(e);if(r){for(var n=0;n<3;n++)t<0?r[n]=r[n]*(1-t)|0:r[n]=(255-r[n])*t+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ti(r,r.length===4?"rgba":"rgb")}}function Jle(e){var t=Nn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function lg(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=t[a],l=t[i],s=n-a;return r[0]=Di(Ss(o[0],l[0],s)),r[1]=Di(Ss(o[1],l[1],s)),r[2]=Di(Ss(o[2],l[2],s)),r[3]=Ng(Ss(o[3],l[3],s)),r}}var ese=lg;function pE(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),a=Math.floor(n),i=Math.ceil(n),o=Nn(t[a]),l=Nn(t[i]),s=n-a,c=ti([Di(Ss(o[0],l[0],s)),Di(Ss(o[1],l[1],s)),Di(Ss(o[2],l[2],s)),Ng(Ss(o[3],l[3],s))],"rgba");return r?{color:c,leftIndex:a,rightIndex:i,value:n}:c}}var tse=pE;function vl(e,t,r,n){var a=Nn(e);if(e)return a=Qle(a),t!=null&&(a[0]=Kle(Be(t)?t(a[0]):t)),r!=null&&(a[1]=dl(Be(r)?r(a[1]):r)),n!=null&&(a[2]=dl(Be(n)?n(a[2]):n)),ti(EM(a),"rgba")}function Lg(e,t){var r=Nn(e);if(r&&t!=null)return r[3]=Ng(t),ti(r,"rgba")}function ti(e,t){if(!(!e||!e.length)){var r=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(r+=","+e[3]),t+"("+r+")"}}function Ig(e,t){var r=Nn(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function rse(){return ti([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var jB=new ld(100);function FS(e){if(De(e)){var t=jB.get(e);return t||(t=VS(e,-.1),jB.put(e,t)),t}else if(wm(e)){var r=he({},e);return r.colorStops=xe(e.colorStops,function(n){return{offset:n.offset,color:VS(n.color,-.1)}}),r}return e}const nse=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:lg,fastMapToColor:ese,lerp:pE,lift:VS,liftColor:FS,lum:Ig,mapToColor:tse,modifyAlpha:Lg,modifyHSL:vl,parse:Nn,parseCssFloat:dl,parseCssInt:Kx,random:rse,stringify:ti,toHex:Jle},Symbol.toStringTag,{value:"Module"}));var GS=Math.round;function Og(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=Nn(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var BB=1e-4;function bs(e){return e<BB&&e>-BB}function R0(e){return GS(e*1e3)/1e3}function NM(e){return GS(e*1e4)/1e4}function ase(e){return"matrix("+R0(e[0])+","+R0(e[1])+","+R0(e[2])+","+R0(e[3])+","+NM(e[4])+","+NM(e[5])+")"}var ise={left:"start",right:"end",center:"middle",middle:"middle"};function ose(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function lse(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function sse(e){var t=e.style,r=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function s6(e){return e&&!!e.image}function use(e){return e&&!!e.svgElement}function gE(e){return s6(e)||use(e)}function u6(e){return e.type==="linear"}function c6(e){return e.type==="radial"}function f6(e){return e&&(e.type==="linear"||e.type==="radial")}function m_(e){return"url(#"+e+")"}function h6(e){var t=e.getGlobalScale(),r=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function d6(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*ng,a=Ie(e.scaleX,1),i=Ie(e.scaleY,1),o=e.skewX||0,l=e.skewY||0,s=[];return(t||r)&&s.push("translate("+t+"px,"+r+"px)"),n&&s.push("rotate("+n+")"),(a!==1||i!==1)&&s.push("scale("+a+","+i+")"),(o||l)&&s.push("skew("+GS(o*ng)+"deg, "+GS(l*ng)+"deg)"),s.join(" ")}var cse=(function(){return typeof Buffer<"u"&&typeof Buffer.from=="function"?function(e){return Buffer.from(e).toString("base64")}:typeof btoa=="function"&&typeof unescape=="function"&&typeof encodeURIComponent=="function"?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),LM=Array.prototype.slice;function nl(e,t,r){return(t-e)*r+e}function wT(e,t,r,n){for(var a=t.length,i=0;i<a;i++)e[i]=nl(t[i],r[i],n);return e}function fse(e,t,r,n){for(var a=t.length,i=a&&t[0].length,o=0;o<a;o++){e[o]||(e[o]=[]);for(var l=0;l<i;l++)e[o][l]=nl(t[o][l],r[o][l],n)}return e}function E0(e,t,r,n){for(var a=t.length,i=0;i<a;i++)e[i]=t[i]+r[i]*n;return e}function zB(e,t,r,n){for(var a=t.length,i=a&&t[0].length,o=0;o<a;o++){e[o]||(e[o]=[]);for(var l=0;l<i;l++)e[o][l]=t[o][l]+r[o][l]*n}return e}function hse(e,t){for(var r=e.length,n=t.length,a=r>n?t:e,i=Math.min(r,n),o=a[i-1]||{color:[0,0,0,0],offset:0},l=i;l<Math.max(r,n);l++)a.push({offset:o.offset,color:o.color.slice()})}function dse(e,t,r){var n=e,a=t;if(!(!n.push||!a.push)){var i=n.length,o=a.length;if(i!==o){var l=i>o;if(l)n.length=o;else for(var s=i;s<o;s++)n.push(r===1?a[s]:LM.call(a[s]))}for(var c=n[0]&&n[0].length,s=0;s<n.length;s++)if(r===1)isNaN(n[s])&&(n[s]=a[s]);else for(var f=0;f<c;f++)isNaN(n[s][f])&&(n[s][f]=a[s][f])}}function sg(e){if(Sn(e)){var t=e.length;if(Sn(e[0])){for(var r=[],n=0;n<t;n++)r.push(LM.call(e[n]));return r}return LM.call(e)}return e}function Qx(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],"rgba("+e.join(",")+")"}function vse(e){return Sn(e&&e[0])?2:1}var N0=0,Jx=1,v6=2,Gp=3,IM=4,OM=5,VB=6;function FB(e){return e===IM||e===OM}function L0(e){return e===Jx||e===v6}var sp=[0,0,0,0],pse=(function(){function e(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,r,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,l=VB,s=r;if(Sn(r)){var c=vse(r);l=c,(c===1&&!pt(r[0])||c===2&&!pt(r[0][0]))&&(o=!0)}else if(pt(r)&&!xn(r))l=N0;else if(De(r))if(!isNaN(+r))l=N0;else{var f=Nn(r);f&&(s=f,l=Gp)}else if(wm(r)){var h=he({},s);h.colorStops=xe(r.colorStops,function(p){return{offset:p.offset,color:Nn(p.color)}}),u6(r)?l=IM:c6(r)&&(l=OM),s=h}i===0?this.valType=l:(l!==this.valType||l===VB)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:s,rawValue:r,percent:0};return n&&(v.easing=n,v.easingFunc=Be(n)?n:og[n]||vE(n)),a.push(v),v},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(y,x){return y.time-x.time});for(var a=this.valType,i=n.length,o=n[i-1],l=this.discrete,s=L0(a),c=FB(a),f=0;f<i;f++){var h=n[f],v=h.value,p=o.value;h.percent=h.time/t,l||(s&&f!==i-1?dse(v,p,a):c&&hse(v.colorStops,p.colorStops))}if(!l&&a!==OM&&r&&this.needsAnimate()&&r.needsAnimate()&&a===r.valType&&!r._finished){this._additiveTrack=r;for(var m=n[0].value,f=0;f<i;f++)a===N0?n[f].additiveValue=n[f].value-m:a===Gp?n[f].additiveValue=E0([],n[f].value,m,-1):L0(a)&&(n[f].additiveValue=a===Jx?E0([],n[f].value,m,-1):zB([],n[f].value,m,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,a=n?"additiveValue":"value",i=this.valType,o=this.keyframes,l=o.length,s=this.propName,c=i===Gp,f,h=this._lastFr,v=Math.min,p,m;if(l===1)p=m=o[0];else{if(r<0)f=0;else if(r<this._lastFrP){var y=v(h+1,l-1);for(f=y;f>=0&&!(o[f].percent<=r);f--);f=v(f,l-2)}else{for(f=h;f<l&&!(o[f].percent>r);f++);f=v(f-1,l-2)}m=o[f+1],p=o[f]}if(p&&m){this._lastFr=f,this._lastFrP=r;var x=m.percent-p.percent,b=x===0?1:v((r-p.percent)/x,1);m.easingFunc&&(b=m.easingFunc(b));var w=n?this._additiveValue:c?sp:t[s];if((L0(i)||c)&&!w&&(w=this._additiveValue=[]),this.discrete)t[s]=b<1?p.rawValue:m.rawValue;else if(L0(i))i===Jx?wT(w,p[a],m[a],b):fse(w,p[a],m[a],b);else if(FB(i)){var C=p[a],A=m[a],M=i===IM;t[s]={type:M?"linear":"radial",x:nl(C.x,A.x,b),y:nl(C.y,A.y,b),colorStops:xe(C.colorStops,function(E,N){var L=A.colorStops[N];return{offset:nl(E.offset,L.offset,b),color:Qx(wT([],E.color,L.color,b))}}),global:A.global},M?(t[s].x2=nl(C.x2,A.x2,b),t[s].y2=nl(C.y2,A.y2,b)):t[s].r=nl(C.r,A.r,b)}else if(c)wT(w,p[a],m[a],b),n||(t[s]=Qx(w));else{var R=nl(p[a],m[a],b);n?this._additiveValue=R:t[s]=R}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,a=this._additiveValue;r===N0?t[n]=t[n]+a:r===Gp?(Nn(t[n],sp),E0(sp,sp,a,1),t[n]=Qx(sp)):r===Jx?E0(t[n],t[n],a,1):r===v6&&zB(t[n],t[n],a,1)},e})(),mE=(function(){function e(t,r,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&a){f_("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,r,n){return this.whenWithKeys(t,r,dt(r),n)},e.prototype.whenWithKeys=function(t,r,n,a){for(var i=this._tracks,o=0;o<n.length;o++){var l=n[o],s=i[l];if(!s){s=i[l]=new pse(l);var c=void 0,f=this._getAdditiveTrack(l);if(f){var h=f.keyframes,v=h[h.length-1];c=v&&v.value,f.valType===Gp&&c&&(c=Qx(c))}else c=this._target[l];if(c==null)continue;t>0&&s.addKeyframe(0,sg(c),a),this._trackKeys.push(l)}s.addKeyframe(t,sg(r[l]),a)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var r=t.length,n=0;n<r;n++)t[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,r=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,r)for(var n=0;n<r.length;n++)r[n].call(this)},e.prototype._setTracksFinished=function(){for(var t=this._tracks,r=this._trackKeys,n=0;n<r.length;n++)t[r[n]].setFinished()},e.prototype._getAdditiveTrack=function(t){var r,n=this._additiveAnimators;if(n)for(var a=0;a<n.length;a++){var i=n[a].getTrack(t);i&&(r=i)}return r},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var r=this,n=[],a=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],l=this._tracks[o],s=this._getAdditiveTrack(o),c=l.keyframes,f=c.length;if(l.prepare(a,s),l.needsAnimate())if(!this._allowDiscrete&&l.discrete){var h=c[f-1];h&&(r._target[l.propName]=h.rawValue),l.setFinished()}else n.push(l)}if(n.length||this._force){var v=new Xle({life:a,loop:this._loop,delay:this._delay||0,onframe:function(p){r._started=2;var m=r._additiveAnimators;if(m){for(var y=!1,x=0;x<m.length;x++)if(m[x]._clip){y=!0;break}y||(r._additiveAnimators=null)}for(var x=0;x<n.length;x++)n[x].step(r._target,p);var b=r._onframeCbs;if(b)for(var x=0;x<b.length;x++)b[x](r._target,p)},ondestroy:function(){r._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.setEasing(t)}else this._doneCallback();return this}},e.prototype.stop=function(t){if(this._clip){var r=this._clip;t&&r.onframe(1),this._abortedCallback()}},e.prototype.delay=function(t){return this._delay=t,this},e.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},e.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},e.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(t){return this._tracks[t]},e.prototype.getTracks=function(){var t=this;return xe(this._trackKeys,function(r){return t._tracks[r]})},e.prototype.stopTracks=function(t,r){if(!t.length||!this._clip)return!0;for(var n=this._tracks,a=this._trackKeys,i=0;i<t.length;i++){var o=n[t[i]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var l=!0,i=0;i<a.length;i++)if(!n[a[i]].isFinished()){l=!1;break}return l&&this._abortedCallback(),l},e.prototype.saveTo=function(t,r,n){if(t){r=r||this._trackKeys;for(var a=0;a<r.length;a++){var i=r[a],o=this._tracks[i];if(!(!o||o.isFinished())){var l=o.keyframes,s=l[n?0:l.length-1];s&&(t[i]=sg(s.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||dt(t);for(var n=0;n<r.length;n++){var a=r[n],i=this._tracks[a];if(i){var o=i.keyframes;if(o.length>1){var l=o.pop();i.addKeyframe(l.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e})();function Vh(){return new Date().getTime()}var gse=(function(e){ee(t,e);function t(r){var n=e.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 t.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},t.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(r){if(r.animation){var n=r.prev,a=r.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},t.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},t.prototype.update=function(r){for(var n=Vh()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,l=i.step(n,a);l&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,r||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(PS(n),!r._paused&&r.update())}PS(n)},t.prototype.start=function(){this._running||(this._time=Vh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Vh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Vh()-this._pauseStart,this._paused=!1)},t.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},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(r,n){n=n||{},this.start();var a=new mE(r,n.loop);return this.addAnimator(a),a},t})(fi),mse=300,CT=ht.domSupported,TT=(function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=xe(e,function(a){var i=a.replace("mouse","pointer");return r.hasOwnProperty(i)?i:a});return{mouse:e,touch:t,pointer:n}})(),GB={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},HB=!1;function kM(e){var t=e.pointerType;return t==="pen"||t==="touch"}function yse(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function AT(e){e&&(e.zrByTouch=!0)}function xse(e,t){return $a(e.dom,new Sse(e,t),!0)}function p6(e,t){for(var r=t,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==t&&r===e.painterRoot);)r=r.parentNode;return n}var Sse=(function(){function e(t,r){this.stopPropagation=ur,this.stopImmediatePropagation=ur,this.preventDefault=ur,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e})(),wi={mousedown:function(e){e=$a(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=$a(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=$a(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=$a(this.dom,e);var t=e.toElement||e.relatedTarget;p6(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){HB=!0,e=$a(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){HB||(e=$a(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=$a(this.dom,e),AT(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),wi.mousemove.call(this,e),wi.mousedown.call(this,e)},touchmove:function(e){e=$a(this.dom,e),AT(e),this.handler.processGesture(e,"change"),wi.mousemove.call(this,e)},touchend:function(e){e=$a(this.dom,e),AT(e),this.handler.processGesture(e,"end"),wi.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<mse&&wi.click.call(this,e)},pointerdown:function(e){wi.mousedown.call(this,e)},pointermove:function(e){kM(e)||wi.mousemove.call(this,e)},pointerup:function(e){wi.mouseup.call(this,e)},pointerout:function(e){kM(e)||wi.mouseout.call(this,e)}};B(["click","dblclick","contextmenu"],function(e){wi[e]=function(t){t=$a(this.dom,t),this.trigger(e,t)}});var PM={pointermove:function(e){kM(e)||PM.mousemove.call(this,e)},pointerup:function(e){PM.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function bse(e,t){var r=t.domHandlers;ht.pointerEventsSupported?B(TT.pointer,function(n){eS(t,n,function(a){r[n].call(e,a)})}):(ht.touchEventsSupported&&B(TT.touch,function(n){eS(t,n,function(a){r[n].call(e,a),yse(t)})}),B(TT.mouse,function(n){eS(t,n,function(a){a=dE(a),t.touching||r[n].call(e,a)})}))}function _se(e,t){ht.pointerEventsSupported?B(GB.pointer,r):ht.touchEventsSupported||B(GB.mouse,r);function r(n){function a(i){i=dE(i),p6(e,i.target)||(i=xse(e,i),t.domHandlers[n].call(e,i))}eS(t,n,a,{capture:!0})}}function eS(e,t,r,n){e.mounted[t]=r,e.listenerOpts[t]=n,TM(e.domTarget,t,r,n)}function DT(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&Ale(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var UB=(function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e})(),wse=(function(e){ee(t,e);function t(r,n){var a=e.call(this)||this;return a.__pointerCapturing=!1,a.dom=r,a.painterRoot=n,a._localHandlerScope=new UB(r,wi),CT&&(a._globalHandlerScope=new UB(document,PM)),bse(a,a._localHandlerScope),a}return t.prototype.dispose=function(){DT(this._localHandlerScope),CT&&DT(this._globalHandlerScope)},t.prototype.setCursor=function(r){this.dom.style&&(this.dom.style.cursor=r||"default")},t.prototype.__togglePointerCapture=function(r){if(this.__mayPointerCapture=null,CT&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?_se(this,n):DT(n)}},t})(fi),g6=1;ht.hasGlobalWindow&&(g6=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var HS=g6,jM=.4,BM="#333",zM="#ccc",Cse="#eee",YB=rf,$B=5e-5;function Iu(e){return e>$B||e<-$B}var Ou=[],fh=[],MT=lr(),RT=Math.abs,Ks=(function(){function e(){}return e.prototype.getLocalTransform=function(t){return zs(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Iu(this.rotation)||Iu(this.x)||Iu(this.y)||Iu(this.scaleX-1)||Iu(this.scaleY-1)||Iu(this.skewX)||Iu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(YB(n),this.invTransform=null);return}n=n||lr(),r?this.getLocalTransform(n):YB(n),t&&(r?ei(n,t,n):Bs(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||lr(),oi(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ou);var n=Ou[0]<0?-1:1,a=Ou[1]<0?-1:1,i=((Ou[0]-n)*r+n)/Ou[0]||0,o=((Ou[1]-a)*r+a)/Ou[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}},e.prototype.getComputedTransform=function(){for(var t=this,r=[];t;)r.push(t),t=t.parent;for(;t=r.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var r=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),r=Math.sqrt(r),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,r=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||lr(),ei(fh,t.invTransform,r),r=fh);var n=this.originX,a=this.originY;(n||a)&&(MT[4]=n,MT[5]=a,ei(fh,r,MT),fh[4]-=n,fh[5]-=a,r=fh),this.setLocalTransform(r)}},e.prototype.getGlobalScale=function(t){var r=this.transform;return t=t||[],r?(t[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),t[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(t[0]=-t[0]),r[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,r){var n=[t,r],a=this.invTransform;return a&&mr(n,n,a),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],a=this.transform;return a&&mr(n,n,a),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&RT(t[0]-1)>1e-10&&RT(t[3]-1)>1e-10?Math.sqrt(RT(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){wo(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,a=t.originY||0,i=t.scaleX,o=t.scaleY,l=t.anchorX,s=t.anchorY,c=t.rotation||0,f=t.x,h=t.y,v=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||a||l||s){var m=n+l,y=a+s;r[4]=-m*i-v*y*o,r[5]=-y*o-p*m*i}else r[4]=r[5]=0;return r[0]=i,r[3]=o,r[1]=p*i,r[2]=v*o,c&&Zs(r,r,c),r[4]+=n+f,r[5]+=a+h,r},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e})(),zs=Ks.getLocalTransform;function qh(){return new Ks}var wl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function wo(e,t){return VU(e,t,wl)}function go(e){I0||(I0=new ld(100)),e=e||bl;var t=I0.get(e);return t||(t={font:e,strWidthCache:new ld(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Yr.measureText("国",e).width,asciiCharWidth:Yr.measureText("a",e).width},I0.put(e,t)),t}var I0;function Tse(e){if(!(ET>=WB)){e=e||bl;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=Yr.measureText(String.fromCharCode(n),e).width;var a=+new Date-r;return a>16?ET=WB:a>2&&ET++,t}}var ET=0,WB=5;function m6(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=Tse(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function mo(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=Yr.measureText(t,e.font).width,r.put(t,n)),n}function qB(e,t,r,n){var a=mo(go(t),e),i=Am(t),o=sd(0,a,r),l=Sc(0,i,n),s=new Fe(o,l,a,i);return s}function y_(e,t,r,n){var a=((e||"")+"").split(`
35
+ `),i=a.length;if(i===1)return qB(a[0],t,r,n);for(var o=new Fe(0,0,0,0),l=0;l<a.length;l++){var s=qB(a[l],t,r,n);l===0?o.copy(s):o.union(s)}return o}function sd(e,t,r,n){return r==="right"?n?e+=t:e-=t:r==="center"&&(n?e+=t/2:e-=t/2),e}function Sc(e,t,r,n){return r==="middle"?n?e+=t/2:e-=t/2:r==="bottom"&&(n?e+=t:e-=t),e}function Am(e){return go(e).stWideCharWidth}function Co(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function US(e,t,r){var n=t.position||"inside",a=t.distance!=null?t.distance:5,i=r.height,o=r.width,l=i/2,s=r.x,c=r.y,f="left",h="top";if(n instanceof Array)s+=Co(n[0],r.width),c+=Co(n[1],r.height),f=null,h=null;else switch(n){case"left":s-=a,c+=l,f="right",h="middle";break;case"right":s+=a+o,c+=l,h="middle";break;case"top":s+=o/2,c-=a,f="center",h="bottom";break;case"bottom":s+=o/2,c+=i+a,f="center";break;case"inside":s+=o/2,c+=l,f="center",h="middle";break;case"insideLeft":s+=a,c+=l,h="middle";break;case"insideRight":s+=o-a,c+=l,f="right",h="middle";break;case"insideTop":s+=o/2,c+=a,f="center";break;case"insideBottom":s+=o/2,c+=i-a,f="center",h="bottom";break;case"insideTopLeft":s+=a,c+=a;break;case"insideTopRight":s+=o-a,c+=a,f="right";break;case"insideBottomLeft":s+=a,c+=i-a,h="bottom";break;case"insideBottomRight":s+=o-a,c+=i-a,f="right",h="bottom";break}return e=e||{},e.x=s,e.y=c,e.align=f,e.verticalAlign=h,e}var NT="__zr_normal__",LT=wl.concat(["ignore"]),Ase=ii(wl,function(e,t){return e[t]=!0,e},{ignore:!1}),hh={},Dse=new Fe(0,0,0,0),O0=[],tS=0,x_=1,S_=(function(){function e(t){this.id=uE(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=r.innerTransformable,o=void 0,l=void 0,s=!1;i.parent=a?this:null;var c=!1;i.copyTransform(r);var f=n.position!=null,h=n.autoOverflowArea,v=void 0;if((h||f)&&(v=Dse,n.layoutRect?v.copy(n.layoutRect):v.copy(this.getBoundingRect()),a||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(hh,n,v):US(hh,n,v),i.x=hh.x,i.y=hh.y,o=hh.align,l=hh.verticalAlign;var p=n.origin;if(p&&n.rotation!=null){var m=void 0,y=void 0;p==="center"?(m=v.width*.5,y=v.height*.5):(m=Co(p[0],v.width),y=Co(p[1],v.height)),c=!0,i.originX=-i.x+m+(a?0:v.x),i.originY=-i.y+y+(a?0:v.y)}}n.rotation!=null&&(i.rotation=n.rotation);var x=n.offset;x&&(i.x+=x[0],i.y+=x[1],c||(i.originX=-x[0],i.originY=-x[1]));var b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var w=b.overflowRect=b.overflowRect||new Fe(0,0,0,0);i.getLocalTransform(O0),oi(O0,O0),Fe.copy(w,v),w.applyTransform(O0)}else b.overflowRect=null;var C=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,A=void 0,M=void 0,R=void 0;C&&this.canBeInsideText()?(A=n.insideFill,M=n.insideStroke,(A==null||A==="auto")&&(A=this.getInsideTextFill()),(M==null||M==="auto")&&(M=this.getInsideTextStroke(A),R=!0)):(A=n.outsideFill,M=n.outsideStroke,(A==null||A==="auto")&&(A=this.getOutsideFill()),(M==null||M==="auto")&&(M=this.getOutsideStroke(A),R=!0)),A=A||"#000",(A!==b.fill||M!==b.stroke||R!==b.autoStroke||o!==b.align||l!==b.verticalAlign)&&(s=!0,b.fill=A,b.stroke=M,b.autoStroke=R,b.align=o,b.verticalAlign=l,r.setDefaultTextStyle(b)),r.__dirty|=ua,s&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?zM:BM},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Nn(r);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,ti(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},he(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Ve(t))for(var n=t,a=dt(n),i=0;i<a.length;i++){var o=a[i];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var r=this._normalState,n=0;n<this.animators.length;n++){var a=this.animators[n],i=a.__fromStateTransition;if(!(a.getLoop()||i&&i!==NT)){var o=a.targetName,l=o?r[o]:r;a.saveTo(l)}}},e.prototype._innerSaveToNormal=function(t){var r=this._normalState;r||(r=this._normalState={}),t.textConfig&&!r.textConfig&&(r.textConfig=this.textConfig),this._savePrimaryToNormal(t,r,LT)},e.prototype._savePrimaryToNormal=function(t,r,n){for(var a=0;a<n.length;a++){var i=n[a];t[i]!=null&&!(i in r)&&(r[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var r=this.states;return r[t]||(r[t]={}),r[t]},e.prototype.clearStates=function(t){this.useState(NT,!1,t)},e.prototype.useState=function(t,r,n,a){var i=t===NT,o=this.hasState();if(!(!o&&i)){var l=this.currentStates,s=this.stateTransition;if(!(qe(l,t)>=0&&(r||l.length===1))){var c;if(this.stateProxy&&!i&&(c=this.stateProxy(t)),c||(c=this.states&&this.states[t]),!c&&!i){f_("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(c);var f=this._textContent,h=XB(this,f,c,a);h&&!this.__inHover&&(this.__inHover=h),this._applyStateObj(t,c,this._normalState,r,KB(this,n,s),s);var v=this._textGuide;return f&&f.useState(t,r,n,!!h),v&&v.useState(t,r,n,!!h),i?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this.__inHover=tS,this.__dirty&=~ua),c}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,l=o===i.length;if(l){for(var s=0;s<o;s++)if(t[s]!==i[s]){l=!1;break}}if(l)return;for(var s=0;s<o;s++){var c=t[s],f=void 0;this.stateProxy&&(f=this.stateProxy(c,t)),f||(f=this.states[c]),f&&a.push(f)}var h=a[o-1],v=this._textContent,p=XB(this,v,h,n);p&&!this.__inHover&&(this.__inHover=p);var m=this._mergeStates(a),y=this.stateTransition;this.saveCurrentToNormalState(m),this._applyStateObj(t.join(","),m,this._normalState,!1,KB(this,r,y),y);var x=this._textGuide;v&&v.useStates(t,r,!!p),x&&x.useStates(t,r,!!p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this.__inHover=tS,this.__dirty&=~ua)}},e.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var r=t.__hostTarget;t=r?t.ignoreHostSilent?null:r:t.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var r=this.animators[t];r.targetName&&r.changeTarget(this[r.targetName])}},e.prototype.removeState=function(t){var r=qe(this.currentStates,t);if(r>=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},e.prototype.replaceState=function(t,r,n){var a=this.currentStates.slice(),i=qe(a,t),o=qe(a,r)>=0;i>=0?o?a.splice(i,1):a[i]=r:n&&!o&&a.push(r),this.useStates(a)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,a=0;a<t.length;a++){var i=t[a];he(r,i),i.textConfig&&(n=n||{},he(n,i.textConfig))}return n&&(r.textConfig=n),r},e.prototype._applyStateObj=function(t,r,n,a,i,o){if(this.__inHover!==x_){var l=!(r&&a);r&&r.textConfig?(this.textConfig=he({},a?this.textConfig:n.textConfig),he(this.textConfig,r.textConfig)):l&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,f=0;f<LT.length;f++){var h=LT[f],v=i&&Ase[h];r&&r[h]!=null?v?(c=!0,s[h]=r[h]):this[h]=r[h]:l&&n[h]!=null&&(v?(c=!0,s[h]=n[h]):this[h]=n[h])}if(!i)for(var f=0;f<this.animators.length;f++){var p=this.animators[f],m=p.targetName;p.getLoop()||p.__changeFinalValue(m?(r||n)[m]:r||n)}c&&this._transitionState(t,s,o)}},e.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var r=this.__zr;r&&t.addSelfToZr(r),t.__zr=r,t.__hostTarget=this}},e.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},e.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(t){var r=this._textContent;r!==t&&(r&&r!==t&&this.removeTextContent(),t.innerTransformable=new Ks,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),he(this.textConfig,t),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=ua;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.addAnimator(r[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var r=this.animators;if(r)for(var n=0;n<r.length;n++)t.animation.removeAnimator(r[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},e.prototype.animate=function(t,r,n){var a=t?this[t]:this,i=new mE(a,r,n);return t&&(i.targetName=t),this.addAnimator(i,t),i},e.prototype.addAnimator=function(t,r){var n=this.__zr,a=this;t.during(function(){a.updateDuringAnimation(r)}).done(function(){var i=a.animators,o=qe(i,t);o>=0&&i.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,r){for(var n=this.animators,a=n.length,i=[],o=0;o<a;o++){var l=n[o];!t||t===l.scope?l.stop(r):i.push(l)}return this.animators=i,this},e.prototype.animateTo=function(t,r,n){IT(this,t,r,n)},e.prototype.animateFrom=function(t,r,n){IT(this,t,r,n,!0)},e.prototype._transitionState=function(t,r,n,a){for(var i=IT(this,r,n,a),o=0;o<i.length;o++)i[o].__fromStateTransition=t},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=tS,t.__dirty=ua;function r(n,a,i,o){Object.defineProperty(t,n,{get:function(){if(!this[a]){var s=this[a]=[];l(this,s)}return this[a]},set:function(s){this[i]=s[0],this[o]=s[1],this[a]=s,l(this,s)}});function l(s,c){Object.defineProperty(c,0,{get:function(){return s[i]},set:function(f){s[i]=f}}),Object.defineProperty(c,1,{get:function(){return s[o]},set:function(f){s[o]=f}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))})(),e})();Cr(S_,fi);Cr(S_,Ks);function IT(e,t,r,n,a){r=r||{};var i=[];y6(e,"",e,t,r,n,i,a);var o=i.length,l=!1,s=r.done,c=r.aborted,f=function(){l=!0,o--,o<=0&&(l?s&&s():c&&c())},h=function(){o--,o<=0&&(l?s&&s():c&&c())};o||s&&s(),i.length>0&&r.during&&i[0].during(function(m,y){r.during(y)});for(var v=0;v<i.length;v++){var p=i[v];f&&p.done(f),h&&p.aborted(h),r.force&&p.duration(r.duration),p.start(r.easing)}return i}function OT(e,t,r){for(var n=0;n<r;n++)e[n]=t[n]}function Mse(e){return Sn(e[0])}function Rse(e,t,r){if(Sn(t[r]))if(Sn(e[r])||(e[r]=[]),$n(t[r])){var n=t[r].length;e[r].length!==n&&(e[r]=new t[r].constructor(n),OT(e[r],t[r],n))}else{var a=t[r],i=e[r],o=a.length;if(Mse(a))for(var l=a[0].length,s=0;s<o;s++)i[s]?OT(i[s],a[s],l):i[s]=Array.prototype.slice.call(a[s]);else OT(i,a,o);i.length=a.length}else e[r]=t[r]}function Ese(e,t){return e===t||Sn(e)&&Sn(t)&&Nse(e,t)}function Nse(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function y6(e,t,r,n,a,i,o,l){for(var s=dt(n),c=a.duration,f=a.delay,h=a.additive,v=a.setToFinal,p=!Ve(i),m=e.animators,y=[],x=0;x<s.length;x++){var b=s[x],w=n[b];if(w!=null&&r[b]!=null&&(p||i[b]))if(Ve(w)&&!Sn(w)&&!wm(w)){if(t){l||(r[b]=w,e.updateDuringAnimation(t));continue}y6(e,b,r[b],w,a,i&&i[b],o,l)}else y.push(b);else l||(r[b]=w,e.updateDuringAnimation(t),y.push(b))}var C=y.length;if(!h&&C)for(var A=0;A<m.length;A++){var M=m[A];if(M.targetName===t){var R=M.stopTracks(y);if(R){var E=qe(m,M);m.splice(E,1)}}}if(a.force||(y=Bt(y,function(I){return!Ese(n[I],r[I])}),C=y.length),C>0||a.force&&!o.length){var N=void 0,L=void 0,O=void 0;if(l){L={},v&&(N={});for(var A=0;A<C;A++){var b=y[A];L[b]=r[b],v?N[b]=n[b]:r[b]=n[b]}}else if(v){O={};for(var A=0;A<C;A++){var b=y[A];O[b]=sg(r[b]),Rse(r,n,b)}}var M=new mE(r,!1,!1,h?Bt(m,function(z){return z.targetName===t}):null);M.targetName=t,a.scope&&(M.scope=a.scope),v&&N&&M.whenWithKeys(0,N,y),O&&M.whenWithKeys(0,O,y),M.whenWithKeys(c??500,l?L:n,y).delay(f||0),e.addAnimator(M,t),o.push(M)}}function XB(e,t,r,n){return!(r&&r.hoverLayer||n)||ZB(e)||t&&ZB(t)?tS:x_}function ZB(e){return e.type==="text"||e.type==="tspan"}function KB(e,t,r){return!t&&!e.__inHover&&r&&r.duration>0}var ze=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(r){return this._children[r]},t.prototype.childOfName=function(r){for(var n=this._children,a=0;a<n.length;a++)if(n[a].name===r)return n[a]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(r){return r&&r!==this&&r.parent!==this&&(this._children.push(r),this._doAdd(r)),this},t.prototype.addBefore=function(r,n){if(r&&r!==this&&r.parent!==this&&n&&n.parent===this){var a=this._children,i=a.indexOf(n);i>=0&&(a.splice(i,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var a=qe(this._children,r);return a>=0&&this.replaceAt(n,a),this},t.prototype.replaceAt=function(r,n){var a=this._children,i=a[n];if(r&&r!==this&&r.parent!==this&&r!==i){a[n]=r,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(r)}return this},t.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()},t.prototype.remove=function(r){var n=this.__zr,a=this._children,i=qe(a,r);return i<0?this:(a.splice(i,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,a=0;a<r.length;a++){var i=r[a];n&&i.removeSelfFromZr(n),i.parent=null}return r.length=0,this},t.prototype.eachChild=function(r,n){for(var a=this._children,i=0;i<a.length;i++){var o=a[i];r.call(n,o,i)}return this},t.prototype.traverse=function(r,n){for(var a=0;a<this._children.length;a++){var i=this._children[a],o=r.call(n,i);i.isGroup&&!o&&i.traverse(r,n)}return this},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.addSelfToZr(r)}},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var a=this._children[n];a.removeSelfFromZr(r)}},t.prototype.getBoundingRect=function(r){for(var n=new Fe(0,0,0,0),a=r||this._children,i=[],o=null,l=0;l<a.length;l++){var s=a[l];if(!(s.ignore||s.invisible)){var c=s.getBoundingRect(),f=s.getLocalTransform(i);f?(Fe.applyTransform(n,c,f),o=o||n.clone(),o.union(n)):(o=o||c.clone(),o.union(c))}}return o||n},t})(S_);ze.prototype.type="group";var rS={},vc={};function Lse(e){delete vc[e]}function Ise(e){if(!e)return!1;if(typeof e=="string")return Ig(e,1)<jM;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,a=0;a<n;a++)r+=Ig(t[a].color,1);return r/=n,r<jM}return!1}var Ose=(function(){function e(t,r,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var i=new Gle,o=n.renderer||"canvas";rS[o]||(o=dt(rS)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var l=new rS[o](r,i,n,t),s=n.ssr||l.ssrOnly;this.storage=i,this.painter=l;var c=!ht.node&&!ht.worker&&!s?new wse(l.getViewportRoot(),l.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?ht.touchEventsSupported:!!f,v=44,p;h&&(p=Ie(n.pointerSize,v)),this.handler=new JU(i,l,c,l.root,p),this.animation=new gse({stage:{update:s?null:function(){return a._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh())},e.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=Ise(t))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(t){var r,n=Vh(),a=this._needsRefresh,i=this._needsRefreshHover;(a||i)&&(r=!0,this._refresh({animUpdate:t,refresh:a,refreshHover:i}));var o=Vh();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){if(!this._disposed)return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this._disposed||this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this._disposed||this.handler.off(t,r)},e.prototype.trigger=function(t,r){this._disposed||this.handler.trigger(t,r)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof ze&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.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,Lse(this.id))},e})();function VM(e,t){var r=new Ose(uE(),e,t);return vc[r.id]=r,r}function kse(e){e.dispose()}function Pse(){for(var e in vc)vc.hasOwnProperty(e)&&vc[e].dispose();vc={}}function jse(e){return vc[e]}function x6(e,t){rS[e]=t}var FM;function S6(e){if(typeof FM=="function")return FM(e)}function b6(e){FM=e}var Bse="6.1.0";const zse=Object.freeze(Object.defineProperty({__proto__:null,dispose:kse,disposeAll:Pse,getElementSSRData:S6,getInstance:jse,init:VM,registerPainter:x6,registerSSRDataGetter:b6,version:Bse},Symbol.toStringTag,{value:"Module"}));var QB=1e-4,YS=20,Vse=14;function Fse(e){return e.replace(/^\s+|\s+$/g,"")}var kt=Math.min,st=Math.max,sr=Math.abs,To=Math.round,li=Math.floor,nf=Math.ceil,af=Math.pow,Ec=Math.log,kg=Math.LN10,$S=Math.PI,Gse=Math.random;function St(e,t,r,n){var a=t[0],i=t[1],o=r[0],l=r[1],s=i-a,c=l-o;if(s===0)return c===0?o:(o+l)/2;if(n)if(s>0){if(e<=a)return o;if(e>=i)return l}else{if(e>=a)return o;if(e<=i)return l}else{if(e===a)return o;if(e===i)return l}return(e-a)/s*c+o}var Re=Hse;function Hse(e,t,r){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return WS(e,t,r)}function WS(e,t,r){return De(e)?_6(e)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function Use(e){return De(e)&&_6(e)}function _6(e){return!!Fse(e).match(/%$/)}function xt(e,t,r){return isNaN(t)?r?""+e:+e:(t=kt(st(0,t),YS),e=(+e).toFixed(t),r?e:+e)}function Yse(e,t,r){return t==null&&(t=10),xt(e,t,r)}function nn(e){return e.sort(function(t,r){return t-r}),e}function co(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(To(e*t)/t===e)return r}return w6(e)}function w6(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,a=r>0?r:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return st(0,o-n)}function $se(e,t){var r=li(Ec(e[1]-e[0])/kg),n=To(Ec(sr(t[1]-t[0]))/kg),a=kt(st(-r+n,0),YS);return isFinite(a)?a:YS}function yE(e,t,r){var n=sr(e[1]-e[0]);if(!isFinite(n)||n===0)return NaN;var a=Ec(2*sr(r||1)*sr(n))/kg,i=Ec(sr(t))/kg,o=st(0,nf(-a+i));return isFinite(o)||(o=NaN),o}function Wse(e,t,r){if(!e[t])return 0;var n=C6(e,r);return n[t]||0}function C6(e,t){var r=ii(e,function(p,m){return p+(isNaN(m)?0:m)},0);if(r===0)return[];for(var n=af(10,t),a=xe(e,function(p){return(isNaN(p)?0:p)/r*n*100}),i=n*100,o=xe(a,function(p){return li(p)}),l=ii(o,function(p,m){return p+m},0),s=xe(a,function(p,m){return p-o[m]});l<i;){for(var c=Number.NEGATIVE_INFINITY,f=null,h=0,v=s.length;h<v;++h)s[h]>c&&(c=s[h],f=h);++o[f],s[f]=0,++l}return xe(o,function(p){return p/n})}function rc(e,t){var r=st(co(e),co(t)),n=e+t;return r>YS?n:xt(n,r)}var Pg=af(2,53)-1;function xE(e){var t=$S*2;return(e%t+t)%t}function Nc(e){return e>-QB&&e<QB}var qse=/^(?:(\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 Lo(e){if(e instanceof Date)return e;if(De(e)){var t=qse.exec(e);if(!t)return new Date(NaN);if(t[8]){var r=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(r-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,r,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(To(e))}function SE(e){return af(10,b_(e))}function b_(e){if(e===0)return 0;var t=li(Ec(e)/kg);return e/af(10,t)>=10&&t++,t}var T6=2;function __(e,t){var r=b_(e),n=af(10,r),a=e/n,i;return t===T6?i=1:t?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,e=i*n,xt(e,-r)}function nS(e,t){var r=(e.length-1)*t+1,n=li(r),a=+e[n-1],i=r-n;return i?a+i*(e[n]-a):a}function GM(e){e.sort(function(s,c){return l(s,c,0)?-1:1});for(var t=-1/0,r=1,n=0;n<e.length;){for(var a=e[n].interval,i=e[n].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,i[o]=o?1:1-r),t=a[o],r=i[o];a[0]===a[1]&&i[0]*i[1]!==1?e.splice(n,1):n++}return e;function l(s,c,f){return s.interval[f]<c.interval[f]||s.interval[f]===c.interval[f]&&(s.close[f]-c.close[f]===(f?-1:1)||!f&&l(s,c,1))}}function Ao(e){var t=parseFloat(e);return t==e&&(t!==0||!De(e)||e.indexOf("x")<=0)?t:NaN}function bE(e){return!isNaN(Ao(e))}function _E(){return To(Gse()*9)}function A6(e,t){return t===0?e:A6(t,e%t)}function JB(e,t){return e==null?t:t==null?e:e*t/A6(e,t)}function si(e){return e!=null&&isFinite(e)}var Xse="[ECharts] ",Zse=typeof console<"u"&&console.warn&&console.log;function Kse(e,t,r){Zse&&console[e](Xse+t)}function D6(e,t){Kse("error",e)}function wt(e){throw new Error(e)}function ez(e,t,r){return(t-e)*r+e}var M6="series\0",R6="\0_ec_\0";function ar(e){return e instanceof Array?e:e==null?[]:[e]}function Lc(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,a=r.length;n<a;n++){var i=r[n];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}var tz=["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 Id(e){return Ve(e)&&!pe(e)&&!(e instanceof Date)?e.value:e}function Qse(e){return Ve(e)&&!(e instanceof Array)}function E6(e,t,r){var n=r==="normalMerge",a=r==="replaceMerge",i=r==="replaceAll";e=e||[],t=(t||[]).slice();var o=Le();B(t,function(s,c){if(!Ve(s)){t[c]=null;return}});var l=Jse(e,o,r);return(n||a)&&eue(l,e,o,t),n&&tue(l,t),n||a?rue(l,t,a):i&&nue(l,t),aue(l),l}function Jse(e,t,r){var n=[];if(r==="replaceAll")return n;for(var a=0;a<e.length;a++){var i=e[a];i&&i.id!=null&&t.set(i.id,a),n.push({existing:r==="replaceMerge"||jg(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function eue(e,t,r,n){B(n,function(a,i){if(!(!a||a.id==null)){var o=ug(a.id),l=r.get(o);if(l!=null){var s=e[l];In(!s.newOption,'Duplicated option on id "'+o+'".'),s.newOption=a,s.existing=t[l],n[i]=null}}})}function tue(e,t){B(t,function(r,n){if(!(!r||r.name==null))for(var a=0;a<e.length;a++){var i=e[a].existing;if(!e[a].newOption&&i&&(i.id==null||r.id==null)&&!jg(r)&&!jg(i)&&N6("name",i,r)){e[a].newOption=r,t[n]=null;return}}})}function rue(e,t,r){B(t,function(n){if(n){for(var a,i=0;(a=e[i])&&(a.newOption||jg(a.existing)||a.existing&&n.id!=null&&!N6("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=r):e.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),i++}})}function nue(e,t){B(t,function(r){e.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function aue(e){var t=Le();B(e,function(r){var n=r.existing;n&&t.set(n.id,r)}),B(e,function(r){var n=r.newOption;In(!n||n.id==null||!t.get(n.id)||t.get(n.id)===r,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,r),!r.keyInfo&&(r.keyInfo={})}),B(e,function(r,n){var a=r.existing,i=r.newOption,o=r.keyInfo;if(Ve(i)){if(o.name=i.name!=null?ug(i.name):a?a.name:M6+n,a)o.id=ug(a.id);else if(i.id!=null)o.id=ug(i.id);else{var l=0;do o.id="\0"+o.name+"\0"+l++;while(t.get(o.id))}t.set(o.id,r)}})}function N6(e,t,r){var n=kr(t[e],null),a=kr(r[e],null);return n!=null&&a!=null&&n===a}function ug(e){return kr(e,"")}function kr(e,t){return e==null?t:De(e)?e:pt(e)||LS(e)?e+"":t}function wE(e){var t=e.name;return!!(t&&t.indexOf(M6))}function jg(e){return e&&e.id!=null&&ug(e.id).indexOf(R6)===0}function iue(e){return R6+e}function oue(e,t,r){B(e,function(n){var a=n.newOption;Ve(a)&&(n.keyInfo.mainType=t,n.keyInfo.subType=lue(t,a,n.existing,r))})}function lue(e,t,r,n){var a=t.type?t.type:r?r.subType:n.determineSubType(e,t);return a}function sue(e,t){var r={},n={};return a(e||[],r),a(t||[],n,r),[i(r),i(n)];function a(o,l,s){for(var c=0,f=o.length;c<f;c++){var h=kr(o[c].seriesId,null);if(h==null)return;for(var v=ar(o[c].dataIndex),p=s&&s[h],m=0,y=v.length;m<y;m++){var x=v[m];p&&p[x]?p[x]=null:(l[h]||(l[h]={}))[x]=1}}}function i(o,l){var s=[];for(var c in o)if(o.hasOwnProperty(c)&&o[c]!=null)if(l)s.push(+c);else{var f=i(o[c],!0);f.length&&s.push({seriesId:c,dataIndex:f})}return s}}function Ic(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return pe(t.dataIndex)?xe(t.dataIndex,function(r){return e.indexOfRawIndex(r)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return pe(t.name)?xe(t.name,function(r){return e.indexOfName(r)}):e.indexOfName(t.name)}function it(){var e="__ec_inner_"+uue++;return function(t){return t[e]||(t[e]={})}}var uue=_E();function cg(e,t,r){var n=CE(t,r),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,l=o,s=r?r.defaultMainType:null;return!a&&s&&i.set(s,{}),i.each(function(c,f){var h=Od(e,f,c,{useDefault:s===f,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});l[f+"Models"]=h.models,l[f+"Model"]=h.models[0]}),l}function CE(e,t){var r;if(De(e)){var n={};n[e+"Index"]=0,r=n}else r=e;var a=Le(),i={},o=!1;return B(r,function(l,s){if(s==="dataIndex"||s==="dataIndexInside"){i[s]=l;return}var c=s.match(/^(\w+)(Index|Id|Name)$/)||[],f=c[1],h=(c[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&qe(t.includeMainTypes,f)<0)){o=o||!!f;var v=a.get(f)||a.set(f,{});v[h]=l}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var dr={useDefault:!0,enableAll:!1,enableNone:!1},cue={useDefault:!1,enableAll:!0,enableNone:!0};function Od(e,t,r,n){n=n||dr;var a=r.index,i=r.id,o=r.name,l={models:null,specified:a!=null||i!=null||o!=null};if(!l.specified){var s=void 0;return l.models=n.useDefault&&(s=e.getComponent(t))?[s]:[],l}if(a==="none"||a===!1){if(n.enableNone)return l.models=[],l;a=-1}return a==="all"&&(n.enableAll?a=i=o=null:a=-1),l.models=e.queryComponents({mainType:t,index:a,id:i,name:o}),l}function TE(e,t,r){var n={};n[t+"Id"]=e[t+"Id"],n[t+"Index"]=e[t+"Index"],n[t+"Name"]=e[t+"Name"];var a={mainType:t,query:n};return r&&(a.subType=r),a}function L6(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function fue(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function hue(e){return e==="auto"?ht.domSupported?"html":"richText":e||"html"}function HM(e,t){var r=Le(),n=[];return B(e,function(a){var i=t(a);(r.get(i)||(n.push(i),r.set(i,[]))).push(a)}),{keys:n,buckets:r}}function I6(e,t,r,n,a){var i=t==null||t==="auto";if(n==null)return n;if(pt(n)){var o=ez(r||0,n,a);return xt(o,i?Math.max(co(r||0),co(n)):t)}else{if(De(n))return a<1?r:n;for(var l=[],s=r,c=n,f=Math.max(s?s.length:0,c.length),h=0;h<f;++h){var v=e.getDimensionInfo(h);if(v&&v.type==="ordinal")l[h]=(a<1&&s?s:c)[h];else{var p=s&&s[h]?s[h]:0,m=c[h],o=ez(p,m,a);l[h]=xt(o,i?Math.max(co(p),co(m)):t)}}return l}}var Es=(function(){function e(){}return e.prototype.reset=function(t,r,n,a){return this._list=t,this._step=a=a||1,this._idx=r,this._end=n??(a>0?t.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},e})();function kT(e){e.option=e.parentModel=e.ecModel=null}function yn(){return[1/0,-1/0]}function UM(e,t){Cl(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function O6(e,t){Cl(t)&&t<e[0]&&(e[0]=t)}function k6(e,t){Cl(t)&&t>e[1]&&(e[1]=t)}function due(e,t){ud(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function Cl(e){return e!=null&&isFinite(e)}function ud(e,t){return Cl(e)&&Cl(t)&&e<=t}function vue(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function aS(e){ud(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function kd(){var e="__ec_once_"+pue++;return function(t,r){Ne(t,e)||(t[e]=1,r())}}var pue=_E();function w_(e,t,r){var n=Le(),a=0;B(e,function(i){var o=t(i),l=n.get(o)||0;r&&r(i,l),!l&&!r&&(e[a++]=i),n.set(o,l+1)}),r||(e.length=a)}function gue(e){return e.value+""}function mue(e){return e+""}function yo(e,t){return Ie(t,!0)?e.seriesIndex+2:0}function P6(e,t,r){var n=e.getData().count();return{progressiveRender:r.progressiveEnabled&&t.incrementalPrepareRender&&n>=r.threshold,large:e.get("large")&&n>=e.get("largeThreshold"),modDataCount:e.get("progressiveChunkMode")==="mod"?e.getData().count():null}}function zr(e,t){return{seriesType:e,overallReset:t}}function Dm(e){return{overallReset:e}}var yue=".",ku="___EC__COMPONENT__CONTAINER___",j6="___EC__EXTENDED_CLASS___";function fo(e){var t={main:"",sub:""};if(e){var r=e.split(yue);t.main=r[0]||"",t.sub=r[1]||""}return t}function xue(e){In(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function Sue(e){return!!(e&&e[j6])}function AE(e,t){e.$constructor=e,e.extend=function(r){var n=this,a;return bue(n)?a=(function(i){ee(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(r.$constructor||n).apply(this,arguments)},cE(a,this)),he(a.prototype,r),a[j6]=!0,a.extend=this.extend,a.superCall=Cue,a.superApply=Tue,a.superClass=n,a}}function bue(e){return Be(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function B6(e,t){e.extend=t.extend}var _ue=Math.round(Math.random()*10);function wue(e){var t=["__\0is_clz",_ue++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function Cue(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.superClass.prototype[t].apply(e,r)}function Tue(e,t,r){return this.superClass.prototype[t].apply(e,r)}function C_(e){var t={};e.registerClass=function(n){var a=n.type||n.prototype.type;if(a){xue(a),n.prototype.type=a;var i=fo(a);if(!i.sub)t[i.main]=n;else if(i.sub!==ku){var o=r(i);o[i.sub]=n}}return n},e.getClass=function(n,a,i){var o=t[n];if(o&&o[ku]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},e.getClassesByMainType=function(n){var a=fo(n),i=[],o=t[a.main];return o&&o[ku]?B(o,function(l,s){s!==ku&&i.push(l)}):i.push(o),i},e.hasClass=function(n){var a=fo(n);return!!t[a.main]},e.getAllClassMainTypes=function(){var n=[];return B(t,function(a,i){n.push(i)}),n},e.hasSubTypes=function(n){var a=fo(n),i=t[a.main];return i&&i[ku]};function r(n){var a=t[n.main];return(!a||!a[ku])&&(a=t[n.main]={},a[ku]=!0),a}}function Oc(e,t){for(var r=0;r<e.length;r++)e[r][1]||(e[r][1]=e[r][0]);return t=t||!1,function(n,a,i){for(var o={},l=0;l<e.length;l++){var s=e[l][1];if(!(a&&qe(a,s)>=0||i&&qe(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(o[e[l][0]]=c)}}return o}}var Aue=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Due=Oc(Aue),Mue=(function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return Due(this,t,r)},e})(),YM=new ld(50);function Rue(e){if(typeof e=="string"){var t=YM.get(e);return t&&t.image}else return e}function DE(e,t,r,n,a){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var i=YM.get(e),o={hostEl:r,cb:n,cbPayload:a};return i?(t=i.image,!T_(t)&&i.pending.push(o)):(t=Yr.loadImage(e,rz,rz),t.__zrImageSrc=e,YM.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function rz(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var r=e.pending[t],n=r.cb;n&&n(this,r.cbPayload),r.hostEl.dirty()}e.pending.length=0}function T_(e){return e&&e.width&&e.height}var PT=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Eue(e,t,r,n,a){var i={};return z6(i,e,t,r,n,a),i.text}function z6(e,t,r,n,a,i){if(!r){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
36
+ `);i=V6(r,n,a,i);for(var l=!1,s={},c=0,f=o.length;c<f;c++)F6(s,o[c],i),o[c]=s.textLine,l=l||s.isTruncated;e.text=o.join(`
37
+ `),e.isTruncated=l}function V6(e,t,r,n){n=n||{};var a=he({},n);r=Ie(r,"..."),a.maxIterations=Ie(n.maxIterations,2);var i=a.minChar=Ie(n.minChar,0),o=a.fontMeasureInfo=go(t),l=o.asciiCharWidth;a.placeholder=Ie(n.placeholder,"");for(var s=e=Math.max(0,e-1),c=0;c<i&&s>=l;c++)s-=l;var f=mo(o,r);return f>s&&(r="",f=0),s=e-f,a.ellipsis=r,a.ellipsisWidth=f,a.contentWidth=s,a.containerWidth=e,a}function F6(e,t,r){var n=r.containerWidth,a=r.contentWidth,i=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=mo(i,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var l=0;;l++){if(o<=a||l>=r.maxIterations){t+=r.ellipsis;break}var s=l===0?Nue(t,a,i):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,s),o=mo(i,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function Nue(e,t,r){for(var n=0,a=0,i=e.length;a<i&&n<t;a++)n+=m6(r,e.charCodeAt(a));return a}function Lue(e,t,r,n){var a=ME(e),i=t.overflow,o=t.padding,l=o?o[1]+o[3]:0,s=o?o[0]+o[2]:0,c=t.font,f=i==="truncate",h=Am(c),v=Ie(t.lineHeight,h),p=t.lineOverflow==="truncate",m=!1,y=t.width;y==null&&r!=null&&(y=r-l);var x=t.height;x==null&&n!=null&&(x=n-s);var b;y!=null&&(i==="break"||i==="breakAll")?b=a?G6(a,t.font,y,i==="breakAll",0).lines:[]:b=a?a.split(`
38
+ `):[];var w=b.length*v;if(x==null&&(x=w),w>x&&p){var C=Math.floor(x/v);m=m||b.length>C,b=b.slice(0,C),w=b.length*v}if(a&&f&&y!=null)for(var A=V6(y,c,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),M={},R=0;R<b.length;R++)F6(M,b[R],A),b[R]=M.textLine,m=m||M.isTruncated;for(var E=x,N=0,L=go(c),R=0;R<b.length;R++)N=Math.max(mo(L,b[R]),N);y==null&&(y=N);var O=y;return E+=s,O+=l,{lines:b,height:x,outerWidth:O,outerHeight:E,lineHeight:v,calculatedLineHeight:h,contentWidth:N,contentHeight:w,width:y,isTruncated:m}}var Iue=(function(){function e(){}return e})(),nz=(function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e})(),Oue=(function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e})();function kue(e,t,r,n,a){var i=new Oue,o=ME(e);if(!o)return i;var l=t.padding,s=l?l[1]+l[3]:0,c=l?l[0]+l[2]:0,f=t.width;f==null&&r!=null&&(f=r-s);var h=t.height;h==null&&n!=null&&(h=n-c);for(var v=t.overflow,p=(v==="break"||v==="breakAll")&&f!=null?{width:f,accumWidth:0,breakAll:v==="breakAll"}:null,m=PT.lastIndex=0,y;(y=PT.exec(o))!=null;){var x=y.index;x>m&&jT(i,o.substring(m,x),t,p),jT(i,y[2],t,p,y[1]),m=PT.lastIndex}m<o.length&&jT(i,o.substring(m,o.length),t,p);var b=[],w=0,C=0,A=v==="truncate",M=t.lineOverflow==="truncate",R={};function E(se,ge,ue){se.width=ge,se.lineHeight=ue,w+=ue,C=Math.max(C,ge)}e:for(var N=0;N<i.lines.length;N++){for(var L=i.lines[N],O=0,I=0,z=0;z<L.tokens.length;z++){var V=L.tokens[z],Y=V.styleName&&t.rich[V.styleName]||{},H=V.textPadding=Y.padding,F=H?H[1]+H[3]:0,X=V.font=Y.font||t.font;V.contentHeight=Am(X);var P=Ie(Y.height,V.contentHeight);if(V.innerHeight=P,H&&(P+=H[0]+H[2]),V.height=P,V.lineHeight=ca(Y.lineHeight,t.lineHeight,P),V.align=Y&&Y.align||a,V.verticalAlign=Y&&Y.verticalAlign||"middle",M&&h!=null&&w+V.lineHeight>h){var q=i.lines.length;z>0?(L.tokens=L.tokens.slice(0,z),E(L,I,O),i.lines=i.lines.slice(0,N+1)):i.lines=i.lines.slice(0,N),i.isTruncated=i.isTruncated||i.lines.length<q;break e}var G=Y.width,W=G==null||G==="auto";if(typeof G=="string"&&G.charAt(G.length-1)==="%")V.percentWidth=G,b.push(V),V.contentWidth=mo(go(X),V.text);else{if(W){var Z=Y.backgroundColor,Q=Z&&Z.image;Q&&(Q=Rue(Q),T_(Q)&&(V.width=Math.max(V.width,Q.width*P/Q.height)))}var U=A&&f!=null?f-I:null;U!=null&&U<V.width?!W||U<F?(V.text="",V.width=V.contentWidth=0):(z6(R,V.text,U-F,X,t.ellipsis,{minChar:t.truncateMinChar}),V.text=R.text,i.isTruncated=i.isTruncated||R.isTruncated,V.width=V.contentWidth=mo(go(X),V.text)):V.contentWidth=mo(go(X),V.text)}V.width+=F,I+=V.width,Y&&(O=Math.max(O,V.lineHeight))}E(L,I,O)}i.outerWidth=i.width=Ie(f,C),i.outerHeight=i.height=Ie(h,w),i.contentHeight=w,i.contentWidth=C,i.outerWidth+=s,i.outerHeight+=c;for(var N=0;N<b.length;N++){var V=b[N],K=V.percentWidth;V.width=parseInt(K,10)/100*i.width}return i}function jT(e,t,r,n,a){var i=t==="",o=a&&r.rich[a]||{},l=e.lines,s=o.font||r.font,c=!1,f,h;if(n){var v=o.padding,p=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var m=Co(o.width,n.width)+p;l.length>0&&m+n.accumWidth>n.width&&(f=t.split(`
39
+ `),c=!0),n.accumWidth=m}else{var y=G6(t,s,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+p,h=y.linesWidths,f=y.lines}}f||(f=t.split(`
40
+ `));for(var x=go(s),b=0;b<f.length;b++){var w=f[b],C=new Iue;if(C.styleName=a,C.text=w,C.isLineHolder=!w&&!i,typeof o.width=="number"?C.width=o.width:C.width=h?h[b]:mo(x,w),!b&&!c){var A=(l[l.length-1]||(l[0]=new nz)).tokens,M=A.length;M===1&&A[0].isLineHolder?A[0]=C:(w||!M||i)&&A.push(C)}else l.push(new nz([C]))}}function Pue(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var jue=ii(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Bue(e){return Pue(e)?!!jue[e]:!0}function G6(e,t,r,n,a){for(var i=[],o=[],l="",s="",c=0,f=0,h=go(t),v=0;v<e.length;v++){var p=e.charAt(v);if(p===`
41
+ `){s&&(l+=s,f+=c),i.push(l),o.push(f),l="",s="",c=0,f=0;continue}var m=m6(h,p.charCodeAt(0)),y=n?!1:!Bue(p);if(i.length?f+m>r:a+f+m>r){f?(l||s)&&(y?(l||(l=s,s="",c=0,f=c),i.push(l),o.push(f-c),s+=p,c+=m,l="",f=c):(s&&(l+=s,s="",c=0),i.push(l),o.push(f),l=p,f=m)):y?(i.push(s),o.push(c),s=p,c=m):(i.push(p),o.push(m));continue}f+=m,y?(s+=p,c+=m):(s&&(l+=s,s="",c=0),l+=p)}return s&&(l+=s),l&&(i.push(l),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}function az(e,t,r,n,a,i){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,l=t.height*2;Fe.set(iz,sd(r,o,a),Sc(n,l,i),o,l),Fe.intersect(t,iz,null,oz);var s=oz.outIntersectRect;e.outerWidth=s.width,e.outerHeight=s.height,e.baseX=sd(s.x,s.width,a,!0),e.baseY=Sc(s.y,s.height,i,!0)}}var iz=new Fe(0,0,0,0),oz={outIntersectRect:{},clamp:!0};function ME(e){return e!=null?e+="":e=""}function zue(e){var t=ME(e.text),r=e.font,n=mo(go(r),t),a=Am(r);return $M(e,n,a,null)}function $M(e,t,r,n){var a=new Fe(sd(e.x||0,t,e.textAlign),Sc(e.y||0,r,e.textBaseline),t,r),i=n??(H6(e)?e.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function H6(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var WM="__zr_style_"+Math.round(Math.random()*10),bc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},A_={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bc[WM]=!0;var lz=["z","z2","invisible"],Vue=["invisible"],Ni=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=dt(r),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(r[i]):e.prototype.attrKV.call(this,i,r[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(r){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Fue(this,r,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths&&this.__clipPaths.length){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var s=this.parent;s;){if(s.ignore)return!1;s=s.parent}return!0},t.prototype.contain=function(r,n){return this.rectContain(r,n)},t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.rectContain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,l=i.shadowOffsetX||0,s=i.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Fe(0,0,0,0)),n?Fe.applyTransform(r,a,n):r.copy(a),(o||l||s)&&(r.width+=o*2+Math.abs(l),r.height+=o*2+Math.abs(s),r.x=Math.min(r.x,r.x+l-o),r.y=Math.min(r.y,r.y+s-o));var c=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-c),r.y=Math.floor(r.y-c),r.width=Math.ceil(r.width+1+c*2),r.height=Math.ceil(r.height+1+c*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Fe(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,n){r!=="style"?e.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:he(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Fp,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Fp)},t.prototype.styleUpdated=function(){this.__dirty&=~Fp},t.prototype.createStyle=function(r){return Tm(bc,r)},t.prototype.useStyle=function(r){r[WM]||(r=this.createStyle(r)),this.style=r,this.dirtyStyle()},t.prototype._useHoverStyle=function(r){this.__hoverStyle=r},t.prototype.isStyleObject=function(r){return r[WM]},t.prototype._innerSaveToNormal=function(r){e.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,lz)},t.prototype._applyStateObj=function(r,n,a,i,o,l){e.prototype._applyStateObj.call(this,r,n,a,i,o,l);var s=!(n&&i),c=this.__inHover===x_,f;if(n&&n.style?o?i?f=n.style:(f=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(f,n.style)):(f=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(f,n.style)):s&&(f=a.style),f)if(o){var h=this.style;if(this.style=this.createStyle(s?{}:h),s)for(var v=dt(h),p=0;p<v.length;p++){var m=v[p];m in f&&(f[m]=f[m],this.style[m]=h[m])}for(var y=dt(f),p=0;p<y.length;p++){var m=y[p];this.style[m]=this.style[m]}this._transitionState(r,{style:f},l,this.getAnimationStyleProps())}else c?this._useHoverStyle(f):this.useStyle(f);if(!c)for(var x=this.__inHover?Vue:lz,p=0;p<x.length;p++){var m=x[p];n&&n[m]!=null?this[m]=n[m]:s&&a[m]!=null&&(this[m]=a[m])}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),a,i=0;i<r.length;i++){var o=r[i];o.style&&(a=a||{},this._mergeStyle(a,o.style))}return a&&(n.style=a),n},t.prototype._mergeStyle=function(r,n){return he(r,n),r},t.prototype.getAnimationStyleProps=function(){return A_},t.initDefaultProps=(function(){var r=t.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=0,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=ua|Fp})(),t})(S_),BT=new Fe(0,0,0,0),zT=new Fe(0,0,0,0);function Fue(e,t,r){return BT.copy(e.getBoundingRect()),e.transform&&BT.applyTransform(e.transform),zT.width=t,zT.height=r,!BT.intersect(zT)}var la=Math.min,sa=Math.max,VT=Math.sin,FT=Math.cos,Pu=Math.PI*2,k0=Xs(),P0=Xs(),j0=Xs();function U6(e,t,r){if(e.length!==0){for(var n=e[0],a=n[0],i=n[0],o=n[1],l=n[1],s=1;s<e.length;s++)n=e[s],a=la(a,n[0]),i=sa(i,n[0]),o=la(o,n[1]),l=sa(l,n[1]);t[0]=a,t[1]=o,r[0]=i,r[1]=l}}function sz(e,t,r,n,a,i){a[0]=la(e,r),a[1]=la(t,n),i[0]=sa(e,r),i[1]=sa(t,n)}var uz=[],cz=[];function Gue(e,t,r,n,a,i,o,l,s,c){var f=a6,h=mn,v=f(e,r,a,o,uz);s[0]=1/0,s[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var p=0;p<v;p++){var m=h(e,r,a,o,uz[p]);s[0]=la(m,s[0]),c[0]=sa(m,c[0])}v=f(t,n,i,l,cz);for(var p=0;p<v;p++){var y=h(t,n,i,l,cz[p]);s[1]=la(y,s[1]),c[1]=sa(y,c[1])}s[0]=la(e,s[0]),c[0]=sa(e,c[0]),s[0]=la(o,s[0]),c[0]=sa(o,c[0]),s[1]=la(t,s[1]),c[1]=sa(t,c[1]),s[1]=la(l,s[1]),c[1]=sa(l,c[1])}function Hue(e,t,r,n,a,i,o,l){var s=i6,c=Rn,f=sa(la(s(e,r,a),1),0),h=sa(la(s(t,n,i),1),0),v=c(e,r,a,f),p=c(t,n,i,h);o[0]=la(e,a,v),o[1]=la(t,i,p),l[0]=sa(e,a,v),l[1]=sa(t,i,p)}function Uue(e,t,r,n,a,i,o,l,s){var c=ul,f=cl,h=Math.abs(a-i);if(h%Pu<1e-4&&h>1e-4){l[0]=e-r,l[1]=t-n,s[0]=e+r,s[1]=t+n;return}if(k0[0]=FT(a)*r+e,k0[1]=VT(a)*n+t,P0[0]=FT(i)*r+e,P0[1]=VT(i)*n+t,c(l,k0,P0),f(s,k0,P0),a=a%Pu,a<0&&(a=a+Pu),i=i%Pu,i<0&&(i=i+Pu),a>i&&!o?i+=Pu:a<i&&o&&(a+=Pu),o){var v=i;i=a,a=v}for(var p=0;p<i;p+=Math.PI/2)p>a&&(j0[0]=FT(p)*r+e,j0[1]=VT(p)*n+t,c(l,j0,l),f(s,j0,s))}var Yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ju=[],Bu=[],Ki=[],as=[],Qi=[],Ji=[],GT=Math.min,HT=Math.max,zu=Math.cos,Vu=Math.sin,Ko=Math.abs,qM=Math.PI,ds=qM*2,UT=typeof Float32Array<"u",up=[];function YT(e){var t=Math.round(e/qM*1e8)/1e8;return t%2*qM}function D_(e,t){var r=YT(e[0]);r<0&&(r+=ds);var n=r-e[0],a=e[1];a+=n,!t&&a-r>=ds?a=r+ds:t&&r-a>=ds?a=r-ds:!t&&r>a?a=r+(ds-YT(r-a)):t&&r<a&&(a=r-(ds-YT(a-r))),e[0]=r,e[1]=a}var Vs=(function(){function e(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(t,r,n){n=n||0,n>0&&(this._ux=Ko(n/HS/t)||0,this._uy=Ko(n/HS/r)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,r){return this._drawPendingPt(),this.addData(Yt.M,t,r),this._ctx&&this._ctx.moveTo(t,r),this._x0=t,this._y0=r,this._xi=t,this._yi=r,this},e.prototype.lineTo=function(t,r){var n=Ko(t-this._xi),a=Ko(r-this._yi),i=n>this._ux||a>this._uy;if(this.addData(Yt.L,t,r),this._ctx&&i&&this._ctx.lineTo(t,r),i)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,a,i,o){return this._drawPendingPt(),this.addData(Yt.C,t,r,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,a,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,a){return this._drawPendingPt(),this.addData(Yt.Q,t,r,n,a),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,a),this._xi=n,this._yi=a,this},e.prototype.arc=function(t,r,n,a,i,o){this._drawPendingPt(),up[0]=a,up[1]=i,D_(up,o),a=up[0],i=up[1];var l=i-a;return this.addData(Yt.A,t,r,n,n,a,l,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,a,i,o),this._xi=zu(i)*n+t,this._yi=Vu(i)*n+r,this},e.prototype.arcTo=function(t,r,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,a,i),this},e.prototype.rect=function(t,r,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,a),this.addData(Yt.R,t,r,n,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Yt.Z);var t=this._ctx,r=this._x0,n=this._y0;return t&&t.closePath(),this._xi=r,this._yi=n,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){if(this._saveData){var r=t.length;!(this.data&&this.data.length===r)&&UT&&(this.data=new Float32Array(r));for(var n=0;n<r;n++)this.data[n]=t[n];this._len=r}},e.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var r=t.length,n=0,a=this._len,i=0;i<r;i++)n+=t[i].len();var o=this.data;if(UT&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(a+n),a>0&&o))for(var l=0;l<a;l++)this.data[l]=o[l];for(var i=0;i<r;i++)for(var s=t[i].data,l=0;l<s.length;l++)this.data[a++]=s[l];this._len=a}},e.prototype.addData=function(t,r,n,a,i,o,l,s,c){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],r=0;r<this._len;r++)t[r]=this.data[r];this.data=t}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,UT&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Ki[0]=Ki[1]=Qi[0]=Qi[1]=Number.MAX_VALUE,as[0]=as[1]=Ji[0]=Ji[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,a=0,i=0,o;for(o=0;o<this._len;){var l=t[o++],s=o===1;switch(s&&(r=t[o],n=t[o+1],a=r,i=n),l){case Yt.M:r=a=t[o++],n=i=t[o++],Qi[0]=a,Qi[1]=i,Ji[0]=a,Ji[1]=i;break;case Yt.L:sz(r,n,t[o],t[o+1],Qi,Ji),r=t[o++],n=t[o++];break;case Yt.C:Gue(r,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Qi,Ji),r=t[o++],n=t[o++];break;case Yt.Q:Hue(r,n,t[o++],t[o++],t[o],t[o+1],Qi,Ji),r=t[o++],n=t[o++];break;case Yt.A:var c=t[o++],f=t[o++],h=t[o++],v=t[o++],p=t[o++],m=t[o++]+p;o+=1;var y=!t[o++];s&&(a=zu(p)*h+c,i=Vu(p)*v+f),Uue(c,f,h,v,p,m,y,Qi,Ji),r=zu(m)*h+c,n=Vu(m)*v+f;break;case Yt.R:a=r=t[o++],i=n=t[o++];var x=t[o++],b=t[o++];sz(a,i,a+x,i+b,Qi,Ji);break;case Yt.Z:r=a,n=i;break}ul(Ki,Ki,Qi),cl(as,as,Ji)}return o===0&&(Ki[0]=Ki[1]=as[0]=as[1]=0),new Fe(Ki[0],Ki[1],as[0]-Ki[0],as[1]-Ki[1])},e.prototype._calculateLength=function(){var t=this.data,r=this._len,n=this._ux,a=this._uy,i=0,o=0,l=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var c=this._pathSegLen,f=0,h=0,v=0;v<r;){var p=t[v++],m=v===1;m&&(i=t[v],o=t[v+1],l=i,s=o);var y=-1;switch(p){case Yt.M:i=l=t[v++],o=s=t[v++];break;case Yt.L:{var x=t[v++],b=t[v++],w=x-i,C=b-o;(Ko(w)>n||Ko(C)>a||v===r-1)&&(y=Math.sqrt(w*w+C*C),i=x,o=b);break}case Yt.C:{var A=t[v++],M=t[v++],x=t[v++],b=t[v++],R=t[v++],E=t[v++];y=Ule(i,o,A,M,x,b,R,E,10),i=R,o=E;break}case Yt.Q:{var A=t[v++],M=t[v++],x=t[v++],b=t[v++];y=Wle(i,o,A,M,x,b,10),i=x,o=b;break}case Yt.A:var N=t[v++],L=t[v++],O=t[v++],I=t[v++],z=t[v++],V=t[v++],Y=V+z;v+=1,m&&(l=zu(z)*O+N,s=Vu(z)*I+L),y=HT(O,I)*GT(ds,Math.abs(V)),i=zu(Y)*O+N,o=Vu(Y)*I+L;break;case Yt.R:{l=i=t[v++],s=o=t[v++];var H=t[v++],F=t[v++];y=H*2+F*2;break}case Yt.Z:{var w=l-i,C=s-o;y=Math.sqrt(w*w+C*C),i=l,o=s;break}}y>=0&&(c[h++]=y,f+=y)}return this._pathLen=f,f},e.prototype.rebuildPath=function(t,r){var n=this.data,a=this._ux,i=this._uy,o=this._len,l,s,c,f,h,v,p=r<1,m,y,x=0,b=0,w,C=0,A,M;if(!(p&&(this._pathSegLen||this._calculateLength(),m=this._pathSegLen,y=this._pathLen,w=r*y,!w)))e:for(var R=0;R<o;){var E=n[R++],N=R===1;switch(N&&(c=n[R],f=n[R+1],l=c,s=f),E!==Yt.L&&C>0&&(t.lineTo(A,M),C=0),E){case Yt.M:l=c=n[R++],s=f=n[R++],t.moveTo(c,f);break;case Yt.L:{h=n[R++],v=n[R++];var L=Ko(h-c),O=Ko(v-f);if(L>a||O>i){if(p){var I=m[b++];if(x+I>w){var z=(w-x)/I;t.lineTo(c*(1-z)+h*z,f*(1-z)+v*z);break e}x+=I}t.lineTo(h,v),c=h,f=v,C=0}else{var V=L*L+O*O;V>C&&(A=h,M=v,C=V)}break}case Yt.C:{var Y=n[R++],H=n[R++],F=n[R++],X=n[R++],P=n[R++],q=n[R++];if(p){var I=m[b++];if(x+I>w){var z=(w-x)/I;zS(c,Y,F,P,z,ju),zS(f,H,X,q,z,Bu),t.bezierCurveTo(ju[1],Bu[1],ju[2],Bu[2],ju[3],Bu[3]);break e}x+=I}t.bezierCurveTo(Y,H,F,X,P,q),c=P,f=q;break}case Yt.Q:{var Y=n[R++],H=n[R++],F=n[R++],X=n[R++];if(p){var I=m[b++];if(x+I>w){var z=(w-x)/I;Eg(c,Y,F,z,ju),Eg(f,H,X,z,Bu),t.quadraticCurveTo(ju[1],Bu[1],ju[2],Bu[2]);break e}x+=I}t.quadraticCurveTo(Y,H,F,X),c=F,f=X;break}case Yt.A:var G=n[R++],W=n[R++],Z=n[R++],Q=n[R++],U=n[R++],K=n[R++],se=n[R++],ge=!n[R++],ue=Z>Q?Z:Q,de=Ko(Z-Q)>.001,me=U+K,ae=!1;if(p){var I=m[b++];x+I>w&&(me=U+K*(w-x)/I,ae=!0),x+=I}if(de&&t.ellipse?t.ellipse(G,W,Z,Q,se,U,me,ge):t.arc(G,W,ue,U,me,ge),ae)break e;N&&(l=zu(U)*Z+G,s=Vu(U)*Q+W),c=zu(me)*Z+G,f=Vu(me)*Q+W;break;case Yt.R:l=c=n[R],s=f=n[R+1],h=n[R++],v=n[R++];var ye=n[R++],nt=n[R++];if(p){var I=m[b++];if(x+I>w){var be=w-x;t.moveTo(h,v),t.lineTo(h+GT(be,ye),v),be-=ye,be>0&&t.lineTo(h+ye,v+GT(be,nt)),be-=nt,be>0&&t.lineTo(h+HT(ye-be,0),v+nt),be-=ye,be>0&&t.lineTo(h,v+HT(nt-be,0));break e}x+=I}t.rect(h,v,ye,nt);break;case Yt.Z:if(p){var I=m[b++];if(x+I>w){var z=(w-x)/I;t.lineTo(c*(1-z)+l*z,f*(1-z)+s*z);break e}x+=I}t.closePath(),c=l,f=s}}},e.prototype.clone=function(){var t=new e,r=this.data;return t.data=r.slice?r.slice():Array.prototype.slice.call(r),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Yt,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e})();function gs(e,t,r,n,a,i,o){if(a===0)return!1;var l=a,s=0,c=e;if(o>t+l&&o>n+l||o<t-l&&o<n-l||i>e+l&&i>r+l||i<e-l&&i<r-l)return!1;if(e!==r)s=(t-n)/(e-r),c=(e*n-r*t)/(e-r);else return Math.abs(i-e)<=l/2;var f=s*i-o+c,h=f*f/(s*s+1);return h<=l/2*l/2}function Yue(e,t,r,n,a,i,o,l,s,c,f){if(s===0)return!1;var h=s;if(f>t+h&&f>n+h&&f>i+h&&f>l+h||f<t-h&&f<n-h&&f<i-h&&f<l-h||c>e+h&&c>r+h&&c>a+h&&c>o+h||c<e-h&&c<r-h&&c<a-h&&c<o-h)return!1;var v=Hle(e,t,r,n,a,i,o,l,c,f);return v<=h/2}function Y6(e,t,r,n,a,i,o,l,s){if(o===0)return!1;var c=o;if(s>t+c&&s>n+c&&s>i+c||s<t-c&&s<n-c&&s<i-c||l>e+c&&l>r+c&&l>a+c||l<e-c&&l<r-c&&l<a-c)return!1;var f=$le(e,t,r,n,a,i,l,s);return f<=c/2}var fz=Math.PI*2;function _s(e){return e%=fz,e<0&&(e+=fz),e}var cp=Math.PI*2;function $ue(e,t,r,n,a,i,o,l,s){if(o===0)return!1;var c=o;l-=e,s-=t;var f=Math.sqrt(l*l+s*s);if(f-c>r||f+c<r)return!1;if(Math.abs(n-a)%cp<1e-4)return!0;if(i){var h=n;n=_s(a),a=_s(h)}else n=_s(n),a=_s(a);n>a&&(a+=cp);var v=Math.atan2(s,l);return v<0&&(v+=cp),v>=n&&v<=a||v+cp>=n&&v+cp<=a}function al(e,t,r,n,a,i){if(i>t&&i>n||i<t&&i<n||n===t)return 0;var o=(i-t)/(n-t),l=n<t?1:-1;(o===1||o===0)&&(l=n<t?.5:-.5);var s=o*(r-e)+e;return s===a?1/0:s>a?l:0}var is=Vs.CMD,Fu=Math.PI*2,Wue=1e-4;function que(e,t){return Math.abs(e-t)<Wue}var zn=[-1,-1,-1],qa=[-1,-1];function Xue(){var e=qa[0];qa[0]=qa[1],qa[1]=e}function Zue(e,t,r,n,a,i,o,l,s,c){if(c>t&&c>n&&c>i&&c>l||c<t&&c<n&&c<i&&c<l)return 0;var f=BS(t,n,i,l,c,zn);if(f===0)return 0;for(var h=0,v=-1,p=void 0,m=void 0,y=0;y<f;y++){var x=zn[y],b=x===0||x===1?.5:1,w=mn(e,r,a,o,x);w<s||(v<0&&(v=a6(t,n,i,l,qa),qa[1]<qa[0]&&v>1&&Xue(),p=mn(t,n,i,l,qa[0]),v>1&&(m=mn(t,n,i,l,qa[1]))),v===2?x<qa[0]?h+=p<t?b:-b:x<qa[1]?h+=m<p?b:-b:h+=l<m?b:-b:x<qa[0]?h+=p<t?b:-b:h+=l<p?b:-b)}return h}function Kue(e,t,r,n,a,i,o,l){if(l>t&&l>n&&l>i||l<t&&l<n&&l<i)return 0;var s=Yle(t,n,i,l,zn);if(s===0)return 0;var c=i6(t,n,i);if(c>=0&&c<=1){for(var f=0,h=Rn(t,n,i,c),v=0;v<s;v++){var p=zn[v]===0||zn[v]===1?.5:1,m=Rn(e,r,a,zn[v]);m<o||(zn[v]<c?f+=h<t?p:-p:f+=i<h?p:-p)}return f}else{var p=zn[0]===0||zn[0]===1?.5:1,m=Rn(e,r,a,zn[0]);return m<o?0:i<t?p:-p}}function Que(e,t,r,n,a,i,o,l){if(l-=t,l>r||l<-r)return 0;var s=Math.sqrt(r*r-l*l);zn[0]=-s,zn[1]=s;var c=Math.abs(n-a);if(c<1e-4)return 0;if(c>=Fu-1e-4){n=0,a=Fu;var f=i?1:-1;return o>=zn[0]+e&&o<=zn[1]+e?f:0}if(n>a){var h=n;n=a,a=h}n<0&&(n+=Fu,a+=Fu);for(var v=0,p=0;p<2;p++){var m=zn[p];if(m+e>o){var y=Math.atan2(l,m),f=i?1:-1;y<0&&(y=Fu+y),(y>=n&&y<=a||y+Fu>=n&&y+Fu<=a)&&(y>Math.PI/2&&y<Math.PI*1.5&&(f=-f),v+=f)}}return v}function $6(e,t,r,n,a){for(var i=e.data,o=e.len(),l=0,s=0,c=0,f=0,h=0,v,p,m=0;m<o;){var y=i[m++],x=m===1;switch(y===is.M&&m>1&&(r||(l+=al(s,c,f,h,n,a))),x&&(s=i[m],c=i[m+1],f=s,h=c),y){case is.M:f=i[m++],h=i[m++],s=f,c=h;break;case is.L:if(r){if(gs(s,c,i[m],i[m+1],t,n,a))return!0}else l+=al(s,c,i[m],i[m+1],n,a)||0;s=i[m++],c=i[m++];break;case is.C:if(r){if(Yue(s,c,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],t,n,a))return!0}else l+=Zue(s,c,i[m++],i[m++],i[m++],i[m++],i[m],i[m+1],n,a)||0;s=i[m++],c=i[m++];break;case is.Q:if(r){if(Y6(s,c,i[m++],i[m++],i[m],i[m+1],t,n,a))return!0}else l+=Kue(s,c,i[m++],i[m++],i[m],i[m+1],n,a)||0;s=i[m++],c=i[m++];break;case is.A:var b=i[m++],w=i[m++],C=i[m++],A=i[m++],M=i[m++],R=i[m++];m+=1;var E=!!(1-i[m++]);v=Math.cos(M)*C+b,p=Math.sin(M)*A+w,x?(f=v,h=p):l+=al(s,c,v,p,n,a);var N=(n-b)*A/C+b;if(r){if($ue(b,w,A,M,M+R,E,t,N,a))return!0}else l+=Que(b,w,A,M,M+R,E,N,a);s=Math.cos(M+R)*C+b,c=Math.sin(M+R)*A+w;break;case is.R:f=s=i[m++],h=c=i[m++];var L=i[m++],O=i[m++];if(v=f+L,p=h+O,r){if(gs(f,h,v,h,t,n,a)||gs(v,h,v,p,t,n,a)||gs(v,p,f,p,t,n,a)||gs(f,p,f,h,t,n,a))return!0}else l+=al(v,h,v,p,n,a),l+=al(f,p,f,h,n,a);break;case is.Z:if(r){if(gs(s,c,f,h,t,n,a))return!0}else l+=al(s,c,f,h,n,a);s=f,c=h;break}}return!r&&!que(c,h)&&(l+=al(s,c,f,h,n,a)||0),l!==0}function Jue(e,t,r){return $6(e,0,!1,t,r)}function ece(e,t,r,n){return $6(e,t,!0,r,n)}var qS=Ue({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bc),tce={style:Ue({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},A_.style)},$T=wl.concat(["invisible","culling","z","z2","zlevel","parent"]),yt=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.update=function(){var r=this;e.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(s){r.buildPath(s,r.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var l=0;l<$T.length;++l)a[$T[l]]=this[$T[l]];a.__dirty|=ua}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var n=dt(r);this.shape=this.getDefaultShape();var a=this.getDefaultStyle();a&&this.useStyle(a);for(var i=0;i<n.length;i++){var o=n[i],l=r[o];o==="style"?this.style?he(this.style,l):this.useStyle(l):o==="shape"?he(this.shape,l):e.prototype.attrKV.call(this,o,l)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var r=this.style.fill;if(r!=="none"){if(De(r)){var n=Ig(r,0);return n>.5?BM:n>.2?Cse:zM}else if(r)return zM}return BM},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(De(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Ig(r,0)<jM;if(i===o)return n}},t.prototype.buildPath=function(r,n,a){},t.prototype.pathUpdated=function(){this.__dirty&=~Nh},t.prototype.getUpdatedPathProxy=function(r){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,r),this.path},t.prototype.createPathProxy=function(){this.path=new Vs(!1)},t.prototype.hasStroke=function(){var r=this.style,n=r.stroke;return!(n==null||n==="none"||!(r.lineWidth>0))},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,a=!r;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Nh)&&(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 l=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||a){l.copy(r);var s=n.strokeNoScale?this.getLineScale():1,c=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;c=Math.max(c,f??4)}s>1e-10&&(l.width+=c/s,l.height+=c/s,l.x-=c/s/2,l.y-=c/s/2)}return l}return r},t.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect(),o=this.style;if(r=a[0],n=a[1],i.contain(r,n)){var l=this.path;if(this.hasStroke()){var s=o.lineWidth,c=o.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),ece(l,s/c,r,n)))return!0}if(this.hasFill())return Jue(l,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Nh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(r){return this.animate("shape",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):e.prototype.attrKV.call(this,r,n)},t.prototype.setShape=function(r,n){var a=this.shape;return a||(a=this.shape={}),typeof r=="string"?a[r]=n:he(a,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Nh)},t.prototype.createStyle=function(r){return Tm(qS,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=he({},this.shape))},t.prototype._applyStateObj=function(r,n,a,i,o,l){if(e.prototype._applyStateObj.call(this,r,n,a,i,o,l),this.__inHover!==x_){var s=!(n&&i),c;if(n&&n.shape?o?i?c=n.shape:(c=he({},a.shape),he(c,n.shape)):(c=he({},i?this.shape:a.shape),he(c,n.shape)):s&&(c=a.shape),c)if(o){this.shape=he({},this.shape);for(var f={},h=dt(c),v=0;v<h.length;v++){var p=h[v];typeof c[p]=="object"?this.shape[p]=c[p]:f[p]=c[p]}this._transitionState(r,{shape:f},l)}else this.shape=c,this.dirtyShape()}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),a,i=0;i<r.length;i++){var o=r[i];o.shape&&(a=a||{},this._mergeStyle(a,o.shape))}return a&&(n.shape=a),n},t.prototype.getAnimationStyleProps=function(){return tce},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var n=(function(i){ee(o,i);function o(l){var s=i.call(this,l)||this;return r.init&&r.init.call(s,l),s}return o.prototype.getDefaultStyle=function(){return je(r.style)},o.prototype.getDefaultShape=function(){return je(r.shape)},o})(t);for(var a in r)typeof r[a]=="function"&&(n.prototype[a]=r[a]);return n},t.initDefaultProps=(function(){var r=t.prototype;r.type="path",r.strokeContainThreshold=5,r.segmentIgnoreThreshold=0,r.subPixelOptimize=!1,r.autoBatch=!1,r.__dirty=ua|Fp|Nh})(),t})(Ni),rce=Ue({strokeFirst:!0,font:bl,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},qS),cd=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return H6(this.style)},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return Tm(rce,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=zue(this.style)),this._rect},t.initDefaultProps=(function(){var r=t.prototype;r.dirtyRectTolerance=10})(),t})(Ni);cd.prototype.type="tspan";var nce=Ue({x:0,y:0},bc),ace={style:Ue({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},A_.style)};function ice(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Xr=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return Tm(nce,r)},t.prototype._getSize=function(r){var n=this.style,a=n[r];if(a!=null)return a;var i=ice(n.image)?n.image:this.__image;if(!i)return 0;var o=r==="width"?"height":"width",l=n[o];return l==null?i[r]:i[r]/i[o]*l},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return ace},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Fe(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t})(Ni);Xr.prototype.type="image";function oce(e,t){var r=t.x,n=t.y,a=t.width,i=t.height,o=t.r,l,s,c,f;a<0&&(r=r+a,a=-a),i<0&&(n=n+i,i=-i),typeof o=="number"?l=s=c=f=o:o instanceof Array?o.length===1?l=s=c=f=o[0]:o.length===2?(l=c=o[0],s=f=o[1]):o.length===3?(l=o[0],s=f=o[1],c=o[2]):(l=o[0],s=o[1],c=o[2],f=o[3]):l=s=c=f=0;var h;l+s>a&&(h=l+s,l*=a/h,s*=a/h),c+f>a&&(h=c+f,c*=a/h,f*=a/h),s+c>i&&(h=s+c,s*=i/h,c*=i/h),l+f>i&&(h=l+f,l*=i/h,f*=i/h),e.moveTo(r+l,n),e.lineTo(r+a-s,n),s!==0&&e.arc(r+a-s,n+s,s,-Math.PI/2,0),e.lineTo(r+a,n+i-c),c!==0&&e.arc(r+a-c,n+i-c,c,0,Math.PI/2),e.lineTo(r+f,n+i),f!==0&&e.arc(r+f,n+i-f,f,Math.PI/2,Math.PI),e.lineTo(r,n+l),l!==0&&e.arc(r+l,n+l,l,Math.PI,Math.PI*1.5),e.closePath()}var Fh=Math.round;function W6(e,t,r){if(t){var n=t.x1,a=t.x2,i=t.y1,o=t.y2;e.x1=n,e.x2=a,e.y1=i,e.y2=o;var l=r&&r.lineWidth;return l&&(Fh(n*2)===Fh(a*2)&&(e.x1=e.x2=Ca(n,l,!0)),Fh(i*2)===Fh(o*2)&&(e.y1=e.y2=Ca(i,l,!0))),e}}function q6(e,t,r){if(t){var n=t.x,a=t.y,i=t.width,o=t.height;e.x=n,e.y=a,e.width=i,e.height=o;var l=r&&r.lineWidth;return l&&(e.x=Ca(n,l,!0),e.y=Ca(a,l,!0),e.width=Math.max(Ca(n+i,l,!1)-e.x,i===0?0:1),e.height=Math.max(Ca(a+o,l,!1)-e.y,o===0?0:1)),e}}function Ca(e,t,r){if(!t)return e;var n=Fh(e*2);return(n+Fh(t))%2===0?n/2:(n+(r?1:-1))/2}var lce=(function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e})(),sce={},at=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new lce},t.prototype.buildPath=function(r,n){var a,i,o,l;if(this.subPixelOptimize){var s=q6(sce,n,this.style);a=s.x,i=s.y,o=s.width,l=s.height,s.r=n.r,n=s}else a=n.x,i=n.y,o=n.width,l=n.height;n.r?oce(r,n):r.rect(a,i,o,l)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(yt);at.prototype.type="rect";var hz={fill:"#000"},dz=2,eo={},uce={style:Ue({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},A_.style)},vt=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=hz,n.attr(r),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.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}},t.prototype.updateTransform=function(){var r=this.innerTransformable;r?(r.updateTransform(),r.transform&&(this.transform=r.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(r){var n=this.innerTransformable;return n?n.getLocalTransform(r):e.prototype.getLocalTransform.call(this,r)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,hce(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=r},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var r=new Fe(0,0,0,0),n=this._children,a=[],i=null,o=0;o<n.length;o++){var l=n[o],s=l.getBoundingRect(),c=l.getLocalTransform(a);c?(r.copy(s),r.applyTransform(c),i=i||r.clone(),i.union(r)):(i=i||s.clone(),i.union(s))}this._rect=i||r}return this._rect},t.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||hz},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,n){if(!n)return r;var a=n.rich,i=r.rich||a&&{};return he(r,n),a&&i?(this._mergeRich(i,a),r.rich=i):i&&(r.rich=i),r},t.prototype._mergeRich=function(r,n){for(var a=dt(n),i=0;i<a.length;i++){var o=a[i];r[o]=r[o]||{},he(r[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return uce},t.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},t.prototype._updatePlainTexts=function(){var r=this.style,n=r.font||bl,a=r.padding,i=this._defaultStyle,o=r.x||0,l=r.y||0,s=r.align||i.align||"left",c=r.verticalAlign||i.verticalAlign||"top";az(eo,i.overflowRect,o,l,s,c),o=eo.baseX,l=eo.baseY;var f=Sz(r),h=Lue(f,r,eo.outerWidth,eo.outerHeight),v=WT(r),p=!!r.backgroundColor,m=h.outerHeight,y=h.outerWidth,x=h.lines,b=h.lineHeight;this.isTruncated=!!h.isTruncated;var w=o,C=Sc(l,h.contentHeight,c);if(v||a){var A=sd(o,y,s),M=Sc(l,m,c);v&&this._renderBackground(r,r,A,M,y,m)}C+=b/2,a&&(w=xz(o,s,a),c==="top"?C+=a[0]:c==="bottom"&&(C-=a[2]));for(var R=0,E=!1,N=!1,L=yz("fill"in r?r.fill:(N=!0,i.fill)),O=mz("stroke"in r?r.stroke:!p&&(!i.autoStroke||N)?(R=dz,E=!0,i.stroke):null),I=r.textShadowBlur>0,z=0;z<x.length;z++){var V=this._getOrCreateChild(cd),Y=V.createStyle();V.useStyle(Y),Y.text=x[z],Y.x=w,Y.y=C,Y.textAlign=s,Y.textBaseline="middle",Y.opacity=r.opacity,Y.strokeFirst=!0,I&&(Y.shadowBlur=r.textShadowBlur||0,Y.shadowColor=r.textShadowColor||"transparent",Y.shadowOffsetX=r.textShadowOffsetX||0,Y.shadowOffsetY=r.textShadowOffsetY||0),Y.stroke=O,Y.fill=L,O&&(Y.lineWidth=r.lineWidth||R,Y.lineDash=r.lineDash,Y.lineDashOffset=r.lineDashOffset||0),Y.font=n,pz(Y,r),C+=b,V.setBoundingRect($M(Y,h.contentWidth,h.calculatedLineHeight,E?0:null))}},t.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,a=r.align||n.align,i=r.verticalAlign||n.verticalAlign,o=r.x||0,l=r.y||0;az(eo,n.overflowRect,o,l,a,i),o=eo.baseX,l=eo.baseY;var s=Sz(r),c=kue(s,r,eo.outerWidth,eo.outerHeight,a),f=c.width,h=c.outerWidth,v=c.outerHeight,p=r.padding;this.isTruncated=!!c.isTruncated;var m=sd(o,h,a),y=Sc(l,v,i),x=m,b=y;p&&(x+=p[3],b+=p[0]);var w=x+f;WT(r)&&this._renderBackground(r,r,m,y,h,v);for(var C=!!r.backgroundColor,A=0;A<c.lines.length;A++){for(var M=c.lines[A],R=M.tokens,E=R.length,N=M.lineHeight,L=M.width,O=0,I=x,z=w,V=E-1,Y=void 0;O<E&&(Y=R[O],!Y.align||Y.align==="left");)this._placeToken(Y,r,N,b,I,"left",C),L-=Y.width,I+=Y.width,O++;for(;V>=0&&(Y=R[V],Y.align==="right");)this._placeToken(Y,r,N,b,z,"right",C),L-=Y.width,z-=Y.width,V--;for(I+=(f-(I-x)-(w-z)-L)/2;O<=V;)Y=R[O],this._placeToken(Y,r,N,b,I+Y.width/2,"center",C),I+=Y.width,O++;b+=N}},t.prototype._placeToken=function(r,n,a,i,o,l,s){var c=n.rich[r.styleName]||{};c.text=r.text;var f=r.verticalAlign,h=i+a/2;f==="top"?h=i+r.height/2:f==="bottom"&&(h=i+a-r.height/2);var v=!r.isLineHolder&&WT(c);v&&this._renderBackground(c,n,l==="right"?o-r.width:l==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var p=!!c.backgroundColor,m=r.textPadding;m&&(o=xz(o,l,m),h-=r.height/2-m[0]-r.innerHeight/2);var y=this._getOrCreateChild(cd),x=y.createStyle();y.useStyle(x);var b=this._defaultStyle,w=!1,C=0,A=!1,M=yz("fill"in c?c.fill:"fill"in n?n.fill:(w=!0,b.fill)),R=mz("stroke"in c?c.stroke:"stroke"in n?n.stroke:!p&&!s&&(!b.autoStroke||w)?(C=dz,A=!0,b.stroke):null),E=c.textShadowBlur>0||n.textShadowBlur>0;x.text=r.text,x.x=o,x.y=h,E&&(x.shadowBlur=c.textShadowBlur||n.textShadowBlur||0,x.shadowColor=c.textShadowColor||n.textShadowColor||"transparent",x.shadowOffsetX=c.textShadowOffsetX||n.textShadowOffsetX||0,x.shadowOffsetY=c.textShadowOffsetY||n.textShadowOffsetY||0),x.textAlign=l,x.textBaseline="middle",x.font=r.font||bl,x.opacity=ca(c.opacity,n.opacity,1),pz(x,c),R&&(x.lineWidth=ca(c.lineWidth,n.lineWidth,C),x.lineDash=Ie(c.lineDash,n.lineDash),x.lineDashOffset=n.lineDashOffset||0,x.stroke=R),M&&(x.fill=M),y.setBoundingRect($M(x,r.contentWidth,r.contentHeight,A?0:null))},t.prototype._renderBackground=function(r,n,a,i,o,l){var s=r.backgroundColor,c=r.borderWidth,f=r.borderColor,h=s&&s.image,v=s&&!h,p=r.borderRadius,m=this,y,x;if(v||r.lineHeight||c&&f){y=this._getOrCreateChild(at),y.useStyle(y.createStyle()),y.style.fill=null;var b=y.shape;b.x=a,b.y=i,b.width=o,b.height=l,b.r=p,y.dirtyShape()}if(v){var w=y.style;w.fill=s||null,w.fillOpacity=Ie(r.fillOpacity,1)}else if(h){x=this._getOrCreateChild(Xr),x.onload=function(){m.dirtyStyle()};var C=x.style;C.image=s.image,C.x=a,C.y=i,C.width=o,C.height=l}if(c&&f){var w=y.style;w.lineWidth=c,w.stroke=f,w.strokeOpacity=Ie(r.strokeOpacity,1),w.lineDash=r.borderDash,w.lineDashOffset=r.borderDashOffset||0,y.strokeContainThreshold=0,y.hasFill()&&y.hasStroke()&&(w.strokeFirst=!0,w.lineWidth*=2)}var A=(y||x).style;A.shadowBlur=r.shadowBlur||0,A.shadowColor=r.shadowColor||"transparent",A.shadowOffsetX=r.shadowOffsetX||0,A.shadowOffsetY=r.shadowOffsetY||0,A.opacity=ca(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return Z6(r)&&(n=[r.fontStyle,r.fontWeight,X6(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Ja(n)||r.textFont||r.font},t})(Ni),cce={left:!0,right:1,center:1},fce={top:1,bottom:1,middle:1},vz=["fontStyle","fontWeight","fontSize","fontFamily"];function X6(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?oE+"px":e+"px"}function pz(e,t){for(var r=0;r<vz.length;r++){var n=vz[r],a=t[n];a!=null&&(e[n]=a)}}function Z6(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function hce(e){return gz(e),B(e.rich,gz),e}function gz(e){if(e){e.font=vt.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||cce[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||fce[r]?r:"top";var n=e.padding;n&&(e.padding=Cm(e.padding))}}function mz(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function yz(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function xz(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function Sz(e){var t=e.text;return t!=null&&(t+=""),t}function WT(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var $e=it(),XM=function(e,t,r,n){if(n){var a=$e(n);a.dataIndex=r,a.dataType=t,a.seriesIndex=e,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=$e(i);o.seriesIndex=e,o.dataIndex=r,o.dataType=t,o.ssrType="chart"})}},Pd="undefined",Do="series",K6=Le(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ma="original",an="arrayRows",Ra="objectRows",Oi="keyedColumns",Ns="typedArray",Q6="unknown",Mi="column",of="row",J6="Roam",dce=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],e8=(function(){function e(t){B(dce,function(r){this[r]=Ee(t[r],t)},this)}return e})();function t8(e,t){return t.mainType===Do?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var bz=1,_z={},r8=it(),RE=it(),EE=0,Mm=1,M_=2,Wn=["emphasis","blur","select"],Bg=["normal","emphasis","blur","select"],jd=10,vce=9,_c="highlight",iS="downplay",XS="select",ZM="unselect",ZS="toggleSelect",NE="selectchanged";function dh(e){return e!=null&&e!=="none"}function R_(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function n8(e){R_(e,"emphasis",M_)}function a8(e){e.hoverState===M_&&R_(e,"normal",EE)}function LE(e){R_(e,"blur",Mm)}function i8(e){e.hoverState===Mm&&R_(e,"normal",EE)}function pce(e){e.selected=!0}function gce(e){e.selected=!1}function wz(e,t,r){t(e,r)}function El(e,t,r){wz(e,t,r),e.isGroup&&e.traverse(function(n){wz(n,t,r)})}function KS(e,t){switch(t){case"emphasis":e.hoverState=M_;break;case"normal":e.hoverState=EE;break;case"blur":e.hoverState=Mm;break;case"select":e.selected=!0}}function mce(e,t,r,n){for(var a=e.style,i={},o=0;o<t.length;o++){var l=t[o],s=a[l];i[l]=s??(n&&n[l])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(r)<0&&c.targetName==="style"&&c.saveTo(i,t)}return i}function yce(e,t,r,n){var a=r&&qe(r,"select")>=0,i=!1;if(e instanceof yt){var o=r8(e),l=a&&o.selectFill||o.normalFill,s=a&&o.selectStroke||o.normalStroke;if(dh(l)||dh(s)){n=n||{};var c=n.style||{};c.fill==="inherit"?(i=!0,n=he({},n),c=he({},c),c.fill=l):!dh(c.fill)&&dh(l)?(i=!0,n=he({},n),c=he({},c),c.fill=FS(l)):!dh(c.stroke)&&dh(s)&&(i||(n=he({},n),c=he({},c)),c.stroke=FS(s)),n.style=c}}if(n&&n.z2==null){i||(n=he({},n));var f=e.z2EmphasisLift;n.z2=e.z2+(f??jd)}return n}function xce(e,t,r){if(r&&r.z2==null){r=he({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??vce)}return r}function Sce(e,t,r){var n=qe(e.currentStates,t)>=0,a=e.style.opacity,i=n?null:mce(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=he({},r),o=he({opacity:n?a:i.opacity*.1},o),r.style=o),r}function qT(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return yce(this,e,t,r);if(e==="blur")return Sce(this,e,r);if(e==="select")return xce(this,e,r)}return r}function kc(e){e.stateProxy=qT;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=qT),r&&(r.stateProxy=qT)}function Cz(e,t){!u8(e,t)&&!e.__highByOuter&&El(e,n8)}function Tz(e,t){!u8(e,t)&&!e.__highByOuter&&El(e,a8)}function Tl(e,t){e.__highByOuter|=1<<(t||0),El(e,n8)}function Al(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&El(e,a8)}function o8(e){El(e,LE)}function IE(e){El(e,i8)}function l8(e){El(e,pce)}function s8(e){El(e,gce)}function u8(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function c8(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(a,i){var o=RE(i),l=t8(e,i),s=a==="series";!s&&n.push(l),o.isBlured&&(l.group.traverse(function(c){i8(c)}),s&&r.push(i)),o.isBlured=!1}),B(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(r,!1,t)})}function KM(e,t,r,n){var a=n.getModel();r=r||"coordinateSystem";function i(c,f){for(var h=0;h<f.length;h++){var v=c.getItemGraphicEl(f[h]);v&&IE(v)}}if(e!=null&&!(!t||t==="none")){var o=a.getSeriesByIndex(e),l=o.coordinateSystem;l&&l.master&&(l=l.master);var s=[];a.eachSeries(function(c){var f=o===c,h=c.coordinateSystem;h&&h.master&&(h=h.master);var v=h&&l?h===l:f;if(!(r==="series"&&!f||r==="coordinateSystem"&&!v||t==="series"&&f)){var p=n.getViewOfSeriesModel(c);if(p.group.traverse(function(x){x.__highByOuter&&f&&t==="self"||LE(x)}),Sn(t))i(c.getData(),t);else if(Ve(t))for(var m=dt(t),y=0;y<m.length;y++)i(c.getData(m[y]),t[m[y]]);s.push(c),RE(c).isBlured=!0}}),a.eachComponent(function(c,f){if(c!=="series"){var h=n.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(s,!0,a)}})}}function QM(e,t,r){if(!(e==null||t==null)){var n=r.getModel().getComponent(e,t);if(n){RE(n).isBlured=!0;var a=r.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){LE(i)})}}}function bce(e,t,r){var n=e.seriesIndex,a=e.getData(t.dataType);if(a){var i=Ic(a,t);i=(pe(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var l=a.count(),s=0;!o&&s<l;)o=a.getItemGraphicEl(s++);if(o){var c=$e(o);KM(n,c.focus,c.blurScope,r)}else{var f=e.get(["emphasis","focus"]),h=e.get(["emphasis","blurScope"]);f!=null&&KM(n,f,h,r)}}}function OE(e,t,r,n){var a={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||r==null)return a;var i=n.getModel().getComponent(e,t);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var l=o.findHighDownDispatchers(r),s,c=0;c<l.length;c++)if($e(l[c]).focus==="self"){s=!0;break}return{focusSelf:s,dispatchers:l}}function _ce(e,t,r){var n=$e(e),a=OE(n.componentMainType,n.componentIndex,n.componentHighDownName,r),i=a.dispatchers,o=a.focusSelf;i?(o&&QM(n.componentMainType,n.componentIndex,r),B(i,function(l){return Cz(l,t)})):(KM(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&QM(n.componentMainType,n.componentIndex,r),Cz(e,t))}function wce(e,t,r){c8(r);var n=$e(e),a=OE(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;a?B(a,function(i){return Tz(i,t)}):Tz(e,t)}function Cce(e,t,r){if(eR(t)){var n=t.dataType,a=e.getData(n),i=Ic(a,t);pe(i)||(i=[i]),e[t.type===ZS?"toggleSelect":t.type===XS?"select":"unselect"](i,n)}}function Az(e){var t=e.getAllData();B(t,function(r){var n=r.data,a=r.type;n.eachItemGraphicEl(function(i,o){e.isSelected(o,a)?l8(i):s8(i)})})}function Tce(e){var t=[];return e.eachSeries(function(r){var n=r.getAllData();B(n,function(a){a.data;var i=a.type,o=r.getSelectedDataIndices();if(o.length>0){var l={dataIndex:o,seriesIndex:r.seriesIndex};i!=null&&(l.dataType=i),t.push(l)}})}),t}function Ls(e,t,r){pc(e,!0),El(e,kc),JM(e,t,r)}function Ace(e){pc(e,!1)}function er(e,t,r,n){n?Ace(e):Ls(e,t,r)}function JM(e,t,r){var n=$e(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var Dz=["emphasis","blur","select"],Dce={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function jr(e,t,r,n){r=r||"itemStyle";for(var a=0;a<Dz.length;a++){var i=Dz[a],o=t.getModel([i,r]),l=e.ensureState(i);l.style=n?n(o):o[Dce[r]]()}}function pc(e,t){var r=t===!1,n=e;e.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!r||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!r)}function zg(e){return!!(e&&e.__highDownDispatcher)}function Mce(e,t,r){var n=$e(e);n.componentMainType=t.mainType,n.componentIndex=t.componentIndex,n.componentHighDownName=r}function Rce(e){var t=_z[e];return t==null&&bz<=32&&(t=_z[e]=bz++),t}function eR(e){var t=e.type;return t===XS||t===ZM||t===ZS}function Mz(e){var t=e.type;return t===_c||t===iS}function Ece(e){var t=r8(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var r=e.states.select||{};t.selectFill=r.style&&r.style.fill||null,t.selectStroke=r.style&&r.style.stroke||null}var vh=Vs.CMD,Nce=[[],[],[]],Rz=Math.sqrt,Lce=Math.atan2;function Ice(e,t){if(t){var r=e.data,n=e.len(),a,i,o,l,s,c,f=vh.M,h=vh.C,v=vh.L,p=vh.R,m=vh.A,y=vh.Q;for(o=0,l=0;o<n;){switch(a=r[o++],l=o,i=0,a){case f:i=1;break;case v:i=1;break;case h:i=3;break;case y:i=2;break;case m:var x=t[4],b=t[5],w=Rz(t[0]*t[0]+t[1]*t[1]),C=Rz(t[2]*t[2]+t[3]*t[3]),A=Lce(-t[1]/C,t[0]/w);r[o]*=w,r[o++]+=x,r[o]*=C,r[o++]+=b,r[o++]*=w,r[o++]*=C,r[o++]+=A,r[o++]+=A,o+=2,l=o;break;case p:c[0]=r[o++],c[1]=r[o++],mr(c,c,t),r[l++]=c[0],r[l++]=c[1],c[0]+=r[o++],c[1]+=r[o++],mr(c,c,t),r[l++]=c[0],r[l++]=c[1]}for(s=0;s<i;s++){var M=Nce[s];M[0]=r[o++],M[1]=r[o++],mr(M,M,t),r[l++]=M[0],r[l++]=M[1]}}e.increaseVersion()}}var XT=Math.sqrt,B0=Math.sin,z0=Math.cos,fp=Math.PI;function Ez(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function tR(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ez(e)*Ez(t))}function Nz(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(tR(e,t))}function Lz(e,t,r,n,a,i,o,l,s,c,f){var h=s*(fp/180),v=z0(h)*(e-r)/2+B0(h)*(t-n)/2,p=-1*B0(h)*(e-r)/2+z0(h)*(t-n)/2,m=v*v/(o*o)+p*p/(l*l);m>1&&(o*=XT(m),l*=XT(m));var y=(a===i?-1:1)*XT((o*o*(l*l)-o*o*(p*p)-l*l*(v*v))/(o*o*(p*p)+l*l*(v*v)))||0,x=y*o*p/l,b=y*-l*v/o,w=(e+r)/2+z0(h)*x-B0(h)*b,C=(t+n)/2+B0(h)*x+z0(h)*b,A=Nz([1,0],[(v-x)/o,(p-b)/l]),M=[(v-x)/o,(p-b)/l],R=[(-1*v-x)/o,(-1*p-b)/l],E=Nz(M,R);if(tR(M,R)<=-1&&(E=fp),tR(M,R)>=1&&(E=0),E<0){var N=Math.round(E/fp*1e6)/1e6;E=fp*2+N%2*fp}f.addData(c,w,C,o,l,A,E,h,i)}var Oce=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,kce=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Pce(e){var t=new Vs;if(!e)return t;var r=0,n=0,a=r,i=n,o,l=Vs.CMD,s=e.match(Oce);if(!s)return t;for(var c=0;c<s.length;c++){for(var f=s[c],h=f.charAt(0),v=void 0,p=f.match(kce)||[],m=p.length,y=0;y<m;y++)p[y]=parseFloat(p[y]);for(var x=0;x<m;){var b=void 0,w=void 0,C=void 0,A=void 0,M=void 0,R=void 0,E=void 0,N=r,L=n,O=void 0,I=void 0;switch(h){case"l":r+=p[x++],n+=p[x++],v=l.L,t.addData(v,r,n);break;case"L":r=p[x++],n=p[x++],v=l.L,t.addData(v,r,n);break;case"m":r+=p[x++],n+=p[x++],v=l.M,t.addData(v,r,n),a=r,i=n,h="l";break;case"M":r=p[x++],n=p[x++],v=l.M,t.addData(v,r,n),a=r,i=n,h="L";break;case"h":r+=p[x++],v=l.L,t.addData(v,r,n);break;case"H":r=p[x++],v=l.L,t.addData(v,r,n);break;case"v":n+=p[x++],v=l.L,t.addData(v,r,n);break;case"V":n=p[x++],v=l.L,t.addData(v,r,n);break;case"C":v=l.C,t.addData(v,p[x++],p[x++],p[x++],p[x++],p[x++],p[x++]),r=p[x-2],n=p[x-1];break;case"c":v=l.C,t.addData(v,p[x++]+r,p[x++]+n,p[x++]+r,p[x++]+n,p[x++]+r,p[x++]+n),r+=p[x-2],n+=p[x-1];break;case"S":b=r,w=n,O=t.len(),I=t.data,o===l.C&&(b+=r-I[O-4],w+=n-I[O-3]),v=l.C,N=p[x++],L=p[x++],r=p[x++],n=p[x++],t.addData(v,b,w,N,L,r,n);break;case"s":b=r,w=n,O=t.len(),I=t.data,o===l.C&&(b+=r-I[O-4],w+=n-I[O-3]),v=l.C,N=r+p[x++],L=n+p[x++],r+=p[x++],n+=p[x++],t.addData(v,b,w,N,L,r,n);break;case"Q":N=p[x++],L=p[x++],r=p[x++],n=p[x++],v=l.Q,t.addData(v,N,L,r,n);break;case"q":N=p[x++]+r,L=p[x++]+n,r+=p[x++],n+=p[x++],v=l.Q,t.addData(v,N,L,r,n);break;case"T":b=r,w=n,O=t.len(),I=t.data,o===l.Q&&(b+=r-I[O-4],w+=n-I[O-3]),r=p[x++],n=p[x++],v=l.Q,t.addData(v,b,w,r,n);break;case"t":b=r,w=n,O=t.len(),I=t.data,o===l.Q&&(b+=r-I[O-4],w+=n-I[O-3]),r+=p[x++],n+=p[x++],v=l.Q,t.addData(v,b,w,r,n);break;case"A":C=p[x++],A=p[x++],M=p[x++],R=p[x++],E=p[x++],N=r,L=n,r=p[x++],n=p[x++],v=l.A,Lz(N,L,r,n,R,E,C,A,M,v,t);break;case"a":C=p[x++],A=p[x++],M=p[x++],R=p[x++],E=p[x++],N=r,L=n,r+=p[x++],n+=p[x++],v=l.A,Lz(N,L,r,n,R,E,C,A,M,v,t);break}}(h==="z"||h==="Z")&&(v=l.Z,t.addData(v),r=a,n=i),o=v}return t.toStatic(),t}var f8=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t})(yt);function h8(e){return e.setData!=null}function d8(e,t){var r=Pce(e),n=he({},t);return n.buildPath=function(a){var i=h8(a);if(i&&a.canSave()){a.appendPath(r);var o=a.getContext();o&&a.rebuildPath(o,1)}else{var o=i?a.getContext():a;o&&r.rebuildPath(o,1)}},n.applyTransform=function(a){Ice(r,a),this.dirtyShape()},n}function v8(e,t){return new f8(d8(e,t))}function jce(e,t){var r=d8(e,t),n=(function(a){ee(i,a);function i(o){var l=a.call(this,o)||this;return l.applyTransform=r.applyTransform,l.buildPath=r.buildPath,l}return i})(f8);return n}function Bce(e,t){for(var r=[],n=e.length,a=0;a<n;a++){var i=e[a];r.push(i.getUpdatedPathProxy(!0))}var o=new yt(t);return o.createPathProxy(),o.buildPath=function(l){if(h8(l)){l.appendPath(r);var s=l.getContext();s&&l.rebuildPath(s,1)}},o}var zce=(function(){function e(){this.cx=0,this.cy=0,this.r=0}return e})(),Io=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new zce},t.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)},t})(yt);Io.prototype.type="circle";var Vce=(function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e})(),Rm=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Vce},t.prototype.buildPath=function(r,n){var a=.5522848,i=n.cx,o=n.cy,l=n.rx,s=n.ry,c=l*a,f=s*a;r.moveTo(i-l,o),r.bezierCurveTo(i-l,o-f,i-c,o-s,i,o-s),r.bezierCurveTo(i+c,o-s,i+l,o-f,i+l,o),r.bezierCurveTo(i+l,o+f,i+c,o+s,i,o+s),r.bezierCurveTo(i-c,o+s,i-l,o+f,i-l,o),r.closePath()},t})(yt);Rm.prototype.type="ellipse";var p8=Math.PI,ZT=p8*2,Gu=Math.sin,ph=Math.cos,Fce=Math.acos,Tn=Math.atan2,Iz=Math.abs,fg=Math.sqrt,Hp=Math.max,to=Math.min,_i=1e-4;function Gce(e,t,r,n,a,i,o,l){var s=r-e,c=n-t,f=o-a,h=l-i,v=h*s-f*c;if(!(v*v<_i))return v=(f*(t-i)-h*(e-a))/v,[e+v*s,t+v*c]}function V0(e,t,r,n,a,i,o){var l=e-r,s=t-n,c=(o?i:-i)/fg(l*l+s*s),f=c*s,h=-c*l,v=e+f,p=t+h,m=r+f,y=n+h,x=(v+m)/2,b=(p+y)/2,w=m-v,C=y-p,A=w*w+C*C,M=a-i,R=v*y-m*p,E=(C<0?-1:1)*fg(Hp(0,M*M*A-R*R)),N=(R*C-w*E)/A,L=(-R*w-C*E)/A,O=(R*C+w*E)/A,I=(-R*w+C*E)/A,z=N-x,V=L-b,Y=O-x,H=I-b;return z*z+V*V>Y*Y+H*H&&(N=O,L=I),{cx:N,cy:L,x0:-f,y0:-h,x1:N*(a/M-1),y1:L*(a/M-1)}}function Hce(e){var t;if(pe(e)){var r=e.length;if(!r)return e;r===1?t=[e[0],e[0],0,0]:r===2?t=[e[0],e[0],e[1],e[1]]:r===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function Uce(e,t){var r,n=Hp(t.r,0),a=Hp(t.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var l=n;n=a,a=l}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var f=t.cx,h=t.cy,v=!!t.clockwise,p=Iz(c-s),m=p>ZT&&p%ZT;if(m>_i&&(p=m),!(n>_i))e.moveTo(f,h);else if(p>ZT-_i)e.moveTo(f+n*ph(s),h+n*Gu(s)),e.arc(f,h,n,s,c,!v),a>_i&&(e.moveTo(f+a*ph(c),h+a*Gu(c)),e.arc(f,h,a,c,s,v));else{var y=void 0,x=void 0,b=void 0,w=void 0,C=void 0,A=void 0,M=void 0,R=void 0,E=void 0,N=void 0,L=void 0,O=void 0,I=void 0,z=void 0,V=void 0,Y=void 0,H=n*ph(s),F=n*Gu(s),X=a*ph(c),P=a*Gu(c),q=p>_i;if(q){var G=t.cornerRadius;G&&(r=Hce(G),y=r[0],x=r[1],b=r[2],w=r[3]);var W=Iz(n-a)/2;if(C=to(W,b),A=to(W,w),M=to(W,y),R=to(W,x),L=E=Hp(C,A),O=N=Hp(M,R),(E>_i||N>_i)&&(I=n*ph(c),z=n*Gu(c),V=a*ph(s),Y=a*Gu(s),p<p8)){var Z=Gce(H,F,V,Y,I,z,X,P);if(Z){var Q=H-Z[0],U=F-Z[1],K=I-Z[0],se=z-Z[1],ge=1/Gu(Fce((Q*K+U*se)/(fg(Q*Q+U*U)*fg(K*K+se*se)))/2),ue=fg(Z[0]*Z[0]+Z[1]*Z[1]);L=to(E,(n-ue)/(ge+1)),O=to(N,(a-ue)/(ge-1))}}}if(!q)e.moveTo(f+H,h+F);else if(L>_i){var de=to(b,L),me=to(w,L),ae=V0(V,Y,H,F,n,de,v),ye=V0(I,z,X,P,n,me,v);e.moveTo(f+ae.cx+ae.x0,h+ae.cy+ae.y0),L<E&&de===me?e.arc(f+ae.cx,h+ae.cy,L,Tn(ae.y0,ae.x0),Tn(ye.y0,ye.x0),!v):(de>0&&e.arc(f+ae.cx,h+ae.cy,de,Tn(ae.y0,ae.x0),Tn(ae.y1,ae.x1),!v),e.arc(f,h,n,Tn(ae.cy+ae.y1,ae.cx+ae.x1),Tn(ye.cy+ye.y1,ye.cx+ye.x1),!v),me>0&&e.arc(f+ye.cx,h+ye.cy,me,Tn(ye.y1,ye.x1),Tn(ye.y0,ye.x0),!v))}else e.moveTo(f+H,h+F),e.arc(f,h,n,s,c,!v);if(!(a>_i)||!q)e.lineTo(f+X,h+P);else if(O>_i){var de=to(y,O),me=to(x,O),ae=V0(X,P,I,z,a,-me,v),ye=V0(H,F,V,Y,a,-de,v);e.lineTo(f+ae.cx+ae.x0,h+ae.cy+ae.y0),O<N&&de===me?e.arc(f+ae.cx,h+ae.cy,O,Tn(ae.y0,ae.x0),Tn(ye.y0,ye.x0),!v):(me>0&&e.arc(f+ae.cx,h+ae.cy,me,Tn(ae.y0,ae.x0),Tn(ae.y1,ae.x1),!v),e.arc(f,h,a,Tn(ae.cy+ae.y1,ae.cx+ae.x1),Tn(ye.cy+ye.y1,ye.cx+ye.x1),v),de>0&&e.arc(f+ye.cx,h+ye.cy,de,Tn(ye.y1,ye.x1),Tn(ye.y0,ye.x0),!v))}else e.lineTo(f+X,h+P),e.arc(f,h,a,c,s,v)}e.closePath()}}}var Yce=(function(){function e(){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 e})(),qn=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Yce},t.prototype.buildPath=function(r,n){Uce(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(yt);qn.prototype.type="sector";var $ce=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e})(),Bd=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new $ce},t.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.PI*2;r.moveTo(a+n.r,i),r.arc(a,i,n.r,0,o,!1),r.moveTo(a+n.r0,i),r.arc(a,i,n.r0,0,o,!0)},t})(yt);Bd.prototype.type="ring";function Wce(e,t,r,n){var a=[],i=[],o=[],l=[],s,c,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,p=e.length;v<p;v++)ul(f,f,e[v]),cl(h,h,e[v]);ul(f,f,n[0]),cl(h,h,n[1])}for(var v=0,p=e.length;v<p;v++){var m=e[v];if(r)s=e[v?v-1:p-1],c=e[(v+1)%p];else if(v===0||v===p-1){a.push(po(e[v]));continue}else s=e[v-1],c=e[v+1];ys(i,c,s),ag(i,i,t);var y=OS(m,s),x=OS(m,c),b=y+x;b!==0&&(y/=b,x/=b),ag(o,i,-y),ag(l,i,x);var w=bM([],m,o),C=bM([],m,l);n&&(cl(w,w,f),ul(w,w,h),cl(C,C,f),ul(C,C,h)),a.push(w),a.push(C)}return r&&a.push(a.shift()),a}function g8(e,t,r){var n=t.smooth,a=t.points;if(a&&a.length>=2){if(n){var i=Wce(a,n,r,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var o=a.length,l=0;l<(r?o:o-1);l++){var s=i[l*2],c=i[l*2+1],f=a[(l+1)%o];e.bezierCurveTo(s[0],s[1],c[0],c[1],f[0],f[1])}}else{e.moveTo(a[0][0],a[0][1]);for(var l=1,h=a.length;l<h;l++)e.lineTo(a[l][0],a[l][1])}r&&e.closePath()}}var qce=(function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e})(),Xn=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new qce},t.prototype.buildPath=function(r,n){g8(r,n,!0)},t})(yt);Xn.prototype.type="polygon";var Xce=(function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e})(),On=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Xce},t.prototype.buildPath=function(r,n){g8(r,n,!1)},t})(yt);On.prototype.type="polyline";var Zce={},Kce=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})(),Mr=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Kce},t.prototype.buildPath=function(r,n){var a,i,o,l;if(this.subPixelOptimize){var s=W6(Zce,n,this.style);a=s.x1,i=s.y1,o=s.x2,l=s.y2}else a=n.x1,i=n.y1,o=n.x2,l=n.y2;var c=n.percent;c!==0&&(r.moveTo(a,i),c<1&&(o=a*(1-c)+o*c,l=i*(1-c)+l*c),r.lineTo(o,l))},t.prototype.pointAt=function(r){var n=this.shape;return[n.x1*(1-r)+n.x2*r,n.y1*(1-r)+n.y2*r]},t})(yt);Mr.prototype.type="line";var ia=[],Qce=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e})();function Oz(e,t,r){var n=e.cpx2,a=e.cpy2;return n!=null||a!=null?[(r?kB:mn)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?kB:mn)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?MM:Rn)(e.x1,e.cpx1,e.x2,t),(r?MM:Rn)(e.y1,e.cpy1,e.y2,t)]}var zd=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Qce},t.prototype.buildPath=function(r,n){var a=n.x1,i=n.y1,o=n.x2,l=n.y2,s=n.cpx1,c=n.cpy1,f=n.cpx2,h=n.cpy2,v=n.percent;v!==0&&(r.moveTo(a,i),f==null||h==null?(v<1&&(Eg(a,s,o,v,ia),s=ia[1],o=ia[2],Eg(i,c,l,v,ia),c=ia[1],l=ia[2]),r.quadraticCurveTo(s,c,o,l)):(v<1&&(zS(a,s,f,o,v,ia),s=ia[1],f=ia[2],o=ia[3],zS(i,c,h,l,v,ia),c=ia[1],h=ia[2],l=ia[3]),r.bezierCurveTo(s,c,f,h,o,l)))},t.prototype.pointAt=function(r){return Oz(this.shape,r,!1)},t.prototype.tangentAt=function(r){var n=Oz(this.shape,r,!0);return tf(n,n)},t})(yt);zd.prototype.type="bezier-curve";var Jce=(function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),Em=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Jce},t.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.max(n.r,0),l=n.startAngle,s=n.endAngle,c=n.clockwise,f=Math.cos(l),h=Math.sin(l);r.moveTo(f*o+a,h*o+i),r.arc(a,i,o,l,s,!c)},t})(yt);Em.prototype.type="arc";var Nm=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="compound",r}return t.prototype._updatePathDirty=function(){for(var r=this.shape.paths,n=this.shapeChanged(),a=0;a<r.length;a++)n=n||r[a].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),a=0;a<r.length;a++)r[a].path||r[a].createPathProxy(),r[a].path.setScale(n[0],n[1],r[a].segmentIgnoreThreshold)},t.prototype.buildPath=function(r,n){for(var a=n.paths||[],i=0;i<a.length;i++)a[i].buildPath(r,a[i].shape,!0)},t.prototype.afterBrush=function(){for(var r=this.shape.paths||[],n=0;n<r.length;n++)r[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),yt.prototype.getBoundingRect.call(this)},t})(yt),m8=(function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e})(),lf=(function(e){ee(t,e);function t(r,n,a,i,o,l){var s=e.call(this,o)||this;return s.x=r??0,s.y=n??0,s.x2=a??1,s.y2=i??0,s.type="linear",s.global=l||!1,s}return t})(m8),kE=(function(e){ee(t,e);function t(r,n,a,i,o){var l=e.call(this,i)||this;return l.x=r??.5,l.y=n??.5,l.r=a??.5,l.type="radial",l.global=o||!1,l}return t})(m8),KT=Math.min,efe=Math.max,F0=Math.abs,Hu=[0,0],Uu=[0,0],rn=KU(),G0=rn.minTv,H0=rn.maxTv,y8=(function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Qe;for(var n=0;n<2;n++)this._axes[n]=new Qe;t&&this.fromBoundingRect(t,r)}return e.prototype.fromBoundingRect=function(t,r){var n=this._corners,a=this._axes,i=t.x,o=t.y,l=i+t.width,s=o+t.height;if(n[0].set(i,o),n[1].set(l,o),n[2].set(l,s),n[3].set(i,s),r)for(var c=0;c<4;c++)n[c].transform(r);Qe.sub(a[0],n[1],n[0]),Qe.sub(a[1],n[3],n[0]),a[0].normalize(),a[1].normalize();for(var c=0;c<2;c++)this._origin[c]=a[c].dot(n[0])},e.prototype.intersect=function(t,r,n){var a=!0,i=!r;return r&&Qe.set(r,0,0),rn.reset(n,!i),!this._intersectCheckOneSide(this,t,i,1)&&(a=!1,i)||!this._intersectCheckOneSide(t,this,i,-1)&&(a=!1,i)||!i&&!rn.negativeSize&&Qe.copy(r,a?rn.useDir?rn.dirMinTv:G0:H0),a},e.prototype._intersectCheckOneSide=function(t,r,n,a){for(var i=!0,o=0;o<2;o++){var l=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Hu),t._getProjMinMaxOnAxis(o,r._corners,Uu),rn.negativeSize||Hu[1]<Uu[0]||Hu[0]>Uu[1]){if(i=!1,rn.negativeSize||n)return i;var s=F0(Uu[0]-Hu[1]),c=F0(Hu[0]-Uu[1]);KT(s,c)>H0.len()&&(s<c?Qe.scale(H0,l,-s*a):Qe.scale(H0,l,c*a))}else if(!n){var s=F0(Uu[0]-Hu[1]),c=F0(Hu[0]-Uu[1]);(rn.useDir||KT(s,c)<G0.len())&&((s<c||!rn.bidirectional)&&(Qe.scale(G0,l,s*a),rn.useDir&&rn.calcDirMTV()),(s>=c||!rn.bidirectional)&&(Qe.scale(G0,l,-c*a),rn.useDir&&rn.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var a=this._axes[t],i=this._origin,o=r[0].dot(a)+i[t],l=o,s=o,c=1;c<r.length;c++){var f=r[c].dot(a)+i[t];l=KT(f,l),s=efe(f,s)}n[0]=l+rn.touchThreshold,n[1]=s-rn.touchThreshold,rn.negativeSize=n[1]<n[0]},e})(),x8=0,tfe=1,rfe=2,nfe=1,oS=0,afe=[],S8=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=tfe,r._displayables=[],r._temporaryDisplayables=[],r._cursor=0,r}return t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(r,n){n?this._temporaryDisplayables.push(r):this._displayables.push(r),this.markRedraw()},t.prototype.addDisplayables=function(r,n){n=n||!1;for(var a=0;a<r.length;a++)this.addDisplayable(r[a],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.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])},t.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}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var r=new Fe(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var a=this._displayables[n],i=a.getBoundingRect().clone();a.needLocalTransform()&&i.applyTransform(a.getLocalTransform(afe)),r.union(i)}this._rect=r}return this._rect},t.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();if(i.contain(a[0],a[1]))for(var o=0;o<this._displayables.length;o++){var l=this._displayables[o];if(l.contain(r,n))return!0}return!1},t})(Ni),ife=it();function PE(e,t,r,n,a){var i;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();i=o&&o.animation}var l=t&&t.isAnimationEnabled(),s=e==="update";if(l){var c=void 0,f=void 0,h=void 0;n?(c=Ie(n.duration,200),f=Ie(n.easing,"cubicOut"),h=0):(c=t.getShallow(s?"animationDurationUpdate":"animationDuration"),f=t.getShallow(s?"animationEasingUpdate":"animationEasing"),h=t.getShallow(s?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(c=i.duration),i.easing!=null&&(f=i.easing),i.delay!=null&&(h=i.delay)),Be(h)&&(h=h(r,a)),Be(c)&&(c=c(r));var v={duration:c||0,delay:h,easing:f};return v}else return null}function jE(e,t,r,n,a,i,o){var l=!1,s;Be(a)?(o=i,i=a,a=null):Ve(a)&&(i=a.cb,o=a.during,l=a.isFrom,s=a.removeOpt,a=a.dataIndex);var c=e==="leave";c||t.stopAnimation("leave");var f=PE(e,n,a,c?s||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,a):null);if(f&&f.duration>0){var h=f.duration,v=f.delay,p=f.easing,m={duration:h,delay:v||0,easing:p,done:i,force:!!i||!!o,setToFinal:!c,scope:e,during:o};l?t.animateFrom(r,m):t.animateTo(r,m)}else t.stopAnimation(),!l&&t.attr(r),o&&o(1),i&&i()}function _t(e,t,r,n,a,i){jE("update",e,t,r,n,a,i)}function ir(e,t,r,n,a,i){jE("enter",e,t,r,n,a,i)}function hg(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){var r=e.animators[t];if(r.scope==="leave")return!0}return!1}function Fs(e,t,r,n,a,i){hg(e)||jE("leave",e,t,r,n,a,i)}function kz(e,t,r,n){e.removeTextContent(),e.removeTextGuideLine(),Fs(e,{style:{opacity:0}},t,r,n)}function pl(e,t,r){function n(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(a){a.isGroup||kz(a,t,r,n)}):kz(e,t,r,n)}function ui(e){ife(e).oldStyle=e.style}var rR={},Ze=["x","y"],Pr=["width","height"],b8=0,_8=1,Vd=2;function w8(e){return yt.extend(e)}var ofe=jce;function C8(e,t){return ofe(e,t)}function hi(e,t){rR[e]=t}function Vg(e){if(rR.hasOwnProperty(e))return rR[e]}function fd(e,t,r,n){var a=v8(e,t);return r&&(n==="center"&&(r=T8(r,a.getBoundingRect())),zE(a,r)),a}function BE(e,t,r){var n=new Xr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(a){if(r==="center"){var i={width:a.width,height:a.height};n.setStyle(T8(t,i))}}});return n}function T8(e,t){var r=t.width/t.height,n=e.height*r,a;n<=e.width?a=e.height:(n=e.width,a=n/r);var i=e.x+e.width/2,o=e.y+e.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var wa=Bce;function zE(e,t){if(e.applyTransform){var r=e.getBoundingRect(),n=r.calculateTransform(t);e.applyTransform(n)}}function hd(e,t){return W6(e,e,{lineWidth:t}),e}function lfe(e,t){return q6(e,e,t),e}var lS=Ca;function wc(e,t){for(var r=rf([]);e&&e!==t;)ei(r,e.getLocalTransform(),r),e=e.parent;return r}function Ri(e,t,r){return t&&!Sn(t)&&(t=Ks.getLocalTransform(t)),r&&(t=oi([],t)),mr([],e,t)}function E_(e,t,r){var n=t[4]===0||t[5]===0||t[0]===0?1:sr(2*t[4]/t[0]),a=t[4]===0||t[5]===0||t[2]===0?1:sr(2*t[4]/t[2]),i=[e==="left"?-n:e==="right"?n:0,e==="top"?-a:e==="bottom"?a:0];return i=Ri(i,t,r),sr(i[0])>sr(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Pz(e){return!e.isGroup}function sfe(e){return e.shape!=null}function Lm(e,t,r){if(!e||!t)return;function n(o){var l={};return o.traverse(function(s){Pz(s)&&s.anid&&(l[s.anid]=s)}),l}function a(o){var l={x:o.x,y:o.y,rotation:o.rotation};return sfe(o)&&(l.shape=je(o.shape)),l}var i=n(e);t.traverse(function(o){if(Pz(o)&&o.anid){var l=i[o.anid];if(l){var s=a(o);o.attr(a(l)),_t(o,s,r,$e(o).dataIndex)}}})}function VE(e,t){return xe(e,function(r){var n=r[0];n=st(n,t.x),n=kt(n,t.x+t.width);var a=r[1];return a=st(a,t.y),a=kt(a,t.y+t.height),[n,a]})}function A8(e,t){var r=st(e.x,t.x),n=kt(e.x+e.width,t.x+t.width),a=st(e.y,t.y),i=kt(e.y+e.height,t.y+t.height);if(n>=r&&i>=a)return{x:r,y:a,width:n-r,height:i-a}}function Fd(e,t,r){var n=he({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(a.image=e.slice(8),Ue(a,r),new Xr(n)):fd(e.replace("path://",""),n,r,"center")}function Up(e,t,r,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var l=a[i];if(D8(e,t,r,n,l[0],l[1],o[0],o[1]))return!0;o=l}}function D8(e,t,r,n,a,i,o,l){var s=r-e,c=n-t,f=o-a,h=l-i,v=QT(f,h,s,c);if(ufe(v))return!1;var p=e-a,m=t-i,y=QT(p,m,s,c)/v;if(y<0||y>1)return!1;var x=QT(p,m,f,h)/v;return!(x<0||x>1)}function QT(e,t,r,n){return e*n-r*t}function ufe(e){return e<=1e-6&&e>=-1e-6}function Pc(e,t,r,n,a){return t==null||(pt(t)?nr[0]=nr[1]=nr[2]=nr[3]=t:(nr[0]=t[0],nr[1]=t[1],nr[2]=t[2],nr[3]=t[3]),n&&(nr[0]=st(0,nr[0]),nr[1]=st(0,nr[1]),nr[2]=st(0,nr[2]),nr[3]=st(0,nr[3])),r&&(nr[0]=-nr[0],nr[1]=-nr[1],nr[2]=-nr[2],nr[3]=-nr[3]),jz(e,nr,"x","width",3,1,a&&a[0]||0),jz(e,nr,"y","height",0,2,a&&a[1]||0)),e}var nr=[0,0,0,0];function jz(e,t,r,n,a,i,o){var l=t[i]+t[a],s=e[n];e[n]+=l,o=st(0,kt(o,s)),e[n]<o?(e[n]=o,e[r]+=t[a]>=0?-t[a]:t[i]>=0?s+t[i]:sr(l)>1e-8?(s-o)*t[a]/l:0):e[r]-=t[a]}function Nl(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,a=De(t)?{formatter:t}:t,i=r.mainType,o=r.componentIndex,l={componentType:i,name:n,$vars:["name"]};l[i+"Index"]=o;var s=e.formatterParamsExtra;s&&B(dt(s),function(f){Ne(l,f)||(l[f]=s[f],l.$vars.push(f))});var c=$e(e.el);c.componentMainType=i,c.componentIndex=o,c.tooltipConfig={name:n,option:Ue({content:n,encodeHTMLContent:!0,formatterParams:l},a)}}function nR(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function Qs(e,t){if(e)if(pe(e))for(var r=0;r<e.length;r++)nR(e[r],t);else nR(e,t)}function FE(e){return!e||sr(e[1])<U0&&sr(e[2])<U0||sr(e[0])<U0&&sr(e[3])<U0}var U0=1e-5;function Fg(e,t){return e?Fe.copy(e,t):t.clone()}function GE(e,t){return t?Bs(e||lr(),t):void 0}function jc(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function M8(e){var t=-1/0,r=1/0;nR(e,function(i){n(i),n(i.getTextContent()),n(i.getTextGuideLine())});function n(i){if(!(!i||i.isGroup)){var o=i.currentStates;if(o.length)for(var l=0;l<o.length;l++)a(i.states[o[l]]);a(i)}}function a(i){if(i){var o=i.z2;o>t&&(t=o),o<r&&(r=o)}}return r>t&&(r=t=0),{min:r,max:t}}function N_(e,t,r){R8(e,t,r,-1/0)}function R8(e,t,r,n){if(e.ignoreModelZ)return n;var a=e.getTextContent(),i=e.getTextGuideLine(),o=e.isGroup;if(o)for(var l=e.childrenRef(),s=0;s<l.length;s++)n=st(R8(l[s],t,r,n),n);else e.z=t,e.zlevel=r,n=st(e.z2||0,n);if(a&&(a.z=t,a.zlevel=r,isFinite(n)&&(a.z2=n+2)),i){var c=e.textGuideLineConfig;i.z=t,i.zlevel=r,isFinite(n)&&(i.z2=n+(c&&c.showAbove?1:-1))}return n}function HE(e){return e.animation={duration:0},e}function L_(e,t){return t?Bs(Yp.transform,t):rf(Yp.transform),Yp.decomposeTransform(),wo(e,Yp),e}var Yp=new Ks;Yp.transform=lr();function aR(e){var t=e.getZr().painter;return t.getType()==="canvas"?t:null}hi("circle",Io);hi("ellipse",Rm);hi("sector",qn);hi("ring",Bd);hi("polygon",Xn);hi("polyline",On);hi("rect",at);hi("line",Mr);hi("bezierCurve",zd);hi("arc",Em);const sf=Object.freeze(Object.defineProperty({__proto__:null,Arc:Em,BezierCurve:zd,BoundingRect:Fe,Circle:Io,CompoundPath:Nm,Ellipse:Rm,Group:ze,HOVER_LAYER_FOR_INCREMENTAL:Vd,HOVER_LAYER_FROM_THRESHOLD:_8,HOVER_LAYER_NO:b8,Image:Xr,IncrementalDisplayable:S8,Line:Mr,LinearGradient:lf,OrientedBoundingRect:y8,Path:yt,Point:Qe,Polygon:Xn,Polyline:On,RadialGradient:kE,Rect:at,Ring:Bd,Sector:qn,Text:vt,WH:Pr,XY:Ze,applyTransform:Ri,calcZ2Range:M8,clipPointsByRect:VE,clipRectByRect:A8,createIcon:Fd,decomposeTransform:L_,ensureCopyRect:Fg,ensureCopyTransform:GE,expandOrShrinkRect:Pc,extendPath:C8,extendShape:w8,getCurrentCanvasPainter:aR,getShapeClass:Vg,getTransform:wc,groupTransition:Lm,initProps:ir,isBoundingRectAxisAligned:FE,isElementRemoved:hg,lineLineIntersect:D8,linePolygonIntersect:Up,makeImage:BE,makePath:fd,mergePath:wa,payloadDisableAnimation:HE,registerShape:hi,removeElement:Fs,removeElementWithFadeOut:pl,resizePath:zE,retrieveZInfo:jc,setTooltipConfig:Nl,subPixelOptimize:lS,subPixelOptimizeLine:hd,subPixelOptimizeRect:lfe,transformDirection:E_,traverseElements:Qs,traverseUpdateZ:N_,updateProps:_t},Symbol.toStringTag,{value:"Module"}));var I_={};function E8(e,t){for(var r=0;r<Wn.length;r++){var n=Wn[r],a=t[n],i=e.ensureState(n);i.style=i.style||{},i.style.text=a}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function iR(e,t,r){var n=e.labelFetcher,a=e.labelDataIndex,i=e.labelDimIndex,o=t.normal,l;n&&(l=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),l==null&&(l=Be(e.defaultText)?e.defaultText(a,e,r):e.defaultText);for(var s={normal:l},c=0;c<Wn.length;c++){var f=Wn[c],h=t[f];s[f]=Ie(n?n.getFormattedLabel(a,f,null,i,h&&h.get("formatter")):null,l)}return s}function Wr(e,t,r,n){r=r||I_;for(var a=e instanceof vt,i=!1,o=0;o<Bg.length;o++){var l=t[Bg[o]];if(l&&l.getShallow("show")){i=!0;break}}var s=a?e:e.getTextContent();if(i){a||(s||(s=new vt,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var c=iR(r,t),f=t.normal,h=!!f.getShallow("show"),v=Gt(f,n&&n.normal,r,!1,!a);v.text=c.normal,a||e.setTextConfig(QS(f,r,!1));for(var o=0;o<Wn.length;o++){var p=Wn[o],l=t[p];if(l){var m=s.ensureState(p),y=!!Ie(l.getShallow("show"),h);if(y!==h&&(m.ignore=!y),m.style=Gt(l,n&&n[p],r,!0,!a),m.style.text=c[p],!a){var x=e.ensureState(p);x.textConfig=QS(l,r,!0)}}}s.silent=!!f.getShallow("silent"),s.style.x!=null&&(v.x=s.style.x),s.style.y!=null&&(v.y=s.style.y),s.ignore=!h,s.useStyle(v),s.dirty(),r.enableTextSetter&&(Im(s).setLabelText=function(b){var w=iR(r,t,b);E8(s,w)})}else s&&(s.ignore=!0);e.dirty()}function Br(e,t){t=t||"label";for(var r={normal:e.getModel(t)},n=0;n<Wn.length;n++){var a=Wn[n];r[a]=e.getModel([a,t])}return r}function Gt(e,t,r,n,a){var i={};return cfe(i,e,r,n,a),t&&he(i,t),i}function QS(e,t,r){t=t||{};var n={},a,i=e.getShallow("rotate"),o=Ie(e.getShallow("distance"),r?null:5),l=e.getShallow("offset");return a=e.getShallow("position")||(r?null:"inside"),a==="outside"&&(a=t.defaultOutsidePosition||"top"),a!=null&&(n.position=a),l!=null&&(n.offset=l),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(n.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(n.layoutRect=t.layoutRect),n}function cfe(e,t,r,n,a){r=r||I_;var i=t.ecModel,o=i&&i.option.textStyle,l=ffe(t),s;if(l){s={};var c="richInheritPlainLabel",f=Ie(t.get(c),i?i.get(c):void 0);for(var h in l)if(l.hasOwnProperty(h)){var v=t.getModel(["rich",h]);Fz(s[h]={},v,o,t,f,r,n,a,!1,!0)}}s&&(e.rich=s);var p=t.get("overflow");p&&(e.overflow=p);var m=t.get("lineOverflow");m&&(e.lineOverflow=m);var y=e,x=t.get("minMargin");if(x!=null)x=pt(x)?x/2:0,y.margin=[x,x,x,x],y.__marginType=Gh.minMargin;else{var b=t.get("textMargin");b!=null&&(y.margin=Cm(b),y.__marginType=Gh.textMargin)}Fz(e,t,o,null,null,r,n,a,!0,!1)}function ffe(e){for(var t;e&&e!==e.ecModel;){var r=(e.option||I_).rich;if(r){t=t||{};for(var n=dt(r),a=0;a<n.length;a++){var i=n[a];t[i]=1}}e=e.parentModel}return t}var Bz=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],zz=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Vz=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Fz(e,t,r,n,a,i,o,l,s,c){r=!o&&r||I_;var f=i&&i.inheritColor,h=t.getShallow("color"),v=t.getShallow("textBorderColor"),p=Ie(t.getShallow("opacity"),r.opacity);(h==="inherit"||h==="auto")&&(f?h=f:h=null),(v==="inherit"||v==="auto")&&(f?v=f:v=null),l||(h=h||r.color,v=v||r.textBorderColor),h!=null&&(e.fill=h),v!=null&&(e.stroke=v);var m=Ie(t.getShallow("textBorderWidth"),r.textBorderWidth);m!=null&&(e.lineWidth=m);var y=Ie(t.getShallow("textBorderType"),r.textBorderType);y!=null&&(e.lineDash=y);var x=Ie(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);x!=null&&(e.lineDashOffset=x),!o&&p==null&&!c&&(p=i&&i.defaultOpacity),p!=null&&(e.opacity=p),!o&&!l&&e.fill==null&&i.inheritColor&&(e.fill=i.inheritColor);for(var b=0;b<Bz.length;b++){var w=Bz[b],C=a!==!1&&n?ca(t.getShallow(w),n.getShallow(w),r[w]):Ie(t.getShallow(w),r[w]);C!=null&&(e[w]=C)}for(var b=0;b<zz.length;b++){var w=zz[b],C=t.getShallow(w);C!=null&&(e[w]=C)}if(e.verticalAlign==null){var A=t.getShallow("baseline");A!=null&&(e.verticalAlign=A)}if(!s||!i.disableBox){for(var b=0;b<Vz.length;b++){var w=Vz[b],C=t.getShallow(w);C!=null&&(e[w]=C)}var M=t.getShallow("borderType");M!=null&&(e.borderDash=M),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&f&&(e.backgroundColor=f),(e.borderColor==="auto"||e.borderColor==="inherit")&&f&&(e.borderColor=f)}}function UE(e,t){var r=t&&t.getModel("textStyle");return Ja([e.fontStyle||r&&r.getShallow("fontStyle")||"",e.fontWeight||r&&r.getShallow("fontWeight")||"",(e.fontSize||r&&r.getShallow("fontSize")||12)+"px",e.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}var Im=it();function N8(e,t,r,n){if(e){var a=Im(e);a.prevValue=a.value,a.value=r;var i=t.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=t)}}function hfe(e,t,r,n,a){var i=Im(e);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,l=Ie(i.interpolatedValue,i.prevValue),s=i.value;function c(f){var h=I6(r,i.precision,l,s,f);i.interpolatedValue=f===1?null:h;var v=iR({labelDataIndex:t,labelFetcher:a,defaultText:o?o(h):h+""},i.statesModels,h);E8(e,v)}e.percent=0,(i.prevValue==null?ir:_t)(e,{percent:1},n,t,null,c)}var Gh={minMargin:1,textMargin:2},dfe=["textStyle","color"],JT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],eA=new vt,vfe=(function(){function e(){}return e.prototype.getTextColor=function(t){var r=this.ecModel;return this.getShallow("color")||(!t&&r?r.get(dfe):null)},e.prototype.getFont=function(){return UE({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(t){for(var r={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<JT.length;n++)r[JT[n]]=this.getShallow(JT[n]);return eA.useStyle(r),eA.update(),eA.getBoundingRect()},e})(),L8=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],pfe=Oc(L8),gfe=(function(){function e(){}return e.prototype.getLineStyle=function(t){return pfe(this,t)},e})(),I8=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],mfe=Oc(I8),yfe=(function(){function e(){}return e.prototype.getItemStyle=function(t,r){return mfe(this,t,r)},e})(),ct=(function(){function e(t,r,n){this.parentModel=r,this.ecModel=n,this.option=t}return e.prototype.init=function(t,r,n){},e.prototype.mergeOption=function(t,r){Je(this.option,t,!0)},e.prototype.get=function(t,r){return t==null?this.option:this._doGet(this.parsePath(t),!r&&this.parentModel)},e.prototype.getShallow=function(t,r){var n=this.option,a=n==null?n:n[t];if(a==null&&!r){var i=this.parentModel;i&&(a=i.getShallow(t))}return a},e.prototype.getModel=function(t,r){var n=t!=null,a=n?this.parsePath(t):null,i=n?this._doGet(a):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new e(i,r,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var t=this.constructor;return new t(je(this.option))},e.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},e.prototype.resolveParentPath=function(t){return t},e.prototype.isAnimationEnabled=function(){if(!ht.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(t,r){var n=this.option;if(!t)return n;for(var a=0;a<t.length&&!(t[a]&&(n=n&&typeof n=="object"?n[t[a]]:null,n==null));a++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(t),r.parentModel)),n},e})();AE(ct);wue(ct);Cr(ct,gfe);Cr(ct,yfe);Cr(ct,Mue);Cr(ct,vfe);var xfe=Math.round(Math.random()*10);function uf(e){return[e||"",xfe++].join("_")}function Sfe(e){var t={};e.registerSubTypeDefaulter=function(r,n){var a=fo(r);t[a.main]=n},e.determineSubType=function(r,n){var a=n.type;if(!a){var i=fo(r).main;e.hasSubTypes(r)&&t[i]&&(a=t[i](n))}return a}}function bfe(e,t){e.topologicalTravel=function(i,o,l,s){if(!i.length)return;var c=r(o),f=c.graph,h=c.noEntryList,v={};for(B(i,function(w){v[w]=!0});h.length;){var p=h.pop(),m=f[p],y=!!v[p];y&&(l.call(s,p,m.originalDeps.slice()),delete v[p]),B(m.successor,y?b:x)}B(v,function(){var w="";throw new Error(w)});function x(w){f[w].entryCount--,f[w].entryCount===0&&h.push(w)}function b(w){v[w]=!0,x(w)}};function r(i){var o={},l=[];return B(i,function(s){var c=n(o,s),f=c.originalDeps=t(s),h=a(f,i);c.entryCount=h.length,c.entryCount===0&&l.push(s),B(h,function(v){qe(c.predecessor,v)<0&&c.predecessor.push(v);var p=n(o,v);qe(p.successor,v)<0&&p.successor.push(s)})}),{graph:o,noEntryList:l}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var l=[];return B(i,function(s){qe(o,s)>=0&&l.push(s)}),l}}function Js(e,t){return Je(Je({},e,!0),t,!0)}const _fe={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:". "}}}},wfe={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 JS="ZH",YE="EN",Xh=YE,sS={},$E={},O8=ht.domSupported?(function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Xh).toUpperCase();return e.indexOf(JS)>-1?JS:Xh})():Xh;function WE(e,t){e=e.toUpperCase(),$E[e]=new ct(t),sS[e]=t}function Cfe(e){if(De(e)){var t=sS[e.toUpperCase()]||{};return e===JS||e===YE?je(t):Je(je(t),je(sS[Xh]),!1)}else return Je(je(e),je(sS[Xh]),!1)}function oR(e){return $E[e]}function Tfe(){return $E[Xh]}WE(YE,_fe);WE(JS,wfe);var Afe=null;function Un(){return Afe}function k8(e,t){var r=Un(),n=t.breakOption,a=t.breakParsed;return!a&&r&&(a=r.parseAxisBreakOption(n,e)),a}function eb(e){var t=e.brk;return t?t.breaks:[]}function tb(e){var t=e.brk;return t?t.hasBreaks():!1}var qE=1e3,XE=qE*60,dg=XE*60,Ka=dg*24,Gz=Ka*365,Dfe={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},uS={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Mfe="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Y0="{yyyy}-{MM}-{dd}",Hz={year:"{yyyy}",month:"{yyyy}-{MM}",day:Y0,hour:Y0+" "+uS.hour,minute:Y0+" "+uS.minute,second:Y0+" "+uS.second,millisecond:Mfe},ba=["year","month","day","hour","minute","second","millisecond"],Rfe=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Efe(e){return!De(e)&&!Be(e)?Nfe(e):e}function Nfe(e){e=e||{};var t={},r=!0;return B(ba,function(n){r&&(r=e[n]==null)}),B(ba,function(n,a){var i=e[n];t[n]={};for(var o=null,l=a;l>=0;l--){var s=ba[l],c=Ve(i)&&!pe(i)?i[s]:i,f=void 0;pe(c)?(f=c.slice(),o=f[0]||""):De(c)?(o=c,f=[o]):(o==null?o=uS[n]:Dfe[s].test(o)||(o=t[s][s][0]+" "+o),f=[o],r&&(f[1]="{primary|"+o+"}")),t[n][s]=f}}),t}function Vn(e,t){return e+="","0000".substr(0,t-e.length)+e}function vg(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function Lfe(e){return e===vg(e)}function Ife(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Om(e,t,r,n){var a=Lo(e),i=a[P8(r)](),o=a[ZE(r)]()+1,l=Math.floor((o-1)/3)+1,s=a[KE(r)](),c=a["get"+(r?"UTC":"")+"Day"](),f=a[QE(r)](),h=(f-1)%12+1,v=a[JE(r)](),p=a[eN(r)](),m=a[tN(r)](),y=f>=12?"pm":"am",x=y.toUpperCase(),b=n instanceof ct?n:oR(n||O8)||Tfe(),w=b.getModel("time"),C=w.get("month"),A=w.get("monthAbbr"),M=w.get("dayOfWeek"),R=w.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,y+"").replace(/{A}/g,x+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Vn(i%100+"",2)).replace(/{Q}/g,l+"").replace(/{MMMM}/g,C[o-1]).replace(/{MMM}/g,A[o-1]).replace(/{MM}/g,Vn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Vn(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,M[c]).replace(/{ee}/g,R[c]).replace(/{e}/g,c+"").replace(/{HH}/g,Vn(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Vn(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Vn(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Vn(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Vn(m,3)).replace(/{S}/g,m+"")}function Ofe(e,t,r,n,a){var i=null;if(De(r))i=r;else if(Be(r)){var o={time:e.time,level:e.time?e.time.level:0},l=Un();l&&l.makeAxisLabelFormatterParamBreak(o,e.break),i=r(e.value,t,o)}else{var s=e.time;if(s){var c=r[s.lowerTimeUnit][s.upperTimeUnit];i=c[Math.min(s.level,c.length-1)]||""}else{var f=Zh(e.value,a);i=r[f][f][0]}}return Om(new Date(e.value),i,a,n)}function Zh(e,t){var r=Lo(e),n=r[ZE(t)]()+1,a=r[KE(t)](),i=r[QE(t)](),o=r[JE(t)](),l=r[eN(t)](),s=r[tN(t)](),c=s===0,f=c&&l===0,h=f&&o===0,v=h&&i===0,p=v&&a===1,m=p&&n===1;return m?"year":p?"month":v?"day":h?"hour":f?"minute":c?"second":"millisecond"}function rb(e,t,r){switch(t){case"year":e[j8(r)](0);case"month":e[B8(r)](1);case"day":e[z8(r)](0);case"hour":e[V8(r)](0);case"minute":e[F8(r)](0);case"second":e[G8(r)](0)}return e}function P8(e){return e?"getUTCFullYear":"getFullYear"}function ZE(e){return e?"getUTCMonth":"getMonth"}function KE(e){return e?"getUTCDate":"getDate"}function QE(e){return e?"getUTCHours":"getHours"}function JE(e){return e?"getUTCMinutes":"getMinutes"}function eN(e){return e?"getUTCSeconds":"getSeconds"}function tN(e){return e?"getUTCMilliseconds":"getMilliseconds"}function kfe(e){return e?"setUTCFullYear":"setFullYear"}function j8(e){return e?"setUTCMonth":"setMonth"}function B8(e){return e?"setUTCDate":"setDate"}function z8(e){return e?"setUTCHours":"setHours"}function V8(e){return e?"setUTCMinutes":"setMinutes"}function F8(e){return e?"setUTCSeconds":"setSeconds"}function G8(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Pfe(e,t,r,n,a,i,o,l){var s=new vt({style:{text:e,font:t,align:r,verticalAlign:n,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:l}});return s.getBoundingRect()}function rN(e){if(!bE(e))return De(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function nN(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Gd=Cm;function lR(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&Ja(f)?f:"-"}function i(f){return si(f)}var o=t==="time",l=e instanceof Date;if(o||l){var s=o?Lo(e):e;if(isNaN(+s)){if(l)return"-"}else return Om(s,n,r)}if(t==="ordinal")return LS(e)?a(e):pt(e)&&i(e)?e+"":"-";var c=Ao(e);return i(c)?rN(c):LS(e)?a(e):typeof e=="boolean"?e+"":"-"}var Uz=["a","b","c","d","e","f","g"],tA=function(e,t){return"{"+e+(t??"")+"}"};function aN(e,t,r){pe(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i<a.length;i++){var o=Uz[i];e=e.replace(tA(o),tA(o,0))}for(var l=0;l<n;l++)for(var s=0;s<a.length;s++){var c=t[l][a[s]];e=e.replace(tA(Uz[s],l),r?Mn(c):c)}return e}function H8(e,t,r){return B(t,function(n,a){e=e.replace("{"+a+"}",n)}),e}function U8(e,t){var r=De(e)?{color:e,extraCssText:t}:e||{},n=r.color,a=r.type;t=r.extraCssText;var i=r.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Mn(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Mn(n)+";"+(t||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function jfe(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd
42
+ yyyy`);var n=Lo(t),a=r?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,l=n[a+"Date"](),s=n[a+"Hours"](),c=n[a+"Minutes"](),f=n[a+"Seconds"](),h=n[a+"Milliseconds"]();return e=e.replace("MM",Vn(o,2)).replace("M",o).replace("yyyy",i).replace("yy",Vn(i%100+"",2)).replace("dd",Vn(l,2)).replace("d",l).replace("hh",Vn(s,2)).replace("h",s).replace("mm",Vn(c,2)).replace("m",c).replace("ss",Vn(f,2)).replace("s",f).replace("SSS",Vn(h,3)),e}function Bfe(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function Bc(e,t){return t=t||"transparent",De(e)?e:Ve(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function nb(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var cS={},rA={},Hd=(function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(cS),this._normalMasterList=n(rA);function n(a,i){var o=[];return B(a,function(l,s){var c=l.create(t,r);o=o.concat(c||[])}),o}},e.prototype.update=function(t,r){B(this._normalMasterList,function(n){n.update&&n.update(t,r)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(t,r){if(t==="matrix"||t==="calendar"){cS[t]=r;return}rA[t]=r},e.get=function(t){return rA[t]||cS[t]},e})();function zfe(e){return!!cS[e]}var Vfe=1,Y8=2;function Ffe(e){$8.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var $8=Le();function W8(e){var t=e.getShallow("coord",!0),r=Vfe;if(t==null){var n=$8.get(e.type);n&&n.getCoord2&&(r=Y8,t=n.getCoord2(e))}return{coord:t,from:r}}var Kh=0,fS=1,q8=2;function X8(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),a=Kh;if(r){var i=e.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=fS,i||(a=Kh)):n==="box"&&(a=q8,!i&&!zfe(r)&&(a=Kh))}return{coordSysType:r,kind:a}}function km(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,a=e.isDefaultDataCoordSys;e.allowNotFound;var i=X8(t),o=i.kind,l=i.coordSysType;if(a&&o!==fS&&(o=fS,l=r),o===Kh||l!==r)return Kh;var s=n(r,t);return s?(o===fS?t.coordinateSystem=s:t.boxCoordinateSystem=s,o):Kh}var Z8=function(e,t){var r=t.getReferringComponents(e,dr).models[0];return r&&r.coordinateSystem},hS=B,K8=["left","right","top","bottom","width","height"],gc=[["width","left","right"],["height","top","bottom"]];function iN(e,t,r,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var l=0;t.eachChild(function(s,c){var f=s.getBoundingRect(),h=t.childAt(c+1),v=h&&h.getBoundingRect(),p,m;if(e==="horizontal"){var y=f.width+(v?-v.x+f.x:0);p=i+y,p>n||s.newline?(i=0,p=y,o+=l+r,l=f.height):l=Math.max(l,f.height)}else{var x=f.height+(v?-v.y+f.y:0);m=o+x,m>a||s.newline?(i+=l+r,o=0,m=x,l=f.width):l=Math.max(l,f.width)}s.newline||(s.x=i,s.y=o,s.markRedraw(),e==="horizontal"?i=p+r:o=m+r)})}var Cc=iN;et(iN,"vertical");et(iN,"horizontal");function Q8(e,t){return{left:e.getShallow("left",t),top:e.getShallow("top",t),right:e.getShallow("right",t),bottom:e.getShallow("bottom",t),width:e.getShallow("width",t),height:e.getShallow("height",t)}}function Gfe(e,t){var r=Vr(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),a,i;if(r.type===$p.point)i=r.refPoint,a=Qt(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),l=pe(o)?o:[o,o];a=Qt(n,r.refContainer),i=r.boxCoordFrom===Y8?r.refPoint:[Re(l[0],a.width)+a.x,Re(l[1],a.height)+a.y]}return{viewRect:a,center:i}}function J8(e,t){var r=Gfe(e,t),n=r.viewRect,a=r.center,i=e.get("radius");pe(i)||(i=[0,i]);var o=Re(n.width,t.getWidth()),l=Re(n.height,t.getHeight()),s=Math.min(o,l),c=Re(i[0],s/2),f=Re(i[1],s/2);return{cx:a[0],cy:a[1],r0:c,r:f,viewRect:n}}function Qt(e,t,r){r=Gd(r||0);var n=t.width,a=t.height,i=Re(e.left,n),o=Re(e.top,a),l=Re(e.right,n),s=Re(e.bottom,a),c=Re(e.width,n),f=Re(e.height,a),h=r[2]+r[0],v=r[1]+r[3],p=e.aspect;switch(isNaN(c)&&(c=n-l-v-i),isNaN(f)&&(f=a-s-h-o),p!=null&&(isNaN(c)&&isNaN(f)&&(p>n/a?c=n*.8:f=a*.8),isNaN(c)&&(c=p*f),isNaN(f)&&(f=c/p)),isNaN(i)&&(i=n-l-c-v),isNaN(o)&&(o=a-s-f-h),e.left||e.right){case"center":i=n/2-c/2-r[3];break;case"right":i=n-c-v;break}switch(e.top||e.bottom){case"middle":case"center":o=a/2-f/2-r[0];break;case"bottom":o=a-f-h;break}i=i||0,o=o||0,isNaN(c)&&(c=n-v-i-(l||0)),isNaN(f)&&(f=a-h-o-(s||0));var m=new Fe((t.x||0)+i+r[3],(t.y||0)+o+r[0],c,f);return m.margin=r,m}function e7(e,t,r){var n=e.getShallow("preserveAspect",!0);if(!n)return t;var a=t.width/t.height;if(Math.abs(Math.atan(r)-Math.atan(a))<1e-9)return t;var i=e.getShallow("preserveAspectAlign",!0),o=e.getShallow("preserveAspectVerticalAlign",!0),l={width:t.width,height:t.height},s=n==="cover";return a>r&&!s||a<r&&s?(l.width=t.height*r,i==="left"?l.left=0:i==="right"?l.right=0:l.left="center"):(l.height=t.width/r,o==="top"?l.top=0:o==="bottom"?l.bottom=0:l.top="middle"),Qt(l,t)}var $p={rect:1,point:2};function Vr(e,t,r){var n,a,i,o=e.boxCoordinateSystem,l;if(o){var s=W8(e),c=s.coord,f=s.from;if(o.dataToLayout){i=$p.rect,l=f;var h=o.dataToLayout(c);n=h.contentRect||h.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(i=$p.point,l=f,a=o.dataToPoint(c))}return i==null&&(i=$p.rect),i===$p.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),a=[n.x+n.width/2,n.y+n.height/2]),{type:i,refContainer:n,refPoint:a,boxCoordFrom:l}}function O_(e,t,r,n,a,i){var o=!a||!a.hv||a.hv[0],l=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(i=i||e,i.x=e.x,i.y=e.y,!o&&!l)return!1;var c;if(s==="raw")c=e.type==="group"?new Fe(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(c=e.getBoundingRect(),e.needLocalTransform()){var f=e.getLocalTransform();c=c.clone(),c.applyTransform(f)}var h=Qt(Ue({width:c.width,height:c.height},t),r,n),v=o?h.x-c.x:0,p=l?h.y-c.y:0;return s==="raw"?(i.x=v,i.y=p):(i.x+=v,i.y+=p),i===e&&e.markRedraw(),!0}function Hfe(e,t){return e[gc[t][0]]!=null||e[gc[t][1]]!=null&&e[gc[t][2]]!=null}function Gg(e){var t=e.layoutMode||e.constructor.layoutMode;return Ve(t)?t:t?{type:t}:null}function Mo(e,t,r){var n=r&&r.ignoreSize;!pe(n)&&(n=[n,n]);var a=o(gc[0],0),i=o(gc[1],1);s(gc[0],e,a),s(gc[1],e,i);function o(c,f){var h={},v=0,p={},m=0,y=2;if(hS(c,function(w){p[w]=e[w]}),hS(c,function(w){Ne(t,w)&&(h[w]=p[w]=t[w]),l(h,w)&&v++,l(p,w)&&m++}),n[f])return l(t,c[1])?p[c[2]]=null:l(t,c[2])&&(p[c[1]]=null),p;if(m===y||!v)return p;if(v>=y)return h;for(var x=0;x<c.length;x++){var b=c[x];if(!Ne(h,b)&&Ne(e,b)){h[b]=e[b];break}}return h}function l(c,f){return c[f]!=null&&c[f]!=="auto"}function s(c,f,h){hS(c,function(v){f[v]=h[v]})}}function cf(e){return t7({},e)}function t7(e,t){return t&&e&&hS(K8,function(r){Ne(t,r)&&(e[r]=t[r])}),e}var Ufe=it(),lt=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this,r,n,a)||this;return i.uid=uf("ec_cpt_model"),i}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a)},t.prototype.mergeDefaultAndTheme=function(r,n){var a=Gg(this),i=a?cf(r):{},o=n.getTheme();Je(r,o.get(this.mainType)),Je(r,this.getDefaultOption()),a&&Mo(r,i,a)},t.prototype.mergeOption=function(r,n){Je(this.option,r,!0);var a=Gg(this);a&&Mo(this.option,r,a)},t.prototype.optionUpdated=function(r,n){},t.prototype.getDefaultOption=function(){var r=this.constructor;if(!Sue(r))return r.defaultOption;var n=Ufe(this);if(!n.defaultOption){for(var a=[],i=r;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var l={},s=a.length-1;s>=0;s--)l=Je(l,a[s],!0);n.defaultOption=l}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var a=r+"Index",i=r+"Id";return Od(this.ecModel,r,{index:this.get(a,!0),id:this.get(i,!0)},n)},t.prototype.getBoxLayoutParams=function(){return Q8(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(r){this.option.zlevel=r},t.protoInitialize=(function(){var r=t.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0})(),t})(ct);B6(lt,ct);C_(lt);Sfe(lt);bfe(lt,Yfe);function Yfe(e){var t=[];return B(lt.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=xe(t,function(r){return fo(r).main}),e!=="dataset"&&qe(t,"dataset")<=0&&t.unshift("dataset"),t}var re={color:{},darkColor:{},size:{}},br=re.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};he(br,{primary:br.neutral80,secondary:br.neutral70,tertiary:br.neutral60,quaternary:br.neutral50,disabled:br.neutral20,border:br.neutral30,borderTint:br.neutral20,borderShade:br.neutral40,background:br.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:br.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:br.neutral70,axisLineTint:br.neutral40,axisTick:br.neutral70,axisTickMinor:br.neutral60,axisLabel:br.neutral70,axisSplitLine:br.neutral15,axisMinorSplitLine:br.neutral05});for(var Yu in br)if(br.hasOwnProperty(Yu)){var Yz=br[Yu];Yu==="theme"?re.darkColor.theme=br.theme.slice():Yu==="highlight"?re.darkColor.highlight="rgba(255,231,130,0.4)":Yu.indexOf("accent")===0?re.darkColor[Yu]=vl(Yz,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):re.darkColor[Yu]=vl(Yz,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}re.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var r7="";typeof navigator<"u"&&(r7=navigator.platform||"");var gh="rgba(0, 0, 0, 0.2)",n7=re.color.theme[0],$fe=vl(n7,null,null,.9);const a7={darkMode:"auto",colorBy:"series",color:re.color.theme,gradientColor:[$fe,n7],aria:{decal:{decals:[{color:gh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:gh,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:gh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:gh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:gh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:gh,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:r7.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 dn={Must:1,Might:2,Not:3},i7=it();function Wfe(e){i7(e).datasetMap=Le()}function o7(e,t,r){var n={},a=lN(t);if(!a||!e)return n;var i=[],o=[],l=t.ecModel,s=i7(l).datasetMap,c=a.uid+"_"+r.seriesLayoutBy,f,h;e=e.slice(),B(e,function(y,x){var b=Ve(y)?y:e[x]={name:y};b.type==="ordinal"&&f==null&&(f=x,h=m(b)),n[b.name]=[]});var v=s.get(c)||s.set(c,{categoryWayDim:h,valueWayDim:0});B(e,function(y,x){var b=y.name,w=m(y);if(f==null){var C=v.valueWayDim;p(n[b],C,w),p(o,C,w),v.valueWayDim+=w}else if(f===x)p(n[b],0,w),p(i,0,w);else{var C=v.categoryWayDim;p(n[b],C,w),p(o,C,w),v.categoryWayDim+=w}});function p(y,x,b){for(var w=0;w<b;w++)y.push(x+w)}function m(y){var x=y.dimsDef;return x?x.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function oN(e,t,r){var n={},a=lN(e);if(!a)return n;var i=t.sourceFormat,o=t.dimensionsDefine,l;(i===Ra||i===Oi)&&B(o,function(f,h){(Ve(f)?f.name:f)==="name"&&(l=h)});var s=(function(){for(var f={},h={},v=[],p=0,m=Math.min(5,r);p<m;p++){var y=s7(t.data,i,t.seriesLayoutBy,o,t.startIndex,p);v.push(y);var x=y===dn.Not;if(x&&f.v==null&&p!==l&&(f.v=p),(f.n==null||f.n===f.v||!x&&v[f.n]===dn.Not)&&(f.n=p),b(f)&&v[f.n]!==dn.Not)return f;x||(y===dn.Might&&h.v==null&&p!==l&&(h.v=p),(h.n==null||h.n===h.v)&&(h.n=p))}function b(w){return w.v!=null&&w.n!=null}return b(f)?f:b(h)?h:null})();if(s){n.value=[s.v];var c=l??s.n;n.itemName=[c],n.seriesName=[c]}return n}function lN(e){var t=e.get("data",!0);if(!t)return Od(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},dr).models[0]}function qfe(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:Od(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},dr).models}function l7(e,t){return s7(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function s7(e,t,r,n,a,i){var o,l=5;if($n(e))return dn.Not;var s,c;if(n){var f=n[i];Ve(f)?(s=f.name,c=f.type):De(f)&&(s=f)}if(c!=null)return c==="ordinal"?dn.Must:dn.Not;if(t===an){var h=e;if(r===of){for(var v=h[i],p=0;p<(v||[]).length&&p<l;p++)if((o=A(v[a+p]))!=null)return o}else for(var p=0;p<h.length&&p<l;p++){var m=h[a+p];if(m&&(o=A(m[i]))!=null)return o}}else if(t===Ra){var y=e;if(!s)return dn.Not;for(var p=0;p<y.length&&p<l;p++){var x=y[p];if(x&&(o=A(x[s]))!=null)return o}}else if(t===Oi){var b=e;if(!s)return dn.Not;var v=b[s];if(!v||$n(v))return dn.Not;for(var p=0;p<v.length&&p<l;p++)if((o=A(v[p]))!=null)return o}else if(t===Ma)for(var w=e,p=0;p<w.length&&p<l;p++){var x=w[p],C=Id(x);if(!pe(C))return dn.Not;if((o=A(C[i]))!=null)return o}function A(M){var R=De(M);if(M!=null&&isFinite(Number(M))&&M!=="")return R?dn.Might:dn.Not;if(R&&M!=="-")return dn.Must}return dn.Not}var sR=Le();function Xfe(e,t){In(sR.get(e)==null&&t),sR.set(e,t)}function Zfe(e,t,r){var n=sR.get(t);if(!n)return r;var a=n(e);return a?r.concat(a):r}var $z=it(),Kfe=it(),sN=(function(){function e(){}return e.prototype.getColorFromPalette=function(t,r,n){var a=ar(this.get("color",!0)),i=this.get("colorLayer",!0);return u7(this,$z,a,i,t,r,n)},e.prototype.clearColorPalette=function(){Jfe(this,$z)},e})();function uR(e,t,r,n){var a=ar(e.get(["aria","decal","decals"]));return u7(e,Kfe,a,null,t,r,n)}function Qfe(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n].length>t)return e[n];return e[r-1]}function u7(e,t,r,n,a,i,o){i=i||e;var l=t(i),s=l.paletteIdx||0,c=l.paletteNameMap=l.paletteNameMap||{};if(c.hasOwnProperty(a))return c[a];var f=o==null||!n?r:Qfe(n,o);if(f=f||r,!(!f||!f.length)){var h=f[s];return a&&(c[a]=h),l.paletteIdx=(s+1)%f.length,h}}function Jfe(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var $0,hp,Wz,qz="\0_ec_inner",ehe=1,uN=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,a,i,o,l){i=i||{},this.option=null,this._theme=new ct(i),this._locale=new ct(o),this._optionManager=l},t.prototype.setOption=function(r,n,a){var i=Kz(n);this._optionManager.setOption(r,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(r,n){return this._resetOption(r,Kz(n))},t.prototype._resetOption=function(r,n){var a=!1,i=this._optionManager;if(!r||r==="recreate"){var o=i.mountOption(r==="recreate");!this.option||r==="recreate"?Wz(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var l=i.getTimelineOption(this);l&&(a=!0,this._mergeOption(l,n))}if(!r||r==="recreate"||r==="media"){var s=i.getMediaOption(this);s.length&&B(s,function(c){a=!0,this._mergeOption(c,n)},this)}return a},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,l=[],s=Le(),c=n&&n.replaceMergeMainTypeMap;Wfe(this),B(r,function(h,v){h!=null&&(lt.hasClass(v)?v&&(l.push(v),s.set(v,!0)):a[v]=a[v]==null?je(h):Je(a[v],h,!0))}),c&&c.each(function(h,v){lt.hasClass(v)&&!s.get(v)&&(l.push(v),s.set(v,!0))}),lt.topologicalTravel(l,lt.getAllClassMainTypes(),f,this);function f(h){var v=Zfe(this,h,ar(r[h])),p=i.get(h),m=p?c&&c.get(h)?"replaceMerge":"normalMerge":"replaceAll",y=E6(p,v,m);oue(y,h,lt),a[h]=null,i.set(h,null),o.set(h,0);var x=[],b=[],w=0,C;B(y,function(A,M){var R=A.existing,E=A.newOption;if(!E)R&&(R.mergeOption({},this),R.optionUpdated({},!1));else{var N=h==="series",L=lt.getClass(h,A.keyInfo.subType,!N);if(!L)return;if(h==="tooltip"){if(C)return;C=!0}if(R&&R.constructor===L)R.name=A.keyInfo.name,R.mergeOption(E,this),R.optionUpdated(E,!1);else{var O=he({componentIndex:M},A.keyInfo);R=new L(E,this,this,O),he(R,O),A.brandNew&&(R.__requireNewView=!0),R.init(E,this,this),R.optionUpdated(null,!0)}}R?(x.push(R.option),b.push(R),w++):(x.push(void 0),b.push(void 0))},this),a[h]=x,i.set(h,b),o.set(h,w),h==="series"&&$0(this)}this._seriesIndices||$0(this)},t.prototype.getOption=function(){var r=je(this.option);return B(r,function(n,a){if(lt.hasClass(a)){for(var i=ar(n),o=i.length,l=!1,s=o-1;s>=0;s--)i[s]&&!jg(i[s])?l=!0:(i[s]=null,!l&&o--);i.length=o,r[a]=i}}),delete r[qz],r},t.prototype.setTheme=function(r){this._theme=new ct(r),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(r){this._payload=r},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(r,n){var a=this._componentsMap.get(r);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},t.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var a=r.index,i=r.id,o=r.name,l=this._componentsMap.get(n);if(!l||!l.length)return[];var s;return a!=null?(s=[],B(ar(a),function(c){l[c]&&s.push(l[c])})):i!=null?s=Xz("id",i,l):o!=null?s=Xz("name",o,l):s=Bt(l,function(c){return!!c}),Zz(s,r)},t.prototype.findComponents=function(r){var n=r.query,a=r.mainType,i=l(n),o=i?this.queryComponents(i):Bt(this._componentsMap.get(a),function(c){return!!c});return s(Zz(o,r));function l(c){var f=a+"Index",h=a+"Id",v=a+"Name";return c&&(c[f]!=null||c[h]!=null||c[v]!=null)?{mainType:a,index:c[f],id:c[h],name:c[v]}:null}function s(c){return r.filter?Bt(c,r.filter):c}},t.prototype.eachComponent=function(r,n,a){var i=this._componentsMap;if(Be(r)){var o=n,l=r;i.each(function(h,v){for(var p=0;h&&p<h.length;p++){var m=h[p];m&&l.call(o,v,m,m.componentIndex)}})}else for(var s=De(r)?i.get(r):Ve(r)?this.findComponents(r):null,c=0;s&&c<s.length;c++){var f=s[c];f&&n.call(a,f,f.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=kr(r,null);return Bt(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},t.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},t.prototype.getSeriesByType=function(r){return Bt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return Bt(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){hp(this),B(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];r.call(n,i,a)},this)},t.prototype.eachRawSeries=function(r,n){B(this._componentsMap.get("series"),function(a){a&&r.call(n,a,a.componentIndex)})},t.prototype.eachSeriesByType=function(r,n,a){hp(this),B(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===r&&n.call(a,o,i)},this)},t.prototype.eachRawSeriesByType=function(r,n,a){return B(this.getSeriesByType(r),n,a)},t.prototype.isSeriesFiltered=function(r){return hp(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){hp(this);var a=[];B(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];r.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=Le(a)},t.prototype.restoreData=function(r){$0(this);var n=this._componentsMap,a=[];n.each(function(i,o){lt.hasClass(o)&&a.push(o)}),lt.topologicalTravel(a,lt.getAllClassMainTypes(),function(i){B(n.get(i),function(o){o&&(i!=="series"||!the(o,r))&&o.restoreData()})})},t.internalField=(function(){$0=function(r){var n=r._seriesIndices=[];B(r._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),r._seriesIndicesMap=Le(n)},hp=function(r){},Wz=function(r,n){r.option={},r.option[qz]=ehe,r._componentsMap=Le({series:[]}),r._componentsCount=Le();var a=n.aria;Ve(a)&&a.enabled==null&&(a.enabled=!0),rhe(n,r._theme.option),Je(n,a7,!1),r._mergeOption(n,null)}})(),t})(ct);function the(e,t){if(t){var r=t.seriesIndex,n=t.seriesId,a=t.seriesName;return r!=null&&e.componentIndex!==r||n!=null&&e.id!==n||a!=null&&e.name!==a}}function rhe(e,t){var r=e.color&&!e.colorLayer;B(t,function(n,a){a==="colorLayer"&&r||a==="color"&&e.color||lt.hasClass(a)||(typeof n=="object"?e[a]=e[a]?Je(e[a],n,!1):je(n):e[a]==null&&(e[a]=n))})}function Xz(e,t,r){if(pe(t)){var n=Le();return B(t,function(i){if(i!=null){var o=kr(i,null);o!=null&&n.set(i,!0)}}),Bt(r,function(i){return i&&n.get(i[e])})}else{var a=kr(t,null);return Bt(r,function(i){return i&&a!=null&&i[e]===a})}}function Zz(e,t){return t.hasOwnProperty("subType")?Bt(e,function(r){return r&&r.subType===t.subType}):e}function Kz(e){var t=Le();return e&&B(ar(e.replaceMerge),function(r){t.set(r,!0)}),{replaceMergeMainTypeMap:t}}Cr(uN,sN);var nhe=/^(min|max)?(.+)$/,ahe=(function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(B(ar(t.series),function(o){o&&o.data&&$n(o.data)&&Mg(o.data)}),B(ar(t.dataset),function(o){o&&o.source&&$n(o.source)&&Mg(o.source)})),t=je(t);var a=this._optionBackup,i=ihe(t,r,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(t){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],je(t?r.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var r,n=this._timelineOptions;if(n.length){var a=t.getComponent("timeline");a&&(r=je(n[a.getCurrentIndex()]))}return r},e.prototype.getMediaOption=function(t){var r=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],l=[];if(!a.length&&!i)return l;for(var s=0,c=a.length;s<c;s++)ohe(a[s].query,r,n)&&o.push(s);return!o.length&&i&&(o=[-1]),o.length&&!she(o,this._currentMediaIndices)&&(l=xe(o,function(f){return je(f===-1?i.option:a[f].option)})),this._currentMediaIndices=o,l},e})();function ihe(e,t,r){var n=[],a,i,o=e.baseOption,l=e.timeline,s=e.options,c=e.media,f=!!e.media,h=!!(s||l||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=l)):((h||f)&&(e.options=e.media=null),i=e),f&&pe(c)&&B(c,function(p){p&&p.option&&(p.query?n.push(p):a||(a=p))}),v(i),B(s,function(p){return v(p)}),B(n,function(p){return v(p.option)});function v(p){B(t,function(m){m(p,r)})}return{baseOption:i,timelineOptions:s||[],mediaDefault:a,mediaList:n}}function ohe(e,t,r){var n={width:t,height:r,aspectratio:t/r},a=!0;return B(e,function(i,o){var l=o.match(nhe);if(!(!l||!l[1]||!l[2])){var s=l[1],c=l[2].toLowerCase();lhe(n[c],i,s)||(a=!1)}}),a}function lhe(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function she(e,t){return e.join(",")===t.join(",")}var bi=B,Hg=Ve,Qz=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function nA(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=Qz.length;r<n;r++){var a=Qz[r],i=t.normal,o=t.emphasis;i&&i[a]&&(e[a]=e[a]||{},e[a].normal?Je(e[a].normal,i[a]):e[a].normal=i[a],i[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?Je(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function Dn(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,a=e[t].emphasis;n&&(r?(e[t].normal=e[t].emphasis=null,Ue(e[t],n)):e[t]=n),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a,a.focus&&(e.emphasis.focus=a.focus),a.blurScope&&(e.emphasis.blurScope=a.blurScope))}}function Wp(e){Dn(e,"itemStyle"),Dn(e,"lineStyle"),Dn(e,"areaStyle"),Dn(e,"label"),Dn(e,"labelLine"),Dn(e,"upperLabel"),Dn(e,"edgeLabel")}function Dr(e,t){var r=Hg(e)&&e[t],n=Hg(r)&&r.textStyle;if(n)for(var a=0,i=tz.length;a<i;a++){var o=tz[a];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Wa(e){e&&(Wp(e),Dr(e,"label"),e.emphasis&&Dr(e.emphasis,"label"))}function uhe(e){if(Hg(e)){nA(e),Wp(e),Dr(e,"label"),Dr(e,"upperLabel"),Dr(e,"edgeLabel"),e.emphasis&&(Dr(e.emphasis,"label"),Dr(e.emphasis,"upperLabel"),Dr(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(nA(t),Wa(t));var r=e.markLine;r&&(nA(r),Wa(r));var n=e.markArea;n&&Wa(n);var a=e.data;if(e.type==="graph"){a=a||e.nodes;var i=e.links||e.edges;if(i&&!$n(i))for(var o=0;o<i.length;o++)Wa(i[o]);B(e.categories,function(c){Wp(c)})}if(a&&!$n(a))for(var o=0;o<a.length;o++)Wa(a[o]);if(t=e.markPoint,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)Wa(l[o]);if(r=e.markLine,r&&r.data)for(var s=r.data,o=0;o<s.length;o++)pe(s[o])?(Wa(s[o][0]),Wa(s[o][1])):Wa(s[o]);e.type==="gauge"?(Dr(e,"axisLabel"),Dr(e,"title"),Dr(e,"detail")):e.type==="treemap"?(Dn(e.breadcrumb,"itemStyle"),B(e.levels,function(c){Wp(c)})):e.type==="tree"&&Wp(e.leaves)}}function Qo(e){return pe(e)?e:e?[e]:[]}function Jz(e){return(pe(e)?e[0]:e)||{}}function che(e,t){bi(Qo(e.series),function(n){Hg(n)&&uhe(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),bi(r,function(n){bi(Qo(e[n]),function(a){a&&(Dr(a,"axisLabel"),Dr(a.axisPointer,"label"))})}),bi(Qo(e.parallel),function(n){var a=n&&n.parallelAxisDefault;Dr(a,"axisLabel"),Dr(a&&a.axisPointer,"label")}),bi(Qo(e.calendar),function(n){Dn(n,"itemStyle"),Dr(n,"dayLabel"),Dr(n,"monthLabel"),Dr(n,"yearLabel")}),bi(Qo(e.radar),function(n){Dr(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),bi(Qo(e.geo),function(n){Hg(n)&&(Wa(n),bi(Qo(n.regions),function(a){Wa(a)}))}),bi(Qo(e.timeline),function(n){Wa(n),Dn(n,"label"),Dn(n,"itemStyle"),Dn(n,"controlStyle",!0);var a=n.data;pe(a)&&B(a,function(i){Ve(i)&&(Dn(i,"label"),Dn(i,"itemStyle"))})}),bi(Qo(e.toolbox),function(n){Dn(n,"iconStyle"),bi(n.feature,function(a){Dn(a,"iconStyle")})}),Dr(Jz(e.axisPointer),"label"),Dr(Jz(e.tooltip).axisPointer,"label")}function fhe(e,t){for(var r=t.split(","),n=e,a=0;a<r.length&&(n=n&&n[r[a]],n!=null);a++);return n}function hhe(e,t,r,n){for(var a=t.split(","),i=e,o,l=0;l<a.length-1;l++)o=a[l],i[o]==null&&(i[o]={}),i=i[o];i[a[l]]==null&&(i[a[l]]=r)}function e3(e){e&&B(dhe,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var dhe=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],vhe=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],aA=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function dp(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<aA.length;r++){var n=aA[r][1],a=aA[r][0];t[n]!=null&&(t[a]=t[n])}}function t3(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function r3(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function phe(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function c7(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&c7(e[r].children,t)}function f7(e,t){che(e,t),e.series=ar(e.series),B(e.series,function(r){if(Ve(r)){var n=r.type;if(n==="line")r.clipOverflow!=null&&(r.clip=r.clipOverflow);else if(n==="pie"||n==="gauge"){r.clockWise!=null&&(r.clockwise=r.clockWise),t3(r.label);var a=r.data;if(a&&!$n(a))for(var i=0;i<a.length;i++)t3(a[i]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=fhe(r,"pointer.color");o!=null&&hhe(r,"itemStyle.color",o)}else if(n==="bar"){dp(r),dp(r.backgroundStyle),dp(r.emphasis);var a=r.data;if(a&&!$n(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(dp(a[i]),dp(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var l=r.highlightPolicy;l&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=l)),r3(r),c7(r.data,r3)}else n==="graph"||n==="sankey"?phe(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&Ue(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),e3(r)}}),e.dataRange&&(e.visualMap=e.dataRange),B(vhe,function(r){var n=e[r];n&&(pe(n)||(n=[n]),B(n,function(a){e3(a)}))})}var ghe=Dm(mhe);function mhe(e){var t=Le();e.eachSeries(function(r){var n=r.get("stack");if(n){var a=t.get(n)||t.set(n,[]),i=r.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.push(o)}}),t.each(function(r){if(r.length!==0){var n=r[0].seriesModel,a=n.get("stackOrder")||"seriesAsc";a==="seriesDesc"&&r.reverse(),B(r,function(i,o){i.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),yhe(r)}})}function yhe(e){B(e,function(t,r){var n=[],a=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,l=t.isStackedByIndex,s=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(c,f,h){var v=o.get(t.stackedDimension,h);if(isNaN(v))return a;var p,m;l?m=o.getRawIndex(h):p=o.get(t.stackedByDimension,h);for(var y=NaN,x=r-1;x>=0;x--){var b=e[x];if(l||(m=b.data.rawIndexOf(b.stackedByDimension,p)),m>=0){var w=b.data.getByRawIndex(b.stackResultDimension,m);if(s==="all"||s==="positive"&&w>0||s==="negative"&&w<0||s==="samesign"&&v>=0&&w>0||s==="samesign"&&v<=0&&w<0){v=rc(v,w),y=w;break}}}return n[0]=v,n[1]=y,n})})}var k_=(function(){function e(t){this.data=t.data||(t.sourceFormat===Oi?{}:[]),this.sourceFormat=t.sourceFormat||Q6,this.seriesLayoutBy=t.seriesLayoutBy||Mi,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var r=this.dimensionsDefine=t.dimensionsDefine;if(r)for(var n=0;n<r.length;n++){var a=r[n];a.type==null&&l7(this,n)===dn.Must&&(a.type="ordinal")}}return e})();function cN(e){return e instanceof k_}function cR(e,t,r){r=r||h7(e);var n=t.seriesLayoutBy,a=She(e,r,n,t.sourceHeader,t.dimensions),i=new k_({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:je(t)});return i}function fN(e){return new k_({data:e,sourceFormat:$n(e)?Ns:Ma})}function xhe(e){return new k_({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:je(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function h7(e){var t=Q6;if($n(e))t=Ns;else if(pe(e)){e.length===0&&(t=an);for(var r=0,n=e.length;r<n;r++){var a=e[r];if(a!=null){if(pe(a)||$n(a)){t=an;break}else if(Ve(a)){t=Ra;break}}}}else if(Ve(e)){for(var i in e)if(Ne(e,i)&&Sn(e[i])){t=Oi;break}}return t}function She(e,t,r,n,a){var i,o;if(!e)return{dimensionsDefine:n3(a),startIndex:o,dimensionsDetectedCount:i};if(t===an){var l=e;n==="auto"||n==null?a3(function(c){c!=null&&c!=="-"&&(De(c)?o==null&&(o=1):o=0)},r,l,10):o=pt(n)?n:n?1:0,!a&&o===1&&(a=[],a3(function(c,f){a[f]=c!=null?c+"":""},r,l,1/0)),i=a?a.length:r===of?l.length:l[0]?l[0].length:null}else if(t===Ra)a||(a=bhe(e));else if(t===Oi)a||(a=[],B(e,function(c,f){a.push(f)}));else if(t===Ma){var s=Id(e[0]);i=pe(s)&&s.length||1}return{startIndex:o,dimensionsDefine:n3(a),dimensionsDetectedCount:i}}function bhe(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return dt(r)}function n3(e){if(e){var t=Le();return xe(e,function(r,n){r=Ve(r)?r:{name:r};var a={name:r.name,displayName:r.displayName,type:r.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=t.get(a.name);return i?a.name+="-"+i.count++:t.set(a.name,{count:1}),a})}}function a3(e,t,r,n){if(t===of)for(var a=0;a<r.length&&a<n;a++)e(r[a]?r[a][0]:null,a);else for(var i=r[0]||[],a=0;a<i.length&&a<n;a++)e(i[a],a)}function d7(e){var t=e.sourceFormat;return t===Ra||t===Oi}var $u,Wu,qu,Xu,i3,o3,v7=(function(){function e(t,r){var n=cN(t)?t:fN(t);this._source=n;var a=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===Ns&&(this._offset=0,this._dimSize=r,this._data=a),o3(this,a,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(t,r){},e.prototype.appendData=function(t){},e.prototype.clean=function(){},e.protoInitialize=(function(){var t=e.prototype;t.pure=!1,t.persistent=!0})(),e.internalField=(function(){var t;o3=function(o,l,s){var c=s.sourceFormat,f=s.seriesLayoutBy,h=s.startIndex,v=s.dimensionsDefine,p=i3[hN(c,f)];if(he(o,p),c===Ns)o.getItem=r,o.count=a,o.fillStorage=n;else{var m=p7(c,f);o.getItem=Ee(m,null,l,h,v);var y=g7(c,f);o.count=Ee(y,null,l,h,v)}};var r=function(o,l){o=o-this._offset,l=l||[];for(var s=this._data,c=this._dimSize,f=c*o,h=0;h<c;h++)l[h]=s[f+h];return l},n=function(o,l,s,c){for(var f=this._data,h=this._dimSize,v=0;v<h;v++){for(var p=c[v],m=p[0]==null?1/0:p[0],y=p[1]==null?-1/0:p[1],x=l-o,b=s[v],w=0;w<x;w++){var C=f[w*h+v];b[o+w]=C,C<m&&(m=C),C>y&&(y=C)}p[0]=m,p[1]=y}},a=function(){return this._data?this._data.length/this._dimSize:0};i3=(t={},t[an+"_"+Mi]={pure:!0,appendData:i},t[an+"_"+of]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ra]={pure:!0,appendData:i},t[Oi]={pure:!0,appendData:function(o){var l=this._data;B(o,function(s,c){for(var f=l[c]||(l[c]=[]),h=0;h<(s||[]).length;h++)f.push(s[h])})}},t[Ma]={appendData:i},t[Ns]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var l=0;l<o.length;l++)this._data.push(o[l])}})(),e})(),W0=function(e){pe(e)||D6("series.data or dataset.source must be an array.")};$u={},$u[an+"_"+Mi]=W0,$u[an+"_"+of]=W0,$u[Ra]=W0,$u[Oi]=function(e,t){for(var r=0;r<t.length;r++){var n=t[r].name;n==null&&D6("dimension name must not be null/undefined.")}},$u[Ma]=W0;var l3=function(e,t,r,n){return e[n]},_he=(Wu={},Wu[an+"_"+Mi]=function(e,t,r,n){return e[n+t]},Wu[an+"_"+of]=function(e,t,r,n,a){n+=t;for(var i=a||[],o=e,l=0;l<o.length;l++){var s=o[l];i[l]=s?s[n]:null}return i},Wu[Ra]=l3,Wu[Oi]=function(e,t,r,n,a){for(var i=a||[],o=0;o<r.length;o++){var l=r[o].name,s=l!=null?e[l]:null;i[o]=s?s[n]:null}return i},Wu[Ma]=l3,Wu);function p7(e,t){var r=_he[hN(e,t)];return r}var s3=function(e,t,r){return e.length},whe=(qu={},qu[an+"_"+Mi]=function(e,t,r){return Math.max(0,e.length-t)},qu[an+"_"+of]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},qu[Ra]=s3,qu[Oi]=function(e,t,r){var n=r[0].name,a=n!=null?e[n]:null;return a?a.length:0},qu[Ma]=s3,qu);function g7(e,t){var r=whe[hN(e,t)];return r}var iA=function(e,t,r){return e[t]},Che=(Xu={},Xu[an]=iA,Xu[Ra]=function(e,t,r){return e[r]},Xu[Oi]=iA,Xu[Ma]=function(e,t,r){var n=Id(e);return n instanceof Array?n[t]:n},Xu[Ns]=iA,Xu);function m7(e){var t=Che[e];return t}function hN(e,t){return e===an?e+"_"+t:e}function dd(e,t,r){if(e){var n=e.getRawDataItem(t);if(n!=null){var a=e.getStore(),i=a.getSource().sourceFormat;if(r!=null){var o=e.getDimensionIndex(r),l=a.getDimensionProperty(o);return m7(i)(n,o,l)}else{var s=n;return i===Ma&&(s=Id(n)),s}}}}var The=/\{@(.+?)\}/g,P_=(function(){function e(){}return e.prototype.getDataParams=function(t,r){var n=this.getData(r),a=this.getRawValue(t,r),i=n.getRawIndex(t),o=n.getName(t),l=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),c=s&&s[n.getItemVisual(t,"drawType")||"fill"],f=s&&s.stroke,h=this.mainType,v=h==="series",p=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:o,dataIndex:i,data:l,dataType:r,value:a,color:c,borderColor:f,dimensionNames:p?p.fullDimensions:null,encode:p?p.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,r,n,a,i,o){r=r||"normal";var l=this.getData(n),s=this.getDataParams(t,n);if(o&&(s.value=o.interpolatedValue),a!=null&&pe(s.value)&&(s.value=s.value[a]),!i){var c=l.getItemModel(t);i=c.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Be(i))return s.status=r,s.dimensionIndex=a,i(s);if(De(i)){var f=aN(i,s);return f.replace(The,function(h,v){var p=v.length,m=v;m.charAt(0)==="["&&m.charAt(p-1)==="]"&&(m=+m.slice(1,p-1));var y=dd(l,t,m);if(o&&pe(o.interpolatedValue)){var x=l.getDimensionIndex(m);x>=0&&(y=o.interpolatedValue[x])}return y!=null?y+"":""})}},e.prototype.getRawValue=function(t,r){return dd(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e})();function u3(e){var t,r;return Ve(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function pg(e){return new Ahe(e)}var Ahe=(function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var r=this._upstream,n=t&&t.skip;if(this._dirty&&r){var a=this.context;a.data=a.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),l=this._modDataCount||0,s=f(t&&t.modBy),c=t&&t.modDataCount||0;(o!==s||l!==c)&&(i="reset");function f(w){return!(w>=1)&&(w=1),w}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=s,this._modDataCount=c;var v=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,m=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!n&&(h||p<m)){var y=this._progress;if(pe(y))for(var x=0;x<y.length;x++)this._doProgress(y[x],p,m,s,c);else this._doProgress(y,p,m,s,c)}this._dueIndex=m;var b=this._settedOutputEnd!=null?this._settedOutputEnd:m;this._outputDueEnd=b}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(t,r,n,a,i){c3.reset(r,n,a,i),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:c3.next},this.context)},e.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var r,n;!t&&this._reset&&(r=this._reset(this.context),r&&r.progress&&(n=r.forceFirstProgress,r=r.progress),pe(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e})(),c3=(function(){var e,t,r,n,a,i={reset:function(s,c,f,h){t=s,e=c,r=f,n=h,a=Math.ceil(n/r),i.next=r>1&&n>0?l:o}};return i;function o(){return t<e?t++:null}function l(){var s=t%a*r+Math.ceil(t/a),c=t>=e?null:s<n?s:t;return t++,c}})();function Is(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!pt(e)&&e!=null&&e!=="-"&&(e=+Lo(e)),e==null||e===""?NaN:Number(e))}var Dhe=Le({number:function(e){return parseFloat(e)},time:function(e){return+Lo(e)},trim:function(e){return De(e)?Ja(e):e}});function y7(e){return Dhe.get(e)}var x7={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},Mhe=(function(){function e(t,r){if(!pt(r)){var n="";wt(n)}this._opFn=x7[t],this._rvalFloat=Ao(r)}return e.prototype.evaluate=function(t){return pt(t)?this._opFn(t,this._rvalFloat):this._opFn(Ao(t),this._rvalFloat)},e})(),S7=(function(){function e(t,r){var n=t==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return e.prototype.evaluate=function(t,r){var n=pt(t)?t:Ao(t),a=pt(r)?r:Ao(r),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var l=De(t),s=De(r);l&&(n=s?t:0),s&&(a=l?r:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},e})(),Rhe=(function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=Ao(r)}return e.prototype.evaluate=function(t){var r=t===this._rval;if(!r){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Ao(t)===this._rvalFloat)}return this._isEQ?r:!r},e})();function Ehe(e,t){return e==="eq"||e==="ne"?new Rhe(e==="eq",t):Ne(x7,e)?new Mhe(e,t):null}function b7(e){var t="",r=-1/0,n=-1/0,a=1/0,i=1/0;return e&&(e.g!=null&&(t+="G"+e.g,r=e.g),e.ge!=null&&(t+="GE"+e.ge,n=e.ge),e.l!=null&&(t+="L"+e.l,a=e.l),e.le!=null&&(t+="LE"+e.le,i=e.le)),{key:t,g:r,ge:n,l:a,le:i}}function _7(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var Nhe=(function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,r){},e.prototype.retrieveValueFromItem=function(t,r){},e.prototype.convertValue=function(t,r){return Is(t,r)},e})();function Lhe(e,t){var r=new Nhe,n=e.data,a=r.sourceFormat=e.sourceFormat,i=e.startIndex,o="";e.seriesLayoutBy!==Mi&&wt(o);var l=[],s={},c=e.dimensionsDefine;if(c)B(c,function(y,x){var b=y.name,w={index:x,name:b,displayName:y.displayName};if(l.push(w),b!=null){var C="";Ne(s,b)&&wt(C),s[b]=w}});else for(var f=0;f<e.dimensionsDetectedCount;f++)l.push({index:f});var h=p7(a,Mi);t.__isBuiltIn&&(r.getRawDataItem=function(y){return h(n,i,l,y)},r.getRawData=Ee(Ihe,null,e)),r.cloneRawData=Ee(Ohe,null,e);var v=g7(a,Mi);r.count=Ee(v,null,n,i,l);var p=m7(a);r.retrieveValue=function(y,x){var b=h(n,i,l,y);return m(b,x)};var m=r.retrieveValueFromItem=function(y,x){if(y!=null){var b=l[x];if(b)return p(y,x,b.name)}};return r.getDimensionInfo=Ee(khe,null,l,s),r.cloneAllDimensionInfo=Ee(Phe,null,l),r}function Ihe(e){var t=e.sourceFormat;if(!dN(t)){var r="";wt(r)}return e.data}function Ohe(e){var t=e.sourceFormat,r=e.data;if(!dN(t)){var n="";wt(n)}if(t===an){for(var a=[],i=0,o=r.length;i<o;i++)a.push(r[i].slice());return a}else if(t===Ra){for(var a=[],i=0,o=r.length;i<o;i++)a.push(he({},r[i]));return a}}function khe(e,t,r){if(r!=null){if(pt(r)||!isNaN(r)&&!Ne(t,r))return e[r];if(Ne(t,r))return t[r]}}function Phe(e){return je(e)}var w7=Le();function jhe(e){e=je(e);var t=e.type,r="";t||wt(r);var n=t.split(":");n.length!==2&&wt(r);var a=!1;n[0]==="echarts"&&(t=n[1],a=!0),e.__isBuiltIn=a,w7.set(t,e)}function Bhe(e,t,r){var n=ar(e),a=n.length,i="";a||wt(i);for(var o=0,l=a;o<l;o++){var s=n[o];t=zhe(s,t),o!==l-1&&(t.length=Math.max(t.length,1))}return t}function zhe(e,t,r,n){var a="";t.length||wt(a),Ve(e)||wt(a);var i=e.type,o=w7.get(i);o||wt(a);var l=xe(t,function(c){return Lhe(c,o)}),s=ar(o.transform({upstream:l[0],upstreamList:l,config:je(e.config)}));return xe(s,function(c,f){var h="";Ve(c)||wt(h),c.data||wt(h);var v=h7(c.data);dN(v)||wt(h);var p,m=t[0];if(m&&f===0&&!c.dimensions){var y=m.startIndex;y&&(c.data=m.data.slice(0,y).concat(c.data)),p={seriesLayoutBy:Mi,sourceHeader:y,dimensions:m.metaRawOption.dimensions}}else p={seriesLayoutBy:Mi,sourceHeader:0,dimensions:c.dimensions};return cR(c.data,p,null)})}function dN(e){return e===an||e===Ra}var Vhe=typeof Uint32Array===Pd?Array:Uint32Array,Fhe=typeof Uint16Array===Pd?Array:Uint16Array,C7=typeof Int32Array===Pd?Array:Int32Array,f3=typeof Float64Array===Pd?Array:Float64Array,T7={float:f3,int:C7,ordinal:Array,number:Array,time:f3},oA;function mh(e){return e>65535?Vhe:Fhe}function Ghe(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function h3(e,t,r,n,a){var i=T7[r||"float"];if(a){var o=e[t],l=o&&o.length;if(l!==n){for(var s=new i(n),c=0;c<l;c++)s[c]=o[c];e[t]=s}}else e[t]=new i(n)}var fR=(function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Le()}return e.prototype.initData=function(t,r,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=t.getSource(),i=this.defaultDimValueGetter=oA[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],d7(a),this._dimensions=xe(r,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(t,r){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(t);if(i!=null){if(a[i].type===r)return i}else i=a.length;return a[i]={type:r},n.set(t,i),this._chunks[i]=new T7[r||"float"](this._rawCount),this._rawExtent[i]=yn(),i},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],a=this._dimensions[t],i=this._rawExtent,o=a.ordinalOffset||0,l=n.length;o===0&&(i[t]=yn());for(var s=i[t],c=o;c<l;c++){var f=n[c]=r.parseAndCollect(n[c]);isNaN(f)||(s[0]=Math.min(f,s[0]),s[1]=Math.max(f,s[1]))}a.ordinalMeta=r,a.ordinalOffset=l,a.type="ordinal"},e.prototype.getOrdinalMeta=function(t){var r=this._dimensions[t],n=r.ordinalMeta;return n},e.prototype.getDimensionProperty=function(t){var r=this._dimensions[t];return r&&r.property},e.prototype.appendData=function(t){var r=this._provider,n=this.count();r.appendData(t);var a=r.count();return r.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,l=this.count(),s=l+Math.max(t.length,r||0),c=0;c<i;c++){var f=a[c];h3(n,c,f.type,s,!0)}for(var h=[],v=l;v<s;v++)for(var p=v-l,m=0;m<i;m++){var f=a[m],y=oA.arrayRows.call(this,t[p]||h,f.property,p,m);n[m][v]=y;var x=o[m];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}return this._rawCount=this._count=s,{start:l,end:s}},e.prototype._initDataFromProvider=function(t,r,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,l=o.length,s=this._rawExtent,c=xe(o,function(w){return w.property}),f=0;f<l;f++){var h=o[f];s[f]||(s[f]=yn()),h3(i,f,h.type,r,n)}if(a.fillStorage)a.fillStorage(t,r,i,s);else for(var v=[],p=t;p<r;p++){v=a.getItem(p,v);for(var m=0;m<l;m++){var y=i[m],x=this._dimValueGetter(v,c[m],p,m);y[p]=x;var b=s[m];x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=r,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,r){if(!(r>=0&&r<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(r)]:NaN},e.prototype.getValues=function(t,r){var n=[],a=[];if(r==null){r=t,t=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=t;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],r));return n},e.prototype.getByRawIndex=function(t,r){if(!(r>=0&&r<this._rawCount))return NaN;var n=this._chunks[t];return n?n[r]:NaN},e.prototype.getSum=function(t){var r=this._chunks[t],n=0;if(r)for(var a=0,i=this.count();a<i;a++){var o=this.get(t,a);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(a){isNaN(a)||r.push(a)}),nn(r);var n=this.count();return n===0?0:n%2===1?r[(n-1)/2]:(r[n/2]+r[n/2-1])/2},e.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var r=this._indices,n=r[t];if(n!=null&&n<this._count&&n===t)return t;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(r[o]<t)a=o+1;else if(r[o]>t)i=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i<a;i++)t[i]=r[i]}else t=new n(r.buffer,0,a)}else{var n=mh(this._rawCount);t=new n(this.count());for(var i=0;i<t.length;i++)t[i]=i}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=mh(n._rawCount),o=new i(a),l=[],s=t.length,c=0,f=t[0],h=n._chunks,v=0;v<a;v++){var p=void 0,m=n.getRawIndex(v);if(s===0)p=r(v);else if(s===1){var y=h[f][m];p=r(y,v)}else{for(var x=0;x<s;x++)l[x]=h[t[x]][m];l[x]=v,p=r.apply(null,l)}p&&(o[c++]=m)}return c<a&&(n._indices=o),n._count=c,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var a=dt(t),i=a.length;if(!i)return this;var o=r.count(),l=mh(r._rawCount),s=new l(o),c=0,f=a[0],h=t[f][0],v=t[f][1],p=r._chunks,m=!1;if(!r._indices){var y=0;if(i===1){for(var x=p[a[0]],b=0;b<n;b++){var w=x[b];(w>=h&&w<=v||isNaN(w))&&(s[c++]=y),y++}m=!0}else if(i===2){for(var x=p[a[0]],C=p[a[1]],A=t[a[1]][0],M=t[a[1]][1],b=0;b<n;b++){var w=x[b],R=C[b];(w>=h&&w<=v||isNaN(w))&&(R>=A&&R<=M||isNaN(R))&&(s[c++]=y),y++}m=!0}}if(!m)if(i===1)for(var b=0;b<o;b++){var E=r.getRawIndex(b),w=p[a[0]][E];(w>=h&&w<=v||isNaN(w))&&(s[c++]=E)}else for(var b=0;b<o;b++){for(var N=!0,E=r.getRawIndex(b),L=0;L<i;L++){var O=a[L],w=p[O][E];(w<t[O][0]||w>t[O][1])&&(N=!1)}N&&(s[c++]=r.getRawIndex(b))}return c<o&&(r._indices=s),r._count=c,r._extent=[],r._updateGetRawIdx(),r},e.prototype.map=function(t,r){var n=this.clone(t);return this._updateDims(n,t,r),n},e.prototype.modify=function(t,r){this._updateDims(this,t,r)},e.prototype._updateDims=function(t,r,n){for(var a=t._chunks,i=[],o=r.length,l=t.count(),s=[],c=t._rawExtent,f=0;f<r.length;f++)c[r[f]]=yn();for(var h=0;h<l;h++){for(var v=t.getRawIndex(h),p=0;p<o;p++)s[p]=a[r[p]][v];s[o]=h;var m=n&&n.apply(null,s);if(m!=null){typeof m!="object"&&(i[0]=m,m=i);for(var f=0;f<m.length;f++){var y=r[f],x=m[f],b=c[y],w=a[y];w&&(w[v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),l=0,s=Math.floor(1/r),c=this.getRawIndex(0),f,h,v,p=new(mh(this._rawCount))(Math.min((Math.ceil(o/s)+2)*2,o));p[l++]=c;for(var m=1;m<o-1;m+=s){for(var y=Math.min(m+s,o-1),x=Math.min(m+s*2,o),b=(x+y)/2,w=0,C=y;C<x;C++){var A=this.getRawIndex(C),M=i[A];isNaN(M)||(w+=M)}w/=x-y;var R=m,E=Math.min(m+s,o),N=m-1,L=i[c];f=-1,v=R;for(var O=-1,I=0,C=R;C<E;C++){var A=this.getRawIndex(C),M=i[A];if(isNaN(M)){I++,O<0&&(O=A);continue}h=Math.abs((N-b)*(M-L)-(N-C)*(w-L)),h>f&&(f=h,v=A)}I>0&&I<E-R&&(p[l++]=Math.min(O,v),v=Math.max(O,v)),p[l++]=v,c=v}return p[l++]=this.getRawIndex(o-1),n._count=l,n._indices=p,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),a=n._chunks,i=Math.floor(1/r),o=a[t],l=this.count(),s=new(mh(this._rawCount))(Math.ceil(l/i)*2),c=0,f=0;f<l;f+=i){var h=f,v=o[this.getRawIndex(h)],p=f,m=o[this.getRawIndex(p)],y=i;f+i>l&&(y=l-f);for(var x=0;x<y;x++){var b=this.getRawIndex(f+x),w=o[b];w<v&&(v=w,h=f+x),w>m&&(m=w,p=f+x)}var C=this.getRawIndex(h),A=this.getRawIndex(p);h<p?(s[c++]=C,s[c++]=A):(s[c++]=A,s[c++]=C)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,a){for(var i=this.clone([t],!0),o=i._chunks,l=[],s=Math.floor(1/r),c=o[t],f=this.count(),h=i._rawExtent[t]=yn(),v=new(mh(this._rawCount))(Math.ceil(f/s)),p=0,m=0;m<f;m+=s){s>f-m&&(s=f-m,l.length=s);for(var y=0;y<s;y++){var x=this.getRawIndex(m+y);l[y]=c[x]}var b=n(l),w=this.getRawIndex(Math.min(m+a(l,b)||0,f-1));c[w]=b,b<h[0]&&(h[0]=b),b>h[1]&&(h[1]=b),v[p++]=w}return i._count=p,i._indices=v,i._updateGetRawIdx(),i},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();i<o;i++){var l=this.getRawIndex(i);switch(n){case 0:r(i);break;case 1:r(a[t[0]][l],i);break;case 2:r(a[t[0]][l],a[t[1]][l],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=a[t[s]][l];c[s]=i,r.apply(null,c)}}},e.prototype.getDataExtent=function(t,r){var n=this._chunks[t],a=yn();if(!n)return a;var i=this.count(),o=!this._indices&&!r;if(o)return this._rawExtent[t].slice();var l=this._extent,s=l[t]||(l[t]={}),c=b7(r),f=c.key,h=s[f];if(h)return h.slice();for(var v=a[0],p=a[1],m=0;m<i;m++){var y=this.getRawIndex(m),x=n[y];(!r||_7(c,x))&&(x<v&&(v=x),x>p&&(p=x))}return s[f]=[v,p]},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][r]);return n},e.prototype.clone=function(t,r){var n=new e,a=this._chunks,i=t&&ii(t,function(l,s){return l[s]=!0,l},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?Ghe(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),r||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},e.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=je(this._extent),t._rawExtent=je(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,r=void 0;if(t===Array){var n=this._indices.length;r=new t(n);for(var a=0;a<n;a++)r[a]=this._indices[a]}else r=new t(this._indices);return r}return null},e.prototype._getRawIdxIdentity=function(t){return t},e.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=(function(){function t(r,n,a,i){return Is(r[i],this._dimensions[i])}oA={arrayRows:t,objectRows:function(r,n,a,i){return Is(r[n],this._dimensions[i])},keyedColumns:t,original:function(r,n,a,i){var o=r&&(r.value==null?r:r.value);return Is(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(r,n,a,i){return r[i]}}})(),e})(),A7=(function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,r){this._sourceList=t,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,a,i;if(q0(t)){var o=t,l=void 0,s=void 0,c=void 0;if(n){var f=r[0];f.prepareSource(),c=f.getSource(),l=c.data,s=c.sourceFormat,i=[f._getVersionSign()]}else l=o.get("data",!0),s=$n(l)?Ns:Ma,i=[];var h=this._getSourceMetaRawOption()||{},v=c&&c.metaRawOption||{},p=Ie(h.seriesLayoutBy,v.seriesLayoutBy)||null,m=Ie(h.sourceHeader,v.sourceHeader),y=Ie(h.dimensions,v.dimensions),x=p!==v.seriesLayoutBy||!!m!=!!v.sourceHeader||y;a=x?[cR(l,{seriesLayoutBy:p,sourceHeader:m,dimensions:y},s)]:[]}else{var b=t;if(n){var w=this._applyTransform(r);a=w.sourceList,i=w.upstreamSignList}else{var C=b.get("source",!0);a=[cR(C,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),a=r.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&v3(i)}var o,l=[],s=[];return B(t,function(c){c.prepareSource();var f=c.getSource(a||0),h="";a!=null&&!f&&v3(h),l.push(f),s.push(c._getVersionSign())}),n?o=Bhe(n,l,{datasetIndex:r.componentIndex}):a!=null&&(o=[xhe(l[0])]),{sourceList:o,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),r=0;r<t.length;r++){var n=t[r];if(n._isDirty()||this._upstreamSignList[r]!==n._getVersionSign())return!0}},e.prototype.getSource=function(t){t=t||0;var r=this._sourceList[t];if(!r){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return r},e.prototype.getSharedDataStore=function(t){var r=t.makeStoreSchema();return this._innerGetDataStore(r.dimensions,t.source,r.hash)},e.prototype._innerGetDataStore=function(t,r,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var l=o[n];if(!l){var s=this._getUpstreamSourceManagers()[0];q0(this._sourceHost)&&s?l=s._innerGetDataStore(t,r,n):(l=new fR,l.initData(new v7(r,t.length),t)),o[n]=l}return l},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(q0(t)){var r=lN(t);return r?[r.getSourceManager()]:[]}else return xe(qfe(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,a;if(q0(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),a=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=t;r=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:a}},e})();function d3(e){var t=e.option.transform;t&&Mg(e.option.transform)}function q0(e){return e.mainType==="series"}function v3(e){throw new Error(e)}var Hhe="line-height:1";function D7(e){var t=e.lineHeight;return t==null?Hhe:"line-height:"+Mn(t+"")+"px"}function M7(e,t){var r=e.color||re.color.tertiary,n=e.fontSize||12,a=e.fontWeight||"400",i=e.color||re.color.secondary,o=e.fontSize||14,l=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+Mn(n+"")+"px;color:"+Mn(r)+";font-weight:"+Mn(a+""),valueStyle:"font-size:"+Mn(o+"")+"px;color:"+Mn(i)+";font-weight:"+Mn(l+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:l}}}var Uhe=[0,10,20,30],Yhe=["",`
43
+ `,`
44
+
45
+ `,`
46
+
47
+
48
+ `];function Rr(e,t){return t.type=e,t}function hR(e){return e.type==="section"}function R7(e){return hR(e)?$he:Whe}function E7(e){if(hR(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return B(e.blocks,function(a){var i=E7(a);i>=t&&(t=i+ +(n&&(!i||hR(a)&&!a.noHeader)))}),t}return 0}function $he(e,t,r,n){var a=t.noHeader,i=qhe(E7(t)),o=[],l=t.blocks||[];In(!l||pe(l)),l=l||[];var s=e.orderMode;if(t.sortBlocks&&s){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Ne(c,s)){var f=new S7(c[s],null);l.sort(function(y,x){return f.evaluate(y.sortParam,x.sortParam)})}else s==="seriesDesc"&&l.reverse()}B(l,function(y,x){var b=t.valueFormatter,w=R7(y)(b?he(he({},e),{valueFormatter:b}):e,y,x>0?i.html:0,n);w!=null&&o.push(w)});var h=e.renderMode==="richText"?o.join(i.richText):dR(n,o.join(""),a?r:i.html);if(a)return h;var v=lR(t.header,"ordinal",e.useUTC),p=M7(n,e.renderMode).nameStyle,m=D7(n);return e.renderMode==="richText"?N7(e,v,p)+i.richText+h:dR(n,'<div style="'+p+";"+m+';">'+Mn(v)+"</div>"+h,r)}function Whe(e,t,r,n){var a=e.renderMode,i=t.noName,o=t.noValue,l=!t.markerType,s=t.name,c=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(A){return A=pe(A)?A:[A],xe(A,function(M,R){return lR(M,pe(p)?p[R]:p,c)})};if(!(i&&o)){var h=l?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||re.color.secondary,a),v=i?"":lR(s,"ordinal",c),p=t.valueType,m=o?[]:f(t.value,t.rawDataIndex),y=!l||!i,x=!l&&i,b=M7(n,a),w=b.nameStyle,C=b.valueStyle;return a==="richText"?(l?"":h)+(i?"":N7(e,v,w))+(o?"":Khe(e,m,y,x,C)):dR(n,(l?"":h)+(i?"":Xhe(v,!l,w))+(o?"":Zhe(m,y,x,C)),r)}}function p3(e,t,r,n,a,i){if(e){var o=R7(e),l={useUTC:a,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(l,e,0,i)}}function qhe(e){return{html:Uhe[e],richText:Yhe[e]}}function dR(e,t,r){var n='<div style="clear:both"></div>',a="margin: "+r+"px 0 0",i=D7(e);return'<div style="'+a+";"+i+';">'+t+n+"</div>"}function Xhe(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Mn(e)+"</span>"}function Zhe(e,t,r,n){var a=r?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return e=pe(e)?e:[e],'<span style="'+i+";"+n+'">'+xe(e,function(o){return Mn(o)}).join("&nbsp;&nbsp;")+"</span>"}function N7(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function Khe(e,t,r,n,a){var i=[a],o=n?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(pe(t)?t.join(" "):t,i)}function L7(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return Bc(n)}function I7(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var lA=(function(){function e(){this.richTextStyles={},this._nextStyleNameId=_E()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var a=n==="richText"?this._generateStyleName():null,i=U8({color:r,type:t,renderMode:n,markerId:a});return De(i)?i:(this.richTextStyles[a]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};pe(r)?B(r,function(i){return he(n,i)}):he(n,r);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},e})();function O7(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,l=t.getRawValue(r),s=pe(l),c=L7(t,r),f,h,v,p;if(o>1||s&&!o){var m=Qhe(l,t,r,i,c);f=m.inlineValues,h=m.inlineValueTypes,v=m.blocks,p=m.inlineValues[0]}else if(o){var y=a.getDimensionInfo(i[0]);p=f=dd(a,r,i[0]),h=y.type}else p=f=s?l[0]:l;var x=wE(t),b=x&&t.name||"",w=a.getName(r),C=n?b:w;return Rr("section",{header:b,noHeader:n||!x,sortParam:p,blocks:[Rr("nameValue",{markerType:"item",markerColor:c,name:C,noName:!Ja(C),value:f,valueType:h,rawDataIndex:a.getRawIndex(r)})].concat(v||[])})}function Qhe(e,t,r,n,a){var i=t.getData(),o=ii(e,function(h,v,p){var m=i.getDimensionInfo(p);return h=h||m&&m.tooltip!==!1&&m.displayName!=null},!1),l=[],s=[],c=[];n.length?B(n,function(h){f(dd(i,r,h),h)}):B(e,f);function f(h,v){var p=i.getDimensionInfo(v);!p||p.otherDims.tooltip===!1||(o?c.push(Rr("nameValue",{markerType:"subItem",markerColor:a,name:p.displayName,value:h,valueType:p.type})):(l.push(h),s.push(p.type)))}return{inlineValues:l,inlineValueTypes:s,blocks:c}}var os=it();function X0(e,t){return e.getName(t)||e.getId(t)}var Jhe="__universalTransitionEnabled",Pt=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,a){this.seriesIndex=this.componentIndex,this.dataTask=pg({count:tde,reset:rde}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,a);var i=os(this).sourceManager=new A7(this);i.prepareSource();var o=this.getInitialData(r,a);m3(o,this),this.dataTask.context.data=o,os(this).dataBeforeProcessed=o,g3(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var a=Gg(this),i=a?cf(r):{},o=this.subType;lt.hasClass(o)&&(o+="Series"),Je(r,n.getTheme().get(this.subType)),Je(r,this.getDefaultOption()),Lc(r,"label",["show"]),this.fillDataTextStyle(r.data),a&&Mo(r,i,a)},t.prototype.mergeOption=function(r,n){r=Je(this.option,r,!0),this.fillDataTextStyle(r.data);var a=Gg(this);a&&Mo(this.option,r,a);var i=os(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(r,n);m3(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,os(this).dataBeforeProcessed=o,g3(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!$n(r))for(var n=["show"],a=0;a<r.length;a++)r[a]&&r[a].label&&Lc(r[a],"label",n)},t.prototype.getInitialData=function(r,n){},t.prototype.appendData=function(r){var n=this.getRawData();n.appendData(r.data)},t.prototype.getData=function(r){var n=vR(this);if(n){var a=n.context.data;return r==null||!a.getLinkedData?a:a.getLinkedData(r)}else return os(this).data},t.prototype.getAllData=function(){var r=this.getData();return r&&r.getLinkedDataAll?r.getLinkedDataAll():[{data:r}]},t.prototype.setData=function(r){var n=vR(this);if(n){var a=n.context;a.outputData=r,n!==this.dataTask&&(a.data=r)}os(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return Le(r)},t.prototype.getSourceManager=function(){return os(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return os(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var r=this.get("colorBy");return r||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var r=this.coordinateSystem;return r&&r.getBaseAxis&&r.getBaseAxis()},t.prototype.indicesOfNearest=function(r,n,a,i){var o=this.getData(),l=this.coordinateSystem,s=l&&l.getAxis(r);if(!l||!s)return[];var c=s.dataToCoord(a);i==null&&(i=1/0);for(var f=[],h=1/0,v=-1,p=0,m=o.getDimensionIndex(n),y=o.getStore(),x=0,b=y.count();x<b;x++){var w=y.get(m,x),C=s.dataToCoord(w),A=c-C,M=Math.abs(A);M<=i&&((M<h||M===h&&A>=0&&v<0)&&(h=M,v=A,p=0),A===v&&(f[p++]=x))}return f.length=p,f},t.prototype.formatTooltip=function(r,n,a){return O7({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(ht.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(r,n,a){var i=this.ecModel,o=sN.prototype.getColorFromPalette.call(this,r,n,a);return o||(o=i.getColorFromPalette(r,n,a)),o},t.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},t.prototype.unselect=function(r,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var l=0;l<r.length;l++){var s=r[l],c=X0(o,s);a[c]=!1,this._selectedDataIndicesMap[c]=-1}}},t.prototype.toggleSelect=function(r,n){for(var a=[],i=0;i<r.length;i++)a[0]=r[i],this.isSelected(r[i],n)?this.unselect(a,n):this.select(a,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=dt(r),a=[],i=0;i<n.length;i++){var o=r[n[i]];o>=0&&a.push(o)}return a},t.prototype.isSelected=function(r,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[X0(i,r)])&&!i.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Jhe])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var a,i,o=this.option,l=o.selectedMode,s=n.length;if(!(!l||!s)){if(l==="series")o.selectedMap="all";else if(l==="multiple"){Ve(o.selectedMap)||(o.selectedMap={});for(var c=o.selectedMap,f=0;f<s;f++){var h=n[f],v=X0(r,h);c[v]=!0,this._selectedDataIndicesMap[v]=r.getRawIndex(h)}}else if(l==="single"||l===!0){var p=n[s-1],v=X0(r,p);o.selectedMap=(a={},a[v]=!0,a),this._selectedDataIndicesMap=(i={},i[v]=r.getRawIndex(p),i)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(a){var i=r.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return lt.registerClass(r)},t.protoInitialize=(function(){var r=t.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"})(),t})(lt);Cr(Pt,P_);Cr(Pt,sN);B6(Pt,lt);function g3(e){var t=e.name;wE(e)||(e.name=ede(e)||t)}function ede(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return B(r,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function tde(e){return e.model.getRawData().count()}function rde(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),nde}function nde(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function m3(e,t){B(id(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,et(ade,t))})}function ade(e,t){var r=vR(e);return r&&r.setOutputEnd((t||this).count()),t}function vR(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(e.uid))}return n}}var Ht=(function(){function e(){this.group=new ze,this.uid=uf("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,a){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,a){},e.prototype.updateLayout=function(t,r,n,a){},e.prototype.updateVisual=function(t,r,n,a){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e})();AE(Ht);C_(Ht);function Ud(){var e=it();return function(t){var r=e(t),n=t.pipelineContext,a=!!r.large,i=!!r.progressiveRender,o=r.large=!!(n&&n.large),l=r.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==l)&&"reset"}}var k7=it(),ide=Ud(),It=(function(){function e(){this.group=new ze,this.uid=uf("viewChart"),this.renderTask=pg({plan:ode,reset:lde}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,a){},e.prototype.highlight=function(t,r,n,a){var i=t.getData(a&&a.dataType);i&&x3(i,a,"emphasis")},e.prototype.downplay=function(t,r,n,a){var i=t.getData(a&&a.dataType);i&&x3(i,a,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,a){this.render(t,r,n,a)},e.prototype.updateVisual=function(t,r,n,a){this.render(t,r,n,a)},e.prototype.eachRendered=function(t){Qs(this.group,t)},e.markUpdateMethod=function(t,r){k7(t).updateMethod=r},e.protoInitialize=(function(){var t=e.prototype;t.type="chart"})(),e})();function y3(e,t,r){e&&zg(e)&&(t==="emphasis"?Tl:Al)(e,r)}function x3(e,t,r){var n=Ic(e,t),a=t&&t.highlightKey!=null?Rce(t.highlightKey):null;n!=null?B(ar(n),function(i){y3(e.getItemGraphicEl(i),r,a)}):e.eachItemGraphicEl(function(i){y3(i,r,a)})}AE(It);C_(It);function ode(e){return ide(e.model)}function lde(e){var t=e.model,r=e.ecModel,n=e.api,a=e.payload,i=t.pipelineContext.progressiveRender,o=e.view,l=a&&k7(a).updateMethod,s=i?"incrementalPrepareRender":l&&o[l]?l:"render";return s!=="render"&&o[s](t,r,n,a),sde[s]}var sde={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ab="\0__throttleOriginMethod",S3="\0__throttleRate",b3="\0__throttleType";function j_(e,t,r){var n,a=0,i=0,o=null,l,s,c,f;t=t||0;function h(){i=new Date().getTime(),o=null,e.apply(s,c||[])}var v=function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];n=new Date().getTime(),s=this,c=p;var y=f||t,x=f||r;f=null,l=n-(x?a:i)-y,clearTimeout(o),x?o=setTimeout(h,y):l>=0?h():o=setTimeout(h,-l),a=n};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(p){f=p},v}function Yd(e,t,r,n){var a=e[t];if(a){var i=a[ab]||a,o=a[b3],l=a[S3];if(l!==r||o!==n){if(r==null||!n)return e[t]=i;a=e[t]=j_(i,r,n==="debounce"),a[ab]=i,a[b3]=n,a[S3]=r}return a}}function Ug(e,t){var r=e[t];r&&r[ab]&&(r.clear&&r.clear(),e[t]=r[ab])}var _3=it(),w3={itemStyle:Oc(I8,!0),lineStyle:Oc(L8,!0)},ude={lineStyle:"stroke",itemStyle:"fill"};function P7(e,t){var r=e.visualStyleMapper||w3[t];return r||(console.warn("Unknown style type '"+t+"'."),w3.itemStyle)}function j7(e,t){var r=e.visualDrawType||ude[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var cde={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",a=e.getModel(n),i=P7(e,n),o=i(a),l=a.getShallow("decal");l&&(r.setVisual("decal",l),l.dirty=!0);var s=j7(e,n),c=o[s],f=Be(c)?c:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[s]||f||h){var v=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=v,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Be(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Be(o.stroke)?v:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",s),!t.isSeriesFiltered(e)&&f)return r.setVisual("colorFromPalette",!1),{dataEach:function(p,m){var y=e.getDataParams(m),x=he({},o);x[s]=f(y),p.setItemVisual(m,"style",x)}}}},vp=new ct,fde={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",a=P7(e,n),i=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,l){var s=o.getRawDataItem(l);if(s&&s[n]){vp.option=s[n];var c=a(vp),f=o.ensureUniqueItemVisual(l,"style");he(f,c),vp.option.decal&&(o.setItemVisual(l,"decal",vp.option.decal),vp.option.decal.dirty=!0),i in c&&o.setItemVisual(l,"colorFromPalette",!1)}}:null}}}},hde={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.type+"-"+r.getColorBy();_3(r).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(r){if(!r.isColorBySeries()){var n=r.getRawData(),a={},i=r.getData(),o=_3(r).scope,l=r.visualStyleAccessPath||"itemStyle",s=j7(r,l);i.each(function(c){var f=i.getRawIndex(c);a[f]=c}),n.each(function(c){var f=a[c],h=i.getItemVisual(f,"colorFromPalette");if(h){var v=i.ensureUniqueItemVisual(f,"style"),p=n.getName(c)||c+"",m=n.count();v[s]=r.getColorFromPalette(p,o,m)}})}})}},Z0=Math.PI;function dde(e,t){t=t||{},Ue(t,{text:"loading",textColor:re.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:re.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new ze,n=new at({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var a=new vt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new at({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(i);var o;return t.showSpinner&&(o=new Em({shape:{startAngle:-Z0/2,endAngle:-Z0/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Z0*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Z0*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var l=a.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&l?10:0)-l)/2-(t.showSpinner&&l?0:5+l/2)+(t.showSpinner?0:l/2)+(l?0:s),f=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:f}),i.setShape({x:c-s,y:f-s,width:s*2,height:s*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var B7=(function(){function e(t,r,n,a){this._stageTaskMap=Le(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!r&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,l=a&&a.modDataCount,s=l!=null?Math.ceil(l/o):null;return{step:o,modBy:s,modDataCount:l}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),a=t.__preparePipelineContext?t.__preparePipelineContext(r,n):P6(t,r,n);t.pipelineContext=n.context=a},e.prototype.restorePipelines=function(t,r){var n=this,a=n._pipelineMap=Le();r.eachSeries(function(i){var o=t.painter.type==="canvas"&&i.getProgressive(),l=i.uid;a.set(l,{id:l,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:o&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),n._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;B(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";In(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,r,n),a.overallReset&&this._createOverallStageTask(a,i,r,n)},this)},e.prototype.prepareView=function(t,r,n,a){var i=t.renderTask,o=i.context;o.model=r,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(r,i)},e.prototype.performDataProcessorTasks=function(t,r){this._performStageTasks(this._dataProcessorHandlers,t,r,{block:!0})},e.prototype.performVisualTasks=function(t,r,n){this._performStageTasks(this._visualHandlers,t,r,n)},e.prototype._performStageTasks=function(t,r,n,a){a=a||{};var i=!1,o=this;B(t,function(s,c){if(!(a.visualType&&a.visualType!==s.visualType)){var f=o._stageTaskMap.get(s.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var p,m=v.agentStubMap;m.each(function(x){l(a,x)&&(x.dirty(),p=!0)}),p&&v.dirty(),o.updatePayload(v,n);var y=o.getPerformArgs(v,a.block);m.each(function(x){x.perform(y)}),v.perform(y)&&(i=!0)}else h&&h.each(function(x,b){l(a,x)&&x.dirty();var w=o.getPerformArgs(x,a.block);w.skip=!s.performRawSeries&&r.isSeriesFiltered(x.context.model),o.updatePayload(x,n),x.perform(w)&&(i=!0)})}});function l(s,c){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(c.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(t){var r;t.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var r=t.tail;do{if(r.__block){t.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},e.prototype.updatePayload=function(t,r){r!=="remain"&&(t.context.payload=r)},e.prototype._createSeriesStageTask=function(t,r,n,a){var i=this,o=r.seriesTaskMap,l=r.seriesTaskMap=Le(),s=t.seriesType,c=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):s?n.eachRawSeriesByType(s,f):c&&c(n,a).each(f);function f(h){var v=h.uid,p=l.set(v,o&&o.get(v)||pg({plan:yde,reset:xde,count:bde}));p.context={model:h,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(h,p)}},e.prototype._createOverallStageTask=function(t,r,n,a){var i=this,o=r.overallTask=r.overallTask||pg({reset:vde});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var l=o.agentStubMap,s=o.agentStubMap=Le(),c=t.seriesType,f=t.getTargetSeries,h=t.dirtyOnOverallProgress,v=!1,p="";In(!t.createOnAllSeries,p),c?n.eachRawSeriesByType(c,m):f?f(n,a).each(m):B(n.getSeries(),m);function m(y){var x=y.uid,b=s.set(x,l&&l.get(x)||(v=!0,pg({reset:pde,onDirty:mde})));b.context={model:y,dirtyOnOverallProgress:h},b.agent=o,b.__block=h,i._pipe(y,b)}v&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=r),a.tail&&a.tail.pipe(r),a.tail=r,r.__idxInPipeline=a.count++,r.__pipeline=a},e.wrapStageHandler=function(t,r){return Be(t)&&(t={overallReset:t,seriesType:_de(t)}),t.uid=uf("stageHandler"),r&&(t.visualType=r),t},e})();function vde(e){e.overallReset(e.ecModel,e.api,e.payload)}function pde(e){return e.dirtyOnOverallProgress&&gde}function gde(){this.agent.dirty(),this.getDownstream().dirty()}function mde(){this.agent&&this.agent.dirty()}function yde(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function xde(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ar(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?xe(t,function(r,n){return z7(n)}):Sde}var Sde=z7(0);function z7(e){return function(t,r){var n=r.data,a=r.resetDefines[e];if(a&&a.dataEach)for(var i=t.start;i<t.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(t,n)}}function bde(e){return e.data.count()}function _de(e){ib=null;try{e(Yg,V7)}catch{}return ib}var Yg={},V7={},ib;F7(Yg,uN);F7(V7,e8);Yg.eachSeriesByType=Yg.eachRawSeriesByType=function(e){ib=e};Yg.eachComponent=function(e){e.mainType==="series"&&e.subType&&(ib=e.subType)};function F7(e,t){for(var r in t.prototype)e[r]=ur}var Pe=re.darkColor,C3=Pe.background,pp=function(){return{axisLine:{lineStyle:{color:Pe.axisLine}},splitLine:{lineStyle:{color:Pe.axisSplitLine}},splitArea:{areaStyle:{color:[Pe.backgroundTint,Pe.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Pe.axisMinorSplitLine}},axisLabel:{color:Pe.axisLabel},axisName:{}}},T3={label:{color:Pe.secondary},itemStyle:{borderColor:Pe.borderTint},dividerLineStyle:{color:Pe.border}},G7={darkMode:!0,color:Pe.theme,backgroundColor:C3,axisPointer:{lineStyle:{color:Pe.border},crossStyle:{color:Pe.borderShade},label:{color:Pe.tertiary}},legend:{textStyle:{color:Pe.secondary},pageTextStyle:{color:Pe.tertiary}},textStyle:{color:Pe.secondary},title:{textStyle:{color:Pe.primary},subtextStyle:{color:Pe.quaternary}},toolbox:{iconStyle:{borderColor:Pe.accent50},feature:{dataView:{backgroundColor:C3,textColor:Pe.primary,textareaColor:Pe.background,textareaBorderColor:Pe.border,buttonColor:Pe.accent50,buttonTextColor:Pe.neutral00}}},tooltip:{backgroundColor:Pe.neutral20,defaultBorderColor:Pe.border,textStyle:{color:Pe.tertiary}},dataZoom:{borderColor:Pe.accent10,textStyle:{color:Pe.tertiary},brushStyle:{color:Pe.backgroundTint},handleStyle:{color:Pe.neutral00,borderColor:Pe.accent20},moveHandleStyle:{color:Pe.accent40},emphasis:{handleStyle:{borderColor:Pe.accent50}},dataBackground:{lineStyle:{color:Pe.accent30},areaStyle:{color:Pe.accent20}},selectedDataBackground:{lineStyle:{color:Pe.accent50},areaStyle:{color:Pe.accent30}}},visualMap:{textStyle:{color:Pe.secondary},handleStyle:{borderColor:Pe.neutral30}},timeline:{lineStyle:{color:Pe.accent10},label:{color:Pe.tertiary},controlStyle:{color:Pe.accent30,borderColor:Pe.accent30}},calendar:{itemStyle:{color:Pe.neutral00,borderColor:Pe.neutral20},dayLabel:{color:Pe.tertiary},monthLabel:{color:Pe.secondary},yearLabel:{color:Pe.secondary}},matrix:{x:T3,y:T3,backgroundColor:{borderColor:Pe.axisLine},body:{itemStyle:{borderColor:Pe.borderTint}}},timeAxis:pp(),logAxis:pp(),valueAxis:pp(),categoryAxis:pp(),line:{symbol:"circle"},graph:{color:Pe.theme},gauge:{title:{color:Pe.secondary},axisLine:{lineStyle:{color:[[1,Pe.neutral05]]}},axisLabel:{color:Pe.axisLabel},detail:{color:Pe.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Pe.background}},radar:(function(){var e=pp();return e.axisName={color:Pe.axisLabel},e.axisLine.lineStyle.color=Pe.neutral20,e})(),treemap:{breadcrumb:{itemStyle:{color:Pe.neutral20,textStyle:{color:Pe.secondary}},emphasis:{itemStyle:{color:Pe.neutral30}}}},sunburst:{itemStyle:{borderColor:Pe.background}},map:{itemStyle:{borderColor:Pe.border,areaColor:Pe.neutral10},label:{color:Pe.tertiary},emphasis:{label:{color:Pe.primary},itemStyle:{areaColor:Pe.highlight}},select:{label:{color:Pe.primary},itemStyle:{areaColor:Pe.highlight}}},geo:{itemStyle:{borderColor:Pe.border,areaColor:Pe.neutral10},emphasis:{label:{color:Pe.primary},itemStyle:{areaColor:Pe.highlight}},select:{label:{color:Pe.primary},itemStyle:{color:Pe.highlight}}}};G7.categoryAxis.splitLine.show=!1;var wde=(function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},a={};if(De(t)){var i=fo(t);r.mainType=i.main||null,r.subType=i.sub||null}else{var o=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1};B(t,function(s,c){for(var f=!1,h=0;h<o.length;h++){var v=o[h],p=c.lastIndexOf(v);if(p>0&&p===c.length-v.length){var m=c.slice(0,p);m!=="data"&&(r.mainType=m,r[v.toLowerCase()]=s,f=!0)}}l.hasOwnProperty(c)&&(n[c]=s,f=!0),f||(a[c]=s)})}return{cptQuery:r,dataQuery:n,otherQuery:a}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,l=n.view;if(!o||!l)return!0;var s=r.cptQuery,c=r.dataQuery;return f(s,o,"mainType")&&f(s,o,"subType")&&f(s,o,"index","componentIndex")&&f(s,o,"name")&&f(s,o,"id")&&f(c,i,"name")&&f(c,i,"dataIndex")&&f(c,i,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,r.otherQuery,a,i));function f(h,v,p,m){return h[p]==null||v[m||p]===h[p]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e})(),pR=["symbol","symbolSize","symbolRotate","symbolOffset"],A3=pR.concat(["symbolKeepAspect"]),Cde={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData();if(e.legendIcon&&r.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<pR.length;o++){var l=pR[o],s=e.get(l);Be(s)?(i=!0,a[l]=s):n[l]=s}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(he({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var c=dt(a);function f(h,v){for(var p=e.getRawValue(v),m=e.getDataParams(v),y=0;y<c.length;y++){var x=c[y];h.setItemVisual(v,x,a[x](p,m))}}return{dataEach:i?f:null}}},Tde={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(a,i){for(var o=a.getItemModel(i),l=0;l<A3.length;l++){var s=A3[l],c=o.getShallow(s,!0);c!=null&&a.setItemVisual(i,s,c)}}return{dataEach:r.hasItemOption?n:null}}};function vN(e,t,r){switch(r){case"color":var n=e.getItemVisual(t,"style");return n[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,r)}}function Pm(e,t){switch(t){case"color":var r=e.getVisual("style");return r[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function H7(e,t,r,n){switch(r){case"color":var a=e.ensureUniqueItemVisual(t,"style");a[e.getVisual("drawType")]=n,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,r,n);break}}function U7(e,t){function r(n,a){var i=[];return n.eachComponent({mainType:"series",subType:e,query:a},function(o){i.push(o.seriesIndex)}),i}B([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(a,i,o){a=he({},a),o.dispatchAction(he(a,{type:n[1],seriesIndex:r(i,a)}))})})}function yh(e,t,r,n,a){var i=e+t;r.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var l=o.seriesIndex,s=o.option.selectedMap,c=a.selected,f=0;f<c.length;f++)if(c[f].seriesIndex===l){var h=o.getData(),v=Ic(h,a.fromActionPayload);r.trigger(i,{type:i,seriesId:o.id,name:pe(v)?h.getName(v[0]):h.getName(v),selected:De(s)?s:he({},s)})}})}function Ade(e,t,r){e.on("selectchanged",function(n){var a=r.getModel();n.isFromClick?(yh("map","selectchanged",t,a,n),yh("pie","selectchanged",t,a,n)):n.fromAction==="select"?(yh("map","selected",t,a,n),yh("pie","selected",t,a,n)):n.fromAction==="unselect"&&(yh("map","unselected",t,a,n),yh("pie","unselected",t,a,n))})}function mc(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var Ua=new fi,Y7={};function Dde(e,t){Y7[e]=t}function $7(e){return Y7[e]}var W7={};function q7(e,t){W7[e]=t}function Mde(e){return W7[e]}var B_=it();function Rde(e){B_(e).prepare={}}function Ede(e){B_(e).fullUpdate={}}function X7(e){return B_(e).prepare}function $d(e){return B_(e).fullUpdate}var Nde=Math.round(Math.random()*9),Lde=typeof Object.defineProperty=="function",Ide=(function(){function e(){this._id="__ec_inner_"+Nde++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return Lde?Object.defineProperty(n,this._id,{value:r,enumerable:!1,configurable:!0}):n[this._id]=r,this},e.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},e.prototype.has=function(t){return!!this._guard(t)[this._id]},e.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},e})(),Ode=yt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,a=t.width/2,i=t.height/2;e.moveTo(r,n-i),e.lineTo(r+a,n+i),e.lineTo(r-a,n+i),e.closePath()}}),kde=yt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,a=t.width/2,i=t.height/2;e.moveTo(r,n-i),e.lineTo(r+a,n),e.lineTo(r,n+i),e.lineTo(r-a,n),e.closePath()}}),Pde=yt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,a=t.width/5*3,i=Math.max(a,t.height),o=a/2,l=o*o/(i-o),s=n-i+o+l,c=Math.asin(l/o),f=Math.cos(c)*o,h=Math.sin(c),v=Math.cos(c),p=o*.6,m=o*.7;e.moveTo(r-f,s+l),e.arc(r,s,o,Math.PI-c,Math.PI*2+c),e.bezierCurveTo(r+f-h*p,s+l+v*p,r,n-m,r,n),e.bezierCurveTo(r,n-m,r-f+h*p,s+l+v*p,r-f,s+l),e.closePath()}}),jde=yt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,a=t.x,i=t.y,o=n/3*2;e.moveTo(a,i),e.lineTo(a+o,i+r),e.lineTo(a,i+r/4*3),e.lineTo(a-o,i+r),e.lineTo(a,i),e.closePath()}}),Bde={line:Mr,rect:at,roundRect:at,square:at,circle:Io,diamond:kde,pin:Pde,arrow:jde,triangle:Ode},zde={line:function(e,t,r,n,a){a.x1=e,a.y1=t+n/2,a.x2=e+r,a.y2=t+n/2},rect:function(e,t,r,n,a){a.x=e,a.y=t,a.width=r,a.height=n},roundRect:function(e,t,r,n,a){a.x=e,a.y=t,a.width=r,a.height=n,a.r=Math.min(r,n)/4},square:function(e,t,r,n,a){var i=Math.min(r,n);a.x=e,a.y=t,a.width=i,a.height=i},circle:function(e,t,r,n,a){a.cx=e+r/2,a.cy=t+n/2,a.r=Math.min(r,n)/2},diamond:function(e,t,r,n,a){a.cx=e+r/2,a.cy=t+n/2,a.width=r,a.height=n},pin:function(e,t,r,n,a){a.x=e+r/2,a.y=t+n/2,a.width=r,a.height=n},arrow:function(e,t,r,n,a){a.x=e+r/2,a.y=t+n/2,a.width=r,a.height=n},triangle:function(e,t,r,n,a){a.cx=e+r/2,a.cy=t+n/2,a.width=r,a.height=n}},ob={};B(Bde,function(e,t){ob[t]=new e});var Vde=yt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=US(e,t,r),a=this.shape;return a&&a.symbolType==="pin"&&t.position==="inside"&&(n.y=r.y+r.height*.4),n},buildPath:function(e,t,r){var n=t.symbolType;if(n!=="none"){var a=ob[n];a||(n="rect",a=ob[n]),zde[n](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,r)}}});function Fde(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||re.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function wr(e,t,r,n,a,i,o){var l=e.indexOf("empty")===0;l&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var s;return e.indexOf("image://")===0?s=BE(e.slice(8),new Fe(t,r,n,a),o?"center":"cover"):e.indexOf("path://")===0?s=fd(e.slice(7),{},new Fe(t,r,n,a),o?"center":"cover"):s=new Vde({shape:{symbolType:e,x:t,y:r,width:n,height:a}}),s.__isEmptyBrush=l,s.setColor=Fde,i&&s.setColor(i),s}function Wd(e){return pe(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function ff(e,t){if(e!=null)return pe(e)||(e=[e,e]),[Re(e[0],t[0])||0,Re(Ie(e[1],e[0]),t[1])||0]}function yc(e){return isFinite(e)}function Gde(e,t,r){var n=t.x==null?0:t.x,a=t.x2==null?1:t.x2,i=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,a=a*r.width+r.x,i=i*r.height+r.y,o=o*r.height+r.y),n=yc(n)?n:0,a=yc(a)?a:1,i=yc(i)?i:0,o=yc(o)?o:0;var l=e.createLinearGradient(n,i,a,o);return l}function Hde(e,t,r){var n=r.width,a=r.height,i=Math.min(n,a),o=t.x==null?.5:t.x,l=t.y==null?.5:t.y,s=t.r==null?.5:t.r;t.global||(o=o*n+r.x,l=l*a+r.y,s=s*i),o=yc(o)?o:.5,l=yc(l)?l:.5,s=s>=0&&yc(s)?s:.5;var c=e.createRadialGradient(o,l,0,o,l,s);return c}function gR(e,t,r){for(var n=t.type==="radial"?Hde(e,t,r):Gde(e,t,r),a=t.colorStops,i=0;i<a.length;i++)n.addColorStop(a[i].offset,a[i].color);return n}function Ude(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!0;return!1}function K0(e){return parseInt(e,10)}function Hh(e,t,r){var n=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var l=document.defaultView.getComputedStyle(e);return(e[a]||K0(l[n])||K0(e.style[n]))-(K0(l[i])||0)-(K0(l[o])||0)||0}function Yde(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:pt(e)?[e]:pe(e)?e:null}function pN(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&Yde(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var a=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&a!==1&&(r=xe(r,function(i){return i/a}),n/=a)}return[r,n]}var $de=new Vs(!0);function lb(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function D3(e){return typeof e=="string"&&e!=="none"}function sb(e){var t=e.fill;return t!=null&&t!=="none"}function M3(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=r}else e.fill()}function R3(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var r=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=r}else e.stroke()}function mR(e,t,r){var n=DE(t.image,t.__image,r);if(T_(n)){var a=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*ng),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function Wde(e,t,r,n,a){var i,o=lb(r),l=sb(r),s=r.strokePercent,c=s<1,f=!t.path;(!t.silent||c)&&f&&t.createPathProxy();var h=t.path||$de,v=t.__dirty;if(!n){var p=r.fill,m=r.stroke,y=l&&!!p.colorStops,x=o&&!!m.colorStops,b=l&&!!p.image,w=o&&!!m.image,C=void 0,A=void 0,M=void 0,R=void 0,E=void 0;(y||x)&&(E=t.getBoundingRect()),y&&(C=v?gR(e,p,E):t.__canvasFillGradient,t.__canvasFillGradient=C),x&&(A=v?gR(e,m,E):t.__canvasStrokeGradient,t.__canvasStrokeGradient=A),b&&(M=v||!t.__canvasFillPattern?mR(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=M),w&&(R=v||!t.__canvasStrokePattern?mR(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=R),y?e.fillStyle=C:b&&(M?e.fillStyle=M:l=!1),x?e.strokeStyle=A:w&&(R?e.strokeStyle=R:o=!1)}var N=t.getGlobalScale();h.setScale(N[0],N[1],t.segmentIgnoreThreshold);var L,O;e.setLineDash&&r.lineDash&&(i=pN(t),L=i[0],O=i[1]);var I=!0;(f||v&Nh)&&(h.setDPR(e.dpr),c?h.setContext(null):(h.setContext(e),I=!1),h.reset(),t.buildPath(h,t.shape,n),h.toStatic(),t.pathUpdated()),I&&h.rebuildPath(e,c?s:1),L&&(e.setLineDash(L),e.lineDashOffset=O),n?(a.batchFill=l,a.batchStroke=o):r.strokeFirst?(o&&R3(e,r),l&&M3(e,r)):(l&&M3(e,r),o&&R3(e,r)),L&&e.setLineDash([])}function qde(e,t,r){var n=t.__image=DE(r.image,t.__image,t,t.onload);if(!(!n||!T_(n))){var a=r.x||0,i=r.y||0,o=t.getWidth(),l=t.getHeight(),s=n.width/n.height;if(o==null&&l!=null?o=l*s:l==null&&o!=null?l=o/s:o==null&&l==null&&(o=n.width,l=n.height),r.sWidth&&r.sHeight){var c=r.sx||0,f=r.sy||0;e.drawImage(n,c,f,r.sWidth,r.sHeight,a,i,o,l)}else if(r.sx&&r.sy){var c=r.sx,f=r.sy,h=o-c,v=l-f;e.drawImage(n,c,f,h,v,a,i,o,l)}else e.drawImage(n,a,i,o,l)}}function Xde(e,t,r){var n,a=r.text;if(a!=null&&(a+=""),a){e.font=r.font||bl,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var i=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=pN(t),i=n[0],o=n[1]),i&&(e.setLineDash(i),e.lineDashOffset=o),r.strokeFirst?(lb(r)&&e.strokeText(a,r.x,r.y),sb(r)&&e.fillText(a,r.x,r.y)):(sb(r)&&e.fillText(a,r.x,r.y),lb(r)&&e.strokeText(a,r.x,r.y)),i&&e.setLineDash([])}}var E3=["shadowBlur","shadowOffsetX","shadowOffsetY"],N3=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Z7(e,t,r,n,a){var i=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){Gn(e,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?bc.opacity:o}(n||t.blend!==r.blend)&&(i||(Gn(e,a),i=!0),e.globalCompositeOperation=t.blend||bc.blend);for(var l=0;l<E3.length;l++){var s=E3[l];(n||t[s]!==r[s])&&(i||(Gn(e,a),i=!0),e[s]=e.dpr*(t[s]||0))}return(n||t.shadowColor!==r.shadowColor)&&(i||(Gn(e,a),i=!0),e.shadowColor=t.shadowColor||bc.shadowColor),i}function L3(e,t,r,n,a){var i=t.style,o=n?null:r&&r.style||{};if(i===o)return!1;var l=Z7(e,i,o,n,a);if((n||i.fill!==o.fill)&&(l||(Gn(e,a),l=!0),D3(i.fill)&&(e.fillStyle=i.fill)),(n||i.stroke!==o.stroke)&&(l||(Gn(e,a),l=!0),D3(i.stroke)&&(e.strokeStyle=i.stroke)),(n||i.opacity!==o.opacity)&&(l||(Gn(e,a),l=!0),e.globalAlpha=i.opacity==null?1:i.opacity),t.hasStroke()){var s=i.lineWidth,c=s/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(l||(Gn(e,a),l=!0),e.lineWidth=c)}for(var f=0;f<N3.length;f++){var h=N3[f],v=h[0];(n||i[v]!==o[v])&&(l||(Gn(e,a),l=!0),e[v]=i[v]||h[1])}return l}function Zde(e,t,r,n,a){return Z7(e,t.style,r&&r.style,n,a)}function K7(e,t){var r=t.transform,n=e.dpr||1;r?e.setTransform(n*r[0],n*r[1],n*r[2],n*r[3],n*r[4],n*r[5]):e.setTransform(n,0,0,n,0,0)}function Kde(e,t,r){for(var n=!1,a=0;a<e.length;a++){var i=e[a];n=n||i.isZeroArea(),K7(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}r.allClipped=n}function Qde(e,t){return e&&t?e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||e[4]!==t[4]||e[5]!==t[5]:!(!e&&!t)}var I3=1,O3=2,k3=3,P3=4;function Jde(e){var t=sb(e),r=lb(e);return!(e.lineDash||!(+t^+r)||t&&typeof e.fill!="string"||r&&typeof e.stroke!="string"||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function Gn(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function gN(e,t){var r={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};xc(e,t,r),Qh(e,r)}function xc(e,t,r){var n=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~ua,t.__isRendered=!1;return}var a=t.__clipPaths,i=r.prevElClipPaths,o=t.style,l=!1,s=!1;if((!i||Ude(a,i))&&(i&&(Gn(e,r),e.restore(),s=l=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(Gn(e,r),e.save(),Kde(a,e,r),l=!0,r.prevElClipPaths=a)),r.allClipped){t.__dirty&=~ua,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(r.beforeBrushParam),t.innerBeforeBrush();var c=r.prevEl;c||(s=l=!0);var f=t instanceof yt&&t.autoBatch&&Jde(o);l||Qde(n,c.transform)?(Gn(e,r),K7(e,t)):f||Gn(e,r),t instanceof yt?(r.lastDrawType!==I3&&(s=!0,r.lastDrawType=I3),L3(e,t,c,s,r),(!f||!r.batchFill&&!r.batchStroke)&&e.beginPath(),Wde(e,t,o,f,r)):t instanceof cd?(r.lastDrawType!==k3&&(s=!0,r.lastDrawType=k3),L3(e,t,c,s,r),Xde(e,t,o)):t instanceof Xr?(r.lastDrawType!==O3&&(s=!0,r.lastDrawType=O3),Zde(e,t,c,s,r),qde(e,t,o)):t.getTemporalDisplayables&&(r.lastDrawType!==P3&&(s=!0,r.lastDrawType=P3),eve(e,t,r)),t.innerAfterBrush(),t.afterBrush&&(f&&Gn(e,r),t.afterBrush()),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Qh(e,t){Gn(e,t),t.prevElClipPaths&&e.restore()}function eve(e,t,r){var n=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var i={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover,beforeBrushParam:{}},o,l;for(o=t.getCursor(),l=n.length;o<l;o++){var s=n[o];s.beforeBrush&&s.beforeBrush(r.beforeBrushParam),s.innerBeforeBrush(),xc(e,s,i),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}Qh(e,i);for(var c=0,f=a.length;c<f;c++){var s=a[c];s.beforeBrush&&s.beforeBrush(r.beforeBrushParam),s.innerBeforeBrush(),xc(e,s,i),s.innerAfterBrush(),s.afterBrush&&s.afterBrush(),i.prevEl=s}Qh(e,i),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var sA=new Ide,j3=new ld(100),B3=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function vd(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),a=n.painter.type==="svg";e.dirty&&sA.delete(e);var i=sA.get(e);if(i)return i;var o=Ue(e,{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 l={repeat:"repeat"};return s(l),l.rotation=o.rotation,l.scaleX=l.scaleY=a?1:1/r,sA.set(e,l),e.dirty=!1,l;function s(c){for(var f=[r],h=!0,v=0;v<B3.length;++v){var p=o[B3[v]];if(p!=null&&!pe(p)&&!De(p)&&!pt(p)&&typeof p!="boolean"){h=!1;break}f.push(p)}var m;if(h){m=f.join(",")+(a?"-svg":"");var y=j3.get(m);y&&(a?c.svgElement=y:c.image=y)}var x=J7(o.dashArrayX),b=tve(o.dashArrayY),w=Q7(o.symbol),C=rve(x),A=eY(b),M=!a&&Yr.createCanvas(),R=a&&{tag:"g",attrs:{},key:"dcl",children:[]},E=L(),N;M&&(M.width=E.width*r,M.height=E.height*r,N=M.getContext("2d")),O(),h&&j3.put(m,M||R),c.image=M,c.svgElement=R,c.svgWidth=E.width,c.svgHeight=E.height;function L(){for(var I=1,z=0,V=C.length;z<V;++z)I=JB(I,C[z]);for(var Y=1,z=0,V=w.length;z<V;++z)Y=JB(Y,w[z].length);I*=Y;var H=A*C.length*w.length;return{width:Math.max(1,Math.min(I,o.maxTileWidth)),height:Math.max(1,Math.min(H,o.maxTileHeight))}}function O(){N&&(N.clearRect(0,0,M.width,M.height),o.backgroundColor&&(N.fillStyle=o.backgroundColor,N.fillRect(0,0,M.width,M.height)));for(var I=0,z=0;z<b.length;++z)I+=b[z];if(I<=0)return;for(var V=-A,Y=0,H=0,F=0;V<E.height;){if(Y%2===0){for(var X=H/2%w.length,P=0,q=0,G=0;P<E.width*2;){for(var W=0,z=0;z<x[F].length;++z)W+=x[F][z];if(W<=0)break;if(q%2===0){var Z=(1-o.symbolSize)*.5,Q=P+x[F][q]*Z,U=V+b[Y]*Z,K=x[F][q]*o.symbolSize,se=b[Y]*o.symbolSize,ge=G/2%w[X].length;ue(Q,U,K,se,w[X][ge])}P+=x[F][q],++G,++q,q===x[F].length&&(q=0)}++F,F===x.length&&(F=0)}V+=b[Y],++H,++Y,Y===b.length&&(Y=0)}function ue(de,me,ae,ye,nt){var be=a?1:r,Te=wr(nt,de*be,me*be,ae*be,ye*be,o.color,o.symbolKeepAspect);if(a){var Me=n.painter.renderOneToVNode(Te);Me&&R.children.push(Me)}else gN(N,Te)}}}}function Q7(e){if(!e||e.length===0)return[["rect"]];if(De(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!De(e[r])){t=!1;break}if(t)return Q7([e]);for(var n=[],r=0;r<e.length;++r)De(e[r])?n.push([e[r]]):n.push(e[r]);return n}function J7(e){if(!e||e.length===0)return[[0,0]];if(pt(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!pt(e[n])){r=!1;break}if(r)return J7([e]);for(var a=[],n=0;n<e.length;++n)if(pt(e[n])){var t=Math.ceil(e[n]);a.push([t,t])}else{var t=xe(e[n],function(l){return Math.ceil(l)});t.length%2===1?a.push(t.concat(t)):a.push(t)}return a}function tve(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(pt(e)){var t=Math.ceil(e);return[t,t]}var r=xe(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function rve(e){return xe(e,function(t){return eY(t)})}function eY(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}var nve=Dm(ave);function ave(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var l=n.getItemVisual(o,"decal");if(l){var s=n.ensureUniqueItemVisual(o,"style");s.decal=vd(l,t)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=vd(a,t)}}})}var ive="6.1.0",ove={zrender:"6.1.0"},lve=1,sve=800,uve=900,cve=920,fve=1e3,hve=2e3,z3=5e3,tY=1e3,dve=1100,mN=2e3,rY=3e3,vve=4e3,z_=4500,pve=4600,gve=5e3,mve=6e3,nY=7e3,aY={PROCESSOR:{SERIES_FILTER:sve,AXIS_STATISTICS:cve,FILTER:fve,STATISTIC:z3,STATISTICS:z3},VISUAL:{LAYOUT:tY,PROGRESSIVE_LAYOUT:dve,GLOBAL:mN,CHART:rY,POST_CHART_LAYOUT:pve,COMPONENT:vve,BRUSH:gve,CHART_ITEM:z_,ARIA:mve,DECAL:nY}},Or="__flagInMainProcess",Q0="__mainProcessVersion",tn="__pendingUpdate",uA="__needsUpdateStatus",V3=/^[a-zA-Z0-9_]+$/,cA="__connectUpdateStatus",F3=0,yve=1,xve=2;function iY(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){this.id;return}return lY(this,e,t)}}function oY(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return lY(this,e,t)}}function lY(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),fi.prototype[t].apply(e,r)}var sY=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(fi),uY=sY.prototype;uY.on=oY("on");uY.off=oY("off");var Zu,fA,J0,Jo,ex,hA,dA,xh,Sh,G3,H3,vA,U3,tx,Y3,cY,Va,$3,bh,ub=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this,new wde)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},i.__v_skip=!0,i._dom=r;var o="canvas",l="auto",s=!1;i[Q0]=1,a.ssr&&b6(function(v){var p=$e(v),m=p.dataIndex;if(m!=null){var y=Le();return y.set("series_index",p.seriesIndex),y.set("data_index",m),p.ssrType&&y.set("ssr_type",p.ssrType),y}});var c=i._zr=VM(r,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:Ie(a.useDirtyRect,s),useCoarsePointer:Ie(a.useCoarsePointer,l),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=j_(Ee(c.flush,c),17),i._updateTheme(n),i._locale=Cfe(a.locale||O8),i._coordSysMgr=new Hd;var f=i._api=Y3(i);function h(v,p){return v.__prio-p.__prio}return Zx(fb,h),Zx(SR,h),i._scheduler=new B7(i,f,SR,fb),i._messageCenter=new sY,i._initEvents(),i.resize=Ee(i.resize,i),c.animation.on("frame",i._onframe,i),G3(c,i),H3(c,i),Mg(i),i}return t.prototype._onframe=function(){if(!this._disposed){var r=this._scheduler,n=this._model,a=this._api;if($3(this),this[tn]){var i=this[tn].silent;this[Or]=!0,bh(this);try{Zu(this),Jo.update.call(this,null,this[tn].updateParams)}catch(s){throw this[Or]=!1,this[tn]=null,s}this._zr.flush(),this[Or]=!1,this[tn]=null,xh.call(this,i),Sh.call(this,i)}else if(r.unfinished){var o=lve;do{r.unfinished=!1;var l=Yr.getTime();r.performSeriesTasks(n),r.performDataProcessorTasks(n),hA(this,n),r.performVisualTasks(n),tx(this,this._model,a,"remain",{}),o-=Yr.getTime()-l}while(o>0&&r.unfinished);r.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(r,n,a){if(!this[Or]){if(this._disposed){this.id;return}var i,o,l;if(Ve(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,l=n.transition,n=n.notMerge),this[Or]=!0,bh(this),!this._model||n){var s=new ahe(this._api),c=this._theme,f=this._model=new uN;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,c,this._locale,s)}this._model.setOption(r,{replaceMerge:o},bR);var h={seriesTransition:l,optionChanged:!0};if(a)this[tn]={silent:i,updateParams:h},this[Or]=!1,this.getZr().wakeUp();else{try{Zu(this),Jo.update.call(this,null,h)}catch(v){throw this[tn]=null,this[Or]=!1,v}this._ssr||this._zr.flush(),this[tn]=null,this[Or]=!1,xh.call(this,i),Sh.call(this,i)}}},t.prototype.setTheme=function(r,n){if(!this[Or]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[tn]&&(i==null&&(i=this[tn].silent),o=this[tn].updateParams,this[tn]=null),this[Or]=!0,bh(this);try{this._updateTheme(r),a.setTheme(this._theme),Zu(this),Jo.update.call(this,{type:"setTheme"},o)}catch(l){throw this[Or]=!1,l}this[Or]=!1,xh.call(this,i),Sh.call(this,i)}}},t.prototype._updateTheme=function(r){De(r)&&(r=fY[r]),r&&(r=je(r),r&&f7(r,!0),this._theme=r)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||ht.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},t.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},t.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return B(n,function(a){a.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,a=this._model,i=[],o=this;B(n,function(s){a.eachComponent({mainType:s},function(c){var f=o._componentsMap[c.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var l=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return B(i,function(s){s.group.ignore=!1}),l},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",a=this.group,i=Math.min,o=Math.max,l=1/0;if(hb[a]){var s=l,c=l,f=-l,h=-l,v=[],p=r&&r.pixelRatio||this.getDevicePixelRatio();B(Tc,function(C,A){if(C.group===a){var M=n?C.getZr().painter.getSvgDom().innerHTML:C.renderToCanvas(je(r)),R=C.getDom().getBoundingClientRect();s=i(R.left,s),c=i(R.top,c),f=o(R.right,f),h=o(R.bottom,h),v.push({dom:M,left:R.left,top:R.top})}}),s*=p,c*=p,f*=p,h*=p;var m=f-s,y=h-c,x=Yr.createCanvas(),b=VM(x,{renderer:n?"svg":"canvas"});if(b.resize({width:m,height:y}),n){var w="";return B(v,function(C){var A=C.left-s,M=C.top-c;w+='<g transform="translate('+A+","+M+')">'+C.dom+"</g>"}),b.painter.getSvgRoot().innerHTML=w,r.connectedBackgroundColor&&b.painter.setBackgroundColor(r.connectedBackgroundColor),b.refreshImmediately(),b.painter.toDataURL()}else return r.connectedBackgroundColor&&b.add(new at({shape:{x:0,y:0,width:m,height:y},style:{fill:r.connectedBackgroundColor}})),B(v,function(C){var A=new Xr({style:{x:C.left*p-s,y:C.top*p-c,image:C.dom}});b.add(A)}),b.refreshImmediately(),x.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,a){return ex(this,"convertToPixel",r,n,a)},t.prototype.convertToLayout=function(r,n,a){return ex(this,"convertToLayout",r,n,a)},t.prototype.convertFromPixel=function(r,n,a){return ex(this,"convertFromPixel",r,n,a)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var a=this._model,i,o=cg(a,r);return B(o,function(l,s){s.indexOf("Models")>=0&&B(l,function(c){var f=c.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(s==="seriesModels"){var h=this._chartsMap[c.__viewId];h&&h.containPoint&&(i=i||h.containPoint(n,c))}},this)},this),!!i},t.prototype.getVisual=function(r,n){var a=this._model,i=cg(a,r,{defaultMainType:"series"}),o=i.seriesModel,l=o.getData(),s=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?l.indexOfRawIndex(i.dataIndex):null;return s!=null?vN(l,s,n):Pm(l,n)},t.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},t.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},t.prototype._initEvents=function(){var r=this;B(Sve,function(a){var i=function(o){var l=r.getModel(),s=o.target,c,f=a==="globalout";if(f?c={}:s&&mc(s,function(y){var x=$e(y);if(x&&x.dataIndex!=null){var b=x.dataModel||l.getSeriesByIndex(x.seriesIndex);return c=b&&b.getDataParams(x.dataIndex,x.dataType,s)||{},!0}else if(x.eventData)return c=he({},x.eventData),!0},!0),c){var h=c.componentType,v=c.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",v=c.seriesIndex);var p=h&&v!=null&&l.getComponent(h,v),m=p&&r[p.mainType==="series"?"_chartsMap":"_componentsMap"][p.__viewId];c.event=o,c.type=a,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:c,model:p,view:m},r.trigger(a,c)}};i.zrEventfulCallAtLast=!0,r._zr.on(a,i,r)});var n=this._messageCenter;B(xR,function(a,i){n.on(i,function(o){r.trigger(i,o)})}),Ade(n,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&L6(this.getDom(),xN,"");var n=this,a=n._api,i=n._model;B(n._componentsViews,function(o){o.dispose(i,a)}),B(n._chartsViews,function(o){o.dispose(i,a)}),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 Tc[n.id]},t.prototype.resize=function(r){if(!this[Or]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=r&&r.silent;this[tn]&&(i==null&&(i=this[tn].silent),a=!0,this[tn]=null),this[Or]=!0,bh(this);try{a&&Zu(this),Jo.update.call(this,{type:"resize",animation:he({duration:0},r&&r.animation)})}catch(o){throw this[Or]=!1,o}this[Or]=!1,xh.call(this,i),Sh.call(this,i)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Ve(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!_R[r]){var a=_R[r](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(r){var n=he({},r);return n.type=yR[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Ve(n)||(n={silent:!!n}),!!cb[r.type]&&this._model){if(this[Or]){this._pendingActions.push(r);return}var a=n.silent;dA.call(this,r,a);var i=n.flush;i?this._zr.flush():i!==!1&&ht.browser.weChat&&this._throttledZrFlush(),xh.call(this,a),Sh.call(this,a)}},t.prototype.updateLabelLayout=function(){Ua.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){Zu=function(h){Rde(h._model);var v=h._scheduler;v.restorePipelines(h._zr,h._model),v.prepareStageTasks(),fA(h,!0),fA(h,!1),v.plan()},fA=function(h,v){for(var p=h._model,m=h._scheduler,y=v?h._componentsViews:h._chartsViews,x=v?h._componentsMap:h._chartsMap,b=h._zr,w=h._api,C=0;C<y.length;C++)y[C].__alive=!1;v?p.eachComponent(function(R,E){R!=="series"&&A(E)}):p.eachSeries(A);function A(R){var E=R.__requireNewView;R.__requireNewView=!1;var N="_ec_"+R.id+"_"+R.type,L=!E&&x[N];if(!L){var O=fo(R.type),I=v?Ht.getClass(O.main,O.sub):It.getClass(O.sub);L=new I,L.init(p,w),x[N]=L,y.push(L),b.add(L.group)}R.__viewId=L.__id=N,L.__alive=!0,L.__model=R,L.group.__ecComponentInfo={mainType:R.mainType,index:R.componentIndex},!v&&m.prepareView(L,R,p,w)}for(var C=0;C<y.length;){var M=y[C];M.__alive?C++:(!v&&M.renderTask.dispose(),b.remove(M.group),M.dispose(p,w),y.splice(C,1),x[M.__id]===M&&delete x[M.__id],M.__id=M.group.__ecComponentInfo=null)}},J0=function(h,v,p,m,y){var x=h._model;if(x.setUpdatePayload(p),!m){B([].concat(h._componentsViews).concat(h._chartsViews),A);return}var b=TE(p,m,y),w=p.excludeSeriesId,C;w!=null&&(C=Le(),B(ar(w),function(M){var R=kr(M,null);R!=null&&C.set(R,!0)})),x&&x.eachComponent(b,function(M){var R=C&&C.get(M.id)!=null;if(!R)if(Mz(p))if(M instanceof Pt)p.type===_c&&!p.notBlur&&!M.get(["emphasis","disabled"])&&bce(M,p,h._api);else{var E=OE(M.mainType,M.componentIndex,p.name,h._api),N=E.focusSelf,L=E.dispatchers;p.type===_c&&N&&!p.notBlur&&QM(M.mainType,M.componentIndex,h._api),L&&B(L,function(O){p.type===_c?Tl(O):Al(O)})}else eR(p)&&M instanceof Pt&&(Cce(M,p,h._api),Az(M),Va(h))},h),x&&x.eachComponent(b,function(M){var R=C&&C.get(M.id)!=null;R||A(h[m==="series"?"_chartsMap":"_componentsMap"][M.__viewId])},h);function A(M){M&&M.__alive&&M[v]&&M[v](M.__model,x,h._api,p)}},Jo={prepareAndUpdate:function(h){Zu(this),Jo.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,v){var p=this._model,m=this._api,y=this._zr,x=this._coordSysMgr,b=this._scheduler;if(p){Ede(p),p.setUpdatePayload(h),b.restoreData(p,h),b.performSeriesTasks(p),x.create(p,m),Ua.trigger("coordsys:aftercreate",p,m),b.performDataProcessorTasks(p,h),hA(this,p),x.update(p,m),n(p),b.performVisualTasks(p,h);var w=p.get("backgroundColor")||"transparent";y.setBackgroundColor(w);var C=p.get("darkMode");C!=null&&C!=="auto"&&y.setDarkMode(C),vA(this,p,m,h,v),Ua.trigger("afterupdate",p,m)}},updateTransform:function(h){var v=this,p=v._model,m=v._api;if(p){p.setUpdatePayload(h);var y=[];p.eachComponent(function(b,w){if(b!==Do){var C=v.getViewOfComponentModel(w);if(C&&C.__alive)if(C.updateTransform){var A=C.updateTransform(w,p,m,h);A&&A.update&&y.push(C)}else y.push(C)}});var x=Le();p.eachSeries(function(b){var w=v._chartsMap[b.__viewId],C=b.pipelineContext;if(w.updateTransform&&!C.progressiveRender){var A=w.updateTransform(b,p,m,h);A&&A.update&&x.set(b.uid,1)}else x.set(b.uid,1)}),v._scheduler.performVisualTasks(p,h,{setDirty:!0,dirtyMap:x}),tx(v,p,m,h,{},x),Ua.trigger("afterupdate",p,m)}},updateView:function(h){var v=this._model;v&&(v.setUpdatePayload(h),It.markUpdateMethod(h,"updateView"),n(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0}),vA(this,v,this._api,h,{}),Ua.trigger("afterupdate",v,this._api))},updateVisual:function(h){var v=this,p=this._model;p&&(p.setUpdatePayload(h),p.eachSeries(function(m){m.getData().clearAllVisual()}),It.markUpdateMethod(h,"updateVisual"),n(p),this._scheduler.performVisualTasks(p,h,{visualType:"visual",setDirty:!0}),p.eachComponent(function(m,y){if(m!=="series"){var x=v.getViewOfComponentModel(y);x&&x.__alive&&x.updateVisual(y,p,v._api,h)}}),p.eachSeries(function(m){var y=v._chartsMap[m.__viewId];y.updateVisual(m,p,v._api,h)}),Ua.trigger("afterupdate",p,this._api))},updateLayout:function(h){Jo.update.call(this,h)}};function r(h,v,p,m,y){if(h._disposed){h.id;return}for(var x=h._model,b=h._coordSysMgr.getCoordinateSystems(),w,C=cg(x,p),A=0;A<b.length;A++){var M=b[A];if(M[v]&&(w=M[v](x,C,m,y))!=null)return w}}ex=r,hA=function(h,v){var p=h._chartsMap,m=h._scheduler;v.eachSeries(function(y){m.updateStreamModes(y,p[y.__viewId])})},dA=function(h,v){var p=this,m=this.getModel(),y=h.type,x=h.escapeConnect,b=cb[y],w=(b.update||"update").split(":"),C=w.pop(),A=w[0]!=null&&fo(w[0]);this[Or]=!0,bh(this);var M=[h],R=!1;h.batch&&(R=!0,M=xe(h.batch,function(F){return F=Ue(he({},F),h),F.batch=null,F}));var E=[],N,L=[],O=b.nonRefinedEventType,I=eR(h),z=Mz(h);if(z&&c8(this._api),B(M,function(F){var X=b.action(F,m,p._api);if(b.refineEvent?L.push(X):N=X,N=N||he({},F),N.type=O,E.push(N),z){var P=CE(h),q=P.queryOptionMap,G=P.mainTypeSpecified,W=G?q.keys()[0]:"series";J0(p,C,F,W),Va(p)}else I?(J0(p,C,F,"series"),Va(p)):A&&J0(p,C,F,A.main,A.sub)}),C!=="none"&&!z&&!I&&!A)try{this[tn]?(Zu(this),Jo.update.call(this,h),this[tn]=null):Jo[C].call(this,h)}catch(F){throw this[Or]=!1,F}if(R?N={type:O,escapeConnect:x,batch:E}:N=E[0],this[Or]=!1,!v){var V=void 0;if(b.refineEvent){var Y=b.refineEvent(L,h,m,this._api).eventContent;In(Ve(Y)),V=Ue({type:b.refinedEventType},Y),V.fromAction=h.type,V.fromActionPayload=h,V.escapeConnect=!0}var H=this._messageCenter;H.trigger(N.type,N),V&&H.trigger(V.type,V)}},xh=function(h){for(var v=this._pendingActions;v.length;){var p=v.shift();dA.call(this,p,h)}},Sh=function(h){!h&&this.trigger("updated")},G3=function(h,v){h.on("rendered",function(p){v.trigger("rendered",p),h.animation.isFinished()&&!v[tn]&&!v._scheduler.unfinished&&!v._pendingActions.length?v.trigger("finished"):h.refresh()})},H3=function(h,v){h.on("mouseover",function(p){var m=p.target,y=mc(m,zg);y&&(_ce(y,p,v._api),Va(v))}).on("mouseout",function(p){var m=p.target,y=mc(m,zg);y&&(wce(y,p,v._api),Va(v))}).on("click",function(p){var m=p.target,y=mc(m,function(w){return $e(w).dataIndex!=null},!0);if(y){var x=y.selected?"unselect":"select",b=$e(y);v._api.dispatchAction({type:x,dataType:b.dataType,dataIndexInside:b.dataIndex,seriesIndex:b.seriesIndex,isFromClick:!0})}})};function n(h){h.clearColorPalette(),h.eachSeries(function(v){v.clearColorPalette()})}function a(h){var v=[],p=[],m=!1;if(h.eachComponent(function(w,C){var A=C.get("zlevel")||0,M=C.get("z")||0,R=C.getZLevelKey();m=m||!!R,(w==="series"?p:v).push({zlevel:A,z:M,idx:C.componentIndex,type:w,key:R})}),m){var y=v.concat(p),x,b;Zx(y,function(w,C){return w.zlevel===C.zlevel?w.z-C.z:w.zlevel-C.zlevel}),B(y,function(w){var C=h.getComponent(w.type,w.idx),A=w.zlevel,M=w.key;x!=null&&(A=Math.max(x,A)),M?(A===x&&M!==b&&A++,b=M):b&&(A===x&&A++,b=""),x=A,C.setZLevel(A)})}}vA=function(h,v,p,m,y){a(v),U3(h,v,p,m,y),B(h._chartsViews,function(x){x.__alive=!1}),tx(h,v,p,m,y),B(h._chartsViews,function(x){x.__alive||x.remove(v,p)})},U3=function(h,v,p,m,y,x){B(x||h._componentsViews,function(b){var w=b.__model;c(w,b),b.render(w,v,p,m),s(w,b),f(w,b)})},tx=function(h,v,p,m,y,x){var b=h._scheduler;y=he(y||{},{updatedSeries:v.getSeries()}),Ua.trigger("series:beforeupdate",v,p,y);var w=!1;v.eachSeries(function(C){var A=h._chartsMap[C.__viewId];A.__alive=!0;var M=A.renderTask;b.updatePayload(M,m),c(C,A),x&&x.get(C.uid)&&M.dirty(),M.perform(b.getPerformArgs(M))&&(w=!0),A.group.silent=!!C.get("silent"),l(C,A),Az(C)}),b.unfinished=w||b.unfinished,Ua.trigger("series:layoutlabels",v,p,y),Ua.trigger("series:transition",v,p,y),v.eachSeries(function(C){var A=h._chartsMap[C.__viewId];s(C,A),f(C,A)}),o(h,v),Ua.trigger("series:afterupdate",v,p,y)},Va=function(h){h[uA]=!0,h.getZr().wakeUp()},bh=function(h){h[Q0]=(h[Q0]+1)%1e6},$3=function(h){h[uA]&&(h.getZr().storage.traverse(function(v){hg(v)||i(v)}),h[uA]=!1)};function i(h){for(var v=[],p=h.currentStates,m=0;m<p.length;m++){var y=p[m];y==="emphasis"||y==="blur"||y==="select"||v.push(y)}h.selected&&h.states.select&&v.push("select"),h.hoverState===M_&&h.states.emphasis?v.push("emphasis"):h.hoverState===Mm&&h.states.blur&&v.push("blur"),h.useStates(v)}function o(h,v){var p=h._zr;if(p.painter.type==="canvas"){var m=p.storage,y=0;m.traverse(function(b){b.isGroup||y++});var x=y>Ie(v.get("hoverLayerThreshold"),a7.hoverLayerThreshold)&&!ht.node&&!ht.worker;(h._usingTHL||x)&&(v.eachSeries(function(b){if(!b.preventUsingHoverLayer){var w=h._chartsMap[b.__viewId];w.__alive&&w.eachRendered(function(C){var A=C.states.emphasis;A&&A.hoverLayer!==Vd&&(A.hoverLayer=x?_8:b8)})}}),h._usingTHL=x)}}function l(h,v){var p=h.get("blendMode")||null;v.eachRendered(function(m){m.isGroup||(m.style.blend=p)})}function s(h,v){if(!h.preventAutoZ){var p=jc(h);v.eachRendered(function(m){return N_(m,p.z,p.zlevel),!0})}}function c(h,v){v.eachRendered(function(p){if(!hg(p)){var m=p.getTextContent(),y=p.getTextGuideLine();p.stateTransition&&(p.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),y&&y.stateTransition&&(y.stateTransition=null),p.hasState()?(p.prevStates=p.currentStates,p.clearStates()):p.prevStates&&(p.prevStates=null)}})}function f(h,v){var p=h.getModel("stateAnimation"),m=h.isAnimationEnabled(),y=p.get("duration"),x=y>0?{duration:y,delay:p.get("delay"),easing:p.get("easing")}:null;v.eachRendered(function(b){if(b.states&&b.states.emphasis){if(hg(b))return;if(b instanceof yt&&Ece(b),b.__dirty){var w=b.prevStates;w&&b.useStates(w)}if(m){b.stateTransition=x;var C=b.getTextContent(),A=b.getTextGuideLine();C&&(C.stateTransition=x),A&&(A.stateTransition=x)}b.__dirty&&i(b)}})}Y3=function(h){return new((function(v){ee(p,v);function p(){return v!==null&&v.apply(this,arguments)||this}return p.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},p.prototype.getComponentByElement=function(m){for(;m;){var y=m.__ecComponentInfo;if(y!=null)return h._model.getComponent(y.mainType,y.index);m=m.parent}},p.prototype.enterEmphasis=function(m,y){Tl(m,y),Va(h)},p.prototype.leaveEmphasis=function(m,y){Al(m,y),Va(h)},p.prototype.enterBlur=function(m){o8(m),Va(h)},p.prototype.leaveBlur=function(m){IE(m),Va(h)},p.prototype.enterSelect=function(m){l8(m),Va(h)},p.prototype.leaveSelect=function(m){s8(m),Va(h)},p.prototype.getModel=function(){return h.getModel()},p.prototype.getViewOfComponentModel=function(m){return h.getViewOfComponentModel(m)},p.prototype.getViewOfSeriesModel=function(m){return h.getViewOfSeriesModel(m)},p.prototype.getECUpdateCycleVersion=function(){return h[Q0]},p.prototype.usingTHL=function(){return h._usingTHL},p})(e8))(h)},cY=function(h){function v(p,m){for(var y=0;y<p.length;y++){var x=p[y];x[cA]=m}}B(yR,function(p,m){h._messageCenter.on(m,function(y){if(hb[h.group]&&h[cA]!==F3){if(y&&y.escapeConnect)return;var x=h.makeActionFromEvent(y),b=[];B(Tc,function(w){w!==h&&w.group===h.group&&b.push(w)}),v(b,F3),B(b,function(w){w[cA]!==yve&&w.dispatchAction(x)}),v(b,xve)}})})}})(),t})(fi),yN=ub.prototype;yN.on=iY("on");yN.off=iY("off");yN.one=function(e,t,r){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),n.off(e,a)}this.on.call(this,e,a,r)};var Sve=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var cb={},yR={},xR={},SR=[],bR=[],fb=[],fY={},_R={},Tc={},hb={},bve=+new Date-0,_ve=+new Date-0,xN="_echarts_instance_";function wve(e,t,r){var n=!(r&&r.ssr);if(n){var a=SN(e);if(a)return a}var i=new ub(e,t,r);return i.id="ec_"+bve++,Tc[i.id]=i,n&&L6(e,xN,i.id),cY(i),Ua.trigger("afterinit",i),i}function Cve(e){if(pe(e)){var t=e;e=null,B(t,function(r){r.group!=null&&(e=r.group)}),e=e||"g_"+_ve++,B(t,function(r){r.group=e})}return hb[e]=!0,e}function hY(e){hb[e]=!1}var Tve=hY;function Ave(e){De(e)?e=Tc[e]:e instanceof ub||(e=SN(e)),e instanceof ub&&!e.isDisposed()&&e.dispose()}function SN(e){return Tc[fue(e,xN)]}function Dve(e){return Tc[e]}function bN(e,t){fY[e]=t}function _N(e){qe(bR,e)<0&&bR.push(e)}function wN(e,t){CN(SR,e,t,hve)}function dY(e){V_("afterinit",e)}function vY(e){V_("afterupdate",e)}function V_(e,t){Ua.on(e,t)}function ki(e,t,r){var n,a,i,o,l;Be(t)&&(r=t,t=""),Ve(e)?(n=e.type,a=e.event,o=e.update,l=e.publishNonRefinedEvent,r||(r=e.action),i=e.refineEvent):(n=e,a=t);function s(f){return f.toLowerCase()}a=s(a||n);var c=i?s(n):a;cb[n]||(In(V3.test(n)&&V3.test(a)),i&&In(a!==n),cb[n]={actionType:n,refinedEventType:a,nonRefinedEventType:c,update:o,action:r,refineEvent:i},xR[a]=1,i&&l&&(xR[c]=1),yR[c]=n)}function pY(e,t){Hd.register(e,t)}function Mve(e){var t=Hd.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function Rve(e,t){q7(e,t)}function gY(e,t){CN(fb,e,t,tY,"layout")}function eu(e,t){CN(fb,e,t,rY,"visual")}var W3=[];function CN(e,t,r,n,a,i){if((Be(t)||Ve(t))&&(r=t,t=n),!(qe(W3,r)>=0)){W3.push(r);var o=B7.wrapStageHandler(r,a);o.__prio=t,o.__raw=r,e.push(o)}}function TN(e,t){_R[e]=t}function Eve(e){jU({createCanvas:e})}function mY(e,t,r){var n=$7("registerMap");n&&n(e,t,r)}function Nve(e){var t=$7("getMap");return t&&t(e)}var yY=jhe;eu(mN,cde);eu(z_,fde);eu(z_,hde);eu(mN,Cde);eu(z_,Tde);eu(nY,nve);_N(f7);wN(uve,ghe);TN("default",dde);ki({type:_c,event:_c,update:_c},ur);ki({type:iS,event:iS,update:iS},ur);ki({type:XS,event:NE,update:XS,action:ur,refineEvent:AN,publishNonRefinedEvent:!0});ki({type:ZM,event:NE,update:ZM,action:ur,refineEvent:AN,publishNonRefinedEvent:!0});ki({type:ZS,event:NE,update:ZS,action:ur,refineEvent:AN,publishNonRefinedEvent:!0});function AN(e,t,r,n){return{eventContent:{selected:Tce(r),isFromClick:t.isFromClick||!1}}}bN("default",{});bN("dark",G7);var Lve={};function gp(e){return e==null?0:e.length||1}function q3(e){return e}var hf=(function(){function e(t,r,n,a,i,o){this._old=t,this._new=r,this._oldKeyGetter=n||q3,this._newKeyGetter=a||q3,this.context=i,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,r=this._new,n={},a=new Array(t.length),i=new Array(r.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(r,n,i,"_newKeyGetter");for(var o=0;o<t.length;o++){var l=a[o],s=n[l],c=gp(s);if(c>1){var f=s.shift();s.length===1&&(n[l]=s[0]),this._update&&this._update(f,o)}else c===1?(n[l]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(r,a,o,"_newKeyGetter");for(var l=0;l<i.length;l++){var s=i[l],c=n[s],f=a[s],h=gp(c),v=gp(f);if(h>1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,c),a[s]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,c),a[s]=null;else if(h===1&&v===1)this._update&&this._update(f,c),a[s]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,c),a[s]=null;else if(h>1)for(var p=0;p<h;p++)this._remove&&this._remove(c[p]);else this._remove&&this._remove(c)}this._performRestAdd(o,a)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var a=t[n],i=r[a],o=gp(i);if(o>1)for(var l=0;l<o;l++)this._add&&this._add(i[l]);else o===1&&this._add&&this._add(i);r[a]=null}},e.prototype._initIndexMap=function(t,r,n,a){for(var i=this._diffModeMultiple,o=0;o<t.length;o++){var l="_ec_"+this[a](t[o],o);if(i||(n[o]=l),!!r){var s=r[l],c=gp(s);c===0?(r[l]=o,i&&n.push(l)):c===1?r[l]=[s,o]:s.push(o)}}},e})(),Ive=(function(){function e(t,r){this._encode=t,this._schema=r}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e})();function Ove(e,t){var r={},n=r.encode={},a=Le(),i=[],o=[],l={};B(e.dimensions,function(v){var p=e.getDimensionInfo(v),m=p.coordDim;if(m){var y=p.coordDimIndex;pA(n,m)[y]=v,p.isExtraCoord||(a.set(m,1),kve(p.type)&&(i[0]=v),pA(l,m)[y]=e.getDimensionIndex(p.name)),p.defaultTooltip&&o.push(v)}K6.each(function(x,b){var w=pA(n,b),C=p.otherDims[b];C!=null&&C!==!1&&(w[C]=p.name)})});var s=[],c={};a.each(function(v,p){var m=n[p];c[p]=m[0],s=s.concat(m)}),r.dataDimsOnCoord=s,r.dataDimIndicesOnCoord=xe(s,function(v){return e.getDimensionInfo(v).storeDimIndex}),r.encodeFirstDimNotExtra=c;var f=n.label;f&&f.length&&(i=f.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,r.userOutput=new Ive(l,t),r}function pA(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function db(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function kve(e){return!(e==="ordinal"||e==="time")}var dS=(function(){function e(t){this.otherDims={},t!=null&&he(this,t)}return e})(),Pve=it(),jve={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},xY=(function(){function e(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=bY(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return Ie(this._dimNameMap.get(t),-1)},e.prototype.getSourceDimension=function(t){var r=this.source.dimensionsDefine;if(r)return r[t]},e.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,r=d7(this.source),n=!_Y(t),a="",i=[],o=0,l=0;o<t;o++){var s=void 0,c=void 0,f=void 0,h=this.dimensions[l];if(h&&h.storeDimIndex===o)s=r?h.name:null,c=h.type,f=h.ordinalMeta,l++;else{var v=this.getSourceDimension(o);v&&(s=r?v.name:null,c=v.type)}i.push({property:s,type:c,ordinalMeta:f}),r&&s!=null&&(!h||!h.isCalculationCoord)&&(a+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),a+="$",a+=jve[c]||"f",f&&(a+=f.uid),a+="$"}var p=this.source,m=[p.seriesLayoutBy,p.startIndex,a].join("$$");return{dimensions:i,hash:m}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===r)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(r);o&&(a=o.name)}t.push(a)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e})();function SY(e){return e instanceof xY}function DN(e){for(var t=Le(),r=0;r<(e||[]).length;r++){var n=e[r],a=Ve(n)?n.name:n;a!=null&&t.get(a)==null&&t.set(a,r)}return t}function bY(e){var t=Pve(e);return t.dimNameMap||(t.dimNameMap=DN(e.dimensionsDefine))}function _Y(e){return e>30}var mp=Ve,ls=xe,Bve=typeof Int32Array>"u"?Array:Int32Array,zve="e\0\0",X3=-1,Vve=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Fve=["_approximateExtent"],Z3,rx,yp,xp,gA,Sp,mA,Ln=(function(){function e(t,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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;SY(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],l={},s=!1,c={},f=0;f<n.length;f++){var h=n[f],v=De(h)?new dS({name:h}):h instanceof dS?h:new dS(h),p=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=p,v.coordDimIndex=0);var m=v.otherDims=v.otherDims||{};o.push(p),i[p]=v,c[p]!=null&&(s=!0),v.createInvertedIndices&&(l[p]=[]),a&&(v.storeDimIndex=f),m.itemName===0&&(this._nameDimIdx=v.storeDimIndex),m.itemId===0&&(this._idDimIdx=v.storeDimIndex)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=r,this._invertedIndicesMap=l,this._dimOmitted){var y=this._dimIdxToName=Le();B(o,function(x){y.set(i[x].storeDimIndex,x)})}}return e.prototype.getDimension=function(t){var r=this._recognizeDimIndex(t);if(r==null)return t;if(r=t,!this._dimOmitted)return this.dimensions[r];var n=this._dimIdxToName.get(r);if(n!=null)return n;var a=this._schema.getSourceDimension(r);if(a)return a.name},e.prototype.getDimensionIndex=function(t){var r=this._recognizeDimIndex(t);if(r!=null)return r;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},e.prototype._recognizeDimIndex=function(t){if(pt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},e.prototype._getStoreDimIndex=function(t){var r=this.getDimensionIndex(t);return r},e.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},e.prototype._initGetDimensionInfo=function(t){var r=this._dimInfos;this._getDimInfo=t?function(n){return r.hasOwnProperty(n)?r[n]:void 0}:function(n){return r[n]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(t,r){var n=this._dimSummary;if(r==null)return n.encodeFirstDimNotExtra[t];var a=n.encode[t];return a?a[r]:null},e.prototype.mapDimensionsAll=function(t){var r=this._dimSummary,n=r.encode[t];return(n||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(t,r,n){var a=this,i;if(t instanceof fR&&(i=t),!i){var o=this.dimensions,l=cN(t)||Sn(t)?new v7(t,o.length):t;i=new fR;var s=ls(o,function(c){return{type:a._dimInfos[c].type,property:c}});i.initData(l,s,n)}this._store=i,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=Ove(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(t){var r=this._store.appendData(t);this._doInit(r[0],r[1])},e.prototype.appendValues=function(t,r){var n=this._store.appendValues(t,r&&r.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var l=a;l<i;l++){var s=l-a;this._nameList[l]=r[s],o&&mA(this,l)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var a=this._dimInfos[r[n]];a.ordinalMeta&&t.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Ns&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,l=a.getSource().sourceFormat,s=l===Ma;if(s&&!a.pure)for(var c=[],f=t;f<r;f++){var h=a.getItem(f,c);if(!this.hasItemOption&&Qse(h)&&(this.hasItemOption=!0),h){var v=h.name;i[f]==null&&v!=null&&(i[f]=kr(v,null));var p=h.id;o[f]==null&&p!=null&&(o[f]=kr(p,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<r;f++)mA(this,f);Z3(this)}},e.prototype.getApproximateExtent=function(t,r){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t),r)},e.prototype.setApproximateExtent=function(t,r){r=this.getDimension(r),this._approximateExtent[r]=t.slice()},e.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},e.prototype.setCalculationInfo=function(t,r){mp(t)?he(this._calculationInfo,t):this._calculationInfo[t]=r},e.prototype.getName=function(t){var r=this.getRawIndex(t),n=this._nameList[r];return n==null&&this._nameDimIdx!=null&&(n=yp(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),a=this._store.getOrdinalMeta(t);return a?a.categories[n]:n},e.prototype.getId=function(t){return rx(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,a=this._dimInfos[t];if(a)return n.get(a.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,a=this._dimInfos[t];if(a)return n.getByRawIndex(a.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t),null)},e.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},e.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},e.prototype.getValues=function(t,r){var n=this,a=this._store;return pe(t)?a.getValues(ls(t,function(i){return n._getStoreDimIndex(i)}),r):a.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,a=r.length;n<a;n++)if(isNaN(this._store.get(r[n],t)))return!1;return!0},e.prototype.indexOfName=function(t){for(var r=0,n=this._store.count();r<n;r++)if(this.getName(r)===t)return r;return-1},e.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},e.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},e.prototype.rawIndexOf=function(t,r){var n=t&&this._invertedIndicesMap[t],a=n&&n[r];return a==null||isNaN(a)?X3:a},e.prototype.each=function(t,r,n){Be(t)&&(n=r,r=t,t=[]);var a=n||this,i=ls(xp(t),this._getStoreDimIndex,this);this._store.each(i,a?Ee(r,a):r)},e.prototype.filterSelf=function(t,r,n){Be(t)&&(n=r,r=t,t=[]);var a=n||this,i=ls(xp(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?Ee(r,a):r),this},e.prototype.selectRange=function(t){var r=this,n={},a=dt(t);return B(a,function(i){var o=r._getStoreDimIndex(i);n[o]=t[i]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){Be(t)&&(n=r,r=t,t=[]),n=n||this;var a=[];return this.each(t,function(){a.push(r&&r.apply(this,arguments))},n),a},e.prototype.map=function(t,r,n,a){var i=n||a||this,o=ls(xp(t),this._getStoreDimIndex,this),l=Sp(this);return l._store=this._store.map(o,i?Ee(r,i):r),l},e.prototype.modify=function(t,r,n,a){var i=n||a||this,o=ls(xp(t),this._getStoreDimIndex,this);this._store.modify(o,i?Ee(r,i):r)},e.prototype.downSample=function(t,r,n,a){var i=Sp(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),r,n,a),i},e.prototype.minmaxDownSample=function(t,r){var n=Sp(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=Sp(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),r),n},e.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},e.prototype.getItemModel=function(t){var r=this.hostModel,n=this.getRawDataItem(t);return new ct(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new hf(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return rx(t,n)},function(n){return rx(r,n)})},e.prototype.getVisual=function(t){var r=this._visual;return r&&r[t]},e.prototype.setVisual=function(t,r){this._visual=this._visual||{},mp(t)?he(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],a=n&&n[r];return a??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[r];return i==null&&(i=this.getVisual(r),pe(i)?i=i.slice():mp(i)&&(i=he({},i)),a[r]=i),i},e.prototype.setItemVisual=function(t,r,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,mp(r)?he(a,r):a[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){mp(t)?he(this._layout,t):this._layout[t]=r},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,r,n){this._itemLayouts[t]=n?he(this._itemLayouts[t]||{},r):r},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,r){var n=this.hostModel&&this.hostModel.seriesIndex;XM(n,this.dataType,t,r),this._graphicEls[t]=r},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,r){B(this._graphicEls,function(n,a){n&&t&&t.call(r,n,a)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:ls(this.dimensions,this._getDimInfo,this),this.hostModel)),gA(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Be(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return r.apply(this,[a].concat(v_(arguments)))})},e.internalField=(function(){Z3=function(t){var r=t._invertedIndicesMap;B(r,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,l=t._store;if(o){n=r[a]=new Bve(o.categories.length);for(var s=0;s<n.length;s++)n[s]=X3;for(var s=0;s<l.count();s++)n[l.get(i.storeDimIndex,s)]=s}})},yp=function(t,r,n){return kr(t._getCategory(r,n),null)},rx=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=yp(t,t._idDimIdx,r)),n==null&&(n=zve+r),n},xp=function(t){return pe(t)||(t=t!=null?[t]:[]),t},Sp=function(t){var r=new e(t._schema?t._schema:ls(t.dimensions,t._getDimInfo,t),t.hostModel);return gA(r,t),r},gA=function(t,r){B(Vve.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,B(Fve,function(n){t[n]=je(r[n])}),t._calculationInfo=he({},r._calculationInfo)},mA=function(t,r){var n=t._nameList,a=t._idList,i=t._nameDimIdx,o=t._idDimIdx,l=n[r],s=a[r];if(l==null&&i!=null&&(n[r]=l=yp(t,i,r)),s==null&&o!=null&&(a[r]=s=yp(t,o,r)),s==null&&l!=null){var c=t._nameRepeatCount,f=c[l]=(c[l]||0)+1;s=l,f>1&&(s+="__ec__"+f),a[r]=s}}})(),e})();function Gve(e,t){return qd(e,t).dimensions}function qd(e,t){cN(e)||(e=fN(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],a=Le(),i=[],o=Hve(e,r,n,t.dimensionsCount),l=t.canOmitUnusedDimensions&&_Y(o),s=n===e.dimensionsDefine,c=s?bY(e):DN(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,o));for(var h=Le(f),v=new C7(o),p=0;p<v.length;p++)v[p]=-1;function m(L){var O=v[L];if(O<0){var I=n[L],z=Ve(I)?I:{name:I},V=new dS,Y=z.name;Y!=null&&c.get(Y)!=null&&(V.name=V.displayName=Y),z.type!=null&&(V.type=z.type),z.displayName!=null&&(V.displayName=z.displayName);var H=i.length;return v[L]=H,V.storeDimIndex=L,i.push(V),V}return i[O]}if(!l)for(var p=0;p<o;p++)m(p);h.each(function(L,O){var I=ar(L).slice();if(I.length===1&&!De(I[0])&&I[0]<0){h.set(O,!1);return}var z=h.set(O,[]);B(I,function(V,Y){var H=De(V)?c.get(V):V;H!=null&&H<o&&(z[Y]=H,x(m(H),O,Y))})});var y=0;B(r,function(L){var O,I,z,V;if(De(L))O=L,V={};else{V=L,O=V.name;var Y=V.ordinalMeta;V.ordinalMeta=null,V=he({},V),V.ordinalMeta=Y,I=V.dimsDef,z=V.otherDims,V.name=V.coordDim=V.coordDimIndex=V.dimsDef=V.otherDims=null}var H=h.get(O);if(H!==!1){if(H=ar(H),!H.length)for(var F=0;F<(I&&I.length||1);F++){for(;y<o&&m(y).coordDim!=null;)y++;y<o&&H.push(y++)}B(H,function(X,P){var q=m(X);if(s&&V.type!=null&&(q.type=V.type),x(Ue(q,V),O,P),q.name==null&&I){var G=I[P];!Ve(G)&&(G={name:G}),q.name=q.displayName=G.name,q.defaultTooltip=G.defaultTooltip}z&&Ue(q.otherDims,z)})}});function x(L,O,I){K6.get(O)!=null?L.otherDims[O]=I:(L.coordDim=O,L.coordDimIndex=I,a.set(O,!0))}var b=t.generateCoord,w=t.generateCoordCount,C=w!=null;w=b?w||1:0;var A=b||"value";function M(L){L.name==null&&(L.name=L.coordDim)}if(l)B(i,function(L){M(L)}),i.sort(function(L,O){return L.storeDimIndex-O.storeDimIndex});else for(var R=0;R<o;R++){var E=m(R),N=E.coordDim;N==null&&(E.coordDim=Uve(A,a,C),E.coordDimIndex=0,(!b||w<=0)&&(E.isExtraCoord=!0),w--),M(E),E.type==null&&(l7(e,R)===dn.Must||E.isExtraCoord&&(E.otherDims.itemName!=null||E.otherDims.seriesName!=null))&&(E.type="ordinal")}return w_(i,function(L){return L.name},function(L,O){O>0&&(L.name=L.name+(O-1))}),new xY({source:e,dimensions:i,fullDimensionCount:o,dimensionOmitted:l})}function Hve(e,t,r,n){var a=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return B(t,function(i){var o;Ve(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function Uve(e,t,r){if(r||t.hasKey(e)){for(var n=0;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var Yve=(function(){function e(t){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=t}return e})();function $ve(e){var t=e.get("coordinateSystem"),r=new Yve(t),n=Wve[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var Wve={cartesian2d:function(e,t,r,n){var a=e.getReferringComponents("xAxis",dr).models[0],i=e.getReferringComponents("yAxis",dr).models[0];t.coordSysDims=["x","y"],r.set("x",a),r.set("y",i),_h(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),_h(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var a=e.getReferringComponents("singleAxis",dr).models[0];t.coordSysDims=["single"],r.set("single",a),_h(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var a=e.getReferringComponents("polar",dr).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",i),r.set("angle",o),_h(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),_h(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,r,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,r,n){var a=e.ecModel,i=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();B(i.parallelAxisIndex,function(l,s){var c=a.getComponent("parallelAxis",l),f=o[s];r.set(f,c),_h(c)&&(n.set(f,c),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=s))})},matrix:function(e,t,r,n){var a=e.getReferringComponents("matrix",dr).models[0];t.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");r.set("x",i),r.set("y",o),n.set("x",i),n.set("y",o)}};function _h(e){return e.get("type")==="category"}function wY(e,t,r){r=r||{};var n=r.byIndex,a=r.stackedCoordDimension,i,o,l;qve(t)?i=t:(o=t.schema,i=o.dimensions,l=t.store);var s=!!(e&&e.get("stack")),c,f,h,v,p=!0;function m(A){return A.type!=="ordinal"&&A.type!=="time"}if(B(i,function(A,M){De(A)&&(i[M]=A={name:A}),m(A)||(p=!1)}),B(i,function(A,M){s&&!A.isExtraCoord&&(!n&&!c&&A.ordinalMeta&&(c=A),!f&&m(A)&&(!p||A.coordDim!=="x"&&A.coordDim!=="angle")&&(!a||a===A.coordDim)&&(f=A))}),f&&!n&&!c&&(n=!0),f){h="__\0ecstackresult_"+e.id,v="__\0ecstackedover_"+e.id,c&&(c.createInvertedIndices=!0);var y=f.coordDim,x=f.type,b=0;B(i,function(A){A.coordDim===y&&b++});var w={name:h,coordDim:y,coordDimIndex:b,type:x,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},C={name:v,coordDim:v,coordDimIndex:b+1,type:x,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(l&&(w.storeDimIndex=l.ensureCalculationDimension(v,x),C.storeDimIndex=l.ensureCalculationDimension(h,x)),o.appendCalculationDimension(w),o.appendCalculationDimension(C)):(i.push(w),i.push(C))}return{stackedDimension:f&&f.name,stackedByDimension:c&&c.name,isStackedByIndex:n,stackedOverDimension:v,stackResultDimension:h}}function qve(e){return!SY(e.schema)}function Dl(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function MN(e,t){return Dl(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Xve(e,t){var r=e.get("coordinateSystem"),n=Hd.get(r),a;return t&&t.coordSysDims&&(a=xe(t.coordSysDims,function(i){var o={name:i},l=t.axisMap.get(i);if(l){var s=l.get("type");o.type=db(s)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function Zve(e,t,r){var n,a;return r&&B(e,function(i,o){var l=i.coordDim,s=r.categoryAxisMap.get(l);s&&(n==null&&(n=o),i.ordinalMeta=s.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(e[n].otherDims.itemName=0),n}function Oo(e,t,r){r=r||{};var n=t.getSourceManager(),a,i=!1;e?(i=!0,a=fN(e)):(a=n.getSource(),i=a.sourceFormat===Ma);var o=$ve(t),l=Xve(t,o),s=r.useEncodeDefaulter,c=Be(s)?s:s?et(o7,l,t):null,f={coordDimensions:l,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!i},h=qd(a,f),v=Zve(h.dimensions,r.createInvertedIndices,o),p=i?null:n.getSharedDataStore(h),m=wY(t,{schema:h,store:p}),y=new Ln(h,t);y.setCalculationInfo(m);var x=v!=null&&Kve(a)?function(b,w,C,A){return A===v?C:this.defaultDimValueGetter(b,w,C,A)}:null;return y.hasItemOption=!1,y.initData(i?a:p,null,x),y}function Kve(e){if(e.sourceFormat===Ma){var t=Qve(e.data||[]);return!pe(Id(t))}}function Qve(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Pi=(function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e})();C_(Pi);var Jve=0,$g=(function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Jve,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,a=n&&xe(n,epe);return new e({categories:a,needCollect:!a,deduplication:r.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var r,n=this._needCollect;if(!De(t)&&!n)return t;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=t,this._onCollect&&this._onCollect(t,r),r;var a=this._getOrCreateMap();return r=a.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,a.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Le(this.categories))},e})();function epe(e){return Ve(e)&&e.value!=null?e.value:e+""}var Qa=0,Wg=1,tpe={needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1},CY=dt(tpe),vb=2,TY=3;function RN(e,t,r){var n;e=e||{};var a=Un();if(a){var i=a.createBreakScaleMapper(t,r);i.hasBreaks()&&(B(CY,function(o){i[o]&&(e[o]=Ee(i[o],i))}),n=i)}return n==null&&npe(e,r),{brk:n,mapper:e}}function AY(e,t){B(CY,function(r){e[r]=t[r]})}function DY(e,t){e.freeze=ur}function qg(e){return e.getExtentUnsafe(Qa,vb)}function pb(e,t){return e.getExtentUnsafe(Wg,t)||e.getExtentUnsafe(Qa,t)}function rpe(e){var t=pb(e,TY);return t[1]-t[0]}function F_(e){var t=e.getExtentUnsafe(Qa,TY);return t[1]-t[0]}function npe(e,t){var r=e||{},n=[];return r._extents=n,n[Qa]=t?t.slice():yn(),he(r,ape),r}var ape={needTransform:function(){return!1},normalize:function(e){var t=this._extents[Wg]||this._extents[Qa];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[Wg]||this._extents[Qa];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=pb(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[Qa].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){K3(this._extents,Qa,e,t)},setExtent2:function(e,t,r){var n=this._extents;n[e]||(n[e]=n[Qa].slice()),K3(n,e,t,r)},freeze:function(){}};function K3(e,t,r,n){ud(r,n)&&(e[t][0]=r,e[t][1]=n)}function MY(e){return gb(e)||pd(e)}function gb(e){return e.type==="interval"}function jm(e){return e.type==="time"}function pd(e){return e.type==="log"}function fa(e){return e.type==="ordinal"}function ipe(e){var t=b_(e),r=af(10,t),n=To(e/r);return n?n===2?n=3:n===3?n=5:n*=2:n=1,xt(n*r,-t)}function zc(e){return co(e)+2}function nx(e,t){return Ec(e)/Ec(t)}function yA(e,t,r){var n=r&&r.lookup;if(n){for(var a=0;a<n.from.length;a++)if(e===n.from[a])return n.to[a]}return af(t,e)}function RY(e,t,r){var n=e.slice();if(n[0]===n[1]){var a=r&&r.ctnShp;if(n[0]!==0){var i=sr(n[0]);t[1]||(n[1]+=i/2),n[0]-=i/2}else a&&(n[0]=-1),n[1]=1}return(!Cl(n[0])||!Cl(n[1]))&&(n[0]=0,n[1]=1),n[1]<n[0]&&n.reverse(),n}function ope(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function G_(e,t){return e=e||t,To(st(e,1))}function EY(e,t,r){var n=qg(e),a=n[0],i=e.count(),o=Math.max((t||0)+1,1);a!==0&&o>1&&i/o>2&&(a=Math.round(Math.ceil(a/o)*o)),a!==n[0]&&s(n[0],!0,!0);for(var l=a;l<=n[1];l+=o)s(l,!1,l===n[0]||l===n[1]);l-o!==n[1]&&s(n[1],!0,!0);function s(c,f,h){r({value:c,offInterval:f},h)}}var mb=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;n.type="ordinal",n.parse=t.parse,AY(n,t.decoratedMethods);var a=r.ordinalMeta;a||(a=new $g({})),pe(a)&&(a=new $g({categories:xe(a,function(o){return Ve(o)?o.value:o})})),n._ordinalMeta=a;var i=RN(null,null,r.extent||[0,a.categories.length-1]);return n._mapper=i.mapper,DY(n),n}return t.parse=function(r){return r==null?r=NaN:De(r)?(r=this._ordinalMeta.getOrdinal(r),r==null&&(r=NaN)):r=To(r),r},t.prototype.getTicks=function(){var r=[];return EY(this,0,function(n){r.push(n)}),r},t.prototype.getMinorTicks=function(r){},t.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,l=this._ordinalMeta.categories.length,s=kt(l,n.length);o<s;++o){var c=a[o]=n[o];i[c]=o}for(var f=0;o<l;++o){for(;i[f]!=null;)f++;a[o]=f,i[f]=o}},t.prototype._getTickNumber=function(r){var n=this._ticksByOrdinalNumber;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getRawOrdinalNumber=function(r){var n=this._ordinalNumbersByTick;return n&&r>=0&&r<n.length?n[r]:r},t.prototype.getLabel=function(r){if(!this.isBlank()){var n=this.getRawOrdinalNumber(r.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},t.prototype.count=function(){var r=qg(this._mapper);return r[1]-r[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type="ordinal",t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(r){return this._mapper.contain(this._getTickNumber(r))&&r>=0&&r<this._ordinalMeta.categories.length},normalize:function(r){return this._mapper.normalize(this._getTickNumber(r))},scale:function(r){return this.getRawOrdinalNumber(To(this._mapper.scale(r)))},transformIn:function(r,n){return this._mapper.transformIn(this._getTickNumber(r),n)},transformOut:function(r,n){return this.getRawOrdinalNumber(this._mapper.transformOut(r,n))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(r,n){return this._mapper.getExtentUnsafe(r,n)},setExtent:function(r,n){return this._mapper.setExtent(r,n)},setExtent2:function(r,n,a){return this._mapper.setExtent2(r,n,a)}},t})(Pi);Pi.registerClass(mb);function EN(e,t,r,n){for(var a=e.getTicks({expandToNicedExtent:!0}),i=[],o=e.getExtent(),l=1;l<a.length;l++){var s=a[l],c=a[l-1];if(!(c.break||s.break)){for(var f=0,h=[],v=s.value-c.value,p=v/t,m=zc(p);f<t-1;){var y=xt(c.value+(f+1)*p,m);y>o[0]&&y<o[1]&&h.push(y),f++}var x=Un();x&&x.pruneTicksByBreak("auto",h,r,function(b){return b},n,o),i.push(h)}}return i}var Os=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;n.type="interval",n.parse=t.parse,r=r||{};var a=k8(n,r),i=RN(n,a,null);return n.brk=i.brk,n._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},n}return t.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.getConfig=function(){return je(this._cfg)},t.prototype.setConfig=function(r){var n=qg(this);this._cfg=r=je(r),r.niceExtent==null&&(r.niceExtent=n.slice()),r.intervalPrecision==null&&(r.intervalPrecision=zc(r.interval))},t.prototype.getTicks=function(r){r=r||{};var n=this._cfg,a=n.interval,i=qg(this),o=n.niceExtent,l=n.intervalPrecision,s=Un(),c=this.brk,f=s&&c,h=[];if(!a)return h;if(r.breakTicks==="only_break"&&f)return s.addBreaksToTicks(h,c.breaks,i),h;var v=3e3;i[0]<o[0]&&h.push({value:r.expandToNicedExtent?xt(o[0]-a,l):i[0]});for(var p=function(C,A){return To((A-C)/a)},m=n.intervalCount,y=o[0],x=0;;x++){if(m==null){if(y>o[1]||!isFinite(y)||!isFinite(o[1]))break}else{if(x>m)break;y=kt(y,o[1]),x===m&&(y=o[1])}if(h.push({value:y}),y=xt(y+a,l),c){var b=c.calcNiceTickMultiple(y,p);b>=0&&(y=xt(y+b*a,l))}if(h.length>0&&y===h[h.length-1].value)break;if(h.length>v)return[]}var w=h.length?h[h.length-1].value:o[1];return i[1]>w&&h.push({value:r.expandToNicedExtent?xt(w+a,l):i[1]}),f&&s.pruneTicksByBreak(r.pruneByBreak,h,c.breaks,function(C){return C.value},n.interval,i),f&&r.breakTicks!=="none"&&s.addBreaksToTicks(h,c.breaks,i),h},t.prototype.getMinorTicks=function(r){return EN(this,r,eb(this),this._cfg.interval)},t.prototype.getLabel=function(r,n){if(r==null)return"";var a=n&&n.precision;a==null?a=co(r.value)||0:a==="auto"&&(a=this._cfg.intervalPrecision);var i=xt(r.value,a,!0);return rN(i)},t.type="interval",t})(Pi);Pi.registerClass(Os);var lpe=function(e,t,r,n){for(;r<n;){var a=r+n>>>1;e[a][1]<t?r=a+1:n=a}return r},NY=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;n.type="time",n.parse=t.parse,n._locale=r.locale,n._useUTC=r.useUTC,n._interval=0;var a=k8(n,r),i=RN(n,a,null);return n.brk=i.brk,n}return t.prototype.getLabel=function(r){return Om(r.value,Hz[Ife(vg(this._minLevelUnit))]||Hz.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(r,n,a){return Ofe(r,n,a,this._locale,this._useUTC)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,a=qg(this),i=Un(),o=this.brk,l=i&&o,s=[];if(!n)return s;var c=this._useUTC;if(l&&r.breakTicks==="only_break")return Un().addBreaksToTicks(s,o.breaks,a),s;s=vpe(this._minLevelUnit,this._approxInterval,c,a,F_(this),o);var f=ba.length-1,h=0;return B(s,function(v){v.time&&(f=Math.min(f,qe(ba,v.time.upperTimeUnit)),h=Math.max(h,v.time.level))}),l&&Un().pruneTicksByBreak(r.pruneByBreak,s,o.breaks,function(v){return v.value},this._approxInterval,a),l&&r.breakTicks!=="none"&&Un().addBreaksToTicks(s,o.breaks,a,function(v){for(var p=Math.max(qe(ba,Zh(v.vmin,c)),qe(ba,Zh(v.vmax,c))),m=0,y=0;y<ba.length;y++)if(!LY(ba[y],v.vmin,v.vmax,c)){m=y;break}var x=Math.min(m,f),b=Math.max(x,p);return{level:h,lowerTimeUnit:ba[b],upperTimeUnit:ba[x]}}),s},t.prototype.getMinorTicks=function(r){return EN(this,r,eb(this),this._interval)},t.prototype.setTimeInterval=function(r){this._interval=r.interval,this._approxInterval=r.approxInterval,this._minLevelUnit=r.minLevelUnit},t.parse=function(r){return pt(r)?Math.round(r):+Lo(r)},t.type="time",t})(Pi),ax=[["second",qE],["minute",XE],["hour",dg],["quarter-day",dg*6],["half-day",dg*12],["day",Ka*1.2],["half-week",Ka*3.5],["week",Ka*7],["month",Ka*31],["quarter",Ka*95],["half-year",Gz/2],["year",Gz]];function LY(e,t,r,n){return rb(new Date(t),e,n).getTime()===rb(new Date(r),e,n).getTime()}function spe(e,t){return e/=Ka,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function upe(e){var t=30*Ka;return e/=t,e>6?6:e>3?3:e>2?2:1}function cpe(e){return e/=dg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Q3(e,t){return e/=t?XE:qE,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function fpe(e){return st(__(e,!0),1)}function hpe(e,t,r){var n=Math.max(0,qe(ba,t)-1);return rb(new Date(e),ba[n],r).getTime()}function dpe(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var a=r.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function vpe(e,t,r,n,a,i){var o=3e3,l=Rfe,s=0;function c(F,X,P,q,G,W,Z){for(var Q=dpe(G,F),U=X,K=new Date(U);U<P&&U<=n[1]&&(Z.push({value:U}),!(s++>o));)if(K[G](K[q]()+F),U=K.getTime(),i){var se=i.calcNiceTickMultiple(U,Q);se>0&&(K[G](K[q]()+se*F),U=K.getTime())}Z.push({value:U,notAdd:U>n[1]})}function f(F,X,P){var q=[],G=!X.length;if(!LY(vg(F),n[0],n[1],r)){G&&(X=[{value:hpe(n[0],F,r)},{value:n[1]}]);for(var W=0;W<X.length-1;W++){var Z=X[W].value,Q=X[W+1].value;if(Z!==Q){var U=void 0,K=void 0,se=void 0,ge=!1;switch(F){case"year":U=Math.max(1,Math.round(t/Ka/365)),K=P8(r),se=kfe(r);break;case"half-year":case"quarter":case"month":U=upe(t),K=ZE(r),se=j8(r);break;case"week":case"half-week":case"day":U=spe(t),K=KE(r),se=B8(r),ge=!0;break;case"half-day":case"quarter-day":case"hour":U=cpe(t),K=QE(r),se=z8(r);break;case"minute":U=Q3(t,!0),K=JE(r),se=V8(r);break;case"second":U=Q3(t,!1),K=eN(r),se=F8(r);break;case"millisecond":U=fpe(t),K=tN(r),se=G8(r);break}Q>=n[0]&&Z<=n[1]&&c(U,Z,Q,K,se,ge,q),F==="year"&&P.length>1&&W===0&&P.unshift({value:P[0].value-U})}}for(var W=0;W<q.length;W++)P.push(q[W])}}for(var h=[],v=[],p=0,m=0,y=0;y<l.length;++y){var x=vg(l[y]);if(Lfe(l[y])){f(l[y],h[h.length-1]||[],v);var b=l[y+1]?vg(l[y+1]):null;if(x!==b){if(v.length){m=p,v.sort(function(F,X){return F.value-X.value});for(var w=[],C=0;C<v.length;++C){var A=v[C].value;(C===0||v[C-1].value!==A)&&(w.push(v[C]),A>=n[0]&&A<=n[1]&&p++)}var M=a/t;if(p>M*1.5&&m>M/1.5||(h.push(w),p>M||e===l[y]))break}v=[]}}}for(var R=Bt(xe(h,function(F){return Bt(F,function(X){return X.value>=n[0]&&X.value<=n[1]&&!X.notAdd})}),function(F){return F.length>0}),E=R.length-1,N=[],y=0;y<R.length;++y)for(var L=R[y],O=0;O<L.length;++O){var I=Zh(L[O].value,r);N.push({value:L[O].value,time:{level:E-y,upperTimeUnit:I,lowerTimeUnit:I}})}w_(N,gue,null),N.sort(function(F,X){return F.value-X.value});var z=N[0],V=N[N.length-1],Y=Zh(n[0],r),H=Zh(n[1],r);return(!z||z.value>n[0])&&N.unshift({value:n[0],time:{level:0,upperTimeUnit:Y,lowerTimeUnit:Y},notNice:!0}),(!V||V.value<n[1])&&N.push({value:n[1],time:{level:0,upperTimeUnit:H,lowerTimeUnit:H},notNice:!0}),N}var ppe=function(e,t){var r=e.getExtent();if(r[0]===r[1]&&(r[0]-=Ka,r[1]+=Ka),r[1]===-1/0&&r[0]===1/0){var n=new Date;r[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),r[0]=r[1]-Ka}e.setExtent(r[0],r[1]);var a=G_(t.splitNumber,10),i=F_(e)/a,o=t.minInterval,l=t.maxInterval;o!=null&&i<o&&(i=o),l!=null&&i>l&&(i=l);var s=ax.length,c=Math.min(lpe(ax,i,0,s),s-1),f=ax[c][1],h=ax[Math.max(c-1,0)][0];e.setTimeInterval({approxInterval:i,interval:f,minLevelUnit:h})};Pi.registerClass(NY);var ix=0,ox=1,gpe=2,IY=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;n.type="log",n.parse=Os.parse,n.base=r.logBase||10;var a=[],i=[],o=n._lookup={from:a,to:i};a[ix]=a[ox]=i[ix]=i[ox]=NaN,AY(n,t.mapperMethods);var l=Un(),s=r.breakOption,c={lookup:o};return l&&l.parseAxisBreakOptionInwardTransform(s,n,{noNegative:!0},gpe,c),n.powStub=new Os({breakParsed:c.original}),n.intervalStub=new Os({breakParsed:c.transformed}),DY(n,n.intervalStub),n}return t.prototype.getTicks=function(r){var n=this.base,a=this.powStub,i=Un(),o=this.intervalStub,l=o.getExtent(),s=a.getExtent(),c={lookup:{from:l,to:s}};return xe(o.getTicks(r||{}),function(f){var h=f.value,v=yA(h,n,c),p;if(i){var m=i.getTicksBreakOutwardTransform(this,f,eb(a),this._lookup);m&&(p=m.vBreak,v=m.tickVal)}return{value:v,break:p}},this)},t.prototype.getMinorTicks=function(r){return EN(this,r,eb(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(r,n){return this.intervalStub.getLabel(r,n)},t.type="log",t.mapperMethods={needTransform:function(){return!0},normalize:function(r){return this.intervalStub.normalize(nx(r,this.base))},scale:function(r){return yA(this.intervalStub.scale(r),this.base,null)},transformIn:function(r,n){return r=nx(r,this.base),n&&n.depth===vb?r:this.intervalStub.transformIn(r,n)},transformOut:function(r,n){var a=n?n.depth:null;return J3.depth=a,e5.lookup=this._lookup,yA(a===vb?r:this.intervalStub.transformOut(r,J3),this.base,e5)},contain:function(r){return this.powStub.contain(r)},setExtent:function(r,n){this.setExtent2(Qa,r,n)},setExtent2:function(r,n,a){if(!(!ud(n,a)||n<=0||a<=0)){var i=t5,o=t5;if(r===Qa){var l=this._lookup;i=l.to,o=l.from}this.powStub.setExtent2(r,i[ix]=n,i[ox]=a);var s=this.base;this.intervalStub.setExtent2(r,o[ix]=nx(n,s),o[ox]=nx(a,s))}},getFilter:function(){return{g:0}},sanitize:function(r,n){return ud(n[0],n[1])&&si(r)&&r<=0&&(r=n[0]),r},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(r,n){return n===null?this.powStub.getExtentUnsafe(r,null):this.intervalStub.getExtentUnsafe(r,n)}},t})(Pi);Pi.registerClass(IY);var J3={},e5={},t5=[],OY={value:1,category:1,time:1,log:1},kY=it();function Bm(e){var t=e.get("type");return(t==null||!Ne(OY,t)&&!Pi.getClass(t))&&(t="value"),t}function Xd(e,t,r){var n=Un(),a;switch(n&&(a=PY(e,t,r)),t){case"category":return new mb({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:yn()});case"time":return new NY({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC"),breakOption:a});case"log":return new IY({logBase:e.get("logBase"),breakOption:a});case"value":return new Os({breakOption:a});default:return new(Pi.getClass(t)||Os)({})}}function mpe(e,t,r){var n=e.getExtentUnsafe(Qa,null),a=n[0],i=n[1];return ud(a,i)?a===t||i===t?xpe:a<t&&i>t?ype:wR:wR}var ype=1,xpe=2,wR=3;function Spe(e){kY(e).noOnMyZero=!0}function bpe(e){return kY(e).noOnMyZero}function H_(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=Efe(t);return function(a,i){return e.scale.getFormattedLabel(a,i,r)}}else{if(De(t))return function(a){var i=e.scale.getLabel(a),o=t.replace("{value}",i??"");return o};if(Be(t)){if(e.type==="category")return function(a,i){return t(yb(e,a),a.value-e.scale.getExtent()[0],null)};var n=Un();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),t(yb(e,a),i,o)}}else return function(a){return e.scale.getLabel(a)}}}function yb(e,t){var r=e.scale;return fa(r)?r.getLabel(t):t.value}function NN(e){var t=e.get("interval");return t??"auto"}function _pe(e){return e.type==="category"&&NN(e.getLabelModel())===0}function wpe(e,t){var r={};return B(e.mapDimensionsAll(t),function(n){r[MN(e,n)]=!0}),dt(r)}function gd(e){return e==="middle"||e==="center"}function Xg(e){return e.getShallow("show")}function PY(e,t,r){var n=e.get("breaks",!0);if(n!=null)return!Un()||!r||!Cpe(t)?void 0:n}function Cpe(e){return e!=="category"}function jY(e,t,r,n,a,i){var o=pd(e),l=o?e.intervalStub:e;if(l.setExtent(n[0],n[1]),o){var s=e.powStub,c={depth:vb},f=e.transformOut(n[0],c),h=e.transformOut(n[1],c),v=ope(r,n);t[0]&&!v[0]&&(f=a[0]),t[1]&&!v[1]&&(h=a[1]),s.setExtent(f,h)}l.setConfig(i)}function Zd(e,t){return fa(e)?e.getRawOrdinalNumber(t.value):t.value}function zm(e,t){return fa(e)&&!!t.get("boundaryGap")}var Kd=(function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e})(),Tpe=kd(),xb="|&",Qd=it(),BY=-2,Ape=-1,Dpe=it();function LN(e,t){var r=e.model,n=Qd($d(r.ecModel)).keyed,a=n&&n.get(t);return a&&a.get(r.uid)}function Mpe(e,t){return VY(LN(e,t))}function Rpe(e,t){var r=[];return zY(e.model.ecModel,function(n){for(var a=0;a<t.length;a++)t[a]&&n.serByIdx[t[a].seriesIndex]&&r.push(VY(n))}),r}function zY(e,t){var r=Qd($d(e)).keyed;r&&r.each(function(n,a){n.each(function(i,o){t(i,a,o)})})}function VY(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function Epe(e,t){var r=e.model.ecModel,n=Qd($d(r)).axSer;n&&U_(r,n.get(e.model.uid),t)}function Vc(e,t,r){var n=LN(e,t);n&&U_(e.model.ecModel,n.sers,r)}function U_(e,t,r){if(t)for(var n=0;n<t.length;n++){var a=t[n];e.isSeriesFiltered(a)||r(a)}}function Npe(e,t){var r=LN(e,t);if(!r||!r.sers.length)return 0;var n=0;return U_(e.model.ecModel,r.sers,function(){n++}),n}function IN(e,t,r){var n=Qd($d(e)).keyed,a=n&&n.get(t);a&&a.each(function(i){r(i.axis)})}function FY(e,t){var r=e.model,n=Qd($d(r.ecModel)).keys;n&&B(n.get(r.uid),function(a){t(a)})}function Lpe(e){var t=Dpe(X7(e)),r=t.keyed||(t.keyed=Le());zY(e,function(n,a,i){var o=r.get(a)||r.set(a,Le()),l=o.get(i)||o.set(i,{});n.metrics.liPosMinGap&&GY.liPosMinGap(e,n,l)})}function Ipe(e,t){GY[e]=t}var GY={};function Fc(e,t,r){if(e){var n=t.ecModel,a=Qd($d(n)),i=e.model.uid,o=a.axSer||(a.axSer=Le()),l=o.get(i)||o.set(i,[]);l.push(t);var s=t.subType,c=t.getBaseAxis()===e,f=TR.get(CR(s,c,r))||TR.get(CR(s,c,null));if(f){var h=a.keyed||(a.keyed=Le()),v=a.keys||(a.keys=Le()),p=f.key,m=h.get(p)||h.set(p,Le()),y=m.get(i);y||(y=m.set(i,{axis:e,sers:[],serByIdx:[]}),y.metrics=f.getMetrics(e),(v.get(i)||v.set(i,[])).push(p)),y.sers.push(t),y.serByIdx[t.seriesIndex]=t}}}function CR(e,t,r){return e+xb+Ie(t,!0)+xb+(r||"")}function ON(e,t){var r=CR(t.seriesType,t.baseAxis,t.coordSysType);TR.set(r,t),Tpe(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:Lpe})})}var TR=Le(),Ope=it(),md=1,kpe=2,Ppe=3,HY=(function(){function e(t,r,n,a,i){var o=fa(t),l=o?r.getCategories().length:null,s;if(o){var c=r.getCategories(!0);s=c&&!c.length}var f=n.slice();(gb(t)||pd(t)||jm(t))&&(O6(f,bp(t,r.get("dataMin",!0))),k6(f,bp(t,r.get("dataMax",!0)))),vue(f)||(f[0]=f[1]=NaN);var h=[],v=[!1,!1],p=r.get("min",!0);p==="dataMin"?(h[0]=f[0],v[0]=!0):(h[0]=bp(t,Be(p)?p({min:f[0],max:f[1]}):p),v[0]=h[0]!=null);var m=r.get("max",!0);m==="dataMax"?(h[1]=f[1],v[1]=!0):(h[1]=bp(t,Be(m)?m({min:f[0],max:f[1]}):m),v[1]=h[1]!=null);var y=jpe(t,r),x=o?null:f[1]-f[0]||Math.abs(f[0]);h[0]==null&&(h[0]=o?s?f[0]:l?0:NaN:f[0]-y[0]*x),h[1]==null&&(h[1]=o?s?f[1]:l?l-1:NaN:f[1]+y[1]*x),!Cl(h[0])&&(h[0]=NaN),!Cl(h[1])&&(h[1]=NaN);var b=s||xn(h[0])||xn(h[1])||o&&!l,w=gb(t),C=w&&r.needIncludeZero&&r.needIncludeZero();C&&(h[0]>0&&h[1]>0&&!v[0]&&(h[0]=0),h[0]<0&&h[1]<0&&!v[1]&&(h[1]=0));var A=!1;h[0]>h[1]&&(h.reverse(),A=!0);var M=bp(t,r.get("startValue",!0)),R=M!=null;!si(M)&&a&&(M=t.getDefaultStartValue?t.getDefaultStartValue():0),si(M)&&(R||!w||C)&&(M<h[0]&&!v[0]?(h[0]=M,v[0]=!0):M>h[1]&&!v[1]&&(h[1]=M,v[1]=!0));var E=this._i={scale:t,dataMM:f,noZoomEffMM:h,zoomMM:[],fixMM:v,zoomFixMM:[!1,!1],startValue:M,isBlank:b,incl0:C,tggAxInv:A,ctnShp:i};r5(E,h)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var t=this._i,r=t.zoomMM,n=t.noZoomEffMM,a=t.zoomFixMM,i=t.fixMM,o={fixMM:i,zoomFixMM:a,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:n.slice()},l=o.effMM;return r[0]!=null&&(l[0]=r[0],i[0]=a[0]=!0),r[1]!=null&&(l[1]=r[1],i[1]=a[1]=!0),r5(t,l),o},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(t,r){this._i.zoomMM[t]=r},e})();function r5(e,t){var r=e.scale,n=e.dataMM;r.sanitize&&(t[0]=r.sanitize(t[0],n),t[1]=r.sanitize(t[1],n),aS(t))}function bp(e,t){return t==null?null:xn(t)?NaN:e.parse(t)}function jpe(e,t){var r;if(fa(e))r=[0,0];else{var n=t.get("boundaryGap");typeof n=="boolean"&&(n=null),r=pe(n)?n:[n,n]}return[n5(r[0]),n5(r[1])]}function n5(e){return Co(typeof e=="boolean"?0:e,1)||0}function UY(e){var t=Ope(e.scale);return t.extent||(t.extent=yn()),t}function Bpe(e,t){UY(e).dimIdxInCoord=t.get(e.dim)}function Gc(e,t){var r=e.scale,n=e.model,a=e.dim;r.rawExtentInfo||zpe(r,e,a,n,t)}function zpe(e,t,r,n,a){var i=UY(t),o=i.extent,l=!1;Epe(t,function(f){if(f.boxCoordinateSystem){var h=W8(f).coord,v=i.dimIdxInCoord;if(v>=0){if(pe(h)){var p=h[v];p!=null&&!pe(p)&&UM(o,e.parse(p))}}}else if(f.coordinateSystem){var m=f.getData();if(m){var y=e.getFilter?e.getFilter():null;B(wpe(m,r),function(x){due(o,m.getApproximateExtent(x,y))})}f.__requireStartValue&&f.__requireStartValue(t)&&(l=!0)}});var s=Fpe(e,t,n),c=new HY(e,n,o,l,s);YY(e,c,a),i.extent=null}function Vpe(e,t){var r=e.scale;YY(r,new HY(r,e.model,t,!1,!1),Ppe)}function YY(e,t,r){e.rawExtentInfo=t,t.from=r}function Y_(e,t){kN.set(e,t)}var kN=Le();function $Y(e,t,r,n,a){e.rawExtentInfo||Vpe({scale:e,model:t},a||yn());var i=e.rawExtentInfo.makeFinal(),o=i.effMM;return e.setExtent(o[0],o[1]),e.setBlank(i.isBlank),n&&i.tggAxInv&&r&&!r.get("legacyMinMaxDontInverseAxis")&&(n.inverse=!n.inverse),i}function Fpe(e,t,r){var n=zm(e,r),a=r.get("containShape",!0);if(a==null&&!n&&(a=!0),!a)return!1;var i=!1;return FY(t,function(o){i=!!kN.get(o)||i}),i}function Gpe(e,t,r,n){if(r.ctnShp){var a;if(FY(e,function(l){var s=kN.get(l);if(s){var c=s(e,n);c&&(a=a||[0,0],O6(a,c[0]),k6(a,c[1]),Spe(e))}}),!!a){var i=t.getExtent();if(fa(t))e.onBand||t.setExtent2(Wg,kt(i[0],i[0]+a[0]),st(i[1],i[1]+a[1]));else{var o=i.slice();r.zoomFixMM[0]||(o[0]=kt(o[0],t.transformOut(t.transformIn(o[0],null)+a[0],null))),r.zoomFixMM[1]||(o[1]=st(o[1],t.transformOut(t.transformIn(o[1],null)+a[1],null))),(o[0]<i[0]||o[1]>i[1])&&t.setExtent2(Wg,o[0],o[1])}}}}function a5(e,t){var r=pd(e),n=r?e.intervalStub:e,a=t.fixMinMax||[],i=r?e.getExtent():null,o=n.getExtent(),l=RY(o,a,t.rawExtentResult);n.setExtent(l[0],l[1]),l=n.getExtent();var s=r?Upe(n,t):Hpe(n,t),c=s.intervalPrecision,f=s.interval,h=t.userInterval;h!=null&&(s.interval=h,s.intervalPrecision=zc(h)),a[0]||(l[0]=xt(li(l[0]/f)*f,c)),a[1]||(l[1]=xt(nf(l[1]/f)*f,c)),h!=null&&(s.niceExtent=l.slice()),jY(e,a,o,l,i,s)}function Hpe(e,t){var r=G_(t.splitNumber,5),n=F_(e),a=t.minInterval,i=t.maxInterval,o=__(n/r,!0);a!=null&&o<a&&(o=a),i!=null&&o>i&&(o=i);var l=zc(o),s=e.getExtent(),c=[xt(nf(s[0]/o)*o,l),xt(li(s[1]/o)*o,l)];return{interval:o,intervalPrecision:l,niceExtent:c}}function Upe(e,t){var r=G_(t.splitNumber,10),n=e.getExtent(),a=F_(e),i=st(SE(a),1),o=r/a*i;o<=.5&&(i*=10);var l=zc(i),s=[xt(nf(n[0]/i)*i,l),xt(li(n[1]/i)*i,l)];return{intervalPrecision:l,interval:i,niceExtent:s}}function yd(e){var t=e.scale,r=e.model,n=r.axis,a=r.ecModel;WY(t,r,n,a,null)}function WY(e,t,r,n,a){var i=$Y(e,t,n,r,a),o=gb(e)||jm(e);qY(e,{splitNumber:t.get("splitNumber"),fixMinMax:i.fixMM,userInterval:t.get("interval"),minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null,rawExtentResult:i}),r&&n&&Gpe(r,e,i,n)}function qY(e,t){Ype[e.type](e,t)}var Ype={interval:a5,log:a5,time:ppe,ordinal:ur};function $pe(e){return Oo(null,e)}var Wpe={isDimensionStacked:Dl,enableDataStack:wY,getStackedDimension:MN};function qpe(e,t){var r=t;t instanceof ct||(r=new ct(t));var n=Bm(r),a=Xd(r,n,!1);return e[1]<e[0]&&(e=e.slice().reverse()),WY(a,r,null,null,e),a}function Xpe(e){Cr(e,Kd)}function Zpe(e,t){return t=t||{},Gt(e,null,null,t.state!=="normal")}const Kpe=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Gve,createList:$pe,createScale:qpe,createSymbol:wr,createTextStyle:Zpe,dataStack:Wpe,enableHoverEmphasis:Ls,getECData:$e,getLayoutRect:Qt,mixinAxisModelCommonMethods:Xpe},Symbol.toStringTag,{value:"Module"}));var i5=[],Qpe={registerPreprocessor:_N,registerProcessor:wN,registerPostInit:dY,registerPostUpdate:vY,registerUpdateLifecycle:V_,registerAction:ki,registerCoordinateSystem:pY,registerLayout:gY,registerVisual:eu,registerTransform:yY,registerLoading:TN,registerMap:mY,registerImpl:Dde,PRIORITY:aY,ComponentModel:lt,ComponentView:Ht,SeriesModel:Pt,ChartView:It,registerComponentModel:function(e){lt.registerClass(e)},registerComponentView:function(e){Ht.registerClass(e)},registerSeriesModel:function(e){Pt.registerClass(e)},registerChartView:function(e){It.registerClass(e)},registerCustomSeries:function(e,t){q7(e,t)},registerSubTypeDefaulter:function(e,t){lt.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){x6(e,t)}};function qr(e){if(pe(e)){B(e,function(t){qr(t)});return}qe(i5,e)>=0||(i5.push(e),Be(e)&&(e={install:e}),e.install(Qpe))}var Jpe=1e-8;function o5(e,t){return Math.abs(e-t)<Jpe}function sc(e,t,r){var n=0,a=e[0];if(!a)return!1;for(var i=1;i<e.length;i++){var o=e[i];n+=al(a[0],a[1],o[0],o[1],t,r),a=o}var l=e[0];return(!o5(a[0],l[0])||!o5(a[1],l[1]))&&(n+=al(a[0],a[1],l[0],l[1],t,r)),n!==0}var ege=[];function xA(e,t){for(var r=0;r<e.length;r++)mr(e[r],e[r],t)}function l5(e,t,r,n){for(var a=0;a<e.length;a++){var i=e[a];n&&(i=n.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(ul(t,t,i),cl(r,r,i))}}function tge(e){for(var t=0,r=0,n=0,a=e.length,i=e[a-1][0],o=e[a-1][1],l=0;l<a;l++){var s=e[l][0],c=e[l][1],f=i*c-s*o;t+=f,r+=(i+s)*f,n+=(o+c)*f,i=s,o=c}return t?[r/t/3,n/t/3,t]:[e[0][0]||0,e[0][1]||0]}var XY=(function(){function e(t){this.name=t}return e.prototype.setCenter=function(t){this._center=t},e.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},e})(),s5=(function(){function e(t,r){this.type="polygon",this.exterior=t,this.interiors=r}return e})(),u5=(function(){function e(t){this.type="linestring",this.points=t}return e})(),ZY=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this,r)||this;return i.type="geoJSON",i.geometries=n,i._center=a&&[a[0],a[1]],i}return t.prototype.calcCenter=function(){for(var r=this.geometries,n,a=0,i=0;i<r.length;i++){var o=r[i],l=o.exterior,s=l&&l.length;s>a&&(n=o,a=s)}if(n)return tge(n.exterior);var c=this.getBoundingRect();return[c.x+c.width/2,c.y+c.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return B(o,function(l){l.type==="polygon"?l5(l.exterior,a,i,r):B(l.points,function(s){l5(s,a,i,r)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new Fe(a[0],a[1],i[0]-a[0],i[1]-a[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var i=0,o=a.length;i<o;i++){var l=a[i];if(l.type==="polygon"){var s=l.exterior,c=l.interiors;if(sc(s,r[0],r[1])){for(var f=0;f<(c?c.length:0);f++)if(sc(c[f],r[0],r[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(r,n,a,i){var o=this.getBoundingRect(),l=o.width/o.height;a?i||(i=a/l):a=l*i;for(var s=new Fe(r,n,a,i),c=o.calculateTransform(s),f=this.geometries,h=0;h<f.length;h++){var v=f[h];v.type==="polygon"?(xA(v.exterior,c),B(v.interiors,function(p){xA(p,c)})):B(v.points,function(p){xA(p,c)})}o=this._rect,o.copy(s),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(r){r==null&&(r=this.name);var n=new t(r,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t})(XY),rge=(function(e){ee(t,e);function t(r,n){var a=e.call(this,r)||this;return a.type="geoSVG",a._elOnlyForCalculate=n,a}return t.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,n=r.getBoundingRect(),a=[n.x+n.width/2,n.y+n.height/2],i=rf(ege),o=r;o&&!o.isGeoSVGGraphicRoot;)ei(i,o.getLocalTransform(),i),o=o.parent;return oi(i,i),mr(a,a,i),a},t})(XY);function nge(e){if(!e.UTF8Encoding)return e;var t=e,r=t.UTF8Scale;r==null&&(r=1024);var n=t.features;return B(n,function(a){var i=a.geometry,o=i.encodeOffsets,l=i.coordinates;if(o)switch(i.type){case"LineString":i.coordinates=KY(l,o,r);break;case"Polygon":SA(l,o,r);break;case"MultiLineString":SA(l,o,r);break;case"MultiPolygon":B(l,function(s,c){return SA(s,o[c],r)})}}),t.UTF8Encoding=!1,t}function SA(e,t,r){for(var n=0;n<e.length;n++)e[n]=KY(e[n],t[n],r)}function KY(e,t,r){for(var n=[],a=t[0],i=t[1],o=0;o<e.length;o+=2){var l=e.charCodeAt(o)-64,s=e.charCodeAt(o+1)-64;l=l>>1^-(l&1),s=s>>1^-(s&1),l+=a,s+=i,a=l,i=s,n.push([l/r,s/r])}return n}function AR(e,t){return e=nge(e),xe(Bt(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,a=r.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new s5(o[0],o.slice(1)));break;case"MultiPolygon":B(a.coordinates,function(s){s[0]&&i.push(new s5(s[0],s.slice(1)))});break;case"LineString":i.push(new u5([a.coordinates]));break;case"MultiLineString":i.push(new u5(a.coordinates))}var l=new ZY(n[t||"name"],i,n.cp);return l.properties=n,l})}const age=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Pg,asc:nn,getPercentWithPrecision:Wse,getPixelPrecision:$se,getPrecision:co,getPrecisionSafe:w6,isNumeric:bE,isRadianAroundZero:Nc,linearMap:St,nice:__,numericToNumber:Ao,parseDate:Lo,parsePercent:Re,quantile:nS,quantity:SE,quantityExponent:b_,reformIntervals:GM,remRadian:xE,round:Yse},Symbol.toStringTag,{value:"Module"})),ige=Object.freeze(Object.defineProperty({__proto__:null,format:Om,parse:Lo,roundTime:rb},Symbol.toStringTag,{value:"Module"})),oge=Object.freeze(Object.defineProperty({__proto__:null,Arc:Em,BezierCurve:zd,BoundingRect:Fe,Circle:Io,CompoundPath:Nm,Ellipse:Rm,Group:ze,Image:Xr,IncrementalDisplayable:S8,Line:Mr,LinearGradient:lf,Polygon:Xn,Polyline:On,RadialGradient:kE,Rect:at,Ring:Bd,Sector:qn,Text:vt,clipPointsByRect:VE,clipRectByRect:A8,createIcon:Fd,extendPath:C8,extendShape:w8,getShapeClass:Vg,getTransform:wc,initProps:ir,makeImage:BE,makePath:fd,mergePath:wa,registerShape:hi,resizePath:zE,updateProps:_t},Symbol.toStringTag,{value:"Module"})),lge=Object.freeze(Object.defineProperty({__proto__:null,addCommas:rN,capitalFirst:Bfe,encodeHTML:Mn,formatTime:jfe,formatTpl:aN,getTextRect:Pfe,getTooltipMarker:U8,normalizeCssArray:Gd,toCamelCase:nN,truncateText:Eue},Symbol.toStringTag,{value:"Module"})),sge=Object.freeze(Object.defineProperty({__proto__:null,bind:Ee,clone:je,curry:et,defaults:Ue,each:B,extend:he,filter:Bt,indexOf:qe,inherits:cE,isArray:pe,isFunction:Be,isObject:Ve,isString:De,map:xe,merge:Je,reduce:ii},Symbol.toStringTag,{value:"Module"}));var uge=it(),gg=it(),Li={estimate:1,determine:2};function Sb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function cge(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=e.scale;return{labels:xe(QY(r,n),function(a,i){return{formattedLabel:H_(e)(a,i),rawLabel:n.getLabel(a),tick:a}})}}return e.type==="category"?hge(e,t):vge(e)}function fge(e,t,r){var n=e.scale,a=e.getTickModel().get("customValues");return a?{ticks:QY(a,n)}:e.type==="category"?dge(e,t):{ticks:n.getTicks(r)}}function QY(e,t){var r=t.getExtent(),n=[];return B(e,function(a){a=t.parse(a),a>=r[0]&&a<=r[1]&&n.push(a)}),w_(n,mue,null),nn(n),xe(n,function(a){return{value:a}})}function hge(e,t){var r=e.getLabelModel(),n=JY(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function JY(e,t,r){var n=gge(e),a=NN(t),i=r.kind===Li.estimate;if(!i){var o=t9(n,a);if(o)return o}var l,s;Be(a)?l=bb(e,a,!1):(s=a==="auto"?mge(e,r):a,l=bb(e,s,!1));var c={labels:l,labelCategoryInterval:s};return i?r.out.noPxChangeTryDetermine.push(function(){return DR(n,a,c),!0}):DR(n,a,c),c}function dge(e,t){var r=pge(e),n=NN(t),a=t9(r,n);if(a)return a;var i,o;if((!t.get("show")||e.scale.isBlank())&&(i=[]),Be(n))i=bb(e,n,!0);else if(n==="auto"){var l=JY(e,e.getLabelModel(),Sb(Li.determine));o=l.labelCategoryInterval,i=xe(l.labels,function(s){return s.tick})}else o=n,i=bb(e,o,!0);return DR(r,n,{ticks:i,tickCategoryInterval:o})}function vge(e){var t=e.scale.getTicks(),r=H_(e);return{labels:xe(t,function(n,a){return{formattedLabel:r(n,a),rawLabel:e.scale.getLabel(n),tick:n}})}}var pge=e9("axisTick"),gge=e9("axisLabel");function e9(e){return function(r){return gg(r)[e]||(gg(r)[e]={list:[]})}}function t9(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function DR(e,t,r){return e.list.push({key:t,value:r}),r}function mge(e,t){if(t.kind===Li.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return gg(e).autoInterval=r,!0}),r}var n=gg(e).autoInterval;return n??(gg(e).autoInterval=e.calculateCategoryInterval(t))}function yge(e,t){var r=t.kind,n=Sge(e),a=H_(e),i=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,l=o.getExtent(),s=o.count();if(l[1]-l[0]<1)return 0;var c=1,f=40;s>f&&(c=Math.max(1,Math.floor(s/f)));for(var h=l[0],v=e.dataToCoord(h+1)-e.dataToCoord(h),p=Math.abs(v*Math.cos(i)),m=Math.abs(v*Math.sin(i)),y=0,x=0;h<=l[1];h+=c){var b=0,w=0,C=y_(a({value:h}),n.font,"center","top");b=C.width*1.3,w=C.height*1.3,y=Math.max(y,b,7),x=Math.max(x,w,7)}var A=y/p,M=x/m;isNaN(A)&&(A=1/0),isNaN(M)&&(M=1/0);var R=Math.max(0,Math.floor(Math.min(A,M)));if(r===Li.estimate)return t.out.noPxChangeTryDetermine.push(Ee(xge,null,e,R,s)),R;var E=r9(e,R,s);return E??R}function xge(e,t,r){return r9(e,t,r)==null}function r9(e,t,r){var n=uge(e.model),a=e.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-r)<=1&&i>t&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=a[0],n.axisExtent1=a[1]}function Sge(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function bb(e,t,r){var n=H_(e),a=e.scale,i=[],o=Be(t);return EY(a,o?0:t,function(l,s){var c=a.getLabel(l);if(o){var f=!!t(l.value,c);if(l.offInterval=!f,!f&&!s)return}i.push(r?l:{formattedLabel:n(l),rawLabel:c,tick:l})}),i}var bge=.8;function Zn(e,t){t=t||{};var r={w:NaN,w2:NaN},n=e.scale,a=t.fromStat,i=t.min,o=rpe(n);si(o)||(o=NaN);var l=e.getExtent(),s=sr(l[1]-l[0]);return fa(n)?_ge(r,e,o,s):a&&wge(r,e,o,s,a),i!=null&&(r.w=si(r.w)?st(i,r.w):i),r}function _ge(e,t,r,n){var a=t.onBand,i=r+(a?1:0);i===0&&(i=1),e.w=n/i,!a&&r&&n&&(e.w2=e.w*r/n)}function wge(e,t,r,n,a){var i=!1,o=-1/0;B(a.key?[Mpe(t,a.key)]:Rpe(t,a.sers||[]),function(l){var s=l.liPosMinGap;s!=null&&(s>0?(s>o&&(o=s),i=!1):s===BY&&(i=!0))}),si(r)&&r>0&&si(o)?(e.w=n/r*o,e.w2=o):i&&(e.w=n*bge,e.w2=e.w*r/n)}var c5=[0,1],di=(function(){function e(t,r,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=r,this._extent=n||[0,0]}return e.prototype.contain=function(t){var r=this._extent,n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return t>=n&&t<=a},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){var n=this._extent;n[0]=t,n[1]=r},e.prototype.dataToCoord=function(t,r){var n=this.scale;return t=n.normalize(n.parse(t)),St(t,c5,f5(this),r)},e.prototype.coordToData=function(t,r){var n=St(t,f5(this),c5,r);return this.scale.scale(n)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=fge(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),a=xe(n.ticks,function(l){return{coord:this.dataToCoord(Zd(this.scale,l)),tick:l}},this),i=r.get("alignWithLabel"),o=Cge(this,a,i);return xe(a,function(l){return{coord:l.coord,tickValue:l.tick.value,onBand:o}})},e.prototype.getMinorTicksCoords=function(){if(fa(this.scale))return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),a=xe(n,function(i){return xe(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},e.prototype.getViewLabels=function(t){return t=t||Sb(Li.determine),cge(this,t).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){return Zn(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(t){return t=t||Sb(Li.determine),yge(this,t)},e})();function f5(e){var t=e.getExtent();if(e.onBand){var r=t[1]-t[0],n=r/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Cge(e,t,r){var n=t.length;if(!e.onBand||r||!n)return!1;var a=Zn(e).w;if(!a)return!1;B(t,function(l){l.coord-=a/2});var i=e.scale.getExtent(),o=t[n-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+a,tick:{value:i[1]+1}}),!0}function Tge(e){var t=lt.extend(e);return lt.registerClass(t),t}function Age(e){var t=Ht.extend(e);return Ht.registerClass(t),t}function Dge(e){var t=Pt.extend(e);return Pt.registerClass(t),t}function Mge(e){var t=It.extend(e);return It.registerClass(t),t}function n9(e,t,r,n,a,i,o,l){var s=a-e,c=i-t,f=r-e,h=n-t,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var p=s*f+c*h,m=p/v;m*=v;var y=o[0]=e+m*f,x=o[1]=t+m*h;return Math.sqrt((y-a)*(y-a)+(x-i)*(x-i))}var ws=new Qe,_r=new Qe,gn=new Qe,Cs=new Qe,uo=new Qe,_b=[],Fn=new Qe;function Rge(e,t){if(t<=180&&t>0){t=t/180*Math.PI,ws.fromArray(e[0]),_r.fromArray(e[1]),gn.fromArray(e[2]),Qe.sub(Cs,ws,_r),Qe.sub(uo,gn,_r);var r=Cs.len(),n=uo.len();if(!(r<.001||n<.001)){Cs.scale(1/r),uo.scale(1/n);var a=Cs.dot(uo),i=Math.cos(t);if(i<a){var o=n9(_r.x,_r.y,gn.x,gn.y,ws.x,ws.y,_b);Fn.fromArray(_b),Fn.scaleAndAdd(uo,o/Math.tan(Math.PI-t));var l=gn.x!==_r.x?(Fn.x-_r.x)/(gn.x-_r.x):(Fn.y-_r.y)/(gn.y-_r.y);if(isNaN(l))return;l<0?Qe.copy(Fn,_r):l>1&&Qe.copy(Fn,gn),Fn.toArray(e[1])}}}}function Ege(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,ws.fromArray(e[0]),_r.fromArray(e[1]),gn.fromArray(e[2]),Qe.sub(Cs,_r,ws),Qe.sub(uo,gn,_r);var n=Cs.len(),a=uo.len();if(!(n<.001||a<.001)){Cs.scale(1/n),uo.scale(1/a);var i=Cs.dot(t),o=Math.cos(r);if(i<o){var l=n9(_r.x,_r.y,gn.x,gn.y,ws.x,ws.y,_b);Fn.fromArray(_b);var s=Math.PI/2,c=Math.acos(uo.dot(t)),f=s+c-r;if(f>=s)Qe.copy(Fn,gn);else{Fn.scaleAndAdd(uo,l/Math.tan(Math.PI/2-f));var h=gn.x!==_r.x?(Fn.x-_r.x)/(gn.x-_r.x):(Fn.y-_r.y)/(gn.y-_r.y);if(isNaN(h))return;h<0?Qe.copy(Fn,_r):h>1&&Qe.copy(Fn,gn)}Fn.toArray(e[1])}}}}function bA(e,t,r,n){var a=r==="normal",i=a?e:e.ensureState(r);i.ignore=t;var o=n.get("smooth");o=o===!0?.3:Math.max(+o,0)||0,i.shape=i.shape||{},i.shape.smooth=o;var l=n.getModel("lineStyle").getLineStyle();a?e.useStyle(l):i.style=l}function Nge(e,t){var r=t.smooth,n=t.points;if(n)if(e.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var a=sl(n[0],n[1]),i=sl(n[1],n[2]);if(!a||!i){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*r,l=Xx([],n[1],n[0],o/a),s=Xx([],n[1],n[2],o/i),c=Xx([],l,s,.5);e.bezierCurveTo(l[0],l[1],l[0],l[1],c[0],c[1]),e.bezierCurveTo(s[0],s[1],s[0],s[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)e.lineTo(n[f][0],n[f][1])}function a9(e,t,r){var n=e.getTextGuideLine(),a=e.getTextContent();if(!a){n&&e.removeTextGuideLine();return}for(var i=t.normal,o=i.get("show"),l=a.ignore,s=0;s<Bg.length;s++){var c=Bg[s],f=t[c],h=c==="normal";if(f){var v=f.get("show"),p=h?l:Ie(a.states[c]&&a.states[c].ignore,l);if(p||!Ie(v,o)){var m=h?n:n&&n.states[c];m&&(m.ignore=!0),n&&bA(n,!0,c,f);continue}n||(n=new On,e.setTextGuideLine(n),!h&&(l||!o)&&bA(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),bA(n,!1,c,f)}}if(n){Ue(n.style,r),n.style.fill=null;var y=i.get("showAbove"),x=e.textGuideLineConfig=e.textGuideLineConfig||{};x.showAbove=y||!1,n.buildPath=Nge}}function i9(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<Wn.length;n++){var a=Wn[n];r[a]=e.getModel([a,t])}return r}var h5=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],Lge=1,wb=2,o9=Lge|wb;function Cb(e,t,r){r=r||o9,t?e.dirty|=r:e.dirty&=~r}function l9(e,t){return t=t||o9,e.dirty==null||!!(e.dirty&t)}function Ro(e){if(e)return l9(e)&&s9(e,e.label,e),e}function s9(e,t,r){var n=t.getComputedTransform();e.transform=GE(e.transform,n);var a=e.localRect=Fg(e.localRect,t.getBoundingRect()),i=t.style,o=i.margin,l=r&&r.marginForce,s=r&&r.minMarginForce,c=r&&r.marginDefault,f=i.__marginType;f==null&&c&&(o=c,f=Gh.textMargin);for(var h=0;h<4;h++)_A[h]=f===Gh.minMargin&&s&&s[h]!=null?s[h]:l&&l[h]!=null?l[h]:o?o[h]:0;f===Gh.textMargin&&Pc(a,_A,!1,!1);var v=e.rect=Fg(e.rect,a);return n&&v.applyTransform(n),f===Gh.minMargin&&Pc(v,_A,!1,!1),e.axisAligned=FE(n),(e.label=e.label||{}).ignore=t.ignore,Cb(e,!1),Cb(e,!0,wb),e}var _A=[0,0,0,0];function Ige(e,t,r){return e.transform=GE(e.transform,r),e.localRect=Fg(e.localRect,t),e.rect=Fg(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=FE(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Oge(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var r=e.transform;r&&(r[4]+=t.x,r[5]+=t.y);var n=e.rect;n&&(n.x+=t.x,n.y+=t.y);var a=e.obb;a&&a.fromBoundingRect(e.localRect,r)}}function d5(e,t){for(var r=0;r<h5.length;r++){var n=h5[r];e[n]==null&&(e[n]=t[n])}return Ro(e)}function v5(e){var t=e.obb;return(!t||l9(e,wb))&&(e.obb=t=t||new y8,t.fromBoundingRect(e.localRect,e.transform),Cb(e,!1,wb)),t}function kge(e,t,r,n,a){var i=e.length,o=Ze[t],l=Pr[t];if(i<2)return!1;e.sort(function(E,N){return E.rect[o]-N.rect[o]});for(var s=0,c,f=!1,h=0;h<i;h++){var v=e[h],p=v.rect;c=p[o]-s,c<0&&(p[o]-=c,v.label[o]-=c,f=!0),s=p[o]+p[l]}var m=e[0],y=e[i-1],x,b;w(),x<0&&M(-x,.8),b<0&&M(b,.8),w(),C(x,b,1),C(b,x,-1),w(),x<0&&R(-x),b<0&&R(b);function w(){x=m.rect[o]-r,b=n-y.rect[o]-y.rect[l]}function C(E,N,L){if(E<0){var O=Math.min(N,-E);if(O>0){A(O*L,0,i);var I=O+E;I<0&&M(-I*L,1)}else M(-E*L,1)}}function A(E,N,L){E!==0&&(f=!0);for(var O=N;O<L;O++){var I=e[O],z=I.rect;z[o]+=E,I.label[o]+=E}}function M(E,N){for(var L=[],O=0,I=1;I<i;I++){var z=e[I-1].rect,V=Math.max(e[I].rect[o]-z[o]-z[l],0);L.push(V),O+=V}if(O){var Y=Math.min(Math.abs(E)/O,N);if(E>0)for(var I=0;I<i-1;I++){var H=L[I]*Y;A(H,0,I+1)}else for(var I=i-1;I>0;I--){var H=L[I-1]*Y;A(-H,I,i)}}}function R(E){var N=E<0?-1:1;E=Math.abs(E);for(var L=Math.ceil(E/(i-1)),O=0;O<i-1;O++)if(N>0?A(L,0,O+1):A(-L,i-O-1,i),E-=L,E<=0)return}return f}function Pge(e){var t=[];e.sort(function(c,f){return(f.suggestIgnore?1:0)-(c.suggestIgnore?1:0)||f.priority-c.priority});function r(c){if(!c.ignore){var f=c.ensureState("emphasis");f.ignore==null&&(f.ignore=!1)}c.ignore=!0}for(var n=0;n<e.length;n++){var a=Ro(e[n]);if(!a.label.ignore){for(var i=a.label,o=a.labelLine,l=!1,s=0;s<t.length;s++)if(PN(a,t[s],null,{touchThreshold:.05})){l=!0;break}l?(r(i),o&&r(o)):t.push(a)}}}function PN(e,t,r,n){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,r,n)?!1:e.axisAligned&&t.axisAligned?!0:v5(e).intersect(v5(t),r,n)}const jge=Object.freeze(Object.defineProperty({__proto__:null,Axis:di,ChartView:It,ComponentModel:lt,ComponentView:Ht,List:Ln,Model:ct,PRIORITY:aY,SeriesModel:Pt,color:nse,connect:Cve,dataTool:Lve,dependencies:ove,disConnect:Tve,disconnect:hY,dispose:Ave,env:ht,extendChartView:Mge,extendComponentModel:Tge,extendComponentView:Age,extendSeriesModel:Dge,format:lge,getCoordinateSystemDimensions:Mve,getInstanceByDom:SN,getInstanceById:Dve,getMap:Nve,graphic:oge,helper:Kpe,init:wve,innerDrawElementOnCanvas:gN,matrix:Rle,number:age,parseGeoJSON:AR,parseGeoJson:AR,registerAction:ki,registerCoordinateSystem:pY,registerCustomSeries:Rve,registerLayout:gY,registerLoading:TN,registerLocale:WE,registerMap:mY,registerPostInit:dY,registerPostUpdate:vY,registerPreprocessor:_N,registerProcessor:wN,registerTheme:bN,registerTransform:yY,registerUpdateLifecycle:V_,registerVisual:eu,setCanvasCreator:Eve,setPlatformAPI:jU,throttle:j_,time:ige,use:qr,util:sge,vector:vle,version:ive,zrUtil:lle,zrender:zse},Symbol.toStringTag,{value:"Module"})),Bge=e_(jge);var zge=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r){return Oo(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new ze,a=wr("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(a),a.setStyle(r.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),l=i==="none"?"circle":i,s=r.itemHeight*.8,c=wr(l,(r.itemWidth-s)/2,(r.itemHeight-s)/2,s,s,r.itemStyle.fill);n.add(c),c.setStyle(r.itemStyle);var f=r.iconRotate==="inherit"?o:r.iconRotate||0;return c.rotation=f*Math.PI/180,c.setOrigin([r.itemWidth/2,r.itemHeight/2]),l.indexOf("empty")>-1&&(c.style.stroke=c.style.fill,c.style.fill=re.color.neutral00,c.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},t})(Pt);function xd(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var a=dd(e,t,r[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<r.length;o++)i.push(dd(e,t,r[o]));return i.join(" ")}}function u9(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!pe(t))return t+"";for(var n=[],a=0;a<r.length;a++){var i=e.getDimensionIndex(r[a]);i>=0&&n.push(t[i])}return n.join(" ")}var Vm=(function(e){ee(t,e);function t(r,n,a,i){var o=e.call(this)||this;return o.updateData(r,n,a,i),o}return t.prototype._createSymbol=function(r,n,a,i,o,l){this.removeAll();var s=wr(r,-1,-1,2,2,null,l);s.attr({z2:Ie(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=Vge,this._symbolType=r,this.add(s)},t.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Tl(this.childAt(0))},t.prototype.downplay=function(){Al(this.childAt(0))},t.prototype.setZ=function(r,n){var a=this.childAt(0);a.zlevel=r,a.z=n},t.prototype.setDraggable=function(r,n){var a=this.childAt(0);a.draggable=r,a.cursor=!n&&r?"move":a.cursor},t.prototype.updateData=function(r,n,a,i){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",l=r.hostModel,s=t.getSymbolSize(r,n),c=t.getSymbolZ2(r,n),f=o!==this._symbolType,h=i&&i.disableAnimation;if(f){var v=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,s,c,v)}else{var p=this.childAt(0);p.silent=!1;var m={scaleX:s[0]/2,scaleY:s[1]/2};h?p.attr(m):_t(p,m,l,n),ui(p)}if(this._updateCommon(r,n,s,a,i),f){var p=this.childAt(0);if(!h){var m={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,ir(p,m,l,n)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,a,i,o){var l=this.childAt(0),s=r.hostModel,c,f,h,v,p,m,y,x,b;if(i&&(c=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=i.focus,p=i.blurScope,y=i.labelStatesModels,x=i.hoverScale,b=i.cursorStyle,m=i.emphasisDisabled),!i||r.hasItemOption){var w=i&&i.itemModel?i.itemModel:r.getItemModel(n),C=w.getModel("emphasis");c=C.getModel("itemStyle").getItemStyle(),h=w.getModel(["select","itemStyle"]).getItemStyle(),f=w.getModel(["blur","itemStyle"]).getItemStyle(),v=C.get("focus"),p=C.get("blurScope"),m=C.get("disabled"),y=Br(w),x=C.getShallow("scale"),b=w.getShallow("cursor")}var A=r.getItemVisual(n,"symbolRotate");l.attr("rotation",(A||0)*Math.PI/180||0);var M=ff(r.getItemVisual(n,"symbolOffset"),a);M&&(l.x=M[0],l.y=M[1]),b&&l.attr("cursor",b);var R=r.getItemVisual(n,"style"),E=R.fill;if(l instanceof Xr){var N=l.style;l.useStyle(he({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},R))}else l.__isEmptyBrush?l.useStyle(he({},R)):l.useStyle(R),l.style.decal=null,l.setColor(E,o&&o.symbolInnerColor),l.style.strokeNoScale=!0;var L=r.getItemVisual(n,"liftZ"),O=this._z2;L!=null?O==null&&(this._z2=l.z2,l.z2+=L):O!=null&&(l.z2=O,this._z2=null);var I=o&&o.useNameLabel;Wr(l,y,{labelFetcher:s,labelDataIndex:n,defaultText:z,inheritColor:E,defaultOpacity:R.opacity});function z(H){return I?r.getName(H):xd(r,H)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var V=l.ensureState("emphasis");V.style=c,l.ensureState("select").style=h,l.ensureState("blur").style=f;var Y=x==null||x===!0?Math.max(1.1,3/this._sizeY):isFinite(x)&&x>0?+x:1;V.scaleX=this._sizeX*Y,V.scaleY=this._sizeY*Y,this.setSymbolScale(1),er(this,v,p,m)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,a){var i=this.childAt(0),o=$e(this).dataIndex,l=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var s=i.getTextContent();s&&Fs(s,{style:{opacity:0}},n,{dataIndex:o,removeOpt:l,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Fs(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:l})},t.getSymbolSize=function(r,n){return Wd(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t})(ze);function Vge(e,t){this.parent.drift(e,t)}function lx(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n&&n.isIgnore&&n.isIgnore(r))&&!(n&&n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function p5(e){return e!=null&&!Ve(e)&&(e={isIgnore:e}),e||{}}function g5(e){var t=e.hostModel,r=t.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Br(t),cursorStyle:t.get("cursor")}}function m5(e,t,r,n,a,i,o){var l=new e(t,r,n,a);return l.setPosition(i),t.setItemGraphicEl(r,l),o.add(l),l}var Fm=(function(){function e(t){this.group=new ze,this._SymbolCtor=t||Vm}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=p5(r);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,l=r.disableAnimation,s=this._seriesScope=g5(t),c={disableAnimation:l},f=r.getSymbolPoint||function(h){return t.getItemLayout(h)};i||n.removeAll(),t.diff(i).add(function(h){var v=f(h);lx(t,v,h,r)&&m5(o,t,h,s,c,v,n)}).update(function(h,v){var p=i.getItemGraphicEl(v),m=f(h);if(!lx(t,m,h,r)){n.remove(p);return}var y=t.getItemVisual(h,"symbol")||"circle",x=p&&p.getSymbolType&&p.getSymbolType();if(!p||x&&x!==y)n.remove(p),p=new o(t,h,s,c),p.setPosition(m);else{p.updateData(t,h,s,c);var b={x:m[0],y:m[1]};l?p.attr(b):_t(p,b,a)}n.add(p),t.setItemGraphicEl(h,p)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){n.remove(v)},a)}).execute(),this._getSymbolPoint=f,this._data=t},e.prototype.updateLayout=function(t){var r=this._data;if(r)for(var n=this,a=r.getStore(),i=0,o=a.count();i<o;i++){var l=r.getItemGraphicEl(i),s=n._getSymbolPoint(i);lx(r,s,i,t)?(l=l||m5(n._SymbolCtor,r,i,n._seriesScope,{disableAnimation:!0},s,n.group),l.stopAnimation(),l.setPosition(s),l.markRedraw()):l&&(n.group.remove(l),r.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=g5(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n,a){this._progressiveEls=[],a=p5(a);function i(c){c.isGroup||(c.incremental=n,c.ensureState("emphasis").hoverLayer=Vd)}for(var o=t.start;o<t.end;o++){var l=r.getItemLayout(o);if(lx(r,l,o,a)){var s=new this._SymbolCtor(r,o,this._seriesScope);s.traverse(i),s.setPosition(l),this.group.add(s),r.setItemGraphicEl(o,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){Qs(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(a){a.fadeOut(function(){r.remove(a)},n.hostModel)}):r.removeAll()},e})();function c9(e,t,r){var n=e.getBaseAxis(),a=e.getOtherAxis(n),i=Fge(a,r),o=n.dim,l=a.dim,s=t.mapDimension(l),c=t.mapDimension(o),f=l==="x"||l==="radius"?1:0,h=xe(e.dimensions,function(m){return t.mapDimension(m)}),v=!1,p=t.getCalculationInfo("stackResultDimension");return Dl(t,h[0])&&(v=!0,h[0]=p),Dl(t,h[1])&&(v=!0,h[1]=p),{dataDimsForPoint:h,valueStart:i,valueAxisDim:l,baseAxisDim:o,stacked:!!v,valueDim:s,baseDim:c,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Fge(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:pt(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function f9(e,t,r,n){var a=NaN;e.stacked&&(a=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=e.valueStart);var i=e.baseDataOffset,o=[];return o[i]=r.get(e.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function ri(e,t){return!isFinite(e)||!isFinite(t)}var Gge=typeof Float32Array!==Pd?Float32Array:void 0,Hge=typeof Float64Array!==Pd?Float64Array:void 0;function ho(e){return jN({ctor:Gge},e).arr}function jN(e,t){var r=e.arr,n=e.ctor;if(t>Pg&&(t=Pg),!r||e.typed&&r.length<t){var a=void 0;if(n)try{a=new n(t),e.typed=!0,r&&a.set(r)}catch{}if(!a&&(a=[],e.typed=!1,r))for(var i=0,o=r.length;i<o;i++)a[i]=r[i];e.arr=a}return e}function Uge(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,a){r.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Yge(e,t,r,n,a,i,o,l){for(var s=Uge(e,t),c=[],f=[],h=[],v=[],p=[],m=[],y=[],x=c9(a,t,o),b=e.getLayout("points")||[],w=t.getLayout("points")||[],C=0;C<s.length;C++){var A=s[C],M=!0,R=void 0,E=void 0;switch(A.cmd){case"=":R=A.idx*2,E=A.idx1*2;var N=b[R],L=b[R+1],O=w[E],I=w[E+1];(isNaN(N)||isNaN(L))&&(N=O,L=I),c.push(N,L),f.push(O,I),h.push(r[R],r[R+1]),v.push(n[E],n[E+1]),y.push(t.getRawIndex(A.idx1));break;case"+":var z=A.idx,V=x.dataDimsForPoint,Y=a.dataToPoint([t.get(V[0],z),t.get(V[1],z)]);E=z*2,c.push(Y[0],Y[1]),f.push(w[E],w[E+1]);var H=f9(x,a,t,z);h.push(H[0],H[1]),v.push(n[E],n[E+1]),y.push(t.getRawIndex(z));break;case"-":M=!1}M&&(p.push(A),m.push(m.length))}m.sort(function(K,se){return y[K]-y[se]});for(var F=c.length,X=ho(F),P=ho(F),q=ho(F),G=ho(F),W=[],C=0;C<m.length;C++){var Z=m[C],Q=C*2,U=Z*2;X[Q]=c[U],X[Q+1]=c[U+1],P[Q]=f[U],P[Q+1]=f[U+1],q[Q]=h[U],q[Q+1]=h[U+1],G[Q]=v[U],G[Q+1]=v[U+1],W[C]=p[Z]}return{current:X,next:P,stackedOnCurrent:q,stackedOnNext:G,status:W}}var ss=Math.min,us=Math.max;function MR(e,t,r,n,a,i,o,l,s){for(var c,f,h,v,p,m,y=r,x=0;x<n;x++){var b=t[y*2],w=t[y*2+1];if(y>=a||y<0)break;if(ri(b,w)){if(s){y+=i;continue}break}if(y===r)e[i>0?"moveTo":"lineTo"](b,w),h=b,v=w;else{var C=b-c,A=w-f;if(C*C+A*A<.5){y+=i;continue}if(o>0){for(var M=y+i,R=t[M*2],E=t[M*2+1];R===b&&E===w&&x<n;)x++,M+=i,y+=i,R=t[M*2],E=t[M*2+1],b=t[y*2],w=t[y*2+1],C=b-c,A=w-f;var N=x+1;if(s)for(;ri(R,E)&&N<n;)N++,M+=i,R=t[M*2],E=t[M*2+1];var L=.5,O=0,I=0,z=void 0,V=void 0;if(N>=n||ri(R,E))p=b,m=w;else{O=R-c,I=E-f;var Y=b-c,H=R-b,F=w-f,X=E-w,P=void 0,q=void 0;if(l==="x"){P=Math.abs(Y),q=Math.abs(H);var G=O>0?1:-1;p=b-G*P*o,m=w,z=b+G*q*o,V=w}else if(l==="y"){P=Math.abs(F),q=Math.abs(X);var W=I>0?1:-1;p=b,m=w-W*P*o,z=b,V=w+W*q*o}else P=Math.sqrt(Y*Y+F*F),q=Math.sqrt(H*H+X*X),L=q/(q+P),p=b-O*o*(1-L),m=w-I*o*(1-L),z=b+O*o*L,V=w+I*o*L,z=ss(z,us(R,b)),V=ss(V,us(E,w)),z=us(z,ss(R,b)),V=us(V,ss(E,w)),O=z-b,I=V-w,p=b-O*P/q,m=w-I*P/q,p=ss(p,us(c,b)),m=ss(m,us(f,w)),p=us(p,ss(c,b)),m=us(m,ss(f,w)),O=b-p,I=w-m,z=b+O*q/P,V=w+I*q/P}e.bezierCurveTo(h,v,p,m,b,w),h=z,v=V}else e.lineTo(b,w)}c=b,f=w,y+=i}return x}var h9=(function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e})(),$ge=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:re.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new h9},t.prototype.buildPath=function(r,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&ri(a[o*2-2],a[o*2-1]);o--);for(;i<o&&ri(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=MR(r,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(r,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=Vs.CMD,l,s,c=n==="x",f=[],h=0;h<i.length;){var v=i[h++],p=void 0,m=void 0,y=void 0,x=void 0,b=void 0,w=void 0,C=void 0;switch(v){case o.M:l=i[h++],s=i[h++];break;case o.L:if(p=i[h++],m=i[h++],C=c?(r-l)/(p-l):(r-s)/(m-s),C<=1&&C>=0){var A=c?(m-s)*C+s:(p-l)*C+l;return c?[r,A]:[A,r]}l=p,s=m;break;case o.C:p=i[h++],m=i[h++],y=i[h++],x=i[h++],b=i[h++],w=i[h++];var M=c?BS(l,p,y,b,r,f):BS(s,m,x,w,r,f);if(M>0)for(var R=0;R<M;R++){var E=f[R];if(E<=1&&E>=0){var A=c?mn(s,m,x,w,E):mn(l,p,y,b,E);return c?[r,A]:[A,r]}}l=b,s=w;break}}},t})(yt),Wge=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(h9),d9=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new Wge},t.prototype.buildPath=function(r,n){var a=n.points,i=n.stackedOnPoints,o=0,l=a.length/2,s=n.smoothMonotone;if(n.connectNulls){for(;l>0&&ri(a[l*2-2],a[l*2-1]);l--);for(;o<l&&ri(a[o*2],a[o*2+1]);o++);}for(;o<l;){var c=MR(r,a,o,l,l,1,n.smooth,s,n.connectNulls);MR(r,i,o+c-1,c,l,-1,n.stackedOnSmooth,s,n.connectNulls),o+=c+1,r.closePath()}},t})(yt);function v9(e,t,r,n,a){var i=e.getArea(),o=i.x,l=i.y,s=i.width,c=i.height,f=r.get(["lineStyle","width"])||0;o-=f/2,l-=f/2,s+=f,c+=f,s=Math.ceil(s),o!==Math.floor(o)&&(o=Math.floor(o),s++);var h=new at({shape:{x:o,y:l,width:s,height:c}});if(t){var v=e.getBaseAxis(),p=v.isHorizontal(),m=v.inverse;p?(m&&(h.shape.x+=s),h.shape.width=0):(m||(h.shape.y+=c),h.shape.height=0);var y=Be(a)?function(x){a(x,h)}:null;ir(h,{shape:{width:s,height:c,x:o,y:l}},r,null,n,y)}return h}function p9(e,t,r){var n=e.getArea(),a=xt(n.r0,1),i=xt(n.r,1),o=new qn({shape:{cx:xt(e.cx,1),cy:xt(e.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var l=e.getBaseAxis().dim==="angle";l?o.shape.endAngle=n.startAngle:o.shape.r=a,ir(o,{shape:{endAngle:n.endAngle,r:i}},r)}return o}function Hc(e,t,r,n,a){if(e){if(e.type==="polar")return p9(e,t,r);if(e.type==="cartesian2d")return v9(e,t,r,n,a)}else return null;return null}var Zg=0,Kg=1,Qg=2;function Uh(e,t,r){e?t.setClipPath(r):t.removeClipPath()}function g9(e){var t=e.coordinateSystem;if(e.get("clip",!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function Uc(e,t){return e.type===t}function y5(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"&&!!e.getViewRect}function m9(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||Ne(e,"text")))}function y9(e,t,r){var n=e,a,i,o;if(t==="text")o=n;else{o={},Ne(n,"text")&&(o.text=n.text),Ne(n,"rich")&&(o.rich=n.rich),Ne(n,"textFill")&&(o.fill=n.textFill),Ne(n,"textStroke")&&(o.stroke=n.textStroke),Ne(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Ne(n,"fontSize")&&(o.fontSize=n.fontSize),Ne(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Ne(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var l=Ne(n,"textPosition");r?a.position=l?n.textPosition:"inside":l&&(a.position=n.textPosition),Ne(n,"textPosition")&&(a.position=n.textPosition),Ne(n,"textOffset")&&(a.offset=n.textOffset),Ne(n,"textRotation")&&(a.rotation=n.textRotation),Ne(n,"textDistance")&&(a.distance=n.textDistance)}return x5(o,e),B(o.rich,function(s){x5(s,s)}),{textConfig:a,textContent:i}}function x5(e,t){t&&(t.font=t.textFont||t.font,Ne(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),Ne(t,"textAlign")&&(e.align=t.textAlign),Ne(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),Ne(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),Ne(t,"textWidth")&&(e.width=t.textWidth),Ne(t,"textHeight")&&(e.height=t.textHeight),Ne(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),Ne(t,"textPadding")&&(e.padding=t.textPadding),Ne(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),Ne(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),Ne(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),Ne(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),Ne(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),Ne(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Ne(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function S5(e,t,r){var n=e;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var a=n.textPosition.indexOf("inside")>=0,i=e.fill||re.color.neutral99;b5(n,t);var o=n.textFill==null;return a?o&&(n.textFill=r.insideFill||re.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||re.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,B(t.rich,function(l){b5(l,l)}),n}function b5(e,t){t&&(Ne(t,"fill")&&(e.textFill=t.fill),Ne(t,"stroke")&&(e.textStroke=t.fill),Ne(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Ne(t,"font")&&(e.font=t.font),Ne(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Ne(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Ne(t,"fontSize")&&(e.fontSize=t.fontSize),Ne(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Ne(t,"align")&&(e.textAlign=t.align),Ne(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Ne(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Ne(t,"width")&&(e.textWidth=t.width),Ne(t,"height")&&(e.textHeight=t.height),Ne(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Ne(t,"padding")&&(e.textPadding=t.padding),Ne(t,"borderColor")&&(e.textBorderColor=t.borderColor),Ne(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Ne(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Ne(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Ne(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Ne(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Ne(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Ne(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Ne(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Ne(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Ne(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function _5(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function w5(e){for(var t=yn(),r=yn(),n=0;n<e.length;){var a=e[n++],i=e[n++];ri(a,i)||(UM(t,a),UM(r,i))}return[t,r]}function C5(e,t){var r=w5(e),n=r[0],a=r[1],i=w5(t),o=i[0],l=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(a[0]-l[0]),Math.abs(n[1]-o[1]),Math.abs(a[1]-l[1]))}function T5(e){return pt(e)?e:e?.5:0}function qge(e,t,r){if(r.valueDim==null)return[];for(var n=t.count(),a=ho(n*2),i=0;i<n;i++){var o=f9(r,e,t,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function cs(e,t,r,n,a){var i=r.getBaseAxis(),o=i.dim==="x"||i.dim==="radius"?0:1,l=[],s=0,c=[],f=[],h=[],v=[];if(a){for(s=0;s<e.length;s+=2){var p=t||e;ri(p[s],p[s+1])||v.push(e[s],e[s+1])}e=v}for(s=0;s<e.length-2;s+=2)switch(h[0]=e[s+2],h[1]=e[s+3],f[0]=e[s],f[1]=e[s+1],l.push(f[0],f[1]),n){case"end":c[o]=h[o],c[1-o]=f[1-o],l.push(c[0],c[1]);break;case"middle":var m=(f[o]+h[o])/2,y=[];c[o]=y[o]=m,c[1-o]=f[1-o],y[1-o]=h[1-o],l.push(c[0],c[1]),l.push(y[0],y[1]);break;default:c[o]=f[o],c[1-o]=h[1-o],l.push(c[0],c[1])}return l.push(e[s++],e[s++]),l}function Xge(e,t){var r=[],n=e.length,a,i;function o(f,h,v){var p=f.coord,m=(v-p)/(h.coord-p),y=pE(m,[f.color,h.color]);return{coord:v,color:y}}for(var l=0;l<n;l++){var s=e[l],c=s.coord;if(c<0)a=s;else if(c>t){i?r.push(o(i,s,t)):a&&r.push(o(a,s,0),o(a,s,t));break}else a&&(r.push(o(a,s,0)),a=null),r.push(s),i=s}return r}function Zge(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var l=e.getDimensionInfo(n[o].dimension);if(a=l&&l.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var s=t.getAxis(a),c=xe(i.stops,function(C){return{coord:s.toGlobalCoord(s.dataToCoord(C.value)),color:C.color}}),f=c.length,h=i.outerColors.slice();f&&c[0].coord>c[f-1].coord&&(c.reverse(),h.reverse());var v=Xge(c,a==="x"?r.getWidth():r.getHeight()),p=v.length;if(!p&&f)return c[0].coord<0?h[1]?h[1]:c[f-1].color:h[0]?h[0]:c[0].color;var m=10,y=v[0].coord-m,x=v[p-1].coord+m,b=x-y;if(b<.001)return"transparent";B(v,function(C){C.offset=(C.coord-y)/b}),v.push({offset:p?v[p-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:p?v[0].offset:.5,color:h[0]||"transparent"});var w=new lf(0,0,0,0,v,!0);return w[a]=y,w[a+"2"]=x,w}}}function Kge(e,t,r){var n=e.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=r.getAxesByScale("ordinal")[0];if(i&&!(a&&Qge(i,t))){var o=t.mapDimension(i.dim),l={};return B(i.getViewLabels(),function(s){s.tick.offInterval||(l[Zd(i.scale,s.tick)]=1)}),function(s){return!l.hasOwnProperty(t.get(o,s))}}}}function Qge(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(Vm.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function Jge(e){for(var t=e.length/2;t>0&&ri(e[t*2-2],e[t*2-1]);t--);return t-1}function A5(e,t){return[e[t*2],e[t*2+1]]}function eme(e,t,r){for(var n=e.length/2,a=r==="x"?0:1,i,o,l=0,s=-1,c=0;c<n;c++)if(o=e[c*2+a],!ri(o,e[c*2+1-a])){if(c===0){i=o;continue}if(i<=t&&o>=t||i>=t&&o<=t){s=c;break}l=c,i=o}return{range:[l,s],t:(t-i)/(o-i)}}function x9(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Wn.length;t++)if(e.get([Wn[t],"endLabel","show"]))return!0;return!1}function wA(e,t,r,n){if(Uc(t,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),l={lastFrameIndex:0},s=x9(n)?function(p,m){e._endLabelOnDuring(p,m,o,l,i,a,t)}:null,c=t.getBaseAxis().isHorizontal(),f=v9(t,r,n,function(){var p=e._endLabel;p&&r&&l.originalX!=null&&p.attr({x:l.originalX,y:l.originalY})},s);if(!n.get("clip",!0)){var h=f.shape,v=Math.max(h.width,h.height);c?(h.y-=v,h.height+=v*2):(h.x-=v,h.width+=v*2)}return s&&s(1,f),f}else return p9(t,r,n)}function tme(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),a=r.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||o}}}var rme=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new ze,n=new Fm;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=Ee(this._changePolyState,this)},t.prototype.render=function(r,n,a){var i=r.coordinateSystem,o=this.group,l=r.getData(),s=r.getModel("lineStyle"),c=r.getModel("areaStyle"),f=l.getLayout("points")||[],h=i.type==="polar",v=this._coordSys,p=this._symbolDraw,m=this._polyline,y=this._polygon,x=this._lineGroup,b=!n.ssr&&r.get("animation"),w=!c.isEmpty(),C=c.get("origin"),A=c9(i,l,C),M=w&&qge(i,l,A),R=r.get("showSymbol"),E=r.get("connectNulls"),N=R&&!h&&Kge(r,l,i),L=this._data;L&&L.eachItemGraphicEl(function(de,me){de.__temp&&(o.remove(de),L.setItemGraphicEl(me,null))}),R||p.remove(),o.add(x);var O=h?!1:r.get("step"),I;i&&i.getArea&&r.get("clip",!0)&&(I=i.getArea(),I.width!=null?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;var z=Zge(l,i,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(m&&v.type===i.type&&O===this._step))R&&p.updateData(l,{isIgnore:N,clipShape:I,disableAnimation:!0,getSymbolPoint:function(de){return[f[de*2],f[de*2+1]]}}),b&&this._initSymbolLabelAnimation(l,i,I),O&&(M&&(M=cs(M,f,i,O,E)),f=cs(f,null,i,O,E)),m=this._newPolyline(f),w?y=this._newPolygon(f,M):y&&(x.remove(y),y=this._polygon=null),h||this._initOrUpdateEndLabel(r,i,Bc(z)),x.setClipPath(wA(this,i,!0,r));else{w&&!y?y=this._newPolygon(f,M):y&&!w&&(x.remove(y),y=this._polygon=null),h||this._initOrUpdateEndLabel(r,i,Bc(z));var V=x.getClipPath();if(V){var Y=wA(this,i,!1,r);ir(V,{shape:Y.shape},r)}else x.setClipPath(wA(this,i,!0,r));R&&p.updateData(l,{isIgnore:N,clipShape:I,disableAnimation:!0,getSymbolPoint:function(de){return[f[de*2],f[de*2+1]]}}),(!_5(this._stackedOnPoints,M)||!_5(this._points,f))&&(b?this._doUpdateAnimation(l,M,i,a,O,C,E):(O&&(M&&(M=cs(M,f,i,O,E)),f=cs(f,null,i,O,E)),m.setShape({points:f}),y&&y.setShape({points:f,stackedOnPoints:M})))}var H=r.getModel("emphasis"),F=H.get("focus"),X=H.get("blurScope"),P=H.get("disabled");if(m.useStyle(Ue(s.getLineStyle(),{fill:"none",stroke:z,lineJoin:"bevel"})),jr(m,r,"lineStyle"),m.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var q=m.getState("emphasis").style;q.lineWidth=+m.style.lineWidth+1}$e(m).seriesIndex=r.seriesIndex,er(m,F,X,P);var G=T5(r.get("smooth")),W=r.get("smoothMonotone");if(m.setShape({smooth:G,smoothMonotone:W,connectNulls:E}),y){var Z=l.getCalculationInfo("stackedOnSeries"),Q=0;y.useStyle(Ue(c.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Z&&(Q=T5(Z.get("smooth"))),y.setShape({smooth:G,stackedOnSmooth:Q,smoothMonotone:W,connectNulls:E}),jr(y,r,"areaStyle"),$e(y).seriesIndex=r.seriesIndex,er(y,F,X,P)}var U=this._changePolyState;l.eachItemGraphicEl(function(de){de&&(de.onHoverStateChange=U)}),this._polyline.onHoverStateChange=U,this._data=l,this._coordSys=i,this._stackedOnPoints=M,this._points=f,this._step=O,this._valueOrigin=C;var K=r.get("triggerEvent"),se=r.get("triggerLineEvent"),ge=se===!0||K===!0||K==="line",ue=se===!0||K===!0||K==="area";this.packEventData(r,m,ge),y&&this.packEventData(r,y,ue)},t.prototype.packEventData=function(r,n,a){$e(n).eventData=a?{componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line",selfType:n===this._polygon?"area":"line"}:null},t.prototype.highlight=function(r,n,a,i){var o=r.getData(),l=Ic(o,i);if(this._changePolyState("emphasis"),!(l instanceof Array)&&l!=null&&l>=0){var s=o.getLayout("points"),c=o.getItemGraphicEl(l);if(!c){var f=s[l*2],h=s[l*2+1];if(ri(f,h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=r.get("zlevel")||0,p=r.get("z")||0;c=new Vm(o,l),c.x=f,c.y=h,c.setZ(v,p);var m=c.getSymbolPath().getTextContent();m&&(m.zlevel=v,m.z=p,m.z2=this._polyline.z2+1),c.__temp=!0,o.setItemGraphicEl(l,c),c.stopSymbolAnimation(!0),this.group.add(c)}c.highlight()}else It.prototype.highlight.call(this,r,n,a,i)},t.prototype.downplay=function(r,n,a,i){var o=r.getData(),l=Ic(o,i);if(this._changePolyState("normal"),l!=null&&l>=0){var s=o.getItemGraphicEl(l);s&&(s.__temp?(o.setItemGraphicEl(l,null),this.group.remove(s)):s.downplay())}else It.prototype.downplay.call(this,r,n,a,i)},t.prototype._changePolyState=function(r){var n=this._polygon;KS(this._polyline,r),n&&KS(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new $ge({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new d9({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(r,n,a){var i,o,l=n.getBaseAxis(),s=l.inverse;n.type==="cartesian2d"?(i=l.isHorizontal(),o=!1):n.type==="polar"&&(i=l.dim==="angle",o=!0);var c=r.hostModel,f=c.get("animationDuration");Be(f)&&(f=f(null));var h=c.get("animationDelay")||0,v=Be(h)?h(null):h;r.eachItemGraphicEl(function(p,m){var y=p;if(y){var x=[p.x,p.y],b=void 0,w=void 0,C=void 0;if(a)if(o){var A=a,M=n.pointToCoord(x);i?(b=A.startAngle,w=A.endAngle,C=-M[1]/180*Math.PI):(b=A.r0,w=A.r,C=M[0])}else{var R=a;i?(b=R.x,w=R.x+R.width,C=p.x):(b=R.y+R.height,w=R.y,C=p.y)}var E=w===b?0:(C-b)/(w-b);s&&(E=1-E);var N=Be(h)?h(m):f*E+v,L=y.getSymbolPath(),O=L.getTextContent();y.attr({scaleX:0,scaleY:0}),y.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:N}),O&&O.animateFrom({style:{opacity:0}},{duration:300,delay:N}),L.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,a){var i=r.getModel("endLabel");if(x9(r)){var o=r.getData(),l=this._polyline,s=o.getLayout("points");if(!s){l.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||(c=this._endLabel=new vt({z2:200}),c.ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var f=Jge(s);f>=0&&(Wr(l,Br(r,"endLabel"),{inheritColor:a,labelFetcher:r,labelDataIndex:f,defaultText:function(h,v,p){return p!=null?u9(o,p):xd(o,h)},enableTextSetter:!0},tme(i,n)),l.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,a,i,o,l,s){var c=this._endLabel,f=this._polyline;if(c){r<1&&i.originalX==null&&(i.originalX=c.x,i.originalY=c.y);var h=a.getLayout("points"),v=a.hostModel,p=v.get("connectNulls"),m=l.get("precision"),y=l.get("distance")||0,x=s.getBaseAxis(),b=x.isHorizontal(),w=x.inverse,C=n.shape,A=w?b?C.x:C.y+C.height:b?C.x+C.width:C.y,M=(b?y:0)*(w?-1:1),R=(b?0:-y)*(w?-1:1),E=b?"x":"y",N=eme(h,A,E),L=N.range,O=L[1]-L[0],I=void 0;if(O>=1){if(O>1&&!p){var z=A5(h,L[0]);c.attr({x:z[0]+M,y:z[1]+R}),o&&(I=v.getRawValue(L[0]))}else{var z=f.getPointOn(A,E);z&&c.attr({x:z[0]+M,y:z[1]+R});var V=v.getRawValue(L[0]),Y=v.getRawValue(L[1]);o&&(I=I6(a,m,V,Y,N.t))}i.lastFrameIndex=L[0]}else{var H=r===1||i.lastFrameIndex>0?L[0]:0,z=A5(h,H);o&&(I=v.getRawValue(H)),c.attr({x:z[0]+M,y:z[1]+R})}if(o){var F=Im(c);typeof F.setLabelText=="function"&&F.setLabelText(I)}}},t.prototype._doUpdateAnimation=function(r,n,a,i,o,l,s){var c=this._polyline,f=this._polygon,h=r.hostModel,v=Yge(this._data,r,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),p=v.current,m=v.stackedOnCurrent,y=v.next,x=v.stackedOnNext;if(o&&(m=cs(v.stackedOnCurrent,v.current,a,o,s),p=cs(v.current,null,a,o,s),x=cs(v.stackedOnNext,v.next,a,o,s),y=cs(v.next,null,a,o,s)),C5(p,y)>3e3||f&&C5(m,x)>3e3){c.stopAnimation(),c.setShape({points:y}),f&&(f.stopAnimation(),f.setShape({points:y,stackedOnPoints:x}));return}c.shape.__points=v.current,c.shape.points=p;var b={shape:{points:y}};v.current!==p&&(b.shape.__points=v.next),c.stopAnimation(),_t(c,b,h),f&&(f.setShape({points:p,stackedOnPoints:m}),f.stopAnimation(),_t(f,{shape:{stackedOnPoints:x}},h),c.shape.points!==f.shape.points&&(f.shape.points=c.shape.points));for(var w=[],C=v.status,A=0;A<C.length;A++){var M=C[A].cmd;if(M==="="){var R=r.getItemGraphicEl(C[A].idx1);R&&w.push({el:R,ptIdx:A})}}c.animators&&c.animators.length&&c.animators[0].during(function(){f&&f.dirtyShape();for(var E=c.shape.__points,N=0;N<w.length;N++){var L=w[N].el,O=w[N].ptIdx*2;L.x=E[O],L.y=E[O+1],L.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(It);function Gm(e,t){return{seriesType:e,plan:Ud(),reset:function(r){var n=r.getData(),a=r.coordinateSystem,i=r.pipelineContext,o=t||i.large;if(a){var l=xe(a.dimensions,function(p){return n.mapDimension(p)}).slice(0,2),s=l.length,c=n.getCalculationInfo("stackResultDimension");Dl(n,l[0])&&(l[0]=c),Dl(n,l[1])&&(l[1]=c);var f=n.getStore(),h=n.getDimensionIndex(l[0]),v=n.getDimensionIndex(l[1]);return s&&{progress:function(p,m){for(var y=p.end-p.start,x=o&&ho(y*s),b=[],w=[],C=p.start,A=0;C<p.end;C++){var M=void 0;if(s===1){var R=f.get(h,C);M=a.dataToPoint(R,null,w)}else b[0]=f.get(h,C),b[1]=f.get(v,C),M=a.dataToPoint(b,null,w);o?(x[A++]=M[0],x[A++]=M[1]):m.setItemLayout(C,M.slice())}o&&(m.setLayout("points",x),m.setLayout("pointsRange",{start:p.start,end:p.end}))}}}}}}var nme={average:function(e){for(var t=0,r=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],r++);return r===0?NaN:t/r},sum:function(e){for(var t=0,r=0;r<e.length;r++)t+=e[r]||0;return t},max:function(e){for(var t=-1/0,r=0;r<e.length;r++)e[r]>t&&(t=e[r]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,r=0;r<e.length;r++)e[r]<t&&(t=e[r]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},ame=function(e){return Math.round(e.length/2)};function S9(e){return{seriesType:e,reset:function(t,r,n){var a=t.getData(),i=t.get("sampling"),o=t.coordinateSystem,l=a.count();if(l>10&&o.type==="cartesian2d"&&i){var s=o.getBaseAxis(),c=o.getOtherAxis(s),f=s.getExtent(),h=n.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),p=Math.round(l/v);if(isFinite(p)&&p>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(c.dim),1/p)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(c.dim),1/p));var m=void 0;De(i)?m=nme[i]:Be(i)&&(m=i),m&&t.setData(a.downSample(a.mapDimension(c.dim),1/p,m,ame))}}}}}function ime(e){e.registerChartView(rme),e.registerSeriesModel(zge),e.registerLayout(Gm("line",!0)),e.registerVisual({seriesType:"line",reset:function(t){var r=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,S9("line"))}var ome=(function(e){ee(t,e);function t(r,n,a,i,o){var l=e.call(this,r,n,a)||this;return l.index=0,l.type=i||"value",l.position=o||"bottom",l}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.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},t.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},t})(di),lme=null;function Hm(){return lme}var sme="expandAxisBreak",Ts=Math.PI,ume=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],cme=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Yc=it(),b9=it(),_9=(function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,a=this.recordMap,i=a[r]||(a[r]=[]);return i[n]||(i[n]={ready:{}})},e})();function fme(e,t,r,n){var a=r.axis,i=t.ensureRecord(r),o=[],l,s=BN(e.axisName)&&gd(e.nameLocation);B(n,function(m){var y=Ro(m);if(!(!y||y.label.ignore)){o.push(y);var x=i.transGroup;s&&(x.transform?oi(_p,x.transform):rf(_p),y.transform&&ei(_p,_p,y.transform),Fe.copy(sx,y.localRect),sx.applyTransform(_p),l?l.union(sx):Fe.copy(l=new Fe(0,0,0,0),sx))}});var c=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[c];if(o.sort(function(m,y){return Math.abs(m.label[c]-f)-Math.abs(y.label[c]-f)}),s&&l){var h=a.getExtent(),v=Math.min(h[0],h[1]),p=Math.max(h[0],h[1])-v;l.union(new Fe(v,0,p,1))}i.stOccupiedRect=l,i.labelInfoList=o}var _p=lr(),sx=new Fe(0,0,0,0),w9=function(e,t,r,n,a,i){if(gd(e.nameLocation)){var o=i.stOccupiedRect;o&&C9(Ige({},o,i.transGroup.transform),n,a)}else T9(i.labelInfoList,i.dirVec,n,a)};function C9(e,t,r){var n=new Qe;PN(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&Oge(t,n)}function T9(e,t,r,n){for(var a=Qe.dot(n,t)>=0,i=0,o=e.length;i<o;i++){var l=e[a?i:o-1-i];l.label.ignore||C9(l,r,n)}}var Yn=(function(){function e(t,r,n,a){this.group=new ze,this._axisModel=t,this._api=r,this._local={},this._shared=a||new _9(w9),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(t){var r=this._cfg.raw;r.position=t.position,r.labelOffset=t.labelOffset,this._resetCfgDetermined(r)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(t){var r=this._axisModel,n=r.getDefaultOption?r.getDefaultOption():{},a=Ie(t.axisName,r.get("name")),i=r.get("nameMoveOverlap");(i==null||i==="auto")&&(i=Ie(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:Ie(t.nameDirection,1),tickDirection:Ie(t.tickDirection,1),labelDirection:Ie(t.labelDirection,1),labelOffset:Ie(t.labelOffset,0),silent:Ie(t.silent,!0),axisName:a,nameLocation:ca(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:BN(a)&&i,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var l=new ze({x:o.position[0],y:o.position[1],rotation:o.rotation});l.updateTransform(),this._transformGroup=l;var s=this._shared.ensureRecord(r);s.transGroup=this._transformGroup,s.dirVec=new Qe(Math.cos(-o.rotation),Math.sin(-o.rotation))},e.prototype.build=function(t,r){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),B(hme,function(a){t[a]&&dme[a](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var a=xE(r-t),i,o;return Nc(a)?(o=n>0?"top":"bottom",i="center"):Nc(a-Ts)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<Ts?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var r={componentType:t.mainType,componentIndex:t.componentIndex};return r[t.mainType+"Index"]=t.componentIndex,r},e.isLabelSilent=function(t){var r=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||r&&r.show)},e})(),hme=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],dme={axisLine:function(e,t,r,n,a,i,o){var l=n.get(["axisLine","show"]);if(l==="auto"&&(l=!0,e.raw.axisLineAutoShow!=null&&(l=!!e.raw.axisLineAutoShow)),!!l){var s=n.axis.getExtent(),c=i.transform,f=[s[0],0],h=[s[1],0],v=f[0]>h[0];c&&(mr(f,f,c),mr(h,h,c));var p=he({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(n.get(["axisLine","breakLine"])&&tb(n.axis.scale))Hm().buildAxisBreakLine(n,a,i,m);else{var y=new Mr(he({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},m));hd(y.shape,y.style.lineWidth),y.anid="line",a.add(y)}var x=n.get(["axisLine","symbol"]);if(x!=null){var b=n.get(["axisLine","symbolSize"]);De(x)&&(x=[x,x]),(De(b)||pt(b))&&(b=[b,b]);var w=ff(n.get(["axisLine","symbolOffset"])||0,b),C=b[0],A=b[1];B([{rotate:e.rotation+Math.PI/2,offset:w[0],r:0},{rotate:e.rotation-Math.PI/2,offset:w[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(M,R){if(x[R]!=="none"&&x[R]!=null){var E=wr(x[R],-C/2,-A/2,C,A,p.stroke,!0),N=M.r+M.offset,L=v?h:f;E.attr({rotation:M.rotate,x:L[0]+N*Math.cos(e.rotation),y:L[1]-N*Math.sin(e.rotation),silent:!0,z2:11}),a.add(E)}})}}},axisTickLabelEstimate:function(e,t,r,n,a,i,o,l){var s=M5(t,a,l);s&&D5(e,t,r,n,a,i,o,Li.estimate)},axisTickLabelDetermine:function(e,t,r,n,a,i,o,l){var s=M5(t,a,l);s&&D5(e,t,r,n,a,i,o,Li.determine);var c=mme(e,a,i,n);gme(e,t.labelLayoutList,c),yme(e,a,i,n,e.tickDirection)},axisName:function(e,t,r,n,a,i,o,l){var s=r.ensureRecord(n);t.nameEl&&(a.remove(t.nameEl),t.nameEl=s.nameLayout=s.nameLocation=null);var c=e.axisName;if(BN(c)){var f=e.nameLocation,h=e.nameDirection,v=n.getModel("nameTextStyle"),p=n.get("nameGap")||0,m=n.axis.getExtent(),y=n.axis.inverse?-1:1,x=new Qe(0,0),b=new Qe(0,0);f==="start"?(x.x=m[0]-y*p,b.x=-y):f==="end"?(x.x=m[1]+y*p,b.x=y):(x.x=(m[0]+m[1])/2,x.y=e.labelOffset+h*p,b.y=h);var w=lr();b.transform(Zs(w,w,e.rotation));var C=n.get("nameRotate");C!=null&&(C=C*Ts/180);var A,M;gd(f)?A=Yn.innerTextLayout(e.rotation,C??e.rotation,h):(A=vme(e.rotation,f,C||0,m),M=e.raw.axisNameAvailableWidth,M!=null&&(M=Math.abs(M/Math.sin(A.rotation)),!isFinite(M)&&(M=null)));var R=v.getFont(),E=n.get("nameTruncate",!0)||{},N=E.ellipsis,L=En(e.raw.nameTruncateMaxWidth,E.maxWidth,M),O=l.nameMarginLevel||0,I=new vt({x:x.x,y:x.y,rotation:A.rotation,silent:Yn.isLabelSilent(n),style:Gt(v,{text:c,font:R,overflow:"truncate",width:L,ellipsis:N,fill:v.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:v.get("align")||A.textAlign,verticalAlign:v.get("verticalAlign")||A.textVerticalAlign}),z2:1});if(Nl({el:I,componentModel:n,itemName:c}),I.__fullText=c,I.anid="name",n.get("triggerEvent")){var z=Yn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=c,$e(I).eventData=z}i.add(I),I.updateTransform(),t.nameEl=I;var V=s.nameLayout=Ro({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:gd(f)?ume[O]:cme[O]});if(s.nameLocation=f,a.add(I),I.decomposeTransform(),e.shouldNameMoveOverlap&&V){var Y=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,V,b,Y)}}}};function D5(e,t,r,n,a,i,o,l){D9(t)||xme(e,t,a,l,n,o);var s=t.labelLayoutList;Sme(e,n,s,i),wme(n,e.rotation,s);var c=e.optionHideOverlap;pme(n,s,c),c&&Pge(Bt(s,function(f){return f&&!f.label.ignore})),fme(e,r,n,s)}function vme(e,t,r,n){var a=xE(r-e),i,o,l=n[0]>n[1],s=t==="start"&&!l||t!=="start"&&l;return Nc(a-Ts/2)?(o=s?"bottom":"top",i="center"):Nc(a-Ts*1.5)?(o=s?"top":"bottom",i="center"):(o="middle",a<Ts*1.5&&a>Ts/2?i=s?"left":"right":i=s?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function pme(e,t,r){var n=e.axis,a=e.get(["axisLabel","customValues"]);if(_pe(n))return;function i(c,f,h){var v=Ro(t[f]),p=Ro(t[h]),m=n.scale;if(!(!v||!p)){if(c==null){if(!r&&a)return;var y=Yc(v.label).labelInfo.tick;if(jm(m)&&y.notNice||fa(m)&&y.offInterval){Lh(v.label);return}}if(c===!1||v.suggestIgnore){Lh(v.label);return}if(p.suggestIgnore){Lh(p.label);return}var x=.1;if(!r){var b=[0,0,0,0];v=d5({marginForce:b},v),p=d5({marginForce:b},p)}PN(v,p,null,{touchThreshold:x})&&Lh(c?p.label:v.label)}}var o=e.get(["axisLabel","showMinLabel"]),l=e.get(["axisLabel","showMaxLabel"]),s=t.length;i(o,0,1),i(l,s-1,s-2)}function gme(e,t,r){e.showMinorTicks||B(t,function(n){if(n&&n.label.ignore)for(var a=0;a<r.length;a++){var i=r[a],o=b9(i),l=Yc(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===l.labelInfo.tick.value){Lh(i);return}}})}function Lh(e){e&&(e.ignore=!0)}function A9(e,t,r,n,a){for(var i=[],o=[],l=[],s=0;s<e.length;s++){var c=e[s].coord;o[0]=c,o[1]=0,l[0]=c,l[1]=r,t&&(mr(o,o,t),mr(l,l,t));var f=new Mr({shape:{x1:o[0],y1:o[1],x2:l[0],y2:l[1]},style:n,z2:2,autoBatch:!0,silent:!0});hd(f.shape,f.style.lineWidth),f.anid=a+"_"+e[s].tickValue,i.push(f);var h=b9(f);h.onBand=!!e[s].onBand,h.tickValue=e[s].tickValue}return i}function mme(e,t,r,n){var a=n.axis,i=n.getModel("axisTick"),o=i.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||a.scale.isBlank())return[];for(var l=i.getModel("lineStyle"),s=e.tickDirection*i.get("length"),c=a.getTicksCoords(),f=A9(c,r.transform,s,Ue(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)t.add(f[h]);return f}function yme(e,t,r,n,a){var i=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||i.scale.isBlank())){var l=i.getMinorTicksCoords();if(l.length)for(var s=o.getModel("lineStyle"),c=a*o.get("length"),f=Ue(s.getLineStyle(),Ue(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<l.length;h++)for(var v=A9(l[h],r.transform,c,f,"minorticks_"+h),p=0;p<v.length;p++)t.add(v[p])}}function M5(e,t,r){if(D9(e)){var n=e.axisLabelsCreationContext,a=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var i=!0,o=0;o<a.length;o++)i=i&&a[o]();if(i)return!1}a.length&&(t.remove(e.labelGroup),RR(e,null,null,null))}return!0}function xme(e,t,r,n,a,i){var o=a.axis,l=En(e.raw.axisLabelShow,a.get(["axisLabel","show"])),s=new ze;r.add(s);var c=Sb(n);if(!l||o.scale.isBlank()){RR(t,[],s,c);return}var f=a.getModel("axisLabel"),h=o.getViewLabels(c),v=(En(e.raw.labelRotate,f.get("rotate"))||0)*Ts/180,p=Yn.innerTextLayout(e.rotation,v,e.labelDirection),m=a.getCategories&&a.getCategories(!0),y=[],x=a.get("triggerEvent"),b=1/0,w=-1/0;B(h,function(A,M){var R,E=A.tick,N=A.formattedLabel,L=A.rawLabel,O=f,I=Zd(o.scale,E);if(m&&m[I]){var z=m[I];Ve(z)&&z.textStyle&&(O=new ct(z.textStyle,f,a.ecModel))}var V=O.getTextColor()||a.get(["axisLine","lineStyle","color"]),Y=O.getShallow("align",!0)||p.textAlign,H=Ie(O.getShallow("alignMinLabel",!0),Y),F=Ie(O.getShallow("alignMaxLabel",!0),Y),X=O.getShallow("verticalAlign",!0)||O.getShallow("baseline",!0)||p.textVerticalAlign,P=Ie(O.getShallow("verticalAlignMinLabel",!0),X),q=Ie(O.getShallow("verticalAlignMaxLabel",!0),X),G=10+(((R=E.time)===null||R===void 0?void 0:R.level)||0);b=Math.min(b,G),w=Math.max(w,G);var W=new vt({x:0,y:0,rotation:0,silent:Yn.isLabelSilent(a),z2:G,style:Gt(O,{text:N,align:M===0?H:M===h.length-1?F:Y,verticalAlign:M===0?P:M===h.length-1?q:X,fill:Be(V)?V(o.type==="category"?L:o.type==="value"?I+"":I,M):V})});W.anid="label_"+I;var Z=Yc(W);if(Z.labelInfo=A,Z.layoutRotation=p.rotation,Nl({el:W,componentModel:a,itemName:N,formatterParamsExtra:{isTruncated:function(){return W.isTruncated},value:L,tickIndex:M}}),x){var Q=Yn.makeAxisEventDataBase(a);Q.targetType="axisLabel",Q.value=L,Q.tickIndex=M;var U=A.tick.break;if(U){var K=U.parsedBreak;Q.break={start:K.vmin,end:K.vmax}}o.type==="category"&&(Q.dataIndex=I),$e(W).eventData=Q,U&&_me(a,i,W,U)}y.push(W),s.add(W)});var C=xe(y,function(A){return{label:A,priority:Yc(A).labelInfo.tick.break?A.z2+(w-b+1):A.z2,defaultAttr:{ignore:A.ignore}}});RR(t,C,s,c)}function D9(e){return!!e.labelLayoutList}function RR(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function Sme(e,t,r,n){var a=t.get(["axisLabel","margin"]);B(r,function(i,o){var l=Ro(i);if(l){var s=l.label,c=Yc(s);l.suggestIgnore=s.ignore,s.ignore=!1,wo(el,bme);var f=t.axis;el.x=f.dataToCoord(Zd(f.scale,c.labelInfo.tick)),el.y=e.labelOffset+e.labelDirection*a,el.rotation=c.layoutRotation,n.add(el),el.updateTransform(),n.remove(el),el.decomposeTransform(),wo(s,el),s.markRedraw(),Cb(l,!0),Ro(l)}})}var el=new at,bme=new at;function BN(e){return!!e}function _me(e,t,r,n){r.on("click",function(a){var i={type:sme,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};i[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(i)})}function wme(e,t,r){var n=Un();if(n){var a=n.retrieveAxisBreakPairs(r,function(o){return o&&Yc(o.label).labelInfo.tick.break},!0),i=e.get(["breakLabelLayout","moveOverlap"],!0);(i===!0||i==="auto")&&B(a,function(o){Hm().adjustBreakLabelPair(e.axis.inverse,t,[Ro(r[o[0]]),Ro(r[o[1]])])})}}function Tb(e,t,r){r=r||{};var n=t.axis,a={},i=n.getAxesOnZeroOf()[0],o=n.position,l=i?"onZero":o,s=n.dim,c=[e.x,e.x+e.width,e.y,e.y+e.height],f={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,v=s==="x"?[c[2]-h,c[3]+h]:[c[0]-h,c[1]+h];if(i){var p=i.toGlobalCoord(i.dataToCoord(0));v[f.onZero]=Math.max(Math.min(p,v[1]),v[0])}a.position=[s==="y"?v[f[l]]:c[0],s==="x"?v[f[l]]:c[3]],a.rotation=Math.PI/2*(s==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[o],a.labelOffset=i?v[f[o]]-v[f.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),En(r.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function Cme(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function Tme(e){var t={xAxisModel:null,yAxisModel:null};return B(t,function(r,n){var a=n.replace(/Model$/,""),i=e.getReferringComponents(a,dr).models[0];t[n]=i}),t}function Ame(e,t,r,n,a,i){for(var o=Tb(e,r),l=!1,s=!1,c=0;c<t.length;c++)MY(t[c].getOtherAxis(r.axis).scale)&&(l=s=!0,r.axis.type==="category"&&r.axis.onBand&&(s=!1));return o.axisLineAutoShow=l,o.axisTickAutoShow=s,o.defaultNameMoveOverlap=i,new Yn(r,n,o,a)}function Dme(e,t,r){var n=Tb(t,r);e.updateCfg(n)}function Mme(e){return e.dim+"_"+e.index}function Rme(){Ipe("liPosMinGap",Eme)}function Eme(e,t,r){var n=Le(),a=r.serUids,i=r.liPosMinGap,o,l=t.axis,s=l.scale,c=s.needTransform(),f=s.getFilter?s.getFilter():null,h=b7(f);function v(C){U_(e,t.sers,function(A){var M=A.getRawData(),R=M.getDimensionIndex(M.mapDimension(l.dim));R>=0&&C(R,A,M.getStore())})}var p=0;if(v(function(C,A,M){n.set(A.uid,1),(!a||!a.hasKey(A.uid))&&(o=!0),p+=M.count()}),(!a||a.keys().length!==n.keys().length)&&(o=!0),!o&&i!=null){t.liPosMinGap=i;return}jN(Ku,p);var m=0;v(function(C,A,M){for(var R=0,E=M.count();R<E;++R){var N=M.get(C,R);isFinite(N)&&(!f||_7(h,N))&&(c&&(N=s.transformIn(N,null)),Ku.arr[m++]=N)}});var y=Ku.typed?Ku.arr.subarray(0,m):(Ku.arr.length=m,Ku.arr);Ku.typed?y.sort():nn(y);for(var x=1/0,b=1;b<m;++b){var w=y[b]-y[b-1];w>0&&w<x&&(x=w)}r.liPosMinGap=t.liPosMinGap=si(x)?x:m>0?BY:Ape,r.serUids=n}var Ku=jN({ctor:Hge},50);function $_(e){return function(t,r){var n=Zn(t,{fromStat:{key:e}});if(si(n.w2))return[-n.w2/2,n.w2/2]}}function Ac(e){return e+xb}function df(e,t){return e+xb+t}function zN(e){return Rme(),{liPosMinGap:!fa(e.scale)}}var xo="bar",Jg="pictorialBar";function M9(e,t,r,n){ON(e,{key:t,seriesType:r,coordSysType:n,getMetrics:zN})}function R9(e){var t=e.scale.rawExtentInfo.makeRenderInfo().startValue;return t}var E9={left:0,right:0,top:0,bottom:0},Ab=["25%","25%"],gl="cartesian2d",Nme=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var a=cf(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&r.outerBounds&&Mo(r.outerBounds,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Mo(this.option.outerBounds,r.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:E9,outerBoundsContain:"all",outerBoundsClampWidth:Ab[0],outerBoundsClampHeight:Ab[1],backgroundColor:re.color.transparent,borderWidth:1,borderColor:re.color.neutral30},t})(lt),Lme=kd(),ER="__ec_stack_";function N9(e){return e.get("stack")||ER+e.seriesIndex}function Ime(e){if(fa(e.axis.scale)){for(var t=Zn(e.axis),r=[],n=0;n<e.count;n++)r.push(Ue({stackId:ER+n},e));for(var a=L9({bandWidthResult:t,seriesInfo:r}),i=[],n=0;n<e.count;n++){var o=a[ER+n];o.offsetCenter=o.offset+o.width/2,i.push(o)}return i}}function Ome(e,t){var r=kme(e,t);return r.columnMap=L9(r),r}function kme(e,t){var r=df(t,gl),n=[],a=Zn(e,{fromStat:{key:r},min:1});return Vc(e,r,function(i){n.push({barWidth:Re(i.get("barWidth"),a.w),barMaxWidth:Re(i.get("barMaxWidth"),a.w),barMinWidth:Re(i.get("barMinWidth")||(k9(i)?.5:1),a.w),barGap:i.get("barGap"),barCategoryGap:i.get("barCategoryGap"),defaultBarGap:i.get("defaultBarGap"),stackId:N9(i)})}),{bandWidthResult:a,seriesInfo:n}}function L9(e){var t=e.bandWidthResult.w,r=t,n=0,a,i,o=[],l={};B(e.seriesInfo,function(y,x){x||(i=y.defaultBarGap||0);var b=y.stackId;Ne(l,b)||n++;var w=l[b];w||(w=l[b]={width:0,maxWidth:0},o.push(b));var C=y.barWidth;C&&!w.width&&(w.width=C,C=kt(r,C),r-=C);var A=y.barMaxWidth;A&&(w.maxWidth=A);var M=y.barMinWidth;M&&(w.minWidth=M);var R=y.barGap;R!=null&&(i=R);var E=y.barCategoryGap;E!=null&&(a=E)}),a==null&&(a=st(35-o.length*4,15)+"%");var s=Re(a,t),c=Re(i,1),f=(r-s)/(n+(n-1)*c);f=st(f,0),B(o,function(y){var x=l[y],b=x.maxWidth,w=x.minWidth;if(x.width){var C=x.width;b&&(C=kt(C,b)),w&&(C=st(C,w)),x.width=C,r-=C+c*C,n--}else{var C=f;b&&b<C&&(C=kt(b,r)),w&&w>C&&(C=w),C!==f&&(x.width=C,r-=C+c*C,n--)}}),f=(r-s)/(n+(n-1)*c),f=st(f,0);var h=0,v;B(o,function(y){var x=l[y];x.width||(x.width=f),v=x,h+=x.width*(1+c)}),v&&(h-=v.width*c);var p={},m=-h/2;return B(o,function(y){var x=l[y];p[y]=p[y]||{bandWidth:t,offset:m,width:x.width},m+=x.width*(1+c)}),p}function I9(e){return{seriesType:e,overallReset:function(t){var r=df(e,gl);IN(t,r,function(n){var a=Ome(n,e);Vc(n,r,function(i){var o=a.columnMap[N9(i)];i.getData().setLayout({bandWidth:o.bandWidth,offset:o.offset,size:o.width})})})}}}function O9(e){return{seriesType:e,plan:Ud(),reset:function(t){if(Cme(t)){var r=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=r.getDimensionIndex(r.mapDimension(i.dim)),l=r.getDimensionIndex(r.mapDimension(a.dim)),s=t.get("showBackground",!0),c=r.mapDimension(i.dim),f=r.getCalculationInfo("stackResultDimension"),h=Dl(r,c)&&!!r.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),p=i.toGlobalCoord(i.dataToCoord(R9(i))),m=k9(t),y=t.get("barMinHeight")||0,x=f&&r.getDimensionIndex(f),b=r.getLayout("size"),w=r.getLayout("offset");return{progress:function(C,A){for(var M=C.count,R=m&&ho(M*3),E=m&&s&&ho(M*3),N=m&&ho(M),L=n.master.getRect(),O=v?L.width:L.height,I,z=A.getStore(),V=0;(I=C.next())!=null;){var Y=z.get(h?x:o,I),H=z.get(l,I),F=p,X=void 0;h&&(X=+Y-z.get(o,I));var P=void 0,q=void 0,G=void 0,W=void 0;if(v){var Z=n.dataToPoint([Y,H]);h&&(F=n.dataToPoint([X,H])[0]),P=F,q=Z[1]+w,G=Z[0]-F,W=b,sr(G)<y&&(G=(G<0?-1:1)*y)}else{var Z=n.dataToPoint([H,Y]);h&&(F=n.dataToPoint([H,X])[1]),P=Z[0]+w,q=F,G=b,W=Z[1]-F,sr(W)<y&&(W=(W<=0?-1:1)*y)}m?(R[V]=P,R[V+1]=q,R[V+2]=v?G:W,E&&(E[V]=v?L.x:P,E[V+1]=v?q:L.y,E[V+2]=O),N[I]=I):A.setItemLayout(I,{x:P,y:q,width:G,height:W}),V+=3}m&&A.setLayout({largePoints:R,largeDataIndices:N,largeBackgroundPoints:E,valueAxisHorizontal:v})}}}}}}function k9(e){return e.pipelineContext&&e.pipelineContext.large}function Pme(e){return $_(df(e,gl))}function P9(e){Lme(e,function(){function t(r){var n=df(r,gl);M9(e,n,r,gl),Y_(n,Pme(r))}t("bar"),t("pictorialBar")})}var em=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Oo(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(r),l=i.dataToPoint(o);if(a)B(i.getAxes(),function(v,p){if(v.type==="category"&&n!=null){var m=v.getTicksCoords(),y=v.getTickModel().get("alignWithLabel"),x=o[p],b=n[p]==="x1"||n[p]==="y1";if(b&&!y&&(x+=1),m.length<2)return;if(m.length===2){l[p]=v.toGlobalCoord(v.getExtent()[b?1:0]);return}for(var w=void 0,C=void 0,A=1,M=0;M<m.length;M++){var R=m[M].coord,E=M===m.length-1?m[M-1].tickValue+A:m[M].tickValue;if(E===x){C=R;break}else if(E<x)w=R;else if(w!=null&&E>x){C=(R+w)/2;break}M===1&&(A=E-m[0].tickValue)}C==null&&(w?w&&(C=m[m.length-1].coord):C=m[0].coord),l[p]=v.toGlobalCoord(C)}});else{var s=this.getData(),c=s.getLayout("offset"),f=s.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;l[h]+=c+f/2}return l}return[NaN,NaN]},t.prototype.__requireStartValue=function(r){return this.getBaseAxis()!==r},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(Pt);Pt.registerClass(em);var jme=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(){return Oo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.__preparePipelineContext=function(r,n){var a=P6(this,r,n);return a.progressiveRender&&(a.large=!0),a},t.prototype.brushSelector=function(r,n,a){return a.rect(n.getItemLayout(r))},t.type="series."+xo,t.dependencies=["grid","polar"],t.defaultOption=Js(em.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:re.color.primary,borderWidth:2}},realtimeSort:!1}),t})(em),Bme=(function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e})(),Db=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new Bme},t.prototype.buildPath=function(r,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),l=Math.max(n.r,0),s=(l-o)*.5,c=o+s,f=n.startAngle,h=n.endAngle,v=n.clockwise,p=Math.PI*2,m=v?h-f<p:f-h<p;m||(f=h-(v?p:-p));var y=Math.cos(f),x=Math.sin(f),b=Math.cos(h),w=Math.sin(h);m?(r.moveTo(y*o+a,x*o+i),r.arc(y*c+a,x*c+i,s,-Math.PI+f,f,!v)):r.moveTo(y*l+a,x*l+i),r.arc(a,i,l,f,h,!v),r.arc(b*c+a,w*c+i,s,h-Math.PI*2,h-Math.PI,!v),o!==0&&r.arc(a,i,o,h,f,v)},t})(yt);function zme(e,t){t=t||{};var r=t.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return US(n,a,i);var l=e(o),s=a.distance!=null?a.distance:5,c=this.shape,f=c.cx,h=c.cy,v=c.r,p=c.r0,m=(v+p)/2,y=c.startAngle,x=c.endAngle,b=(y+x)/2,w=r?Math.abs(v-p)/2:0,C=Math.cos,A=Math.sin,M=f+v*C(y),R=h+v*A(y),E="left",N="top";switch(l){case"startArc":M=f+(p-s)*C(b),R=h+(p-s)*A(b),E="center",N="top";break;case"insideStartArc":M=f+(p+s)*C(b),R=h+(p+s)*A(b),E="center",N="bottom";break;case"startAngle":M=f+m*C(y)+ux(y,s+w,!1),R=h+m*A(y)+cx(y,s+w,!1),E="right",N="middle";break;case"insideStartAngle":M=f+m*C(y)+ux(y,-s+w,!1),R=h+m*A(y)+cx(y,-s+w,!1),E="left",N="middle";break;case"middle":M=f+m*C(b),R=h+m*A(b),E="center",N="middle";break;case"endArc":M=f+(v+s)*C(b),R=h+(v+s)*A(b),E="center",N="bottom";break;case"insideEndArc":M=f+(v-s)*C(b),R=h+(v-s)*A(b),E="center",N="top";break;case"endAngle":M=f+m*C(x)+ux(x,s+w,!0),R=h+m*A(x)+cx(x,s+w,!0),E="left",N="middle";break;case"insideEndAngle":M=f+m*C(x)+ux(x,-s+w,!0),R=h+m*A(x)+cx(x,-s+w,!0),E="right",N="middle";break;default:return US(n,a,i)}return n=n||{},n.x=M,n.y=R,n.align=E,n.verticalAlign=N,n}}function Vme(e,t,r,n){if(pt(n)){e.setTextConfig({rotation:n});return}else if(pe(t)){e.setTextConfig({rotation:0});return}var a=e.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,l=(i+o)/2,s,c=r(t);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":s=l;break;case"startAngle":case"insideStartAngle":s=i;break;case"endAngle":case"insideEndAngle":s=o;break;default:e.setTextConfig({rotation:0});return}var f=Math.PI*1.5-s;c==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),e.setTextConfig({rotation:f})}function ux(e,t,r){return t*Math.sin(e)*(r?-1:1)}function cx(e,t,r){return t*Math.cos(e)*(r?1:-1)}function vo(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;pe(n)||(n=[n,n,n,n]);var a=Math.abs(t.r||0-t.r0||0);return{cornerRadius:xe(n,function(i){return Co(i,a)})}}var CA=Math.max,TA=Math.min,Fme=(function(e){ee(t,e);function t(){var r=e.call(this)||this;return r.type=xo,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,a,i){this._model=r,this._removeOnRenderedListener(a),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,a):this._renderNormal(r,n,a,i))},t.prototype.incrementalPrepareRender=function(r){this._clear(),this._updateDrawMode(r),this._updateLargeClip(r)},t.prototype.incrementalRender=function(r,n){this._progressiveEls=[],this._incrementalRenderLarge(r,n)},t.prototype.eachRendered=function(r){Qs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r,n,a,i){var o=this.group,l=r.getData(),s=this._data,c=r.coordinateSystem,f=c.getBaseAxis(),h;c.type==="cartesian2d"?h=f.isHorizontal():c.type==="polar"&&(h=f.dim==="angle");var v=r.isAnimationEnabled()?r:null,p=Gme(r,c);p&&this._enableRealtimeSort(p,l,a);var m=r.get("clip",!0)||p,y=c.getArea();o.removeClipPath();var x=r.get("roundCap",!0),b=r.get("showBackground",!0),w=r.getModel("backgroundStyle"),C=w.get("borderRadius")||0,A=[],M=this._backgroundEls,R=i&&i.isInitSort,E=i&&i.type==="changeAxisOrder";function N(I){var z=fx[c.type](l,I);if(!z)return null;var V=Xme(c,h,z);return V.useStyle(w.getItemStyle()),c.type==="cartesian2d"?V.setShape("r",C):V.setShape("cornerRadius",C),A[I]=V,V}l.diff(s).add(function(I){var z=l.getItemModel(I),V=fx[c.type](l,I,z);if(V&&(b&&N(I),!(!l.hasValue(I)||!I5[c.type](V)))){var Y=!1;m&&(Y=R5[c.type](y,V));var H=E5[c.type](r,l,I,V,h,v,f.model,!1,x);p&&(H.forceLabelAnimation=!0),O5(H,l,I,z,V,r,h,c.type==="polar"),R?H.attr({shape:V}):p?N5(p,v,H,V,I,h,!1,!1):ir(H,{shape:V},r,I),l.setItemGraphicEl(I,H),o.add(H),H.ignore=Y}}).update(function(I,z){var V=l.getItemModel(I),Y=fx[c.type](l,I,V);if(Y){if(b){var H=void 0;M.length===0?H=N(z):(H=M[z],H.useStyle(w.getItemStyle()),c.type==="cartesian2d"?H.setShape("r",C):H.setShape("cornerRadius",C),A[I]=H);var F=fx[c.type](l,I),X=B9(h,F,c);_t(H,{shape:X},v,I)}var P=s.getItemGraphicEl(z);if(!l.hasValue(I)||!I5[c.type](Y)){o.remove(P);return}var q=!1;m&&(q=R5[c.type](y,Y),q&&o.remove(P));var G=P&&(P.type==="sector"&&x||P.type==="sausage"&&!x);if(G&&(P&&pl(P,r,z),P=null),P?ui(P):P=E5[c.type](r,l,I,Y,h,v,f.model,!0,x),p&&(P.forceLabelAnimation=!0),E){var W=P.getTextContent();if(W){var Z=Im(W);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else O5(P,l,I,V,Y,r,h,c.type==="polar");R?P.attr({shape:Y}):p?N5(p,v,P,Y,I,h,!0,E):_t(P,{shape:Y},r,I,null),l.setItemGraphicEl(I,P),P.ignore=q,o.add(P)}}).remove(function(I){var z=s.getItemGraphicEl(I);z&&pl(z,r,I)}).execute();var L=this._backgroundGroup||(this._backgroundGroup=new ze);L.removeAll();for(var O=0;O<A.length;++O)L.add(A[O]);o.add(L),this._backgroundEls=A,this._data=l},t.prototype._renderLarge=function(r,n,a){this._clear(),P5(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),P5(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&Hc(r.coordinateSystem,!1,r),a=this.group;n?a.setClipPath(n):a.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,a){var i=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,a),this._isFirstFrame=!1;else{var l=function(s){var c=n.getItemGraphicEl(s),f=c&&c.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,l,o,a)},a.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,a){var i=[];return r.each(r.mapDimension(n.dim),function(o,l){var s=a(l);s=s??NaN,i.push({dataIndex:l,mappedValue:s,ordinalNumber:o})}),i.sort(function(o,l){return l.mappedValue-o.mappedValue}),{ordinalNumbers:xe(i,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,a){for(var i=a.scale,o=r.mapDimension(a.dim),l=Number.MAX_VALUE,s=0,c=i.getOrdinalMeta().categories.length;s<c;++s){var f=r.rawIndexOf(o,i.getRawOrdinalNumber(s)),h=f<0?Number.MIN_VALUE:n(r.indexOfRawIndex(f));if(h>l)return!0;l=h}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),l=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=l;++o)if(r.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,a,i){if(this._isOrderChangedWithinSameData(r,n,a)){var o=this._dataSort(r,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,a){var i=n.baseAxis,o=this._dataSort(r,i,function(l){return r.get(r.mapDimension(n.otherAxis.dim),l)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(r){var n=this.group,a=this._data;r&&r.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){pl(i,r,$e(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=xo,t})(It),R5={cartesian2d:function(e,t){var r=t.width<0?-1:1,n=t.height<0?-1:1;r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=e.x+e.width,i=e.y+e.height,o=CA(t.x,e.x),l=TA(t.x+t.width,a),s=CA(t.y,e.y),c=TA(t.y+t.height,i),f=l<o,h=c<s;return t.x=f&&o>a?l:o,t.y=h&&s>i?c:s,t.width=f?0:l-o,t.height=h?0:c-s,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(e,t){var r=t.r0<=t.r?1:-1;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}var a=TA(t.r,e.r),i=CA(t.r0,e.r0);t.r=a,t.r0=i;var o=a-i<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},E5={cartesian2d:function(e,t,r,n,a,i,o,l,s){var c=new at({shape:he({},n),z2:1});if(c.__dataIndex=r,c.name="item",i){var f=c.shape,h=a?"height":"width";f[h]=0}return c},polar:function(e,t,r,n,a,i,o,l,s){var c=!a&&s?Db:qn,f=new c({shape:n,z2:1});f.name="item";var h=j9(a);if(f.calculateTextPosition=zme(h,{isRoundCap:c===Db}),i){var v=f.shape,p=a?"r":"endAngle",m={};v[p]=a?n.r0:n.startAngle,m[p]=n[p],(l?_t:ir)(f,{shape:m},i)}return f}};function Gme(e,t){var r=e.get("realtimeSort",!0),n=t.getBaseAxis();if(r&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function N5(e,t,r,n,a,i,o,l){var s,c;i?(c={x:n.x,width:n.width},s={y:n.y,height:n.height}):(c={y:n.y,height:n.height},s={x:n.x,width:n.width}),l||(o?_t:ir)(r,{shape:s},t,a,null);var f=t?e.baseAxis.model:null;(o?_t:ir)(r,{shape:c},f,a)}function L5(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var Hme=["x","y","width","height"],Ume=["cx","cy","r","startAngle","endAngle"],I5={cartesian2d:function(e){return!L5(e,Hme)},polar:function(e){return!L5(e,Ume)}},fx={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var a=r?$me(r,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(e,t,r){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function Yme(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function j9(e){return(function(t){var r=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}})(e)}function O5(e,t,r,n,a,i,o,l){var s=t.getItemVisual(r,"style");if(l){if(!i.get("roundCap")){var f=e.shape,h=vo(n.getModel("itemStyle"),f,!0);he(f,h),e.setShape(f)}}else{var c=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(s);var v=n.getShallow("cursor");v&&e.attr("cursor",v);var p=l?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?Zme(a,i.coordinateSystem):Kme(a,i.coordinateSystem),m=Br(n);Wr(e,m,{labelFetcher:i,labelDataIndex:r,defaultText:xd(i.getData(),r),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:p});var y=e.getTextContent();if(l&&y){var x=n.get(["label","position"]);e.textConfig.inside=x==="middle"?!0:null,Vme(e,x==="outside"?p:x,j9(o),n.get(["label","rotate"]))}N8(y,m,i.getRawValue(r),function(w){return u9(t,w)});var b=n.getModel(["emphasis"]);er(e,b.get("focus"),b.get("blurScope"),b.get("disabled")),jr(e,n),Yme(a)&&(e.style.fill="none",e.style.stroke="none",B(e.states,function(w){w.style&&(w.style.fill=w.style.stroke="none")}))}function $me(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var Wme=(function(){function e(){}return e})(),k5=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new Wme},t.prototype.buildPath=function(r,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,l=[],s=[],c=this.barWidth,f=0;f<a.length;f+=3)s[i]=c,s[o]=a[f+2],l[i]=a[f+i],l[o]=a[f+o],r.rect(l[0],l[1],s[0],s[1])},t})(yt);function P5(e,t,r,n){var a=e.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),l=a.getLayout("size"),s=e.getModel("backgroundStyle"),c=a.getLayout("largeBackgroundPoints"),f=n?yo(e):0;if(c){var h=new k5({shape:{points:c},incremental:f,silent:!0,z2:0});h.baseDimIdx=i,h.largeDataIndices=o,h.barWidth=l,h.useStyle(s.getItemStyle()),t.add(h),r&&r.push(h)}var v=new k5({shape:{points:a.getLayout("largePoints")},incremental:f,ignoreCoarsePointer:!0,z2:1});v.baseDimIdx=i,v.largeDataIndices=o,v.barWidth=l,t.add(v),v.useStyle(a.getVisual("style")),v.style.stroke=null,$e(v).seriesIndex=e.seriesIndex,e.get("silent")||(v.on("mousedown",j5),v.on("mousemove",j5)),r&&r.push(v)}var j5=j_(function(e){var t=this,r=qme(t,e.offsetX,e.offsetY);$e(t).dataIndex=r>=0?r:null},30,!1);function qme(e,t,r){for(var n=e.baseDimIdx,a=1-n,i=e.shape.points,o=e.largeDataIndices,l=[],s=[],c=e.barWidth,f=0,h=i.length/3;f<h;f++){var v=f*3;if(s[n]=c,s[a]=i[v+2],l[n]=i[v+n],l[a]=i[v+a],s[a]<0&&(l[a]+=s[a],s[a]=-s[a]),t>=l[0]&&t<=l[0]+s[0]&&r>=l[1]&&r<=l[1]+s[1])return o[f]}return-1}function B9(e,t,r){if(Uc(r,"cartesian2d")){var n=t,a=r.getArea();return{x:e?n.x:a.x,y:e?a.y:n.y,width:e?n.width:a.width,height:e?a.height:n.height}}else{var a=r.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:e?a.r0:i.r0,r:e?a.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:Math.PI*2}}}function Xme(e,t,r){var n=e.type==="polar"?qn:at;return new n({shape:B9(t,r,e),silent:!0,z2:0})}function Zme(e,t){if(e.height===0){var r=t.getOtherAxis(t.getBaseAxis());return r.inverse?"bottom":"top"}return e.height>0?"bottom":"top"}function Kme(e,t){if(e.width===0){var r=t.getOtherAxis(t.getBaseAxis());return r.inverse?"left":"right"}return e.width>=0?"right":"left"}function Qme(e){e.registerChartView(Fme),e.registerSeriesModel(jme),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,I9(xo)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,O9(xo)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,S9(xo)),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})}),P9(e)}function Um(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=t.getData();a.filterSelf(function(i){for(var o=a.getName(i),l=0;l<n.length;l++)if(!n[l].isSelected(o))return!1;return!0})}}}}function Jd(e,t,r){t=pe(t)&&{coordDimensions:t}||he({encodeDefine:e.getEncode()},t);var n=e.getSource(),a=qd(n,t).dimensions,i=new Ln(a,e);return i.initData(n,r),i}var ev=(function(){function e(t,r){this._getDataWithEncodedVisual=t,this._getRawData=r}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var r=this._getRawData();return r.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var r=this._getDataWithEncodedVisual();return r.indexOfName(t)},e.prototype.getItemVisual=function(t,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,r)},e})(),ks="pie",Jme=it(),z9=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ev(Ee(this.getData,this),Ee(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Jd(this,{coordDimensions:["value"],encodeDefaulter:et(oN,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),a=Jme(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(s){o.push(s)}),i=a.seats=C6(o,n.hostModel.get("percentPrecision"))}var l=e.prototype.getDataParams.call(this,r);return l.percent=i[r]||0,l.$vars.push("percent"),l},t.prototype._defaultLabelLine=function(r){Lc(r,"labelLine",["show"]);var n=r.labelLine,a=r.emphasis.labelLine;n.show=n.show&&r.label.show,a.show=a.show&&r.emphasis.label.show},t.type="series."+ks,t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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"},t})(Pt);Ffe({fullType:z9.type,getCoord2:function(e){return e.getShallow("center")}});var eye=Math.PI/180;function B5(e,t,r,n,a,i,o,l,s,c){if(e.length<2)return;function f(y){for(var x=y.rB,b=x*x,w=0;w<y.list.length;w++){var C=y.list[w],A=Math.abs(C.label.y-r),M=n+C.len,R=M*M,E=Math.sqrt(Math.abs((1-A*A/b)*R)),N=t+(E+C.len2)*a,L=N-C.label.x,O=C.targetTextWidth-L*a;V9(C,O,!0),C.label.x=N}}function h(y){for(var x={list:[],maxY:0},b={list:[],maxY:0},w=0;w<y.length;w++)if(y[w].labelAlignTo==="none"){var C=y[w],A=C.label.y>r?b:x,M=Math.abs(C.label.y-r);if(M>=A.maxY){var R=C.label.x-t-C.len2*a,E=n+C.len,N=Math.abs(R)<E?Math.sqrt(M*M/(1-R*R/E/E)):E;A.rB=N,A.maxY=M}A.list.push(C)}f(x),f(b)}for(var v=e.length,p=0;p<v;p++)if(e[p].position==="outer"&&e[p].labelAlignTo==="labelLine"){var m=e[p].label.x-c;e[p].linePoints[1][0]+=m,e[p].label.x=c}kge(e,1,s,s+o)&&h(e)}function tye(e,t,r,n,a,i,o,l){for(var s=[],c=[],f=Number.MAX_VALUE,h=-Number.MAX_VALUE,v=0;v<e.length;v++){var p=e[v].label;AA(e[v])||(p.x<t?(f=Math.min(f,p.x),s.push(e[v])):(h=Math.max(h,p.x),c.push(e[v])))}for(var v=0;v<e.length;v++){var m=e[v];if(!AA(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,y=m.linePoints,x=void 0;m.labelAlignTo==="edge"?p.x<t?x=y[2][0]-m.labelDistance-o-m.edgeDistance:x=o+a-m.edgeDistance-y[2][0]-m.labelDistance:m.labelAlignTo==="labelLine"?p.x<t?x=f-o-m.bleedMargin:x=o+a-h-m.bleedMargin:p.x<t?x=p.x-o-m.bleedMargin:x=o+a-p.x-m.bleedMargin,m.targetTextWidth=x,V9(m,x,!1)}}B5(c,t,r,n,1,a,i,o,l,h),B5(s,t,r,n,-1,a,i,o,l,f);for(var v=0;v<e.length;v++){var m=e[v];if(!AA(m)&&m.linePoints){var p=m.label,y=m.linePoints,b=m.labelAlignTo==="edge",w=p.style.padding,C=w?w[1]+w[3]:0,A=p.style.backgroundColor?0:C,M=m.rect.width+A,R=y[1][0]-y[2][0];b?p.x<t?y[2][0]=o+m.edgeDistance+M+m.labelDistance:y[2][0]=o+a-m.edgeDistance-M-m.labelDistance:(p.x<t?y[2][0]=p.x+m.labelDistance:y[2][0]=p.x-m.labelDistance,y[1][0]=y[2][0]+R),y[1][1]=y[2][1]=p.y}}}function V9(e,t,r){if(e.labelStyleWidth==null){var n=e.label,a=n.style,i=e.rect,o=a.backgroundColor,l=a.padding,s=l?l[1]+l[3]:0,c=a.overflow,f=i.width+(o?0:s);if(t<f||r){if(c&&c.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-s);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var v=t-s,p=t<f?v:r?v>e.unconstrainedWidth?null:v:null;n.setStyle("width",p)}F9(i,n)}}}function F9(e,t){z5.rect=e,s9(z5,t,rye)}var rye={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},z5={};function AA(e){return e.position==="center"}function nye(e){var t=e.getData(),r=[],n,a,i=!1,o=(e.get("minShowLabelAngle")||0)*eye,l=t.getLayout("viewRect"),s=t.getLayout("r"),c=l.width,f=l.x,h=l.y,v=l.height;function p(R){R.ignore=!0}function m(R){if(!R.ignore)return!0;for(var E in R.states)if(R.states[E].ignore===!1)return!0;return!1}t.each(function(R){var E=t.getItemGraphicEl(R),N=E.shape,L=E.getTextContent(),O=E.getTextGuideLine(),I=t.getItemModel(R),z=I.getModel("label"),V=z.get("position")||I.get(["emphasis","label","position"]),Y=z.get("distanceToLabelLine"),H=z.get("alignTo"),F=Re(z.get("edgeDistance"),c),X=z.get("bleedMargin");X==null&&(X=Math.min(c,v)>200?10:2);var P=I.getModel("labelLine"),q=P.get("length");q=Re(q,c);var G=P.get("length2");if(G=Re(G,c),Math.abs(N.endAngle-N.startAngle)<o){B(L.states,p),L.ignore=!0,O&&(B(O.states,p),O.ignore=!0);return}if(m(L)){var W=(N.startAngle+N.endAngle)/2,Z=Math.cos(W),Q=Math.sin(W),U,K,se,ge;n=N.cx,a=N.cy;var ue=V==="inside"||V==="inner";if(V==="center")U=N.cx,K=N.cy,ge="center";else{var de=(ue?(N.r+N.r0)/2*Z:N.r*Z)+n,me=(ue?(N.r+N.r0)/2*Q:N.r*Q)+a;if(U=de+Z*3,K=me+Q*3,!ue){var ae=de+Z*(q+s-N.r),ye=me+Q*(q+s-N.r),nt=ae+(Z<0?-1:1)*G,be=ye;H==="edge"?U=Z<0?f+F:f+c-F:U=nt+(Z<0?-Y:Y),K=be,se=[[de,me],[ae,ye],[nt,be]]}ge=ue?"center":H==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Te=Math.PI,Me=0,Oe=z.get("rotate");if(pt(Oe))Me=Oe*(Te/180);else if(V==="center")Me=0;else if(Oe==="radial"||Oe===!0){var Ye=Z<0?-W+Te:-W;Me=Ye}else if(Oe==="tangential"||Oe==="tangential-noflip"&&V!=="outside"&&V!=="outer"){var _e=Math.atan2(Z,Q);_e<0&&(_e=Te*2+_e);var ce=Q>0;ce&&Oe!=="tangential-noflip"&&(_e=Te+_e),Me=_e-Te}if(i=!!Me,L.x=U,L.y=K,L.rotation=Me,L.setStyle({verticalAlign:"middle"}),ue){L.setStyle({align:ge});var Ae=L.states.select;Ae&&(Ae.x+=L.x,Ae.y+=L.y)}else{var Ce=new Fe(0,0,0,0);F9(Ce,L),r.push({label:L,labelLine:O,position:V,len:q,len2:G,minTurnAngle:P.get("minTurnAngle"),maxSurfaceAngle:P.get("maxSurfaceAngle"),surfaceNormal:new Qe(Z,Q),linePoints:se,textAlign:ge,labelDistance:Y,labelAlignTo:H,edgeDistance:F,bleedMargin:X,rect:Ce,unconstrainedWidth:Ce.width,labelStyleWidth:L.style.width})}E.setTextConfig({inside:ue})}}),!i&&e.get("avoidLabelOverlap")&&tye(r,n,a,s,c,v,f,h);for(var y=0;y<r.length;y++){var x=r[y],b=x.label,w=x.labelLine,C=isNaN(b.x)||isNaN(b.y);if(b){b.setStyle({align:x.textAlign}),C&&(B(b.states,p),b.ignore=!0);var A=b.states.select;A&&(A.x+=b.x,A.y+=b.y)}if(w){var M=x.linePoints;C||!M?(B(w.states,p),w.ignore=!0):(Rge(M,x.minTurnAngle),Ege(M,x.surfaceNormal,x.maxSurfaceAngle),w.setShape({points:M}),b.__hostTarget.textGuideLineConfig={anchor:new Qe(M[0][0],M[0][1])})}}}var V5=Math.PI*2,hx=Math.PI/180,aye=zr(ks,iye);function iye(e,t){e.eachSeriesByType(ks,function(r){var n=r.getData(),a=n.mapDimension("value"),i=J8(r,t),o=i.cx,l=i.cy,s=i.r,c=i.r0,f=i.viewRect,h=-r.get("startAngle")*hx,v=r.get("endAngle"),p=r.get("padAngle")*hx;v=v==="auto"?h-V5:-v*hx;var m=r.get("minAngle")*hx,y=m+p,x=0;n.each(a,function(F){!isNaN(F)&&x++});var b=n.getSum(a),w=Math.PI/(b||x)*2,C=r.get("clockwise"),A=r.get("roseType"),M=r.get("stillShowZeroSum"),R=n.getDataExtent(a);R[0]=0;var E=C?1:-1,N=[h,v],L=E*p/2;D_(N,!C),h=N[0],v=N[1];var O=G9(r);O.startAngle=h,O.endAngle=v,O.clockwise=C,O.cx=o,O.cy=l,O.r=s,O.r0=c;var I=Math.abs(v-h),z=I,V=0,Y=h;if(n.setLayout({viewRect:f,r:s}),n.each(a,function(F,X){var P;if(isNaN(F)){n.setItemLayout(X,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:C,cx:o,cy:l,r0:c,r:A?NaN:s});return}A!=="area"?P=b===0&&M?w:F*w:P=I/x,P<y?(P=y,z-=y):V+=F;var q=Y+E*P,G=0,W=0;p>P?(G=Y+E*P/2,W=G):(G=Y+L,W=q-L),n.setItemLayout(X,{angle:P,startAngle:G,endAngle:W,clockwise:C,cx:o,cy:l,r0:c,r:A?St(F,R,[c,s]):s}),Y=q}),z<V5&&x)if(z<=.001){var H=I/x;n.each(a,function(F,X){if(!isNaN(F)){var P=n.getItemLayout(X);P.angle=H;var q=0,G=0;H<p?(q=h+E*(X+1/2)*H,G=q):(q=h+E*X*H+L,G=h+E*(X+1)*H-L),P.startAngle=q,P.endAngle=G}})}else w=z/V,Y=h,n.each(a,function(F,X){if(!isNaN(F)){var P=n.getItemLayout(X),q=P.angle===y?y:F*w,G=0,W=0;q<p?(G=Y+E*q/2,W=G):(G=Y+L,W=Y+E*q-L),P.startAngle=G,P.endAngle=W,Y+=E*q}})})}var G9=it(),oye=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;i.z2=2;var o=new vt;return i.setTextContent(o),i.updateData(r,n,a,!0),i}return t.prototype.updateData=function(r,n,a,i){var o=this,l=r.hostModel,s=r.getItemModel(n),c=s.getModel("emphasis"),f=r.getItemLayout(n),h=he(vo(s.getModel("itemStyle"),f,!0),f);if(isNaN(h.startAngle)){o.setShape(h);return}if(i){o.setShape(h);var v=l.getShallow("animationType");l.ecModel.ssr?(ir(o,{scaleX:0,scaleY:0},l,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):v==="scale"?(o.shape.r=f.r0,ir(o,{shape:{r:f.r}},l,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),ir(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},l,n)):(o.shape.endAngle=f.startAngle,_t(o,{shape:{endAngle:f.endAngle}},l,n))}else ui(o),_t(o,{shape:h},l,n);o.useStyle(r.getItemVisual(n,"style")),jr(o,s);var p=(f.startAngle+f.endAngle)/2,m=l.get("selectedOffset"),y=Math.cos(p)*m,x=Math.sin(p)*m,b=s.getShallow("cursor");b&&o.attr("cursor",b),this._updateLabel(l,r,n),o.ensureState("emphasis").shape=he({r:f.r+(c.get("scale")&&c.get("scaleSize")||0)},vo(c.getModel("itemStyle"),f)),he(o.ensureState("select"),{x:y,y:x,shape:vo(s.getModel(["select","itemStyle"]),f)}),he(o.ensureState("blur"),{shape:vo(s.getModel(["blur","itemStyle"]),f)});var w=o.getTextGuideLine(),C=o.getTextContent();w&&he(w.ensureState("select"),{x:y,y:x}),he(C.ensureState("select"),{x:y,y:x}),er(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,a){var i=this,o=n.getItemModel(a),l=o.getModel("labelLine"),s=n.getItemVisual(a,"style"),c=s&&s.fill,f=s&&s.opacity;Wr(i,Br(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:c,defaultOpacity:f,defaultText:r.getFormattedLabel(a,"normal")||n.getName(a)});var h=i.getTextContent();i.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")i.removeTextGuideLine();else{var p=this.getTextGuideLine();p||(p=new On,this.setTextGuideLine(p)),a9(this,i9(o),{stroke:c,opacity:ca(l.get(["lineStyle","opacity"]),f,1)})}},t})(qn),lye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=ks,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,a,i){var o=r.getData(),l=this._data,s=this.group,c;if(!l&&o.count()>0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h<o.count();++h)f=o.getItemLayout(h);f&&(c=f.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var v=G9(r),p=new qn({shape:je(v)});p.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=p,s.add(p)}o.diff(l).add(function(m){var y=new oye(o,m,c);o.setItemGraphicEl(m,y),s.add(y)}).update(function(m,y){var x=l.getItemGraphicEl(y);x.updateData(o,m,c),x.off("click"),s.add(x),o.setItemGraphicEl(m,x)}).remove(function(m){var y=l.getItemGraphicEl(m);pl(y,r,m)}).execute(),nye(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=r[0]-i.cx,l=r[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},t.type=ks,t})(It);function sye(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(pt(o)&&!isNaN(o)&&o<0)})}}}function uye(e){e.registerChartView(lye),e.registerSeriesModel(z9),U7(ks,e.registerAction),e.registerLayout(aye),e.registerProcessor(Um(ks)),e.registerProcessor(sye(ks))}var cye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Oo(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(r,n,a){return a.point(n.getItemLayout(r))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:re.color.primary}},universalTransition:{divideShape:"clone"}},t})(Pt),H9=4,fye=(function(){function e(){}return e})(),hye=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new fye},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(r){r&&!r.contentRetained&&this.reset()},t.prototype.buildPath=function(r,n){var a=n.points,i=n.size,o=this.symbolProxy,l=o.shape,s=r.getContext?r.getContext():r,c=s&&i[0]<H9,f=this.softClipShape,h;if(c){this._ctx=s;return}for(this._ctx=null,h=this._off;h<a.length;){var v=a[h++],p=a[h++];isNaN(v)||isNaN(p)||f&&!f.contain(v,p)||(l.x=v-i[0]/2,l.y=p-i[1]/2,l.width=i[0],l.height=i[1],o.buildPath(r,l,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,a=r.size,i=this._ctx,o=this.softClipShape,l;if(i){for(l=this._off;l<n.length;){var s=n[l++],c=n[l++];isNaN(s)||isNaN(c)||o&&!o.contain(s,c)||i.fillRect(s-a[0]/2,c-a[1]/2,a[0],a[1])}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var a=this.shape,i=a.points,o=a.size,l=Math.max(o[0],4),s=Math.max(o[1],4),c=i.length/2-1;c>=0;c--){var f=c*2,h=i[f]-l/2,v=i[f+1]-s/2;if(r>=h&&n>=v&&r<=h+l&&n<=v+s)return c}return-1},t.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();if(r=a[0],n=a[1],i.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,a=n.points,i=n.size,o=i[0],l=i[1],s=1/0,c=1/0,f=-1/0,h=-1/0,v=0;v<a.length;){var p=a[v++],m=a[v++];s=Math.min(p,s),f=Math.max(p,f),c=Math.min(m,c),h=Math.max(m,h)}r=this._rect=new Fe(s-o/2,c-l/2,f-s+o,h-c+l)}return r},t})(yt),dye=(function(){function e(){this.group=new ze}return e.prototype.updateData=function(t,r){this._clear(),this._data=t;var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=this._data;if(r){var n=r.getLayout("points");this.group.eachChild(function(a){if(a.startIndex!=null){var i=(a.endIndex-a.startIndex)*2,o=a.startIndex*4*2;n=new Float32Array(n.buffer,o,i)}a.setShape("points",n),a.reset(),a.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n,a){var i=this._newAdded[0],o=r.getLayout("points"),l=i&&i.shape.points;if(l&&l.length<2e4){var s=l.length,c=new Float32Array(s+o.length);c.set(l),c.set(o,s),i.endIndex=t.end,i.setShape({points:c})}else{this._newAdded=[];var f=this._create();f.startIndex=t.start,f.endIndex=t.end,f.incremental=n,f.setShape({points:o}),this._setCommon(f,r,a)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new hye({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var a=r.hostModel;n=n||{};var i=r.getVisual("symbolSize");t.setShape("size",i instanceof Array?i:[i,i]),t.softClipShape=n.clipShape||null,t.symbolProxy=wr(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<H9;t.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var l=r.getVisual("style"),s=l&&l.fill;s&&t.setColor(s);var c=$e(t);c.seriesIndex=a.seriesIndex,t.on("mousemove",function(f){c.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(c.dataIndex=h+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e})(),vye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=r.getData(),o=this._updateSymbolDraw(i,r);o.updateData(i,DA(r)),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,a){var i=r.getData(),o=this._updateSymbolDraw(i,r);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,a){this._symbolDraw.incrementalUpdate(r,n.getData(),yo(n),DA(n)),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,a){var i=r.getData();if(this.group.dirty(),this._finished){var o=Gm("").reset(r,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(DA(r))}else return{update:!0}},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._updateSymbolDraw=function(r,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new dye:new Fm,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(It);function DA(e){return{clipShape:g9(e)}}var NR=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",dr).models[0]},t.type="cartesian2dAxis",t})(lt);Cr(NR,Kd);var U9={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:"auto",onZeroAxisIndex:null,lineStyle:{color:re.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:re.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:re.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[re.color.backgroundTint,re.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:re.color.neutral00,borderColor:re.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},pye=Je({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},U9),VN=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:re.color.axisMinorSplitLine,width:1}}},U9),gye=Je({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},VN),mye=Ue({logBase:10},VN);const Y9={category:pye,value:VN,time:gye,log:mye};function Sd(e,t,r,n){B(OY,function(a,i){var o=Je(Je({},Y9[i],!0),n,!0),l=(function(s){ee(c,s);function c(){var f=s!==null&&s.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return c.prototype.mergeDefaultAndTheme=function(f,h){var v=Gg(this),p=v?cf(f):{},m=h.getTheme();Je(f,m.get(i+"Axis")),Je(f,this.getDefaultOption()),f.type=F5(f),v&&Mo(f,p,v)},c.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=$g.createByAxisModel(this))},c.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},c.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},c.prototype.updateAxisBreaks=function(f){var h=Hm();return h?h.updateModelAxisBreak(this,f):{breaks:[]}},c.type=t+"Axis."+i,c.defaultOption=o,c})(r);e.registerComponentModel(l)}),e.registerSubTypeDefaulter(t+"Axis",F5)}function F5(e){return e.type||(e.data?"category":"value")}var yye=(function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return xe(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Bt(this.getAxes(),function(r){return r.scale.type===t})},e.prototype.addAxis=function(t){var r=t.dim;this._axes[r]=t,this._dimList.push(r)},e})(),vS=["x","y"];function G5(e){return(e.type==="interval"||e.type==="time")&&!tb(e)}var xye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=gl,r.dimensions=vS,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!G5(r)||!G5(n))){var a=pb(r,null),i=pb(n,null),o=this.dataToPoint([a[0],i[0]]),l=this.dataToPoint([a[1],i[1]]),s=a[1]-a[0],c=i[1]-i[0];if(!(!s||!c)){var f=(l[0]-o[0])/s,h=(l[1]-o[1])/c,v=o[0]-a[0]*f,p=o[1]-i[0]*h,m=this._transform=[f,0,0,h,v,p];this._invTransform=oi([],m)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(r){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&a.contain(a.toLocalCoord(r[1]))},t.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},t.prototype.containZone=function(r,n){var a=this.dataToPoint(r),i=this.dataToPoint(n),o=this.getArea(),l=new Fe(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(l)},t.prototype.dataToPoint=function(r,n,a){a=a||[];var i=r[0],o=r[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return mr(a,r,this._transform);var l=this.getAxis("x"),s=this.getAxis("y");return a[0]=l.toGlobalCoord(l.dataToCoord(i,n)),a[1]=s.toGlobalCoord(s.dataToCoord(o,n)),a},t.prototype.clampData=function(r,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),l=i.getExtent(),s=a.parse(r[0]),c=i.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(l[0],l[1]),c),Math.max(l[0],l[1])),n},t.prototype.pointToData=function(r,n,a){if(a=a||[],this._invTransform)return mr(a,r,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(r[0]),n),a[1]=o.coordToData(o.toLocalCoord(r[1]),n),a},t.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},t.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-r,o=Math.min(a[0],a[1])-r,l=Math.max(n[0],n[1])-i+r,s=Math.max(a[0],a[1])-o+r;return new Fe(i,o,l,s)},t})(yye);function $9(e,t){var r=e.scale,n=e.model,a=$Y(r,n,n.ecModel,e,null),i=pd(r),o=pd(t)?t.intervalStub:t,l=i?r.intervalStub:r,s=r.base,c=o.getTicks(),f=o.getTicks({expandToNicedExtent:!0}),h=c.length-1,v,p,m;if(h===1)v=p=0,m=1;else if(h===2){var y=sr(c[0].value-c[1].value),x=sr(c[1].value-c[2].value);v=p=0,y===x?m=2:(m=1,y<x?v=y/x:p=x/y)}else{var b=o.getConfig().interval;v=(1-(c[0].value-f[0].value)/b)%1,p=(1-(f[h].value-c[h].value)/b)%1,m=h-(v?1:0)-(p?1:0)}var w=a.zoomFixMM,C=w[0]||w[1],A=[a.fixMM[0]||C,a.fixMM[1]||C],M=r.getExtent(),R=l.getExtent(),E=RY(R,A),N,L,O,I,z,V;function Y(Z){for(var Q=50,U=0;U<Q&&!Z();U++)O=i?O*st(s,2):ipe(O),I=zc(O)}function H(){N=xt(V-O*v,I)}function F(){L=xt(z+O*p,I)}function X(){V=v?xt(N+O*v,I):N}function P(){z=p?xt(L-O*p,I):L}if(A[0]&&A[1]){N=E[0],L=E[1],O=(L-N)/(m+v+p);var q=e.getExtent(),G=sr(q[1]-q[0]);I=yE([L,N],G,.5/m),X(),P(),si(I)&&(O=xt(O,I))}else{var W=E[1]-E[0];O=i?st(SE(W),1):__(W/m,T6),I=zc(O),A[0]?(N=E[0],Y(function(){if(X(),z=xt(V+O*m,I),F(),L>=E[1])return!0})):A[1]?(L=E[1],Y(function(){if(P(),V=xt(z-O*m,I),H(),N<=E[0])return!0})):Y(function(){V=xt(nf(E[0]/O)*O,I),z=xt(li(E[1]/O)*O,I);var Z=To((z-V)/O);if(Z<=m){var Q=m-Z,U=void 0,K=a.incl0||i;if(K&&E[0]===0)U=[0,Q];else if(K&&E[1]===0)U=[Q,0];else{var se=li(Q/2);U=Q%2===0?[se,se]:N+L<E[0]+E[1]?[se,se+1]:[se+1,se]}if(V=xt(V-O*U[0],I),z=xt(z+O*U[1],I),H(),F(),N<=E[0]&&L>=E[1])return!0}})}jY(r,A,R,[N,L],M,{interval:O,intervalCount:m,intervalPrecision:I,niceExtent:[V,z]})}var H5=[[3,1],[0,2]],Sye=(function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vS,this._initCartesian(t,r,n),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,r){var n=this._axesMap;B(this._axesList,function(o){Gc(o,md);var l=o.scale;fa(l)&&l.setSortInfo(o.model.get("categorySortInfo"))});function a(o){for(var l=dt(o),s=[],c=l.length-1;c>=0;c--){var f=o[+l[c]];f.__alignTo?s.push(f):yd(f)}B(s,function(h){_ye(h,h.__alignTo)?yd(h):$9(h,h.__alignTo.scale)})}a(n.x),a(n.y);var i={};B(n.x,function(o){U5(n,"y",o,i)}),B(n.y,function(o){U5(n,"x",o,i)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var a=Vr(t,r),i=this._rect=Qt(t.getBoxLayoutParams(),a.refContainer),o=this._axesMap,l=this._coordsList,s=t.get("containLabel");if(W9(o,i),!n){var c=Cye(i,l,o,s,r),f=void 0;if(s)f=q5(i.clone(),"axisLabel",null,i,o,c,a);else{var h=Tye(t,i,a),v=h.outerBoundsRect,p=h.parsedOuterBoundsContain,m=h.outerBoundsClamp;v&&(f=q5(v,p,m,i,o,c,a))}q9(i,o,Li.determine,null,f,a),B(this._coordsList,function(y){y.calcAffineTransform()})}},e.prototype.getAxis=function(t,r){var n=this._axesMap[t];if(n!=null)return n[r||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,r){if(t!=null&&r!=null){var n="x"+t+"y"+r;return this._coordsMap[n]}Ve(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===r)return i[a]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var a=this._findConvertTarget(r);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var a=this._findConvertTarget(r);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",dr).models[0],a=t.yAxisModel||r&&r.getReferringComponents("yAxis",dr).models[0],i=t.gridModel,o=this._coordsList,l,s;if(r)l=r.coordinateSystem,qe(o,l)<0&&(l=null);else if(n&&a)l=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)s=this.getAxis("x",n.componentIndex);else if(a)s=this.getAxis("y",a.componentIndex);else if(i){var c=i.coordinateSystem;c===this&&(l=this._coordsList[0])}return{cartesian:l,axis:s}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},s={x:0,y:0};if(r.eachComponent("xAxis",c("x"),this),r.eachComponent("yAxis",c("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=l,B(l.x,function(f,h){B(l.y,function(v,p){var m="x"+h+"y"+p,y=new xye(m);y.master=a,y.model=t,a._coordsMap[m]=y,a._coordsList.push(y),y.addAxis(f),y.addAxis(v)})}),$5(l.x),$5(l.y);function c(f){return function(h,v){if(bye(h,t)){var p=h.get("position");f==="x"?p!=="top"&&p!=="bottom"&&(p=o.bottom?"top":"bottom"):p!=="left"&&p!=="right"&&(p=o.left?"right":"left"),o[p]=!0;var m=Bm(h),y=new ome(f,Xd(h,m,!0),[0,0],m,p);y.onBand=zm(y.scale,h),y.inverse=h.get("inverse"),h.axis=y,y.model=h,y.grid=i,y.index=v,i._axesList.push(y),l[f][v]=y,s[f]++}}}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return B(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),o=a.getOtherAxis(i);qe(r,i)<0&&r.push(i),qe(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(a,i){var o=new e(a,t,r);o.name="grid_"+i,o.resize(a,r,!0),a.coordinateSystem=o,n.push(o),B(o._axesList,function(l){Bpe(l,e.dimIdxMap)})}),t.eachSeries(function(a){var i,o;km({targetModel:a,coordSysType:gl,coordSysProvider:l});function l(){var s=Tme(a),c=s.xAxisModel,f=s.yAxisModel;i=c.axis,o=f.axis;var h=c.getCoordSysModel(),v=h.coordinateSystem;return v.getCartesian(c.componentIndex,f.componentIndex)}i&&o&&(Fc(i,a,gl),Fc(o,a,gl))},this),n},e.dimensions=vS,e.dimIdxMap=DN(vS),e})();function bye(e,t){return e.getCoordSysModel()===t}function U5(e,t,r,n){r.getAxesOnZeroOf=function(){return i?[i]:[]};var a=e[t],i,o=r.model,l=o.get(["axisLine","onZero"]),s=o.get(["axisLine","onZeroAxisIndex"]);if(!l)return;if(s!=null)Y5(l,a[s])&&(i=a[s]);else for(var c in a)if(Ne(a,c)&&Y5(l,a[c])&&!n[f(a[c])]){i=a[c];break}i&&(n[f(i)]=!0);function f(h){return h.dim+"_"+h.index}}function Y5(e,t){if(!t)return!1;var r=t.scale,n=mpe(r,0),a=t&&t.type!=="category"&&t.type!=="time"&&n!==wR;return a&&e==="auto"&&bpe(t)&&(a=!1),a}function $5(e){for(var t=dt(e),r,n=[],a=t.length-1;a>=0;a--){var i=e[+t[a]];MY(i.scale)&&PY(i.model,i.type,!0)==null&&(i.model.get("alignTicks")&&i.model.get("interval")==null?n.push(i):r=i)}r||(r=n.pop()),r&&B(n,function(o){o.__alignTo=r})}function _ye(e,t){return tb(e.scale)||tb(t.scale)||t.scale.getTicks().length<2}function wye(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(a){return a+t}:function(a){return n-a+t},e.toLocalCoord=e.dim==="x"?function(a){return a-t}:function(a){return n-a+t}}function W9(e,t){B(e.x,function(r){return W5(r,t.x,t.width)}),B(e.y,function(r){return W5(r,t.y,t.height)})}function W5(e,t,r){var n=[0,r],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),wye(e,t)}function q5(e,t,r,n,a,i,o){q9(n,a,Li.estimate,t,!1,o);var l=[0,0,0,0];c(0),c(1),f(n,0,NaN),f(n,1,NaN);var s=d_(l,function(v){return v>0})==null;return Pc(n,l,!0,!0,r),W9(a,n),s;function c(v){B(a[Ze[v]],function(p){if(Xg(p.model)){var m=i.ensureRecord(p.model),y=m.labelInfoList;if(y)for(var x=0;x<y.length;x++){var b=y[x],w=p.scale.normalize(Zd(p.scale,Yc(b.label).labelInfo.tick));w=v===1?1-w:w,f(b.rect,v,w),f(b.rect,1-v,NaN)}var C=m.nameLayout;if(C){var w=gd(m.nameLocation)?.5:NaN;f(C.rect,v,w),f(C.rect,1-v,NaN)}}})}function f(v,p,m){var y=e[Ze[p]]-v[Ze[p]],x=v[Pr[p]]+v[Ze[p]]-(e[Pr[p]]+e[Ze[p]]);y=h(y,1-m),x=h(x,m);var b=H5[p][0],w=H5[p][1];l[b]=st(l[b],y),l[w]=st(l[w],x)}function h(v,p){return v>0&&!xn(p)&&p>1e-4&&(v/=p),v}}function Cye(e,t,r,n,a){var i=new _9(Aye);return B(r,function(o){return B(o,function(l){if(Xg(l.model)){var s=!n;l.axisBuilder=Ame(e,t,l.model,a,i,s)}})}),i}function q9(e,t,r,n,a,i){var o=r===Li.determine;B(t,function(c){return B(c,function(f){Xg(f.model)&&(Dme(f.axisBuilder,e,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var l={x:0,y:0};s(0),s(1);function s(c){l[Ze[1-c]]=e[Pr[c]]<=i.refContainer[Pr[c]]*.5?0:1-c===1?2:1}B(t,function(c,f){return B(c,function(h){Xg(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:l[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function Tye(e,t,r){var n,a=e.get("outerBoundsMode",!0);a==="same"?n=t.clone():(a==null||a==="auto")&&(n=Qt(e.get("outerBounds",!0)||E9,r.refContainer));var i=e.get("outerBoundsContain",!0),o;i==null||i==="auto"||qe(["all","axisLabel"],i)<0?o="all":o=i;var l=[WS(Ie(e.get("outerBoundsClampWidth",!0),Ab[0]),t.width),WS(Ie(e.get("outerBoundsClampHeight",!0),Ab[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:l}}var Aye=function(e,t,r,n,a,i){var o=r.axis.dim==="x"?"y":"x";w9(e,t,r,n,a,i),gd(e.nameLocation)||B(t.recordMap[o],function(l){l&&l.labelInfoList&&l.dirVec&&T9(l.labelInfoList,l.dirVec,n,a)})};function Dye(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Mye(r,e,t),r.seriesInvolved&&Eye(r,e),r}function Mye(e,t,r){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];B(r.getCoordinateSystems(),function(l){if(!l.axisPointerEnabled)return;var s=tm(l.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=l;var f=l.model,h=f.getModel("tooltip",n);if(B(l.getAxes(),et(y,!1,null)),l.getTooltipAxes&&n&&h.get("show")){var v=h.get("trigger")==="axis",p=h.get(["axisPointer","type"])==="cross",m=l.getTooltipAxes(h.get(["axisPointer","axis"]));(v||p)&&B(m.baseAxes,et(y,p?"cross":!0,v)),p&&B(m.otherAxes,et(y,"cross",!1))}function y(x,b,w){var C=w.model.getModel("axisPointer",a),A=C.get("show");if(!(!A||A==="auto"&&!x&&!LR(C))){b==null&&(b=C.get("triggerTooltip")),C=x?Rye(w,h,a,t,x,b):C;var M=C.get("snap"),R=C.get("triggerEmphasis"),E=tm(w.model),N=b||M||w.type==="category",L=e.axesInfo[E]={key:E,axis:w,coordSys:l,axisPointerModel:C,triggerTooltip:b,triggerEmphasis:R,involveSeries:N,snap:M,useHandle:LR(C),seriesModels:[],linkGroup:null};c[E]=L,e.seriesInvolved=e.seriesInvolved||N;var O=Nye(i,w);if(O!=null){var I=o[O]||(o[O]={axesInfo:{}});I.axesInfo[E]=L,I.mapper=i[O].mapper,L.linkGroup=I}}}})}function Rye(e,t,r,n,a,i){var o=t.getModel("axisPointer"),l=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],s={};B(l,function(v){s[v]=je(o.get(v))}),s.snap=e.type!=="category"&&!!i,o.get("type")==="cross"&&(s.type="line");var c=s.label||(s.label={});if(c.show==null&&(c.show=!1),a==="cross"){var f=o.get(["label","show"]);if(c.show=f??!0,!i){var h=s.lineStyle=o.get("crossStyle");h&&Ue(c,h.textStyle)}}return e.model.getModel("axisPointer",new ct(s,r,n))}function Eye(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,a=r.get(["tooltip","trigger"],!0),i=r.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||r.get(["axisPointer","show"],!0)===!1||B(e.coordSysAxesInfo[tm(n.model)],function(o){var l=o.axis;n.getAxis(l.dim)===l&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Nye(e,t){for(var r=t.model,n=t.dim,a=0;a<e.length;a++){var i=e[a]||{};if(MA(i[n+"AxisId"],r.id)||MA(i[n+"AxisIndex"],r.componentIndex)||MA(i[n+"AxisName"],r.name))return a}}function MA(e,t){return e==="all"||pe(e)&&qe(e,t)>=0||e===t}function Lye(e){var t=FN(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,a=r.option,i=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var l=LR(r);i==null&&(a.status=l?"show":"hide");var s=n.getExtent();(o==null||o>s[1])&&(o=s[1]),o<s[0]&&(o=s[0]),a.value=o,l&&(a.status=t.axis.scale.isBlank()?"hide":"show")}}function FN(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[tm(e)]}function Iye(e){var t=FN(e);return t&&t.axisPointerModel}function LR(e){return!!e.get(["handle","show"])}function tm(e){return e.type+"||"+e.id}var X5={},vf=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a,i){this.axisPointerClass&&Lye(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,a,!0)},t.prototype.updateAxisPointer=function(r,n,a,i){this._doUpdateAxisPointerClass(r,a,!1)},t.prototype.remove=function(r,n){var a=this._axisPointer;a&&a.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,a){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=Iye(r);o?(this._axisPointer||(this._axisPointer=new i)).render(r,o,n,a):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){X5[r]=n},t.getAxisPointerClass=function(r){return r&&X5[r]},t.type="axis",t})(Ht),IR=it();function X9(e,t,r,n){var a=r.axis;if(!a.scale.isBlank()){var i=r.getModel("splitArea"),o=i.getModel("areaStyle"),l=o.get("color"),s=n.coordinateSystem.getRect(),c=a.getTicksCoords({tickModel:i,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(c.length){var f=l.length,h=IR(e).splitAreaColors,v=Le(),p=0;if(h)for(var m=0;m<c.length;m++){var y=h.get(c[m].tickValue);if(y!=null){p=(y+(f-1)*m)%f;break}}var x=a.toGlobalCoord(c[0].coord),b=o.getAreaStyle();l=pe(l)?l:[l];for(var m=1;m<c.length;m++){var w=a.toGlobalCoord(c[m].coord),C=void 0,A=void 0,M=void 0,R=void 0;a.isHorizontal()?(C=x,A=s.y,M=w-C,R=s.height,x=C+M):(C=s.x,A=x,M=s.width,R=w-A,x=A+R);var E=c[m-1].tickValue;E!=null&&v.set(E,p),t.add(new at({anid:E!=null?"area_"+E:null,shape:{x:C,y:A,width:M,height:R},style:Ue({fill:l[p]},b),autoBatch:!0,silent:!0})),p=(p+1)%f}IR(e).splitAreaColors=v}}}function Z9(e){IR(e).splitAreaColors=null}var Oye=["splitArea","splitLine","minorSplitLine","breakArea"],K9=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="CartesianAxisPointer",r}return t.prototype.render=function(r,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ze,this.group.add(this._axisGroup),!!Xg(r)){this._axisGroup.add(r.axis.axisBuilder.group),B(Oye,function(s){r.get([s,"show"])&&kye[s](this,this._axisGroup,r,r.getCoordSysModel(),a)},this);var l=i&&i.type==="changeAxisOrder"&&i.isInitSort;l||Lm(o,this._axisGroup,r),e.prototype.render.call(this,r,n,a,i)}},t.prototype.remove=function(){Z9(this)},t.type="cartesianAxis",t})(vf),kye={splitLine:function(e,t,r,n,a){var i=r.axis;if(!i.scale.isBlank()){var o=r.getModel("splitLine"),l=o.getModel("lineStyle"),s=l.get("color"),c=o.get("showMinLine")!==!1,f=o.get("showMaxLine")!==!1;s=pe(s)?s:[s];for(var h=n.coordinateSystem.getRect(),v=i.isHorizontal(),p=0,m=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],x=[],b=l.getLineStyle(),w=0;w<m.length;w++){var C=i.toGlobalCoord(m[w].coord);if(!(w===0&&!c||w===m.length-1&&!f)){var A=m[w].tickValue;v?(y[0]=C,y[1]=h.y,x[0]=C,x[1]=h.y+h.height):(y[0]=h.x,y[1]=C,x[0]=h.x+h.width,x[1]=C);var M=p++%s.length,R=new Mr({anid:A!=null?"line_"+A:null,autoBatch:!0,shape:{x1:y[0],y1:y[1],x2:x[0],y2:x[1]},style:Ue({stroke:s[M]},b),silent:!0});hd(R.shape,b.lineWidth),t.add(R)}}}},minorSplitLine:function(e,t,r,n,a){var i=r.axis,o=r.getModel("minorSplitLine"),l=o.getModel("lineStyle"),s=n.coordinateSystem.getRect(),c=i.isHorizontal(),f=i.getMinorTicksCoords();if(f.length)for(var h=[],v=[],p=l.getLineStyle(),m=0;m<f.length;m++)for(var y=0;y<f[m].length;y++){var x=i.toGlobalCoord(f[m][y].coord);c?(h[0]=x,h[1]=s.y,v[0]=x,v[1]=s.y+s.height):(h[0]=s.x,h[1]=x,v[0]=s.x+s.width,v[1]=x);var b=new Mr({anid:"minor_line_"+f[m][y].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:v[0],y2:v[1]},style:p,silent:!0});hd(b.shape,p.lineWidth),t.add(b)}},splitArea:function(e,t,r,n,a){X9(e,t,r,n)},breakArea:function(e,t,r,n,a){var i=Hm(),o=r.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),a)}},Q9=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t})(K9),Pye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Q9.type,r}return t.type="yAxis",t})(K9),jye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="grid",r}return t.prototype.render=function(r,n){this.group.removeAll(),r.get("show")&&this.group.add(new at({shape:r.coordinateSystem.getRect(),style:Ue({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Ht),Z5={offset:0};function GN(e){e.registerComponentView(jye),e.registerComponentModel(Nme),e.registerCoordinateSystem("cartesian2d",Sye),Sd(e,"x",NR,Z5),Sd(e,"y",NR,Z5),e.registerComponentView(Q9),e.registerComponentView(Pye),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var J9="single",Bye="singleAxis",OR="singleAxis",pS=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getCoordSysModel=function(){return this},t.type=OR,t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},t})(lt);Cr(pS,Kd.prototype);function zye(e){qr(GN),e.registerSeriesModel(cye),e.registerChartView(vye),e.registerLayout(Gm("scatter"))}function Vye(e){var t=e.polar;if(t){pe(t)||(t=[t]);var r=[];B(t,function(n,a){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],pe(e.radar)||(e.radar=[e.radar]),e.radar.push(n)):r.push(n)}),e.polar=r}B(e.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var rm="radar",Fye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ev(Ee(this.getData,this),Ee(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return Jd(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.coordinateSystem,l=o.getIndicatorAxes(),s=this.getData().getName(r),c=s===""?this.name:s,f=L7(this,r);return Rr("section",{header:c,sortBlocks:!0,blocks:xe(l,function(h){var v=i.get(i.mapDimension(h.dim),r);return Rr("nameValue",{markerType:"subItem",markerColor:f,name:h.name,value:v,sortParam:v})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),a=this.coordinateSystem,i=n.getValues(xe(a.dimensions,function(c){return n.mapDimension(c)}),r),o=0,l=i.length;o<l;o++)if(!isNaN(i[o])){var s=a.getIndicatorAxes();return a.coordToPoint(s[o].dataToCoord(i[o]),o)}}},t.type="series."+rm,t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t})(Pt),Gye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=rm,r}return t.prototype.render=function(r,n,a){var i=r.coordinateSystem,o=this.group,l=r.getData(),s=this._data;function c(v,p){var m=v.getItemVisual(p,"symbol")||"circle";if(m!=="none"){var y=Wd(v.getItemVisual(p,"symbolSize")),x=wr(m,-1,-1,2,2),b=v.getItemVisual(p,"symbolRotate")||0;return x.attr({style:{strokeNoScale:!0},z2:100,scaleX:y[0]/2,scaleY:y[1]/2,rotation:b*Math.PI/180||0}),x}}function f(v,p,m,y,x,b){m.removeAll();for(var w=0;w<p.length-1;w++){var C=c(y,x);C&&(C.__dimIdx=w,v[w]?(C.setPosition(v[w]),sf[b?"initProps":"updateProps"](C,{x:p[w][0],y:p[w][1]},r,x)):C.setPosition(p[w]),m.add(C))}}function h(v){return xe(v,function(p){return[i.cx,i.cy]})}l.diff(s).add(function(v){var p=l.getItemLayout(v);if(p){var m=new Xn,y=new On,x={shape:{points:p}};m.shape.points=h(p),y.shape.points=h(p),ir(m,x,r,v),ir(y,x,r,v);var b=new ze,w=new ze;b.add(y),b.add(m),b.add(w),f(y.shape.points,p,w,l,v,!0),l.setItemGraphicEl(v,b)}}).update(function(v,p){var m=s.getItemGraphicEl(p),y=m.childAt(0),x=m.childAt(1),b=m.childAt(2),w={shape:{points:l.getItemLayout(v)}};w.shape.points&&(f(y.shape.points,w.shape.points,b,l,v,!1),ui(x),ui(y),_t(y,w,r),_t(x,w,r),l.setItemGraphicEl(v,m))}).remove(function(v){o.remove(s.getItemGraphicEl(v))}).execute(),l.eachItemGraphicEl(function(v,p){var m=l.getItemModel(p),y=v.childAt(0),x=v.childAt(1),b=v.childAt(2),w=l.getItemVisual(p,"style"),C=w.fill;o.add(v),y.useStyle(Ue(m.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:C})),jr(y,m,"lineStyle"),jr(x,m,"areaStyle");var A=m.getModel("areaStyle"),M=A.isEmpty()&&A.parentModel.isEmpty();x.ignore=M,B(["emphasis","select","blur"],function(E){var N=m.getModel([E,"areaStyle"]),L=N.isEmpty()&&N.parentModel.isEmpty();x.ensureState(E).ignore=L&&M;var O=m.getModel([E,"lineStyle"]).getLineStyle();y.ensureState(E).style=O;var I=N.getAreaStyle();x.ensureState(E).style=I;var z=m.getModel([E,"itemStyle"]).getItemStyle();b.eachChild(function(V){V.ensureState(E).style=je(z)})}),x.useStyle(Ue(m.getModel("areaStyle").getAreaStyle(),{fill:C,opacity:.7,decal:w.decal}));var R=m.getModel("emphasis");b.eachChild(function(E){if(E instanceof Xr){var N=E.style;E.useStyle(he({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},w))}else E.useStyle(w),E.setColor(C),E.style.strokeNoScale=!0;var L=l.getStore().get(l.getDimensionIndex(E.__dimIdx),p);(L==null||isNaN(L))&&(L=""),Wr(E,Br(m),{labelFetcher:l.hostModel,labelDataIndex:p,labelDimIndex:E.__dimIdx,defaultText:L,inheritColor:C,defaultOpacity:w.opacity})}),er(v,R.get("focus"),R.get("blurScope"),R.get("disabled"))}),this._data=l},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type=rm,t})(It),wp=Y9.value,mg="radar",e$=mg,Hye=mg,t$=5;function dx(e,t){return Ue({show:t},e)}var Uye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this.get("boundaryGap"),n=this.get("splitNumber"),a=this.get("clockwise"),i=this.get("scale"),o=this.get("axisLine"),l=this.get("axisTick"),s=this.get("axisLabel"),c=this.get("axisName"),f=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),v=this.get("axisNameGap"),p=this.get("triggerEvent"),m=xe(this.get("indicator")||[],function(y){y.max!=null&&y.max>0&&!y.min?y.min=0:y.min!=null&&y.min<0&&!y.max&&(y.max=0);var x=c;y.color!=null&&(x=Ue({color:y.color},c));var b=Je(je(y),{boundaryGap:r,splitNumber:n,clockwise:a,scale:i,axisLine:o,axisTick:l,axisLabel:s,name:y.text,showName:f,nameLocation:"end",nameGap:v,nameTextStyle:x,triggerEvent:p},!1);if(De(h)){var w=b.name;b.name=h.replace("{value}",w??"")}else Be(h)&&(b.name=h(b.name,b));var C=new ct(b,null,this.ecModel);return Cr(C,Kd.prototype),C.mainType="radar",C.componentIndex=this.componentIndex,C.uid=uf("ec_radar"),C},this);this._indicatorModels=m},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=e$,t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,clockwise:!1,axisName:{show:!0,color:re.color.axisLabel},boundaryGap:[0,0],splitNumber:t$,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Je({lineStyle:{color:re.color.neutral20}},wp.axisLine),axisLabel:dx(wp.axisLabel,!1),axisTick:dx(wp.axisTick,!1),splitLine:dx(wp.splitLine,!0),splitArea:dx(wp.splitArea,!0),indicator:[]},t})(lt),Yye=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=this.group;i.removeAll(),this._buildAxes(r,a),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var a=r.coordinateSystem,i=a.getIndicatorAxes(),o=xe(i,function(l){var s=l.model.get("showName")?l.name:"",c=new Yn(l.model,n,{axisName:s,position:[a.cx,a.cy],rotation:l.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return c});B(o,function(l){l.build(),this.group.add(l.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=r.get("shape"),o=r.getModel("splitLine"),l=r.getModel("splitArea"),s=o.getModel("lineStyle"),c=l.getModel("areaStyle"),f=o.get("show"),h=l.get("show"),v=s.get("color"),p=c.get("color"),m=pe(v)?v:[v],y=pe(p)?p:[p],x=[],b=[];function w(H,F,X){var P=X%F.length;return H[P]=H[P]||[],P}if(i==="circle")for(var C=a[0].getTicksCoords(),A=n.cx,M=n.cy,R=0;R<C.length;R++){if(f){var E=w(x,m,R);x[E].push(new Io({shape:{cx:A,cy:M,r:C[R].coord}}))}if(h&&R<C.length-1){var E=w(b,y,R);b[E].push(new Bd({shape:{cx:A,cy:M,r0:C[R].coord,r:C[R+1].coord}}))}}else for(var N,L=xe(a,function(H,F){var X=H.getTicksCoords();return N=N==null?X.length-1:Math.min(X.length-1,N),xe(X,function(P){return n.coordToPoint(P.coord,F)})}),O=[],R=0;R<=N;R++){for(var I=[],z=0;z<a.length;z++)I.push(L[z][R]);if(I[0]&&I.push(I[0].slice()),f){var E=w(x,m,R);x[E].push(new On({shape:{points:I}}))}if(h&&O){var E=w(b,y,R-1);b[E].push(new Xn({shape:{points:I.concat(O)}}))}O=I.slice().reverse()}var V=s.getLineStyle(),Y=c.getAreaStyle();B(b,function(H,F){this.group.add(wa(H,{style:Ue({stroke:"none",fill:y[F%y.length]},Y),silent:!0}))},this),B(x,function(H,F){this.group.add(wa(H,{style:Ue({fill:"none",stroke:m[F%m.length]},V),silent:!0}))},this)},t.type="radar",t})(Ht),$ye=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this,r,n,a)||this;return i.type="value",i.angle=0,i.name="",i}return t})(di),Wye=(function(){function e(t,r,n){this.type=mg,this.dimensions=[],this._model=t,this._indicatorAxes=xe(t.getIndicatorModels(),function(a,i){var o="indicator_"+i,l=new $ye(o,new Os);return l.name=a.get("name"),l.model=a,a.axis=l,this.dimensions.push(o),l},this),this.resize(t,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(t,r){var n=this._indicatorAxes[r];return this.coordToPoint(n.dataToCoord(t),r)},e.prototype.coordToPoint=function(t,r){var n=this._indicatorAxes[r],a=n.angle,i=this.cx+t*Math.cos(a),o=this.cy-t*Math.sin(a);return[i,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,a=Math.sqrt(r*r+n*n);r/=a,n/=a;for(var i=Math.atan2(-n,r),o=1/0,l,s=-1,c=0;c<this._indicatorAxes.length;c++){var f=this._indicatorAxes[c],h=Math.abs(i-f.angle);h<o&&(l=f,s=c,o=h)}return[s,+(l&&l.coordToData(a))]},e.prototype.resize=function(t,r){var n=Vr(t,r).refContainer,a=t.get("center"),i=t.get("clockwise")||!1,o=Math.min(n.width,n.height)/2;this.cx=Re(a[0],n.width)+n.x,this.cy=Re(a[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var l=t.get("radius");(De(l)||pt(l))&&(l=[0,l]),this.r0=Re(l[0],o),this.r=Re(l[1],o);var s=i?-1:1;B(this._indicatorAxes,function(c,f){c.setExtent(this.r0,this.r);var h=this.startAngle+s*f*Math.PI*2/this._indicatorAxes.length;h=Math.atan2(Math.sin(h),Math.cos(h)),c.angle=h},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,a=this._model,i=G_(a.get("splitNumber"),t$),o=new Os;o.setExtent(0,i),o.setConfig({interval:1}),B(n,function(l){Gc(l,md),$9(l,o)})},e.prototype.convertToPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(t,r,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.create=function(t,r){var n=[];return t.eachComponent(e$,function(a){var i=new e(a,t,r);n.push(i),a.coordinateSystem=i}),t.eachSeriesByType(Hye,function(a){if(a.get("coordinateSystem")===mg){var i=a.coordinateSystem=n[a.get("radarIndex")||0];i&&B(i.getIndicatorAxes(),function(o){Fc(o,a,mg)})}}),n},e.dimensions=[],e})();function r$(e){e.registerCoordinateSystem("radar",Wye),e.registerComponentModel(Uye),e.registerComponentView(Yye),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}var qye=zr(rm,Xye);function Xye(e){e.eachSeriesByType(rm,function(t){var r=t.getData(),n=[],a=t.coordinateSystem;if(a){var i=a.getIndicatorAxes();B(i,function(o,l){r.each(r.mapDimension(i[l].dim),function(s,c){n[c]=n[c]||[];var f=a.dataToPoint(s,l);n[c][l]=K5(f)?f:Q5(a)})}),r.each(function(o){var l=d_(n[o],function(s){return K5(s)})||Q5(a);n[o].push(l.slice()),r.setItemLayout(o,n[o])})}})}function K5(e){return!isNaN(e[0])&&!isNaN(e[1])}function Q5(e){return[e.cx,e.cy]}function Zye(e){qr(r$),e.registerChartView(Gye),e.registerSeriesModel(Fye),e.registerLayout(qye),e.registerProcessor(Um("radar")),e.registerPreprocessor(Vye)}var HN=it();function Kye(e,t,r){HN(e)[t]=r}function Qye(e,t,r){var n=HN(e),a=n[t];a===r&&(n[t]=null)}function J5(e,t){return!!HN(e)[t]}ki({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},ur);var Jye={axisPointer:1,tooltip:1,brush:1};function n$(e,t,r){var n=t.getComponentByElement(e.topTarget);if(!n||n===r||Jye.hasOwnProperty(n.mainType))return!1;var a=n.coordinateSystem;if(!a||a.model===r)return!1;var i=jc(n),o=jc(r);return!((i.zlevel-o.zlevel||i.z-o.z)<=0)}var pf=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;n._zr=r;var a=Ee(n._mousedownHandler,n),i=Ee(n._mousemoveHandler,n),o=Ee(n._mouseupHandler,n),l=Ee(n._mousewheelHandler,n),s=Ee(n._pinchHandler,n);return n.enable=function(c,f){var h=f.zInfo,v=jc(h.component),p=v.z,m=v.zlevel,y={component:h.component,z:p,zlevel:m,z2:Ie(h.z2,-1/0)},x=he({},f.triggerInfo);this._opt=Ue(he({},f),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:y,triggerInfo:x,cursorGrab:"grab",cursorGrabbing:"grabbing"}),c==null&&(c=!0),(!this._enabled||this._controlType!==c)&&(this.disable(),this._enabled=!0,(c===!0||c==="move"||c==="pan")&&(Tp(r,"mousedown",a,y),Tp(r,"mousemove",i,y),Tp(r,"mouseup",o,y)),(c===!0||c==="scale"||c==="zoom")&&(Tp(r,"mousewheel",l,y),Tp(r,"pinch",s,y)))},n.disable=function(){this._enabled&&(this._enabled=!1,Ap(r,"mousedown",a),Ap(r,"mousemove",i),Ap(r,"mouseup",o),Ap(r,"mousewheel",l),Ap(r,"pinch",s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(r,n,a){var i=this._opt,o=i.zInfoParsed;if(n$(r,i.api,o.component))return!1;var l=i.triggerInfo,s=l.roamTrigger,c=!1;return s==="global"&&(c=!0),c||(c=l.isInSelf(r,n,a)),c&&l.isInClip&&!l.isInClip(r,n,a)&&(c=!1),c},t.prototype._decideCursorStyle=function(r,n,a,i){var o=r.target;if(!o&&this._checkPointer(r,n,a))return this._opt.cursorGrab;if(i)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(r){if(!(TB(r)||Cp(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var a=r.offsetX,i=r.offsetY;this._checkPointer(r,a,i)&&(this._x=a,this._y=i,this._dragging=!0)}},t.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||J5(n,"globalPan")||Cp(r))){var a=r.offsetX,i=r.offsetY;if(!this._dragging||!gS("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,a,i,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle(this._opt.cursorGrabbing);var l=this._x,s=this._y,c=a-l,f=i-s;this._x=a,this._y=i,this._opt.preventDefaultMouseMove&&_l(r.event),r.__ecRoamConsumed=!0,eV(this,"pan","moveOnMouseMove",r,{dx:c,dy:f,oldX:l,oldY:s,newX:a,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(r){if(!Cp(r)){var n=this._zr;if(!TB(r)){this._dragging=!1;var a=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);a&&n.setCursorStyle(a)}}},t.prototype._mousewheelHandler=function(r){if(!Cp(r)){var n=gS("zoomOnMouseWheel",r,this._opt),a=gS("moveOnMouseWheel",r,this._opt),i=r.wheelDelta,o=Math.abs(i),l=r.offsetX,s=r.offsetY;if(!(i===0||!n&&!a)){if(n){var c=o>3?1.4:o>1?1.2:1.1,f=i>0?c:1/c;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:f,originX:l,originY:s,isAvailableBehavior:null})}if(a){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:v,originX:l,originY:s,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(J5(this._zr,"globalPan")||Cp(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(r,n,a,i,o){r._checkPointer(i,o.originX,o.originY)&&(_l(i.event),i.__ecRoamConsumed=!0,eV(r,n,a,i,o))},t})(fi);function Cp(e){return e.__ecRoamConsumed}var e0e=it();function W_(e){var t=e0e(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Tp(e,t,r,n){for(var a=W_(e),i=a.roam,o=i[t]=i[t]||[],l=0;l<o.length;l++){var s=o[l].zInfoParsed;if((s.zlevel-n.zlevel||s.z-n.z||s.z2-n.z2)<=0)break}o.splice(l,0,{listener:r,zInfoParsed:n}),t0e(e,t)}function Ap(e,t,r){for(var n=W_(e),a=n.roam[t]||[],i=0;i<a.length;i++)if(a[i].listener===r){a.splice(i,1),a.length||r0e(e,t);return}}function t0e(e,t){var r=W_(e);r.uniform[t]||e.on(t,r.uniform[t]=function(n){var a=r.roam[t];if(a)for(var i=0;i<a.length;i++)a[i].listener(n)})}function r0e(e,t){var r=W_(e),n=r.uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function eV(e,t,r,n,a){a.isAvailableBehavior=Ee(gS,null,r,n),e.trigger(t,a)}function gS(e,t,r){var n=r[e];return!e||n&&(!De(n)||t.event[n+"Key"])}function a$(e){if(De(e)){var t=new DOMParser;e=t.parseFromString(e,"text/xml")}var r=e;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var RA,Mb={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},tV=dt(Mb),Rb={"alignment-baseline":"textBaseline","stop-color":"stopColor"},rV=dt(Rb),n0e=(function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=a$(t);this._defsUsePending=[];var a=new ze;this._root=a;var i=[],o=n.getAttribute("viewBox")||"",l=parseFloat(n.getAttribute("width")||r.width),s=parseFloat(n.getAttribute("height")||r.height);isNaN(l)&&(l=null),isNaN(s)&&(s=null),Sa(n,a,null,!0,!1);for(var c=n.firstChild;c;)this._parseNode(c,a,i,null,!1,!1),c=c.nextSibling;o0e(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=q_(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&l!=null&&s!=null&&(h=o$(f,{x:0,y:0,width:l,height:s}),!r.ignoreViewBox)){var p=a;a=new ze,a.add(p),p.scaleX=p.scaleY=h.scale,p.x=h.x,p.y=h.y}return!r.ignoreRootClip&&l!=null&&s!=null&&a.setClipPath(new at({shape:{x:0,y:0,width:l,height:s}})),{root:a,width:l,height:s,viewBoxRect:f,viewBoxTransform:h,named:i}},e.prototype._parseNode=function(t,r,n,a,i,o){var l=t.nodeName.toLowerCase(),s,c=a;if(l==="defs"&&(i=!0),l==="text"&&(o=!0),l==="defs"||l==="switch")s=r;else{if(!i){var f=RA[l];if(f&&Ne(RA,l)){s=f.call(this,t,r);var h=t.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:l,el:s};n.push(v),l==="g"&&(c=v)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:l,el:s});r.add(s)}}var p=nV[l];if(p&&Ne(nV,l)){var m=p.call(this,t),y=t.getAttribute("id");y&&(this._defs[y]=m)}}if(s&&s.isGroup)for(var x=t.firstChild;x;)x.nodeType===1?this._parseNode(x,s,n,c,i,o):x.nodeType===3&&o&&this._parseText(x,s),x=x.nextSibling},e.prototype._parseText=function(t,r){var n=new cd({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),a0e(n,r);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var l=n.getBoundingRect();return this._textX+=l.width,r.add(n),n},e.internalField=(function(){RA={g:function(t,r){var n=new ze;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new at;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,r){var n=new Io;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,r){var n=new Mr;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,r){var n=new Rm;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,r){var n=t.getAttribute("points"),a;n&&(a=oV(n));var i=new Xn({shape:{points:a||[]},silent:!0});return Fa(r,i),Sa(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,r){var n=t.getAttribute("points"),a;n&&(a=oV(n));var i=new On({shape:{points:a||[]},silent:!0});return Fa(r,i),Sa(t,i,this._defsUsePending,!1,!1),i},image:function(t,r){var n=new Xr;return Fa(r,n),Sa(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,r){var n=t.getAttribute("x")||"0",a=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var l=new ze;return Fa(r,l),Sa(t,l,this._defsUsePending,!1,!0),l},tspan:function(t,r){var n=t.getAttribute("x"),a=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",l=new ze;return Fa(r,l),Sa(t,l,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),l},path:function(t,r){var n=t.getAttribute("d")||"",a=v8(n);return Fa(r,a),Sa(t,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),e})(),nV={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),r=parseInt(e.getAttribute("y1")||"0",10),n=parseInt(e.getAttribute("x2")||"10",10),a=parseInt(e.getAttribute("y2")||"0",10),i=new lf(t,r,n,a);return aV(e,i),iV(e,i),i},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),r=parseInt(e.getAttribute("cy")||"0",10),n=parseInt(e.getAttribute("r")||"0",10),a=new kE(t,r,n);return aV(e,a),iV(e,a),a}};function aV(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function iV(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};i$(r,i,i);var o=i.stopColor||r.getAttribute("stop-color")||"#000000",l=i.stopOpacity||r.getAttribute("stop-opacity");if(l){var s=Nn(o),c=s&&s[3];c&&(s[3]*=dl(l),o=ti(s,"rgba"))}t.colorStops.push({offset:a,color:o})}r=r.nextSibling}}function Fa(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Ue(t.__inheritedStyle,e.__inheritedStyle))}function oV(e){for(var t=q_(e),r=[],n=0;n<t.length;n+=2){var a=parseFloat(t[n]),i=parseFloat(t[n+1]);r.push([a,i])}return r}function Sa(e,t,r,n,a){var i=t,o=i.__inheritedStyle=i.__inheritedStyle||{},l={};e.nodeType===1&&(u0e(e,t),i$(e,o,l),n||c0e(e,o,l)),i.style=i.style||{},o.fill!=null&&(i.style.fill=lV(i,"fill",o.fill,r)),o.stroke!=null&&(i.style.stroke=lV(i,"stroke",o.stroke,r)),B(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(s){o[s]!=null&&(i.style[s]=parseFloat(o[s]))}),B(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(s){o[s]!=null&&(i.style[s]=o[s])}),a&&(i.__selfStyle=l),o.lineDash&&(i.style.lineDash=xe(q_(o.lineDash),function(s){return parseFloat(s)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function a0e(e,t){var r=t.__selfStyle;if(r){var n=r.textBaseline,a=n;!n||n==="auto"||n==="baseline"?a="alphabetic":n==="before-edge"||n==="text-before-edge"?a="top":n==="after-edge"||n==="text-after-edge"?a="bottom":(n==="central"||n==="mathematical")&&(a="middle"),e.style.textBaseline=a}var i=t.__inheritedStyle;if(i){var o=i.textAlign,l=o;o&&(o==="middle"&&(l="center"),e.style.textAlign=l)}}var i0e=/^url\(\s*#(.*?)\)/;function lV(e,t,r,n){var a=r&&r.match(i0e);if(a){var i=Ja(a[1]);n.push([e,t,i]);return}return r==="none"&&(r=null),r}function o0e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n[0].style[n[1]]=e[n[2]]}}var l0e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function q_(e){return e.match(l0e)||[]}var s0e=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,EA=Math.PI/180;function u0e(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],a=null;r.replace(s0e,function(h,v,p){return n.push(v,p),""});for(var i=n.length-1;i>0;i-=2){var o=n[i],l=n[i-1],s=q_(o);switch(a=a||lr(),l){case"translate":Ei(a,a,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":p_(a,a,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":Zs(a,a,-parseFloat(s[0])*EA,[parseFloat(s[1]||"0"),parseFloat(s[2]||"0")]);break;case"skewX":var c=Math.tan(parseFloat(s[0])*EA);ei(a,[1,0,c,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(s[0])*EA);ei(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(s[0]),a[1]=parseFloat(s[1]),a[2]=parseFloat(s[2]),a[3]=parseFloat(s[3]),a[4]=parseFloat(s[4]),a[5]=parseFloat(s[5]);break}}t.setLocalTransform(a)}}var sV=/([^\s:;]+)\s*:\s*([^:;]+)/g;function i$(e,t,r){var n=e.getAttribute("style");if(n){sV.lastIndex=0;for(var a;(a=sV.exec(n))!=null;){var i=a[1],o=Ne(Mb,i)?Mb[i]:null;o&&(t[o]=a[2]);var l=Ne(Rb,i)?Rb[i]:null;l&&(r[l]=a[2])}}}function c0e(e,t,r){for(var n=0;n<tV.length;n++){var a=tV[n],i=e.getAttribute(a);i!=null&&(t[Mb[a]]=i)}for(var n=0;n<rV.length;n++){var a=rV[n],i=e.getAttribute(a);i!=null&&(r[Rb[a]]=i)}}function o$(e,t){var r=t.width/e.width,n=t.height/e.height,a=Math.min(r,n);return{scale:a,x:-(e.x+e.width/2)*a+(t.x+t.width/2),y:-(e.y+e.height/2)*a+(t.y+t.height/2)}}function f0e(e,t){var r=new n0e;return r.parse(e,t)}var h0e=Le(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),d0e=(function(){function e(t,r){this.type="geoSVG",this._usedGraphicMap=Le(),this._freedGraphics=[],this._mapName=t,this._parsedXML=a$(r)}return e.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var r=p0e(t.named),n=r.regions,a=r.regionsMap;this._regions=n,this._regionsMap=a}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(t){var r,n;try{r=t&&f0e(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,In(n!=null)}catch(x){throw new Error(`Invalid svg format
49
+ `+x.message)}var a=new ze;a.add(n),a.isGeoSVGGraphicRoot=!0;var i=r.width,o=r.height,l=r.viewBoxRect,s=this._boundingRect;if(!s){var c=void 0,f=void 0,h=void 0,v=void 0;if(i!=null?(c=0,h=i):l&&(c=l.x,h=l.width),o!=null?(f=0,v=o):l&&(f=l.y,v=l.height),c==null||f==null){var p=n.getBoundingRect();c==null&&(c=p.x,h=p.width),f==null&&(f=p.y,v=p.height)}s=this._boundingRect=new Fe(c,f,h,v)}if(l){var m=o$(l,s);n.scaleX=n.scaleY=m.scale,n.x=m.x,n.y=m.y}a.setClipPath(new at({shape:s.plain()}));var y=[];return B(r.named,function(x){h0e.get(x.svgNodeTagLower)!=null&&(y.push(x),v0e(x.el))}),{root:a,boundingRect:s,named:y}},e.prototype.useGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),r.set(t,n),n)},e.prototype.freeGraphic=function(t){var r=this._usedGraphicMap,n=r.get(t);n&&(r.removeKey(t),this._freedGraphics.push(n))},e})();function v0e(e){e.silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1})}function p0e(e){var t=[],r=Le();return B(e,function(n){if(n.namedFrom==null){var a=new rge(n.name,n.el);t.push(a),r.set(n.name,a)}}),{regions:t,regionsMap:r}}var kR=[126,25],uV="南海诸岛",nc=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Qu=0;Qu<nc.length;Qu++)for(var wh=0;wh<nc[Qu].length;wh++)nc[Qu][wh][0]/=10.5,nc[Qu][wh][1]/=-10.5/.75,nc[Qu][wh][0]+=kR[0],nc[Qu][wh][1]+=kR[1];function g0e(e,t){if(e==="china"){for(var r=0;r<t.length;r++)if(t[r].name===uV)return;t.push(new ZY(uV,xe(nc,function(n){return{type:"polygon",exterior:n}}),kR))}}var m0e={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function y0e(e,t){if(e==="china"){var r=m0e[t.name];if(r){var n=t.getCenter();n[0]+=r[0]/10.5,n[1]+=-r[1]/(10.5/.75),t.setCenter(n)}}}var x0e=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function S0e(e,t){e==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:x0e[0]})}var b0e="name",_0e=(function(){function e(t,r,n){this.type="geoJSON",this._parsedMap=Le(),this._mapName=t,this._specialAreas=n,this._geoJSON=C0e(r)}return e.prototype.load=function(t,r){r=r||b0e;var n=this._parsedMap.get(r);if(!n){var a=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:a,boundingRect:w0e(a)})}var i=Le(),o=[];return B(n.regions,function(l){var s=l.name;t&&Ne(t,s)&&(l=l.cloneShallow(s=t[s])),o.push(l),i.set(s,l)}),{regions:o,boundingRect:n.boundingRect||new Fe(0,0,0,0),regionsMap:i}},e.prototype._parseToRegions=function(t){var r=this._mapName,n=this._geoJSON,a;try{a=n?AR(n,t):[]}catch(i){throw new Error(`Invalid geoJson format
50
+ `+i.message)}return g0e(r,a),B(a,function(i){var o=i.name;y0e(r,i),S0e(r,i);var l=this._specialAreas&&this._specialAreas[o];l&&i.transformTo(l.left,l.top,l.width,l.height)},this),a},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e})();function w0e(e){for(var t,r=0;r<e.length;r++){var n=e[r].getBoundingRect();t=t||n.clone(),t.union(n)}return t}function C0e(e){return De(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var Dp=Le();const Ml={registerMap:function(e,t,r){if(t.svg){var n=new d0e(e,t.svg);Dp.set(e,n)}else{var a=t.geoJson||t.geoJSON;a&&!t.features?r=t.specialAreas:a=t;var n=new _0e(e,a,r);Dp.set(e,n)}},getGeoResource:function(e){return Dp.get(e)},getMapForUser:function(e){var t=Dp.get(e);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(e,t,r){var n=Dp.get(e);if(n)return n.load(t,r)}};var $c=0,Wc=1,Eo=2;var T0e="view",X_=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;i.type=T0e,i.dimensions=["x","y"];var o=i;o.invertY=r,o.lgCt=n,o.lgGeo=a;var l=o.trans=[];return l[$c]=qh(),l[Wc]=qh(),l[Eo]=qh(),o.mtRaw=lr(),o.mtRawInv=lr(),o.mtOverall=lr(),o.mtOverallInv=lr(),o.zoom=1,i}return t.prototype.getBoundingRect=function(){return l$(null,this)},t.prototype.getViewRect=function(){return UN(null,this)},t.prototype.getRoamTransform=function(){return zs(this.trans[Wc])},t.prototype.dataToPoint=function(r,n,a){var i=n?this.mtRaw:this.mtOverall;return a=a||[],i?mr(a,r,i):vn(a,r)},t.prototype.pointToData=function(r,n,a){a=a||[];var i=this.mtOverallInv;return i?mr(a,r,i):vn(a,r)},t.prototype.convertToPixel=function(r,n,a){var i=vV(n);return i===this?i.dataToPoint(a):null},t.prototype.convertFromPixel=function(r,n,a){var i=vV(n);return i===this?i.pointToData(a):null},t.prototype.containPoint=function(r){var n=this;return od(vx,n.dataRect),ZU(vx,vx,n.mtOverall),Nle(vx,r[0],r[1])},t.dimensions=["x","y"],t})(Ks),vx=g_();function Eb(e,t){return Bs([],t.mtOverall)}function A0e(e){return e.zoom}function l$(e,t){return od(g_(),t.dataRect)}function UN(e,t){return od(g_(),t.viewRect)}function nm(e,t,r){return wo(e||qh(),t.trans[r])}function YN(e){return!!(e.dataRect&&e.viewRect)}function D0e(e,t,r,n){n===Wc?s$(e,t.trans[$c],r):wo(e,r)}function cV(e,t,r){zs(r,px),ei(px,px,t.mtRawInv),L_(e,px)}var px=lr();function $N(e,t){var r=e;r.centerOption=t.getShallow("center");var n=r.zoomLimit=t.getShallow("scaleLimit"),a=t.getShallow("zoom");r.zoom=qN(a||1,n)||1,YN(r)&&WN(r)}function Z_(e,t,r,n,a){var i=e;i.dataRect=new Fe(t,r,n,a),YN(i)&&WN(i)}function Nb(e,t,r,n,a){var i=e;i.viewRect=new Fe(t,r,n,a),YN(i)&&WN(i)}function WN(e){M0e(e),E0e(e),N0e(e)}function M0e(e){var t=e.dataRect,r=e.viewRect,n=e.trans[$c],a=e.invertY;a&&(t=od(R0e,t),t.y=-t.y-t.height),XU(fV,t,r),L_(n,fV),a&&(n.scaleY=-n.scaleY);var i=zs(n,e.mtRaw);oi(e.mtRawInv,i)}var fV=lr(),R0e=g_();function E0e(e){var t=u$(e),r=O0e(NA,e,e.centerOption)?mr(NA,NA,e.mtRaw):t,n=e.zoom,a=e.trans[Wc];a.x=t[0]-n*r[0],a.y=t[1]-n*r[1],a.scaleX=a.scaleY=n}var NA=[];function N0e(e){var t=e.trans,r=t[Wc],n=t[$c],a=t[Eo];s$(a,n,r);var i=zs(a,e.mtOverall),o=oi(e.mtOverallInv,i);hV(e,a,i,o),hV(e.lgGeo,a,i,o)}function hV(e,t,r,n){e&&(wo(e,t),Bs(e.transform||(e.transform=[]),r),Bs(e.invTransform||(e.invTransform=[]),n))}function s$(e,t,r){zs(t,dV),zs(r,gx),ei(gx,gx,dV),L_(e,gx)}var dV=lr(),gx=lr();function vV(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function u$(e){var t=e.viewRect;return LA[0]=t.x+t.width/2,LA[1]=t.y+t.height/2,LA}var LA=[];function c$(e){return e&&e.type==="view"}function Gs(e,t,r,n){var a=r;a.syncBackEl=e,a.syncBackType=t,n?_t(e,nm(null,r,t),n):(nm(e,r,t),e.dirty())}function L0e(e,t,r,n){var a=e,i=a.syncBackEl;i?(i.stopAnimation(),D0e(fs,a,i,a.syncBackType)):wo(fs,a.trans[Eo]),cV(IA,a,fs),n?I0e(fs,IA,a,n):wo(fs,IA),cV(fs,a,fs),P0e(a,t,r,fs)}var fs=qh(),IA=qh();function f$(e,t,r){var n=Lb(t);n&&(L0e(n,t,r,e),$N(n,t))}function Lb(e){return e.__ownRoamView?e.__ownRoamView():null}function h$(e,t,r,n){r.setUpdatePayload(HE(e));var a=t8(n,t);a&&a.__updateOnOwnRoam&&a.__updateOnOwnRoam(e,t,n)}function I0e(e,t,r,n){n.dx!=null&&n.dy!=null&&(e.x+=n.dx,e.y+=n.dy);var a=n.zoom;if(a!=null){var i=d$(t),o=qN(i*a,r.zoomLimit),l=o/i;e.x-=(n.originX-e.x)*(l-1),e.y-=(n.originY-e.y)*(l-1),e.scaleX*=l,e.scaleY*=l}}function d$(e){return e.scaleX}function O0e(e,t,r){var n=t.dataRect;if(!r)return!1;var a=t.lgCt;return a?hl(e,Re(r[0],a.w),Re(r[1],a.h)):n&&hl(e,Re(r[0],n.width,n.x),Re(r[1],n.height,n.y)),!0}function k0e(e,t){var r=e.centerOption,n=e.dataRect;return!r||e.lgCt?t.slice():[pV(0,t,r,n),pV(1,t,r,n)]}function pV(e,t,r,n){return r&&n&&n[Pr[e]]&&Use(r[e])?(t[e]-n[Ze[e]])/n[Pr[e]]*100+"%":t[e]}function v$(e,t){return t&&e&&e.getShallow("legacyViewCoordSysCenterBase")?{w:t.getWidth(),h:t.getHeight()}:null}function P0e(e,t,r,n){var a=u$(e),i=d$(n),o=sr(i)>1e-6;Mp[0]=o?(a[0]-n.x)/i:a[0],Mp[1]=o?(a[1]-n.y)/i:a[1],mr(Mp,Mp,e.mtRawInv);var l=k0e(e,Mp);gV(t,l,i),B(r,function(s){s!==t&&gV(s,l.slice(),i)})}var Mp=[];function gV(e,t,r){var n=e.option;n.center=t,n.zoom=r}function qN(e,t){if(t){var r=t.min||0,n=t.max||1/0;e=Math.max(Math.min(n,e),r)}return e}function p$(e,t){var r=t.getShallow("nodeScaleRatio",!0)||1,n=e;return((n.zoom-1)*r+1)/(n.trans[Eo].scaleX||1)}function K_(e,t,r,n,a,i,o,l){var s=Lb(e);if(!s){r.disable();return}r.enable(Ie(e.get("roam"),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:n,isInClip:function(f,h,v){return!a||a.contain(h,v)}}});function c(f){var h=e.mainType,v=HE(Ue({type:m$(h,e.subType,J6)},f));l&&(v.componentType=h),v[h+"Id"]=e.id,t.dispatchAction(v)}r.off("pan").off("zoom").on("pan",function(f){i&&i("pan"),c({dx:f.dx,dy:f.dy})}).on("zoom",function(f){i&&i("zoom"),c({zoom:f.scale,originX:f.originX,originY:f.originY})})}function g$(e){return function(t,r,n){return OA.copy(e.getBoundingRect()),OA.applyTransform(e.getComputedTransform()),OA.contain(r,n)}}var OA=new Fe(0,0,0,0);function XN(e,t,r){var n=m$(t,r,J6);e.registerAction({type:n,event:n,update:"none"},function(a,i,o){i.eachComponent(TE(a,t,r),function(l){f$(a,l),h$(a,l,i,o)})})}function m$(e,t,r){return(e!==Do?e:t==="map"?"geo":t)+r}function y$(e){return e.zoom!=null}function ZN(e,t,r,n,a,i,o){var l=new X_(null,v$(e.ecModel,t));return Z_(l,r,n,a,i),o?Nb(l,o.x,o.y,o.width,o.height):Nb(l,r,n,a,i),$N(l,e),l}var KN=["rect","circle","line","ellipse","polygon","polyline","path"],j0e=Le(KN),B0e=Le(KN.concat(["g"])),z0e=Le(KN.concat(["g"])),x$=it();function mx(e){var t=e.getItemStyle(),r=e.get("areaColor");return r!=null&&(t.fill=r),t}function mV(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var S$=(function(){function e(t){var r=this.group=new ze,n=this._transformGroup=new ze;r.add(n),this.uid=uf("ec_map_draw"),this._controller=new pf(t.getZr()),n.add(this._regionsGroup=new ze),n.add(this._svgGroup=new ze)}return e.prototype.draw=function(t,r,n,a,i){var o=this,l=t.getData&&t.getData();Jh(t)&&r.eachComponent({mainType:"series",subType:"map"},function(y){!l&&y.getHostGeoModel()===t&&(l=y.getData())});var s=t.coordinateSystem,c=s.view,f=this._regionsGroup,h=this._transformGroup,v=!f.childAt(0)||i,p;s.shouldClip()?(p=UN(null,c),this.group.setClipPath(new at({shape:p.clone()}))):this.group.removeClipPath(),Gs(h,Wc,c,v?null:t);var m=l&&l.getVisual("visualMeta")&&l.getVisual("visualMeta").length>0;s.resourceType==="geoJSON"?this._buildGeoJSON(c,n,s,t,l,m):s.resourceType==="geoSVG"&&this._buildSVG(c,n,s,t,l,m),K_(t,n,this._controller,function(y,x,b){return t.coordinateSystem.containPoint([x,b])},p,function(){o._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(t,f,n,a)},e.prototype.__updateOnOwnRoam=function(t){Gs(this._transformGroup,Wc,t.coordinateSystem.view,null)},e.prototype._buildGeoJSON=function(t,r,n,a,i,o){var l=this._regionsGroupByName=Le(),s=Le(),c=this._regionsGroup,f=n.projection,h=f&&f.stream,v=zs(nm(null,t,$c));function p(x,b){return b&&(x=b(x)),x&&mr([],x,v)}function m(x){for(var b=[],w=!h&&f&&f.project,C=0;C<x.length;++C){var A=p(x[C],w);A&&b.push(A)}return b}function y(x){return{shape:{points:m(x)}}}c.removeAll(),B(n.regions,function(x){var b=x.name,w=l.get(b),C=s.get(b)||{},A=C.dataIdx,M=C.regionModel;if(!w){w=l.set(b,new ze),c.add(w),A=i?i.indexOfName(b):null,M=Jh(a)?a.getRegionModel(b):i?i.getItemModel(A):null;var R=M.get("silent",!0);R!=null&&(w.silent=R),s.set(b,{dataIdx:A,regionModel:M})}var E=[],N=[];B(x.geometries,function(I){if(I.type==="polygon"){var z=[I.exterior].concat(I.interiors||[]);h&&(z=wV(z,h)),B(z,function(Y){E.push(new Xn(y(Y)))})}else{var V=I.points;h&&(V=wV(V,h,!0)),B(V,function(Y){N.push(new On(y(Y)))})}});var L=p(x.getCenter(),f&&f.project);function O(I,z){if(I.length){var V=new Nm({culling:!0,segmentIgnoreThreshold:1,shape:{paths:I}});w.add(V),yV(r,i,o,V,A,M),xV(a,i,V,b,M,A,L),z&&(mV(V),B(V.states,mV))}}O(E),O(N,!0)}),l.each(function(x,b){var w=s.get(b),C=w.dataIdx,A=w.regionModel;SV(a,i,x,b,A,C),bV(a,i,x,b,A),_V(a,x,b,A)},this)},e.prototype._buildSVG=function(t,r,n,a,i,o){var l=n.map;nm(this._svgGroup,t,$c),this._svgResourceChanged(l)&&(this._freeSVG(),this._useSVG(l));var s=this._svgDispatcherMap=Le(),c=!1;B(this._svgGraphicRecord.named,function(f){var h=f.name,v=f.svgNodeTagLower,p=f.el,m=i?i.indexOfName(h):null,y=a.getRegionModel(h);j0e.get(v)!=null&&p instanceof Ni&&yV(r,i,o,p,m,y),p instanceof Ni&&(p.culling=!0);var x=y.get("silent",!0);if(x!=null&&(p.silent=x),p.z2EmphasisLift=0,!f.namedFrom&&(z0e.get(v)!=null&&xV(a,i,p,h,y,m,null),SV(a,i,p,h,y,m),bV(a,i,p,h,y),B0e.get(v)!=null)){var b=_V(a,p,h,y);b==="self"&&(c=!0);var w=s.get(h)||s.set(h,[]);w.push(p)}},this),this._enableBlurEntireSVG(c,a)},e.prototype._enableBlurEntireSVG=function(t,r){if(t&&Jh(r)){var n=r.getModel(["blur","itemStyle"]).getItemStyle(),a=n.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){kc(i);var o=i.ensureState("blur").style||{};o.opacity==null&&a!=null&&(o.opacity=a),i.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.disable()},e.prototype.findHighDownDispatchers=function(t,r){if(t==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var a=this._regionsGroupByName;if(a){var i=a.get(t);return i?[i]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},e.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},e.prototype._useSVG=function(t){var r=Ml.getGeoResource(t);if(r&&r.type==="geoSVG"){var n=r.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=t}},e.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var r=Ml.getGeoResource(t);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var r=t.getTextContent();r&&(r.ignore=x$(r).ignore)})},e.prototype._updateMapSelectHandler=function(t,r,n,a){var i=this;r.off("mousedown"),r.off("click"),t.get("selectedMode")&&(r.on("mousedown",function(){i._mouseDownFlag=!0}),r.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},e})();function yV(e,t,r,n,a,i){var o=i.getModel("itemStyle"),l=i.getModel(["emphasis","itemStyle"]),s=i.getModel(["blur","itemStyle"]),c=i.getModel(["select","itemStyle"]),f=mx(o),h=mx(l),v=mx(c),p=mx(s);if(t){var m=t.getItemVisual(a,"style"),y=t.getItemVisual(a,"decal");r&&m.fill&&(f.fill=m.fill),y&&(f.decal=vd(y,e))}n.setStyle(f),n.style.strokeNoScale=!0,n.ensureState("emphasis").style=h,n.ensureState("select").style=v,n.ensureState("blur").style=p,kc(n)}function xV(e,t,r,n,a,i,o){var l=t&&isNaN(t.get(t.mapDimension("value"),i)),s=t&&t.getItemLayout(i);if(Jh(e)||l||s&&s.showLabel){var c=Jh(e)?n:i,f=void 0;(!t||i>=0)&&(f=e);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Wr(r,Br(a),{labelFetcher:f,labelDataIndex:c,defaultText:n},h);var v=r.getTextContent();if(v&&(x$(v).ignore=v.ignore,r.textConfig&&o)){var p=r.getBoundingRect().clone();r.textConfig.layoutRect=p,r.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}r.disableLabelAnimation=!0}else r.removeTextContent(),r.removeTextConfig(),r.disableLabelAnimation=null}function SV(e,t,r,n,a,i){t?t.setItemGraphicEl(i,r):$e(r).eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:n,region:a&&a.option||{}}}function bV(e,t,r,n,a){t||Nl({el:r,componentModel:e,itemName:n,itemTooltipOption:a.get("tooltip")})}function _V(e,t,r,n){t.highDownSilentOnTouch=!!e.get("selectedMode");var a=n.getModel("emphasis"),i=a.get("focus");return er(t,i,a.get("blurScope"),a.get("disabled")),Jh(e)&&Mce(t,e,r),i}function wV(e,t,r){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var l=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(s,c){isFinite(s)&&isFinite(c)&&a.push([s,c])},sphere:function(){}});return!r&&l.polygonStart(),B(e,function(s){l.lineStart();for(var c=0;c<s.length;c++)l.point(s[c][0],s[c][1]);l.lineEnd()}),!r&&l.polygonEnd(),n}function Jh(e){return e.mainType==="geo"}var qc="map",V0e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.getTooltipPosition=function(n){if(n!=null){var a=this.getData().getName(n),i=this.coordinateSystem,o=i.getRegion(a);return o&&i.dataToPoint(o.getCenter())}},r}return t.prototype.getInitialData=function(r){for(var n=Jd(this,{coordDimensions:["value"],encodeDefaulter:et(oN,this)}),a=Le(),i=[],o=0,l=n.count();o<l;o++){var s=n.getName(o);a.set(s,o)}var c=Ml.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return B(c.regions,function(f){var h=f.name,v=a.get(h),p=f.properties&&f.properties.echartsStyle,m;v==null?(m={name:h},i.push(m)):m=n.getRawDataItem(v),p&&Je(m,p)}),n.appendData(i),n},t.prototype.getHostGeoModel=function(){if(X8(this).kind!==q8)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(r){var n=this.getData();return n.get(n.mapDimension("value"),r)},t.prototype.getRegionModel=function(r){var n=this.getData();return n.getItemModel(n.indexOfName(r))},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.getRawValue(r),l=i.getName(r),s=[];return B(this.seriesGroup.f,function(c){var f=c.originalData.indexOfName(l),h=i.mapDimension("value");isNaN(c.originalData.get(h,f))||s.push(c.name)}),Rr("section",{header:s.join(", "),noHeader:!s.length,blocks:[Rr("nameValue",{name:l,value:o})]})},t.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",a=wr(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return a.setStyle(r.itemStyle),a.style.stroke="none",n.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill=re.color.neutral00,a.style.lineWidth=2),a},t.prototype.__ownRoamView=function(){return Ib(this)?this.coordinateSystem.view:null},t.type="series."+qc,t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:re.color.tertiary},itemStyle:{borderWidth:.5,borderColor:re.color.border,areaColor:re.color.background},emphasis:{label:{show:!0,color:re.color.primary},itemStyle:{areaColor:re.color.highlight}},select:{label:{show:!0,color:re.color.primary},itemStyle:{color:re.color.highlight}},nameProperty:"name"},t})(Pt);function b$(e){return e.indexOf("i")===0}function Ib(e){return am(e.seriesGroup)===e&&!e.getHostGeoModel()}function am(e){return e.f[0]}function QN(e,t){var r={};return e.eachRawSeriesByType(qc,function(n){var a=n.getHostGeoModel(),i=a?"o"+a.id:"i"+n.getMapType(),o=r[i]=r[i]||{f:[],r:[]};!e.isSeriesFiltered(n)&&!t&&o.f.push(n),o.r.push(n)}),r}var F0e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=qc,r}return t.prototype.render=function(r,n,a,i){if(!(i&&i.type==="mapToggleSelect"&&i.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){var l=this._mapDraw;l&&i&&i.type==="geoRoam"&&l.resetForLabelLayout(),i&&i.type==="geoRoam"&&i.componentType==="series"&&i.seriesId===r.id?l&&o.add(l.group):Ib(r)?(l=l||(this._mapDraw=new S$(a)),o.add(l.group),l.draw(r,n,a,this,i)):this._clearMapDraw(),r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r)}}},t.prototype.__updateOnOwnRoam=function(r,n,a){var i=this._mapDraw;Ib(n)&&i&&i.__updateOnOwnRoam(n)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(r){var n=r.originalData,a=this.group;n.each(n.mapDimension("value"),function(i,o){if(!isNaN(i)){var l=n.getItemLayout(o);if(!(!l||!l.point)){var s=l.point,c=l.offset,f=new Io({style:{fill:r.getData().getVisual("style").fill},shape:{cx:s[0]+c*9,cy:s[1],r:3},silent:!0,z2:8+(c?0:jd+1)});if(!c){var h=am(r.seriesGroup).getData(),v=n.getName(o),p=h.indexOfName(v),m=n.getItemModel(o),y=m.getModel("label"),x=h.getItemGraphicEl(p);Wr(f,Br(m),{labelFetcher:{getFormattedLabel:function(b,w){return r.getFormattedLabel(p,w)}},defaultText:v}),f.disableLabelAnimation=!0,y.get("position")||f.setTextConfig({position:"bottom"}),x.onHoverStateChange=function(b){KS(f,b)}}a.add(f)}}})},t.type=qc,t})(It),G0e={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},_$=["lng","lat"],CV=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;i.dimensions=_$,i.type="geo",i._nameCoordMap=Le(),i.name=r;var o=a.projection,l=Ml.load(n,a.nameMap,a.nameProperty),s=Ml.getGeoResource(n);i.resourceType=s?s.type:null;var c=i.regions=l.regions,f=G0e[s.type];i._clip=a.clip;var h=o?!1:f.invertLongitute;i.view=new X_(h,v$(a.ecModel,a.api),i),i.map=n,i._regionsMap=l.regionsMap,i.regions=l.regions,i.projection=o;var v;if(o)for(var p=0;p<c.length;p++){var m=c[p].getBoundingRect(o);v=v||m.clone(),v.union(m)}else v=l.boundingRect;return Z_(i.view,v.x,v.y,v.width,v.height),i.aspectScale=o?1:Ie(a.aspectScale,f.aspectScale),i}return t.prototype.getRegion=function(r){return this._regionsMap.get(r)},t.prototype.getRegionByCoord=function(r){for(var n=this.regions,a=0;a<n.length;a++){var i=n[a];if(i.type==="geoJSON"&&i.contain(r))return n[a]}},t.prototype.addGeoCoord=function(r,n){this._nameCoordMap.set(r,n)},t.prototype.getGeoCoord=function(r){var n=this._regionsMap.get(r);return this._nameCoordMap.get(r)||n&&n.getCenter()},t.prototype.dataToPoint=function(r,n,a){if(De(r)&&(r=this.getGeoCoord(r)),r){var i=this.projection;return i&&(r=i.project(r)),r&&this.view.dataToPoint(r,n,a)}},t.prototype.pointToData=function(r,n,a){var i=this.projection;return i&&(r=i.unproject(r)),r&&this.view.pointToData(r,a)},t.prototype.convertToPixel=function(r,n,a){var i=TV(n);return i===this?i.dataToPoint(a):null},t.prototype.convertFromPixel=function(r,n,a){var i=TV(n);return i===this?i.pointToData(a):null},t.prototype.containPoint=function(r){return this.view.containPoint(r)},t.prototype.getArea=function(r){r=r||0;var n=UN(null,this.view);return n.x-=r,n.y-=r,n.width+=2*r,n.height+=2*r,n},t.prototype.shouldClip=function(){return this._clip},t.prototype.getBoundingRect=function(){return this.view.getBoundingRect()},t.prototype.getViewRect=function(){return this.view.getViewRect()},t.prototype.getRoamTransform=function(){return this.view.getRoamTransform()},t})(Ks);function TV(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",dr).models[0]||{}).coordinateSystem:null}function AV(e,t){var r=this.view,n=e.get("boundingCoords");if(n!=null){var a=n[0],i=n[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])){var o=this.projection;if(o){var l=a[0],s=a[1],c=i[0],f=i[1];a=[1/0,1/0],i=[-1/0,-1/0];var h=function(R,E,N,L){for(var O=N-R,I=L-E,z=0;z<=100;z++){var V=z/100,Y=o.project([R+O*V,E+I*V]);ul(a,a,Y),cl(i,i,Y)}};h(l,s,c,s),h(c,s,c,f),h(c,f,l,f),h(l,f,c,s)}Z_(r,a[0],a[1],i[0]-a[0],i[1]-a[1])}}var v=r.getBoundingRect(),p=e.get("layoutCenter"),m=e.get("layoutSize"),y=Vr(e,t).refContainer,x=v.width/v.height*this.aspectScale,b=!1,w,C;p&&m&&(w=[Re(p[0],y.width)+y.x,Re(p[1],y.height)+y.y],C=Re(m,Math.min(y.width,y.height)),!isNaN(w[0])&&!isNaN(w[1])&&!isNaN(C)&&(b=!0));var A;if(b)A={},x>1?(A.width=C,A.height=C/x):(A.height=C,A.width=C*x),A.y=w[1]-A.height/2,A.x=w[0]-A.width/2;else{var M=e.getBoxLayoutParams();M.aspect=x,A=Qt(M,y),A=e7(e,A,x)}Nb(r,A.x,A.y,A.width,A.height),$N(r,e)}function H0e(e,t){B(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var U0e=(function(){function e(){this.dimensions=_$}return e.prototype.create=function(t,r){var n=[];function a(i){return{nameProperty:i.get("nameProperty"),aspectScale:i.get("aspectScale"),projection:i.get("projection"),clip:i.getShallow("clip",!0)}}return t.eachComponent("geo",function(i,o){var l=i.get("map"),s=new CV(l+o,l,he({nameMap:i.get("nameMap"),api:r,ecModel:t},a(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=AV,s.resize(i,r)}),t.eachSeries(function(i){km({targetModel:i,coordSysType:"geo",coordSysProvider:function(){var o=i.subType===qc?i.getHostGeoModel():i.getReferringComponents("geo",dr).models[0];return o&&o.coordinateSystem},allowNotFound:!0})}),B(QN(t,!0),function(i,o){if(b$(o)){var l=i.r[0],s=[];B(i.r,function(v){s.push(v.get("nameMap")),v.seriesGroup=null});var c=o.slice(1),f=new CV(c,c,he({nameMap:h_(s),api:r,ecModel:t},a(l))),h;B(i.r,function(v){h=Ie(h,v.get("scaleLimit"))}),n.push(f),f.resize=AV,f.resize(l,r),B(i.r,function(v){v.coordinateSystem=f,H0e(f,v)})}}),n},e.prototype.getFilledRegions=function(t,r,n,a){for(var i=(t||[]).slice(),o=Le(),l=0;l<i.length;l++)o.set(i[l].name,i[l]);var s=Ml.load(r,n,a);return B(s.regions,function(c){var f=c.name,h=o.get(f),v=c.properties&&c.properties.echartsStyle;h||(h={name:f},i.push(h)),v&&Je(h,v)}),i},e})(),w$=new U0e,Y0e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a);var i=Ml.getGeoResource(r.map);if(i&&i.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||re.color.backgroundTint)}Lc(r,"label",["show"])},t.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=w$.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var a={};this._optionModelMap=ii(n.regions||[],function(i,o){var l=o.name;return l&&(i.set(l,new ct(o,r,r.ecModel)),o.selected&&(a[l]=!0)),i},Le()),n.selectedMap||(n.selectedMap=a)},t.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new ct(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(r,n){var a=this.getRegionModel(r),i=n==="normal"?a.get(["label","formatter"]):a.get(["emphasis","label","formatter"]),o={name:r};if(Be(i))return o.status=n,i(o);if(De(i))return i.replace("{a}",r??"")},t.prototype.select=function(r){var n=this.option,a=n.selectedMode;if(a){a!=="multiple"&&(n.selectedMap=null);var i=n.selectedMap||(n.selectedMap={});i[r]=!0}},t.prototype.unSelect=function(r){var n=this.option.selectedMap;n&&(n[r]=!1)},t.prototype.toggleSelected=function(r){this[this.isSelected(r)?"unSelect":"select"](r)},t.prototype.isSelected=function(r){var n=this.option.selectedMap;return!!(n&&n[r])},t.prototype.__ownRoamView=function(){return this.coordinateSystem.view},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:re.color.tertiary},itemStyle:{borderWidth:.5,borderColor:re.color.border},emphasis:{label:{show:!0,color:re.color.primary},itemStyle:{color:re.color.highlight}},select:{label:{show:!0,color:re.color.primary},itemStyle:{color:re.color.highlight}},regions:[]},t})(lt),$0e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.focusBlurEnabled=!0,r}return t.prototype.init=function(r,n){this._api=n},t.prototype.render=function(r,n,a,i){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new S$(a));var o=this._mapDraw;o.draw(r,n,a,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,a)},t.prototype.__updateOnOwnRoam=function(r,n,a){var i=this._mapDraw;i&&i.__updateOnOwnRoam(n)},t.prototype._handleRegionClick=function(r){var n;mc(r.target,function(a){return(n=$e(a).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(r,n,a){var i=this;this._mapDraw.group.traverse(function(o){var l=$e(o).eventData;if(l)return i._model.isSelected(l.name)?a.enterSelect(o):a.leaveSelect(o),!0})},t.prototype.findHighDownDispatchers=function(r){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(r,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t})(Ht);function W0e(e,t,r){Ml.registerMap(e,t,r)}function C$(e){e.registerCoordinateSystem("geo",w$),e.registerComponentModel(Y0e),e.registerComponentView($0e),e.registerImpl("registerMap",W0e),e.registerImpl("getMap",function(r){return Ml.getMapForUser(r)});function t(r,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(a,i){var o={},l=[];return i.eachComponent({mainType:"geo",query:a},function(s){s[r](a.name);var c=s.coordinateSystem;B(c.regions,function(h){o[h.name]=s.isSelected(h.name)||!1});var f=[];B(o,function(h,v){o[v]&&f.push(v)}),l.push({geoIndex:s.componentIndex,name:f})}),{selected:o,allSelected:l,name:a.name}})}t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(r,n,a){var i=r.componentType||(r.geoId!=null||r.geoName!=null||r.geoIndex!=null?"geo":Do),o=i===Do;if(!(i!=="geo"&&!o)){var l=o?"map":null;n.eachComponent(TE(r,i,l),function(s){o&&!Ib(s)||(f$(r,s,o?s.seriesGroup.r:null),h$(r,s,n,a))})}})}var q0e=zr(qc,X0e);function X0e(e){B(QN(e),function(t,r){if(!(!am(t)||!b$(r))){var n={};B(t.f,function(i){var o=i.coordinateSystem,l=i.originalData;i.get("showLegendSymbol")&&e.getComponent("legend")&&l.each(l.mapDimension("value"),function(s,c){var f=l.getName(c),h=o.getRegion(f);if(!(!h||isNaN(s))){var v=n[f]||0,p=o.dataToPoint(h.getCenter());n[f]=v+1,l.setItemLayout(c,{point:p,offset:v})}})});var a=am(t).getData();a.each(function(i){var o=a.getName(i),l=a.getItemLayout(i)||{};l.showLabel=!n[o],a.setItemLayout(i,l)})}})}function Z0e(e,t){var r={};return B(e,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);r[o]=r[o]||[],isNaN(a)||r[o].push(a)})}),e[0].map(e[0].mapDimension("value"),function(n,a){for(var i="ec-"+e[0].getName(a),o=0,l=1/0,s=-1/0,c=r[i].length,f=0;f<c;f++)l=Math.min(l,r[i][f]),s=Math.max(s,r[i][f]),o+=r[i][f];var h;return t==="min"?h=l:t==="max"?h=s:t==="average"?h=o/c:h=o,c===0?NaN:h})}var K0e=zr(qc,Q0e);function Q0e(e){B(QN(e),function(t){var r=am(t);if(r){var n=Z0e(xe(t.f,function(a){return a.getData()}),r.get("mapValueCalculation"));B(t.f,function(a){a.seriesGroup=t,a.originalData=a.getData(),a.setData(n.cloneShallow())})}})}function J0e(e){qr(C$),e.registerChartView(F0e),e.registerSeriesModel(V0e),e.registerLayout(q0e),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,K0e),U7("map",e.registerAction)}function exe(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var r=[t],n,a;n=r.pop();)if(a=n.children,n.isExpand&&a.length)for(var i=a.length,o=i-1;o>=0;o--){var l=a[o];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(l)}}function txe(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,a=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){nxe(e);var i=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;a?(e.hierNode.prelim=a.hierNode.prelim+t(e,a),e.hierNode.modifier=e.hierNode.prelim-i):e.hierNode.prelim=i}else a&&(e.hierNode.prelim=a.hierNode.prelim+t(e,a));e.parentNode.hierNode.defaultAncestor=axe(e,a,e.parentNode.hierNode.defaultAncestor||n[0],t)}function rxe(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function DV(e){return arguments.length?e:lxe}function qp(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function nxe(e){for(var t=e.children,r=t.length,n=0,a=0;--r>=0;){var i=t[r];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function axe(e,t,r,n){if(t){for(var a=e,i=e,o=i.parentNode.children[0],l=t,s=a.hierNode.modifier,c=i.hierNode.modifier,f=o.hierNode.modifier,h=l.hierNode.modifier;l=kA(l),i=PA(i),l&&i;){a=kA(a),o=PA(o),a.hierNode.ancestor=e;var v=l.hierNode.prelim+h-i.hierNode.prelim-c+n(l,i);v>0&&(oxe(ixe(l,e,r),e,v),c+=v,s+=v),h+=l.hierNode.modifier,c+=i.hierNode.modifier,s+=a.hierNode.modifier,f+=o.hierNode.modifier}l&&!kA(a)&&(a.hierNode.thread=l,a.hierNode.modifier+=h-s),i&&!PA(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=c-f,r=e)}return r}function kA(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function PA(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function ixe(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function oxe(e,t,r){var n=r/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=r,t.hierNode.modifier+=r,t.hierNode.prelim+=r,e.hierNode.change+=n}function lxe(e,t){return e.parentNode===t.parentNode?1:2}var ni=it();function T$(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,A$(t,r,e),B(r,function(n){B(t.TRANSFERABLE_METHODS,function(a){n.wrapMethod(a,et(sxe,e))})}),t.wrapMethod("cloneShallow",et(cxe,e)),B(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,et(uxe,e))}),In(r[t.dataType]===t)}function sxe(e,t){if(dxe(this)){var r=he({},ni(this).datas);r[this.dataType]=t,A$(t,r,e)}else JN(t,this.dataType,ni(this).mainData,e);return t}function uxe(e,t){return e.struct&&e.struct.update(),t}function cxe(e,t){return B(ni(t).datas,function(r,n){r!==t&&JN(r.cloneShallow(),n,t,e)}),t}function fxe(e){var t=ni(this).mainData;return e==null||t==null?t:ni(t).datas[e]}function hxe(){var e=ni(this).mainData;return e==null?[{data:e}]:xe(dt(ni(e).datas),function(t){return{type:t,data:ni(e).datas[t]}})}function dxe(e){return ni(e).mainData===e}function A$(e,t,r){ni(e).datas={},B(t,function(n,a){JN(n,a,e,r)})}function JN(e,t,r,n){ni(r).datas[t]=e,ni(e).mainData=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=fxe,e.getLinkedDataAll=hxe}var vxe=(function(){function e(t,r){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=r}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(t,r,n){Be(t)&&(n=r,r=t,t=null),t=t||{},De(t)&&(t={order:t});var a=t.order||"preorder",i=this[t.attr||"children"],o;a==="preorder"&&(o=r.call(n,this));for(var l=0;!o&&l<i.length;l++)i[l].eachNode(t,r,n);a==="postorder"&&r.call(n,this)},e.prototype.updateDepthAndHeight=function(t){var r=0;this.depth=t;for(var n=0;n<this.children.length;n++){var a=this.children[n];a.updateDepthAndHeight(t+1),a.height>r&&(r=a.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,a=n.length;r<a;r++){var i=n[r].getNodeById(t);if(i)return i}},e.prototype.contains=function(t){if(t===this)return!0;for(var r=0,n=this.children,a=n.length;r<a;r++){var i=n[r].contains(t);if(i)return i}},e.prototype.getAncestors=function(t){for(var r=[],n=t?this:this.parentNode;n;)r.push(n),n=n.parentNode;return r.reverse(),r},e.prototype.getAncestorsIndices=function(){for(var t=[],r=this;r;)t.push(r.dataIndex),r=r.parentNode;return t.reverse(),t},e.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(r){t.push(r.dataIndex)}),t},e.prototype.getValue=function(t){var r=this.hostTree.data;return r.getStore().get(r.getDimensionIndex(t||"value"),this.dataIndex)},e.prototype.setLayout=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,r)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(t,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,r)},e.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,r=0;r<t.length;++r)if(t[r]===this)return r;return-1}return-1},e.prototype.isAncestorOf=function(t){for(var r=t.parentNode;r;){if(r===this)return!0;r=r.parentNode}return!1},e.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},e})(),eL=(function(){function e(t){this.type="tree",this._nodes=[],this.hostModel=t}return e.prototype.eachNode=function(t,r,n){this.root.eachNode(t,r,n)},e.prototype.getNodeByDataIndex=function(t){var r=this.data.getRawIndex(t);return this._nodes[r]},e.prototype.getNodeById=function(t){return this.root.getNodeById(t)},e.prototype.update=function(){for(var t=this.data,r=this._nodes,n=0,a=r.length;n<a;n++)r[n].dataIndex=-1;for(var n=0,a=t.count();n<a;n++)r[t.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,n){var a=new e(r),i=[],o=1;l(t);function l(f,h){var v=f.value;o=Math.max(o,pe(v)?v.length:1),i.push(f);var p=new vxe(kr(f.name,""),a);h?pxe(p,h):a.root=p,a._nodes.push(p);var m=f.children;if(m)for(var y=0;y<m.length;y++)l(m[y],p)}a.root.updateDepthAndHeight(0);var s=qd(i,{coordDimensions:["value"],dimensionsCount:o}).dimensions,c=new Ln(s,r);return c.initData(i),n&&n(c),T$({mainData:c,struct:a,structAttr:"tree"}),a.update(),a},e})();function pxe(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}function im(e,t,r){if(e&&qe(t,e.type)>=0){var n=r.getData().tree.root,a=e.targetNode;if(De(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=e.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function D$(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function tL(e,t){var r=D$(e);return qe(r,t)>=0}function Q_(e,t){for(var r=[];e;){var n=e.dataIndex;r.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return r.reverse(),r}var Xc="tree",gxe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},a=r.leaves||{},i=new ct(a,this,this.ecModel),o=eL.createTree(n,this,l);function l(h){h.wrapMethod("getItemModel",function(v,p){var m=o.getNodeByDataIndex(p);return m&&m.children.length&&m.isExpand||(v.parentModel=i),v})}var s=0;o.eachNode("preorder",function(h){h.depth>s&&(s=h.depth)});var c=r.expandAndCollapse,f=c&&r.initialTreeDepth>=0?r.initialTreeDepth:s;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.formatTooltip=function(r,n,a){for(var i=this.getData().tree,o=i.root.children[0],l=i.getNodeByDataIndex(r),s=l.getValue(),c=l.name;l&&l!==o;)c=l.parentNode.name+"."+c,l=l.parentNode;return Rr("nameValue",{name:c,value:s,noValue:isNaN(s)||s==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=Q_(a,this),n.collapsed=!a.isExpand,n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+Xc,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:re.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(Pt),mxe=(function(){function e(){this.parentPoint=[],this.childPoints=[]}return e})(),yxe=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:re.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new mxe},t.prototype.buildPath=function(r,n){var a=n.childPoints,i=a.length,o=n.parentPoint,l=a[0],s=a[i-1];if(i===1){r.moveTo(o[0],o[1]),r.lineTo(l[0],l[1]);return}var c=n.orient,f=c==="TB"||c==="BT"?0:1,h=1-f,v=Re(n.forkPosition,1),p=[];p[f]=o[f],p[h]=o[h]+(s[h]-o[h])*v,r.moveTo(o[0],o[1]),r.lineTo(p[0],p[1]),r.moveTo(l[0],l[1]),p[f]=l[f],r.lineTo(p[0],p[1]),p[f]=s[f],r.lineTo(p[0],p[1]),r.lineTo(s[0],s[1]);for(var m=1;m<i-1;m++){var y=a[m];r.moveTo(y[0],y[1]),p[f]=y[f],r.lineTo(p[0],p[1])}},t})(yt),xxe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Xc,r._mainGroup=new ze,r}return t.prototype.init=function(r,n){this._controller=new pf(n.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(r,n,a){var i=r.getData(),o=r.layoutInfo,l=this._mainGroup,s=r.get("layout");s==="radial"?(l.x=o.x+o.width/2,l.y=o.y+o.height/2):(l.x=o.x,l.y=o.y),this._updateViewCoordSys(r,a),K_(r,a,this._controller,g$(this.group),null);var c=this._data;i.diff(c).add(function(f){MV(i,f)&&RV(i,f,null,l,r)}).update(function(f,h){var v=c.getItemGraphicEl(h);if(!MV(i,f)){v&&NV(c,h,v,l,r);return}RV(i,f,v,l,r)}).remove(function(f){var h=c.getItemGraphicEl(f);h&&NV(c,f,h,l,r)}).execute(),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&i.eachItemGraphicEl(function(f,h){f.off("click").on("click",function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:h})})}),this._data=i,this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(r,n,a){Gs(this.group,Eo,n.coordinateSystem,null),y$(r)&&this._updateNodeAndLinkScale(n)},t.prototype._updateViewCoordSys=function(r,n){var a=r.getData(),i=[];a.each(function(h){var v=a.getItemLayout(h);v&&!isNaN(v.x)&&!isNaN(v.y)&&i.push([+v.x,+v.y])});var o=[],l=[];U6(i,o,l);var s=this._min,c=this._max;l[0]-o[0]===0&&(o[0]=s?s[0]:o[0]-1,l[0]=c?c[0]:l[0]+1),l[1]-o[1]===0&&(o[1]=s?s[1]:o[1]-1,l[1]=c?c[1]:l[1]+1);var f=r.coordinateSystem=ZN(r,n,o[0],o[1],l[0]-o[0],l[1]-o[1]);Gs(this.group,Eo,f,this._firstRender?null:r),this._min=o,this._max=l},t.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),a=p$(r.coordinateSystem,r);n.eachItemGraphicEl(function(i,o){i.setSymbolScale(a)})},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type=Xc,t})(It);function MV(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function RV(e,t,r,n,a){var i=!r,o=e.tree.getNodeByDataIndex(t),l=o.getModel(),s=o.getVisual("style").fill,c=o.isExpand===!1&&o.children.length!==0?s:re.color.neutral00,f=e.tree.root,h=o.parentNode===f?o:o.parentNode||o,v=e.getItemGraphicEl(h.dataIndex),p=h.getLayout(),m=v?{x:v.__oldX,y:v.__oldY,rawX:v.__radialOldRawX,rawY:v.__radialOldRawY}:p,y=o.getLayout();i?(r=new Vm(e,t,null,{symbolInnerColor:c,useNameLabel:!0}),r.x=m.x,r.y=m.y):r.updateData(e,t,null,{symbolInnerColor:c,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=y.rawX,r.__radialRawY=y.rawY,n.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,_t(r,{x:y.x,y:y.y},a);var x=r.getSymbolPath();if(a.get("layout")==="radial"){var b=f.children[0],w=b.getLayout(),C=b.children.length,A=void 0,M=void 0;if(y.x===w.x&&o.isExpand===!0&&b.children.length){var R={x:(b.children[0].getLayout().x+b.children[C-1].getLayout().x)/2,y:(b.children[0].getLayout().y+b.children[C-1].getLayout().y)/2};A=Math.atan2(R.y-w.y,R.x-w.x),A<0&&(A=Math.PI*2+A),M=R.x<w.x,M&&(A=A-Math.PI)}else A=Math.atan2(y.y-w.y,y.x-w.x),A<0&&(A=Math.PI*2+A),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(M=y.x<w.x,M&&(A=A-Math.PI)):(M=y.x>w.x,M||(A=A-Math.PI));var E=M?"left":"right",N=l.getModel("label"),L=N.get("rotate"),O=L*(Math.PI/180),I=x.getTextContent();I&&(x.setTextConfig({position:N.get("position")||E,rotation:L==null?-A:O,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=l.get(["emphasis","focus"]),V=z==="relative"?id(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;V&&($e(r).focus=V),Sxe(a,o,f,r,m,p,y,n),r.__edge&&(r.onHoverStateChange=function(Y){if(Y!=="blur"){var H=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);H&&H.hoverState===Mm||KS(r.__edge,Y)}})}function Sxe(e,t,r,n,a,i,o,l){var s=t.getModel(),c=e.get("edgeShape"),f=e.get("layout"),h=e.getOrient(),v=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),m=s.getModel("lineStyle").getLineStyle(),y=n.__edge;if(c==="curve")t.parentNode&&t.parentNode!==r&&(y||(y=n.__edge=new zd({shape:PR(f,h,v,a,a)})),_t(y,{shape:PR(f,h,v,i,o)},e));else if(c==="polyline"&&f==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var x=t.children,b=[],w=0;w<x.length;w++){var C=x[w].getLayout();b.push([C.x,C.y])}y||(y=n.__edge=new yxe({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:p}})),_t(y,{shape:{parentPoint:[o.x,o.y],childPoints:b}},e)}y&&!(c==="polyline"&&!t.isExpand)&&(y.useStyle(Ue({strokeNoScale:!0,fill:null},m)),jr(y,s,"lineStyle"),kc(y),l.add(y))}function EV(e,t,r,n,a){var i=t.tree.root,o=M$(i,e),l=o.source,s=o.sourceLayout,c=t.getItemGraphicEl(e.dataIndex);if(c){var f=t.getItemGraphicEl(l.dataIndex),h=f.__edge,v=c.__edge||(l.isExpand===!1||l.children.length===1?h:void 0),p=n.get("edgeShape"),m=n.get("layout"),y=n.get("orient"),x=n.get(["lineStyle","curveness"]);v&&(p==="curve"?Fs(v,{shape:PR(m,y,x,s,s),style:{opacity:0}},n,{cb:function(){r.remove(v)},removeOpt:a}):p==="polyline"&&n.get("layout")==="orthogonal"&&Fs(v,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},n,{cb:function(){r.remove(v)},removeOpt:a}))}}function M$(e,t){for(var r=t.parentNode===e?t:t.parentNode||t,n;n=r.getLayout(),n==null;)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function NV(e,t,r,n,a){var i=e.tree.getNodeByDataIndex(t),o=e.tree.root,l=M$(o,i).sourceLayout,s={duration:a.get("animationDurationUpdate"),easing:a.get("animationEasingUpdate")};Fs(r,{x:l.x+1,y:l.y+1},a,{cb:function(){n.remove(r),e.setItemGraphicEl(t,null)},removeOpt:s}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:s}),B(i.children,function(c){EV(c,e,n,a,s)}),EV(i,e,n,a,s)}function PR(e,t,r,n,a){var i,o,l,s,c,f,h,v;if(e==="radial"){c=n.rawX,h=n.rawY,f=a.rawX,v=a.rawY;var p=qp(c,h),m=qp(c,h+(v-h)*r),y=qp(f,v+(h-v)*r),x=qp(f,v);return{x1:p.x||0,y1:p.y||0,x2:x.x||0,y2:x.y||0,cpx1:m.x||0,cpy1:m.y||0,cpx2:y.x||0,cpy2:y.y||0}}else c=n.x,h=n.y,f=a.x,v=a.y,(t==="LR"||t==="RL")&&(i=c+(f-c)*r,o=h,l=f+(c-f)*r,s=v),(t==="TB"||t==="BT")&&(i=c,o=h+(v-h)*r,l=f,s=v+(h-v)*r);return{x1:c,y1:h,x2:f,y2:v,cpx1:i,cpy1:o,cpx2:l,cpy2:s}}function bxe(e,t,r){for(var n=[e],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var l=0;l<o.length;l++)n.push(o[l])}for(;i=a.pop();)t(i,r)}function Rp(e,t){for(var r=[e],n;n=r.pop();)if(t(n),n.isExpand){var a=n.children;if(a.length)for(var i=a.length-1;i>=0;i--)r.push(a[i])}}function _xe(e,t){e.eachSeriesByType("tree",function(r){wxe(r,t)})}function wxe(e,t){var r=Vr(e,t).refContainer,n=Qt(e.getBoxLayoutParams(),r);e.layoutInfo=n;var a=e.get("layout"),i=0,o=0,l=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,l=DV(function(A,M){return(A.parentNode===M.parentNode?1:2)/A.depth})):(i=n.width,o=n.height,l=DV());var s=e.getData().tree.root,c=s.children[0];if(c){exe(s),bxe(c,txe,l),s.hierNode.modifier=-c.hierNode.prelim,Rp(c,rxe);var f=c,h=c,v=c;Rp(c,function(A){var M=A.getLayout().x;M<f.getLayout().x&&(f=A),M>h.getLayout().x&&(h=A),A.depth>v.depth&&(v=A)});var p=f===h?1:l(f,h)/2,m=p-f.getLayout().x,y=0,x=0,b=0,w=0;if(a==="radial")y=i/(h.getLayout().x+p+m),x=o/(v.depth-1||1),Rp(c,function(A){b=(A.getLayout().x+m)*y,w=(A.depth-1)*x;var M=qp(b,w);A.setLayout({x:M.x,y:M.y,rawX:b,rawY:w},!0)});else{var C=e.getOrient();C==="RL"||C==="LR"?(x=o/(h.getLayout().x+p+m),y=i/(v.depth-1||1),Rp(c,function(A){w=(A.getLayout().x+m)*x,b=C==="LR"?(A.depth-1)*y:i-(A.depth-1)*y,A.setLayout({x:b,y:w},!0)})):(C==="TB"||C==="BT")&&(y=i/(h.getLayout().x+p+m),x=o/(v.depth-1||1),Rp(c,function(A){b=(A.getLayout().x+m)*y,w=C==="TB"?(A.depth-1)*x:o-(A.depth-1)*x,A.setLayout({x:b,y:w},!0)}))}}}function Cxe(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:Do,subType:Xc,query:t},function(n){var a=t.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),XN(e,Do,Xc)}var Txe=zr(Xc,Axe);function Axe(e){e.eachSeriesByType(Xc,function(t){var r=t.getData(),n=r.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),l=r.ensureUniqueItemVisual(a.dataIndex,"style");he(l,o)})})}function Dxe(e){e.registerChartView(xxe),e.registerSeriesModel(gxe),e.registerLayout(_xe),e.registerVisual(Txe),Cxe(e)}var LV=["treemapZoomToNode","treemapRender","treemapMove"];function Mxe(e){for(var t=0;t<LV.length;t++)e.registerAction({type:LV[t],update:"updateView"},ur);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},a);function a(i,o){var l=["treemapZoomToNode","treemapRootToNode"],s=im(r,l,i);if(s){var c=i.getViewRoot();c&&(r.direction=tL(c,s.node)?"rollUp":"drillDown"),i.resetViewRoot(s.node)}}})}function R$(e){var t=e.getData(),r=t.tree,n={};r.eachNode(function(a){for(var i=a;i&&i.depth>1;)i=i.parentNode;var o=uR(e.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var Rxe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventUsingHoverLayer=!0,r}return t.prototype.getInitialData=function(r,n){var a={name:r.name,children:r.data};E$(a);var i=r.levels||[],o=this.designatedVisualItemStyle={},l=new ct({itemStyle:o},this,n);i=r.levels=Exe(i,n);var s=xe(i||[],function(h){return new ct(h,l,n)},this),c=eL.createTree(a,this,f);function f(h){h.wrapMethod("getItemModel",function(v,p){var m=c.getNodeByDataIndex(p),y=m?s[m.depth]:null;return v.parentModel=y||l,v})}return c.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.getRawValue(r),l=i.getName(r);return Rr("nameValue",{name:l,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=Q_(a,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},he(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=Le(),this._idIndexMapCount=0);var a=n.get(r);return a==null&&n.set(r,a=this._idIndexMapCount++),a},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){R$(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:re.size.l,top:re.size.xxxl,right:re.size.l,bottom:re.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:re.size.m,emptyItemWidth:25,itemStyle:{color:re.color.backgroundShade,textStyle:{color:re.color.secondary}},emphasis:{itemStyle:{color:re.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:re.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:re.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t})(Pt);function E$(e){var t=0;B(e.children,function(n){E$(n);var a=n.value;pe(a)&&(a=a[0]),t+=a});var r=e.value;pe(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),pe(e.value)?e.value[0]=r:e.value=r}function Exe(e,t){var r=ar(t.get("color")),n=ar(t.get(["aria","decal","decals"]));if(r){e=e||[];var a,i;B(e,function(l){var s=new ct(l),c=s.get("color"),f=s.get("decal");(s.get(["itemStyle","color"])||c&&c!=="none")&&(a=!0),(s.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=e[0]||(e[0]={});return a||(o.color=r.slice()),!i&&n&&(o.decal=n.slice()),e}}var Nxe=8,IV=8,jA=5,Lxe=(function(){function e(t){this.group=new ze,t.add(this.group)}return e.prototype.render=function(t,r,n,a){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var l=i.getModel("itemStyle"),s=i.getModel("emphasis"),c=l.getModel("textStyle"),f=s.getModel(["itemStyle","textStyle"]),h=Vr(t,r).refContainer,v={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},p={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},m=Qt(v,h);this._prepare(n,p,c),this._renderContent(t,p,m,l,s,c,f,a),O_(o,v,h)}},e.prototype._prepare=function(t,r,n){for(var a=t;a;a=a.parentNode){var i=kr(a.getModel().get("name"),""),o=n.getTextRect(i),l=Math.max(o.width+Nxe*2,r.emptyItemWidth);r.totalWidth+=l+IV,r.renderList.push({node:a,text:i,width:l})}},e.prototype._renderContent=function(t,r,n,a,i,o,l,s){for(var c=0,f=r.emptyItemWidth,h=t.get(["breadcrumb","height"]),v=r.totalWidth,p=r.renderList,m=i.getModel("itemStyle").getItemStyle(),y=p.length-1;y>=0;y--){var x=p[y],b=x.node,w=x.width,C=x.text;v>n.width&&(v-=w-f,w=f,C=null);var A=new Xn({shape:{points:Ixe(c,0,w,h,y===p.length-1,y===0)},style:Ue(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new vt({style:Gt(o,{text:C})}),textConfig:{position:"inside"},z2:jd*1e4,onclick:et(s,b)});A.disableLabelAnimation=!0,A.getTextContent().ensureState("emphasis").style=Gt(l,{text:C}),A.ensureState("emphasis").style=m,er(A,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(A),Oxe(A,t,b),c+=w+IV}},e.prototype.remove=function(){this.group.removeAll()},e})();function Ixe(e,t,r,n,a,i){var o=[[a?e:e-jA,t],[e+r,t],[e+r,t+n],[a?e:e-jA,t+n]];return!i&&o.splice(2,0,[e+r+jA,t+n/2]),!a&&o.push([e,t+n/2]),o}function Oxe(e,t,r){$e(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Q_(r,t)}}var kxe=(function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,a,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:a,easing:i}),!0)},e.prototype.finished=function(t){return this._finishedCallback=t,this},e.prototype.start=function(){for(var t=this,r=this._storage.length,n=function(){r--,r<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},a=0,i=this._storage.length;a<i;a++){var o=this._storage[a];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e})();function Pxe(){return new kxe}var om=Math.max,Ob=Math.min,rL=B,N$=["itemStyle","borderWidth"],jxe=["itemStyle","gapWidth"],Bxe=["upperLabel","show"],zxe=["upperLabel","height"];const Vxe={seriesType:"treemap",reset:function(e,t,r,n){var a=e.option,i=Vr(e,r).refContainer,o=Qt(e.getBoxLayoutParams(),i),l=n&&n.type,s=["treemapZoomToNode","treemapRootToNode"],c=im(n,s,e),f=l==="treemapRender"||l==="treemapMove"?n.rootRect:null,h=e.getViewRoot(),v=D$(h);if(l!=="treemapMove"){var p=!1,m=l==="treemapZoomToNode"?(p=!0,$xe(e,c,h,o)):f?(p=!0,he({},f)):he({},o);if(p){var y=k$(o,m);y=P$(y,e),m.width=o.width*y,m.height=o.height*y}var x=a.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var b={squareRatio:a.squareRatio,sort:x,leafDepth:a.leafDepth};h.hostTree.clearLayouts();var w={x:0,y:0,width:m.width,height:m.height,area:m.width*m.height};h.setLayout(w),L$(h,b,!1,0),w=h.getLayout(),rL(v,function(A,M){var R=(v[M+1]||h).getValue();A.setLayout(he({dataExtent:[R,R],borderWidth:0,upperHeight:0},w))})}var C=e.getData().tree.root;C.setLayout(Wxe(o,f,c),!0),e.setLayoutInfo(o),I$(C,new Fe(-o.x,-o.y,r.getWidth(),r.getHeight()),v,h,0)}};function L$(e,t,r,n){var a,i;if(!e.isRemoved()){var o=e.getLayout();a=o.width,i=o.height;var l=e.getModel(),s=l.get(N$),c=l.get(jxe)/2,f=O$(l),h=Math.max(s,f),v=s-c,p=h-c;e.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:f},!0),a=om(a-2*v,0),i=om(i-v-p,0);var m=a*i,y=Fxe(e,l,m,t,r,n);if(y.length){var x={x:v,y:p,width:a,height:i},b=Ob(a,i),w=1/0,C=[];C.area=0;for(var A=0,M=y.length;A<M;){var R=y[A];C.push(R),C.area+=R.getLayout().area;var E=Yxe(C,b,t.squareRatio);E<=w?(A++,w=E):(C.area-=C.pop().getLayout().area,OV(C,b,x,c,!1),b=Ob(x.width,x.height),C.length=C.area=0,w=1/0)}if(C.length&&OV(C,b,x,c,!0),!r){var N=l.get("childrenVisibleMin");N!=null&&m<N&&(r=!0)}for(var A=0,M=y.length;A<M;A++)L$(y[A],t,r,n+1)}}}function Fxe(e,t,r,n,a,i){var o=e.children||[],l=n.sort;l!=="asc"&&l!=="desc"&&(l=null);var s=n.leafDepth!=null&&n.leafDepth<=i;if(a&&!s)return e.viewChildren=[];o=Bt(o,function(p){return!p.isRemoved()}),Hxe(o,l);var c=Uxe(t,o,l);if(c.sum===0)return e.viewChildren=[];if(c.sum=Gxe(t,r,c.sum,l,o),c.sum===0)return e.viewChildren=[];for(var f=0,h=o.length;f<h;f++){var v=o[f].getValue()/c.sum*r;o[f].setLayout({area:v})}return s&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:c.dataExtent},!0),o}function Gxe(e,t,r,n,a){if(!n)return r;for(var i=e.get("visibleMin"),o=a.length,l=o,s=o-1;s>=0;s--){var c=a[n==="asc"?o-s-1:s].getValue();c/r*t<i&&(l=s,r-=c)}return n==="asc"?a.splice(0,o-l):a.splice(l,o-l),r}function Hxe(e,t){return t&&e.sort(function(r,n){var a=t==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return a===0?t==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:a}),e}function Uxe(e,t,r){for(var n=0,a=0,i=t.length;a<i;a++)n+=t[a].getValue();var o=e.get("visualDimension"),l;return!t||!t.length?l=[NaN,NaN]:o==="value"&&r?(l=[t[t.length-1].getValue(),t[0].getValue()],r==="asc"&&l.reverse()):(l=yn(),rL(t,function(s){var c=s.getValue(o);c<l[0]&&(l[0]=c),c>l[1]&&(l[1]=c)})),{sum:n,dataExtent:l}}function Yxe(e,t,r){for(var n=0,a=1/0,i=0,o=void 0,l=e.length;i<l;i++)o=e[i].getLayout().area,o&&(o<a&&(a=o),o>n&&(n=o));var s=e.area*e.area,c=t*t*r;return s?om(c*n/s,s/(c*a)):1/0}function OV(e,t,r,n,a){var i=t===r.width?0:1,o=1-i,l=["x","y"],s=["width","height"],c=r[l[i]],f=t?e.area/t:0;(a||f>r[s[o]])&&(f=r[s[o]]);for(var h=0,v=e.length;h<v;h++){var p=e[h],m={},y=f?p.getLayout().area/f:0,x=m[s[o]]=om(f-2*n,0),b=r[l[i]]+r[s[i]]-c,w=h===v-1||b<y?b:y,C=m[s[i]]=om(w-2*n,0);m[l[o]]=r[l[o]]+Ob(n,x/2),m[l[i]]=c+Ob(n,C/2),c+=w,p.setLayout(m,!0)}r[l[o]]+=f,r[s[o]]-=f}function $xe(e,t,r,n){var a=(t||{}).node,i=n.width,o=n.height,l=he({},n);if(!a||a===r)return l;for(var s,c=i*o,f=c*e.option.zoomToNodeRatio;s=a.parentNode;){for(var h=0,v=s.children,p=0,m=v.length;p<m;p++)h+=v[p].getValue();var y=a.getValue();if(y===0)return l;f*=h/y;var x=s.getModel(),b=x.get(N$),w=Math.max(b,O$(x));f+=4*b*b+(3*b+w)*Math.pow(f,.5),f>Pg&&(f=Pg),a=s}f<c&&(f=c);var C=Math.pow(f/c,.5);return{width:i*C,height:o*C}}function Wxe(e,t,r){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!r)return n;var a=r.node,i=a.getLayout();if(!i)return n;for(var o=[i.width/2,i.height/2],l=a;l;){var s=l.getLayout();o[0]+=s.x,o[1]+=s.y,l=l.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function I$(e,t,r,n,a){var i=e.getLayout(),o=r[a],l=o&&o===e;if(!(o&&!l||a===r.length&&e!==n)){e.setLayout({isInView:!0,invisible:!l&&!t.intersect(i),isAboveViewRoot:l},!0);var s=new Fe(t.x-i.x,t.y-i.y,t.width,t.height);rL(e.viewChildren||[],function(c){I$(c,s,r,n,a+1)})}}function O$(e){return e.get(Bxe)?e.get(zxe):0}function k$(e,t){return t.width/e.width||t.height/e.height||1}function P$(e,t){return qN(e,t.get("scaleLimit",!0))}var jR=ze,kV=at,PV=3,jV="label",BV="upperLabel",qxe=jd*10,Xxe=jd*2,Zxe=jd*3,ac=Oc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),zV=function(e){var t=ac(e);return t.stroke=t.fill=t.lineWidth=null,t},kb=it(),Kxe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=Ep(),r}return t.prototype.render=function(r,n,a,i){var o=n.findComponents({mainType:"series",subType:"treemap",query:i});if(!(qe(o,r)<0)){this.seriesModel=r,this.api=a,this.ecModel=n;var l=["treemapZoomToNode","treemapRootToNode"],s=im(i,l,r),c=i&&i.type,f=r.layoutInfo,h=!this._oldTree,v=this._storage,p=c==="treemapRootToNode"&&s&&v?{rootNodeGroup:v.nodeGroup[s.node.getRawIndex()],direction:i.direction}:null,m=this._giveContainerGroup(f),y=r.get("animation"),x=this._doRender(m,r,p);y&&!h&&(!c||c==="treemapZoomToNode"||c==="treemapRootToNode")?this._doAnimation(m,x,r,p):x.renderFinally(),this._resetController(a),this._renderBreadcrumb(r,a,s)}},t.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new jR,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},t.prototype._doRender=function(r,n,a){var i=n.getData().tree,o=this._oldTree,l=Ep(),s=Ep(),c=this._storage,f=[];function h(x,b,w,C){return Qxe(n,s,c,a,l,f,x,b,w,C)}p(i.root?[i.root]:[],o&&o.root?[o.root]:[],r,i===o||!o,0);var v=m(c);return this._oldTree=i,this._storage=s,{lastsForAnimation:l,willDeleteEls:v,renderFinally:y};function p(x,b,w,C,A){C?(b=x,B(x,function(E,N){!E.isRemoved()&&R(N,N)})):new hf(b,x,M,M).add(R).update(R).remove(et(R,null)).execute();function M(E){return E.getId()}function R(E,N){var L=E!=null?x[E]:null,O=N!=null?b[N]:null,I=h(L,O,w,A);I&&p(L&&L.viewChildren||[],O&&O.viewChildren||[],I,C,A+1)}}function m(x){var b=Ep();return x&&B(x,function(w,C){var A=b[C];B(w,function(M){M&&(A.push(M),kb(M).willDelete=!0)})}),b}function y(){B(v,function(x){B(x,function(b){b.parent&&b.parent.remove(b)})}),B(f,function(x){x.invisible=!0,x.dirty()})}},t.prototype._doAnimation=function(r,n,a,i){var o=a.get("animationDurationUpdate"),l=a.get("animationEasing"),s=(Be(o)?0:o)||0,c=(Be(l)?null:l)||"cubicOut",f=Pxe();B(n.willDeleteEls,function(h,v){B(h,function(p,m){if(!p.invisible){var y=p.parent,x,b=kb(y);if(i&&i.direction==="drillDown")x=y===i.rootNodeGroup?{shape:{x:0,y:0,width:b.nodeWidth,height:b.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var w=0,C=0;b.willDelete||(w=b.nodeWidth/2,C=b.nodeHeight/2),x=v==="nodeGroup"?{x:w,y:C,style:{opacity:0}}:{shape:{x:w,y:C,width:0,height:0},style:{opacity:0}}}x&&f.add(p,x,s,0,c)}})}),B(this._storage,function(h,v){B(h,function(p,m){var y=n.lastsForAnimation[v][m],x={};y&&(p instanceof ze?y.oldX!=null&&(x.x=p.x,x.y=p.y,p.x=y.oldX,p.y=y.oldY):(y.oldShape&&(x.shape=he({},p.shape),p.setShape(y.oldShape)),y.fadein?(p.setStyle("opacity",0),x.style={opacity:1}):p.style.opacity!==1&&(x.style={opacity:1})),f.add(p,x,s,0,c))})},this),this._state="animating",f.finished(Ee(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(r){var n=this,a=this.seriesModel,i=this._controller;i||(i=this._controller=new pf(r.getZr()),i.on("pan",Ee(this._onPan,this)),i.on("zoom",Ee(this._onZoom,this))),i.enable(a.get("roam"),{api:r,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(o,l,s){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,s-c.y):!1}}})},t.prototype._clearController=function(){var r=this._controller;r&&(r.dispose(),r=null)},t.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>PV||Math.abs(r.dy)>PV)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+r.dx,y:a.y+r.dy,width:a.width,height:a.height}})}},t.prototype._onZoom=function(r){var n=r.originX,a=r.originY,i=r.scale,o=this.seriesModel;if(this._state!=="animating"){var l=o.getData().tree.root;if(!l)return;var s=l.getLayout();if(!s)return;var c=new Fe(s.x,s.y,s.width,s.height),f=o.layoutInfo,h=k$(f,s),v=h*i;v=P$(v,o);var p=v/h;n-=f.x,a-=f.y;var m=lr();Ei(m,m,[-n,-a]),p_(m,m,[p,p]),Ei(m,m,[n,a]),c.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:c.x,y:c.y,width:c.width,height:c.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var l=o.node;if(l.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var s=l.hostTree.data.getItemModel(l.dataIndex),c=s.get("link",!0),f=s.get("target",!0)||"blank";c&&nb(c,f)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,a){var i=this;a||(a=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Lxe(this.group))).render(r,n,a.node,function(o){i._state!=="animating"&&(tL(r.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ep(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},t.prototype.findTarget=function(r,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var l=this._storage.background[o.getRawIndex()];if(l){var s=l.transformCoordToLocal(r,n),c=l.shape;if(c.x<=s[0]&&s[0]<=c.x+c.width&&c.y<=s[1]&&s[1]<=c.y+c.height)a={node:o,offsetX:s[0],offsetY:s[1]};else return!1}},this),a},t.type="treemap",t})(It);function Ep(){return{nodeGroup:[],background:[],content:[]}}function Qxe(e,t,r,n,a,i,o,l,s,c){if(!o)return;var f=o.getLayout(),h=e.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var p=f.width,m=f.height,y=f.borderWidth,x=f.invisible,b=o.getRawIndex(),w=l&&l.getRawIndex(),C=o.viewChildren,A=f.upperHeight,M=C&&C.length,R=v.getModel("itemStyle"),E=v.getModel(["emphasis","itemStyle"]),N=v.getModel(["blur","itemStyle"]),L=v.getModel(["select","itemStyle"]),O=R.get("borderRadius")||0,I=K("nodeGroup",jR);if(!I)return;if(s.add(I),I.x=f.x||0,I.y=f.y||0,I.markRedraw(),kb(I).nodeWidth=p,kb(I).nodeHeight=m,f.isAboveViewRoot)return I;var z=K("background",kV,c,Xxe);z&&G(I,z,M&&f.upperLabelHeight);var V=v.getModel("emphasis"),Y=V.get("focus"),H=V.get("blurScope"),F=V.get("disabled"),X=Y==="ancestor"?o.getAncestorsIndices():Y==="descendant"?o.getDescendantIndices():Y;if(M)zg(I)&&pc(I,!1),z&&(pc(z,!F),h.setItemGraphicEl(o.dataIndex,z),JM(z,X,H));else{var P=K("content",kV,c,Zxe);P&&W(I,P),z.disableMorphing=!0,z&&zg(z)&&pc(z,!1),pc(I,!F),h.setItemGraphicEl(o.dataIndex,I);var q=v.getShallow("cursor");q&&P.attr("cursor",q),JM(I,X,H)}return I;function G(ue,de,me){var ae=$e(de);if(ae.dataIndex=o.dataIndex,ae.seriesIndex=e.seriesIndex,de.setShape({x:0,y:0,width:p,height:m,r:O}),x)Z(de);else{de.invisible=!1;var ye=o.getVisual("style"),nt=ye.stroke,be=zV(R);be.fill=nt;var Te=ac(E);Te.fill=E.get("borderColor");var Me=ac(N);Me.fill=N.get("borderColor");var Oe=ac(L);if(Oe.fill=L.get("borderColor"),me){var Ye=p-2*y;Q(de,nt,ye.opacity,{x:y,y:0,width:Ye,height:A})}else de.removeTextContent();de.setStyle(be),de.ensureState("emphasis").style=Te,de.ensureState("blur").style=Me,de.ensureState("select").style=Oe,kc(de)}ue.add(de)}function W(ue,de){var me=$e(de);me.dataIndex=o.dataIndex,me.seriesIndex=e.seriesIndex;var ae=Math.max(p-2*y,0),ye=Math.max(m-2*y,0);if(de.culling=!0,de.setShape({x:y,y,width:ae,height:ye,r:O}),x)Z(de);else{de.invisible=!1;var nt=o.getVisual("style"),be=nt.fill,Te=zV(R);Te.fill=be,Te.decal=nt.decal;var Me=ac(E),Oe=ac(N),Ye=ac(L);Q(de,be,nt.opacity,null),de.setStyle(Te),de.ensureState("emphasis").style=Me,de.ensureState("blur").style=Oe,de.ensureState("select").style=Ye,kc(de)}ue.add(de)}function Z(ue){!ue.invisible&&i.push(ue)}function Q(ue,de,me,ae){var ye=v.getModel(ae?BV:jV),nt=kr(v.get("name"),null),be=ye.getShallow("show");Wr(ue,Br(v,ae?BV:jV),{defaultText:be?nt:null,inheritColor:de,defaultOpacity:me,labelFetcher:e,labelDataIndex:o.dataIndex});var Te=ue.getTextContent();if(Te){var Me=Te.style,Oe=Cm(Me.padding||0);ae&&(ue.setTextConfig({layoutRect:ae}),Te.disableLabelLayout=!0),Te.beforeUpdate=function(){var _e=Math.max((ae?ae.width:ue.shape.width)-Oe[1]-Oe[3],0),ce=Math.max((ae?ae.height:ue.shape.height)-Oe[0]-Oe[2],0);(Me.width!==_e||Me.height!==ce)&&Te.setStyle({width:_e,height:ce})},Me.truncateMinChar=2,Me.lineOverflow="truncate",U(Me,ae,f);var Ye=Te.getState("emphasis");U(Ye?Ye.style:null,ae,f)}}function U(ue,de,me){var ae=ue?ue.text:null;if(!de&&me.isLeafRoot&&ae!=null){var ye=e.get("drillDownIcon",!0);ue.text=ye?ye+" "+ae:ae}}function K(ue,de,me,ae){var ye=w!=null&&r[ue][w],nt=a[ue];return ye?(r[ue][w]=null,se(nt,ye)):x||(ye=new de,ye instanceof Ni&&(ye.z2=Jxe(me,ae)),ge(nt,ye)),t[ue][b]=ye}function se(ue,de){var me=ue[b]={};de instanceof jR?(me.oldX=de.x,me.oldY=de.y):me.oldShape=he({},de.shape)}function ge(ue,de){var me=ue[b]={},ae=o.parentNode,ye=de instanceof ze;if(ae&&(!n||n.direction==="drillDown")){var nt=0,be=0,Te=a.background[ae.getRawIndex()];!n&&Te&&Te.oldShape&&(nt=Te.oldShape.width,be=Te.oldShape.height),ye?(me.oldX=0,me.oldY=be):me.oldShape={x:nt,y:be,width:0,height:0}}me.fadein=!ye}}function Jxe(e,t){return e*qxe+t}var lm=B,eSe=Ve,Pb=-1,$r=(function(){function e(t){var r=t.mappingMethod,n=t.type,a=this.option=je(t);this.type=n,this.mappingMethod=r,this._normalizeData=nSe[r];var i=e.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[r],r==="piecewise"?(BA(a),tSe(a)):r==="category"?a.categories?rSe(a):BA(a,!0):(In(r!=="linear"||a.dataExtent),BA(a))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return Ee(this._normalizeData,this)},e.listVisualTypes=function(){return dt(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){Ve(t)?B(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var a,i=pe(t)?[]:Ve(t)?{}:(a=!0,null);return e.eachVisual(t,function(o,l){var s=r.call(n,o,l);a?i=s:i[l]=s}),i},e.retrieveVisuals=function(t){var r={},n;return t&&lm(e.visualHandlers,function(a,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(pe(t))t=t.slice();else if(eSe(t)){var r=[];lm(t,function(n,a){r.push(a)}),t=r}else return[];return t.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},e.dependsOn=function(t,r){return r==="color"?!!(t&&t.indexOf(r)===0):t===r},e.findPieceIndex=function(t,r,n){for(var a,i=1/0,o=0,l=r.length;o<l;o++){var s=r[o].value;if(s!=null){if(s===t||De(s)&&s===t+"")return o;n&&v(s,o)}}for(var o=0,l=r.length;o<l;o++){var c=r[o],f=c.interval,h=c.close;if(f){if(f[0]===-1/0){if(xx(h[1],t,f[1]))return o}else if(f[1]===1/0){if(xx(h[0],f[0],t))return o}else if(xx(h[0],f[0],t)&&xx(h[1],t,f[1]))return o;n&&v(f[0],o),n&&v(f[1],o)}}if(n)return t===1/0?r.length-1:t===-1/0?0:a;function v(p,m){var y=Math.abs(p-t);y<i&&(i=y,a=m)}},e.visualHandlers={color:{applyVisual:Np("color"),getColorMapper:function(){var t=this.option;return Ee(t.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),Xp.call(this,r)}:function(r,n,a){var i=!!a;return!n&&(r=this._normalizeData(r)),a=lg(r,t.parsedVisual,a),i?a:ti(a,"rgba")},this)},_normalizedToVisual:{linear:function(t){return ti(lg(t,this.option.parsedVisual),"rgba")},category:Xp,piecewise:function(t,r){var n=zR.call(this,r);return n==null&&(n=ti(lg(t,this.option.parsedVisual),"rgba")),n},fixed:ic}},colorHue:yx(function(t,r){return vl(t,r)}),colorSaturation:yx(function(t,r){return vl(t,null,r)}),colorLightness:yx(function(t,r){return vl(t,null,null,r)}),colorAlpha:yx(function(t,r){return Lg(t,r)}),decal:{applyVisual:Np("decal"),_normalizedToVisual:{linear:null,category:Xp,piecewise:null,fixed:null}},opacity:{applyVisual:Np("opacity"),_normalizedToVisual:BR([0,1])},liftZ:{applyVisual:Np("liftZ"),_normalizedToVisual:{linear:ic,category:ic,piecewise:ic,fixed:ic}},symbol:{applyVisual:function(t,r,n){var a=this.mapValueToVisual(t);n("symbol",a)},_normalizedToVisual:{linear:VV,category:Xp,piecewise:function(t,r){var n=zR.call(this,r);return n==null&&(n=VV.call(this,t)),n},fixed:ic}},symbolSize:{applyVisual:Np("symbolSize"),_normalizedToVisual:BR([0,1])}},e})();function tSe(e){var t=e.pieceList;e.hasSpecialVisual=!1,B(t,function(r,n){r.originIndex=n,r.visual!=null&&(e.hasSpecialVisual=!0)})}function rSe(e){var t=e.categories,r=e.categoryMap={},n=e.visual;if(lm(t,function(o,l){r[o]=l}),!pe(n)){var a=[];Ve(n)?lm(n,function(o,l){var s=r[l];a[s??Pb]=o}):a[Pb]=n,n=j$(e,a)}for(var i=t.length-1;i>=0;i--)n[i]==null&&(delete r[t[i]],t.pop())}function BA(e,t){var r=e.visual,n=[];Ve(r)?lm(r,function(i){n.push(i)}):r!=null&&n.push(r);var a={color:1,symbol:1};!t&&n.length===1&&!a.hasOwnProperty(e.type)&&(n[1]=n[0]),j$(e,n)}function yx(e){return{applyVisual:function(t,r,n){var a=this.mapValueToVisual(t);n("color",e(r("color"),a))},_normalizedToVisual:BR([0,1])}}function VV(e){var t=this.option.visual;return t[Math.round(St(e,[0,1],[0,t.length-1],!0))]||{}}function Np(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function Xp(e){var t=this.option.visual;return t[this.option.loop&&e!==Pb?e%t.length:e]}function ic(){return this.option.visual[0]}function BR(e){return{linear:function(t){return St(t,e,this.option.visual,!0)},category:Xp,piecewise:function(t,r){var n=zR.call(this,r);return n==null&&(n=St(t,e,this.option.visual,!0)),n},fixed:ic}}function zR(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=$r.findPieceIndex(e,r),a=r[n];if(a&&a.visual)return a.visual[this.type]}}function j$(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=xe(t,function(r){var n=Nn(r);return n||[0,0,0,1]})),t}var nSe={linear:function(e){return St(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=$r.findPieceIndex(e,t,!0);if(r!=null)return St(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??Pb},fixed:ur};function xx(e,t,r){return e?t<=r:t<r}var aSe="itemStyle",B$=it();const iSe={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||z$(r,{},e.getViewRoot().getAncestors(),e)}};function z$(e,t,r,n){var a=e.getModel(),i=e.getLayout(),o=e.hostTree.data;if(!(!i||i.invisible||!i.isInView)){var l=a.getModel(aSe),s=oSe(l,t,n),c=o.ensureUniqueItemVisual(e.dataIndex,"style"),f=l.get("borderColor"),h=l.get("borderColorSaturation"),v;h!=null&&(v=FV(s),f=lSe(h,v)),c.stroke=f;var p=e.viewChildren;if(!p||!p.length)v=FV(s),c.fill=v;else{var m=sSe(e,a,i,l,s,p);B(p,function(y,x){if(y.depth>=r.length||y===r[y.depth]){var b=uSe(a,s,y,x,m,n);z$(y,b,r,n)}})}}}function oSe(e,t,r){var n=he({},t),a=r.designatedVisualItemStyle;return B(["color","colorAlpha","colorSaturation"],function(i){a[i]=t[i];var o=e.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function FV(e){var t=zA(e,"color");if(t){var r=zA(e,"colorAlpha"),n=zA(e,"colorSaturation");return n&&(t=vl(t,null,null,n)),r&&(t=Lg(t,r)),t}}function lSe(e,t){return t!=null?vl(t,null,null,e):null}function zA(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function sSe(e,t,r,n,a,i){if(!(!i||!i.length)){var o=VA(t,"color")||a.color!=null&&a.color!=="none"&&(VA(t,"colorAlpha")||VA(t,"colorSaturation"));if(o){var l=t.get("visualMin"),s=t.get("visualMax"),c=r.dataExtent.slice();l!=null&&l<c[0]&&(c[0]=l),s!=null&&s>c[1]&&(c[1]=s);var f=t.get("colorMappingBy"),h={type:o.name,dataExtent:c,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new $r(h);return B$(v).drColorMappingBy=f,v}}}function VA(e,t){var r=e.get(t);return pe(r)&&r.length?{name:t,range:r}:null}function uSe(e,t,r,n,a,i){var o=he({},t);if(a){var l=a.type,s=l==="color"&&B$(a).drColorMappingBy,c=s==="index"?n:s==="id"?i.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[l]=a.mapValueToVisual(c)}return o}function cSe(e){e.registerSeriesModel(Rxe),e.registerChartView(Kxe),e.registerVisual(iSe),e.registerLayout(Vxe),Mxe(e)}function Ch(e){return"_EC_"+e}var fSe=(function(){function e(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(t,r){t=t==null?""+r:""+t;var n=this._nodesMap;if(!n[Ch(t)]){var a=new oc(t,r);return a.hostGraph=this,this.nodes.push(a),n[Ch(t)]=a,a}},e.prototype.getNodeByIndex=function(t){var r=this.data.getRawIndex(t);return this.nodes[r]},e.prototype.getNodeById=function(t){return this._nodesMap[Ch(t)]},e.prototype.addEdge=function(t,r,n){var a=this._nodesMap,i=this._edgesMap;if(pt(t)&&(t=this.nodes[t]),pt(r)&&(r=this.nodes[r]),t instanceof oc||(t=a[Ch(t)]),r instanceof oc||(r=a[Ch(r)]),!(!t||!r)){var o=t.id+"-"+r.id,l=new V$(t,r,n);return l.hostGraph=this,this._directed&&(t.outEdges.push(l),r.inEdges.push(l)),t.edges.push(l),t!==r&&r.edges.push(l),this.edges.push(l),i[o]=l,l}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof oc&&(t=t.id),r instanceof oc&&(r=r.id);var n=this._edgesMap;return this._directed?n[t+"-"+r]:n[t+"-"+r]||n[r+"-"+t]},e.prototype.eachNode=function(t,r){for(var n=this.nodes,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&t.call(r,n[i],i)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,a=n.length,i=0;i<a;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(r,n[i],i)},e.prototype.breadthFirstTraverse=function(t,r,n,a){if(r instanceof oc||(r=this._nodesMap[Ch(r)]),!!r){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(a,r,null))for(var l=[r];l.length;)for(var s=l.shift(),c=s[i],o=0;o<c.length;o++){var f=c[o],h=f.node1===s?f.node2:f.node1;if(!h.__visited){if(t.call(a,h,s))return;l.push(h),h.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,r=this.edgeData,n=this.nodes,a=this.edges,i=0,o=n.length;i<o;i++)n[i].dataIndex=-1;for(var i=0,o=t.count();i<o;i++)n[t.getRawIndex(i)].dataIndex=i;r.filterSelf(function(l){var s=a[r.getRawIndex(l)];return s.node1.dataIndex>=0&&s.node2.dataIndex>=0});for(var i=0,o=a.length;i<o;i++)a[i].dataIndex=-1;for(var i=0,o=r.count();i<o;i++)a[r.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,n=this.edges,a=0;a<r.length;a++)t.addNode(r[a].id,r[a].dataIndex);for(var a=0;a<n.length;a++){var i=n[a];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},e})(),oc=(function(){function e(t,r){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=r??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.data.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},r=0;r<this.edges.length;r++){var n=this.edges[r];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},e.prototype.getTrajectoryDataIndices=function(){for(var t=Le(),r=Le(),n=0,a=this.edges.length;n<a;n++){var i=this.edges[n];if(!(i.dataIndex<0)){t.set(i.dataIndex,!0);for(var o=[i.node1],l=[i.node2],s=0;s<o.length;){var c=o[s];s++,r.set(c.dataIndex,!0);for(var f=c.inEdges,h=0,v=f.length,p=void 0,m=void 0;h<v;h++)p=f[h],m=p.dataIndex,m>=0&&!t.hasKey(m)&&(t.set(m,!0),o.push(p.node1))}for(s=0;s<l.length;){var y=l[s];s++,r.set(y.dataIndex,!0);for(var x=y.outEdges,h=0,b=x.length,w=void 0,C=void 0;h<b;h++)w=x[h],C=w.dataIndex,C>=0&&!t.hasKey(C)&&(t.set(C,!0),l.push(w.node2))}}}return{edge:t.keys(),node:r.keys()}},e})(),V$=(function(){function e(t,r,n){this.dataIndex=-1,this.node1=t,this.node2=r,this.dataIndex=n??-1}return e.prototype.getModel=function(t){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var t=Le(),r=Le();t.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i<n.length;){var o=n[i];i++,r.set(o.dataIndex,!0);for(var l=o.inEdges,s=0,c=l.length,f=void 0,h=void 0;s<c;s++)f=o.inEdges[s],h=f.dataIndex,h>=0&&!t.hasKey(h)&&(t.set(h,!0),n.push(f.node1))}for(i=0;i<a.length;){var v=a[i];i++,r.set(v.dataIndex,!0);for(var p=v.outEdges,s=0,c=p.length,m=void 0,y=void 0;s<c;s++)m=v.outEdges[s],y=m.dataIndex,y>=0&&!t.hasKey(y)&&(t.set(y,!0),a.push(m.node2))}return{edge:t.keys(),node:r.keys()}},e})();function F$(e,t){return{getValue:function(r){var n=this[e][t];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[e][t].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Cr(oc,F$("hostGraph","data"));Cr(V$,F$("hostGraph","edgeData"));function nL(e,t,r,n,a){for(var i=new fSe(n),o=0;o<e.length;o++)i.addNode(En(e[o].id,e[o].name,o),o);for(var l=[],s=[],c=0,o=0;o<t.length;o++){var f=t[o],h=f.source,v=f.target;i.addEdge(h,v,c)&&(s.push(f),l.push(En(kr(f.id,null),h+" > "+v)),c++)}var p=r.get("coordinateSystem"),m;if(p==="cartesian2d"||p==="polar"||p==="matrix")m=Oo(e,r);else{var y=Hd.get(p),x=y?y.dimensions||[]:[];qe(x,"value")<0&&x.concat(["value"]);var b=qd(e,{coordDimensions:x,encodeDefine:r.getEncode()}).dimensions;m=new Ln(b,r),m.initData(e)}var w=new Ln(["value"],r);return w.initData(s,l),a&&a(m,w),T$({mainData:m,struct:i,structAttr:"graph",datas:{node:m,edge:w},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var VR="-->",J_=function(e){return e.get("autoCurveness")||null},G$=function(e,t){var r=J_(e),n=20,a=[];if(pt(r))n=r;else if(pe(r)){e.__curvenessList=r;return}t>n&&(n=t);var i=n%2?n+2:n+3;a=[];for(var o=0;o<i;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=a},sm=function(e,t,r){var n=[e.id,e.dataIndex].join("."),a=[t.id,t.dataIndex].join(".");return[r.uid,n,a].join(VR)},H$=function(e){var t=e.split(VR);return[t[0],t[2],t[1]].join(VR)},hSe=function(e,t){var r=sm(e.node1,e.node2,t);return t.__edgeMap[r]},dSe=function(e,t){var r=FR(sm(e.node1,e.node2,t),t),n=FR(sm(e.node2,e.node1,t),t);return r+n},FR=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function vSe(e){J_(e)&&(e.__curvenessList=[],e.__edgeMap={},G$(e))}function pSe(e,t,r,n){if(J_(r)){var a=sm(e,t,r),i=r.__edgeMap,o=i[H$(a)];i[a]&&!o?i[a].isForward=!0:o&&i[a]&&(o.isForward=!0,i[a].isForward=!1),i[a]=i[a]||[],i[a].push(n)}}function aL(e,t,r,n){var a=J_(t),i=pe(a);if(!a)return null;var o=hSe(e,t);if(!o)return null;for(var l=-1,s=0;s<o.length;s++)if(o[s]===r){l=s;break}var c=dSe(e,t);G$(t,c),e.lineStyle=e.lineStyle||{};var f=sm(e.node1,e.node2,t),h=t.__curvenessList,v=i||c%2?0:1;if(o.isForward)return h[v+l];var p=H$(f),m=FR(p,t),y=h[l+m+v];return n?i?a&&a[0]===0?(m+v)%2?y:-y:((m%2?0:1)+v)%2?y:-y:(m+v)%2?y:-y:h[l+m+v]}var Kn="graph",gSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new ev(a,a),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(r){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Lc(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var a=r.edges||r.links||[],i=r.data||r.nodes||[],o=this;if(i&&a){vSe(this);var l=nL(i,a,this,!0,s);return B(l.edges,function(c){pSe(c.node1,c.node2,this,c.dataIndex)},this),l.data}function s(c,f){c.wrapMethod("getItemModel",function(m){var y=o._categoriesModels,x=m.getShallow("category"),b=y[x];return b&&(b.parentModel=m.parentModel,m.parentModel=b),m});var h=ct.prototype.getModel;function v(m,y){var x=h.call(this,m,y);return x.resolveParentPath=p,x}f.wrapMethod("getItemModel",function(m){return m.resolveParentPath=p,m.getModel=v,m});function p(m){if(m&&(m[0]==="label"||m[1]==="label")){var y=m.slice();return m[0]==="label"?y[0]="edgeLabel":m[1]==="label"&&(y[1]="edgeLabel"),y}return m}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(r,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(r,a),l=i.graph.getEdgeByIndex(r),s=i.getName(l.node1.dataIndex),c=i.getName(l.node2.dataIndex),f=[];return s!=null&&f.push(s),c!=null&&f.push(c),Rr("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=O7({series:this,dataIndex:r,multipleSeries:n});return h},t.prototype._updateCategoriesData=function(){var r=xe(this.option.categories||[],function(a){return a.value!=null?a:he({value:0},a)}),n=new Ln(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.prototype.__ownRoamView=function(){var r=this.coordinateSystem;return c$(r)&&r},t.type="series."+Kn,t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:re.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:re.color.primary}}},t})(Pt);function Sx(e){return e instanceof Array||(e=[e,e]),e}var mSe=zr(Kn,ySe);function ySe(e){e.eachSeriesByType(Kn,function(t){var r=t.getGraph(),n=t.getEdgeData(),a=Sx(t.get("edgeSymbol")),i=Sx(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",a&&a[0]),n.setVisual("toSymbol",a&&a[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var l=n.getItemModel(o),s=r.getEdgeByIndex(o),c=Sx(l.getShallow("symbol",!0)),f=Sx(l.getShallow("symbolSize",!0)),h=l.getModel("lineStyle").getLineStyle(),v=n.ensureUniqueItemVisual(o,"style");switch(he(v,h),v.stroke){case"source":{var p=s.node1.getVisual("style");v.stroke=p&&p.fill;break}case"target":{var p=s.node2.getVisual("style");v.stroke=p&&p.fill;break}}c[0]&&s.setVisual("fromSymbol",c[0]),c[1]&&s.setVisual("toSymbol",c[1]),f[0]&&s.setVisual("fromSymbolSize",f[0]),f[1]&&s.setVisual("toSymbolSize",f[1])})})}function U$(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view")){var r=e.getGraph();r.eachNode(function(n){var a=n.getModel();n.setLayout([+a.get("x"),+a.get("y")])}),iL(r,e)}}function iL(e,t){e.eachEdge(function(r,n){var a=ca(r.getModel().get(["lineStyle","curveness"]),-aL(r,t,n,!0),0),i=po(r.node1.getLayout()),o=po(r.node2.getLayout()),l=[i,o];+a&&l.push([(i[0]+o[0])/2-(i[1]-o[1])*a,(i[1]+o[1])/2-(o[0]-i[0])*a]),r.setLayout(l)})}var xSe=zr(Kn,SSe);function SSe(e,t){e.eachSeriesByType(Kn,function(r){var n=r.get("layout"),a=r.coordinateSystem;if(a&&a.type!=="view"){var i=r.getData(),o=[];B(a.dimensions,function(v){o=o.concat(i.mapDimensionsAll(v))});for(var l=0;l<i.count();l++){for(var s=[],c=!1,f=0;f<o.length;f++){var h=i.get(o[f],l);isNaN(h)||(c=!0),s.push(h)}c?i.setItemLayout(l,a.dataToPoint(s)):i.setItemLayout(l,[NaN,NaN])}iL(i.graph,r)}else(!n||n==="none")&&U$(r)})}function Zp(e){var t=e.coordinateSystem;return c$(t)?p$(t,e):1}function Kp(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var GV=Math.PI,FA=[];function oL(e,t,r,n){var a=e.coordinateSystem;if(!(a&&a.type!=="view")){var i=a.getBoundingRect(),o=e.getData(),l=o.graph,s=i.width/2+i.x,c=i.height/2+i.y,f=Math.min(i.width,i.height)/2,h=o.count();if(o.setLayout({cx:s,cy:c}),!!h){if(r){var v=a.pointToData(n),p=v[0],m=v[1],y=[p-s,m-c];tf(y,y),ag(y,y,f),r.setLayout([s+y[0],c+y[1]],!0);var x=e.get(["circular","rotateLabel"]);Y$(r,x,s,c)}bSe[t](e,l,o,f,s,c,h),l.eachEdge(function(b,w){var C=ca(b.getModel().get(["lineStyle","curveness"]),aL(b,e,w),0),A=po(b.node1.getLayout()),M=po(b.node2.getLayout()),R,E=(A[0]+M[0])/2,N=(A[1]+M[1])/2;+C&&(C*=3,R=[s*C+E*(1-C),c*C+N*(1-C)]),b.setLayout([A,M,R])})}}}var bSe={value:function(e,t,r,n,a,i,o){var l=0,s=r.getSum("value"),c=Math.PI*2/(s||o);t.eachNode(function(f){var h=f.getValue("value"),v=c*(s?h:1)/2;l+=v,f.setLayout([n*Math.cos(l)+a,n*Math.sin(l)+i]),l+=v})},symbolSize:function(e,t,r,n,a,i,o){var l=0;FA.length=o;var s=Zp(e);t.eachNode(function(h){var v=Kp(h);isNaN(v)&&(v=2),v<0&&(v=0),v*=s;var p=Math.asin(v/2/n);isNaN(p)&&(p=GV/2),FA[h.dataIndex]=p,l+=p*2});var c=(2*GV-l)/o/2,f=0;t.eachNode(function(h){var v=c+FA[h.dataIndex];f+=v,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([n*Math.cos(f)+a,n*Math.sin(f)+i]),f+=v})}};function Y$(e,t,r,n){var a=e.getGraphicEl();if(a){var i=e.getModel(),o=i.get(["label","rotate"])||0,l=a.getSymbolPath();if(t){var s=e.getLayout(),c=Math.atan2(s[1]-n,s[0]-r);c<0&&(c=Math.PI*2+c);var f=s[0]<r;f&&(c=c-Math.PI);var h=f?"left":"right";l.setTextConfig({rotation:-c,position:h,origin:"center"});var v=l.ensureState("emphasis");he(v.textConfig||(v.textConfig={}),{position:h})}else l.setTextConfig({rotation:o*=Math.PI/180})}}var _Se=zr(Kn,wSe);function wSe(e){e.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&oL(t,"symbolSize")})}var Th=IS;function CSe(e,t,r){for(var n=e,a=t,i=r.rect,o=i.width,l=i.height,s=[i.x+o/2,i.y+l/2],c=r.gravity==null?.1:r.gravity,f=0;f<n.length;f++){var h=n[f];h.p||(h.p=Xs(o*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),h.pp=po(h.p),h.edges=null}var v=r.friction==null?.6:r.friction,p=v,m,y;return{warmUp:function(){p=v*.8},setFixed:function(x){n[x].fixed=!0},setUnfixed:function(x){n[x].fixed=!1},beforeStep:function(x){m=x},afterStep:function(x){y=x},step:function(x){m&&m(n,a);for(var b=[],w=n.length,C=0;C<a.length;C++){var A=a[C];if(!A.ignoreForceLayout){var M=A.n1,R=A.n2;ys(b,R.p,M.p);var E=Rg(b)-A.d,N=R.w/(M.w+R.w);isNaN(N)&&(N=0),tf(b,b),!M.fixed&&Th(M.p,M.p,b,N*E*p),!R.fixed&&Th(R.p,R.p,b,-(1-N)*E*p)}}for(var C=0;C<w;C++){var L=n[C];L.fixed||(ys(b,s,L.p),Th(L.p,L.p,b,c*p))}for(var C=0;C<w;C++)for(var M=n[C],O=C+1;O<w;O++){var R=n[O];ys(b,R.p,M.p);var E=Rg(b);E===0&&(hl(b,Math.random()-.5,Math.random()-.5),E=1);var I=(M.rep+R.rep)/E/E;!M.fixed&&Th(M.pp,M.pp,b,I),!R.fixed&&Th(R.pp,R.pp,b,-I)}for(var z=[],C=0;C<w;C++){var L=n[C];L.fixed||(ys(z,L.p,L.pp),Th(L.p,L.p,z,p),vn(L.pp,L.p))}p=p*.992;var V=p<.01;y&&y(n,a,V),x&&x(V)}}}var TSe=zr(Kn,ASe);function ASe(e){e.eachSeriesByType(Kn,function(t){var r=t.coordinateSystem;if(!(r&&r.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},a=t.getGraph(),i=a.data,o=a.edgeData,l=t.getModel("force"),s=l.get("initLayout");t.preservedPoints?i.each(function(C){var A=i.getId(C);i.setItemLayout(C,n[A]||[NaN,NaN])}):!s||s==="none"?U$(t):s==="circular"&&oL(t,"value");var c=i.getDataExtent("value"),f=o.getDataExtent("value"),h=l.get("repulsion"),v=l.get("edgeLength"),p=pe(h)?h:[h,h],m=pe(v)?v:[v,v];m=[m[1],m[0]];var y=i.mapArray("value",function(C,A){var M=i.getItemLayout(A),R=St(C,c,p);return isNaN(R)&&(R=(p[0]+p[1])/2),{w:R,rep:R,fixed:i.getItemModel(A).get("fixed"),p:!M||isNaN(M[0])||isNaN(M[1])?null:M}}),x=o.mapArray("value",function(C,A){var M=a.getEdgeByIndex(A),R=St(C,f,m);isNaN(R)&&(R=(m[0]+m[1])/2);var E=M.getModel(),N=ca(M.getModel().get(["lineStyle","curveness"]),-aL(M,t,A,!0),0);return{n1:y[M.node1.dataIndex],n2:y[M.node2.dataIndex],d:R,curveness:N,ignoreForceLayout:E.get("ignoreForceLayout")}}),b=r.getBoundingRect(),w=CSe(y,x,{rect:b,gravity:l.get("gravity"),friction:l.get("friction")});w.beforeStep(function(C,A){for(var M=0,R=C.length;M<R;M++)C[M].fixed&&vn(C[M].p,a.getNodeByIndex(M).getLayout())}),w.afterStep(function(C,A,M){for(var R=0,E=C.length;R<E;R++)C[R].fixed||a.getNodeByIndex(R).setLayout(C[R].p),n[i.getId(R)]=C[R].p;for(var R=0,E=A.length;R<E;R++){var N=A[R],L=a.getEdgeByIndex(R),O=N.n1.p,I=N.n2.p,z=L.getLayout();z=z?z.slice():[],z[0]=z[0]||[],z[1]=z[1]||[],vn(z[0],O),vn(z[1],I),+N.curveness&&(z[2]=[(O[0]+I[0])/2-(O[1]-I[1])*N.curveness,(O[1]+I[1])/2-(I[0]-O[0])*N.curveness]),L.setLayout(z)}}),t.forceLayout=w,t.preservedPoints=n,w.step()}else t.forceLayout=null})}function DSe(e,t,r){var n=Vr(e,t),a=he(e.getBoxLayoutParams(),{aspect:r}),i=Qt(a,n.refContainer);return e7(e,i,r)}function MSe(e,t){var r=[];return e.eachSeriesByType("graph",function(n){km({targetModel:n,coordSysType:"view",coordSysProvider:a,isDefaultDataCoordSys:!0});function a(){var i=n.getData(),o=i.mapArray(function(m){var y=i.getItemModel(m);return[+y.get("x"),+y.get("y")]}),l=[],s=[];U6(o,l,s),s[0]-l[0]===0&&(s[0]+=1,l[0]-=1),s[1]-l[1]===0&&(s[1]+=1,l[1]-=1);var c=(s[0]-l[0])/(s[1]-l[1]),f=DSe(n,t,c);isNaN(c)&&(l=[f.x,f.y],s=[f.x+f.width,f.y+f.height]);var h=s[0]-l[0],v=s[1]-l[1],p=ZN(n,t,l[0],l[1],h,v,f);return r.push(p),p}}),r}var HV=Mr.prototype,GA=zd.prototype,$$=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e})();(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})($$);function HA(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var W$=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:re.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new $$},t.prototype.buildPath=function(r,n){HA(n)?HV.buildPath.call(this,r,n):GA.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return HA(this.shape)?HV.pointAt.call(this,r):GA.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,a=HA(n)?[n.x2-n.x1,n.y2-n.y1]:GA.tangentAt.call(this,r);return tf(a,a)},t})(yt),UA=["fromSymbol","toSymbol"];function UV(e){return"_"+e+"Type"}function YV(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var a=t.getItemVisual(r,e+"Size"),i=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),l=t.getItemVisual(r,e+"KeepAspect"),s=Wd(a),c=ff(o||0,s);return n+s+c+(i||"")+(l||"")}function $V(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var a=t.getItemVisual(r,e+"Size"),i=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),l=t.getItemVisual(r,e+"KeepAspect"),s=Wd(a),c=ff(o||0,s),f=wr(n,-s[0]/2+c[0],-s[1]/2+c[1],s[0],s[1],null,l);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=e,f}}function RSe(e){var t=new W$({name:"line",subPixelOptimize:!0});return GR(t.shape,e),t}function GR(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var r=t[2];r?(e.cpx1=r[0],e.cpy1=r[1]):(e.cpx1=NaN,e.cpy1=NaN)}var lL=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;return i._createLine(r,n,a),i}return t.prototype._createLine=function(r,n,a){var i=r.hostModel,o=r.getItemLayout(n),l=r.getItemVisual(n,"z2"),s=RSe(o);s.shape.percent=0,ir(s,{z2:Ie(l,0),shape:{percent:1}},i,n),this.add(s),B(UA,function(c){var f=$V(c,r,n);this.add(f),this[UV(c)]=YV(c,r,n)},this),this._updateCommonStl(r,n,a)},t.prototype.updateData=function(r,n,a){var i=r.hostModel,o=this.childOfName("line"),l=r.getItemLayout(n),s={shape:{}};GR(s.shape,l),_t(o,s,i,n),B(UA,function(c){var f=YV(c,r,n),h=UV(c);if(this[h]!==f){this.remove(this.childOfName(c));var v=$V(c,r,n);this.add(v)}this[h]=f},this),this._updateCommonStl(r,n,a)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,a){var i=r.hostModel,o=this.childOfName("line"),l=a&&a.emphasisLineStyle,s=a&&a.blurLineStyle,c=a&&a.selectLineStyle,f=a&&a.labelStatesModels,h=a&&a.emphasisDisabled,v=a&&a.focus,p=a&&a.blurScope;if(!a||r.hasItemOption){var m=r.getItemModel(n),y=m.getModel("emphasis");l=y.getModel("lineStyle").getLineStyle(),s=m.getModel(["blur","lineStyle"]).getLineStyle(),c=m.getModel(["select","lineStyle"]).getLineStyle(),h=y.get("disabled"),v=y.get("focus"),p=y.get("blurScope"),f=Br(m)}var x=r.getItemVisual(n,"style"),b=x.stroke;o.useStyle(x),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=l,o.ensureState("blur").style=s,o.ensureState("select").style=c,B(UA,function(R){var E=this.childOfName(R);if(E){E.setColor(b),E.style.opacity=x.opacity;for(var N=0;N<Wn.length;N++){var L=Wn[N],O=o.getState(L);if(O){var I=O.style||{},z=E.ensureState(L),V=z.style||(z.style={});I.stroke!=null&&(V[E.__isEmptyBrush?"stroke":"fill"]=I.stroke),I.opacity!=null&&(V.opacity=I.opacity)}}E.markRedraw()}},this);var w=i.getRawValue(n);Wr(this,f,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(R,E){return i.getFormattedLabel(R,E,r.dataType)}},inheritColor:b||re.color.neutral99,defaultOpacity:x.opacity,defaultText:(w==null?r.getName(n):isFinite(w)?xt(w,10):w)+""});var C=this.getTextContent();if(C){var A=f.normal;C.__align=C.style.align,C.__verticalAlign=C.style.verticalAlign,C.__position=A.get("position")||"middle";var M=A.get("distance");pe(M)||(M=[M,M]),C.__labelDistance=M}this.setTextConfig({position:null,local:!0,inside:!1}),er(this,v,p,h)},t.prototype.highlight=function(){Tl(this)},t.prototype.downplay=function(){Al(this)},t.prototype.updateLayout=function(r,n){this.childOfName("line").stopAnimation(),this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");GR(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),a=r.childOfName("toSymbol"),i=r.getTextContent();if(!n&&!a&&(!i||i.ignore))return;for(var o=1,l=this.parent;l;)l.scaleX&&(o/=l.scaleX),l=l.parent;var s=r.childOfName("line");if(!this.__dirty&&!s.__dirty)return;var c=s.shape.percent,f=s.pointAt(0),h=s.pointAt(c),v=ys([],h,f);tf(v,v);function p(O,I){var z=O.__specifiedRotation;if(z==null){var V=s.tangentAt(I);O.attr("rotation",(I===1?-1:1)*Math.PI/2-Math.atan2(V[1],V[0]))}else O.attr("rotation",z)}if(n&&(n.setPosition(f),p(n,0),n.scaleX=n.scaleY=o*c,n.markRedraw()),a&&(a.setPosition(h),p(a,1),a.scaleX=a.scaleY=o*c,a.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var m=void 0,y=void 0,x=i.__labelDistance,b=x[0]*o,w=x[1]*o,C=c/2,A=s.tangentAt(C),M=[A[1],-A[0]],R=s.pointAt(C);M[1]>0&&(M[0]=-M[0],M[1]=-M[1]);var E=A[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var N=-Math.atan2(A[1],A[0]);h[0]<f[0]&&(N=Math.PI+N),i.rotation=N}var L=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":L=-w,y="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":L=w,y="top";break;default:L=0,y="middle"}switch(i.__position){case"end":i.x=v[0]*b+h[0],i.y=v[1]*w+h[1],m=v[0]>.8?"left":v[0]<-.8?"right":"center",y=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*b+f[0],i.y=-v[1]*w+f[1],m=v[0]>.8?"right":v[0]<-.8?"left":"center",y=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*E+f[0],i.y=f[1]+L,m=A[0]<0?"right":"left",i.originX=-b*E,i.originY=-L;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=R[0],i.y=R[1]+L,m="center",i.originY=-L;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*E+h[0],i.y=h[1]+L,m=A[0]>=0?"right":"left",i.originX=b*E,i.originY=-L;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||y,align:i.__align||m})}},t})(ze),sL=(function(){function e(t){this.group=new ze,this._LineCtor=t||lL}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=t,i||a.removeAll();var o=WV(t);t.diff(i).add(function(l){r._doAdd(t,l,o)}).update(function(l,s){r._doUpdate(i,t,s,l,o)}).remove(function(l){a.remove(i.getItemGraphicEl(l))}).execute()},e.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(r,n){r.updateLayout(t,n)},this)},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=WV(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[];function a(s){!s.isGroup&&!ESe(s)&&(s.incremental=n,s.ensureState("emphasis").hoverLayer=Vd)}for(var i=t.start;i<t.end;i++){var o=r.getItemLayout(i);if(YA(o)){var l=new this._LineCtor(r,i,this._seriesScope);l.traverse(a),this.group.add(l),r.setItemGraphicEl(i,l),this._progressiveEls.push(l)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){Qs(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var a=t.getItemLayout(r);if(YA(a)){var i=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,i),this.group.add(i)}},e.prototype._doUpdate=function(t,r,n,a,i){var o=t.getItemGraphicEl(n);if(!YA(r.getItemLayout(a))){this.group.remove(o);return}o?o.updateData(r,a,i):o=new this._LineCtor(r,a,i),r.setItemGraphicEl(a,o),this.group.add(o)},e})();function ESe(e){return e.animators&&e.animators.length>0}function WV(e){var t=e.hostModel,r=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Br(t)}}function qV(e){return isNaN(e[0])||isNaN(e[1])}function YA(e){return e&&!qV(e[0])&&!qV(e[1])}var $A=[],WA=[],qA=[],Ah=Rn,XA=Ms,XV=Math.abs;function ZV(e,t,r){for(var n=e[0],a=e[1],i=e[2],o=1/0,l,s=r*r,c=.1,f=.1;f<=.9;f+=.1){$A[0]=Ah(n[0],a[0],i[0],f),$A[1]=Ah(n[1],a[1],i[1],f);var h=XV(XA($A,t)-s);h<o&&(o=h,l=f)}for(var v=0;v<32;v++){var p=l+c;WA[0]=Ah(n[0],a[0],i[0],l),WA[1]=Ah(n[1],a[1],i[1],l),qA[0]=Ah(n[0],a[0],i[0],p),qA[1]=Ah(n[1],a[1],i[1],p);var h=XA(WA,t)-s;if(XV(h)<.01)break;var m=XA(qA,t)-s;c/=2,h<0?m>=0?l=l+c:l=l-c:m>=0?l=l-c:l=l+c}return l}function ZA(e,t){var r=[],n=Eg,a=[[],[],[]],i=[[],[]],o=[];t/=2,e.eachEdge(function(l,s){var c=l.getLayout(),f=l.getVisual("fromSymbol"),h=l.getVisual("toSymbol");c.__original||(c.__original=[po(c[0]),po(c[1])],c[2]&&c.__original.push(po(c[2])));var v=c.__original;if(c[2]!=null){if(vn(a[0],v[0]),vn(a[1],v[2]),vn(a[2],v[1]),f&&f!=="none"){var p=Kp(l.node1),m=ZV(a,v[0],p*t);n(a[0][0],a[1][0],a[2][0],m,r),a[0][0]=r[3],a[1][0]=r[4],n(a[0][1],a[1][1],a[2][1],m,r),a[0][1]=r[3],a[1][1]=r[4]}if(h&&h!=="none"){var p=Kp(l.node2),m=ZV(a,v[1],p*t);n(a[0][0],a[1][0],a[2][0],m,r),a[1][0]=r[1],a[2][0]=r[2],n(a[0][1],a[1][1],a[2][1],m,r),a[1][1]=r[1],a[2][1]=r[2]}vn(c[0],a[0]),vn(c[1],a[2]),vn(c[2],a[1])}else{if(vn(i[0],v[0]),vn(i[1],v[1]),ys(o,i[1],i[0]),tf(o,o),f&&f!=="none"){var p=Kp(l.node1);IS(i[0],i[0],o,p*t)}if(h&&h!=="none"){var p=Kp(l.node2);IS(i[1],i[1],o,-p*t)}vn(c[0],i[0]),vn(c[1],i[1])}})}var q$=it();function NSe(e){if(e)return q$(e).bridge}function KV(e,t){e&&(q$(e).bridge=t)}var LSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Kn,r}return t.prototype.init=function(r,n){var a=new Fm,i=new sL,o=this.group,l=new ze;this._controller=new pf(n.getZr()),l.add(a.group),l.add(i.group),o.add(l),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=l,this._firstRender=!0},t.prototype.render=function(r,n,a){var i=this,o=Lb(r),l=!1;this._model=r,this._api=a,this._active=!0;var s=this._mainGroup,c=this._getThumbnailInfo();c&&c.bridge.reset(a);var f=this._symbolDraw,h=this._lineDraw;o&&Gs(s,Eo,o,this._firstRender?null:r),ZA(r.getGraph(),Zp(r));var v=r.getData();f.updateData(v);var p=r.getEdgeData();h.updateData(p),this._updateNodeAndLinkScale(),o&&K_(r,a,this._controller,function(A,M,R){return r.coordinateSystem.containPoint([M,R])},null),clearTimeout(this._layoutTimeout);var m=r.forceLayout,y=r.get(["force","layoutAnimation"]);m&&(l=!0,this._startForceLayoutIteration(m,a,y));var x=r.get("layout");v.graph.eachNode(function(A){var M=A.dataIndex,R=A.getGraphicEl(),E=A.getModel();if(R){R.off("drag").off("dragend");var N=E.get("draggable");N&&R.on("drag",function(O){switch(x){case"force":m.warmUp(),!i._layouting&&i._startForceLayoutIteration(m,a,y),m.setFixed(M),v.setItemLayout(M,[R.x,R.y]);break;case"circular":v.setItemLayout(M,[R.x,R.y]),A.setLayout({fixed:!0},!0),oL(r,"symbolSize",A,[O.offsetX,O.offsetY]),i.updateLayout(r);break;default:v.setItemLayout(M,[R.x,R.y]),iL(r.getGraph(),r),i.updateLayout(r);break}}).on("dragend",function(){m&&m.setUnfixed(M)}),R.setDraggable(N,!!E.get("cursor"));var L=E.get(["emphasis","focus"]);L==="adjacency"&&($e(R).focus=A.getAdjacentDataIndices())}}),v.graph.eachEdge(function(A){var M=A.getGraphicEl(),R=A.getModel().get(["emphasis","focus"]);M&&R==="adjacency"&&($e(M).focus={edge:[A.dataIndex],node:[A.node1.dataIndex,A.node2.dataIndex]})});var b=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),w=v.getLayout("cx"),C=v.getLayout("cy");v.graph.eachNode(function(A){Y$(A,b,w,C)}),this._firstRender=!1,l||this._renderThumbnail(r,a,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(r,n,a){var i=this,o=!1;(function l(){r.step(function(s){i.updateLayout(i._model),(s||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!s)&&(a?i._layoutTimeout=setTimeout(l,16):l())})})()},t.prototype.__updateOnOwnRoam=function(r,n,a){var i=Lb(n);!this._active||!i||(Gs(this._mainGroup,Eo,i,null),y$(r)&&(this._updateNodeAndLinkScale(),ZA(n.getGraph(),Zp(n)),this._lineDraw.updateLayout(),a.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),a=Zp(r);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},t.prototype.updateLayout=function(r){this._active&&(ZA(r.getGraph(),Zp(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var a=NSe(r);if(a)return{bridge:a,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(Eb(null,r.coordSys),this._api)},t.prototype._renderThumbnail=function(r,n,a,i){var o=this._getThumbnailInfo();if(o){var l=new ze,s=a.group.children(),c=i.group.children(),f=new ze,h=new ze;l.add(h),l.add(f);for(var v=0;v<s.length;v++){var p=s[v],m=p.children()[0],y=p.x,x=p.y,b=je(m.shape),w=he(b,{width:m.scaleX,height:m.scaleY,x:y-m.scaleX/2,y:x-m.scaleY/2}),C=je(m.style),A=new m.constructor({shape:w,style:C,z2:151});h.add(A)}for(var v=0;v<c.length;v++){var p=c[v],M=p.children()[0],C=je(M.style),w=je(M.shape),R=new W$({style:C,shape:w,z2:151});f.add(R)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:l,targetTrans:Eb(null,o.coordSys)})}},t.type=Kn,t})(It),ISe=zr(Kn,OSe);function OSe(e){var t=e.findComponents({mainType:"legend"});!t||!t.length||e.eachSeriesByType(Kn,function(r){var n=r.getCategoriesData(),a=r.getGraph(),i=a.data,o=n.mapArray(n.getName);i.filterSelf(function(l){var s=i.getItemModel(l),c=s.getShallow("category");if(c!=null){pt(c)&&(c=o[c]);for(var f=0;f<t.length;f++)if(!t[f].isSelected(c))return!1}return!0})})}var kSe=zr(Kn,PSe);function PSe(e){var t={};e.eachSeriesByType(Kn,function(r){var n=r.getCategoriesData(),a=r.getData(),i={};n.each(function(o){var l=n.getName(o);i["ec-"+l]=o;var s=n.getItemModel(o),c=s.getModel("itemStyle").getItemStyle();c.fill||(c.fill=r.getColorFromPalette(l,t)),n.setItemVisual(o,"style",c);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++){var v=s.getShallow(f[h],!0);v!=null&&n.setItemVisual(o,f[h],v)}}),n.count()&&a.each(function(o){var l=a.getItemModel(o),s=l.getShallow("category");if(s!=null){De(s)&&(s=i["ec-"+s]);var c=n.getItemVisual(s,"style"),f=a.ensureUniqueItemVisual(o,"style");he(f,c);for(var h=["symbol","symbolSize","symbolKeepAspect"],v=0;v<h.length;v++)a.setItemVisual(o,h[v],n.getItemVisual(s,h[v]))}})})}function jSe(e){e.registerChartView(LSe),e.registerSeriesModel(gSe),e.registerProcessor(ISe),e.registerVisual(kSe),e.registerVisual(mSe),e.registerLayout(xSe),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,_Se),e.registerLayout(TSe),e.registerCoordinateSystem("graphView",{dimensions:X_.dimensions,create:MSe}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ur),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ur),XN(e,Do,Kn)}var um="chord",BSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new ev(Ee(this.getData,this),Ee(this.getRawData,this))},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},t.prototype.getInitialData=function(r,n){var a=r.edges||r.links||[],i=r.data||r.nodes||[];if(i&&a){var o=nL(i,a,this,!0,l);return o.data}function l(s,c){var f=ct.prototype.getModel;function h(p,m){var y=f.call(this,p,m);return y.resolveParentPath=v,y}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var m=p.slice();return p[0]==="label"?m[0]="edgeLabel":p[1]==="label"&&(m[1]="edgeLabel"),m}return p}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,a){var i=this.getDataParams(r,a);if(a==="edge"){var o=this.getData(),l=o.graph.getEdgeByIndex(r),s=o.getName(l.node1.dataIndex),c=o.getName(l.node2.dataIndex),f=[];return s!=null&&f.push(s),c!=null&&f.push(c),Rr("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return Rr("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(r,n){var a=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(r);if(a.name==null&&(a.name=i.getName(r)),a.value==null){var l=o.getLayout().value;a.value=l}}return a},t.type="series."+um,t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(Pt),QV=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;$e(i).dataType="node",i.z2=2;var o=new vt;return i.setTextContent(o),i.updateData(r,n,a,!0),i}return t.prototype.updateData=function(r,n,a,i){var o=this,l=r.graph.getNodeByIndex(n),s=r.hostModel,c=l.getModel(),f=c.getModel("emphasis"),h=r.getItemLayout(n),v=he(vo(c.getModel("itemStyle"),h,!0),h),p=this;if(isNaN(v.startAngle)){p.setShape(v);return}i?p.setShape(v):_t(p,{shape:v},s,n);var m=he(vo(c.getModel("itemStyle"),h,!0),h);o.setShape(m),o.useStyle(r.getItemVisual(n,"style")),jr(o,c),this._updateLabel(s,c,l),r.setItemGraphicEl(n,p),jr(p,c,"itemStyle");var y=f.get("focus");er(this,y==="adjacency"?l.getAdjacentDataIndices():y,f.get("blurScope"),f.get("disabled"))},t.prototype._updateLabel=function(r,n,a){var i=this.getTextContent(),o=a.getLayout(),l=(o.startAngle+o.endAngle)/2,s=Math.cos(l),c=Math.sin(l),f=n.getModel("label");i.ignore=!f.get("show");var h=Br(n),v=a.getVisual("style");Wr(i,h,{labelFetcher:{getFormattedLabel:function(w,C,A,M,R,E){return r.getFormattedLabel(w,C,"node",M,ca(R,h.normal&&h.normal.get("formatter"),n.get("name")),E)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var p=f.get("position")||"outside",m=f.get("distance")||0,y;p==="outside"?y=o.r+m:y=(o.r+o.r0)/2,this.textConfig={inside:p!=="outside"};var x=p!=="outside"?f.get("align")||"center":s>0?"left":"right",b=p!=="outside"?f.get("verticalAlign")||"middle":c>0?"top":"bottom";i.attr({x:s*y+o.cx,y:c*y+o.cy,rotation:0,style:{align:x,verticalAlign:b}})},t})(qn),zSe=(function(e){ee(t,e);function t(r,n,a,i){var o=e.call(this)||this;return $e(o).dataType="edge",o.updateData(r,n,a,i,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),r.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),r.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,a,i,o){var l=r.hostModel,s=n.graph.getEdgeByIndex(a),c=s.getLayout(),f=s.node1.getModel(),h=n.getItemModel(s.dataIndex),v=h.getModel("lineStyle"),p=h.getModel("emphasis"),m=p.get("focus"),y=he(vo(f.getModel("itemStyle"),c,!0),c),x=this;if(isNaN(y.sStartAngle)||isNaN(y.tStartAngle)){x.setShape(y);return}o?(x.setShape(y),JV(x,s,r,v)):(ui(x),JV(x,s,r,v),_t(x,{shape:y},l,a)),er(this,m==="adjacency"?s.getAdjacentDataIndices():m,p.get("blurScope"),p.get("disabled")),jr(x,h,"lineStyle"),n.setItemGraphicEl(s.dataIndex,x)},t})(yt);function JV(e,t,r,n){var a=t.node1,i=t.node2,o=e.style;e.setStyle(n.getLineStyle());var l=n.get("color");switch(l){case"source":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var s=r.getItemVisual(a.dataIndex,"style").fill,c=r.getItemVisual(i.dataIndex,"style").fill;if(De(s)&&De(c)){var f=e.shape,h=(f.s1[0]+f.s2[0])/2,v=(f.s1[1]+f.s2[1])/2,p=(f.t1[0]+f.t2[0])/2,m=(f.t1[1]+f.t2[1])/2;o.fill=new lf(h,v,p,m,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var VSe=Math.PI/180,FSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=um,r}return t.prototype.init=function(r,n){},t.prototype.render=function(r,n,a){var i=r.getData(),o=this._data,l=this.group,s=-r.get("startAngle")*VSe;if(i.diff(o).add(function(f){var h=i.getItemLayout(f);if(h){var v=new QV(i,f,s);$e(v).dataIndex=f,l.add(v)}}).update(function(f,h){var v=o.getItemGraphicEl(h),p=i.getItemLayout(f);if(!p){v&&pl(v,r,h);return}v?v.updateData(i,f,s):v=new QV(i,f,s),l.add(v)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&pl(h,r,f)}).execute(),!o){var c=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Re(c[0],a.getWidth()),this.group.originY=Re(c[1],a.getHeight()),ir(this.group,{scaleX:1,scaleY:1},r)}this._data=i,this.renderEdges(r,s)},t.prototype.renderEdges=function(r,n){var a=r.getData(),i=r.getEdgeData(),o=this._edgeData,l=this.group;i.diff(o).add(function(s){var c=new zSe(a,i,s,n);$e(c).dataIndex=s,l.add(c)}).update(function(s,c){var f=o.getItemGraphicEl(c);f.updateData(a,i,s,n),l.add(f)}).remove(function(s){var c=o.getItemGraphicEl(s);c&&pl(c,r,s)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type=um,t})(It),KA=Math.PI/180,GSe=zr(um,HSe);function HSe(e,t){e.eachSeriesByType(um,function(r){USe(r,t)})}function USe(e,t){var r=e.getData(),n=r.graph,a=e.getEdgeData(),i=a.count();if(i){var o=J8(e,t),l=o.cx,s=o.cy,c=o.r,f=o.r0,h=Math.max((e.get("padAngle")||0)*KA,0),v=Math.max((e.get("minAngle")||0)*KA,0),p=-e.get("startAngle")*KA,m=p+Math.PI*2,y=e.get("clockwise"),x=y?1:-1,b=[p,m];D_(b,!y);var w=b[0],C=b[1],A=C-w,M=r.getSum("value")===0&&a.getSum("value")===0,R=[],E=0;n.eachEdge(function(P){var q=M?1:P.getValue("value");M&&(q>0||v)&&(E+=2);var G=P.node1.dataIndex,W=P.node2.dataIndex;R[G]=(R[G]||0)+q,R[W]=(R[W]||0)+q});var N=0;if(n.eachNode(function(P){var q=P.getValue("value");isNaN(q)||(R[P.dataIndex]=Math.max(q,R[P.dataIndex]||0)),!M&&(R[P.dataIndex]>0||v)&&E++,N+=R[P.dataIndex]||0}),!(E===0||N===0)){h*E>=Math.abs(A)&&(h=Math.max(0,(Math.abs(A)-v*E)/E)),(h+v)*E>=Math.abs(A)&&(v=(Math.abs(A)-h*E)/E);var L=(A-h*E*x)/N,O=0,I=0,z=0;n.eachNode(function(P){var q=R[P.dataIndex]||0,G=L*(N?q:1)*x;Math.abs(G)<v?O+=v-Math.abs(G):(I+=Math.abs(G)-v,z+=Math.abs(G)),P.setLayout({angle:G,value:q})});var V=!1;if(O>I){var Y=O/I;n.eachNode(function(P){var q=P.getLayout().angle;Math.abs(q)>=v?P.setLayout({angle:q*Y,ratio:Y},!0):P.setLayout({angle:v,ratio:v===0?1:q/v},!0)})}else n.eachNode(function(P){if(!V){var q=P.getLayout().angle,G=Math.min(q/z,1),W=G*O;q-W<v&&(V=!0)}});var H=O;n.eachNode(function(P){if(!(H<=0)){var q=P.getLayout().angle;if(q>v&&v>0){var G=V?1:Math.min(q/z,1),W=q-v,Z=Math.min(W,Math.min(H,O*G));H-=Z,P.setLayout({angle:q-Z,ratio:(q-Z)/q},!0)}else v>0&&P.setLayout({angle:v,ratio:q===0?1:v/q},!0)}});var F=w,X=[];n.eachNode(function(P){var q=Math.max(P.getLayout().angle,v);P.setLayout({cx:l,cy:s,r0:f,r:c,startAngle:F,endAngle:F+q*x,clockwise:y},!0),X[P.dataIndex]=F,F+=(q+h)*x}),n.eachEdge(function(P){var q=M?1:P.getValue("value"),G=L*(N?q:1)*x,W=P.node1.dataIndex,Z=X[W]||0,Q=Math.abs((P.node1.getLayout().ratio||1)*G),U=Z+Q*x,K=[l+f*Math.cos(Z),s+f*Math.sin(Z)],se=[l+f*Math.cos(U),s+f*Math.sin(U)],ge=P.node2.dataIndex,ue=X[ge]||0,de=Math.abs((P.node2.getLayout().ratio||1)*G),me=ue+de*x,ae=[l+f*Math.cos(ue),s+f*Math.sin(ue)],ye=[l+f*Math.cos(me),s+f*Math.sin(me)];P.setLayout({s1:K,s2:se,sStartAngle:Z,sEndAngle:U,t1:ae,t2:ye,tStartAngle:ue,tEndAngle:me,cx:l,cy:s,r:f,value:q,clockwise:y}),X[W]=U,X[ge]=me})}}}function YSe(e){e.registerChartView(FSe),e.registerSeriesModel(BSe),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,GSe),e.registerProcessor(Um("chord"))}var $Se=(function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e})(),WSe=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new $Se},t.prototype.buildPath=function(r,n){var a=Math.cos,i=Math.sin,o=n.r,l=n.width,s=n.angle,c=n.x-a(s)*l*(l>=o/3?1:2),f=n.y-i(s)*l*(l>=o/3?1:2);s=n.angle-Math.PI/2,r.moveTo(c,f),r.lineTo(n.x+a(s)*l,n.y+i(s)*l),r.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),r.lineTo(n.x-a(s)*l,n.y-i(s)*l),r.lineTo(c,f)},t})(yt);function qSe(e,t){var r=e.get("center"),n=t.getWidth(),a=t.getHeight(),i=Math.min(n,a),o=Re(r[0],t.getWidth()),l=Re(r[1],t.getHeight()),s=Re(e.get("radius"),i/2);return{cx:o,cy:l,r:s}}function bx(e,t){var r=e==null?"":e+"";return t&&(De(t)?r=t.replace("{value}",r):Be(t)&&(r=t(e))),r}var XSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){this.group.removeAll();var i=r.get(["axisLine","lineStyle","color"]),o=qSe(r,a);this._renderMain(r,n,a,i,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,a,i,o){var l=this.group,s=r.get("clockwise"),c=-r.get("startAngle")/180*Math.PI,f=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),v=h.get("roundCap"),p=v?Db:qn,m=h.get("show"),y=h.getModel("lineStyle"),x=y.get("width"),b=[c,f];D_(b,!s),c=b[0],f=b[1];for(var w=f-c,C=c,A=[],M=0;m&&M<i.length;M++){var R=Math.min(Math.max(i[M][0],0),1);f=c+w*R;var E=new p({shape:{startAngle:C,endAngle:f,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-x,r:o.r},silent:!0});E.setStyle({fill:i[M][1]}),E.setStyle(y.getLineStyle(["color","width"])),A.push(E),C=f}A.reverse(),B(A,function(L){return l.add(L)});var N=function(L){if(L<=0)return i[0][1];var O;for(O=0;O<i.length;O++)if(i[O][0]>=L&&(O===0?0:i[O-1][0])<L)return i[O][1];return i[O-1][1]};this._renderTicks(r,n,a,N,o,c,f,s,x),this._renderTitleAndDetail(r,n,a,N,o),this._renderAnchor(r,o),this._renderPointer(r,n,a,N,o,c,f,s,x)},t.prototype._renderTicks=function(r,n,a,i,o,l,s,c,f){for(var h=this.group,v=o.cx,p=o.cy,m=o.r,y=+r.get("min"),x=+r.get("max"),b=r.getModel("splitLine"),w=r.getModel("axisTick"),C=r.getModel("axisLabel"),A=r.get("splitNumber"),M=w.get("splitNumber"),R=Re(b.get("length"),m),E=Re(w.get("length"),m),N=l,L=(s-l)/A,O=L/M,I=b.getModel("lineStyle").getLineStyle(),z=w.getModel("lineStyle").getLineStyle(),V=b.get("distance"),Y,H,F=0;F<=A;F++){if(Y=Math.cos(N),H=Math.sin(N),b.get("show")){var X=V?V+f:f,P=new Mr({shape:{x1:Y*(m-X)+v,y1:H*(m-X)+p,x2:Y*(m-R-X)+v,y2:H*(m-R-X)+p},style:I,silent:!0});I.stroke==="auto"&&P.setStyle({stroke:i(F/A)}),h.add(P)}if(C.get("show")){var X=C.get("distance")+V,q=bx(xt(F*(x-y)/A+y,Vse),C.get("formatter")),G=i(F/A),W=Y*(m-R-X)+v,Z=H*(m-R-X)+p,Q=C.get("rotate"),U=0;Q==="radial"?(U=-N+2*Math.PI,U>Math.PI/2&&(U+=Math.PI)):Q==="tangential"?U=-N-Math.PI/2:pt(Q)&&(U=Q*Math.PI/180),U===0?h.add(new vt({style:Gt(C,{text:q,x:W,y:Z,verticalAlign:H<-.8?"top":H>.8?"bottom":"middle",align:Y<-.4?"left":Y>.4?"right":"center"},{inheritColor:G}),silent:!0})):h.add(new vt({style:Gt(C,{text:q,x:W,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:W,originY:Z,rotation:U}))}if(w.get("show")&&F!==A){var X=w.get("distance");X=X?X+f:f;for(var K=0;K<=M;K++){Y=Math.cos(N),H=Math.sin(N);var se=new Mr({shape:{x1:Y*(m-X)+v,y1:H*(m-X)+p,x2:Y*(m-E-X)+v,y2:H*(m-E-X)+p},silent:!0,style:z});z.stroke==="auto"&&se.setStyle({stroke:i((F+K/M)/A)}),h.add(se),N+=O}N-=O}else N+=L}},t.prototype._renderPointer=function(r,n,a,i,o,l,s,c,f){var h=this.group,v=this._data,p=this._progressEls,m=[],y=r.get(["pointer","show"]),x=r.getModel("progress"),b=x.get("show"),w=r.getData(),C=w.mapDimension("value"),A=+r.get("min"),M=+r.get("max"),R=[A,M],E=[l,s];function N(O,I){var z=w.getItemModel(O),V=z.getModel("pointer"),Y=Re(V.get("width"),o.r),H=Re(V.get("length"),o.r),F=r.get(["pointer","icon"]),X=V.get("offsetCenter"),P=Re(X[0],o.r),q=Re(X[1],o.r),G=V.get("keepAspect"),W;return F?W=wr(F,P-Y/2,q-H,Y,H,null,G):W=new WSe({shape:{angle:-Math.PI/2,width:Y,r:H,x:P,y:q}}),W.rotation=-(I+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function L(O,I){var z=x.get("roundCap"),V=z?Db:qn,Y=x.get("overlap"),H=Y?x.get("width"):f/w.count(),F=Y?o.r-H:o.r-(O+1)*H,X=Y?o.r:o.r-O*H,P=new V({shape:{startAngle:l,endAngle:I,cx:o.cx,cy:o.cy,clockwise:c,r0:F,r:X}});return Y&&(P.z2=St(w.get(C,O),[A,M],[100,0],!0)),P}(b||y)&&(w.diff(v).add(function(O){var I=w.get(C,O);if(y){var z=N(O,l);ir(z,{rotation:-((isNaN(+I)?E[0]:St(I,R,E,!0))+Math.PI/2)},r),h.add(z),w.setItemGraphicEl(O,z)}if(b){var V=L(O,l),Y=x.get("clip");ir(V,{shape:{endAngle:St(I,R,E,Y)}},r),h.add(V),XM(r.seriesIndex,w.dataType,O,V),m[O]=V}}).update(function(O,I){var z=w.get(C,O);if(y){var V=v.getItemGraphicEl(I),Y=V?V.rotation:l,H=N(O,Y);H.rotation=Y,_t(H,{rotation:-((isNaN(+z)?E[0]:St(z,R,E,!0))+Math.PI/2)},r),h.add(H),w.setItemGraphicEl(O,H)}if(b){var F=p[I],X=F?F.shape.endAngle:l,P=L(O,X),q=x.get("clip");_t(P,{shape:{endAngle:St(z,R,E,q)}},r),h.add(P),XM(r.seriesIndex,w.dataType,O,P),m[O]=P}}).execute(),w.each(function(O){var I=w.getItemModel(O),z=I.getModel("emphasis"),V=z.get("focus"),Y=z.get("blurScope"),H=z.get("disabled"),F=i(St(w.get(C,O),R,[0,1],!0));if(y){var X=w.getItemGraphicEl(O),P=w.getItemVisual(O,"style"),q=P.fill;if(X instanceof Xr){var G=X.style;X.useStyle(he({image:G.image,x:G.x,y:G.y,width:G.width,height:G.height},P))}else X.useStyle(P),X.type!=="pointer"&&X.setColor(q);X.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),X.style.fill==="auto"&&X.setStyle("fill",F),X.z2EmphasisLift=0,jr(X,I),er(X,V,Y,H)}if(b){var W=m[O];W.useStyle(w.getItemVisual(O,"style")),W.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),W.style.fill==="auto"&&W.setStyle("fill",F),W.z2EmphasisLift=0,jr(W,I),er(W,V,Y,H)}}),this._progressEls=m)},t.prototype._renderAnchor=function(r,n){var a=r.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),l=a.get("icon"),s=a.get("offsetCenter"),c=a.get("keepAspect"),f=wr(l,n.cx-o/2+Re(s[0],n.r),n.cy-o/2+Re(s[1],n.r),o,o,null,c);f.z2=a.get("showAbove")?1:0,f.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(r,n,a,i,o){var l=this,s=r.getData(),c=s.mapDimension("value"),f=+r.get("min"),h=+r.get("max"),v=new ze,p=[],m=[],y=r.isAnimationEnabled(),x=r.get(["pointer","showAbove"]);s.diff(this._data).add(function(b){p[b]=new vt({silent:!0}),m[b]=new vt({silent:!0})}).update(function(b,w){p[b]=l._titleEls[w],m[b]=l._detailEls[w]}).execute(),s.each(function(b){var w=s.getItemModel(b),C=s.get(c,b),A=new ze,M=i(St(C,[f,h],[0,1],!0)),R=w.getModel("title");if(R.get("show")){var E=R.get("offsetCenter"),N=o.cx+Re(E[0],o.r),L=o.cy+Re(E[1],o.r),O=p[b];O.attr({z2:x?0:2,style:Gt(R,{x:N,y:L,text:s.getName(b),align:"center",verticalAlign:"middle"},{inheritColor:M})}),A.add(O)}var I=w.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),V=o.cx+Re(z[0],o.r),Y=o.cy+Re(z[1],o.r),H=Re(I.get("width"),o.r),F=Re(I.get("height"),o.r),X=r.get(["progress","show"])?s.getItemVisual(b,"style").fill:M,O=m[b],P=I.get("formatter");O.attr({z2:x?0:2,style:Gt(I,{x:V,y:Y,text:bx(C,P),width:isNaN(H)?null:H,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:X})}),N8(O,{normal:I},C,function(G){return bx(G,P)}),y&&hfe(O,b,s,r,{getFormattedLabel:function(G,W,Z,Q,U,K){return bx(K?K.interpolatedValue:C,P)}}),A.add(O)}v.add(A)}),this.group.add(v),this._titleEls=p,this._detailEls=m},t.type="gauge",t})(It),ZSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="itemStyle",r}return t.prototype.getInitialData=function(r,n){return Jd(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,re.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:re.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:re.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:re.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:re.color.neutral00,borderWidth:0,borderColor:re.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:re.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:re.color.transparent,borderWidth:0,borderColor:re.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:re.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Pt);function KSe(e){e.registerChartView(XSe),e.registerSeriesModel(ZSe)}var bd="funnel",QSe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ev(Ee(this.getData,this),Ee(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return Jd(this,{coordDimensions:["value"],encodeDefaulter:et(oN,this)})},t.prototype._defaultLabelLine=function(r){Lc(r,"labelLine",["show"]);var n=r.labelLine,a=r.emphasis.labelLine;n.show=n.show&&r.label.show,a.show=a.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),a=e.prototype.getDataParams.call(this,r),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,r)/o*100).toFixed(2):0,a.$vars.push("percent"),a},t.type="series."+bd,t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:re.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:re.color.primary}}},t})(Pt),JSe=["itemStyle","opacity"],ebe=(function(e){ee(t,e);function t(r,n){var a=e.call(this)||this,i=a,o=new On,l=new vt;return i.setTextContent(l),a.setTextGuideLine(o),a.updateData(r,n,!0),a}return t.prototype.updateData=function(r,n,a){var i=this,o=r.hostModel,l=r.getItemModel(n),s=r.getItemLayout(n),c=l.getModel("emphasis"),f=l.get(JSe);f=f??1,a||ui(i),i.useStyle(r.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:s.points}),i.style.opacity=0,ir(i,{style:{opacity:f}},o,n)):_t(i,{style:{opacity:f},shape:{points:s.points}},o,n),jr(i,l),this._updateLabel(r,n),er(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),l=r.hostModel,s=r.getItemModel(n),c=r.getItemLayout(n),f=c.label,h=r.getItemVisual(n,"style"),v=h.fill;Wr(o,Br(s),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var p=s.getModel("label"),m=p.get("color"),y=m==="inherit"?v:null;a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:y,outsideFill:y});var x=f.linePoints;i.setShape({points:x}),a.textGuideLineConfig={anchor:x?new Qe(x[0][0],x[0][1]):null},_t(o,{style:{x:f.x,y:f.y}},l,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),a9(a,i9(s),{stroke:v})},t})(Xn),tbe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=bd,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,a){var i=r.getData(),o=this._data,l=this.group;i.diff(o).add(function(s){var c=new ebe(i,s);i.setItemGraphicEl(s,c),l.add(c)}).update(function(s,c){var f=o.getItemGraphicEl(c);f.updateData(i,s),l.add(f),i.setItemGraphicEl(s,f)}).remove(function(s){var c=o.getItemGraphicEl(s);pl(c,r,s)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=bd,t})(It);function rbe(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(s){return s}),a=[],i=t==="ascending",o=0,l=e.count();o<l;o++)a[o]=o;return Be(t)?a.sort(t):t!=="none"&&a.sort(function(s,c){return i?n[s]-n[c]:n[c]-n[s]}),a}function nbe(e){var t=e.hostModel,r=X$(t);e.each(function(n){var a=e.getItemModel(n),i=a.getModel("label"),o=i.get("position"),l=a.getModel("labelLine"),s=e.getItemLayout(n),c=s.points,f=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,v,p,m;if(f)o==="insideLeft"?(v=(c[0][0]+c[3][0])/2+5,p=(c[0][1]+c[3][1])/2,h="left"):o==="insideRight"?(v=(c[1][0]+c[2][0])/2-5,p=(c[1][1]+c[2][1])/2,h="right"):(v=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,p=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,h="center"),m=[[v,p],[v,p]];else{var y=void 0,x=void 0,b=void 0,w=void 0,C=l.get("length");De(o)&&(!r&&qe(["top","bottom"],o)>-1&&(o="left"),r&&qe(["left","right"],o)>-1&&(o="bottom")),o==="left"?(y=(c[3][0]+c[0][0])/2,x=(c[3][1]+c[0][1])/2,b=y-C,v=b-5,h="right"):o==="right"?(y=(c[1][0]+c[2][0])/2,x=(c[1][1]+c[2][1])/2,b=y+C,v=b+5,h="left"):o==="top"?(y=(c[3][0]+c[0][0])/2,x=(c[3][1]+c[0][1])/2,w=x-C,p=w-5,h="center"):o==="bottom"?(y=(c[1][0]+c[2][0])/2,x=(c[1][1]+c[2][1])/2,w=x+C,p=w+5,h="center"):o==="rightTop"?(y=r?c[3][0]:c[1][0],x=r?c[3][1]:c[1][1],r?(w=x-C,p=w-5,h="center"):(b=y+C,v=b+5,h="top")):o==="rightBottom"?(y=c[2][0],x=c[2][1],r?(w=x+C,p=w+5,h="center"):(b=y+C,v=b+5,h="bottom")):o==="leftTop"?(y=c[0][0],x=r?c[0][1]:c[1][1],r?(w=x-C,p=w-5,h="center"):(b=y-C,v=b-5,h="right")):o==="leftBottom"?(y=r?c[1][0]:c[3][0],x=r?c[1][1]:c[2][1],r?(w=x+C,p=w+5,h="center"):(b=y-C,v=b-5,h="right")):(y=(c[1][0]+c[2][0])/2,x=(c[1][1]+c[2][1])/2,r?(w=x+C,p=w+5,h="center"):(b=y+C,v=b+5,h="left")),r?(b=y,v=b):(w=x,p=w),m=[[y,x],[b,w]]}s.label={linePoints:m,x:v,y:p,verticalAlign:"middle",textAlign:h,inside:f}})}var abe=zr(bd,ibe);function ibe(e,t){e.eachSeriesByType(bd,function(r){var n=r.getData(),a=n.mapDimension("value"),i=r.get("sort"),o=Vr(r,t),l=Qt(r.getBoxLayoutParams(),o.refContainer),s=X$(r),c=l.width,f=l.height,h=rbe(n,i),v=l.x,p=l.y,m=s?[Re(r.get("minSize"),f),Re(r.get("maxSize"),f)]:[Re(r.get("minSize"),c),Re(r.get("maxSize"),c)],y=n.getDataExtent(a),x=r.get("min"),b=r.get("max");x==null&&(x=Math.min(y[0],0)),b==null&&(b=y[1]);var w=r.get("funnelAlign"),C=r.get("gap"),A=s?c:f,M=(A-C*(n.count()-1))/n.count(),R=function(H,F){if(s){var X=n.get(a,H)||0,P=St(X,[x,b],m,!0),q=void 0;switch(w){case"top":q=p;break;case"center":q=p+(f-P)/2;break;case"bottom":q=p+(f-P);break}return[[F,q],[F,q+P]]}var G=n.get(a,H)||0,W=St(G,[x,b],m,!0),Z;switch(w){case"left":Z=v;break;case"center":Z=v+(c-W)/2;break;case"right":Z=v+c-W;break}return[[Z,F],[Z+W,F]]};i==="ascending"&&(M=-M,C=-C,s?v+=c:p+=f,h=h.reverse());for(var E=0;E<h.length;E++){var N=h[E],L=h[E+1],O=n.getItemModel(N);if(s){var I=O.get(["itemStyle","width"]);I==null?I=M:(I=Re(I,c),i==="ascending"&&(I=-I));var z=R(N,v),V=R(L,v+I);v+=I+C,n.setItemLayout(N,{points:z.concat(V.slice().reverse())})}else{var Y=O.get(["itemStyle","height"]);Y==null?Y=M:(Y=Re(Y,f),i==="ascending"&&(Y=-Y));var z=R(N,p),V=R(L,p+Y);p+=Y+C,n.setItemLayout(N,{points:z.concat(V.slice().reverse())})}}nbe(n)})}function X$(e){return e.get("orient")==="horizontal"}function obe(e){e.registerChartView(tbe),e.registerSeriesModel(QSe),e.registerLayout(abe),e.registerProcessor(Um(bd))}var lbe=.3,sbe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new ze,r._initialized=!1,r}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(r,n,a,i){var o=this._dataGroup;this._progressiveEls=[],o.removeAll();var l=r.getData(),s=this._data,c=r.coordinateSystem,f=c.dimensions,h=tF(r);l.diff(s).add(v).update(p).remove(m).execute();function v(x){var b=eF(l,o,x,f,c);QA(b,l,x,h)}function p(x,b){var w=s.getItemGraphicEl(b);o.add(w);var C=Z$(l,x,f,c);l.setItemGraphicEl(x,w),_t(w,{shape:{points:C}},r,x),ui(w),QA(w,l,x,h)}function m(x){var b=s.getItemGraphicEl(x);o.remove(b)}if(!this._initialized){this._initialized=!0;var y=ube(c,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(y)}this._data=l},t.prototype.incrementalPrepareRender=function(r,n,a){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(r,n,a){for(var i=n.getData(),o=n.coordinateSystem,l=this._progressiveEls=[],s=r.start;s<r.end;s++){var c=eF(i,this._dataGroup,s,o.dimensions,o);c.incremental=yo(n),QA(c,i,s,tF(n)),l.push(c)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t})(It);function ube(e,t,r){var n=e.model,a=e.getRect(),i=new at({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o=n.get("layout")==="horizontal"?"width":"height";return i.setShape(o,0),ir(i,{shape:{width:a.width,height:a.height}},t,r),i}function Z$(e,t,r,n){for(var a=[],i=0;i<r.length;i++){var o=r[i],l=e.get(e.mapDimension(o),t);cbe(l,n.getAxis(o).type)||a.push(n.dataToPoint(l,o))}return a}function eF(e,t,r,n,a){var i=Z$(e,r,n,a),o=new On({shape:{points:i},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function tF(e){var t=e.get("smooth",!0);return t===!0&&(t=lbe),t=Ao(t),xn(t)&&(t=0),{smooth:t}}function QA(e,t,r,n){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",n.smooth);var a=t.getItemModel(r),i=a.getModel("emphasis");jr(e,a,"lineStyle"),er(e,i.get("focus"),i.get("blurScope"),i.get("disabled"))}function cbe(e,t){return t==="category"?e==null:e==null||isNaN(e)}var fbe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.getInitialData=function(r,n){return Oo(null,this,{useEncodeDefaulter:Ee(hbe,null,this)})},t.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,a=this.getData(),i=[];return n.eachActiveState(a,function(o,l){r===o&&i.push(a.getRawIndex(l))}),i},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:300,smooth:!1,animationEasing:"linear"},t})(Pt);function hbe(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return B(t.dimensions,function(n){var a=dbe(n);r[n]=a}),r}}function dbe(e){return+e.replace("dim","")}var vbe=["lineStyle","opacity"],pbe={seriesType:"parallel",reset:function(e,t){var r=e.coordinateSystem,n={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(a,i){r.eachActiveState(i,function(o,l){var s=n[o];if(o==="normal"&&i.hasItemOption){var c=i.getItemModel(l).get(vbe,!0);c!=null&&(s=c)}var f=i.ensureUniqueItemVisual(l,"style");f.opacity=s},a.start,a.end)}}}};function gbe(e){mbe(e),ybe(e)}function mbe(e){if(!e.parallel){var t=!1;B(e.series,function(r){r&&r.type==="parallel"&&(t=!0)}),t&&(e.parallel=[{}])}}function ybe(e){var t=ar(e.parallelAxis);B(t,function(r){if(Ve(r)){var n=r.parallelIndex||0,a=ar(e.parallel)[n];a&&a.parallelAxisDefault&&Je(r,a.parallelAxisDefault,!1)}})}var xbe=5,Sbe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){this._model=r,this._api=a,this._handlers||(this._handlers={},B(bbe,function(i,o){a.getZr().on(o,this._handlers[o]=Ee(i,this))},this)),Yd(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(r,n){Ug(this,"_throttledDispatchExpand"),B(this._handlers,function(a,i){n.getZr().off(i,a)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},t.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(he({type:"parallelAxisExpand"},r))},t.type="parallel",t})(Ht),bbe={mousedown:function(e){JA(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(JA(this,"click")&&t){var r=[e.offsetX,e.offsetY],n=Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2);if(n>xbe)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!JA(this,"mousemove"))){var t=this._model,r=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function JA(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var jb="parallel",HR=jb,_be=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(r){var n=this.option;r&&Je(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var a=r.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},t.prototype.setAxisExpand=function(r){B(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},t.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],a=Bt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);B(a,function(i){r.push("dim"+i.get("dim")),n.push(i.componentIndex)})},t.type=HR,t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(lt),wbe=(function(e){ee(t,e);function t(r,n,a,i,o){var l=e.call(this,r,n,a)||this;return l.type=i||"value",l.axisIndex=o,l}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(di);function Hs(e,t,r,n,a,i){e=e||0;var o=rc(r[1],-r[0]);if(a!=null&&(a=Dh(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var l=Math.abs(rc(t[1],-t[0]));l=Dh(l,[0,o]),a=i=Dh(l,[a,i]),n=0}t[0]=Dh(t[0],r),t[1]=Dh(t[1],r);var s=eD(t,n);t[n]+=e;var c=a||0,f=r.slice();s.sign<0?f[0]=rc(f[0],c):f[1]=rc(f[1],-c),t[n]=Dh(t[n],f);var h;return h=eD(t,n),a!=null&&(h.sign!==s.sign||h.span<a)&&(t[1-n]=rc(t[n],s.sign*a)),h=eD(t,n),i!=null&&h.span>i&&(t[1-n]=rc(t[n],h.sign*i)),t}function eD(e,t){var r=e[t]-e[1-t];return{span:Math.abs(r),sign:r>0?-1:r<0?1:t?-1:1}}function Dh(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var Cbe=(function(){function e(t,r,n){this.type=jb,this._axesMap=Le(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var a=t.dimensions,i=t.parallelAxisIndex;B(a,function(o,l){var s=i[l],c=r.getComponent("parallelAxis",s),f=Bm(c),h=this._axesMap.set(o,new wbe(o,Xd(c,f,!1),[0,0],f,s));h.onBand=zm(h.scale,c),h.inverse=c.get("inverse"),c.axis=h,h.model=c,h.coordinateSystem=c.coordinateSystem=this},this)},e.prototype.update=function(t,r){B(this.dimensions,function(n){var a=this._axesMap.get(n);Gc(a,md),yd(a)},this)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,a=r.layoutBase,i=r.pixelDimIndex,o=t[1-i],l=t[i];return o>=n&&o<=n+r.axisLength&&l>=a&&l<=a+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype.resize=function(t,r){var n=Vr(t,r).refContainer;this._rect=Qt(t.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var t=this._model,r=this._rect,n=["x","y"],a=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,l=r[a[o]],s=[0,l],c=this.dimensions.length,f=_x(t.get("axisExpandWidth"),s),h=_x(t.get("axisExpandCount")||0,[0,c]),v=t.get("axisExpandable")&&c>3&&c>h&&h>1&&f>0&&l>0,p=t.get("axisExpandWindow"),m;if(p)m=_x(p[1]-p[0],s),p[1]=p[0]+m;else{m=_x(f*(h-1),s);var y=t.get("axisExpandCenter")||li(c/2);p=[f*y-m/2],p[1]=p[0]+m}var x=(l-m)/(c-h);x<3&&(x=0);var b=[li(xt(p[0]/f,1))+1,nf(xt(p[1]/f,1))-1],w=x/f*p[0];return{layout:i,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:l,axisBase:r[n[1-o]],axisLength:r[a[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:x,axisExpandWindow:p,axisCount:c,winInnerIndices:b,axisExpandWindow0Pos:w}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;r.each(function(o){var l=[0,a.axisLength],s=o.inverse?1:0;o.setExtent(l[s],l[1-s])}),B(n,function(o,l){var s=(a.axisExpandable?Abe:Tbe)(l,a),c={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},f={horizontal:$S/2,vertical:0},h=[c[i].x+t.x,c[i].y+t.y],v=f[i],p=lr();Zs(p,p,v),Ei(p,p,h),this._axesLayout[o]={position:h,rotation:v,transform:p,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(t){return this._axesMap.get(t)},e.prototype.dataToPoint=function(t,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(t),r)},e.prototype.eachActiveState=function(t,r,n,a){n==null&&(n=0),a==null&&(a=t.count());var i=this._axesMap,o=this.dimensions,l=[],s=[];B(o,function(x){l.push(t.mapDimension(x)),s.push(i.get(x).model)});for(var c=this.hasAxisBrushed(),f=n;f<a;f++){var h=void 0;if(!c)h="normal";else{h="active";for(var v=t.getValues(l,f),p=0,m=o.length;p<m;p++){var y=s[p].getActiveState(v[p]);if(y==="inactive"){h="inactive";break}}}r(h,f)}},e.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,r=this._axesMap,n=!1,a=0,i=t.length;a<i;a++)r.get(t[a]).model.getActiveState()!=="normal"&&(n=!0);return n},e.prototype.axisCoordToPoint=function(t,r){var n=this._axesLayout[r];return Ri([t,0],n.transform)},e.prototype.getAxisLayout=function(t){return je(this._axesLayout[t])},e.prototype.getSlidedAxisExpandWindow=function(t){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,a=r.axisExpandWindow.slice(),i=a[1]-a[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:a};var l=t[n]-r.layoutBase-r.axisExpandWindow0Pos,s,c="slide",f=r.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),v=h[0]!=null;if(f)v&&f&&l<i*h[0]?(c="jump",s=l-i*h[2]):v&&f&&l>i*(1-h[0])?(c="jump",s=l-i*(1-h[2])):(s=l-i*h[1])>=0&&(s=l-i*(1-h[1]))<=0&&(s=0),s*=r.axisExpandWidth/f,s?Hs(s,a,o,"all"):c="none";else{var p=a[1]-a[0],m=o[1]*l/p;a=[st(0,m-p/2)],a[1]=kt(o[1],a[0]+p),a[0]=a[1]-p}return{axisExpandWindow:a,behavior:c}},e})();function _x(e,t){return kt(st(e,t[0]),t[1])}function Tbe(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function Abe(e,t){var r=t.layoutLength,n=t.axisExpandWidth,a=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,l,s=i,c=!1,f;return e<o[0]?(l=e*i,f=i):e<=o[1]?(l=t.axisExpandWindow0Pos+e*n-t.axisExpandWindow[0],s=n,c=!0):(l=r-(a-1-e)*i,f=i),{position:l,axisNameAvailableWidth:s,axisLabelShow:c,nameTruncateMaxWidth:f}}function Dbe(e,t){var r=[];return e.eachComponent(HR,function(n,a){var i=new Cbe(n,e,t);i.name="parallel_"+a,i.resize(n,t),n.coordinateSystem=i,i.model=n,r.push(i)}),e.eachSeries(function(n){if(n.get("coordinateSystem")===jb){var a=n.getReferringComponents(HR,dr).models[0],i=n.coordinateSystem=a.coordinateSystem;i&&B(i.dimensions,function(o){Fc(i.getAxis(o),n,jb)})}}),r}var Mbe={create:Dbe},UR=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.activeIntervals=[],r}return t.prototype.getAreaSelectStyle=function(){return Oc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=je(r);if(n)for(var a=n.length-1;a>=0;a--)nn(n[a])},t.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=r&&r<=a[1])return"active"}else for(var i=0,o=n.length;i<o;i++)if(n[i][0]<=r&&r<=n[i][1])return"active";return"inactive"},t})(lt);Cr(UR,Kd);var Zc=!0,cm=Math.min,_d=Math.max,Rbe=Math.pow,Ebe=1e4,Nbe=6,Lbe=6,rF="globalPan",Ibe={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},Obe={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},nF={brushStyle:{lineWidth:2,stroke:re.color.backgroundTint,fill:re.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},kbe=0,uL=(function(e){ee(t,e);function t(r){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=r,n.group=new ze,n._uid="brushController_"+kbe++,B(Gbe,function(a,i){this._handlers[i]=Ee(a,this)},n),n}return t.prototype.enableBrush=function(r){return this._brushType&&this._doDisableBrush(),r.brushType&&this._doEnableBrush(r),this},t.prototype._doEnableBrush=function(r){var n=this._zr;this._enableGlobalPan||Kye(n,rF,this._uid),B(this._handlers,function(a,i){n.on(i,a)}),this._brushType=r.brushType,this._brushOption=Je(je(nF),r,!0)},t.prototype._doDisableBrush=function(){var r=this._zr;Qye(r,rF,this._uid),B(this._handlers,function(n,a){r.off(a,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};B(r,function(a){n[a.panelId]=je(a)})}else this._panels=null;return this},t.prototype.mount=function(r){r=r||{},this._enableGlobalPan=r.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:r.x||0,y:r.y||0,rotation:r.rotation||0,scaleX:r.scaleX||1,scaleY:r.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(r){r=xe(r,function(v){return Je(je(nF),v,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,l=this._creatingCover;return new hf(a,r,c,s).add(f).update(f).remove(h).execute(),this;function s(v,p){return(v.id!=null?v.id:n+p)+"-"+v.brushType}function c(v,p){return s(v.__brushOption,p)}function f(v,p){var m=r[v];if(p!=null&&a[p]===l)i[v]=a[p];else{var y=i[v]=p!=null?(a[p].__brushOption=m,a[p]):Q$(o,K$(o,m));cL(o,y)}}function h(v){a[v]!==l&&o.group.remove(a[v])}},t.prototype.unmount=function(){return this.enableBrush(!1),YR(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(fi);function K$(e,t){var r=e1[t.brushType].createCover(e,t);return r.__brushOption=t,eW(r,t),e.group.add(r),r}function Q$(e,t){var r=fL(t);return r.endCreating&&(r.endCreating(e,t),eW(t,t.__brushOption)),t}function J$(e,t){var r=t.__brushOption;fL(t).updateCoverShape(e,t,r.range,r)}function eW(e,t){var r=t.z;r==null&&(r=Ebe),e.traverse(function(n){n.z=r,n.z2=r})}function cL(e,t){fL(t).updateCommon(e,t),J$(e,t)}function fL(e){return e1[e.__brushOption.brushType]}function hL(e,t,r){var n=e._panels;if(!n)return Zc;var a,i=e._transform;return B(n,function(o){o.isTargetByCursor(t,r,i)&&(a=o)}),a}function tW(e,t){var r=e._panels;if(!r)return Zc;var n=t.__brushOption.panelId;return n!=null?r[n]:Zc}function YR(e){var t=e._covers,r=t.length;return B(t,function(n){e.group.remove(n)},e),t.length=0,!!r}function Kc(e,t){var r=xe(e._covers,function(n){var a=n.__brushOption,i=je(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Pbe(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],n=t[0],a=r[0]-n[0],i=r[1]-n[1],o=Rbe(a*a+i*i,.5);return o>Nbe}function rW(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function nW(e,t,r,n){var a=new ze;return a.add(new at({name:"main",style:dL(r),silent:!0,draggable:!0,cursor:"move",drift:et(aF,e,t,a,["n","s","w","e"]),ondragend:et(Kc,t,{isEnd:!0})})),B(n,function(i){a.add(new at({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:et(aF,e,t,a,i),ondragend:et(Kc,t,{isEnd:!0})}))}),a}function aW(e,t,r,n){var a=n.brushStyle.lineWidth||0,i=_d(a,Lbe),o=r[0][0],l=r[1][0],s=o-a/2,c=l-a/2,f=r[0][1],h=r[1][1],v=f-i+a/2,p=h-i+a/2,m=f-o,y=h-l,x=m+a,b=y+a;tl(e,t,"main",o,l,m,y),n.transformable&&(tl(e,t,"w",s,c,i,b),tl(e,t,"e",v,c,i,b),tl(e,t,"n",s,c,x,i),tl(e,t,"s",s,p,x,i),tl(e,t,"nw",s,c,i,i),tl(e,t,"ne",v,c,i,i),tl(e,t,"sw",s,p,i,i),tl(e,t,"se",v,p,i,i))}function $R(e,t){var r=t.__brushOption,n=r.transformable,a=t.childAt(0);a.useStyle(dL(r)),a.attr({silent:!n,cursor:n?"move":"default"}),B([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),l=i.length===1?WR(e,i[0]):Bbe(e,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?Obe[l]+"-resize":null})})}function tl(e,t,r,n,a,i,o){var l=t.childOfName(r);l&&l.setShape(Vbe(vL(e,t,[[n,a],[n+i,a+o]])))}function dL(e){return Ue({strokeNoScale:!0},e.brushStyle)}function iW(e,t,r,n){var a=[cm(e,r),cm(t,n)],i=[_d(e,r),_d(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function jbe(e){return wc(e.group)}function WR(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=E_(r[t],jbe(e));return n[a]}function Bbe(e,t){var r=[WR(e,t[0]),WR(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function aF(e,t,r,n,a,i){var o=r.__brushOption,l=e.toRectRange(o.range),s=oW(t,a,i);B(n,function(c){var f=Ibe[c];l[f[0]][f[1]]+=s[f[0]]}),o.range=e.fromRectRange(iW(l[0][0],l[1][0],l[0][1],l[1][1])),cL(t,r),Kc(t,{isEnd:!1})}function zbe(e,t,r,n){var a=t.__brushOption.range,i=oW(e,r,n);B(a,function(o){o[0]+=i[0],o[1]+=i[1]}),cL(e,t),Kc(e,{isEnd:!1})}function oW(e,t,r){var n=e.group,a=n.transformCoordToLocal(t,r),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function vL(e,t,r){var n=tW(e,t);return n&&n!==Zc?n.clipPath(r,e._transform):je(r)}function Vbe(e){var t=cm(e[0][0],e[1][0]),r=cm(e[0][1],e[1][1]),n=_d(e[0][0],e[1][0]),a=_d(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:a-r}}function Fbe(e,t,r){if(!(!e._brushType||Hbe(e,t.offsetX,t.offsetY))){var n=e._zr,a=e._covers,i=hL(e,t,r);if(!e._dragging)for(var o=0;o<a.length;o++){var l=a[o].__brushOption;if(i&&(i===Zc||l.panelId===i.panelId)&&e1[l.brushType].contain(a[o],r[0],r[1]))return}i&&n.setCursorStyle("crosshair")}}function qR(e){var t=e.event;t.preventDefault&&t.preventDefault()}function XR(e,t,r){return e.childOfName("main").contain(t,r)}function lW(e,t,r,n){var a=e._creatingCover,i=e._creatingPanel,o=e._brushOption,l;if(e._track.push(r.slice()),Pbe(e)||a){if(i&&!a){o.brushMode==="single"&&YR(e);var s=je(o);s.brushType=iF(s.brushType,i),s.panelId=i===Zc?null:i.panelId,a=e._creatingCover=K$(e,s),e._covers.push(a)}if(a){var c=e1[iF(e._brushType,i)],f=a.__brushOption;f.range=c.getCreatingRange(vL(e,a,e._track)),n&&(Q$(e,a),c.updateCommon(e,a)),J$(e,a),l={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&hL(e,t,r)&&YR(e)&&(l={isEnd:n,removeOnClick:!0});return l}function iF(e,t){return e==="auto"?t.defaultBrushType:e}var Gbe={mousedown:function(e){if(this._dragging)oF(this,e);else if(!e.target||!e.target.draggable){qR(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=hL(this,e,t);r&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,r=e.offsetY,n=this.group.transformCoordToLocal(t,r);if(Fbe(this,e,n),this._dragging){qR(e);var a=lW(this,e,n,!1);a&&Kc(this,a)}},mouseup:function(e){oF(this,e)}};function oF(e,t){if(e._dragging){qR(t);var r=t.offsetX,n=t.offsetY,a=e.group.transformCoordToLocal(r,n),i=lW(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&Kc(e,i)}}function Hbe(e,t,r){var n=e._zr;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var e1={lineX:lF(0),lineY:lF(1),rect:{createCover:function(e,t){function r(n){return n}return nW({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=rW(e);return iW(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){aW(e,t,r,n)},updateCommon:$R,contain:XR},polygon:{createCover:function(e,t){var r=new ze;return r.add(new On({name:"main",style:dL(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Xn({name:"main",draggable:!0,drift:et(zbe,e,t),ondragend:et(Kc,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:vL(e,t,r)})},updateCommon:$R,contain:XR}};function lF(e){return{createCover:function(t,r){return nW({toRectRange:function(n){var a=[n,[0,100]];return e&&a.reverse(),a},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=rW(t),n=cm(r[0][e],r[1][e]),a=_d(r[0][e],r[1][e]);return[n,a]},updateCoverShape:function(t,r,n,a){var i,o=tW(t,r);if(o!==Zc&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(e);else{var l=t._zr;i=[0,[l.getWidth(),l.getHeight()][1-e]]}var s=[n,i];e&&s.reverse(),aW(t,r,s,a)},updateCommon:$R,contain:XR}}function sW(e){return e=pL(e),function(t){return VE(t,e)}}function uW(e,t){return e=pL(e),function(r){var n=t??r,a=n?e.width:e.height,i=n?e.x:e.y;return[i,i+(a||0)]}}function cW(e,t,r){var n=pL(e);return function(a,i){return n.contain(i[0],i[1])&&!n$(a,t,r)}}function pL(e){return Fe.create(e)}var Ube=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){e.prototype.init.apply(this,arguments),(this._brushController=new uL(n.getZr())).on("brush",Ee(this._onBrush,this))},t.prototype.render=function(r,n,a,i){if(!Ybe(r,n,i)){this.axisModel=r,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ze,this.group.add(this._axisGroup),!!r.get("show")){var l=Wbe(r,n),s=l.coordinateSystem,c=r.getAreaSelectStyle(),f=c.width,h=r.axis.dim,v=s.getAxisLayout(h),p=he({strokeContainThreshold:f},v),m=new Yn(r,a,p);m.build(),this._axisGroup.add(m.group),this._refreshBrushController(p,c,r,l,f,a),Lm(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,a,i,o,l){var s=a.axis.getExtent(),c=s[1]-s[0],f=Math.min(30,Math.abs(c)*.1),h=Fe.create({x:s[0],y:-o/2,width:c,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:sW(h),isTargetByCursor:cW(h,l,i),getLinearBrushOtherExtent:uW(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers($be(a))},t.prototype._onBrush=function(r){var n=r.areas,a=this.axisModel,i=a.axis,o=xe(n,function(l){return[i.coordToData(l.range[0],!0),i.coordToData(l.range[1],!0)]});(!a.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(Ht);function Ybe(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function $be(e){var t=e.axis;return xe(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function Wbe(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var qbe={type:"axisAreaSelect",event:"axisAreaSelected"};function Xbe(e){e.registerAction(qbe,function(t,r){r.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),e.registerAction("parallelAxisExpand",function(t,r){r.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var Zbe={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function fW(e){e.registerComponentView(Sbe),e.registerComponentModel(_be),e.registerCoordinateSystem("parallel",Mbe),e.registerPreprocessor(gbe),e.registerComponentModel(UR),e.registerComponentView(Ube),Sd(e,"parallel",UR,Zbe),Xbe(e)}function Kbe(e){qr(fW),e.registerChartView(sbe),e.registerSeriesModel(fbe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,pbe)}var Rl="sankey",Qbe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){var a=r.edges||r.links||[],i=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var l=this.levelModels,s=0;s<o.length;s++)o[s].depth!=null&&o[s].depth>=0&&(l[o[s].depth]=new ct(o[s],this,n));var c=nL(i,a,this,!0,f);return c.data;function f(h,v){h.wrapMethod("getItemModel",function(p,m){var y=p.parentModel,x=y.getData().getItemLayout(m);if(x){var b=x.depth,w=y.levelModels[b];w&&(p.parentModel=w)}return p}),v.wrapMethod("getItemModel",function(p,m){var y=p.parentModel,x=y.getGraph().getEdgeByIndex(m),b=x.node1.getLayout();if(b){var w=b.depth,C=y.levelModels[w];C&&(p.parentModel=C)}return p})}},t.prototype.setNodePosition=function(r,n){var a=this.option.data||this.option.nodes,i=a[r];i.localX=n[0],i.localY=n[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,a){function i(p){return isNaN(p)||p==null}if(a==="edge"){var o=this.getDataParams(r,a),l=o.data,s=o.value,c=l.source+" -- "+l.target;return Rr("nameValue",{name:c,value:s,noValue:i(s)})}else{var f=this.getGraph().getNodeByIndex(r),h=f.getLayout().value,v=this.getDataParams(r,a).data.name;return Rr("nameValue",{name:v!=null?v+"":null,value:h,noValue:i(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var a=e.prototype.getDataParams.call(this,r,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(r),o=i.getLayout().value;a.value=o}return a},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type="series."+Rl,t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:re.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:re.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Pt),Jbe=(function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e})(),e_e=(function(e){ee(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Jbe},t.prototype.buildPath=function(r,n){var a=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+a,n.y2),r.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(r.lineTo(n.x2,n.y2+a),r.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),r.closePath()},t.prototype.highlight=function(){Tl(this)},t.prototype.downplay=function(){Al(this)},t})(yt),t_e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Rl,r._mainGroup=new ze,r}return t.prototype.init=function(r,n){this._controller=new pf(n.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(r,n,a){var i=r.getGraph(),o=this._mainGroup,l=r.layoutInfo,s=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),v=r.get("orient");o.removeAll(),o.x=l.x,o.y=l.y,this._updateViewCoordSys(r,a),K_(r,a,this._controller,g$(o),null),i.eachEdge(function(p){var m=new e_e,y=$e(m);y.dataIndex=p.dataIndex,y.seriesIndex=r.seriesIndex,y.dataType="edge";var x=p.getModel(),b=x.getModel("lineStyle"),w=b.get("curveness"),C=p.node1.getLayout(),A=p.node1.getModel(),M=A.get("localX"),R=A.get("localY"),E=p.node2.getLayout(),N=p.node2.getModel(),L=N.get("localX"),O=N.get("localY"),I=p.getLayout(),z,V,Y,H,F,X,P,q;m.shape.extent=Math.max(1,I.dy),m.shape.orient=v,v==="vertical"?(z=(M!=null?M*s:C.x)+I.sy,V=(R!=null?R*c:C.y)+C.dy,Y=(L!=null?L*s:E.x)+I.ty,H=O!=null?O*c:E.y,F=z,X=V*(1-w)+H*w,P=Y,q=V*w+H*(1-w)):(z=(M!=null?M*s:C.x)+C.dx,V=(R!=null?R*c:C.y)+I.sy,Y=L!=null?L*s:E.x,H=(O!=null?O*c:E.y)+I.ty,F=z*(1-w)+Y*w,X=V,P=z*w+Y*(1-w),q=H),m.setShape({x1:z,y1:V,x2:Y,y2:H,cpx1:F,cpy1:X,cpx2:P,cpy2:q}),m.useStyle(b.getItemStyle()),sF(m.style,v,p);var G=""+x.get("value"),W=Br(x,"edgeLabel");Wr(m,W,{labelFetcher:{getFormattedLabel:function(U,K,se,ge,ue,de){return r.getFormattedLabel(U,K,"edge",ge,ca(ue,W.normal&&W.normal.get("formatter"),G),de)}},labelDataIndex:p.dataIndex,defaultText:G}),m.setTextConfig({position:"inside"});var Z=x.getModel("emphasis");jr(m,x,"lineStyle",function(U){var K=U.getItemStyle();return sF(K,v,p),K}),o.add(m),h.setItemGraphicEl(p.dataIndex,m);var Q=Z.get("focus");er(m,Q==="adjacency"?p.getAdjacentDataIndices():Q==="trajectory"?p.getTrajectoryDataIndices():Q,Z.get("blurScope"),Z.get("disabled"))}),i.eachNode(function(p){var m=p.getLayout(),y=p.getModel(),x=y.get("localX"),b=y.get("localY"),w=y.getModel("emphasis"),C=y.get(["itemStyle","borderRadius"])||0,A=new at({shape:{x:x!=null?x*s:m.x,y:b!=null?b*c:m.y,width:m.dx,height:m.dy,r:C},style:y.getModel("itemStyle").getItemStyle(),z2:10});Wr(A,Br(y),{labelFetcher:{getFormattedLabel:function(R,E){return r.getFormattedLabel(R,E,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),A.disableLabelAnimation=!0,A.setStyle("fill",p.getVisual("color")),A.setStyle("decal",p.getVisual("style").decal),jr(A,y),o.add(A),f.setItemGraphicEl(p.dataIndex,A),$e(A).dataType="node";var M=w.get("focus");er(A,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,w.get("blurScope"),w.get("disabled"))}),f.eachItemGraphicEl(function(p,m){var y=f.getItemModel(m);y.get("draggable")&&(p.drift=function(x,b){this.shape.x+=x,this.shape.y+=b,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(m),localX:this.shape.x/s,localY:this.shape.y/c})},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&o.setClipPath(r_e(o.getBoundingRect(),r,function(){o.removeClipPath()})),this._data=r.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(r,n,a){Gs(this.group,Eo,n.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(r,n){var a=r.layoutInfo,i=r.coordinateSystem=ZN(r,n,a.x,a.y,a.width,a.height);Gs(this.group,Eo,i,this._firstRender?null:r)},t.type=Rl,t})(It);function sF(e,t,r){switch(e.fill){case"source":e.fill=r.node1.getVisual("color"),e.decal=r.node1.getVisual("style").decal;break;case"target":e.fill=r.node2.getVisual("color"),e.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),a=r.node2.getVisual("color");De(n)&&De(a)&&(e.fill=new lf(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function r_e(e,t,r){var n=new at({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ir(n,{shape:{width:e.width+20}},t,r),n}var n_e=zr(Rl,a_e);function a_e(e,t){e.eachSeriesByType(Rl,function(r){var n=r.get("nodeWidth"),a=r.get("nodeGap"),i=Vr(r,t).refContainer,o=Qt(r.getBoxLayoutParams(),i);r.layoutInfo=o;var l=o.width,s=o.height,c=r.getGraph(),f=c.nodes,h=c.edges;o_e(f);var v=Bt(f,function(x){return x.getLayout().value===0}),p=v.length!==0?0:r.get("layoutIterations"),m=r.get("orient"),y=r.get("nodeAlign");i_e(f,h,n,a,l,s,p,m,y)})}function i_e(e,t,r,n,a,i,o,l,s){l_e(e,t,r,a,i,l,s),f_e(e,t,i,a,n,o,l),S_e(e,l)}function o_e(e){B(e,function(t){var r=Ps(t.outEdges,Bb),n=Ps(t.inEdges,Bb),a=t.getValue()||0,i=Math.max(r,n,a);t.setLayout({value:i},!0)})}function l_e(e,t,r,n,a,i,o){for(var l=[],s=[],c=[],f=[],h=0,v=0;v<t.length;v++)l[v]=1;for(var v=0;v<e.length;v++)s[v]=e[v].inEdges.length,s[v]===0&&c.push(e[v]);for(var p=-1;c.length;){for(var m=0;m<c.length;m++){var y=c[m],x=y.hostGraph.data.getRawDataItem(y.dataIndex),b=x.depth!=null&&x.depth>=0;b&&x.depth>p&&(p=x.depth),y.setLayout({depth:b?x.depth:h},!0),i==="vertical"?y.setLayout({dy:r},!0):y.setLayout({dx:r},!0);for(var w=0;w<y.outEdges.length;w++){var C=y.outEdges[w],A=qe(t,C);l[A]=0;var M=C.node2,R=qe(e,M);--s[R]===0&&qe(f,M)<0&&f.push(M)}}++h,c=f,f=[]}for(var v=0;v<l.length;v++)if(l[v]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var E=p>h-1?p:h-1;o&&o!=="left"&&s_e(e,o,i,E);var N=i==="vertical"?(a-r)/E:(n-r)/E;c_e(e,N,i)}function hW(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function s_e(e,t,r,n){if(t==="right"){for(var a=[],i=e,o=0;i.length;){for(var l=0;l<i.length;l++){var s=i[l];s.setLayout({skNodeHeight:o},!0);for(var c=0;c<s.inEdges.length;c++){var f=s.inEdges[c];qe(a,f.node1)<0&&a.push(f.node1)}}i=a,a=[],++o}B(e,function(h){hW(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&u_e(e,n)}function u_e(e,t){B(e,function(r){!hW(r)&&!r.outEdges.length&&r.setLayout({depth:t},!0)})}function c_e(e,t,r){B(e,function(n){var a=n.getLayout().depth*t;r==="vertical"?n.setLayout({y:a},!0):n.setLayout({x:a},!0)})}function f_e(e,t,r,n,a,i,o){var l=h_e(e,o);d_e(l,t,r,n,a,o),tD(l,a,r,n,o);for(var s=1;i>0;i--)s*=.99,v_e(l,s,o),tD(l,a,r,n,o),x_e(l,s,o),tD(l,a,r,n,o)}function h_e(e,t){var r=[],n=t==="vertical"?"y":"x",a=HM(e,function(i){return i.getLayout()[n]});return nn(a.keys),B(a.keys,function(i){r.push(a.buckets.get(i))}),r}function d_e(e,t,r,n,a,i){var o=1/0;B(e,function(l){var s=l.length,c=0;B(l,function(h){c+=h.getLayout().value});var f=i==="vertical"?(n-(s-1)*a)/c:(r-(s-1)*a)/c;f<o&&(o=f)}),B(e,function(l){B(l,function(s,c){var f=s.getLayout().value*o;i==="vertical"?(s.setLayout({x:c},!0),s.setLayout({dx:f},!0)):(s.setLayout({y:c},!0),s.setLayout({dy:f},!0))})}),B(t,function(l){var s=+l.getValue()*o;l.setLayout({dy:s},!0)})}function tD(e,t,r,n,a){var i=a==="vertical"?"x":"y";B(e,function(o){o.sort(function(y,x){return y.getLayout()[i]-x.getLayout()[i]});for(var l,s,c,f=0,h=o.length,v=a==="vertical"?"dx":"dy",p=0;p<h;p++)s=o[p],c=f-s.getLayout()[i],c>0&&(l=s.getLayout()[i]+c,a==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),f=s.getLayout()[i]+s.getLayout()[v]+t;var m=a==="vertical"?n:r;if(c=f-t-m,c>0){l=s.getLayout()[i]-c,a==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0),f=l;for(var p=h-2;p>=0;--p)s=o[p],c=s.getLayout()[i]+s.getLayout()[v]+t-f,c>0&&(l=s.getLayout()[i]-c,a==="vertical"?s.setLayout({x:l},!0):s.setLayout({y:l},!0)),f=s.getLayout()[i]}})}function v_e(e,t,r){B(e.slice().reverse(),function(n){B(n,function(a){if(a.outEdges.length){var i=Ps(a.outEdges,p_e,r)/Ps(a.outEdges,Bb);if(isNaN(i)){var o=a.outEdges.length;i=o?Ps(a.outEdges,g_e,r)/o:0}if(r==="vertical"){var l=a.getLayout().x+(i-Us(a,r))*t;a.setLayout({x:l},!0)}else{var s=a.getLayout().y+(i-Us(a,r))*t;a.setLayout({y:s},!0)}}})})}function p_e(e,t){return Us(e.node2,t)*e.getValue()}function g_e(e,t){return Us(e.node2,t)}function m_e(e,t){return Us(e.node1,t)*e.getValue()}function y_e(e,t){return Us(e.node1,t)}function Us(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Bb(e){return e.getValue()}function Ps(e,t,r){for(var n=0,a=e.length,i=-1;++i<a;){var o=+t(e[i],r);isNaN(o)||(n+=o)}return n}function x_e(e,t,r){B(e,function(n){B(n,function(a){if(a.inEdges.length){var i=Ps(a.inEdges,m_e,r)/Ps(a.inEdges,Bb);if(isNaN(i)){var o=a.inEdges.length;i=o?Ps(a.inEdges,y_e,r)/o:0}if(r==="vertical"){var l=a.getLayout().x+(i-Us(a,r))*t;a.setLayout({x:l},!0)}else{var s=a.getLayout().y+(i-Us(a,r))*t;a.setLayout({y:s},!0)}}})})}function S_e(e,t){var r=t==="vertical"?"x":"y";B(e,function(n){n.outEdges.sort(function(a,i){return a.node2.getLayout()[r]-i.node2.getLayout()[r]}),n.inEdges.sort(function(a,i){return a.node1.getLayout()[r]-i.node1.getLayout()[r]})}),B(e,function(n){var a=0,i=0;B(n.outEdges,function(o){o.setLayout({sy:a},!0),a+=o.getLayout().dy}),B(n.inEdges,function(o){o.setLayout({ty:i},!0),i+=o.getLayout().dy})})}var b_e=zr(Rl,__e);function __e(e){e.eachSeriesByType(Rl,function(t){var r=t.getGraph(),n=r.nodes,a=r.edges;if(n.length){var i=1/0,o=-1/0;B(n,function(l){var s=l.getLayout().value;s<i&&(i=s),s>o&&(o=s)}),B(n,function(l){var s=new $r({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),c=s.mapValueToVisual(l.getLayout().value),f=l.getModel().get(["itemStyle","color"]);f!=null?(l.setVisual("color",f),l.setVisual("style",{fill:f})):(l.setVisual("color",c),l.setVisual("style",{fill:c}))})}a.length&&B(a,function(l){var s=l.getModel().get("lineStyle");l.setVisual("style",s)})})}function w_e(e){e.registerChartView(t_e),e.registerSeriesModel(Qbe),e.registerLayout(n_e),e.registerVisual(b_e),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:Do,subType:Rl,query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),XN(e,Do,Rl)}var dW=(function(){function e(){}return e.prototype._hasEncodeRule=function(t){var r=this.getEncode();return r&&r.get(t)!=null},e.prototype.getInitialData=function(t,r){var n,a=r.getComponent("xAxis",this.get("xAxisIndex")),i=r.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),l=i.get("type"),s,c=t.layout;o==="category"?(c="horizontal",n=a.getOrdinalMeta(),s=!this._hasEncodeRule("x")):l==="category"&&(c="vertical",n=i.getOrdinalMeta(),s=!this._hasEncodeRule("y")),c||(c=l==="time"?"vertical":"horizontal"),this._layout=c;var f=["x","y"],h=c==="horizontal"?0:1,v=this._baseAxisDim=f[h],p=f[1-h],m=[a,i],y=m[h].get("type"),x=m[1-h].get("type"),b=t.data;if(b&&s){var w=[];B(b,function(M,R){var E;pe(M)?(E=M.slice(),M.unshift(R)):pe(M.value)?(E=he({},M),E.value=E.value.slice(),M.value.unshift(R)):E=M,w.push(E)}),t.data=w}var C=this.defaultValueDimensions,A=[{name:v,type:db(y),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:db(x),dimsDef:C.slice()}];return Jd(this,{coordDimensions:A,dimensionsCount:C.length+1,encodeDefaulter:et(o7,A,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e})();function zb(e,t){for(var r=t.ends.length,n=0,a=0;a<r;a++)e.contain(t.ends[a][0],t.ends[a][1])&&n++;return n?n<r?Kg:Zg:Qg}var So="boxplot",vW=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return t.type="series."+So,t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,boxWidth:[7,50],itemStyle:{color:re.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:re.color.shadow}},animationDuration:800},t})(Pt);Cr(vW,dW,!0);var C_e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=So,r}return t.prototype.render=function(r,n,a){var i=r.getData(),o=this.group,l=this._data;this._data||o.removeAll();var s=r.getWhiskerBoxesLayout()==="horizontal"?1:0,c=r.get("clip",!0),f=r.coordinateSystem,h=f.getArea&&f.getArea(),v=c&&Hc(f,!1,r);i.diff(l).add(function(p){if(i.hasValue(p)){var m=i.getItemLayout(p),y=c?zb(h,m):Zg;if(y===Qg)return;var x=uF(m,i,p,s,!0);Uh(y===Kg,x,v),i.setItemGraphicEl(p,x),o.add(x)}}).update(function(p,m){var y=l.getItemGraphicEl(m);if(!i.hasValue(p)){o.remove(y);return}var x=i.getItemLayout(p),b=c?zb(h,x):Zg;if(b===Qg){o.remove(y);return}y?(ui(y),pW(x,y,i,p)):y=uF(x,i,p,s),Uh(b===Kg,y,v),o.add(y),i.setItemGraphicEl(p,y)}).remove(function(p){var m=l.getItemGraphicEl(p);m&&o.remove(m)}).execute(),this._data=i},t.prototype.remove=function(r){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},t.type=So,t})(It),T_e=(function(){function e(){}return e})(),A_e=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new T_e},t.prototype.buildPath=function(r,n){var a=n.points,i=0;for(r.moveTo(a[i][0],a[i][1]),i++;i<4;i++)r.lineTo(a[i][0],a[i][1]);for(r.closePath();i<a.length;i++)r.moveTo(a[i][0],a[i][1]),i++,r.lineTo(a[i][0],a[i][1])},t})(yt);function uF(e,t,r,n,a){var i=e.ends,o=new A_e({shape:{points:a?D_e(i,n,e):i}});return pW(e,o,t,r,a),o}function pW(e,t,r,n,a){var i=r.hostModel,o=sf[a?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},i,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var l=r.getItemModel(n),s=l.getModel("emphasis");jr(t,l),er(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function D_e(e,t,r){return xe(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}var M_e=kd(),R_e=zr(So,E_e);function E_e(e){var t=Ac(So);IN(e,t,function(r){var n=Npe(r,t);if(n){var a=N_e(r,n);Vc(r,t,function(i){var o=i.seriesIndex;L_e(i,a.boxOffsetList[o],a.boxWidthList[o])})}})}function N_e(e,t){var r=[],n=[],a=[],i=Zn(e,{fromStat:{key:Ac(So)},min:1}).w;Vc(e,Ac(So),function(f){var h=f.get("boxWidth");pe(h)||(h=[h,h]),a[f.seriesIndex]=[Re(h[0],i)||0,Re(h[1],i)||0]});var o=i*.8-2,l=o/t*.3,s=(o-l*(t-1))/t,c=s/2-o/2;return Vc(e,Ac(So),function(f){var h=f.seriesIndex;n[h]=c,c+=l+s,r[h]=kt(st(s,a[h][0]),a[h][1])}),{boxOffsetList:n,boxWidthList:r}}function L_e(e,t,r){var n=e.coordinateSystem,a=e.getData(),i=r/2,o=e.getWhiskerBoxesLayout()==="horizontal"?0:1,l=1-o,s=["x","y"],c=a.mapDimension(s[o]),f=a.mapDimensionsAll(s[l]);if(c==null||f.length<5)return;for(var h=0;h<a.count();h++){var v=a.get(c,h),p=C(v,f[2],h),m=C(v,f[0],h),y=C(v,f[1],h),x=C(v,f[3],h),b=C(v,f[4],h),w=[];A(w,y,!1),A(w,x,!0),w.push(m,y,b,x),M(w,m),M(w,b),M(w,p),a.setItemLayout(h,{initBaseline:p[l],ends:w})}function C(R,E,N){var L=a.get(E,N),O=[];O[o]=R,O[l]=L;var I;return isNaN(R)||isNaN(L)?I=[NaN,NaN]:(I=n.dataToPoint(O),I[o]+=t),I}function A(R,E,N){var L=E.slice(),O=E.slice();L[o]+=i,O[o]-=i,N?R.push(L,O):R.push(O,L)}function M(R,E){var N=E.slice(),L=E.slice();N[o]-=i,L[o]+=i,R.push(N,L)}}function I_e(e){M_e(e,function(){var t=Ac(So);ON(e,{key:t,seriesType:So,getMetrics:zN}),Y_(t,$_(t))})}function O_e(e,t){t=t||{};for(var r=[],n=[],a=t.boundIQR,i=a==="none"||a===0,o=0;o<e.length;o++){var l=nn(e[o].slice()),s=nS(l,.25),c=nS(l,.5),f=nS(l,.75),h=l[0],v=l[l.length-1],p=(a??1.5)*(f-s),m=i?h:Math.max(h,s-p),y=i?v:Math.min(v,f+p),x=t.itemNameFormatter,b=Be(x)?x({value:o}):De(x)?x.replace("{value}",o+""):o+"";r.push([b,m,s,c,f,y]);for(var w=0;w<l.length;w++){var C=l[w];if(C<m||C>y){var A=[b,C];n.push(A)}}}return{boxData:r,outliers:n}}var k_e={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==an){var n="";wt(n)}var a=O_e(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function P_e(e){e.registerSeriesModel(vW),e.registerChartView(C_e),e.registerLayout(R_e),e.registerTransform(k_e),I_e(e)}var Ys="candlestick",gW=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(r,n,a){var i=n.getItemLayout(r);return i&&a.rect(i.brushRect)},t.type="series."+Ys,t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t})(Pt);Cr(gW,dW,!0);var j_e=["itemStyle","borderColor"],B_e=["itemStyle","borderColor0"],z_e=["itemStyle","borderColorDoji"],V_e=["itemStyle","color"],F_e=["itemStyle","color0"];function gL(e,t){return t.get(e>0?V_e:F_e)}function mL(e,t){return t.get(e===0?z_e:e>0?j_e:B_e)}var G_e={seriesType:Ys,plan:Ud(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),l=a.getItemLayout(i).sign,s=o.getItemStyle();s.fill=gL(l,o),s.stroke=mL(l,o)||s.fill;var c=a.ensureUniqueItemVisual(i,"style");he(c,s)}}}}}},H_e=["color","borderColor"],U_e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,a){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){Qs(this._progressiveEls||this.group,r)},t.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(r){var n=r.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),l=r.get("clip",!0),s=r.coordinateSystem,c=s.getArea&&s.getArea(),f=l&&Hc(s,!1,r);this._data||i.removeAll();var h=cF(r);n.diff(a).add(function(v){if(n.hasValue(v)){var p=n.getItemLayout(v),m=l?zb(c,p):Zg;if(m===Qg)return;var y=rD(p,v,h,!0);ir(y,{shape:{points:p.ends}},r,v),Uh(m===Kg,y,f),nD(y,n,v,o),i.add(y),n.setItemGraphicEl(v,y)}}).update(function(v,p){var m=a.getItemGraphicEl(p);if(!n.hasValue(v)){i.remove(m);return}var y=n.getItemLayout(v),x=l?zb(c,y):Zg;if(x===Qg){i.remove(m);return}m?(_t(m,{shape:{points:y.ends}},r,v),ui(m)):m=rD(y,v,h),nD(m,n,v,o),Uh(x===Kg,m,f),i.add(m),n.setItemGraphicEl(v,m)}).remove(function(v){var p=a.getItemGraphicEl(v);p&&i.remove(p)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),fF(r,this.group);var n=r.get("clip",!0)?Hc(r.coordinateSystem,!1,r):null;Uh(!!n,this.group,n)},t.prototype._incrementalRenderNormal=function(r,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o=cF(n),l;(l=r.next())!=null;){var s=a.getItemLayout(l),c=rD(s,l,o);nD(c,a,l,i),c.incremental=yo(n),this.group.add(c),this._progressiveEls.push(c)}},t.prototype._incrementalRenderLarge=function(r,n){fF(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),Uh(!1,this.group,null),this._data=null},t.type=Ys,t})(It),Y_e=(function(){function e(){}return e})(),$_e=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new Y_e},t.prototype.buildPath=function(r,n){var a=n.points;this.__simpleBox?(r.moveTo(a[4][0],a[4][1]),r.lineTo(a[6][0],a[6][1])):(r.moveTo(a[0][0],a[0][1]),r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]),r.lineTo(a[3][0],a[3][1]),r.closePath(),r.moveTo(a[4][0],a[4][1]),r.lineTo(a[5][0],a[5][1]),r.moveTo(a[6][0],a[6][1]),r.lineTo(a[7][0],a[7][1]))},t})(yt);function rD(e,t,r,n){var a=e.ends;return new $_e({shape:{points:n?W_e(a,r,e):a},z2:100})}function nD(e,t,r,n){var a=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0;var i=a.getShallow("cursor");i&&e.attr("cursor",i),e.__simpleBox=n,jr(e,a);var o=t.getItemLayout(r).sign;B(e.states,function(s,c){var f=a.getModel(c),h=gL(o,f),v=mL(o,f)||h,p=s.style||(s.style={});h&&(p.fill=h),v&&(p.stroke=v)});var l=a.getModel("emphasis");er(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function W_e(e,t,r){return xe(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}function cF(e){return e.getWhiskerBoxesLayout()==="horizontal"?1:0}var q_e=(function(){function e(){}return e})(),aD=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new q_e},t.prototype.buildPath=function(r,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];r.moveTo(o,a[i++]),r.lineTo(o,a[i++])}else i+=3},t})(yt);function fF(e,t,r,n){var a=e.getData(),i=a.getLayout("largePoints"),o=new aD({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(o);var l=new aD({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(l);var s=new aD({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(s),iD(1,o,e),iD(-1,l,e),iD(0,s,e),n&&(o.incremental=yo(e),l.incremental=yo(e),s.incremental=yo(e)),r&&r.push(o,l,s)}function iD(e,t,r,n){var a=mL(e,r)||gL(e,r),i=r.getModel("itemStyle").getItemStyle(H_e);t.useStyle(i),t.style.fill=null,t.style.stroke=a;var o=r.get("cursor");o&&t.attr("cursor",o)}function X_e(e){!e||!pe(e.series)||B(e.series,function(t){Ve(t)&&t.type==="k"&&(t.type=Ys)})}var Z_e=kd(),K_e={seriesType:Ys,plan:Ud(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=Q_e(e),a=e.getWhiskerBoxesLayout()==="horizontal"?0:1,i=1-a,o=["x","y"],l=r.getDimensionIndex(r.mapDimension(o[a])),s=xe(r.mapDimensionsAll(o[i]),r.getDimensionIndex,r),c=s[0],f=s[1],h=s[2],v=s[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),l<0||s.length<4)return;return{progress:e.pipelineContext.large?m:p};function p(y,x){for(var b,w=x.getStore();(b=y.next())!=null;){var C=w.get(l,b),A=w.get(c,b),M=w.get(f,b),R=w.get(h,b),E=w.get(v,b),N=kt(A,M),L=st(A,M),O=X(N,C),I=X(L,C),z=X(R,C),V=X(E,C),Y=[];P(Y,I,0),P(Y,O,1),Y.push(G(V),G(I),G(z),G(O));var H=x.getItemModel(b),F=!!H.get(["itemStyle","borderColorDoji"]);x.setItemLayout(b,{sign:hF(w,b,A,M,f,F),initBaseline:A>M?I[i]:O[i],ends:Y,brushRect:q(R,E,C)})}function X(W,Z){var Q=[];return Q[a]=Z,Q[i]=W,isNaN(Z)||isNaN(W)?[NaN,NaN]:t.dataToPoint(Q)}function P(W,Z,Q){var U=Z.slice(),K=Z.slice();U[a]=lS(U[a]+n/2,1,!1),K[a]=lS(K[a]-n/2,1,!0),Q?W.push(U,K):W.push(K,U)}function q(W,Z,Q){var U=X(W,Q),K=X(Z,Q);return U[a]-=n/2,K[a]-=n/2,{x:U[0],y:U[1],width:i?n:K[0]-U[0],height:i?K[1]-U[1]:n}}function G(W){return W[a]=lS(W[a],1),W}}function m(y,x){for(var b=ho(y.count*4),w=0,C,A=[],M=[],R,E=x.getStore(),N=!!e.get(["itemStyle","borderColorDoji"]);(R=y.next())!=null;){var L=E.get(l,R),O=E.get(c,R),I=E.get(f,R),z=E.get(h,R),V=E.get(v,R);if(isNaN(L)||isNaN(z)||isNaN(V)){b[w++]=NaN,w+=3;continue}b[w++]=hF(E,R,O,I,f,N),A[a]=L,A[i]=z,C=t.dataToPoint(A,null,M),b[w++]=C?C[0]:NaN,b[w++]=C?C[1]:NaN,A[i]=V,C=t.dataToPoint(A,null,M),b[w++]=C?C[1]:NaN}x.setLayout("largePoints",b)}}};function hF(e,t,r,n,a,i){var o;return r>n?o=-1:r<n?o=1:o=i?0:t>0?e.get(a,t-1)<=n?1:-1:1,o}function Q_e(e,t){var r=e.getBaseAxis(),n=Zn(r,{fromStat:{key:Ac(Ys)},min:1}).w,a=Re(Ie(e.get("barMaxWidth"),n),n),i=Re(Ie(e.get("barMinWidth"),1),n),o=e.get("barWidth");return o!=null?Re(o,n):st(kt(n/2,a),i)}function J_e(e){Z_e(e,function(){var t=Ac(Ys);ON(e,{key:t,seriesType:Ys,getMetrics:zN}),Y_(t,$_(t))})}function e1e(e){e.registerChartView(U_e),e.registerSeriesModel(gW),e.registerPreprocessor(X_e),e.registerVisual(G_e),e.registerLayout(K_e),J_e(e)}function dF(e,t){var r=t.rippleEffectColor||t.color;e.eachChild(function(n){n.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?r:null,fill:t.brushType==="fill"?r:null}})})}var t1e=(function(e){ee(t,e);function t(r,n){var a=e.call(this)||this,i=new Vm(r,n),o=new ze;return a.add(i),a.add(o),a.updateData(r,n),a}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,a=r.color,i=r.rippleNumber,o=this.childAt(1),l=0;l<i;l++){var s=wr(n,-1,-1,2,2,a);s.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var c=-l/i*r.period+r.effectOffset;s.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(c).start(),s.animateStyle(!0).when(r.period,{opacity:0}).delay(c).start(),o.add(s)}dF(o,r)},t.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,a=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var l=i[o];if(n[l]!==r[l]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}dF(a,r)},t.prototype.highlight=function(){Tl(this)},t.prototype.downplay=function(){Al(this)},t.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},t.prototype.updateData=function(r,n){var a=this,i=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),l=r.getItemModel(n),s=r.getItemVisual(n,"symbol"),c=Wd(r.getItemVisual(n,"symbolSize")),f=r.getItemVisual(n,"style"),h=f&&f.fill,v=l.getModel("emphasis");o.setScale(c),o.traverse(function(x){x.setStyle("fill",h)});var p=ff(r.getItemVisual(n,"symbolOffset"),c);p&&(o.x=p[0],o.y=p[1]);var m=r.getItemVisual(n,"symbolRotate");o.rotation=(m||0)*Math.PI/180||0;var y={};y.showEffectOn=i.get("showEffectOn"),y.rippleScale=l.get(["rippleEffect","scale"]),y.brushType=l.get(["rippleEffect","brushType"]),y.period=l.get(["rippleEffect","period"])*1e3,y.effectOffset=n/r.count(),y.z=i.getShallow("z")||0,y.zlevel=i.getShallow("zlevel")||0,y.symbolType=s,y.color=h,y.rippleEffectColor=l.get(["rippleEffect","color"]),y.rippleNumber=l.get(["rippleEffect","number"]),y.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(y):this.startEffectAnimation(y),this._effectCfg=y):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(x){x==="emphasis"?y.showEffectOn!=="render"&&a.startEffectAnimation(y):x==="normal"&&y.showEffectOn!=="render"&&a.stopEffectAnimation()}),this._effectCfg=y,er(this,v.get("focus"),v.get("blurScope"),v.get("disabled"))},t.prototype.fadeOut=function(r){r&&r()},t})(ze),r1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._symbolDraw=new Fm(t1e)},t.prototype.render=function(r,n,a){var i=r.getData(),o=this._symbolDraw;o.updateData(i,vF(r)),this.group.add(o.group)},t.prototype.updateTransform=function(r,n,a){var i=r.getData();this.group.dirty();var o=Gm("").reset(r,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(vF(r))},t.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=qU(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t})(It);function vF(e){return{clipShape:g9(e)}}var n1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r}return t.prototype.getInitialData=function(r,n){return Oo(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(r,n,a){return a.point(n.getItemLayout(r))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t})(Pt);function a1e(e){e.registerChartView(r1e),e.registerSeriesModel(n1e),e.registerLayout(Gm("effectScatter"))}var mW=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;return i.add(i.createLine(r,n,a)),i._updateEffectSymbol(r,n),i}return t.prototype.createLine=function(r,n,a){return new lL(r,n,a)},t.prototype._updateEffectSymbol=function(r,n){var a=r.getItemModel(n),i=a.getModel("effect"),o=i.get("symbolSize"),l=i.get("symbol");pe(o)||(o=[o,o]);var s=r.getItemVisual(n,"style"),c=i.get("color")||s&&s.stroke,f=this.childAt(1);this._symbolType!==l&&(this.remove(f),f=wr(l,-.5,-.5,1,1,c),f.z2=100,f.culling=!0,this.add(f)),f&&(f.setStyle("shadowColor",c),f.setStyle(i.getItemStyle(["color"])),f.scaleX=o[0],f.scaleY=o[1],f.setColor(c),this._symbolType=l,this._symbolScale=o,this._updateEffectAnimation(r,i,n))},t.prototype._updateEffectAnimation=function(r,n,a){var i=this.childAt(1);if(i){var o=r.getItemLayout(a),l=n.get("period")*1e3,s=n.get("loop"),c=n.get("roundTrip"),f=n.get("constantSpeed"),h=En(n.get("delay"),function(p){return p/r.count()*l/3});if(i.ignore=!0,this._updateAnimationPoints(i,o),f>0&&(l=this._getLineLength(i)/f*1e3),l!==this._period||s!==this._loop||c!==this._roundTrip){i.stopAnimation();var v=void 0;Be(h)?v=h(a):v=h,i.__t>0&&(v=-l*i.__t),this._animateSymbol(i,l,v,s,c)}this._period=l,this._loop=s,this._roundTrip=c}},t.prototype._animateSymbol=function(r,n,a,i,o){if(n>0){r.__t=0;var l=this,s=r.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){l._updateSymbolPosition(r)});i||s.done(function(){l.remove(r)}),s.start()}},t.prototype._getLineLength=function(r){return sl(r.__p1,r.__cp1)+sl(r.__cp1,r.__p2)},t.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},t.prototype.updateData=function(r,n,a){this.childAt(0).updateData(r,n,a),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,a=r.__p2,i=r.__cp1,o=r.__t<=1?r.__t:2-r.__t,l=[r.x,r.y],s=l.slice(),c=Rn,f=MM;l[0]=c(n[0],i[0],a[0],o),l[1]=c(n[1],i[1],a[1],o);var h=r.__t<=1?f(n[0],i[0],a[0],o):f(a[0],i[0],n[0],1-o),v=r.__t<=1?f(n[1],i[1],a[1],o):f(a[1],i[1],n[1],1-o);r.rotation=-Math.atan2(v,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=sl(s,l)*1.05,o===1&&(l[0]=s[0]+(l[0]-s[0])/2,l[1]=s[1]+(l[1]-s[1])/2)):r.__lastT===1?r.scaleY=2*sl(n,l):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=l[0],r.y=l[1]},t.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var a=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,a,n)},t})(ze),yW=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;return i._createPolyline(r,n,a),i}return t.prototype._createPolyline=function(r,n,a){var i=r.getItemLayout(n),o=new On({shape:{points:i}});this.add(o),this._updateCommonStl(r,n,a)},t.prototype.updateData=function(r,n,a){var i=r.hostModel,o=this.childAt(0),l={shape:{points:r.getItemLayout(n)}};_t(o,l,i,n),this._updateCommonStl(r,n,a)},t.prototype._updateCommonStl=function(r,n,a){var i=this.childAt(0),o=r.getItemModel(n),l=a&&a.emphasisLineStyle,s=a&&a.focus,c=a&&a.blurScope,f=a&&a.emphasisDisabled;if(!a||r.hasItemOption){var h=o.getModel("emphasis");l=h.getModel("lineStyle").getLineStyle(),f=h.get("disabled"),s=h.get("focus"),c=h.get("blurScope")}i.useStyle(r.getItemVisual(n,"style")),i.style.fill=null,i.style.strokeNoScale=!0;var v=i.ensureState("emphasis");v.style=l,er(this,s,c,f)},t.prototype.updateLayout=function(r,n){var a=this.childAt(0);a.stopAnimation(),a.setShape("points",r.getItemLayout(n))},t})(ze),i1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._lastFrame=0,r._lastFramePercent=0,r}return t.prototype.createLine=function(r,n,a){return new yW(r,n,a)},t.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var a=[0],i=0,o=1;o<n.length;o++){var l=n[o-1],s=n[o];i+=sl(l,s),a.push(i)}if(i===0){this._length=0;return}for(var o=0;o<a.length;o++)a[o]/=i;this._offsets=a,this._length=i},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(r){var n=r.__t<=1?r.__t:2-r.__t,a=this._points,i=this._offsets,o=a.length;if(i){var l=this._lastFrame,s;if(n<this._lastFramePercent){var c=Math.min(l+1,o-1);for(s=c;s>=0&&!(i[s]<=n);s--);s=Math.min(s,o-2)}else{for(s=l;s<o&&!(i[s]>n);s++);s=Math.min(s-1,o-2)}var f=(n-i[s])/(i[s+1]-i[s]),h=a[s],v=a[s+1];r.x=h[0]*(1-f)+f*v[0],r.y=h[1]*(1-f)+f*v[1];var p=r.__t<=1?v[0]-h[0]:h[0]-v[0],m=r.__t<=1?v[1]-h[1]:h[1]-v[1];r.rotation=-Math.atan2(m,p)-Math.PI/2,this._lastFrame=s,this._lastFramePercent=n,r.ignore=!1}},t})(mW),o1e=(function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e})(),l1e=(function(e){ee(t,e);function t(r){var n=e.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(r){r&&!r.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:re.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new o1e},t.prototype.buildPath=function(r,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o<a.length;){var l=a[o++];if(l>0){r.moveTo(a[o++],a[o++]);for(var s=1;s<l;s++)r.lineTo(a[o++],a[o++])}}else for(o=this._off;o<a.length;){var c=a[o++],f=a[o++],h=a[o++],v=a[o++];if(r.moveTo(c,f),i>0){var p=(c+h)/2-(f-v)*i,m=(f+v)/2-(h-c)*i;r.quadraticCurveTo(p,m,h,v)}else r.lineTo(h,v)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var a=this.shape,i=a.segs,o=a.curveness,l=this.style.lineWidth;if(a.polyline)for(var s=0,c=0;c<i.length;){var f=i[c++];if(f>0)for(var h=i[c++],v=i[c++],p=1;p<f;p++){var m=i[c++],y=i[c++];if(gs(h,v,m,y,l,r,n))return s}s++}else for(var s=0,c=0;c<i.length;){var h=i[c++],v=i[c++],m=i[c++],y=i[c++];if(o>0){var x=(h+m)/2-(v-y)*o,b=(v+y)/2-(m-h)*o;if(Y6(h,v,x,b,m,y,l,r,n))return s}else if(gs(h,v,m,y,l,r,n))return s;s++}return-1},t.prototype.contain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();if(r=a[0],n=a[1],i.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,l=-1/0,s=-1/0,c=0;c<a.length;){var f=a[c++],h=a[c++];i=Math.min(f,i),l=Math.max(f,l),o=Math.min(h,o),s=Math.max(h,s)}r=this._rect=new Fe(i,o,l,s)}return r},t})(yt),s1e=(function(){function e(){this.group=new ze}return e.prototype.updateData=function(t){this._clear();var r=this._create();r.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(r,t)},e.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var a=this._newAdded[0],i=r.getLayout("linesPoints"),o=a&&a.shape.segs;if(o&&o.length<2e4){var l=o.length,s=new Float32Array(l+i.length);s.set(o),s.set(i,l),a.setShape({segs:s})}else{this._newAdded=[];var c=this._create();c.incremental=n,c.setShape({segs:i}),this._setCommon(c,r),c.__startIndex=t.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new l1e({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},e.prototype._setCommon=function(t,r,n){var a=r.hostModel;t.setShape({polyline:a.get("polyline"),curveness:a.get(["lineStyle","curveness"])}),t.useStyle(a.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=r.getVisual("style");i&&i.stroke&&t.setStyle("stroke",i.stroke),t.setStyle("fill",null);var o=$e(t);o.seriesIndex=a.seriesIndex,t.on("mousemove",function(l){o.dataIndex=null;var s=t.hoverDataIdx;s>0&&(o.dataIndex=s+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e})(),xW={seriesType:"lines",plan:Ud(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var l=void 0,s=a.end-a.start;if(r){for(var c=0,f=a.start;f<a.end;f++)c+=e.getLineCoordsCount(f);l=new Float32Array(s+c*2)}else l=new Float32Array(s*4);for(var h=0,v=[],f=a.start;f<a.end;f++){var p=e.getLineCoords(f,o);r&&(l[h++]=p);for(var m=0;m<p;m++)v=t.dataToPoint(o[m],!1,v),l[h++]=v[0],l[h++]=v[1]}i.setLayout("linesPoints",l)}else for(var f=a.start;f<a.end;f++){var y=i.getItemModel(f),p=e.getLineCoords(f,o),x=[];if(r)for(var b=0;b<p;b++)x.push(t.dataToPoint(o[b]));else{x[0]=t.dataToPoint(o[0]),x[1]=t.dataToPoint(o[1]);var w=y.get(["lineStyle","curveness"]);+w&&(x[2]=[(x[0][0]+x[1][0])/2-(x[0][1]-x[1][1])*w,(x[0][1]+x[1][1])/2-(x[1][0]-x[0][0])*w])}i.setItemLayout(f,x)}}}}}},u1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=r.getData(),o=this._updateLineDraw(i,r),l=r.get("zlevel"),s=r.get(["effect","trailLength"]),c=a.getZr(),f=!!aR(a);f&&c.painter.getLayer(l).clear(!0),this._lastZlevel!=null&&f&&c.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&s>0&&f&&c.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)}),o.updateData(i);var h=r.get("clip",!0)&&Hc(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=l,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,a){var i=r.getData(),o=this._updateLineDraw(i,r);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,a){this._lineDraw.incrementalUpdate(r,n.getData(),yo(n)),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,a){var i=r.getData(),o=this._lineDraw;if(!this._finished||!o||!o.updateLayout)return{update:!0};var l=xW.reset(r,n,a);l.progress&&l.progress({start:0,end:i.count(),count:i.count()},i),o.updateLayout(),this._clearLayer(a)},t.prototype._updateLineDraw=function(r,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),l=n.pipelineContext,s=l.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||s!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=s?new s1e:new sL(o?i?i1e:yW:i?mW:lL),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=s),this.group.add(a.group),a},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=aR(r);n&&this._lastZlevel!=null&&n.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},t.prototype.dispose=function(r,n){this.remove(r,n)},t.type="lines",t})(It),c1e=typeof Uint32Array>"u"?Array:Uint32Array,f1e=typeof Float64Array>"u"?Array:Float64Array;function pF(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=xe(t,function(r){var n=[r[0].coord,r[1].coord],a={coords:n};return r[0].name&&(a.fromName=r[0].name),r[1].name&&(a.toName=r[1].name),h_([a,r[0],r[1]])}))}var h1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return t.prototype.init=function(r){r.data=r.data||[],pF(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(r){if(pF(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=id(this._flatCoords,n.flatCoords),this._flatCoordsOffset=id(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},t.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},t.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},t.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[r*2],i=this._flatCoordsOffset[r*2+1],o=0;o<i;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[a+o*2],n[o][1]=this._flatCoords[a+o*2+1];return i}else{for(var l=this._getCoordsFromItemModel(r),o=0;o<l.length;o++)n[o]=n[o]||[],n[o][0]=l[o][0],n[o][1]=l[o][1];return l.length}},t.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),pt(r[0])){for(var a=r.length,i=new c1e(a),o=new f1e(a),l=0,s=0,c=0,f=0;f<a;){c++;var h=r[f++];i[s++]=l+n,i[s++]=h;for(var v=0;v<h;v++){var p=r[f++],m=r[f++];o[l++]=p,o[l++]=m}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,s),flatCoords:o,count:c}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){var a=new Ln(["value"],this);return a.hasItemOption=!1,a.initData(r.data,[],function(i,o,l,s){if(i instanceof Array)return NaN;a.hasItemOption=!0;var c=i.value;if(c!=null)return c instanceof Array?c[s]:c}),a},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.getRawValue(r),l=i.getItemModel(r),s=l.get("name");if(!s){var c=l.get("fromName"),f=l.get("toName"),h=[];c!=null&&h.push(c),f!=null&&h.push(f),s=h.join(" > ")}return Rr("nameValue",{name:s,value:o,noValue:o==null||isNaN(o)})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t})(Pt);function Cx(e){return e instanceof Array||(e=[e,e]),e}var d1e={seriesType:"lines",reset:function(e){var t=Cx(e.get("symbol")),r=Cx(e.get("symbolSize")),n=e.getData();n.setVisual("fromSymbol",t&&t[0]),n.setVisual("toSymbol",t&&t[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function a(i,o){var l=i.getItemModel(o),s=Cx(l.getShallow("symbol",!0)),c=Cx(l.getShallow("symbolSize",!0));s[0]&&i.setItemVisual(o,"fromSymbol",s[0]),s[1]&&i.setItemVisual(o,"toSymbol",s[1]),c[0]&&i.setItemVisual(o,"fromSymbolSize",c[0]),c[1]&&i.setItemVisual(o,"toSymbolSize",c[1])}return{dataEach:n.hasItemOption?a:null}}};function v1e(e){e.registerChartView(u1e),e.registerSeriesModel(h1e),e.registerLayout(xW),e.registerVisual(d1e)}var p1e=256,g1e=(function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Yr.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,a,i,o){var l=this._getBrush(),s=this._getGradient(i,"inRange"),c=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),p=t.length;h.width=r,h.height=n;for(var m=0;m<p;++m){var y=t[m],x=y[0],b=y[1],w=y[2],C=a(w);v.globalAlpha=C,v.drawImage(l,x-f,b-f)}if(!h.width||!h.height)return h;for(var A=v.getImageData(0,0,h.width,h.height),M=A.data,R=0,E=M.length,N=this.minOpacity,L=this.maxOpacity,O=L-N;R<E;){var C=M[R+3]/256,I=Math.floor(C*(p1e-1))*4;if(C>0){var z=o(C)?s:c;C>0&&(C=C*O+N),M[R++]=z[I],M[R++]=z[I+1],M[R++]=z[I+2],M[R++]=z[I+3]*C*256}else R+=4}return v.putImageData(A,0,0),h},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Yr.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var a=t.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=re.color.neutral99,a.beginPath(),a.arc(-r,r,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,a=n[r]||(n[r]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,l=0;l<256;l++)t[r](l/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},e})();function m1e(e,t,r){var n=e[1]-e[0];t=xe(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var a=t.length,i=0;return function(o){var l;for(l=i;l<a;l++){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}if(l===a)for(l=i-1;l>=0;l--){var s=t[l].interval;if(s[0]<=o&&o<=s[1]){i=l;break}}return l>=0&&l<a&&r[l]}}function y1e(e,t){var r=e[1]-e[0];return t=[(t[0]-e[0])/r,(t[1]-e[0])/r],function(n){return n>=t[0]&&n<=t[1]}}var x1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i;n.eachComponent("visualMap",function(l){l.eachTargetSeries(function(s){s===r&&(i=l)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,a,0,r.getData().count()):y5(o)&&this._renderOnGeo(o,r,i,a)},t.prototype.incrementalPrepareRender=function(r,n,a){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,a,i){var o=n.coordinateSystem;o&&(y5(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){Qs(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,a,i,o){var l=r.coordinateSystem,s=Uc(l,"cartesian2d"),c=Uc(l,"matrix"),f,h,v,p;if(s){var m=l.getAxis("x"),y=l.getAxis("y");f=Zn(m).w+.5,h=Zn(y).w+.5,v=m.scale.getExtent(),p=y.scale.getExtent()}for(var x=this.group,b=r.getData(),w=r.getModel(["emphasis","itemStyle"]).getItemStyle(),C=r.getModel(["blur","itemStyle"]).getItemStyle(),A=r.getModel(["select","itemStyle"]).getItemStyle(),M=r.get(["itemStyle","borderRadius"]),R=Br(r),E=r.getModel("emphasis"),N=E.get("focus"),L=E.get("blurScope"),O=E.get("disabled"),I=s||c?[b.mapDimension("x"),b.mapDimension("y"),b.mapDimension("value")]:[b.mapDimension("time"),b.mapDimension("value")],z=a;z<i;z++){var V=void 0,Y=b.getItemVisual(z,"style");if(s){var H=b.get(I[0],z),F=b.get(I[1],z);if(isNaN(b.get(I[2],z))||isNaN(H)||isNaN(F)||H<v[0]||H>v[1]||F<p[0]||F>p[1])continue;var X=l.dataToPoint([H,F]);V=new at({shape:{x:X[0]-f/2,y:X[1]-h/2,width:f,height:h},style:Y})}else if(c){var P=l.dataToLayout([b.get(I[0],z),b.get(I[1],z)]).rect;if(xn(P.x))continue;V=new at({z2:1,shape:P,style:Y})}else{if(isNaN(b.get(I[1],z)))continue;var q=l.dataToLayout([b.get(I[0],z)]),P=q.contentRect||q.rect;if(xn(P.x)||xn(P.y))continue;V=new at({z2:1,shape:P,style:Y})}if(b.hasItemOption){var G=b.getItemModel(z),W=G.getModel("emphasis");w=W.getModel("itemStyle").getItemStyle(),C=G.getModel(["blur","itemStyle"]).getItemStyle(),A=G.getModel(["select","itemStyle"]).getItemStyle(),M=G.get(["itemStyle","borderRadius"]),N=W.get("focus"),L=W.get("blurScope"),O=W.get("disabled"),R=Br(G)}V.shape.r=M;var Z=r.getRawValue(z),Q="-";Z&&Z[2]!=null&&(Q=Z[2]+""),Wr(V,R,{labelFetcher:r,labelDataIndex:z,defaultOpacity:Y.opacity,defaultText:Q}),V.ensureState("emphasis").style=w,V.ensureState("blur").style=C,V.ensureState("select").style=A,er(V,N,L,O),V.incremental=yo(r,o),o&&(V.states.emphasis.hoverLayer=Vd),x.add(V),b.setItemGraphicEl(z,V),this._progressiveEls&&this._progressiveEls.push(V)}},t.prototype._renderOnGeo=function(r,n,a,i){var o=a.targetVisuals.inRange,l=a.targetVisuals.outOfRange,s=n.getData(),c=this._hmLayer||this._hmLayer||new g1e;c.blurSize=n.get("blurSize"),c.pointSize=n.get("pointSize"),c.minOpacity=n.get("minOpacity"),c.maxOpacity=n.get("maxOpacity");var f=r.getViewRect().clone(),h=r.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),p=Math.max(f.y,0),m=Math.min(f.width+f.x,i.getWidth()),y=Math.min(f.height+f.y,i.getHeight()),x=m-v,b=y-p,w=[s.mapDimension("lng"),s.mapDimension("lat"),s.mapDimension("value")],C=s.mapArray(w,function(E,N,L){var O=r.dataToPoint([E,N]);return O[0]-=v,O[1]-=p,O.push(L),O}),A=a.getExtent(),M=a.type==="visualMap.continuous"?y1e(A,a.option.range):m1e(A,a.getPieceList(),a.option.selected);c.update(C,x,b,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:l.color.getColorMapper()},M);var R=new Xr({style:{width:x,height:b,x:v,y:p,image:c.canvas},silent:!0});this.group.add(R)},t.type="heatmap",t})(It),S1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.getInitialData=function(r,n){return Oo(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Hd.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:re.color.primary}}},t})(Pt);function b1e(e){e.registerChartView(x1e),e.registerSeriesModel(S1e)}var _1e=["itemStyle","borderWidth"],gF=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],oD=new Io,w1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Jg,r}return t.prototype.render=function(r,n,a){var i=this.group,o=r.getData(),l=this._data,s=r.coordinateSystem,c=s.getBaseAxis(),f=c.isHorizontal(),h=s.master.getRect(),v={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:r,coordSys:s,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:gF[+f],categoryDim:gF[1-+f]};o.diff(l).add(function(m){if(o.hasValue(m)){var y=yF(o,m),x=mF(o,m,y,v),b=xF(o,v,x);o.setItemGraphicEl(m,b),i.add(b),bF(b,v,x)}}).update(function(m,y){var x=l.getItemGraphicEl(y);if(!o.hasValue(m)){i.remove(x);return}var b=yF(o,m),w=mF(o,m,b,v),C=TW(o,w);x&&C!==x.__pictorialShapeStr&&(i.remove(x),o.setItemGraphicEl(m,null),x=null),x?E1e(x,v,w):x=xF(o,v,w,!0),o.setItemGraphicEl(m,x),x.__pictorialSymbolMeta=w,i.add(x),bF(x,v,w)}).remove(function(m){var y=l.getItemGraphicEl(m);y&&SF(l,m,y.__pictorialSymbolMeta.animationModel,y)}).execute();var p=r.get("clip",!0)?Hc(r.coordinateSystem,!1,r):null;return p?i.setClipPath(p):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var a=this.group,i=this._data;r.get("animation")?i&&i.eachItemGraphicEl(function(o){SF(i,$e(o).dataIndex,r,o)}):a.removeAll()},t.type=Jg,t})(It);function mF(e,t,r,n){var a=e.getItemLayout(t),i=r.get("symbolRepeat"),o=r.get("symbolClip"),l=r.get("symbolPosition")||"start",s=r.get("symbolRotate"),c=(s||0)*Math.PI/180||0,f=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),v={dataIndex:t,layout:a,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:c,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};C1e(r,i,a,n,v),T1e(e,t,a,i,o,v.boundingLength,v.pxSign,f,n,v),A1e(r,v.symbolScale,c,n,v);var p=v.symbolSize,m=ff(r.get("symbolOffset"),p);return D1e(r,p,a,i,o,m,l,v.valueLineWidth,v.boundingLength,v.repeatCutLength,n,v),v}function C1e(e,t,r,n,a){var i=n.valueDim,o=e.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),s=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(r[i.wh]<=0),f;if(pe(o)){var h=[lD(l,o[0])-s,lD(l,o[1])-s];h[1]<h[0]&&h.reverse(),f=h[c]}else o!=null?f=lD(l,o)-s:t?f=n.coordSysExtent[i.index][c]-s:f=r[i.wh];a.boundingLength=f,t&&(a.repeatCutLength=r[i.wh]);var v=i.xy==="x",p=l.inverse;a.pxSign=v&&!p||!v&&p?f>=0?1:-1:f>0?1:-1}function lD(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function T1e(e,t,r,n,a,i,o,l,s,c){var f=s.valueDim,h=s.categoryDim,v=Math.abs(r[h.wh]),p=e.getItemVisual(t,"symbolSize"),m;pe(p)?m=p.slice():p==null?m=["100%","100%"]:m=[p,p],m[h.index]=Re(m[h.index],v),m[f.index]=Re(m[f.index],n?v:Math.abs(i)),c.symbolSize=m;var y=c.symbolScale=[m[0]/l,m[1]/l];y[f.index]*=(s.isHorizontal?-1:1)*o}function A1e(e,t,r,n,a){var i=e.get(_1e)||0;i&&(oD.attr({scaleX:t[0],scaleY:t[1],rotation:r}),oD.updateTransform(),i/=oD.getLineScale(),i*=t[n.valueDim.index]),a.valueLineWidth=i||0}function D1e(e,t,r,n,a,i,o,l,s,c,f,h){var v=f.categoryDim,p=f.valueDim,m=h.pxSign,y=Math.max(t[p.index]+l,0),x=y;if(n){var b=Math.abs(s),w=En(e.get("symbolMargin"),"15%")+"",C=!1;w.lastIndexOf("!")===w.length-1&&(C=!0,w=w.slice(0,w.length-1));var A=Re(w,t[p.index]),M=Math.max(y+A*2,0),R=C?0:A*2,E=bE(n),N=E?n:_F((b+R)/M),L=b-N*y;A=L/2/(C?N:Math.max(N-1,1)),M=y+A*2,R=C?0:A*2,!E&&n!=="fixed"&&(N=c?_F((Math.abs(c)+R)/M):0),x=N*M-R,h.repeatTimes=N,h.symbolMargin=A}var O=m*(x/2),I=h.pathPosition=[];I[v.index]=r[v.wh]/2,I[p.index]=o==="start"?O:o==="end"?s-O:s/2,i&&(I[0]+=i[0],I[1]+=i[1]);var z=h.bundlePosition=[];z[v.index]=r[v.xy],z[p.index]=r[p.xy];var V=h.barRectShape=he({},r);V[p.wh]=m*Math.max(Math.abs(r[p.wh]),Math.abs(I[p.index]+O)),V[v.wh]=r[v.wh];var Y=h.clipShape={};Y[v.xy]=-r[v.xy],Y[v.wh]=f.ecSize[v.wh],Y[p.xy]=0,Y[p.wh]=r[p.wh]}function SW(e){var t=e.symbolPatternSize,r=wr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function bW(e,t,r,n){var a=e.__pictorialBundle,i=r.symbolSize,o=r.valueLineWidth,l=r.pathPosition,s=t.valueDim,c=r.repeatTimes||0,f=0,h=i[t.valueDim.index]+o+r.symbolMargin*2;for(yL(e,function(y){y.__pictorialAnimationIndex=f,y.__pictorialRepeatTimes=c,f<c?ed(y,null,m(f),r,n):ed(y,null,{scaleX:0,scaleY:0},r,n,function(){a.remove(y)}),f++});f<c;f++){var v=SW(r);v.__pictorialAnimationIndex=f,v.__pictorialRepeatTimes=c,a.add(v);var p=m(f);ed(v,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},r,n)}function m(y){var x=l.slice(),b=r.pxSign,w=y;return(r.symbolRepeatDirection==="start"?b>0:b<0)&&(w=c-1-y),x[s.index]=h*(w-c/2+.5)+l[s.index],{x:x[0],y:x[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function _W(e,t,r,n){var a=e.__pictorialBundle,i=e.__pictorialMainPath;i?ed(i,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(i=e.__pictorialMainPath=SW(r),a.add(i),ed(i,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function wW(e,t,r){var n=he({},t.barRectShape),a=e.__pictorialBarRect;a?ed(a,null,{shape:n},t,r):(a=e.__pictorialBarRect=new at({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,e.add(a))}function CW(e,t,r,n){if(r.symbolClip){var a=e.__pictorialClipPath,i=he({},r.clipShape),o=t.valueDim,l=r.animationModel,s=r.dataIndex;if(a)_t(a,{shape:i},l,s);else{i[o.wh]=0,a=new at({shape:i}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var c={};c[o.wh]=r.clipShape[o.wh],sf[n?"updateProps":"initProps"](a,{shape:c},l,s)}}}function yF(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=M1e,r.isAnimationEnabled=R1e,r}function M1e(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function R1e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function xF(e,t,r,n){var a=new ze,i=new ze;return a.add(i),a.__pictorialBundle=i,i.x=r.bundlePosition[0],i.y=r.bundlePosition[1],r.symbolRepeat?bW(a,t,r):_W(a,t,r),wW(a,r,n),CW(a,t,r,n),a.__pictorialShapeStr=TW(e,r),a.__pictorialSymbolMeta=r,a}function E1e(e,t,r){var n=r.animationModel,a=r.dataIndex,i=e.__pictorialBundle;_t(i,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,a),r.symbolRepeat?bW(e,t,r,!0):_W(e,t,r,!0),wW(e,r,!0),CW(e,t,r,!0)}function SF(e,t,r,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];yL(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),B(i,function(o){Fs(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function TW(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function yL(e,t,r){B(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function ed(e,t,r,n,a,i){t&&e.attr(t),n.symbolClip&&!a?r&&e.attr(r):r&&sf[a?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,i)}function bF(e,t,r){var n=r.dataIndex,a=r.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),l=a.getModel(["blur","itemStyle"]).getItemStyle(),s=a.getModel(["select","itemStyle"]).getItemStyle(),c=a.getShallow("cursor"),f=i.get("focus"),h=i.get("blurScope"),v=i.get("scale");yL(e,function(y){if(y instanceof Xr){var x=y.style;y.useStyle(he({image:x.image,x:x.x,y:x.y,width:x.width,height:x.height},r.style))}else y.useStyle(r.style);var b=y.ensureState("emphasis");b.style=o,v&&(b.scaleX=y.scaleX*1.1,b.scaleY=y.scaleY*1.1),y.ensureState("blur").style=l,y.ensureState("select").style=s,c&&(y.cursor=c),y.z2=r.z2});var p=t.valueDim.posDesc[+(r.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Wr(m,Br(a),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:xd(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:p}),er(e,f,h,i.get("disabled"))}function _F(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var N1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return t.prototype.getInitialData=function(r){return r.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series."+Jg,t.dependencies=["grid"],t.defaultOption=Js(em.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:re.color.primary}}}),t})(em);function L1e(e){e.registerChartView(w1e),e.registerSeriesModel(N1e),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,I9(Jg)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,O9(Jg)),P9(e)}var sD=2,wd="themeRiver",I1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ev(Ee(this.getData,this),Ee(this.getRawData,this))},t.prototype.fixData=function(r){var n=r.length,a={},i=HM(r,function(v){return a.hasOwnProperty(v[0]+"")||(a[v[0]+""]=-1),v[2]}),o=[];i.buckets.each(function(v,p){o.push({name:p,dataList:v})});for(var l=o.length,s=0;s<l;++s){for(var c=o[s].name,f=0;f<o[s].dataList.length;++f){var h=o[s].dataList[f][0]+"";a[h]=s}for(var h in a)a.hasOwnProperty(h)&&a[h]!==s&&(a[h]=s,r[n]=[h,0,c],n++)}return r},t.prototype.getInitialData=function(r,n){for(var a=this.getReferringComponents("singleAxis",dr).models[0],i=a.get("type"),o=Bt(r.data,function(m){return m[2]!==void 0}),l=this.fixData(o||[]),s=[],c=this.nameMap=Le(),f=0,h=0;h<l.length;++h)s.push(l[h][sD]),c.get(l[h][sD])||(c.set(l[h][sD],f),f++);var v=qd(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:db(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,p=new Ln(v,this);return p.initData(l),p},t.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),a=[],i=0;i<n;++i)a[i]=i;var o=r.mapDimension("single"),l=HM(a,function(c){return r.get("name",c)}),s=[];return l.buckets.each(function(c,f){c.sort(function(h,v){return r.get(o,h)-r.get(o,v)}),s.push({name:f,indices:c})}),s},t.prototype.getAxisTooltipData=function(r,n,a){pe(r)||(r=r?[r]:[]);for(var i=this.getData(),o=this.getLayerSeries(),l=[],s=o.length,c,f=0;f<s;++f){for(var h=Number.MAX_VALUE,v=-1,p=o[f].indices.length,m=0;m<p;++m){var y=i.get(r[0],o[f].indices[m]),x=Math.abs(y-n);x<=h&&(c=y,h=x,v=o[f].indices[m])}l.push(v)}return{dataIndices:l,nestestValue:c}},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=i.getName(r),l=i.get(i.mapDimension("value"),r);return Rr("nameValue",{name:o,value:l})},t.type="series."+wd,t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t})(Pt),O1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=wd,r._layers=[],r}return t.prototype.render=function(r,n,a){var i=r.getData(),o=this,l=this.group,s=r.getLayerSeries(),c=i.getLayout("layoutInfo"),f=c.rect,h=c.boundaryGap;l.x=0,l.y=f.y+h[0];function v(x){return x.name}var p=new hf(this._layersSeries||[],s,v,v),m=[];p.add(Ee(y,this,"add")).update(Ee(y,this,"update")).remove(Ee(y,this,"remove")).execute();function y(x,b,w){var C=o._layers;if(x==="remove"){l.remove(C[b]);return}for(var A=[],M=[],R,E=s[b].indices,N=0;N<E.length;N++){var L=i.getItemLayout(E[N]),O=L.x,I=L.y0,z=L.y;A.push(O,I),M.push(O,I+z),R=i.getItemVisual(E[N],"style")}var V,Y=i.getItemLayout(E[0]),H=r.getModel("label"),F=H.get("margin"),X=r.getModel("emphasis");if(x==="add"){var P=m[b]=new ze;V=new d9({shape:{points:A,stackedOnPoints:M,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),P.add(V),l.add(P),r.isAnimationEnabled()&&V.setClipPath(k1e(V.getBoundingRect(),r,function(){V.removeClipPath()}))}else{var P=C[w];V=P.childAt(0),l.add(P),m[b]=P,_t(V,{shape:{points:A,stackedOnPoints:M}},r),ui(V)}Wr(V,Br(r),{labelDataIndex:E[N-1],defaultText:i.getName(E[N-1]),inheritColor:R.fill},{normal:{verticalAlign:"middle"}}),V.setTextConfig({position:null,local:!0});var q=V.getTextContent();q&&(q.x=Y.x-F,q.y=Y.y0+Y.y/2),V.useStyle(R),i.setItemGraphicEl(b,V),jr(V,r),er(V,X.get("focus"),X.get("blurScope"),X.get("disabled"))}this._layersSeries=s,this._layers=m},t.type=wd,t})(It);function k1e(e,t,r){var n=new at({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ir(n,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),n}var P1e=zr(wd,j1e);function j1e(e,t){e.eachSeriesByType(wd,function(r){var n=r.getData(),a=r.coordinateSystem,i={},o=a.getRect();i.rect=o;var l=r.get("boundaryGap"),s=a.getAxis();if(i.boundaryGap=l,s.orient==="horizontal"){l[0]=Re(l[0],o.height),l[1]=Re(l[1],o.height);var c=o.height-l[0]-l[1];wF(n,r,c)}else{l[0]=Re(l[0],o.width),l[1]=Re(l[1],o.width);var f=o.width-l[0]-l[1];wF(n,r,f)}n.setLayout("layoutInfo",i)})}function wF(e,t,r){if(e.count())for(var n=t.coordinateSystem,a=t.getLayerSeries(),i=e.mapDimension("single"),o=e.mapDimension("value"),l=xe(a,function(x){return xe(x.indices,function(b){var w=n.dataToPoint(e.get(i,b));return w[1]=e.get(o,b),w})}),s=B1e(l),c=s.y0,f=r/s.max,h=a.length,v=a[0].indices.length,p,m=0;m<v;++m){p=c[m]*f,e.setItemLayout(a[0].indices[m],{layerIndex:0,x:l[0][m][0],y0:p,y:l[0][m][1]*f});for(var y=1;y<h;++y)p+=l[y-1][m][1]*f,e.setItemLayout(a[y].indices[m],{layerIndex:y,x:l[y][m][0],y0:p,y:l[y][m][1]*f})}}function B1e(e){for(var t=e.length,r=e[0].length,n=[],a=[],i=0,o=0;o<r;++o){for(var l=0,s=0;s<t;++s)l+=e[s][o][1];l>i&&(i=l),n.push(l)}for(var c=0;c<r;++c)a[c]=(i-n[c])/2;i=0;for(var f=0;f<r;++f){var h=n[f]+a[f];h>i&&(i=h)}return{y0:a,max:i}}function z1e(e){e.registerChartView(O1e),e.registerSeriesModel(I1e),e.registerLayout(P1e),e.registerProcessor(Um(wd))}var V1e=2,F1e=4,CF=(function(e){ee(t,e);function t(r,n,a,i){var o=e.call(this)||this;o.z2=V1e,o.textConfig={inside:!0},$e(o).seriesIndex=n.seriesIndex;var l=new vt({z2:F1e,silent:r.getModel().get(["label","silent"])});return o.setTextContent(l),o.updateData(!0,r,n,a,i),o}return t.prototype.updateData=function(r,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var l=this;$e(l).dataIndex=n.dataIndex;var s=n.getModel(),c=s.getModel("emphasis"),f=n.getLayout(),h=he({},f);h.label=null;var v=n.getVisual("style");v.lineJoin="bevel";var p=n.getVisual("decal");p&&(v.decal=vd(p,o));var m=vo(s.getModel("itemStyle"),h,!0);he(h,m),B(Wn,function(w){var C=l.ensureState(w),A=s.getModel([w,"itemStyle"]);C.style=A.getItemStyle();var M=vo(A,h);M&&(C.shape=M)}),r?(l.setShape(h),l.shape.r=f.r0,ir(l,{shape:{r:f.r}},a,n.dataIndex)):(_t(l,{shape:h},a),ui(l)),l.useStyle(v),this._updateLabel(a);var y=s.getShallow("cursor");y&&l.attr("cursor",y),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var x=c.get("focus"),b=x==="relative"?id(n.getAncestorsIndices(),n.getDescendantIndices()):x==="ancestor"?n.getAncestorsIndices():x==="descendant"?n.getDescendantIndices():x;er(this,b,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),l=o.endAngle-o.startAngle,s=(o.startAngle+o.endAngle)/2,c=Math.cos(s),f=Math.sin(s),h=this,v=h.getTextContent(),p=this.node.dataIndex,m=i.get("minAngle")/180*Math.PI,y=i.get("show")&&!(m!=null&&Math.abs(l)<m);v.ignore=!y,B(Bg,function(b){var w=b==="normal"?a.getModel("label"):a.getModel([b,"label"]),C=b==="normal",A=C?v:v.ensureState(b),M=r.getFormattedLabel(p,b);C&&(M=M||n.node.name),A.style=Gt(w,{},null,b!=="normal",!0),M&&(A.style.text=M);var R=w.get("show");R!=null&&!C&&(A.ignore=!R);var E=x(w,"position"),N=C?h:h.states[b],L=N.style.fill;N.textConfig={outsideFill:w.get("color")==="inherit"?L:null,inside:E!=="outside"};var O,I=x(w,"distance")||0,z=x(w,"align"),V=x(w,"rotate"),Y=Math.PI*.5,H=Math.PI*1.5,F=_s(V==="tangential"?Math.PI/2-s:s),X=F>Y&&!Nc(F-Y)&&F<H;E==="outside"?(O=o.r+I,z=X?"right":"left"):!z||z==="center"?(o.r0===0&&Nc(l-2*Math.PI)?O=0:O=(o.r+o.r0)/2,z="center"):z==="left"?(O=o.r0+I,z=X?"right":"left"):z==="right"&&(O=o.r-I,z=X?"left":"right"),A.style.align=z,A.style.verticalAlign=x(w,"verticalAlign")||"middle",A.x=O*c+o.cx,A.y=O*f+o.cy;var P=0;V==="radial"?P=_s(-s)+(X?Math.PI:0):V==="tangential"?P=_s(Math.PI/2-s)+(X?Math.PI:0):pt(V)&&(P=V*Math.PI/180),A.rotation=_s(P)});function x(b,w){var C=b.get(w);return C??i.get(w)}v.dirtyStyle()},t})(qn),Qc="sunburst",G1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r,n){var a={name:r.name,children:r.data};AW(a);var i=this._levelModels=xe(r.levels||[],function(s){return new ct(s,this,n)},this),o=eL.createTree(a,this,l);function l(s){s.wrapMethod("getItemModel",function(c,f){var h=o.getNodeByDataIndex(f),v=i[h.depth];return v&&(c.parentModel=v),c})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=Q_(a,this),n},t.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){R$(this)},t.type="series."+Qc,t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t})(Pt);function AW(e){var t=0;B(e.children,function(n){AW(n);var a=n.value;pe(a)&&(a=a[0]),t+=a});var r=e.value;pe(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),pe(e.value)?e.value[0]=r:e.value=r}var ZR="sunburstRootToNode",TF="sunburstHighlight",H1e="sunburstUnhighlight";function U1e(e){e.registerAction({type:ZR,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(a,i){var o=im(t,[ZR],a);if(o){var l=a.getViewRoot();l&&(t.direction=tL(l,o.node)?"rollUp":"drillDown"),a.resetViewRoot(o.node)}}}),e.registerAction({type:TF,update:"none"},function(t,r,n){t=he({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},a);function a(i){var o=im(t,[TF],i);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(he(t,{type:"highlight"}))}),e.registerAction({type:H1e,update:"updateView"},function(t,r,n){t=he({},t),n.dispatchAction(he(t,{type:"downplay"}))})}var Y1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=Qc,r}return t.prototype.render=function(r,n,a,i){var o=this;this.seriesModel=r,this.api=a,this.ecModel=n;var l=r.getData(),s=l.tree.root,c=r.getViewRoot(),f=this.group,h=r.get("renderLabelForZeroData"),v=[];c.eachNode(function(w){v.push(w)});var p=this._oldChildren||[];m(v,p),b(s,c),this._initEvents(),this._oldChildren=v;function m(w,C){if(w.length===0&&C.length===0)return;new hf(C,w,A,A).add(M).update(M).remove(et(M,null)).execute();function A(R){return R.getId()}function M(R,E){var N=R==null?null:w[R],L=E==null?null:C[E];y(N,L)}}function y(w,C){if(!h&&w&&!w.getValue()&&(w=null),w!==s&&C!==s){if(C&&C.piece)w?(C.piece.updateData(!1,w,r,n,a),l.setItemGraphicEl(w.dataIndex,C.piece)):x(C);else if(w){var A=new CF(w,r,n,a);f.add(A),l.setItemGraphicEl(w.dataIndex,A)}}}function x(w){w&&w.piece&&(f.remove(w.piece),w.piece=null)}function b(w,C){C.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,w,r,n,a):(o.virtualPiece=new CF(w,r,n,a),f.add(o.virtualPiece)),C.piece.off("click"),o.virtualPiece.on("click",function(A){o._rootToNode(C.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=r.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var l=o.getModel().get("nodeClick");if(l==="rootToNode")r._rootToNode(o);else if(l==="link"){var s=o.getModel(),c=s.get("link");if(c){var f=s.get("target",!0)||"_blank";nb(c,f)}}a=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ZR,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=r[0]-i.cx,l=r[1]-i.cy,s=Math.sqrt(o*o+l*l);return s<=i.r&&s>=i.r0}},t.type=Qc,t})(It),$1e=zr(Qc,W1e);function W1e(e){var t={};function r(n,a,i){if(n.depth===0)return re.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var l=a.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&De(l)&&(l=VS(l,(n.depth-1)/(i-1)*.5)),l}e.eachSeriesByType(Qc,function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var l=o.getModel(),s=l.getModel("itemStyle").getItemStyle();s.fill||(s.fill=r(o,n,i.root.height));var c=a.ensureUniqueItemVisual(o.dataIndex,"style");he(c,s)})})}var AF=Math.PI/180,q1e=zr(Qc,X1e);function X1e(e,t){e.eachSeriesByType(Qc,function(r){var n=r.get("center"),a=r.get("radius");pe(a)||(a=[0,a]),pe(n)||(n=[n,n]);var i=t.getWidth(),o=t.getHeight(),l=Math.min(i,o),s=Re(n[0],i),c=Re(n[1],o),f=Re(a[0],l/2),h=Re(a[1],l/2),v=-r.get("startAngle")*AF,p=r.get("minAngle")*AF,m=r.getData().tree.root,y=r.getViewRoot(),x=y.depth,b=r.get("sort");b!=null&&DW(y,b);var w=0;B(y.children,function(H){!isNaN(H.getValue())&&w++});var C=y.getValue(),A=Math.PI/(C||w)*2,M=y.depth>0,R=y.height-(M?-1:1),E=(h-f)/(R||1),N=r.get("clockwise"),L=r.get("stillShowZeroSum"),O=N?1:-1,I=function(H,F){if(H){var X=F;if(H!==m){var P=H.getValue(),q=C===0&&L?A:P*A;q<p&&(q=p),X=F+O*q;var G=H.depth-x-(M?-1:1),W=f+E*G,Z=f+E*(G+1),Q=r.getLevelModel(H);if(Q){var U=Q.get("r0",!0),K=Q.get("r",!0),se=Q.get("radius",!0);se!=null&&(U=se[0],K=se[1]),U!=null&&(W=Re(U,l/2)),K!=null&&(Z=Re(K,l/2))}H.setLayout({angle:q,startAngle:F,endAngle:X,clockwise:N,cx:s,cy:c,r0:W,r:Z})}if(H.children&&H.children.length){var ge=0;B(H.children,function(ue){ge+=I(ue,F+ge)})}return X-F}};if(M){var z=f,V=f+E,Y=Math.PI*2;m.setLayout({angle:Y,startAngle:v,endAngle:v+Y,clockwise:N,cx:s,cy:c,r0:z,r:V})}I(y,v)})}function DW(e,t){var r=e.children||[];e.children=Z1e(r,t),r.length&&B(e.children,function(n){DW(n,t)})}function Z1e(e,t){if(Be(t)){var r=xe(e,function(a,i){var o=a.getValue();return{params:{depth:a.depth,height:a.height,dataIndex:a.dataIndex,getValue:function(){return o}},index:i}});return r.sort(function(a,i){return t(a.params,i.params)}),xe(r,function(a){return e[a.index]})}else{var n=t==="asc";return e.sort(function(a,i){var o=(a.getValue()-i.getValue())*(n?1:-1);return o===0?(a.dataIndex-i.dataIndex)*(n?-1:1):o})}}function K1e(e){e.registerChartView(Y1e),e.registerSeriesModel(G1e),e.registerLayout(q1e),e.registerVisual($1e),U1e(e)}var DF={color:"fill",borderColor:"stroke"},Q1e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ml=it(),J1e=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(r,n){return Oo(null,this)},t.prototype.getDataParams=function(r,n,a){var i=e.prototype.getDataParams.call(this,r,n);return a&&(i.info=ml(a).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(Pt);function ewe(e,t){return t=t||[0,0],xe(["x","y"],function(r,n){var a=this.getAxis(r),i=t[n],o=e[n]/2;return a.type==="category"?Zn(a).w:Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function twe(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Ee(ewe,e)}}}function rwe(e,t){return t=t||[0,0],xe([0,1],function(r){var n=t[r],a=e[r]/2,i=[],o=[];return i[r]=n-a,o[r]=n+a,i[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(i)[r]-this.dataToPoint(o)[r])},this)}function nwe(e){var t=e.view,r=t.getBoundingRect();return{coordSys:{type:"geo",x:r.x,y:r.y,width:r.width,height:r.height,zoom:A0e(t)},api:{coord:function(n){return e.dataToPoint(n)},size:Ee(rwe,e)}}}function awe(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return r.type==="category"?Zn(r).w:Math.abs(r.dataToCoord(n-a)-r.dataToCoord(n+a))}function iwe(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r){return e.dataToPoint(r)},size:Ee(awe,e)}}}function owe(e,t){return t=t||[0,0],xe(["Radius","Angle"],function(r,n){var a="get"+r+"Axis",i=this[a](),o=t[n],l=e[n]/2,s=i.type==="category"?Zn(i).w:Math.abs(i.dataToCoord(o-l)-i.dataToCoord(o+l));return r==="Angle"&&(s=s*Math.PI/180),s},this)}function lwe(e){var t=e.getRadiusAxis(),r=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=t.dataToRadius(a[0]),o=r.dataToAngle(a[1]),l=e.coordToPoint([i,o]);return l.push(i,o*Math.PI/180),l},size:Ee(owe,e)}}}function swe(e){var t=e.getRect(),r=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,a){return e.dataToPoint(n,a)},layout:function(n,a){return e.dataToLayout(n,a)}}}}function uwe(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(r,n){return e.dataToPoint(r,n)},layout:function(r,n){return e.dataToLayout(r,n)}}}}var MW={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},MF=dt(MW);ii(wl,function(e,t){return e[t]=1,e},{});wl.join(", ");var Vb=["","style","shape","extra"],Cd=it();function xL(e,t,r,n,a){var i=e+"Animation",o=PE(e,n,a)||{},l=Cd(t).userDuring;return o.duration>0&&(o.during=l?Ee(vwe,{el:t,userDuring:l}):null,o.setToFinal=!0,o.scope=e),he(o,r[i]),o}function mS(e,t,r,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,l=r.isAnimationEnabled(),s=Cd(e),c=t.style;s.userDuring=t.during;var f={},h={};if(gwe(e,t,h),e.type==="compound")for(var v=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var y=p[m];uD("shape",y,v[m])}else uD("shape",t,h),uD("extra",t,h);if(!i&&l&&(pwe(e,t,f),RF("shape",e,t,f),RF("extra",e,t,f),mwe(e,t,c,f)),h.style=c,cwe(e,h,o),hwe(e,t),l)if(i){var x={};B(Vb,function(w){var C=w?t[w]:t;C&&C.enterFrom&&(w&&(x[w]=x[w]||{}),he(w?x[w]:x,C.enterFrom))});var b=xL("enter",e,t,r,a);b.duration>0&&e.animateFrom(x,b)}else fwe(e,t,a||0,r,f);RW(e,t),c?e.dirty():e.markRedraw()}function RW(e,t){for(var r=Cd(e).leaveToProps,n=0;n<Vb.length;n++){var a=Vb[n],i=a?t[a]:t;i&&i.leaveTo&&(r||(r=Cd(e).leaveToProps={}),a&&(r[a]=r[a]||{}),he(a?r[a]:r,i.leaveTo))}}function t1(e,t,r,n){if(e){var a=e.parent,i=Cd(e).leaveToProps;if(i){var o=xL("update",e,t,r,0);o.done=function(){a&&a.remove(e)},e.animateTo(i,o)}else a&&a.remove(e)}}function Dc(e){return e==="all"}function cwe(e,t,r){var n=t.style;if(!e.isGroup&&n){if(r){e.useStyle({});for(var a=e.animators,i=0;i<a.length;i++){var o=a[i];o.targetName==="style"&&o.changeTarget(e.style)}}e.setStyle(n)}t&&(t.style=null,t&&e.attr(t),t.style=n)}function fwe(e,t,r,n,a){if(a){var i=xL("update",e,t,n,r);i.duration>0&&e.animateFrom(a,i)}}function hwe(e,t){Ne(t,"silent")&&(e.silent=t.silent),Ne(t,"ignore")&&(e.ignore=t.ignore),e instanceof Ni&&Ne(t,"invisible")&&(e.invisible=t.invisible),e instanceof yt&&Ne(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var ao={},dwe={setTransform:function(e,t){return ao.el[e]=t,this},getTransform:function(e){return ao.el[e]},setShape:function(e,t){var r=ao.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=ao.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=ao.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=ao.el.style;if(t)return t[e]},setExtra:function(e,t){var r=ao.el.extra||(ao.el.extra={});return r[e]=t,this},getExtra:function(e){var t=ao.el.extra;if(t)return t[e]}};function vwe(){var e=this,t=e.el;if(t){var r=Cd(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}ao.el=t,n(dwe)}}function RF(e,t,r,n){var a=r[e];if(a){var i=t[e],o;if(i){var l=r.transition,s=a.transition;if(s)if(!o&&(o=n[e]={}),Dc(s))he(o,i);else for(var c=ar(s),f=0;f<c.length;f++){var h=c[f],v=i[h];o[h]=v}else if(Dc(l)||qe(l,e)>=0){!o&&(o=n[e]={});for(var p=dt(i),f=0;f<p.length;f++){var h=p[f],v=i[h];ywe(a[h],v)&&(o[h]=v)}}}}}function uD(e,t,r){var n=t[e];if(n)for(var a=r[e]={},i=dt(n),o=0;o<i.length;o++){var l=i[o];a[l]=sg(n[l])}}function pwe(e,t,r){for(var n=t.transition,a=Dc(n)?wl:ar(n||[]),i=0;i<a.length;i++){var o=a[i];if(!(o==="style"||o==="shape"||o==="extra")){var l=e[o];r[o]=l}}}function gwe(e,t,r){for(var n=0;n<MF.length;n++){var a=MF[n],i=MW[a],o=t[a];o&&(r[i[0]]=o[0],r[i[1]]=o[1])}for(var n=0;n<wl.length;n++){var l=wl[n];t[l]!=null&&(r[l]=t[l])}}function mwe(e,t,r,n){if(r){var a=e.style,i;if(a){var o=r.transition,l=t.transition;if(o&&!Dc(o)){var s=ar(o);!i&&(i=n.style={});for(var c=0;c<s.length;c++){var f=s[c],h=a[f];i[f]=h}}else if(e.getAnimationStyleProps&&(Dc(l)||Dc(o)||qe(l,"style")>=0)){var v=e.getAnimationStyleProps(),p=v?v.style:null;if(p){!i&&(i=n.style={});for(var m=dt(r),c=0;c<m.length;c++){var f=m[c];if(p[f]){var h=a[f];i[f]=h}}}}}}}function ywe(e,t){return Sn(e)?e!==t:e!=null&&isFinite(e)}var EW=it(),xwe=["percent","easing","shape","style","extra"];function NW(e){e.stopAnimation("keyframe"),e.attr(EW(e))}function Fb(e,t,r){if(!(!r.isAnimationEnabled()||!t)){if(pe(t)){B(t,function(l){Fb(e,l,r)});return}var n=t.keyframes,a=t.duration;if(r&&a==null){var i=PE("enter",r,0);a=i&&i.duration}if(!(!n||!a)){var o=EW(e);B(Vb,function(l){if(!(l&&!e[l])){var s;n.sort(function(c,f){return c.percent-f.percent}),B(n,function(c){var f=e.animators,h=l?c[l]:c;if(h){var v=dt(h);if(l||(v=Bt(v,function(y){return qe(xwe,y)<0})),!!v.length){s||(s=e.animate(l,t.loop,!0),s.scope="keyframe");for(var p=0;p<f.length;p++)f[p]!==s&&f[p].targetName===s.targetName&&f[p].stopTracks(v);l&&(o[l]=o[l]||{});var m=l?o[l]:o;B(v,function(y){m[y]=((l?e[l]:e)||{})[y]}),s.whenWithKeys(a*c.percent,h,v,c.easing)}}}),s&&s.delay(t.delay||0).duration(a).start(t.easing)}})}}}var yl="emphasis",As="normal",SL="blur",bL="select",$s=[As,yl,SL,bL],cD={normal:["itemStyle"],emphasis:[yl,"itemStyle"],blur:[SL,"itemStyle"],select:[bL,"itemStyle"]},fD={normal:["label"],emphasis:[yl,"label"],blur:[SL,"label"],select:[bL,"label"]},Swe=["x","y"],bwe="e\0\0",Ga={normal:{},emphasis:{},blur:{},select:{}},_we={cartesian2d:twe,geo:nwe,single:iwe,polar:lwe,calendar:swe,matrix:uwe};function KR(e){return e instanceof yt}function QR(e){return e instanceof Ni}function wwe(e,t){t.copyTransform(e),QR(t)&&QR(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,KR(t)&&KR(e)&&t.setShape(e.shape))}var Cwe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a,i){this._progressiveEls=null;var o=this._data,l=r.getData(),s=this.group,c=EF(r,l,n,a);o||s.removeAll(),l.diff(o).add(function(h){hD(a,null,h,c(h,i),r,s,l)}).remove(function(h){var v=o.getItemGraphicEl(h);v&&t1(v,ml(v).option,r)}).update(function(h,v){var p=o.getItemGraphicEl(v);hD(a,p,h,c(h,i),r,s,l)}).execute();var f=r.get("clip",!0)?Hc(r.coordinateSystem,!1,r):null;f?s.setClipPath(f):s.removeClipPath(),this._data=l},t.prototype.incrementalPrepareRender=function(r,n,a){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(r,n,a,i,o){var l=n.getData(),s=EF(n,l,a,i),c=this._progressiveEls=[];function f(p){p.isGroup||(p.incremental=yo(n),p.ensureState("emphasis").hoverLayer=Vd)}for(var h=r.start;h<r.end;h++){var v=hD(null,null,h,s(h,o),n,this.group,l);v&&(v.traverse(f),c.push(v))}},t.prototype.eachRendered=function(r){Qs(this._progressiveEls||this.group,r)},t.prototype.filterForExposedEvent=function(r,n,a,i){var o=n.element;if(o==null||a.name===o)return!0;for(;(a=a.__hostTarget||a.parent)&&a!==this.group;)if(a.name===o)return!0;return!1},t.type="custom",t})(It);function _L(e){var t=e.type,r;if(t==="path"){var n=e.shape,a=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,i=OW(n);r=fd(i,null,a,n.layout||"center"),ml(r).customPathData=i}else if(t==="image")r=new Xr({}),ml(r).customImagePath=e.style.image;else if(t==="text")r=new vt({});else if(t==="group")r=new ze;else if(t==="compoundPath"){var n=e.shape;if(!n||!n.paths){var o="";wt(o)}var l=xe(n.paths,function(f){if(f.type==="path")return fd(f.shape.pathData,f,null);var h=Vg(f.type);if(!h){var v="";wt(v)}return new h});r=new Nm({shape:{paths:l}})}else{var s=Vg(t);if(!s){var o="";wt(o)}r=new s}return ml(r).customGraphicType=t,r.name=e.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function wL(e,t,r,n,a,i,o){NW(t);var l=a&&a.normal.cfg;l&&t.setTextConfig(l),n&&n.transition==null&&(n.transition=Swe);var s=n&&n.style;if(s){if(t.type==="text"){var c=s;Ne(c,"textFill")&&(c.fill=c.textFill),Ne(c,"textStroke")&&(c.stroke=c.textStroke)}var f=void 0,h=KR(t)?s.decal:null;e&&h&&(h.dirty=!0,f=vd(h,e)),s.__decalPattern=f}if(QR(t)&&s){var f=s.__decalPattern;f&&(s.decal=f)}mS(t,n,i,{dataIndex:r,isInit:o,clearStyle:!0}),Fb(t,n.keyframeAnimation,i)}function LW(e,t,r,n,a){var i=t.isGroup?null:t,o=a&&a[e].cfg;if(i){var l=i.ensureState(e);if(n===!1){var s=i.getState(e);s&&(s.style=null)}else l.style=n||null;o&&(l.textConfig=o),kc(i)}}function Twe(e,t,r){if(!e.isGroup){var n=e,a=r.currentZ,i=r.currentZLevel;n.z=a,n.zlevel=i;var o=t.z2;o!=null&&(n.z2=o||0);for(var l=0;l<$s.length;l++)Awe(n,t,$s[l])}}function Awe(e,t,r){var n=r===As,a=n?t:Gb(t,r),i=a?a.z2:null,o;i!=null&&(o=n?e:e.ensureState(r),o.z2=i||0)}function EF(e,t,r,n){var a=e.get("renderItem");if(typeof a=="string"){var i=Mde(a);i&&(a=i)}var o=e.coordinateSystem,l={};o&&(l=o.prepareCustoms?o.prepareCustoms(o):_we[o.type](o));for(var s=Ue({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:M,style:E,ordinalRawValue:R,styleEmphasis:N,visual:I,barLayout:z,currentSeriesIndices:V,font:Y},l.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:l.coordSys,dataInsideLength:t.count(),encode:Dwe(e.getData()),itemPayload:e.get("itemPayload")||{}},f,h,v={},p={},m={},y={},x=0;x<$s.length;x++){var b=$s[x];m[b]=e.getModel(cD[b]),y[b]=e.getModel(fD[b])}function w(H){return H===f?h||(h=t.getItemModel(H)):t.getItemModel(H)}function C(H,F){return t.hasItemOption?H===f?v[F]||(v[F]=w(H).getModel(cD[F])):w(H).getModel(cD[F]):m[F]}function A(H,F){return t.hasItemOption?H===f?p[F]||(p[F]=w(H).getModel(fD[F])):w(H).getModel(fD[F]):y[F]}return function(H,F){return f=H,h=null,v={},p={},a&&a(Ue({dataIndexInside:H,dataIndex:t.getRawIndex(H),actionType:F?F.type:null},c),s)};function M(H,F){return F==null&&(F=f),t.getStore().get(t.getDimensionIndex(H||0),F)}function R(H,F){F==null&&(F=f),H=H||0;var X=t.getDimensionInfo(H);if(!X){var P=t.getDimensionIndex(H);return P>=0?t.getStore().get(P,F):void 0}var q=t.get(X.name,F),G=X&&X.ordinalMeta;return G?G.categories[q]:q}function E(H,F){F==null&&(F=f);var X=t.getItemVisual(F,"style"),P=X&&X.fill,q=X&&X.opacity,G=C(F,As).getItemStyle();P!=null&&(G.fill=P),q!=null&&(G.opacity=q);var W={inheritColor:De(P)?P:re.color.neutral99},Z=A(F,As),Q=Gt(Z,null,W,!1,!0);Q.text=Z.getShallow("show")?Ie(e.getFormattedLabel(F,As),xd(t,F)):null;var U=QS(Z,W,!1);return O(H,G),G=S5(G,Q,U),H&&L(G,H),G.legacy=!0,G}function N(H,F){F==null&&(F=f);var X=C(F,yl).getItemStyle(),P=A(F,yl),q=Gt(P,null,null,!0,!0);q.text=P.getShallow("show")?ca(e.getFormattedLabel(F,yl),e.getFormattedLabel(F,As),xd(t,F)):null;var G=QS(P,null,!0);return O(H,X),X=S5(X,q,G),H&&L(X,H),X.legacy=!0,X}function L(H,F){for(var X in F)Ne(F,X)&&(H[X]=F[X])}function O(H,F){H&&(H.textFill&&(F.textFill=H.textFill),H.textPosition&&(F.textPosition=H.textPosition))}function I(H,F){if(F==null&&(F=f),Ne(DF,H)){var X=t.getItemVisual(F,"style");return X?X[DF[H]]:null}if(Ne(Q1e,H))return t.getItemVisual(F,H)}function z(H){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Ime(Ue({axis:F},H))}}function V(){return r.getCurrentSeriesIndices()}function Y(H){return UE(H,r)}}function Dwe(e){var t={};return B(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var a=n.coordDim,i=t[a]=t[a]||[];i[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function hD(e,t,r,n,a,i,o){if(!n){i.remove(t);return}var l=CL(e,t,r,n,a,i);return l&&o.setItemGraphicEl(r,l),l&&er(l,n.focus,n.blurScope,n.emphasisDisabled),l}function CL(e,t,r,n,a,i){var o=-1,l=t;t&&IW(t,n,a)&&(o=qe(i.childrenRef(),t),t=null);var s=!t,c=t;c?c.clearStates():(c=_L(n),l&&wwe(l,c)),n.morph===!1?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),n.tooltipDisabled&&(c.tooltipDisabled=!0),Ga.normal.cfg=Ga.normal.conOpt=Ga.emphasis.cfg=Ga.emphasis.conOpt=Ga.blur.cfg=Ga.blur.conOpt=Ga.select.cfg=Ga.select.conOpt=null,Ga.isLegacy=!1,Rwe(c,r,n,a,s,Ga),Mwe(c,r,n,a,s),wL(e,c,r,n,Ga,a,s),Ne(n,"info")&&(ml(c).info=n.info);for(var f=0;f<$s.length;f++){var h=$s[f];if(h!==As){var v=Gb(n,h),p=TL(n,v,h);LW(h,c,v,p,Ga)}}return Twe(c,n,a),n.type==="group"&&Ewe(e,c,r,n,a),o>=0?i.replaceAt(c,o):i.add(c),c}function IW(e,t,r){var n=ml(e),a=t.type,i=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&Owe(i)&&OW(i)!==n.customPathData||a==="image"&&Ne(o,"image")&&o.image!==n.customImagePath}function Mwe(e,t,r,n,a){var i=r.clipPath;if(i===!1)e&&e.getClipPath()&&e.removeClipPath();else if(i){var o=e.getClipPath();o&&IW(o,i,n)&&(o=null),o||(o=_L(i),e.setClipPath(o)),wL(null,o,t,i,null,n,a)}}function Rwe(e,t,r,n,a,i){if(!(e.isGroup||e.type==="compoundPath")){NF(r,null,i),NF(r,yl,i);var o=i.normal.conOpt,l=i.emphasis.conOpt,s=i.blur.conOpt,c=i.select.conOpt;if(o!=null||l!=null||c!=null||s!=null){var f=e.getTextContent();if(o===!1)f&&e.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=_L(o),e.setTextContent(f)),wL(null,f,t,o,null,n,a);for(var h=o&&o.style,v=0;v<$s.length;v++){var p=$s[v];if(p!==As){var m=i[p].conOpt;LW(p,f,m,TL(o,m,p),null)}}h?f.dirty():f.markRedraw()}}}}function NF(e,t,r){var n=t?Gb(e,t):e,a=t?TL(e,n,yl):e.style,i=e.type,o=n?n.textConfig:null,l=e.textContent,s=l?t?Gb(l,t):l:null;if(a&&(r.isLegacy||m9(a,i,!!o,!!s))){r.isLegacy=!0;var c=y9(a,i,!t);!o&&c.textConfig&&(o=c.textConfig),!s&&c.textContent&&(s=c.textContent)}if(!t&&s){var f=s;!f.type&&(f.type="text")}var h=t?r[t]:r.normal;h.cfg=o,h.conOpt=s}function Gb(e,t){return t?e?e[t]:null:e}function TL(e,t,r){var n=t&&t.style;return n==null&&r===yl&&e&&(n=e.styleEmphasis),n}function Ewe(e,t,r,n,a){var i=n.children,o=i?i.length:0,l=n.$mergeChildren,s=l==="byName"||n.diffChildrenByName,c=l===!1;if(!(!o&&!s&&!c)){if(s){Lwe({api:e,oldChildren:t.children()||[],newChildren:i||[],dataIndex:r,seriesModel:a,group:t});return}c&&t.removeAll();for(var f=0;f<o;f++){var h=i[f],v=t.childAt(f);h?(h.ignore==null&&(h.ignore=!1),CL(e,v,r,h,a,t)):v.ignore=!0}for(var p=t.childCount()-1;p>=f;p--){var m=t.childAt(p);Nwe(t,m,a)}}}function Nwe(e,t,r){t&&t1(t,ml(e).option,r)}function Lwe(e){new hf(e.oldChildren,e.newChildren,LF,LF,e).add(IF).update(IF).remove(Iwe).execute()}function LF(e,t){var r=e&&e.name;return r??bwe+t}function IF(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,a=t!=null?r.oldChildren[t]:null;CL(r.api,a,r.dataIndex,n,r.seriesModel,r.group)}function Iwe(e){var t=this.context,r=t.oldChildren[e];r&&t1(r,ml(r).option,t.seriesModel)}function OW(e){return e&&(e.pathData||e.d)}function Owe(e){return e&&(Ne(e,"pathData")||Ne(e,"d"))}function kwe(e){e.registerChartView(Cwe),e.registerSeriesModel(J1e)}const Pwe=Object.freeze(Object.defineProperty({__proto__:null,BarChart:Qme,BoxplotChart:P_e,CandlestickChart:e1e,ChordChart:YSe,CustomChart:kwe,EffectScatterChart:a1e,FunnelChart:obe,GaugeChart:KSe,GraphChart:jSe,HeatmapChart:b1e,LineChart:ime,LinesChart:v1e,MapChart:J0e,ParallelChart:Kbe,PictorialBarChart:L1e,PieChart:uye,RadarChart:Zye,SankeyChart:w_e,ScatterChart:zye,SunburstChart:K1e,ThemeRiverChart:z1e,TreeChart:Dxe,TreemapChart:cSe},Symbol.toStringTag,{value:"Module"})),jwe=e_(Pwe);var uc=it(),OF=je,dD=Ee,AL=(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,a){var i=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var l=this._group,s=this._handle;if(!o||o==="hide"){l&&l.hide(),s&&s.hide();return}l&&l.show(),s&&s.show();var c={};this.makeElOption(c,i,t,r,n);var f=c.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,r);if(!l)l=this._group=new ze,this.createPointerEl(l,c,t,r),this.createLabelEl(l,c,t,r),n.getZr().add(l);else{var v=et(kF,r,h);this.updatePointerEl(l,c,v),this.updateLabelEl(l,c,v,r)}jF(l,r,!0),this._renderHandle(i)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,r){var n=r.get("animation"),a=t.axis,i=a.type==="category",o=r.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var l=this.animationThreshold;if(i&&Zn(a).w>l)return!0;if(o){var s=FN(t).seriesDataCount,c=a.getExtent();return Math.abs(c[0]-c[1])/s>l}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,a,i){},e.prototype.createPointerEl=function(t,r,n,a){var i=r.pointer;if(i){var o=uc(t).pointerEl=new sf[i.type](OF(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,a){if(r.label){var i=uc(t).labelEl=new vt(OF(r.label));t.add(i),PF(i,a)}},e.prototype.updatePointerEl=function(t,r,n){var a=uc(t).pointerEl;a&&r.pointer&&(a.setStyle(r.pointer.style),n(a,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,a){var i=uc(t).labelEl;i&&(i.setStyle(r.label.style),n(i,{x:r.label.x,y:r.label.y}),PF(i,a))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=r.getModel("handle"),o=r.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var l;this._handle||(l=!0,a=this._handle=Fd(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(c){_l(c.event)},onmousedown:dD(this._onHandleDragMove,this,0,0),drift:dD(this._onHandleDragMove,this),ondragend:dD(this._onHandleDragEnd,this)}),n.add(a)),jF(a,r,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");pe(s)||(s=[s,s]),a.scaleX=s[0]/2,a.scaleY=s[1]/2,Yd(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,l)}},e.prototype._moveHandleToValue=function(t,r){kF(this._axisPointerModel,!r&&this._moveAnimation,this._handle,vD(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(vD(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(vD(a)),uc(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){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}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var r=t.getZr(),n=this._group,a=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),a&&r.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),Ug(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,r,n){return n=n||0,{x:t[n],y:t[1-n],width:r[n],height:r[1-n]}},e})();function kF(e,t,r,n){kW(uc(r).lastProp,n)||(uc(r).lastProp=n,t?_t(r,n,e):(r.stopAnimation(),r.attr(n)))}function kW(e,t){if(Ve(e)&&Ve(t)){var r=!0;return B(t,function(n,a){r=r&&kW(e[a],n)}),!!r}else return e===t}function PF(e,t){e[t.get(["label","show"])?"show":"hide"]()}function vD(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function jF(e,t,r){var n=t.get("z"),a=t.get("zlevel");e&&e.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=r)})}function DL(e){var t=e.get("type"),r=e.getModel(t+"Style"),n;return t==="line"?(n=r.getLineStyle(),n.fill=null):t==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function PW(e,t,r,n,a){var i=r.get("value"),o=jW(i,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),l=r.getModel("label"),s=Gd(l.get("padding")||0),c=l.getFont(),f=y_(o,c),h=a.position,v=f.width+s[1]+s[3],p=f.height+s[0]+s[2],m=a.align;m==="right"&&(h[0]-=v),m==="center"&&(h[0]-=v/2);var y=a.verticalAlign;y==="bottom"&&(h[1]-=p),y==="middle"&&(h[1]-=p/2),Bwe(h,v,p,n);var x=l.get("backgroundColor");(!x||x==="auto")&&(x=t.get(["axisLine","lineStyle","color"])),e.label={x:h[0],y:h[1],style:Gt(l,{text:o,font:c,fill:l.getTextColor(),padding:s,backgroundColor:x}),z2:10}}function Bwe(e,t,r,n){var a=n.getWidth(),i=n.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+r,i)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function jW(e,t,r,n,a){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:a.precision}),o=a.formatter;if(o){var l={value:yb(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};B(n,function(s){var c=r.getSeriesByIndex(s.seriesIndex),f=s.dataIndexInside,h=c&&c.getDataParams(f);h&&l.seriesData.push(h)}),De(o)?i=o.replace("{value}",i):Be(o)&&(i=o(l))}return i}function ML(e,t,r){var n=lr();return Zs(n,n,r.rotation),Ei(n,n,r.position),Ri([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function BW(e,t,r,n,a,i){var o=Yn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=a.get(["label","margin"]),PW(t,n,a,i,{position:ML(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function RL(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function zW(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function BF(e,t,r,n,a,i){return{cx:e,cy:t,r0:r,r:n,startAngle:a,endAngle:i,clockwise:!0}}function EL(e,t,r){return Zn(e,{fromStat:{sers:xe(t,function(n){return r.getSeriesByIndex(n.seriesIndex)})},min:1}).w}function NL(e,t,r){return[st(kt(t[0],t[1]),e-r/2),kt(e+r/2,st(t[0],t[1]))]}var zwe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,a,i,o){var l=a.axis,s=l.grid,c=i.get("type"),f=l.getGlobalExtent(),h=zF(s,l).getOtherAxis(l).getGlobalExtent(),v=l.toGlobalCoord(l.dataToCoord(n,!0));if(c&&c!=="none"){var p=DL(i),m=Vwe[c](l,v,f,h,i.get("seriesDataIndices"),i.ecModel);m.style=p,r.graphicKey=m.type,r.pointer=m}var y=Tb(s.getRect(),a);BW(n,r,y,a,i,o)},t.prototype.getHandleTransform=function(r,n,a){var i=Tb(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=ML(n.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,a,i){var o=a.axis,l=o.grid,s=o.getGlobalExtent(!0),c=zF(l,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[r.x,r.y];h[f]+=n[f],h[f]=kt(s[1],h[f]),h[f]=st(s[0],h[f]);var v=(c[1]+c[0])/2,p=[v,v];p[f]=h[f];var m=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:p,tooltipOption:m[f]}},t})(AL);function zF(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var Vwe={line:function(e,t,r,n){var a=RL([t,n[0]],[t,n[1]],VF(e));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(e,t,r,n,a,i){var o=EL(e,a,i),l=n[1]-n[0],s=NL(t,r,o),c=s[0],f=s[1];return{type:"Rect",shape:zW([c,n[0]],[f-c,l],VF(e))}}};function VF(e){return e.dim==="x"?0:1}var Fwe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:re.color.border,width:1,type:"dashed"},shadowStyle:{color:re.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:re.color.neutral00,padding:[5,7,5,7],backgroundColor:re.color.accent60,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:re.color.accent40,throttle:40}},t})(lt),fl=it(),Gwe=B;function VW(e,t,r){if(!ht.node){var n=t.getZr();fl(n).records||(fl(n).records={}),Hwe(n,t);var a=fl(n).records[e]||(fl(n).records[e]={});a.handler=r}}function Hwe(e,t){if(fl(e).initialized)return;fl(e).initialized=!0,r("click",et(pD,"click")),r("mousemove",et(pD,"mousemove")),r("mousewheel",et(pD,"mousewheel")),r("globalout",Ywe);function r(n,a){e.on(n,function(i){var o=$we(t);Gwe(fl(e).records,function(l){l&&a(l,i,o.dispatchAction)}),Uwe(o.pendings,t)})}}function Uwe(e,t){var r=e.showTip.length,n=e.hideTip.length,a;r?a=e.showTip[r-1]:n&&(a=e.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function Ywe(e,t,r){e.handler("leave",null,r)}function pD(e,t,r,n){t.handler(e,r,n)}function $we(e){var t={showTip:[],hideTip:[]},r=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function JR(e,t){if(!ht.node){var r=t.getZr(),n=(fl(r).records||{})[e];n&&(fl(r).records[e]=null)}}var Wwe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=n.getComponent("tooltip"),o=r.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click|mousewheel";VW("axisPointer",a,function(l,s,c){o!=="none"&&(l==="leave"||o.indexOf(l)>=0)&&c({type:"updateAxisPointer",currTrigger:l,x:s&&s.offsetX,y:s&&s.offsetY})})},t.prototype.remove=function(r,n){JR("axisPointer",n)},t.prototype.dispose=function(r,n){JR("axisPointer",n)},t.type="axisPointer",t})(Ht);function FW(e,t){var r=[],n=e.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=Ic(i,e);if(o==null||o<0||pe(o))return{point:[]};var l=i.getItemGraphicEl(o),s=a.coordinateSystem;if(a.getTooltipPosition)r=a.getTooltipPosition(o)||[];else if(s&&s.dataToPoint)if(e.isStacked){var c=s.getBaseAxis(),f=s.getOtherAxis(c),h=f.dim,v=c.dim,p=h==="x"||h==="radius"?1:0,m=i.mapDimension(v),y=[];y[p]=i.get(m,o),y[1-p]=i.get(i.getCalculationInfo("stackResultDimension"),o),r=s.dataToPoint(y)||[]}else r=s.dataToPoint(i.getValues(xe(s.dimensions,function(b){return i.mapDimension(b)}),o))||[];else if(l){var x=l.getBoundingRect().clone();x.applyTransform(l.transform),r=[x.x+x.width/2,x.y+x.height/2]}return{point:r,el:l}}var FF=it();function qwe(e,t,r){var n=e.currTrigger,a=[e.x,e.y],i=e,o=e.dispatchAction||Ee(r.dispatchAction,r),l=t.getComponent("axisPointer").coordSysAxesInfo;if(l){yS(a)&&(a=FW({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var s=yS(a),c=i.axesInfo,f=l.axesInfo,h=n==="leave"||yS(a),v={},p={},m={list:[],map:{}},y={showPointer:et(Zwe,p),showTooltip:et(Kwe,m)};B(l.coordSysMap,function(b,w){var C=s||b.containPoint(a);B(l.coordSysAxesInfo[w],function(A,M){var R=A.axis,E=tCe(c,A);if(!h&&C&&(!c||E)){var N=E&&E.value;N==null&&!s&&(N=R.pointToData(a)),N!=null&&GF(A,N,y,!1,v)}})});var x={};return B(f,function(b,w){var C=b.linkGroup;C&&!p[w]&&B(C.axesInfo,function(A,M){var R=p[M];if(A!==b&&R){var E=R.value;C.mapper&&(E=b.axis.scale.parse(C.mapper(E,HF(A),HF(b)))),x[b.key]=E}})}),B(x,function(b,w){GF(f[w],b,y,!0,v)}),Qwe(p,f,v),Jwe(m,a,e,o),eCe(f,o,r),v}}function GF(e,t,r,n,a){var i=e.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=Xwe(t,e),l=o.payloadBatch,s=o.snapToValue;l[0]&&a.seriesIndex==null&&he(a,l[0]),!n&&e.snap&&i.containData(s)&&s!=null&&(t=s),r.showPointer(e,t,l),r.showTooltip(e,o,s)}}function Xwe(e,t){var r=t.axis,n=r.dim,a=e,i=[],o=Number.MAX_VALUE,l=-1;return B(t.seriesModels,function(s,c){var f=s.getData().mapDimensionsAll(n),h,v;if(s.getAxisTooltipData){var p=s.getAxisTooltipData(f,e,r);v=p.dataIndices,h=p.nestestValue}else{if(v=s.indicesOfNearest(n,f[0],e,r.type==="category"?.5:null),!v.length)return;h=s.getData().get(f[0],v[0])}if(si(h)){var m=e-h,y=Math.abs(m);y<=o&&((y<o||m>=0&&l<0)&&(o=y,l=m,a=h,i.length=0),B(v,function(x){i.push({seriesIndex:s.seriesIndex,dataIndexInside:x,dataIndex:s.getData().getRawIndex(x)})}))}}),{payloadBatch:i,snapToValue:a}}function Zwe(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function Kwe(e,t,r,n){var a=r.payloadBatch,i=t.axis,o=i.model,l=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var s=t.coordSys.model,c=tm(s),f=e.map[c];f||(f=e.map[c]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},e.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function Qwe(e,t,r){var n=r.axesInfo=[];B(t,function(a,i){var o=a.axisPointerModel.option,l=e[i];l?(!a.useHandle&&(o.status="show"),o.value=l.value,o.seriesDataIndices=(l.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function Jwe(e,t,r,n){if(yS(t)||!e.list.length){n({type:"hideTip"});return}var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}function eCe(e,t,r){var n=r.getZr(),a="axisPointerLastHighlights",i=FF(n)[a]||{},o=FF(n)[a]={};B(e,function(f,h){var v=f.axisPointerModel.option;v.status==="show"&&f.triggerEmphasis&&B(v.seriesDataIndices,function(p){o[p.seriesIndex+"|"+p.dataIndex]=p})});var l=[],s=[];function c(f){return{seriesIndex:f.seriesIndex,dataIndex:f.dataIndex}}B(i,function(f,h){!o[h]&&s.push(c(f))}),B(o,function(f,h){!i[h]&&l.push(c(f))}),s.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),l.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:l})}function tCe(e,t){for(var r=0;r<(e||[]).length;r++){var n=e[r];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function HF(e){var t=e.axis.model,r={},n=r.axisDim=e.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=t.componentIndex,r.axisName=r[n+"AxisName"]=t.name,r.axisId=r[n+"AxisId"]=t.id,r}function yS(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Ym(e){vf.registerAxisPointerClass("CartesianAxisPointer",zwe),e.registerComponentModel(Fwe),e.registerComponentView(Wwe),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!pe(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=Dye(t,r)}}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},qwe)}function rCe(e){qr(GN),qr(Ym)}var nCe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,a,i,o){var l=a.axis;l.dim==="angle"&&(this.animationThreshold=Math.PI/18);var s=l.polar,c=l.getExtent(),f=s.getOtherAxis(l).getExtent(),h=l.dataToCoord(n),v=i.get("type");if(v&&v!=="none"){var p=DL(i),m=iCe[v](l,s,h,c,f,i.get("seriesDataIndices"),i.ecModel);m.style=p,r.graphicKey=m.type,r.pointer=m}var y=i.get(["label","margin"]),x=aCe(n,a,i,s,y);PW(r,a,i,o,x)},t})(AL);function aCe(e,t,r,n,a){var i=t.axis,o=i.dataToCoord(e),l=n.getAngleAxis().getExtent()[0];l=l/180*Math.PI;var s=n.getRadiusAxis().getExtent(),c,f,h;if(i.dim==="radius"){var v=lr();Zs(v,v,l),Ei(v,v,[n.cx,n.cy]),c=Ri([o,-a],v);var p=t.getModel("axisLabel").get("rotate")||0,m=Yn.innerTextLayout(l,p*Math.PI/180,-1);f=m.textAlign,h=m.textVerticalAlign}else{var y=s[1];c=n.coordToPoint([y+a,o]);var x=n.cx,b=n.cy;f=Math.abs(c[0]-x)/y<.3?"center":c[0]>x?"left":"right",h=Math.abs(c[1]-b)/y<.3?"middle":c[1]>b?"top":"bottom"}return{position:c,align:f,verticalAlign:h}}var iCe={line:function(e,t,r,n,a){return e.dim==="angle"?{type:"Line",shape:RL(t.coordToPoint([a[0],r]),t.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n,a,i,o){var l=Math.PI/180,s=EL(e,i,o),c;if(e.dim==="angle")c=BF(t.cx,t.cy,a[0],a[1],(-r-s/2)*l,(-r+s/2)*l);else{var f=NL(r,n,s),h=f[0],v=f[1];c=BF(t.cx,t.cy,h,v,0,Math.PI*2)}return{type:"Sector",shape:c}}},bo="polar",UF=bo,oCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.findAxisModel=function(r){var n,a=this.ecModel;return a.eachComponent(r,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},t.type=bo,t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t})(lt),LL=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",dr).models[0]},t.type="polarAxis",t})(lt);Cr(LL,Kd);var lCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t})(LL),sCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t})(LL),IL=(function(e){ee(t,e);function t(r,n){return e.call(this,"radius",r,n)||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t})(di);IL.prototype.dataToRadius=di.prototype.dataToCoord;IL.prototype.radiusToData=di.prototype.coordToData;var uCe=it(),OL=(function(e){ee(t,e);function t(r,n){return e.call(this,"angle",r,n||[0,360])||this}return t.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),a=r.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var l=i[0],s=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(s),f=y_(l==null?"":l+"",n.getFont(),"center","top"),h=Math.max(f.height,7),v=h/c;isNaN(v)&&(v=1/0);var p=Math.max(0,Math.floor(v)),m=uCe(r.model),y=m.lastAutoInterval,x=m.lastTickCount;return y!=null&&x!=null&&Math.abs(y-p)<=1&&Math.abs(x-o)<=1&&y>p?p=y:(m.lastTickCount=o,m.lastAutoInterval=p),p},t})(di);OL.prototype.dataToAngle=di.prototype.dataToCoord;OL.prototype.angleToData=di.prototype.coordToData;var GW=["radius","angle"],cCe=(function(){function e(t){this.dimensions=GW,this.type=bo,this.cx=0,this.cy=0,this._radiusAxis=new IL,this._angleAxis=new OL,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(t){var r=this.pointToCoord(t);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},e.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},e.prototype.getAxis=function(t){var r="_"+t+"Axis";return this[r]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(t){var r=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===t&&r.push(n),a.scale.type===t&&r.push(a),r},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(t){var r=this._angleAxis;return t===r?this._radiusAxis:r},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(t){var r=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},e.prototype.dataToPoint=function(t,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],r),this._angleAxis.dataToAngle(t[1],r)],n)},e.prototype.pointToData=function(t,r,n){n=n||[];var a=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(a[0],r),n[1]=this._angleAxis.angleToData(a[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),l=Math.max(i[0],i[1]);a.inverse?o=l-360:l=o+360;var s=Math.sqrt(r*r+n*n);r/=s,n/=s;for(var c=Math.atan2(-n,r)/Math.PI*180,f=c<o?1:-1;c<o||c>l;)c+=f*360;return[s,c]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],a=t[1]/180*Math.PI;return r[0]=Math.cos(a)*n+this.cx,r[1]=-Math.sin(a)*n+this.cy,r},e.prototype.getArea=function(){var t=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var a=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(l,s){var c=l-this.cx,f=s-this.cy,h=c*c+f*f,v=this.r,p=this.r0;return v!==p&&h-o<=v*v&&h+o>=p*p},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},e.prototype.convertToPixel=function(t,r,n){var a=YF(r);return a===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var a=YF(r);return a===this?this.pointToData(n):null},e})();function YF(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function fCe(e,t,r){var n=t.get("center"),a=Vr(t,r).refContainer;e.cx=Re(n[0],a.width)+a.x,e.cy=Re(n[1],a.height)+a.y;var i=e.getRadiusAxis(),o=Math.min(a.width,a.height)/2,l=t.get("radius");l==null?l=[0,"100%"]:pe(l)||(l=[0,l]);var s=[Re(l[0],o),Re(l[1],o)];i.inverse?i.setExtent(s[1],s[0]):i.setExtent(s[0],s[1])}function hCe(e,t){var r=this,n=r.getAngleAxis(),a=r.getRadiusAxis();if(Gc(n,md),Gc(a,md),yd(n),yd(a),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function dCe(e){return e.mainType==="angleAxis"}function $F(e,t){var r;if(e.type=Bm(t),e.scale=Xd(t,e.type,!1),e.onBand=zm(e.scale,t),e.inverse=t.get("inverse"),dCe(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),a=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,a)}t.axis=e,e.model=t}var vCe={dimensions:GW,create:function(e,t){var r=[];return e.eachComponent(UF,function(n,a){var i=new cCe(a+"");i.update=hCe;var o=i.getRadiusAxis(),l=i.getAngleAxis(),s=n.findAxisModel("radiusAxis"),c=n.findAxisModel("angleAxis");$F(o,s),$F(l,c),fCe(i,n,t),r.push(i),n.coordinateSystem=i,i.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")===bo){var a=n.getReferringComponents(UF,dr).models[0],i=n.coordinateSystem=a.coordinateSystem;i&&(Fc(i.getRadiusAxis(),n,bo),Fc(i.getAngleAxis(),n,bo))}}),r}},pCe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Tx(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),a=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function Ax(e){var t=e.getRadiusAxis();return t.inverse?0:1}function WF(e){var t=e[0],r=e[e.length-1];t&&r&&Math.abs(Math.abs(t.coord-r.coord)-360)<1e-4&&e.pop()}var gCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var a=r.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),l=a.getTicksCoords({breakTicks:"none"}),s=a.getMinorTicksCoords(),c=[];B(a.getViewLabels(),function(f){if(!f.tick.offInterval){f=je(f);var h=a.scale;f.coord=a.dataToCoord(Zd(h,f.tick)),c.push(f)}}),WF(c),WF(l),B(pCe,function(f){r.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&mCe[f](this.group,r,i,l,s,o,c)},this)}},t.type="angleAxis",t})(vf),mCe={axisLine:function(e,t,r,n,a,i){var o=t.getModel(["axisLine","lineStyle"]),l=r.getAngleAxis(),s=Math.PI/180,c=l.getExtent(),f=Ax(r),h=f?0:1,v,p=Math.abs(c[1]-c[0])===360?"Circle":"Arc";i[h]===0?v=new sf[p]({shape:{cx:r.cx,cy:r.cy,r:i[f],startAngle:-c[0]*s,endAngle:-c[1]*s,clockwise:l.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new Bd({shape:{cx:r.cx,cy:r.cy,r:i[f],r0:i[h]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,e.add(v)},axisTick:function(e,t,r,n,a,i){var o=t.getModel("axisTick"),l=(o.get("inside")?-1:1)*o.get("length"),s=i[Ax(r)],c=xe(n,function(f){return new Mr({shape:Tx(r,[s,s+l],f.coord)})});e.add(wa(c,{style:Ue(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,a,i){if(a.length){for(var o=t.getModel("axisTick"),l=t.getModel("minorTick"),s=(o.get("inside")?-1:1)*l.get("length"),c=i[Ax(r)],f=[],h=0;h<a.length;h++)for(var v=0;v<a[h].length;v++)f.push(new Mr({shape:Tx(r,[c,c+s],a[h][v].coord)}));e.add(wa(f,{style:Ue(l.getModel("lineStyle").getLineStyle(),Ue(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,n,a,i,o){var l=t.getCategories(!0),s=t.getModel("axisLabel"),c=s.get("margin"),f=t.get("triggerEvent");B(o,function(h,v){var p=s,m=h.tick.value,y=i[Ax(r)],x=r.coordToPoint([y+c,h.coord]),b=r.cx,w=r.cy,C=Math.abs(x[0]-b)/y<.3?"center":x[0]>b?"left":"right",A=Math.abs(x[1]-w)/y<.3?"middle":x[1]>w?"top":"bottom";if(l&&l[m]){var M=l[m];Ve(M)&&M.textStyle&&(p=new ct(M.textStyle,s,s.ecModel))}var R=new vt({silent:Yn.isLabelSilent(t),style:Gt(p,{x:x[0],y:x[1],fill:p.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:C,verticalAlign:A})});if(e.add(R),Nl({el:R,componentModel:t,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return R.isTruncated},value:h.rawLabel,tickIndex:v}}),f){var E=Yn.makeAxisEventDataBase(t);E.targetType="axisLabel",E.value=h.rawLabel,$e(R).eventData=E}},this)},splitLine:function(e,t,r,n,a,i){var o=t.getModel("splitLine"),l=o.getModel("lineStyle"),s=l.get("color"),c=0;s=s instanceof Array?s:[s];for(var f=[],h=0;h<n.length;h++){var v=c++%s.length;f[v]=f[v]||[],f[v].push(new Mr({shape:Tx(r,i,n[h].coord)}))}for(var h=0;h<f.length;h++)e.add(wa(f[h],{style:Ue({stroke:s[h%s.length]},l.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,n,a,i){if(a.length){for(var o=t.getModel("minorSplitLine"),l=o.getModel("lineStyle"),s=[],c=0;c<a.length;c++)for(var f=0;f<a[c].length;f++)s.push(new Mr({shape:Tx(r,i,a[c][f].coord)}));e.add(wa(s,{style:l.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,n,a,i){if(n.length){var o=t.getModel("splitArea"),l=o.getModel("areaStyle"),s=l.get("color"),c=0;s=s instanceof Array?s:[s];for(var f=[],h=Math.PI/180,v=-n[0].coord*h,p=Math.min(i[0],i[1]),m=Math.max(i[0],i[1]),y=t.get("clockwise"),x=1,b=n.length;x<=b;x++){var w=x===b?n[0].coord:n[x].coord,C=c++%s.length;f[C]=f[C]||[],f[C].push(new qn({shape:{cx:r.cx,cy:r.cy,r0:p,r:m,startAngle:v,endAngle:-w*h,clockwise:y},silent:!0})),v=-w*h}for(var x=0;x<f.length;x++)e.add(wa(f[x],{style:Ue({fill:s[x%s.length]},l.getAreaStyle()),silent:!0}))}}},yCe=["splitLine","splitArea","minorSplitLine"],xCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="PolarAxisPointer",r}return t.prototype.render=function(r,n,a){if(this.group.removeAll(),!!r.get("show")){var i=this._axisGroup,o=this._axisGroup=new ze;this.group.add(o);var l=r.axis,s=l.polar,c=s.getAngleAxis(),f=l.getTicksCoords(),h=l.getMinorTicksCoords(),v=c.getExtent()[0],p=l.getExtent(),m=bCe(s,r,v),y=new Yn(r,a,m);y.build(),o.add(y.group),Lm(i,o,r),B(yCe,function(x){r.get([x,"show"])&&!l.scale.isBlank()&&SCe[x](this.group,r,s,v,p,f,h)},this)}},t.type="radiusAxis",t})(vf),SCe={splitLine:function(e,t,r,n,a,i){var o=t.getModel("splitLine"),l=o.getModel("lineStyle"),s=l.get("color"),c=0,f=r.getAngleAxis(),h=Math.PI/180,v=f.getExtent(),p=Math.abs(v[1]-v[0])===360?"Circle":"Arc";s=s instanceof Array?s:[s];for(var m=[],y=0;y<i.length;y++){var x=c++%s.length;m[x]=m[x]||[],m[x].push(new sf[p]({shape:{cx:r.cx,cy:r.cy,r:Math.max(i[y].coord,0),startAngle:-v[0]*h,endAngle:-v[1]*h,clockwise:f.inverse}}))}for(var y=0;y<m.length;y++)e.add(wa(m[y],{style:Ue({stroke:s[y%s.length],fill:null},l.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,n,a,i,o){if(o.length){for(var l=t.getModel("minorSplitLine"),s=l.getModel("lineStyle"),c=[],f=0;f<o.length;f++)for(var h=0;h<o[f].length;h++)c.push(new Io({shape:{cx:r.cx,cy:r.cy,r:o[f][h].coord}}));e.add(wa(c,{style:Ue({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,n,a,i){if(i.length){var o=t.getModel("splitArea"),l=o.getModel("areaStyle"),s=l.get("color"),c=0;s=s instanceof Array?s:[s];for(var f=[],h=i[0].coord,v=1;v<i.length;v++){var p=c++%s.length;f[p]=f[p]||[],f[p].push(new qn({shape:{cx:r.cx,cy:r.cy,r0:h,r:i[v].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=i[v].coord}for(var v=0;v<f.length;v++)e.add(wa(f[v],{style:Ue({fill:s[v%s.length]},l.getAreaStyle()),silent:!0}))}}};function bCe(e,t,r){return{position:[e.cx,e.cy],rotation:r/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}var _Ce=kd();function HW(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}var wCe=zr(xo,CCe);function CCe(e){var t=df(xo,bo);IN(e,t,function(r){var n=ACe(r,xo),a={};Vc(r,t,function(i){TCe(r,i,n,a)})})}function TCe(e,t,r,n){var a=t.getData(),i=HW(t),o=r[i],l=o.offset,s=o.width,c=t.coordinateSystem,f=c.getOtherAxis(e),h=c.cx,v=c.cy,p=t.get("barMinHeight")||0,m=t.get("barMinAngle")||0;n[i]=n[i]||[];for(var y=a.mapDimension(f.dim),x=a.mapDimension(e.dim),b=Dl(a,y),w=e.dim!=="radius"||!t.get("roundCap",!0),C=f.dataToCoord(R9(f)),A=0,M=a.count();A<M;A++){var R=a.get(y,A),E=a.get(x,A),N=R>=0?"p":"n",L=C;b&&(n[i][E]||(n[i][E]={p:C,n:C}),L=n[i][E][N]);var O=void 0,I=void 0,z=void 0,V=void 0;if(f.dim==="radius"){var Y=f.dataToCoord(R)-C,H=e.dataToCoord(E);sr(Y)<p&&(Y=(Y<0?-1:1)*p),O=L,I=L+Y,z=H-l,V=z-s,b&&(n[i][E][N]=I)}else{var F=f.dataToCoord(R,w)-C,X=e.dataToCoord(E);sr(F)<m&&(F=(F<0?-1:1)*m),O=X+l,I=O+s,z=L,V=L+F,b&&(n[i][E][N]=V)}a.setItemLayout(A,{cx:h,cy:v,r0:O,r:I,startAngle:-z*$S/180,endAngle:-V*$S/180,clockwise:z>=V})}}function ACe(e,t){var r=df(t,bo),n=Zn(e,{fromStat:{key:r},min:1}).w,a=n,i=0,o="20%",l="30%",s={};Vc(e,r,function(x){var b=HW(x);s[b]||i++,s[b]=s[b]||{width:0,maxWidth:0};var w=Re(x.get("barWidth"),n),C=Re(x.get("barMaxWidth"),n),A=x.get("barGap"),M=x.get("barCategoryGap");w&&!s[b].width&&(w=kt(a,w),s[b].width=w,a-=w),C&&(s[b].maxWidth=C),A!=null&&(l=A),M!=null&&(o=M)});var c={},f=Re(o,n),h=Re(l,1),v=(a-f)/(i+(i-1)*h);v=st(v,0),B(s,function(x,b){var w=x.maxWidth;w&&w<v&&(w=kt(w,a),x.width&&(w=kt(w,x.width)),a-=w,x.width=w,i--)}),v=(a-f)/(i+(i-1)*h),v=st(v,0);var p=0,m;B(s,function(x,b){x.width||(x.width=v),m=x,p+=x.width*(1+h)}),m&&(p-=m.width*h);var y=-p/2;return B(s,function(x,b){c[b]=c[b]||{offset:y,width:x.width},y+=x.width*(1+h)}),c}function DCe(e,t){_Ce(e,function(){var r=df(t,bo);M9(e,r,t,bo),Y_(r,$_(r))})}var MCe={startAngle:90,clockwise:!0,splitNumber:12,containShape:!1,axisLabel:{rotate:0}},RCe={splitNumber:5},ECe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="polar",t})(Ht);function NCe(e){qr(Ym),vf.registerAxisPointerClass("PolarAxisPointer",nCe),e.registerCoordinateSystem("polar",vCe),e.registerComponentModel(oCe),e.registerComponentView(ECe),Sd(e,"angle",lCe,MCe),Sd(e,"radius",sCe,RCe),e.registerComponentView(gCe),e.registerComponentView(xCe),e.registerLayout(wCe),DCe(e,xo)}function e2(e,t){t=t||{};var r=e.coordinateSystem,n=e.axis,a={},i=n.position,o=n.orient,l=r.getRect(),s=[l.x,l.x+l.width,l.y,l.y+l.height],c={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};a.position=[o==="vertical"?c.vertical[i]:s[0],o==="horizontal"?c.horizontal[i]:s[3]];var f={horizontal:0,vertical:1};a.rotation=Math.PI/2*f[o];var h={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=h[i],e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),En(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var v=e.get(["axisLabel","rotate"]);return a.labelRotate=i==="top"?-v:v,a.z2=1,a}var LCe=["splitArea","splitLine","breakArea"],ICe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.axisPointerClass="SingleAxisPointer",r}return t.prototype.render=function(r,n,a,i){var o=this.group;o.removeAll();var l=this._axisGroup;this._axisGroup=new ze;var s=e2(r),c=new Yn(r,a,s);c.build(),o.add(this._axisGroup),o.add(c.group),B(LCe,function(f){r.get([f,"show"])&&OCe[f](this,this.group,this._axisGroup,r,a)},this),Lm(l,this._axisGroup,r),e.prototype.render.call(this,r,n,a,i)},t.prototype.remove=function(){Z9(this)},t.type="singleAxis",t})(vf),OCe={splitLine:function(e,t,r,n,a){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),l=o.getModel("lineStyle"),s=l.get("color");s=s instanceof Array?s:[s];for(var c=l.get("width"),f=n.coordinateSystem.getRect(),h=i.isHorizontal(),v=[],p=0,m=i.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),y=[],x=[],b=0;b<m.length;++b){var w=i.toGlobalCoord(m[b].coord);h?(y[0]=w,y[1]=f.y,x[0]=w,x[1]=f.y+f.height):(y[0]=f.x,y[1]=w,x[0]=f.x+f.width,x[1]=w);var C=new Mr({shape:{x1:y[0],y1:y[1],x2:x[0],y2:x[1]},silent:!0});hd(C.shape,c);var A=p++%s.length;v[A]=v[A]||[],v[A].push(C)}for(var M=l.getLineStyle(["color"]),b=0;b<v.length;++b)t.add(wa(v[b],{style:Ue({stroke:s[b%s.length]},M),silent:!0}))}},splitArea:function(e,t,r,n,a){X9(e,r,n,n)},breakArea:function(e,t,r,n,a){var i=Hm(),o=n.axis.scale;i&&o.type!=="ordinal"&&i.rectCoordBuildBreakAxis(t,e,n,n.coordinateSystem.getRect(),a)}},kCe=(function(e){ee(t,e);function t(r,n,a,i,o){var l=e.call(this,r,n,a)||this;return l.type=i||"value",l.position=o||"bottom",l}return t.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},t.prototype.pointToData=function(r,n){return this.coordinateSystem.pointToData(r)[0]},t})(di),UW=["single"],PCe=(function(){function e(t,r,n){this.type=J9,this.dimension="single",this.dimensions=UW,this.axisPointerEnabled=!0,this.model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var a=this.dimension,i=Bm(t),o=new kCe(a,Xd(t,i,!0),[0,0],i,t.get("position"));o.onBand=zm(o.scale,t),o.inverse=t.get("inverse"),o.orient=t.get("orient"),t.axis=o,o.model=t,o.coordinateSystem=this,this._axis=o},e.prototype.update=function(t,r){var n=this._axis;Gc(n,md),yd(n)},e.prototype.resize=function(t,r){var n=Vr(t,r).refContainer;this._rect=Qt(t.getBoxLayoutParams(),n),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var t=this._rect,r=this._axis,n=r.isHorizontal(),a=n?[0,t.width]:[0,t.height],i=r.inverse?1:0;r.setExtent(a[i],a[1-i]),this._updateAxisTransform(r,n?t.x:t.y)},e.prototype._updateAxisTransform=function(t,r){var n=t.getExtent(),a=n[0]+n[1],i=t.isHorizontal();t.toGlobalCoord=i?function(o){return o+r}:function(o){return a-o+r},t.toLocalCoord=i?function(o){return o-r}:function(o){return a-o+r}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(t){var r=this.getRect(),n=this.getAxis(),a=n.orient;return a==="horizontal"?n.contain(n.toLocalCoord(t[0]))&&t[1]>=r.y&&t[1]<=r.y+r.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=r.y&&t[0]<=r.y+r.height},e.prototype.pointToData=function(t,r,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(t[a.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+t)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(t,r,n){var a=qF(r);return a===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var a=qF(r);return a===this?this.pointToData(n):null},e})();function qF(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function jCe(e,t){var r=[];return e.eachComponent(OR,function(n,a){var i=new PCe(n,e,t);i.name="single_"+a,i.resize(n,t),n.coordinateSystem=i,r.push(i)}),e.eachSeries(function(n){if(n.get("coordinateSystem")===Bye){var a=n.getReferringComponents(OR,dr).models[0],i=n.coordinateSystem=a&&a.coordinateSystem;i&&Fc(i.getAxis(),n,J9)}}),r}var BCe={create:jCe,dimensions:UW},XF=["x","y"],zCe=["width","height"],VCe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,a,i,o){var l=a.axis,s=l.coordinateSystem,c=Hb(l),f=Dx(s,c),h=Dx(s,1-c),v=s.dataToPoint(n)[0],p=i.get("type");if(p&&p!=="none"){var m=DL(i),y=FCe[p](l,v,f,h,i.get("seriesDataIndices"),i.ecModel);y.style=m,r.graphicKey=y.type,r.pointer=y}var x=e2(a);BW(n,r,x,a,i,o)},t.prototype.getHandleTransform=function(r,n,a){var i=e2(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=ML(n.axis,r,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,a,i){var o=a.axis,l=o.coordinateSystem,s=Hb(o),c=Dx(l,s),f=[r.x,r.y];f[s]+=n[s],f[s]=Math.min(c[1],f[s]),f[s]=Math.max(c[0],f[s]);var h=Dx(l,1-s),v=(h[1]+h[0])/2,p=[v,v];return p[s]=f[s],{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},t})(AL),FCe={line:function(e,t,r,n){var a=RL([t,n[0]],[t,n[1]],Hb(e));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(e,t,r,n,a,i){var o=EL(e,a,i),l=n[1]-n[0],s=NL(t,r,o),c=s[0],f=s[1];return{type:"Rect",shape:zW([c,n[0]],[f-c,l],Hb(e))}}};function Hb(e){return e.isHorizontal()?0:1}function Dx(e,t){var r=e.getRect();return[r[XF[t]],r[XF[t]]+r[zCe[t]]]}var GCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t})(Ht);function HCe(e){qr(Ym),vf.registerAxisPointerClass("SingleAxisPointer",VCe),e.registerComponentView(GCe),e.registerComponentView(ICe),e.registerComponentModel(pS),Sd(e,"single",pS,pS.defaultOption),e.registerCoordinateSystem("single",BCe)}var UCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,a){var i=cf(r);e.prototype.init.apply(this,arguments),ZF(r,i)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),ZF(this.option,r)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:re.color.axisLine,width:1,type:"solid"}},itemStyle:{color:re.color.neutral00,borderWidth:1,borderColor:re.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:re.size.s,color:re.color.secondary},monthLabel:{show:!0,position:"start",margin:re.size.s,align:"center",formatter:null,color:re.color.secondary},yearLabel:{show:!0,position:null,margin:re.size.xl,formatter:null,color:re.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t})(lt);function ZF(e,t){var r=e.cellSize,n;pe(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var a=xe([0,1],function(i){return Hfe(t,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});Mo(e,t,{type:"box",ignoreSize:a})}var YCe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){var i=this.group;i.removeAll();var o=r.coordinateSystem,l=o.getRangeInfo(),s=o.getOrient(),c=n.getLocaleModel();this._renderDayRect(r,l,i),this._renderLines(r,l,s,i),this._renderYearText(r,l,s,i),this._renderMonthText(r,c,s,i),this._renderWeekText(r,c,l,s,i)},t.prototype._renderDayRect=function(r,n,a){for(var i=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),l=i.getCellWidth(),s=i.getCellHeight(),c=n.start.time;c<=n.end.time;c=i.getNextNDay(c,1).time){var f=i.dataToCalendarLayout([c],!1).tl,h=new at({shape:{x:f[0],y:f[1],width:l,height:s},cursor:"default",style:o});a.add(h)}},t.prototype._renderLines=function(r,n,a,i){var o=this,l=r.coordinateSystem,s=r.getModel(["splitLine","lineStyle"]).getLineStyle(),c=r.get(["splitLine","show"]),f=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,v=0;h.time<=n.end.time;v++){m(h.formatedDate),v===0&&(h=l.getDateInfo(n.start.y+"-"+n.start.m));var p=h.date;p.setMonth(p.getMonth()+1),h=l.getDateInfo(p)}m(l.getNextNDay(n.end.time,1).formatedDate);function m(y){o._firstDayOfMonth.push(l.getDateInfo(y)),o._firstDayPoints.push(l.dataToCalendarLayout([y],!1).tl);var x=o._getLinePointsOfOneWeek(r,y,a);o._tlpoints.push(x[0]),o._blpoints.push(x[x.length-1]),c&&o._drawSplitline(x,s,i)}c&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,a),s,i),c&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,a),s,i)},t.prototype._getEdgesPoints=function(r,n,a){var i=[r[0].slice(),r[r.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},t.prototype._drawSplitline=function(r,n,a){var i=new On({z2:20,shape:{points:r},style:n});a.add(i)},t.prototype._getLinePointsOfOneWeek=function(r,n,a){for(var i=r.coordinateSystem,o=i.getDateInfo(n),l=[],s=0;s<7;s++){var c=i.getNextNDay(o.time,s),f=i.dataToCalendarLayout([c.time],!1);l[2*c.day]=f.tl,l[2*c.day+1]=f[a==="horizontal"?"bl":"tr"]}return l},t.prototype._formatterLabel=function(r,n){return De(r)&&r?H8(r,n):Be(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,a,i,o){var l=n[0],s=n[1],c=["center","bottom"];i==="bottom"?(s+=o,c=["center","top"]):i==="left"?l-=o:i==="right"?(l+=o,c=["center","top"]):s-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:l,y:s,style:{align:c[0],verticalAlign:c[1]}}},t.prototype._renderYearText=function(r,n,a,i){var o=r.getModel("yearLabel");if(o.get("show")){var l=o.get("margin"),s=o.get("position");s||(s=a!=="horizontal"?"top":"left");var c=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(c[0][0]+c[1][0])/2,h=(c[0][1]+c[1][1])/2,v=a==="horizontal"?0:1,p={top:[f,c[v][1]],bottom:[f,c[1-v][1]],left:[c[1-v][0],h],right:[c[v][0],h]},m=n.start.y;+n.end.y>+n.start.y&&(m=m+"-"+n.end.y);var y=o.get("formatter"),x={start:n.start.y,end:n.end.y,nameMap:m},b=this._formatterLabel(y,x),w=new vt({z2:30,style:Gt(o,{text:b}),silent:o.get("silent")});w.attr(this._yearTextPositionControl(w,p[s],a,s,l)),i.add(w)}},t.prototype._monthTextPositionControl=function(r,n,a,i,o){var l="left",s="top",c=r[0],f=r[1];return a==="horizontal"?(f=f+o,n&&(l="center"),i==="start"&&(s="bottom")):(c=c+o,n&&(s="middle"),i==="start"&&(l="right")),{x:c,y:f,align:l,verticalAlign:s}},t.prototype._renderMonthText=function(r,n,a,i){var o=r.getModel("monthLabel");if(o.get("show")){var l=o.get("nameMap"),s=o.get("margin"),c=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!l||De(l))&&(l&&(n=oR(l)||n),l=n.get(["time","monthAbbr"])||[]);var v=c==="start"?0:1,p=a==="horizontal"?0:1;s=c==="start"?-s:s;for(var m=f==="center",y=o.get("silent"),x=0;x<h[v].length-1;x++){var b=h[v][x].slice(),w=this._firstDayOfMonth[x];if(m){var C=this._firstDayPoints[x];b[p]=(C[p]+h[0][x+1][p])/2}var A=o.get("formatter"),M=l[+w.m-1],R={yyyy:w.y,yy:(w.y+"").slice(2),MM:w.m,M:+w.m,nameMap:M},E=this._formatterLabel(A,R),N=new vt({z2:30,style:he(Gt(o,{text:E}),this._monthTextPositionControl(b,m,a,c,s)),silent:y});i.add(N)}}},t.prototype._weekTextPositionControl=function(r,n,a,i,o){var l="center",s="middle",c=r[0],f=r[1],h=a==="start";return n==="horizontal"?(c=c+i+(h?1:-1)*o[0]/2,l=h?"right":"left"):(f=f+i+(h?1:-1)*o[1]/2,s=h?"bottom":"top"),{x:c,y:f,align:l,verticalAlign:s}},t.prototype._renderWeekText=function(r,n,a,i,o){var l=r.getModel("dayLabel");if(l.get("show")){var s=r.coordinateSystem,c=l.get("position"),f=l.get("nameMap"),h=l.get("margin"),v=s.getFirstDayOfWeek();if(!f||De(f)){f&&(n=oR(f)||n);var p=n.get(["time","dayOfWeekShort"]);f=p||xe(n.get(["time","dayOfWeekAbbr"]),function(R){return R[0]})}var m=s.getNextNDay(a.end.time,7-a.lweek).time,y=[s.getCellWidth(),s.getCellHeight()];h=Re(h,Math.min(y[1],y[0])),c==="start"&&(m=s.getNextNDay(a.start.time,-(7+a.fweek)).time,h=-h);for(var x=l.get("silent"),b=0;b<7;b++){var w=s.getNextNDay(m,b),C=s.dataToCalendarLayout([w.time],!1).center,A=b;A=Math.abs((b+v)%7);var M=new vt({z2:30,style:he(Gt(l,{text:f[A]}),this._weekTextPositionControl(C,i,c,h,y)),silent:x});o.add(M)}}},t.type="calendar",t})(Ht),gD=864e5,$Ce=(function(){function e(t,r,n){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(r,n)}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(t){t=Lo(t);var r=t.getFullYear(),n=t.getMonth()+1,a=n<10?"0"+n:""+n,i=t.getDate(),o=i<10?"0"+i:""+i,l=t.getDay();return l=Math.abs((l+7-this.getFirstDayOfWeek())%7),{y:r+"",m:a,d:o,day:l,time:t.getTime(),formatedDate:r+"-"+a+"-"+o,date:t}},e.prototype.getNextNDay=function(t,r){return r=r||0,r===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+r),this.getDateInfo(t))},e.prototype._update=function(t,r){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),l=this._orient==="horizontal"?[n,7]:[7,n];B([0,1],function(h){f(i,h)&&(o[a[h]]=i[h]*l[h])});var s={width:r.getWidth(),height:r.getHeight()},c=this._rect=Qt(o,s);B([0,1],function(h){f(i,h)||(i[h]=c[a[h]]/l[h])});function f(h,v){return h[v]!=null&&h[v]!=="auto"}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(t,r,n){n=n||[],pe(t)&&(t=t[0]),r==null&&(r=!0);var a=this.getDateInfo(t),i=this._rangeInfo,o=a.formatedDate;if(r&&!(a.time>=i.start.time&&a.time<i.end.time+gD))return n[0]=n[1]=NaN,n;var l=a.day,s=this._getRangeInfo([i.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2),n},e.prototype.pointToData=function(t){var r=this.pointToDate(t);return r&&r.time},e.prototype.dataToLayout=function(t,r,n){n=n||{};var a=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,r);return a.x=o[0]-this._sw/2,a.y=o[1]-this._sh/2,a.width=this._sw,a.height=this._sh,Fe.copy(i,a),Pc(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(t,r){var n=this.dataToPoint(t,r);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(t){var r=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,a=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,a):this._getDateByWeeksAndDay(r,n-1,a)},e.prototype.convertToPixel=function(t,r,n){var a=mD(r);return a===this?a.dataToPoint(n):null},e.prototype.convertToLayout=function(t,r,n){var a=mD(r);return a===this?a.dataToLayout(n):null},e.prototype.convertFromPixel=function(t,r,n){var a=mD(r);return a===this?a.pointToData(n):null},e.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var t=this._model.get("range"),r;if(pe(t)&&t.length===1&&(t=t[0]),pe(t))r=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(r=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var a=this.getDateInfo(n),i=a.date;i.setMonth(i.getMonth()+1);var o=this.getNextNDay(i,-1);r=[a.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return t;var l=this._getRangeInfo(r);return l.start.time>l.end.time&&r.reverse(),r},e.prototype._getRangeInfo=function(t){var r=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var a=Math.floor(r[1].time/gD)-Math.floor(r[0].time/gD)+1,i=new Date(r[0].time),o=i.getDate(),l=r[1].date.getDate();i.setDate(o+a-1);var s=i.getDate();if(s!==l)for(var c=i.getTime()-r[1].time>0?1:-1;(s=i.getDate())!==l&&(i.getTime()-r[1].time)*c>0;)a-=c,i.setDate(s-c);var f=Math.floor((a+r[0].day+6)/7),h=n?-f+1:f-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:a,weeks:f,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var a=this._getRangeInfo(n);if(t>a.weeks||t===0&&r<a.fweek||t===a.weeks&&r>a.lweek)return null;var i=(t-1)*7-a.fweek+r,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(a){var i=new e(a,t,r);n.push(i),a.coordinateSystem=i}),t.eachComponent(function(a,i){km({targetModel:i,coordSysType:"calendar",coordSysProvider:Z8})}),n},e.dimensions=["time","value"],e})();function mD(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function WCe(e){e.registerComponentModel(UCe),e.registerComponentView(YCe),e.registerCoordinateSystem("calendar",$Ce)}var ll={level:1,leaf:2,nonLeaf:3},xl={none:0,all:1,body:2,corner:3};function t2(e,t,r){var n=t[Ze[r]].getCell(e);return!n&&pt(e)&&e<0&&(n=t[Ze[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function YW(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function $W(e,t,r,n,a){KF(e[0],t,a,r,n,0),KF(e[1],t,a,r,n,1)}function KF(e,t,r,n,a,i){e[0]=1/0,e[1]=-1/0;var o=n[i],l=pe(o)?o:[o],s=l.length,c=!!r;if(s>=1?(QF(e,t,l,c,a,i,0),s>1&&QF(e,t,l,c,a,i,s-1)):e[0]=e[1]=NaN,c){var f=-a[Ze[1-i]].getLocatorCount(i),h=a[Ze[i]].getLocatorCount(i)-1;r===xl.body?f=st(0,f):r===xl.corner&&(h=kt(-1,h)),h<f&&(f=h=NaN),xn(e[0])&&(e[0]=f),xn(e[1])&&(e[1]=h),e[0]=st(kt(e[0],h),f),e[1]=st(kt(e[1],h),f)}}function QF(e,t,r,n,a,i,o){var l=t2(r[o],a,i);if(!l){e[0]=e[1]=NaN;return}var s=l.id[Ze[i]],c=s,f=KCe(l);f&&(c+=f.span[Ze[i]]-1),e[0]=kt(e[0],s,c),e[1]=st(e[1],s,c)}function Mx(e,t){return xn(e[t][0])||xn(e[t][1])}function JF(e,t,r,n){t=t||qCe;for(var a=0;a<n;a++)t[a]=!1;for(;;){for(var i=!1,a=0;a<n;a++){var o=r[a];!t[a]&&o.cellMergeOwner&&XCe(e,o.locatorRange)&&(t[a]=!0,i=!0)}if(!i)break}}var qCe=[];function XCe(e,t){return!e4(e[0],t[0])||!e4(e[1],t[1])?!1:(e[0][0]=kt(e[0][0],t[0][0]),e[0][1]=st(e[0][1],t[0][1]),e[1][0]=kt(e[1][0],t[1][0]),e[1][1]=st(e[1][1],t[1][1]),!0)}function e4(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function t4(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function ZCe(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function r4(e,t,r,n){var a=t2(t[n][0],r,n),i=t2(t[n][1],r,n);e[Ze[n]]=e[Pr[n]]=NaN,a&&i&&(e[Ze[n]]=a.xy,e[Pr[n]]=i.xy+i.wh-a.xy)}function Lp(e,t,r,n){return e[Ze[t]]=r,e[Ze[1-t]]=n,e}function KCe(e){return e&&(e.type===ll.leaf||e.type===ll.nonLeaf)?e:null}function Ub(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var n4=(function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=QCe(t);var n=r.get("data",!0),a=r.get("length",!0);if(n!=null&&!pe(n)&&(n=[]),n)this._initByDimModelData(n);else if(a!=null){n=Array(a);for(var i=0;i<a;i++)n[i]=null;this._initByDimModelData(n)}else this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,a=r._levels,i=[],o=0;r._leavesCount=l(t,0,0),s();return;function l(c,f,h){var v=0;return c&&B(c,function(p,m){var y;De(p)?y={value:p}:Ve(p)?(y=p,p.value!=null&&!De(p.value)&&(y={value:null})):y={value:null};var x={type:ll.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:f,id:new Qe,span:Lp(new Qe,r.dimIdx,1,1),option:y,xy:NaN,wh:NaN,dim:r,rect:Ub()};o++,(i[f]||(i[f]=[])).push(x),a[h]||(a[h]={type:ll.level,xy:NaN,wh:NaN,option:null,id:new Qe,dim:r});var b=l(y.children,f,h+1),w=Math.max(1,b);x.span[Ze[r.dimIdx]]=w,v+=w,f+=w}),v}function s(){for(var c=[];n.length<o;)for(var f=0;f<i.length;f++){var h=i[f].pop();if(h){h.ordinal=c.length;var v=h.option.value;c.push(v),n.push(h),r._uniqueValueGen.calcDupBase(v)}}r._uniqueValueGen.ensureValueUnique(c,n);var p=r._ordinalMeta=new $g({categories:c,needCollect:!1,deduplication:!1});r._scale=new mb({ordinalMeta:p});for(var m=0;m<r._leavesCount;m++){var y=r._cells[m];y.type=ll.leaf,y.span[Ze[1-r.dimIdx]]=r._levels.length-y.level}r._initCellsId(),r._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:ll.level,xy:NaN,wh:NaN,option:null,id:new Qe,dim:t}],t._initLevelIdOptions();var r=t._ordinalMeta=new $g({needCollect:!0,deduplication:!0,onCollect:function(n,a){var i=t._cells[a]={type:ll.leaf,ordinal:a,level:0,firstLeafLocator:a,id:new Qe,span:Lp(new Qe,t.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:t,rect:Ub()};t._leavesCount++,t._setCellId(i)}});t._scale=new mb({ordinalMeta:r})},e.prototype._setCellId=function(t){var r=this._levels.length,n=this.dimIdx;Lp(t.id,n,t.firstLeafLocator,t.level-r)},e.prototype._initCellsId=function(){var t=this._levels.length,r=this.dimIdx;B(this._cells,function(n){Lp(n.id,r,n.firstLeafLocator,n.level-t)})},e.prototype._initLevelIdOptions=function(){var t=this._levels.length,r=this.dimIdx,n=this._model.get("levels",!0);n=pe(n)?n:[],B(this._levels,function(a,i){Lp(a.id,r,0,i-t),a.option=n[i]})},e.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},e.prototype.resetLayoutIterator=function(t,r,n,a){if(t=t||new Es,r===this.dimIdx){var i=this._leavesCount,o=n!=null?Math.max(0,n):0;a=a!=null?Math.min(a,i):i,t.reset(this._cells,o,o+a)}else{var i=this._levels.length,o=n!=null?Math.max(0,n+i):0;a=a!=null?Math.min(a,i):i,t.reset(this._levels,o,o+a)}return t},e.prototype.resetCellIterator=function(t){return(t||new Es).reset(this._cells,0)},e.prototype.resetLevelIterator=function(t){return(t||new Es).reset(this._levels,0)},e.prototype.getLayout=function(t,r,n){var a=this.getUnitLayoutInfo(r,n);t[Ze[r]]=a?a.xy:NaN,t[Pr[r]]=a?a.wh:NaN},e.prototype.getUnitLayoutInfo=function(t,r){return t===this.dimIdx?r<this._leavesCount?this._cells[r]:void 0:this._levels[r+this._levels.length]},e.prototype.getCell=function(t){var r=this._scale.parse(t);return xn(r)?void 0:this._cells[r]},e.prototype.getLocatorCount=function(t){return t===this.dimIdx?this._leavesCount:this._levels.length},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e})();function QCe(e){var t=e.toUpperCase(),r=new RegExp("^"+t+"([0-9]+)$"),n=0;function a(l){var s;l!=null&&(s=l.match(r))&&(n=st(n,+s[1]+1))}function i(){return""+t+n++}function o(l,s){for(var c=Le(),f=0;f<l.length;f++){var h=l[f];(h==null||c.get(h)!=null)&&(l[f]=h=i(),s[f].option=Ue({value:h},s[f].option)),c.set(h,!0)}}return{calcDupBase:a,ensureValueUnique:o}}var a4=(function(){function e(t,r,n){this._model=r,this._dims=n,this._kind=t,this._cellMergeOwnerList=[]}return e.prototype._ensureCellMap=function(){var t=this,r=t._cellMap;return r||(r=t._cellMap=Le(),n()),r;function n(){var i=[],o=t._model.getShallow("data");o&&!pe(o)&&(o=null),B(o,function(m,y){if(!(!Ve(m)||!pe(m.coord))){var x=YW([]),b=null;if($W(x,b,m.coord,t._dims,m.coordClamp?xl[t._kind]:xl.none),!(Mx(x,0)||Mx(x,1))){var w=m&&m.mergeCells,C={id:new Qe,span:new Qe,locatorRange:x,option:m,cellMergeOwner:w};t4(C,x),i.push(C)}}});for(var l=[],s=0;s<i.length;s++){var c=i[s];if(c.cellMergeOwner){var f=c.locatorRange;JF(f,l,i,s);for(var h=0;h<s;h++)l[h]&&(i[h].cellMergeOwner=!1);if(f[0][0]!==c.id.x||f[1][0]!==c.id.y){c.cellMergeOwner=!1;var v=he({},c.option);v.coord=null;var p={id:new Qe,span:new Qe,locatorRange:f,option:v,cellMergeOwner:!0};t4(p,f),i.push(p)}}}B(i,function(m){var y=a(m.id.x,m.id.y);if(m.cellMergeOwner&&(y.cellMergeOwner=!0,y.span=m.span,y.locatorRange=m.locatorRange,y.spanRect=Ub(),t._cellMergeOwnerList.push(y)),!(!m.cellMergeOwner&&!m.option))for(var x=0;x<m.span.y;x++)for(var b=0;b<m.span.x;b++){var w=a(m.id.x+b,m.id.y+x);w.option=m.option,m.cellMergeOwner&&(w.inSpanOf=y)}})}function a(i,o){var l=i4(i,o),s=r.get(l);return s||(s=r.set(l,{id:new Qe(i,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),s}},e.prototype.getCell=function(t){return this._ensureCellMap().get(i4(t[0],t[1]))},e.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},e.prototype.expandRangeByCellMerge=function(t){if(!Mx(t,0)&&!Mx(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){yD[0]=t[0][0],yD[1]=t[1][0];var r=this.getCell(yD),n=r&&r.inSpanOf;if(n){ZCe(t,n.locatorRange);return}}var a=this._cellMergeOwnerList;JF(t,null,a,a.length)},e})(),yD=[];function i4(e,t){return e+"|"+t}var kL={show:!0,color:re.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function PL(e){return{color:"none",borderWidth:1,borderColor:e?"none":re.color.borderTint}}var o4={show:!0,label:kL,itemStyle:PL(!1),silent:void 0,dividerLineStyle:{width:1,color:re.color.border}},JCe={label:kL,itemStyle:PL(!1),silent:void 0},eTe={label:kL,itemStyle:PL(!0),silent:void 0},tTe={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:o4,y:o4,body:JCe,corner:eTe,backgroundStyle:{color:"none",borderColor:re.color.axisLine,borderWidth:1},triggerEvent:!1},rTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){var r=this._dimModels={x:new l4(this.get("x",!0)||{}),y:new l4(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new n4("x",r.x),a=r.y.dim=new n4("y",r.y),i={x:n,y:a};this._body=new a4("body",new ct(this.getShallow("body")),i),this._corner=new a4("corner",new ct(this.getShallow("corner")),i)},t.prototype.getDimensionModel=function(r){return this._dimModels[r]},t.prototype.getBody=function(){return this._body},t.prototype.getCorner=function(){return this._corner},t.type="matrix",t.layoutMode="box",t.defaultOption=tTe,t})(lt),l4=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t})(ct),Rx=Math.round,nTe=0,aTe=99,iTe={normal:25,special:100},oTe={normal:50,special:125},lTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n){this.group.removeAll();var a=this.group,i=r.coordinateSystem,o=i.getRect(),l=r.getDimensionModel("x"),s=r.getDimensionModel("y"),c=l.dim,f=s.dim;sTe(a,r,n),uTe(a,r,c,f,n);var h=r.getShallow("borderZ2",!0),v=Ie(h,aTe),p=v-1,m=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);m.lineWidth=0;var y=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);y.fill="none";var x=r2(o.clone(),m,nTe),b=r2(o.clone(),y,v);x.silent=!0,b.silent=!0,a.add(x),a.add(b);var w=c.getUnitLayoutInfo(0,0),C=f.getUnitLayoutInfo(1,0);w&&C&&(c.shouldShow()&&a.add(s4({x1:o.x,y1:C.xy,x2:o.x+o.width,y2:C.xy},l.getModel("dividerLineStyle").getLineStyle(),p)),f.shouldShow()&&a.add(s4({x1:w.xy,y1:o.y,x2:w.xy,y2:o.y+o.height},s.getModel("dividerLineStyle").getLineStyle(),p)))},t.type="matrix",t})(Ht);function sTe(e,t,r){n(0),n(1);function n(a){var i=t.getDimensionModel(Ze[a]),o=i.dim;if(o.shouldShow())for(var l=i.getModel("itemStyle"),s=i.getModel("label"),c=t.getShallow("tooltip",!0),f=[],h=o.resetCellIterator();h.next();){var v=h.item,p={};Fe.copy(p,v.rect),hl(f,v.id.x,v.id.y),WW(f,t,e,r,v.option,l,s,i,p,v.option.value,oTe,c,a===0?"x":"y")}}}function uTe(e,t,r,n,a){i("body",t.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&i("corner",t.getCorner(),n,r);function i(o,l,s,c){var f=new ct(t.getShallow(o,!0)),h=f.getModel("itemStyle"),v=f.getModel("label"),p=new Es,m=new Es,y=[],x=t.getShallow("tooltip",!0);for(c.resetLayoutIterator(m,1);m.next();)for(s.resetLayoutIterator(p,0);p.next();){var b=p.item,w=m.item;hl(y,b.id.x,w.id.y);var C=l.getCell(y);if(!(C&&C.inSpanOf&&C.inSpanOf!==C)){var A={};C&&C.span?Fe.copy(A,C.spanRect):(b.dim.getLayout(A,0,y[0]),w.dim.getLayout(A,1,y[1]));var M=C?C.option:null;WW(y,t,e,a,M,h,v,f,A,M?M.value:null,iTe,x,o)}}}}function WW(e,t,r,n,a,i,o,l,s,c,f,h,v){var p;Ex.option=a?a.itemStyle:null,Ex.parentModel=i,Mh.option=a,Mh.parentModel=l;var m=Ie(Mh.getShallow("z2"),a&&a.itemStyle?f.special:f.normal),y=h&&h.show,x=r2(s,Ex.getItemStyle(),m);r.add(x);var b=Mh.get("cursor");b!=null&&x.attr("cursor",b);var w;if(c!=null){var C=c+"";Ju.option=a?a.label:null,Ju.parentModel=o,Ju.ecModel=n;var A=Ju.getShallow("formatter");if(A){var M={componentType:"matrix",componentIndex:t.componentIndex,name:C,value:c,coord:e.slice(),$vars:["name","value","coord"]};if(De(A))C=H8(A,M);else if(Be(A)){var R=A(M);R!=null&&(C=R+"")}}if(Wr(x,{normal:Ju},{defaultText:C,autoOverflowArea:!0,layoutRect:je(x.shape)}),w=x.getTextContent(),w){w.z2=m+1;var E=w.style;if(E&&E.overflow&&E.overflow!=="none"&&E.lineOverflow){var N={};Fe.copy(N,s),Pc(N,(((p=x.style)===null||p===void 0?void 0:p.lineWidth)||0)/2,!0,!0),x.updateInnerText(),w.getLocalTransform(Nx),oi(Nx,Nx),Fe.applyTransform(N,N,Nx),w.setClipPath(new at({shape:N}))}}Nl({el:x,componentModel:t,itemName:C,itemTooltipOption:h,formatterParamsExtra:{xyLocator:e.slice()}})}var L=t.get("triggerEvent",!0);if(w){var O=Ju.get("silent");O==null&&(O=!(L||y)),w.silent=O,w.ignoreHostSilent=!0}var I=Mh.get("silent");if(I==null&&(I=!x.style||x.style.fill==="none"||!x.style.fill),x.silent=I,L&&x){var z={componentType:"matrix",componentIndex:t.componentIndex,matrixIndex:t.componentIndex,targetType:v,name:w&&w.style?w.style.text:void 0,value:c,coord:e.slice()};$e(x).eventData=z}kT(Mh),kT(Ex),kT(Ju)}var Mh=new ct,Ex=new ct,Ju=new ct,Nx=[];function r2(e,t,r){var n=t.lineWidth;if(n){var a=e.x+e.width,i=e.y+e.height;e.x=Ca(e.x,n,!0),e.y=Ca(e.y,n,!0),e.width=Ca(a,n,!0)-e.x,e.height=Ca(i,n,!0)-e.y}return new at({shape:e,style:t,z2:r})}function s4(e,t,r){var n=t.lineWidth;return n&&(Rx(e.x1*2)===Rx(e.x2*2)&&(e.x1=e.x2=Ca(e.x1,n,!0)),Rx(e.y1*2)===Rx(e.y2*2)&&(e.y1=e.y2=Ca(e.y1,n,!0))),new Mr({shape:e,style:t,silent:!0,z2:r})}var cTe=(function(){function e(t,r,n){this.dimensions=e.dimensions,this.type="matrix",this._model=t;var a=this._dimModels={x:t.getDimensionModel("x"),y:t.getDimensionModel("y")};this._dims={x:a.x.dim,y:a.y.dim},this._resize(t,n)}return e.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},e.create=function(t,r){var n=[];return t.eachComponent("matrix",function(a){var i=new e(a,t,r);n.push(i),a.coordinateSystem=i}),t.eachComponent(function(a,i){km({targetModel:i,coordSysType:"matrix",coordSysProvider:Z8})}),n},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(t,r){var n=this._dims,a=this._dimModels,i=this._rect=Qt(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});u4(a,n,i,0),u4(a,n,i,1),c4(0,n),c4(1,n),f4(this._model.getBody(),n),f4(this._model.getCorner(),n)},e.prototype.dataToPoint=function(t,r,n){return n=n||[],this.dataToLayout(t,r,Ip),n[0]=Ip.rect.x+Ip.rect.width/2,n[1]=Ip.rect.y+Ip.rect.height/2,n},e.prototype.dataToLayout=function(t,r,n){var a=this._dims;n=n||{};var i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;var o=n.matrixXYLocatorRange=YW(n.matrixXYLocatorRange);return pe(t)&&($W(o,null,t,a,Ie(r&&r.clamp,xl.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==xl.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==xl.body)&&this._model.getCorner().expandRangeByCellMerge(o)),r4(i,o,a,0),r4(i,o,a,1)),n},e.prototype.pointToData=function(t,r,n){var a=this._dims;return h4(ro,0,a,t,r&&r.clamp),h4(ro,1,a,t,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,ro.y===pn.inCorner&&ro.x===pn.inBody?d4(ro,n,0,a):ro.x===pn.inCorner&&ro.y===pn.inBody?d4(ro,n,1,a):(v4(ro,n,0,a),v4(ro,n,1,a)),n},e.prototype.convertToPixel=function(t,r,n,a){var i=SD(r);return i===this?i.dataToPoint(n,a):void 0},e.prototype.convertToLayout=function(t,r,n,a){var i=SD(r);return i===this?i.dataToLayout(n,a):void 0},e.prototype.convertFromPixel=function(t,r,n,a){var i=SD(r);return i===this?i.pointToData(n,a):void 0},e.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},e.dimensions=["x","y","value"],e})(),Ip={rect:Ub()},Lx=new Es,xD=new Es;function u4(e,t,r,n){for(var a=1-n,i=t[Ze[n]],o=t[Ze[a]],l=o.shouldShow(),s=i.resetCellIterator();s.next();)s.item.wh=s.item.xy=NaN;for(var c=o.resetLayoutIterator(null,n);c.next();)c.item.wh=c.item.xy=NaN;for(var f=r[Pr[n]],h=i.getLocatorCount(n)+o.getLocatorCount(n),v=new ct,p=o.resetLevelIterator();p.next();)v.option=p.item.option,v.parentModel=e[Ze[a]],x(p.item,l?v.get("levelSize"):0);for(var m=new ct,y=i.resetCellIterator();y.next();)y.item.type===ll.leaf&&(m.option=y.item.option,m.parentModel=void 0,x(y.item,m.get("size")));function x(E,N){var L=fTe(N,n,r);xn(L)||(E.wh=n2(L,f),f=n2(f-E.wh),h--)}var b=h?f/h:0,w=!h&&f>=1,C=r[Ze[n]],A=i.getLocatorCount(n)-1,M=new Es;for(o.resetLayoutIterator(M,n);M.next();)R(M.item);for(i.resetLayoutIterator(M,n);M.next();)R(M.item);function R(E){xn(E.wh)&&(E.wh=b),E.xy=C,E.id[Ze[n]]===A&&!w&&(E.wh=r[Ze[n]]+r[Pr[n]]-E.xy),C+=E.wh}}function c4(e,t){for(var r=t[Ze[e]].resetCellIterator();r.next();){var n=r.item;Yb(n.rect,e,n.id,n.span,t),Yb(n.rect,1-e,n.id,n.span,t),n.type===ll.nonLeaf&&(n.xy=n.rect[Ze[e]],n.wh=n.rect[Pr[e]])}}function f4(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var a=r.spanRect,i=r.id;Yb(a,0,i,n,t),Yb(a,1,i,n,t)}})}function Yb(e,t,r,n,a){e[Pr[t]]=0;var i=r[Ze[t]],o=i<0?a[Ze[1-t]]:a[Ze[t]],l=o.getUnitLayoutInfo(t,r[Ze[t]]);if(e[Ze[t]]=l.xy,e[Pr[t]]=l.wh,n[Ze[t]]>1){var s=o.getUnitLayoutInfo(t,r[Ze[t]]+n[Ze[t]]-1);e[Pr[t]]=s.xy+s.wh-l.xy}}function fTe(e,t,r){var n=WS(e,r[Pr[t]]);return n2(n,r[Pr[t]])}function n2(e,t){return Math.max(Math.min(e,Ie(t,1/0)),0)}function SD(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var pn={inBody:1,inCorner:2,outside:3},ro={x:null,y:null,point:[]};function h4(e,t,r,n,a){var i=r[Ze[t]],o=r[Ze[1-t]],l=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),s=i.getUnitLayoutInfo(t,0),c=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),f=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,h=e.point[t]=n[t];if(!s&&!f){e[Ze[t]]=pn.outside;return}if(a===xl.body){s?(e[Ze[t]]=pn.inBody,h=kt(l.xy+l.wh,st(s.xy,h)),e.point[t]=h):e[Ze[t]]=pn.outside;return}else if(a===xl.corner){f?(e[Ze[t]]=pn.inCorner,h=kt(f.xy+f.wh,st(c.xy,h)),e.point[t]=h):e[Ze[t]]=pn.outside;return}var v=s?s.xy:f?f.xy+f.wh:NaN,p=c?c.xy:v,m=l?l.xy+l.wh:v;if(h<p){if(!a){e[Ze[t]]=pn.outside;return}h=p}else if(h>m){if(!a){e[Ze[t]]=pn.outside;return}h=m}e.point[t]=h,e[Ze[t]]=v<=h&&h<=m?pn.inBody:p<=h&&h<=v?pn.inCorner:pn.outside}function d4(e,t,r,n){var a=1-r;if(e[Ze[r]]!==pn.outside)for(n[Ze[r]].resetCellIterator(xD);xD.next();){var i=xD.item;if(p4(e.point[r],i.rect,r)&&p4(e.point[a],i.rect,a)){t[r]=i.ordinal,t[a]=i.id[Ze[a]];return}}}function v4(e,t,r,n){if(e[Ze[r]]!==pn.outside){var a=e[Ze[r]]===pn.inCorner?n[Ze[1-r]]:n[Ze[r]];for(a.resetLayoutIterator(Lx,r);Lx.next();)if(hTe(e.point[r],Lx.item)){t[r]=Lx.item.id[Ze[r]];return}}}function hTe(e,t){return t.xy<=e&&e<=t.xy+t.wh}function p4(e,t,r){return t[Ze[r]]<=e&&e<=t[Ze[r]]+t[Pr[r]]}function dTe(e){e.registerComponentModel(rTe),e.registerComponentView(lTe),e.registerCoordinateSystem("matrix",cTe)}function vTe(e,t){var r=e.existing;if(t.id=e.keyInfo.id,!t.type&&r&&(t.type=r.type),t.parentId==null){var n=t.parentOption;n?t.parentId=n.id:r&&(t.parentId=r.parentId)}t.parentOption=null}function g4(e,t){var r;return B(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function pTe(e,t,r){var n=he({},r),a=e[t],i=r.$action||"merge";i==="merge"?a?(Je(a,n,!0),Mo(a,n,{ignoreSize:!0}),t7(r,a),Ix(r,a),Ix(r,a,"shape"),Ix(r,a,"style"),Ix(r,a,"extra"),r.clipPath=a.clipPath):e[t]=n:i==="replace"?e[t]=n:i==="remove"&&a&&(e[t]=null)}var qW=["transition","enterFrom","leaveTo"],gTe=qW.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Ix(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?qW:gTe,a=0;a<n.length;a++){var i=n[a];e[i]==null&&t[i]!=null&&(e[i]=t[i])}}function mTe(e,t){if(e&&(e.hv=t.hv=[g4(t,["left","right"]),g4(t,["top","bottom"])],e.type==="group")){var r=e,n=t;r.width==null&&(r.width=n.width=0),r.height==null&&(r.height=n.height=0)}}var yTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.mergeOption=function(r,n){var a=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,r,n),this.option.elements=a},t.prototype.optionUpdated=function(r,n){var a=this.option,i=(n?a:r).elements,o=a.elements=n?[]:a.elements,l=[];this._flatten(i,l,null);var s=E6(o,l,"normalMerge"),c=this._elOptionsToUpdate=[];B(s,function(f,h){var v=f.newOption;v&&(c.push(v),vTe(f,v),pTe(o,h,v),mTe(o[h],v))},this),a.elements=Bt(o,function(f){return f&&delete f.$action,f!=null})},t.prototype._flatten=function(r,n,a){B(r,function(i){if(i){a&&(i.parentOption=a),n.push(i);var o=i.children;o&&o.length&&this._flatten(o,n,i),delete i.children}},this)},t.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},t.type="graphic",t.defaultOption={elements:[]},t})(lt),m4={path:null,compoundPath:null,group:ze,image:Xr,text:vt},Xa=it(),xTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this._elMap=Le()},t.prototype.render=function(r,n,a){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,a)},t.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var a=this._elMap,i=this.group,o=r.get("z"),l=r.get("zlevel");B(n,function(s){var c=kr(s.id,null),f=c!=null?a.get(c):null,h=kr(s.parentId,null),v=h!=null?a.get(h):i,p=s.type,m=s.style;p==="text"&&m&&s.hv&&s.hv[1]&&(m.textVerticalAlign=m.textBaseline=m.verticalAlign=m.align=null);var y=s.textContent,x=s.textConfig;if(m&&m9(m,p,!!x,!!y)){var b=y9(m,p,!0);!x&&b.textConfig&&(x=s.textConfig=b.textConfig),!y&&b.textContent&&(y=b.textContent)}var w=STe(s),C=s.$action||"merge",A=C==="merge",M=C==="replace";if(A){var R=!f,E=f;R?E=y4(c,v,s.type,a):(E&&(Xa(E).isNew=!1),NW(E)),E&&(mS(E,w,r,{isInit:R}),x4(E,s,o,l))}else if(M){xS(f,s,a,r);var N=y4(c,v,s.type,a);N&&(mS(N,w,r,{isInit:!0}),x4(N,s,o,l))}else C==="remove"&&(RW(f,s),xS(f,s,a,r));var L=a.get(c);if(L&&y)if(A){var O=L.getTextContent();O?O.attr(y):L.setTextContent(new vt(y))}else M&&L.setTextContent(new vt(y));if(L){var I=s.clipPath;if(I){var z=I.type,V=void 0,R=!1;if(A){var Y=L.getClipPath();R=!Y||Xa(Y).type!==z,V=R?a2(z):Y}else M&&(R=!0,V=a2(z));L.setClipPath(V),mS(V,I,r,{isInit:R}),Fb(V,I.keyframeAnimation,r)}var H=Xa(L);L.setTextConfig(x),H.option=s,bTe(L,r,s),Nl({el:L,componentModel:r,itemName:L.name,itemTooltipOption:s.tooltip}),Fb(L,s.keyframeAnimation,r)}})}},t.prototype._relocate=function(r,n){for(var a=r.option.elements,i=this.group,o=this._elMap,l=n.getWidth(),s=n.getHeight(),c=["x","y"],f=0;f<a.length;f++){var h=a[f],v=kr(h.id,null),p=v!=null?o.get(v):null;if(!(!p||!p.isGroup)){var m=p.parent,y=m===i,x=Xa(p),b=Xa(m);x.width=Re(x.option.width,y?l:b.width)||0,x.height=Re(x.option.height,y?s:b.height)||0}}for(var f=a.length-1;f>=0;f--){var h=a[f],v=kr(h.id,null),p=v!=null?o.get(v):null;if(p){var m=p.parent,b=Xa(m),w=m===i?{width:l,height:s}:{width:b.width,height:b.height},C={},A=O_(p,h,w,null,{hv:h.hv,boundingMode:h.bounding},C);if(!Xa(p).isNew&&A){for(var M=h.transition,R={},E=0;E<c.length;E++){var N=c[E],L=C[N];M&&(Dc(M)||qe(M,N)>=0)?R[N]=L:p[N]=L}_t(p,R,r,0)}else p.attr(C)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(a){xS(a,Xa(a).option,n,r._lastGraphicModel)}),this._elMap=Le()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t})(Ht);function a2(e){var t=Ne(m4,e)?m4[e]:Vg(e),r=new t({});return Xa(r).type=e,r}function y4(e,t,r,n){var a=a2(r);return t.add(a),n.set(e,a),Xa(a).id=e,Xa(a).isNew=!0,a}function xS(e,t,r,n){var a=e&&e.parent;a&&(e.type==="group"&&e.traverse(function(i){xS(i,t,r,n)}),t1(e,t,n),r.removeKey(Xa(e).id))}function x4(e,t,r,n){e.isGroup||B([["cursor",Ni.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(a){var i=a[0];Ne(t,i)?e[i]=Ie(t[i],a[1]):e[i]==null&&(e[i]=a[1])}),B(dt(t),function(a){if(a.indexOf("on")===0){var i=t[a];e[a]=Be(i)?i:null}}),Ne(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function STe(e){return e=he({},e),B(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(K8),function(t){delete e[t]}),e}function bTe(e,t,r){var n=$e(e).eventData;!e.silent&&!e.ignore&&!n&&(n=$e(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function _Te(e){e.registerComponentModel(yTe),e.registerComponentView(xTe),e.registerPreprocessor(function(t){var r=t.graphic;pe(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var S4=["x","y","radius","angle","single"],wTe=it(),CTe=["cartesian2d","polar","singleAxis"];function TTe(e){var t=e.get("coordinateSystem");return qe(CTe,t)>=0}function Ds(e){return e+"Axis"}function ATe(e,t){var r=Le(),n=[],a=Le();e.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||l(f)});var i;do i=!1,e.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&s(f)&&(l(f),i=!0)}function l(f){a.set(f.uid,!0),n.push(f),c(f)}function s(f){var h=!1;return f.eachTargetAxis(function(v,p){var m=r.get(v);m&&m[p]&&(h=!0)}),h}function c(f){f.eachTargetAxis(function(h,v){(r.get(h)||r.set(h,[]))[v]=!0})}return n}function XW(e){var t=e.ecModel,r={infoList:[],infoMap:Le()};return e.eachTargetAxis(function(n,a){var i=t.getComponent(Ds(n),a);if(i){var o=i.getCoordSysModel();if(o){var l=o.uid,s=r.infoMap.get(l);s||(s={model:o,axisModels:[]},r.infoList.push(s),r.infoMap.set(l,s)),s.axisModels.push(i)}}}),r}function ZW(e){var t=wTe(X7(e));return t.axisProxyMap||(t.axisProxyMap=Le())}function $b(e){if(e)return ZW(e.ecModel).get(e.uid)}function DTe(e,t){ZW(e.ecModel).set(e.uid,t)}function KW(e,t){var r=t.getAxisModel().axis.__alignTo;return r&&e.getAxisProxy(r.dim,r.model.componentIndex)?$b(r.model):null}var bD=(function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},e})(),fm=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return t.prototype.init=function(r,n,a){var i=b4(r);this.settledOption=i,this.mergeDefaultAndTheme(r,a),this._doInit(i)},t.prototype.mergeOption=function(r){var n=b4(r);Je(this.option,r,!0),Je(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var a=this.settledOption;B([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=Le(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return B(S4,function(a){var i=this.getReferringComponents(Ds(a),cue);if(i.specified){n=!0;var o=new bD;B(i.models,function(l){o.add(l.componentIndex)}),r.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",l=a.findComponents({mainType:o+"Axis"});s(l,o)}if(i){var l=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});s(l,"single")}function s(c,f){var h=c[0];if(h){var v=new bD;if(v.add(h.componentIndex),r.set(f,v),i=!1,f==="x"||f==="y"){var p=h.getReferringComponents("grid",dr).models[0];p&&B(c,function(m){h.componentIndex!==m.componentIndex&&p===m.getReferringComponents("grid",dr).models[0]&&v.add(m.componentIndex)})}}}i&&B(S4,function(c){if(i){var f=a.findComponents({mainType:Ds(c),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new bD;h.add(f[0].componentIndex),r.set(c,h),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(r){var n=this._rangePropMode,a=this.get("rangeMode");B([["start","startValue"],["end","endValue"]],function(i,o){var l=r[i[0]]!=null,s=r[i[1]]!=null;l&&!s?n[o]="percent":!l&&s?n[o]="value":a?n[o]=a[o]:l&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,a){r==null&&(r=this.ecModel.getComponent(Ds(n),a))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(a,i){B(a.indexList,function(o){r.call(n,i,o)})})},t.prototype.getAxisProxy=function(r,n){return $b(this.getAxisModel(r,n))},t.prototype.getAxisModel=function(r,n){var a=this._targetAxisInfoMap.get(r);if(a&&a.indexMap[n])return this.ecModel.getComponent(Ds(r),n)},t.prototype.setRawRange=function(r){var n=this.option,a=this.settledOption;B([["start","startValue"],["end","endValue"]],function(i){(r[i[0]]!=null||r[i[1]]!=null)&&(n[i[0]]=a[i[0]]=r[i[0]],n[i[1]]=a[i[1]]=r[i[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;B(["start","startValue","end","endValue"],function(a){n[a]=r[a]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getWindow().percent},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getWindow().value}else return this.getAxisProxy(r,n).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return $b(r);for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],l=this._targetAxisInfoMap.get(o),s=0;s<l.indexList.length;s++){var c=this.getAxisProxy(o,l.indexList[s]);if(c.hostedBy(this))return c;n||(n=c)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(lt);function b4(e){var t={};return B(["start","end","startValue","endValue","throttle"],function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var MTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t})(fm),jL=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a,i){this.dataZoomModel=r,this.ecModel=n,this.api=a},t.type="dataZoom",t})(Ht),RTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.select",t})(jL),ETe=(function(){function e(t,r,n,a){this._dimName=t,this._axisIndex=r,this.ecModel=a,this._dataZoomModel=n}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getWindow=function(){return je(this._window)},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(r){if(TTe(r)){var n=Ds(this._dimName),a=r.getReferringComponents(n,dr).models[0];a&&this._axisIndex===a.componentIndex&&t.push(r)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return je(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var r=this._extent,n=this.getAxisModel().axis,a=n.scale,i=this._dataZoomModel,o=i.getRangePropMode(),l=[0,100],s=[],c=[],f,h=[!1,!1];B(["start","end"],function(C,A){var M=t[C],R=t[C+"Value"];o[A]==="percent"?(M==null&&(M=l[A]),R=St(M,l,r),h[A]=!0):(f=!0,R==null?R=r[A]:(R=a.parse(R),a.sanitize&&(R=a.sanitize(R,r))),M=St(R,r,l)),c[A]=R==null||isNaN(R)?r[A]:R,s[A]=M==null||isNaN(M)?l[A]:M}),nn(c),nn(s);var v=this._minMaxSpan;f?p(c,s,r,l,!1):p(s,c,l,r,!0);function p(C,A,M,R,E){var N=E?"Span":"ValueSpan";Hs(0,C,M,"all",v["min"+N],v["max"+N]);for(var L=0;L<2;L++)A[L]=St(C[L],M,R,!0),E&&(A[L]=A[L],h[L]=!0);aS(A)}var m=fa(a)||jm(a),y=n.getExtent(),x=sr(y[1]-y[0]),b=m?0:yE(c,x,.5);B([[0,nf],[1,li]],function(C){var A=C[0],M=C[1];!h[A]||!isFinite(b)||(c[A]=xt(c[A],b),c[A]=kt(r[1],st(r[0],c[A])),s[A]===l[A]&&(c[A]=r[A],m&&(c[A]=M(c[A]))))}),aS(c);var w=[St(c[0],r,l,!0),St(c[1],r,l,!0)];return aS(w),{value:c,percent:s,percentInverted:w,valuePrecision:b}},e.prototype.reset=function(t,r){if(this.hostedBy(t)){var n=this.getAxisModel().axis;Gc(n,kpe);var a=n.scale.rawExtentInfo;this._extent=a.makeNoZoom(),this._updateMinMaxSpan();var i=t.settledOption;r&&(i=Ue({start:r[0],end:r[1]},i));var o=this._window=this.calculateDataWindow(i),l=o.percent,s=o.value;l[0]!==0&&a.setZoomMM(0,s[0]),l[1]!==100&&a.setZoomMM(1,s[1])}},e.prototype.filterData=function(t,r){if(!this.hostedBy(t))return;var n=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),o=this._window.value;if(i==="none")return;B(a,function(s){var c=s.getData(),f=c.mapDimensionsAll(n);if(f.length){if(i==="weakFilter"){var h=c.getStore(),v=xe(f,function(p){return c.getDimensionIndex(p)},c);c.filterSelf(function(p){for(var m,y,x,b=0;b<f.length;b++){var w=h.get(v[b],p),C=!isNaN(w),A=w<o[0],M=w>o[1];if(C&&!A&&!M)return!0;C&&(x=!0),A&&(m=!0),M&&(y=!0)}return x&&m&&y})}else B(f,function(p){if(i==="empty")s.setData(c=c.map(p,function(y){return l(y)?y:NaN}));else{var m={};m[p]=o,c.selectRange(m)}});B(f,function(p){c.setApproximateExtent(o,p)})}});function l(s){return s>=o[0]&&s<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._extent;B(["min","max"],function(a){var i=r.get(a+"Span"),o=r.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=St(n[0]+o,n,[0,100],!0):i!=null&&(o=St(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},e})(),NTe={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(a){e.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,l){var s=e.getComponent(Ds(o),l);a(o,l,s,i)})})}var r=[];t(function(a,i,o,l){if(!$b(o)){var s=new ETe(a,i,l,e);r.push(s),DTe(o,s)}});var n=Le();return B(r,function(a){B(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){var n=[];r.eachTargetAxis(function(a,i){var o=r.getAxisProxy(a,i),l=KW(r,o);l?n.push([o,l]):o.reset(r,null)}),B(n,function(a){a[0].reset(r,a[1].getWindow().percentInverted)}),r.eachTargetAxis(function(a,i){r.getAxisProxy(a,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var a=n.getWindow(),i=a.percent,o=a.value;r.setCalculatedRange({start:i[0],end:i[1],startValue:o[0],endValue:o[1]})}})}};function LTe(e){e.registerAction("dataZoom",function(t,r){var n=ATe(r,t);B(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var ITe=kd();function BL(e){ITe(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,NTe),LTe(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function OTe(e){e.registerComponentModel(MTe),e.registerComponentView(RTe),BL(e)}var _o=(function(){function e(){}return e})(),QW={};function Ih(e,t){QW[e]=t}function JW(e){return QW[e]}var kTe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n,a){var i=a.getTheme().get("toolbox"),o=i?i.feature:null;o&&(this._themeFeatureOption=he({},o),i.feature={}),e.prototype.init.call(this,r,n,a),o&&(i.feature=o)},t.prototype.optionUpdated=function(){B(this.option.feature,function(r,n){var a=this._themeFeatureOption,i=JW(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(this.ecModel)),a&&a[n]&&(Je(r,a[n]),a[n]=null),Je(r,i.defaultOption))},this)},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:re.color.border,borderRadius:0,borderWidth:0,padding:re.size.m,itemSize:15,itemGap:re.size.s,showTitle:!0,iconStyle:{borderColor:re.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:re.color.accent70}},tooltip:{show:!1,position:"bottom"}},t})(lt);function eq(e,t){var r=Gd(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var a=new at({shape:{x:e.x-r[3],y:e.y-r[0],width:e.width+r[1]+r[3],height:e.height+r[0]+r[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var PTe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,a,i){var o=this.group;if(o.removeAll(),!r.get("show"))return;var l=+r.get("itemSize"),s=r.get("orient")==="vertical",c=r.get("feature")||{},f=this._features||(this._features=Le()),h=[];B(c,function(w,C){h.push(C)}),new hf(this._featureNames||[],h).add(v).update(v).remove(et(v,null)).execute(),this._featureNames=Bt(h,function(w){return f.hasKey(w)});function v(w,C){var A=w!=null&&C==null,M=w!=null&&C!=null,R=w==null,E=A||M?h[w]:h[C],N=c[E],L=A||M?new ct(N,r,n):null,O=L&&L.get("show"),I;if(A){if(!O)return;if(jTe(E))I={onclick:L.option.onclick,featureName:E};else{var z=JW(E);if(!z)return;I=new z}f.set(E,I)}else I=f.get(E);if(R||!O){_4(I)&&I.dispose&&I.dispose(n,a),f.removeKey(E);return}i&&i.newTitle!=null&&i.featureName===E&&(N.title=i.newTitle),A&&(I.uid=uf("toolbox-feature")),I.model=L,I.ecModel=n,I.api=a,p(L,I,E),L.setIconStatus=function(V,Y){var H=this.option,F=this.iconPaths;H.iconStatus=H.iconStatus||{},H.iconStatus[V]=Y,F[V]&&(Y==="emphasis"?Tl:Al)(F[V])},_4(I)&&I.render&&I.render(L,n,a,i)}function p(w,C,A){var M=w.getModel("iconStyle"),R=w.getModel(["emphasis","iconStyle"]),E=C instanceof _o&&C.getIcons?C.getIcons():w.get("icon"),N=w.get("title")||{},L,O;De(E)?(L={},L[A]=E):L=E,De(N)?(O={},O[A]=N):O=N;var I=w.iconPaths={};B(L,function(z,V){var Y=Fd(z,{},{x:-l/2,y:-l/2,width:l,height:l});Y.setStyle(M.getItemStyle());var H=Y.ensureState("emphasis");H.style=R.getItemStyle();var F=new vt({style:{text:O[V],align:R.get("textAlign"),borderRadius:R.get("textBorderRadius"),padding:R.get("textPadding"),fill:null,font:UE({fontStyle:R.get("textFontStyle"),fontFamily:R.get("textFontFamily"),fontSize:R.get("textFontSize"),fontWeight:R.get("textFontWeight")},n)},ignore:!0});Y.setTextContent(F),Nl({el:Y,componentModel:r,itemName:V,formatterParamsExtra:{title:O[V]}}),Y.__title=O[V],Y.on("mouseover",function(){var X=R.getItemStyle(),P=s?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:R.get("textFill")||X.fill||X.stroke||re.color.neutral99,backgroundColor:R.get("textBackgroundColor")}),Y.setTextConfig({position:R.get("textPosition")||P}),F.ignore=!r.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){w.get(["iconStatus",V])!=="emphasis"&&a.leaveEmphasis(this),F.hide()}),(w.get(["iconStatus",V])==="emphasis"?Tl:Al)(Y),o.add(Y),Y.on("click",Ee(C.onclick,C,n,a,V)),I[V]=Y})}var m=Vr(r,a).refContainer,y=r.getBoxLayoutParams(),x=r.get("padding"),b=Qt(y,m,x);Cc(r.get("orient"),o,r.get("itemGap"),b.width,b.height),O_(o,y,m,x),o.add(eq(o.getBoundingRect(),r)),s||o.eachChild(function(w){var C=w.__title,A=w.ensureState("emphasis"),M=A.textConfig||(A.textConfig={}),R=w.getTextContent(),E=R&&R.ensureState("emphasis");if(E&&!Be(E)&&C){var N=E.style||(E.style={}),L=y_(C,vt.makeFont(N)),O=w.x+o.x,I=w.y+o.y+l,z=!1;I+L.height>a.getHeight()&&(M.position="top",z=!0);var V=z?-5-L.height:l+10;O+L.width/2>a.getWidth()?(M.position=["100%",V],N.align="right"):O-L.width/2<0&&(M.position=[0,V],N.align="left")}})},t.prototype.updateView=function(r,n,a,i){B(this._features,function(o){o&&o instanceof _o&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.dispose=function(r,n){B(this._features,function(a){a&&a instanceof _o&&a.dispose&&a.dispose(r,n)})},t.type="toolbox",t})(Ht);function jTe(e){return e.indexOf("my")===0}function _4(e){return e instanceof _o}var BTe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var a=this.model,i=a.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",l=o?"svg":a.get("type",!0)||"png",s=n.getConnectedDataURL({type:l,backgroundColor:a.get("backgroundColor",!0)||r.get("backgroundColor")||re.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),c=ht.browser;if(typeof MouseEvent=="function"&&(c.newEdge||!c.ie&&!c.edge)){var f=document.createElement("a");f.download=i+"."+l,f.target="_blank",f.href=s;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=s.split(","),p=v[0].indexOf("base64")>-1,m=o?decodeURIComponent(v[1]):v[1];p&&(m=window.atob(m));var y=i+"."+l;if(window.navigator.msSaveOrOpenBlob){for(var x=m.length,b=new Uint8Array(x);x--;)b[x]=m.charCodeAt(x);var w=new Blob([b]);window.navigator.msSaveOrOpenBlob(w,y)}else{var C=document.createElement("iframe");document.body.appendChild(C);var A=C.contentWindow,M=A.document;M.open("image/svg+xml","replace"),M.write(m),M.close(),A.focus(),M.execCommand("SaveAs",!0,y),document.body.removeChild(C)}}else{var R=a.get("lang"),E='<body style="margin:0;"><img src="'+s+'" style="max-width:100%;" title="'+(R&&R[0]||"")+'" /></body>',N=window.open();N.document.write(E),N.document.title=i}},t.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:re.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t})(_o),w4="__ec_magicType_stack__",zTe=[["line","bar"],["stack"]],VTe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),a={};return B(r.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},t.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(r,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(C4[a]){var l={series:[]},s=function(h){var v=h.subType,p=h.id,m=C4[a](v,p,h,i);m&&(Ue(m,h.option),l.series.push(m));var y=h.coordinateSystem;if(y&&y.type==="cartesian2d"&&(a==="line"||a==="bar")){var x=y.getAxesByScale("ordinal")[0];if(x){var b=x.dim,w=b+"Axis",C=h.getReferringComponents(w,dr).models[0],A=C.componentIndex;l[w]=l[w]||[];for(var M=0;M<=A;M++)l[w][A]=l[w][A]||{};l[w][A].boundaryGap=a==="bar"}}};B(zTe,function(h){qe(h,a)>=0&&B(h,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(a,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},s);var c,f=a;a==="stack"&&(c=Je({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:l,newTitle:c,featureName:"magicType"})}},t})(_o),C4={line:function(e,t,r,n){if(e==="bar")return Je({id:t,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(e,t,r,n){if(e==="line")return Je({id:t,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(e,t,r,n){var a=r.get("stack")===w4;if(e==="line"||e==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),Je({id:t,stack:a?"":w4},n.get(["option","stack"])||{},!0)}};ki({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var r1=new Array(60).join("-"),Td=" ";function FTe(e){var t={},r=[],n=[];return e.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var l=Mme(o);t[l]||(t[l]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[l].series.push(a)}else r.push(a)}else r.push(a)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function GTe(e){var t=[];return B(e,function(r,n){var a=r.categoryAxis,i=r.valueAxis,o=i.dim,l=[" "].concat(xe(r.series,function(p){return p.name})),s=[a.model.getCategories()];B(r.series,function(p){var m=p.getRawData();s.push(p.getRawData().mapArray(m.mapDimension(o),function(y){return y}))});for(var c=[l.join(Td)],f=0;f<s[0].length;f++){for(var h=[],v=0;v<s.length;v++)h.push(s[v][f]);c.push(h.join(Td))}t.push(c.join(`
51
+ `))}),t.join(`
52
+
53
+ `+r1+`
54
+
55
+ `)}function HTe(e){return xe(e,function(t){var r=t.getRawData(),n=[t.name],a=[];return r.each(r.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],l=r.getName(o),s=0;s<i-1;s++)a[s]=arguments[s];n.push((l?l+Td:"")+a.join(Td))}),n.join(`
56
+ `)}).join(`
57
+
58
+ `+r1+`
59
+
60
+ `)}function UTe(e){var t=FTe(e);return{value:Bt([GTe(t.seriesGroupByCategoryAxis),HTe(t.other)],function(r){return!!r.replace(/[\n\t\s]/g,"")}).join(`
61
+
62
+ `+r1+`
63
+
64
+ `),meta:t.meta}}function Wb(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function YTe(e){var t=e.slice(0,e.indexOf(`
65
+ `));if(t.indexOf(Td)>=0)return!0}var i2=new RegExp("["+Td+"]+","g");function $Te(e){for(var t=e.split(/\n+/g),r=Wb(t.shift()).split(i2),n=[],a=xe(r,function(s){return{name:s,data:[]}}),i=0;i<t.length;i++){var o=Wb(t[i]).split(i2);n.push(o.shift());for(var l=0;l<o.length;l++)a[l]&&(a[l].data[i]=o[l])}return{series:a,categories:n}}function WTe(e){for(var t=e.split(/\n+/g),r=Wb(t.shift()),n=[],a=0;a<t.length;a++){var i=Wb(t[a]);if(i){var o=i.split(i2),l="",s=void 0,c=!1;isNaN(o[0])?(c=!0,l=o[0],o=o.slice(1),n[a]={name:l,value:[]},s=n[a].value):s=n[a]=[];for(var f=0;f<o.length;f++)s.push(+o[f]);s.length===1&&(c?n[a].value=s[0]:n[a]=s[0])}}return{name:r,data:n}}function qTe(e,t){var r=e.split(new RegExp(`
66
+ *`+r1+`
67
+ *`,"g")),n={series:[]};return B(r,function(a,i){if(YTe(a)){var o=$Te(a),l=t[i],s=l.axisDim+"Axis";l&&(n[s]=n[s]||[],n[s][l.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=WTe(a);n.series.push(o)}}),n}var XTe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||re.color.neutral00;var l=document.createElement("h4"),s=i.get("lang")||[];l.innerHTML=s[0]||i.get("title"),l.style.cssText="margin:10px 20px",l.style.color=i.get("textColor");var c=document.createElement("div"),f=document.createElement("textarea");c.style.cssText="overflow:auto";var h=i.get("optionToContent"),v=i.get("contentToOption"),p=UTe(r);if(Be(h)){var m=h(n.getOption());De(m)?c.innerHTML=m:Rc(m)&&c.appendChild(m)}else{f.readOnly=i.get("readOnly");var y=f.style;y.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",y.color=i.get("textColor"),y.borderColor=i.get("textareaBorderColor"),y.backgroundColor=i.get("textareaColor"),f.value=p.value,c.appendChild(f)}var x=p.meta,b=document.createElement("div");b.style.cssText="position:absolute;bottom:5px;left:0;right:0";var w="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",C=document.createElement("div"),A=document.createElement("div");w+=";background-color:"+i.get("buttonColor"),w+=";color:"+i.get("buttonTextColor");var M=this;function R(){a.removeChild(o),M._dom=null}TM(C,"click",R),TM(A,"click",function(){if(v==null&&h!=null||v!=null&&h==null){R();return}var E;try{Be(v)?E=v(c,n.getOption()):E=qTe(f.value,x)}catch(N){throw R(),new Error("Data view format error "+N)}E&&n.dispatchAction({type:"changeDataView",newOption:E}),R()}),C.innerHTML=s[1],A.innerHTML=s[2],A.style.cssText=C.style.cssText=w,!i.get("readOnly")&&b.appendChild(A),b.appendChild(C),o.appendChild(l),o.appendChild(c),o.appendChild(b),c.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},t.prototype.dispose=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.getDefaultOption=function(r){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:r.getLocaleModel().get(["toolbox","dataView","title"]),lang:r.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:re.color.background,textColor:re.color.primary,textareaColor:re.color.background,textareaBorderColor:re.color.border,buttonColor:re.color.accent50,buttonTextColor:re.color.neutral00};return n},t})(_o);function ZTe(e,t){return xe(e,function(r,n){var a=t&&t[n];if(Ve(a)&&!pe(a)){var i=Ve(r)&&!pe(r);i||(r={value:r});var o=a.name!=null&&r.name==null;return r=Ue(r,a),o&&delete r.name,r}else return r})}ki({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];B(e.newOption.series,function(n){var a=t.getSeriesByName(n.name)[0];if(!a)r.push(he({type:"scatter"},n));else{var i=a.get("data");r.push({name:n.name,data:ZTe(n.data,i)})}}),t.mergeOption(Ue({series:r},e.newOption))});var tq=B,rq=it();function KTe(e,t){var r=zL(e);tq(t,function(n,a){for(var i=r.length-1;i>=0;i--){var o=r[i];if(o[a])break}if(i<0){var l=e.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(l){var s=l.getPercentRange();r[0][a]={dataZoomId:a,start:s[0],end:s[1]}}}}),r.push(t)}function QTe(e){var t=zL(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return tq(r,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function JTe(e){rq(e).snapshots=null}function eAe(e){return zL(e).length}function zL(e){var t=rq(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var tAe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){JTe(r),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},t})(_o);ki({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var rAe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],VL=(function(){function e(t,r,n){var a=this;this._targetInfoList=[];var i=T4(r,t);B(nAe,function(o,l){(!n||!n.include||qe(n.include,l)>=0)&&o(i,a._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=_D[n.brushType](0,i,a);n.__rangeOffset={offset:R4[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){B(t,function(a){var i=this.findTargetInfo(a,r);i&&i!==!0&&B(i.coordSyses,function(o){var l=_D[a.brushType](1,o,a.range,!0);n(a,l.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){B(t,function(n){var a=this.findTargetInfo(n,r);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=_D[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?R4[n.brushType](i.values,o.offset,aAe(i.xyMinMax,o.xyMinMax)):i.values}},this)},e.prototype.makePanelOpts=function(t,r){return xe(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:sW(a),isTargetByCursor:cW(a,t,n.coordSysModel),getLinearBrushOtherExtent:uW(a)}})},e.prototype.controlSeries=function(t,r,n){var a=this.findTargetInfo(t,n);return a===!0||a&&qe(a.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,a=T4(r,t),i=0;i<n.length;i++){var o=n[i],l=t.panelId;if(l){if(o.panelId===l)return o}else for(var s=0;s<A4.length;s++)if(A4[s](a,o))return o}return!0},e})();function o2(e){return e[0]>e[1]&&e.reverse(),e}function T4(e,t){return cg(e,t,{includeMainTypes:rAe})}var nAe={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,a=e.gridModels,i=Le(),o={},l={};!r&&!n&&!a||(B(r,function(s){var c=s.axis.grid.model;i.set(c.id,c),o[c.id]=!0}),B(n,function(s){var c=s.axis.grid.model;i.set(c.id,c),l[c.id]=!0}),B(a,function(s){i.set(s.id,s),o[s.id]=!0,l[s.id]=!0}),i.each(function(s){var c=s.coordinateSystem,f=[];B(c.getCartesians(),function(h,v){(qe(r,h.getAxis("x").model)>=0||qe(n,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+s.id,gridModel:s,coordSysModel:s,coordSys:f[0],coordSyses:f,getPanelRect:D4.grid,xAxisDeclared:o[s.id],yAxisDeclared:l[s.id]})}))},geo:function(e,t){B(e.geoModels,function(r){var n=r.coordinateSystem;t.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:D4.geo})})}},A4=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,a=e.gridModel;return!a&&r&&(a=r.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],D4={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys.view,t=l$(null,e);return ZU(t,t,Eb(null,e)),t}},_D={lineX:et(M4,0),lineY:et(M4,1),rect:function(e,t,r,n){var a=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),i=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[o2([a[0],i[0]]),o2([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var a=[yn(),yn()],i=xe(r,function(o){var l=e?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],l[0]),a[1][0]=Math.min(a[1][0],l[1]),a[0][1]=Math.max(a[0][1],l[0]),a[1][1]=Math.max(a[1][1],l[1]),l});return{values:i,xyMinMax:a}}};function M4(e,t,r,n){var a=r.getAxis(["x","y"][e]),i=o2(xe([0,1],function(l){return t?a.coordToData(a.toLocalCoord(n[l]),!0):a.toGlobalCoord(a.dataToCoord(n[l]))})),o=[];return o[e]=i,o[1-e]=[NaN,NaN],{values:i,xyMinMax:o}}var R4={lineX:et(E4,0),lineY:et(E4,1),rect:function(e,t,r){return[[e[0][0]-r[0]*t[0][0],e[0][1]-r[0]*t[0][1]],[e[1][0]-r[1]*t[1][0],e[1][1]-r[1]*t[1][1]]]},polygon:function(e,t,r){return xe(e,function(n,a){return[n[0]-r[0]*t[a][0],n[1]-r[1]*t[a][1]]})}};function E4(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function aAe(e,t){var r=N4(e),n=N4(t),a=[r[0]/n[0],r[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function N4(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var l2=B,iAe=iue("toolbox-dataZoom_"),oAe={x:"width",y:"height"},lAe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,a,i){this._brushController||(this._brushController=new uL(a.getZr()),this._brushController.on("brush",Ee(this._onBrush,this)).mount()),cAe(r,n,this,i,a),uAe(r,n)},t.prototype.onclick=function(r,n,a){sAe[a].call(this)},t.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new VL(FL(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(c,f,h){if(h.type==="cartesian2d"){var v=h.master.getRect().clone(),p=c.brushType;p==="rect"?(l("x",h,v,f[0]),l("y",h,v,f[1])):l({lineX:"x",lineY:"y"}[p],h,v,f)}}),KTe(i,a),this._dispatchZoomAction(a);function l(c,f,h,v){var p=f.getAxis(c),m=p.model,y=s(c,m,i),x=y.findRepresentativeAxisProxy(m).getMinMaxSpan(),b=p.scale.getExtent();(x.minValueSpan!=null||x.maxValueSpan!=null)&&(v=Hs(0,v.slice(),b,0,x.minValueSpan,x.maxValueSpan));var w=yE(b,h[oAe[c]],.5);y&&(a[y.id]={dataZoomId:y.id,startValue:isFinite(w)?xt(v[0],w):v[0],endValue:isFinite(w)?xt(v[1],w):v[1]})}function s(c,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(p){var m=p.getAxisModel(c,f.componentIndex);m&&(v=p)}),v}},t.prototype._dispatchZoomAction=function(r){var n=[];l2(r,function(a,i){n.push(je(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:re.color.backgroundTint}};return n},t})(_o),sAe={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(QTe(this.ecModel))}};function FL(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function uAe(e,t){e.setIconStatus("back",eAe(t)>1?"emphasis":"normal")}function cAe(e,t,r,n,a){var i=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var o=new VL(FL(e),t,{include:["grid"]}),l=o.makePanelOpts(a,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(l).enableBrush(i&&l.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}Xfe("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),a=[],i=FL(n),o=cg(e,i);l2(o.xAxisModels,function(s){return l(s,"xAxis","xAxisIndex")}),l2(o.yAxisModels,function(s){return l(s,"yAxis","yAxisIndex")});function l(s,c,f){var h=s.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:iAe+c+h};v[f]=h,a.push(v)}return a});function fAe(e){e.registerComponentModel(kTe),e.registerComponentView(PTe),Ih("saveAsImage",BTe),Ih("magicType",VTe),Ih("dataView",XTe),Ih("dataZoom",lAe),Ih("restore",tAe),qr(OTe)}var hAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:re.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:re.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:re.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:re.color.tertiary,fontSize:14}},t})(lt);function nq(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function aq(e){if(ht.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var iq=aq(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),dAe=aq(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function oq(e,t){if(!e)return t;t=nN(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function vAe(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var pAe=oq(dAe,"transition"),GL=oq(iq,"transform"),gAe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ht.transform3dSupported?"will-change:transform;":"");function mAe(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function yAe(e,t,r){if(!De(r)||r==="inside")return"";var n=e.get("backgroundColor"),a=e.get("borderWidth");t=Bc(t);var i=mAe(r),o=Math.max(Math.round(a)*1.5,6),l="",s=GL+":",c;qe(["left","right"],i)>-1?(l+="top:50%",s+="translateY(-50%) rotate("+(c=i==="left"?-225:-45)+"deg)"):(l+="left:50%",s+="translateX(-50%) rotate("+(c=i==="top"?225:45)+"deg)");var f=c*Math.PI/180,h=o+a,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),p=Math.round(((v-Math.SQRT2*a)/2+Math.SQRT2*a-(v-h)/2)*100)/100;l+=";"+i+":-"+p+"px";var m=t+" solid "+a+"px;",y=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",l+";"+s+";","border-bottom:"+m,"border-right:"+m,"background-color:"+n+";"];return'<div style="'+y.join("")+'"></div>'}function xAe(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return r&&(a=" "+e/2+"s "+n,i="opacity"+a+",visibility"+a),t||(a=" "+e+"s "+n,i+=(i.length?",":"")+(ht.transformSupported?""+GL+a:",left"+a+",top"+a)),pAe+":"+i}function L4(e,t,r){var n=e.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!ht.transformSupported)return r?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=ht.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return r?"top:0;left:0;"+GL+":"+o+";":[["top",0],["left",0],[iq,o]]}function SAe(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var a=Ie(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+a+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,l=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+l+"px "+s+"px "+o+"px "+i),B(["decoration","align"],function(c){var f=e.get(c);f&&t.push("text-"+c+":"+f)}),t.join(";")}function bAe(e,t,r,n){var a=[],i=e.get("transitionDuration"),o=e.get("backgroundColor"),l=e.get("shadowBlur"),s=e.get("shadowColor"),c=e.get("shadowOffsetX"),f=e.get("shadowOffsetY"),h=e.getModel("textStyle"),v=I7(e,"html"),p=c+"px "+f+"px "+l+"px "+s;return a.push("box-shadow:"+p),t&&i>0&&a.push(xAe(i,r,n)),o&&a.push("background-color:"+o),B(["width","color","radius"],function(m){var y="border-"+m,x=nN(y),b=e.get(x);b!=null&&a.push(y+":"+b+(m==="color"?"":"px"))}),a.push(SAe(h)),v!=null&&a.push("padding:"+Gd(v).join("px ")+"px"),a.join(";")+";"}function I4(e,t,r,n,a){var i=t&&t.painter;if(r){var o=i&&i.getViewportRoot();o&&mle(e,o,r,n,a)}else{e[0]=n,e[1]=a;var l=i&&i.getViewportRootOffset();l&&(e[0]+=l.offsetLeft,e[1]+=l.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var _Ae=(function(){function e(t,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ht.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),i=r.appendTo,o=i&&(De(i)?document.querySelector(i):Rc(i)?i:Be(i)&&i(t.getDom()));I4(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var l=this;n.onmouseenter=function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0},n.onmousemove=function(s){if(s=s||window.event,!l._enterable){var c=a.handler,f=a.painter.getViewportRoot();$a(f,s,!0),c.dispatch("mousemove",s)}},n.onmouseleave=function(){l._inContent=!1,l._enterable&&l._show&&l.hideLater(l._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=vAe(r,"position"),a=r.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},e.prototype.show=function(t,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=gAe+bAe(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+L4(i[0],i[1],!0)+("border-color:"+Bc(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var l="";if(De(i)&&n.get("trigger")==="item"&&!nq(n)&&(l=yAe(n,a,i)),De(t))o.innerHTML=t+l;else if(t){o.innerHTML="",pe(t)||(t=[t]);for(var s=0;s<t.length;s++)Rc(t[s])&&t[s].parentNode!==o&&o.appendChild(t[s]);if(l&&o.childNodes.length){var c=document.createElement("div");c.innerHTML=l,o.appendChild(c)}}},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},e.prototype.moveTo=function(t,r){if(this.el){var n=this._styleCoord;if(I4(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var a=this.el.style,i=L4(n[0],n[1]);B(i,function(o){a[o[0]]=o[1]})}}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){var t=this,r=this.el.style;this._enableDisplayTransition?(r.visibility="hidden",r.opacity="0"):r.display="none",ht.transform3dSupported&&(r.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Ee(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;yle(t&&t.painter&&t.painter.getViewportRoot(),this._container);var r=this.el;if(r){r.onmouseenter=r.onmousemove=r.onmouseleave=null;var n=r.parentNode;n&&n.removeChild(r)}this.el=this._container=null},e})(),wAe=(function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),k4(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return e.prototype.update=function(t){var r=t.get("alwaysShowContent");r&&this._moveIfResized(),this._alwaysShowContent=r},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(t,r,n,a,i){var o=this;Ve(t)&&wt(""),this.el&&this._zr.remove(this.el);var l=n.getModel("textStyle");this.el=new vt({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:l.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:I7(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),B(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(c){o.el.style[c]=n.get(c)}),B(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(c){o.el.style[c]=l.get(c)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=O4(t.style);return[r.width+n.left+n.right,r.height+n.top+n.bottom]},e.prototype.moveTo=function(t,r){var n=this.el;if(n){var a=this._styleCoord;k4(a,this._zr,t,r),t=a[0],r=a[1];var i=n.style,o=vs(i.borderWidth||0),l=O4(i);n.x=t+o+l.left,n.y=r+o+l.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var t=this._styleCoord[2],r=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),r*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Ee(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e})();function vs(e){return Math.max(0,e)}function O4(e){var t=vs(e.shadowBlur||0),r=vs(e.shadowOffsetX||0),n=vs(e.shadowOffsetY||0);return{left:vs(t-r),right:vs(t+r),top:vs(t-n),bottom:vs(t+n)}}function k4(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var CAe=new at({shape:{x:-1,y:-1,width:2,height:2}}),TAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){if(!(ht.node||!n.getDom())){var a=r.getComponent("tooltip"),i=this._renderMode=hue(a.get("renderMode"));this._tooltipContent=i==="richText"?new wAe(n):new _Ae(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},t.prototype.render=function(r,n,a){if(!(ht.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(r),i.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Yd(this,"_updatePosition",50,"fixRate"):Ug(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");VW("itemTooltip",this._api,Ee(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,a=this._api,i=r.get("triggerOn");if(r.get("trigger")!=="axis"&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(r,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,a,i){if(!(i.from===this.uid||ht.node||!a.getDom())){var o=P4(i,a);this._ticket="";var l=i.dataByCoordSys,s=RAe(i,n,a);if(s){var c=s.el.getBoundingRect().clone();c.applyTransform(s.el.transform),this._tryShow({offsetX:c.x+c.width/2,offsetY:c.y+c.height/2,target:s.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=CAe;f.x=i.x,f.y=i.y,f.update(),$e(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(l)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:l,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,a,i))return;var h=FW(i,n),v=h.point[0],p=h.point[1];v!=null&&p!=null&&this._tryShow({offsetX:v,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,i.from!==this.uid&&this._hide(P4(i,a))},t.prototype._manuallyAxisShowTip=function(r,n,a,i){var o=i.seriesIndex,l=i.dataIndex,s=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||l==null||s==null)){var c=n.getSeriesByIndex(o);if(c){var f=c.getData(),h=Op([f.getItemModel(l),c,(c.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:l,position:i.position}),!0}}},t.prototype._tryShow=function(r,n){var a=r.target,i=this._tooltipModel;if(i){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(a){var l=$e(a);if(l.ssrType==="legend")return;this._lastDataByCoordSys=null,this._cbParamsList=null;var s,c;mc(a,function(f){if(f.tooltipDisabled)return s=c=null,!0;s||c||($e(f).dataIndex!=null?s=f:$e(f).tooltipConfig!=null&&(c=f))},!0),s?this._showSeriesItemTooltip(r,s,n):c?this._showComponentItemTooltip(r,c,n):this._hide(n)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var a=r.get("showDelay");n=Ee(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(r,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],l=Op([n.tooltipOption],i),s=this._renderMode,c=[],f=Rr("section",{blocks:[],noHeader:!0}),h=[],v=new lA;B(r,function(w){B(w.dataByAxis,function(C){var A=a.getComponent(C.axisDim+"Axis",C.axisIndex),M=C.value,R=A.axis,E=R.scale.parse(M);if(!(!A||M==null)){var N=jW(M,R,a,C.seriesDataIndices,C.valueLabelOpt),L=Rr("section",{header:N,noHeader:!Ja(N),sortBlocks:!0,blocks:[]});f.blocks.push(L),B(C.seriesDataIndices,function(O){var I=a.getSeriesByIndex(O.seriesIndex),z=O.dataIndexInside,V=I.getDataParams(z);if(!(V.dataIndex<0)){V.axisDim=C.axisDim,V.axisIndex=C.axisIndex,V.axisType=C.axisType,V.axisId=C.axisId,V.axisValue=yb(A.axis,{value:E}),V.axisValueLabel=N,V.marker=v.makeTooltipMarker("item",Bc(V.color),s);var Y=u3(I.formatTooltip(z,!0,null)),H=Y.frag;if(H){var F=Op([I],i).get("valueFormatter");L.blocks.push(F?he({valueFormatter:F},H):H)}Y.text&&h.push(Y.text),c.push(V)}})}})}),f.blocks.reverse(),h.reverse();var p=n.position,m=l.get("order"),y=p3(f,v,s,m,a.get("useUTC"),l.get("textStyle"));y&&h.unshift(y);var x=s==="richText"?`
68
+
69
+ `:"<br/>",b=h.join(x);this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(r,c)?this._updatePosition(l,p,o[0],o[1],this._tooltipContent,c):this._showTooltipContent(l,b,c,Math.random()+"",o[0],o[1],p,null,v)})},t.prototype._showSeriesItemTooltip=function(r,n,a){var i=this._ecModel,o=$e(n),l=o.seriesIndex,s=i.getSeriesByIndex(l),c=o.dataModel||s,f=o.dataIndex,h=o.dataType,v=c.getData(h),p=this._renderMode,m=r.positionDefault,y=Op([v.getItemModel(f),c,s&&(s.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),x=y.get("trigger");if(!(x!=null&&x!=="item")){var b=c.getDataParams(f,h),w=new lA;b.marker=w.makeTooltipMarker("item",Bc(b.color),p);var C=u3(c.formatTooltip(f,!1,h)),A=y.get("order"),M=y.get("valueFormatter"),R=C.frag,E=R?p3(M?he({valueFormatter:M},R):R,w,p,A,i.get("useUTC"),y.get("textStyle")):C.text,N="item_"+c.name+"_"+f;this._showOrMove(y,function(){this._showTooltipContent(y,E,b,N,r.offsetX,r.offsetY,r.position,r.target,w)}),a({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:l,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,a){var i=this._renderMode==="html",o=$e(n),l=o.tooltipConfig,s=l.option||{},c=s.encodeHTMLContent;if(De(s)){var f=s;s={content:f,formatter:f},c=!0}c&&i&&s.content&&(s=je(s),s.content=Mn(s.content));var h=[s],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:s.content});var p=r.positionDefault,m=Op(h,this._tooltipModel,p?{position:p}:null),y=m.get("content"),x=Math.random()+"",b=new lA;this._showOrMove(m,function(){var w=je(m.get("formatterParams")||{});this._showTooltipContent(m,y,w,x,r.offsetX,r.offsetY,r.position,n,b)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,a,i,o,l,s,c,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var v=r.get("formatter");s=s||r.get("position");var p=n,m=this._getNearestPoint([o,l],a,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),y=m.color;if(v)if(De(v)){var x=r.ecModel.get("useUTC"),b=pe(a)?a[0]:a,w=b&&b.axisType&&b.axisType.indexOf("time")>=0;p=v,w&&(p=Om(b.axisValue,p,x)),p=aN(p,a,!0)}else if(Be(v)){var C=Ee(function(A,M){A===this._ticket&&(h.setContent(M,f,r,y,s),this._updatePosition(r,s,o,l,h,a,c))},this);this._ticket=i,p=v(a,i,C)}else p=v;h.setContent(p,f,r,y,s),h.show(r,y),this._updatePosition(r,s,o,l,h,a,c)}},t.prototype._getNearestPoint=function(r,n,a,i,o){if(a==="axis"||pe(n))return{color:i||o};if(!pe(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,a,i,o,l,s){var c=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),v=r.get("align"),p=r.get("verticalAlign"),m=s&&s.getBoundingRect().clone();if(s&&m.applyTransform(s.transform),Be(n)&&(n=n([a,i],l,o.el,m,{viewSize:[c,f],contentSize:h.slice()})),pe(n))a=Re(n[0],c),i=Re(n[1],f);else if(Ve(n)){var y=n;y.width=h[0],y.height=h[1];var x=Qt(y,{width:c,height:f});a=x.x,i=x.y,v=null,p=null}else if(De(n)&&s){var b=MAe(n,m,h,r.get("borderWidth"));a=b[0],i=b[1]}else{var b=AAe(a,i,o,c,f,v?null:20,p?null:20);a=b[0],i=b[1]}if(v&&(a-=j4(v)?h[0]/2:v==="right"?h[0]:0),p&&(i-=j4(p)?h[1]/2:p==="bottom"?h[1]:0),nq(r)){var b=DAe(a,i,o,c,f);a=b[0],i=b[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===r.length;return o&&B(a,function(l,s){var c=l.dataByAxis||[],f=r[s]||{},h=f.dataByAxis||[];o=o&&c.length===h.length,o&&B(c,function(v,p){var m=h[p]||{},y=v.seriesDataIndices||[],x=m.seriesDataIndices||[];o=o&&v.value===m.value&&v.axisType===m.axisType&&v.axisId===m.axisId&&y.length===x.length,o&&B(y,function(b,w){var C=x[w];o=o&&b.seriesIndex===C.seriesIndex&&b.dataIndex===C.dataIndex}),i&&B(v.seriesDataIndices,function(b){var w=b.seriesIndex,C=n[w],A=i[w];C&&A&&A.data!==C.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,this._cbParamsList=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){ht.node||!n.getDom()||(Ug(this,"_updatePosition"),this._tooltipContent.dispose(),JR("itemTooltip",n),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t})(Ht);function Op(e,t,r){var n=t.ecModel,a;r?(a=new ct(r,n,n),a=new ct(t.option,a,n)):a=t;for(var i=e.length-1;i>=0;i--){var o=e[i];o&&(o instanceof ct&&(o=o.get("tooltip",!0)),De(o)&&(o={formatter:o}),o&&(a=new ct(o,a,n)))}return a}function P4(e,t){return e.dispatchAction||Ee(t.dispatchAction,t)}function AAe(e,t,r,n,a,i,o){var l=r.getSize(),s=l[0],c=l[1];return i!=null&&(e+s+i+2>n?e-=s+i:e+=i),o!=null&&(t+c+o>a?t-=c+o:t+=o),[e,t]}function DAe(e,t,r,n,a){var i=r.getSize(),o=i[0],l=i[1];return e=Math.min(e+o,n)-o,t=Math.min(t+l,a)-l,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function MAe(e,t,r,n){var a=r[0],i=r[1],o=Math.ceil(Math.SQRT2*n)+8,l=0,s=0,c=t.width,f=t.height;switch(e){case"inside":l=t.x+c/2-a/2,s=t.y+f/2-i/2;break;case"top":l=t.x+c/2-a/2,s=t.y-i-o;break;case"bottom":l=t.x+c/2-a/2,s=t.y+f+o;break;case"left":l=t.x-a-o,s=t.y+f/2-i/2;break;case"right":l=t.x+c+o,s=t.y+f/2-i/2}return[l,s]}function j4(e){return e==="center"||e==="middle"}function RAe(e,t,r){var n=CE(e).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Od(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var l=r.getViewOfComponentModel(o),s;if(l.group.traverse(function(c){var f=$e(c).tooltipConfig;if(f&&f.name===e.name)return s=c,!0}),s)return{componentMainType:a,componentIndex:o.componentIndex,el:s}}}}function EAe(e){qr(Ym),e.registerComponentModel(hAe),e.registerComponentView(TAe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ur),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ur)}var NAe=["rect","polygon","keep","clear"];function LAe(e,t){var r=ar(e?e.brush:[]);if(r.length){var n=[];B(r,function(s){var c=s.hasOwnProperty("toolbox")?s.toolbox:[];c instanceof Array&&(n=n.concat(c))});var a=e&&e.toolbox;pe(a)&&(a=a[0]),a||(a={feature:{}},e.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),l=o.type||(o.type=[]);l.push.apply(l,n),w_(l,function(s){return s+""},null),t&&!l.length&&l.push.apply(l,NAe)}}var B4=B;function z4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function s2(e,t,r){var n={};return B4(t,function(i){var o=n[i]=a();B4(e[i],function(l,s){if($r.isValidType(s)){var c={type:s,visual:l};r&&r(c,i),o[s]=new $r(c),s==="opacity"&&(c=je(c),c.type="colorAlpha",o.__hidden.__alphaForOpacity=new $r(c))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function lq(e,t,r){var n;B(r,function(a){t.hasOwnProperty(a)&&z4(t[a])&&(n=!0)}),n&&B(r,function(a){t.hasOwnProperty(a)&&z4(t[a])?e[a]=je(t[a]):delete e[a]})}function IAe(e,t,r,n,a,i){var o={};B(e,function(h){var v=$r.prepareVisualTypes(t[h]);o[h]=v});var l;function s(h){return vN(r,l,h)}function c(h,v){H7(r,l,h,v)}r.each(f);function f(h,v){l=h;var p=r.getRawDataItem(l);if(!(p&&p.visualMap===!1))for(var m=n.call(a,h),y=t[m],x=o[m],b=0,w=x.length;b<w;b++){var C=x[b];y[C]&&y[C].applyVisual(h,s,c)}}}function OAe(e,t,r,n){var a={};return B(e,function(i){var o=$r.prepareVisualTypes(t[i]);a[i]=o}),{progress:function(o,l){var s;n!=null&&(s=l.getDimensionIndex(n));function c(M){return vN(l,h,M)}function f(M,R){H7(l,h,M,R)}for(var h,v=l.getStore();(h=o.next())!=null;){var p=l.getRawDataItem(h);if(!(p&&p.visualMap===!1))for(var m=n!=null?v.get(s,h):h,y=r(m),x=t[y],b=a[y],w=0,C=b.length;w<C;w++){var A=b[w];x[A]&&x[A].applyVisual(m,c,f)}}}}}function kAe(e){var t=e.brushType,r={point:function(n){return V4[t].point(n,r,e)},rect:function(n){return V4[t].rect(n,r,e)}};return r}var V4={lineX:F4(0),lineY:F4(1),rect:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])},rect:function(e,t,r){return e&&r.boundingRect.intersect(e)}},polygon:{point:function(e,t,r){return e&&r.boundingRect.contain(e[0],e[1])&&sc(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var a=e.x,i=e.y,o=e.width,l=e.height,s=n[0];if(sc(n,a,i)||sc(n,a+o,i)||sc(n,a,i+l)||sc(n,a+o,i+l)||Fe.create(e).contain(s[0],s[1])||Up(a,i,a+o,i,n)||Up(a,i,a,i+l,n)||Up(a+o,i,a+o,i+l,n)||Up(a,i+l,a+o,i+l,n))return!0}}};function F4(e){var t=["x","y"],r=["width","height"];return{point:function(n,a,i){if(n){var o=i.range,l=n[e];return kp(l,o)}},rect:function(n,a,i){if(n){var o=i.range,l=[n[t[e]],n[t[e]]+n[r[e]]];return l[1]<l[0]&&l.reverse(),kp(l[0],o)||kp(l[1],o)||kp(o[0],l)||kp(o[1],l)}}}}function kp(e,t){return t[0]<=e&&e<=t[1]}var G4=["inBrush","outOfBrush"],wD="__ecBrushSelect",u2="__ecInBrushSelectEvent";function sq(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new VL(t.option,e);r.setInputRanges(t.areas,e)})}var PAe=Dm(jAe);function jAe(e,t,r){var n=[],a,i;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),sq(e),e.eachComponent({mainType:"brush"},function(o,l){var s={brushId:o.id,brushIndex:l,brushName:o.name,areas:je(o.areas),selected:[]};n.push(s);var c=o.option,f=c.brushLink,h=[],v=[],p=[],m=!1;l||(a=c.throttleType,i=c.throttleDelay);var y=xe(o.areas,function(M){var R=FAe[M.brushType],E=Ue({boundingRect:R?R(M):void 0},M);return E.selectors=kAe(E),E}),x=s2(o.option,G4,function(M){M.mappingMethod="fixed"});pe(f)&&B(f,function(M){h[M]=1});function b(M){return f==="all"||!!h[M]}function w(M){return!!M.length}e.eachSeries(function(M,R){var E=p[R]=[];M.subType==="parallel"?C(M,R):A(M,R,E)});function C(M,R){var E=M.coordinateSystem;m=m||E.hasAxisBrushed(),b(R)&&E.eachActiveState(M.getData(),function(N,L){N==="active"&&(v[L]=1)})}function A(M,R,E){if(!(!M.brushSelector||VAe(o,R))&&(B(y,function(L){o.brushTargetManager.controlSeries(L,M,e)&&E.push(L),m=m||w(E)}),b(R)&&w(E))){var N=M.getData();N.each(function(L){H4(M,E,N,L)&&(v[L]=1)})}}e.eachSeries(function(M,R){var E={seriesId:M.id,seriesIndex:R,seriesName:M.name,dataIndex:[]};s.selected.push(E);var N=p[R],L=M.getData(),O=b(R)?function(I){return v[I]?(E.dataIndex.push(L.getRawIndex(I)),"inBrush"):"outOfBrush"}:function(I){return H4(M,N,L,I)?(E.dataIndex.push(L.getRawIndex(I)),"inBrush"):"outOfBrush"};(b(R)?m:w(N))&&IAe(G4,x,L,O)})}),BAe(t,a,i,n,r)}function BAe(e,t,r,n,a){if(a){var i=e.getZr();if(!i[u2]){i[wD]||(i[wD]=zAe);var o=Yd(i,wD,r,t);o(e,n)}}}function zAe(e,t){if(!e.isDisposed()){var r=e.getZr();r[u2]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[u2]=!1}}function H4(e,t,r,n){for(var a=0,i=t.length;a<i;a++){var o=t[a];if(e.brushSelector(n,r,o.selectors,o))return!0}}function VAe(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(pe(r)?qe(r,t)<0:t!==r)}var FAe={rect:function(e){return U4(e.range)},polygon:function(e){for(var t,r=e.range,n=0,a=r.length;n<a;n++){t=t||[yn(),yn()];var i=r[n];i[0]<t[0][0]&&(t[0][0]=i[0]),i[0]>t[0][1]&&(t[0][1]=i[0]),i[1]<t[1][0]&&(t[1][0]=i[1]),i[1]>t[1][1]&&(t[1][1]=i[1])}return t&&U4(t)}};function U4(e){return new Fe(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var GAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new uL(n.getZr())).on("brush",Ee(this._onBrush,this)).mount()},t.prototype.render=function(r,n,a,i){this.model=r,this._updateController(r,n,a,i)},t.prototype.updateTransform=function(r,n,a,i){sq(n),this._updateController(r,n,a,i)},t.prototype.updateVisual=function(r,n,a,i){this.updateTransform(r,n,a,i)},t.prototype.updateView=function(r,n,a,i){this._updateController(r,n,a,i)},t.prototype._updateController=function(r,n,a,i){(!i||i.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(a)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:je(a),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:je(a),$from:n})},t.type="brush",t})(Ht),HAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.areas=[],r.brushOption={},r}return t.prototype.optionUpdated=function(r,n){var a=this.option;!n&&lq(a,r,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=xe(r,function(n){return Y4(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=Y4(this.option,r),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:re.color.backgroundTint,borderColor:re.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:re.color.disabled},t})(lt);function Y4(e,t){return Je({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ct(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var UAe=["rect","polygon","lineX","lineY","keep","clear"],YAe=(function(e){ee(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,a){var i,o,l;n.eachComponent({mainType:"brush"},function(s){i=s.brushType,o=s.brushOption.brushMode||"single",l=l||!!s.areas.length}),this._brushType=i,this._brushMode=o,B(r.get("type",!0),function(s){r.setIconStatus(s,(s==="keep"?o==="multiple":s==="clear"?l:s===i)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,a){this.render(r,n,a)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),a={};return B(r.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},t.prototype.onclick=function(r,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:UAe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},t})(_o);function $Ae(e){e.registerComponentView(GAe),e.registerComponentModel(HAe),e.registerPreprocessor(LAe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,PAe),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,r){r.eachComponent({mainType:"brush",query:t},function(n){n.setAreas(t.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ur),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ur),Ih("brush",YAe)}var WAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:re.size.m,backgroundColor:re.color.transparent,borderColor:re.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:re.color.primary},subtextStyle:{fontSize:12,color:re.color.quaternary}},t})(lt),qAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){if(this.group.removeAll(),!!r.get("show")){var i=this.group,o=r.getModel("textStyle"),l=r.getModel("subtextStyle"),s=r.get("textAlign"),c=Ie(r.get("textBaseline"),r.get("textVerticalAlign")),f=new vt({style:Gt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=r.get("subtext"),p=new vt({style:Gt(l,{text:v,fill:l.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),m=r.get("link"),y=r.get("sublink"),x=r.get("triggerEvent",!0);f.silent=!m&&!x,p.silent=!y&&!x,m&&f.on("click",function(){nb(m,"_"+r.get("target"))}),y&&p.on("click",function(){nb(y,"_"+r.get("subtarget"))}),$e(f).eventData=$e(p).eventData=x?{componentType:"title",componentIndex:r.componentIndex}:null,i.add(f),v&&i.add(p);var b=i.getBoundingRect(),w=r.getBoxLayoutParams();w.width=b.width,w.height=b.height;var C=Vr(r,a),A=Qt(w,C.refContainer,r.get("padding"));s||(s=r.get("left")||r.get("right"),s==="middle"&&(s="center"),s==="right"?A.x+=A.width:s==="center"&&(A.x+=A.width/2)),c||(c=r.get("top")||r.get("bottom"),c==="center"&&(c="middle"),c==="bottom"?A.y+=A.height:c==="middle"&&(A.y+=A.height/2),c=c||"top"),i.x=A.x,i.y=A.y,i.markRedraw();var M={align:s,verticalAlign:c};f.setStyle(M),p.setStyle(M),b=i.getBoundingRect();var R=A.margin,E=r.getItemStyle(["color","opacity"]);E.fill=r.get("backgroundColor");var N=new at({shape:{x:b.x-R[3],y:b.y-R[0],width:b.width+R[1]+R[3],height:b.height+R[0]+R[2],r:r.get("borderRadius")},style:E,subPixelOptimize:!0,silent:!0});i.add(N)}},t.type="title",t})(Ht);function XAe(e){e.registerComponentModel(WAe),e.registerComponentView(qAe)}var $4=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode="box",r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),this._initData()},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(r){this.option.autoPlay=!!r},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var r=this.option,n=r.data||[],a=r.axisType,i=this._names=[],o;a==="category"?(o=[],B(n,function(c,f){var h=kr(Id(c),""),v;Ve(c)?(v=je(c),v.value=f):v=f,o.push(v),i.push(h)})):o=n;var l={category:"ordinal",time:"time",value:"number"}[a]||"number",s=this._data=new Ln([{name:"value",type:l}],this);s.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:re.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:re.color.secondary},data:[]},t})(lt),uq=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline.slider",t.defaultOption=Js($4.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:re.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:re.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:re.color.tertiary},itemStyle:{color:re.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:re.color.accent50,borderColor:re.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:re.color.accent50,borderColor:re.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:re.color.accent60},itemStyle:{color:re.color.accent60,borderColor:re.color.accent60},controlStyle:{color:re.color.accent70,borderColor:re.color.accent70}},progress:{lineStyle:{color:re.color.accent30},itemStyle:{color:re.color.accent40}},data:[]}),t})($4);Cr(uq,P_.prototype);var ZAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t})(Ht),KAe=(function(e){ee(t,e);function t(r,n,a,i){var o=e.call(this,r,n,a)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(di),CD=Math.PI,W4=it(),QAe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(r,n){this.api=n},t.prototype.render=function(r,n,a){if(this.model=r,this.api=a,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var i=this._layout(r,a),o=this._createGroup("_mainGroup"),l=this._createGroup("_labelGroup"),s=this._axis=this._createAxis(i,r);r.formatTooltip=function(c){var f=s.scale.getLabel({value:c});return Rr("nameValue",{noName:!0,value:f})},B(["AxisLine","AxisTick","Control","CurrentPointer"],function(c){this["_render"+c](i,o,s,r)},this),this._renderAxisLabel(i,l,s,r),this._position(i,r)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(r,n){var a=r.get(["label","position"]),i=r.get("orient"),o=JAe(r,n),l;a==null||a==="auto"?l=i==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":De(a)?l={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][a]:l=a;var s={horizontal:"center",vertical:l>=0||l==="+"?"left":"right"},c={horizontal:l>=0||l==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:CD/2},h=i==="vertical"?o.height:o.width,v=r.getModel("controlStyle"),p=v.get("show",!0),m=p?v.get("itemSize"):0,y=p?v.get("itemGap"):0,x=m+y,b=r.get(["label","rotate"])||0;b=b*CD/180;var w,C,A,M=v.get("position",!0),R=p&&v.get("showPlayBtn",!0),E=p&&v.get("showPrevBtn",!0),N=p&&v.get("showNextBtn",!0),L=0,O=h;M==="left"||M==="bottom"?(R&&(w=[0,0],L+=x),E&&(C=[L,0],L+=x),N&&(A=[O-m,0],O-=x)):(R&&(w=[O-m,0],O-=x),E&&(C=[0,0],L+=x),N&&(A=[O-m,0],O-=x));var I=[L,O];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:f[i],labelRotation:b,labelPosOpt:l,labelAlign:r.get(["label","align"])||s[i],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||c[i],playPosition:w,prevBtnPosition:C,nextBtnPosition:A,axisExtent:I,controlSize:m,controlGap:y}},t.prototype._position=function(r,n){var a=this._mainGroup,i=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var l=lr(),s=o.x,c=o.y+o.height;Ei(l,l,[-s,-c]),Zs(l,l,-CD/2),Ei(l,l,[s,c]),o=o.clone(),o.applyTransform(l)}var f=w(o),h=w(a.getBoundingRect()),v=w(i.getBoundingRect()),p=[a.x,a.y],m=[i.x,i.y];m[0]=p[0]=f[0][0];var y=r.labelPosOpt;if(y==null||De(y)){var x=y==="+"?0:1;C(p,h,f,1,x),C(m,v,f,1,1-x)}else{var x=y>=0?0:1;C(p,h,f,1,x),m[1]=p[1]+y}a.setPosition(p),i.setPosition(m),a.rotation=i.rotation=r.rotation,b(a),b(i);function b(A){A.originX=f[0][0]-A.x,A.originY=f[1][0]-A.y}function w(A){return[[A.x,A.x+A.width],[A.y,A.y+A.height]]}function C(A,M,R,E,N){A[E]+=R[E][N]-M[E][N]}},t.prototype._createAxis=function(r,n){var a=n.getData(),i=n.get("axisType")||n.get("type");i!=="category"&&i!=="time"&&(i="value");var o=Xd(n,i,!1);o.getTicks=function(){return a.mapArray(["value"],function(c){return{value:c}})};var l=a.getDataExtent("value");o.setExtent(l[0],l[1]),qY(o,{fixMinMax:[!0,!0]});var s=new KAe("value",o,r.axisExtent,i);return s.model=n,s},t.prototype._createGroup=function(r){var n=this[r]=new ze;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var l=new Mr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:he({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(l);var s=this._progressLine=new Mr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Ue({lineCap:"round",lineWidth:l.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(s)}},t.prototype._renderAxisTick=function(r,n,a,i){var o=this,l=i.getData(),s=a.scale.getTicks();this._tickSymbols=[],B(s,function(c){var f=a.dataToCoord(c.value),h=l.getItemModel(c.value),v=h.getModel("itemStyle"),p=h.getModel(["emphasis","itemStyle"]),m=h.getModel(["progress","itemStyle"]),y={x:f,y:0,onclick:Ee(o._changeTimeline,o,c.value)},x=q4(h,v,n,y);x.ensureState("emphasis").style=p.getItemStyle(),x.ensureState("progress").style=m.getItemStyle(),Ls(x);var b=$e(x);h.get("tooltip")?(b.dataIndex=c.value,b.dataModel=i):b.dataIndex=b.dataModel=null,o._tickSymbols.push(x)})},t.prototype._renderAxisLabel=function(r,n,a,i){var o=this,l=a.getLabelModel();if(l.get("show")){var s=i.getData(),c=a.getViewLabels();this._tickLabels=[],B(c,function(f){if(!f.tick.offInterval){var h=f.tick.value,v=s.getItemModel(h),p=v.getModel("label"),m=v.getModel(["emphasis","label"]),y=v.getModel(["progress","label"]),x=a.dataToCoord(h),b=new vt({x,y:0,rotation:r.labelRotation-r.rotation,onclick:Ee(o._changeTimeline,o,h),silent:!1,style:Gt(p,{text:f.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});b.ensureState("emphasis").style=Gt(m),b.ensureState("progress").style=Gt(y),n.add(b),Ls(b),W4(b).dataIndex=h,o._tickLabels.push(b)}})}},t.prototype._renderControl=function(r,n,a,i){var o=r.controlSize,l=r.rotation,s=i.getModel("controlStyle").getItemStyle(),c=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),h=i.get("inverse",!0);v(r.nextBtnPosition,"next",Ee(this._changeTimeline,this,h?"-":"+")),v(r.prevBtnPosition,"prev",Ee(this._changeTimeline,this,h?"+":"-")),v(r.playPosition,f?"stop":"play",Ee(this._handlePlayClick,this,!f),!0);function v(p,m,y,x){if(p){var b=Co(Ie(i.get(["controlStyle",m+"BtnSize"]),o),o),w=[0,-b/2,b,b],C=eDe(i,m+"Icon",w,{x:p[0],y:p[1],originX:o/2,originY:0,rotation:x?-l:0,rectHover:!0,style:s,onclick:y});C.ensureState("emphasis").style=c,n.add(C),Ls(C)}}},t.prototype._renderCurrentPointer=function(r,n,a,i){var o=i.getData(),l=i.getCurrentIndex(),s=o.getItemModel(l).getModel("checkpointStyle"),c=this,f={onCreate:function(h){h.draggable=!0,h.drift=Ee(c._handlePointerDrag,c),h.ondragend=Ee(c._handlePointerDragend,c),X4(h,c._progressLine,l,a,i,!0)},onUpdate:function(h){X4(h,c._progressLine,l,a,i)}};this._currentPointer=q4(s,s,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var a=this._toAxisCoord(r)[0],i=this._axis,o=nn(i.getExtent().slice());a>o[1]&&(a=o[1]),a<o[0]&&(a=o[0]),this._currentPointer.x=a,this._currentPointer.markRedraw();var l=this._progressLine;l&&(l.shape.x2=a,l.dirty());var s=this._findNearestTick(a),c=this.model;(n||s!==c.getCurrentIndex()&&c.get("realtime"))&&this._changeTimeline(s)},t.prototype._doPlayStop=function(){var r=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=r.model;r._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(r){var n=this._mainGroup.getLocalTransform();return Ri(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),a=1/0,i,o=this._axis;return n.each(["value"],function(l,s){var c=o.dataToCoord(l),f=Math.abs(c-r);f<a&&(a=f,i=s)}),i},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(r){var n=this.model.getCurrentIndex();r==="+"?r=n+1:r==="-"&&(r=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:r,from:this.uid})},t.prototype._updateTicksStatus=function(){var r=this.model.getCurrentIndex(),n=this._tickSymbols,a=this._tickLabels;if(n)for(var i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",i<r);if(a)for(var i=0;i<a.length;i++)a&&a[i]&&a[i].toggleState("progress",W4(a[i]).dataIndex<=r)},t.type="timeline.slider",t})(ZAe);function JAe(e,t){return Qt(e.getBoxLayoutParams(),Vr(e,t).refContainer,e.get("padding"))}function eDe(e,t,r,n){var a=n.style,i=Fd(e.get(["controlStyle",t]),n||{},new Fe(r[0],r[1],r[2],r[3]));return a&&i.setStyle(a),i}function q4(e,t,r,n,a,i){var o=t.get("color");if(a)a.setColor(o),r.add(a),i&&i.onUpdate(a);else{var l=e.get("symbol");a=wr(l,-1,-1,2,2,o),a.setStyle("strokeNoScale",!0),r.add(a),i&&i.onCreate(a)}var s=t.getItemStyle(["color"]);a.setStyle(s),n=Je({rectHover:!0,z2:100},n,!0);var c=Wd(e.get("symbolSize"));n.scaleX=c[0]/2,n.scaleY=c[1]/2;var f=ff(e.get("symbolOffset"),c);f&&(n.x=(n.x||0)+f[0],n.y=(n.y||0)+f[1]);var h=e.get("symbolRotate");return n.rotation=(h||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function X4(e,t,r,n,a,i){if(!e.dragging){var o=a.getModel("checkpointStyle"),l=n.dataToCoord(a.getData().get("value",r));if(i||!o.get("animation",!0))e.attr({x:l,y:0}),t&&t.attr({shape:{x2:l}});else{var s={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:l,y:0},s),t&&t.animateTo({shape:{x2:l}},s)}}}function tDe(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var a=r.getComponent("timeline");return a&&t.currentIndex!=null&&(a.setCurrentIndex(t.currentIndex),!a.get("loop",!0)&&a.isIndexMax()&&a.getPlayState()&&(a.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:a.get("replaceMerge",!0)}),Ue({currentIndex:a.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,r){var n=r.getComponent("timeline");n&&t.playState!=null&&n.setPlayState(t.playState)})}function rDe(e){var t=e&&e.timeline;pe(t)||(t=t?[t]:[]),B(t,function(r){r&&nDe(r)})}function nDe(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),Z4(e),cc(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});cc(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!cc(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}B(e.data||[],function(a){Ve(a)&&!pe(a)&&(!cc(a,"value")&&cc(a,"name")&&(a.value=a.name),Z4(a))})}function Z4(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},a=n.normal||(n.normal={}),i={normal:1,emphasis:1};B(n,function(o,l){!i[l]&&!cc(a,l)&&(a[l]=o)}),r.label&&!cc(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function cc(e,t){return e.hasOwnProperty(t)}function aDe(e){e.registerComponentModel(uq),e.registerComponentView(QAe),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),tDe(e),e.registerPreprocessor(rDe)}function HL(e,t){if(!e)return!1;for(var r=pe(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function Ox(e){Lc(e,"label",["show"])}var kx=it(),No=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.createdBySelf=!1,r.preventAutoZ=!0,r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),this._mergeOption(r,a,!1,!0)},t.prototype.isAnimationEnabled=function(){if(ht.node)return!1;var r=this.__hostSeries;return this.getShallow("animation")&&r&&r.isAnimationEnabled()},t.prototype.mergeOption=function(r,n){this._mergeOption(r,n,!1,!1)},t.prototype._mergeOption=function(r,n,a,i){var o=this.mainType;a||n.eachSeries(function(l){var s=l.get(this.mainType,!0),c=kx(l)[o];if(!s||!s.data){kx(l)[o]=null;return}c?c._mergeOption(s,n,!0):(i&&Ox(s),B(s.data,function(f){f instanceof Array?(Ox(f[0]),Ox(f[1])):Ox(f)}),c=this.createMarkerModelFromSeries(s,this,n),he(c,{mainType:this.mainType,seriesIndex:l.seriesIndex,name:l.name,createdBySelf:!0}),c.__hostSeries=l),kx(l)[o]=c},this)},t.prototype.formatTooltip=function(r,n,a){var i=this.getData(),o=this.getRawValue(r),l=i.getName(r);return Rr("section",{header:this.name,blocks:[Rr("nameValue",{name:l,value:o,noName:!l,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(r){this._data=r},t.prototype.getDataParams=function(r,n){var a=P_.prototype.getDataParams.call(this,r,n),i=this.__hostSeries;return i&&(a.seriesId=i.id,a.seriesName=i.name,a.seriesType=i.subType),a},t.getMarkerModelFromSeries=function(r,n){return kx(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(lt);Cr(No,P_.prototype);var iDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,a){return new t(r,n,a)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t})(No);function c2(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function oDe(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function Px(e,t,r,n,a,i,o){var l=[],s=Dl(t,a),c=s?t.getCalculationInfo("stackResultDimension"):a,f=qb(t,c,e),h=t.hostModel,v=h.indicesOfNearest(r,c,f)[0];l[i]=t.get(n,v),l[o]=t.get(c,v);var p=t.get(a,v),m=co(t.get(a,v));return m=Math.min(m,20),m>=0&&(l[o]=+l[o].toFixed(m)),[l,p]}var jx={min:et(Px,"min"),max:et(Px,"max"),average:et(Px,"average"),median:et(Px,"median")};function hm(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,a=n&&n.dimensions;if(!oDe(t)&&!pe(t.coord)&&pe(a)){var i=cq(t,r,n,e);if(t=je(t),t.type&&jx[t.type]&&i.baseAxis&&i.valueAxis){var o=qe(a,i.baseAxis.dim),l=qe(a,i.valueAxis.dim),s=jx[t.type](r,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,l);t.coord=s[0],t.value=s[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!pe(a)){t.coord=[];var c=e.getBaseAxis();if(c&&t.type&&jx[t.type]){var f=n.getOtherAxis(c);f&&(t.value=qb(r,r.mapDimension(f.dim),t.type))}}else for(var h=t.coord,v=0;v<2;v++)jx[h[v]]&&(h[v]=qb(r,r.mapDimension(a[v]),h[v]));return t}}function cq(e,t,r,n){var a={};return e.valueIndex!=null||e.valueDim!=null?(a.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=r.getAxis(lDe(n,a.valueDataDim)),a.baseAxis=r.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=r.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function lDe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function dm(e,t){return e&&e.containData&&t.coord&&!c2(t)?e.containData(t.coord):!0}function sDe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!c2(t)&&!c2(r)?e.containZone(t.coord,r.coord):!0}function fq(e,t){return e?function(r,n,a,i){var o=i<2?r.coord&&r.coord[i]:r.value;return Is(o,t[i])}:function(r,n,a,i){return Is(r.value,t[i])}}function qb(e,t,r){if(r==="average"){var n=0,a=0;return e.each(t,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var TD=it(),UL=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.init=function(){this.markerGroupMap=Le()},t.prototype.render=function(r,n,a){var i=this,o=this.markerGroupMap;o.each(function(l){TD(l).keep=!1}),n.eachSeries(function(l){var s=No.getMarkerModelFromSeries(l,i.type);s&&i.renderSeries(l,s,n,a)}),o.each(function(l){!TD(l).keep&&i.group.remove(l.group)}),uDe(n,o,this.type)},t.prototype.markKeep=function(r){TD(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var a=this;B(r,function(i){var o=No.getMarkerModelFromSeries(i,a.type);if(o){var l=o.getData();l.eachItemGraphicEl(function(s){s&&(n?o8(s):IE(s))})}})},t.type="marker",t})(Ht);function uDe(e,t,r){e.eachSeries(function(n){var a=No.getMarkerModelFromSeries(n,r),i=t.get(n.id);if(a&&i&&i.group){var o=jc(a),l=o.z,s=o.zlevel;N_(i.group,l,s)}})}function K4(e,t,r){var n=t.coordinateSystem,a=r.getWidth(),i=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(l){var s=e.getItemModel(l),c=s.get("relativeTo")==="coordinate",f=c?o?o.width:0:a,h=c?o?o.height:0:i,v=c&&o?o.x:0,p=c&&o?o.y:0,m,y=Re(s.get("x"),f)+v,x=Re(s.get("y"),h)+p;if(!isNaN(y)&&!isNaN(x))m=[y,x];else if(t.getMarkerPosition)m=t.getMarkerPosition(e.getValues(e.dimensions,l));else if(n){var b=e.get(n.dimensions[0],l),w=e.get(n.dimensions[1],l);m=n.dataToPoint([b,w])}isNaN(y)||(m[0]=y),isNaN(x)||(m[1]=x),e.setItemLayout(l,m)})}var cDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,a){n.eachSeries(function(i){var o=No.getMarkerModelFromSeries(i,"markPoint");o&&(K4(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,a,i){var o=r.coordinateSystem,l=r.id,s=r.getData(),c=this.markerGroupMap,f=c.get(l)||c.set(l,new Fm),h=fDe(o,r,n);n.setData(h),K4(n.getData(),r,i),h.each(function(v){var p=h.getItemModel(v),m=p.getShallow("symbol"),y=p.getShallow("symbolSize"),x=p.getShallow("symbolRotate"),b=p.getShallow("symbolOffset"),w=p.getShallow("symbolKeepAspect");if(Be(m)||Be(y)||Be(x)||Be(b)){var C=n.getRawValue(v),A=n.getDataParams(v);Be(m)&&(m=m(C,A)),Be(y)&&(y=y(C,A)),Be(x)&&(x=x(C,A)),Be(b)&&(b=b(C,A))}var M=p.getModel("itemStyle").getItemStyle(),R=p.get("z2"),E=Pm(s,"color");M.fill||(M.fill=E),h.setItemVisual(v,{z2:Ie(R,0),symbol:m,symbolSize:y,symbolRotate:x,symbolOffset:b,symbolKeepAspect:w,style:M})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(p){$e(p).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t})(UL);function fDe(e,t,r){var n;e?n=xe(e&&e.dimensions,function(l){var s=t.getData(),c=s.getDimensionInfo(s.mapDimension(l))||{};return he(he({},c),{name:l,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ln(n,r),i=xe(r.get("data"),et(hm,t));e&&(i=Bt(i,et(dm,e)));var o=fq(!!e,n);return a.initData(i,null,o),a}function hDe(e){e.registerComponentModel(iDe),e.registerComponentView(cDe),e.registerPreprocessor(function(t){HL(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var dDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,a){return new t(r,n,a)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t})(No),Bx=it(),vDe=function(e,t,r,n){var a=e.getData(),i;if(pe(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var l=void 0,s=void 0;if(n.yAxis!=null||n.xAxis!=null)l=t.getAxis(n.yAxis!=null?"y":"x"),s=En(n.yAxis,n.xAxis);else{var c=cq(n,a,t,e);l=c.valueAxis;var f=MN(a,c.valueDataDim);s=qb(a,f,o)}var h=l.dim==="x"?0:1,v=1-h,p=je(n),m={coord:[]};p.type=null,p.coord=[],p.coord[v]=-1/0,m.coord[v]=1/0;var y=r.get("precision");y>=0&&pt(s)&&(s=+s.toFixed(Math.min(y,20))),p.coord[h]=m.coord[h]=s,i=[p,m,{type:o,valueIndex:n.valueIndex,value:s}]}else i=[]}var x=[hm(e,i[0]),hm(e,i[1]),he({},i[2])];return x[2].type=x[2].type||null,Je(x[2],x[0]),Je(x[2],x[1]),x};function Xb(e){return!isNaN(e)&&!isFinite(e)}function Q4(e,t,r,n){var a=1-e,i=n.dimensions[e];return Xb(t[a])&&Xb(r[a])&&t[e]===r[e]&&n.getAxis(i).containData(t[e])}function pDe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(Q4(1,r,n,e)||Q4(0,r,n,e)))return!0}return dm(e,t[0])&&dm(e,t[1])}function AD(e,t,r,n,a){var i=n.coordinateSystem,o=e.getItemModel(t),l,s=Re(o.get("x"),a.getWidth()),c=Re(o.get("y"),a.getHeight());if(!isNaN(s)&&!isNaN(c))l=[s,c];else{if(n.getMarkerPosition)l=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var f=i.dimensions,h=e.get(f[0],t),v=e.get(f[1],t);l=i.dataToPoint([h,v])}if(Uc(i,"cartesian2d")){var p=i.getAxis("x"),m=i.getAxis("y"),f=i.dimensions;Xb(e.get(f[0],t))?l[0]=p.toGlobalCoord(p.getExtent()[r?0:1]):Xb(e.get(f[1],t))&&(l[1]=m.toGlobalCoord(m.getExtent()[r?0:1]))}isNaN(s)||(l[0]=s),isNaN(c)||(l[1]=c)}e.setItemLayout(t,l)}var gDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,a){n.eachSeries(function(i){var o=No.getMarkerModelFromSeries(i,"markLine");if(o){var l=o.getData(),s=Bx(o).from,c=Bx(o).to;s.each(function(f){AD(s,f,!0,i,a),AD(c,f,!1,i,a)}),l.each(function(f){l.setItemLayout(f,[s.getItemLayout(f),c.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,a,i){var o=r.coordinateSystem,l=r.id,s=r.getData(),c=this.markerGroupMap,f=c.get(l)||c.set(l,new sL);this.group.add(f.group);var h=mDe(o,r,n),v=h.from,p=h.to,m=h.line;Bx(n).from=v,Bx(n).to=p,n.setData(m);var y=n.get("symbol"),x=n.get("symbolSize"),b=n.get("symbolRotate"),w=n.get("symbolOffset");pe(y)||(y=[y,y]),pe(x)||(x=[x,x]),pe(b)||(b=[b,b]),pe(w)||(w=[w,w]),h.from.each(function(A){C(v,A,!0),C(p,A,!1)}),m.each(function(A){var M=m.getItemModel(A),R=M.getModel("lineStyle").getLineStyle();m.setItemLayout(A,[v.getItemLayout(A),p.getItemLayout(A)]);var E=M.get("z2");R.stroke==null&&(R.stroke=v.getItemVisual(A,"style").fill),m.setItemVisual(A,{z2:Ie(E,0),fromSymbolKeepAspect:v.getItemVisual(A,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(A,"symbolOffset"),fromSymbolRotate:v.getItemVisual(A,"symbolRotate"),fromSymbolSize:v.getItemVisual(A,"symbolSize"),fromSymbol:v.getItemVisual(A,"symbol"),toSymbolKeepAspect:p.getItemVisual(A,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(A,"symbolOffset"),toSymbolRotate:p.getItemVisual(A,"symbolRotate"),toSymbolSize:p.getItemVisual(A,"symbolSize"),toSymbol:p.getItemVisual(A,"symbol"),style:R})}),f.updateData(m),h.line.eachItemGraphicEl(function(A){$e(A).dataModel=n,A.traverse(function(M){$e(M).dataModel=n})});function C(A,M,R){var E=A.getItemModel(M);AD(A,M,R,r,i);var N=E.getModel("itemStyle").getItemStyle();N.fill==null&&(N.fill=Pm(s,"color")),A.setItemVisual(M,{symbolKeepAspect:E.get("symbolKeepAspect"),symbolOffset:Ie(E.get("symbolOffset",!0),w[R?0:1]),symbolRotate:Ie(E.get("symbolRotate",!0),b[R?0:1]),symbolSize:Ie(E.get("symbolSize"),x[R?0:1]),symbol:Ie(E.get("symbol",!0),y[R?0:1]),style:N})}this.markKeep(f),f.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t})(UL);function mDe(e,t,r){var n;e?n=xe(e&&e.dimensions,function(c){var f=t.getData(),h=f.getDimensionInfo(f.mapDimension(c))||{};return he(he({},h),{name:c,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Ln(n,r),i=new Ln(n,r),o=new Ln([],r),l=xe(r.get("data"),et(vDe,t,e,r));e&&(l=Bt(l,et(pDe,e)));var s=fq(!!e,n);return a.initData(xe(l,function(c){return c[0]}),null,s),i.initData(xe(l,function(c){return c[1]}),null,s),o.initData(xe(l,function(c){return c[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function yDe(e){e.registerComponentModel(dDe),e.registerComponentView(gDe),e.registerPreprocessor(function(t){HL(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var xDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.createMarkerModelFromSeries=function(r,n,a){return new t(r,n,a)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t})(No),zx=it(),SDe=function(e,t,r,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=hm(e,a),l=hm(e,i),s=o.coord,c=l.coord;s[0]=En(s[0],-1/0),s[1]=En(s[1],-1/0),c[0]=En(c[0],1/0),c[1]=En(c[1],1/0);var f=h_([{},o,l]);return f.coord=[o.coord,l.coord],f.x0=o.x,f.y0=o.y,f.x1=l.x,f.y1=l.y,f}};function Zb(e){return!isNaN(e)&&!isFinite(e)}function J4(e,t,r,n){var a=1-e;return Zb(t[a])&&Zb(r[a])}function bDe(e,t){var r=t.coord[0],n=t.coord[1],a={coord:r,x:t.x0,y:t.y0},i={coord:n,x:t.x1,y:t.y1};return Uc(e,"cartesian2d")?r&&n&&(J4(1,r,n)||J4(0,r,n))?!0:sDe(e,a,i):dm(e,a)||dm(e,i)}function eG(e,t,r,n,a){var i=n.coordinateSystem,o=e.getItemModel(t),l,s=Re(o.get(r[0]),a.getWidth()),c=Re(o.get(r[1]),a.getHeight());if(!isNaN(s)&&!isNaN(c))l=[s,c];else{if(n.getMarkerPosition){var f=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),v=i.clampData(f),p=i.clampData(h),m=[];r[0]==="x0"?m[0]=v[0]>p[0]?h[0]:f[0]:m[0]=v[0]>p[0]?f[0]:h[0],r[1]==="y0"?m[1]=v[1]>p[1]?h[1]:f[1]:m[1]=v[1]>p[1]?f[1]:h[1],l=n.getMarkerPosition(m,r,!0)}else{var y=e.get(r[0],t),x=e.get(r[1],t),b=[y,x];i.clampData&&i.clampData(b,b),l=i.dataToPoint(b,!0)}if(Uc(i,"cartesian2d")){var w=i.getAxis("x"),C=i.getAxis("y"),y=e.get(r[0],t),x=e.get(r[1],t);Zb(y)?l[0]=w.toGlobalCoord(w.getExtent()[r[0]==="x0"?0:1]):Zb(x)&&(l[1]=C.toGlobalCoord(C.getExtent()[r[1]==="y0"?0:1]))}isNaN(s)||(l[0]=s),isNaN(c)||(l[1]=c)}return l}var tG=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],_De=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.updateTransform=function(r,n,a){n.eachSeries(function(i){var o=No.getMarkerModelFromSeries(i,"markArea");if(o){var l=o.getData();l.each(function(s){var c=xe(tG,function(h){return eG(l,s,h,i,a)});l.setItemLayout(s,c);var f=l.getItemGraphicEl(s);f.setShape("points",c)})}},this)},t.prototype.renderSeries=function(r,n,a,i){var o=r.coordinateSystem,l=r.id,s=r.getData(),c=this.markerGroupMap,f=c.get(l)||c.set(l,{group:new ze});this.group.add(f.group),this.markKeep(f);var h=wDe(o,r,n);n.setData(h),h.each(function(v){var p=xe(tG,function(O){return eG(h,v,O,r,i)}),m=o.getAxis("x").scale,y=o.getAxis("y").scale,x=m.getExtent(),b=y.getExtent(),w=[m.parse(h.get("x0",v)),m.parse(h.get("x1",v))],C=[y.parse(h.get("y0",v)),y.parse(h.get("y1",v))];nn(w),nn(C);var A=!(x[0]>w[1]||x[1]<w[0]||b[0]>C[1]||b[1]<C[0]),M=!A;h.setItemLayout(v,{points:p,allClipped:M});var R=h.getItemModel(v),E=R.getModel("itemStyle").getItemStyle(),N=R.get("z2"),L=Pm(s,"color");E.fill||(E.fill=L,De(E.fill)&&(E.fill=Lg(E.fill,.4))),E.stroke||(E.stroke=L),h.setItemVisual(v,"style",E),h.setItemVisual(v,"z2",Ie(N,0))}),h.diff(zx(f).data).add(function(v){var p=h.getItemLayout(v),m=h.getItemVisual(v,"z2");if(!p.allClipped){var y=new Xn({z2:Ie(m,0),shape:{points:p.points}});h.setItemGraphicEl(v,y),f.group.add(y)}}).update(function(v,p){var m=zx(f).data.getItemGraphicEl(p),y=h.getItemLayout(v),x=h.getItemVisual(v,"z2");y.allClipped?m&&f.group.remove(m):(m?_t(m,{z2:Ie(x,0),shape:{points:y.points}},n,v):m=new Xn({shape:{points:y.points}}),h.setItemGraphicEl(v,m),f.group.add(m))}).remove(function(v){var p=zx(f).data.getItemGraphicEl(v);f.group.remove(p)}).execute(),h.eachItemGraphicEl(function(v,p){var m=h.getItemModel(p),y=h.getItemVisual(p,"style");v.useStyle(h.getItemVisual(p,"style")),Wr(v,Br(m),{labelFetcher:n,labelDataIndex:p,defaultText:h.getName(p)||"",inheritColor:De(y.fill)?Lg(y.fill,1):re.color.neutral99}),jr(v,m),er(v,null,null,m.get(["emphasis","disabled"])),$e(v).dataModel=n}),zx(f).data=h,f.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t})(UL);function wDe(e,t,r){var n,a,i=["x0","y0","x1","y1"];if(e){var o=xe(e&&e.dimensions,function(c){var f=t.getData(),h=f.getDimensionInfo(f.mapDimension(c))||{};return he(he({},h),{name:c,ordinalMeta:null})});a=xe(i,function(c,f){return{name:c,type:o[f%2].type}}),n=new Ln(a,r)}else a=[{name:"value",type:"float"}],n=new Ln(a,r);var l=xe(r.get("data"),et(SDe,t,e,r));e&&(l=Bt(l,et(bDe,e)));var s=e?function(c,f,h,v){var p=c.coord[Math.floor(v/2)][v%2];return Is(p,a[v])}:function(c,f,h,v){return Is(c.value,a[v])};return n.initData(l,null,s),n.hasItemOption=!0,n}function CDe(e){e.registerComponentModel(xDe),e.registerComponentView(_De),e.registerPreprocessor(function(t){HL(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var TDe=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},f2=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.layoutMode={type:"box",ignoreSize:!0},r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a),r.selected=r.selected||{},this._updateSelector(r)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),this._updateSelector(r)},t.prototype._updateSelector=function(r){var n=r.selector,a=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),pe(n)&&B(n,function(i,o){De(i)&&(i={type:i}),n[o]=Je(i,TDe(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<r.length;a++){var i=r[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],a=[];r.eachRawSeries(function(s){var c=s.name;a.push(c);var f;if(s.legendVisualProvider){var h=s.legendVisualProvider,v=h.getAllNames();r.isSeriesFiltered(s)||(a=a.concat(v)),v.length?n=n.concat(v):f=!0}else f=!0;f&&wE(s)&&n.push(s.name)}),this._availableNames=a;var i=this.get("data")||n,o=Le(),l=xe(i,function(s){return(De(s)||pt(s))&&(s={name:s}),o.get(s.name)?null:(o.set(s.name,!0),new ct(s,this,this.ecModel))},this);this._data=Bt(l,function(s){return!!s})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;B(i,function(o){n[o.get("name")]=!1})}n[r]=!0},t.prototype.unSelect=function(r){this.get("selectedMode")!=="single"&&(this.option.selected[r]=!1)},t.prototype.toggleSelected=function(r){var n=this.option.selected;n.hasOwnProperty(r)||(n[r]=!0),this[n[r]?"unSelect":"select"](r)},t.prototype.allSelect=function(){var r=this._data,n=this.option.selected;B(r,function(a){n[a.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;B(r,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&qe(this._availableNames,r)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:re.size.m,align:"auto",backgroundColor:re.color.transparent,borderColor:re.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:re.color.disabled,inactiveBorderColor:re.color.disabled,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:re.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:re.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:re.color.tertiary,borderWidth:1,borderColor:re.color.border},emphasis:{selectorLabel:{show:!0,color:re.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(lt),Rh=et,h2=B,Vx=ze,hq=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!1,r}return t.prototype.init=function(){this.group.add(this._contentGroup=new Vx),this.group.add(this._selectorGroup=new Vx),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),l=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&l==="vertical"?"right":"left");var s=r.get("selector",!0),c=r.get("selectorPosition",!0);s&&(!c||c==="auto")&&(c=l==="horizontal"?"end":"start"),this.renderInner(o,r,n,a,s,l,c);var f=Vr(r,a).refContainer,h=r.getBoxLayoutParams(),v=r.get("padding"),p=Qt(h,f,v),m=this.layoutInner(r,o,p,i,s,c),y=Qt(Ue({width:m.width,height:m.height},h),f,v);this.group.x=y.x-m.x,this.group.y=y.y-m.y,this.group.markRedraw(),this.group.add(this._backgroundEl=eq(m,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,a,i,o,l,s){var c=this.getContentGroup(),f=Le(),h=n.get("selectedMode"),v=n.get("triggerEvent"),p=[];a.eachRawSeries(function(m){!m.get("legendHoverLink")&&p.push(m.id)}),h2(n.getData(),function(m,y){var x=this,b=m.get("name");if(!this.newlineDisabled&&(b===""||b===`
70
+ `)){var w=new Vx;w.newline=!0,c.add(w);return}var C=a.getSeriesByName(b)[0];if(!f.get(b))if(C){var A=C.getData(),M=A.getVisual("legendLineStyle")||{},R=A.getVisual("legendIcon"),E=A.getVisual("style"),N=this._createItem(C,b,y,m,n,r,M,E,R,h,i);N.on("click",Rh(rG,b,null,i,p)).on("mouseover",Rh(d2,C.name,null,i,p)).on("mouseout",Rh(v2,C.name,null,i,p)),a.ssr&&N.eachChild(function(L){var O=$e(L);O.seriesIndex=C.seriesIndex,O.dataIndex=y,O.ssrType="legend"}),v&&N.eachChild(function(L){x.packEventData(L,n,C,y,b)}),f.set(b,!0)}else a.eachRawSeries(function(L){var O=this;if(!f.get(b)&&L.legendVisualProvider){var I=L.legendVisualProvider;if(!I.containName(b))return;var z=I.indexOfName(b),V=I.getItemVisual(z,"style"),Y=I.getItemVisual(z,"legendIcon"),H=Nn(V.fill);H&&H[3]===0&&(H[3]=.2,V=he(he({},V),{fill:ti(H,"rgba")}));var F=this._createItem(L,b,y,m,n,r,{},V,Y,h,i);F.on("click",Rh(rG,null,b,i,p)).on("mouseover",Rh(d2,null,b,i,p)).on("mouseout",Rh(v2,null,b,i,p)),a.ssr&&F.eachChild(function(X){var P=$e(X);P.seriesIndex=L.seriesIndex,P.dataIndex=y,P.ssrType="legend"}),v&&F.eachChild(function(X){O.packEventData(X,n,L,y,b)}),f.set(b,!0)}},this)},this),o&&this._createSelector(o,n,i,l,s)},t.prototype.packEventData=function(r,n,a,i,o){var l={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};$e(r).eventData=l},t.prototype._createSelector=function(r,n,a,i,o){var l=this.getSelectorGroup();h2(r,function(c){var f=c.type,h=new vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});l.add(h);var v=n.getModel("selectorLabel"),p=n.getModel(["emphasis","selectorLabel"]);Wr(h,{normal:v,emphasis:p},{defaultText:c.title}),Ls(h)})},t.prototype._createItem=function(r,n,a,i,o,l,s,c,f,h,v){var p=r.visualDrawType,m=o.get("itemWidth"),y=o.get("itemHeight"),x=o.isSelected(n),b=i.get("symbolRotate"),w=i.get("symbolKeepAspect"),C=i.get("icon");f=C||f||"roundRect";var A=ADe(f,i,s,c,p,x,v),M=new Vx,R=i.getModel("textStyle");if(Be(r.getLegendIcon)&&(!C||C==="inherit"))M.add(r.getLegendIcon({itemWidth:m,itemHeight:y,icon:f,iconRotate:b,itemStyle:A.itemStyle,lineStyle:A.lineStyle,symbolKeepAspect:w}));else{var E=C==="inherit"&&r.getData().getVisual("symbol")?b==="inherit"?r.getData().getVisual("symbolRotate"):b:0;M.add(DDe({itemWidth:m,itemHeight:y,icon:f,iconRotate:E,itemStyle:A.itemStyle,symbolKeepAspect:w}))}var N=l==="left"?m+5:-5,L=l,O=o.get("formatter"),I=n;De(O)&&O?I=O.replace("{name}",n??""):Be(O)&&(I=O(n));var z=x?R.getTextColor():i.get("inactiveColor");M.add(new vt({style:Gt(R,{text:I,x:N,y:y/2,fill:z,align:L,verticalAlign:"middle"},{inheritColor:z})}));var V=new at({shape:M.getBoundingRect(),style:{fill:"transparent"}}),Y=i.getModel("tooltip");return Y.get("show")&&Nl({el:V,componentModel:o,itemName:n,itemTooltipOption:Y.option}),M.add(V),M.eachChild(function(H){H.silent=!0}),V.silent=!h,this.getContentGroup().add(M),Ls(M),M.__legendDataIndex=a,M},t.prototype.layoutInner=function(r,n,a,i,o,l){var s=this.getContentGroup(),c=this.getSelectorGroup();Cc(r.get("orient"),s,r.get("itemGap"),a.width,a.height);var f=s.getBoundingRect(),h=[-f.x,-f.y];if(c.markRedraw(),s.markRedraw(),o){Cc("horizontal",c,r.get("selectorItemGap",!0));var v=c.getBoundingRect(),p=[-v.x,-v.y],m=r.get("selectorButtonGap",!0),y=r.getOrient().index,x=y===0?"width":"height",b=y===0?"height":"width",w=y===0?"y":"x";l==="end"?p[y]+=f[x]+m:h[y]+=v[x]+m,p[1-y]+=f[b]/2-v[b]/2,c.x=p[0],c.y=p[1],s.x=h[0],s.y=h[1];var C={x:0,y:0};return C[x]=f[x]+m+v[x],C[b]=Math.max(f[b],v[b]),C[w]=Math.min(0,v[w]+p[1-y]),C}else return s.x=h[0],s.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Ht);function ADe(e,t,r,n,a,i,o){function l(x,b){x.lineWidth==="auto"&&(x.lineWidth=b.lineWidth>0?2:0),h2(x,function(w,C){x[C]==="inherit"&&(x[C]=b[C])})}var s=t.getModel("itemStyle"),c=s.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=s.getShallow("decal");c.decal=!h||h==="inherit"?n.decal:vd(h,o),c.fill==="inherit"&&(c.fill=n[a]),c.stroke==="inherit"&&(c.stroke=n[f]),c.opacity==="inherit"&&(c.opacity=(a==="fill"?n:r).opacity),l(c,n);var v=t.getModel("lineStyle"),p=v.getLineStyle();if(l(p,r),c.fill==="auto"&&(c.fill=n.fill),c.stroke==="auto"&&(c.stroke=n.fill),p.stroke==="auto"&&(p.stroke=n.fill),!i){var m=t.get("inactiveBorderWidth"),y=c[f];c.lineWidth=m==="auto"?n.lineWidth>0&&y?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),p.stroke=v.get("inactiveColor"),p.lineWidth=v.get("inactiveWidth")}return{itemStyle:c,lineStyle:p}}function DDe(e){var t=e.icon||"roundRect",r=wr(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=re.color.neutral00,r.style.lineWidth=2),r}function rG(e,t,r,n){v2(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),d2(e,t,r,n)}function d2(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function v2(e,t,r,n){r.usingTHL()||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function Pp(e,t,r){var n=e==="allSelect"||e==="inverseSelect",a={},i=[];r.eachComponent({mainType:"legend",query:t},function(l){n?l[e]():l[e](t.name),nG(l,a),i.push(l.componentIndex)});var o={};return r.eachComponent("legend",function(l){B(a,function(s,c){l[s?"select":"unSelect"](c)}),nG(l,o)}),n?{selected:o,legendIndex:i}:{name:t.name,selected:o}}function nG(e,t){var r=t||{};return B(e.getData(),function(n){var a=n.get("name");if(!(a===`
71
+ `||a==="")){var i=e.isSelected(a);Ne(r,a)?r[a]=r[a]&&i:r[a]=i}}),r}function MDe(e){e.registerAction("legendToggleSelect","legendselectchanged",et(Pp,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",et(Pp,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",et(Pp,"inverseSelect")),e.registerAction("legendSelect","legendselected",et(Pp,"select")),e.registerAction("legendUnSelect","legendunselected",et(Pp,"unSelect"))}var RDe=Dm(EDe);function EDe(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(r){for(var n=0;n<t.length;n++)if(!t[n].isSelected(r.name))return!1;return!0})}function YL(e){e.registerComponentModel(f2),e.registerComponentView(hq),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,RDe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),MDe(e)}var NDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,a){var i=cf(r);e.prototype.init.call(this,r,n,a),aG(this,r,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),aG(this,this.option,r)},t.type="legend.scroll",t.defaultOption=Js(f2.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:re.color.accent50,pageIconInactiveColor:re.color.accent10,pageIconSize:15,pageTextStyle:{color:re.color.tertiary},animationDurationUpdate:800}),t})(f2);function aG(e,t,r){var n=e.getOrient(),a=[1,1];a[n.index]=0,Mo(t,r,{type:"box",ignoreSize:!!a})}var iG=ze,DD=["width","height"],MD=["x","y"],LDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new iG),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new iG)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,a,i,o,l,s){var c=this;e.prototype.renderInner.call(this,r,n,a,i,o,l,s);var f=this._controllerGroup,h=n.get("pageIconSize",!0),v=pe(h)?h:[h,h];m("pagePrev",0);var p=n.getModel("pageTextStyle");f.add(new vt({name:"pageText",style:{text:"xx/xx",fill:p.getTextColor(),font:p.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),m("pageNext",1);function m(y,x){var b=y+"DataIndex",w=Fd(n.get("pageIcons",!0)[n.getOrient().name][x],{onclick:Ee(c._pageGo,c,b,n,i)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});w.name=y,f.add(w)}},t.prototype.layoutInner=function(r,n,a,i,o,l){var s=this.getSelectorGroup(),c=r.getOrient().index,f=DD[c],h=MD[c],v=DD[1-c],p=MD[1-c];o&&Cc("horizontal",s,r.get("selectorItemGap",!0));var m=r.get("selectorButtonGap",!0),y=s.getBoundingRect(),x=[-y.x,-y.y],b=je(a);o&&(b[f]=a[f]-y[f]-m);var w=this._layoutContentAndController(r,i,b,c,f,v,p,h);if(o){if(l==="end")x[c]+=w[f]+m;else{var C=y[f]+m;x[c]-=C,w[h]-=C}w[f]+=y[f]+m,x[1-c]+=w[p]+w[v]/2-y[v]/2,w[v]=Math.max(w[v],y[v]),w[p]=Math.min(w[p],y[p]+x[1-c]),s.x=x[0],s.y=x[1],s.markRedraw()}return w},t.prototype._layoutContentAndController=function(r,n,a,i,o,l,s,c){var f=this.getContentGroup(),h=this._containerGroup,v=this._controllerGroup;Cc(r.get("orient"),f,r.get("itemGap"),i?a.width:null,i?null:a.height),Cc("horizontal",v,r.get("pageButtonItemGap",!0));var p=f.getBoundingRect(),m=v.getBoundingRect(),y=this._showController=p[o]>a[o],x=[-p.x,-p.y];n||(x[i]=f[c]);var b=[0,0],w=[-m.x,-m.y],C=Ie(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(y){var A=r.get("pageButtonPosition",!0);A==="end"?w[i]+=a[o]-m[o]:b[i]+=m[o]+C}w[1-i]+=p[l]/2-m[l]/2,f.setPosition(x),h.setPosition(b),v.setPosition(w);var M={x:0,y:0};if(M[o]=y?a[o]:p[o],M[l]=Math.max(p[l],m[l]),M[s]=Math.min(0,m[s]+w[1-i]),h.__rectSize=a[o],y){var R={x:0,y:0};R[o]=Math.max(a[o]-m[o]-C,0),R[l]=M[l],h.setClipPath(new at({shape:R})),h.__rectSize=R[o]}else v.eachChild(function(N){N.attr({invisible:!0,silent:!0})});var E=this._getPageInfo(r);return E.pageIndex!=null&&_t(f,{x:E.contentPosition[0],y:E.contentPosition[1]},y?r:null),this._updatePageInfoView(r,E),M},t.prototype._pageGo=function(r,n,a){var i=this._getPageInfo(n)[r];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var a=this._controllerGroup;B(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=n[h]!=null,p=a.childOfName(f);p&&(p.setStyle("fill",v?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),p.cursor=v?"pointer":"default")});var i=a.childOfName("pageText"),o=r.get("pageFormatter"),l=n.pageIndex,s=l!=null?l+1:0,c=n.pageCount;i&&o&&i.setStyle("text",De(o)?o.replace("{current}",s==null?"":s+"").replace("{total}",c==null?"":c+""):o({current:s,total:c}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=r.getOrient().index,l=DD[o],s=MD[o],c=this._findTargetItemIndex(n),f=a.children(),h=f[c],v=f.length,p=v?1:0,m={contentPosition:[a.x,a.y],pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return m;var y=A(h);m.contentPosition[o]=-y.s;for(var x=c+1,b=y,w=y,C=null;x<=v;++x)C=A(f[x]),(!C&&w.e>b.s+i||C&&!M(C,b.s))&&(w.i>b.i?b=w:b=C,b&&(m.pageNextDataIndex==null&&(m.pageNextDataIndex=b.i),++m.pageCount)),w=C;for(var x=c-1,b=y,w=y,C=null;x>=-1;--x)C=A(f[x]),(!C||!M(w,C.s))&&b.i<w.i&&(w=b,m.pagePrevDataIndex==null&&(m.pagePrevDataIndex=b.i),++m.pageCount,++m.pageIndex),b=C;return m;function A(R){if(R){var E=R.getBoundingRect(),N=E[s]+R[s];return{s:N,e:N+E[l],i:R.__legendDataIndex}}}function M(R,E){return R.e>=E&&R.s<=E+i}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,l){var s=o.__legendDataIndex;i==null&&s!=null&&(i=l),s===r&&(n=l)}),n??i},t.type="legend.scroll",t})(hq);function IDe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function dq(e){qr(YL),e.registerComponentModel(NDe),e.registerComponentView(LDe),IDe(e)}function ODe(e){qr(YL),qr(dq)}var kDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.inside",t.defaultOption=Js(fm.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(fm),$L=it();function PDe(e,t,r){$L(e).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(t.uid);a&&(a.getRange=r)})}function jDe(e,t){for(var r=$L(e).coordSysRecordMap,n=r.keys(),a=0;a<n.length;a++){var i=n[a],o=r.get(i),l=o.dataZoomInfoMap;if(l){var s=t.uid,c=l.get(s);c&&(l.removeKey(s),l.keys().length||vq(r,o))}}}function vq(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function BDe(e,t){var r={model:t,containsPoint:et(VDe,t),dispatchAction:et(zDe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new pf(e.getZr());return B(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];r.dataZoomInfoMap.each(function(l){if(i.isAvailableBehavior(l.model.option)){var s=(l.getRange||{})[a],c=s&&s(l.dzReferCoordSysInfo,r.model.mainType,r.controller,i);!l.model.get("disabled",!0)&&c&&o.push({dataZoomId:l.model.id,start:c[0],end:c[1]})}}),o.length&&r.dispatchAction(o)})}),r}function zDe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function VDe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function FDe(e,t,r){var n,a="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,l,s;return e.each(function(c){var f=c.model,h=f.get("disabled",!0)?!1:f.get("zoomLock",!0)?"move":!0;i[a+h]>i[a+n]&&(n=h),o=o&&f.get("preventDefaultMouseMove",!0),l=Ie(f.get("cursorGrab",!0),l),s=Ie(f.get("cursorGrabbing",!0),s)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:l,cursorGrabbing:s}}}function GDe(e){e.registerUpdateLifecycle("coordsys:aftercreate",function(t,r){var n=$L(r),a=n.coordSysRecordMap||(n.coordSysRecordMap=Le());a.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=XW(i);B(o.infoList,function(l){var s=l.model.uid,c=a.get(s)||a.set(s,BDe(r,l.model)),f=c.dataZoomInfoMap||(c.dataZoomInfoMap=Le());f.set(i.uid,{dzReferCoordSysInfo:l,model:i,getRange:null})})}),a.each(function(i){var o=i.controller,l,s=i.dataZoomInfoMap;if(s){var c=s.keys()[0];c!=null&&(l=s.get(c))}if(!l){vq(a,i);return}var f=FDe(s,i,r);o.enable(f.controlType,f.opt),Yd(i,"dispatchAction",l.model.get("throttle",!0),"fixRate")})})}var HDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return t.prototype.render=function(r,n,a){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),PDe(a,r,{pan:Ee(RD.pan,this),zoom:Ee(RD.zoom,this),scrollMove:Ee(RD.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){jDe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(jL),RD={zoom:function(e,t,r,n){var a=this.range,i=a.slice(),o=e.axisModels[0];if(o){var l=ED[t](null,[n.originX,n.originY],o,r,e),s=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(i[1]-i[0])+i[0],c=Math.max(1/n.scale,0);i[0]=(i[0]-s)*c+s,i[1]=(i[1]-s)*c+s;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Hs(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:oG(function(e,t,r,n,a,i){var o=ED[n]([i.oldX,i.oldY],[i.newX,i.newY],t,a,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:oG(function(e,t,r,n,a,i){var o=ED[n]([0,0],[i.scrollDelta,i.scrollDelta],t,a,r);return o.signal*(e[1]-e[0])*i.scrollDelta})};function oG(e){return function(t,r,n,a){var i=this.range,o=i.slice(),l=t.axisModels[0];if(l){var s=e(o,l,t,r,n,a);if(Hs(s,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var ED={grid:function(e,t,r,n,a){var i=r.axis,o={},l=a.model.coordinateSystem.getRect();return e=e||[0,0],i.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=l.width,o.pixelStart=l.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l.height,o.pixelStart=l.y,o.signal=i.inverse?-1:1),o},polar:function(e,t,r,n,a){var i=r.axis,o={},l=a.model.coordinateSystem,s=l.getRadiusAxis().getExtent(),c=l.getAngleAxis().getExtent();return e=e?l.pointToCoord(e):[0,0],t=l.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=s[1]-s[0],o.pixelStart=s[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=i.inverse?-1:1),o},singleAxis:function(e,t,r,n,a){var i=r.axis,o=a.model.coordinateSystem.getRect(),l={};return e=e||[0,0],i.orient==="horizontal"?(l.pixel=t[0]-e[0],l.pixelLength=o.width,l.pixelStart=o.x,l.signal=i.inverse?1:-1):(l.pixel=t[1]-e[1],l.pixelLength=o.height,l.pixelStart=o.y,l.signal=i.inverse?-1:1),l}};function pq(e){BL(e),e.registerComponentModel(kDe),e.registerComponentView(HDe),GDe(e)}var UDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Js(fm.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:re.color.accent10,borderRadius:0,backgroundColor:re.color.transparent,dataBackground:{lineStyle:{color:re.color.accent30,width:.5},areaStyle:{color:re.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:re.color.accent40,width:.5},areaStyle:{color:re.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:re.color.neutral00,borderColor:re.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:re.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:re.color.tertiary},brushSelect:!0,brushStyle:{color:re.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:re.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(fm),jp=at,YDe=1,ND=30,$De=7,Bp="horizontal",lG="vertical",WDe=5,qDe=["line","bar","candlestick","scatter"],XDe={easing:"cubicOut",duration:100,delay:0},ZDe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._displayables={},r}return t.prototype.init=function(r,n){this.api=n,this._onBrush=Ee(this._onBrush,this),this._onBrushEnd=Ee(this._onBrushEnd,this)},t.prototype.render=function(r,n,a,i){if(e.prototype.render.apply(this,arguments),Yd(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ug(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new ze;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,a=r.get("brushSelect"),i=a?$De:0,o=Vr(r,n).refContainer,l=this._findCoordRect(),s=r.get("defaultLocationEdgeGap",!0)||0,c=this._orient===Bp?{right:o.width-l.x-l.width,top:o.height-ND-s-i,width:l.width,height:ND}:{right:s,top:l.y,width:ND,height:l.height},f=cf(r.option);B(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=c[v])});var h=Qt(f,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===lG&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),l=this._displayables.sliderGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(a===Bp&&!o?{scaleY:s?1:-1,scaleX:1}:a===Bp&&o?{scaleY:s?1:-1,scaleX:-1}:a===lG&&!o?{scaleY:s?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:s?-1:1,scaleX:-1,rotation:Math.PI/2});var c=r.getBoundingRect([l]),f=isNaN(c.x)?0:c.x,h=isNaN(c.y)?0:c.y;r.x=n.x-f,r.y=n.y-h,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=r.get("brushSelect");a.add(new jp({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new jp({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Ee(this._onClickPanel,this)}),l=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),a.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,a=this._shadowSize||[],i=r.series,o=i.getRawData(),l=i.getShadowDim&&i.getShadowDim(),s=l&&o.getDimensionInfo(l)?i.getShadowDim():r.otherDim;if(s==null)return;var c=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||s!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var h=o.getDataExtent(r.thisDim),v=o.getDataExtent(s),p=(v[1]-v[0])*.3;v=[v[0]-p,v[1]+p];var m=[0,n[1]],y=[0,n[0]],x=[[n[0],0],[0,0]],b=[],w=y[1]/Math.max(1,o.count()-1),C=n[0]/(h[1]-h[0]),A=r.thisAxis.type==="time",M=-w,R=Math.round(o.count()/n[0]),E;o.each([r.thisDim,s],function(z,V,Y){if(R>0&&Y%R){A||(M+=w);return}M=A?(+z-h[0])*C:M+w;var H=V==null||isNaN(V)||V==="",F=H?0:St(V,v,m,!0);H&&!E&&Y?(x.push([x[x.length-1][0],0]),b.push([b[b.length-1][0],0])):!H&&E&&(x.push([M,0]),b.push([M,0])),H||(x.push([M,F]),b.push([M,F])),E=H}),c=this._shadowPolygonPts=x,f=this._shadowPolylinePts=b}this._shadowData=o,this._shadowDim=s,this._shadowSize=[n[0],n[1]];var N=this.dataZoomModel;function L(z){var V=N.getModel(z?"selectedDataBackground":"dataBackground"),Y=new ze,H=new Xn({shape:{points:c},segmentIgnoreThreshold:1,style:V.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new On({shape:{points:f},segmentIgnoreThreshold:1,style:V.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return Y.add(H),Y.add(F),Y}for(var O=0;O<3;O++){var I=L(O===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return r.eachTargetAxis(function(o,l){var s=r.getAxisProxy(o,l).getTargetSeriesModels();B(s,function(c){if(!a&&!(n!==!0&&qe(qDe,c.get("type"))<0)){var f=i.getComponent(Ds(o),l).axis,h=KDe(o),v,p=c.coordinateSystem;h!=null&&p.getOtherAxis&&(v=p.getOtherAxis(f).inverse),h=c.getData().mapDimension(h);var m=c.getData().mapDimension(o);a={thisAxis:f,series:c,thisDim:m,otherDim:h,otherAxisInverse:v}}},this)},this),a}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,l=this._size,s=this.dataZoomModel,c=this.api,f=s.get("borderRadius")||0,h=s.get("brushSelect"),v=n.filler=new jp({silent:h,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new jp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:f},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:YDe,fill:re.color.transparent}})),B([0,1],function(C){var A=s.get("handleIcon");!ob[A]&&A.indexOf("path://")<0&&A.indexOf("image://")<0&&(A="path://"+A);var M=wr(A,-1,0,2,2,null,!0);M.attr({cursor:QDe(this._orient),draggable:!0,drift:Ee(this._onDragMove,this,C),ondragend:Ee(this._onDragEnd,this),onmouseover:Ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:Ee(this._onOverDataInfoTriggerArea,this,!1),z2:5});var R=M.getBoundingRect(),E=s.get("handleSize");this._handleHeight=Re(E,this._size[1]),this._handleWidth=R.width/R.height*this._handleHeight,M.setStyle(s.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),Ls(M);var N=s.get("handleColor");N!=null&&(M.style.fill=N),o.add(a[C]=M);var L=s.getModel("textStyle"),O=s.get("handleLabel")||{},I=O.show||!1;r.add(i[C]=new vt({silent:!0,invisible:!I,style:Gt(L,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:L.getTextColor(),font:L.getFont()}),z2:10}))},this);var p=v;if(h){var m=Re(s.get("moveHandleSize"),l[1]),y=n.moveHandle=new at({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:m}}),x=m*.8,b=n.moveHandleIcon=wr(s.get("moveHandleIcon"),-x/2,-x/2,x,x,re.color.neutral00,!0);b.silent=!0,b.y=l[1]+m/2-.5,y.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var w=Math.min(l[1]/2,Math.max(m,10));p=n.moveZone=new at({invisible:!0,shape:{y:l[1]-w,height:m+w}}),p.on("mouseover",function(){c.enterEmphasis(y)}).on("mouseout",function(){c.leaveEmphasis(y)}),o.add(y),o.add(b),o.add(p)}p.attr({draggable:!0,cursor:"grab",drift:Ee(this._onActualMoveZoneDrift,this),ondragstart:Ee(this._onActualMoveZoneDragStart,this),ondragend:Ee(this._onActualMoveZoneDragEnd,this),onmouseover:Ee(this._onOverDataInfoTriggerArea,this,!0),onmouseout:Ee(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[St(r[0],[0,100],n,!0),St(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),l=a.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];Hs(n,i,o,a.get("zoomLock")?"all":r,l.minSpan!=null?St(l.minSpan,s,o,!0):null,l.maxSpan!=null?St(l.maxSpan,s,o,!0):null);var c=this._range,f=this._range=nn([St(i[0],o,s,!0),St(i[1],o,s,!0)]);return!c||c[0]!==f[0]||c[1]!==f[1]},t.prototype._updateView=function(r){var n=this._displayables,a=this._handleEnds,i=nn(a.slice()),o=this._size;B([0,1],function(p){var m=n.handles[p],y=this._handleHeight;m.attr({scaleX:y/2,scaleY:y/2,x:a[p]+(p?-1:1),y:o[1]/2-y/2})},this),n.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var l={x:i[0],width:i[1]-i[0]};n.moveHandle&&(n.moveHandle.setShape(l),n.moveZone.setShape(l),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",l.x+l.width/2));for(var s=n.dataShadowSegs,c=[0,i[0],i[1],o[0]],f=0;f<s.length;f++){var h=s[f],v=h.getClipPath();v||(v=new at,h.setClipPath(v)),v.setShape({x:c[f],y:0,width:c[f+1]-c[f],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,a=this._displayables,i=a.handleLabels,o=this._orient,l=["",""];if(n.get("showDetail")){var s=n.findRepresentativeAxisProxy(),c=s.getAxisModel().axis.scale;if(s){var f=this._range,h;if(r){var v={start:f[0],end:f[1]},p=KW(n,s);if(p){var m=p.calculateDataWindow(v).percentInverted;v={start:m[0],end:m[1]}}h=s.calculateDataWindow(v)}else h=s.getWindow();l=[sG(n,0,h,c),sG(n,1,h,c)]}}var y=nn(this._handleEnds.slice());x.call(this,0),x.call(this,1);function x(b){var w=wc(a.handles[b].parent,this.group),C=E_(b===0?"right":"left",w),A=this._handleWidth/2+WDe,M=Ri([y[b]+(b===0?-A:A),this._size[1]/2],w);i[b].setStyle({x:M[0],y:M[1],verticalAlign:o===Bp?"middle":C,align:o===Bp?C:"center",text:l[b]})}},t.prototype._onOverDataInfoTriggerArea=function(r){this._isOverDataInfoTriggerArea=r,this._showDataInfo(r)},t.prototype._showDataInfo=function(r){var n=this.dataZoomModel.get("handleLabel")||{},a=n.show||!1,i=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=i.get("show")||!1,l=r||this._dragging?o:a,s=this._displayables,c=s.handleLabels;c[0].attr("invisible",!l),c[1].attr("invisible",!l),s.moveHandle&&this.api[l?"enterEmphasis":"leaveEmphasis"](s.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(r,n,a){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",r,n,a)},t.prototype._onActualMoveZoneDragStart=function(r){r.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(r){r.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(r,n,a,i){this._dragging=!0,_l(i.event);var o=this._displayables.sliderGroup.getLocalTransform(),l=Ri([n,a],o,!0),s=this._updateInterval(r,l[0]),c=this.dataZoomModel.get("realtime");this._updateView(!c),s&&c&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,a=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(a[0]<0||a[0]>n[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,l=this._updateInterval("all",a[0]-o);this._updateView(),l&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,a=r.offsetY;this._brushStart=new Qe(n,a),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),l=[0,100],s=this._handleEnds=[a.x,a.x+a.width],c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Hs(0,s,o,0,c.minSpan!=null?St(c.minSpan,l,o,!0):null,c.maxSpan!=null?St(c.maxSpan,l,o,!0):null),this._range=nn([St(s[0],o,l,!0),St(s[1],o,l,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&(_l(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new jp({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var l=this._brushStart,s=this._displayables.sliderGroup,c=s.transformCoordToLocal(r,n),f=s.transformCoordToLocal(l.x,l.y),h=this._size;c[0]=Math.max(Math.min(h[0],c[0]),0),o.setShape({x:f[0],y:0,width:c[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?XDe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=XW(this.dataZoomModel).infoList;if(!r&&n.length){var a=n[0].model.coordinateSystem;r=a.getRect&&a.getRect()}if(!r){var i=this.api.getWidth(),o=this.api.getHeight();r={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return r},t.type="dataZoom.slider",t})(jL);function sG(e,t,r,n){var a=e.get("labelFormatter"),i=e.get("labelPrecision");(i==null||i==="auto")&&(i=r.valuePrecision);var o=r.value[t],l=o==null||isNaN(o)?"":fa(n)||jm(n)?n.getLabel({value:Math.round(o)}):isFinite(i)?xt(o,i,!0):o+"";return Be(a)?a(o,l):De(a)?a.replace("{value}",l):l}function KDe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function QDe(e){return e==="vertical"?"ns-resize":"ew-resize"}function gq(e){e.registerComponentModel(UDe),e.registerComponentView(ZDe),BL(e)}function JDe(e){qr(pq),qr(gq)}var mq={get:function(e,t,r){var n=je((eMe[e]||{})[t]);return r&&pe(n)?n[n.length-1]:n}},eMe={color:{active:["#006edd","#e0ffff"],inactive:[re.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},uG=$r.mapVisual,tMe=$r.eachVisual,rMe=pe,LD=B,nMe=nn,aMe=St,Kb=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a)},t.prototype.optionUpdated=function(r,n){var a=this.option;!n&&lq(a,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=Ee(r,this),this.controllerVisuals=s2(this.option.controller,n,r),this.targetVisuals=s2(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this,n=this.option.seriesTargets;if(n){var a=[];return LD(n,function(s){if(s.seriesIndex!=null)a.push(s.seriesIndex);else if(s.seriesId!=null){var c;r.ecModel.eachSeries(function(f){f.id===s.seriesId&&(c=f)}),c&&a.push(c.componentIndex)}}),a}var i=this.option.seriesId,o=this.option.seriesIndex;o==null&&i==null&&(o="all");var l=Od(this.ecModel,"series",{index:o,id:i},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return xe(l,function(s){return s.componentIndex})},t.prototype.eachTargetSeries=function(r,n){B(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&r.call(n,i)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(a){a===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,a){var i=this.option,o=i.precision,l=this.dataBound,s=i.formatter,c;a=a||["<",">"],pe(r)&&(r=r.slice(),c=!0);var f=n?r:c?[h(r[0]),h(r[1])]:h(r);if(De(s))return s.replace("{value}",c?f[0]:f).replace("{value2}",c?f[1]:f);if(Be(s))return c?s(r[0],r[1]):s(r);if(c)return r[0]===l[0]?a[0]+" "+f[1]:r[1]===l[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===l[0]?"min":v===l[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=nMe([r.min,r.max]);this._dataExtent=n},t.prototype.getDimension=function(r){var n=this,a=this.option.seriesTargets;if(a){var i=d_(a,function(o){return o.seriesIndex!=null&&o.seriesIndex===r||o.seriesId!=null&&o.seriesId===n.ecModel.getSeriesByIndex(r).id});if(i)return i.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(r){var n=r.hostModel.seriesIndex,a=this.getDimension(n);if(a!=null)return r.getDimensionIndex(a);for(var i=r.dimensions,o=i.length-1;o>=0;o--){var l=i[o],s=r.getDimensionInfo(l);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});Je(i,a),Je(o,a);var l=this.isCategory();s.call(this,i),s.call(this,o),c.call(this,i,"inRange","outOfRange"),f.call(this,o);function s(h){rMe(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function c(h,v,p){var m=h[v],y=h[p];m&&!y&&(y=h[p]={},LD(m,function(x,b){if($r.isValidType(b)){var w=mq.get(b,"inactive",l);w!=null&&(y[b]=w,b==="color"&&!y.hasOwnProperty("opacity")&&!y.hasOwnProperty("colorAlpha")&&(y.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,p=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,m=this.get("inactiveColor"),y=this.getItemSymbol(),x=y||"roundRect";LD(this.stateList,function(b){var w=this.itemSize,C=h[b];C||(C=h[b]={color:l?m:[m]}),C.symbol==null&&(C.symbol=v&&je(v)||(l?x:[x])),C.symbolSize==null&&(C.symbolSize=p&&je(p)||(l?w[0]:[w[0],w[0]])),C.symbol=uG(C.symbol,function(R){return R==="none"?x:R});var A=C.symbolSize;if(A!=null){var M=-1/0;tMe(A,function(R){R>M&&(M=R)}),C.symbolSize=uG(A,function(R){return aMe(R,[0,M],[0,w[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(r){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(r){return null},t.prototype.getVisualMeta=function(r){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:re.color.transparent,borderColor:re.color.borderTint,contentColor:re.color.theme[0],inactiveColor:re.color.disabled,borderWidth:0,padding:re.size.m,textGap:10,precision:0,textStyle:{color:re.color.secondary}},t})(lt),cG=[20,140],iMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=cG[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=cG[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):pe(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),B(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},t.prototype.getSelected=function(){var r=this.getExtent(),n=nn((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]<r[0]&&(n[0]=r[0]),n[1]<r[0]&&(n[1]=r[0]),n},t.prototype.getValueState=function(r){var n=this.option.range,a=this.getExtent(),i=Ie(this.option.unboundedRange,!0);return(i&&n[0]<=a[0]||n[0]<=r)&&(i&&n[1]>=a[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(l,s){r[0]<=l&&l<=r[1]&&i.push(s)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},t.prototype.getVisualMeta=function(r){var n=fG(this,"outOfRange",this.getExtent()),a=fG(this,"inRange",this.option.range.slice()),i=[];function o(p,m){i.push({value:p,color:r(p,m)})}for(var l=0,s=0,c=a.length,f=n.length;s<f&&(!a.length||n[s]<=a[0]);s++)n[s]<a[l]&&o(n[s],"outOfRange");for(var h=1;l<c;l++,h=0)h&&i.length&&o(a[l],"outOfRange"),o(a[l],"inRange");for(var h=1;s<f;s++)(!a.length||a[a.length-1]<n[s])&&(h&&(i.length&&o(i[i.length-1].value,"outOfRange"),h=0),o(n[s],"outOfRange"));var v=i.length;return{stops:i,outerColors:[v?i[0].color:"transparent",v?i[v-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Js(Kb.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:re.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:re.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:re.color.shadow}}),t})(Kb);function fG(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,a=(r[1]-r[0])/n,i=r[0],o=[],l=0;l<=n&&i<r[1];l++)o.push(i),i+=a;return o.push(r[1]),o}var yq=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.autoPositionValues={left:1,right:1,top:1,bottom:1},r}return t.prototype.init=function(r,n){this.ecModel=r,this.api=n},t.prototype.render=function(r,n,a,i){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,a,i)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,a=Gd(n.get("padding")||0),i=r.getBoundingRect();r.add(new at({z2:-1,silent:!0,shape:{x:i.x-a[3],y:i.y-a[0],width:i.width+a[3]+a[1],height:i.height+a[0]+a[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,a){a=a||{};var i=a.forceState,o=this.visualMapModel,l={};if(n==="color"){var s=o.get("contentColor");l.color=s}function c(p){return l[p]}function f(p,m){l[p]=m}var h=o.controllerVisuals[i||o.getValueState(r)],v=$r.prepareVisualTypes(h);return B(v,function(p){var m=h[p];a.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",m=h.__alphaForOpacity),$r.dependsOn(p,n)&&m&&m.applyVisual(r,c,f)}),l[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,a=this.api,i=Vr(n,a).refContainer;O_(r,n.getBoxLayoutParams(),i)},t.prototype.doRender=function(r,n,a,i){},t.type="visualMap",t})(Ht),hG=[["left","right","width"],["top","bottom","height"]];function xq(e,t,r){var n=e.option,a=n.align;if(a!=null&&a!=="auto")return a;for(var i={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,l=hG[o],s=[0,null,10],c={},f=0;f<3;f++)c[hG[1-o][f]]=s[f],c[l[f]]=f===2?r[0]:n[l[f]];var h=[["x","width",3],["y","height",0]][o],v=Qt(c,i,n.padding);return l[(v.margin[h[2]]||0)+v[h[0]]+v[h[1]]*.5<i[h[1]]*.5?0:1]}function SS(e,t){return B(e||[],function(r){r.dataIndex!=null&&(r.dataIndexInside=r.dataIndex,r.dataIndex=null),r.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var io=St,oMe=B,dG=Math.min,ID=Math.max,lMe=12,sMe=6,uMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._shapes={},r._dataInterval=[],r._handleEnds=[],r._hoverLinkDataIndices=[],r}return t.prototype.init=function(r,n){e.prototype.init.call(this,r,n),this._hoverLinkFromSeriesMouseOver=Ee(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Ee(this._hideIndicator,this)},t.prototype.doRender=function(r,n,a,i){(!i||i.type!=="selectDataRange"||i.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var r=this.visualMapModel,n=this.group;this._orient=r.get("orient"),this._useHandle=r.get("calculable"),this._resetInterval(),this._renderBar(n);var a=r.get("text");this._renderEndsText(n,a,0),this._renderEndsText(n,a,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,a){if(n){var i=n[1-a];i=i!=null?i+"":"";var o=this.visualMapModel,l=o.get("textGap"),s=o.itemSize,c=this._shapes.mainGroup,f=this._applyTransform([s[0]/2,a===0?-l:s[1]+l],c),h=this._applyTransform(a===0?"bottom":"top",c),v=this._orient,p=this.visualMapModel.textStyleModel;this.group.add(new vt({style:Gt(p,{x:f[0],y:f[1],verticalAlign:p.get("verticalAlign")||(v==="horizontal"?"middle":h),align:p.get("align")||(v==="horizontal"?h:"center"),text:i})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,a=this._shapes,i=n.itemSize,o=this._orient,l=this._useHandle,s=xq(n,this.api,i),c=a.mainGroup=this._createBarGroup(s),f=new ze;c.add(f),f.add(a.outOfRange=vG()),f.add(a.inRange=vG(null,l?gG(this._orient):null,Ee(this._dragHandle,this,"all",!1),Ee(this._dragHandle,this,"all",!0))),f.setClipPath(new at({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var h=n.textStyleModel.getTextRect("国"),v=ID(h.width,h.height);l&&(a.handleThumbs=[],a.handleLabels=[],a.handleLabelPoints=[],this._createHandle(n,c,0,i,v,o),this._createHandle(n,c,1,i,v,o)),this._createIndicator(n,c,i,v,o),r.add(c)},t.prototype._createHandle=function(r,n,a,i,o,l){var s=Ee(this._dragHandle,this,a,!1),c=Ee(this._dragHandle,this,a,!0),f=Co(r.get("handleSize"),i[0]),h=wr(r.get("handleIcon"),-f/2,-f/2,f,f,null,!0),v=gG(this._orient);h.attr({cursor:v,draggable:!0,drift:s,ondragend:c,onmousemove:function(b){_l(b.event)}}),h.x=i[0]/2,h.useStyle(r.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),pc(h,!0),n.add(h);var p=this.visualMapModel.textStyleModel,m=new vt({cursor:v,draggable:!0,drift:s,onmousemove:function(b){_l(b.event)},ondragend:c,style:Gt(p,{x:0,y:0,text:""})});m.ensureState("blur").style={opacity:.1},m.stateTransition={duration:200},this.group.add(m);var y=[f,0],x=this._shapes;x.handleThumbs[a]=h,x.handleLabelPoints[a]=y,x.handleLabels[a]=m},t.prototype._createIndicator=function(r,n,a,i,o){var l=Co(r.get("indicatorSize"),a[0]),s=wr(r.get("indicatorIcon"),-l/2,-l/2,l,l,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:a[0]/2});var c=r.getModel("indicatorStyle").getItemStyle();if(s instanceof Xr){var f=s.style;s.useStyle(he({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},c))}else s.useStyle(c);n.add(s);var h=this.visualMapModel.textStyleModel,v=new vt({silent:!0,invisible:!0,style:Gt(h,{x:0,y:0,text:""})});this.group.add(v);var p=[(o==="horizontal"?i/2:sMe)+a[0]/2,0],m=this._shapes;m.indicator=s,m.indicatorLabel=v,m.indicatorLabelPoint=p,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,a,i){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([a,i],this._shapes.mainGroup,!0);this._updateInterval(r,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():pG(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),a=r.getExtent(),i=[0,r.itemSize[1]];this._handleEnds=[io(n[0],a,i,!0),io(n[1],a,i,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var a=this.visualMapModel,i=this._handleEnds,o=[0,a.itemSize[1]];Hs(n,i,o,r,0);var l=a.getExtent();this._dataInterval=[io(i[0],o,l,!0),io(i[1],o,l,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,a=n.getExtent(),i=this._shapes,o=[0,n.itemSize[1]],l=r?o:this._handleEnds,s=this._createBarVisual(this._dataInterval,a,l,"inRange"),c=this._createBarVisual(a,a,o,"outOfRange");i.inRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),i.outOfRange.setStyle({fill:c.barColor}).setShape("points",c.barPoints),this._updateHandle(l,s)},t.prototype._createBarVisual=function(r,n,a,i){var o={forceState:i,convertOpacityToAlpha:!0},l=this._makeColorGradient(r,o),s=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],c=this._createBarPoints(a,s);return{barColor:new lf(0,0,0,1,l),barPoints:c,handlesColor:[l[0].color,l[l.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var a=100,i=[],o=(r[1]-r[0])/a;i.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var l=1;l<a;l++){var s=r[0]+o*l;if(s>r[1])break;i.push({color:this.getControllerVisual(s,"color",n),offset:l/a})}return i.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),i},t.prototype._createBarPoints=function(r,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],r[0]],[a[0],r[0]],[a[0],r[1]],[a[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,a=this.visualMapModel.get("inverse");return new ze(n==="horizontal"&&!a?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,l=a.handleLabels,s=i.itemSize,c=i.getExtent(),f=this._applyTransform("left",a.mainGroup);oMe([0,1],function(h){var v=o[h];v.setStyle("fill",n.handlesColor[h]),v.y=r[h];var p=io(r[h],[0,s[1]],c,!0),m=this.getControllerVisual(p,"symbolSize");v.scaleX=v.scaleY=m/s[0],v.x=s[0]-m/2;var y=Ri(a.handleLabelPoints[h],wc(v,this.group));if(this._orient==="horizontal"){var x=f==="left"||f==="top"?(s[0]-m)/2:(s[0]-m)/-2;y[1]+=x}l[h].setStyle({x:y[0],y:y[1],text:i.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,a,i){var o=this.visualMapModel,l=o.getExtent(),s=o.itemSize,c=[0,s[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},p=this.getControllerVisual(r,"color",v),m=this.getControllerVisual(r,"symbolSize"),y=io(r,l,c,!0),x=s[0]-m/2,b={x:h.x,y:h.y};h.y=y,h.x=x;var w=Ri(f.indicatorLabelPoint,wc(h,this.group)),C=f.indicatorLabel;C.attr("invisible",!1);var A=this._applyTransform("left",f.mainGroup),M=this._orient,R=M==="horizontal";C.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:R?A:"middle",align:R?"center":A});var E={x,y,style:{fill:p}},N={style:{x:w[0],y:w[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var L={duration:100,easing:"cubicInOut",additive:!0};h.x=b.x,h.y=b.y,h.animateTo(E,L),C.animateTo(N,L)}else h.attr(E),C.attr(N);this._firstShowIndicator=!1;var O=this._shapes.handleLabels;if(O)for(var I=0;I<O.length;I++)this.api.enterBlur(O[I])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var a=r.visualMapModel.itemSize,i=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);i[1]=dG(ID(0,i[1]),a[1]),r._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=a[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(r,n){var a=this.visualMapModel,i=a.itemSize;if(a.option.hoverLink){var o=[0,i[1]],l=a.getExtent();r=dG(ID(o[0],r),o[1]);var s=cMe(a,l,o),c=[r-s,r+s],f=io(r,o,l,!0),h=[io(c[0],o,l,!0),io(c[1],o,l,!0)];c[0]<o[0]&&(h[0]=-1/0),c[1]>o[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",s):h[1]===1/0?this._showIndicator(f,h[0],"> ",s):this._showIndicator(f,f,"≈ ",s));var v=this._hoverLinkDataIndices,p=[];(n||pG(a))&&(p=this._hoverLinkDataIndices=a.findTargetDataIndices(h));var m=sue(v,p);this._dispatchHighDown("downplay",SS(m[0],a)),this._dispatchHighDown("highlight",SS(m[1],a))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(mc(r.target,function(s){var c=$e(s);if(c.dataIndex!=null)return n=c,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),l=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(l)||this._showIndicator(l,l)}}},t.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a<n.length;a++)this.api.leaveBlur(n[a])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",SS(r,this.visualMapModel)),r.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var r=this.api.getZr();r.off("mouseover",this._hoverLinkFromSeriesMouseOver),r.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(r,n,a,i){var o=wc(n,i?null:this.group);return pe(r)?Ri(r,o,a):E_(r,o,a)},t.prototype._dispatchHighDown=function(r,n){n&&n.length&&this.api.dispatchAction({type:r,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(yq);function vG(e,t,r,n){return new Xn({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(a){_l(a.event)},ondragend:n})}function cMe(e,t,r){var n=lMe/2,a=e.get("hoverLinkDataSize");return a&&(n=io(a,t,r,!0)/2),n}function pG(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function gG(e){return e==="vertical"?"ns-resize":"ew-resize"}var fMe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},hMe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},dMe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var a=e.pipelineContext;!n.isTargetSeries(e)||a&&a.large||r.push(OAe(n.stateList,n.targetVisuals,Ee(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(a){if(a.isTargetSeries(e)){var i=a.getVisualMeta(Ee(vMe,null,e,a))||{stops:[],outerColors:[]},o=a.getDataDimensionIndex(r);o>=0&&(i.dimension=o,n.push(i))}}),e.getData().setVisual("visualMeta",n)}}];function vMe(e,t,r,n){for(var a=t.targetVisuals[n],i=$r.prepareVisualTypes(a),o={color:Pm(e.getData(),"color")},l=0,s=i.length;l<s;l++){var c=i[l],f=a[c==="opacity"?"__alphaForOpacity":c];f&&f.applyVisual(r,h,v)}return o.color;function h(p){return o[p]}function v(p,m){o[p]=m}}var mG=B;function pMe(e){var t=e&&e.visualMap;pe(t)||(t=t?[t]:[]),mG(t,function(r){if(r){Eh(r,"splitList")&&!Eh(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&pe(n)&&mG(n,function(a){Ve(a)&&(Eh(a,"start")&&!Eh(a,"min")&&(a.min=a.start),Eh(a,"end")&&!Eh(a,"max")&&(a.max=a.end))})}})}function Eh(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var yG=!1;function Sq(e){yG||(yG=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(fMe,hMe),B(dMe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(pMe))}function bq(e){e.registerComponentModel(iMe),e.registerComponentView(uMe),Sq(e)}var gMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._pieceList=[],r}return t.prototype.optionUpdated=function(r,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],mMe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var i=this.option.categories;this.resetVisual(function(o,l){a==="categories"?(o.mappingMethod="category",o.categories=je(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=xe(this._pieceList,function(s){return s=je(s),l!=="inRange"&&(s.visual=null),s}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},a=$r.listVisualTypes(),i=this.isCategory();B(r.pieces,function(l){B(a,function(s){l.hasOwnProperty(s)&&(n[s]=1)})}),B(n,function(l,s){var c=!1;B(this.stateList,function(f){c=c||o(r,f,s)||o(r.target,f,s)},this),!c&&B(this.stateList,function(f){(r[f]||(r[f]={}))[s]=mq.get(s,f==="inRange"?"active":"inactive",i)})},this);function o(l,s,c){return l&&l[s]&&l[s].hasOwnProperty(c)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var a=this.option,i=this._pieceList,o=(n?a:r).selected||{};if(a.selected=o,B(i,function(s,c){var f=this.getSelectedMapKey(s);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var l=!1;B(i,function(s,c){var f=this.getSelectedMapKey(s);o[f]&&(l?o[f]=!1:l=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(r){this.option.selected=je(r)},t.prototype.getValueState=function(r){var n=$r.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],l=i.getData();l.each(this.getDataDimensionIndex(l),function(s,c){var f=$r.findPieceIndex(s,a);f===r&&o.push(c)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var a=r.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(f,h){var v=i.getRepresentValue({interval:f});h||(h=i.getValueState(v));var p=r(v,h);f[0]===-1/0?a[0]=p:f[1]===1/0?a[1]=p:n.push({value:f[0],color:p},{value:f[1],color:p})}var l=this._pieceList.slice();if(!l.length)l.push({interval:[-1/0,1/0]});else{var s=l[0].interval[0];s!==-1/0&&l.unshift({interval:[-1/0,s]}),s=l[l.length-1].interval[1],s!==1/0&&l.push({interval:[s,1/0]})}var c=-1/0;return B(l,function(f){var h=f.interval;h&&(h[0]>c&&o([c,h[0]],"outOfRange"),o(h.slice()),c=h[1])},this),{stops:n,outerColors:a}},t.type="visualMap.piecewise",t.defaultOption=Js(Kb.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t})(Kb),mMe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(r)!==i&&r<5;)r++;t.precision=r,i=+i.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,l=n[0];o<a;l+=i,o++){var s=o===a-1?n[1]:l+i;e.push({interval:[l,s],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),GM(e),B(e,function(c,f){c.index=f,c.text=this.formatValueText(c.interval)},this)},categories:function(e){var t=this.option;B(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),xG(t,e)},pieces:function(e){var t=this.option;B(t.pieces,function(r,n){Ve(r)||(r={value:r});var a={text:"",index:n};if(r.label!=null&&(a.text=r.label),r.hasOwnProperty("value")){var i=a.value=r.value;a.interval=[i,i],a.close=[1,1]}else{for(var o=a.interval=[],l=a.close=[0,0],s=[1,0,1],c=[-1/0,1/0],f=[],h=0;h<2;h++){for(var v=[["gte","gt","min"],["lte","lt","max"]][h],p=0;p<3&&o[h]==null;p++)o[h]=r[v[p]],l[h]=s[p],f[h]=p===2;o[h]==null&&(o[h]=c[h])}f[0]&&o[1]===1/0&&(l[0]=0),f[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(a.value=o[0])}a.visual=$r.retrieveVisuals(r),e.push(a)},this),xG(t,e),GM(e),B(e,function(r){var n=r.close,a=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,a)},this)}};function xG(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var yMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),l=n.itemSize,s=this._getViewData(),c=s.endsText,f=En(n.get("showLabel",!0),!c),h=!n.get("selectedMode");c&&this._renderEndsText(r,c[0],l,f,o),B(s.viewPieceList,function(v){var p=v.piece,m=new ze;m.onclick=Ee(this._onItemClick,this,p),this._enableHoverLink(m,v.indexInModelPieceList);var y=n.getRepresentValue(p);if(this._createItemSymbol(m,y,[0,0,l[0],l[1]],h),f){var x=this.visualMapModel.getValueState(y),b=i.get("align")||o;m.add(new vt({style:Gt(i,{x:b==="right"?-a:l[0]+a,y:l[1]/2,text:p.text,verticalAlign:i.get("verticalAlign")||"middle",align:b,opacity:Ie(i.get("opacity"),x==="outOfRange"?.5:1)}),silent:h}))}r.add(m)},this),c&&this._renderEndsText(r,c[1],l,f,o),Cc(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var a=this;r.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var l=a.visualMapModel;l.option.hoverLink&&a.api.dispatchAction({type:o,batch:SS(l.findTargetDataIndices(n),l)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return xq(r,this.api,r.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},t.prototype._renderEndsText=function(r,n,a,i,o){if(n){var l=new ze,s=this.visualMapModel.textStyleModel;l.add(new vt({style:Gt(s,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),r.add(l)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=xe(r.getPieceList(),function(l,s){return{piece:l,indexInModelPieceList:s}}),a=r.get("text"),i=r.get("orient"),o=r.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},t.prototype._createItemSymbol=function(r,n,a,i){var o=wr(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,r.add(o)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=je(a.selected),l=n.getSelectedMapKey(r);i==="single"||i===!0?(o[l]=!0,B(o,function(s,c){o[c]=c===l})):o[l]=!o[l],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(yq);function _q(e){e.registerComponentModel(gMe),e.registerComponentView(yMe),Sq(e)}function xMe(e){qr(bq),qr(_q)}var SMe=(function(){function e(t){this._thumbnailModel=t}return e.prototype.reset=function(t){this._renderVersion=t.getECUpdateCycleVersion()},e.prototype.renderContent=function(t){var r=t.api.getViewOfComponentModel(this._thumbnailModel);r&&(t.group.silent=!0,r.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:M8(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(t,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},e})(),bMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.preventAutoZ=!0,r}return t.prototype.optionUpdated=function(r,n){this._updateBridge()},t.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new SMe(this);if(this._target=null,this.ecModel.eachSeries(function(a){KV(a,null)}),this.shouldShow()){var n=this.getTarget();KV(n.baseMapProvider,r)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:re.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:re.color.neutral30,borderColor:re.color.neutral40,opacity:.3},z:10},t})(lt),_Me=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.render=function(r,n,a){if(this._api=a,this._model=r,this._coordSys||(this._coordSys=new X_),!this._isEnabled()){this._clear();return}this._renderVersion=a.getECUpdateCycleVersion();var i=this.group;i.removeAll();var o=r.getModel("itemStyle"),l=o.getItemStyle();l.fill==null&&(l.fill=n.get("backgroundColor")||re.color.neutral00);var s=Vr(r,a).refContainer,c=Qt(Q8(r,!0),s),f=l.lineWidth||0,h=this._contentRect=Pc(c.clone(),f/2,!0,!0),v=new ze;i.add(v),v.setClipPath(new at({shape:h.plain()}));var p=this._targetGroup=new ze;v.add(p);var m=c.plain();m.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new at({style:l,shape:m,silent:!1,cursor:"grab"}));var y=r.getModel("windowStyle"),x=y.getShallow("borderRadius",!0);v.add(this._windowRect=new at({shape:{x:0,y:0,width:0,height:0,r:x},style:y.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),bG(r,this)},t.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),bG(this._model,this))},t.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!r){var o=r.group,l=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,Z_(a,l.x,l.y,l.width,l.height);var s=Qt({left:"center",top:"center",aspect:l.width/l.height},i);Nb(a,s.x,s.y,s.width,s.height),nm(o,a,$c),o.dirty(),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},t.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=oi([],r.targetTrans),a=ei([],Eb(null,this._coordSys),n);this._transThisToTarget=oi([],a);var i=r.viewportRect;i?i=i.clone():i=new Fe(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,l=o.shape.r;o.setShape(Ue({r:l},i))}},t.prototype._resetRoamController=function(r){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new pf(a.getZr())),!r||!this._isEnabled()){i.disable();return}i.enable(r,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,l,s){return n._contentRect.contain(l,s)}}}),i.off("pan").off("zoom").on("pan",Ee(this._onPan,this)).on("zoom",Ee(this._onZoom,this))},t.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=mr([],[r.oldX,r.oldY],n),i=mr([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(SG(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},t.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=mr([],[r.originX,r.originY],n);this._api.dispatchAction(SG(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:a[0],originY:a[1]}))}},t.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t})(Ht);function SG(e,t){var r=e.mainType==="series"?e.subType+"Roam":e.mainType+"Roam",n={type:r};return n[e.mainType+"Id"]=e.id,he(n,t),n}function bG(e,t){var r=jc(e);N_(t.group,r.z,r.zlevel)}function wMe(e){e.registerComponentModel(bMe),e.registerComponentView(_Me)}var CMe={label:{enabled:!0},decal:{show:!1}},_G=it(),wG=it(),TMe=Dm(AMe);function AMe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=wG(e).scope||(wG(e).scope={}),a=je(CMe);Je(a.label,e.getLocaleModel().get("aria"),!1),Je(r.option,a,!1),i(),o();function i(){var f=r.getModel("decal"),h=f.get("show");if(h){var v=Le();e.eachSeries(function(p){p.isColorBySeries()||(_G(p).scope=v.get(p.type)||v.set(p.type,{}))}),e.eachSeries(function(p){if(Be(p.enableAriaDecal)){p.enableAriaDecal();return}var m=p.getData();if(p.isColorBySeries()){var C=uR(p.ecModel,p.name,n,e.getSeriesCount()),A=m.getVisual("decal");m.setVisual("decal",M(A,C))}else{var y=p.getRawData(),x={},b=_G(p).scope;m.each(function(R){var E=m.getRawIndex(R);x[E]=R});var w=y.count();y.each(function(R){var E=x[R],N=y.getName(R)||R+"",L=uR(p.ecModel,N,b,w),O=m.getItemVisual(E,"decal");m.setItemVisual(E,"decal",M(O,L))})}function M(R,E){var N=R?he(he({},E),R):E;return N.dirty=!0,N}})}}function o(){var f=t.getZr().dom;if(f){var h=e.getLocaleModel().get("aria"),v=r.getModel("label");if(v.option=Ue(v.option,h),!!v.get("enabled")){if(f.setAttribute("role","img"),v.get("description")){f.setAttribute("aria-label",v.get("description"));return}var p=e.getSeriesCount(),m=v.get(["data","maxCount"])||10,y=v.get(["series","maxCount"])||10,x=Math.min(p,y),b;if(!(p<1)){var w=s();if(w){var C=v.get(["general","withTitle"]);b=l(C,{title:w})}else b=v.get(["general","withoutTitle"]);var A=[],M=p>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);b+=l(M,{seriesCount:p}),e.eachSeries(function(L,O){if(O<x){var I=void 0,z=L.get("name"),V=z?"withName":"withoutName";I=p>1?v.get(["series","multiple",V]):v.get(["series","single",V]),I=l(I,{seriesId:L.seriesIndex,seriesName:L.get("name"),seriesType:c(L.subType)});var Y=L.getData();if(Y.count()>m){var H=v.get(["data","partialData"]);I+=l(H,{displayCnt:m})}else I+=v.get(["data","allData"]);for(var F=v.get(["data","separator","middle"]),X=v.get(["data","separator","end"]),P=v.get(["data","excludeDimensionId"]),q=[],G=0;G<Y.count();G++)if(G<m){var W=Y.getName(G),Z=P?Bt(Y.getValues(G),function(U,K){return qe(P,K)===-1}):Y.getValues(G),Q=v.get(["data",W?"withName":"withoutName"]);q.push(l(Q,{name:W,value:Z.join(F)}))}I+=q.join(F)+X,A.push(I)}});var R=v.getModel(["series","multiple","separator"]),E=R.get("middle"),N=R.get("end");b+=A.join(E)+N,f.setAttribute("aria-label",b)}}}}function l(f,h){if(!De(f))return f;var v=f;return B(h,function(p,m){v=v.replace(new RegExp("\\{\\s*"+m+"\\s*\\}","g"),p)}),v}function s(){var f=e.get("title");return f&&f.length&&(f=f[0]),f&&f.text}function c(f){var h=e.getLocaleModel().get(["series","typeNames"]);return h[f]||h.chart}}function DMe(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},B(["description","general","series","data"],function(r){t[r]!=null&&(t.label[r]=t[r])})}}function MMe(e){e.registerPreprocessor(DMe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,TMe)}var CG={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RMe=(function(){function e(t){var r=this._condVal=De(t)?new RegExp(t):GU(t)?t:null;if(r==null){var n="";wt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return De(r)?this._condVal.test(t):pt(r)?this._condVal.test(t+""):!1},e})(),EMe=(function(){function e(){}return e.prototype.evaluate=function(){return this.value},e})(),NMe=(function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(!t[r].evaluate())return!1;return!0},e})(),LMe=(function(){function e(){}return e.prototype.evaluate=function(){for(var t=this.children,r=0;r<t.length;r++)if(t[r].evaluate())return!0;return!1},e})(),IMe=(function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e})(),OMe=(function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),a=t?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?a:n))return!1;return!0},e})();function WL(e,t){if(e===!0||e===!1){var r=new EMe;return r.value=e,r}var n="";return wq(e)||wt(n),e.and?TG("and",e,t):e.or?TG("or",e,t):e.not?kMe(e,t):PMe(e,t)}function TG(e,t,r){var n=t[e],a="";pe(n)||wt(a),n.length||wt(a);var i=e==="and"?new NMe:new LMe;return i.children=xe(n,function(o){return WL(o,r)}),i.children.length||wt(a),i}function kMe(e,t){var r=e.not,n="";wq(r)||wt(n);var a=new IMe;return a.child=WL(r,t),a.child||wt(n),a}function PMe(e,t){for(var r="",n=t.prepareGetValue(e),a=[],i=dt(e),o=e.parser,l=o?y7(o):null,s=0;s<i.length;s++){var c=i[s];if(!(c==="parser"||t.valueGetterAttrMap.get(c))){var f=Ne(CG,c)?CG[c]:c,h=e[c],v=l?l(h):h,p=Ehe(f,v)||f==="reg"&&new RMe(v);p||wt(r),a.push(p)}}a.length||wt(r);var m=new OMe;return m.valueGetterParam=n,m.valueParser=l,m.getValue=t.getValue,m.subCondList=a,m}function wq(e){return Ve(e)&&!Sn(e)}var jMe=(function(){function e(t,r){this._cond=WL(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e})();function BMe(e,t){return new jMe(e,t)}var zMe={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=BMe(e.config,{valueGetterAttrMap:Le({dimension:!0}),prepareGetValue:function(l){var s="",c=l.dimension;Ne(l,"dimension")||wt(s);var f=t.getDimensionInfo(c);return f||wt(s),{dimIdx:f.index}},getValue:function(l){return t.retrieveValueFromItem(r,l.dimIdx)}}),a=[],i=0,o=t.count();i<o;i++)r=t.getRawDataItem(i),n.evaluate()&&a.push(r);return{data:a}}},VMe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",a=ar(r);a.length||wt(n);var i=[];B(a,function(f){var h=f.dimension,v=f.order,p=f.parser,m=f.incomparable;if(h==null&&wt(n),v!=="asc"&&v!=="desc"&&wt(n),m&&m!=="min"&&m!=="max"){var y="";wt(y)}if(v!=="asc"&&v!=="desc"){var x="";wt(x)}var b=t.getDimensionInfo(h);b||wt(n);var w=p?y7(p):null;p&&!w&&wt(n),i.push({dimIdx:b.index,parser:w,comparator:new S7(v,m)})});var o=t.sourceFormat;o!==an&&o!==Ra&&wt(n);for(var l=[],s=0,c=t.count();s<c;s++)l.push(t.getRawDataItem(s));return l.sort(function(f,h){for(var v=0;v<i.length;v++){var p=i[v],m=t.retrieveValueFromItem(f,p.dimIdx),y=t.retrieveValueFromItem(h,p.dimIdx);p.parser&&(m=p.parser(m),y=p.parser(y));var x=p.comparator.evaluate(m,y);if(x!==0)return x}return 0}),{data:l}}};function FMe(e){e.registerTransform(zMe),e.registerTransform(VMe)}var GMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.prototype.init=function(r,n,a){e.prototype.init.call(this,r,n,a),this._sourceManager=new A7(this),d3(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),d3(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Mi},t})(lt),HMe=(function(e){ee(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t})(Ht);function UMe(e){e.registerComponentModel(GMe),e.registerComponentView(HMe)}const YMe=Object.freeze(Object.defineProperty({__proto__:null,AriaComponent:MMe,AxisPointerComponent:Ym,BrushComponent:$Ae,CalendarComponent:WCe,DataZoomComponent:JDe,DataZoomInsideComponent:pq,DataZoomSliderComponent:gq,DatasetComponent:UMe,GeoComponent:C$,GraphicComponent:_Te,GridComponent:rCe,GridSimpleComponent:GN,LegendComponent:ODe,LegendPlainComponent:YL,LegendScrollComponent:dq,MarkAreaComponent:CDe,MarkLineComponent:yDe,MarkPointComponent:hDe,MatrixComponent:dTe,ParallelComponent:fW,PolarComponent:NCe,RadarComponent:r$,SingleAxisComponent:HCe,ThumbnailComponent:wMe,TimelineComponent:aDe,TitleComponent:XAe,ToolboxComponent:fAe,TooltipComponent:EAe,TransformComponent:FMe,VisualMapComponent:xMe,VisualMapContinuousComponent:bq,VisualMapPiecewiseComponent:_q},Symbol.toStringTag,{value:"Module"})),$Me=e_(YMe);var OD=Math.sin,kD=Math.cos,Cq=Math.PI,ec=Math.PI*2,WMe=180/Cq,Tq=(function(){function e(){}return e.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},e.prototype.moveTo=function(t,r){this._add("M",t,r)},e.prototype.lineTo=function(t,r){this._add("L",t,r)},e.prototype.bezierCurveTo=function(t,r,n,a,i,o){this._add("C",t,r,n,a,i,o)},e.prototype.quadraticCurveTo=function(t,r,n,a){this._add("Q",t,r,n,a)},e.prototype.arc=function(t,r,n,a,i,o){this.ellipse(t,r,n,n,0,a,i,o)},e.prototype.ellipse=function(t,r,n,a,i,o,l,s){var c=l-o,f=!s,h=Math.abs(c),v=bs(h-ec)||(f?c>=ec:-c>=ec),p=c>0?c%ec:c%ec+ec,m=!1;v?m=!0:bs(h)?m=!1:m=p>=Cq==!!f;var y=t+n*kD(o),x=r+a*OD(o);this._start&&this._add("M",y,x);var b=Math.round(i*WMe);if(v){var w=1/this._p,C=(f?1:-1)*(ec-w);this._add("A",n,a,b,1,+f,t+n*kD(o+C),r+a*OD(o+C)),w>.01&&this._add("A",n,a,b,0,+f,y,x)}else{var A=t+n*kD(l),M=r+a*OD(l);this._add("A",n,a,b,+m,+f,A,M)}},e.prototype.rect=function(t,r,n,a){this._add("M",t,r),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(t,r,n,a,i,o,l,s,c){for(var f=[],h=this._p,v=1;v<arguments.length;v++){var p=arguments[v];if(isNaN(p)){this._invalid=!0;return}f.push(Math.round(p*h)/h)}this._d.push(t+f.join(" ")),this._start=t==="Z"},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e})(),qL="none",qMe=Math.round;function XMe(e){var t=e.fill;return t!=null&&t!==qL}function ZMe(e){var t=e.stroke;return t!=null&&t!==qL}var p2=["lineCap","miterLimit","lineJoin"],KMe=xe(p2,function(e){return"stroke-"+e.toLowerCase()});function QMe(e,t,r,n){var a=t.opacity==null?1:t.opacity;if(r instanceof Xr){e("opacity",a);return}if(XMe(t)){var i=Og(t.fill);e("fill",i.color);var o=t.fillOpacity!=null?t.fillOpacity*i.opacity*a:i.opacity*a;o<1&&e("fill-opacity",o)}else e("fill",qL);if(ZMe(t)){var l=Og(t.stroke);e("stroke",l.color);var s=t.strokeNoScale?r.getLineScale():1,c=s?(t.lineWidth||0)/s:0,f=t.strokeOpacity!=null?t.strokeOpacity*l.opacity*a:l.opacity*a,h=t.strokeFirst;if(c!==1&&e("stroke-width",c),h&&e("paint-order",h?"stroke":"fill"),f<1&&e("stroke-opacity",f),t.lineDash){var v=pN(r),p=v[0],m=v[1];p&&(m=qMe(m||0),e("stroke-dasharray",p.join(",")),(m||n)&&e("stroke-dashoffset",m))}for(var y=0;y<p2.length;y++){var x=p2[y];if(t[x]!==qS[x]){var b=t[x]||qS[x];b&&e(KMe[y],b)}}}}var Aq="http://www.w3.org/2000/svg",Dq="http://www.w3.org/1999/xlink",JMe="http://www.w3.org/2000/xmlns/",eRe="http://www.w3.org/XML/1998/namespace",AG="ecmeta_";function Mq(e){return document.createElementNS(Aq,e)}function Ur(e,t,r,n,a){return{tag:e,attrs:r||{},children:n,text:a,key:t}}function tRe(e,t){var r=[];if(t)for(var n in t){var a=t[n],i=n;a!==!1&&(a!==!0&&a!=null&&(i+='="'+a+'"'),r.push(i))}return"<"+e+" "+r.join(" ")+">"}function rRe(e){return"</"+e+">"}function XL(e,t){t=t||{};var r=t.newline?`
72
+ `:"";function n(a){var i=a.children,o=a.tag,l=a.attrs,s=a.text;return tRe(o,l)+(o!=="style"?Mn(s):s||"")+(i?""+r+xe(i,function(c){return n(c)}).join(r)+r:"")+rRe(o)}return n(e)}function nRe(e,t,r){r=r||{};var n=r.newline?`
73
+ `:"",a=" {"+n,i=n+"}",o=xe(dt(e),function(s){return s+a+xe(dt(e[s]),function(c){return c+":"+e[s][c]+";"}).join(n)+i}).join(n),l=xe(dt(t),function(s){return"@keyframes "+s+a+xe(dt(t[s]),function(c){return c+a+xe(dt(t[s][c]),function(f){var h=t[s][c][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!l?"":["<![CDATA[",o,l,"]]>"].join(n)}function g2(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function DG(e,t,r,n){return Ur("svg","root",{width:e,height:t,xmlns:Aq,"xmlns:xlink":Dq,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var aRe=0;function Rq(){return aRe++}var MG={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},lc="transform-origin";function iRe(e,t,r){var n=he({},e.shape);he(n,t),e.buildPath(r,n);var a=new Tq;return a.reset(h6(e)),r.rebuildPath(a,1),a.generateStr(),a.getStr()}function oRe(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[lc]=r+"px "+n+"px")}var lRe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Eq(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function sRe(e,t,r){var n=e.shape.paths,a={},i,o;if(B(n,function(s){var c=g2(r.zrId);c.animation=!0,n1(s,{},c,!0);var f=c.cssAnims,h=c.cssNodes,v=dt(f),p=v.length;if(p){o=v[p-1];var m=f[o];for(var y in m){var x=m[y];a[y]=a[y]||{d:""},a[y].d+=x.d||""}for(var b in h){var w=h[b].animation;w.indexOf(o)>=0&&(i=w)}}}),!!i){t.d=!1;var l=Eq(a,r);return i.replace(o,l)}}function RG(e){return De(e)?MG[e]?"cubic-bezier("+MG[e]+")":vE(e)?e:"":""}function n1(e,t,r,n){var a=e.animators,i=a.length,o=[];if(e instanceof Nm){var l=sRe(e,t,r);if(l)o.push(l);else if(!i)return}else if(!i)return;for(var s={},c=0;c<i;c++){var f=a[c],h=[f.getMaxTime()/1e3+"s"],v=RG(f.getClip().easing),p=f.getDelay();v?h.push(v):h.push("linear"),p&&h.push(p/1e3+"s"),f.getLoop()&&h.push("infinite");var m=h.join(" ");s[m]=s[m]||[m,[]],s[m][1].push(f)}function y(w){var C=w[1],A=C.length,M={},R={},E={},N="animation-timing-function";function L(ue,de,me){for(var ae=ue.getTracks(),ye=ue.getMaxTime(),nt=0;nt<ae.length;nt++){var be=ae[nt];if(be.needsAnimate()){var Te=be.keyframes,Me=be.propName;if(me&&(Me=me(Me)),Me)for(var Oe=0;Oe<Te.length;Oe++){var Ye=Te[Oe],_e=Math.round(Ye.time/ye*100)+"%",ce=RG(Ye.easing),Ce=Ye.rawValue;(De(Ce)||pt(Ce))&&(de[_e]=de[_e]||{},de[_e][Me]=Ye.rawValue,ce&&(de[_e][N]=ce))}}}}for(var O=0;O<A;O++){var I=C[O],z=I.targetName;z?z==="shape"&&L(I,R):!n&&L(I,M)}for(var V in M){var Y={};wo(Y,e),he(Y,M[V]);var H=d6(Y),F=M[V][N];E[V]=H?{transform:H}:{},oRe(E[V],Y),F&&(E[V][N]=F)}var X,P=!0;for(var V in R){E[V]=E[V]||{};var q=!X,F=R[V][N];q&&(X=new Vs);var G=X.len();X.reset(),E[V].d=iRe(e,R[V],X);var W=X.len();if(!q&&G!==W){P=!1;break}F&&(E[V][N]=F)}if(!P)for(var V in E)delete E[V].d;if(!n)for(var O=0;O<A;O++){var I=C[O],z=I.targetName;z==="style"&&L(I,E,function(ae){return lRe[ae]})}for(var Z=dt(E),Q=!0,U,O=1;O<Z.length;O++){var K=Z[O-1],se=Z[O];if(E[K][lc]!==E[se][lc]){Q=!1;break}U=E[K][lc]}if(Q&&U){for(var V in E)E[V][lc]&&delete E[V][lc];t[lc]=U}if(Bt(Z,function(ue){return dt(E[ue]).length>0}).length){var ge=Eq(E,r);return ge+" "+w[0]+" both"}}for(var x in s){var l=y(s[x]);l&&o.push(l)}if(o.length){var b=r.zrId+"-cls-"+Rq();r.cssNodes["."+b]={animation:o.join(",")},t.class=b}}function uRe(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};EG(n,t,r)}else{var a=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=a.fill;if(!i){var o=e.style&&e.style.fill,l=e.states.select&&e.states.select.style&&e.states.select.style.fill,s=e.currentStates.indexOf("select")>=0&&l||o;s&&(i=FS(s))}var c=a.lineWidth;if(c){var f=!a.strokeNoScale&&e.transform?e.transform[0]:1;c=c/f}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),c&&(n["stroke-width"]=c),EG(n,t,r)}}function EG(e,t,r,n){var a=JSON.stringify(e),i=r.cssStyleCache[a];i||(i=r.zrId+"-cls-"+Rq(),r.cssStyleCache[a]=i,r.cssNodes["."+i+":hover"]=e),t.class=t.class?t.class+" "+i:i}var vm=Math.round;function Nq(e){return e&&De(e.src)}function Lq(e){return e&&Be(e.toDataURL)}function ZL(e,t,r,n){QMe(function(a,i){var o=a==="fill"||a==="stroke";o&&f6(i)?Oq(t,e,a,n):o&&gE(i)?kq(r,e,a,n):e[a]=i,o&&n.ssr&&i==="none"&&(e["pointer-events"]="visible")},t,r,!1),gRe(r,e,n)}function KL(e,t){var r=S6(t);r&&(r.each(function(n,a){n!=null&&(e[(AG+a).toLowerCase()]=n+"")}),t.isSilent()&&(e[AG+"silent"]="true"))}function NG(e){return bs(e[0]-1)&&bs(e[1])&&bs(e[2])&&bs(e[3]-1)}function cRe(e){return bs(e[4])&&bs(e[5])}function QL(e,t,r){if(t&&!(cRe(t)&&NG(t))){var n=1e4;e.transform=NG(t)?"translate("+vm(t[4]*n)/n+" "+vm(t[5]*n)/n+")":ase(t)}}function LG(e,t,r){for(var n=e.points,a=[],i=0;i<n.length;i++)a.push(vm(n[i][0]*r)/r),a.push(vm(n[i][1]*r)/r);t.points=a.join(" ")}function IG(e){return!e.smooth}function fRe(e){var t=xe(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,a){for(var i=0;i<t.length;i++){var o=t[i],l=r[o[0]];l!=null&&(n[o[1]]=vm(l*a)/a)}}}var hRe={circle:[fRe(["cx","cy","r"])],polyline:[LG,IG],polygon:[LG,IG]};function dRe(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function Iq(e,t){var r=e.style,n=e.shape,a=hRe[e.type],i={},o=t.animation,l="path",s=e.style.strokePercent,c=t.compress&&h6(e)||4;if(a&&!t.willUpdate&&!(a[1]&&!a[1](n))&&!(o&&dRe(e))&&!(s<1)){l=e.type;var f=Math.pow(10,c);a[0](n,i,f)}else{var h=!e.path||e.shapeChanged();e.path||e.createPathProxy();var v=e.path;h&&(v.beginPath(),e.buildPath(v,e.shape),e.pathUpdated());var p=v.getVersion(),m=e,y=m.__svgPathBuilder;(m.__svgPathVersion!==p||!y||s!==m.__svgPathStrokePercent)&&(y||(y=m.__svgPathBuilder=new Tq),y.reset(c),v.rebuildPath(y,s),y.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=s),i.d=y.getStr()}return QL(i,e.transform),ZL(i,r,e,t),KL(i,e),t.animation&&n1(e,i,t),t.emphasis&&uRe(e,i,t),Ur(l,e.id+"",i)}function vRe(e,t){var r=e.style,n=r.image;if(n&&!De(n)&&(Nq(n)?n=n.src:Lq(n)&&(n=n.toDataURL())),!!n){var a=r.x||0,i=r.y||0,o=r.width,l=r.height,s={href:n,width:o,height:l};return a&&(s.x=a),i&&(s.y=i),QL(s,e.transform),ZL(s,r,e,t),KL(s,e),t.animation&&n1(e,s,t),Ur("image",e.id+"",s)}}function pRe(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var a=r.font||bl,i=r.x||0,o=ose(r.y||0,Am(a),r.textBaseline),l=ise[r.textAlign]||r.textAlign,s={"dominant-baseline":"central","text-anchor":l};if(Z6(r)){var c="",f=r.fontStyle,h=X6(r.fontSize);if(!parseFloat(h))return;var v=r.fontFamily||PU,p=r.fontWeight;c+="font-size:"+h+";font-family:"+v+";",f&&f!=="normal"&&(c+="font-style:"+f+";"),p&&p!=="normal"&&(c+="font-weight:"+p+";"),s.style=c}else s.style="font: "+a;return n.match(/\s/)&&(s["xml:space"]="preserve"),i&&(s.x=i),o&&(s.y=o),QL(s,e.transform),ZL(s,r,e,t),KL(s,e),t.animation&&n1(e,s,t),Ur("text",e.id+"",s,void 0,n)}}function OG(e,t){if(e instanceof yt)return Iq(e,t);if(e instanceof Xr)return vRe(e,t);if(e instanceof cd)return pRe(e,t)}function gRe(e,t,r){var n=e.style;if(lse(n)){var a=sse(e),i=r.shadowCache,o=i[a];if(!o){var l=e.getGlobalScale(),s=l[0],c=l[1];if(!s||!c)return;var f=n.shadowOffsetX||0,h=n.shadowOffsetY||0,v=n.shadowBlur,p=Og(n.shadowColor),m=p.opacity,y=p.color,x=v/2/s,b=v/2/c,w=x+" "+b;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=Ur("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Ur("feDropShadow","",{dx:f/s,dy:h/c,stdDeviation:w,"flood-color":y,"flood-opacity":m})]),i[a]=o}t.filter=m_(o)}}function Oq(e,t,r,n){var a=e[r],i,o={gradientUnits:a.global?"userSpaceOnUse":"objectBoundingBox"};if(u6(a))i="linearGradient",o.x1=a.x,o.y1=a.y,o.x2=a.x2,o.y2=a.y2;else if(c6(a))i="radialGradient",o.cx=Ie(a.x,.5),o.cy=Ie(a.y,.5),o.r=Ie(a.r,.5);else return;for(var l=a.colorStops,s=[],c=0,f=l.length;c<f;++c){var h=NM(l[c].offset)*100+"%",v=l[c].color,p=Og(v),m=p.color,y=p.opacity,x={offset:h};x["stop-color"]=m,y<1&&(x["stop-opacity"]=y),s.push(Ur("stop",c+"",x))}var b=Ur(i,"",o,s),w=XL(b),C=n.gradientCache,A=C[w];A||(A=n.zrId+"-g"+n.gradientIdx++,C[w]=A,o.id=A,n.defs[A]=Ur(i,A,o,s)),t[r]=m_(A)}function kq(e,t,r,n){var a=e.style[r],i=e.getBoundingRect(),o={},l=a.repeat,s=l==="no-repeat",c=l==="repeat-x",f=l==="repeat-y",h;if(s6(a)){var v=a.imageWidth,p=a.imageHeight,m=void 0,y=a.image;if(De(y)?m=y:Nq(y)?m=y.src:Lq(y)&&(m=y.toDataURL()),typeof Image>"u"){var x="Image width/height must been given explictly in svg-ssr renderer.";In(v,x),In(p,x)}else if(v==null||p==null){var b=function(O,I){if(O){var z=O.elm,V=v||I.width,Y=p||I.height;O.tag==="pattern"&&(c?(Y=1,V/=i.width):f&&(V=1,Y/=i.height)),O.attrs.width=V,O.attrs.height=Y,z&&(z.setAttribute("width",V),z.setAttribute("height",Y))}},w=DE(m,null,e,function(O){s||b(R,O),b(h,O)});w&&w.width&&w.height&&(v=v||w.width,p=p||w.height)}h=Ur("image","img",{href:m,width:v,height:p}),o.width=v,o.height=p}else a.svgElement&&(h=je(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(h){var C,A;s?C=A=1:c?(A=1,C=o.width/i.width):f?(C=1,A=o.height/i.height):o.patternUnits="userSpaceOnUse",C!=null&&!isNaN(C)&&(o.width=C),A!=null&&!isNaN(A)&&(o.height=A);var M=d6(a);M&&(o.patternTransform=M);var R=Ur("pattern","",o,[h]),E=XL(R),N=n.patternCache,L=N[E];L||(L=n.zrId+"-p"+n.patternIdx++,N[E]=L,o.id=L,R=n.defs[L]=Ur("pattern",L,o,[h])),t[r]=m_(L)}}function mRe(e,t,r){var n=r.clipPathCache,a=r.defs,i=n[e.id];if(!i){i=r.zrId+"-c"+r.clipPathIdx++;var o={id:i};n[e.id]=i,a[i]=Ur("clipPath",i,o,[Iq(e,r)])}t["clip-path"]=m_(i)}function kG(e){return document.createTextNode(e)}function fc(e,t,r){e.insertBefore(t,r)}function PG(e,t){e.removeChild(t)}function jG(e,t){e.appendChild(t)}function Pq(e){return e.parentNode}function jq(e){return e.nextSibling}function PD(e,t){e.textContent=t}var BG=58,yRe=120,xRe=Ur("","");function m2(e){return e===void 0}function lo(e){return e!==void 0}function SRe(e,t,r){for(var n={},a=t;a<=r;++a){var i=e[a].key;i!==void 0&&(n[i]=a)}return n}function Qp(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function pm(e){var t,r=e.children,n=e.tag;if(lo(n)){var a=e.elm=Mq(n);if(JL(xRe,e),pe(r))for(t=0;t<r.length;++t){var i=r[t];i!=null&&jG(a,pm(i))}else lo(e.text)&&!Ve(e.text)&&jG(a,kG(e.text))}else e.elm=kG(e.text);return e.elm}function Bq(e,t,r,n,a){for(;n<=a;++n){var i=r[n];i!=null&&fc(e,pm(i),t)}}function Qb(e,t,r,n){for(;r<=n;++r){var a=t[r];if(a!=null)if(lo(a.tag)){var i=Pq(a.elm);PG(i,a.elm)}else PG(e,a.elm)}}function JL(e,t){var r,n=t.elm,a=e&&e.attrs||{},i=t.attrs||{};if(a!==i){for(r in i){var o=i[r],l=a[r];l!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==yRe?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(JMe,r,o):r.charCodeAt(3)===BG?n.setAttributeNS(eRe,r,o):r.charCodeAt(5)===BG?n.setAttributeNS(Dq,r,o):n.setAttribute(r,o))}for(r in a)r in i||n.removeAttribute(r)}}function bRe(e,t,r){for(var n=0,a=0,i=t.length-1,o=t[0],l=t[i],s=r.length-1,c=r[0],f=r[s],h,v,p,m;n<=i&&a<=s;)o==null?o=t[++n]:l==null?l=t[--i]:c==null?c=r[++a]:f==null?f=r[--s]:Qp(o,c)?(Oh(o,c),o=t[++n],c=r[++a]):Qp(l,f)?(Oh(l,f),l=t[--i],f=r[--s]):Qp(o,f)?(Oh(o,f),fc(e,o.elm,jq(l.elm)),o=t[++n],f=r[--s]):Qp(l,c)?(Oh(l,c),fc(e,l.elm,o.elm),l=t[--i],c=r[++a]):(m2(h)&&(h=SRe(t,n,i)),v=h[c.key],m2(v)?fc(e,pm(c),o.elm):(p=t[v],p.tag!==c.tag?fc(e,pm(c),o.elm):(Oh(p,c),t[v]=void 0,fc(e,p.elm,o.elm))),c=r[++a]);(n<=i||a<=s)&&(n>i?(m=r[s+1]==null?null:r[s+1].elm,Bq(e,m,r,a,s)):Qb(e,t,n,i))}function Oh(e,t){var r=t.elm=e.elm,n=e.children,a=t.children;e!==t&&(JL(e,t),m2(t.text)?lo(n)&&lo(a)?n!==a&&bRe(r,n,a):lo(a)?(lo(e.text)&&PD(r,""),Bq(r,null,a,0,a.length-1)):lo(n)?Qb(r,n,0,n.length-1):lo(e.text)&&PD(r,""):e.text!==t.text&&(lo(n)&&Qb(r,n,0,n.length-1),PD(r,t.text)))}function _Re(e,t){if(Qp(e,t))Oh(e,t);else{var r=e.elm,n=Pq(r);pm(t),n!==null&&(fc(n,t.elm,jq(r)),Qb(n,[e],0,0))}return t}var wRe=0,CRe=(function(){function e(t,r,n){if(this.type="svg",this.configLayer=TRe(),this.storage=r,this._opts=n=he({},n),this.root=t,this._id="zr"+wRe++,this._oldVNode=DG(n.width,n.height),t&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=Mq("svg");JL(null,this._oldVNode),a.appendChild(i),t.appendChild(a)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",_Re(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return OG(t,g2(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=g2(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],l=this._bgVNode=ARe(n,a,this._backgroundColor,i);l&&o.push(l);var s=t.compress?null:this._mainVNode=Ur("g","main",{},[]);this._paintList(r,i,s?s.children:o),s&&o.push(s);var c=xe(dt(i.defs),function(v){return i.defs[v]});if(c.length&&o.push(Ur("defs","defs",{},c)),t.animation){var f=nRe(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=Ur("style","stl",{},[],f);o.push(h)}}return DG(n,a,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},XL(this.renderToVNode({animation:Ie(t.cssAnimation,!0),emphasis:Ie(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ie(t.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(t,r,n){for(var a=t.length,i=[],o=0,l,s,c=0,f=0;f<a;f++){var h=t[f];if(!h.invisible){var v=h.__clipPaths,p=v&&v.length||0,m=s&&s.length||0,y=void 0;for(y=Math.max(p-1,m-1);y>=0&&!(v&&s&&v[y]===s[y]);y--);for(var x=m-1;x>y;x--)o--,l=i[o-1];for(var b=y+1;b<p;b++){var w={};mRe(v[b],w,r);var C=Ur("g","clip-g-"+c++,w,[]);(l?l.children:n).push(C),i[o++]=C,l=C}s=v;var A=OG(h,r);A&&(l?l.children:n).push(A)}}},e.prototype.resize=function(t,r){var n=this._opts,a=this.root,i=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),a&&i&&(i.style.display="none",t=Hh(a,0,n),r=Hh(a,1,n),i.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,i){var o=i.style;o.width=t+"px",o.height=r+"px"}if(gE(this._backgroundColor))this.refresh();else{var l=this._svgDom;l&&(l.setAttribute("width",t),l.setAttribute("height",r));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",t),s.setAttribute("height",r))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(t){var r=this.renderToString(),n="data:image/svg+xml;";return t?(r=cse(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e})();function TRe(e){return function(){}}function ARe(e,t,r,n){var a;if(r&&r!=="none")if(a=Ur("rect","bg",{width:e,height:t,x:"0",y:"0"}),f6(r))Oq({fill:r},a.attrs,"fill",n);else if(gE(r))kq({style:{fill:r},dirty:ur,getBoundingRect:function(){return{width:e,height:t}}},a.attrs,"fill",n);else{var i=Og(r),o=i.color,l=i.opacity;a.attrs.fill=o,l<1&&(a.attrs["fill-opacity"]=l)}return a}function DRe(e){e.registerPainter("svg",CRe)}function zG(e,t,r){var n=Yr.createCanvas(),a=t.getWidth(),i=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",n.setAttribute("data-zr-dom-id",e)),n.width=a*r,n.height=i*r,n}function jD(e){return!e.__cursors.get(x8)}function VG(e){var t=e.__cursors.get(x8);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var zq=(function(e){ee(t,e);function t(r,n,a){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=oS,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var o;a=a||HS,typeof r=="string"?o=zG(r,n,a):Ve(r)&&(o=r,r=o.id),i.id=r,i.dom=o;var l=o.style;return l&&(fE(o),o.onselectstart=function(){return!1},l.padding="0",l.margin="0",l.borderWidth="0"),i.painter=n,i.dpr=a,i}return t.prototype.afterBrush=function(){this.__prevIdx=VG(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var r=this.dpr;this.domBack=zG("back-"+this.id,this.painter,r),this.ctxBack=this.domBack.getContext("2d"),r!==1&&this.ctxBack.scale(r,r)},t.prototype.createRepaintRects=function(r,n,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],l=this.maxRepaintRectCount,s=!1,c=new Fe(0,0,0,0);function f(A){if(!(!A.isFinite()||A.isZero()))if(o.length===0){var M=new Fe(0,0,0,0);M.copy(A),o.push(M)}else{for(var R=!1,E=1/0,N=0,L=0;L<o.length;++L){var O=o[L];if(O.intersect(A)){var I=new Fe(0,0,0,0);I.copy(O),I.union(A),o[L]=I,R=!0;break}else if(s){c.copy(A),c.union(O);var z=A.width*A.height,V=O.width*O.height,Y=c.width*c.height,H=Y-z-V;H<E&&(E=H,N=L)}}if(s&&(o[N].union(A),R=!0),!R){var M=new Fe(0,0,0,0);M.copy(A),o.push(M)}s||(s=o.length>=l)}}for(var h=VG(this),v=h.startIdx;v<h.endIdx;++v){var p=r[v];if(p){var m=p.shouldBePainted(a,i,!0,!0),y=p.__isRendered&&(p.__dirty&ua||!m)?p.getPrevPaintRect():null;y&&f(y);var x=m&&(p.__dirty&ua||!p.__isRendered)?p.getPaintRect():null;x&&f(x)}}for(var b=this.__prevIdx,v=b.startIdx;v<b.endIdx;++v){var p=n[v],m=p&&p.shouldBePainted(a,i,!0,!0);if(p&&(!m||!p.__zr)&&p.__isRendered){var y=p.getPrevPaintRect();y&&f(y)}}var w;do{w=!1;for(var v=0;v<o.length;){if(o[v].isZero()){o.splice(v,1);continue}for(var C=v+1;C<o.length;)o[v].intersect(o[C])?(w=!0,o[v].union(o[C]),o.splice(C,1)):C++;v++}}while(w);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var a=this.dpr,i=this.dom,o=i.style,l=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),i.width=r*a,i.height=n*a,l&&(l.width=r*a,l.height=n*a,a!==1&&this.ctxBack.scale(a,a))},t.prototype.clear=function(r,n,a){var i=this.dom,o=this.ctx,l=i.width,s=i.height;n=n||this.clearColor;var c=this.motionBlur&&!r,f=this.lastFrameAlpha,h=this.dpr,v=this;c&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,l/h,s/h));var p=this.domBack;function m(y,x,b,w){if(o.clearRect(y,x,b,w),n&&n!=="transparent"){var C=void 0;if(wm(n)){var A=n.global||n.__width===b&&n.__height===w;C=A&&n.__canvasGradient||gR(o,n,{x:0,y:0,width:b,height:w}),n.__canvasGradient=C,n.__width=b,n.__height=w}else FU(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,C=mR(o,n,{dirty:function(){v.setUnpainted(),v.painter.refresh()}}));o.save(),o.fillStyle=C||n,o.fillRect(y,x,b,w),o.restore()}c&&(o.save(),o.globalAlpha=f,o.drawImage(p,y,x,b,w),o.restore())}!a||c?m(0,0,l,s):a.length&&B(a,function(y){m(y.x*h,y.y*h,y.width*h,y.height*h)})},t})(fi),FG=1e5,tc=314159,BD=void 0,MRe=1,zD=2;function RRe(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function ERe(e,t){var r=document.createElement("div");return r.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",r}function GG(e,t,r,n){var a=new zq(e,t,t.dpr);return a.zlevel=r,a.zlevel2=n,a.__builtin__=!0,Vq(a),a}function Vq(e){e.__cursorStack=[],e.__cursors=Le()}function NRe(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function LRe(e,t){var r=e.__cursors,n=+t;return r.get(n)||(e.__cursorStack.push(n),r.set(n,NRe({key:n})))}function Fx(e,t){for(var r=e.__cursorStack,n=0;n<r.length;n++)t(e.__cursors.get(r[n]))}function VD(e,t){var r=e.layers;return r[t]||(r[t]=new Array(3))}function An(e,t,r){for(var n=e.layerStack,a=0;a<n.length;a++){var i=n[a].zl,o=n[a].zl2,l=e.layers[i][o];(!r||(!(r&yg)||l.__builtin__)&&(!(r&y2)||!l.__builtin__)&&(!(r&Fq)||l!==e.hoverlayer))&&t(l,i,o,a)}}var yg=1,y2=2,Fq=4,Gx=yg|Fq,IRe=(function(){function e(t,r,n,a){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var i=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=he({},n||{}),this.dpr=n.devicePixelRatio||HS,this._singleCanvas=i,this.root=t;var o=t.style;if(o&&(fE(t),t.innerHTML=""),this.storage=r,this._prevDisplayList=[],i){var s=t,c=s.width,f=s.height;n.width!=null&&(c=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,s.width=c*this.dpr,s.height=f*this.dpr,this._width=c,this._height=f;var h=GG(s,this,tc,oS);h.initContext(),this._insertLayer(h,tc,oS,!0),this._domRoot=t}else{this._width=Hh(t,0,n),this._height=Hh(t,1,n);var l=this._domRoot=ERe(this._width,this._height);t.appendChild(l)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},e.prototype.refresh=function(t){var r;t&&!Ve(t)?r={paintAll:!!t}:r=t||{};var n=Ie(r.refresh,!0),a=Ie(r.refreshHover,!1);if(a&&(this._hoverLayerDirty=zD),!n)return a&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,r.paintAll),this._redrawId=Math.random();var o=this._prevDisplayList;this._paintList(i,o,this._redrawId);var l=this._backgroundColor;return An(this._i,function(s,c,f,h){s.refresh&&s.refresh(h===0?l:null)},y2),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(t){var r=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=BD,n!==BD&&(!r&&n===zD&&(r=this._i.hoverlayer=this._ensureLayer(FG)),!!r)){r.clear();for(var a={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,o=0,l=t.length;o<l;o++){var s=t[o];if(s.__inHover){i||(i=r.ctx,i.save());var c=s.__hoverStyle,f=void 0;c&&(f=s.style,s.style=c),xc(i,s,a),c&&(s.style=f)}}i&&(Qh(i,a),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(FG)},e.prototype.paintOne=function(t,r){gN(t,r)},e.prototype._paintList=function(t,r,n){if(this._redrawId===n){var a=this._doPaintList(t,r);if(this._needsManuallyCompositing&&this._compositeManually(),a)An(this._i,function(o){o.afterBrush&&o.afterBrush()},Gx),this._paintHoverList(t);else{var i=this;PS(function(){i._paintList(t,r,n)})}}},e.prototype._compositeManually=function(){var t=this._ensureLayer(tc).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),An(this._i,function(a){a.virtual&&t.drawImage(a.dom,0,0,r,n)},yg)},e.prototype._doPaintList=function(t,r){var n=this,a=!0;return An(this._i,function(i){var o=!1;if(Fx(i,function(h){(h.drawIdx<h.endIdx||h.notClearIdx>=0)&&(o=!0)}),!(!o&&!i.__dirty)){var l=n._opts.useDirtyRect&&!jD(i)?i.createRepaintRects(t,r,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var f=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,f,l)}Fx(i,function(h){var v=n._paintPerCursor(i,h,t,l,c);a=a&&v})}},Gx),ht.wxa&&An(this._i,function(i){i&&i.ctx&&i.ctx.draw&&i.ctx.draw()}),a},e.prototype._paintPerCursor=function(t,r,n,a,i){var o=t.ctx;if(a)if(!a.length)r.drawIdx=r.endIdx;else for(var l=this.dpr,s=0;s<a.length;++s){var c=a[s];o.save(),o.beginPath(),o.rect(c.x*l,c.y*l,c.width*l,c.height*l),o.clip(),this._paintPerCursorInRect(t,r,n,c,i),o.restore()}else o.save(),this._paintPerCursorInRect(t,r,n,null,i),o.restore();return r.drawIdx>=r.endIdx},e.prototype._paintPerCursorInRect=function(t,r,n,a,i){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},l=t.ctx,s=jD(t),c=s&&Yr.getTime(),f=r.drawIdx,h=r.notClearIdx,v=h>=0?Math.min(h,f):f;v<r.endIdx;v++){var p=n[v];if(!(v<f&&!p.notClear)){if(p.__inHover&&(this._hoverLayerDirty=zD),a!=null){var m=p.getPaintRect();m&&m.intersect(a)&&(xc(l,p,o),p.setPrevPaintRect(m))}else xc(l,p,o);if(s){var y=Yr.getTime()-c;if(y>15){v++;break}}}}Qh(l,o),r.drawIdx=Math.max(v,f)},e.prototype.getLayer=function(t,r){return this._ensureLayer(t,0,r)},e.prototype._ensureLayer=function(t,r,n){r=r||0;var a=this._singleCanvas;a&&!this._needsManuallyCompositing&&(t=tc,r=0);var i=VD(this._i,t)[r];return i||(i=GG("zr_"+t+"."+r,this,t,r),this._layerConfig[t]&&Je(i,this._layerConfig[t],!0),(n||a&&t!==tc)&&(i.virtual=!0),this._insertLayer(i,t,r,!1),i.initContext()),i},e.prototype.insertLayer=function(t,r){this._insertLayer(r,t,0,!1)},e.prototype._insertLayer=function(t,r,n,a){var i=this._i,o=i.layers,l=i.layerStack,s=this._domRoot,c=null;if(!(o[r]&&o[r][n])&&RRe(t)){for(var f=l.length,h=0;h<f&&(l[h].zl<r||l[h].zl===r&&l[h].zl2<n);)h++;if(h>0&&(c=VD(i,l[h-1].zl)[l[h-1].zl2]),l.splice(h,0,{zl:r,zl2:n}),VD(i,r)[n]=t,!a&&!t.virtual)if(c){var v=c.dom;v.nextSibling?s.insertBefore(t.dom,v.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(t,r){return An(this._i,function(n,a){t.call(r,n,a)})},e.prototype.eachBuiltinLayer=function(t,r){return An(this._i,function(n,a){t.call(r,n,a)},yg)},e.prototype.eachOtherLayer=function(t,r){return An(this._i,function(n,a){t.call(r,n,a)},y2)},e.prototype.getLayers=function(){var t={};return An(this._i,function(r,n,a){t[r.id]=r}),t},e.prototype._updateLayerStatus=function(t,r){var n=this;if(n._singleCanvas)for(var a=1;a<t.length;a++){var i=t[a];if(i.zlevel!==t[a-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}An(n._i,function(x){x.__dirty=!1,Fx(x,function(b){b.used=!1,b.endIdxNew=0,b.notClearIdx=-1})},Gx);for(var o,l=null,s=null,c=!1,f=0,h=t.length;f<h;f++){var i=t[f],v=i.zlevel,p=i.incremental,m=void 0;if(o!==v&&(o=v,c=!1),p?(c=!0,m=nfe):m=c?rfe:oS,(!l||v!==l.zlevel||m!==l.zlevel2)&&(l=n._ensureLayer(v,m),s=null,!l.__builtin__)){f_("ZLevel "+v+" has been used by unknown layer "+l.id);continue}if((!s||p!==s.key)&&(s=LRe(l,p),!s.used))if(s.used=!0,!r&&s.first===i.id){var y=f-s.startIdx;s.startIdx=f,s.drawIdx+=y,s.endIdx+=y}else l.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=f,s.endIdx=f+1;s.endIdxNew=f+1,i.__dirty&ua&&!i.__inHover&&((!p||!i.notClear&&f<s.drawIdx)&&(l.__dirty=!0),p&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=f))}An(n._i,function(x){for(var b=x.__cursorStack,w=x.__cursors,C=b.length-1;C>=0;C--){var A=w.get(b[C]);if(!A.used)x.__dirty=!0,w.removeKey(b[C]),b.splice(C,1);else{var M=A.endIdxNew;(jD(x)?M<A.drawIdx:M!==A.endIdx||!M||t[M-1].id!==A.last)&&(x.__dirty=!0),A.endIdx=A.endIdxNew,A.last=M?t[M-1].id:NaN}}x.__dirty&&(Fx(x,function(R){R.drawIdx=R.startIdx}),n._hoverLayerDirty===BD&&(n._hoverLayerDirty=MRe))},Gx)},e.prototype.clear=function(){return An(this._i,function(t){t.clear(),Vq(t)},yg),this},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,An(this._i,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?Je(n[t],r,!0):n[t]=r,An(this._i,function(a,i){Je(a,n[i],!0)})}},e.prototype.delLayer=function(t){for(var r=this._i.layerStack,n=this._i.layers,a=r.length-1;a>=0;a--){var i=r[a];if(i.zl===t){var o=n[t][i.zl2];if(o.__builtin__)continue;if(r.splice(a,1),n[t][i.zl2]=void 0,!o.virtual){var l=o.dom.parentNode;l&&l.removeChild(o.dom)}}}},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var a=this._opts,i=this.root;t!=null&&(a.width=t),r!=null&&(a.height=r),t=Hh(i,0,a),r=Hh(i,1,a),n.style.display="",(this._width!==t||r!==this._height)&&(n.style.width=t+"px",n.style.height=r+"px",An(this._i,function(o){o.resize(t,r)}),this.refresh({paintAll:!0})),this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this._ensureLayer(tc).resize(t,r)}return this},e.prototype.clearLayer=function(t){B(this._i.layers[t],function(r){r&&!r.__builtin__&&r.clear()})},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[tc][0].dom;var r=new zq("image",this,t.pixelRatio||this.dpr);r.initContext(),r.clear(!1,t.backgroundColor||this._backgroundColor);var n=r.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var a=r.dom.width,i=r.dom.height;An(this._i,function(h){h.__builtin__?n.drawImage(h.dom,0,0,a,i):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},l=this.storage.getDisplayList(!0),s=0,c=l.length;s<c;s++){var f=l[s];xc(n,f,o)}Qh(n,o)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e})();function ORe(e){e.registerPainter("canvas",IRe)}const kRe=Object.freeze(Object.defineProperty({__proto__:null,CanvasRenderer:ORe,SVGRenderer:DRe},Symbol.toStringTag,{value:"Module"})),PRe=e_(kRe);var FD,HG;function Gq(){if(HG)return FD;HG=1;var e=Bge,{BarChart:t,LineChart:r,PieChart:n,ScatterChart:a,FunnelChart:i,RadarChart:o,TreemapChart:l,HeatmapChart:s}=jwe,{GridComponent:c,TooltipComponent:f,LegendComponent:h,TitleComponent:v,DatasetComponent:p,ToolboxComponent:m,DataZoomComponent:y,MarkLineComponent:x,MarkPointComponent:b,RadarComponent:w,VisualMapComponent:C}=$Me,{CanvasRenderer:A,SVGRenderer:M}=PRe;return e.use([t,r,n,a,i,o,l,s,c,f,h,v,p,m,y,x,b,w,C,A,M]),FD=e,FD}var GD,UG;function eI(){if(UG)return GD;UG=1;var e=Dd(),t=Gq();function r(n,a){a=a||{};var i=e.useRef(null),o=e.useRef(null),l=a.theme,s=a.renderer||"canvas";return e.useEffect(function(){var c=i.current;if(c){var f=t.init(c,l,{renderer:s});o.current=f,a.onEvents&&Object.keys(a.onEvents).forEach(function(v){f.on(v,a.onEvents[v])});var h=null;return typeof ResizeObserver<"u"&&(h=new ResizeObserver(function(){o.current&&o.current.resize()}),h.observe(c)),function(){h&&h.disconnect(),f.dispose(),o.current=null}}},[]),e.useEffect(function(){var c=o.current;if(c){var f=n||{};typeof a.optimize=="function"&&(f=a.optimize(f)),c.setOption(f,{notMerge:a.notMerge!==!1,lazyUpdate:!0})}},[n,a.optimize]),{containerRef:i,getInstance:function(){return o.current}}}return GD=r,GD}var hs={exports:{}},HD,YG;function jRe(){if(YG)return HD;YG=1;var e=[{key:"lt",label:"is less than",numeric:!0,group:"number"},{key:"lte",label:"is at most",numeric:!0,group:"number"},{key:"gt",label:"is more than",numeric:!0,group:"number"},{key:"gte",label:"is at least",numeric:!0,group:"number"},{key:"between",label:"is between",numeric:!0,second:!0,group:"number"},{key:"eq",label:"is",group:"any"},{key:"neq",label:"is not",group:"any"},{key:"contains",label:"contains",group:"text"},{key:"startsWith",label:"starts with",group:"text"},{key:"endsWith",label:"ends with",group:"text"},{key:"isEmpty",label:"is blank",noValue:!0,group:"any"},{key:"notEmpty",label:"is not blank",noValue:!0,group:"any"},{key:"notContains",label:"does not contain",group:"text"},{key:"dateOn",label:"is on",date:!0,group:"date"},{key:"dateBefore",label:"is before",date:!0,group:"date"},{key:"dateAfter",label:"is after",date:!0,group:"date"},{key:"dateBetween",label:"is between dates",date:!0,second:!0,group:"date"},{key:"isHighest",label:"is the highest",numeric:!0,noValue:!0,needsRows:!0,group:"number"},{key:"isLowest",label:"is the lowest",numeric:!0,noValue:!0,needsRows:!0,group:"number"}],t={};e.forEach(function(C){t[C.key]=C});function r(C){return t[C]||null}function n(C){return C?e.slice():e.filter(function(A){return!A.numeric})}var a=[{key:"number",label:"Number"},{key:"text",label:"Text"},{key:"date",label:"Date"},{key:"any",label:"Any value"}];function i(C){var A=a.slice().sort(function(M,R){return(M.key===C?-1:0)-(R.key===C?-1:0)});return A.map(function(M){return{key:M.key,label:M.label,operators:e.filter(function(R){return R.group===M.key})}})}function o(C){return C==="number"?"gt":C==="date"?"dateAfter":C==="text"?"contains":"eq"}function l(C){return typeof C=="number"?isFinite(C)?C:null:typeof C=="string"&&C.trim()!==""&&isFinite(Number(C))?Number(C):null}function s(C){return C==null?"":String(C).toLowerCase()}function c(C){return C==null||String(C).trim()===""}var f=/^(\d{4})-(\d{2})-(\d{2})/;function h(C){if(C instanceof Date){if(isNaN(C.getTime()))return null;var A=C.getMonth()+1,M=C.getDate();return C.getFullYear()+"-"+(A<10?"0":"")+A+"-"+(M<10?"0":"")+M}if(typeof C!="string")return null;var R=f.exec(C.trim());return R?R[1]+"-"+R[2]+"-"+R[3]:null}function v(C,A){if(!C)return!1;var M=C.op;if(M==="isEmpty")return c(A);if(M==="notEmpty")return!c(A);var R=l(A),E=l(C.value),N=R!==null&&E!==null;switch(M){case"lt":return N&&R<E;case"lte":return N&&R<=E;case"gt":return N&&R>E;case"gte":return N&&R>=E;case"between":{var L=l(C.value2);return R===null||E===null||L===null?!1:R>=Math.min(E,L)&&R<=Math.max(E,L)}case"eq":return N?R===E:s(A)===s(C.value);case"neq":return N?R!==E:s(A)!==s(C.value);case"contains":return s(A).indexOf(s(C.value))>=0;case"notContains":return s(A).indexOf(s(C.value))<0;case"dateOn":case"dateBefore":case"dateAfter":case"dateBetween":{var O=h(A),I=h(C.value);if(!O||!I)return!1;if(M==="dateOn")return O===I;if(M==="dateBefore")return O<I;if(M==="dateAfter")return O>I;var z=h(C.value2);if(!z)return!1;var V=I<z?I:z,Y=I<z?z:I;return O>=V&&O<=Y}case"isHighest":case"isLowest":{var H=l(C.resolved);return R!==null&&H!==null&&R===H}case"startsWith":return s(A).indexOf(s(C.value))===0;case"endsWith":{var F=s(A),X=s(C.value);return X.length<=F.length&&F.lastIndexOf(X)===F.length-X.length}default:return!1}}function p(C,A,M){return(C||[]).map(function(R){var E=R&&t[R.op];if(!E||!E.needsRows)return R;var N=null;return(A||[]).forEach(function(L){var O=l(M(R,L));O!==null&&(N===null||(R.op==="isHighest"?O>N:O<N))&&(N=O)}),Object.assign({},R,{resolved:N})})}function m(C,A){for(var M=C||[],R=0;R<M.length;R++)if(v(M[R],A(M[R])))return M[R];return null}function y(C,A){var M=m(C,A);return M?M.then||{}:null}function x(C,A){if(!A)return null;var M=l(C);if(M===null)return null;var R=A.style||"decimal",E={useGrouping:A.useGrouping!==!1};R==="currency"?(E.style="currency",E.currency=A.currency||"USD"):R==="percent"?E.style="percent":E.style="decimal",A.decimals!=null&&isFinite(Number(A.decimals))&&(E.minimumFractionDigits=Number(A.decimals),E.maximumFractionDigits=Number(A.decimals));var N;try{N=new Intl.NumberFormat(A.locale||void 0,E).format(M)}catch{N=String(M)}return(A.prefix||"")+N+(A.suffix||"")}function b(C,A,M){for(var R=(C||[]).slice(0,M||20),E=!1,N=0;N<R.length;N++){var L=R[N]?R[N][A]:void 0;if(!c(L)&&(E=!0,l(L)===null))return!1}return E||!R.length}function w(C,A,M){for(var R=(C||[]).slice(0,M||20),E=!0,N=!0,L=!1,O=0;O<R.length;O++){var I=R[O]?R[O][A]:void 0;c(I)||(L=!0,l(I)===null&&(E=!1),h(I)||(N=!1))}return L?E?"number":N?"date":"text":null}return HD={resolveRules:p,OPERATORS:e,OPERATOR_GROUPS:a,operatorGroups:i,defaultOperator:o,columnKind:w,operator:r,operatorsFor:n,matches:v,firstMatch:m,resolveThen:y,formatNumber:x,columnIsNumeric:b},HD}var UD,$G;function BRe(){if($G)return UD;$G=1;var e=jRe();return UD={OPERATORS:e.OPERATORS,operator:e.operator,operatorsFor:e.operatorsFor,OPERATOR_GROUPS:e.OPERATOR_GROUPS,operatorGroups:e.operatorGroups,defaultOperator:e.defaultOperator,columnKind:e.columnKind,matches:e.matches,resolveRules:e.resolveRules,firstMatch:e.firstMatch,resolveThen:e.resolveThen,formatNumber:e.formatNumber,columnIsNumeric:e.columnIsNumeric},UD}var WG;function zRe(){if(WG)return hs.exports;WG=1;var e=BRe(),t=e.matches,r=e.formatNumber,n={mark:1,dataLabel:1,axisX:1,axisY:1},a=["color","opacity","borderColor","borderWidth","borderType","borderRadius","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY"],i=["color","fontStyle","fontWeight","fontSize","fontFamily","backgroundColor","borderColor","borderWidth","borderRadius","padding","textBorderColor","textBorderWidth","lineHeight"];function o(b){return String(b).indexOf("{")<0&&String(b).indexOf("}")<0&&String(b).indexOf("|")<0}function l(b,w){for(var C=null,A=0;A<w.length;A++)b[w[A]]!==void 0&&(C||(C={}),C[w[A]]=b[w[A]]);return C}function s(b,w,C){var A=b.axes&&b.axes.y&&b.axes.y.labels||[],M=w.series||[],R={mark:{},dataLabel:{},axisX:[],axisY:[]},E=typeof e.resolveRules=="function"?e.resolveRules(b.rules||[],b.data||[],function(N,L){return L&&typeof L=="object"?L[N.field]:void 0}):b.rules||[];return E.forEach(function(N,L){var O="rules["+L+"]";if(!N||!N.field){C.warn(O+" names no column to test (ignored)");return}if(!N.op){C.warn(O+" has no comparison (ignored)");return}var I=N.target||"mark";if(!n[I]){C.warn(O+' applies to "'+I+'", which is not something on a chart (ignored)');return}var z=N.then||{},V=I==="mark"?a:i,Y=l(z,V),H=I!=="mark"&&(z.hide||z.format);if(!Y&&!H){C.warn(O+" sets nothing its target can take, so it would do nothing (ignored)");return}var F=Object.keys(z).filter(function(Z){return V.indexOf(Z)<0&&Z!=="hide"&&Z!=="format"});F.length&&C.warn(O+" sets "+F.join(", ")+', which "'+I+'" has no such thing (dropped)');var X={rule:N,style:Y,hide:!!z.hide,format:z.format||null};if(I==="axisX"||I==="axisY"){R[I].push(X);return}var P=[];if(N.series){for(var q=-1,G=0;G<A.length;G++)c(A[G])===N.series&&(q=G);if(q<0||!M[q]){C.warn(O+' applies to "'+N.series+'", which this chart does not plot (ignored)');return}P=[q]}else for(var W=0;W<M.length;W++)P.push(W);P.forEach(function(Z){(R[I][Z]||(R[I][Z]=[])).push(X)})}),R}function c(b){return b&&typeof b=="object"?b.field:b}function f(b){var w=b&&b.data;return w&&typeof w=="object"&&!Array.isArray(w)?w:null}function h(b,w,C){Object.keys(b).forEach(function(A){var M=b[A],R=w.series[A];if(!(!R||!M||!M.length)){var E={};M.forEach(function(I){Object.keys(I.style||{}).forEach(function(z){E[z]=1})});var N=R.itemStyle||{},L={};for(var O in N)L[O]=N[O];Object.keys(E).forEach(function(I){var z=N[I]!==void 0?N[I]:I==="color"?C[Number(A)%C.length]:void 0;L[I]=function(V){for(var Y=f(V),H=0;H<M.length;H++){var F=M[H];if(!(!F.style||F.style[I]===void 0)&&t(F.rule,Y?Y[F.rule.field]:void 0))return F.style[I]}return z}}),R.itemStyle=L}})}function v(b,w,C,A){var M=C.axes&&C.axes.y&&C.axes.y.labels||[],R=C.chartType!==void 0&&p(C.chartType);Object.keys(b).forEach(function(E){var N=b[E],L=w.series[E];if(!(!L||!N||!N.length)){if(L.label&&L.label.formatter){A.warn("a data-label formatter is already set, so conditional formatting on the label is not applied — clear Data labels → Format to use rules");return}var O=c(M[Number(E)]),I={};N.forEach(function(Y,H){Y.style&&(I["r"+E+"_"+H]=Y.style)});var z={};for(var V in L.label||{})z[V]=L.label[V];z.formatter=function(Y){for(var H=f(Y),F=R?Y.name:H&&O!=null?H[O]:Y.value,X=F==null?"":String(F),P=0;P<N.length;P++){var q=N[P];if(t(q.rule,H?H[q.rule.field]:void 0)){if(q.hide)return"";if(q.format){var G=r(F,q.format);G!==null&&(X=G)}var W="r"+E+"_"+P;return I[W]&&o(X)?"{"+W+"|"+X+"}":X}}return X},Object.keys(I).length&&(z.rich=I),L.label=z}})}function p(b){return b==="pie"||b==="donut"||b==="funnel"||b==="gauge"}function m(b,w,C,A){if(b.length){var M=C==="axisX"?"xAxis":"yAxis",R=Array.isArray(w[M])?w[M][0]:w[M];if(!R){A.warn("a rule styles the "+(C==="axisX"?"X":"Y")+" axis labels, but this chart has no such axis (ignored)");return}if(R.axisLabel&&R.axisLabel.formatter){A.warn("an "+(C==="axisX"?"X":"Y")+" axis label formatter is already set, so conditional formatting on it is not applied");return}var E={};b.forEach(function(O,I){O.style&&(E[C+"_"+I]=O.style)});var N={};for(var L in R.axisLabel||{})N[L]=R.axisLabel[L];N.formatter=function(O){for(var I=O==null?"":String(O),z=0;z<b.length;z++){var V=b[z];if(t(V.rule,O)){if(V.hide)return"";if(V.format){var Y=r(O,V.format);Y!==null&&(I=Y)}var H=C+"_"+z;return E[H]&&o(I)?"{"+H+"|"+I+"}":I}}return I},Object.keys(E).length&&(N.rich=E),R.axisLabel=N}}var y=["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"];function x(b,w,C){if(!(!Array.isArray(b.rules)||!b.rules.length)&&!(!Array.isArray(w.series)||!w.series.length)){var A=Array.isArray(b.palette)&&b.palette.length?b.palette:y,M=s(b,w,C);h(M.mark,w,A),v(M.dataLabel,w,b,C),m(M.axisX,w,"axisX",C),m(M.axisY,w,"axisY",C)}}return hs.exports=x,hs.exports.matches=t,hs.exports.formatNumber=r,hs.exports.richSafe=o,hs.exports.MARK_KEYS=a,hs.exports.TEXT_KEYS=i,hs.exports}var YD,qG;function Hq(){if(qG)return YD;qG=1;var e=zRe(),t=22;function r(P,q){P=P||{},q=q||{};var G=q.rootFontSize||16,W=[],Z={root:G,warn:function(Lt){W.push(Lt)}},Q={};if(P.title){var U=P.title;U.show!==!1?Q.title=X(F({text:U.text,show:!0,textStyle:R(U.font,Z,"title.font")},L(N(U.positioning,Z)),E(U.style,Z,"title.style"),U.font&&U.font.align?{textAlign:U.font.align}:{})):Q.title={show:!1}}if(P.axes&&(P.axes.x&&(Q.xAxis=M(P.axes.x,Z,"axes.x")),P.axes.y&&(Q.yAxis=M(P.axes.y,Z,"axes.y"))),P.legend){var Me=P.legend;if(Me.show!==!1){var K=N(Me.positioning,Z);Q.legend=X(F({show:!0,orient:K._vertical?"vertical":"horizontal",textStyle:R(Me.font,Z,"legend.font"),itemGap:z(Me.itemGap,Z),formatter:Me.formatter},L(K),E(Me.style,Z,"legend.style"))),Me.iconGap!=null&&Z.warn("legend.iconGap has no ECharts equivalent (dropped)")}else Q.legend={show:!1}}if(P.tooltip){var se=P.tooltip;Q.tooltip=X(F({show:se.show!==!1,textStyle:R(se.font,Z,"tooltip.font"),formatter:se.formatter},E(se.style,Z,"tooltip.style")))}if(P.chartArea){var ge=P.chartArea,ue={},de=O(ge.margin,ge.padding,Z);F(ue,de);var me=!(P.axes&&P.axes.x&&P.axes.x.show===!1),ae=!(P.axes&&P.axes.y&&P.axes.y.show===!1);ue.containLabel=me||ae,Q.grid=X(ue),ge.style&&ge.style.background&&ge.style.background.color&&(Q.backgroundColor=Y(ge.style.background.color,ge.style.background.opacity)),ge.style&&ge.style.background&&ge.style.background.image&&Z.warn("chartArea.style.background.image has no ECharts equivalent (dropped)")}if(Q.legend&&Q.legend.show!==!1&&Q.legend.bottom!==void 0&&Q.legend.top===void 0){var ye=Q.legend.textStyle&&typeof Q.legend.textStyle.fontSize=="number"?Q.legend.textStyle.fontSize:12,nt=typeof Q.legend.bottom=="number"?Q.legend.bottom:0,be=nt+Math.max(ye,14)+t,Te=Q.grid&&Q.grid.bottom;(Te==null||typeof Te=="number")&&(Q.grid=F(Q.grid||{},{bottom:(Te||0)+be}))}var Me=Q.legend;if(Me&&Me.show!==!1&&typeof Me.top=="number"&&Me.bottom===void 0&&Me.orient!=="vertical"){var Oe=Me.textStyle&&typeof Me.textStyle.fontSize=="number"?Me.textStyle.fontSize:12,Ye=Me.top+Math.max(Oe,14)+10,_e=["y","y2"].filter(function(Lt){var At=P.axes&&P.axes[Lt];return At&&At.show!==!1&&At.title&&At.title.text});if(_e.length){var ce=0;_e.forEach(function(Lt){var At=P.axes[Lt].title,Gr=At.margin?z(At.margin.top||At.margin.bottom||At.margin.left||At.margin.right,Z):null,zi=At.font&&At.font.size?z(At.font.size,Z):null;ce=Math.max(ce,(typeof Gr=="number"?Gr:15)+(typeof zi=="number"?zi:12))}),Ye+=ce}else Ye+=t-10;var Ce=Q.grid&&Q.grid.top;(Ce==null||typeof Ce=="number")&&(Q.grid=F(Q.grid||{},{top:(Ce||0)+Ye}))}var Ae,Xe,Ge;if(P.dataLabel){var ut=P.dataLabel;if(Ae=X(F({show:ut.show!==!1,position:I(ut.positioning),formatter:ut.formatter,distance:z(ut.distance,Z),rotate:ut.rotate,offset:ut.offsetX!=null||ut.offsetY!=null?[z(ut.offsetX,Z)||0,z(ut.offsetY,Z)||0]:void 0,minMargin:z(ut.minMargin,Z),width:z(ut.maxWidth,Z),overflow:ut.overflow},R(ut.font,Z,"dataLabel.font"),E(ut.style,Z,"dataLabel.style"))),ut.labelLine){var zt=ut.labelLine;Ge=X({show:zt.show!==!1,length:z(zt.length,Z),length2:z(zt.length2,Z),smooth:zt.smooth,minTurnAngle:zt.minTurnAngle,lineStyle:X({color:zt.lineStyle&&zt.lineStyle.color,width:z(zt.lineStyle&&zt.lineStyle.width,Z),type:H(zt.lineStyle&&zt.lineStyle.style)})})}var yr=ut.layout||{};(yr.hideOverlap!=null||yr.moveOverlap)&&(Xe=X({hideOverlap:yr.hideOverlap,moveOverlap:yr.moveOverlap}))}Array.isArray(P.data)&&(Q.dataset={source:p(P.data,P.bands)});var Vt=P.axes&&P.axes.x&&P.axes.x.labels,or=P.axes&&P.axes.y&&P.axes.y.labels,Wt=Array.isArray(Vt)?x(Vt[0]):void 0,Rt=w(P.chartType),Qn=P.marks&&P.chartType?P.marks[P.chartType]||P.marks[Rt.type]:null,Zr=Array.isArray(P.data)?P.data:[];if(Rt.type&&Array.isArray(or)&&or.length)if(Rt.binding==="radar"){var Fr=C(Zr,Wt).map(function(Lt){return{name:String(Lt)}}),bn=0;or.forEach(function(Lt){Zr.forEach(function(At){var Gr=Number(At[x(Lt)]);isFinite(Gr)&&Gr>bn&&(bn=Gr)})}),bn>0&&Fr.forEach(function(Lt){Lt.max=bn}),Q.radar=X({indicator:Fr}),Q.series=[X({type:"radar",data:or.map(function(Lt){return{name:b(Lt),value:Zr.map(function(At){return At[x(Lt)]})}}),label:Ae,labelLayout:Xe,labelLine:Ge})],delete Q.xAxis,delete Q.yAxis}else if(Rt.binding==="treemap"){var tu=x(or[0]);Q.series=[X({type:"treemap",data:Zr.map(function(Lt){return{name:String(Lt[Wt]),value:Number(Lt[tu])}}).filter(function(Lt){return isFinite(Lt.value)}),label:Ae,labelLayout:Xe,labelLine:Ge,breadcrumb:{show:!1}})],delete Q.xAxis,delete Q.yAxis}else if(Rt.binding==="heatmap"){var ko=Array.isArray(Vt)&&Vt.length>1?x(Vt[1]):null,gf=x(or[0]);if(!ko)Z.warn("a heatmap needs two dimensions — give axes.x.labels a second column"),Q.series=[];else{var _n=C(Zr,Wt),Wm=C(Zr,ko),tv={};_n.forEach(function(Lt,At){tv[String(Lt)]=At});var rv={};Wm.forEach(function(Lt,At){rv[String(Lt)]=At});var ru=[],mf=1/0,nu=-1/0;Zr.forEach(function(Lt){var At=Number(Lt[gf]);isFinite(At)&&(At<mf&&(mf=At),At>nu&&(nu=At),ru.push([tv[String(Lt[Wt])],rv[String(Lt[ko])],At]))}),Q.xAxis=F(Q.xAxis||{},{type:"category",data:_n,splitArea:{show:!0}}),Q.yAxis=F(Q.yAxis||{},{type:"category",data:Wm,splitArea:{show:!0}}),delete Q.xAxis.boundaryGap,delete Q.yAxis.boundaryGap,Q.visualMap={min:isFinite(mf)?mf:0,max:isFinite(nu)?nu:1,calculable:!0,orient:"horizontal",left:"center",bottom:0,inRange:Array.isArray(P.palette)&&P.palette.length>1?{color:[P.palette[P.palette.length-1],P.palette[0]]}:void 0},Q.series=[X({type:"heatmap",data:ru,label:Ae,labelLayout:Xe})]}}else{var nv=[],av=[];if(Q.series=or.map(function(Lt){var At=x(Lt),Gr=c(Lt,Rt,Z),zi=Gr.axis==="right";(zi?nv:av).push(Gr);var vi=X({type:Gr.type,name:b(Lt),encode:Rt.cartesian?Rt.horizontal?Wt?{y:Wt,x:At}:{x:At}:Wt?{x:Wt,y:At}:{y:At}:Wt?{itemName:Wt,value:At}:{value:At},label:Ae,labelLayout:Xe,labelLine:Ge});Gr.series&&F(vi,Gr.series),zi&&(vi.yAxisIndex=1);var au=Gr.name===null||Gr.name===P.chartType?Qn:P.marks?P.marks[Gr.name]||P.marks[Gr.type]:null;return au&&A(vi,Gr.type,au,Z),Rt.cartesian&&f(vi,Lt,Z),Rt.cartesian&&h(vi,Lt,Z),vi}),Array.isArray(P.bands)&&P.bands.length&&(!Rt.cartesian||Rt.horizontal||Rt.binding!=="cartesian"?Z.warn("bands are drawn on a vertical cartesian chart only (ignored)"):Q.series=y(P.bands,Wt,Zr,Z).concat(Q.series)),Rt.cartesian){var ji=Rt.horizontal?"yAxis":"xAxis",pr=Rt.horizontal?"xAxis":"yAxis";Q[ji]?Q[ji].type===void 0&&(Q[ji].type="category"):Wt&&(Q[ji]={type:"category"}),Q[pr]||(Q[pr]={}),Q[pr].type===void 0&&(Q[pr].type="value"),Q[pr].boundaryGap===void 0&&(Q[pr].boundaryGap=a);var Bi=(av.length?av:[Rt]).some(l);if(Q[pr].type==="value"&&Q[pr].scale===void 0&&(Q[pr].scale=!Bi),nv.length&&Q.yAxis&&!Array.isArray(Q.yAxis)){var cr=M(P.axes&&P.axes.y2,Z,"axes.y2")||{};cr.type===void 0&&(cr.type="value"),cr.position="right",cr.splitLine||(cr.splitLine={show:!1}),cr.boundaryGap===void 0&&(cr.boundaryGap=a),cr.scale===void 0&&(cr.scale=!nv.some(l)),Q.yAxis=[Q.yAxis,cr]}}else delete Q.xAxis,delete Q.yAxis}return e(P,Q,Z),Array.isArray(P.palette)&&(Q.color=P.palette),P.fontFamily&&(Q.textStyle=F(Q.textStyle||{},{fontFamily:P.fontFamily})),{option:Q,seriesLabel:Ae,chartType:P.chartType,warnings:W}}var n={area:{type:"line",series:{areaStyle:{}}},donut:{type:"pie",series:{radius:["45%","70%"]}},hbar:{type:"bar",horizontal:!0},stackedBar:{type:"bar",series:{stack:"total"}},stackedHbar:{type:"bar",horizontal:!0,series:{stack:"total"}},stackedArea:{type:"line",series:{areaStyle:{},stack:"total"}}},a=[0,"10%"],i={pie:1,funnel:1,gauge:1,radar:1,treemap:1,sunburst:1,sankey:1,graph:1,tree:1,themeRiver:1},o={radar:"radar",treemap:"treemap",heatmap:"heatmap"};function l(P){return P.type==="bar"||!!(P.series&&(P.series.stack||P.series.areaStyle))}var s={bar:1,line:1,scatter:1};function c(P,q,G){var W=P&&typeof P=="object"?P:{},Z={name:null,type:q.type,series:q.series,axis:"left"},Q=q.binding==="cartesian"&&q.cartesian&&!q.horizontal&&s[q.type];if((W.type||W.axis==="right")&&!Q)return G.warn("a series can only be drawn its own way, or on the right axis, on a vertical bar, line, area or scatter chart ("+b(P)+" ignored)"),Z;var U=Z;if(W.type){var K=w(W.type);!s[K.type]||K.horizontal?G.warn("a series cannot be drawn as "+W.type+" on this chart ("+b(P)+" kept as "+q.type+")"):U={name:W.type,type:K.type,series:K.series,axis:"left"}}return W.axis==="right"&&(U=F({},U,{axis:"right"})),U}function f(P,q,G){if(!(!q||typeof q!="object")){q.color&&(P.itemStyle=F(P.itemStyle||{},{color:q.color}),P.type==="line"&&(P.lineStyle=F(P.lineStyle||{},{color:q.color}))),q.markers!=null&&(P.type==="line"||P.type==="scatter")&&(P.showSymbol=q.markers!==!1);var W=q.fill&&q.fill.opacity;if(W!=null){var Z=Number(W);if(!Number.isFinite(Z)||Z<0||Z>1){G.warn("fill.opacity must be between 0 and 1 ("+b(q)+")");return}P.areaStyle&&(P.areaStyle=F({},P.areaStyle,{opacity:Z}))}}}function h(P,q,G){if(!(!q||typeof q!="object"||!q.line)){if(P.type!=="line"){G.warn("line style applies to a line ("+b(q)+" is drawn as "+P.type+")");return}var W=X({type:H(q.line.style),width:z(q.line.width,G)});W&&(P.lineStyle=F(P.lineStyle||{},W))}}function v(P){return"__band"+P}function p(P,q){return!Array.isArray(q)||!q.length?P:P.map(function(G){var W=F({},G);return q.forEach(function(Z,Q){var U=m(G[Z&&Z.low]),K=m(G[Z&&Z.high]);W[v(Q)]=U===null||K===null?null:K-U}),W})}function m(P){if(P==null||P==="")return null;var q=Number(P);return isFinite(q)?q:null}function y(P,q,G,W){var Z=[];return P.forEach(function(Q,U){if(!Q||!Q.low||!Q.high){W.warn("a band needs both low and high (band "+(U+1)+" ignored)");return}var K=Q.name!=null?Q.name:"Range",se="__band"+U,ge=Q.color,ue=Q.opacity!=null?Number(Q.opacity):.15;(!isFinite(ue)||ue<0||ue>1)&&(W.warn("band opacity must be between 0 and 1 (band "+(U+1)+")"),ue=.15);var de={type:"line",name:K,stack:se,symbol:"none",showSymbol:!1,lineStyle:{opacity:0},emphasis:{disabled:!0},z:1},me=F({},de,{encode:q?{x:q,y:Q.low}:{y:Q.low},silent:!0,tooltip:{show:!1}}),ae=F({},de,{encode:q?{x:q,y:v(U)}:{y:v(U)},areaStyle:X({color:ge,opacity:ue}),tooltip:{valueFormatter:function(ye,nt){var be=G[nt]||{},Te=m(be[Q.low]),Me=m(be[Q.high]);return Te===null||Me===null?"–":Te+" – "+Me}}});ge&&(me.itemStyle={color:ge},ae.itemStyle={color:ge}),Z.push(me,ae)}),Z}function x(P){return P&&typeof P=="object"?P.field:P}function b(P){return P&&typeof P=="object"?P.name!=null?P.name:P.field:P}function w(P){if(!P)return{type:void 0,cartesian:!0,horizontal:!1,series:null,binding:"cartesian"};var q=n[P],G=q?q.type:P;return{type:G,cartesian:!i[G],horizontal:!!(q&&q.horizontal),series:q&&q.series||null,binding:o[G]||(i[G]?"nameValue":"cartesian")}}function C(P,q){for(var G={},W=[],Z=0;Z<(P||[]).length;Z++){var Q=P[Z][q],U=String(Q);G[U]||(G[U]=1,W.push(Q))}return W}function A(P,q,G,W){if(G){if(q==="line"){var Z=X({width:z(G.width,W)});Z&&(P.lineStyle=F(P.lineStyle||{},Z)),G.symbol!=null&&(P.symbol=G.symbol),G.showSymbol!=null&&(P.showSymbol=G.showSymbol!==!1),G.symbolSize!=null&&(P.symbolSize=G.symbolSize),G.smooth!=null&&(P.smooth=G.smooth)}else if(q==="bar"){var Q={};G.border&&G.border.radius!=null&&(Q.borderRadius=z(G.border.radius,W)),G.gap&&P.stack&&(G.gap.color!=null&&(Q.borderColor=G.gap.color),G.gap.width!=null&&(Q.borderWidth=z(G.gap.width,W))),Object.keys(Q).length&&(P.itemStyle=F(P.itemStyle||{},Q))}else if(q==="scatter")G.symbolSize!=null&&(P.symbolSize=G.symbolSize);else if(q==="pie"){var U={};G.border&&(G.border.color!=null&&(U.borderColor=G.border.color),G.border.width!=null&&(U.borderWidth=z(G.border.width,W))),Object.keys(U).length&&(P.itemStyle=F(P.itemStyle||{},U)),G.label&&G.label.font&&G.label.font.color!=null&&(P.label=F(P.label||{},{color:G.label.font.color}))}}}function M(P,q,G){if(P){var W={show:P.show!==!1};if(P.line&&(W.axisLine=X({show:P.line.show!==!1,lineStyle:X({color:P.line.color,width:z(P.line.width,q),type:H(P.line.style)})})),P.grid&&(W.splitLine=X({show:!!P.grid.show,lineStyle:X({color:P.grid.color,width:z(P.grid.width,q),type:H(P.grid.style)})})),P.ticks){var Z=P.ticks;W.axisTick=X({show:Z.show!==!1,length:z(Z.length,q),lineStyle:X({color:Z.color})}),W.axisLabel=X(F({show:Z.show!==!1,rotate:Z.angle,margin:z(Z.margin,q),interval:Z.interval,formatter:Z.formatter},R(Z.font,q,G+".ticks.font")))}return P.title&&(W.name=P.title.text,W.nameTextStyle=R(P.title.font,q,G+".title.font"),P.title.margin&&(W.nameGap=z(P.title.margin.top||P.title.margin.bottom||P.title.margin.left||P.title.margin.right,q))),P.boundaryGap!==void 0&&(W.boundaryGap=P.boundaryGap),P.scale!==void 0&&(W.scale=P.scale),X(W)}}function R(P,q,G){if(P){var W={fontFamily:P.family,fontSize:z(P.size,q),fontWeight:P.weight,fontStyle:P.style,color:Y(P.color,P.opacity),lineHeight:z(P.lineHeight,q),align:P.align};return["letterSpacing","transform","decoration","variant"].forEach(function(Z){P[Z]!=null&&q.warn(G+"."+Z+" has no ECharts equivalent (dropped)")}),X(W)}}function E(P,q,G){if(P){var W={};if(P.background&&(P.background.color&&(W.backgroundColor=Y(P.background.color,P.background.opacity)),P.background.image&&q.warn(G+".background.image has no ECharts equivalent (dropped)")),P.border){var Z=P.border;Z.color!=null&&(W.borderColor=Z.color),Z.width!=null&&(W.borderWidth=z(Z.width,q)),Z.radius!=null&&(W.borderRadius=z(Z.radius,q)),Z.style!=null&&(Z.style==="double"&&q.warn(G+'.border.style "double" has no ECharts equivalent (using solid)'),W.borderType=Z.style==="double"?"solid":Z.style)}if(P.shadow){var Q=P.shadow;Q.blur!=null&&(W.shadowBlur=z(Q.blur,q)),Q.color!=null&&(W.shadowColor=Q.color),Q.x!=null&&(W.shadowOffsetX=z(Q.x,q)),Q.y!=null&&(W.shadowOffsetY=z(Q.y,q)),Q.spread!=null&&q.warn(G+".shadow.spread has no ECharts equivalent (dropped)")}return P.opacity!=null&&q.warn(G+".opacity on a container has no ECharts equivalent — use a color alpha (dropped)"),X(W)}}function N(P,q){if(!P)return{};var G={};switch(P.position){case"top":G.top=0,G.left="center";break;case"bottom":G.bottom=0,G.left="center";break;case"left":G.left=0,G.top="middle",G._vertical=!0;break;case"right":G.right=0,G.top="middle",G._vertical=!0;break;case"center":G.left="center",G.top="middle";break;case"top-left":G.top=0,G.left=0,G._corner=!0;break;case"top-right":G.top=0,G.right=0,G._corner=!0;break;case"bottom-left":G.bottom=0,G.left=0,G._corner=!0;break;case"bottom-right":G.bottom=0,G.right=0,G._corner=!0;break}return P.margin&&(P.margin.top!=null&&(G.top=z(P.margin.top,q)),P.margin.right!=null&&(G.right=z(P.margin.right,q)),P.margin.bottom!=null&&(G.bottom=z(P.margin.bottom,q)),P.margin.left!=null&&(G.left=z(P.margin.left,q))),P.align&&!G._corner&&(G._vertical?G.top=P.align==="start"?"top":P.align==="end"?"bottom":"middle":G.left=P.align==="start"?"left":P.align==="end"?"right":"center"),G}function L(P){var q={};return["left","top","right","bottom"].forEach(function(G){P[G]!==void 0&&(q[G]=P[G])}),q}function O(P,q,G){var W={};return["top","right","bottom","left"].forEach(function(Z){var Q=P&&P[Z]!=null?z(P[Z],G):void 0,U=q&&q[Z]!=null?z(q[Z],G):void 0,K=V(Q,U);K!==void 0&&(W[Z]=K)}),W}function I(P){if(!(!P||!P.position))return P.position==="center"?"inside":P.position}function z(P,q){if(P!=null){if(typeof P=="number")return P;var G=String(P).trim();if(!(G===""||G==="auto")){if(G.charAt(G.length-1)==="%")return G;var W=G.match(/^(-?[\d.]+)(px|rem|em|pt)?$/);if(W){var Z=parseFloat(W[1]),Q=W[2]||"px",U=q&&q.root||16;return Q==="rem"||Q==="em"?Z*U:Q==="pt"?Z*(96/72):Z}}}}function V(P,q){return P===void 0?q:q===void 0?P:typeof P=="number"&&typeof q=="number"?P+q:P}function Y(P,q){if(P!=null){if(q==null)return P;var G=/^#([0-9a-f]{6})$/i.exec(P),W=/^#([0-9a-f]{3})$/i.exec(P),Z,Q,U;if(G){var K=parseInt(G[1],16);Z=K>>16&255,Q=K>>8&255,U=K&255}else if(W){var se=W[1];Z=parseInt(se[0]+se[0],16),Q=parseInt(se[1]+se[1],16),U=parseInt(se[2]+se[2],16)}else return P;return"rgba("+Z+","+Q+","+U+","+q+")"}}function H(P){if(P!=null)return P==="solid"||P==="dashed"||P==="dotted"?P:void 0}function F(P){for(var q=1;q<arguments.length;q++){var G=arguments[q];if(G)for(var W in G)G[W]!==void 0&&(P[W]=G[W])}return P}function X(P){if(P){var q={},G=!1;for(var W in P)P[W]!==void 0&&(q[W]=P[W],G=!0);return G?q:void 0}}return YD=r,YD}var $D,XG;function VRe(){if(XG)return $D;XG=1;function e(r){r=r||{};var n=r.chartOptions||{},a=t(r.width,n.width,"100%"),i=t(r.height,n.height,320),o=t(r.top,n.top),l=t(r.left,n.left),s={width:a,height:i};return(o!==void 0||l!==void 0)&&(s.position="absolute",o!==void 0&&(s.top=o),l!==void 0&&(s.left=l)),Object.assign(s,r.style)}function t(){for(var r=0;r<arguments.length;r++)if(arguments[r]!==void 0&&arguments[r]!==null)return arguments[r]}return $D=e,$D}var WD,ZG;function FRe(){if(ZG)return WD;ZG=1;var e=Dd(),t=eI(),r=Hq(),n=VRe();function a(i){i=i||{};var o=e.useMemo(function(){return r(i.chartOptions||{})},[i.chartOptions]);e.useEffect(function(){var s=o.warnings;if(!(!s||!s.length)){if(typeof i.onWarnings=="function"){i.onWarnings(s);return}!i.silent&&typeof console<"u"&&console.warn&&console.warn("[XeplrChart] "+s.length+" unmapped chart propert"+(s.length>1?"ies":"y")+`:
74
+ `+s.join(`
75
+ `))}},[o]);var l=t(o.option,{theme:i.theme,renderer:i.renderer,optimize:i.optimize,onEvents:i.onEvents,notMerge:i.notMerge});return e.createElement("div",{ref:l.containerRef,className:i.className,style:n(i)})}return WD=a,WD}var Hx={exports:{}},KG;function GRe(){if(KG)return Hx.exports;KG=1;function e(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}function t(r,n){if(!e(r)||!e(n))return n===void 0?r:n;var a={},i;for(i in r)a[i]=r[i];for(i in n)e(a[i])&&e(n[i])?a[i]=t(a[i],n[i]):a[i]=n[i];return a}return Hx.exports=t,Hx.exports.isPlainObject=e,Hx.exports}var qD,QG;function Uq(){if(QG)return qD;QG=1;var e=GRe(),t=["renderer","theme"];function r(s){var c=n(s||{},t),f=c.xAxis!==void 0||c.yAxis!==void 0;Array.isArray(c.data)&&c.dataset===void 0&&(c.dataset={source:c.data}),delete c.data;var h=null,v=null;if(c.xAxis!==void 0){var p=i(c.xAxis,"category");c.xAxis=p.axis,h=p.field}if(c.yAxis!==void 0){var m=i(c.yAxis,"value");c.yAxis=m.axis,v=m.field}var y=0;if(c.series!==void 0){var x=a(c.series).map(function(w){return o(w,{xField:h,yField:v})});c.series=x,y=x.length}var b=l(f,y);return e(b,c)}function n(s,c){var f={};for(var h in s)c.indexOf(h)===-1&&(f[h]=s[h]);return f}function a(s){return Array.isArray(s)?s.slice():[s]}function i(s,c){if(Array.isArray(s)){var f=null,h=s.map(function(m){var y=i(m,c);return f===null&&(f=y.field),y.axis});return{axis:h,field:f}}var v={};for(var p in s)p!=="field"&&(v[p]=s[p]);return v.type===void 0&&(v.type=c),{axis:v,field:s&&s.field!=null?s.field:null}}function o(s,c){var f={};for(var h in s)h!=="field"&&h!=="categoryField"&&h!=="nameField"&&(f[h]=s[h]);var v=s.field,p=s.categoryField!=null?s.categoryField:s.nameField;return v!=null&&f.encode===void 0&&(c.xField!=null?f.encode={x:c.xField,y:v}:c.yField!=null?f.encode={y:c.yField,x:v}:p!=null?f.encode={itemName:p,value:v}:f.encode={value:v}),f}function l(s,c){var f={animation:!0};return s?(f.grid={left:"3%",right:"4%",bottom:"3%",top:48,containLabel:!0},f.tooltip={trigger:"axis"}):f.tooltip={trigger:"item"},c>1&&(f.legend={}),f}return qD=r,qD}var XD,JG;function HRe(){if(JG)return XD;JG=1;var e=Dd(),t=eI(),r=Uq();function n(a){a=a||{};var i=e.useMemo(function(){return r(a.spec)},[a.spec]),o=t(i,{theme:a.theme,renderer:a.renderer,optimize:a.optimize,onEvents:a.onEvents,notMerge:a.notMerge}),l=Object.assign({width:"100%",height:a.height!=null?a.height:320},a.style);return e.createElement("div",{ref:o.containerRef,className:a.className,style:l})}return XD=n,XD}var ZD,eH;function URe(){return eH||(eH=1,ZD={XeplrChart:FRe(),chartOptionsToOption:Hq(),Chart:HRe(),buildOption:Uq(),useECharts:eI(),echarts:Gq()}),ZD}var YRe=URe();const tH={text:"--xm-muted",line:"--xm-line",muted:"--xm-off",s1:"--xm-series-1",s2:"--xm-series-2",bad:"--xm-bad",warn:"--xm-busy"};function Yq(){const e=j.useRef(null),[t,r]=j.useState({});return j.useEffect(()=>{if(!e.current||typeof getComputedStyle!="function")return;const n=getComputedStyle(e.current),a={};Object.keys(tH).forEach(i=>{const o=n.getPropertyValue(tH[i]).trim();o&&(a[i]=o)}),r(a)},[]),[e,t]}function $q({h:e}){return _.jsx("div",{className:"xeplr-monitor-tabs xeplr-monitor-ranges",role:"tablist","aria-label":"Time range",children:e.ranges.map(t=>_.jsx("button",{type:"button",role:"tab","aria-selected":e.range===t.key,onClick:()=>e.setRange(t.key),children:t.label},t.key))})}function hc({title:e,note:t,options:r,height:n=200}){const a=!r.data.length;return _.jsxs("figure",{className:"xeplr-monitor-chart",children:[_.jsxs("figcaption",{children:[_.jsx("b",{children:e}),t?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" · ",t]}):null]}),a?_.jsx("p",{className:"xeplr-monitor-muted xeplr-monitor-chart-empty",children:"Nothing recorded in this range yet."}):_.jsx(YRe.XeplrChart,{chartOptions:r,height:n})]})}function $Re({title:e,text:t}){return _.jsxs("figure",{className:"xeplr-monitor-chart",children:[_.jsx("figcaption",{children:_.jsx("b",{children:e})}),_.jsx("p",{className:"xeplr-monitor-muted xeplr-monitor-chart-empty",children:t})]})}function WRe({list:e}){return e.length?_.jsx("dl",{className:"xeplr-monitor-facts xeplr-monitor-highlights",children:e.map(t=>_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:t.label}),_.jsxs("dd",{children:[t.value,t.at?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" at ",t.at]}):null]})]},t.label))}):null}function Wq({h:e,title:t}){return _.jsxs("div",{className:"xeplr-monitor-head",children:[_.jsx("b",{className:"xeplr-monitor-grow",children:t}),e.loading?_.jsx("span",{className:"xeplr-monitor-muted",children:"Reading…"}):null,_.jsx($q,{h:e})]})}function qRe({h:e}){const[t,r]=Yq(),n=e.data;return _.jsxs("section",{id:"xeplr-monitor-history",className:"xeplr-monitor-card",ref:t,children:[_.jsx(Wq,{h:e,title:"History"}),e.error?_.jsx("p",{className:"xeplr-monitor-bad",children:e.error}):null,n?_.jsxs(_.Fragment,{children:[_.jsx(WRe,{list:Boe(n)}),_.jsxs("div",{className:"xeplr-monitor-charts",children:[_.jsx(hc,{title:"Memory",note:"the highest each "+bS(n.stepSeconds)+"; a dot where it went higher between readings",options:Noe(n,r)}),_.jsx(hc,{title:"CPU",note:"100% is one core",options:kU(n,r)}),n.hits.length?_.jsx(hc,{title:"Requests",note:"per "+bS(n.stepSeconds),options:Loe(n,r)}):null,n.hits.length?_.jsx(hc,{title:"Response time",options:Ioe(n,r)}):null,n.logs.some(a=>a.warnings||a.errors)?_.jsx(hc,{title:"Warnings and errors in its log",note:"per "+bS(n.stepSeconds),options:Ooe(n,r)}):_.jsx($Re,{title:"Warnings and errors in its log",text:"None in this range."})]}),n.hits.length?null:_.jsx("p",{className:"xeplr-monitor-muted xeplr-monitor-small",children:'No requests in its log in this range. Requests are counted from lines like "← GET /orders 200 12ms", which every xeplr app writes.'})]}):_.jsx("p",{className:"xeplr-monitor-muted",children:e.loading?"Reading…":""})]})}function XRe({h:e}){const[t,r]=Yq(),n=e.data;return _.jsxs("section",{id:"xeplr-monitor-server-history",className:"xeplr-monitor-card",ref:t,children:[_.jsx(Wq,{h:e,title:"Over time"}),e.error?_.jsx("p",{className:"xeplr-monitor-bad",children:e.error}):null,n?_.jsxs("div",{className:"xeplr-monitor-charts",children:[_.jsx(hc,{title:"Memory",note:"the highest each "+bS(n.stepSeconds),options:koe(n,r)}),_.jsx(hc,{title:"CPU",note:"all cores together",options:Poe(n,r)})]}):null]})}function bS(e){return e<=60?"minute":e<3600?e/60+" minutes":e/3600+(e===3600?" hour":" hours")}const ZRe=[{accessor:"service",header:"Service"},{accessor:"method",header:"Method"},{accessor:"path",header:"Address",cell:e=>_.jsx("code",{title:e.row.original.path,children:e.row.original.path})},{accessor:"hits",header:"Requests",cell:e=>e.row.original.hits.toLocaleString()},{accessor:"failed",header:"Failed (5xx)"},{accessor:"refused",header:"Refused (4xx)"},{accessor:"errorShare",header:"Not answered",cell:e=>e.row.original.errorShare+"%"},{accessor:"avgMs",header:"Average",cell:e=>e.row.original.avgMs===null?"—":e.row.original.avgMs+" ms"},{accessor:"maxMs",header:"Slowest",cell:e=>e.row.original.maxMs===null?"—":e.row.original.maxMs+" ms"}];function KRe({t:e,services:t}){const r=[{value:"",label:"Every service"}].concat((t||[]).map(a=>({value:a.unit,label:a.label}))),n=zoe(e.data&&e.data.addresses);return _.jsx("div",{className:"xeplr-monitor-body is-one",children:_.jsxs("section",{id:"xeplr-monitor-traffic",className:"xeplr-monitor-card",children:[_.jsxs("div",{className:"xeplr-monitor-head",children:[_.jsxs("div",{className:"xeplr-monitor-grow",children:[_.jsx("h1",{className:"xeplr-monitor-h1",children:"Requests"}),_.jsx("span",{className:"xeplr-monitor-muted",children:"What each service's log says it was asked, busiest first. Ids in an address show as :id."})]}),_.jsx("div",{className:"xeplr-monitor-level",children:_.jsx(mU,{options:r,value:e.unit,searchable:!1,onChange:a=>e.setUnit(a||"")})}),_.jsx($q,{h:e})]}),e.error?_.jsx("p",{className:"xeplr-monitor-bad",children:e.error}):null,e.data?_.jsx("div",{className:"xeplr-monitor-tablebox",children:n.length?_.jsx(Sm,{data:n,schema:{0:{key:"traffic",columns:ZRe}},pageSize:50,rowClassName:a=>a.failed?"xeplr-monitor-row-bad":""}):_.jsx("p",{className:"xeplr-monitor-muted",children:`No requests in this range. They are counted from lines like "← GET /orders 200 12ms" in a service's log, which every xeplr app writes.`})}):_.jsx("p",{className:"xeplr-monitor-muted",children:e.loading?"Reading…":""})]})})}const QRe=[{selector:"#xeplr-monitor-services",label:'The services list (id="xeplr-monitor-services")',when:e=>e.view==="services"},{selector:"#xeplr-monitor-add",label:'The "Add a service" button (id="xeplr-monitor-add")',when:e=>e.view==="services"},{selector:"#xeplr-monitor-add-unit input",label:'The service name input, inside id="xeplr-monitor-add-unit", while adding',when:e=>!!e.adding},{selector:'[data-xeplr-action="restart"]',label:'A Restart button (data-xeplr-action="restart") for the selected service',when:e=>!!e.selected},{selector:"#xeplr-monitor-log",label:'The log (id="xeplr-monitor-log") for the selected service',when:e=>!!e.selected},{selector:"#xeplr-monitor-history",label:'The history (id="xeplr-monitor-history") for the selected service',when:e=>!!e.selected&&e.view==="services"},{selector:"#xeplr-monitor-traffic",label:'The requests (id="xeplr-monitor-traffic") on the Requests tab',when:e=>e.view==="traffic"},{selector:"#xeplr-monitor-audit",label:'The audit list (id="xeplr-monitor-audit")',when:e=>e.view==="audit"&&!!e.audit}],JRe=[{selector:"#xeplr-monitor-memory",label:'The memory (id="xeplr-monitor-memory")',when:e=>!!(e.stats&&e.stats.linux)},{selector:"#xeplr-monitor-disks",label:'The disks (id="xeplr-monitor-disks")',when:e=>!!(e.stats&&e.stats.linux)}],e2e=[{selector:"#xeplr-monitor-connection-add",label:'The "Add a connection" button (id="xeplr-monitor-connection-add")'},{selector:"#xeplr-monitor-connections",label:'The connections list (id="xeplr-monitor-connections")',when:e=>!!e.list},{selector:'#xeplr-monitor-connection-form input[type="password"]',label:'A password-type input for the secrets, inside id="xeplr-monitor-connection-form"',when:e=>!!e.draft}];function t2e({c:e,logs:t,settings:r,history:n,traffic:a,title:i="Monitor"}){return _.jsxs("div",{className:"xeplr-monitor",children:[_.jsxs("header",{className:"xeplr-monitor-top",children:[_.jsx("b",{className:"xeplr-monitor-brand",children:i}),_.jsxs("nav",{className:"xeplr-monitor-tabs",role:"tablist",children:[_.jsx("button",{type:"button",role:"tab","aria-selected":e.view==="services",onClick:e.showServices,children:"Services"}),a?_.jsx("button",{type:"button",role:"tab","aria-selected":e.view==="traffic",onClick:e.showTraffic,children:"Requests"}):null,_.jsx("button",{type:"button",role:"tab","aria-selected":e.view==="audit",onClick:e.showAudit,children:"Audit log"})]}),_.jsx("span",{className:"xeplr-monitor-grow"})]}),e.view==="audit"?_.jsx(h2e,{c:e}):e.view==="traffic"&&a?_.jsx(KRe,{t:a,services:e.list}):_.jsxs("div",{className:"xeplr-monitor-body",children:[_.jsx(r2e,{c:e,settings:r}),_.jsx("main",{className:"xeplr-monitor-main",children:e.selected?_.jsx(n2e,{c:e,s:e.selected,logs:t,history:n}):_.jsx("div",{className:"xeplr-monitor-empty",children:_.jsx("p",{children:e.loading?"Loading…":e.list&&e.list.length?"Choose a service on the left.":"No services yet. Add one: the name of its systemd service, e.g. xeplr-bi-api."})})})]}),e.adding?_.jsx(d2e,{c:e,settings:r}):null,e.editing?_.jsx(v2e,{c:e}):null]})}function tI({tone:e}){return _.jsx("span",{className:"xeplr-monitor-dot is-"+e,"aria-hidden":"true"})}function r2e({c:e,settings:t}){return _.jsxs("aside",{className:"xeplr-monitor-side",children:[_.jsxs("div",{className:"xeplr-monitor-side-head",children:[_.jsx("b",{children:"Services"}),_.jsx("button",{type:"button",id:"xeplr-monitor-add",onClick:e.openAdd,children:"+ Add a service"})]}),e.loadError?_.jsx("p",{className:"xeplr-monitor-bad",children:e.loadError}):null,_.jsx("ul",{id:"xeplr-monitor-services",className:"xeplr-monitor-list","aria-label":"Services",children:(e.list||[]).map(r=>{const n=Tg(r.status);return _.jsx("li",{children:_.jsxs("button",{type:"button",className:"xeplr-monitor-item"+(e.selectedUnit===r.unit?" is-on":""),"aria-current":e.selectedUnit===r.unit,onClick:()=>e.select(r.unit),children:[_.jsxs("span",{className:"xeplr-monitor-item-top",children:[_.jsx(tI,{tone:n.tone}),_.jsx("b",{children:r.label}),e.busy[r.unit]?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" · ",e.busy[r.unit],"…"]}):null]}),_.jsxs("span",{className:"xeplr-monitor-item-sub",children:[n.text,r.status&&r.status.since?" · "+_m(r.status.since):"",r.status&&r.status.memoryBytes?" · "+Ai(r.status.memoryBytes):"",r.status&&r.status.cpuPercent!==null&&r.status.cpuPercent!==void 0?" · CPU "+nd(r.status.cpuPercent):""]}),MS(r.status,r.processes).length?_.jsxs("span",{className:"xeplr-monitor-item-warn",children:[MS(r.status,r.processes).length," to look at"]}):null,r.statusError?_.jsx("span",{className:"xeplr-monitor-bad",children:r.statusError}):null]})},r.unit)})})]})}function n2e({c:e,s:t,logs:r,history:n}){const a=Tg(t.status),i=t.status||{},o=e.actionsFor(t),l=e.busy[t.unit],s=[["State",i.subState?a.text+" ("+i.state+" / "+i.subState+")":a.text],[i.state==="active"?"Running for":"Stopped for",_m(i.since)],["Main process",i.pid||"—"],["Memory",Qie(i)],["Memory at most",Ai(i.memoryPeakBytes)],["CPU now",nd(i.cpuPercent)],["CPU used in all",i.cpuSeconds===null||i.cpuSeconds===void 0?"—":i.cpuSeconds+" s"],["Processes · threads",(t.processes?t.processes.length:"—")+" · "+(i.tasks===null||i.tasks===void 0?"—":i.tasks+(i.tasksMax?" of "+i.tasksMax:""))],["Swap",i.swapBytes?Ai(i.swapBytes):"none"],["Restarts",i.restarts===null||i.restarts===void 0?"—":i.restarts],["Last ended",i.result&&i.result!=="success"?EU(i.result)+(i.exitStatus?" (exit "+i.exitStatus+")":""):"normally"],["Restarts by itself",i.restartPolicy&&i.restartPolicy!=="no"?"yes ("+i.restartPolicy+")":"no"],["At boot",i.enabled||"—"]];return _.jsxs(_.Fragment,{children:[_.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsxs("div",{className:"xeplr-monitor-head",children:[_.jsxs("div",{className:"xeplr-monitor-grow",children:[_.jsxs("h1",{className:"xeplr-monitor-h1",children:[_.jsx(tI,{tone:a.tone}),t.label]}),_.jsxs("span",{className:"xeplr-monitor-muted",children:[t.unit,i.description?" · "+i.description:""]})]}),_.jsxs("div",{className:"xeplr-monitor-actions",children:[_.jsx("button",{type:"button","data-xeplr-action":"start",disabled:!o.start||!!l,onClick:()=>e.ask(t.unit,"start"),children:"Start"}),_.jsx("button",{type:"button","data-xeplr-action":"restart",disabled:!o.restart||!!l,onClick:()=>e.ask(t.unit,"restart"),children:l==="restart"?"Restarting…":"Restart"}),_.jsx("button",{type:"button","data-xeplr-action":"stop",disabled:!o.stop||!!l,onClick:()=>e.ask(t.unit,"stop"),title:o.own?"This is the monitor itself":"",children:"Stop"}),_.jsx("button",{type:"button","data-xeplr-action":"kill",className:"is-danger",disabled:!o.kill||!!l,onClick:()=>e.ask(t.unit,"kill"),title:o.own?"This is the monitor itself":"Ends every process of it at once",children:"Kill"}),_.jsx("button",{type:"button",className:"xeplr-monitor-link",onClick:()=>e.openEdit(t),children:"Edit"})]})]}),_.jsx(a2e,{list:MS(i,t.processes),running:i.state==="active"}),_.jsx("dl",{className:"xeplr-monitor-facts",children:s.map(c=>_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:c[0]}),_.jsx("dd",{children:c[1]})]},c[0]))}),_.jsx(i2e,{runs:i.runs})]}),n?_.jsx(qRe,{h:n}):null,t.processes&&t.processes.length?_.jsx(l2e,{list:t.processes,mainPid:i.pid}):null,_.jsx(s2e,{logs:r})]})}function a2e({list:e,running:t}){return t?e.length?_.jsx("ul",{className:"xeplr-monitor-concerns","aria-label":"Needs a look",children:e.map(r=>_.jsx("li",{children:r},r))}):_.jsx("p",{className:"xeplr-monitor-healthy",children:"Nothing to look at: memory, CPU, restarts and processes are all fine."}):null}function i2e({runs:e}){return e?_.jsxs("dl",{className:"xeplr-monitor-runs",children:[(e.commands||[]).map((t,r)=>_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:r?"Then runs":"Runs"}),_.jsx("dd",{children:_.jsx("code",{children:t.command})})]},r)),_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:"In folder"}),_.jsx("dd",{children:_.jsx("code",{children:e.workingDirectory||"/"})})]}),_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:"As user"}),_.jsx("dd",{children:e.user})]}),e.unitFile?_.jsxs("div",{className:"xeplr-monitor-fact",children:[_.jsx("dt",{children:"Unit file"}),_.jsx("dd",{children:_.jsx("code",{children:e.unitFile})})]}):null]}):null}const o2e=[{accessor:"pid",header:"PID",cell:e=>_.jsxs(_.Fragment,{children:[e.row.original.pid,e.row.original.main?_.jsx("span",{className:"xeplr-monitor-muted",children:" main"}):null]})},{accessor:"command",header:"Command",cell:e=>_.jsx("code",{title:e.row.original.command,children:e.row.original.command})},{accessor:"memoryBytes",header:"Memory",cell:e=>_.jsxs(_.Fragment,{children:[Ai(e.row.original.memoryBytes),e.row.original.swapBytes?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" +",Ai(e.row.original.swapBytes)," swap"]}):null]})},{accessor:"cpuPercent",header:"CPU",cell:e=>nd(e.row.original.cpuPercent)},{accessor:"threads",header:"Threads"},{accessor:"state",header:"State",cell:e=>eoe(e.row.original.state)},{accessor:"startedAt",header:"Running for",cell:e=>_m(e.row.original.startedAt)}];function l2e({list:e,mainPid:t}){const r=e.map(n=>Object.assign({id:n.pid,main:n.pid===t},n));return _.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsx("b",{children:"Processes"})," ",_.jsxs("span",{className:"xeplr-monitor-muted",children:["· ",e.length,", the main one first"]}),_.jsx("div",{id:"xeplr-monitor-processes",className:"xeplr-monitor-tablebox",children:_.jsx(Sm,{data:r,schema:{0:{key:"processes",columns:o2e}},enableFiltering:!1,enablePagination:!1,showToolbar:!1,rowClassName:n=>n.state==="D"||n.state==="Z"?"xeplr-monitor-row-bad":""})})]})}function s2e({logs:e}){const t=j.useRef(null),r=j.useRef(!0);j.useEffect(()=>{t.current&&r.current&&(t.current.scrollTop=t.current.scrollHeight)},[e.lines]);const n=()=>{const i=t.current;i&&(r.current=i.scrollHeight-i.scrollTop-i.clientHeight<40)},a=e.mode==="live";return _.jsxs("section",{className:"xeplr-monitor-card xeplr-monitor-logcard",children:[_.jsxs("div",{className:"xeplr-monitor-logbar",children:[_.jsxs("div",{className:"xeplr-monitor-tabs",role:"tablist",children:[_.jsx("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>e.setMode("live"),children:"Live"}),_.jsx("button",{type:"button",role:"tab","aria-selected":!a,onClick:()=>e.setMode("history"),children:"History"})]}),_.jsx("div",{className:"xeplr-monitor-search",children:_.jsx(wg,{type:"search",placeholder:"Search the log…",value:e.grep,onChange:e.setGrep})}),_.jsx("div",{className:"xeplr-monitor-level",children:_.jsx(mU,{options:toe,value:e.level||"all",searchable:!1,onChange:i=>e.setLevel(i&&i!=="all"?i:"")})}),_.jsx("span",{className:"xeplr-monitor-grow"}),_.jsx(c2e,{logs:e}),a?e.paused?_.jsxs("button",{type:"button",onClick:e.resume,children:["Resume",e.held?" ("+e.held+" new)":""]}):_.jsx("button",{type:"button",onClick:e.pause,children:"Pause"}):null,_.jsx("button",{type:"button",className:"xeplr-monitor-link",onClick:e.clear,children:"Clear"})]}),a?null:_.jsx(u2e,{logs:e}),e.error?_.jsx("p",{className:"xeplr-monitor-bad",children:e.error}):null,_.jsx("div",{id:"xeplr-monitor-log",className:"xeplr-monitor-log",ref:t,onScroll:n,role:"log","aria-live":"off",children:e.lines.length?e.lines.map((i,o)=>_.jsxs("div",{className:"xeplr-monitor-line is-"+i.level,children:[_.jsx("span",{className:"xeplr-monitor-line-at",children:qie(i.at)}),_.jsx("span",{className:"xeplr-monitor-line-msg",children:i.message})]},(i.cursor||"")+o)):_.jsx("p",{className:"xeplr-monitor-muted",children:e.state==="loading"?"Reading…":e.total?"No line matches.":a?"Nothing yet. New lines appear here as they are written.":"No lines in that range."})}),_.jsxs("p",{className:"xeplr-monitor-muted xeplr-monitor-small",children:[e.lines.length===e.total?e.total+" lines":e.lines.length+" of "+e.total+" lines match",a?" · the newest 5,000 are kept here":""]})]})}function u2e({logs:e}){const[t,r]=j.useState(!1);return _.jsxs("form",{className:"xeplr-monitor-range",onSubmit:n=>{n.preventDefault(),e.readHistory()},children:[_.jsxs("div",{className:"xeplr-monitor-when",children:[_.jsxs("button",{type:"button","aria-expanded":t,onClick:()=>r(n=>!n),children:[gU(e.range.when)||"Any time"," ▾"]}),t?_.jsx("div",{className:"xeplr-monitor-when-panel",children:_.jsx(sne,{withTime:!0,value:e.range.when,onChange:n=>e.setRange({when:n}),onClose:()=>r(!1)})}):null]}),_.jsx("label",{children:"At most"}),_.jsx("div",{className:"xeplr-monitor-lines",children:_.jsx(Kre,{value:e.range.lines,min:1,max:5e3,decimals:0,onChange:n=>e.setRange({lines:n})})}),_.jsx("label",{children:"lines"}),_.jsx("button",{type:"submit",className:"xeplr-monitor-primary",children:"Read"})]})}function c2e({logs:e}){return e.mode!=="live"?null:e.state==="live"?_.jsxs("span",{className:"xeplr-monitor-pill is-good",children:[_.jsx(tI,{tone:"good"}),"Live"]}):e.state==="reconnecting"?_.jsx("span",{className:"xeplr-monitor-pill is-busy",children:"Reconnecting…"}):e.state==="loading"?_.jsx("span",{className:"xeplr-monitor-pill",children:"Opening…"}):e.state==="error"?_.jsx("span",{className:"xeplr-monitor-pill is-bad",children:"Stopped"}):null}const f2e=[{accessor:"at",header:"When",cell:e=>new Date(e.row.original.at).toLocaleString()},{accessor:"email",header:"Who",cell:e=>_.jsxs(_.Fragment,{children:[e.row.original.email||"—",e.row.original.ip?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" · ",e.row.original.ip]}):null]})},{accessor:"action",header:"What"},{accessor:"unit",header:"Service",cell:e=>e.row.original.unit||"—"},{accessor:"result",header:"Result"}];function h2e({c:e}){const t=(e.audit||[]).map((r,n)=>Object.assign({id:n,result:r.ok?"done":"refused: "+(r.error||"")},r));return _.jsx("div",{className:"xeplr-monitor-body is-one",children:_.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsx("h1",{className:"xeplr-monitor-h1",children:"Audit log"}),_.jsx("p",{className:"xeplr-monitor-muted",children:"Every sign-in and every change, refused ones too. Newest first."}),e.audit?_.jsx("div",{id:"xeplr-monitor-audit",className:"xeplr-monitor-tablebox",children:_.jsx(Sm,{data:t,schema:{0:{key:"audit",columns:f2e}},pageSize:50,rowClassName:r=>r.ok?"":"xeplr-monitor-row-bad"})}):_.jsx("p",{className:"xeplr-monitor-muted",children:"Loading…"})]})})}function qq({title:e,onClose:t,children:r}){return _.jsx("div",{className:"xeplr-monitor-scrim",onMouseDown:n=>{n.target===n.currentTarget&&t()},children:_.jsxs("div",{className:"xeplr-monitor-window",role:"dialog","aria-modal":"true","aria-label":e,onKeyDown:n=>{n.key==="Escape"&&t()},children:[_.jsx("h2",{children:e}),r]})})}function d2e({c:e,settings:t}){const r=e.adding;return _.jsx(qq,{title:"Add a service",onClose:e.closeAdd,children:_.jsxs("form",{onSubmit:e.saveAdd,children:[_.jsx("div",{id:"xeplr-monitor-add-unit",children:_.jsx(wg,{label:"Its systemd name",value:r.unit,placeholder:"e.g. xeplr-bi-api",maxLength:200,onChange:n=>e.editAdd({unit:n})})}),_.jsx("div",{id:"xeplr-monitor-add-label",children:_.jsx(wg,{label:"A name for it here (optional)",value:r.label,placeholder:"e.g. BI API (testbi)",maxLength:80,onChange:n=>e.editAdd({label:n})})}),_.jsx("p",{className:"xeplr-monitor-muted xeplr-monitor-small",children:"Any systemd service on this server. Adding it starts nothing."}),r.error?_.jsx("p",{className:"xeplr-monitor-bad",role:"alert",children:r.error}):null,_.jsxs("div",{className:"xeplr-monitor-row",children:[_.jsx("span",{}),_.jsxs("span",{className:"xeplr-monitor-row-right",children:[_.jsx("button",{type:"button",onClick:e.closeAdd,children:"Cancel"}),_.jsx("button",{type:"submit",className:"xeplr-monitor-primary",disabled:r.busy,children:r.busy?"Adding…":"Add"})]})]})]})})}function v2e({c:e}){const t=e.editing;return _.jsx(qq,{title:"Edit "+t.label,onClose:e.closeEdit,children:_.jsxs("form",{onSubmit:e.saveEdit,children:[_.jsx("div",{id:"xeplr-monitor-edit-label",children:_.jsx(wg,{label:"Name here",value:t.label,maxLength:80,onChange:r=>e.editEdit({label:r})})}),_.jsx("div",{id:"xeplr-monitor-edit-unit",children:_.jsx(wg,{label:"Its systemd name",value:t.newUnit,maxLength:200,onChange:r=>e.editEdit({newUnit:r})})}),t.error?_.jsx("p",{className:"xeplr-monitor-bad",role:"alert",children:t.error}):null,_.jsxs("div",{className:"xeplr-monitor-row",children:[_.jsx("button",{type:"button",className:"xeplr-monitor-link is-danger",onClick:e.removeEditing,children:"Stop watching it"}),_.jsxs("span",{className:"xeplr-monitor-row-right",children:[_.jsx("button",{type:"button",onClick:e.closeEdit,children:"Cancel"}),_.jsx("button",{type:"submit",className:"xeplr-monitor-primary",disabled:t.busy,children:"Save"})]})]})]})})}function p2e({s:e,history:t,title:r="Server"}){const n=e.stats;return _.jsxs("div",{className:"xeplr-monitor",children:[_.jsxs("header",{className:"xeplr-monitor-top",children:[_.jsx("b",{className:"xeplr-monitor-brand",children:r}),n?_.jsxs("span",{className:"xeplr-monitor-muted",children:[n.host.name," · ",n.host.os," · kernel ",n.host.kernel," · ",n.host.arch]}):null,_.jsx("span",{className:"xeplr-monitor-grow"}),n&&n.host.uptimeSeconds!==null?_.jsxs("span",{className:"xeplr-monitor-muted",children:["Up ",aoe(n.host.uptimeSeconds)]}):null]}),_.jsxs("div",{className:"xeplr-monitor-body is-one xeplr-monitor-server",children:[e.error?_.jsx("p",{className:"xeplr-monitor-bad",role:"alert",children:e.error}):null,n?n.linux?_.jsxs(_.Fragment,{children:[_.jsx(g2e,{list:uoe(n)}),_.jsx(m2e,{m:n.memory}),_.jsx(x2e,{s:e,total:n.memory&&n.memory.totalBytes}),t?_.jsx(XRe,{h:t}):null,_.jsxs("div",{className:"xeplr-monitor-server-row",children:[_.jsx(S2e,{c:n.cpu}),_.jsx(b2e,{disks:n.disks})]})]}):_.jsxs("p",{className:"xeplr-monitor-muted",children:["These numbers come from Linux. This server runs ",n.host.os,", so there is nothing to show."]}):_.jsx("p",{className:"xeplr-monitor-muted",children:e.loading?"Reading the server…":""})]})]})}function g2e({list:e}){return e.length?_.jsx("ul",{className:"xeplr-monitor-concerns","aria-label":"Needs a look",children:e.map(t=>_.jsx("li",{children:t},t))}):_.jsx("p",{className:"xeplr-monitor-healthy",children:"Nothing to look at: memory, swap, disks and load are all fine."})}function il({label:e,value:t,sub:r}){return _.jsxs("div",{className:"xeplr-monitor-tile",children:[_.jsx("span",{className:"xeplr-monitor-tile-label",children:e}),_.jsx("span",{className:"xeplr-monitor-tile-value",children:t}),r?_.jsx("span",{className:"xeplr-monitor-tile-sub",children:r}):null]})}function m2e({m:e}){const t=ioe(e);return _.jsxs("section",{id:"xeplr-monitor-memory",className:"xeplr-monitor-card",children:[_.jsx("b",{children:"Memory"}),_.jsxs("div",{className:"xeplr-monitor-tiles",children:[_.jsx(il,{label:"Total",value:Ar(e.totalBytes)}),_.jsx(il,{label:"Used",value:Ar(e.usedBytes),sub:ad(e.usedBytes,e.totalBytes)+"% of total"}),_.jsx(il,{label:"Cache & buffers",value:Ar(e.cacheBytes+e.buffersBytes),sub:"given back when needed"}),_.jsx(il,{label:"Free",value:Ar(e.freeBytes),sub:"not in use at all"}),_.jsx(il,{label:"Available",value:Ar(e.availableBytes),sub:"for new programs, without swapping"}),_.jsx(il,{label:"Swap",value:e.swapTotalBytes?Ar(e.swapUsedBytes):"none",sub:e.swapTotalBytes?"of "+Ar(e.swapTotalBytes)+" in use":"no swap set up"})]}),_.jsx("div",{className:"xeplr-monitor-stack",role:"img","aria-label":t.map(r=>r.label+" "+Ar(r.bytes)+" ("+r.percent+"%)").join(", "),children:t.map(r=>r.percent>0?_.jsx("span",{className:"xeplr-monitor-stack-part is-"+r.key,style:{flexBasis:r.percent+"%"},title:r.label+": "+Ar(r.bytes)+" ("+r.percent+"%)"},r.key):null)}),_.jsx("ul",{className:"xeplr-monitor-legend",children:t.map(r=>_.jsxs("li",{children:[_.jsx("span",{className:"xeplr-monitor-swatch is-"+r.key,"aria-hidden":"true"}),r.label," ",_.jsx("b",{children:Ar(r.bytes)})," ",_.jsxs("span",{className:"xeplr-monitor-muted",children:[r.percent,"%"]})]},r.key))}),_.jsx(y2e,{c:loe(e)})]})}function y2e({c:e}){return!e.kinds.length&&!e.groups.length?null:_.jsxs("div",{className:"xeplr-monitor-cache",id:"xeplr-monitor-cache",children:[_.jsxs("div",{children:[_.jsx("b",{children:"What the cache holds"})," ",_.jsxs("span",{className:"xeplr-monitor-muted",children:["· ",Ar(e.wholeBytes),", given back as soon as a program needs it"]}),_.jsx(rH,{rows:e.kinds,sub:t=>t.note})]}),e.groups.length?_.jsxs("div",{children:[_.jsx("b",{children:"For whom"})," ",_.jsx("span",{className:"xeplr-monitor-muted",children:"· whose files they are: each page counts for the service that first read it"}),_.jsx(rH,{rows:e.groups,sub:t=>t.unit})]}):null]})}function rH({rows:e,sub:t}){return _.jsx("ul",{className:"xeplr-monitor-shares",children:e.map(r=>_.jsxs("li",{children:[_.jsxs("span",{className:"xeplr-monitor-share-name",children:[_.jsx("b",{children:r.label})," ",_.jsx("span",{className:"xeplr-monitor-muted",children:t(r)})]}),_.jsx("span",{className:"xeplr-monitor-share-bar","aria-hidden":"true",children:_.jsx("span",{style:{width:(r.percent||0)+"%"}})}),_.jsxs("span",{className:"xeplr-monitor-share-num",children:[_.jsx("b",{children:Ar(r.bytes)})," ",_.jsx("span",{className:"xeplr-monitor-muted",children:r.percent===null?"":r.percent+"%"})]})]},r.key))})}function x2e({s:e,total:t}){if(e.servicesError)return _.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsx("b",{children:"Services"}),_.jsx("p",{className:"xeplr-monitor-muted",children:e.servicesError})]});if(!e.services)return null;const r=e.services.map(a=>Object.assign({id:a.unit},a,{t:a.status||{},look:MS(a.status,a.processes).length})),n=[{accessor:"label",header:"Service",cell:a=>{const i=a.row.original;return _.jsxs("button",{type:"button",className:"xeplr-monitor-link xeplr-monitor-svc",onClick:()=>e.open(i.unit),title:"Open "+i.unit+" on the Monitor page",children:[_.jsx("b",{children:i.label}),_.jsxs("span",{className:"xeplr-monitor-muted",children:[" ",i.unit]})]})}},{accessor:"state",header:"State",cell:a=>{const i=Tg(a.row.original.status);return _.jsxs("span",{className:"xeplr-monitor-svc-state",children:[_.jsx("span",{className:"xeplr-monitor-dot is-"+i.tone,"aria-hidden":"true"}),i.text]})}},{accessor:"memory",header:"Memory",cell:a=>{const i=a.row.original.t;return i.memoryBytes===null||i.memoryBytes===void 0?"—":_.jsxs(_.Fragment,{children:[Ai(i.memoryBytes),t?_.jsxs("span",{className:"xeplr-monitor-muted",children:[" · ",nd(i.memoryBytes/t*100)," of the server"]}):null]})}},{accessor:"limit",header:"Limit",cell:a=>{const i=a.row.original.t;return i.memoryMaxBytes?Ai(i.memoryMaxBytes)+" ("+Math.round(i.memoryBytes/i.memoryMaxBytes*100)+"% used)":"none"}},{accessor:"peak",header:"At most",cell:a=>Ai(a.row.original.t.memoryPeakBytes)},{accessor:"cpu",header:"CPU now",cell:a=>nd(a.row.original.t.cpuPercent)},{accessor:"threads",header:"Processes · threads",cell:a=>{const i=a.row.original;return(i.processes?i.processes.length:"—")+" · "+(i.t.tasks===null||i.t.tasks===void 0?"—":i.t.tasks)}},{accessor:"restarts",header:"Restarts",cell:a=>{const i=a.row.original.t.restarts;return i??"—"}},{accessor:"since",header:"Running for",cell:a=>{const i=a.row.original.t;return i.state==="active"?_m(i.since):"—"}},{accessor:"look",header:"Needs a look",cell:a=>a.row.original.look?_.jsxs("span",{className:"xeplr-monitor-pill is-busy",children:["⚠ ",a.row.original.look]}):_.jsx("span",{className:"xeplr-monitor-muted",children:"no"})}];return _.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsx("b",{children:"Services"})," ",_.jsxs("span",{className:"xeplr-monitor-muted",children:["· ",r.length," added to the monitor, what each is using now"]}),r.length?_.jsx("div",{id:"xeplr-monitor-server-services",className:"xeplr-monitor-tablebox",children:_.jsx(Sm,{data:r,schema:{0:{key:"services",columns:n}},enableFiltering:!1,enablePagination:!1,showToolbar:!1,rowClassName:a=>Tg(a.status).tone==="bad"?"xeplr-monitor-row-bad":""})}):_.jsx("p",{className:"xeplr-monitor-muted",children:"None yet. Add them on the Monitor page."})]})}function S2e({c:e}){return _.jsxs("section",{className:"xeplr-monitor-card",children:[_.jsx("b",{children:"CPU"}),_.jsxs("div",{className:"xeplr-monitor-tiles",children:[_.jsx(il,{label:"In use now",value:e.usePercent===null?"—":e.usePercent+"%",sub:"all cores together"}),_.jsx(il,{label:"Cores",value:e.cores,sub:e.model}),_.jsx(il,{label:"Load: 1 · 5 · 15 min",value:e.load?e.load.join(" · "):"—",sub:"more than "+e.cores+" means work is waiting"})]})]})}function b2e({disks:e}){return _.jsxs("section",{id:"xeplr-monitor-disks",className:"xeplr-monitor-card",children:[_.jsx("b",{children:"Disks"}),e.length?_.jsx("ul",{className:"xeplr-monitor-disks",children:e.map(t=>{const r=yM(t);return _.jsxs("li",{children:[_.jsxs("div",{className:"xeplr-monitor-disk-head",children:[_.jsx("b",{children:t.mount}),_.jsxs("span",{className:"xeplr-monitor-muted xeplr-monitor-small",children:[t.device," · ",t.type]}),_.jsx("span",{className:"xeplr-monitor-grow"}),r.nearlyFull?_.jsx("span",{className:"xeplr-monitor-pill is-busy",children:"⚠ Nearly full"}):null]}),_.jsx("div",{className:"xeplr-monitor-meter",role:"img","aria-label":t.mount+": "+Ar(t.usedBytes)+" of "+Ar(t.totalBytes)+" used",children:_.jsx("span",{className:"xeplr-monitor-meter-fill"+(r.nearlyFull?" is-full":""),style:{width:r.usedPercent+"%"},title:Ar(t.usedBytes)+" used ("+r.usedPercent+"%)"})}),_.jsxs("span",{className:"xeplr-monitor-small",children:[Ar(t.usedBytes)," of ",Ar(t.totalBytes)," used (",r.usedPercent,"%) · ",_.jsx("b",{children:Ar(t.availableBytes)})," free"]})]},t.device+t.mount)})}):_.jsx("p",{className:"xeplr-monitor-muted",children:"No disks found."})]})}function _2e({b:e,title:t="Backup connections"}){return _.jsxs("div",{className:"xeplr-monitor",children:[_.jsxs("header",{className:"xeplr-monitor-top",children:[_.jsx("b",{className:"xeplr-monitor-brand",children:t}),_.jsx("span",{className:"xeplr-monitor-grow"}),_.jsx("button",{type:"button",id:"xeplr-monitor-connection-add",className:"xeplr-monitor-primary",onClick:e.openAdd,children:"+ Add a connection"})]}),_.jsxs("div",{className:"xeplr-monitor-body is-one",children:[_.jsx("p",{className:"xeplr-monitor-muted",children:"Logins the backup jobs use. Passwords and keys are stored encrypted and never shown again."}),e.error?_.jsx("p",{className:"xeplr-monitor-bad",role:"alert",children:e.error}):null,e.loading?_.jsx("p",{className:"xeplr-monitor-muted",children:"Reading…"}):null,e.list?_.jsx(w2e,{b:e}):null]}),e.draft?_.jsx(C2e,{b:e}):null]})}function w2e({b:e}){if(!e.list.length)return _.jsx("section",{id:"xeplr-monitor-connections",className:"xeplr-monitor-card",children:_.jsx("p",{className:"xeplr-monitor-muted",children:"None yet. Add the database servers to back up, and the S3 bucket they go to."})});const t=[{accessor:"name",header:"Name",cell:r=>_.jsx("b",{children:r.row.original.name})},{accessor:"kind",header:"Kind",cell:r=>moe(r.row.original.kind)},{accessor:"where",header:"Where",cell:r=>_.jsx("code",{children:yoe(r.row.original)})},{accessor:"who",header:"Signs in as",cell:r=>xoe(r.row.original)},{accessor:"secret",header:"Secret",cell:r=>r.row.original.hasSecret?_.jsx("span",{className:"xeplr-monitor-pill",children:"🔒 stored"}):_.jsx("span",{className:"xeplr-monitor-bad",children:"missing"})},{accessor:"changed",header:"Last changed",cell:r=>{const n=r.row.original;return _.jsx("span",{title:n.addedBy?"Added by "+n.addedBy:"",children:n.recordModifiedDate?_m(n.recordModifiedDate):"—"})}},{accessor:"actions",header:"",cell:r=>{const n=r.row.original;return _.jsxs("span",{className:"xeplr-monitor-actions",children:[_.jsx("button",{type:"button","data-xeplr-action":"test",disabled:e.testing===n.id,onClick:()=>e.test(n),children:e.testing===n.id?"Testing…":"Test"}),_.jsx("button",{type:"button",className:"xeplr-monitor-link",onClick:()=>e.openEdit(n),children:"Edit"}),_.jsx("button",{type:"button",className:"xeplr-monitor-link is-danger",onClick:()=>e.remove(n),children:"Remove"})]})}}];return _.jsx("section",{id:"xeplr-monitor-connections",className:"xeplr-monitor-card",children:_.jsx("div",{className:"xeplr-monitor-tablebox",children:_.jsx(Sm,{data:e.list,schema:{0:{key:"connections",columns:t}},enableFiltering:!1,enablePagination:!1,showToolbar:!1})})})}function no({b:e,name:t,label:r,type:n="text",placeholder:a,help:i,inputMode:o}){const l=e.errors[t],s=n==="password";return _.jsxs("label",{className:"xeplr-monitor-field",children:[r,_.jsx("input",{name:t,type:n,value:e.draft[t],placeholder:a,inputMode:o,autoComplete:s?"new-password":"off",spellCheck:!1,"aria-invalid":!!l,onChange:c=>e.set(t,c.target.value)}),l?_.jsx("span",{className:"xeplr-monitor-bad xeplr-monitor-small",role:"alert",children:l}):i?_.jsx("span",{className:"xeplr-monitor-small",children:i}):null]})}function C2e({b:e}){const t=e.draft,r=!!e.editing,n=r?"unchanged — type to replace":void 0,a=r?"Edit "+e.editing.name:"Add a connection";return _.jsx("div",{className:"xeplr-monitor-scrim",onMouseDown:i=>{i.target===i.currentTarget&&e.close()},children:_.jsxs("div",{className:"xeplr-monitor-window",role:"dialog","aria-modal":"true","aria-label":a,onKeyDown:i=>{i.key==="Escape"&&e.close()},children:[_.jsx("h2",{children:a}),_.jsxs("form",{id:"xeplr-monitor-connection-form",onSubmit:e.save,noValidate:!0,children:[_.jsx(no,{b:e,name:"name",label:"Name",placeholder:"e.g. Main Postgres, or Backups bucket"}),_.jsxs("label",{className:"xeplr-monitor-field",children:["Kind",_.jsx("select",{name:"kind",value:t.kind,disabled:r,onChange:i=>e.setKind(i.target.value),children:rE.map(i=>_.jsx("option",{value:i.value,children:i.label},i.value))})]}),nE(t.kind)?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"xeplr-monitor-field-pair",children:[_.jsx(no,{b:e,name:"host",label:"Host",placeholder:"db.example.com"}),_.jsx(no,{b:e,name:"port",label:"Port",inputMode:"numeric"})]}),_.jsx(no,{b:e,name:"user",label:"User"}),_.jsx(no,{b:e,name:"password",label:"Password",type:"password",placeholder:n}),_.jsx("p",{className:"xeplr-monitor-muted xeplr-monitor-small",children:"The server only: each backup job chooses which of its databases to back up."})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"xeplr-monitor-field-pair",children:[_.jsx(no,{b:e,name:"bucket",label:"Bucket",placeholder:"xeplr-db-backups-…"}),_.jsx(no,{b:e,name:"region",label:"Region"})]}),_.jsx(no,{b:e,name:"prefix",label:"Folder",help:"Starts with backups — the key can only write under backups/."}),_.jsx(no,{b:e,name:"accessKeyId",label:"Access key ID",type:"password",placeholder:n}),_.jsx(no,{b:e,name:"secretAccessKey",label:"Secret access key",type:"password",placeholder:n})]}),e.errors.form?_.jsx("p",{className:"xeplr-monitor-bad",role:"alert",children:e.errors.form}):null,_.jsxs("div",{className:"xeplr-monitor-row",children:[r?_.jsx("button",{type:"button",className:"xeplr-monitor-link is-danger",onClick:()=>e.remove(e.editing),children:"Remove"}):_.jsx("span",{}),_.jsxs("span",{className:"xeplr-monitor-row-right",children:[_.jsx("button",{type:"button",onClick:e.close,children:"Cancel"}),_.jsx("button",{type:"submit",className:"xeplr-monitor-primary",disabled:e.busy,children:e.busy?"Saving…":r?"Save":"Add"})]})]})]})]})})}function rI({page:e,missing:t}){return _.jsxs("div",{className:"xeplr-monitor xeplr-monitor-broken",role:"alert",children:[_.jsxs("h1",{children:[e,": this design cannot be used"]}),_.jsx("p",{children:"It is missing what the monitor needs:"}),_.jsx("ul",{children:t.map(r=>_.jsx("li",{children:r},r))})]})}function T2e({api:e,design:t,title:r}){const n=coe({api:e}),a=voe({api:e,self:n.self}),i=goe({api:e,unit:a.view==="services"&&a.selected?a.selected.unit:null}),o=Foe({api:e,unit:a.view==="services"&&a.selected?a.selected.unit:null}),l=Hoe({api:e,enabled:a.view==="traffic"}),s=o_(QRe,a),c=t||t2e;return s.missing.length?_.jsx(rI,{page:"MonitorPage",missing:s.missing}):_.jsx("div",{ref:s.ref,children:_.jsx(c,{c:a,logs:i,history:o,traffic:l,settings:n,title:r})})}function A2e({api:e,monitorPath:t,design:r,title:n}){const a=hoe({api:e,monitorPath:t}),i=Goe({api:e,enabled:!!(a.stats&&a.stats.linux)}),o=o_(JRe,a),l=r||p2e;return o.missing.length?_.jsx(rI,{page:"ServerPage",missing:o.missing}):_.jsx("div",{ref:o.ref,children:_.jsx(l,{s:a,history:i,title:n})})}function D2e({api:e,design:t,title:r}){const n=Coe({api:e}),a=o_(e2e,n),i=t||_2e;return a.missing.length?_.jsx(rI,{page:"ConnectionsPage",missing:a.missing}):_.jsx("div",{ref:a.ref,children:_.jsx(i,{b:n,title:r})})}const nI=Wie({fetch:Tt,stream:$J,base:"/api/monitor"});function M2e(){return _.jsx(A2e,{api:nI})}function R2e(){return _.jsx(T2e,{api:nI})}function E2e(){return _.jsx(D2e,{api:nI})}function N2e(e){if(Array.isArray(e))return e.map(String);if(typeof e!="string"||!e.trim())return[];try{const t=JSON.parse(e);return Array.isArray(t)?t.map(String):[]}catch{return[]}}function L2e(e,t,r){const n=e.includes(t)?e.filter(i=>i!==t):e.concat([t]),a=(r||[]).map(i=>String(i.value));return n.slice().sort((i,o)=>(a.indexOf(i)+1||1/0)-(a.indexOf(o)+1||1/0))}function x2(e,t){if(!e)return null;const r=new Date(e).getTime();if(Number.isNaN(r))return null;const n=Math.round(((t||Date.now())-r)/1e3);if(n<60)return"just now";const a=Math.round(n/60);if(a<60)return`${a} minute${a===1?"":"s"} ago`;const i=Math.round(a/60);if(i<24)return`${i} hour${i===1?"":"s"} ago`;const o=Math.round(i/24);if(o===1)return"yesterday";if(o<30)return`${o} days ago`;const l=Math.round(o/30);if(l<12)return`${l} month${l===1?"":"s"} ago`;const s=Math.round(l/12);return`${s} year${s===1?"":"s"} ago`}let Xq="";function I2e(e){Xq=e&&e.base||""}const Ea=e=>Xq+e;async function O2e(){return(await Tt(Ea("/jobs?limit=0"))).dataArray||[]}async function k2e(){return(await Tt(Ea("/jobs/active"))).dataArray||[]}async function P2e(e){return(await Tt(Ea("/job-occurrences?limit=0"))).dataArray||[]}let a1=yU({},e=>Tt(Ea(e)));function j2e(e){a1=yU(e,t=>Tt(Ea(t)))}function B2e(e){return a1.has(e)}function z2e(e,t){return a1.fetchSuggestions(e,t)}function V2e(e,t){return a1.fetchOptions(e,t)}async function F2e(e,t=50){return(await Tt(Ea(`/jobs/${encodeURIComponent(e)}/occurrences?limit=${t}`))).dataArray||[]}async function G2e(){return(await Tt(Ea("/actions"))).dataArray||[]}async function H2e(e){return Tt(Ea("/jobs/save"),{method:"POST",body:JSON.stringify([e])})}async function U2e(e){return Tt(Ea("/jobs/delete"),{method:"POST",body:JSON.stringify({ids:[e]})})}async function Y2e(e){return Tt(Ea(`/jobs/${e}/trigger`),{method:"POST"})}async function $2e(e){return Tt(Ea(`/jobs/${e}/pause`),{method:"POST"})}async function W2e(e){return Tt(Ea(`/jobs/${e}/resume`),{method:"POST"})}async function q2e(e){return(await Tt(`/logs?referenceId=${encodeURIComponent(e)}`)).dataArray||[]}async function X2e(){return(await Tt(Ea("/jobs/run-contract"))).dataArray||[]}function Z2e(e){return e?e.running?"running":e.status==="pause"?"paused":e.schedule?"scheduled":"manual":"unknown"}const K2e={running:"Running",paused:"Paused",manual:"Manual only",scheduled:"Scheduled",unknown:"Unknown"};function Zq(e){if(!e||typeof e!="string")return null;const t=e.trim().split(/\s+/);if(t.length!==5)return null;const[r,n,a,i,o]=t,l=p=>p==="*",s=p=>/^\d+$/.test(p)?Number(p):null,c=(p,m)=>`${String(p).padStart(2,"0")}:${String(m).padStart(2,"0")}`,f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=/^\*\/(\d+)$/.exec(r);if(h&&l(n)&&l(a)&&l(i)&&l(o)){const p=Number(h[1]);return p===1?"Every minute":`Every ${p} minutes`}const v=/^\*\/(\d+)$/.exec(n);if(s(r)!==null&&v&&l(a)&&l(i)&&l(o)){const p=Number(v[1]);return p===1?`Every hour, at ${r} past`:`Every ${p} hours, at ${r} past`}return l(r)&&l(n)&&l(a)&&l(i)&&l(o)?"Every minute":s(r)!==null&&l(n)&&l(a)&&l(i)&&l(o)?`Every hour, at ${r} past`:s(r)!==null&&s(n)!==null&&l(a)&&l(i)&&l(o)?`Every day at ${c(n,r)}`:s(r)!==null&&s(n)!==null&&l(a)&&l(i)&&s(o)!==null?`Every ${f[s(o)%7]} at ${c(n,r)}`:s(r)!==null&&s(n)!==null&&s(a)!==null&&l(i)&&l(o)?`Monthly on day ${a} at ${c(n,r)}`:null}function Q2e(e,t){if(!e)return null;const r=new Date(e).getTime();if(Number.isNaN(r))return null;const n=r-(t||Date.now());if(n<=0)return"due now";const a=Math.round(n/6e4);if(a<1)return"in under a minute";if(a<60)return`in ${a} minute${a===1?"":"s"}`;const i=Math.round(a/60);if(i<24)return`in ${i} hour${i===1?"":"s"}`;const o=Math.round(i/24);return`in ${o} day${o===1?"":"s"}`}function S2(e){if(e==null)return null;if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function J2e(e){const t={};return(e||[]).forEach(r=>{if(!r||!r.jobId)return;const n=t[r.jobId];(!n||new Date(r.startedAt).getTime()>new Date(n.startedAt).getTime())&&(t[r.jobId]=r)}),t}function eEe(e,{query:t="",sort:r="name"}={}){const n=t.trim().toLowerCase();let a=(e||[]).filter(i=>n?[i.name,i.description,i.actionName].filter(Boolean).join(" ").toLowerCase().includes(n):!0);return a=a.slice().sort((i,o)=>{if(r==="next"){const l=i.nextRunAt?new Date(i.nextRunAt).getTime():1/0,s=o.nextRunAt?new Date(o.nextRunAt).getTime():1/0;return l-s}return r==="action"?String(i.actionName||"").localeCompare(String(o.actionName||"")):String(i.name||"").localeCompare(String(o.name||""))}),a}function nH(e){const t=e&&e.progress;return!t||t.rowsRead==null?null:`${tEe(t.rowsRead)} rows`}function tEe(e){return e==null||isNaN(e)?"—":e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}K`:`${(e/1e6).toFixed(e<1e7?1:0)}M`}function KD(e,t=Date.now(),r=rEe){const n=e&&e.progress&&e.progress.at;return n?t-new Date(n).getTime()>r:!1}const rEe=300*1e3;function aH(e,t=Date.now()){const r=e&&e.progress&&e.progress.at;if(!r)return null;const n=Math.max(0,Math.round((t-new Date(r).getTime())/1e3));return n<60?`last seen ${n} s ago`:n<3600?`last seen ${Math.floor(n/60)} min ago`:`last seen ${Math.floor(n/3600)} h ago`}const iH=[{value:"",label:"Manual only — no schedule"},{value:"*/15 * * * *",label:"Every 15 minutes"},{value:"0 * * * *",label:"Hourly, on the hour"},{value:"0 2 * * *",label:"Daily at 02:00"},{value:"0 6 * * 1",label:"Weekly, Monday at 06:00"},{value:"0 3 1 * *",label:"Monthly, the 1st at 03:00"}];function nEe({value:e,onChange:t,id:r="csf-sched"}){return _.jsxs("div",{className:"csf-field",children:[_.jsx("label",{htmlFor:r,children:"Schedule"}),_.jsxs("select",{id:r,value:iH.some(n=>n.value===e)?e:"custom",onChange:n=>{n.target.value!=="custom"&&t(n.target.value)},children:[iH.map(n=>_.jsx("option",{value:n.value,children:n.label},n.value||"none")),_.jsx("option",{value:"custom",children:"Custom cron…"})]}),_.jsx("input",{className:"csf-cron",value:e||"",placeholder:"* * * * *",onChange:n=>t(n.target.value)}),_.jsx("span",{className:"csf-help",children:e?Zq(e)||"Five cron fields: minute, hour, day of month, month, day of week.":"No schedule set."})]})}const aEe=[{field:"status",about:`"success" or "failed" — did this job's work happen`},{field:"output.<name>",about:"what this job's action returned, e.g. output.totalRows"},{field:"window.from / window.to",about:"the period this job ran for"},{field:"carry.<name>",about:"values carried from earlier jobs in the chain"},{field:"error.message",about:"why it failed"}],iEe='{ "field": "status", "op": "=", "value": "success" }';function QD(e){return e==null||typeof e=="object"&&!Array.isArray(e)&&!Object.keys(e).length?"":JSON.stringify(e,null,2)}function oEe(e){return(Array.isArray(e)?e:[]).map(t=>({when:QD(t.when),run:t.run||"",inputs:QD(t.inputs),carry:QD(t.carry)}))}function oH(){return{when:"",run:"",inputs:"",carry:""}}function JD(e,t,r){const n=String(e||"").trim();if(!n)return null;try{const a=JSON.parse(n);return!a||typeof a!="object"||Array.isArray(a)?(r.push(`${t} must be a JSON object, in { }.`),null):a}catch(a){return r.push(`${t} is not valid JSON: ${a.message}`),null}}function lEe(e,t){const r=[],n=(e||[]).map((i,o)=>{const l=o+1;i.run?t&&i.run===t&&r.push(`Rule ${l}: a job cannot run itself when it finishes.`):r.push(`Rule ${l}: choose the job to run.`);const s=JD(i.when,`Rule ${l}'s condition`,r),c=JD(i.inputs,`Rule ${l}'s inputs`,r),f=JD(i.carry,`Rule ${l}'s carry`,r);return{when:s,run:i.run,inputs:c||{},carry:f||{}}}),a=n.findIndex(i=>!i.when);return a>-1&&a<n.length-1&&r.push(`Rule ${a+1} has no condition, so it always matches — move it last, or give it one.`),{rules:n,problems:r}}function sEe(e,t){return JSON.stringify(e||[])===JSON.stringify(t||[])}const uEe=/connection/i;function cEe(e){return(e||[]).filter(t=>t&&t.name&&t.name!=="window"&&!uEe.test(t.name))}function aI(e){return"after-job-"+e}const Kq=["status","error","output","carry","window","jobId","given","used"],fEe=new RegExp("^("+Kq.join("|")+")(\\.|$)");function Jb(e,t){return!e||typeof e!="object"?e:Array.isArray(e.all)?{all:e.all.map(r=>Jb(r,t))}:Array.isArray(e.any)?{any:e.any.map(r=>Jb(r,t))}:{...e,field:t(String(e.field||""))}}function Ad(e,t){if(typeof e=="string")return t(e);if(Array.isArray(e))return e.map(r=>Ad(r,t));if(e&&typeof e=="object"){const r={};return Object.keys(e).forEach(n=>{r[n]=Ad(e[n],t)}),r}return e}const hEe=e=>fEe.test(e)?"trigger."+e:e,dEe=e=>e.startsWith("trigger.")?e.slice(8):e,vEe=new RegExp("\\{\\s*("+Kq.join("|")+")\\b","g"),lH=e=>e.replace(vEe,"{trigger.$1"),sH=e=>e.replace(/\{\s*trigger\./g,"{");function pEe(){return"run_"+Math.random().toString(36).slice(2,8)}function gEe(e,t,r,n){const a=Array.isArray(r)?r:[],i=n&&Array.isArray(n.steps)?n.steps:[],o=i.find(v=>v.stepKey==="decide"),l=i.filter(v=>v.stepKey!=="decide").sort((v,p)=>(v.position||0)-(p.position||0)),s=a.map((v,p)=>{const m=l[p];return{...m?{id:m.id}:{},stepKey:m?m.stepKey:pEe(),name:"Run job "+v.run,actionName:"job-run",kind:"wait",onError:"stop",position:p+1,values:{jobId:v.run,inputs:Ad(v.inputs||{},lH),carry:Ad(v.carry||{},lH),callbackUrl:"{resumeUrl}"},transitions:[{when:null,mode:"single",target:"end_success"}]}}),c=a.map((v,p)=>({when:Jb(v.when||null,hEe),mode:"single",target:s[p].stepKey}));(!a.length||a[a.length-1].when)&&c.push({when:null,mode:"single",target:"end_success"});const f={...o?{id:o.id}:{},stepKey:"decide",name:"Decide what runs next",actionName:"decide",kind:"auto",onError:"stop",position:0,values:{},transitions:c},h=l.slice(a.length).map(v=>({id:v.id,deleted:!0}));return{...n&&n.id?{id:n.id}:{},name:("After "+(String(t||"").trim()||"job "+e)).slice(0,255),description:'Made by the "After this job" setting of job '+e+".",kind:"workflow",key:aI(e),status:a.length?"published":"draft",trigger:{kind:"job",jobId:e,when:"finished"},steps:[f,...s,...h]}}function mEe(e){if(!e)return{rules:[]};const t=e.trigger||{},r=Array.isArray(e.steps)?e.steps:[],n=r.find(c=>c.stepKey==="decide"),a=r.filter(c=>c.stepKey!=="decide");if(!(t.kind==="job"&&t.when==="finished"&&n&&n.actionName==="decide"&&a.every(c=>c.actionName==="job-run"&&c.values&&c.values.jobId)))return{editedElsewhere:!0,rules:[]};if(e.status!=="published")return{rules:[]};const o=Object.fromEntries(a.map(c=>[c.stepKey,c])),l=Array.isArray(n.transitions)?n.transitions:[],s=[];for(const c of l){const f=c.when!==void 0?c.when:c.condition==null?null:void 0;if(c.target==="end_success"&&!f)continue;const h=o[c.target];if(!h||f===void 0)return{editedElsewhere:!0,rules:[]};s.push({when:Jb(f,dEe),run:h.values.jobId,inputs:Ad(h.values.inputs||{},sH),carry:Ad(h.values.carry||{},sH)})}return s.length!==a.length?{editedElsewhere:!0,rules:[]}:{rules:s}}function yEe({chain:e,jobs:t,jobId:r}){if(e.loading)return _.jsx("p",{className:"muted",children:"Loading the rules…"});if(e.loadError)return _.jsxs("p",{className:"jb-help jb-warn",children:["Could not load this job's rules, so they cannot be changed here: ",e.loadError]});const n=(t||[]).filter(i=>i.id!==r),a=(e.others||[]).length>0&&_.jsxs("p",{className:"jb-help",children:["This job also starts ",e.others.length===1?"the workflow":"these workflows"," ",e.others.map((i,o)=>_.jsxs("span",{children:[o?", ":"",_.jsx("strong",{children:i.name})]},i.id))," when it finishes. They are edited in the workflow screens."]});return e.editedElsewhere?_.jsxs("div",{className:"jb-chain",children:[_.jsx("p",{className:"jb-help jb-warn",children:"What runs after this job has been changed in the workflow screens, beyond what simple rules can say, so it is not shown or changed here. Open the workflow “After …” for this job to see or change it."}),a]}):_.jsxs("div",{className:"jb-chain",children:[_.jsxs("label",{className:"jb-chain-toggle",children:[_.jsx("input",{type:"checkbox",checked:e.on,onChange:i=>e.setOn(i.target.checked)}),"Run another job when this one finishes"]}),!e.on&&_.jsx("p",{className:"jb-help",children:"Nothing runs after this job from here. Tick the box to choose what should, and when."}),a,e.on&&_.jsxs(_.Fragment,{children:[_.jsx("p",{className:"jb-help",children:"Rules are checked top to bottom and the first that matches runs its job. A rule with no condition means “otherwise”. The period this job ran for passes to the next job by itself. The rules are saved as an ordinary workflow that starts when this job finishes, so they can also be seen and grown in the workflow screens."}),_.jsx("ol",{className:"jb-chain-rules",children:e.rows.map((i,o)=>_.jsxs("li",{className:"jb-chain-rule",children:[_.jsxs("div",{className:"jb-chain-head",children:[_.jsxs("span",{className:"jb-chain-n",children:["Rule ",o+1]}),_.jsxs("span",{className:"jb-chain-tools",children:[_.jsx("button",{type:"button",onClick:()=>e.moveUp(o),disabled:o===0,title:"Check this rule earlier",children:"↑"}),_.jsx("button",{type:"button",className:"jb-danger",onClick:()=>e.removeRow(o),children:"Remove"})]})]}),_.jsxs("div",{className:"jb-field",children:[_.jsxs("label",{htmlFor:`jb-chain-when-${o}`,children:["If ",_.jsx("span",{className:"jb-type",children:"· JSON, empty = otherwise"})]}),_.jsx("textarea",{id:`jb-chain-when-${o}`,className:"jb-chain-json",rows:3,placeholder:iEe,value:i.when,onChange:l=>e.updateRow(o,{when:l.target.value})})]}),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:`jb-chain-run-${o}`,children:"Run"}),_.jsxs("select",{id:`jb-chain-run-${o}`,value:i.run,onChange:l=>e.updateRow(o,{run:l.target.value}),children:[_.jsx("option",{value:"",children:"Choose a job…"}),n.map(l=>_.jsx("option",{value:l.id,children:l.name},l.id))]})]}),_.jsxs("details",{className:"jb-advanced",open:!!i.carry,children:[_.jsxs("summary",{children:["Pass values on ",_.jsx("span",{className:"jb-dim",children:"— optional"})]}),_.jsxs("div",{className:"jb-field",children:[_.jsxs("label",{htmlFor:`jb-chain-carry-${o}`,children:["Carry for later jobs ",_.jsx("span",{className:"jb-type",children:"· JSON"})]}),_.jsx("textarea",{id:`jb-chain-carry-${o}`,className:"jb-chain-json",rows:3,placeholder:'{ "loadedRows": "{output.totalRows}" }',value:i.carry,onChange:l=>e.updateRow(o,{carry:l.target.value})}),_.jsxs("span",{className:"jb-help",children:["Read later as ",_.jsx("code",{className:"jb-code",children:"carry.loadedRows"}),", in a condition or a value."]})]})]})]},o))}),_.jsx("button",{type:"button",className:"jb-chain-add",onClick:e.addRow,children:"+ Add rule"}),_.jsxs("details",{className:"jb-advanced",children:[_.jsx("summary",{children:"What a condition can read"}),_.jsx("ul",{className:"jb-chain-fields",children:aEe.map(i=>_.jsxs("li",{children:[_.jsx("code",{className:"jb-code",children:i.field})," — ",i.about]},i.field))}),_.jsxs("p",{className:"jb-help",children:["Comparisons: ",_.jsx("code",{className:"jb-code",children:"="})," ",_.jsx("code",{className:"jb-code",children:"!="})," ",_.jsx("code",{className:"jb-code",children:">"})," ",_.jsx("code",{className:"jb-code",children:">="})," ",_.jsx("code",{className:"jb-code",children:"<"})," ",_.jsx("code",{className:"jb-code",children:"<="})," ",_.jsx("code",{className:"jb-code",children:"in"})," ",_.jsx("code",{className:"jb-code",children:"contains"})," ",_.jsx("code",{className:"jb-code",children:"isEmpty"})," and more. Combine with",_.jsx("code",{className:"jb-code",children:'{ "all": [ … ] }'})," or ",_.jsx("code",{className:"jb-code",children:'{ "any": [ … ] }'}),". Values bind with ",_.jsx("code",{className:"jb-code",children:"{output.name}"}),", ",_.jsx("code",{className:"jb-code",children:"{carry.name}"}),", ",_.jsx("code",{className:"jb-code",children:"{window.to}"}),"."]})]})]})]})}const gm="fixed";function Qq(e){return"{"+e+"}"}function Jq(e,t){const r=(t||[]).find(n=>e===Qq(n.key));return r?r.key:gm}function xEe(e){const t=[];return(e||[]).forEach(r=>{const n=r.group||"";let a=t.find(i=>i.group===n);a||(a={group:n,options:[]},t.push(a)),a.options.push(r)}),t}function SEe(e,t){let r=[];try{r=e?JSON.parse(e):[]}catch{r=null}return Array.isArray(r)?r.map(n=>n&&typeof n=="object"&&!Array.isArray(n)?{name:n.name==null?"":String(n.name),value:n.value==null?"":n.value}:{name:"",value:n??"",bare:!0}):null}function bEe(e){const t=(e||[]).filter(r=>String(r.name||"").trim()||r.value!==""&&r.value!=null).map(r=>String(r.name||"").trim()?{name:String(r.name).trim(),value:r.value}:r.value);return t.length?JSON.stringify(t,null,2):""}function _Ee(e,t,r){const n=new Set((t||[]).filter((a,i)=>i!==r).map(a=>String(a.name||"").trim()).filter(Boolean));return(e||[]).filter(a=>!n.has(a))}function wEe(e,t,r){return e===gm?Jq(t,r)===gm?t:"":Qq(e)}const CEe={connectionInfoId:"connection",dbInfoId:"database",procedure:"procedure"};function TEe({label:e,value:t,names:r,emptyNote:n,onChange:a}){const[i,o]=j.useState(!1),l=String(t||"").trim().toLowerCase(),s=r.filter(c=>!l||c.toLowerCase().includes(l));return _.jsxs("div",{className:"jb-namebox",children:[_.jsx("input",{"aria-label":e,className:"jb-param-name",value:t,placeholder:"name",autoComplete:"off",role:"combobox","aria-expanded":i,onFocus:()=>o(!0),onClick:()=>o(!0),onBlur:()=>o(!1),onKeyDown:c=>{c.key==="Escape"&&o(!1)},onChange:c=>{a(c.target.value),o(!0)}}),i&&_.jsx("ul",{className:"jb-namebox-list",role:"listbox",children:s.length?s.map(c=>_.jsx("li",{role:"option","aria-selected":c===t,onMouseDown:f=>{f.preventDefault(),a(c),o(!1)},children:c},c)):_.jsx("li",{className:"jb-namebox-note",children:r.length?"No parameter matches what is typed.":n||"Type the name."})})]})}function AEe({field:e,value:t,onChange:r,contract:n,inputs:a}){const[i,o]=j.useState(()=>SEe(t)),l=`jb-in-${e.name}`,s=Object.fromEntries(Object.entries(e.suggestWith||{}).map(([w,C])=>[w,a?.[C]])),c=JSON.stringify(s),f=Object.entries(e.suggestWith||{}).filter(([w])=>!s[w]).map(([,w])=>CEe[w]||w),[h,v]=j.useState([]),[p,m]=j.useState("idle");j.useEffect(()=>{if(!e.suggestFrom)return;const w=JSON.parse(c);if(Object.values(w).some(A=>A==null||A==="")){v([]),m("idle");return}let C=!0;return m("loading"),z2e(e.suggestFrom,w).then(A=>{C&&(v(A),m("ready"))}).catch(()=>{C&&(v([]),m("failed"))}),()=>{C=!1}},[e.suggestFrom,c]);const y=e.suggestFrom?f.length?`Choose the ${f.join(", ")} above to see this procedure's parameters.`:p==="loading"?"Reading the procedure's parameters…":p==="failed"?"Could not read the procedure's parameters. Type the name.":"This procedure has no parameters to fill, or it was not found. Type the name.":null;if(i===null)return _.jsxs("div",{className:"jb-field jb-field--wide",children:[_.jsx("label",{htmlFor:l,children:e.label||e.name}),_.jsx("textarea",{id:l,rows:4,spellCheck:"false",value:t,onChange:w=>r(w.target.value)}),_.jsx("span",{className:"jb-help jb-warn",children:"This is not a list of parameters, so it is shown as it was saved."})]});function x(w){o(w),r(bEe(w))}const b=(w,C)=>x(i.map((A,M)=>M===w?{...A,...C}:A));return _.jsxs("div",{className:"jb-field jb-field--wide",children:[_.jsx("label",{children:e.label||e.name}),n.length>0&&_.jsx("span",{className:"jb-help",children:"Pick each value from what every run receives: this run's window (from its schedule or the job before it), and, when another job started it, the range that job was given and the range it actually used. Anything else is a fixed value."}),_.jsx("div",{className:"jb-params",children:i.map((w,C)=>{const A=Jq(w.value,n);return _.jsxs("div",{className:"jb-param",children:[_.jsx(TEe,{label:`Parameter ${C+1} name`,value:w.name,names:_Ee(h,i,C),emptyNote:y,onChange:M=>b(C,{name:M})}),_.jsx("span",{className:"jb-param-arrow","aria-hidden":"true",children:"←"}),_.jsxs("select",{"aria-label":`Parameter ${C+1} value`,value:A,onChange:M=>b(C,{value:wEe(M.target.value,w.value,n)}),children:[xEe(n).map(M=>_.jsx("optgroup",{label:M.group,children:M.options.map(R=>_.jsx("option",{value:R.key,title:R.description,children:R.label},R.key))},M.group)),_.jsx("option",{value:gm,children:"Fixed value"})]}),A===gm?_.jsx("input",{"aria-label":`Parameter ${C+1} fixed value`,className:"jb-param-value",value:w.value==null?"":String(w.value),placeholder:"value",onChange:M=>b(C,{value:M.target.value})}):_.jsx("span",{className:"jb-param-gap"}),_.jsx("button",{type:"button",className:"jb-param-remove",title:"Remove this parameter",onClick:()=>x(i.filter((M,R)=>R!==C)),children:"✕"})]},C)})}),_.jsx("button",{type:"button",className:"jb-param-add",onClick:()=>x([...i,{name:"",value:""}]),children:"+ Add parameter"}),_.jsxs("span",{className:"jb-help",children:["Click a name box to pick one of the procedure's parameters, or type your own."," ","On MySQL, parameters go by position, so keep them in the order the procedure declares them."]})]})}let eM=null;function DEe(){const[e,t]=j.useState(eM||[]);return j.useEffect(()=>{if(eM)return;let r=!0;return X2e().then(n=>{eM=n,r&&t(n)}).catch(()=>{r&&t([])}),()=>{r=!1}},[]),e}const MEe=["edit","step","runs","log","q","sort","action","inputs","name"];function REe(){const[e,t]=xm(),r=a=>e.get(a)||null,n=j.useCallback((a,i)=>{t(o=>{const l=new URLSearchParams(o);return Object.keys(a).forEach(s=>{const c=a[s];c==null||c===""?l.delete(s):l.set(s,String(c))}),l},{replace:!!(i&&i.replace)})},[t]);return{edit:r("edit"),step:r("step"),runs:r("runs"),log:r("log"),q:r("q")||"",sort:r("sort")||"name",params:e,set:n,KEYS:MEe}}let $m=null;function EEe(e){$m=typeof e=="string"?e.replace(/\/+$/,""):null}function NEe(){return $m!==null}async function eX(e){try{const t=await Tt(`${$m}/workflows/by-key/${encodeURIComponent(aI(e))}`);return t&&t.dataArray&&t.dataArray[0]||null}catch(t){if(t&&(t.status===404||t.statusCode===404))return null;throw t}}async function LEe(e){const[t,r]=await Promise.all([eX(e),Tt(`${$m}/workflows/by-trigger?kind=job&jobId=${encodeURIComponent(e)}`)]),n=mEe(t),a=(r&&r.dataArray||[]).filter(i=>i.key!==aI(e)&&i.status==="published").map(i=>({id:i.id,name:i.name}));return{jobId:e,workflowId:t?t.id:null,rules:n.rules,editedElsewhere:!!n.editedElsewhere,others:a}}async function IEe(e,t,r){const n=await eX(e),a=gEe(e,r,t,n);return await Tt(`${$m}/workflows/save`,{method:"POST",body:JSON.stringify([a])}),{jobId:e,rules:t}}function OEe(e){const t=NEe(),[r,n]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!1),[s,c]=j.useState(!!(t&&e)),[f,h]=j.useState(null),[v,p]=j.useState(!1),[m,y]=j.useState([]);j.useEffect(()=>{if(!t||!e)return;let E=!0;return c(!0),LEe(e).then(N=>{if(!E)return;const L=N&&N.rules||[];i(L),n(oEe(L)),l(L.length>0),p(!!(N&&N.editedElsewhere)),y(N&&N.others||[]),h(null)}).catch(N=>{E&&h(N.message||"Could not load the rules")}).finally(()=>{E&&c(!1)}),()=>{E=!1}},[t,e]);function x(E){l(E),E&&!r.length&&n([oH()])}function b(E,N){n(L=>L.map((O,I)=>I===E?{...O,...N}:O))}function w(){n(E=>[...E,oH()])}function C(E){n(N=>N.filter((L,O)=>O!==E))}function A(E){E<1||n(N=>{const L=N.slice(),[O]=L.splice(E,1);return L.splice(E-1,0,O),L})}function M(E){return!o||v?{rules:[],problems:[]}:lEe(r,E)}async function R(E,N){if(!t||!E||f||v)return;const{rules:L,problems:O}=M(E);if(O.length)throw new Error(O.join(" "));if(sEe(L,a))return;const I=await IEe(E,L,N);i(I&&I.rules||L)}return{enabled:t,on:o,setOn:x,rows:r,updateRow:b,addRow:w,removeRow:C,moveUp:A,loading:s,loadError:f,editedElsewhere:v,others:m,check:M,save:R}}const iI="";function kEe(e){return(e&&e.inputSchema||[]).find(t=>t&&t.name==="window")||null}function b2(e){const t=kEe(e);if(!t)return[];const r=[{value:iI,label:"Everything, each run",help:"No range is worked out: each run takes what its inputs say."},{value:"period",label:"Since the last successful run",help:"Each run covers from where the last successful one stopped, up to now. A failed run is picked up by the next."}];return t.watermark&&r.push({value:"watermark",label:"Continue from what is already loaded",help:"Each run reads the highest value the target already holds and takes everything after it."}),r}function PEe(e){return{incrementalMode:e&&e.incrementalMode||iI,reloadDays:e&&e.reloadDays?String(e.reloadDays):""}}function jEe(e,t){const n=b2(t).map(o=>o.value).includes(e.incrementalMode)?e.incrementalMode:iI;if(n!=="watermark")return{body:{incrementalMode:n||null,reloadDays:null}};const a=String(e.reloadDays==null?"":e.reloadDays).trim();if(a==="")return{body:{incrementalMode:n,reloadDays:null}};const i=Number(a);return!Number.isInteger(i)||i<1?{problem:"Re-read the last … days takes a whole number of days, 1 or more — or leave it empty."}:{body:{incrementalMode:n,reloadDays:i}}}function BEe(e,t){const r=s=>(e&&typeof e.get=="function"?e.get(s):e&&e[s])||null,n=r("action"),a=n&&(t||[]).some(s=>s&&s.name===n),i={};a&&(i.actionName=n);const o=r("inputs");if(a&&o)try{const s=JSON.parse(o);s&&typeof s=="object"&&!Array.isArray(s)&&(i.inputs=s)}catch{}const l=r("name");return l&&(i.name=String(l).slice(0,200)),i}const zEe=["action","inputs","name"];function VEe({state:e}){return _.jsx("span",{className:`jb-pill jb-pill--${e}`,children:K2e[e]||e})}const FEe={success:"good",failed:"bad",timedOut:"bad",interrupted:"warn",skipped:"warn",running:"busy"},GEe={timedOut:"timed out",interrupted:"interrupted",skipped:"skipped"},HEe={timedOut:'Ran past its "give up after" and was given up on — the lock was released so the job could run again.',interrupted:"The process shut down while this was running.",skipped:"Not run — the previous occurrence was still going, or the action was not registered."};function _2({status:e}){return _.jsx("span",{className:`jb-pill jb-pill--${FEe[e]||"busy"}`,title:HEe[e]||void 0,children:GEe[e]||e})}function Jp({path:e,size:t=16}){return _.jsx("svg",{className:"jb-icon",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:e})}const tX=_.jsx("polyline",{points:"9 18 15 12 9 6"}),UEe=_.jsx(_.Fragment,{children:_.jsx("polygon",{points:"6 4 20 12 6 20 6 4",fill:"currentColor",stroke:"none"})}),YEe=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M12 20h9"}),_.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),$Ee=_.jsxs(_.Fragment,{children:[_.jsx("polyline",{points:"3 6 5 6 21 6"}),_.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]});function WEe({occurrenceId:e}){const[t,r]=j.useState(null),[n,a]=j.useState(null);return j.useEffect(()=>{let i=!0;return a(null),q2e(e).then(o=>{i&&r(o)}).catch(o=>{i&&(r([]),a(o.message||"Could not load the log"))}),()=>{i=!1}},[e]),t===null?_.jsx("p",{className:"muted jb-runs-note",children:"Loading log…"}):n?_.jsx("p",{className:"jb-run-error jb-runs-note",children:n}):t.length?_.jsx("ul",{className:"jb-log",children:t.map(i=>_.jsxs("li",{className:`jb-log-line jb-log-line--${i.level||"info"}`,children:[_.jsx("span",{className:"jb-log-at",title:new Date(i.createdAt).toLocaleString(),children:new Date(i.createdAt).toLocaleTimeString()}),_.jsx("span",{className:"jb-log-msg",children:i.message})]},i.id))}):_.jsx("p",{className:"muted jb-runs-note",children:"This run wrote no log lines."})}function qEe({jobId:e,refreshKey:t,openLogId:r,onOpenLog:n}){const[a,i]=j.useState(null),[o,l]=j.useState(null);return j.useEffect(()=>{let s=!0;return l(null),F2e(e,50).then(c=>{s&&i(c)}).catch(c=>{s&&(i([]),l(c.message||"Could not load the run history"))}),()=>{s=!1}},[e,t]),a===null?_.jsx("p",{className:"muted jb-runs-note",children:"Loading runs…"}):o?_.jsx("p",{className:"jb-run-error jb-runs-note",children:o}):a.length?_.jsxs("div",{className:"jb-history",children:[_.jsxs("table",{className:"jb-history-table",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Started"}),_.jsx("th",{children:"Outcome"}),_.jsx("th",{children:"Took"}),_.jsx("th",{children:"Trigger"}),_.jsx("th",{children:"Detail"}),_.jsx("th",{children:"Log"})]})}),_.jsx("tbody",{children:a.map(s=>_.jsxs(j.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{title:new Date(s.startedAt).toLocaleString(),children:x2(s.startedAt,Date.now())}),_.jsxs("td",{children:[_.jsx(_2,{status:s.status}),s.retryCount>0&&_.jsxs("span",{className:"jb-retry",title:`Failed and was retried ${s.retryCount} time(s) within this same occurrence`,children:["+",s.retryCount," retr",s.retryCount===1?"y":"ies"]})]}),_.jsx("td",{children:S2(s.durationMs)||_.jsx("span",{className:"jb-dim",children:"—"})}),_.jsx("td",{className:"jb-dim",children:s.triggeredBy?.type||"—"}),_.jsxs("td",{children:[s.lateFinish&&_.jsxs("span",{className:"jb-late",title:s.lateFinish.note,children:["finished later, after ",s.lateFinish.ranForMinutes,"m — raise “give up after”"]}),s.error&&_.jsx("span",{className:"jb-run-error",children:s.error.message||"Failed"}),!s.error&&!s.lateFinish&&_.jsx("span",{className:"jb-dim",children:"—"})]}),_.jsx("td",{children:_.jsx("button",{type:"button",className:`jb-log-toggle jb-caret${r===s.id?" jb-caret--open":""}`,"aria-expanded":r===s.id,title:r===s.id?"Hide this run’s log":"Show this run’s log","aria-label":r===s.id?"Hide this run’s log":"Show this run’s log",onClick:()=>n(r===s.id?null:s.id),children:_.jsx(Jp,{path:tX,size:14})})})]}),r===s.id&&_.jsx("tr",{className:"jb-log-row",children:_.jsx("td",{colSpan:6,children:_.jsx(WEe,{occurrenceId:s.id})})})]},s.id))})]}),a.length===50&&_.jsx("p",{className:"muted jb-runs-note",children:"Showing the 50 most recent."})]}):_.jsx("p",{className:"muted jb-runs-note",children:"This job has not run yet."})}const uH=[{key:"job",label:"Job",hint:"What it is, and what it runs"},{key:"inputs",label:"Inputs",hint:"What that action needs"},{key:"schedule",label:"Schedule",hint:"When, and what if it goes wrong"}],XEe={key:"after",label:"After this job",hint:"What runs when this one finishes"};function ZEe(e,t){const r=n=>{const a=t?.[n.name];return a!==void 0&&a!==""&&a!=="{}"&&a!=="[]"};return(e?.inputSchema||[]).filter(n=>!n.system&&(!n.hidden||r(n)))}function KEe(e){const t=[],r=[];return e.forEach(n=>{!n.required&&n.default!==void 0?r.push(n):t.push(n)}),{primary:t,advanced:r}}function QEe(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function JEe(e,t){const r={};return(e?.inputSchema||[]).forEach(n=>{if(n.system)return;const a=t?.[n.name];if(!(a===void 0||a==="")){if(typeof a!="string"){r[n.name]=a;return}if(n.type==="number"){const i=Number(a);r[n.name]=Number.isNaN(i)?a:i}else if(n.type==="boolean")r[n.name]=a==="true";else if(n.type==="object"||n.type==="array")try{r[n.name]=JSON.parse(a)}catch{r[n.name]=a}else r[n.name]=a}}),r}function eNe(e,t){return(e?.inputSchema||[]).filter(r=>!r.system&&(r.type==="object"||r.type==="array")).filter(r=>{const n=t?.[r.name];if(typeof n!="string"||n==="")return!1;try{return JSON.parse(n),!1}catch{return!0}}).map(r=>r.name)}function tNe({field:e,value:t,onChange:r,dependsOnValue:n}){const[a,i]=j.useState(null),[o,l]=j.useState(!1),s=`jb-in-${e.name}`;if(j.useEffect(()=>{let c=!0;if(e.dependsOn&&!n){i([]);return}return l(!1),V2e(e.optionsFrom,e.dependsOn?{name:e.dependsOn,value:n,clientKey:"connectionId"}:null).then(f=>{c&&i(f)}).catch(()=>{c&&(i([]),l(!0))}),()=>{c=!1}},[e.optionsFrom,e.dependsOn,n]),e.type==="array"){const c=N2e(t),f=e.dependsOn&&!n,h=(a||[]).concat(c.filter(v=>!(a||[]).some(p=>String(p.value)===v)).map(v=>({value:v,label:v+" (not offered now)"})));return _.jsxs("fieldset",{className:"jb-field jb-field--wide jb-picks",id:s,children:[_.jsxs("legend",{children:[DS(e),e.required&&_.jsx("span",{className:"jb-req",children:" *"}),c.length?_.jsxs("span",{className:"jb-type",children:[" · ",c.length," chosen"]}):null]}),f?_.jsx("span",{className:"jb-help",children:`Choose ${e.dependsOn} first…`}):a===null?_.jsx("span",{className:"jb-help",children:"Loading…"}):h.length?_.jsx("div",{className:"jb-picks-list",children:h.map(v=>_.jsxs("label",{className:"jb-pick",children:[_.jsx("input",{type:"checkbox",checked:c.includes(String(v.value)),onChange:()=>r(L2e(c,String(v.value),a))}),_.jsx("span",{children:v.label})]},v.value))}):_.jsx("span",{className:"jb-help",children:"Nothing to choose from"}),o?_.jsx("span",{className:"jb-help jb-warn",children:"Could not load the list."}):e.description&&_.jsx("span",{className:"jb-help",children:e.description})]})}return _.jsxs("div",{className:"jb-field",children:[_.jsxs("label",{htmlFor:s,children:[DS(e),e.required&&_.jsx("span",{className:"jb-req",children:" *"})]}),_.jsxs("select",{id:s,value:t,onChange:c=>r(c.target.value),disabled:!!e.dependsOn&&!n,children:[_.jsx("option",{value:"",children:e.dependsOn&&!n?`Choose ${e.dependsOn} first…`:a===null?"Loading…":a.length?"Choose…":"Nothing to choose from"}),(a||[]).map(c=>_.jsx("option",{value:c.value,children:c.label},c.value))]}),o?_.jsx("span",{className:"jb-help jb-warn",children:"Could not load the list."}):e.description&&_.jsx("span",{className:"jb-help",children:e.description})]})}function rNe({field:e,value:t,onChange:r,inputs:n,contract:a}){const i=`jb-in-${e.name}`;if(e.control==="parameters")return _.jsx(AEe,{field:e,value:t,onChange:r,contract:a||[],inputs:n});const o={id:i,value:t,onChange:s=>r(s.target.value)};if(e.optionsFrom&&B2e(e.optionsFrom))return _.jsx(tNe,{field:e,value:t,onChange:r,dependsOnValue:e.dependsOn?n?.[e.dependsOn]:void 0});let l;return Array.isArray(e.options)&&e.options.length?l=_.jsxs("select",{...o,children:[_.jsx("option",{value:"",children:"Choose…"}),e.options.map(s=>{const c=typeof s=="object"?s.value:s;return _.jsx("option",{value:c,children:typeof s=="object"?s.label||s.value:s},c)})]}):e.type==="boolean"?l=_.jsxs("select",{...o,children:[_.jsx("option",{value:"",children:e.default===void 0?"Choose…":`Default (${e.default})`}),_.jsx("option",{value:"true",children:"true"}),_.jsx("option",{value:"false",children:"false"})]}):e.type==="number"?l=_.jsx("input",{type:"number",...o,placeholder:e.default!==void 0?String(e.default):""}):e.type==="object"||e.type==="array"?l=_.jsx("textarea",{rows:4,spellCheck:"false",...o,placeholder:e.type==="array"?"[]":"{}"}):l=_.jsx("input",{...o,placeholder:e.default!==void 0?String(e.default):""}),_.jsxs("div",{className:`jb-field${e.type==="object"||e.type==="array"?" jb-field--wide":""}`,children:[_.jsxs("label",{htmlFor:i,children:[DS(e),e.required&&_.jsx("span",{className:"jb-req",children:" *"}),(e.type==="object"||e.type==="array")&&_.jsxs("span",{className:"jb-type",children:[" · ",e.type==="array"?"JSON list":"JSON"]})]}),l,e.description&&_.jsx("span",{className:"jb-help",children:e.description})]})}function nNe({job:e,jobs:t,actions:r,onCancel:n,onSaved:a,stepKey:i,onStep:o}){const[l,s]=j.useState(()=>({name:e?.name||"",description:e?.description||"",actionName:e?.actionName||"",schedule:e?.schedule||"",status:e?.status||"pause",startAt:e?.startAt?String(e.startAt).slice(0,16):"",retryLimit:e?.retryLimit??0,timeoutMinutes:e?.timeoutMinutes??"",inputs:Object.fromEntries(Object.entries(e?.inputs||{}).map(([A,M])=>[A,QEe(M)])),acceptsInputs:Array.isArray(e?.acceptsInputs)?e.acceptsInputs:[],...PEe(e)})),[c,f]=j.useState(!1),h=OEe(e?.id||null),v=DEe(),p=h.enabled?[...uH,XEe]:uH,m=Math.max(0,p.findIndex(A=>A.key===i)),y=A=>o(p[Math.max(0,Math.min(p.length-1,A))].key),x=r.find(A=>A.name===l.actionName)||null,b=A=>s(M=>({...M,...A}));async function w(A){A.preventDefault();const M=eNe(x,l.inputs);if(M.length){y(1),Ct(`Not valid JSON: ${M.join(", ")}`,{design:"error"});return}const R=jEe(l,x);if(R.problem){y(2),Ct(R.problem,{design:"error"});return}const E=h.check(e?.id);if(E.problems.length){y(p.length-1),Ct(E.problems.join(" "),{design:"error"});return}f(!0);try{const N=l.name.trim()||"Untitled job";e?.id&&await h.save(e.id,N);const L=await H2e({...e?.id?{id:e.id}:{},name:N,description:l.description||"",actionName:l.actionName,schedule:l.schedule.trim()||null,status:l.schedule.trim()?l.status:"ready",startAt:l.startAt?new Date(l.startAt).toISOString():null,retryLimit:Number(l.retryLimit)||0,timeoutMinutes:l.timeoutMinutes===""?null:Number(l.timeoutMinutes),inputs:JEe(x,l.inputs),acceptsInputs:l.acceptsInputs.filter(O=>cEe(C).some(I=>I.name===O)),...R.body});if(!e?.id){const O=L&&Array.isArray(L.updatedIds)?L.updatedIds[0]:null;try{await h.save(O,N)}catch(I){Ct(`The job was saved, but its "After this job" rules were not: ${I.message}`,{design:"error"})}}a()}catch(N){Ct(N.message||"Could not save the job",{design:"error"})}finally{f(!1)}}const C=ZEe(x,l.inputs);return _.jsxs("form",{className:"jb-editor",onSubmit:w,children:[_.jsx("h2",{children:e?.id?"Edit job":"New job"}),_.jsx("nav",{className:"jb-steps","aria-label":"Sections",children:p.map((A,M)=>_.jsxs("button",{type:"button",className:`jb-step${M===m?" jb-step--on":""}${M<m?" jb-step--done":""}`,"aria-current":M===m?"step":void 0,onClick:()=>y(M),children:[_.jsx("span",{className:"jb-step-n",children:M+1}),_.jsx("span",{className:"jb-step-t",children:A.label})]},A.key))}),_.jsx("p",{className:"jb-step-hint",children:p[m].hint}),m===0&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-name",children:"Name"}),_.jsx("input",{id:"jb-name",value:l.name,placeholder:"Nightly refresh",onChange:A=>b({name:A.target.value})})]}),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-desc",children:"Description"}),_.jsx("input",{id:"jb-desc",value:l.description,placeholder:"What is this for?",onChange:A=>b({description:A.target.value})})]}),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-action",children:"Action"}),_.jsxs("select",{id:"jb-action",value:l.actionName,onChange:A=>b({actionName:A.target.value,inputs:{}}),children:[_.jsx("option",{value:"",children:"Choose an action…"}),r.map(A=>_.jsx("option",{value:A.name,children:A.name},A.name))]}),x?.description&&_.jsx("span",{className:"jb-help",children:x.description}),!r.length&&_.jsx("span",{className:"jb-help jb-warn",children:"No actions are registered on the server, so a job has nothing to run."})]})]}),m===1&&_.jsxs(_.Fragment,{children:[!x&&_.jsx("p",{className:"muted",children:"Choose an action first — its inputs are its own."}),x&&!C.length&&_.jsxs("p",{className:"muted",children:[_.jsx("code",{className:"jb-code",children:x.name})," needs nothing filled in. Straight on to the schedule."]}),x&&(()=>{const{primary:A,advanced:M}=KEe(C),R=E=>_.jsx(rNe,{field:E,inputs:l.inputs,contract:v,value:l.inputs?.[E.name]??"",onChange:N=>b({inputs:{...l.inputs,[E.name]:N}})},E.name);return _.jsxs(_.Fragment,{children:[_.jsx("div",{className:"jb-grid",children:A.map(R)}),M.length>0&&_.jsxs("details",{className:"jb-advanced",children:[_.jsxs("summary",{children:["Advanced",_.jsxs("span",{className:"jb-dim",children:[" — ",M.map(E=>`${DS(E)} ${l.inputs?.[E.name]??E.default}`).join(" · ")]})]}),_.jsx("div",{className:"jb-grid",children:M.map(R)})]})]})})()]}),m===2&&_.jsxs(_.Fragment,{children:[_.jsx(nEe,{id:"jb-sched",value:l.schedule,onChange:A=>b({schedule:A})}),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-status",children:"Status"}),_.jsxs("select",{id:"jb-status",value:l.schedule.trim()?l.status:"ready",disabled:!l.schedule.trim(),onChange:A=>b({status:A.target.value}),children:[_.jsx("option",{value:"ready",children:"Active — the scheduler runs this when it is due"}),_.jsx("option",{value:"pause",children:"Paused — saved, but nothing runs until you resume it"})]}),_.jsx("span",{className:"jb-help",children:l.schedule.trim()?l.status==="ready"?"Runs on the schedule above. Pause it any time from the list.":"Kept exactly as written and left alone. Nothing runs until this is set to Active.":"This job has no schedule, so nothing runs it on its own — you trigger it yourself. Set a schedule above to be able to pause it."})]}),l.schedule.trim()&&_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-startat",children:"Start from"}),_.jsx("input",{id:"jb-startat",type:"datetime-local",value:l.startAt,onChange:A=>b({startAt:A.target.value})}),_.jsx("span",{className:"jb-help",children:l.startAt?"The schedule is ignored until this moment passes, then runs as normal.":"Leave empty to start as soon as the schedule says."})]}),b2(x).length>0&&(()=>{const A=b2(x),M=A.find(R=>R.value===l.incrementalMode)||A[0];return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-incremental",children:"Each run takes"}),_.jsx("select",{id:"jb-incremental",value:M.value,onChange:R=>b({incrementalMode:R.target.value}),children:A.map(R=>_.jsx("option",{value:R.value,children:R.label},R.value))}),_.jsxs("span",{className:"jb-help",children:[M.help," A range given when it is started (by a workflow, or by the job before it) always wins."]})]}),M.value==="watermark"&&_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-reload",children:"Also re-read the last"}),_.jsx("input",{id:"jb-reload",type:"number",min:"1",step:"1",placeholder:"—",value:l.reloadDays,onChange:R=>b({reloadDays:R.target.value})}),_.jsx("span",{className:"jb-help",children:"Days. Rows changed after they were loaded (a late payment, an edited order) are below the highest value, so they are only picked up by re-reading. Empty: no re-read."})]})]})})(),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-retry",children:"Retry on failure"}),_.jsxs("select",{id:"jb-retry",value:String(l.retryLimit),onChange:A=>b({retryLimit:Number(A.target.value)}),children:[_.jsx("option",{value:"0",children:"No — leave it failed"}),_.jsx("option",{value:"1",children:"Retry once"}),_.jsx("option",{value:"2",children:"Retry twice"}),_.jsx("option",{value:"3",children:"Retry 3 times"})]}),_.jsx("span",{className:"jb-help",children:l.retryLimit>0?"Retries happen immediately, within the same run — the history shows one attempt with a retry count, not several runs.":"A failed run stays failed and is visible in the history."})]}),_.jsxs("div",{className:"jb-field",children:[_.jsx("label",{htmlFor:"jb-timeout",children:"Give up after"}),_.jsx("input",{id:"jb-timeout",type:"number",min:"1",placeholder:"30",value:l.timeoutMinutes,onChange:A=>b({timeoutMinutes:A.target.value})}),_.jsxs("span",{className:"jb-help",children:["Minutes. If this job is still running after that, it is marked “timed out” and unlocked so it can run again — the worker was most likely killed. Leave empty for the default of 30."," ","Set it higher than the job ever legitimately takes."]})]})]}),h.enabled&&m===p.length-1&&p[m].key==="after"&&_.jsx(yEe,{chain:h,jobs:t,jobId:e?.id}),_.jsxs("div",{className:"jb-editor-actions",children:[_.jsx("button",{type:"button",onClick:n,children:"Cancel"}),_.jsxs("span",{className:"jb-editor-nav",children:[m>0&&_.jsx("button",{type:"button",onClick:()=>y(m-1),children:"Back"}),m<p.length-1&&_.jsx("button",{type:"button",onClick:()=>y(m+1),disabled:!l.actionName,title:l.actionName?void 0:"Choose an action first",children:"Next"})]}),_.jsx("button",{type:"submit",className:"jb-primary",disabled:c||!l.actionName,children:c?"Saving…":"Save job"})]})]})}function aNe({breadcrumb:e,uploadLink:t}={}){const[r,n]=j.useState(null),[a,i]=j.useState([]),[o,l]=j.useState([]),[s,c]=j.useState(null),f=REe(),h=f.q,v=f.sort,p=W=>f.set({q:W},{replace:!0}),m=W=>f.set({sort:W==="name"?null:W},{replace:!0}),y=f.runs,x=W=>f.set({runs:W,log:null}),b=f.edit==="new"?BEe(f.params,o):f.edit&&r&&r.find(W=>W.id===f.edit)||null,w=!!(f.edit&&f.edit!=="new"&&r&&!b),C=W=>f.set(Object.assign({edit:W?W.id||"new":null,step:null},Object.fromEntries(zEe.map(Z=>[Z,null])))),[A,M]=j.useState(null),[R,E]=j.useState(0),N=j.useCallback(async()=>{try{const[W,Z,Q]=await Promise.all([O2e(),P2e(),G2e()]);n(W),i(Z),l(Q),c(null)}catch(W){c(W.message||"Could not load jobs"),n([])}},[]);j.useEffect(()=>{N()},[N]),j.useEffect(()=>{E(W=>W+1)},[a]);const[L,O]=j.useState(!0),[I,z]=j.useState([]),V=I.length>0||(r||[]).some(W=>W.running);j.useEffect(()=>{if(!L)return;let W=!1,Z=!1;const Q=async()=>{try{const K=await k2e();if(W)return;z(K),Z&&K.length===0&&N(),Z=K.length>0}catch{}},U=setInterval(Q,V?2e3:15e3);return Q(),()=>{W=!0,clearInterval(U)}},[L,V,N]);const Y=j.useMemo(()=>Object.fromEntries((I||[]).map(W=>[W.jobId,W])),[I]),H=j.useMemo(()=>eEe(r||[],{query:h,sort:v}),[r,h,v]),F=j.useMemo(()=>J2e(a),[a]),X=j.useMemo(()=>a.slice().sort((W,Z)=>new Date(Z.startedAt)-new Date(W.startedAt)).slice(0,12),[a]),P=j.useMemo(()=>Object.fromEntries((r||[]).map(W=>[W.id,W])),[r]);async function q(W,Z,Q){M(W);try{await Z(W),await N(),E(U=>U+1)}catch(U){Ct(U.message||Q,{design:"error"})}finally{M(null)}}async function G(W){await W2(`Delete "${W.name}"? Its run history stays.`,{design:"danger"})&&q(W.id,U2e,"Could not delete the job")}return _.jsxs("section",{className:"jb-page",children:[e?_.jsx(e,{items:[{label:"Jobs"}]}):null,_.jsxs("header",{className:"jb-head",children:[_.jsxs("div",{children:[_.jsx("h1",{children:"Jobs"}),_.jsx("p",{className:"muted",children:"An action, on a schedule. The server runs what is due and records every attempt."})]}),_.jsxs("div",{className:"jb-head-tools",children:[_.jsx("input",{className:"jb-search",type:"search",value:h,placeholder:"Search jobs…","aria-label":"Search jobs",onChange:W=>p(W.target.value)}),_.jsxs("select",{className:"jb-sort",value:v,onChange:W=>m(W.target.value),"aria-label":"Sort by",children:[_.jsx("option",{value:"name",children:"Name"}),_.jsx("option",{value:"next",children:"Next run"}),_.jsx("option",{value:"action",children:"Action"})]}),_.jsxs("label",{className:"jb-live",title:L?"Refreshing while jobs are running. Uncheck to stop.":"The page will not refresh itself.",children:[_.jsx("input",{type:"checkbox",checked:L,onChange:W=>O(W.target.checked)}),_.jsx("span",{children:"Live updates"}),L&&I.length>0&&_.jsxs("span",{className:"jb-live-count",children:[I.length," running"]})]}),_.jsx("button",{type:"button",className:"jb-primary",onClick:()=>C({}),children:"+ New job"})]})]}),s&&_.jsx("p",{className:"report-builder-error",children:s}),r===null&&!s&&_.jsx("p",{className:"muted",children:"Loading…"}),w&&_.jsxs("p",{className:"report-builder-error",children:["There is no job ",f.edit," here — it may have been deleted."," ",_.jsx("button",{type:"button",className:"jb-linkish",onClick:()=>C(null),children:"Back to the list"})]}),b&&_.jsx(nNe,{job:b,jobs:r||[],actions:o,stepKey:f.step,onStep:W=>f.set({step:W==="job"?null:W},{replace:!0}),onCancel:()=>C(null),onSaved:()=>{C(null),N()}},f.edit+(f.edit==="new"&&o.length?":ready":"")),r&&r.length===0&&!b&&_.jsxs("div",{className:"jb-empty",children:[_.jsx("p",{className:"jb-empty-title",children:"No jobs yet"}),_.jsx("p",{className:"muted",children:"A job runs one registered action — on a cron, or whenever you press Run."}),_.jsx("button",{type:"button",className:"jb-primary",onClick:()=>C({}),children:"Create the first one"})]}),r&&r.length>0&&_.jsxs("div",{className:"jb-table-wrap",children:[_.jsxs("table",{className:"jb-table",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:"Job"}),_.jsx("th",{children:"Action"}),_.jsx("th",{children:"Schedule"}),_.jsx("th",{children:"Next run"}),_.jsx("th",{children:"Last run"}),_.jsx("th",{children:"Enabled"}),_.jsx("th",{children:"Actions"})]})}),_.jsx("tbody",{children:H.map(W=>{const Z=Z2e(W),Q=F[W.id],U=Y[W.id],K=A===W.id,se=y===W.id;return _.jsxs(j.Fragment,{children:[_.jsxs("tr",{className:se?"jb-row--open":void 0,children:[_.jsxs("td",{className:"jb-cell-job",title:W.description||W.name,children:[_.jsx("span",{className:"jb-name",children:W.name}),_.jsx(VEe,{state:Z}),U&&nH(U)&&_.jsxs("span",{className:KD(U)?"jb-progress jb-progress--stale":"jb-progress",title:KD(U)?"No progress for five minutes: the worker doing this has most likely died.":`Rows read so far. Last update ${new Date(U.progress.at).toLocaleTimeString()}.`,children:[KD(U)?"Not responding · ":"",nH(U),aH(U)?` · ${aH(U)}`:""]})]}),_.jsx("td",{children:_.jsx("code",{className:"jb-code",children:W.actionName})}),_.jsx("td",{children:W.schedule?_.jsx("span",{title:W.schedule,children:Zq(W.schedule)||"Custom"}):_.jsx("span",{className:"jb-dim",children:"—"})}),_.jsx("td",{children:W.schedule?Z==="paused"?_.jsx("span",{className:"jb-dim",children:"Paused"}):W.nextRunAt?Q2e(W.nextRunAt,Date.now()):_.jsx("span",{className:"jb-dim",children:"—"}):_.jsx("span",{className:"jb-dim",title:"Manual only — this job has no schedule",children:"—"})}),_.jsx("td",{children:Q?_.jsxs("button",{type:"button",className:"jb-lastrun jb-lastrun--btn","aria-expanded":se,title:se?"Hide this job’s runs":"Show this job’s runs",onClick:()=>x(se?null:W.id),children:[_.jsx(_2,{status:Q.status}),_.jsx("span",{className:"jb-dim",children:x2(Q.startedAt,Date.now())}),_.jsx("span",{className:`jb-caret${se?" jb-caret--open":""}`,children:_.jsx(Jp,{path:tX,size:14})})]}):_.jsx("span",{className:"jb-dim",children:"never"})}),_.jsx("td",{className:"jb-row-toggle",children:_.jsxs("label",{className:"jb-switch",title:W.schedule?W.status==="pause"?"Paused — turn on to let the schedule run again":"Running on its schedule — turn off to pause it":"No schedule — there is nothing for the scheduler to pick up",children:[_.jsx("input",{type:"checkbox",role:"switch",checked:!!W.schedule&&W.status!=="pause",disabled:K||!W.schedule,onChange:ge=>q(W.id,ge.target.checked?W2e:$2e,ge.target.checked?"Could not resume":"Could not pause")}),_.jsx("span",{className:"jb-switch-track","aria-hidden":"true",children:_.jsx("span",{className:"jb-switch-thumb"})}),_.jsx("span",{className:"jb-switch-label",children:W.schedule?W.status==="pause"?"Paused":"On":"No schedule"})]})}),_.jsxs("td",{className:"jb-row-actions",children:[_.jsx("button",{type:"button",disabled:K,title:"Run now","aria-label":"Run now",onClick:()=>q(W.id,Y2e,"Could not trigger the job"),children:_.jsx(Jp,{path:UEe,size:14})}),_.jsx("button",{type:"button",disabled:K,title:"Edit","aria-label":"Edit",onClick:()=>C(W),children:_.jsx(Jp,{path:YEe})}),_.jsx("button",{type:"button",className:"jb-danger",disabled:K,title:"Delete","aria-label":"Delete",onClick:()=>G(W),children:_.jsx(Jp,{path:$Ee})})]})]}),se&&_.jsx("tr",{className:"jb-runs-row",children:_.jsx("td",{colSpan:7,children:_.jsx(qEe,{jobId:W.id,refreshKey:R,openLogId:f.log,onOpenLog:ge=>f.set({log:ge})})})})]},W.id)})})]}),H.length===0&&_.jsxs("div",{className:"jb-empty jb-empty--inline",children:[_.jsxs("p",{className:"muted",children:["Nothing matches “",h,"”."]}),_.jsx("button",{type:"button",onClick:()=>p(""),children:"Clear the search"})]})]}),X.length>0&&_.jsxs(_.Fragment,{children:[_.jsx("h2",{className:"jb-section",children:"Recent runs"}),_.jsx("div",{className:"jb-runs",children:X.map(W=>_.jsxs("div",{className:"jb-run",children:[_.jsx(_2,{status:W.status}),_.jsx("span",{className:"jb-run-name",children:P[W.jobId]?.name||"Deleted job"}),_.jsxs("span",{className:"jb-dim",children:[x2(W.startedAt,Date.now()),S2(W.durationMs)?` · ${S2(W.durationMs)}`:"",W.triggeredBy?.type?` · ${W.triggeredBy.type}`:""]}),W.error&&_.jsx("span",{className:"jb-run-error",children:W.error.message||"Failed"})]},W.id))})]}),_.jsxs("p",{className:"muted jb-footnote",children:["Loading a file into a table is recorded separately — see"," ",t||"the upload screen","."]})]})}const iNe={jobs:e=>(e||"")+"/jobs"};function oNe(e){e=e||{},e.apiBase!==void 0&&I2e({base:e.apiBase}),j2e(e.optionSources),EEe(e.chainsApiBase);var t=iNe.jobs(e.basePath);return{routes:[_.jsx(oa,{path:t,element:_.jsx(aNe,{...e})},"jobs-list")],path:t}}const lNe=oNe({apiBase:"/api",optionSources:{backupServers:{url:"/monitor/connections/servers",label:"name"},backupDatabases:{url:"/monitor/connections/databases",label:"name"},backupBuckets:{url:"/monitor/connections/buckets",label:"name"}}}),sNe=_.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),_.jsx("path",{d:"M9 22V12h6v10"})]}),uNe=_.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"9"}),_.jsx("path",{d:"M12 7v5l3 2"})]}),cNe=_.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),_.jsx("path",{d:"M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5"}),_.jsx("path",{d:"M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6"})]}),fNe=_.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),hNe={count:0,onClick:()=>{}},dNe=[{key:"Admin",path:AU("userRoles")},{key:"App settings",path:"/settings/app"}];function cH(){const e=ef(),t=j.useMemo(()=>[{key:"Home",icon:sNe,path:"/home",clickHandler:()=>e("/home")},{key:"Monitor",icon:fNe,path:"/monitor",clickHandler:()=>e("/monitor")},{key:"Jobs",icon:uNe,path:"/jobs",clickHandler:()=>e("/jobs")},{key:"Backup connections",icon:cNe,path:"/connections",clickHandler:()=>e("/connections")}],[e]);return _.jsxs("div",{className:"app",children:[_.jsx(mie,{logo:"/logo.svg",expandedLogo:"/logo-wide.svg",notifications:hNe,settingsOverrides:dNe,drawerItems:t}),_.jsx("main",{className:"main",children:_.jsx(JQ,{})})]})}function vNe(){return _.jsxs(tJ,{children:[Sie({},{layout:_.jsx(cH,{})}),_.jsxs(oa,{element:_.jsx(wU,{children:_.jsx(cH,{})}),children:[_.jsx(oa,{path:"/",element:_.jsx(eg,{to:"/home",replace:!0})}),_.jsx(oa,{path:"/home",element:_.jsx(M2e,{})}),_.jsx(oa,{path:"/monitor",element:_.jsx(R2e,{})}),lNe.routes,_.jsx(oa,{path:"/connections",element:_.jsx(E2e,{})}),_.jsx(oa,{path:"/settings/app",element:_.jsx(Yie,{base:"/api/app-settings",fetch:Tt,statusUrl:"/setup/status"})})]}),_.jsx(oa,{path:"*",element:_.jsx(eg,{to:"/auth/login",replace:!0})})]})}FJ("");QK.createRoot(document.getElementById("root")).render(_.jsx(YK.StrictMode,{children:_.jsx(AJ,{children:_.jsx(Eie,{children:_.jsx(Rne,{children:_.jsx(vNe,{})})})})}));