mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 01:14:45 +02:00
- Fix leftover severity references (info→routine in filter dropdown) - Fix node_id int handling in connector and channels (handle both int and string) - Add LLM-generated reports for notifications (replace raw data dumps) - Fix health.score.composite attribute path for RF reports - Add deterministic HF band conditions from SFI/Kp values - Remove max_tokens from LLM calls (character limits at delivery) - Weather feed improvements: show event_type + area, local events first - Fix is_online to use configured offline_threshold_hours in data store - Update stale defaults: offline 24→2h, battery_warning 20→30% - Add TODO comments for packet_threshold scale bug Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
523 lines
2 MiB
523 lines
2 MiB
function doe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var og=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ft(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ZU={exports:{}},oS={},YU={exports:{}},yt={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var zy=Symbol.for("react.element"),voe=Symbol.for("react.portal"),poe=Symbol.for("react.fragment"),goe=Symbol.for("react.strict_mode"),moe=Symbol.for("react.profiler"),yoe=Symbol.for("react.provider"),xoe=Symbol.for("react.context"),_oe=Symbol.for("react.forward_ref"),boe=Symbol.for("react.suspense"),woe=Symbol.for("react.memo"),Soe=Symbol.for("react.lazy"),U5=Symbol.iterator;function Toe(e){return e===null||typeof e!="object"?null:(e=U5&&e[U5]||e["@@iterator"],typeof e=="function"?e:null)}var XU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qU=Object.assign,KU={};function uv(e,t,r){this.props=e,this.context=t,this.refs=KU,this.updater=r||XU}uv.prototype.isReactComponent={};uv.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};uv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QU(){}QU.prototype=uv.prototype;function HO(e,t,r){this.props=e,this.context=t,this.refs=KU,this.updater=r||XU}var UO=HO.prototype=new QU;UO.constructor=HO;qU(UO,uv.prototype);UO.isPureReactComponent=!0;var Z5=Array.isArray,JU=Object.prototype.hasOwnProperty,ZO={current:null},e7={key:!0,ref:!0,__self:!0,__source:!0};function t7(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)JU.call(t,n)&&!e7.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:zy,type:e,key:a,ref:o,props:i,_owner:ZO.current}}function Aoe(e,t){return{$$typeof:zy,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function YO(e){return typeof e=="object"&&e!==null&&e.$$typeof===zy}function Coe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Y5=/\/+/g;function IA(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Coe(""+e.key):t.toString(36)}function B_(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case zy:case voe:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+IA(o,0):n,Z5(i)?(r="",e!=null&&(r=e.replace(Y5,"$&/")+"/"),B_(i,t,r,"",function(u){return u})):i!=null&&(YO(i)&&(i=Aoe(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Y5,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",Z5(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+IA(a,s);o+=B_(a,t,r,l,i)}else if(l=Toe(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+IA(a,s++),o+=B_(a,t,r,l,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function G0(e,t,r){if(e==null)return e;var n=[],i=0;return B_(e,n,"","",function(a){return t.call(r,a,i++)}),n}function Moe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xn={current:null},z_={transition:null},Poe={ReactCurrentDispatcher:Xn,ReactCurrentBatchConfig:z_,ReactCurrentOwner:ZO};function r7(){throw Error("act(...) is not supported in production builds of React.")}yt.Children={map:G0,forEach:function(e,t,r){G0(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return G0(e,function(){t++}),t},toArray:function(e){return G0(e,function(t){return t})||[]},only:function(e){if(!YO(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};yt.Component=uv;yt.Fragment=poe;yt.Profiler=moe;yt.PureComponent=HO;yt.StrictMode=goe;yt.Suspense=boe;yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Poe;yt.act=r7;yt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=qU({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=ZO.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)JU.call(t,l)&&!e7.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:zy,type:e.type,key:i,ref:a,props:n,_owner:o}};yt.createContext=function(e){return e={$$typeof:xoe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:yoe,_context:e},e.Consumer=e};yt.createElement=t7;yt.createFactory=function(e){var t=t7.bind(null,e);return t.type=e,t};yt.createRef=function(){return{current:null}};yt.forwardRef=function(e){return{$$typeof:_oe,render:e}};yt.isValidElement=YO;yt.lazy=function(e){return{$$typeof:Soe,_payload:{_status:-1,_result:e},_init:Moe}};yt.memo=function(e,t){return{$$typeof:woe,type:e,compare:t===void 0?null:t}};yt.startTransition=function(e){var t=z_.transition;z_.transition={};try{e()}finally{z_.transition=t}};yt.unstable_act=r7;yt.useCallback=function(e,t){return Xn.current.useCallback(e,t)};yt.useContext=function(e){return Xn.current.useContext(e)};yt.useDebugValue=function(){};yt.useDeferredValue=function(e){return Xn.current.useDeferredValue(e)};yt.useEffect=function(e,t){return Xn.current.useEffect(e,t)};yt.useId=function(){return Xn.current.useId()};yt.useImperativeHandle=function(e,t,r){return Xn.current.useImperativeHandle(e,t,r)};yt.useInsertionEffect=function(e,t){return Xn.current.useInsertionEffect(e,t)};yt.useLayoutEffect=function(e,t){return Xn.current.useLayoutEffect(e,t)};yt.useMemo=function(e,t){return Xn.current.useMemo(e,t)};yt.useReducer=function(e,t,r){return Xn.current.useReducer(e,t,r)};yt.useRef=function(e){return Xn.current.useRef(e)};yt.useState=function(e){return Xn.current.useState(e)};yt.useSyncExternalStore=function(e,t,r){return Xn.current.useSyncExternalStore(e,t,r)};yt.useTransition=function(){return Xn.current.useTransition()};yt.version="18.3.1";YU.exports=yt;var H=YU.exports;const Q=Ft(H),Loe=doe({__proto__:null,default:Q},[H]);/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var koe=H,Ioe=Symbol.for("react.element"),Ooe=Symbol.for("react.fragment"),Eoe=Object.prototype.hasOwnProperty,Doe=koe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Noe={key:!0,ref:!0,__self:!0,__source:!0};function n7(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Eoe.call(t,n)&&!Noe.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Ioe,type:e,key:a,ref:o,props:i,_owner:Doe.current}}oS.Fragment=Ooe;oS.jsx=n7;oS.jsxs=n7;ZU.exports=oS;var y=ZU.exports,uP={},i7={exports:{}},Ei={},a7={exports:{}},o7={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/(function(e){function t(F,V){var W=F.length;F.push(V);e:for(;0<W;){var Y=W-1>>>1,Z=F[Y];if(0<i(Z,V))F[Y]=V,F[W]=Z,W=Y;else break e}}function r(F){return F.length===0?null:F[0]}function n(F){if(F.length===0)return null;var V=F[0],W=F.pop();if(W!==V){F[0]=W;e:for(var Y=0,Z=F.length,J=Z>>>1;Y<J;){var ne=2*(Y+1)-1,le=F[ne],fe=ne+1,ze=F[fe];if(0>i(le,W))fe<Z&&0>i(ze,le)?(F[Y]=ze,F[fe]=W,Y=fe):(F[Y]=le,F[ne]=W,Y=ne);else if(fe<Z&&0>i(ze,W))F[Y]=ze,F[fe]=W,Y=fe;else break e}}return V}function i(F,V){var W=F.sortIndex-V.sortIndex;return W!==0?W:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,d=!1,v=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(F){for(var V=r(u);V!==null;){if(V.callback===null)n(u);else if(V.startTime<=F)n(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=r(u)}}function S(F){if(g=!1,b(F),!v)if(r(l)!==null)v=!0,$(T);else{var V=r(u);V!==null&&U(S,V.startTime-F)}}function T(F,V){v=!1,g&&(g=!1,x(P),P=-1),d=!0;var W=h;try{for(b(V),f=r(l);f!==null&&(!(f.expirationTime>V)||F&&!O());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var Z=Y(f.expirationTime<=V);V=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===r(l)&&n(l),b(V)}else n(l);f=r(l)}if(f!==null)var J=!0;else{var ne=r(u);ne!==null&&U(S,ne.startTime-V),J=!1}return J}finally{f=null,h=W,d=!1}}var A=!1,M=null,P=-1,I=5,k=-1;function O(){return!(e.unstable_now()-k<I)}function D(){if(M!==null){var F=e.unstable_now();k=F;var V=!0;try{V=M(!0,F)}finally{V?N():(A=!1,M=null)}}else A=!1}var N;if(typeof _=="function")N=function(){_(D)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,z=j.port2;j.port1.onmessage=D,N=function(){z.postMessage(null)}}else N=function(){m(D,0)};function $(F){M=F,A||(A=!0,N())}function U(F,V){P=m(function(){F(e.unstable_now())},V)}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_continueExecution=function(){v||d||(v=!0,$(T))},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"):I=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(F){switch(h){case 1:case 2:case 3:var V=3;break;default:V=h}var W=h;h=V;try{return F()}finally{h=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,V){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var W=h;h=F;try{return V()}finally{h=W}},e.unstable_scheduleCallback=function(F,V,W){var Y=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Y+W:Y):W=Y,F){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=W+Z,F={id:c++,callback:V,priorityLevel:F,startTime:W,expirationTime:Z,sortIndex:-1},W>Y?(F.sortIndex=W,t(u,F),r(l)===null&&F===r(u)&&(g?(x(P),P=-1):g=!0,U(S,W-Y))):(F.sortIndex=Z,t(l,F),v||d||(v=!0,$(T))),F},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(F){var V=h;return function(){var W=h;h=V;try{return F.apply(this,arguments)}finally{h=W}}}})(o7);a7.exports=o7;var joe=a7.exports;/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Roe=H,Oi=joe;function me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s7=new Set,rm={};function df(e,t){hd(e,t),hd(e+"Capture",t)}function hd(e,t){for(rm[e]=t,e=0;e<t.length;e++)s7.add(t[e])}var ks=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cP=Object.prototype.hasOwnProperty,Boe=/^[: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]*$/,X5={},q5={};function zoe(e){return cP.call(q5,e)?!0:cP.call(X5,e)?!1:Boe.test(e)?q5[e]=!0:(X5[e]=!0,!1)}function $oe(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Foe(e,t,r,n){if(t===null||typeof t>"u"||$oe(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qn(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var yn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){yn[e]=new qn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];yn[t]=new qn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){yn[e]=new qn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){yn[e]=new qn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){yn[e]=new qn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){yn[e]=new qn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){yn[e]=new qn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){yn[e]=new qn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){yn[e]=new qn(e,5,!1,e.toLowerCase(),null,!1,!1)});var XO=/[\-:]([a-z])/g;function qO(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(XO,qO);yn[t]=new qn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(XO,qO);yn[t]=new qn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(XO,qO);yn[t]=new qn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){yn[e]=new qn(e,1,!1,e.toLowerCase(),null,!1,!1)});yn.xlinkHref=new qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){yn[e]=new qn(e,1,!1,e.toLowerCase(),null,!0,!0)});function KO(e,t,r,n){var i=yn.hasOwnProperty(t)?yn[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Foe(t,r,i,n)&&(r=null),n||i===null?zoe(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Zs=Roe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W0=Symbol.for("react.element"),Ah=Symbol.for("react.portal"),Ch=Symbol.for("react.fragment"),QO=Symbol.for("react.strict_mode"),fP=Symbol.for("react.profiler"),l7=Symbol.for("react.provider"),u7=Symbol.for("react.context"),JO=Symbol.for("react.forward_ref"),hP=Symbol.for("react.suspense"),dP=Symbol.for("react.suspense_list"),eE=Symbol.for("react.memo"),gl=Symbol.for("react.lazy"),c7=Symbol.for("react.offscreen"),K5=Symbol.iterator;function cp(e){return e===null||typeof e!="object"?null:(e=K5&&e[K5]||e["@@iterator"],typeof e=="function"?e:null)}var cr=Object.assign,OA;function sg(e){if(OA===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);OA=t&&t[1]||""}return`
|
||
`+OA+e}var EA=!1;function DA(e,t){if(!e||EA)return"";EA=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
||
`),a=n.stack.split(`
|
||
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
|
||
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{EA=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?sg(e):""}function Voe(e){switch(e.tag){case 5:return sg(e.type);case 16:return sg("Lazy");case 13:return sg("Suspense");case 19:return sg("SuspenseList");case 0:case 2:case 15:return e=DA(e.type,!1),e;case 11:return e=DA(e.type.render,!1),e;case 1:return e=DA(e.type,!0),e;default:return""}}function vP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ch:return"Fragment";case Ah:return"Portal";case fP:return"Profiler";case QO:return"StrictMode";case hP:return"Suspense";case dP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case u7:return(e.displayName||"Context")+".Consumer";case l7:return(e._context.displayName||"Context")+".Provider";case JO:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eE:return t=e.displayName||null,t!==null?t:vP(e.type)||"Memo";case gl:t=e._payload,e=e._init;try{return vP(e(t))}catch{}}return null}function Goe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vP(t);case 8:return t===QO?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function eu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function f7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Woe(e){var t=f7(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function H0(e){e._valueTracker||(e._valueTracker=Woe(e))}function h7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=f7(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function yb(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function pP(e,t){var r=t.checked;return cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Q5(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=eu(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function d7(e,t){t=t.checked,t!=null&&KO(e,"checked",t,!1)}function gP(e,t){d7(e,t);var r=eu(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mP(e,t.type,r):t.hasOwnProperty("defaultValue")&&mP(e,t.type,eu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function J5(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mP(e,t,r){(t!=="number"||yb(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var lg=Array.isArray;function Yh(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+eu(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function yP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(me(91));return cr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eB(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(me(92));if(lg(r)){if(1<r.length)throw Error(me(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:eu(r)}}function v7(e,t){var r=eu(t.value),n=eu(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function tB(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function p7(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xP(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?p7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var U0,g7=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(U0=U0||document.createElement("div"),U0.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=U0.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nm(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ag={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Hoe=["Webkit","ms","Moz","O"];Object.keys(Ag).forEach(function(e){Hoe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ag[t]=Ag[e]})});function m7(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ag.hasOwnProperty(e)&&Ag[e]?(""+t).trim():t+"px"}function y7(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=m7(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var Uoe=cr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _P(e,t){if(t){if(Uoe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(me(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(me(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(me(61))}if(t.style!=null&&typeof t.style!="object")throw Error(me(62))}}function bP(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 wP=null;function tE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var SP=null,Xh=null,qh=null;function rB(e){if(e=Vy(e)){if(typeof SP!="function")throw Error(me(280));var t=e.stateNode;t&&(t=fS(t),SP(e.stateNode,e.type,t))}}function x7(e){Xh?qh?qh.push(e):qh=[e]:Xh=e}function _7(){if(Xh){var e=Xh,t=qh;if(qh=Xh=null,rB(e),t)for(e=0;e<t.length;e++)rB(t[e])}}function b7(e,t){return e(t)}function w7(){}var NA=!1;function S7(e,t,r){if(NA)return e(t,r);NA=!0;try{return b7(e,t,r)}finally{NA=!1,(Xh!==null||qh!==null)&&(w7(),_7())}}function im(e,t){var r=e.stateNode;if(r===null)return null;var n=fS(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(me(231,t,typeof r));return r}var TP=!1;if(ks)try{var fp={};Object.defineProperty(fp,"passive",{get:function(){TP=!0}}),window.addEventListener("test",fp,fp),window.removeEventListener("test",fp,fp)}catch{TP=!1}function Zoe(e,t,r,n,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Cg=!1,xb=null,_b=!1,AP=null,Yoe={onError:function(e){Cg=!0,xb=e}};function Xoe(e,t,r,n,i,a,o,s,l){Cg=!1,xb=null,Zoe.apply(Yoe,arguments)}function qoe(e,t,r,n,i,a,o,s,l){if(Xoe.apply(this,arguments),Cg){if(Cg){var u=xb;Cg=!1,xb=null}else throw Error(me(198));_b||(_b=!0,AP=u)}}function vf(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function T7(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function nB(e){if(vf(e)!==e)throw Error(me(188))}function Koe(e){var t=e.alternate;if(!t){if(t=vf(e),t===null)throw Error(me(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return nB(i),e;if(a===n)return nB(i),t;a=a.sibling}throw Error(me(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,s=i.child;s;){if(s===r){o=!0,r=i,n=a;break}if(s===n){o=!0,n=i,r=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===r){o=!0,r=a,n=i;break}if(s===n){o=!0,n=a,r=i;break}s=s.sibling}if(!o)throw Error(me(189))}}if(r.alternate!==n)throw Error(me(190))}if(r.tag!==3)throw Error(me(188));return r.stateNode.current===r?e:t}function A7(e){return e=Koe(e),e!==null?C7(e):null}function C7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=C7(e);if(t!==null)return t;e=e.sibling}return null}var M7=Oi.unstable_scheduleCallback,iB=Oi.unstable_cancelCallback,Qoe=Oi.unstable_shouldYield,Joe=Oi.unstable_requestPaint,wr=Oi.unstable_now,ese=Oi.unstable_getCurrentPriorityLevel,rE=Oi.unstable_ImmediatePriority,P7=Oi.unstable_UserBlockingPriority,bb=Oi.unstable_NormalPriority,tse=Oi.unstable_LowPriority,L7=Oi.unstable_IdlePriority,sS=null,Mo=null;function rse(e){if(Mo&&typeof Mo.onCommitFiberRoot=="function")try{Mo.onCommitFiberRoot(sS,e,void 0,(e.current.flags&128)===128)}catch{}}var za=Math.clz32?Math.clz32:ase,nse=Math.log,ise=Math.LN2;function ase(e){return e>>>=0,e===0?32:31-(nse(e)/ise|0)|0}var Z0=64,Y0=4194304;function ug(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function wb(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=ug(s):(a&=o,a!==0&&(n=ug(a)))}else o=r&~i,o!==0?n=ug(o):a!==0&&(n=ug(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-za(t),i=1<<r,n|=e[r],t&=~i;return n}function ose(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sse(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-za(a),s=1<<o,l=i[o];l===-1?(!(s&r)||s&n)&&(i[o]=ose(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function CP(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k7(){var e=Z0;return Z0<<=1,!(Z0&4194240)&&(Z0=64),e}function jA(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function $y(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-za(t),e[t]=r}function lse(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-za(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function nE(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-za(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Dt=0;function I7(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var O7,iE,E7,D7,N7,MP=!1,X0=[],Nl=null,jl=null,Rl=null,am=new Map,om=new Map,bl=[],use="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 submit".split(" ");function aB(e,t){switch(e){case"focusin":case"focusout":Nl=null;break;case"dragenter":case"dragleave":jl=null;break;case"mouseover":case"mouseout":Rl=null;break;case"pointerover":case"pointerout":am.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":om.delete(t.pointerId)}}function hp(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Vy(t),t!==null&&iE(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function cse(e,t,r,n,i){switch(t){case"focusin":return Nl=hp(Nl,e,t,r,n,i),!0;case"dragenter":return jl=hp(jl,e,t,r,n,i),!0;case"mouseover":return Rl=hp(Rl,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return am.set(a,hp(am.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,om.set(a,hp(om.get(a)||null,e,t,r,n,i)),!0}return!1}function j7(e){var t=gc(e.target);if(t!==null){var r=vf(t);if(r!==null){if(t=r.tag,t===13){if(t=T7(r),t!==null){e.blockedOn=t,N7(e.priority,function(){E7(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=PP(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);wP=n,r.target.dispatchEvent(n),wP=null}else return t=Vy(r),t!==null&&iE(t),e.blockedOn=r,!1;t.shift()}return!0}function oB(e,t,r){$_(e)&&r.delete(t)}function fse(){MP=!1,Nl!==null&&$_(Nl)&&(Nl=null),jl!==null&&$_(jl)&&(jl=null),Rl!==null&&$_(Rl)&&(Rl=null),am.forEach(oB),om.forEach(oB)}function dp(e,t){e.blockedOn===t&&(e.blockedOn=null,MP||(MP=!0,Oi.unstable_scheduleCallback(Oi.unstable_NormalPriority,fse)))}function sm(e){function t(i){return dp(i,e)}if(0<X0.length){dp(X0[0],e);for(var r=1;r<X0.length;r++){var n=X0[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Nl!==null&&dp(Nl,e),jl!==null&&dp(jl,e),Rl!==null&&dp(Rl,e),am.forEach(t),om.forEach(t),r=0;r<bl.length;r++)n=bl[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<bl.length&&(r=bl[0],r.blockedOn===null);)j7(r),r.blockedOn===null&&bl.shift()}var Kh=Zs.ReactCurrentBatchConfig,Sb=!0;function hse(e,t,r,n){var i=Dt,a=Kh.transition;Kh.transition=null;try{Dt=1,aE(e,t,r,n)}finally{Dt=i,Kh.transition=a}}function dse(e,t,r,n){var i=Dt,a=Kh.transition;Kh.transition=null;try{Dt=4,aE(e,t,r,n)}finally{Dt=i,Kh.transition=a}}function aE(e,t,r,n){if(Sb){var i=PP(e,t,r,n);if(i===null)UA(e,t,n,Tb,r),aB(e,n);else if(cse(i,e,t,r,n))n.stopPropagation();else if(aB(e,n),t&4&&-1<use.indexOf(e)){for(;i!==null;){var a=Vy(i);if(a!==null&&O7(a),a=PP(e,t,r,n),a===null&&UA(e,t,n,Tb,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else UA(e,t,n,null,r)}}var Tb=null;function PP(e,t,r,n){if(Tb=null,e=tE(n),e=gc(e),e!==null)if(t=vf(e),t===null)e=null;else if(r=t.tag,r===13){if(e=T7(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tb=e,null}function R7(e){switch(e){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ese()){case rE:return 1;case P7:return 4;case bb:case tse:return 16;case L7:return 536870912;default:return 16}default:return 16}}var Sl=null,oE=null,F_=null;function B7(){if(F_)return F_;var e,t=oE,r=t.length,n,i="value"in Sl?Sl.value:Sl.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return F_=i.slice(e,1<n?1-n:void 0)}function V_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function q0(){return!0}function sB(){return!1}function Di(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?q0:sB,this.isPropagationStopped=sB,this}return cr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=q0)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=q0)},persist:function(){},isPersistent:q0}),t}var cv={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sE=Di(cv),Fy=cr({},cv,{view:0,detail:0}),vse=Di(Fy),RA,BA,vp,lS=cr({},Fy,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lE,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vp&&(vp&&e.type==="mousemove"?(RA=e.screenX-vp.screenX,BA=e.screenY-vp.screenY):BA=RA=0,vp=e),RA)},movementY:function(e){return"movementY"in e?e.movementY:BA}}),lB=Di(lS),pse=cr({},lS,{dataTransfer:0}),gse=Di(pse),mse=cr({},Fy,{relatedTarget:0}),zA=Di(mse),yse=cr({},cv,{animationName:0,elapsedTime:0,pseudoElement:0}),xse=Di(yse),_se=cr({},cv,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bse=Di(_se),wse=cr({},cv,{data:0}),uB=Di(wse),Sse={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tse={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"},Ase={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cse(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ase[e])?!!t[e]:!1}function lE(){return Cse}var Mse=cr({},Fy,{key:function(e){if(e.key){var t=Sse[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=V_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tse[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lE,charCode:function(e){return e.type==="keypress"?V_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?V_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pse=Di(Mse),Lse=cr({},lS,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cB=Di(Lse),kse=cr({},Fy,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lE}),Ise=Di(kse),Ose=cr({},cv,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ese=Di(Ose),Dse=cr({},lS,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nse=Di(Dse),jse=[9,13,27,32],uE=ks&&"CompositionEvent"in window,Mg=null;ks&&"documentMode"in document&&(Mg=document.documentMode);var Rse=ks&&"TextEvent"in window&&!Mg,z7=ks&&(!uE||Mg&&8<Mg&&11>=Mg),fB=" ",hB=!1;function $7(e,t){switch(e){case"keyup":return jse.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mh=!1;function Bse(e,t){switch(e){case"compositionend":return F7(t);case"keypress":return t.which!==32?null:(hB=!0,fB);case"textInput":return e=t.data,e===fB&&hB?null:e;default:return null}}function zse(e,t){if(Mh)return e==="compositionend"||!uE&&$7(e,t)?(e=B7(),F_=oE=Sl=null,Mh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return z7&&t.locale!=="ko"?null:t.data;default:return null}}var $se={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 dB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$se[e.type]:t==="textarea"}function V7(e,t,r,n){x7(n),t=Ab(t,"onChange"),0<t.length&&(r=new sE("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Pg=null,lm=null;function Fse(e){J7(e,0)}function uS(e){var t=kh(e);if(h7(t))return e}function Vse(e,t){if(e==="change")return t}var G7=!1;if(ks){var $A;if(ks){var FA="oninput"in document;if(!FA){var vB=document.createElement("div");vB.setAttribute("oninput","return;"),FA=typeof vB.oninput=="function"}$A=FA}else $A=!1;G7=$A&&(!document.documentMode||9<document.documentMode)}function pB(){Pg&&(Pg.detachEvent("onpropertychange",W7),lm=Pg=null)}function W7(e){if(e.propertyName==="value"&&uS(lm)){var t=[];V7(t,lm,e,tE(e)),S7(Fse,t)}}function Gse(e,t,r){e==="focusin"?(pB(),Pg=t,lm=r,Pg.attachEvent("onpropertychange",W7)):e==="focusout"&&pB()}function Wse(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uS(lm)}function Hse(e,t){if(e==="click")return uS(t)}function Use(e,t){if(e==="input"||e==="change")return uS(t)}function Zse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ha=typeof Object.is=="function"?Object.is:Zse;function um(e,t){if(Ha(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!cP.call(t,i)||!Ha(e[i],t[i]))return!1}return!0}function gB(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mB(e,t){var r=gB(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gB(r)}}function H7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function U7(){for(var e=window,t=yb();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=yb(e.document)}return t}function cE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yse(e){var t=U7(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&H7(r.ownerDocument.documentElement,r)){if(n!==null&&cE(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=mB(r,a);var o=mB(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Xse=ks&&"documentMode"in document&&11>=document.documentMode,Ph=null,LP=null,Lg=null,kP=!1;function yB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;kP||Ph==null||Ph!==yb(n)||(n=Ph,"selectionStart"in n&&cE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Lg&&um(Lg,n)||(Lg=n,n=Ab(LP,"onSelect"),0<n.length&&(t=new sE("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ph)))}function K0(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Lh={animationend:K0("Animation","AnimationEnd"),animationiteration:K0("Animation","AnimationIteration"),animationstart:K0("Animation","AnimationStart"),transitionend:K0("Transition","TransitionEnd")},VA={},Z7={};ks&&(Z7=document.createElement("div").style,"AnimationEvent"in window||(delete Lh.animationend.animation,delete Lh.animationiteration.animation,delete Lh.animationstart.animation),"TransitionEvent"in window||delete Lh.transitionend.transition);function cS(e){if(VA[e])return VA[e];if(!Lh[e])return e;var t=Lh[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Z7)return VA[e]=t[r];return e}var Y7=cS("animationend"),X7=cS("animationiteration"),q7=cS("animationstart"),K7=cS("transitionend"),Q7=new Map,xB="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function uu(e,t){Q7.set(e,t),df(t,[e])}for(var GA=0;GA<xB.length;GA++){var WA=xB[GA],qse=WA.toLowerCase(),Kse=WA[0].toUpperCase()+WA.slice(1);uu(qse,"on"+Kse)}uu(Y7,"onAnimationEnd");uu(X7,"onAnimationIteration");uu(q7,"onAnimationStart");uu("dblclick","onDoubleClick");uu("focusin","onFocus");uu("focusout","onBlur");uu(K7,"onTransitionEnd");hd("onMouseEnter",["mouseout","mouseover"]);hd("onMouseLeave",["mouseout","mouseover"]);hd("onPointerEnter",["pointerout","pointerover"]);hd("onPointerLeave",["pointerout","pointerover"]);df("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));df("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));df("onBeforeInput",["compositionend","keypress","textInput","paste"]);df("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));df("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));df("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cg="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(" "),Qse=new Set("cancel close invalid load scroll toggle".split(" ").concat(cg));function _B(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,qoe(n,t,void 0,e),e.currentTarget=null}function J7(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var s=n[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;_B(i,s,u),a=l}else for(o=0;o<n.length;o++){if(s=n[o],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;_B(i,s,u),a=l}}}if(_b)throw e=AP,_b=!1,AP=null,e}function qt(e,t){var r=t[NP];r===void 0&&(r=t[NP]=new Set);var n=e+"__bubble";r.has(n)||(e9(t,e,2,!1),r.add(n))}function HA(e,t,r){var n=0;t&&(n|=4),e9(r,e,n,t)}var Q0="_reactListening"+Math.random().toString(36).slice(2);function cm(e){if(!e[Q0]){e[Q0]=!0,s7.forEach(function(r){r!=="selectionchange"&&(Qse.has(r)||HA(r,!1,e),HA(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Q0]||(t[Q0]=!0,HA("selectionchange",!1,t))}}function e9(e,t,r,n){switch(R7(t)){case 1:var i=hse;break;case 4:i=dse;break;default:i=aE}r=i.bind(null,t,r,e),i=void 0,!TP||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function UA(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=gc(s),o===null)return;if(l=o.tag,l===5||l===6){n=a=o;continue e}s=s.parentNode}}n=n.return}S7(function(){var u=a,c=tE(r),f=[];e:{var h=Q7.get(e);if(h!==void 0){var d=sE,v=e;switch(e){case"keypress":if(V_(r)===0)break e;case"keydown":case"keyup":d=Pse;break;case"focusin":v="focus",d=zA;break;case"focusout":v="blur",d=zA;break;case"beforeblur":case"afterblur":d=zA;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=lB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=gse;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Ise;break;case Y7:case X7:case q7:d=xse;break;case K7:d=Ese;break;case"scroll":d=vse;break;case"wheel":d=Nse;break;case"copy":case"cut":case"paste":d=bse;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=cB}var g=(t&4)!==0,m=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var _=u,b;_!==null;){b=_;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,x!==null&&(S=im(_,x),S!=null&&g.push(fm(_,S,b)))),m)break;_=_.return}0<g.length&&(h=new d(h,v,null,r,c),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",h&&r!==wP&&(v=r.relatedTarget||r.fromElement)&&(gc(v)||v[Is]))break e;if((d||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,d?(v=r.relatedTarget||r.toElement,d=u,v=v?gc(v):null,v!==null&&(m=vf(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(d=null,v=u),d!==v)){if(g=lB,S="onMouseLeave",x="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(g=cB,S="onPointerLeave",x="onPointerEnter",_="pointer"),m=d==null?h:kh(d),b=v==null?h:kh(v),h=new g(S,_+"leave",d,r,c),h.target=m,h.relatedTarget=b,S=null,gc(c)===u&&(g=new g(x,_+"enter",v,r,c),g.target=b,g.relatedTarget=m,S=g),m=S,d&&v)t:{for(g=d,x=v,_=0,b=g;b;b=Vf(b))_++;for(b=0,S=x;S;S=Vf(S))b++;for(;0<_-b;)g=Vf(g),_--;for(;0<b-_;)x=Vf(x),b--;for(;_--;){if(g===x||x!==null&&g===x.alternate)break t;g=Vf(g),x=Vf(x)}g=null}else g=null;d!==null&&bB(f,h,d,g,!1),v!==null&&m!==null&&bB(f,m,v,g,!0)}}e:{if(h=u?kh(u):window,d=h.nodeName&&h.nodeName.toLowerCase(),d==="select"||d==="input"&&h.type==="file")var T=Vse;else if(dB(h))if(G7)T=Use;else{T=Wse;var A=Gse}else(d=h.nodeName)&&d.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=Hse);if(T&&(T=T(e,u))){V7(f,T,r,c);break e}A&&A(e,h,u),e==="focusout"&&(A=h._wrapperState)&&A.controlled&&h.type==="number"&&mP(h,"number",h.value)}switch(A=u?kh(u):window,e){case"focusin":(dB(A)||A.contentEditable==="true")&&(Ph=A,LP=u,Lg=null);break;case"focusout":Lg=LP=Ph=null;break;case"mousedown":kP=!0;break;case"contextmenu":case"mouseup":case"dragend":kP=!1,yB(f,r,c);break;case"selectionchange":if(Xse)break;case"keydown":case"keyup":yB(f,r,c)}var M;if(uE)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Mh?$7(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(z7&&r.locale!=="ko"&&(Mh||P!=="onCompositionStart"?P==="onCompositionEnd"&&Mh&&(M=B7()):(Sl=c,oE="value"in Sl?Sl.value:Sl.textContent,Mh=!0)),A=Ab(u,P),0<A.length&&(P=new uB(P,e,null,r,c),f.push({event:P,listeners:A}),M?P.data=M:(M=F7(r),M!==null&&(P.data=M)))),(M=Rse?Bse(e,r):zse(e,r))&&(u=Ab(u,"onBeforeInput"),0<u.length&&(c=new uB("onBeforeInput","beforeinput",null,r,c),f.push({event:c,listeners:u}),c.data=M))}J7(f,t)})}function fm(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ab(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=im(e,r),a!=null&&n.unshift(fm(e,a,i)),a=im(e,t),a!=null&&n.push(fm(e,a,i))),e=e.return}return n}function Vf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bB(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=im(r,a),l!=null&&o.unshift(fm(r,l,s))):i||(l=im(r,a),l!=null&&o.push(fm(r,l,s)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Jse=/\r\n?/g,ele=/\u0000|\uFFFD/g;function wB(e){return(typeof e=="string"?e:""+e).replace(Jse,`
|
||
`).replace(ele,"")}function J0(e,t,r){if(t=wB(t),wB(e)!==t&&r)throw Error(me(425))}function Cb(){}var IP=null,OP=null;function EP(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var DP=typeof setTimeout=="function"?setTimeout:void 0,tle=typeof clearTimeout=="function"?clearTimeout:void 0,SB=typeof Promise=="function"?Promise:void 0,rle=typeof queueMicrotask=="function"?queueMicrotask:typeof SB<"u"?function(e){return SB.resolve(null).then(e).catch(nle)}:DP;function nle(e){setTimeout(function(){throw e})}function ZA(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),sm(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);sm(t)}function Bl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function TB(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var fv=Math.random().toString(36).slice(2),po="__reactFiber$"+fv,hm="__reactProps$"+fv,Is="__reactContainer$"+fv,NP="__reactEvents$"+fv,ile="__reactListeners$"+fv,ale="__reactHandles$"+fv;function gc(e){var t=e[po];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Is]||r[po]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=TB(e);e!==null;){if(r=e[po])return r;e=TB(e)}return t}e=r,r=e.parentNode}return null}function Vy(e){return e=e[po]||e[Is],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function kh(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(me(33))}function fS(e){return e[hm]||null}var jP=[],Ih=-1;function cu(e){return{current:e}}function Jt(e){0>Ih||(e.current=jP[Ih],jP[Ih]=null,Ih--)}function Yt(e,t){Ih++,jP[Ih]=e.current,e.current=t}var tu={},Nn=cu(tu),li=cu(!1),Wc=tu;function dd(e,t){var r=e.type.contextTypes;if(!r)return tu;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ui(e){return e=e.childContextTypes,e!=null}function Mb(){Jt(li),Jt(Nn)}function AB(e,t,r){if(Nn.current!==tu)throw Error(me(168));Yt(Nn,t),Yt(li,r)}function t9(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(me(108,Goe(e)||"Unknown",i));return cr({},r,n)}function Pb(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tu,Wc=Nn.current,Yt(Nn,e),Yt(li,li.current),!0}function CB(e,t,r){var n=e.stateNode;if(!n)throw Error(me(169));r?(e=t9(e,t,Wc),n.__reactInternalMemoizedMergedChildContext=e,Jt(li),Jt(Nn),Yt(Nn,e)):Jt(li),Yt(li,r)}var us=null,hS=!1,YA=!1;function r9(e){us===null?us=[e]:us.push(e)}function ole(e){hS=!0,r9(e)}function fu(){if(!YA&&us!==null){YA=!0;var e=0,t=Dt;try{var r=us;for(Dt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}us=null,hS=!1}catch(i){throw us!==null&&(us=us.slice(e+1)),M7(rE,fu),i}finally{Dt=t,YA=!1}}return null}var Oh=[],Eh=0,Lb=null,kb=0,Ki=[],Qi=0,Hc=null,fs=1,hs="";function tc(e,t){Oh[Eh++]=kb,Oh[Eh++]=Lb,Lb=e,kb=t}function n9(e,t,r){Ki[Qi++]=fs,Ki[Qi++]=hs,Ki[Qi++]=Hc,Hc=e;var n=fs;e=hs;var i=32-za(n)-1;n&=~(1<<i),r+=1;var a=32-za(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,fs=1<<32-za(t)+i|r<<i|n,hs=a+e}else fs=1<<a|r<<i|n,hs=e}function fE(e){e.return!==null&&(tc(e,1),n9(e,1,0))}function hE(e){for(;e===Lb;)Lb=Oh[--Eh],Oh[Eh]=null,kb=Oh[--Eh],Oh[Eh]=null;for(;e===Hc;)Hc=Ki[--Qi],Ki[Qi]=null,hs=Ki[--Qi],Ki[Qi]=null,fs=Ki[--Qi],Ki[Qi]=null}var ki=null,Ai=null,er=!1,Da=null;function i9(e,t){var r=ra(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function MB(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ki=e,Ai=Bl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ki=e,Ai=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Hc!==null?{id:fs,overflow:hs}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ra(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ki=e,Ai=null,!0):!1;default:return!1}}function RP(e){return(e.mode&1)!==0&&(e.flags&128)===0}function BP(e){if(er){var t=Ai;if(t){var r=t;if(!MB(e,t)){if(RP(e))throw Error(me(418));t=Bl(r.nextSibling);var n=ki;t&&MB(e,t)?i9(n,r):(e.flags=e.flags&-4097|2,er=!1,ki=e)}}else{if(RP(e))throw Error(me(418));e.flags=e.flags&-4097|2,er=!1,ki=e}}}function PB(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ki=e}function ex(e){if(e!==ki)return!1;if(!er)return PB(e),er=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!EP(e.type,e.memoizedProps)),t&&(t=Ai)){if(RP(e))throw a9(),Error(me(418));for(;t;)i9(e,t),t=Bl(t.nextSibling)}if(PB(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(me(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ai=Bl(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ai=null}}else Ai=ki?Bl(e.stateNode.nextSibling):null;return!0}function a9(){for(var e=Ai;e;)e=Bl(e.nextSibling)}function vd(){Ai=ki=null,er=!1}function dE(e){Da===null?Da=[e]:Da.push(e)}var sle=Zs.ReactCurrentBatchConfig;function pp(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(me(309));var n=r.stateNode}if(!n)throw Error(me(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(me(284));if(!r._owner)throw Error(me(290,e))}return e}function tx(e,t){throw e=Object.prototype.toString.call(t),Error(me(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function LB(e){var t=e._init;return t(e._payload)}function o9(e){function t(x,_){if(e){var b=x.deletions;b===null?(x.deletions=[_],x.flags|=16):b.push(_)}}function r(x,_){if(!e)return null;for(;_!==null;)t(x,_),_=_.sibling;return null}function n(x,_){for(x=new Map;_!==null;)_.key!==null?x.set(_.key,_):x.set(_.index,_),_=_.sibling;return x}function i(x,_){return x=Vl(x,_),x.index=0,x.sibling=null,x}function a(x,_,b){return x.index=b,e?(b=x.alternate,b!==null?(b=b.index,b<_?(x.flags|=2,_):b):(x.flags|=2,_)):(x.flags|=1048576,_)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,_,b,S){return _===null||_.tag!==6?(_=tC(b,x.mode,S),_.return=x,_):(_=i(_,b),_.return=x,_)}function l(x,_,b,S){var T=b.type;return T===Ch?c(x,_,b.props.children,S,b.key):_!==null&&(_.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===gl&&LB(T)===_.type)?(S=i(_,b.props),S.ref=pp(x,_,b),S.return=x,S):(S=X_(b.type,b.key,b.props,null,x.mode,S),S.ref=pp(x,_,b),S.return=x,S)}function u(x,_,b,S){return _===null||_.tag!==4||_.stateNode.containerInfo!==b.containerInfo||_.stateNode.implementation!==b.implementation?(_=rC(b,x.mode,S),_.return=x,_):(_=i(_,b.children||[]),_.return=x,_)}function c(x,_,b,S,T){return _===null||_.tag!==7?(_=Oc(b,x.mode,S,T),_.return=x,_):(_=i(_,b),_.return=x,_)}function f(x,_,b){if(typeof _=="string"&&_!==""||typeof _=="number")return _=tC(""+_,x.mode,b),_.return=x,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case W0:return b=X_(_.type,_.key,_.props,null,x.mode,b),b.ref=pp(x,null,_),b.return=x,b;case Ah:return _=rC(_,x.mode,b),_.return=x,_;case gl:var S=_._init;return f(x,S(_._payload),b)}if(lg(_)||cp(_))return _=Oc(_,x.mode,b,null),_.return=x,_;tx(x,_)}return null}function h(x,_,b,S){var T=_!==null?_.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return T!==null?null:s(x,_,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case W0:return b.key===T?l(x,_,b,S):null;case Ah:return b.key===T?u(x,_,b,S):null;case gl:return T=b._init,h(x,_,T(b._payload),S)}if(lg(b)||cp(b))return T!==null?null:c(x,_,b,S,null);tx(x,b)}return null}function d(x,_,b,S,T){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(b)||null,s(_,x,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case W0:return x=x.get(S.key===null?b:S.key)||null,l(_,x,S,T);case Ah:return x=x.get(S.key===null?b:S.key)||null,u(_,x,S,T);case gl:var A=S._init;return d(x,_,b,A(S._payload),T)}if(lg(S)||cp(S))return x=x.get(b)||null,c(_,x,S,T,null);tx(_,S)}return null}function v(x,_,b,S){for(var T=null,A=null,M=_,P=_=0,I=null;M!==null&&P<b.length;P++){M.index>P?(I=M,M=null):I=M.sibling;var k=h(x,M,b[P],S);if(k===null){M===null&&(M=I);break}e&&M&&k.alternate===null&&t(x,M),_=a(k,_,P),A===null?T=k:A.sibling=k,A=k,M=I}if(P===b.length)return r(x,M),er&&tc(x,P),T;if(M===null){for(;P<b.length;P++)M=f(x,b[P],S),M!==null&&(_=a(M,_,P),A===null?T=M:A.sibling=M,A=M);return er&&tc(x,P),T}for(M=n(x,M);P<b.length;P++)I=d(M,x,P,b[P],S),I!==null&&(e&&I.alternate!==null&&M.delete(I.key===null?P:I.key),_=a(I,_,P),A===null?T=I:A.sibling=I,A=I);return e&&M.forEach(function(O){return t(x,O)}),er&&tc(x,P),T}function g(x,_,b,S){var T=cp(b);if(typeof T!="function")throw Error(me(150));if(b=T.call(b),b==null)throw Error(me(151));for(var A=T=null,M=_,P=_=0,I=null,k=b.next();M!==null&&!k.done;P++,k=b.next()){M.index>P?(I=M,M=null):I=M.sibling;var O=h(x,M,k.value,S);if(O===null){M===null&&(M=I);break}e&&M&&O.alternate===null&&t(x,M),_=a(O,_,P),A===null?T=O:A.sibling=O,A=O,M=I}if(k.done)return r(x,M),er&&tc(x,P),T;if(M===null){for(;!k.done;P++,k=b.next())k=f(x,k.value,S),k!==null&&(_=a(k,_,P),A===null?T=k:A.sibling=k,A=k);return er&&tc(x,P),T}for(M=n(x,M);!k.done;P++,k=b.next())k=d(M,x,P,k.value,S),k!==null&&(e&&k.alternate!==null&&M.delete(k.key===null?P:k.key),_=a(k,_,P),A===null?T=k:A.sibling=k,A=k);return e&&M.forEach(function(D){return t(x,D)}),er&&tc(x,P),T}function m(x,_,b,S){if(typeof b=="object"&&b!==null&&b.type===Ch&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case W0:e:{for(var T=b.key,A=_;A!==null;){if(A.key===T){if(T=b.type,T===Ch){if(A.tag===7){r(x,A.sibling),_=i(A,b.props.children),_.return=x,x=_;break e}}else if(A.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===gl&&LB(T)===A.type){r(x,A.sibling),_=i(A,b.props),_.ref=pp(x,A,b),_.return=x,x=_;break e}r(x,A);break}else t(x,A);A=A.sibling}b.type===Ch?(_=Oc(b.props.children,x.mode,S,b.key),_.return=x,x=_):(S=X_(b.type,b.key,b.props,null,x.mode,S),S.ref=pp(x,_,b),S.return=x,x=S)}return o(x);case Ah:e:{for(A=b.key;_!==null;){if(_.key===A)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(x,_.sibling),_=i(_,b.children||[]),_.return=x,x=_;break e}else{r(x,_);break}else t(x,_);_=_.sibling}_=rC(b,x.mode,S),_.return=x,x=_}return o(x);case gl:return A=b._init,m(x,_,A(b._payload),S)}if(lg(b))return v(x,_,b,S);if(cp(b))return g(x,_,b,S);tx(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,_!==null&&_.tag===6?(r(x,_.sibling),_=i(_,b),_.return=x,x=_):(r(x,_),_=tC(b,x.mode,S),_.return=x,x=_),o(x)):r(x,_)}return m}var pd=o9(!0),s9=o9(!1),Ib=cu(null),Ob=null,Dh=null,vE=null;function pE(){vE=Dh=Ob=null}function gE(e){var t=Ib.current;Jt(Ib),e._currentValue=t}function zP(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Qh(e,t){Ob=e,vE=Dh=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(oi=!0),e.firstContext=null)}function ua(e){var t=e._currentValue;if(vE!==e)if(e={context:e,memoizedValue:t,next:null},Dh===null){if(Ob===null)throw Error(me(308));Dh=e,Ob.dependencies={lanes:0,firstContext:e}}else Dh=Dh.next=e;return t}var mc=null;function mE(e){mc===null?mc=[e]:mc.push(e)}function l9(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,mE(t)):(r.next=i.next,i.next=r),t.interleaved=r,Os(e,n)}function Os(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ml=!1;function yE(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function u9(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _s(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,wt&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Os(e,r)}return i=n.interleaved,i===null?(t.next=t,mE(n)):(t.next=i.next,i.next=t),n.interleaved=t,Os(e,r)}function G_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,nE(e,r)}}function kB(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Eb(e,t,r,n){var i=e.updateQueue;ml=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,d=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,g=s;switch(h=t,d=r,g.tag){case 1:if(v=g.payload,typeof v=="function"){f=v.call(d,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,h=typeof v=="function"?v.call(d,f,h):v,h==null)break e;f=cr({},f,h);break e;case 2:ml=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Zc|=o,e.lanes=o,e.memoizedState=f}}function IB(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(me(191,i));i.call(n)}}}var Gy={},Po=cu(Gy),dm=cu(Gy),vm=cu(Gy);function yc(e){if(e===Gy)throw Error(me(174));return e}function xE(e,t){switch(Yt(vm,t),Yt(dm,e),Yt(Po,Gy),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xP(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xP(t,e)}Jt(Po),Yt(Po,t)}function gd(){Jt(Po),Jt(dm),Jt(vm)}function c9(e){yc(vm.current);var t=yc(Po.current),r=xP(t,e.type);t!==r&&(Yt(dm,e),Yt(Po,r))}function _E(e){dm.current===e&&(Jt(Po),Jt(dm))}var or=cu(0);function Db(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var XA=[];function bE(){for(var e=0;e<XA.length;e++)XA[e]._workInProgressVersionPrimary=null;XA.length=0}var W_=Zs.ReactCurrentDispatcher,qA=Zs.ReactCurrentBatchConfig,Uc=0,sr=null,zr=null,tn=null,Nb=!1,kg=!1,pm=0,lle=0;function Sn(){throw Error(me(321))}function wE(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ha(e[r],t[r]))return!1;return!0}function SE(e,t,r,n,i,a){if(Uc=a,sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,W_.current=e===null||e.memoizedState===null?hle:dle,e=r(n,i),kg){a=0;do{if(kg=!1,pm=0,25<=a)throw Error(me(301));a+=1,tn=zr=null,t.updateQueue=null,W_.current=vle,e=r(n,i)}while(kg)}if(W_.current=jb,t=zr!==null&&zr.next!==null,Uc=0,tn=zr=sr=null,Nb=!1,t)throw Error(me(300));return e}function TE(){var e=pm!==0;return pm=0,e}function ho(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?sr.memoizedState=tn=e:tn=tn.next=e,tn}function ca(){if(zr===null){var e=sr.alternate;e=e!==null?e.memoizedState:null}else e=zr.next;var t=tn===null?sr.memoizedState:tn.next;if(t!==null)tn=t,zr=e;else{if(e===null)throw Error(me(310));zr=e,e={memoizedState:zr.memoizedState,baseState:zr.baseState,baseQueue:zr.baseQueue,queue:zr.queue,next:null},tn===null?sr.memoizedState=tn=e:tn=tn.next=e}return tn}function gm(e,t){return typeof t=="function"?t(e):t}function KA(e){var t=ca(),r=t.queue;if(r===null)throw Error(me(311));r.lastRenderedReducer=e;var n=zr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var s=o=null,l=null,u=a;do{var c=u.lane;if((Uc&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,o=n):l=l.next=f,sr.lanes|=c,Zc|=c}u=u.next}while(u!==null&&u!==a);l===null?o=n:l.next=s,Ha(n,t.memoizedState)||(oi=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,sr.lanes|=a,Zc|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function QA(e){var t=ca(),r=t.queue;if(r===null)throw Error(me(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Ha(a,t.memoizedState)||(oi=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function f9(){}function h9(e,t){var r=sr,n=ca(),i=t(),a=!Ha(n.memoizedState,i);if(a&&(n.memoizedState=i,oi=!0),n=n.queue,AE(p9.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||tn!==null&&tn.memoizedState.tag&1){if(r.flags|=2048,mm(9,v9.bind(null,r,n,i,t),void 0,null),an===null)throw Error(me(349));Uc&30||d9(r,t,i)}return i}function d9(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function v9(e,t,r,n){t.value=r,t.getSnapshot=n,g9(t)&&m9(e)}function p9(e,t,r){return r(function(){g9(t)&&m9(e)})}function g9(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ha(e,r)}catch{return!0}}function m9(e){var t=Os(e,1);t!==null&&$a(t,e,1,-1)}function OB(e){var t=ho();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gm,lastRenderedState:e},t.queue=e,e=e.dispatch=fle.bind(null,sr,e),[t.memoizedState,e]}function mm(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function y9(){return ca().memoizedState}function H_(e,t,r,n){var i=ho();sr.flags|=e,i.memoizedState=mm(1|t,r,void 0,n===void 0?null:n)}function dS(e,t,r,n){var i=ca();n=n===void 0?null:n;var a=void 0;if(zr!==null){var o=zr.memoizedState;if(a=o.destroy,n!==null&&wE(n,o.deps)){i.memoizedState=mm(t,r,a,n);return}}sr.flags|=e,i.memoizedState=mm(1|t,r,a,n)}function EB(e,t){return H_(8390656,8,e,t)}function AE(e,t){return dS(2048,8,e,t)}function x9(e,t){return dS(4,2,e,t)}function _9(e,t){return dS(4,4,e,t)}function b9(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function w9(e,t,r){return r=r!=null?r.concat([e]):null,dS(4,4,b9.bind(null,t,e),r)}function CE(){}function S9(e,t){var r=ca();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wE(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function T9(e,t){var r=ca();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wE(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function A9(e,t,r){return Uc&21?(Ha(r,t)||(r=k7(),sr.lanes|=r,Zc|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,oi=!0),e.memoizedState=r)}function ule(e,t){var r=Dt;Dt=r!==0&&4>r?r:4,e(!0);var n=qA.transition;qA.transition={};try{e(!1),t()}finally{Dt=r,qA.transition=n}}function C9(){return ca().memoizedState}function cle(e,t,r){var n=Fl(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},M9(e))P9(t,r);else if(r=l9(e,t,r,n),r!==null){var i=Wn();$a(r,e,n,i),L9(r,t,n)}}function fle(e,t,r){var n=Fl(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(M9(e))P9(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Ha(s,o)){var l=t.interleaved;l===null?(i.next=i,mE(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=l9(e,t,i,n),r!==null&&(i=Wn(),$a(r,e,n,i),L9(r,t,n))}}function M9(e){var t=e.alternate;return e===sr||t!==null&&t===sr}function P9(e,t){kg=Nb=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function L9(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,nE(e,r)}}var jb={readContext:ua,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},hle={readContext:ua,useCallback:function(e,t){return ho().memoizedState=[e,t===void 0?null:t],e},useContext:ua,useEffect:EB,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,H_(4194308,4,b9.bind(null,t,e),r)},useLayoutEffect:function(e,t){return H_(4194308,4,e,t)},useInsertionEffect:function(e,t){return H_(4,2,e,t)},useMemo:function(e,t){var r=ho();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ho();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=cle.bind(null,sr,e),[n.memoizedState,e]},useRef:function(e){var t=ho();return e={current:e},t.memoizedState=e},useState:OB,useDebugValue:CE,useDeferredValue:function(e){return ho().memoizedState=e},useTransition:function(){var e=OB(!1),t=e[0];return e=ule.bind(null,e[1]),ho().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sr,i=ho();if(er){if(r===void 0)throw Error(me(407));r=r()}else{if(r=t(),an===null)throw Error(me(349));Uc&30||d9(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,EB(p9.bind(null,n,a,e),[e]),n.flags|=2048,mm(9,v9.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ho(),t=an.identifierPrefix;if(er){var r=hs,n=fs;r=(n&~(1<<32-za(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=pm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=lle++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dle={readContext:ua,useCallback:S9,useContext:ua,useEffect:AE,useImperativeHandle:w9,useInsertionEffect:x9,useLayoutEffect:_9,useMemo:T9,useReducer:KA,useRef:y9,useState:function(){return KA(gm)},useDebugValue:CE,useDeferredValue:function(e){var t=ca();return A9(t,zr.memoizedState,e)},useTransition:function(){var e=KA(gm)[0],t=ca().memoizedState;return[e,t]},useMutableSource:f9,useSyncExternalStore:h9,useId:C9,unstable_isNewReconciler:!1},vle={readContext:ua,useCallback:S9,useContext:ua,useEffect:AE,useImperativeHandle:w9,useInsertionEffect:x9,useLayoutEffect:_9,useMemo:T9,useReducer:QA,useRef:y9,useState:function(){return QA(gm)},useDebugValue:CE,useDeferredValue:function(e){var t=ca();return zr===null?t.memoizedState=e:A9(t,zr.memoizedState,e)},useTransition:function(){var e=QA(gm)[0],t=ca().memoizedState;return[e,t]},useMutableSource:f9,useSyncExternalStore:h9,useId:C9,unstable_isNewReconciler:!1};function La(e,t){if(e&&e.defaultProps){t=cr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function $P(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:cr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var vS={isMounted:function(e){return(e=e._reactInternals)?vf(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Wn(),i=Fl(e),a=_s(n,i);a.payload=t,r!=null&&(a.callback=r),t=zl(e,a,i),t!==null&&($a(t,e,i,n),G_(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Wn(),i=Fl(e),a=_s(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=zl(e,a,i),t!==null&&($a(t,e,i,n),G_(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Wn(),n=Fl(e),i=_s(r,n);i.tag=2,t!=null&&(i.callback=t),t=zl(e,i,n),t!==null&&($a(t,e,n,r),G_(t,e,n))}};function DB(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!um(r,n)||!um(i,a):!0}function k9(e,t,r){var n=!1,i=tu,a=t.contextType;return typeof a=="object"&&a!==null?a=ua(a):(i=ui(t)?Wc:Nn.current,n=t.contextTypes,a=(n=n!=null)?dd(e,i):tu),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vS,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function NB(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&vS.enqueueReplaceState(t,t.state,null)}function FP(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},yE(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=ua(a):(a=ui(t)?Wc:Nn.current,i.context=dd(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&($P(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&vS.enqueueReplaceState(i,i.state,null),Eb(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function md(e,t){try{var r="",n=t;do r+=Voe(n),n=n.return;while(n);var i=r}catch(a){i=`
|
||
Error generating stack: `+a.message+`
|
||
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function JA(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function VP(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var ple=typeof WeakMap=="function"?WeakMap:Map;function I9(e,t,r){r=_s(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Bb||(Bb=!0,QP=n),VP(e,t)},r}function O9(e,t,r){r=_s(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){VP(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){VP(e,t),typeof n!="function"&&($l===null?$l=new Set([this]):$l.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function jB(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new ple;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Lle.bind(null,e,t,r),t.then(e,e))}function RB(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function BB(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_s(-1,1),t.tag=2,zl(r,t,1))),r.lanes|=1),e)}var gle=Zs.ReactCurrentOwner,oi=!1;function zn(e,t,r,n){t.child=e===null?s9(t,null,r,n):pd(t,e.child,r,n)}function zB(e,t,r,n,i){r=r.render;var a=t.ref;return Qh(t,i),n=SE(e,t,r,n,a,i),r=TE(),e!==null&&!oi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Es(e,t,i)):(er&&r&&fE(t),t.flags|=1,zn(e,t,n,i),t.child)}function $B(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!DE(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,E9(e,t,a,n,i)):(e=X_(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:um,r(o,n)&&e.ref===t.ref)return Es(e,t,i)}return t.flags|=1,e=Vl(a,n),e.ref=t.ref,e.return=t,t.child=e}function E9(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(um(a,n)&&e.ref===t.ref)if(oi=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(oi=!0);else return t.lanes=e.lanes,Es(e,t,i)}return GP(e,t,r,n,i)}function D9(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yt(jh,yi),yi|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Yt(jh,yi),yi|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Yt(jh,yi),yi|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Yt(jh,yi),yi|=n;return zn(e,t,i,r),t.child}function N9(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function GP(e,t,r,n,i){var a=ui(r)?Wc:Nn.current;return a=dd(t,a),Qh(t,i),r=SE(e,t,r,n,a,i),n=TE(),e!==null&&!oi?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Es(e,t,i)):(er&&n&&fE(t),t.flags|=1,zn(e,t,r,i),t.child)}function FB(e,t,r,n,i){if(ui(r)){var a=!0;Pb(t)}else a=!1;if(Qh(t,i),t.stateNode===null)U_(e,t),k9(t,r,n),FP(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=ua(u):(u=ui(r)?Wc:Nn.current,u=dd(t,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&NB(t,o,n,u),ml=!1;var h=t.memoizedState;o.state=h,Eb(t,n,o,i),l=t.memoizedState,s!==n||h!==l||li.current||ml?(typeof c=="function"&&($P(t,r,c,n),l=t.memoizedState),(s=ml||DB(t,r,s,n,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,u9(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:La(t.type,s),o.props=u,f=t.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=ua(l):(l=ui(r)?Wc:Nn.current,l=dd(t,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&NB(t,o,n,l),ml=!1,h=t.memoizedState,o.state=h,Eb(t,n,o,i);var v=t.memoizedState;s!==f||h!==v||li.current||ml?(typeof d=="function"&&($P(t,r,d,n),v=t.memoizedState),(u=ml||DB(t,r,u,n,h,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),o.props=n,o.state=v,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return WP(e,t,r,n,a,i)}function WP(e,t,r,n,i,a){N9(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&CB(t,r,!1),Es(e,t,a);n=t.stateNode,gle.current=t;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=pd(t,e.child,null,a),t.child=pd(t,null,s,a)):zn(e,t,s,a),t.memoizedState=n.state,i&&CB(t,r,!0),t.child}function j9(e){var t=e.stateNode;t.pendingContext?AB(e,t.pendingContext,t.pendingContext!==t.context):t.context&&AB(e,t.context,!1),xE(e,t.containerInfo)}function VB(e,t,r,n,i){return vd(),dE(i),t.flags|=256,zn(e,t,r,n),t.child}var HP={dehydrated:null,treeContext:null,retryLane:0};function UP(e){return{baseLanes:e,cachePool:null,transitions:null}}function R9(e,t,r){var n=t.pendingProps,i=or.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Yt(or,i&1),e===null)return BP(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=mS(o,n,0,null),e=Oc(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=UP(r),t.memoizedState=HP,e):ME(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return mle(e,t,o,n,s,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Vl(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=Vl(s,a):(a=Oc(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?UP(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=HP,n}return a=e.child,e=a.sibling,n=Vl(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function ME(e,t){return t=mS({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rx(e,t,r,n){return n!==null&&dE(n),pd(t,e.child,null,r),e=ME(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mle(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=JA(Error(me(422))),rx(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=mS({mode:"visible",children:n.children},i,0,null),a=Oc(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&pd(t,e.child,null,o),t.child.memoizedState=UP(o),t.memoizedState=HP,a);if(!(t.mode&1))return rx(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(me(419)),n=JA(a,n,void 0),rx(e,t,o,n)}if(s=(o&e.childLanes)!==0,oi||s){if(n=an,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Os(e,i),$a(n,e,i,-1))}return EE(),n=JA(Error(me(421))),rx(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=kle.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Ai=Bl(i.nextSibling),ki=t,er=!0,Da=null,e!==null&&(Ki[Qi++]=fs,Ki[Qi++]=hs,Ki[Qi++]=Hc,fs=e.id,hs=e.overflow,Hc=t),t=ME(t,n.children),t.flags|=4096,t)}function GB(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zP(e.return,t,r)}function eC(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function B9(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(zn(e,t,n.children,r),n=or.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&GB(e,r,t);else if(e.tag===19)GB(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Yt(or,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Db(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),eC(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Db(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}eC(t,!0,r,null,a);break;case"together":eC(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function U_(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Es(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Zc|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(me(153));if(t.child!==null){for(e=t.child,r=Vl(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Vl(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function yle(e,t,r){switch(t.tag){case 3:j9(t),vd();break;case 5:c9(t);break;case 1:ui(t.type)&&Pb(t);break;case 4:xE(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Yt(Ib,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Yt(or,or.current&1),t.flags|=128,null):r&t.child.childLanes?R9(e,t,r):(Yt(or,or.current&1),e=Es(e,t,r),e!==null?e.sibling:null);Yt(or,or.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return B9(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Yt(or,or.current),n)break;return null;case 22:case 23:return t.lanes=0,D9(e,t,r)}return Es(e,t,r)}var z9,ZP,$9,F9;z9=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ZP=function(){};$9=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,yc(Po.current);var a=null;switch(r){case"input":i=pP(e,i),n=pP(e,n),a=[];break;case"select":i=cr({},i,{value:void 0}),n=cr({},n,{value:void 0}),a=[];break;case"textarea":i=yP(e,i),n=yP(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Cb)}_P(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(rm.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(rm.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&qt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};F9=function(e,t,r,n){r!==n&&(t.flags|=4)};function gp(e,t){if(!er)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Tn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function xle(e,t,r){var n=t.pendingProps;switch(hE(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tn(t),null;case 1:return ui(t.type)&&Mb(),Tn(t),null;case 3:return n=t.stateNode,gd(),Jt(li),Jt(Nn),bE(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ex(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Da!==null&&(tL(Da),Da=null))),ZP(e,t),Tn(t),null;case 5:_E(t);var i=yc(vm.current);if(r=t.type,e!==null&&t.stateNode!=null)$9(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(me(166));return Tn(t),null}if(e=yc(Po.current),ex(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[po]=t,n[hm]=a,e=(t.mode&1)!==0,r){case"dialog":qt("cancel",n),qt("close",n);break;case"iframe":case"object":case"embed":qt("load",n);break;case"video":case"audio":for(i=0;i<cg.length;i++)qt(cg[i],n);break;case"source":qt("error",n);break;case"img":case"image":case"link":qt("error",n),qt("load",n);break;case"details":qt("toggle",n);break;case"input":Q5(n,a),qt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},qt("invalid",n);break;case"textarea":eB(n,a),qt("invalid",n)}_P(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?n.textContent!==s&&(a.suppressHydrationWarning!==!0&&J0(n.textContent,s,e),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&J0(n.textContent,s,e),i=["children",""+s]):rm.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&qt("scroll",n)}switch(r){case"input":H0(n),J5(n,a,!0);break;case"textarea":H0(n),tB(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Cb)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=p7(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[po]=t,e[hm]=n,z9(e,t,!1,!1),t.stateNode=e;e:{switch(o=bP(r,n),r){case"dialog":qt("cancel",e),qt("close",e),i=n;break;case"iframe":case"object":case"embed":qt("load",e),i=n;break;case"video":case"audio":for(i=0;i<cg.length;i++)qt(cg[i],e);i=n;break;case"source":qt("error",e),i=n;break;case"img":case"image":case"link":qt("error",e),qt("load",e),i=n;break;case"details":qt("toggle",e),i=n;break;case"input":Q5(e,n),i=pP(e,n),qt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=cr({},n,{value:void 0}),qt("invalid",e);break;case"textarea":eB(e,n),i=yP(e,n),qt("invalid",e);break;default:i=n}_P(r,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?y7(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&g7(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nm(e,l):typeof l=="number"&&nm(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(rm.hasOwnProperty(a)?l!=null&&a==="onScroll"&&qt("scroll",e):l!=null&&KO(e,a,l,o))}switch(r){case"input":H0(e),J5(e,n,!1);break;case"textarea":H0(e),tB(e);break;case"option":n.value!=null&&e.setAttribute("value",""+eu(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Yh(e,!!n.multiple,a,!1):n.defaultValue!=null&&Yh(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Cb)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tn(t),null;case 6:if(e&&t.stateNode!=null)F9(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(me(166));if(r=yc(vm.current),yc(Po.current),ex(t)){if(n=t.stateNode,r=t.memoizedProps,n[po]=t,(a=n.nodeValue!==r)&&(e=ki,e!==null))switch(e.tag){case 3:J0(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&J0(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[po]=t,t.stateNode=n}return Tn(t),null;case 13:if(Jt(or),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(er&&Ai!==null&&t.mode&1&&!(t.flags&128))a9(),vd(),t.flags|=98560,a=!1;else if(a=ex(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(me(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(me(317));a[po]=t}else vd(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tn(t),a=!1}else Da!==null&&(tL(Da),Da=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||or.current&1?Fr===0&&(Fr=3):EE())),t.updateQueue!==null&&(t.flags|=4),Tn(t),null);case 4:return gd(),ZP(e,t),e===null&&cm(t.stateNode.containerInfo),Tn(t),null;case 10:return gE(t.type._context),Tn(t),null;case 17:return ui(t.type)&&Mb(),Tn(t),null;case 19:if(Jt(or),a=t.memoizedState,a===null)return Tn(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)gp(a,!1);else{if(Fr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Db(e),o!==null){for(t.flags|=128,gp(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Yt(or,or.current&1|2),t.child}e=e.sibling}a.tail!==null&&wr()>yd&&(t.flags|=128,n=!0,gp(a,!1),t.lanes=4194304)}else{if(!n)if(e=Db(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gp(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!er)return Tn(t),null}else 2*wr()-a.renderingStartTime>yd&&r!==1073741824&&(t.flags|=128,n=!0,gp(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=wr(),t.sibling=null,r=or.current,Yt(or,n?r&1|2:r&1),t):(Tn(t),null);case 22:case 23:return OE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?yi&1073741824&&(Tn(t),t.subtreeFlags&6&&(t.flags|=8192)):Tn(t),null;case 24:return null;case 25:return null}throw Error(me(156,t.tag))}function _le(e,t){switch(hE(t),t.tag){case 1:return ui(t.type)&&Mb(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gd(),Jt(li),Jt(Nn),bE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _E(t),null;case 13:if(Jt(or),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(me(340));vd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Jt(or),null;case 4:return gd(),null;case 10:return gE(t.type._context),null;case 22:case 23:return OE(),null;case 24:return null;default:return null}}var nx=!1,kn=!1,ble=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Nh(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){dr(e,t,n)}else r.current=null}function YP(e,t,r){try{r()}catch(n){dr(e,t,n)}}var WB=!1;function wle(e,t){if(IP=Sb,e=U7(),cE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var d;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(OP={focusedElem:e,selectionRange:r},Sb=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,m=v.memoizedState,x=t.stateNode,_=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:La(t.type,g),m);x.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(S){dr(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return v=WB,WB=!1,v}function Ig(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&YP(t,r,a)}i=i.next}while(i!==n)}}function pS(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function XP(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function V9(e){var t=e.alternate;t!==null&&(e.alternate=null,V9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[po],delete t[hm],delete t[NP],delete t[ile],delete t[ale])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function G9(e){return e.tag===5||e.tag===3||e.tag===4}function HB(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||G9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Cb));else if(n!==4&&(e=e.child,e!==null))for(qP(e,t,r),e=e.sibling;e!==null;)qP(e,t,r),e=e.sibling}function KP(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(KP(e,t,r),e=e.sibling;e!==null;)KP(e,t,r),e=e.sibling}var fn=null,Ia=!1;function rl(e,t,r){for(r=r.child;r!==null;)W9(e,t,r),r=r.sibling}function W9(e,t,r){if(Mo&&typeof Mo.onCommitFiberUnmount=="function")try{Mo.onCommitFiberUnmount(sS,r)}catch{}switch(r.tag){case 5:kn||Nh(r,t);case 6:var n=fn,i=Ia;fn=null,rl(e,t,r),fn=n,Ia=i,fn!==null&&(Ia?(e=fn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):fn.removeChild(r.stateNode));break;case 18:fn!==null&&(Ia?(e=fn,r=r.stateNode,e.nodeType===8?ZA(e.parentNode,r):e.nodeType===1&&ZA(e,r),sm(e)):ZA(fn,r.stateNode));break;case 4:n=fn,i=Ia,fn=r.stateNode.containerInfo,Ia=!0,rl(e,t,r),fn=n,Ia=i;break;case 0:case 11:case 14:case 15:if(!kn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&YP(r,t,o),i=i.next}while(i!==n)}rl(e,t,r);break;case 1:if(!kn&&(Nh(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){dr(r,t,s)}rl(e,t,r);break;case 21:rl(e,t,r);break;case 22:r.mode&1?(kn=(n=kn)||r.memoizedState!==null,rl(e,t,r),kn=n):rl(e,t,r);break;default:rl(e,t,r)}}function UB(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ble),t.forEach(function(n){var i=Ile.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Sa(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:fn=s.stateNode,Ia=!1;break e;case 3:fn=s.stateNode.containerInfo,Ia=!0;break e;case 4:fn=s.stateNode.containerInfo,Ia=!0;break e}s=s.return}if(fn===null)throw Error(me(160));W9(a,o,i),fn=null,Ia=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){dr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)H9(t,e),t=t.sibling}function H9(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Sa(t,e),ro(e),n&4){try{Ig(3,e,e.return),pS(3,e)}catch(g){dr(e,e.return,g)}try{Ig(5,e,e.return)}catch(g){dr(e,e.return,g)}}break;case 1:Sa(t,e),ro(e),n&512&&r!==null&&Nh(r,r.return);break;case 5:if(Sa(t,e),ro(e),n&512&&r!==null&&Nh(r,r.return),e.flags&32){var i=e.stateNode;try{nm(i,"")}catch(g){dr(e,e.return,g)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&d7(i,a),bP(s,o);var u=bP(s,a);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?y7(i,f):c==="dangerouslySetInnerHTML"?g7(i,f):c==="children"?nm(i,f):KO(i,c,f,u)}switch(s){case"input":gP(i,a);break;case"textarea":v7(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var d=a.value;d!=null?Yh(i,!!a.multiple,d,!1):h!==!!a.multiple&&(a.defaultValue!=null?Yh(i,!!a.multiple,a.defaultValue,!0):Yh(i,!!a.multiple,a.multiple?[]:"",!1))}i[hm]=a}catch(g){dr(e,e.return,g)}}break;case 6:if(Sa(t,e),ro(e),n&4){if(e.stateNode===null)throw Error(me(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){dr(e,e.return,g)}}break;case 3:if(Sa(t,e),ro(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{sm(t.containerInfo)}catch(g){dr(e,e.return,g)}break;case 4:Sa(t,e),ro(e);break;case 13:Sa(t,e),ro(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(kE=wr())),n&4&&UB(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(kn=(u=kn)||c,Sa(t,e),kn=u):Sa(t,e),ro(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Ne=e,c=e.child;c!==null;){for(f=Ne=c;Ne!==null;){switch(h=Ne,d=h.child,h.tag){case 0:case 11:case 14:case 15:Ig(4,h,h.return);break;case 1:Nh(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){dr(n,r,g)}}break;case 5:Nh(h,h.return);break;case 22:if(h.memoizedState!==null){YB(f);continue}}d!==null?(d.return=h,Ne=d):YB(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=m7("display",o))}catch(g){dr(e,e.return,g)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){dr(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Sa(t,e),ro(e),n&4&&UB(e);break;case 21:break;default:Sa(t,e),ro(e)}}function ro(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(G9(r)){var n=r;break e}r=r.return}throw Error(me(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(nm(i,""),n.flags&=-33);var a=HB(e);KP(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,s=HB(e);qP(e,s,o);break;default:throw Error(me(161))}}catch(l){dr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sle(e,t,r){Ne=e,U9(e)}function U9(e,t,r){for(var n=(e.mode&1)!==0;Ne!==null;){var i=Ne,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||nx;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||kn;s=nx;var u=kn;if(nx=o,(kn=l)&&!u)for(Ne=i;Ne!==null;)o=Ne,l=o.child,o.tag===22&&o.memoizedState!==null?XB(i):l!==null?(l.return=o,Ne=l):XB(i);for(;a!==null;)Ne=a,U9(a),a=a.sibling;Ne=i,nx=s,kn=u}ZB(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Ne=a):ZB(e)}}function ZB(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:kn||pS(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!kn)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:La(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&IB(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}IB(t,o,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&sm(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(me(163))}kn||t.flags&512&&XP(t)}catch(h){dr(t,t.return,h)}}if(t===e){Ne=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ne=r;break}Ne=t.return}}function YB(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ne=r;break}Ne=t.return}}function XB(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{pS(4,t)}catch(l){dr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){dr(t,i,l)}}var a=t.return;try{XP(t)}catch(l){dr(t,a,l)}break;case 5:var o=t.return;try{XP(t)}catch(l){dr(t,o,l)}}}catch(l){dr(t,t.return,l)}if(t===e){Ne=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Ne=s;break}Ne=t.return}}var Tle=Math.ceil,Rb=Zs.ReactCurrentDispatcher,PE=Zs.ReactCurrentOwner,ia=Zs.ReactCurrentBatchConfig,wt=0,an=null,kr=null,gn=0,yi=0,jh=cu(0),Fr=0,ym=null,Zc=0,gS=0,LE=0,Og=null,ri=null,kE=0,yd=1/0,as=null,Bb=!1,QP=null,$l=null,ix=!1,Tl=null,zb=0,Eg=0,JP=null,Z_=-1,Y_=0;function Wn(){return wt&6?wr():Z_!==-1?Z_:Z_=wr()}function Fl(e){return e.mode&1?wt&2&&gn!==0?gn&-gn:sle.transition!==null?(Y_===0&&(Y_=k7()),Y_):(e=Dt,e!==0||(e=window.event,e=e===void 0?16:R7(e.type)),e):1}function $a(e,t,r,n){if(50<Eg)throw Eg=0,JP=null,Error(me(185));$y(e,r,n),(!(wt&2)||e!==an)&&(e===an&&(!(wt&2)&&(gS|=r),Fr===4&&wl(e,gn)),ci(e,n),r===1&&wt===0&&!(t.mode&1)&&(yd=wr()+500,hS&&fu()))}function ci(e,t){var r=e.callbackNode;sse(e,t);var n=wb(e,e===an?gn:0);if(n===0)r!==null&&iB(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&iB(r),t===1)e.tag===0?ole(qB.bind(null,e)):r9(qB.bind(null,e)),rle(function(){!(wt&6)&&fu()}),r=null;else{switch(I7(n)){case 1:r=rE;break;case 4:r=P7;break;case 16:r=bb;break;case 536870912:r=L7;break;default:r=bb}r=eZ(r,Z9.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Z9(e,t){if(Z_=-1,Y_=0,wt&6)throw Error(me(327));var r=e.callbackNode;if(Jh()&&e.callbackNode!==r)return null;var n=wb(e,e===an?gn:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=$b(e,n);else{t=n;var i=wt;wt|=2;var a=X9();(an!==e||gn!==t)&&(as=null,yd=wr()+500,Ic(e,t));do try{Mle();break}catch(s){Y9(e,s)}while(!0);pE(),Rb.current=a,wt=i,kr!==null?t=0:(an=null,gn=0,t=Fr)}if(t!==0){if(t===2&&(i=CP(e),i!==0&&(n=i,t=eL(e,i))),t===1)throw r=ym,Ic(e,0),wl(e,n),ci(e,wr()),r;if(t===6)wl(e,n);else{if(i=e.current.alternate,!(n&30)&&!Ale(i)&&(t=$b(e,n),t===2&&(a=CP(e),a!==0&&(n=a,t=eL(e,a))),t===1))throw r=ym,Ic(e,0),wl(e,n),ci(e,wr()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(me(345));case 2:rc(e,ri,as);break;case 3:if(wl(e,n),(n&130023424)===n&&(t=kE+500-wr(),10<t)){if(wb(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){Wn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=DP(rc.bind(null,e,ri,as),t);break}rc(e,ri,as);break;case 4:if(wl(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-za(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Tle(n/1960))-n,10<n){e.timeoutHandle=DP(rc.bind(null,e,ri,as),n);break}rc(e,ri,as);break;case 5:rc(e,ri,as);break;default:throw Error(me(329))}}}return ci(e,wr()),e.callbackNode===r?Z9.bind(null,e):null}function eL(e,t){var r=Og;return e.current.memoizedState.isDehydrated&&(Ic(e,t).flags|=256),e=$b(e,t),e!==2&&(t=ri,ri=r,t!==null&&tL(t)),e}function tL(e){ri===null?ri=e:ri.push.apply(ri,e)}function Ale(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!Ha(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wl(e,t){for(t&=~LE,t&=~gS,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-za(t),n=1<<r;e[r]=-1,t&=~n}}function qB(e){if(wt&6)throw Error(me(327));Jh();var t=wb(e,0);if(!(t&1))return ci(e,wr()),null;var r=$b(e,t);if(e.tag!==0&&r===2){var n=CP(e);n!==0&&(t=n,r=eL(e,n))}if(r===1)throw r=ym,Ic(e,0),wl(e,t),ci(e,wr()),r;if(r===6)throw Error(me(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,rc(e,ri,as),ci(e,wr()),null}function IE(e,t){var r=wt;wt|=1;try{return e(t)}finally{wt=r,wt===0&&(yd=wr()+500,hS&&fu())}}function Yc(e){Tl!==null&&Tl.tag===0&&!(wt&6)&&Jh();var t=wt;wt|=1;var r=ia.transition,n=Dt;try{if(ia.transition=null,Dt=1,e)return e()}finally{Dt=n,ia.transition=r,wt=t,!(wt&6)&&fu()}}function OE(){yi=jh.current,Jt(jh)}function Ic(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,tle(r)),kr!==null)for(r=kr.return;r!==null;){var n=r;switch(hE(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Mb();break;case 3:gd(),Jt(li),Jt(Nn),bE();break;case 5:_E(n);break;case 4:gd();break;case 13:Jt(or);break;case 19:Jt(or);break;case 10:gE(n.type._context);break;case 22:case 23:OE()}r=r.return}if(an=e,kr=e=Vl(e.current,null),gn=yi=t,Fr=0,ym=null,LE=gS=Zc=0,ri=Og=null,mc!==null){for(t=0;t<mc.length;t++)if(r=mc[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}mc=null}return e}function Y9(e,t){do{var r=kr;try{if(pE(),W_.current=jb,Nb){for(var n=sr.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Nb=!1}if(Uc=0,tn=zr=sr=null,kg=!1,pm=0,PE.current=null,r===null||r.return===null){Fr=1,ym=t,kr=null;break}e:{var a=e,o=r.return,s=r,l=t;if(t=gn,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=RB(o);if(d!==null){d.flags&=-257,BB(d,o,s,a,t),d.mode&1&&jB(a,u,t),t=d,l=u;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if(!(t&1)){jB(a,u,t),EE();break e}l=Error(me(426))}}else if(er&&s.mode&1){var m=RB(o);if(m!==null){!(m.flags&65536)&&(m.flags|=256),BB(m,o,s,a,t),dE(md(l,s));break e}}a=l=md(l,s),Fr!==4&&(Fr=2),Og===null?Og=[a]:Og.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=I9(a,l,t);kB(a,x);break e;case 1:s=l;var _=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof _.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&($l===null||!$l.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var S=O9(a,s,t);kB(a,S);break e}}a=a.return}while(a!==null)}K9(r)}catch(T){t=T,kr===r&&r!==null&&(kr=r=r.return);continue}break}while(!0)}function X9(){var e=Rb.current;return Rb.current=jb,e===null?jb:e}function EE(){(Fr===0||Fr===3||Fr===2)&&(Fr=4),an===null||!(Zc&268435455)&&!(gS&268435455)||wl(an,gn)}function $b(e,t){var r=wt;wt|=2;var n=X9();(an!==e||gn!==t)&&(as=null,Ic(e,t));do try{Cle();break}catch(i){Y9(e,i)}while(!0);if(pE(),wt=r,Rb.current=n,kr!==null)throw Error(me(261));return an=null,gn=0,Fr}function Cle(){for(;kr!==null;)q9(kr)}function Mle(){for(;kr!==null&&!Qoe();)q9(kr)}function q9(e){var t=J9(e.alternate,e,yi);e.memoizedProps=e.pendingProps,t===null?K9(e):kr=t,PE.current=null}function K9(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=_le(r,t),r!==null){r.flags&=32767,kr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Fr=6,kr=null;return}}else if(r=xle(r,t,yi),r!==null){kr=r;return}if(t=t.sibling,t!==null){kr=t;return}kr=t=e}while(t!==null);Fr===0&&(Fr=5)}function rc(e,t,r){var n=Dt,i=ia.transition;try{ia.transition=null,Dt=1,Ple(e,t,r,n)}finally{ia.transition=i,Dt=n}return null}function Ple(e,t,r,n){do Jh();while(Tl!==null);if(wt&6)throw Error(me(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(me(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(lse(e,a),e===an&&(kr=an=null,gn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ix||(ix=!0,eZ(bb,function(){return Jh(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ia.transition,ia.transition=null;var o=Dt;Dt=1;var s=wt;wt|=4,PE.current=null,wle(e,r),H9(r,e),Yse(OP),Sb=!!IP,OP=IP=null,e.current=r,Sle(r),Joe(),wt=s,Dt=o,ia.transition=a}else e.current=r;if(ix&&(ix=!1,Tl=e,zb=i),a=e.pendingLanes,a===0&&($l=null),rse(r.stateNode),ci(e,wr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Bb)throw Bb=!1,e=QP,QP=null,e;return zb&1&&e.tag!==0&&Jh(),a=e.pendingLanes,a&1?e===JP?Eg++:(Eg=0,JP=e):Eg=0,fu(),null}function Jh(){if(Tl!==null){var e=I7(zb),t=ia.transition,r=Dt;try{if(ia.transition=null,Dt=16>e?16:e,Tl===null)var n=!1;else{if(e=Tl,Tl=null,zb=0,wt&6)throw Error(me(331));var i=wt;for(wt|=4,Ne=e.current;Ne!==null;){var a=Ne,o=a.child;if(Ne.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Ne=u;Ne!==null;){var c=Ne;switch(c.tag){case 0:case 11:case 15:Ig(8,c,a)}var f=c.child;if(f!==null)f.return=c,Ne=f;else for(;Ne!==null;){c=Ne;var h=c.sibling,d=c.return;if(V9(c),c===u){Ne=null;break}if(h!==null){h.return=d,Ne=h;break}Ne=d}}}var v=a.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(g!==null)}}Ne=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Ne=o;else e:for(;Ne!==null;){if(a=Ne,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Ig(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,Ne=x;break e}Ne=a.return}}var _=e.current;for(Ne=_;Ne!==null;){o=Ne;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,Ne=b;else e:for(o=_;Ne!==null;){if(s=Ne,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:pS(9,s)}}catch(T){dr(s,s.return,T)}if(s===o){Ne=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,Ne=S;break e}Ne=s.return}}if(wt=i,fu(),Mo&&typeof Mo.onPostCommitFiberRoot=="function")try{Mo.onPostCommitFiberRoot(sS,e)}catch{}n=!0}return n}finally{Dt=r,ia.transition=t}}return!1}function KB(e,t,r){t=md(r,t),t=I9(e,t,1),e=zl(e,t,1),t=Wn(),e!==null&&($y(e,1,t),ci(e,t))}function dr(e,t,r){if(e.tag===3)KB(e,e,r);else for(;t!==null;){if(t.tag===3){KB(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&($l===null||!$l.has(n))){e=md(r,e),e=O9(t,e,1),t=zl(t,e,1),e=Wn(),t!==null&&($y(t,1,e),ci(t,e));break}}t=t.return}}function Lle(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Wn(),e.pingedLanes|=e.suspendedLanes&r,an===e&&(gn&r)===r&&(Fr===4||Fr===3&&(gn&130023424)===gn&&500>wr()-kE?Ic(e,0):LE|=r),ci(e,t)}function Q9(e,t){t===0&&(e.mode&1?(t=Y0,Y0<<=1,!(Y0&130023424)&&(Y0=4194304)):t=1);var r=Wn();e=Os(e,t),e!==null&&($y(e,t,r),ci(e,r))}function kle(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Q9(e,r)}function Ile(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(me(314))}n!==null&&n.delete(t),Q9(e,r)}var J9;J9=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||li.current)oi=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return oi=!1,yle(e,t,r);oi=!!(e.flags&131072)}else oi=!1,er&&t.flags&1048576&&n9(t,kb,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;U_(e,t),e=t.pendingProps;var i=dd(t,Nn.current);Qh(t,r),i=SE(null,t,n,e,i,r);var a=TE();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ui(n)?(a=!0,Pb(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yE(t),i.updater=vS,t.stateNode=i,i._reactInternals=t,FP(t,n,e,r),t=WP(null,t,n,!0,a,r)):(t.tag=0,er&&a&&fE(t),zn(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(U_(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Ele(n),e=La(n,e),i){case 0:t=GP(null,t,n,e,r);break e;case 1:t=FB(null,t,n,e,r);break e;case 11:t=zB(null,t,n,e,r);break e;case 14:t=$B(null,t,n,La(n.type,e),r);break e}throw Error(me(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:La(n,i),GP(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:La(n,i),FB(e,t,n,i,r);case 3:e:{if(j9(t),e===null)throw Error(me(387));n=t.pendingProps,a=t.memoizedState,i=a.element,u9(e,t),Eb(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=md(Error(me(423)),t),t=VB(e,t,n,r,i);break e}else if(n!==i){i=md(Error(me(424)),t),t=VB(e,t,n,r,i);break e}else for(Ai=Bl(t.stateNode.containerInfo.firstChild),ki=t,er=!0,Da=null,r=s9(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(vd(),n===i){t=Es(e,t,r);break e}zn(e,t,n,r)}t=t.child}return t;case 5:return c9(t),e===null&&BP(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,EP(n,i)?o=null:a!==null&&EP(n,a)&&(t.flags|=32),N9(e,t),zn(e,t,o,r),t.child;case 6:return e===null&&BP(t),null;case 13:return R9(e,t,r);case 4:return xE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=pd(t,null,n,r):zn(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:La(n,i),zB(e,t,n,i,r);case 7:return zn(e,t,t.pendingProps,r),t.child;case 8:return zn(e,t,t.pendingProps.children,r),t.child;case 12:return zn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Yt(Ib,n._currentValue),n._currentValue=o,a!==null)if(Ha(a.value,o)){if(a.children===i.children&&!li.current){t=Es(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=_s(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),zP(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(me(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),zP(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}zn(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Qh(t,r),i=ua(i),n=n(i),t.flags|=1,zn(e,t,n,r),t.child;case 14:return n=t.type,i=La(n,t.pendingProps),i=La(n.type,i),$B(e,t,n,i,r);case 15:return E9(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:La(n,i),U_(e,t),t.tag=1,ui(n)?(e=!0,Pb(t)):e=!1,Qh(t,r),k9(t,n,i),FP(t,n,i,r),WP(null,t,n,!0,e,r);case 19:return B9(e,t,r);case 22:return D9(e,t,r)}throw Error(me(156,t.tag))};function eZ(e,t){return M7(e,t)}function Ole(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ra(e,t,r,n){return new Ole(e,t,r,n)}function DE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ele(e){if(typeof e=="function")return DE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===JO)return 11;if(e===eE)return 14}return 2}function Vl(e,t){var r=e.alternate;return r===null?(r=ra(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function X_(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")DE(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ch:return Oc(r.children,i,a,t);case QO:o=8,i|=8;break;case fP:return e=ra(12,r,t,i|2),e.elementType=fP,e.lanes=a,e;case hP:return e=ra(13,r,t,i),e.elementType=hP,e.lanes=a,e;case dP:return e=ra(19,r,t,i),e.elementType=dP,e.lanes=a,e;case c7:return mS(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l7:o=10;break e;case u7:o=9;break e;case JO:o=11;break e;case eE:o=14;break e;case gl:o=16,n=null;break e}throw Error(me(130,e==null?e:typeof e,""))}return t=ra(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Oc(e,t,r,n){return e=ra(7,e,n,t),e.lanes=r,e}function mS(e,t,r,n){return e=ra(22,e,n,t),e.elementType=c7,e.lanes=r,e.stateNode={isHidden:!1},e}function tC(e,t,r){return e=ra(6,e,null,t),e.lanes=r,e}function rC(e,t,r){return t=ra(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dle(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jA(0),this.expirationTimes=jA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jA(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function NE(e,t,r,n,i,a,o,s,l){return e=new Dle(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ra(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},yE(a),e}function Nle(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ah,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function tZ(e){if(!e)return tu;e=e._reactInternals;e:{if(vf(e)!==e||e.tag!==1)throw Error(me(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ui(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(me(171))}if(e.tag===1){var r=e.type;if(ui(r))return t9(e,r,t)}return t}function rZ(e,t,r,n,i,a,o,s,l){return e=NE(r,n,!0,e,i,a,o,s,l),e.context=tZ(null),r=e.current,n=Wn(),i=Fl(r),a=_s(n,i),a.callback=t??null,zl(r,a,i),e.current.lanes=i,$y(e,i,n),ci(e,n),e}function yS(e,t,r,n){var i=t.current,a=Wn(),o=Fl(i);return r=tZ(r),t.context===null?t.context=r:t.pendingContext=r,t=_s(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=zl(i,t,o),e!==null&&($a(e,i,o,a),G_(e,i,o)),o}function Fb(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function QB(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function jE(e,t){QB(e,t),(e=e.alternate)&&QB(e,t)}function jle(){return null}var nZ=typeof reportError=="function"?reportError:function(e){console.error(e)};function RE(e){this._internalRoot=e}xS.prototype.render=RE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(me(409));yS(e,t,null,null)};xS.prototype.unmount=RE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yc(function(){yS(null,e,null,null)}),t[Is]=null}};function xS(e){this._internalRoot=e}xS.prototype.unstable_scheduleHydration=function(e){if(e){var t=D7();e={blockedOn:null,target:e,priority:t};for(var r=0;r<bl.length&&t!==0&&t<bl[r].priority;r++);bl.splice(r,0,e),r===0&&j7(e)}};function BE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _S(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function JB(){}function Rle(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var u=Fb(o);a.call(u)}}var o=rZ(t,n,e,0,null,!1,!1,"",JB);return e._reactRootContainer=o,e[Is]=o.current,cm(e.nodeType===8?e.parentNode:e),Yc(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=Fb(l);s.call(u)}}var l=NE(e,0,!1,null,null,!1,!1,"",JB);return e._reactRootContainer=l,e[Is]=l.current,cm(e.nodeType===8?e.parentNode:e),Yc(function(){yS(t,l,r,n)}),l}function bS(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var l=Fb(o);s.call(l)}}yS(t,o,e,i)}else o=Rle(r,t,e,i,n);return Fb(o)}O7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ug(t.pendingLanes);r!==0&&(nE(t,r|1),ci(t,wr()),!(wt&6)&&(yd=wr()+500,fu()))}break;case 13:Yc(function(){var n=Os(e,1);if(n!==null){var i=Wn();$a(n,e,1,i)}}),jE(e,1)}};iE=function(e){if(e.tag===13){var t=Os(e,134217728);if(t!==null){var r=Wn();$a(t,e,134217728,r)}jE(e,134217728)}};E7=function(e){if(e.tag===13){var t=Fl(e),r=Os(e,t);if(r!==null){var n=Wn();$a(r,e,t,n)}jE(e,t)}};D7=function(){return Dt};N7=function(e,t){var r=Dt;try{return Dt=e,t()}finally{Dt=r}};SP=function(e,t,r){switch(t){case"input":if(gP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=fS(n);if(!i)throw Error(me(90));h7(n),gP(n,i)}}}break;case"textarea":v7(e,r);break;case"select":t=r.value,t!=null&&Yh(e,!!r.multiple,t,!1)}};b7=IE;w7=Yc;var Ble={usingClientEntryPoint:!1,Events:[Vy,kh,fS,x7,_7,IE]},mp={findFiberByHostInstance:gc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zle={bundleType:mp.bundleType,version:mp.version,rendererPackageName:mp.rendererPackageName,rendererConfig:mp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=A7(e),e===null?null:e.stateNode},findFiberByHostInstance:mp.findFiberByHostInstance||jle,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ax=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ax.isDisabled&&ax.supportsFiber)try{sS=ax.inject(zle),Mo=ax}catch{}}Ei.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ble;Ei.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!BE(t))throw Error(me(200));return Nle(e,t,null,r)};Ei.createRoot=function(e,t){if(!BE(e))throw Error(me(299));var r=!1,n="",i=nZ;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=NE(e,1,!1,null,null,r,!1,n,i),e[Is]=t.current,cm(e.nodeType===8?e.parentNode:e),new RE(t)};Ei.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(me(188)):(e=Object.keys(e).join(","),Error(me(268,e)));return e=A7(t),e=e===null?null:e.stateNode,e};Ei.flushSync=function(e){return Yc(e)};Ei.hydrate=function(e,t,r){if(!_S(t))throw Error(me(200));return bS(null,e,t,!0,r)};Ei.hydrateRoot=function(e,t,r){if(!BE(e))throw Error(me(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=nZ;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=rZ(t,null,e,1,r??null,i,!1,a,o),e[Is]=t.current,cm(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new xS(t)};Ei.render=function(e,t,r){if(!_S(t))throw Error(me(200));return bS(null,e,t,!1,r)};Ei.unmountComponentAtNode=function(e){if(!_S(e))throw Error(me(40));return e._reactRootContainer?(Yc(function(){bS(null,null,e,!1,function(){e._reactRootContainer=null,e[Is]=null})}),!0):!1};Ei.unstable_batchedUpdates=IE;Ei.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!_S(r))throw Error(me(200));if(e==null||e._reactInternals===void 0)throw Error(me(38));return bS(e,t,r,!1,n)};Ei.version="18.3.1-next-f1338f8080-20240426";function iZ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iZ)}catch(e){console.error(e)}}iZ(),i7.exports=Ei;var aZ=i7.exports,e3=aZ;uP.createRoot=e3.createRoot,uP.hydrateRoot=e3.hydrateRoot;/**
|
||
* @remix-run/router v1.23.2
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xm.apply(this,arguments)}var Al;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Al||(Al={}));const t3="popstate";function $le(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:o,hash:s}=n.location;return rL("",{pathname:a,search:o,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Vb(i)}return Vle(t,r,null,e)}function Or(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zE(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fle(){return Math.random().toString(36).substr(2,8)}function r3(e,t){return{usr:e.state,key:e.key,idx:t}}function rL(e,t,r,n){return r===void 0&&(r=null),xm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?hv(t):t,{state:r,key:t&&t.key||n||Fle()})}function Vb(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function hv(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Vle(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Al.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(xm({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Al.Pop;let m=c(),x=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:x})}function h(m,x){s=Al.Push;let _=rL(g.location,m,x);u=c()+1;let b=r3(_,u),S=g.createHref(_);try{o.pushState(b,"",S)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(S)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,x){s=Al.Replace;let _=rL(g.location,m,x);u=c();let b=r3(_,u),S=g.createHref(_);o.replaceState(b,"",S),a&&l&&l({action:s,location:g.location,delta:0})}function v(m){let x=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:Vb(m);return _=_.replace(/ $/,"%20"),Or(x,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,x)}let g={get action(){return s},get location(){return e(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(t3,f),l=m,()=>{i.removeEventListener(t3,f),l=null}},createHref(m){return t(i,m)},createURL:v,encodeLocation(m){let x=v(m);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(m){return o.go(m)}};return g}var n3;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(n3||(n3={}));function Gle(e,t,r){return r===void 0&&(r="/"),Wle(e,t,r)}function Wle(e,t,r,n){let i=typeof t=="string"?hv(t):t,a=$E(i.pathname||"/",r);if(a==null)return null;let o=oZ(e);Hle(o);let s=null;for(let l=0;s==null&&l<o.length;++l){let u=nue(a);s=eue(o[l],u)}return s}function oZ(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,o,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Or(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Gl([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(Or(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),oZ(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Qle(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of sZ(a.path))i(a,o,l)}),t}function sZ(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=sZ(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Hle(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Jle(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ule=/^:[\w-]+$/,Zle=3,Yle=2,Xle=1,qle=10,Kle=-2,i3=e=>e==="*";function Qle(e,t){let r=e.split("/"),n=r.length;return r.some(i3)&&(n+=Kle),t&&(n+=Yle),r.filter(i=>!i3(i)).reduce((i,a)=>i+(Ule.test(a)?Zle:a===""?Xle:qle),n)}function Jle(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function eue(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s<n.length;++s){let l=n[s],u=s===n.length-1,c=a==="/"?t:t.slice(a.length)||"/",f=tue({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),h=l.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:Gl([a,f.pathname]),pathnameBase:lue(Gl([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=Gl([a,f.pathnameBase]))}return o}function tue(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=rue(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((u,c,f)=>{let{paramName:h,isOptional:d}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const v=s[f];return d&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function rue(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),zE(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function nue(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zE(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $E(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)||"/"}const iue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aue=e=>iue.test(e);function oue(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?hv(e):e,a;if(r)if(aue(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),zE(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=a3(r.substring(1),"/"):a=a3(r,t)}else a=t;return{pathname:a,search:uue(n),hash:cue(i)}}function a3(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function nC(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 sue(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function lZ(e,t){let r=sue(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function uZ(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=hv(e):(i=xm({},e),Or(!i.pathname||!i.pathname.includes("?"),nC("?","pathname","search",i)),Or(!i.pathname||!i.pathname.includes("#"),nC("#","pathname","hash",i)),Or(!i.search||!i.search.includes("#"),nC("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=oue(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Gl=e=>e.join("/").replace(/\/\/+/g,"/"),lue=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uue=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cue=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fue(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const cZ=["post","put","patch","delete"];new Set(cZ);const hue=["get",...cZ];new Set(hue);/**
|
||
* React Router v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_m.apply(this,arguments)}const FE=H.createContext(null),due=H.createContext(null),pf=H.createContext(null),wS=H.createContext(null),gf=H.createContext({outlet:null,matches:[],isDataRoute:!1}),fZ=H.createContext(null);function vue(e,t){let{relative:r}=t===void 0?{}:t;Wy()||Or(!1);let{basename:n,navigator:i}=H.useContext(pf),{hash:a,pathname:o,search:s}=vZ(e,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:Gl([n,o])),i.createHref({pathname:l,search:s,hash:a})}function Wy(){return H.useContext(wS)!=null}function dv(){return Wy()||Or(!1),H.useContext(wS).location}function hZ(e){H.useContext(pf).static||H.useLayoutEffect(e)}function dZ(){let{isDataRoute:e}=H.useContext(gf);return e?Mue():pue()}function pue(){Wy()||Or(!1);let e=H.useContext(FE),{basename:t,future:r,navigator:n}=H.useContext(pf),{matches:i}=H.useContext(gf),{pathname:a}=dv(),o=JSON.stringify(lZ(i,r.v7_relativeSplatPath)),s=H.useRef(!1);return hZ(()=>{s.current=!0}),H.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=uZ(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gl([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}function vZ(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=H.useContext(pf),{matches:i}=H.useContext(gf),{pathname:a}=dv(),o=JSON.stringify(lZ(i,n.v7_relativeSplatPath));return H.useMemo(()=>uZ(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function gue(e,t){return mue(e,t)}function mue(e,t,r,n){Wy()||Or(!1);let{navigator:i}=H.useContext(pf),{matches:a}=H.useContext(gf),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=dv(),c;if(t){var f;let m=typeof t=="string"?hv(t):t;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||Or(!1),c=m}else c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=Gle(e,{pathname:d}),g=wue(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:Gl([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Gl([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return t&&g?H.createElement(wS.Provider,{value:{location:_m({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Al.Pop}},g):g}function yue(){let e=Cue(),t=fue(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),r?H.createElement("pre",{style:i},r):null,null)}const xue=H.createElement(yue,null);class _ue extends H.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?H.createElement(gf.Provider,{value:this.props.routeContext},H.createElement(fZ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bue(e){let{routeContext:t,match:r,children:n}=e,i=H.useContext(FE);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),H.createElement(gf.Provider,{value:t},n)}function wue(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||Or(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:h,errors:d}=r,v=f.route.loader&&h[f.route.id]===void 0&&(!d||d[f.route.id]===void 0);if(f.route.lazy||v){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let d,v=!1,g=null,m=null;r&&(d=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||xue,l&&(u<0&&h===0?(Pue("route-fallback"),v=!0,m=null):u===h&&(v=!0,m=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),_=()=>{let b;return d?b=g:v?b=m:f.route.Component?b=H.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=c,H.createElement(bue,{match:f,routeContext:{outlet:c,matches:x,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?H.createElement(_ue,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):_()},null)}var pZ=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pZ||{}),gZ=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(gZ||{});function Sue(e){let t=H.useContext(FE);return t||Or(!1),t}function Tue(e){let t=H.useContext(due);return t||Or(!1),t}function Aue(e){let t=H.useContext(gf);return t||Or(!1),t}function mZ(e){let t=Aue(),r=t.matches[t.matches.length-1];return r.route.id||Or(!1),r.route.id}function Cue(){var e;let t=H.useContext(fZ),r=Tue(),n=mZ();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Mue(){let{router:e}=Sue(pZ.UseNavigateStable),t=mZ(gZ.UseNavigateStable),r=H.useRef(!1);return hZ(()=>{r.current=!0}),H.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,_m({fromRouteId:t},a)))},[e,t])}const o3={};function Pue(e,t,r){o3[e]||(o3[e]=!0)}function Lue(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function hl(e){Or(!1)}function kue(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Al.Pop,navigator:a,static:o=!1,future:s}=e;Wy()&&Or(!1);let l=t.replace(/^\/*/,"/"),u=H.useMemo(()=>({basename:l,navigator:a,static:o,future:_m({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=hv(n));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:v="default"}=n,g=H.useMemo(()=>{let m=$E(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:d,key:v},navigationType:i}},[l,c,f,h,d,v,i]);return g==null?null:H.createElement(pf.Provider,{value:u},H.createElement(wS.Provider,{children:r,value:g}))}function Iue(e){let{children:t,location:r}=e;return gue(nL(t),r)}new Promise(()=>{});function nL(e,t){t===void 0&&(t=[]);let r=[];return H.Children.forEach(e,(n,i)=>{if(!H.isValidElement(n))return;let a=[...t,i];if(n.type===H.Fragment){r.push.apply(r,nL(n.props.children,a));return}n.type!==hl&&Or(!1),!n.props.index||!n.props.children||Or(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary: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=nL(n.props.children,a)),r.push(o)}),r}/**
|
||
* React Router DOM v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function iL(){return iL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iL.apply(this,arguments)}function Oue(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Eue(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Due(e,t){return e.button===0&&(!t||t==="_self")&&!Eue(e)}const Nue=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],jue="6";try{window.__reactRouterVersion=jue}catch{}const Rue="startTransition",s3=Loe[Rue];function Bue(e){let{basename:t,children:r,future:n,window:i}=e,a=H.useRef();a.current==null&&(a.current=$le({window:i,v5Compat:!0}));let o=a.current,[s,l]=H.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=H.useCallback(f=>{u&&s3?s3(()=>l(f)):l(f)},[l,u]);return H.useLayoutEffect(()=>o.listen(c),[o,c]),H.useEffect(()=>Lue(n),[n]),H.createElement(kue,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const zue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$ue=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fue=H.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=Oue(t,Nue),{basename:d}=H.useContext(pf),v,g=!1;if(typeof u=="string"&&$ue.test(u)&&(v=u,zue))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),T=$E(S.pathname,d);S.origin===b.origin&&T!=null?u=T+S.search+S.hash:g=!0}catch{}let m=vue(u,{relative:i}),x=Vue(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(b){n&&n(b),b.defaultPrevented||x(b)}return H.createElement("a",iL({},h,{href:v||m,onClick:g||a?n:_,ref:r,target:l}))});var l3;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(l3||(l3={}));var u3;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(u3||(u3={}));function Vue(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=dZ(),u=dv(),c=vZ(e,{relative:o});return H.useCallback(f=>{if(Due(f,r)){f.preventDefault();let h=n!==void 0?n:Vb(u)===Vb(c);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Gue=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yZ=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var Wue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Hue=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>H.createElement("svg",{ref:l,...Wue,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:yZ("lucide",i),...s},[...o.map(([u,c])=>H.createElement(u,c)),...Array.isArray(a)?a:[a]]));/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Be=(e,t)=>{const r=H.forwardRef(({className:n,...i},a)=>H.createElement(Hue,{ref:a,iconNode:t,className:yZ(`lucide-${Gue(e)}`,n),...i}));return r.displayName=`${e}`,r};/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Hy=Be("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const iC=Be("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Uue=Be("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const bm=Be("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xZ=Be("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Zue=Be("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Yue=Be("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xue=Be("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const VE=Be("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xc=Be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Uy=Be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const que=Be("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wm=Be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Kue=Be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xd=Be("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ed=Be("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _d=Be("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Que=Be("CloudLightning",[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qc=Be("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Jue=Be("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _Z=Be("Construction",[["rect",{x:"2",y:"6",width:"20",height:"8",rx:"1",key:"1estib"}],["path",{d:"M17 14v7",key:"7m2elx"}],["path",{d:"M7 14v7",key:"1cm7wv"}],["path",{d:"M17 3v3",key:"1v4jwn"}],["path",{d:"M7 3v3",key:"7o6guu"}],["path",{d:"M10 14 2.3 6.3",key:"1023jk"}],["path",{d:"m14 6 7.7 7.7",key:"1s8pl2"}],["path",{d:"m8 6 8 8",key:"hl96qh"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ece=Be("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const bZ=Be("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const tce=Be("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const GE=Be("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const bd=Be("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const wZ=Be("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const WE=Be("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const HE=Be("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const UE=Be("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const rce=Be("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Sm=Be("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const SZ=Be("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const TZ=Be("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const nce=Be("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const AZ=Be("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ice=Be("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const CZ=Be("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ace=Be("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ZE=Be("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const oce=Be("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const SS=Be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ds=Be("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Gb=Be("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const MZ=Be("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const YE=Be("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const PZ=Be("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const XE=Be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const c3=Be("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const LZ=Be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Wb=Be("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const kZ=Be("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const sce=Be("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const qE=Be("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Ns=Be("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const lce=Be("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const IZ=Be("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const TS=Be("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const f3=Be("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const ru=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
||
* @license lucide-react v0.383.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Tm=Be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function Zr(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function h3(){return Zr("/api/status")}async function uce(){return Zr("/api/health")}async function cce(){return Zr("/api/nodes")}async function fce(){return Zr("/api/edges")}async function hce(){return Zr("/api/sources")}async function OZ(){return Zr("/api/alerts/active")}async function d3(e=50,t=0,r,n){const i=new URLSearchParams;return i.set("limit",e.toString()),i.set("offset",t.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),Zr(`/api/alerts/history?${i.toString()}`)}async function dce(){return Zr("/api/subscriptions")}async function EZ(){return Zr("/api/env/status")}async function DZ(){return Zr("/api/env/active")}async function NZ(){return Zr("/api/env/swpc")}async function jZ(){return Zr("/api/env/ducting")}async function vce(){return Zr("/api/env/fires")}async function pce(){return Zr("/api/env/avalanche")}async function gce(){return Zr("/api/env/streams")}async function mce(){return Zr("/api/env/traffic")}async function yce(){return Zr("/api/env/roads")}async function xce(){return Zr("/api/env/hotspots")}async function _ce(){return Zr("/api/regions")}function KE(){const[e,t]=H.useState(!1),[r,n]=H.useState(null),[i,a]=H.useState(null),[o,s]=H.useState(null),l=H.useRef(null),u=H.useRef(null),c=H.useRef(1e3),f=H.useCallback(()=>{var v;if(((v=l.current)==null?void 0:v.readyState)===WebSocket.OPEN)return;const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const g=new WebSocket(d);l.current=g,g.onopen=()=>{t(!0),c.current=1e3},g.onmessage=x=>{try{const _=JSON.parse(x.data);switch(s(_),_.type){case"health_update":n(_.data);break;case"alert_fired":a(_.data);break}}catch(_){console.error("Failed to parse WebSocket message:",_)}},g.onclose=()=>{t(!1),l.current=null;const x=Math.min(c.current,3e4);u.current=window.setTimeout(()=>{c.current=Math.min(x*2,3e4),f()},x)},g.onerror=()=>{g.close()};const m=setInterval(()=>{g.readyState===WebSocket.OPEN&&g.send("ping")},3e4);g.addEventListener("close",()=>{clearInterval(m)})}catch(g){console.error("Failed to create WebSocket:",g)}},[]);return H.useEffect(()=>(f(),()=>{u.current&&clearTimeout(u.current),l.current&&l.current.close()}),[f]),{connected:e,lastHealth:r,lastAlert:i,lastMessage:o}}const RZ=H.createContext(null);function bce(){const e=H.useContext(RZ);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function wce(e){switch(e==null?void 0:e.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:xd,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ns,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:Sm,iconColor:"text-blue-500"}}}function Sce({toast:e,onDismiss:t,onNavigate:r}){const n=wce(e.alert.severity),i=n.icon;return H.useEffect(()=>{const a=setTimeout(t,8e3);return()=>clearTimeout(a)},[t]),y.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:y.jsxs("div",{className:"flex items-start gap-3 p-4",children:[y.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),y.jsx(i,{size:18,className:n.iconColor}),y.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[y.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:e.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),y.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:e.alert.message})]}),y.jsx("button",{onClick:a=>{a.stopPropagation(),t()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:y.jsx(ru,{size:16})})]})})}function Tce({children:e}){const[t,r]=H.useState([]),n=dZ(),i=H.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=H.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=H.useCallback(()=>{n("/alerts")},[n]);return y.jsxs(RZ.Provider,{value:{addToast:i},children:[e,y.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:t.map(s=>y.jsx("div",{className:"pointer-events-auto",children:y.jsx(Sce,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const BZ=[{path:"/",label:"Dashboard",icon:TZ},{path:"/mesh",label:"Mesh",icon:Ds},{path:"/environment",label:"Environment",icon:qc},{path:"/config",label:"Config",icon:LZ},{path:"/alerts",label:"Alerts",icon:bm},{path:"/notifications",label:"Notifications",icon:Uue},{path:"/reference",label:"Reference",icon:xZ}];function Ace(e){const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60);return t>0?`${t}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function Cce(e){const t=BZ.find(r=>r.path===e);return(t==null?void 0:t.label)||"Dashboard"}function Mce({children:e}){var h;const t=dv(),{connected:r,lastAlert:n}=KE(),{addToast:i}=bce(),[a,o]=H.useState(null),[s,l]=H.useState(null);H.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=H.useState(new Date);H.useEffect(()=>{h3().then(o).catch(console.error);const d=setInterval(()=>{h3().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),H.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const f=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return y.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[y.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[y.jsx("div",{className:"p-5 border-b border-border",children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),y.jsxs("div",{children:[y.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),y.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),y.jsx("nav",{className:"flex-1 py-4",children:BZ.map(d=>{const v=t.pathname===d.path,g=d.icon;return y.jsxs(Fue,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${v?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[v&&y.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),y.jsx(g,{size:18}),d.label]},d.path)})}),y.jsxs("div",{className:"p-5 border-t border-border",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[y.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),y.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),y.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(h=a==null?void 0:a.connection_type)==null?void 0:h.toUpperCase(),": ",a==null?void 0:a.connection_target]}),y.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?Ace(a.uptime_seconds):"..."]})]})]}),y.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[y.jsx("h1",{className:"text-lg font-semibold",children:Cce(t.pathname)}),y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),y.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),y.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[f," MT"]})]})]}),y.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:e})]})]})}function zZ(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=zZ(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function xt(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=zZ(e))&&(n&&(n+=" "),n+=t);return n}var Pce=Array.isArray,di=Pce,Lce=typeof og=="object"&&og&&og.Object===Object&&og,$Z=Lce,kce=$Z,Ice=typeof self=="object"&&self&&self.Object===Object&&self,Oce=kce||Ice||Function("return this")(),Ho=Oce,Ece=Ho,Dce=Ece.Symbol,Zy=Dce,v3=Zy,FZ=Object.prototype,Nce=FZ.hasOwnProperty,jce=FZ.toString,yp=v3?v3.toStringTag:void 0;function Rce(e){var t=Nce.call(e,yp),r=e[yp];try{e[yp]=void 0;var n=!0}catch{}var i=jce.call(e);return n&&(t?e[yp]=r:delete e[yp]),i}var Bce=Rce,zce=Object.prototype,$ce=zce.toString;function Fce(e){return $ce.call(e)}var Vce=Fce,p3=Zy,Gce=Bce,Wce=Vce,Hce="[object Null]",Uce="[object Undefined]",g3=p3?p3.toStringTag:void 0;function Zce(e){return e==null?e===void 0?Uce:Hce:g3&&g3 in Object(e)?Gce(e):Wce(e)}var Ys=Zce;function Yce(e){return e!=null&&typeof e=="object"}var Xs=Yce,Xce=Ys,qce=Xs,Kce="[object Symbol]";function Qce(e){return typeof e=="symbol"||qce(e)&&Xce(e)==Kce}var vv=Qce,Jce=di,efe=vv,tfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rfe=/^\w*$/;function nfe(e,t){if(Jce(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||efe(e)?!0:rfe.test(e)||!tfe.test(e)||t!=null&&e in Object(t)}var QE=nfe;function ife(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hu=ife;const pv=Ft(hu);var afe=Ys,ofe=hu,sfe="[object AsyncFunction]",lfe="[object Function]",ufe="[object GeneratorFunction]",cfe="[object Proxy]";function ffe(e){if(!ofe(e))return!1;var t=afe(e);return t==lfe||t==ufe||t==sfe||t==cfe}var JE=ffe;const ft=Ft(JE);var hfe=Ho,dfe=hfe["__core-js_shared__"],vfe=dfe,aC=vfe,m3=function(){var e=/[^.]+$/.exec(aC&&aC.keys&&aC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pfe(e){return!!m3&&m3 in e}var gfe=pfe,mfe=Function.prototype,yfe=mfe.toString;function xfe(e){if(e!=null){try{return yfe.call(e)}catch{}try{return e+""}catch{}}return""}var VZ=xfe,_fe=JE,bfe=gfe,wfe=hu,Sfe=VZ,Tfe=/[\\^$.*+?()[\]{}|]/g,Afe=/^\[object .+?Constructor\]$/,Cfe=Function.prototype,Mfe=Object.prototype,Pfe=Cfe.toString,Lfe=Mfe.hasOwnProperty,kfe=RegExp("^"+Pfe.call(Lfe).replace(Tfe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ife(e){if(!wfe(e)||bfe(e))return!1;var t=_fe(e)?kfe:Afe;return t.test(Sfe(e))}var Ofe=Ife;function Efe(e,t){return e==null?void 0:e[t]}var Dfe=Efe,Nfe=Ofe,jfe=Dfe;function Rfe(e,t){var r=jfe(e,t);return Nfe(r)?r:void 0}var mf=Rfe,Bfe=mf,zfe=Bfe(Object,"create"),AS=zfe,y3=AS;function $fe(){this.__data__=y3?y3(null):{},this.size=0}var Ffe=$fe;function Vfe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gfe=Vfe,Wfe=AS,Hfe="__lodash_hash_undefined__",Ufe=Object.prototype,Zfe=Ufe.hasOwnProperty;function Yfe(e){var t=this.__data__;if(Wfe){var r=t[e];return r===Hfe?void 0:r}return Zfe.call(t,e)?t[e]:void 0}var Xfe=Yfe,qfe=AS,Kfe=Object.prototype,Qfe=Kfe.hasOwnProperty;function Jfe(e){var t=this.__data__;return qfe?t[e]!==void 0:Qfe.call(t,e)}var ehe=Jfe,the=AS,rhe="__lodash_hash_undefined__";function nhe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=the&&t===void 0?rhe:t,this}var ihe=nhe,ahe=Ffe,ohe=Gfe,she=Xfe,lhe=ehe,uhe=ihe;function gv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gv.prototype.clear=ahe;gv.prototype.delete=ohe;gv.prototype.get=she;gv.prototype.has=lhe;gv.prototype.set=uhe;var che=gv;function fhe(){this.__data__=[],this.size=0}var hhe=fhe;function dhe(e,t){return e===t||e!==e&&t!==t}var eD=dhe,vhe=eD;function phe(e,t){for(var r=e.length;r--;)if(vhe(e[r][0],t))return r;return-1}var CS=phe,ghe=CS,mhe=Array.prototype,yhe=mhe.splice;function xhe(e){var t=this.__data__,r=ghe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():yhe.call(t,r,1),--this.size,!0}var _he=xhe,bhe=CS;function whe(e){var t=this.__data__,r=bhe(t,e);return r<0?void 0:t[r][1]}var She=whe,The=CS;function Ahe(e){return The(this.__data__,e)>-1}var Che=Ahe,Mhe=CS;function Phe(e,t){var r=this.__data__,n=Mhe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Lhe=Phe,khe=hhe,Ihe=_he,Ohe=She,Ehe=Che,Dhe=Lhe;function mv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mv.prototype.clear=khe;mv.prototype.delete=Ihe;mv.prototype.get=Ohe;mv.prototype.has=Ehe;mv.prototype.set=Dhe;var MS=mv,Nhe=mf,jhe=Ho,Rhe=Nhe(jhe,"Map"),tD=Rhe,x3=che,Bhe=MS,zhe=tD;function $he(){this.size=0,this.__data__={hash:new x3,map:new(zhe||Bhe),string:new x3}}var Fhe=$he;function Vhe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ghe=Vhe,Whe=Ghe;function Hhe(e,t){var r=e.__data__;return Whe(t)?r[typeof t=="string"?"string":"hash"]:r.map}var PS=Hhe,Uhe=PS;function Zhe(e){var t=Uhe(this,e).delete(e);return this.size-=t?1:0,t}var Yhe=Zhe,Xhe=PS;function qhe(e){return Xhe(this,e).get(e)}var Khe=qhe,Qhe=PS;function Jhe(e){return Qhe(this,e).has(e)}var ede=Jhe,tde=PS;function rde(e,t){var r=tde(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var nde=rde,ide=Fhe,ade=Yhe,ode=Khe,sde=ede,lde=nde;function yv(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yv.prototype.clear=ide;yv.prototype.delete=ade;yv.prototype.get=ode;yv.prototype.has=sde;yv.prototype.set=lde;var rD=yv,GZ=rD,ude="Expected a function";function nD(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ude);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(nD.Cache||GZ),r}nD.Cache=GZ;var WZ=nD;const cde=Ft(WZ);var fde=WZ,hde=500;function dde(e){var t=fde(e,function(n){return r.size===hde&&r.clear(),n}),r=t.cache;return t}var vde=dde,pde=vde,gde=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mde=/\\(\\)?/g,yde=pde(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gde,function(r,n,i,a){t.push(i?a.replace(mde,"$1"):n||r)}),t}),xde=yde;function _de(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var iD=_de,_3=Zy,bde=iD,wde=di,Sde=vv,b3=_3?_3.prototype:void 0,w3=b3?b3.toString:void 0;function HZ(e){if(typeof e=="string")return e;if(wde(e))return bde(e,HZ)+"";if(Sde(e))return w3?w3.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Tde=HZ,Ade=Tde;function Cde(e){return e==null?"":Ade(e)}var UZ=Cde,Mde=di,Pde=QE,Lde=xde,kde=UZ;function Ide(e,t){return Mde(e)?e:Pde(e,t)?[e]:Lde(kde(e))}var ZZ=Ide,Ode=vv;function Ede(e){if(typeof e=="string"||Ode(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var LS=Ede,Dde=ZZ,Nde=LS;function jde(e,t){t=Dde(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Nde(t[r++])];return r&&r==n?e:void 0}var aD=jde,Rde=aD;function Bde(e,t,r){var n=e==null?void 0:Rde(e,t);return n===void 0?r:n}var YZ=Bde;const aa=Ft(YZ);function zde(e){return e==null}var $de=zde;const dt=Ft($de);var Fde=Ys,Vde=di,Gde=Xs,Wde="[object String]";function Hde(e){return typeof e=="string"||!Vde(e)&&Gde(e)&&Fde(e)==Wde}var Ude=Hde;const Kc=Ft(Ude);var XZ={exports:{}},jt={};/**
|
||
* @license React
|
||
* react-is.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var oD=Symbol.for("react.element"),sD=Symbol.for("react.portal"),kS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),ES=Symbol.for("react.provider"),DS=Symbol.for("react.context"),Zde=Symbol.for("react.server_context"),NS=Symbol.for("react.forward_ref"),jS=Symbol.for("react.suspense"),RS=Symbol.for("react.suspense_list"),BS=Symbol.for("react.memo"),zS=Symbol.for("react.lazy"),Yde=Symbol.for("react.offscreen"),qZ;qZ=Symbol.for("react.module.reference");function ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case oD:switch(e=e.type,e){case kS:case OS:case IS:case jS:case RS:return e;default:switch(e=e&&e.$$typeof,e){case Zde:case DS:case NS:case zS:case BS:case ES:return e;default:return t}}case sD:return t}}}jt.ContextConsumer=DS;jt.ContextProvider=ES;jt.Element=oD;jt.ForwardRef=NS;jt.Fragment=kS;jt.Lazy=zS;jt.Memo=BS;jt.Portal=sD;jt.Profiler=OS;jt.StrictMode=IS;jt.Suspense=jS;jt.SuspenseList=RS;jt.isAsyncMode=function(){return!1};jt.isConcurrentMode=function(){return!1};jt.isContextConsumer=function(e){return ga(e)===DS};jt.isContextProvider=function(e){return ga(e)===ES};jt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===oD};jt.isForwardRef=function(e){return ga(e)===NS};jt.isFragment=function(e){return ga(e)===kS};jt.isLazy=function(e){return ga(e)===zS};jt.isMemo=function(e){return ga(e)===BS};jt.isPortal=function(e){return ga(e)===sD};jt.isProfiler=function(e){return ga(e)===OS};jt.isStrictMode=function(e){return ga(e)===IS};jt.isSuspense=function(e){return ga(e)===jS};jt.isSuspenseList=function(e){return ga(e)===RS};jt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kS||e===OS||e===IS||e===jS||e===RS||e===Yde||typeof e=="object"&&e!==null&&(e.$$typeof===zS||e.$$typeof===BS||e.$$typeof===ES||e.$$typeof===DS||e.$$typeof===NS||e.$$typeof===qZ||e.getModuleId!==void 0)};jt.typeOf=ga;XZ.exports=jt;var Xde=XZ.exports,qde=Ys,Kde=Xs,Qde="[object Number]";function Jde(e){return typeof e=="number"||Kde(e)&&qde(e)==Qde}var KZ=Jde;const eve=Ft(KZ);var tve=KZ;function rve(e){return tve(e)&&e!=+e}var nve=rve;const xv=Ft(nve);var ja=function(t){return t===0?0:t>0?1:-1},xc=function(t){return Kc(t)&&t.indexOf("%")===t.length-1},we=function(t){return eve(t)&&!xv(t)},ive=function(t){return dt(t)},Vr=function(t){return we(t)||Kc(t)},ave=0,_v=function(t){var r=++ave;return"".concat(t||"").concat(r)},Qc=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!we(t)&&!Kc(t))return n;var a;if(xc(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xv(a)&&(a=n),i&&a>r&&(a=r),a},_h=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},ove=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i<r;i++)if(!n[t[i]])n[t[i]]=!0;else return!0;return!1},vn=function(t,r){return we(t)&&we(r)?function(n){return t+n*(r-t)}:function(){return r}};function Hb(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):aa(n,t))===r})}var sve=function(t,r){return we(t)&&we(r)?t-r:Kc(t)&&Kc(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function td(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function aL(e){"@babel/helpers - typeof";return aL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aL(e)}var lve=["viewBox","children"],uve=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],S3=["points","pathLength"],oC={svg:lve,polygon:S3,polyline:S3},lD=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Ub=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(H.isValidElement(t)&&(n=t.props),!pv(n))return null;var i={};return Object.keys(n).forEach(function(a){lD.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},cve=function(t,r,n){return function(i){return t(r,n,i),null}},Zb=function(t,r,n){if(!pv(t)||aL(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];lD.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=cve(o,r,n))}),i},fve=["children"],hve=["children"];function T3(e,t){if(e==null)return{};var r=dve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function oL(e){"@babel/helpers - typeof";return oL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oL(e)}var A3={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},bs=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},C3=null,sC=null,uD=function e(t){if(t===C3&&Array.isArray(sC))return sC;var r=[];return H.Children.forEach(t,function(n){dt(n)||(Xde.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),sC=r,C3=t,r};function oa(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return bs(i)}):n=[bs(t)],uD(e).forEach(function(i){var a=aa(i,"type.displayName")||aa(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function xi(e,t){var r=oa(e,t);return r&&r[0]}var M3=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!we(n)||n<=0||!we(i)||i<=0)},vve=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],pve=function(t){return t&&t.type&&Kc(t.type)&&vve.indexOf(t.type)>=0},QZ=function(t){return t&&oL(t)==="object"&&"clipDot"in t},gve=function(t,r,n,i){var a,o=(a=oC==null?void 0:oC[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ft(t)&&(i&&o.includes(r)||uve.includes(r))||n&&lD.includes(r)},ct=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(H.isValidElement(t)&&(i=t.props),!pv(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;gve((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},sL=function e(t,r){if(t===r)return!0;var n=H.Children.count(t);if(n!==H.Children.count(r))return!1;if(n===0)return!0;if(n===1)return P3(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=t[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!P3(a,o))return!1}return!0},P3=function(t,r){if(dt(t)&&dt(r))return!0;if(!dt(t)&&!dt(r)){var n=t.props||{},i=n.children,a=T3(n,fve),o=r.props||{},s=o.children,l=T3(o,hve);return i&&s?td(a,l)&&sL(i,s):!i&&!s?td(a,l):!1}return!1},L3=function(t,r){var n=[],i={};return uD(t).forEach(function(a,o){if(pve(a))n.push(a);else if(a){var s=bs(a.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!i[s])){var f=u(a,s,o);n.push(f),i[s]=!0}}}),n},mve=function(t){var r=t&&t.type;return r&&A3[r]?A3[r]:null},yve=function(t,r){return uD(r).indexOf(t)},xve=["children","width","height","viewBox","className","style","title","desc"];function lL(){return lL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lL.apply(this,arguments)}function _ve(e,t){if(e==null)return{};var r=bve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uL(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=_ve(e,xve),c=i||{width:r,height:n,x:0,y:0},f=xt("recharts-surface",a);return Q.createElement("svg",lL({},ct(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),Q.createElement("title",null,s),Q.createElement("desc",null,l),t)}var wve=["children","className"];function cL(){return cL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cL.apply(this,arguments)}function Sve(e,t){if(e==null)return{};var r=Tve(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tve(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Xt=Q.forwardRef(function(e,t){var r=e.children,n=e.className,i=Sve(e,wve),a=xt("recharts-layer",n);return Q.createElement("g",cL({className:a},ct(i,!0),{ref:t}),r)}),Ec=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function Ave(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}var Cve=Ave,Mve=Cve;function Pve(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Mve(e,t,r)}var Lve=Pve,kve="\\ud800-\\udfff",Ive="\\u0300-\\u036f",Ove="\\ufe20-\\ufe2f",Eve="\\u20d0-\\u20ff",Dve=Ive+Ove+Eve,Nve="\\ufe0e\\ufe0f",jve="\\u200d",Rve=RegExp("["+jve+kve+Dve+Nve+"]");function Bve(e){return Rve.test(e)}var JZ=Bve;function zve(e){return e.split("")}var $ve=zve,eY="\\ud800-\\udfff",Fve="\\u0300-\\u036f",Vve="\\ufe20-\\ufe2f",Gve="\\u20d0-\\u20ff",Wve=Fve+Vve+Gve,Hve="\\ufe0e\\ufe0f",Uve="["+eY+"]",fL="["+Wve+"]",hL="\\ud83c[\\udffb-\\udfff]",Zve="(?:"+fL+"|"+hL+")",tY="[^"+eY+"]",rY="(?:\\ud83c[\\udde6-\\uddff]){2}",nY="[\\ud800-\\udbff][\\udc00-\\udfff]",Yve="\\u200d",iY=Zve+"?",aY="["+Hve+"]?",Xve="(?:"+Yve+"(?:"+[tY,rY,nY].join("|")+")"+aY+iY+")*",qve=aY+iY+Xve,Kve="(?:"+[tY+fL+"?",fL,rY,nY,Uve].join("|")+")",Qve=RegExp(hL+"(?="+hL+")|"+Kve+qve,"g");function Jve(e){return e.match(Qve)||[]}var epe=Jve,tpe=$ve,rpe=JZ,npe=epe;function ipe(e){return rpe(e)?npe(e):tpe(e)}var ape=ipe,ope=Lve,spe=JZ,lpe=ape,upe=UZ;function cpe(e){return function(t){t=upe(t);var r=spe(t)?lpe(t):void 0,n=r?r[0]:t.charAt(0),i=r?ope(r,1).join(""):t.slice(1);return n[e]()+i}}var fpe=cpe,hpe=fpe,dpe=hpe("toUpperCase"),vpe=dpe;const $S=Ft(vpe);function Zt(e){return function(){return e}}const oY=Math.cos,Yb=Math.sin,Xa=Math.sqrt,Xb=Math.PI,FS=2*Xb,dL=Math.PI,vL=2*dL,nc=1e-6,ppe=vL-nc;function sY(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function gpe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sY;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}let mpe=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?sY:gpe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=n-t,u=i-r,c=o-t,f=s-r,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>nc)if(!(Math.abs(f*l-u*c)>nc)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=n-o,v=i-s,g=l*l+u*u,m=d*d+v*v,x=Math.sqrt(g),_=Math.sqrt(h),b=a*Math.tan((dL-Math.acos((g+h-m)/(2*x*_)))/2),S=b/_,T=b/x;Math.abs(S-1)>nc&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*d>c*v)},${this._x1=t+T*l},${this._y1=r+T*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>nc||Math.abs(this._y1-c)>nc)&&this._append`L${u},${c}`,n&&(h<0&&(h=h%vL+vL),h>ppe?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:h>nc&&this._append`A${n},${n},0,${+(h>=dL)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function cD(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new mpe(t)}function fD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lY(e){this._context=e}lY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function VS(e){return new lY(e)}function uY(e){return e[0]}function cY(e){return e[1]}function fY(e,t){var r=Zt(!0),n=null,i=VS,a=null,o=cD(s);e=typeof e=="function"?e:e===void 0?uY:Zt(e),t=typeof t=="function"?t:t===void 0?cY:Zt(t);function s(l){var u,c=(l=fD(l)).length,f,h=!1,d;for(n==null&&(a=i(d=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(f,u,l),+t(f,u,l));if(d)return a=null,d+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Zt(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Zt(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Zt(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),s):n},s}function ox(e,t,r){var n=null,i=Zt(!0),a=null,o=VS,s=null,l=cD(u);e=typeof e=="function"?e:e===void 0?uY:Zt(+e),t=typeof t=="function"?t:Zt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?cY:Zt(+r);function u(f){var h,d,v,g=(f=fD(f)).length,m,x=!1,_,b=new Array(g),S=new Array(g);for(a==null&&(s=o(_=l())),h=0;h<=g;++h){if(!(h<g&&i(m=f[h],h,f))===x)if(x=!x)d=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=h-1;v>=d;--v)s.point(b[v],S[v]);s.lineEnd(),s.areaEnd()}x&&(b[h]=+e(m,h,f),S[h]=+t(m,h,f),s.point(n?+n(m,h,f):b[h],r?+r(m,h,f):S[h]))}if(_)return s=null,_+""||null}function c(){return fY().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Zt(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Zt(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Zt(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Zt(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Zt(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Zt(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Zt(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class hY{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ype(e){return new hY(e,!0)}function xpe(e){return new hY(e,!1)}const hD={draw(e,t){const r=Xa(t/Xb);e.moveTo(r,0),e.arc(0,0,r,0,FS)}},_pe={draw(e,t){const r=Xa(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},dY=Xa(1/3),bpe=dY*2,wpe={draw(e,t){const r=Xa(t/bpe),n=r*dY;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Spe={draw(e,t){const r=Xa(t),n=-r/2;e.rect(n,n,r,r)}},Tpe=.8908130915292852,vY=Yb(Xb/10)/Yb(7*Xb/10),Ape=Yb(FS/10)*vY,Cpe=-oY(FS/10)*vY,Mpe={draw(e,t){const r=Xa(t*Tpe),n=Ape*r,i=Cpe*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=FS*a/5,s=oY(o),l=Yb(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},lC=Xa(3),Ppe={draw(e,t){const r=-Xa(t/(lC*3));e.moveTo(0,r*2),e.lineTo(-lC*r,-r),e.lineTo(lC*r,-r),e.closePath()}},$i=-.5,Fi=Xa(3)/2,pL=1/Xa(12),Lpe=(pL/2+1)*3,kpe={draw(e,t){const r=Xa(t/Lpe),n=r/2,i=r*pL,a=n,o=r*pL+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo($i*n-Fi*i,Fi*n+$i*i),e.lineTo($i*a-Fi*o,Fi*a+$i*o),e.lineTo($i*s-Fi*l,Fi*s+$i*l),e.lineTo($i*n+Fi*i,$i*i-Fi*n),e.lineTo($i*a+Fi*o,$i*o-Fi*a),e.lineTo($i*s+Fi*l,$i*l-Fi*s),e.closePath()}};function Ipe(e,t){let r=null,n=cD(i);e=typeof e=="function"?e:Zt(e||hD),t=typeof t=="function"?t:Zt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Zt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Zt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function qb(){}function Kb(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function pY(e){this._context=e}pY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Kb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Kb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ope(e){return new pY(e)}function gY(e){this._context=e}gY.prototype={areaStart:qb,areaEnd:qb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Kb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Epe(e){return new gY(e)}function mY(e){this._context=e}mY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Kb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dpe(e){return new mY(e)}function yY(e){this._context=e}yY.prototype={areaStart:qb,areaEnd:qb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Npe(e){return new yY(e)}function k3(e){return e<0?-1:1}function I3(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(k3(a)+k3(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function O3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function uC(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Qb(e){this._context=e}Qb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:uC(this,this._t0,O3(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,uC(this,O3(this,r=I3(this,e,t)),r);break;default:uC(this,this._t0,r=I3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function xY(e){this._context=new _Y(e)}(xY.prototype=Object.create(Qb.prototype)).point=function(e,t){Qb.prototype.point.call(this,t,e)};function _Y(e){this._context=e}_Y.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function jpe(e){return new Qb(e)}function Rpe(e){return new xY(e)}function bY(e){this._context=e}bY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=E3(e),i=E3(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function E3(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Bpe(e){return new bY(e)}function GS(e,t){this._context=e,this._t=t}GS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function zpe(e){return new GS(e,.5)}function $pe(e){return new GS(e,0)}function Fpe(e){return new GS(e,1)}function wd(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function gL(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Vpe(e,t){return e[t]}function Gpe(e){const t=[];return t.key=e,t}function Wpe(){var e=Zt([]),t=gL,r=wd,n=Vpe;function i(a){var o=Array.from(e.apply(this,arguments),Gpe),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,a)]).data=f;for(s=0,c=fD(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Zt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Zt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?gL:typeof a=="function"?a:Zt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??wd,i):r},i}function Hpe(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}wd(e,t)}}function Upe(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}wd(e,t)}}function Zpe(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,h=c[n-1][1]||0,d=(f-h)/2,v=0;v<s;++v){var g=e[t[v]],m=g[n][1]||0,x=g[n-1][1]||0;d+=m-x}l+=f,u+=d*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,wd(e,t)}}function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Am(e)}var Ype=["type","size","sizeType"];function mL(){return mL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mL.apply(this,arguments)}function D3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D3(Object(r),!0).forEach(function(n){Xpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xpe(e,t,r){return t=qpe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qpe(e){var t=Kpe(e,"string");return Am(t)=="symbol"?t:t+""}function Kpe(e,t){if(Am(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Am(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qpe(e,t){if(e==null)return{};var r=Jpe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jpe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var wY={symbolCircle:hD,symbolCross:_pe,symbolDiamond:wpe,symbolSquare:Spe,symbolStar:Mpe,symbolTriangle:Ppe,symbolWye:kpe},ege=Math.PI/180,tge=function(t){var r="symbol".concat($S(t));return wY[r]||hD},rge=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*ege;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},nge=function(t,r){wY["symbol".concat($S(t))]=r},dD=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=Qpe(t,Ype),u=N3(N3({},l),{},{type:n,size:a,sizeType:s}),c=function(){var m=tge(n),x=Ipe().type(m).size(rge(a,s,n));return x()},f=u.className,h=u.cx,d=u.cy,v=ct(u,!0);return h===+h&&d===+d&&a===+a?Q.createElement("path",mL({},v,{className:xt("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:c()})):null};dD.registerSymbol=nge;function Sd(e){"@babel/helpers - typeof";return Sd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(e)}function yL(){return yL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yL.apply(this,arguments)}function j3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ige(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(r),!0).forEach(function(n){Cm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function age(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,TY(n.key),n)}}function sge(e,t,r){return t&&oge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lge(e,t,r){return t=Jb(t),uge(e,SY()?Reflect.construct(t,r||[],Jb(e).constructor):t.apply(e,r))}function uge(e,t){if(t&&(Sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cge(e)}function cge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SY=function(){return!!e})()}function Jb(e){return Jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jb(e)}function fge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xL(e,t)}function xL(e,t){return xL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xL(e,t)}function Cm(e,t,r){return t=TY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TY(e){var t=hge(e,"string");return Sd(t)=="symbol"?t:t+""}function hge(e,t){if(Sd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vi=32,vD=function(e){function t(){return age(this,t),lge(this,t,arguments)}return fge(t,e),sge(t,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Vi/2,o=Vi/6,s=Vi/3,l=n.inactive?i:n.color;if(n.type==="plainline")return Q.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Vi,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return Q.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
|
||
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
|
||
H`).concat(Vi,"M").concat(2*s,",").concat(a,`
|
||
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return Q.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Vi/8,"h").concat(Vi,"v").concat(Vi*3/4,"h").concat(-Vi,"z"),className:"recharts-legend-icon"});if(Q.isValidElement(n.legendIcon)){var u=ige({},n);return delete u.legendIcon,Q.cloneElement(n.legendIcon,u)}return Q.createElement(dD,{fill:l,cx:a,cy:a,size:Vi,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,l=i.formatter,u=i.inactiveColor,c={x:0,y:0,width:Vi,height:Vi},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(d,v){var g=d.formatter||l,m=xt(Cm(Cm({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",d.inactive));if(d.type==="none")return null;var x=ft(d.value)?null:d.value;Ec(!ft(d.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var _=d.inactive?u:d.color;return Q.createElement("li",yL({className:m,style:f,key:"legend-item-".concat(v)},Zb(n.props,d,v)),Q.createElement(uL,{width:o,height:o,viewBox:c,style:h},n.renderIcon(d)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},g?g(x,d,v):x))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(H.PureComponent);Cm(vD,"displayName","Legend");Cm(vD,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var dge=MS;function vge(){this.__data__=new dge,this.size=0}var pge=vge;function gge(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var mge=gge;function yge(e){return this.__data__.get(e)}var xge=yge;function _ge(e){return this.__data__.has(e)}var bge=_ge,wge=MS,Sge=tD,Tge=rD,Age=200;function Cge(e,t){var r=this.__data__;if(r instanceof wge){var n=r.__data__;if(!Sge||n.length<Age-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Tge(n)}return r.set(e,t),this.size=r.size,this}var Mge=Cge,Pge=MS,Lge=pge,kge=mge,Ige=xge,Oge=bge,Ege=Mge;function bv(e){var t=this.__data__=new Pge(e);this.size=t.size}bv.prototype.clear=Lge;bv.prototype.delete=kge;bv.prototype.get=Ige;bv.prototype.has=Oge;bv.prototype.set=Ege;var AY=bv,Dge="__lodash_hash_undefined__";function Nge(e){return this.__data__.set(e,Dge),this}var jge=Nge;function Rge(e){return this.__data__.has(e)}var Bge=Rge,zge=rD,$ge=jge,Fge=Bge;function e1(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new zge;++t<r;)this.add(e[t])}e1.prototype.add=e1.prototype.push=$ge;e1.prototype.has=Fge;var CY=e1;function Vge(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var MY=Vge;function Gge(e,t){return e.has(t)}var PY=Gge,Wge=CY,Hge=MY,Uge=PY,Zge=1,Yge=2;function Xge(e,t,r,n,i,a){var o=r&Zge,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,h=!0,d=r&Yge?new Wge:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var v=e[f],g=t[f];if(n)var m=o?n(g,v,f,t,e,a):n(v,g,f,e,t,a);if(m!==void 0){if(m)continue;h=!1;break}if(d){if(!Hge(t,function(x,_){if(!Uge(d,_)&&(v===x||i(v,x,r,n,a)))return d.push(_)})){h=!1;break}}else if(!(v===g||i(v,g,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var LY=Xge,qge=Ho,Kge=qge.Uint8Array,Qge=Kge;function Jge(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var eme=Jge;function tme(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var pD=tme,R3=Zy,B3=Qge,rme=eD,nme=LY,ime=eme,ame=pD,ome=1,sme=2,lme="[object Boolean]",ume="[object Date]",cme="[object Error]",fme="[object Map]",hme="[object Number]",dme="[object RegExp]",vme="[object Set]",pme="[object String]",gme="[object Symbol]",mme="[object ArrayBuffer]",yme="[object DataView]",z3=R3?R3.prototype:void 0,cC=z3?z3.valueOf:void 0;function xme(e,t,r,n,i,a,o){switch(r){case yme:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mme:return!(e.byteLength!=t.byteLength||!a(new B3(e),new B3(t)));case lme:case ume:case hme:return rme(+e,+t);case cme:return e.name==t.name&&e.message==t.message;case dme:case pme:return e==t+"";case fme:var s=ime;case vme:var l=n&ome;if(s||(s=ame),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=sme,o.set(e,t);var c=nme(s(e),s(t),n,i,a,o);return o.delete(e),c;case gme:if(cC)return cC.call(e)==cC.call(t)}return!1}var _me=xme;function bme(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var kY=bme,wme=kY,Sme=di;function Tme(e,t,r){var n=t(e);return Sme(e)?n:wme(n,r(e))}var Ame=Tme;function Cme(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var Mme=Cme;function Pme(){return[]}var Lme=Pme,kme=Mme,Ime=Lme,Ome=Object.prototype,Eme=Ome.propertyIsEnumerable,$3=Object.getOwnPropertySymbols,Dme=$3?function(e){return e==null?[]:(e=Object(e),kme($3(e),function(t){return Eme.call(e,t)}))}:Ime,Nme=Dme;function jme(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Rme=jme,Bme=Ys,zme=Xs,$me="[object Arguments]";function Fme(e){return zme(e)&&Bme(e)==$me}var Vme=Fme,F3=Vme,Gme=Xs,IY=Object.prototype,Wme=IY.hasOwnProperty,Hme=IY.propertyIsEnumerable,Ume=F3(function(){return arguments}())?F3:function(e){return Gme(e)&&Wme.call(e,"callee")&&!Hme.call(e,"callee")},gD=Ume,t1={exports:{}};function Zme(){return!1}var Yme=Zme;t1.exports;(function(e,t){var r=Ho,n=Yme,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u})(t1,t1.exports);var OY=t1.exports,Xme=9007199254740991,qme=/^(?:0|[1-9]\d*)$/;function Kme(e,t){var r=typeof e;return t=t??Xme,!!t&&(r=="number"||r!="symbol"&&qme.test(e))&&e>-1&&e%1==0&&e<t}var mD=Kme,Qme=9007199254740991;function Jme(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Qme}var yD=Jme,eye=Ys,tye=yD,rye=Xs,nye="[object Arguments]",iye="[object Array]",aye="[object Boolean]",oye="[object Date]",sye="[object Error]",lye="[object Function]",uye="[object Map]",cye="[object Number]",fye="[object Object]",hye="[object RegExp]",dye="[object Set]",vye="[object String]",pye="[object WeakMap]",gye="[object ArrayBuffer]",mye="[object DataView]",yye="[object Float32Array]",xye="[object Float64Array]",_ye="[object Int8Array]",bye="[object Int16Array]",wye="[object Int32Array]",Sye="[object Uint8Array]",Tye="[object Uint8ClampedArray]",Aye="[object Uint16Array]",Cye="[object Uint32Array]",Kt={};Kt[yye]=Kt[xye]=Kt[_ye]=Kt[bye]=Kt[wye]=Kt[Sye]=Kt[Tye]=Kt[Aye]=Kt[Cye]=!0;Kt[nye]=Kt[iye]=Kt[gye]=Kt[aye]=Kt[mye]=Kt[oye]=Kt[sye]=Kt[lye]=Kt[uye]=Kt[cye]=Kt[fye]=Kt[hye]=Kt[dye]=Kt[vye]=Kt[pye]=!1;function Mye(e){return rye(e)&&tye(e.length)&&!!Kt[eye(e)]}var Pye=Mye;function Lye(e){return function(t){return e(t)}}var EY=Lye,r1={exports:{}};r1.exports;(function(e,t){var r=$Z,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(r1,r1.exports);var kye=r1.exports,Iye=Pye,Oye=EY,V3=kye,G3=V3&&V3.isTypedArray,Eye=G3?Oye(G3):Iye,DY=Eye,Dye=Rme,Nye=gD,jye=di,Rye=OY,Bye=mD,zye=DY,$ye=Object.prototype,Fye=$ye.hasOwnProperty;function Vye(e,t){var r=jye(e),n=!r&&Nye(e),i=!r&&!n&&Rye(e),a=!r&&!n&&!i&&zye(e),o=r||n||i||a,s=o?Dye(e.length,String):[],l=s.length;for(var u in e)(t||Fye.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Bye(u,l)))&&s.push(u);return s}var Gye=Vye,Wye=Object.prototype;function Hye(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Wye;return e===r}var Uye=Hye;function Zye(e,t){return function(r){return e(t(r))}}var NY=Zye,Yye=NY,Xye=Yye(Object.keys,Object),qye=Xye,Kye=Uye,Qye=qye,Jye=Object.prototype,e0e=Jye.hasOwnProperty;function t0e(e){if(!Kye(e))return Qye(e);var t=[];for(var r in Object(e))e0e.call(e,r)&&r!="constructor"&&t.push(r);return t}var r0e=t0e,n0e=JE,i0e=yD;function a0e(e){return e!=null&&i0e(e.length)&&!n0e(e)}var WS=a0e,o0e=Gye,s0e=r0e,l0e=WS;function u0e(e){return l0e(e)?o0e(e):s0e(e)}var xD=u0e,c0e=Ame,f0e=Nme,h0e=xD;function d0e(e){return c0e(e,h0e,f0e)}var v0e=d0e,W3=v0e,p0e=1,g0e=Object.prototype,m0e=g0e.hasOwnProperty;function y0e(e,t,r,n,i,a){var o=r&p0e,s=W3(e),l=s.length,u=W3(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:m0e.call(t,h)))return!1}var d=a.get(e),v=a.get(t);if(d&&v)return d==t&&v==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=o;++f<l;){h=s[f];var x=e[h],_=t[h];if(n)var b=o?n(_,x,h,t,e,a):n(x,_,h,e,t,a);if(!(b===void 0?x===_||i(x,_,r,n,a):b)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var S=e.constructor,T=t.constructor;S!=T&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof T=="function"&&T instanceof T)&&(g=!1)}return a.delete(e),a.delete(t),g}var x0e=y0e,_0e=mf,b0e=Ho,w0e=_0e(b0e,"DataView"),S0e=w0e,T0e=mf,A0e=Ho,C0e=T0e(A0e,"Promise"),M0e=C0e,P0e=mf,L0e=Ho,k0e=P0e(L0e,"Set"),jY=k0e,I0e=mf,O0e=Ho,E0e=I0e(O0e,"WeakMap"),D0e=E0e,_L=S0e,bL=tD,wL=M0e,SL=jY,TL=D0e,RY=Ys,wv=VZ,H3="[object Map]",N0e="[object Object]",U3="[object Promise]",Z3="[object Set]",Y3="[object WeakMap]",X3="[object DataView]",j0e=wv(_L),R0e=wv(bL),B0e=wv(wL),z0e=wv(SL),$0e=wv(TL),ic=RY;(_L&&ic(new _L(new ArrayBuffer(1)))!=X3||bL&&ic(new bL)!=H3||wL&&ic(wL.resolve())!=U3||SL&&ic(new SL)!=Z3||TL&&ic(new TL)!=Y3)&&(ic=function(e){var t=RY(e),r=t==N0e?e.constructor:void 0,n=r?wv(r):"";if(n)switch(n){case j0e:return X3;case R0e:return H3;case B0e:return U3;case z0e:return Z3;case $0e:return Y3}return t});var F0e=ic,fC=AY,V0e=LY,G0e=_me,W0e=x0e,q3=F0e,K3=di,Q3=OY,H0e=DY,U0e=1,J3="[object Arguments]",ez="[object Array]",sx="[object Object]",Z0e=Object.prototype,tz=Z0e.hasOwnProperty;function Y0e(e,t,r,n,i,a){var o=K3(e),s=K3(t),l=o?ez:q3(e),u=s?ez:q3(t);l=l==J3?sx:l,u=u==J3?sx:u;var c=l==sx,f=u==sx,h=l==u;if(h&&Q3(e)){if(!Q3(t))return!1;o=!0,c=!1}if(h&&!c)return a||(a=new fC),o||H0e(e)?V0e(e,t,r,n,i,a):G0e(e,t,l,r,n,i,a);if(!(r&U0e)){var d=c&&tz.call(e,"__wrapped__"),v=f&&tz.call(t,"__wrapped__");if(d||v){var g=d?e.value():e,m=v?t.value():t;return a||(a=new fC),i(g,m,r,n,a)}}return h?(a||(a=new fC),W0e(e,t,r,n,i,a)):!1}var X0e=Y0e,q0e=X0e,rz=Xs;function BY(e,t,r,n,i){return e===t?!0:e==null||t==null||!rz(e)&&!rz(t)?e!==e&&t!==t:q0e(e,t,r,n,BY,i)}var _D=BY,K0e=AY,Q0e=_D,J0e=1,exe=2;function txe(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new K0e;if(n)var h=n(u,c,l,e,t,f);if(!(h===void 0?Q0e(c,u,J0e|exe,n,f):h))return!1}}return!0}var rxe=txe,nxe=hu;function ixe(e){return e===e&&!nxe(e)}var zY=ixe,axe=zY,oxe=xD;function sxe(e){for(var t=oxe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,axe(i)]}return t}var lxe=sxe;function uxe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var $Y=uxe,cxe=rxe,fxe=lxe,hxe=$Y;function dxe(e){var t=fxe(e);return t.length==1&&t[0][2]?hxe(t[0][0],t[0][1]):function(r){return r===e||cxe(r,e,t)}}var vxe=dxe;function pxe(e,t){return e!=null&&t in Object(e)}var gxe=pxe,mxe=ZZ,yxe=gD,xxe=di,_xe=mD,bxe=yD,wxe=LS;function Sxe(e,t,r){t=mxe(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=wxe(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&bxe(i)&&_xe(o,i)&&(xxe(e)||yxe(e)))}var Txe=Sxe,Axe=gxe,Cxe=Txe;function Mxe(e,t){return e!=null&&Cxe(e,t,Axe)}var Pxe=Mxe,Lxe=_D,kxe=YZ,Ixe=Pxe,Oxe=QE,Exe=zY,Dxe=$Y,Nxe=LS,jxe=1,Rxe=2;function Bxe(e,t){return Oxe(e)&&Exe(t)?Dxe(Nxe(e),t):function(r){var n=kxe(r,e);return n===void 0&&n===t?Ixe(r,e):Lxe(t,n,jxe|Rxe)}}var zxe=Bxe;function $xe(e){return e}var Sv=$xe;function Fxe(e){return function(t){return t==null?void 0:t[e]}}var Vxe=Fxe,Gxe=aD;function Wxe(e){return function(t){return Gxe(t,e)}}var Hxe=Wxe,Uxe=Vxe,Zxe=Hxe,Yxe=QE,Xxe=LS;function qxe(e){return Yxe(e)?Uxe(Xxe(e)):Zxe(e)}var Kxe=qxe,Qxe=vxe,Jxe=zxe,e_e=Sv,t_e=di,r_e=Kxe;function n_e(e){return typeof e=="function"?e:e==null?e_e:typeof e=="object"?t_e(e)?Jxe(e[0],e[1]):Qxe(e):r_e(e)}var Tv=n_e;function i_e(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var a_e=i_e;function o_e(e){return e!==e}var s_e=o_e;function l_e(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}var u_e=l_e,c_e=a_e,f_e=s_e,h_e=u_e;function d_e(e,t,r){return t===t?h_e(e,t,r):c_e(e,f_e,r)}var v_e=d_e,p_e=v_e;function g_e(e,t){var r=e==null?0:e.length;return!!r&&p_e(e,t,0)>-1}var m_e=g_e;function y_e(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}var x_e=y_e;function __e(){}var b_e=__e,hC=jY,w_e=b_e,S_e=pD,T_e=1/0,A_e=hC&&1/S_e(new hC([,-0]))[1]==T_e?function(e){return new hC(e)}:w_e,C_e=A_e,M_e=CY,P_e=m_e,L_e=x_e,k_e=PY,I_e=C_e,O_e=pD,E_e=200;function D_e(e,t,r){var n=-1,i=P_e,a=e.length,o=!0,s=[],l=s;if(r)o=!1,i=L_e;else if(a>=E_e){var u=t?null:I_e(e);if(u)return O_e(u);o=!1,i=k_e,l=new M_e}else l=t?[]:s;e:for(;++n<a;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),s.push(c)}else i(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var N_e=D_e,j_e=Tv,R_e=N_e;function B_e(e,t){return e&&e.length?R_e(e,j_e(t)):[]}var z_e=B_e;const nz=Ft(z_e);function FY(e,t,r){return t===!0?nz(e,r):ft(t)?nz(e,t):e}function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}var $_e=["ref"];function iz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iz(Object(r),!0).forEach(function(n){HS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function az(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,GY(n.key),n)}}function V_e(e,t,r){return t&&az(e.prototype,t),r&&az(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function G_e(e,t,r){return t=n1(t),W_e(e,VY()?Reflect.construct(t,r||[],n1(e).constructor):t.apply(e,r))}function W_e(e,t){if(t&&(Td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H_e(e)}function H_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VY=function(){return!!e})()}function n1(e){return n1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},n1(e)}function U_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AL(e,t)}function AL(e,t){return AL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},AL(e,t)}function HS(e,t,r){return t=GY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GY(e){var t=Z_e(e,"string");return Td(t)=="symbol"?t:t+""}function Z_e(e,t){if(Td(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Td(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Y_e(e,t){if(e==null)return{};var r=X_e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X_e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function q_e(e){return e.value}function K_e(e,t){if(Q.isValidElement(e))return Q.cloneElement(e,t);if(typeof e=="function")return Q.createElement(e,t);t.ref;var r=Y_e(t,$_e);return Q.createElement(vD,r)}var oz=1,rd=function(e){function t(){var r;F_e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=G_e(this,t,[].concat(i)),HS(r,"lastBoundingBox",{width:-1,height:-1}),r}return U_e(t,e),V_e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>oz||Math.abs(i.height-this.lastBoundingBox.height)>oz)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Jo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var d=this.getBBoxSnapshot();f={left:((u||0)-d.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((c||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Jo(Jo({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=Jo(Jo({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Q.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(d){n.wrapperNode=d}},K_e(a,Jo(Jo({},this.props),{},{payload:FY(c,u,q_e)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Jo(Jo({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&we(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(H.PureComponent);HS(rd,"displayName","Legend");HS(rd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var sz=Zy,Q_e=gD,J_e=di,lz=sz?sz.isConcatSpreadable:void 0;function ebe(e){return J_e(e)||Q_e(e)||!!(lz&&e&&e[lz])}var tbe=ebe,rbe=kY,nbe=tbe;function WY(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=nbe),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?WY(s,t-1,r,n,i):rbe(i,s):n||(i[i.length]=s)}return i}var HY=WY;function ibe(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var abe=ibe,obe=abe,sbe=obe(),lbe=sbe,ube=lbe,cbe=xD;function fbe(e,t){return e&&ube(e,t,cbe)}var UY=fbe,hbe=WS;function dbe(e,t){return function(r,n){if(r==null)return r;if(!hbe(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var vbe=dbe,pbe=UY,gbe=vbe,mbe=gbe(pbe),bD=mbe,ybe=bD,xbe=WS;function _be(e,t){var r=-1,n=xbe(e)?Array(e.length):[];return ybe(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var ZY=_be;function bbe(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var wbe=bbe,uz=vv;function Sbe(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=uz(e),o=t!==void 0,s=t===null,l=t===t,u=uz(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!l)return-1}return 0}var Tbe=Sbe,Abe=Tbe;function Cbe(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,s=r.length;++n<o;){var l=Abe(i[n],a[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Mbe=Cbe,dC=iD,Pbe=aD,Lbe=Tv,kbe=ZY,Ibe=wbe,Obe=EY,Ebe=Mbe,Dbe=Sv,Nbe=di;function jbe(e,t,r){t.length?t=dC(t,function(a){return Nbe(a)?function(o){return Pbe(o,a.length===1?a[0]:a)}:a}):t=[Dbe];var n=-1;t=dC(t,Obe(Lbe));var i=kbe(e,function(a,o,s){var l=dC(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Ibe(i,function(a,o){return Ebe(a,o,r)})}var Rbe=jbe;function Bbe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var zbe=Bbe,$be=zbe,cz=Math.max;function Fbe(e,t,r){return t=cz(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=cz(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),$be(e,this,s)}}var Vbe=Fbe;function Gbe(e){return function(){return e}}var Wbe=Gbe,Hbe=mf,Ube=function(){try{var e=Hbe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),YY=Ube,Zbe=Wbe,fz=YY,Ybe=Sv,Xbe=fz?function(e,t){return fz(e,"toString",{configurable:!0,enumerable:!1,value:Zbe(t),writable:!0})}:Ybe,qbe=Xbe,Kbe=800,Qbe=16,Jbe=Date.now;function e1e(e){var t=0,r=0;return function(){var n=Jbe(),i=Qbe-(n-r);if(r=n,i>0){if(++t>=Kbe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var t1e=e1e,r1e=qbe,n1e=t1e,i1e=n1e(r1e),a1e=i1e,o1e=Sv,s1e=Vbe,l1e=a1e;function u1e(e,t){return l1e(s1e(e,t,o1e),e+"")}var c1e=u1e,f1e=eD,h1e=WS,d1e=mD,v1e=hu;function p1e(e,t,r){if(!v1e(r))return!1;var n=typeof t;return(n=="number"?h1e(r)&&d1e(t,r.length):n=="string"&&t in r)?f1e(r[t],e):!1}var US=p1e,g1e=HY,m1e=Rbe,y1e=c1e,hz=US,x1e=y1e(function(e,t){if(e==null)return[];var r=t.length;return r>1&&hz(e,t[0],t[1])?t=[]:r>2&&hz(t[0],t[1],t[2])&&(t=[t[0]]),m1e(e,g1e(t,1),[])}),_1e=x1e;const wD=Ft(_1e);function Mm(e){"@babel/helpers - typeof";return Mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mm(e)}function CL(){return CL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},CL.apply(this,arguments)}function b1e(e,t){return A1e(e)||T1e(e,t)||S1e(e,t)||w1e()}function w1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S1e(e,t){if(e){if(typeof e=="string")return dz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dz(e,t)}}function dz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T1e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function A1e(e){if(Array.isArray(e))return e}function vz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vz(Object(r),!0).forEach(function(n){C1e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C1e(e,t,r){return t=M1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M1e(e){var t=P1e(e,"string");return Mm(t)=="symbol"?t:t+""}function P1e(e,t){if(Mm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L1e(e){return Array.isArray(e)&&Vr(e[0])&&Vr(e[1])?e.join(" ~ "):e}var k1e=function(t){var r=t.separator,n=r===void 0?" : ":r,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,h=t.itemSorter,d=t.wrapperClassName,v=t.labelClassName,g=t.label,m=t.labelFormatter,x=t.accessibilityLayer,_=x===void 0?!1:x,b=function(){if(c&&c.length){var D={padding:0,margin:0},N=(h?wD(c,h):c).map(function(j,z){if(j.type==="none")return null;var $=vC({display:"block",paddingTop:4,paddingBottom:4,color:j.color||"#000"},s),U=j.formatter||f||L1e,F=j.value,V=j.name,W=F,Y=V;if(U&&W!=null&&Y!=null){var Z=U(F,V,j,z,c);if(Array.isArray(Z)){var J=b1e(Z,2);W=J[0],Y=J[1]}else W=Z}return Q.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:$},Vr(Y)?Q.createElement("span",{className:"recharts-tooltip-item-name"},Y):null,Vr(Y)?Q.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,Q.createElement("span",{className:"recharts-tooltip-item-value"},W),Q.createElement("span",{className:"recharts-tooltip-item-unit"},j.unit||""))});return Q.createElement("ul",{className:"recharts-tooltip-item-list",style:D},N)}return null},S=vC({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),T=vC({margin:0},u),A=!dt(g),M=A?g:"",P=xt("recharts-default-tooltip",d),I=xt("recharts-tooltip-label",v);A&&m&&c!==void 0&&c!==null&&(M=m(g,c));var k=_?{role:"status","aria-live":"assertive"}:{};return Q.createElement("div",CL({className:P,style:S},k),Q.createElement("p",{className:I,style:T},Q.isValidElement(M)?M:"".concat(M)),b())};function Pm(e){"@babel/helpers - typeof";return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(e)}function lx(e,t,r){return t=I1e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I1e(e){var t=O1e(e,"string");return Pm(t)=="symbol"?t:t+""}function O1e(e,t){if(Pm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xp="recharts-tooltip-wrapper",E1e={visibility:"hidden"};function D1e(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return xt(xp,lx(lx(lx(lx({},"".concat(xp,"-right"),we(r)&&t&&we(t.x)&&r>=t.x),"".concat(xp,"-left"),we(r)&&t&&we(t.x)&&r<t.x),"".concat(xp,"-bottom"),we(n)&&t&&we(t.y)&&n>=t.y),"".concat(xp,"-top"),we(n)&&t&&we(t.y)&&n<t.y))}function pz(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&we(a[n]))return a[n];var c=r[n]-s-i,f=r[n]+i;if(t[n])return o[n]?c:f;if(o[n]){var h=c,d=l[n];return h<d?Math.max(f,l[n]):Math.max(c,l[n])}var v=f+s,g=l[n]+u;return v>g?Math.max(c,l[n]):Math.max(f,l[n])}function N1e(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function j1e(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=pz({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=pz({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=N1e({translateX:c,translateY:f,useTranslate3d:s})):u=E1e,{cssProperties:u,cssClasses:D1e({translateX:c,translateY:f,coordinate:r})}}function Ad(e){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function gz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gz(Object(r),!0).forEach(function(n){PL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B1e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qY(n.key),n)}}function z1e(e,t,r){return t&&B1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $1e(e,t,r){return t=i1(t),F1e(e,XY()?Reflect.construct(t,r||[],i1(e).constructor):t.apply(e,r))}function F1e(e,t){if(t&&(Ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return V1e(e)}function V1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XY=function(){return!!e})()}function i1(e){return i1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},i1(e)}function G1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ML(e,t)}function ML(e,t){return ML=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ML(e,t)}function PL(e,t,r){return t=qY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qY(e){var t=W1e(e,"string");return Ad(t)=="symbol"?t:t+""}function W1e(e,t){if(Ad(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ad(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yz=1,H1e=function(e){function t(){var r;R1e(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=$1e(this,t,[].concat(i)),PL(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),PL(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return G1e(t,e),z1e(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>yz||Math.abs(n.height-this.state.lastBoundingBox.height)>yz)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,d=i.offset,v=i.position,g=i.reverseDirection,m=i.useTranslate3d,x=i.viewBox,_=i.wrapperStyle,b=j1e({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:d,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:x}),S=b.cssClasses,T=b.cssProperties,A=mz(mz({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},_);return Q.createElement("div",{tabIndex:-1,className:S,style:A,ref:function(P){n.wrapperNode=P}},u)}}])}(H.PureComponent),U1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},yf={isSsr:U1e()};function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function xz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xz(Object(r),!0).forEach(function(n){SD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y1e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,QY(n.key),n)}}function X1e(e,t,r){return t&&Y1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function q1e(e,t,r){return t=a1(t),K1e(e,KY()?Reflect.construct(t,r||[],a1(e).constructor):t.apply(e,r))}function K1e(e,t){if(t&&(Cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q1e(e)}function Q1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KY=function(){return!!e})()}function a1(e){return a1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},a1(e)}function J1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LL(e,t)}function LL(e,t){return LL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},LL(e,t)}function SD(e,t,r){return t=QY(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QY(e){var t=ewe(e,"string");return Cd(t)=="symbol"?t:t+""}function ewe(e,t){if(Cd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function twe(e){return e.dataKey}function rwe(e,t){return Q.isValidElement(e)?Q.cloneElement(e,t):typeof e=="function"?Q.createElement(e,t):Q.createElement(k1e,t)}var os=function(e){function t(){return Z1e(this,t),q1e(this,t,arguments)}return J1e(t,e),X1e(t,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.content,c=i.coordinate,f=i.filterNull,h=i.isAnimationActive,d=i.offset,v=i.payload,g=i.payloadUniqBy,m=i.position,x=i.reverseDirection,_=i.useTranslate3d,b=i.viewBox,S=i.wrapperStyle,T=v??[];f&&T.length&&(T=FY(v.filter(function(M){return M.value!=null&&(M.hide!==!0||n.props.includeHidden)}),g,twe));var A=T.length>0;return Q.createElement(H1e,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:c,hasPayload:A,offset:d,position:m,reverseDirection:x,useTranslate3d:_,viewBox:b,wrapperStyle:S},rwe(u,_z(_z({},this.props),{},{payload:T})))}}])}(H.PureComponent);SD(os,"displayName","Tooltip");SD(os,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!yf.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var nwe=Ho,iwe=function(){return nwe.Date.now()},awe=iwe,owe=/\s/;function swe(e){for(var t=e.length;t--&&owe.test(e.charAt(t)););return t}var lwe=swe,uwe=lwe,cwe=/^\s+/;function fwe(e){return e&&e.slice(0,uwe(e)+1).replace(cwe,"")}var hwe=fwe,dwe=hwe,bz=hu,vwe=vv,wz=NaN,pwe=/^[-+]0x[0-9a-f]+$/i,gwe=/^0b[01]+$/i,mwe=/^0o[0-7]+$/i,ywe=parseInt;function xwe(e){if(typeof e=="number")return e;if(vwe(e))return wz;if(bz(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bz(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dwe(e);var r=gwe.test(e);return r||mwe.test(e)?ywe(e.slice(2),r?2:8):pwe.test(e)?wz:+e}var JY=xwe,_we=hu,pC=awe,Sz=JY,bwe="Expected a function",wwe=Math.max,Swe=Math.min;function Twe(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(bwe);t=Sz(t)||0,_we(r)&&(c=!!r.leading,f="maxWait"in r,a=f?wwe(Sz(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function d(A){var M=n,P=i;return n=i=void 0,u=A,o=e.apply(P,M),o}function v(A){return u=A,s=setTimeout(x,t),c?d(A):o}function g(A){var M=A-l,P=A-u,I=t-M;return f?Swe(I,a-P):I}function m(A){var M=A-l,P=A-u;return l===void 0||M>=t||M<0||f&&P>=a}function x(){var A=pC();if(m(A))return _(A);s=setTimeout(x,g(A))}function _(A){return s=void 0,h&&n?d(A):(n=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:_(pC())}function T(){var A=pC(),M=m(A);if(n=arguments,i=this,l=A,M){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(x,t),d(l)}return s===void 0&&(s=setTimeout(x,t)),o}return T.cancel=b,T.flush=S,T}var Awe=Twe,Cwe=Awe,Mwe=hu,Pwe="Expected a function";function Lwe(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Pwe);return Mwe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Cwe(e,t,{leading:n,maxWait:t,trailing:i})}var kwe=Lwe;const eX=Ft(kwe);function Lm(e){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lm(e)}function Tz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tz(Object(r),!0).forEach(function(n){Iwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iwe(e,t,r){return t=Owe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Owe(e){var t=Ewe(e,"string");return Lm(t)=="symbol"?t:t+""}function Ewe(e,t){if(Lm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Lm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dwe(e,t){return Bwe(e)||Rwe(e,t)||jwe(e,t)||Nwe()}function Nwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jwe(e,t){if(e){if(typeof e=="string")return Az(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Az(e,t)}}function Az(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Rwe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Bwe(e){if(Array.isArray(e))return e}var tX=H.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=e.width,o=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,d=e.children,v=e.debounce,g=v===void 0?0:v,m=e.id,x=e.className,_=e.onResize,b=e.style,S=b===void 0?{}:b,T=H.useRef(null),A=H.useRef();A.current=_,H.useImperativeHandle(t,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var M=H.useState({containerWidth:i.width,containerHeight:i.height}),P=Dwe(M,2),I=P[0],k=P[1],O=H.useCallback(function(N,j){k(function(z){var $=Math.round(N),U=Math.round(j);return z.containerWidth===$&&z.containerHeight===U?z:{containerWidth:$,containerHeight:U}})},[]);H.useEffect(function(){var N=function(V){var W,Y=V[0].contentRect,Z=Y.width,J=Y.height;O(Z,J),(W=A.current)===null||W===void 0||W.call(A,Z,J)};g>0&&(N=eX(N,g,{trailing:!0,leading:!1}));var j=new ResizeObserver(N),z=T.current.getBoundingClientRect(),$=z.width,U=z.height;return O($,U),j.observe(T.current),function(){j.disconnect()}},[O,g]);var D=H.useMemo(function(){var N=I.containerWidth,j=I.containerHeight;if(N<0||j<0)return null;Ec(xc(o)||xc(l),`The width(%s) and height(%s) are both fixed numbers,
|
||
maybe you don't need to use a ResponsiveContainer.`,o,l),Ec(!r||r>0,"The aspect(%s) must be greater than zero.",r);var z=xc(o)?N:o,$=xc(l)?j:l;r&&r>0&&(z?$=z/r:$&&(z=$*r),h&&$>h&&($=h)),Ec(z>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
||
please check the style of container, or the props width(%s) and height(%s),
|
||
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
||
height and width.`,z,$,o,l,c,f,r);var U=!Array.isArray(d)&&bs(d.type).endsWith("Chart");return Q.Children.map(d,function(F){return Q.isValidElement(F)?H.cloneElement(F,ux({width:z,height:$},U?{style:ux({height:"100%",width:"100%",maxHeight:$,maxWidth:z},F.props.style)}:{})):F})},[r,d,l,h,f,c,I,o]);return Q.createElement("div",{id:m?"".concat(m):void 0,className:xt("recharts-responsive-container",x),style:ux(ux({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:h}),ref:T},D)}),rX=function(t){return null};rX.displayName="Cell";function km(e){"@babel/helpers - typeof";return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(e)}function Cz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cz(Object(r),!0).forEach(function(n){zwe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cz(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zwe(e,t,r){return t=$we(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $we(e){var t=Fwe(e,"string");return km(t)=="symbol"?t:t+""}function Fwe(e,t){if(km(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(km(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gf={widthCache:{},cacheCount:0},Vwe=2e3,Gwe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Mz="recharts_measurement_span";function Wwe(e){var t=kL({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Dg=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||yf.isSsr)return{width:0,height:0};var n=Wwe(r),i=JSON.stringify({text:t,copyStyle:n});if(Gf.widthCache[i])return Gf.widthCache[i];try{var a=document.getElementById(Mz);a||(a=document.createElement("span"),a.setAttribute("id",Mz),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=kL(kL({},Gwe),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return Gf.widthCache[i]=l,++Gf.cacheCount>Vwe&&(Gf.cacheCount=0,Gf.widthCache={}),l}catch{return{width:0,height:0}}},Hwe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(e)}function o1(e,t){return Xwe(e)||Ywe(e,t)||Zwe(e,t)||Uwe()}function Uwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zwe(e,t){if(e){if(typeof e=="string")return Pz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pz(e,t)}}function Pz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ywe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Xwe(e){if(Array.isArray(e))return e}function qwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lz(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qwe(n.key),n)}}function Kwe(e,t,r){return t&&Lz(e.prototype,t),r&&Lz(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qwe(e){var t=Jwe(e,"string");return Im(t)=="symbol"?t:t+""}function Jwe(e,t){if(Im(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Im(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kz=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Iz=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,eSe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,tSe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,nX={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},rSe=Object.keys(nX),Rh="NaN";function nSe(e,t){return e*nX[t]}var cx=function(){function e(t,r){qwe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!eSe.test(r)&&(this.num=NaN,this.unit=""),rSe.includes(r)&&(this.num=nSe(t,r),this.unit="px")}return Kwe(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=tSe.exec(r))!==null&&n!==void 0?n:[],a=o1(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])}();function iX(e){if(e.includes(Rh))return Rh;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=kz.exec(t))!==null&&r!==void 0?r:[],i=o1(n,4),a=i[1],o=i[2],s=i[3],l=cx.parse(a??""),u=cx.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return Rh;t=t.replace(kz,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=Iz.exec(t))!==null&&f!==void 0?f:[],d=o1(h,4),v=d[1],g=d[2],m=d[3],x=cx.parse(v??""),_=cx.parse(m??""),b=g==="+"?x.add(_):x.subtract(_);if(b.isNaN())return Rh;t=t.replace(Iz,b.toString())}return t}var Oz=/\(([^()]*)\)/;function iSe(e){for(var t=e;t.includes("(");){var r=Oz.exec(t),n=o1(r,2),i=n[1];t=t.replace(Oz,iX(i))}return t}function aSe(e){var t=e.replace(/\s+/g,"");return t=iSe(t),t=iX(t),t}function oSe(e){try{return aSe(e)}catch{return Rh}}function gC(e){var t=oSe(e.slice(5,-1));return t===Rh?"":t}var sSe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],lSe=["dx","dy","angle","className","breakAll"];function IL(){return IL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},IL.apply(this,arguments)}function Ez(e,t){if(e==null)return{};var r=uSe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uSe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Dz(e,t){return dSe(e)||hSe(e,t)||fSe(e,t)||cSe()}function cSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fSe(e,t){if(e){if(typeof e=="string")return Nz(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nz(e,t)}}function Nz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function dSe(e){if(Array.isArray(e))return e}var aX=/[ \f\n\r\t\v\u2028\u2029]+/,oX=function(t){var r=t.children,n=t.breakAll,i=t.style;try{var a=[];dt(r)||(n?a=r.toString().split(""):a=r.toString().split(aX));var o=a.map(function(l){return{word:l,width:Dg(l,i).width}}),s=n?0:Dg(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},vSe=function(t,r,n,i,a){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=we(o),f=s,h=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return z.reduce(function($,U){var F=U.word,V=U.width,W=$[$.length-1];if(W&&(i==null||a||W.width+V+n<Number(i)))W.words.push(F),W.width+=V+n;else{var Y={words:[F],width:V};$.push(Y)}return $},[])},d=h(r),v=function(z){return z.reduce(function($,U){return $.width>U.width?$:U})};if(!c)return d;for(var g="…",m=function(z){var $=f.slice(0,z),U=oX({breakAll:u,style:l,children:$+g}).wordsWithComputedWidth,F=h(U),V=F.length>o||v(F).width>Number(i);return[V,F]},x=0,_=f.length-1,b=0,S;x<=_&&b<=f.length-1;){var T=Math.floor((x+_)/2),A=T-1,M=m(A),P=Dz(M,2),I=P[0],k=P[1],O=m(T),D=Dz(O,1),N=D[0];if(!I&&!N&&(x=T+1),I&&N&&(_=T-1),!I&&N){S=k;break}b++}return S||d},jz=function(t){var r=dt(t)?[]:t.toString().split(aX);return[{words:r}]},pSe=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!yf.isSsr){var l,u,c=oX({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;l=f,u=h}else return jz(i);return vSe({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return jz(i)},Rz="#808080",s1=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,d=h===void 0?"start":h,v=t.verticalAnchor,g=v===void 0?"end":v,m=t.fill,x=m===void 0?Rz:m,_=Ez(t,sSe),b=H.useMemo(function(){return pSe({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:f,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,f,_.style,_.width]),S=_.dx,T=_.dy,A=_.angle,M=_.className,P=_.breakAll,I=Ez(_,lSe);if(!Vr(n)||!Vr(a))return null;var k=n+(we(S)?S:0),O=a+(we(T)?T:0),D;switch(g){case"start":D=gC("calc(".concat(u,")"));break;case"middle":D=gC("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:D=gC("calc(".concat(b.length-1," * -").concat(s,")"));break}var N=[];if(f){var j=b[0].width,z=_.width;N.push("scale(".concat((we(z)?z/j:1)/j,")"))}return A&&N.push("rotate(".concat(A,", ").concat(k,", ").concat(O,")")),N.length&&(I.transform=N.join(" ")),Q.createElement("text",IL({},ct(I,!0),{x:k,y:O,className:xt("recharts-text",M),textAnchor:d,fill:x.includes("url")?Rz:x}),b.map(function($,U){var F=$.words.join(P?"":" ");return Q.createElement("tspan",{x:k,dy:U===0?D:s,key:"".concat(F,"-").concat(U)},F)}))};function Wl(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gSe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function TD(e){let t,r,n;e.length!==2?(t=Wl,r=(s,l)=>Wl(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wl||e===gSe?e:mSe,r=e,n=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function mSe(){return 0}function sX(e){return e===null?NaN:+e}function*ySe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const xSe=TD(Wl),Yy=xSe.right;TD(sX).center;class Bz extends Map{constructor(t,r=wSe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(zz(this,t))}has(t){return super.has(zz(this,t))}set(t,r){return super.set(_Se(this,t),r)}delete(t){return super.delete(bSe(this,t))}}function zz({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function _Se({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function bSe({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function wSe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SSe(e=Wl){if(e===Wl)return lX;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function lX(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const TSe=Math.sqrt(50),ASe=Math.sqrt(10),CSe=Math.sqrt(2);function l1(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=TSe?10:a>=ASe?5:a>=CSe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?l1(e,t,r*2):[s,l,u]}function OL(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?l1(t,e,r):l1(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(a-u)/-o;else for(let u=0;u<s;++u)l[u]=(a-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(i+u)/-o;else for(let u=0;u<s;++u)l[u]=(i+u)*o;return l}function EL(e,t,r){return t=+t,e=+e,r=+r,l1(e,t,r)[2]}function DL(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?EL(t,e,r):EL(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function $z(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Fz(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function uX(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?lX:SSe(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(r,Math.floor(t-u*f/l+h)),v=Math.min(n,Math.floor(t+(l-u)*f/l+h));uX(e,t,d,v,i)}const a=e[t];let o=r,s=n;for(_p(e,r,t),i(e[n],a)>0&&_p(e,r,n);o<s;){for(_p(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?_p(e,r,s):(++s,_p(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function _p(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function MSe(e,t,r){if(e=Float64Array.from(ySe(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Fz(e);if(t>=1)return $z(e);var n,i=(n-1)*t,a=Math.floor(i),o=$z(uX(e,a).subarray(0,a+1)),s=Fz(e.subarray(a+1));return o+(s-o)*(i-a)}}function PSe(e,t,r=sX){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function LSe(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function ma(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function qs(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const NL=Symbol("implicit");function AD(){var e=new Bz,t=[],r=[],n=NL;function i(a){let o=e.get(a);if(o===void 0){if(n!==NL)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Bz;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return AD(t,r).unknown(n)},ma.apply(i,arguments),i}function Om(){var e=AD().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().length,d=i<n,v=d?i:n,g=d?n:i;a=(g-v)/Math.max(1,h-l+u*2),s&&(a=Math.floor(a)),v+=(g-v-a*(h-l))*c,o=a*(1-l),s&&(v=Math.round(v),o=Math.round(o));var m=LSe(h).map(function(x){return v+a*x});return r(d?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,i]=h,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(h){return[n,i]=h,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(h){return arguments.length?(s=!!h,f()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return Om(t(),[n,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},ma.apply(f(),arguments)}function cX(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return cX(t())},e}function Ng(){return cX(Om.apply(null,arguments).paddingInner(1))}function CD(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fX(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Xy(){}var Em=.7,u1=1/Em,nd="\\s*([+-]?\\d+)\\s*",Dm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kSe=/^#([0-9a-f]{3,8})$/,ISe=new RegExp(`^rgb\\(${nd},${nd},${nd}\\)$`),OSe=new RegExp(`^rgb\\(${Lo},${Lo},${Lo}\\)$`),ESe=new RegExp(`^rgba\\(${nd},${nd},${nd},${Dm}\\)$`),DSe=new RegExp(`^rgba\\(${Lo},${Lo},${Lo},${Dm}\\)$`),NSe=new RegExp(`^hsl\\(${Dm},${Lo},${Lo}\\)$`),jSe=new RegExp(`^hsla\\(${Dm},${Lo},${Lo},${Dm}\\)$`),Vz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};CD(Xy,Nm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gz,formatHex:Gz,formatHex8:RSe,formatHsl:BSe,formatRgb:Wz,toString:Wz});function Gz(){return this.rgb().formatHex()}function RSe(){return this.rgb().formatHex8()}function BSe(){return hX(this).formatHsl()}function Wz(){return this.rgb().formatRgb()}function Nm(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kSe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Hz(t):r===3?new si(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ISe.exec(e))?new si(t[1],t[2],t[3],1):(t=OSe.exec(e))?new si(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ESe.exec(e))?fx(t[1],t[2],t[3],t[4]):(t=DSe.exec(e))?fx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=NSe.exec(e))?Yz(t[1],t[2]/100,t[3]/100,1):(t=jSe.exec(e))?Yz(t[1],t[2]/100,t[3]/100,t[4]):Vz.hasOwnProperty(e)?Hz(Vz[e]):e==="transparent"?new si(NaN,NaN,NaN,0):null}function Hz(e){return new si(e>>16&255,e>>8&255,e&255,1)}function fx(e,t,r,n){return n<=0&&(e=t=r=NaN),new si(e,t,r,n)}function zSe(e){return e instanceof Xy||(e=Nm(e)),e?(e=e.rgb(),new si(e.r,e.g,e.b,e.opacity)):new si}function jL(e,t,r,n){return arguments.length===1?zSe(e):new si(e,t,r,n??1)}function si(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}CD(si,jL,fX(Xy,{brighter(e){return e=e==null?u1:Math.pow(u1,e),new si(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Em:Math.pow(Em,e),new si(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new si(Dc(this.r),Dc(this.g),Dc(this.b),c1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uz,formatHex:Uz,formatHex8:$Se,formatRgb:Zz,toString:Zz}));function Uz(){return`#${_c(this.r)}${_c(this.g)}${_c(this.b)}`}function $Se(){return`#${_c(this.r)}${_c(this.g)}${_c(this.b)}${_c((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zz(){const e=c1(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function c1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _c(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function Yz(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Na(e,t,r,n)}function hX(e){if(e instanceof Na)return new Na(e.h,e.s,e.l,e.opacity);if(e instanceof Xy||(e=Nm(e)),!e)return new Na;if(e instanceof Na)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Na(o,s,l,e.opacity)}function FSe(e,t,r,n){return arguments.length===1?hX(e):new Na(e,t,r,n??1)}function Na(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}CD(Na,FSe,fX(Xy,{brighter(e){return e=e==null?u1:Math.pow(u1,e),new Na(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Em:Math.pow(Em,e),new Na(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new si(mC(e>=240?e-240:e+120,i,n),mC(e,i,n),mC(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Na(Xz(this.h),hx(this.s),hx(this.l),c1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=c1(this.opacity);return`${e===1?"hsl(":"hsla("}${Xz(this.h)}, ${hx(this.s)*100}%, ${hx(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Xz(e){return e=(e||0)%360,e<0?e+360:e}function hx(e){return Math.max(0,Math.min(1,e||0))}function mC(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const MD=e=>()=>e;function VSe(e,t){return function(r){return e+r*t}}function GSe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function WSe(e){return(e=+e)==1?dX:function(t,r){return r-t?GSe(t,r,e):MD(isNaN(t)?r:t)}}function dX(e,t){var r=t-e;return r?VSe(e,r):MD(isNaN(e)?t:e)}const qz=function e(t){var r=WSe(t);function n(i,a){var o=r((i=jL(i)).r,(a=jL(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=dX(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function HSe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function USe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ZSe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Av(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function YSe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function f1(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function XSe(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Av(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var RL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yC=new RegExp(RL.source,"g");function qSe(e){return function(){return e}}function KSe(e){return function(t){return e(t)+""}}function QSe(e,t){var r=RL.lastIndex=yC.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=RL.exec(e))&&(i=yC.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:f1(n,i)})),r=yC.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?KSe(l[0].x):qSe(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function Av(e,t){var r=typeof t,n;return t==null||r==="boolean"?MD(t):(r==="number"?f1:r==="string"?(n=Nm(t))?(t=n,qz):QSe:t instanceof Nm?qz:t instanceof Date?YSe:USe(t)?HSe:Array.isArray(t)?ZSe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?XSe:f1)(e,t)}function PD(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function JSe(e,t){t===void 0&&(t=e,e=Av);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function eTe(e){return function(){return e}}function h1(e){return+e}var Kz=[0,1];function Gn(e){return e}function BL(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:eTe(isNaN(t)?NaN:.5)}function tTe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function rTe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=BL(i,n),a=r(o,a)):(n=BL(n,i),a=r(a,o)),function(s){return a(n(s))}}function nTe(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=BL(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=Yy(e,s,1,n)-1;return a[l](i[l](s))}}function qy(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ZS(){var e=Kz,t=Kz,r=Av,n,i,a,o=Gn,s,l,u;function c(){var h=Math.min(e.length,t.length);return o!==Gn&&(o=tTe(e[0],e[h-1])),s=h>2?nTe:rTe,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(n),f1)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,h1),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=PD,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Gn,c()):o!==Gn},f.interpolate=function(h){return arguments.length?(r=h,c()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,d){return n=h,i=d,c()}}function LD(){return ZS()(Gn,Gn)}function iTe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function d1(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Md(e){return e=d1(Math.abs(e)),e?e[1]:NaN}function aTe(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function oTe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var sTe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function jm(e){if(!(t=sTe.exec(e)))throw new Error("invalid format: "+e);var t;return new kD({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}jm.prototype=kD.prototype;function kD(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}kD.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function lTe(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var v1;function uTe(e,t){var r=d1(e,t);if(!r)return v1=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(v1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+d1(e,Math.max(0,t+a-1))[0]}function Qz(e,t){var r=d1(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Jz={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:iTe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Qz(e*100,t),r:Qz,s:uTe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function e4(e){return e}var t4=Array.prototype.map,r4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cTe(e){var t=e.grouping===void 0||e.thousands===void 0?e4:aTe(t4.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?e4:oTe(t4.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=jm(f);var d=f.fill,v=f.align,g=f.sign,m=f.symbol,x=f.zero,_=f.width,b=f.comma,S=f.precision,T=f.trim,A=f.type;A==="n"?(b=!0,A="g"):Jz[A]||(S===void 0&&(S=12),T=!0,A="g"),(x||d==="0"&&v==="=")&&(x=!0,d="0",v="=");var M=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),P=(m==="$"?n:/[%p]/.test(A)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),I=Jz[A],k=/[defgprs%]/.test(A);S=S===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function O(D){var N=M,j=P,z,$,U;if(A==="c")j=I(D)+j,D="";else{D=+D;var F=D<0||1/D<0;if(D=isNaN(D)?l:I(Math.abs(D),S),T&&(D=lTe(D)),F&&+D==0&&g!=="+"&&(F=!1),N=(F?g==="("?g:s:g==="-"||g==="("?"":g)+N,j=(A==="s"&&!isNaN(D)&&v1!==void 0?r4[8+v1/3]:"")+j+(F&&g==="("?")":""),k){for(z=-1,$=D.length;++z<$;)if(U=D.charCodeAt(z),48>U||U>57){j=(U===46?i+D.slice(z+1):D.slice(z))+j,D=D.slice(0,z);break}}}b&&!x&&(D=t(D,1/0));var V=N.length+D.length+j.length,W=V<_?new Array(_-V+1).join(d):"";switch(b&&x&&(D=t(W+D,W.length?_-j.length:1/0),W=""),v){case"<":D=N+D+j+W;break;case"=":D=N+W+D+j;break;case"^":D=W.slice(0,V=W.length>>1)+N+D+j+W.slice(V);break;default:D=W+N+D+j;break}return a(D)}return O.toString=function(){return f+""},O}function c(f,h){var d=Math.max(-8,Math.min(8,Math.floor(Md(h)/3)))*3,v=Math.pow(10,-d),g=u((f=jm(f),f.type="f",f),{suffix:r4[8+d/3]});return function(m){return g(v*m)}}return{format:u,formatPrefix:c}}var dx,ID,vX;fTe({thousands:",",grouping:[3],currency:["$",""]});function fTe(e){return dx=cTe(e),ID=dx.format,vX=dx.formatPrefix,dx}function hTe(e){return Math.max(0,-Md(Math.abs(e)))}function dTe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Md(t)/3)))*3-Md(Math.abs(e)))}function vTe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Md(t)-Md(e))+1}function pX(e,t,r,n){var i=DL(e,t,r),a;switch(n=jm(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=dTe(i,o))&&(n.precision=a),vX(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=vTe(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=hTe(i))&&(n.precision=a-(n.type==="%")*2);break}}return ID(n)}function du(e){var t=e.domain;return e.ticks=function(r){var n=t();return OL(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return pX(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);c-- >0;){if(u=EL(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function p1(){var e=LD();return e.copy=function(){return qy(e,p1())},ma.apply(e,arguments),du(e)}function gX(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,h1),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return gX(e).unknown(t)},e=arguments.length?Array.from(e,h1):[0,1],du(r)}function mX(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function n4(e){return Math.log(e)}function i4(e){return Math.exp(e)}function pTe(e){return-Math.log(-e)}function gTe(e){return-Math.exp(-e)}function mTe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function yTe(e){return e===10?mTe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function xTe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function a4(e){return(t,r)=>-e(-t,r)}function OD(e){const t=e(n4,i4),r=t.domain;let n=10,i,a;function o(){return i=xTe(n),a=yTe(n),r()[0]<0?(i=a4(i),a=a4(a),e(pTe,gTe)):e(n4,i4),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=i(u),d=i(c),v,g;const m=s==null?10:+s;let x=[];if(!(n%1)&&d-h<m){if(h=Math.floor(h),d=Math.ceil(d),u>0){for(;h<=d;++h)for(v=1;v<n;++v)if(g=h<0?v/a(-h):v*a(h),!(g<u)){if(g>c)break;x.push(g)}}else for(;h<=d;++h)for(v=n-1;v>=1;--v)if(g=h>0?v/a(-h):v*a(h),!(g<u)){if(g>c)break;x.push(g)}x.length*2<m&&(x=OL(u,c,m))}else x=OL(h,d,Math.min(d-h,m)).map(a);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=jm(l)).precision==null&&(l.trim=!0),l=ID(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(mX(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function yX(){const e=OD(ZS()).domain([1,10]);return e.copy=()=>qy(e,yX()).base(e.base()),ma.apply(e,arguments),e}function o4(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function s4(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ED(e){var t=1,r=e(o4(t),s4(t));return r.constant=function(n){return arguments.length?e(o4(t=+n),s4(t)):t},du(r)}function xX(){var e=ED(ZS());return e.copy=function(){return qy(e,xX()).constant(e.constant())},ma.apply(e,arguments)}function l4(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function _Te(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bTe(e){return e<0?-e*e:e*e}function DD(e){var t=e(Gn,Gn),r=1;function n(){return r===1?e(Gn,Gn):r===.5?e(_Te,bTe):e(l4(r),l4(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},du(t)}function ND(){var e=DD(ZS());return e.copy=function(){return qy(e,ND()).exponent(e.exponent())},ma.apply(e,arguments),e}function wTe(){return ND.apply(null,arguments).exponent(.5)}function u4(e){return Math.sign(e)*e*e}function STe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _X(){var e=LD(),t=[0,1],r=!1,n;function i(a){var o=STe(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(u4(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,h1)).map(u4)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return _X(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ma.apply(i,arguments),du(i)}function bX(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=PSe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Yy(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Wl),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return bX().domain(e).range(t).unknown(n)},ma.apply(a,arguments)}function wX(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[Yy(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return wX().domain([e,t]).range(i).unknown(a)},ma.apply(du(o),arguments)}function SX(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Yy(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return SX().domain(e).range(t).unknown(r)},ma.apply(i,arguments)}const xC=new Date,_C=new Date;function Yr(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<o);return l},i.filter=a=>Yr(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(xC.setTime(+a),_C.setTime(+o),e(xC),e(_C),Math.floor(r(xC,_C))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const g1=Yr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);g1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):g1);g1.range;const ds=1e3,na=ds*60,vs=na*60,js=vs*24,jD=js*7,c4=js*30,bC=js*365,bc=Yr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ds)},(e,t)=>(t-e)/ds,e=>e.getUTCSeconds());bc.range;const RD=Yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ds)},(e,t)=>{e.setTime(+e+t*na)},(e,t)=>(t-e)/na,e=>e.getMinutes());RD.range;const BD=Yr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*na)},(e,t)=>(t-e)/na,e=>e.getUTCMinutes());BD.range;const zD=Yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ds-e.getMinutes()*na)},(e,t)=>{e.setTime(+e+t*vs)},(e,t)=>(t-e)/vs,e=>e.getHours());zD.range;const $D=Yr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*vs)},(e,t)=>(t-e)/vs,e=>e.getUTCHours());$D.range;const Ky=Yr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/js,e=>e.getDate()-1);Ky.range;const YS=Yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/js,e=>e.getUTCDate()-1);YS.range;const TX=Yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/js,e=>Math.floor(e/js));TX.range;function xf(e){return Yr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*na)/jD)}const XS=xf(0),m1=xf(1),TTe=xf(2),ATe=xf(3),Pd=xf(4),CTe=xf(5),MTe=xf(6);XS.range;m1.range;TTe.range;ATe.range;Pd.range;CTe.range;MTe.range;function _f(e){return Yr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/jD)}const qS=_f(0),y1=_f(1),PTe=_f(2),LTe=_f(3),Ld=_f(4),kTe=_f(5),ITe=_f(6);qS.range;y1.range;PTe.range;LTe.range;Ld.range;kTe.range;ITe.range;const FD=Yr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());FD.range;const VD=Yr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());VD.range;const Rs=Yr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Rs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Rs.range;const Bs=Yr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Bs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Bs.range;function AX(e,t,r,n,i,a){const o=[[bc,1,ds],[bc,5,5*ds],[bc,15,15*ds],[bc,30,30*ds],[a,1,na],[a,5,5*na],[a,15,15*na],[a,30,30*na],[i,1,vs],[i,3,3*vs],[i,6,6*vs],[i,12,12*vs],[n,1,js],[n,2,2*js],[r,1,jD],[t,1,c4],[t,3,3*c4],[e,1,bC]];function s(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const d=f&&typeof f.range=="function"?f:l(u,c,f),v=d?d.range(u,+c+1):[];return h?v.reverse():v}function l(u,c,f){const h=Math.abs(c-u)/f,d=TD(([,,m])=>m).right(o,h);if(d===o.length)return e.every(DL(u/bC,c/bC,f));if(d===0)return g1.every(Math.max(DL(u,c,f),1));const[v,g]=o[h/o[d-1][2]<o[d][2]/h?d-1:d];return v.every(g)}return[s,l]}const[OTe,ETe]=AX(Bs,VD,qS,TX,$D,BD),[DTe,NTe]=AX(Rs,FD,XS,Ky,zD,RD);function wC(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function SC(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function bp(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function jTe(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=wp(i),c=Sp(i),f=wp(a),h=Sp(a),d=wp(o),v=Sp(o),g=wp(s),m=Sp(s),x=wp(l),_=Sp(l),b={a:U,A:F,b:V,B:W,c:null,d:g4,e:g4,f:aAe,g:pAe,G:mAe,H:rAe,I:nAe,j:iAe,L:CX,m:oAe,M:sAe,p:Y,q:Z,Q:x4,s:_4,S:lAe,u:uAe,U:cAe,V:fAe,w:hAe,W:dAe,x:null,X:null,y:vAe,Y:gAe,Z:yAe,"%":y4},S={a:J,A:ne,b:le,B:fe,c:null,d:m4,e:m4,f:wAe,g:OAe,G:DAe,H:xAe,I:_Ae,j:bAe,L:PX,m:SAe,M:TAe,p:ze,q:xe,Q:x4,s:_4,S:AAe,u:CAe,U:MAe,V:PAe,w:LAe,W:kAe,x:null,X:null,y:IAe,Y:EAe,Z:NAe,"%":y4},T={a:k,A:O,b:D,B:N,c:j,d:v4,e:v4,f:QTe,g:d4,G:h4,H:p4,I:p4,j:YTe,L:KTe,m:ZTe,M:XTe,p:I,q:UTe,Q:eAe,s:tAe,S:qTe,u:FTe,U:VTe,V:GTe,w:$Te,W:WTe,x:z,X:$,y:d4,Y:h4,Z:HTe,"%":JTe};b.x=A(r,b),b.X=A(n,b),b.c=A(t,b),S.x=A(r,S),S.X=A(n,S),S.c=A(t,S);function A(ie,he){return function(ue){var ee=[],Ve=-1,Se=0,Ge=ie.length,Ye,vt,Vt;for(ue instanceof Date||(ue=new Date(+ue));++Ve<Ge;)ie.charCodeAt(Ve)===37&&(ee.push(ie.slice(Se,Ve)),(vt=f4[Ye=ie.charAt(++Ve)])!=null?Ye=ie.charAt(++Ve):vt=Ye==="e"?" ":"0",(Vt=he[Ye])&&(Ye=Vt(ue,vt)),ee.push(Ye),Se=Ve+1);return ee.push(ie.slice(Se,Ve)),ee.join("")}}function M(ie,he){return function(ue){var ee=bp(1900,void 0,1),Ve=P(ee,ie,ue+="",0),Se,Ge;if(Ve!=ue.length)return null;if("Q"in ee)return new Date(ee.Q);if("s"in ee)return new Date(ee.s*1e3+("L"in ee?ee.L:0));if(he&&!("Z"in ee)&&(ee.Z=0),"p"in ee&&(ee.H=ee.H%12+ee.p*12),ee.m===void 0&&(ee.m="q"in ee?ee.q:0),"V"in ee){if(ee.V<1||ee.V>53)return null;"w"in ee||(ee.w=1),"Z"in ee?(Se=SC(bp(ee.y,0,1)),Ge=Se.getUTCDay(),Se=Ge>4||Ge===0?y1.ceil(Se):y1(Se),Se=YS.offset(Se,(ee.V-1)*7),ee.y=Se.getUTCFullYear(),ee.m=Se.getUTCMonth(),ee.d=Se.getUTCDate()+(ee.w+6)%7):(Se=wC(bp(ee.y,0,1)),Ge=Se.getDay(),Se=Ge>4||Ge===0?m1.ceil(Se):m1(Se),Se=Ky.offset(Se,(ee.V-1)*7),ee.y=Se.getFullYear(),ee.m=Se.getMonth(),ee.d=Se.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),Ge="Z"in ee?SC(bp(ee.y,0,1)).getUTCDay():wC(bp(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(Ge+5)%7:ee.w+ee.U*7-(Ge+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,SC(ee)):wC(ee)}}function P(ie,he,ue,ee){for(var Ve=0,Se=he.length,Ge=ue.length,Ye,vt;Ve<Se;){if(ee>=Ge)return-1;if(Ye=he.charCodeAt(Ve++),Ye===37){if(Ye=he.charAt(Ve++),vt=T[Ye in f4?he.charAt(Ve++):Ye],!vt||(ee=vt(ie,ue,ee))<0)return-1}else if(Ye!=ue.charCodeAt(ee++))return-1}return ee}function I(ie,he,ue){var ee=u.exec(he.slice(ue));return ee?(ie.p=c.get(ee[0].toLowerCase()),ue+ee[0].length):-1}function k(ie,he,ue){var ee=d.exec(he.slice(ue));return ee?(ie.w=v.get(ee[0].toLowerCase()),ue+ee[0].length):-1}function O(ie,he,ue){var ee=f.exec(he.slice(ue));return ee?(ie.w=h.get(ee[0].toLowerCase()),ue+ee[0].length):-1}function D(ie,he,ue){var ee=x.exec(he.slice(ue));return ee?(ie.m=_.get(ee[0].toLowerCase()),ue+ee[0].length):-1}function N(ie,he,ue){var ee=g.exec(he.slice(ue));return ee?(ie.m=m.get(ee[0].toLowerCase()),ue+ee[0].length):-1}function j(ie,he,ue){return P(ie,t,he,ue)}function z(ie,he,ue){return P(ie,r,he,ue)}function $(ie,he,ue){return P(ie,n,he,ue)}function U(ie){return o[ie.getDay()]}function F(ie){return a[ie.getDay()]}function V(ie){return l[ie.getMonth()]}function W(ie){return s[ie.getMonth()]}function Y(ie){return i[+(ie.getHours()>=12)]}function Z(ie){return 1+~~(ie.getMonth()/3)}function J(ie){return o[ie.getUTCDay()]}function ne(ie){return a[ie.getUTCDay()]}function le(ie){return l[ie.getUTCMonth()]}function fe(ie){return s[ie.getUTCMonth()]}function ze(ie){return i[+(ie.getUTCHours()>=12)]}function xe(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var he=A(ie+="",b);return he.toString=function(){return ie},he},parse:function(ie){var he=M(ie+="",!1);return he.toString=function(){return ie},he},utcFormat:function(ie){var he=A(ie+="",S);return he.toString=function(){return ie},he},utcParse:function(ie){var he=M(ie+="",!0);return he.toString=function(){return ie},he}}}var f4={"-":"",_:" ",0:"0"},ln=/^\s*\d+/,RTe=/^%/,BTe=/[\\^$*+?|[\]().{}]/g;function Ct(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function zTe(e){return e.replace(BTe,"\\$&")}function wp(e){return new RegExp("^(?:"+e.map(zTe).join("|")+")","i")}function Sp(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function $Te(e,t,r){var n=ln.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function FTe(e,t,r){var n=ln.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function VTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function GTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function WTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function h4(e,t,r){var n=ln.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function d4(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function HTe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function UTe(e,t,r){var n=ln.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function ZTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function v4(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function YTe(e,t,r){var n=ln.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function p4(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function XTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qTe(e,t,r){var n=ln.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function KTe(e,t,r){var n=ln.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function QTe(e,t,r){var n=ln.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function JTe(e,t,r){var n=RTe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function eAe(e,t,r){var n=ln.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function tAe(e,t,r){var n=ln.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function g4(e,t){return Ct(e.getDate(),t,2)}function rAe(e,t){return Ct(e.getHours(),t,2)}function nAe(e,t){return Ct(e.getHours()%12||12,t,2)}function iAe(e,t){return Ct(1+Ky.count(Rs(e),e),t,3)}function CX(e,t){return Ct(e.getMilliseconds(),t,3)}function aAe(e,t){return CX(e,t)+"000"}function oAe(e,t){return Ct(e.getMonth()+1,t,2)}function sAe(e,t){return Ct(e.getMinutes(),t,2)}function lAe(e,t){return Ct(e.getSeconds(),t,2)}function uAe(e){var t=e.getDay();return t===0?7:t}function cAe(e,t){return Ct(XS.count(Rs(e)-1,e),t,2)}function MX(e){var t=e.getDay();return t>=4||t===0?Pd(e):Pd.ceil(e)}function fAe(e,t){return e=MX(e),Ct(Pd.count(Rs(e),e)+(Rs(e).getDay()===4),t,2)}function hAe(e){return e.getDay()}function dAe(e,t){return Ct(m1.count(Rs(e)-1,e),t,2)}function vAe(e,t){return Ct(e.getFullYear()%100,t,2)}function pAe(e,t){return e=MX(e),Ct(e.getFullYear()%100,t,2)}function gAe(e,t){return Ct(e.getFullYear()%1e4,t,4)}function mAe(e,t){var r=e.getDay();return e=r>=4||r===0?Pd(e):Pd.ceil(e),Ct(e.getFullYear()%1e4,t,4)}function yAe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ct(t/60|0,"0",2)+Ct(t%60,"0",2)}function m4(e,t){return Ct(e.getUTCDate(),t,2)}function xAe(e,t){return Ct(e.getUTCHours(),t,2)}function _Ae(e,t){return Ct(e.getUTCHours()%12||12,t,2)}function bAe(e,t){return Ct(1+YS.count(Bs(e),e),t,3)}function PX(e,t){return Ct(e.getUTCMilliseconds(),t,3)}function wAe(e,t){return PX(e,t)+"000"}function SAe(e,t){return Ct(e.getUTCMonth()+1,t,2)}function TAe(e,t){return Ct(e.getUTCMinutes(),t,2)}function AAe(e,t){return Ct(e.getUTCSeconds(),t,2)}function CAe(e){var t=e.getUTCDay();return t===0?7:t}function MAe(e,t){return Ct(qS.count(Bs(e)-1,e),t,2)}function LX(e){var t=e.getUTCDay();return t>=4||t===0?Ld(e):Ld.ceil(e)}function PAe(e,t){return e=LX(e),Ct(Ld.count(Bs(e),e)+(Bs(e).getUTCDay()===4),t,2)}function LAe(e){return e.getUTCDay()}function kAe(e,t){return Ct(y1.count(Bs(e)-1,e),t,2)}function IAe(e,t){return Ct(e.getUTCFullYear()%100,t,2)}function OAe(e,t){return e=LX(e),Ct(e.getUTCFullYear()%100,t,2)}function EAe(e,t){return Ct(e.getUTCFullYear()%1e4,t,4)}function DAe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ld(e):Ld.ceil(e),Ct(e.getUTCFullYear()%1e4,t,4)}function NAe(){return"+0000"}function y4(){return"%"}function x4(e){return+e}function _4(e){return Math.floor(+e/1e3)}var Wf,kX,IX;jAe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jAe(e){return Wf=jTe(e),kX=Wf.format,Wf.parse,IX=Wf.utcFormat,Wf.utcParse,Wf}function RAe(e){return new Date(e)}function BAe(e){return e instanceof Date?+e:+new Date(+e)}function GD(e,t,r,n,i,a,o,s,l,u){var c=LD(),f=c.invert,h=c.domain,d=u(".%L"),v=u(":%S"),g=u("%I:%M"),m=u("%I %p"),x=u("%a %d"),_=u("%b %d"),b=u("%B"),S=u("%Y");function T(A){return(l(A)<A?d:s(A)<A?v:o(A)<A?g:a(A)<A?m:n(A)<A?i(A)<A?x:_:r(A)<A?b:S)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?h(Array.from(A,BAe)):h().map(RAe)},c.ticks=function(A){var M=h();return e(M[0],M[M.length-1],A??10)},c.tickFormat=function(A,M){return M==null?T:u(M)},c.nice=function(A){var M=h();return(!A||typeof A.range!="function")&&(A=t(M[0],M[M.length-1],A??10)),A?h(mX(M,A)):c},c.copy=function(){return qy(c,GD(e,t,r,n,i,a,o,s,l,u))},c}function zAe(){return ma.apply(GD(DTe,NTe,Rs,FD,XS,Ky,zD,RD,bc,kX).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function $Ae(){return ma.apply(GD(OTe,ETe,Bs,VD,qS,YS,$D,BD,bc,IX).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function KS(){var e=0,t=1,r,n,i,a,o=Gn,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(h){var d,v;return arguments.length?([d,v]=h,o=f(d,v),u):[o(0),o(1)]}}return u.range=c(Av),u.rangeRound=c(PD),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),u}}function vu(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function OX(){var e=du(KS()(Gn));return e.copy=function(){return vu(e,OX())},qs.apply(e,arguments)}function EX(){var e=OD(KS()).domain([1,10]);return e.copy=function(){return vu(e,EX()).base(e.base())},qs.apply(e,arguments)}function DX(){var e=ED(KS());return e.copy=function(){return vu(e,DX()).constant(e.constant())},qs.apply(e,arguments)}function WD(){var e=DD(KS());return e.copy=function(){return vu(e,WD()).exponent(e.exponent())},qs.apply(e,arguments)}function FAe(){return WD.apply(null,arguments).exponent(.5)}function NX(){var e=[],t=Gn;function r(n){if(n!=null&&!isNaN(n=+n))return t((Yy(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wl),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>MSe(e,a/n))},r.copy=function(){return NX(t).domain(e)},qs.apply(r,arguments)}function QS(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Gn,c,f=!1,h;function d(g){return isNaN(g=+g)?h:(g=.5+((g=+c(g))-a)*(n*g<n*a?s:l),u(f?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([e,t,r]=g,i=c(e=+e),a=c(t=+t),o=c(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d):[e,t,r]},d.clamp=function(g){return arguments.length?(f=!!g,d):f},d.interpolator=function(g){return arguments.length?(u=g,d):u};function v(g){return function(m){var x,_,b;return arguments.length?([x,_,b]=m,u=JSe(g,[x,_,b]),d):[u(0),u(.5),u(1)]}}return d.range=v(Av),d.rangeRound=v(PD),d.unknown=function(g){return arguments.length?(h=g,d):h},function(g){return c=g,i=g(e),a=g(t),o=g(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,d}}function jX(){var e=du(QS()(Gn));return e.copy=function(){return vu(e,jX())},qs.apply(e,arguments)}function RX(){var e=OD(QS()).domain([.1,1,10]);return e.copy=function(){return vu(e,RX()).base(e.base())},qs.apply(e,arguments)}function BX(){var e=ED(QS());return e.copy=function(){return vu(e,BX()).constant(e.constant())},qs.apply(e,arguments)}function HD(){var e=DD(QS());return e.copy=function(){return vu(e,HD()).exponent(e.exponent())},qs.apply(e,arguments)}function VAe(){return HD.apply(null,arguments).exponent(.5)}const b4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Om,scaleDiverging:jX,scaleDivergingLog:RX,scaleDivergingPow:HD,scaleDivergingSqrt:VAe,scaleDivergingSymlog:BX,scaleIdentity:gX,scaleImplicit:NL,scaleLinear:p1,scaleLog:yX,scaleOrdinal:AD,scalePoint:Ng,scalePow:ND,scaleQuantile:bX,scaleQuantize:wX,scaleRadial:_X,scaleSequential:OX,scaleSequentialLog:EX,scaleSequentialPow:WD,scaleSequentialQuantile:NX,scaleSequentialSqrt:FAe,scaleSequentialSymlog:DX,scaleSqrt:wTe,scaleSymlog:xX,scaleThreshold:SX,scaleTime:zAe,scaleUtc:$Ae,tickFormat:pX},Symbol.toStringTag,{value:"Module"}));var GAe=vv;function WAe(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(o!=null&&(s===void 0?o===o&&!GAe(o):r(o,s)))var s=o,l=a}return l}var zX=WAe;function HAe(e,t){return e>t}var UAe=HAe,ZAe=zX,YAe=UAe,XAe=Sv;function qAe(e){return e&&e.length?ZAe(e,XAe,YAe):void 0}var KAe=qAe;const Cl=Ft(KAe);function QAe(e,t){return e<t}var JAe=QAe,eCe=zX,tCe=JAe,rCe=Sv;function nCe(e){return e&&e.length?eCe(e,rCe,tCe):void 0}var iCe=nCe;const JS=Ft(iCe);var aCe=iD,oCe=Tv,sCe=ZY,lCe=di;function uCe(e,t){var r=lCe(e)?aCe:sCe;return r(e,oCe(t))}var cCe=uCe,fCe=HY,hCe=cCe;function dCe(e,t){return fCe(hCe(e,t),1)}var vCe=dCe;const pCe=Ft(vCe);var gCe=_D;function mCe(e,t){return gCe(e,t)}var yCe=mCe;const kd=Ft(yCe);var Cv=1e9,xCe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ZD,rr=!0,fa="[DecimalError] ",Nc=fa+"Invalid argument: ",UD=fa+"Exponent out of range: ",Mv=Math.floor,ac=Math.pow,_Ce=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wi,en=1e7,Qt=7,$X=9007199254740991,x1=Mv($X/Qt),je={};je.absoluteValue=je.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};je.comparedTo=je.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};je.decimalPlaces=je.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Qt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};je.dividedBy=je.div=function(e){return ws(this,new this.constructor(e))};je.dividedToIntegerBy=je.idiv=function(e){var t=this,r=t.constructor;return Gt(ws(t,new r(e),0,1),r.precision)};je.equals=je.eq=function(e){return!this.cmp(e)};je.exponent=function(){return Er(this)};je.greaterThan=je.gt=function(e){return this.cmp(e)>0};je.greaterThanOrEqualTo=je.gte=function(e){return this.cmp(e)>=0};je.isInteger=je.isint=function(){return this.e>this.d.length-2};je.isNegative=je.isneg=function(){return this.s<0};je.isPositive=je.ispos=function(){return this.s>0};je.isZero=function(){return this.s===0};je.lessThan=je.lt=function(e){return this.cmp(e)<0};je.lessThanOrEqualTo=je.lte=function(e){return this.cmp(e)<1};je.logarithm=je.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(wi))throw Error(fa+"NaN");if(r.s<1)throw Error(fa+(r.s?"NaN":"-Infinity"));return r.eq(wi)?new n(0):(rr=!1,t=ws(Rm(r,a),Rm(e,a),a),rr=!0,Gt(t,i))};je.minus=je.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GX(t,e):FX(t,(e.s=-e.s,e))};je.modulo=je.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(fa+"NaN");return r.s?(rr=!1,t=ws(r,e,0,1).times(e),rr=!0,r.minus(t)):Gt(new n(r),i)};je.naturalExponential=je.exp=function(){return VX(this)};je.naturalLogarithm=je.ln=function(){return Rm(this)};je.negated=je.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};je.plus=je.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FX(t,e):GX(t,(e.s=-e.s,e))};je.precision=je.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Nc+e);if(t=Er(i)+1,n=i.d.length-1,r=n*Qt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};je.squareRoot=je.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(fa+"NaN")}for(e=Er(s),rr=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=xo(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Mv((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(ws(s,a,o+2)).times(.5),xo(a.d).slice(0,o)===(t=xo(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Gt(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return rr=!0,Gt(n,r)};je.times=je.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,h=c.d,d=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=h.length,u=d.length,l<u&&(a=h,h=d,d=a,o=l,l=u,u=o),a=[],o=l+u,n=o;n--;)a.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+d[n]*h[i-n-1]+t,a[i--]=s%en|0,t=s/en|0;a[i]=(a[i]+t)%en|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,rr?Gt(e,f.precision):e};je.toDecimalPlaces=je.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(jo(e,0,Cv),t===void 0?t=n.rounding:jo(t,0,8),Gt(r,e+Er(r)+1,t))};je.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Jc(n,!0):(jo(e,0,Cv),t===void 0?t=i.rounding:jo(t,0,8),n=Gt(new i(n),e+1,t),r=Jc(n,!0,e+1)),r};je.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Jc(i):(jo(e,0,Cv),t===void 0?t=a.rounding:jo(t,0,8),n=Gt(new a(i),e+Er(i)+1,t),r=Jc(n.abs(),!1,e+Er(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};je.toInteger=je.toint=function(){var e=this,t=e.constructor;return Gt(new t(e),Er(e)+1,t.rounding)};je.toNumber=function(){return+this};je.toPower=je.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(wi);if(s=new l(s),!s.s){if(e.s<1)throw Error(fa+"Infinity");return s}if(s.eq(wi))return s;if(n=l.precision,e.eq(wi))return Gt(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=$X){for(i=new l(wi),t=Math.ceil(n/Qt+4),rr=!1;r%2&&(i=i.times(s),S4(i.d,t)),r=Mv(r/2),r!==0;)s=s.times(s),S4(s.d,t);return rr=!0,e.s<0?new l(wi).div(i):Gt(i,n)}}else if(a<0)throw Error(fa+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,rr=!1,i=e.times(Rm(s,n+u)),rr=!0,i=VX(i),i.s=a,i};je.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Er(i),n=Jc(i,r<=a.toExpNeg||r>=a.toExpPos)):(jo(e,1,Cv),t===void 0?t=a.rounding:jo(t,0,8),i=Gt(new a(i),e,t),r=Er(i),n=Jc(i,e<=r||r<=a.toExpNeg,e)),n};je.toSignificantDigits=je.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(jo(e,1,Cv),t===void 0?t=n.rounding:jo(t,0,8)),Gt(new n(r),e,t)};je.toString=je.valueOf=je.val=je.toJSON=je[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Er(e),r=e.constructor;return Jc(e,t<=r.toExpNeg||t>=r.toExpPos)};function FX(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),rr?Gt(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/Qt),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/en|0,l[a]%=en;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,rr?Gt(t,f):t}function jo(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Nc+e)}function xo(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Qt-n.length,r&&(a+=yl(r)),a+=n;o=e[t],n=o+"",r=Qt-n.length,r&&(a+=yl(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var ws=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%en|0,o=a/en|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*en+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,h,d,v,g,m,x,_,b,S,T,A,M,P,I=n.constructor,k=n.s==i.s?1:-1,O=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(fa+"Division by zero");for(l=n.e-i.e,M=D.length,T=O.length,d=new I(k),v=d.d=[],u=0;D[u]==(O[u]||0);)++u;if(D[u]>(O[u]||0)&&--l,a==null?_=a=I.precision:o?_=a+(Er(n)-Er(i))+1:_=a,_<0)return new I(0);if(_=_/Qt+2|0,u=0,M==1)for(c=0,D=D[0],_++;(u<T||c)&&_--;u++)b=c*en+(O[u]||0),v[u]=b/D|0,c=b%D|0;else{for(c=en/(D[0]+1)|0,c>1&&(D=e(D,c),O=e(O,c),M=D.length,T=O.length),S=M,g=O.slice(0,M),m=g.length;m<M;)g[m++]=0;P=D.slice(),P.unshift(0),A=D[0],D[1]>=en/2&&++A;do c=0,s=t(D,g,M,m),s<0?(x=g[0],M!=m&&(x=x*en+(g[1]||0)),c=x/A|0,c>1?(c>=en&&(c=en-1),f=e(D,c),h=f.length,m=g.length,s=t(f,g,h,m),s==1&&(c--,r(f,M<h?P:D,h))):(c==0&&(s=c=1),f=D.slice()),h=f.length,h<m&&f.unshift(0),r(g,f,m),s==-1&&(m=g.length,s=t(D,g,M,m),s<1&&(c++,r(g,M<m?P:D,m))),m=g.length):s===0&&(c++,g=[0]),v[u++]=c,s&&g[0]?g[m++]=O[S]||0:(g=[O[S]],m=1);while((S++<T||g[0]!==void 0)&&_--)}return v[0]||v.shift(),d.e=l,Gt(d,o?a+Er(d)+1:a)}}();function VX(e,t){var r,n,i,a,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(Er(e)>16)throw Error(UD+Er(e));if(!e.s)return new c(wi);for(rr=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(ac(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(wi),c.precision=s;;){if(i=Gt(i.times(e),s),r=r.times(++l),o=a.plus(ws(i,r,s)),xo(o.d).slice(0,s)===xo(a.d).slice(0,s)){for(;u--;)a=Gt(a.times(a),s);return c.precision=f,t==null?(rr=!0,Gt(a,f)):a}a=o}}function Er(e){for(var t=e.e*Qt,r=e.d[0];r>=10;r/=10)t++;return t}function TC(e,t,r){if(t>e.LN10.sd())throw rr=!0,r&&(e.precision=r),Error(fa+"LN10 precision limit exceeded");return Gt(new e(e.LN10),t)}function yl(e){for(var t="";e--;)t+="0";return t}function Rm(e,t){var r,n,i,a,o,s,l,u,c,f=1,h=10,d=e,v=d.d,g=d.constructor,m=g.precision;if(d.s<1)throw Error(fa+(d.s?"NaN":"-Infinity"));if(d.eq(wi))return new g(0);if(t==null?(rr=!1,u=m):u=t,d.eq(10))return t==null&&(rr=!0),TC(g,u);if(u+=h,g.precision=u,r=xo(v),n=r.charAt(0),a=Er(d),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)d=d.times(e),r=xo(d.d),n=r.charAt(0),f++;a=Er(d),n>1?(d=new g("0."+r),a++):d=new g(n+"."+r.slice(1))}else return l=TC(g,u+2,m).times(a+""),d=Rm(new g(n+"."+r.slice(1)),u-h).plus(l),g.precision=m,t==null?(rr=!0,Gt(d,m)):d;for(s=o=d=ws(d.minus(wi),d.plus(wi),u),c=Gt(d.times(d),u),i=3;;){if(o=Gt(o.times(c),u),l=s.plus(ws(o,new g(i),u)),xo(l.d).slice(0,u)===xo(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(TC(g,u+2,m).times(a+""))),s=ws(s,new g(f),u),g.precision=m,t==null?(rr=!0,Gt(s,m)):s;s=l,i+=2}}function w4(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Mv(r/Qt),e.d=[],n=(r+1)%Qt,r<0&&(n+=Qt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Qt;n<i;)e.d.push(+t.slice(n,n+=Qt));t=t.slice(n),n=Qt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),rr&&(e.e>x1||e.e<-x1))throw Error(UD+r)}else e.s=0,e.e=0,e.d=[0];return e}function Gt(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Qt,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Qt),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=Qt,i=n-Qt+o}if(r!==void 0&&(a=ac(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/ac(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=Er(e),f.length=1,t=t-a-1,f[0]=ac(10,(Qt-t%Qt)%Qt),e.e=Mv(-t/Qt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=ac(10,Qt-n),f[c]=i>0?(u/ac(10,o-i)%ac(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==en&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=en)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(rr&&(e.e>x1||e.e<-x1))throw Error(UD+Er(e));return e}function GX(e,t){var r,n,i,a,o,s,l,u,c,f,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),rr?Gt(t,d):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(d/Qt),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){c=l[i]<f[i];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=en-1;--l[a],l[i]+=en}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,rr?Gt(t,d):t):new h(0)}function Jc(e,t,r){var n,i=Er(e),a=xo(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+yl(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+yl(-i-1)+a,r&&(n=r-o)>0&&(a+=yl(n))):i>=o?(a+=yl(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+yl(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=yl(n))),e.s<0?"-"+a:a}function S4(e,t){if(e.length>t)return e.length=t,!0}function WX(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Nc+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return w4(o,a.toString())}else if(typeof a!="string")throw Error(Nc+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,_Ce.test(a))w4(o,a);else throw Error(Nc+a)}if(i.prototype=je,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=WX,i.config=i.set=bCe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function bCe(e){if(!e||typeof e!="object")throw Error(fa+"Object expected");var t,r,n,i=["precision",1,Cv,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Mv(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Nc+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Nc+r+": "+n);return this}var ZD=WX(xCe);wi=new ZD(1);const zt=ZD;function wCe(e){return CCe(e)||ACe(e)||TCe(e)||SCe()}function SCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TCe(e,t){if(e){if(typeof e=="string")return zL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zL(e,t)}}function ACe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function CCe(e){if(Array.isArray(e))return zL(e)}function zL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var MCe=function(t){return t},HX={},UX=function(t){return t===HX},T4=function(t){return function r(){return arguments.length===0||arguments.length===1&&UX(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},PCe=function e(t,r){return t===1?r:T4(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==HX}).length;return o>=t?r.apply(void 0,i):e(t-o,T4(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=i.map(function(f){return UX(f)?l.shift():f});return r.apply(void 0,wCe(c).concat(l))}))})},eT=function(t){return PCe(t.length,t)},$L=function(t,r){for(var n=[],i=t;i<r;++i)n[i-t]=i;return n},LCe=eT(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),kCe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return MCe;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},FL=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},ZX=function(t){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,l){return s===r[l]})||(r=a,n=t.apply(void 0,a)),n}};function ICe(e){var t;return e===0?t=1:t=Math.floor(new zt(e).abs().log(10).toNumber())+1,t}function OCe(e,t,r){for(var n=new zt(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var ECe=eT(function(e,t,r){var n=+e,i=+t;return n+r*(i-n)}),DCe=eT(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),NCe=eT(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const tT={rangeStep:OCe,getDigitCount:ICe,interpolateNumber:ECe,uninterpolateNumber:DCe,uninterpolateTruncation:NCe};function VL(e){return BCe(e)||RCe(e)||YX(e)||jCe()}function jCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RCe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function BCe(e){if(Array.isArray(e))return GL(e)}function Bm(e,t){return FCe(e)||$Ce(e,t)||YX(e,t)||zCe()}function zCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YX(e,t){if(e){if(typeof e=="string")return GL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GL(e,t)}}function GL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $Ce(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function FCe(e){if(Array.isArray(e))return e}function XX(e){var t=Bm(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function qX(e,t,r){if(e.lte(0))return new zt(0);var n=tT.getDigitCount(e.toNumber()),i=new zt(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new zt(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new zt(Math.ceil(l))}function VCe(e,t,r){var n=1,i=new zt(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new zt(10).pow(tT.getDigitCount(e)-1),i=new zt(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new zt(Math.floor(e)))}else e===0?i=new zt(Math.floor((t-1)/2)):r||(i=new zt(Math.floor(e)));var o=Math.floor((t-1)/2),s=kCe(LCe(function(l){return i.add(new zt(l-o).mul(n)).toNumber()}),$L);return s(0,t)}function KX(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new zt(0),tickMin:new zt(0),tickMax:new zt(0)};var a=qX(new zt(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new zt(0):(o=new zt(e).add(t).div(2),o=o.sub(new zt(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new zt(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?KX(e,t,r,n,i+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new zt(s).mul(a)),tickMax:o.add(new zt(l).mul(a))})}function GCe(e){var t=Bm(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=XX([r,n]),l=Bm(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(VL($L(0,i-1).map(function(){return 1/0}))):[].concat(VL($L(0,i-1).map(function(){return-1/0})),[c]);return r>n?FL(f):f}if(u===c)return VCe(u,i,a);var h=KX(u,c,o,a),d=h.step,v=h.tickMin,g=h.tickMax,m=tT.rangeStep(v,g.add(new zt(.1).mul(d)),d);return r>n?FL(m):m}function WCe(e,t){var r=Bm(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=XX([n,i]),s=Bm(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=qX(new zt(u).sub(l).div(c-1),a,0),h=[].concat(VL(tT.rangeStep(new zt(l),new zt(u).sub(new zt(.99).mul(f)),f)),[u]);return n>i?FL(h):h}var HCe=ZX(GCe),UCe=ZX(WCe),ZCe="Invariant failed";function ef(e,t){throw new Error(ZCe)}var YCe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Id(e){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}function _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_1.apply(this,arguments)}function XCe(e,t){return JCe(e)||QCe(e,t)||KCe(e,t)||qCe()}function qCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KCe(e,t){if(e){if(typeof e=="string")return A4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A4(e,t)}}function A4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function JCe(e){if(Array.isArray(e))return e}function e2e(e,t){if(e==null)return{};var r=t2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function t2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function r2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n2e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eq(n.key),n)}}function i2e(e,t,r){return t&&n2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a2e(e,t,r){return t=b1(t),o2e(e,QX()?Reflect.construct(t,r||[],b1(e).constructor):t.apply(e,r))}function o2e(e,t){if(t&&(Id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s2e(e)}function s2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QX=function(){return!!e})()}function b1(e){return b1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b1(e)}function l2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WL(e,t)}function WL(e,t){return WL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},WL(e,t)}function JX(e,t,r){return t=eq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eq(e){var t=u2e(e,"string");return Id(t)=="symbol"?t:t+""}function u2e(e,t){if(Id(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Id(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qy=function(e){function t(){return r2e(this,t),a2e(this,t,arguments)}return l2e(t,e),i2e(t,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,h=e2e(n,YCe),d=ct(h,!1);this.props.direction==="x"&&c.type!=="number"&&ef();var v=l.map(function(g){var m=u(g,s),x=m.x,_=m.y,b=m.value,S=m.errorVal;if(!S)return null;var T=[],A,M;if(Array.isArray(S)){var P=XCe(S,2);A=P[0],M=P[1]}else A=M=S;if(a==="vertical"){var I=c.scale,k=_+i,O=k+o,D=k-o,N=I(b-A),j=I(b+M);T.push({x1:j,y1:O,x2:j,y2:D}),T.push({x1:N,y1:k,x2:j,y2:k}),T.push({x1:N,y1:O,x2:N,y2:D})}else if(a==="horizontal"){var z=f.scale,$=x+i,U=$-o,F=$+o,V=z(b-A),W=z(b+M);T.push({x1:U,y1:W,x2:F,y2:W}),T.push({x1:$,y1:V,x2:$,y2:W}),T.push({x1:U,y1:V,x2:F,y2:V})}return Q.createElement(Xt,_1({className:"recharts-errorBar",key:"bar-".concat(T.map(function(Y){return"".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))},d),T.map(function(Y){return Q.createElement("line",_1({},Y,{key:"line-".concat(Y.x1,"-").concat(Y.x2,"-").concat(Y.y1,"-").concat(Y.y2)}))}))});return Q.createElement(Xt,{className:"recharts-errorBars"},v)}}])}(Q.Component);JX(Qy,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});JX(Qy,"displayName","ErrorBar");function zm(e){"@babel/helpers - typeof";return zm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zm(e)}function C4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C4(Object(r),!0).forEach(function(n){c2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c2e(e,t,r){return t=f2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f2e(e){var t=h2e(e,"string");return zm(t)=="symbol"?t:t+""}function h2e(e,t){if(zm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tq=function(t){var r=t.children,n=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=xi(r,rd);if(!o)return null;var s=rd.defaultProps,l=s!==void 0?Pu(Pu({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(n||[]).reduce(function(c,f){var h=f.item,d=f.props,v=d.sectors||d.data||[];return c.concat(v.map(function(g){return{type:o.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(n||[]).map(function(c){var f=c.item,h=f.type.defaultProps,d=h!==void 0?Pu(Pu({},h),f.props):{},v=d.dataKey,g=d.name,m=d.legendType,x=d.hide;return{inactive:x,dataKey:v,type:l.iconType||m||"square",color:YD(f),value:g||v,payload:d}}),Pu(Pu(Pu({},l),rd.getWithHeight(o,i)),{},{payload:u,item:o})};function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}function M4(e){return g2e(e)||p2e(e)||v2e(e)||d2e()}function d2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v2e(e,t){if(e){if(typeof e=="string")return HL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HL(e,t)}}function p2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g2e(e){if(Array.isArray(e))return HL(e)}function HL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function P4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P4(Object(r),!0).forEach(function(n){id(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function id(e,t,r){return t=m2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m2e(e){var t=y2e(e,"string");return $m(t)=="symbol"?t:t+""}function y2e(e,t){if($m(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($m(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Un(e,t,r){return dt(e)||dt(t)?r:Vr(t)?aa(e,t,r):ft(t)?t(e):r}function jg(e,t,r,n){var i=pCe(e,function(s){return Un(s,t)});if(r==="number"){var a=i.filter(function(s){return we(s)||parseFloat(s)});return a.length?[JS(a),Cl(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!dt(s)}):i;return o.map(function(s){return Vr(s)||s instanceof Date?s:""})}var x2e=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var c=u>0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,d=void 0;if(ja(f-c)!==ja(h-f)){var v=[];if(ja(h-f)===ja(l[1]-l[0])){d=h;var g=f+l[1]-l[0];v[0]=Math.min(g,(g+c)/2),v[1]=Math.max(g,(g+c)/2)}else{d=c;var m=h+l[1]-l[0];v[0]=Math.min(f,(m+f)/2),v[1]=Math.max(f,(m+f)/2)}var x=[Math.min(f,(d+f)/2),Math.max(f,(d+f)/2)];if(t>x[0]&&t<=x[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var _=Math.min(c,h),b=Math.max(c,h);if(t>(_+f)/2&&t<=(b+f)/2){o=i[u].index;break}}}else for(var S=0;S<s;S++)if(S===0&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S>0&&S<s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},YD=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?pr(pr({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},_2e=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var c=a[s[l]].stackGroups,f=Object.keys(c),h=0,d=f.length;h<d;h++){var v=c[f[h]],g=v.items,m=v.cateAxisId,x=g.filter(function(M){return bs(M.type).indexOf("Bar")>=0});if(x&&x.length){var _=x[0].type.defaultProps,b=_!==void 0?pr(pr({},_),x[0].props):x[0].props,S=b.barSize,T=b[m];o[T]||(o[T]=[]);var A=dt(S)?r:S;o[T].push({item:x[0],stackList:x.slice(1),barSize:dt(A)?void 0:Qc(A,n,0)})}}return o},b2e=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Qc(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,d=i/l,v=o.reduce(function(S,T){return S+T.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&d>0&&(h=!0,d*=.9,v=l*d);var g=(i-v)/2>>0,m={offset:g-u,size:0};c=o.reduce(function(S,T){var A={item:T.item,position:{offset:m.offset+m.size+u,size:h?d:T.barSize}},M=[].concat(M4(S),[A]);return m=M[M.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){M.push({item:P,position:m})}),M},f)}else{var x=Qc(n,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var _=(i-2*x-(l-1)*u)/l;_>1&&(_>>=0);var b=s===+s?Math.min(_,s):_;c=o.reduce(function(S,T,A){var M=[].concat(M4(S),[{item:T.item,position:{offset:x+(_+u)*A+(_-b)/2,size:b}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(P){M.push({item:P,position:M[M.length-1].position})}),M},f)}return c},w2e=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=tq({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,h=c.height,d=u.align,v=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&d!=="center"&&we(t[d]))return pr(pr({},t),{},id({},d,t[d]+(f||0)));if((g==="horizontal"||g==="vertical"&&d==="center")&&v!=="middle"&&we(t[v]))return pr(pr({},t),{},id({},v,t[v]+(h||0)))}return t},S2e=function(t,r,n){return dt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},rq=function(t,r,n,i,a){var o=r.props.children,s=oa(o,Qy).filter(function(u){return S2e(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Un(c,n);if(dt(f))return u;var h=Array.isArray(f)?[JS(f),Cl(f)]:[f,f],d=l.reduce(function(v,g){var m=Un(c,g,0),x=h[0]-Math.abs(Array.isArray(m)?m[0]:m),_=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(x,v[0]),Math.max(_,v[1])]},[1/0,-1/0]);return[Math.min(d[0],u[0]),Math.max(d[1],u[1])]},[1/0,-1/0])}return null},T2e=function(t,r,n,i,a){var o=r.map(function(s){return rq(t,s,n,a,i)}).filter(function(s){return!dt(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},nq=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&rq(t,l,u,i)||jg(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},iq=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},wc=function(t,r,n){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?ja(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return c.filter(function(f){return!xv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},AC=new WeakMap,vx=function(t,r){if(typeof r!="function")return t;AC.has(t)||AC.set(t,new WeakMap);var n=AC.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},A2e=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Om(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:p1(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ng(),realScaleType:"point"}:a==="category"?{scale:Om(),realScaleType:"band"}:{scale:p1(),realScaleType:"linear"};if(Kc(i)){var l="scale".concat($S(i));return{scale:(b4[l]||Ng)(),realScaleType:b4[l]?l:"point"}}return ft(i)?{scale:i}:{scale:Ng(),realScaleType:"point"}},L4=1e-4,C2e=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-L4,o=Math.max(i[0],i[1])+L4,s=t(r[0]),l=t(r[n-1]);(s<a||s>o||l<a||l>o)&&t.domain([r[0],r[n-1]])}},M2e=function(t,r){if(!t)return null;for(var n=0,i=t.length;n<i;n++)if(t[n].item===r)return t[n].position;return null},P2e=function(t,r){if(!r||r.length!==2||!we(r[0])||!we(r[1]))return t;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[t[0],t[1]];return(!we(t[0])||t[0]<n)&&(a[0]=n),(!we(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},L2e=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var l=xv(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},k2e=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=xv(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},I2e={sign:L2e,expand:Hpe,none:wd,silhouette:Upe,wiggle:Zpe,positive:k2e},O2e=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=I2e[n],o=Wpe().keys(i).value(function(s,l){return+Un(s,l,0)}).order(gL).offset(a);return o(t)},E2e=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,h){var d,v=(d=h.type)!==null&&d!==void 0&&d.defaultProps?pr(pr({},h.type.defaultProps),h.props):h.props,g=v.stackId,m=v.hide;if(m)return f;var x=v[n],_=f[x]||{hasStack:!1,stackGroups:{}};if(Vr(g)){var b=_.stackGroups[g]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(h),_.hasStack=!0,_.stackGroups[g]=b}else _.stackGroups[_v("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return pr(pr({},f),{},id({},x,_))},l),c={};return Object.keys(u).reduce(function(f,h){var d=u[h];if(d.hasStack){var v={};d.stackGroups=Object.keys(d.stackGroups).reduce(function(g,m){var x=d.stackGroups[m];return pr(pr({},g),{},id({},m,{numericAxisId:n,cateAxisId:i,items:x.items,stackedData:O2e(t,x.items,a)}))},v)}return pr(pr({},f),{},id({},h,d))},c)},D2e=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=HCe(u,a,s);return t.domain([JS(c),Cl(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),h=UCe(f,a,s);return{niceTicks:h}}return null};function w1(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!dt(i[t.dataKey])){var s=Hb(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Un(i,dt(o)?t.dataKey:o);return dt(l)?null:t.scale(l)}var k4=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Un(o,r.dataKey,r.domain[s]);return dt(l)?null:r.scale(l)-a/2+i},N2e=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},j2e=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?pr(pr({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Vr(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},R2e=function(t){return t.reduce(function(r,n){return[JS(n.concat([r[0]]).filter(we)),Cl(n.concat([r[1]]).filter(we))]},[1/0,-1/0])},aq=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=R2e(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},I4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,O4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,UL=function(t,r,n){if(ft(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(we(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(I4.test(t[0])){var a=+I4.exec(t[0])[1];i[0]=r[0]-a}else ft(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(we(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(O4.test(t[1])){var o=+O4.exec(t[1])[1];i[1]=r[1]+o}else ft(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},S1=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=wD(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;s<l;s++){var u=a[s],c=a[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},E4=function(t,r,n){return!t||!t.length||kd(t,aa(n,"type.defaultProps.domain"))?r:t},oq=function(t,r){var n=t.type.defaultProps?pr(pr({},t.type.defaultProps),t.props):t.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return pr(pr({},ct(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:YD(t),value:Un(r,i),type:l,payload:r,chartType:u,hide:c})};function Fm(e){"@babel/helpers - typeof";return Fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fm(e)}function D4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D4(Object(r),!0).forEach(function(n){B2e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B2e(e,t,r){return t=z2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z2e(e){var t=$2e(e,"string");return Fm(t)=="symbol"?t:t+""}function $2e(e,t){if(Fm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T1=Math.PI/180,F2e=function(t){return t*180/Math.PI},pn=function(t,r,n,i){return{x:t+Math.cos(-T1*i)*n,y:r+Math.sin(-T1*i)*n}},V2e=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},G2e=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=V2e({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:F2e(u),angleInRadian:u}},W2e=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},H2e=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},j4=function(t,r){var n=t.x,i=t.y,a=G2e({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=W2e(r),f=c.startAngle,h=c.endAngle,d=s,v;if(f<=h){for(;d>h;)d-=360;for(;d<f;)d+=360;v=d>=f&&d<=h}else{for(;d>f;)d-=360;for(;d<h;)d+=360;v=d>=h&&d<=f}return v?N4(N4({},r),{},{radius:o,angle:H2e(d,r)}):null};function Vm(e){"@babel/helpers - typeof";return Vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vm(e)}var U2e=["offset"];function Z2e(e){return K2e(e)||q2e(e)||X2e(e)||Y2e()}function Y2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X2e(e,t){if(e){if(typeof e=="string")return ZL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZL(e,t)}}function q2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K2e(e){if(Array.isArray(e))return ZL(e)}function ZL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q2e(e,t){if(e==null)return{};var r=J2e(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function J2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function R4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R4(Object(r),!0).forEach(function(n){eMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eMe(e,t,r){return t=tMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tMe(e){var t=rMe(e,"string");return Vm(t)=="symbol"?t:t+""}function rMe(e,t){if(Vm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gm(){return Gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gm.apply(this,arguments)}var nMe=function(t){var r=t.value,n=t.formatter,i=dt(t.children)?r:t.children;return ft(n)?n(i):i},iMe=function(t,r){var n=ja(r-t),i=Math.min(Math.abs(r-t),360);return n*i},aMe=function(t,r,n){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,l=a,u=l.cx,c=l.cy,f=l.innerRadius,h=l.outerRadius,d=l.startAngle,v=l.endAngle,g=l.clockWise,m=(f+h)/2,x=iMe(d,v),_=x>=0?1:-1,b,S;i==="insideStart"?(b=d+_*o,S=g):i==="insideEnd"?(b=v-_*o,S=!g):i==="end"&&(b=v+_*o,S=g),S=x<=0?S:!S;var T=pn(u,c,m,b),A=pn(u,c,m,b+(S?1:-1)*359),M="M".concat(T.x,",").concat(T.y,`
|
||
A`).concat(m,",").concat(m,",0,1,").concat(S?0:1,`,
|
||
`).concat(A.x,",").concat(A.y),P=dt(t.id)?_v("recharts-radial-line-"):t.id;return Q.createElement("text",Gm({},n,{dominantBaseline:"central",className:xt("recharts-radial-bar-label",s)}),Q.createElement("defs",null,Q.createElement("path",{id:P,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat(P)},r))},oMe=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,h=(c+f)/2;if(i==="outside"){var d=pn(o,s,u+n,h),v=d.x,g=d.y;return{x:v,y:g,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(l+u)/2,x=pn(o,s,m,h),_=x.x,b=x.y;return{x:_,y:b,textAnchor:"middle",verticalAnchor:"middle"}},sMe=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,h=f*i,d=f>0?"end":"start",v=f>0?"start":"end",g=u>=0?1:-1,m=g*i,x=g>0?"end":"start",_=g>0?"start":"end";if(a==="top"){var b={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:d};return Br(Br({},b),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:v};return Br(Br({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var T={x:s-m,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Br(Br({},T),n?{width:Math.max(T.x-n.x,0),height:c}:{})}if(a==="right"){var A={x:s+u+m,y:l+c/2,textAnchor:_,verticalAnchor:"middle"};return Br(Br({},A),n?{width:Math.max(n.x+n.width-A.x,0),height:c}:{})}var M=n?{width:u,height:c}:{};return a==="insideLeft"?Br({x:s+m,y:l+c/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideRight"?Br({x:s+u-m,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},M):a==="insideTop"?Br({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:v},M):a==="insideBottom"?Br({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:d},M):a==="insideTopLeft"?Br({x:s+m,y:l+h,textAnchor:_,verticalAnchor:v},M):a==="insideTopRight"?Br({x:s+u-m,y:l+h,textAnchor:x,verticalAnchor:v},M):a==="insideBottomLeft"?Br({x:s+m,y:l+c-h,textAnchor:_,verticalAnchor:d},M):a==="insideBottomRight"?Br({x:s+u-m,y:l+c-h,textAnchor:x,verticalAnchor:d},M):pv(a)&&(we(a.x)||xc(a.x))&&(we(a.y)||xc(a.y))?Br({x:s+Qc(a.x,u),y:l+Qc(a.y,c),textAnchor:"end",verticalAnchor:"end"},M):Br({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},M)},lMe=function(t){return"cx"in t&&we(t.cx)};function In(e){var t=e.offset,r=t===void 0?5:t,n=Q2e(e,U2e),i=Br({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!a||dt(s)&&dt(l)&&!H.isValidElement(u)&&!ft(u))return null;if(H.isValidElement(u))return H.cloneElement(u,i);var d;if(ft(u)){if(d=H.createElement(u,i),H.isValidElement(d))return d}else d=nMe(i);var v=lMe(a),g=ct(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return aMe(i,d,g);var m=v?oMe(i):sMe(i);return Q.createElement(s1,Gm({className:xt("recharts-label",f)},g,m,{breakAll:h}),d)}In.displayName="Label";var sq=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,d=t.top,v=t.left,g=t.width,m=t.height,x=t.clockWise,_=t.labelViewBox;if(_)return _;if(we(g)&&we(m)){if(we(f)&&we(h))return{x:f,y:h,width:g,height:m};if(we(d)&&we(v))return{x:d,y:v,width:g,height:m}}return we(f)&&we(h)?{x:f,y:h,width:0,height:0}:we(r)&&we(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},uMe=function(t,r){return t?t===!0?Q.createElement(In,{key:"label-implicit",viewBox:r}):Vr(t)?Q.createElement(In,{key:"label-implicit",viewBox:r,value:t}):H.isValidElement(t)?t.type===In?H.cloneElement(t,{key:"label-implicit",viewBox:r}):Q.createElement(In,{key:"label-implicit",content:t,viewBox:r}):ft(t)?Q.createElement(In,{key:"label-implicit",content:t,viewBox:r}):pv(t)?Q.createElement(In,Gm({viewBox:r},t,{key:"label-implicit"})):null:null},cMe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=sq(t),o=oa(i,In).map(function(l,u){return H.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=uMe(t.label,r||a);return[s].concat(Z2e(o))};In.parseViewBox=sq;In.renderCallByParent=cMe;function fMe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var hMe=fMe;const dMe=Ft(hMe);function Wm(e){"@babel/helpers - typeof";return Wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wm(e)}var vMe=["valueAccessor"],pMe=["data","dataKey","clockWise","id","textBreakAll"];function gMe(e){return _Me(e)||xMe(e)||yMe(e)||mMe()}function mMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yMe(e,t){if(e){if(typeof e=="string")return YL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YL(e,t)}}function xMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Me(e){if(Array.isArray(e))return YL(e)}function YL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A1.apply(this,arguments)}function B4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function z4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B4(Object(r),!0).forEach(function(n){bMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bMe(e,t,r){return t=wMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wMe(e){var t=SMe(e,"string");return Wm(t)=="symbol"?t:t+""}function SMe(e,t){if(Wm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $4(e,t){if(e==null)return{};var r=TMe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var AMe=function(t){return Array.isArray(t.value)?dMe(t.value):t.value};function Ss(e){var t=e.valueAccessor,r=t===void 0?AMe:t,n=$4(e,vMe),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=$4(n,pMe);return!i||!i.length?null:Q.createElement(Xt,{className:"recharts-label-list"},i.map(function(c,f){var h=dt(a)?r(c,f):Un(c&&c.payload,a),d=dt(s)?{}:{id:"".concat(s,"-").concat(f)};return Q.createElement(In,A1({},ct(c,!0),u,d,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:In.parseViewBox(dt(o)?c:z4(z4({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Ss.displayName="LabelList";function CMe(e,t){return e?e===!0?Q.createElement(Ss,{key:"labelList-implicit",data:t}):Q.isValidElement(e)||ft(e)?Q.createElement(Ss,{key:"labelList-implicit",data:t,content:e}):pv(e)?Q.createElement(Ss,A1({data:t},e,{key:"labelList-implicit"})):null:null}function MMe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=oa(n,Ss).map(function(o,s){return H.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=CMe(e.label,t);return[a].concat(gMe(i))}Ss.renderCallByParent=MMe;function Hm(e){"@babel/helpers - typeof";return Hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hm(e)}function XL(){return XL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},XL.apply(this,arguments)}function F4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F4(Object(r),!0).forEach(function(n){PMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PMe(e,t,r){return t=LMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LMe(e){var t=kMe(e,"string");return Hm(t)=="symbol"?t:t+""}function kMe(e,t){if(Hm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IMe=function(t,r){var n=ja(r-t),i=Math.min(Math.abs(r-t),359.999);return n*i},px=function(t){var r=t.cx,n=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+i,f=Math.asin(l/c)/T1,h=u?a:a+o*f,d=pn(r,n,c,h),v=pn(r,n,i,h),g=u?a-o*f:a,m=pn(r,n,c*Math.cos(f*T1),g);return{center:d,circleTangency:v,lineTangency:m,theta:f}},lq=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,l=IMe(o,s),u=o+l,c=pn(r,n,a,o),f=pn(r,n,a,u),h="M ".concat(c.x,",").concat(c.y,`
|
||
A `).concat(a,",").concat(a,`,0,
|
||
`).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
|
||
`).concat(f.x,",").concat(f.y,`
|
||
`);if(i>0){var d=pn(r,n,i,o),v=pn(r,n,i,u);h+="L ".concat(v.x,",").concat(v.y,`
|
||
A `).concat(i,",").concat(i,`,0,
|
||
`).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
|
||
`).concat(d.x,",").concat(d.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},OMe=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=ja(c-u),h=px({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),d=h.circleTangency,v=h.lineTangency,g=h.theta,m=px({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=m.circleTangency,_=m.lineTangency,b=m.theta,S=l?Math.abs(u-c):Math.abs(u-c)-g-b;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,`
|
||
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
||
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
||
`):lq({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var T="M ".concat(v.x,",").concat(v.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(d.x,",").concat(d.y,`
|
||
A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
|
||
`);if(i>0){var A=px({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),M=A.circleTangency,P=A.lineTangency,I=A.theta,k=px({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),O=k.circleTangency,D=k.lineTangency,N=k.theta,j=l?Math.abs(u-c):Math.abs(u-c)-I-N;if(j<0&&o===0)return"".concat(T,"L").concat(r,",").concat(n,"Z");T+="L".concat(D.x,",").concat(D.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
|
||
A`).concat(i,",").concat(i,",0,").concat(+(j>180),",").concat(+(f>0),",").concat(M.x,",").concat(M.y,`
|
||
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else T+="L".concat(r,",").concat(n,"Z");return T},EMe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},uq=function(t){var r=V4(V4({},EMe),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,h=r.className;if(o<a||c===f)return null;var d=xt("recharts-sector",h),v=o-a,g=Qc(s,v,0,!0),m;return g>0&&Math.abs(c-f)<360?m=OMe({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):m=lq({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),Q.createElement("path",XL({},ct(r,!0),{className:d,d:m,role:"img"}))};function Um(e){"@babel/helpers - typeof";return Um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Um(e)}function qL(){return qL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qL.apply(this,arguments)}function G4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function W4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G4(Object(r),!0).forEach(function(n){DMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DMe(e,t,r){return t=NMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NMe(e){var t=jMe(e,"string");return Um(t)=="symbol"?t:t+""}function jMe(e,t){if(Um(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Um(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H4={curveBasisClosed:Epe,curveBasisOpen:Dpe,curveBasis:Ope,curveBumpX:ype,curveBumpY:xpe,curveLinearClosed:Npe,curveLinear:VS,curveMonotoneX:jpe,curveMonotoneY:Rpe,curveNatural:Bpe,curveStep:zpe,curveStepAfter:Fpe,curveStepBefore:$pe},gx=function(t){return t.x===+t.x&&t.y===+t.y},Tp=function(t){return t.x},Ap=function(t){return t.y},RMe=function(t,r){if(ft(t))return t;var n="curve".concat($S(t));return(n==="curveMonotone"||n==="curveBump")&&r?H4["".concat(n).concat(r==="vertical"?"Y":"X")]:H4[n]||VS},BMe=function(t){var r=t.type,n=r===void 0?"linear":r,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=RMe(n,s),f=u?a.filter(function(g){return gx(g)}):a,h;if(Array.isArray(o)){var d=u?o.filter(function(g){return gx(g)}):o,v=f.map(function(g,m){return W4(W4({},g),{},{base:d[m]})});return s==="vertical"?h=ox().y(Ap).x1(Tp).x0(function(g){return g.base.x}):h=ox().x(Tp).y1(Ap).y0(function(g){return g.base.y}),h.defined(gx).curve(c),h(v)}return s==="vertical"&&we(o)?h=ox().y(Ap).x1(Tp).x0(o):we(o)?h=ox().x(Tp).y1(Ap).y0(o):h=fY().x(Tp).y(Ap),h.defined(gx).curve(c),h(f)},ad=function(t){var r=t.className,n=t.points,i=t.path,a=t.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?BMe(t):i;return H.createElement("path",qL({},ct(t,!1),Ub(t),{className:xt("recharts-curve",r),d:o,ref:a}))},cq={exports:{}},zMe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",$Me=zMe,FMe=$Me;function fq(){}function hq(){}hq.resetWarningCache=fq;var VMe=function(){function e(n,i,a,o,s,l){if(l!==FMe){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:hq,resetWarningCache:fq};return r.PropTypes=r,r};cq.exports=VMe();var GMe=cq.exports;const kt=Ft(GMe),{getOwnPropertyNames:WMe,getOwnPropertySymbols:HMe}=Object,{hasOwnProperty:UMe}=Object.prototype;function CC(e,t){return function(n,i,a){return e(n,i,a)&&t(n,i,a)}}function mx(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);const{cache:a}=i,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);const l=e(r,n,i);return a.delete(r),a.delete(n),l}}function ZMe(e){return e!=null?e[Symbol.toStringTag]:void 0}function U4(e){return WMe(e).concat(HMe(e))}const YMe=Object.hasOwn||((e,t)=>UMe.call(e,t));function bf(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const XMe="__v",qMe="__o",KMe="_owner",{getOwnPropertyDescriptor:Z4,keys:Y4}=Object;function QMe(e,t){return e.byteLength===t.byteLength&&C1(new Uint8Array(e),new Uint8Array(t))}function JMe(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function ePe(e,t){return e.byteLength===t.byteLength&&C1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function tPe(e,t){return bf(e.getTime(),t.getTime())}function rPe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function nPe(e,t){return e===t}function X4(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const h=o.value,d=s.value;if(r.equals(h[0],d[0],l,f,e,t,r)&&r.equals(h[1],d[1],h[0],d[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const iPe=bf;function aPe(e,t,r){const n=Y4(e);let i=n.length;if(Y4(t).length!==i)return!1;for(;i-- >0;)if(!dq(e,t,r,n[i]))return!1;return!0}function Cp(e,t,r){const n=U4(e);let i=n.length;if(U4(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!dq(e,t,r,a)||(o=Z4(e,a),s=Z4(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function oPe(e,t){return bf(e.valueOf(),t.valueOf())}function sPe(e,t){return e.source===t.source&&e.flags===t.flags}function q4(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function C1(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function lPe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function dq(e,t,r,n){return(n===KMe||n===qMe||n===XMe)&&(e.$$typeof||t.$$typeof)?!0:YMe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const uPe="[object ArrayBuffer]",cPe="[object Arguments]",fPe="[object Boolean]",hPe="[object DataView]",dPe="[object Date]",vPe="[object Error]",pPe="[object Map]",gPe="[object Number]",mPe="[object Object]",yPe="[object RegExp]",xPe="[object Set]",_Pe="[object String]",bPe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},wPe="[object URL]",SPe=Object.prototype.toString;function TPe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:d,unknownTagComparators:v}){return function(m,x,_){if(m===x)return!0;if(m==null||x==null)return!1;const b=typeof m;if(b!==typeof x)return!1;if(b!=="object")return b==="number"?s(m,x,_):b==="function"?a(m,x,_):!1;const S=m.constructor;if(S!==x.constructor)return!1;if(S===Object)return l(m,x,_);if(Array.isArray(m))return t(m,x,_);if(S===Date)return n(m,x,_);if(S===RegExp)return c(m,x,_);if(S===Map)return o(m,x,_);if(S===Set)return f(m,x,_);const T=SPe.call(m);if(T===dPe)return n(m,x,_);if(T===yPe)return c(m,x,_);if(T===pPe)return o(m,x,_);if(T===xPe)return f(m,x,_);if(T===mPe)return typeof m.then!="function"&&typeof x.then!="function"&&l(m,x,_);if(T===wPe)return d(m,x,_);if(T===vPe)return i(m,x,_);if(T===cPe)return l(m,x,_);if(bPe[T])return h(m,x,_);if(T===uPe)return e(m,x,_);if(T===hPe)return r(m,x,_);if(T===fPe||T===gPe||T===_Pe)return u(m,x,_);if(v){let A=v[T];if(!A){const M=ZMe(m);M&&(A=v[M])}if(A)return A(m,x,_)}return!1}}function APe({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:QMe,areArraysEqual:r?Cp:JMe,areDataViewsEqual:ePe,areDatesEqual:tPe,areErrorsEqual:rPe,areFunctionsEqual:nPe,areMapsEqual:r?CC(X4,Cp):X4,areNumbersEqual:iPe,areObjectsEqual:r?Cp:aPe,arePrimitiveWrappersEqual:oPe,areRegExpsEqual:sPe,areSetsEqual:r?CC(q4,Cp):q4,areTypedArraysEqual:r?CC(C1,Cp):C1,areUrlsEqual:lPe,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=mx(n.areArraysEqual),a=mx(n.areMapsEqual),o=mx(n.areObjectsEqual),s=mx(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function CPe(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function MPe({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const PPe=pu();pu({strict:!0});pu({circular:!0});pu({circular:!0,strict:!0});pu({createInternalComparator:()=>bf});pu({strict:!0,createInternalComparator:()=>bf});pu({circular:!0,createInternalComparator:()=>bf});pu({circular:!0,createInternalComparator:()=>bf,strict:!0});function pu(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=APe(e),o=TPe(a),s=r?r(o):CPe(o);return MPe({circular:t,comparator:o,createState:n,equals:s,strict:i})}function LPe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function K4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):LPe(i)};requestAnimationFrame(n)}function KL(e){"@babel/helpers - typeof";return KL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},KL(e)}function kPe(e){return DPe(e)||EPe(e)||OPe(e)||IPe()}function IPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OPe(e,t){if(e){if(typeof e=="string")return Q4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q4(e,t)}}function Q4(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function EPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DPe(e){if(Array.isArray(e))return e}function NPe(){var e={},t=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=kPe(o),l=s[0],u=s.slice(1);if(typeof l=="number"){K4(i.bind(null,u),l);return}i(l),K4(i.bind(null,u));return}KL(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Zm(e){"@babel/helpers - typeof";return Zm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zm(e)}function J4(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J4(Object(r),!0).forEach(function(n){vq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J4(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vq(e,t,r){return t=jPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jPe(e){var t=RPe(e,"string");return Zm(t)==="symbol"?t:String(t)}function RPe(e,t){if(Zm(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zm(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BPe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},zPe=function(t){return t},$Pe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Rg=function(t,r){return Object.keys(r).reduce(function(n,i){return e$(e$({},n),{},vq({},i,t(i,r[i])))},{})},t$=function(t,r,n){return t.map(function(i){return"".concat($Pe(i)," ").concat(r,"ms ").concat(n)}).join(",")};function FPe(e,t){return WPe(e)||GPe(e,t)||pq(e,t)||VPe()}function VPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GPe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function WPe(e){if(Array.isArray(e))return e}function HPe(e){return YPe(e)||ZPe(e)||pq(e)||UPe()}function UPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pq(e,t){if(e){if(typeof e=="string")return QL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return QL(e,t)}}function ZPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YPe(e){if(Array.isArray(e))return QL(e)}function QL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var M1=1e-4,gq=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},mq=function(t,r){return t.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},r$=function(t,r){return function(n){var i=gq(t,r);return mq(i,n)}},XPe=function(t,r){return function(n){var i=gq(t,r),a=[].concat(HPe(i.map(function(o,s){return o*s}).slice(1)),[0]);return mq(a,n)}},n$=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(m){return parseFloat(m)}),c=FPe(u,4);i=c[0],a=c[1],o=c[2],s=c[3]}}}var f=r$(i,o),h=r$(a,s),d=XPe(i,o),v=function(x){return x>1?1:x<0?0:x},g=function(x){for(var _=x>1?1:x,b=_,S=0;S<8;++S){var T=f(b)-_,A=d(b);if(Math.abs(T-_)<M1||A<M1)return h(b);b=v(b-T/A)}return h(b)};return g.isStepper=!1,g},qPe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,h){var d=-(c-f)*n,v=h*a,g=h+(d-v)*s/1e3,m=h*s/1e3+c;return Math.abs(m-f)<M1&&Math.abs(g)<M1?[f,0]:[m,g]};return l.isStepper=!0,l.dt=s,l},KPe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return n$(i);case"spring":return qPe();default:if(i.split("(")[0]==="cubic-bezier")return n$(i)}return typeof i=="function"?i:null};function Ym(e){"@babel/helpers - typeof";return Ym=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ym(e)}function i$(e){return eLe(e)||JPe(e)||yq(e)||QPe()}function QPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eLe(e){if(Array.isArray(e))return ek(e)}function a$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?a$(Object(r),!0).forEach(function(n){JL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JL(e,t,r){return t=tLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tLe(e){var t=rLe(e,"string");return Ym(t)==="symbol"?t:String(t)}function rLe(e,t){if(Ym(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ym(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nLe(e,t){return oLe(e)||aLe(e,t)||yq(e,t)||iLe()}function iLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yq(e,t){if(e){if(typeof e=="string")return ek(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ek(e,t)}}function ek(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aLe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function oLe(e){if(Array.isArray(e))return e}var P1=function(t,r,n){return t+(r-t)*n},tk=function(t){var r=t.from,n=t.to;return r!==n},sLe=function e(t,r,n){var i=Rg(function(a,o){if(tk(o)){var s=t(o.from,o.to,o.velocity),l=nLe(s,2),u=l[0],c=l[1];return cn(cn({},o),{},{from:u,velocity:c})}return o},r);return n<1?Rg(function(a,o){return tk(o)?cn(cn({},o),{},{velocity:P1(o.velocity,i[a].velocity,n),from:P1(o.from,i[a].from,n)}):o},r):e(t,i,n-1)};const lLe=function(e,t,r,n,i){var a=BPe(e,t),o=a.reduce(function(m,x){return cn(cn({},m),{},JL({},x,[e[x],t[x]]))},{}),s=a.reduce(function(m,x){return cn(cn({},m),{},JL({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,u,c,f=function(){return null},h=function(){return Rg(function(x,_){return _.from},s)},d=function(){return!Object.values(s).filter(tk).length},v=function(x){u||(u=x);var _=x-u,b=_/r.dt;s=sLe(r,s,b),i(cn(cn(cn({},e),t),h())),u=x,d()||(l=requestAnimationFrame(f))},g=function(x){c||(c=x);var _=(x-c)/n,b=Rg(function(T,A){return P1.apply(void 0,i$(A).concat([r(_)]))},o);if(i(cn(cn(cn({},e),t),b)),_<1)l=requestAnimationFrame(f);else{var S=Rg(function(T,A){return P1.apply(void 0,i$(A).concat([r(1)]))},o);i(cn(cn(cn({},e),t),S))}};return f=r.isStepper?v:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Od(e){"@babel/helpers - typeof";return Od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Od(e)}var uLe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function cLe(e,t){if(e==null)return{};var r=fLe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fLe(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function MC(e){return pLe(e)||vLe(e)||dLe(e)||hLe()}function hLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dLe(e,t){if(e){if(typeof e=="string")return rk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rk(e,t)}}function vLe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pLe(e){if(Array.isArray(e))return rk(e)}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o$(Object(r),!0).forEach(function(n){fg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fg(e,t,r){return t=xq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mLe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xq(n.key),n)}}function yLe(e,t,r){return t&&mLe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xq(e){var t=xLe(e,"string");return Od(t)==="symbol"?t:String(t)}function xLe(e,t){if(Od(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Od(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _Le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nk(e,t)}function nk(e,t){return nk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},nk(e,t)}function bLe(e){var t=wLe();return function(){var n=L1(e),i;if(t){var a=L1(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return ik(this,i)}}function ik(e,t){if(t&&(Od(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ak(e)}function ak(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wLe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function L1(e){return L1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},L1(e)}var Ro=function(e){_Le(r,e);var t=bLe(r);function r(n,i){var a;gLe(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,h=o.children,d=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(ak(a)),a.changeStyle=a.changeStyle.bind(ak(a)),!s||d<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:c}),ik(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},ik(a);a.state={style:l?fg({},l,u):u}}else a.state={style:{}};return a}return yLe(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,h=this.state.style;if(s){if(!o){var d={style:l?fg({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(d);return}if(!(PPe(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||u?f:i.to;if(this.state&&h){var m={style:l?fg({},l,g):g};(l&&h[l]!==g||!l&&h!==g)&&this.setState(m)}this.runAnimation(Ta(Ta({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,d=lLe(o,s,KPe(u),l,this.changeStyle),v=function(){a.stopJSAnimation=d()};this.manager.start([h,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,h=f===void 0?0:f,d=function(g,m,x){if(x===0)return g;var _=m.duration,b=m.easing,S=b===void 0?"ease":b,T=m.style,A=m.properties,M=m.onAnimationEnd,P=x>0?o[x-1]:m,I=A||Object.keys(T);if(typeof S=="function"||S==="spring")return[].concat(MC(g),[a.runJSAnimation.bind(a,{from:P.style,to:T,duration:_,easing:S}),_]);var k=t$(I,_,S),O=Ta(Ta(Ta({},P.style),T),{},{transition:k});return[].concat(MC(g),[O,_,M]).filter(zPe)};return this.manager.start([l].concat(MC(o.reduce(d,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=NPe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,d=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof d=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var g=s?fg({},s,l):l,m=t$(Object.keys(g),o,u);v.start([c,a,Ta(Ta({},g),{},{transition:m}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=cLe(i,uLe),u=H.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(d){var v=d.props,g=v.style,m=g===void 0?{}:g,x=v.className,_=H.cloneElement(d,Ta(Ta({},l),{},{style:Ta(Ta({},m),c),className:x}));return _};return u===1?f(H.Children.only(a)):Q.createElement("div",null,H.Children.map(a,function(h){return f(h)}))}}]),r}(H.PureComponent);Ro.displayName="Animate";Ro.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ro.propTypes={from:kt.oneOfType([kt.object,kt.string]),to:kt.oneOfType([kt.object,kt.string]),attributeName:kt.string,duration:kt.number,begin:kt.number,easing:kt.oneOfType([kt.string,kt.func]),steps:kt.arrayOf(kt.shape({duration:kt.number.isRequired,style:kt.object.isRequired,easing:kt.oneOfType([kt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),kt.func]),properties:kt.arrayOf("string"),onAnimationEnd:kt.func})),children:kt.oneOfType([kt.node,kt.func]),isActive:kt.bool,canBegin:kt.bool,onAnimationEnd:kt.func,shouldReAnimate:kt.bool,onAnimationStart:kt.func,onAnimationReStart:kt.func};function Xm(e){"@babel/helpers - typeof";return Xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xm(e)}function k1(){return k1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k1.apply(this,arguments)}function SLe(e,t){return MLe(e)||CLe(e,t)||ALe(e,t)||TLe()}function TLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ALe(e,t){if(e){if(typeof e=="string")return s$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s$(e,t)}}function s$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CLe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function MLe(e){if(Array.isArray(e))return e}function l$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function u$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l$(Object(r),!0).forEach(function(n){PLe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PLe(e,t,r){return t=LLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LLe(e){var t=kLe(e,"string");return Xm(t)=="symbol"?t:t+""}function kLe(e,t){if(Xm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var c$=function(t,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,d=4;h<d;h++)f[h]=a[h]>o?o:a[h];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
||
`).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
||
`).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
||
`).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,`
|
||
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,`
|
||
L `).concat(t+n-l*v,",").concat(r,`
|
||
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,`
|
||
L `).concat(t+n,",").concat(r+i-s*v,`
|
||
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,`
|
||
L `).concat(t+l*v,",").concat(r+i,`
|
||
A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},ILe=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=h}return!1},OLe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},XD=function(t){var r=u$(u$({},OLe),t),n=H.useRef(),i=H.useState(-1),a=SLe(i,2),o=a[0],s=a[1];H.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,h=r.radius,d=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,x=r.isAnimationActive,_=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var b=xt("recharts-rectangle",d);return _?Q.createElement(Ro,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:g,animationEasing:v,isActive:_},function(S){var T=S.width,A=S.height,M=S.x,P=S.y;return Q.createElement(Ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:x,easing:v},Q.createElement("path",k1({},ct(r,!0),{className:b,d:c$(M,P,T,A,h),ref:n})))}):Q.createElement("path",k1({},ct(r,!0),{className:b,d:c$(l,u,c,f,h)}))};function ok(){return ok=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ok.apply(this,arguments)}var rT=function(t){var r=t.cx,n=t.cy,i=t.r,a=t.className,o=xt("recharts-dot",a);return r===+r&&n===+n&&i===+i?H.createElement("circle",ok({},ct(t,!1),Ub(t),{className:o,cx:r,cy:n,r:i})):null};function qm(e){"@babel/helpers - typeof";return qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qm(e)}var ELe=["x","y","top","left","width","height","className"];function sk(){return sk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sk.apply(this,arguments)}function f$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DLe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f$(Object(r),!0).forEach(function(n){NLe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NLe(e,t,r){return t=jLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jLe(e){var t=RLe(e,"string");return qm(t)=="symbol"?t:t+""}function RLe(e,t){if(qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BLe(e,t){if(e==null)return{};var r=zLe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zLe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var $Le=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},FLe=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,h=t.height,d=h===void 0?0:h,v=t.className,g=BLe(t,ELe),m=DLe({x:n,y:a,top:s,left:u,width:f,height:d},g);return!we(n)||!we(a)||!we(f)||!we(d)||!we(s)||!we(u)?null:Q.createElement("path",sk({},ct(m,!0),{className:xt("recharts-cross",v),d:$Le(n,a,f,d,s,u)}))},VLe=NY,GLe=VLe(Object.getPrototypeOf,Object),WLe=GLe,HLe=Ys,ULe=WLe,ZLe=Xs,YLe="[object Object]",XLe=Function.prototype,qLe=Object.prototype,_q=XLe.toString,KLe=qLe.hasOwnProperty,QLe=_q.call(Object);function JLe(e){if(!ZLe(e)||HLe(e)!=YLe)return!1;var t=ULe(e);if(t===null)return!0;var r=KLe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&_q.call(r)==QLe}var eke=JLe;const tke=Ft(eke);var rke=Ys,nke=Xs,ike="[object Boolean]";function ake(e){return e===!0||e===!1||nke(e)&&rke(e)==ike}var oke=ake;const ske=Ft(oke);function Km(e){"@babel/helpers - typeof";return Km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Km(e)}function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I1.apply(this,arguments)}function lke(e,t){return hke(e)||fke(e,t)||cke(e,t)||uke()}function uke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cke(e,t){if(e){if(typeof e=="string")return h$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h$(e,t)}}function h$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fke(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function hke(e){if(Array.isArray(e))return e}function d$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function v$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d$(Object(r),!0).forEach(function(n){dke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dke(e,t,r){return t=vke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vke(e){var t=pke(e,"string");return Km(t)=="symbol"?t:t+""}function pke(e,t){if(Km(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Km(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p$=function(t,r,n,i,a){var o=n-i,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+a),s+="L ".concat(t+n-o/2-i,",").concat(r+a),s+="L ".concat(t,",").concat(r," Z"),s},gke={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},mke=function(t){var r=v$(v$({},gke),t),n=H.useRef(),i=H.useState(-1),a=lke(i,2),o=a[0],s=a[1];H.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var b=n.current.getTotalLength();b&&s(b)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,h=r.height,d=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||h!==+h||c===0&&f===0||h===0)return null;var _=xt("recharts-trapezoid",d);return x?Q.createElement(Ro,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:h,x:l,y:u},duration:g,animationEasing:v,isActive:x},function(b){var S=b.upperWidth,T=b.lowerWidth,A=b.height,M=b.x,P=b.y;return Q.createElement(Ro,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:v},Q.createElement("path",I1({},ct(r,!0),{className:_,d:p$(M,P,S,T,A),ref:n})))}):Q.createElement("g",null,Q.createElement("path",I1({},ct(r,!0),{className:_,d:p$(l,u,c,f,h)})))},yke=["option","shapeType","propTransformer","activeClassName","isActive"];function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qm(e)}function xke(e,t){if(e==null)return{};var r=_ke(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _ke(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function g$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function O1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g$(Object(r),!0).forEach(function(n){bke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bke(e,t,r){return t=wke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wke(e){var t=Ske(e,"string");return Qm(t)=="symbol"?t:t+""}function Ske(e,t){if(Qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tke(e,t){return O1(O1({},t),e)}function Ake(e,t){return e==="symbols"}function m$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return Q.createElement(XD,r);case"trapezoid":return Q.createElement(mke,r);case"sector":return Q.createElement(uq,r);case"symbols":if(Ake(t))return Q.createElement(dD,r);break;default:return null}}function Cke(e){return H.isValidElement(e)?e.props:e}function Mke(e){var t=e.option,r=e.shapeType,n=e.propTransformer,i=n===void 0?Tke:n,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=xke(e,yke),u;if(H.isValidElement(t))u=H.cloneElement(t,O1(O1({},l),Cke(t)));else if(ft(t))u=t(l);else if(tke(t)&&!ske(t)){var c=i(t,l);u=Q.createElement(m$,{shapeType:r,elementProps:c})}else{var f=l;u=Q.createElement(m$,{shapeType:r,elementProps:f})}return s?Q.createElement(Xt,{className:o},u):u}function nT(e,t){return t!=null&&"trapezoids"in e.props}function iT(e,t){return t!=null&&"sectors"in e.props}function Jm(e,t){return t!=null&&"points"in e.props}function Pke(e,t){var r,n,i=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,a=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return i&&a}function Lke(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function kke(e,t){var r=e.x===t.x,n=e.y===t.y,i=e.z===t.z;return r&&n&&i}function Ike(e,t){var r;return nT(e,t)?r=Pke:iT(e,t)?r=Lke:Jm(e,t)&&(r=kke),r}function Oke(e,t){var r;return nT(e,t)?r="trapezoids":iT(e,t)?r="sectors":Jm(e,t)&&(r="points"),r}function Eke(e,t){if(nT(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(iT(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Jm(e,t)?t.payload:{}}function Dke(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,i=Oke(r,t),a=Eke(r,t),o=n.filter(function(l,u){var c=kd(a,l),f=r.props[i].filter(function(v){var g=Ike(r,t);return g(v,t)}),h=r.props[i].indexOf(f[f.length-1]),d=u===h;return c&&d}),s=n.indexOf(o[o.length-1]);return s}var Nke=Math.ceil,jke=Math.max;function Rke(e,t,r,n){for(var i=-1,a=jke(Nke((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Bke=Rke,zke=JY,y$=1/0,$ke=17976931348623157e292;function Fke(e){if(!e)return e===0?e:0;if(e=zke(e),e===y$||e===-y$){var t=e<0?-1:1;return t*$ke}return e===e?e:0}var Vke=Fke,Gke=Bke,Wke=US,PC=Vke;function Hke(e){return function(t,r,n){return n&&typeof n!="number"&&Wke(t,r,n)&&(r=n=void 0),t=PC(t),r===void 0?(r=t,t=0):r=PC(r),n=n===void 0?t<r?1:-1:PC(n),Gke(t,r,n,e)}}var Uke=Hke,Zke=Uke,Yke=Zke(),Xke=Yke;const E1=Ft(Xke);function ey(e){"@babel/helpers - typeof";return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ey(e)}function x$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(r),!0).forEach(function(n){bq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bq(e,t,r){return t=qke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qke(e){var t=Kke(e,"string");return ey(t)=="symbol"?t:t+""}function Kke(e,t){if(ey(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ey(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qke=["Webkit","Moz","O","ms"],Jke=function(t,r){var n=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=Qke.reduce(function(a,o){return _$(_$({},a),{},bq({},o+n,r))},{});return i[t]=r,i};function Ed(e){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ed(e)}function D1(){return D1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D1.apply(this,arguments)}function b$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b$(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sq(n.key),n)}}function tIe(e,t,r){return t&&w$(e.prototype,t),r&&w$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rIe(e,t,r){return t=N1(t),nIe(e,wq()?Reflect.construct(t,r||[],N1(e).constructor):t.apply(e,r))}function nIe(e,t){if(t&&(Ed(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iIe(e)}function iIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wq=function(){return!!e})()}function N1(e){return N1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},N1(e)}function aIe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lk(e,t)}function lk(e,t){return lk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},lk(e,t)}function mi(e,t,r){return t=Sq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sq(e){var t=oIe(e,"string");return Ed(t)=="symbol"?t:t+""}function oIe(e,t){if(Ed(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ed(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sIe=function(t){var r=t.data,n=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Ng().domain(E1(0,l)).range([a,a+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(i),scale:u,scaleValues:c}},S$=function(t){return t.changedTouches&&!!t.changedTouches.length},Dd=function(e){function t(r){var n;return eIe(this,t),n=rIe(this,t,[r]),mi(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),mi(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),mi(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),mi(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),mi(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),mi(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),mi(n,"handleSlideDragStart",function(i){var a=S$(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return aIe(t,e),tIe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),h=Math.max(i,a),d=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:d-d%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Un(a[n],s,n);return ft(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,h=l.startIndex,d=l.endIndex,v=l.onChange,g=n.pageX-a;g>0?g=Math.min(g,u+c-f-s,u+c-f-o):g<0&&(g=Math.max(g,u-o,u-s));var m=this.getIndex({startX:o+g,endX:s+g});(m.startIndex!==h||m.endIndex!==d)&&v&&v(m),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=S$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,h=c.width,d=c.travellerWidth,v=c.onChange,g=c.gap,m=c.data,x={startX:this.state.startX,endX:this.state.endX},_=n.pageX-a;_>0?_=Math.min(_,f+h-d-u):_<0&&(_=Math.max(_,f-u)),x[o]=u+_;var b=this.getIndex(x),S=b.startIndex,T=b.endIndex,A=function(){var P=m.length-1;return o==="startX"&&(s>l?S%g===0:T%g===0)||s<l&&T===P||o==="endX"&&(s>l?T%g===0:S%g===0)||s>l&&T===P};this.setState(mi(mi({},o,u+_),"brushMoveStartX",n.pageX),function(){v&&A()&&v(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var d=s[h];i==="startX"&&d>=u||i==="endX"&&d<=l||this.setState(mi({},i,d),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return Q.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=H.Children.only(u);return f?Q.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,h=l.traveller,d=l.ariaLabel,v=l.data,g=l.startIndex,m=l.endIndex,x=Math.max(n,this.props.x),_=LC(LC({},ct(this.props,!1)),{},{x,y:u,width:c,height:f}),b=d||"Min value: ".concat((a=v[g])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[m])===null||o===void 0?void 0:o.name);return Q.createElement(Xt,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),s.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,_))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,h=c.endX,d=5,v={pointerEvents:"none",fill:u};return Q.createElement(Xt,{className:"recharts-brush-texts"},Q.createElement(s1,D1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-d,y:o+s/2},v),this.getTextOfTick(i)),Q.createElement(s1,D1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+d,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,h=this.state,d=h.startX,v=h.endX,g=h.isTextActive,m=h.isSlideMoving,x=h.isTravellerMoving,_=h.isTravellerFocused;if(!i||!i.length||!we(s)||!we(l)||!we(u)||!we(c)||u<=0||c<=0)return null;var b=xt("recharts-brush",a),S=Q.Children.count(o)===1,T=Jke("userSelect","none");return Q.createElement(Xt,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(d,v),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(v,"endX"),(g||m||x||_||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),Q.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return Q.isValidElement(n)?a=Q.cloneElement(n,i):ft(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return LC({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?sIe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(d){return i.scale(d)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(H.PureComponent);mi(Dd,"displayName","Brush");mi(Dd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var lIe=bD;function uIe(e,t){var r;return lIe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var cIe=uIe,fIe=MY,hIe=Tv,dIe=cIe,vIe=di,pIe=US;function gIe(e,t,r){var n=vIe(e)?fIe:dIe;return r&&pIe(e,t,r)&&(t=void 0),n(e,hIe(t))}var mIe=gIe;const yIe=Ft(mIe);var ko=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},T$=YY;function xIe(e,t,r){t=="__proto__"&&T$?T$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _Ie=xIe,bIe=_Ie,wIe=UY,SIe=Tv;function TIe(e,t){var r={};return t=SIe(t),wIe(e,function(n,i,a){bIe(r,i,t(n,i,a))}),r}var AIe=TIe;const CIe=Ft(AIe);function MIe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var PIe=MIe,LIe=bD;function kIe(e,t){var r=!0;return LIe(e,function(n,i,a){return r=!!t(n,i,a),r}),r}var IIe=kIe,OIe=PIe,EIe=IIe,DIe=Tv,NIe=di,jIe=US;function RIe(e,t,r){var n=NIe(e)?OIe:EIe;return r&&jIe(e,t,r)&&(t=void 0),n(e,DIe(t))}var BIe=RIe;const zIe=Ft(BIe);var $Ie=["x","y"];function ty(e){"@babel/helpers - typeof";return ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ty(e)}function uk(){return uk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uk.apply(this,arguments)}function A$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(r),!0).forEach(function(n){FIe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FIe(e,t,r){return t=VIe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VIe(e){var t=GIe(e,"string");return ty(t)=="symbol"?t:t+""}function GIe(e,t){if(ty(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ty(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WIe(e,t){if(e==null)return{};var r=HIe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HIe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function UIe(e,t){var r=e.x,n=e.y,i=WIe(e,$Ie),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Mp(Mp(Mp(Mp(Mp({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function C$(e){return Q.createElement(Mke,uk({shapeType:"rectangle",propTransformer:UIe,activeClassName:"recharts-active-bar"},e))}var ZIe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=we(n)||ive(n);return a?t(n,i):(a||ef(),r)}},YIe=["value","background"],Tq;function Nd(e){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}function XIe(e,t){if(e==null)return{};var r=qIe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qIe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function j1(){return j1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j1.apply(this,arguments)}function M$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(r),!0).forEach(function(n){Ml(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cq(n.key),n)}}function QIe(e,t,r){return t&&P$(e.prototype,t),r&&P$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function JIe(e,t,r){return t=R1(t),eOe(e,Aq()?Reflect.construct(t,r||[],R1(e).constructor):t.apply(e,r))}function eOe(e,t){if(t&&(Nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tOe(e)}function tOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Aq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Aq=function(){return!!e})()}function R1(e){return R1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},R1(e)}function rOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ck(e,t)}function ck(e,t){return ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ck(e,t)}function Ml(e,t,r){return t=Cq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cq(e){var t=nOe(e,"string");return Nd(t)=="symbol"?t:t+""}function nOe(e,t){if(Nd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Jy=function(e){function t(){var r;KIe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=JIe(this,t,[].concat(i)),Ml(r,"state",{isAnimationFinished:!1}),Ml(r,"id",_v("recharts-bar-")),Ml(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ml(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return rOe(t,e),QIe(t,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,c=ct(this.props,!1);return n&&n.map(function(f,h){var d=h===l,v=d?u:o,g=Lr(Lr(Lr({},c),f),{},{isActive:d,option:v,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return Q.createElement(Xt,j1({className:"recharts-bar-rectangle"},Zb(i.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),Q.createElement(C$,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,c=i.animationEasing,f=i.animationId,h=this.state.prevData;return Q.createElement(Ro,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var v=d.t,g=a.map(function(m,x){var _=h&&h[x];if(_){var b=vn(_.x,m.x),S=vn(_.y,m.y),T=vn(_.width,m.width),A=vn(_.height,m.height);return Lr(Lr({},m),{},{x:b(v),y:S(v),width:T(v),height:A(v)})}if(o==="horizontal"){var M=vn(0,m.height),P=M(v);return Lr(Lr({},m),{},{y:m.y+m.height-P,height:P})}var I=vn(0,m.width),k=I(v);return Lr(Lr({},m),{},{width:k})});return Q.createElement(Xt,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!kd(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=ct(this.props.background,!1);return a.map(function(u,c){u.value;var f=u.background,h=XIe(u,YIe);if(!f)return null;var d=Lr(Lr(Lr(Lr(Lr({},h),{},{fill:"#eee"},f),l),Zb(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return Q.createElement(C$,j1({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},d))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=oa(c,Qy);if(!f)return null;var h=u==="vertical"?o[0].height/2:o[0].width/2,d=function(m,x){var _=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:_,errorVal:Un(m,x)}},v={clipPath:n?"url(#clipPath-".concat(i,")"):null};return Q.createElement(Xt,v,f.map(function(g){return Q.cloneElement(g,{key:"error-bar-".concat(i,"-").concat(g.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:h,dataPointFormatter:d})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,h=n.height,d=n.isAnimationActive,v=n.background,g=n.id;if(i||!a||!a.length)return null;var m=this.state.isAnimationFinished,x=xt("recharts-bar",o),_=s&&s.allowDataOverflow,b=l&&l.allowDataOverflow,S=_||b,T=dt(g)?this.id:g;return Q.createElement(Xt,{className:x},_||b?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(T)},Q.createElement("rect",{x:_?u:u-f/2,y:b?c:c-h/2,width:_?f:f*2,height:b?h:h*2}))):null,Q.createElement(Xt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(T,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,T),(!d||m)&&Ss.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(H.PureComponent);Tq=Jy;Ml(Jy,"displayName","Bar");Ml(Jy,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!yf.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ml(Jy,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,d=M2e(n,r);if(!d)return null;var v=t.layout,g=r.type.defaultProps,m=g!==void 0?Lr(Lr({},g),r.props):r.props,x=m.dataKey,_=m.children,b=m.minPointSize,S=v==="horizontal"?o:a,T=u?S.scale.domain():null,A=N2e({numericAxis:S}),M=oa(_,rX),P=f.map(function(I,k){var O,D,N,j,z,$;u?O=P2e(u[c+k],T):(O=Un(I,x),Array.isArray(O)||(O=[A,O]));var U=ZIe(b,Tq.defaultProps.minPointSize)(O[1],k);if(v==="horizontal"){var F,V=[o.scale(O[0]),o.scale(O[1])],W=V[0],Y=V[1];D=k4({axis:a,ticks:s,bandSize:i,offset:d.offset,entry:I,index:k}),N=(F=Y??W)!==null&&F!==void 0?F:void 0,j=d.size;var Z=W-Y;if(z=Number.isNaN(Z)?0:Z,$={x:D,y:o.y,width:j,height:o.height},Math.abs(U)>0&&Math.abs(z)<Math.abs(U)){var J=ja(z||U)*(Math.abs(U)-Math.abs(z));N-=J,z+=J}}else{var ne=[a.scale(O[0]),a.scale(O[1])],le=ne[0],fe=ne[1];if(D=le,N=k4({axis:o,ticks:l,bandSize:i,offset:d.offset,entry:I,index:k}),j=fe-le,z=d.size,$={x:a.x,y:N,width:a.width,height:z},Math.abs(U)>0&&Math.abs(j)<Math.abs(U)){var ze=ja(j||U)*(Math.abs(U)-Math.abs(j));j+=ze}}return Lr(Lr(Lr({},I),{},{x:D,y:N,width:j,height:z,value:u?O:O[1],payload:I,background:$},M&&M[k]&&M[k].props),{},{tooltipPayload:[oq(r,I)],tooltipPosition:{x:D+j/2,y:N+z/2}})});return Lr({data:P,layout:v},h)});function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function iOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mq(n.key),n)}}function aOe(e,t,r){return t&&L$(e.prototype,t),r&&L$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(r),!0).forEach(function(n){aT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aT(e,t,r){return t=Mq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mq(e){var t=oOe(e,"string");return ry(t)=="symbol"?t:t+""}function oOe(e,t){if(ry(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ry(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pq=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!xi(u,Jy);return c.reduce(function(d,v){var g=r[v],m=g.orientation,x=g.domain,_=g.padding,b=_===void 0?{}:_,S=g.mirror,T=g.reversed,A="".concat(m).concat(S?"Mirror":""),M,P,I,k,O;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var D=x[1]-x[0],N=1/0,j=g.categoricalDomain.sort(sve);if(j.forEach(function(ne,le){le>0&&(N=Math.min((ne||0)-(j[le-1]||0),N))}),Number.isFinite(N)){var z=N/D,$=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(M=z*$/2),g.padding==="no-gap"){var U=Qc(t.barCategoryGap,z*$),F=z*$/2;M=F-U-(F-U)/$*U}}}i==="xAxis"?P=[n.left+(b.left||0)+(M||0),n.left+n.width-(b.right||0)-(M||0)]:i==="yAxis"?P=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(M||0),n.top+n.height-(b.bottom||0)-(M||0)]:P=g.range,T&&(P=[P[1],P[0]]);var V=A2e(g,a,h),W=V.scale,Y=V.realScaleType;W.domain(x).range(P),C2e(W);var Z=D2e(W,Oa(Oa({},g),{},{realScaleType:Y}));i==="xAxis"?(O=m==="top"&&!S||m==="bottom"&&S,I=n.left,k=f[A]-O*g.height):i==="yAxis"&&(O=m==="left"&&!S||m==="right"&&S,I=f[A]-O*g.width,k=n.top);var J=Oa(Oa(Oa({},g),Z),{},{realScaleType:Y,x:I,y:k,scale:W,width:i==="xAxis"?n.width:g.width,height:i==="yAxis"?n.height:g.height});return J.bandSize=S1(J,Z),!g.hide&&i==="xAxis"?f[A]+=(O?-1:1)*J.height:g.hide||(f[A]+=(O?-1:1)*J.width),Oa(Oa({},d),{},aT({},v,J))},{})},Lq=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},sOe=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return Lq({x:r,y:n},{x:i,y:a})},kq=function(){function e(t){iOe(this,e),this.scale=t}return aOe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();aT(kq,"EPS",1e-4);var qD=function(t){var r=Object.keys(t).reduce(function(n,i){return Oa(Oa({},n),{},aT({},i,kq.create(t[i])))},{});return Oa(Oa({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return CIe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return zIe(i,function(a,o){return r[o].isInRange(a)})}})};function lOe(e){return(e%180+180)%180}var uOe=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=lOe(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},cOe=cde(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Iq=H.createContext(void 0),Oq=H.createContext(void 0),Eq=H.createContext(void 0),fOe=H.createContext({}),Dq=H.createContext(void 0),Nq=H.createContext(0),jq=H.createContext(0),I$=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=cOe(a);return Q.createElement(Iq.Provider,{value:n},Q.createElement(Oq.Provider,{value:i},Q.createElement(fOe.Provider,{value:a},Q.createElement(Eq.Provider,{value:c},Q.createElement(Dq.Provider,{value:o},Q.createElement(Nq.Provider,{value:u},Q.createElement(jq.Provider,{value:l},s)))))))},hOe=function(){return H.useContext(Dq)},Rq=function(t){var r=H.useContext(Iq);r==null&&ef();var n=r[t];return n==null&&ef(),n},Bq=function(t){var r=H.useContext(Oq);r==null&&ef();var n=r[t];return n==null&&ef(),n},dOe=function(){var t=H.useContext(Eq);return t},zq=function(){return H.useContext(jq)},$q=function(){return H.useContext(Nq)};function jd(e){"@babel/helpers - typeof";return jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jd(e)}function vOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vq(n.key),n)}}function gOe(e,t,r){return t&&pOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mOe(e,t,r){return t=B1(t),yOe(e,Fq()?Reflect.construct(t,r||[],B1(e).constructor):t.apply(e,r))}function yOe(e,t){if(t&&(jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xOe(e)}function xOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fq=function(){return!!e})()}function B1(e){return B1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},B1(e)}function _Oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fk(e,t)}function fk(e,t){return fk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fk(e,t)}function O$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function E$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O$(Object(r),!0).forEach(function(n){KD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KD(e,t,r){return t=Vq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vq(e){var t=bOe(e,"string");return jd(t)=="symbol"?t:t+""}function bOe(e,t){if(jd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wOe(e,t){return COe(e)||AOe(e,t)||TOe(e,t)||SOe()}function SOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TOe(e,t){if(e){if(typeof e=="string")return D$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D$(e,t)}}function D$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AOe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function COe(e){if(Array.isArray(e))return e}function hk(){return hk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hk.apply(this,arguments)}var MOe=function(t,r){var n;return Q.isValidElement(t)?n=Q.cloneElement(t,r):ft(t)?n=t(r):n=Q.createElement("line",hk({},r,{className:"recharts-reference-line-line"})),n},POe=function(t,r,n,i,a,o,s,l,u){var c=a.x,f=a.y,h=a.width,d=a.height;if(n){var v=u.y,g=t.y.apply(v,{position:o});if(ko(u,"discard")&&!t.y.isInRange(g))return null;var m=[{x:c+h,y:g},{x:c,y:g}];return l==="left"?m.reverse():m}if(r){var x=u.x,_=t.x.apply(x,{position:o});if(ko(u,"discard")&&!t.x.isInRange(_))return null;var b=[{x:_,y:f+d},{x:_,y:f}];return s==="top"?b.reverse():b}if(i){var S=u.segment,T=S.map(function(A){return t.apply(A,{position:o})});return ko(u,"discard")&&yIe(T,function(A){return!t.isInRange(A)})?null:T}return null};function LOe(e){var t=e.x,r=e.y,n=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=hOe(),c=Rq(i),f=Bq(a),h=dOe();if(!u||!h)return null;Ec(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=qD({x:c.scale,y:f.scale}),v=Vr(t),g=Vr(r),m=n&&n.length===2,x=POe(d,v,g,m,h,e.position,c.orientation,f.orientation,e);if(!x)return null;var _=wOe(x,2),b=_[0],S=b.x,T=b.y,A=_[1],M=A.x,P=A.y,I=ko(e,"hidden")?"url(#".concat(u,")"):void 0,k=E$(E$({clipPath:I},ct(e,!0)),{},{x1:S,y1:T,x2:M,y2:P});return Q.createElement(Xt,{className:xt("recharts-reference-line",s)},MOe(o,k),In.renderCallByParent(e,sOe({x1:S,y1:T,x2:M,y2:P})))}var ny=function(e){function t(){return vOe(this,t),mOe(this,t,arguments)}return _Oe(t,e),gOe(t,[{key:"render",value:function(){return Q.createElement(LOe,this.props)}}])}(Q.Component);KD(ny,"displayName","ReferenceLine");KD(ny,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function dk(){return dk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dk.apply(this,arguments)}function Rd(e){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}function N$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function j$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N$(Object(r),!0).forEach(function(n){oT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wq(n.key),n)}}function OOe(e,t,r){return t&&IOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EOe(e,t,r){return t=z1(t),DOe(e,Gq()?Reflect.construct(t,r||[],z1(e).constructor):t.apply(e,r))}function DOe(e,t){if(t&&(Rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NOe(e)}function NOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gq=function(){return!!e})()}function z1(e){return z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},z1(e)}function jOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vk(e,t)}function vk(e,t){return vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vk(e,t)}function oT(e,t,r){return t=Wq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wq(e){var t=ROe(e,"string");return Rd(t)=="symbol"?t:t+""}function ROe(e,t){if(Rd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BOe=function(t){var r=t.x,n=t.y,i=t.xAxis,a=t.yAxis,o=qD({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return ko(t,"discard")&&!o.isInRange(s)?null:s},sT=function(e){function t(){return kOe(this,t),EOe(this,t,arguments)}return jOe(t,e),OOe(t,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Vr(i),c=Vr(a);if(Ec(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=BOe(this.props);if(!f)return null;var h=f.x,d=f.y,v=this.props,g=v.shape,m=v.className,x=ko(this.props,"hidden")?"url(#".concat(l,")"):void 0,_=j$(j$({clipPath:x},ct(this.props,!0)),{},{cx:h,cy:d});return Q.createElement(Xt,{className:xt("recharts-reference-dot",m)},t.renderDot(g,_),In.renderCallByParent(this.props,{x:h-o,y:d-o,width:2*o,height:2*o}))}}])}(Q.Component);oT(sT,"displayName","ReferenceDot");oT(sT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});oT(sT,"renderDot",function(e,t){var r;return Q.isValidElement(e)?r=Q.cloneElement(e,t):ft(e)?r=e(t):r=Q.createElement(rT,dk({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function pk(){return pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pk.apply(this,arguments)}function Bd(e){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bd(e)}function R$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(r),!0).forEach(function(n){lT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Uq(n.key),n)}}function FOe(e,t,r){return t&&$Oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VOe(e,t,r){return t=$1(t),GOe(e,Hq()?Reflect.construct(t,r||[],$1(e).constructor):t.apply(e,r))}function GOe(e,t){if(t&&(Bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WOe(e)}function WOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hq=function(){return!!e})()}function $1(e){return $1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$1(e)}function HOe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gk(e,t)}function gk(e,t){return gk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gk(e,t)}function lT(e,t,r){return t=Uq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uq(e){var t=UOe(e,"string");return Bd(t)=="symbol"?t:t+""}function UOe(e,t){if(Bd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZOe=function(t,r,n,i,a){var o=a.x1,s=a.x2,l=a.y1,u=a.y2,c=a.xAxis,f=a.yAxis;if(!c||!f)return null;var h=qD({x:c.scale,y:f.scale}),d={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},v={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return ko(a,"discard")&&(!h.isInRange(d)||!h.isInRange(v))?null:Lq(d,v)},uT=function(e){function t(){return zOe(this,t),VOe(this,t,arguments)}return HOe(t,e),FOe(t,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;Ec(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Vr(i),h=Vr(a),d=Vr(o),v=Vr(s),g=this.props.shape;if(!f&&!h&&!d&&!v&&!g)return null;var m=ZOe(f,h,d,v,this.props);if(!m&&!g)return null;var x=ko(this.props,"hidden")?"url(#".concat(c,")"):void 0;return Q.createElement(Xt,{className:xt("recharts-reference-area",l)},t.renderRect(g,B$(B$({clipPath:x},ct(this.props,!0)),m)),In.renderCallByParent(this.props,m))}}])}(Q.Component);lT(uT,"displayName","ReferenceArea");lT(uT,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});lT(uT,"renderRect",function(e,t){var r;return Q.isValidElement(e)?r=Q.cloneElement(e,t):ft(e)?r=e(t):r=Q.createElement(XD,pk({},t,{className:"recharts-reference-area-rect"})),r});function Zq(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function YOe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return uOe(n,r)}function XOe(e,t,r){var n=r==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function F1(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function qOe(e,t){return Zq(e,t+1)}function KOe(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:Zq(n,u)};var g=l,m,x=function(){return m===void 0&&(m=r(v,g)),m},_=v.coordinate,b=l===0||F1(e,_,x,c,s);b||(l=0,c=o,u+=1),b&&(c=_+e*(x()/2+i),l+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function iy(e){"@babel/helpers - typeof";return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iy(e)}function z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z$(Object(r),!0).forEach(function(n){QOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QOe(e,t,r){return t=JOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JOe(e){var t=eEe(e,"string");return iy(t)=="symbol"?t:t+""}function eEe(e,t){if(iy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(iy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tEe(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=t.start,l=t.end,u=function(h){var d=a[h],v,g=function(){return v===void 0&&(v=r(d,h)),v};if(h===o-1){var m=e*(d.coordinate+e*g()/2-l);a[h]=d=Mn(Mn({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate})}else a[h]=d=Mn(Mn({},d),{},{tickCoord:d.coordinate});var x=F1(e,d.tickCoord,g,s,l);x&&(l=d.tickCoord-e*(g()/2+i),a[h]=Mn(Mn({},d),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function rEe(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),h=e*(c.coordinate+e*f/2-u);o[s-1]=c=Mn(Mn({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var d=F1(e,c.tickCoord,function(){return f},l,u);d&&(u=c.tickCoord-e*(f/2+i),o[s-1]=Mn(Mn({},c),{},{isShow:!0}))}for(var v=a?s-1:s,g=function(_){var b=o[_],S,T=function(){return S===void 0&&(S=r(b,_)),S};if(_===0){var A=e*(b.coordinate-e*T()/2-l);o[_]=b=Mn(Mn({},b),{},{tickCoord:A<0?b.coordinate-A*e:b.coordinate})}else o[_]=b=Mn(Mn({},b),{},{tickCoord:b.coordinate});var M=F1(e,b.tickCoord,T,l,u);M&&(l=b.tickCoord+e*(T()/2+i),o[_]=Mn(Mn({},b),{},{isShow:!0}))},m=0;m<v;m++)g(m);return o}function nEe(e,t,r){var n=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!i||!i.length||!n)return[];if(we(l)||yf.isSsr)return qOe(i,typeof l=="number"&&we(l)?l:0);var h=[],d=s==="top"||s==="bottom"?"width":"height",v=c&&d==="width"?Dg(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(b,S){var T=ft(u)?u(b.value,S):b.value;return d==="width"?YOe(Dg(T,{fontSize:t,letterSpacing:r}),v,f):Dg(T,{fontSize:t,letterSpacing:r})[d]},m=i.length>=2?ja(i[1].coordinate-i[0].coordinate):1,x=XOe(a,m,d);return l==="equidistantPreserveStart"?KOe(m,x,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=rEe(m,x,g,i,o,l==="preserveStartEnd"):h=tEe(m,x,g,i,o),h.filter(function(_){return _.isShow}))}var iEe=["viewBox"],aEe=["viewBox"],oEe=["ticks"];function zd(e){"@babel/helpers - typeof";return zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zd(e)}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bh.apply(this,arguments)}function $$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$$(Object(r),!0).forEach(function(n){QD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kC(e,t){if(e==null)return{};var r=sEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function sEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xq(n.key),n)}}function uEe(e,t,r){return t&&F$(e.prototype,t),r&&F$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cEe(e,t,r){return t=V1(t),fEe(e,Yq()?Reflect.construct(t,r||[],V1(e).constructor):t.apply(e,r))}function fEe(e,t){if(t&&(zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hEe(e)}function hEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yq=function(){return!!e})()}function V1(e){return V1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},V1(e)}function dEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mk(e,t)}function mk(e,t){return mk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mk(e,t)}function QD(e,t,r){return t=Xq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xq(e){var t=vEe(e,"string");return zd(t)=="symbol"?t:t+""}function vEe(e,t){if(zd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cT=function(e){function t(r){var n;return lEe(this,t),n=cEe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return dEe(t,e),uEe(t,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=kC(n,iEe),s=this.props,l=s.viewBox,u=kC(s,aEe);return!td(a,l)||!td(o,u)||!td(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,u=i.orientation,c=i.tickSize,f=i.mirror,h=i.tickMargin,d,v,g,m,x,_,b=f?-1:1,S=n.tickSize||c,T=we(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":d=v=n.coordinate,m=o+ +!f*l,g=m-b*S,_=g-b*h,x=T;break;case"left":g=m=n.coordinate,v=a+ +!f*s,d=v-b*S,x=d-b*h,_=T;break;case"right":g=m=n.coordinate,v=a+ +f*s,d=v+b*S,x=d+b*h,_=T;break;default:d=v=n.coordinate,m=o+ +f*l,g=m+b*S,_=g+b*h,x=T;break}return{line:{x1:d,y1:g,x2:v,y2:m},tick:{x,y:_}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Rr(Rr(Rr({},ct(this.props,!1)),ct(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!u||l==="bottom"&&u);f=Rr(Rr({},f),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var d=+(l==="left"&&!u||l==="right"&&u);f=Rr(Rr({},f),{},{x1:i+d*o,y1:a,x2:i+d*o,y2:a+s})}return Q.createElement("line",Bh({},f,{className:xt("recharts-cartesian-axis-line",aa(c,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,h=s.unit,d=nEe(Rr(Rr({},this.props),{},{ticks:n}),i,a),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),m=ct(this.props,!1),x=ct(c,!1),_=Rr(Rr({},m),{},{fill:"none"},ct(l,!1)),b=d.map(function(S,T){var A=o.getTickLineCoord(S),M=A.line,P=A.tick,I=Rr(Rr(Rr(Rr({textAnchor:v,verticalAnchor:g},m),{},{stroke:"none",fill:u},x),P),{},{index:T,payload:S,visibleTicksCount:d.length,tickFormatter:f});return Q.createElement(Xt,Bh({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},Zb(o.props,S,T)),l&&Q.createElement("line",Bh({},_,M,{className:xt("recharts-cartesian-axis-tick-line",aa(l,"className"))})),c&&t.renderTickItem(c,I,"".concat(ft(f)?f(S.value,T):S.value).concat(h||"")))});return Q.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,u=i.className,c=i.hide;if(c)return null;var f=this.props,h=f.ticks,d=kC(f,oEe),v=h;return ft(l)&&(v=h&&h.length>0?l(this.props):l(d)),o<=0||s<=0||!v||!v.length?null:Q.createElement(Xt,{className:xt("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),In.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=xt(i.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(n)?o=Q.cloneElement(n,Rr(Rr({},i),{},{className:s})):ft(n)?o=n(Rr(Rr({},i),{},{className:s})):o=Q.createElement(s1,Bh({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(H.Component);QD(cT,"displayName","CartesianAxis");QD(cT,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var pEe=["type","layout","connectNulls","ref"],gEe=["key"];function $d(e){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$d(e)}function V$(e,t){if(e==null)return{};var r=mEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bg.apply(this,arguments)}function G$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G$(Object(r),!0).forEach(function(n){Ea(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hf(e){return bEe(e)||_Ee(e)||xEe(e)||yEe()}function yEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xEe(e,t){if(e){if(typeof e=="string")return yk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yk(e,t)}}function _Ee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bEe(e){if(Array.isArray(e))return yk(e)}function yk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kq(n.key),n)}}function SEe(e,t,r){return t&&W$(e.prototype,t),r&&W$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function TEe(e,t,r){return t=G1(t),AEe(e,qq()?Reflect.construct(t,r||[],G1(e).constructor):t.apply(e,r))}function AEe(e,t){if(t&&($d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CEe(e)}function CEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qq=function(){return!!e})()}function G1(e){return G1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},G1(e)}function MEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xk(e,t)}function xk(e,t){return xk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xk(e,t)}function Ea(e,t,r){return t=Kq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kq(e){var t=PEe(e,"string");return $d(t)=="symbol"?t:t+""}function PEe(e,t){if($d(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var e0=function(e){function t(){var r;wEe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=TEe(this,t,[].concat(i)),Ea(r,"state",{isAnimationFinished:!0,totalLength:0}),Ea(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Ea(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(x,_){return x+_});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,h=s-o,d=[],v=0,g=0;v<l.length;g+=l[v],++v)if(g+l[v]>f){d=[].concat(Hf(l.slice(0,v)),[f-g]);break}var m=d.length%2===0?[0,h]:[h];return[].concat(Hf(t.repeat(l,c)),Hf(d),m).map(function(x){return"".concat(x,"px")}).join(", ")}),Ea(r,"id",_v("recharts-line-")),Ea(r,"pathRef",function(o){r.mainCurve=o}),Ea(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Ea(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return MEe(t,e),SEe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=oa(c,Qy);if(!f)return null;var h=function(g,m){return{x:g.x,y:g.y,value:g.value,errorVal:Un(g.payload,m)}},d={clipPath:n?"url(#clipPath-".concat(i,")"):null};return Q.createElement(Xt,d,f.map(function(v){return Q.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=ct(this.props,!1),h=ct(l,!0),d=u.map(function(g,m){var x=gi(gi(gi({key:"dot-".concat(m),r:3},f),h),{},{index:m,cx:g.x,cy:g.y,value:g.value,dataKey:c,payload:g.payload,points:u});return t.renderDotItem(l,x)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return Q.createElement(Xt,Bg({className:"recharts-line-dots",key:"dots"},v),d)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=V$(s,pEe),h=gi(gi(gi({},ct(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return Q.createElement(ad,Bg({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,d=o.animationId,v=o.animateNewValues,g=o.width,m=o.height,x=this.state,_=x.prevPoints,b=x.totalLength;return Q.createElement(Ro,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var T=S.t;if(_){var A=_.length/s.length,M=s.map(function(D,N){var j=Math.floor(N*A);if(_[j]){var z=_[j],$=vn(z.x,D.x),U=vn(z.y,D.y);return gi(gi({},D),{},{x:$(T),y:U(T)})}if(v){var F=vn(g*2,D.x),V=vn(m/2,D.y);return gi(gi({},D),{},{x:F(T),y:V(T)})}return gi(gi({},D),{},{x:D.x,y:D.y})});return a.renderCurveStatically(M,n,i)}var P=vn(0,b),I=P(T),k;if(l){var O="".concat(l).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});k=a.getStrokeDasharray(I,b,O)}else k=a.generateSimpleStrokeDasharray(b,I);return a.renderCurveStatically(s,n,i,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!kd(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,h=i.left,d=i.width,v=i.height,g=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,_=s.length===1,b=xt("recharts-line",l),S=u&&u.allowDataOverflow,T=c&&c.allowDataOverflow,A=S||T,M=dt(m)?this.id:m,P=(n=ct(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=P.r,k=I===void 0?3:I,O=P.strokeWidth,D=O===void 0?2:O,N=QZ(o)?o:{},j=N.clipDot,z=j===void 0?!0:j,$=k*2+D;return Q.createElement(Xt,{className:b},S||T?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:S?h:h-d/2,y:T?f:f-v/2,width:S?d:d*2,height:T?v:v*2})),!z&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-$/2,y:f-$/2,width:d+$,height:v+$}))):null,!_&&this.renderCurve(A,M),this.renderErrorBar(A,M),(_||o)&&this.renderDots(A,z,M),(!g||x)&&Ss.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Hf(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Hf(o),Hf(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(Q.isValidElement(n))a=Q.cloneElement(n,i);else if(ft(n))a=n(i);else{var o=i.key,s=V$(i,gEe),l=xt("recharts-line-dot",typeof n!="boolean"?n.className:"");a=Q.createElement(rT,Bg({key:o},s,{className:l}))}return a}}])}(H.PureComponent);Ea(e0,"displayName","Line");Ea(e0,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!yf.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ea(e0,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(h,d){var v=Un(h,o);return c==="horizontal"?{x:w1({axis:r,ticks:i,bandSize:s,entry:h,index:d}),y:dt(v)?null:n.scale(v),value:v,payload:h}:{x:dt(v)?null:r.scale(v),y:w1({axis:n,ticks:a,bandSize:s,entry:h,index:d}),value:v,payload:h}});return gi({points:f,layout:c},u)});var LEe=["layout","type","stroke","connectNulls","isRange","ref"],kEe=["key"],Qq;function Fd(e){"@babel/helpers - typeof";return Fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fd(e)}function Jq(e,t){if(e==null)return{};var r=IEe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function H$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(r),!0).forEach(function(n){_o(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tK(n.key),n)}}function EEe(e,t,r){return t&&U$(e.prototype,t),r&&U$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function DEe(e,t,r){return t=W1(t),NEe(e,eK()?Reflect.construct(t,r||[],W1(e).constructor):t.apply(e,r))}function NEe(e,t){if(t&&(Fd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jEe(e)}function jEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eK=function(){return!!e})()}function W1(e){return W1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},W1(e)}function REe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_k(e,t)}function _k(e,t){return _k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},_k(e,t)}function _o(e,t,r){return t=tK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tK(e){var t=BEe(e,"string");return Fd(t)=="symbol"?t:t+""}function BEe(e,t){if(Fd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gu=function(e){function t(){var r;OEe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=DEe(this,t,[].concat(i)),_o(r,"state",{isAnimationFinished:!0}),_o(r,"id",_v("recharts-area-")),_o(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ft(o)&&o()}),_o(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ft(o)&&o()}),r}return REe(t,e),EEe(t,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,h=ct(this.props,!1),d=ct(u,!0),v=c.map(function(m,x){var _=dl(dl(dl({key:"dot-".concat(x),r:3},h),d),{},{index:x,cx:m.x,cy:m.y,dataKey:f,value:m.value,payload:m.payload,points:c});return t.renderDotItem(u,_)}),g={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return Q.createElement(Xt,Sc({className:"recharts-area-dots"},g),v)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=Cl(o.map(function(h){return h.y||0}));return we(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Cl(a.map(function(h){return h.y||0})),f)),we(f)?Q.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=Cl(o.map(function(h){return h.x||0}));return we(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Cl(a.map(function(h){return h.x||0})),f)),we(f)?Q.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,h=s.isRange;s.ref;var d=Jq(s,LEe);return Q.createElement(Xt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},Q.createElement(ad,Sc({},ct(d,!0),{points:n,connectNulls:f,type:u,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&Q.createElement(ad,Sc({},ct(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&h&&Q.createElement(ad,Sc({},ct(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,d=o.animationId,v=this.state,g=v.prevPoints,m=v.prevBaseLine;return Q.createElement(Ro,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var _=x.t;if(g){var b=g.length/s.length,S=s.map(function(P,I){var k=Math.floor(I*b);if(g[k]){var O=g[k],D=vn(O.x,P.x),N=vn(O.y,P.y);return dl(dl({},P),{},{x:D(_),y:N(_)})}return P}),T;if(we(l)&&typeof l=="number"){var A=vn(m,l);T=A(_)}else if(dt(l)||xv(l)){var M=vn(m,0);T=M(_)}else T=l.map(function(P,I){var k=Math.floor(I*b);if(m[k]){var O=m[k],D=vn(O.x,P.x),N=vn(O.y,P.y);return dl(dl({},P),{},{x:D(_),y:N(_)})}return P});return a.renderAreaStatically(S,T,n,i)}return Q.createElement(Xt,null,Q.createElement("defs",null,Q.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(_))),Q.createElement(Xt,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,l,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,s=a.baseLine,l=a.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return l&&o&&o.length&&(!c&&h>0||!kd(c,o)||!kd(f,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.top,c=i.left,f=i.xAxis,h=i.yAxis,d=i.width,v=i.height,g=i.isAnimationActive,m=i.id;if(a||!s||!s.length)return null;var x=this.state.isAnimationFinished,_=s.length===1,b=xt("recharts-area",l),S=f&&f.allowDataOverflow,T=h&&h.allowDataOverflow,A=S||T,M=dt(m)?this.id:m,P=(n=ct(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=P.r,k=I===void 0?3:I,O=P.strokeWidth,D=O===void 0?2:O,N=QZ(o)?o:{},j=N.clipDot,z=j===void 0?!0:j,$=k*2+D;return Q.createElement(Xt,{className:b},S||T?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:S?c:c-d/2,y:T?u:u-v/2,width:S?d:d*2,height:T?v:v*2})),!z&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:c-$/2,y:u-$/2,width:d+$,height:v+$}))):null,_?null:this.renderArea(A,M),(o||_)&&this.renderDots(A,z,M),(!g||x)&&Ss.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(H.PureComponent);Qq=gu;_o(gu,"displayName","Area");_o(gu,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!yf.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});_o(gu,"getBaseValue",function(e,t,r,n){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(we(s)&&typeof s=="number")return s;var l=i==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});_o(gu,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,d=t.layout,v=u&&u.length,g=Qq.getBaseValue(t,r,n,i),m=d==="horizontal",x=!1,_=f.map(function(S,T){var A;v?A=u[c+T]:(A=Un(S,l),Array.isArray(A)?x=!0:A=[g,A]);var M=A[1]==null||v&&Un(S,l)==null;return m?{x:w1({axis:n,ticks:a,bandSize:s,entry:S,index:T}),y:M?null:i.scale(A[1]),value:A,payload:S}:{x:M?null:n.scale(A[1]),y:w1({axis:i,ticks:o,bandSize:s,entry:S,index:T}),value:A,payload:S}}),b;return v||x?b=_.map(function(S){var T=Array.isArray(S.value)?S.value[0]:null;return m?{x:S.x,y:T!=null&&S.y!=null?i.scale(T):null}:{x:T!=null?n.scale(T):null,y:S.y}}):b=m?i.scale(g):n.scale(g),dl({points:_,baseLine:b,layout:d,isRange:x},h)});_o(gu,"renderDotItem",function(e,t){var r;if(Q.isValidElement(e))r=Q.cloneElement(e,t);else if(ft(e))r=e(t);else{var n=xt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=Jq(t,kEe);r=Q.createElement(rT,Sc({},a,{key:i,className:n}))}return r});function Vd(e){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vd(e)}function zEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iK(n.key),n)}}function FEe(e,t,r){return t&&$Ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VEe(e,t,r){return t=H1(t),GEe(e,rK()?Reflect.construct(t,r||[],H1(e).constructor):t.apply(e,r))}function GEe(e,t){if(t&&(Vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WEe(e)}function WEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rK=function(){return!!e})()}function H1(e){return H1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},H1(e)}function HEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bk(e,t)}function bk(e,t){return bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},bk(e,t)}function nK(e,t,r){return t=iK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iK(e){var t=UEe(e,"string");return Vd(t)=="symbol"?t:t+""}function UEe(e,t){if(Vd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wk(){return wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wk.apply(this,arguments)}function ZEe(e){var t=e.xAxisId,r=zq(),n=$q(),i=Rq(t);return i==null?null:H.createElement(cT,wk({},i,{className:xt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return wc(o,!0)}}))}var Pv=function(e){function t(){return zEe(this,t),VEe(this,t,arguments)}return HEe(t,e),FEe(t,[{key:"render",value:function(){return H.createElement(ZEe,this.props)}}])}(H.Component);nK(Pv,"displayName","XAxis");nK(Pv,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function YEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XEe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sK(n.key),n)}}function qEe(e,t,r){return t&&XEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KEe(e,t,r){return t=U1(t),QEe(e,aK()?Reflect.construct(t,r||[],U1(e).constructor):t.apply(e,r))}function QEe(e,t){if(t&&(Gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JEe(e)}function JEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aK=function(){return!!e})()}function U1(e){return U1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},U1(e)}function eDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sk(e,t)}function Sk(e,t){return Sk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sk(e,t)}function oK(e,t,r){return t=sK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sK(e){var t=tDe(e,"string");return Gd(t)=="symbol"?t:t+""}function tDe(e,t){if(Gd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Tk(){return Tk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tk.apply(this,arguments)}var rDe=function(t){var r=t.yAxisId,n=zq(),i=$q(),a=Bq(r);return a==null?null:H.createElement(cT,Tk({},a,{className:xt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return wc(s,!0)}}))},Lv=function(e){function t(){return YEe(this,t),KEe(this,t,arguments)}return eDe(t,e),qEe(t,[{key:"render",value:function(){return H.createElement(rDe,this.props)}}])}(H.Component);oK(Lv,"displayName","YAxis");oK(Lv,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function Z$(e){return oDe(e)||aDe(e)||iDe(e)||nDe()}function nDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iDe(e,t){if(e){if(typeof e=="string")return Ak(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ak(e,t)}}function aDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oDe(e){if(Array.isArray(e))return Ak(e)}function Ak(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ck=function(t,r,n,i,a){var o=oa(t,ny),s=oa(t,sT),l=[].concat(Z$(o),Z$(s)),u=oa(t,uT),c="".concat(i,"Id"),f=i[0],h=r;if(l.length&&(h=l.reduce(function(g,m){if(m.props[c]===n&&ko(m.props,"extendDomain")&&we(m.props[f])){var x=m.props[f];return[Math.min(g[0],x),Math.max(g[1],x)]}return g},h)),u.length){var d="".concat(f,"1"),v="".concat(f,"2");h=u.reduce(function(g,m){if(m.props[c]===n&&ko(m.props,"extendDomain")&&we(m.props[d])&&we(m.props[v])){var x=m.props[d],_=m.props[v];return[Math.min(g[0],x,_),Math.max(g[1],x,_)]}return g},h)}return a&&a.length&&(h=a.reduce(function(g,m){return we(m)?[Math.min(g[0],m),Math.max(g[1],m)]:g},h)),h},lK={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function a(l,u,c,f,h){if(typeof c!="function")throw new TypeError("The listener must be a function");var d=new i(c,f||l,h),v=r?r+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],d]:l._events[v].push(d):(l._events[v]=d,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,d=f.length,v=new Array(d);h<d;h++)v[h]=f[h].fn;return v},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,h,d,v){var g=r?r+u:u;if(!this._events[g])return!1;var m=this._events[g],x=arguments.length,_,b;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,c),!0;case 3:return m.fn.call(m.context,c,f),!0;case 4:return m.fn.call(m.context,c,f,h),!0;case 5:return m.fn.call(m.context,c,f,h,d),!0;case 6:return m.fn.call(m.context,c,f,h,d,v),!0}for(b=1,_=new Array(x-1);b<x;b++)_[b-1]=arguments[b];m.fn.apply(m.context,_)}else{var S=m.length,T;for(b=0;b<S;b++)switch(m[b].once&&this.removeListener(u,m[b].fn,void 0,!0),x){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,c);break;case 3:m[b].fn.call(m[b].context,c,f);break;case 4:m[b].fn.call(m[b].context,c,f,h);break;default:if(!_)for(T=1,_=new Array(x-1);T<x;T++)_[T-1]=arguments[T];m[b].fn.apply(m[b].context,_)}}return!0},s.prototype.on=function(u,c,f){return a(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return a(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,h){var d=r?r+u:u;if(!this._events[d])return this;if(!c)return o(this,d),this;var v=this._events[d];if(v.fn)v.fn===c&&(!h||v.once)&&(!f||v.context===f)&&o(this,d);else{for(var g=0,m=[],x=v.length;g<x;g++)(v[g].fn!==c||h&&!v[g].once||f&&v[g].context!==f)&&m.push(v[g]);m.length?this._events[d]=m.length===1?m[0]:m:o(this,d)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(lK);var sDe=lK.exports;const lDe=Ft(sDe);var IC=new lDe,OC="recharts.syncMouseEvents";function ay(e){"@babel/helpers - typeof";return ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ay(e)}function uDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uK(n.key),n)}}function fDe(e,t,r){return t&&cDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function EC(e,t,r){return t=uK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uK(e){var t=hDe(e,"string");return ay(t)=="symbol"?t:t+""}function hDe(e,t){if(ay(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ay(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dDe=function(){function e(){uDe(this,e),EC(this,"activeIndex",0),EC(this,"coordinateList",[]),EC(this,"layout","horizontal")}return fDe(e,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,h=r.mouseHandlerCallback,d=h===void 0?null:h;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=d??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+l+u,h=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function vDe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],i=e==null?void 0:e[1];if(n&&i&&we(n)&&we(i))return!0}return!1}function pDe(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function cK(e){var t=e.cx,r=e.cy,n=e.radius,i=e.startAngle,a=e.endAngle,o=pn(t,r,n,i),s=pn(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function gDe(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,h=pn(s,l,u,f),d=pn(s,l,c,f);n=h.x,i=h.y,a=d.x,o=d.y}else return cK(t);return[{x:n,y:i},{x:a,y:o}]}function oy(e){"@babel/helpers - typeof";return oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oy(e)}function Y$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y$(Object(r),!0).forEach(function(n){mDe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mDe(e,t,r){return t=yDe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yDe(e){var t=xDe(e,"string");return oy(t)=="symbol"?t:t+""}function xDe(e,t){if(oy(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oy(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _De(e){var t,r,n=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,d=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!d||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var v,g=ad;if(h==="ScatterChart")v=o,g=FLe;else if(h==="BarChart")v=pDe(f,o,l,c),g=XD;else if(f==="radial"){var m=cK(o),x=m.cx,_=m.cy,b=m.radius,S=m.startAngle,T=m.endAngle;v={cx:x,cy:_,startAngle:S,endAngle:T,innerRadius:b,outerRadius:b},g=uq}else v={points:gDe(f,o,l)},g=ad;var A=yx(yx(yx(yx({stroke:"#ccc",pointerEvents:"none"},l),v),ct(d,!1)),{},{payload:s,payloadIndex:u,className:xt("recharts-tooltip-cursor",d.className)});return H.isValidElement(d)?H.cloneElement(d,A):H.createElement(g,A)}var bDe=["item"],wDe=["children","className","width","height","style","compact","title","desc"];function Wd(e){"@babel/helpers - typeof";return Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wd(e)}function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zh.apply(this,arguments)}function X$(e,t){return ADe(e)||TDe(e,t)||hK(e,t)||SDe()}function SDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TDe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ADe(e){if(Array.isArray(e))return e}function q$(e,t){if(e==null)return{};var r=CDe(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CDe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function MDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PDe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dK(n.key),n)}}function LDe(e,t,r){return t&&PDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kDe(e,t,r){return t=Z1(t),IDe(e,fK()?Reflect.construct(t,r||[],Z1(e).constructor):t.apply(e,r))}function IDe(e,t){if(t&&(Wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ODe(e)}function ODe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fK=function(){return!!e})()}function Z1(e){return Z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z1(e)}function EDe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mk(e,t)}function Mk(e,t){return Mk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mk(e,t)}function Hd(e){return jDe(e)||NDe(e)||hK(e)||DDe()}function DDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hK(e,t){if(e){if(typeof e=="string")return Pk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pk(e,t)}}function NDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jDe(e){if(Array.isArray(e))return Pk(e)}function Pk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function K$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K$(Object(r),!0).forEach(function(n){Ke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ke(e,t,r){return t=dK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dK(e){var t=RDe(e,"string");return Wd(t)=="symbol"?t:t+""}function RDe(e,t){if(Wd(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wd(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BDe={xAxis:["bottom","top"],yAxis:["left","right"]},zDe={width:"100%",height:"100%"},vK={x:0,y:0};function xx(e){return e}var $De=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},FDe=function(t,r,n,i){var a=r.find(function(c){return c&&c.index===n});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return ce(ce(ce({},i),pn(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,u=i.angle;return ce(ce(ce({},i),pn(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return vK},fT=function(t,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Hd(s),Hd(u)):s},[]);return o.length>0?o:t&&t.length&&we(i)&&we(a)?t.slice(i,a+1):[]};function pK(e){return e==="number"?[0,"auto"]:void 0}var Lk=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=fT(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var d=f===void 0?s:f;h=Hb(d,o.dataKey,i)}else h=f&&f[n]||s[n];return h?[].concat(Hd(l),[oq(u,h)]):l},[])},Q$=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=$De(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=x2e(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,h=Lk(t,r,c,f),d=FDe(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:d}}return null},VDe=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,d=iq(c,a);return n.reduce(function(v,g){var m,x=g.type.defaultProps!==void 0?ce(ce({},g.type.defaultProps),g.props):g.props,_=x.type,b=x.dataKey,S=x.allowDataOverflow,T=x.allowDuplicatedCategory,A=x.scale,M=x.ticks,P=x.includeHidden,I=x[o];if(v[I])return v;var k=fT(t.data,{graphicalItems:i.filter(function(Z){var J,ne=o in Z.props?Z.props[o]:(J=Z.type.defaultProps)===null||J===void 0?void 0:J[o];return ne===I}),dataStartIndex:l,dataEndIndex:u}),O=k.length,D,N,j;vDe(x.domain,S,_)&&(D=UL(x.domain,null,S),d&&(_==="number"||A!=="auto")&&(j=jg(k,b,"category")));var z=pK(_);if(!D||D.length===0){var $,U=($=x.domain)!==null&&$!==void 0?$:z;if(b){if(D=jg(k,b,_),_==="category"&&d){var F=ove(D);T&&F?(N=D,D=E1(0,O)):T||(D=E4(U,D,g).reduce(function(Z,J){return Z.indexOf(J)>=0?Z:[].concat(Hd(Z),[J])},[]))}else if(_==="category")T?D=D.filter(function(Z){return Z!==""&&!dt(Z)}):D=E4(U,D,g).reduce(function(Z,J){return Z.indexOf(J)>=0||J===""||dt(J)?Z:[].concat(Hd(Z),[J])},[]);else if(_==="number"){var V=T2e(k,i.filter(function(Z){var J,ne,le=o in Z.props?Z.props[o]:(J=Z.type.defaultProps)===null||J===void 0?void 0:J[o],fe="hide"in Z.props?Z.props.hide:(ne=Z.type.defaultProps)===null||ne===void 0?void 0:ne.hide;return le===I&&(P||!fe)}),b,a,c);V&&(D=V)}d&&(_==="number"||A!=="auto")&&(j=jg(k,b,"category"))}else d?D=E1(0,O):s&&s[I]&&s[I].hasStack&&_==="number"?D=h==="expand"?[0,1]:aq(s[I].stackGroups,l,u):D=nq(k,i.filter(function(Z){var J=o in Z.props?Z.props[o]:Z.type.defaultProps[o],ne="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return J===I&&(P||!ne)}),_,c,!0);if(_==="number")D=Ck(f,D,I,a,M),U&&(D=UL(U,D,S));else if(_==="category"&&U){var W=U,Y=D.every(function(Z){return W.indexOf(Z)>=0});Y&&(D=W)}}return ce(ce({},v),{},Ke({},I,ce(ce({},x),{},{axisType:a,domain:D,categoricalDomain:j,duplicateDomain:N,originalDomain:(m=x.domain)!==null&&m!==void 0?m:z,isCategorical:d,layout:c})))},{})},GDe=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=fT(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),d=h.length,v=iq(c,a),g=-1;return n.reduce(function(m,x){var _=x.type.defaultProps!==void 0?ce(ce({},x.type.defaultProps),x.props):x.props,b=_[o],S=pK("number");if(!m[b]){g++;var T;return v?T=E1(0,d):s&&s[b]&&s[b].hasStack?(T=aq(s[b].stackGroups,l,u),T=Ck(f,T,b,a)):(T=UL(S,nq(h,n.filter(function(A){var M,P,I=o in A.props?A.props[o]:(M=A.type.defaultProps)===null||M===void 0?void 0:M[o],k="hide"in A.props?A.props.hide:(P=A.type.defaultProps)===null||P===void 0?void 0:P.hide;return I===b&&!k}),"number",c),i.defaultProps.allowDataOverflow),T=Ck(f,T,b,a)),ce(ce({},m),{},Ke({},b,ce(ce({axisType:a},i.defaultProps),{},{hide:!0,orientation:aa(BDe,"".concat(a,".").concat(g%2),null),domain:T,originalDomain:S,isCategorical:v,layout:c})))}return m},{})},WDe=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=oa(c,a),d={};return h&&h.length?d=VDe(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(d=GDe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),d},HDe=function(t){var r=_h(t),n=wc(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:wD(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:S1(r,n)}},J$=function(t){var r=t.children,n=t.defaultShowTooltip,i=xi(r,Dd),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},UDe=function(t){return!t||!t.length?!1:t.some(function(r){var n=bs(r&&r.type);return n&&n.indexOf("Bar")>=0})},eF=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ZDe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,h=n.margin||{},d=xi(f,Dd),v=xi(f,rd),g=Object.keys(l).reduce(function(T,A){var M=l[A],P=M.orientation;return!M.mirror&&!M.hide?ce(ce({},T),{},Ke({},P,T[P]+M.width)):T},{left:h.left||0,right:h.right||0}),m=Object.keys(o).reduce(function(T,A){var M=o[A],P=M.orientation;return!M.mirror&&!M.hide?ce(ce({},T),{},Ke({},P,aa(T,"".concat(P))+M.height)):T},{top:h.top||0,bottom:h.bottom||0}),x=ce(ce({},m),g),_=x.bottom;d&&(x.bottom+=d.props.height||Dd.defaultProps.height),v&&r&&(x=w2e(x,i,n,r));var b=u-x.left-x.right,S=c-x.top-x.bottom;return ce(ce({brushBottom:_},x),{},{width:Math.max(b,0),height:Math.max(S,0)})},YDe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},gK=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(x,_){var b=_.graphicalItems,S=_.stackGroups,T=_.offset,A=_.updateId,M=_.dataStartIndex,P=_.dataEndIndex,I=x.barSize,k=x.layout,O=x.barGap,D=x.barCategoryGap,N=x.maxBarSize,j=eF(k),z=j.numericAxisName,$=j.cateAxisName,U=UDe(b),F=[];return b.forEach(function(V,W){var Y=fT(x.data,{graphicalItems:[V],dataStartIndex:M,dataEndIndex:P}),Z=V.type.defaultProps!==void 0?ce(ce({},V.type.defaultProps),V.props):V.props,J=Z.dataKey,ne=Z.maxBarSize,le=Z["".concat(z,"Id")],fe=Z["".concat($,"Id")],ze={},xe=l.reduce(function(qr,Jn){var Of=_["".concat(Jn.axisType,"Map")],S0=Z["".concat(Jn.axisType,"Id")];Of&&Of[S0]||Jn.axisType==="zAxis"||ef();var T0=Of[S0];return ce(ce({},qr),{},Ke(Ke({},Jn.axisType,T0),"".concat(Jn.axisType,"Ticks"),wc(T0)))},ze),ie=xe[$],he=xe["".concat($,"Ticks")],ue=S&&S[le]&&S[le].hasStack&&j2e(V,S[le].stackGroups),ee=bs(V.type).indexOf("Bar")>=0,Ve=S1(ie,he),Se=[],Ge=U&&_2e({barSize:I,stackGroups:S,totalSize:YDe(xe,$)});if(ee){var Ye,vt,Vt=dt(ne)?N:ne,nr=(Ye=(vt=S1(ie,he,!0))!==null&&vt!==void 0?vt:Vt)!==null&&Ye!==void 0?Ye:0;Se=b2e({barGap:O,barCategoryGap:D,bandSize:nr!==Ve?nr:Ve,sizeList:Ge[fe],maxBarSize:Vt}),nr!==Ve&&(Se=Se.map(function(qr){return ce(ce({},qr),{},{position:ce(ce({},qr.position),{},{offset:qr.position.offset-nr/2})})}))}var jn=V&&V.type&&V.type.getComposedData;jn&&F.push({props:ce(ce({},jn(ce(ce({},xe),{},{displayedData:Y,props:x,dataKey:J,item:V,bandSize:Ve,barPosition:Se,offset:T,stackedData:ue,layout:k,dataStartIndex:M,dataEndIndex:P}))),{},Ke(Ke(Ke({key:V.key||"item-".concat(W)},z,xe[z]),$,xe[$]),"animationId",A)),childIndex:yve(V,x.children),item:V})}),F},d=function(x,_){var b=x.props,S=x.dataStartIndex,T=x.dataEndIndex,A=x.updateId;if(!M3({props:b}))return null;var M=b.children,P=b.layout,I=b.stackOffset,k=b.data,O=b.reverseStackOrder,D=eF(P),N=D.numericAxisName,j=D.cateAxisName,z=oa(M,n),$=E2e(k,z,"".concat(N,"Id"),"".concat(j,"Id"),I,O),U=l.reduce(function(Z,J){var ne="".concat(J.axisType,"Map");return ce(ce({},Z),{},Ke({},ne,WDe(b,ce(ce({},J),{},{graphicalItems:z,stackGroups:J.axisType===N&&$,dataStartIndex:S,dataEndIndex:T}))))},{}),F=ZDe(ce(ce({},U),{},{props:b,graphicalItems:z}),_==null?void 0:_.legendBBox);Object.keys(U).forEach(function(Z){U[Z]=c(b,U[Z],F,Z.replace("Map",""),r)});var V=U["".concat(j,"Map")],W=HDe(V),Y=h(b,ce(ce({},U),{},{dataStartIndex:S,dataEndIndex:T,updateId:A,graphicalItems:z,stackGroups:$,offset:F}));return ce(ce({formattedGraphicalItems:Y,graphicalItems:z,offset:F,stackGroups:$},W),U)},v=function(m){function x(_){var b,S,T;return MDe(this,x),T=kDe(this,x,[_]),Ke(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ke(T,"accessibilityManager",new dDe),Ke(T,"handleLegendBBoxUpdate",function(A){if(A){var M=T.state,P=M.dataStartIndex,I=M.dataEndIndex,k=M.updateId;T.setState(ce({legendBBox:A},d({props:T.props,dataStartIndex:P,dataEndIndex:I,updateId:k},ce(ce({},T.state),{},{legendBBox:A}))))}}),Ke(T,"handleReceiveSyncEvent",function(A,M,P){if(T.props.syncId===A){if(P===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(M)}}),Ke(T,"handleBrushChange",function(A){var M=A.startIndex,P=A.endIndex;if(M!==T.state.dataStartIndex||P!==T.state.dataEndIndex){var I=T.state.updateId;T.setState(function(){return ce({dataStartIndex:M,dataEndIndex:P},d({props:T.props,dataStartIndex:M,dataEndIndex:P,updateId:I},T.state))}),T.triggerSyncEvent({dataStartIndex:M,dataEndIndex:P})}}),Ke(T,"handleMouseEnter",function(A){var M=T.getMouseInfo(A);if(M){var P=ce(ce({},M),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var I=T.props.onMouseEnter;ft(I)&&I(P,A)}}),Ke(T,"triggeredAfterMouseMove",function(A){var M=T.getMouseInfo(A),P=M?ce(ce({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(P),T.triggerSyncEvent(P);var I=T.props.onMouseMove;ft(I)&&I(P,A)}),Ke(T,"handleItemMouseEnter",function(A){T.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Ke(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Ke(T,"handleMouseMove",function(A){A.persist(),T.throttleTriggeredAfterMouseMove(A)}),Ke(T,"handleMouseLeave",function(A){T.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};T.setState(M),T.triggerSyncEvent(M);var P=T.props.onMouseLeave;ft(P)&&P(M,A)}),Ke(T,"handleOuterEvent",function(A){var M=mve(A),P=aa(T.props,"".concat(M));if(M&&ft(P)){var I,k;/.*touch.*/i.test(M)?k=T.getMouseInfo(A.changedTouches[0]):k=T.getMouseInfo(A),P((I=k)!==null&&I!==void 0?I:{},A)}}),Ke(T,"handleClick",function(A){var M=T.getMouseInfo(A);if(M){var P=ce(ce({},M),{},{isTooltipActive:!0});T.setState(P),T.triggerSyncEvent(P);var I=T.props.onClick;ft(I)&&I(P,A)}}),Ke(T,"handleMouseDown",function(A){var M=T.props.onMouseDown;if(ft(M)){var P=T.getMouseInfo(A);M(P,A)}}),Ke(T,"handleMouseUp",function(A){var M=T.props.onMouseUp;if(ft(M)){var P=T.getMouseInfo(A);M(P,A)}}),Ke(T,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Ke(T,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.handleMouseDown(A.changedTouches[0])}),Ke(T,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&T.handleMouseUp(A.changedTouches[0])}),Ke(T,"handleDoubleClick",function(A){var M=T.props.onDoubleClick;if(ft(M)){var P=T.getMouseInfo(A);M(P,A)}}),Ke(T,"handleContextMenu",function(A){var M=T.props.onContextMenu;if(ft(M)){var P=T.getMouseInfo(A);M(P,A)}}),Ke(T,"triggerSyncEvent",function(A){T.props.syncId!==void 0&&IC.emit(OC,T.props.syncId,A,T.eventEmitterSymbol)}),Ke(T,"applySyncEvent",function(A){var M=T.props,P=M.layout,I=M.syncMethod,k=T.state.updateId,O=A.dataStartIndex,D=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)T.setState(ce({dataStartIndex:O,dataEndIndex:D},d({props:T.props,dataStartIndex:O,dataEndIndex:D,updateId:k},T.state)));else if(A.activeTooltipIndex!==void 0){var N=A.chartX,j=A.chartY,z=A.activeTooltipIndex,$=T.state,U=$.offset,F=$.tooltipTicks;if(!U)return;if(typeof I=="function")z=I(F,A);else if(I==="value"){z=-1;for(var V=0;V<F.length;V++)if(F[V].value===A.activeLabel){z=V;break}}var W=ce(ce({},U),{},{x:U.left,y:U.top}),Y=Math.min(N,W.x+W.width),Z=Math.min(j,W.y+W.height),J=F[z]&&F[z].value,ne=Lk(T.state,T.props.data,z),le=F[z]?{x:P==="horizontal"?F[z].coordinate:Y,y:P==="horizontal"?Z:F[z].coordinate}:vK;T.setState(ce(ce({},A),{},{activeLabel:J,activeCoordinate:le,activePayload:ne,activeTooltipIndex:z}))}else T.setState(A)}),Ke(T,"renderCursor",function(A){var M,P=T.state,I=P.isTooltipActive,k=P.activeCoordinate,O=P.activePayload,D=P.offset,N=P.activeTooltipIndex,j=P.tooltipAxisBandSize,z=T.getTooltipEventType(),$=(M=A.props.active)!==null&&M!==void 0?M:I,U=T.props.layout,F=A.key||"_recharts-cursor";return Q.createElement(_De,{key:F,activeCoordinate:k,activePayload:O,activeTooltipIndex:N,chartName:r,element:A,isActive:$,layout:U,offset:D,tooltipAxisBandSize:j,tooltipEventType:z})}),Ke(T,"renderPolarAxis",function(A,M,P){var I=aa(A,"type.axisType"),k=aa(T.state,"".concat(I,"Map")),O=A.type.defaultProps,D=O!==void 0?ce(ce({},O),A.props):A.props,N=k&&k[D["".concat(I,"Id")]];return H.cloneElement(A,ce(ce({},N),{},{className:xt(I,N.className),key:A.key||"".concat(M,"-").concat(P),ticks:wc(N,!0)}))}),Ke(T,"renderPolarGrid",function(A){var M=A.props,P=M.radialLines,I=M.polarAngles,k=M.polarRadius,O=T.state,D=O.radiusAxisMap,N=O.angleAxisMap,j=_h(D),z=_h(N),$=z.cx,U=z.cy,F=z.innerRadius,V=z.outerRadius;return H.cloneElement(A,{polarAngles:Array.isArray(I)?I:wc(z,!0).map(function(W){return W.coordinate}),polarRadius:Array.isArray(k)?k:wc(j,!0).map(function(W){return W.coordinate}),cx:$,cy:U,innerRadius:F,outerRadius:V,key:A.key||"polar-grid",radialLines:P})}),Ke(T,"renderLegend",function(){var A=T.state.formattedGraphicalItems,M=T.props,P=M.children,I=M.width,k=M.height,O=T.props.margin||{},D=I-(O.left||0)-(O.right||0),N=tq({children:P,formattedGraphicalItems:A,legendWidth:D,legendContent:u});if(!N)return null;var j=N.item,z=q$(N,bDe);return H.cloneElement(j,ce(ce({},z),{},{chartWidth:I,chartHeight:k,margin:O,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),Ke(T,"renderTooltip",function(){var A,M=T.props,P=M.children,I=M.accessibilityLayer,k=xi(P,os);if(!k)return null;var O=T.state,D=O.isTooltipActive,N=O.activeCoordinate,j=O.activePayload,z=O.activeLabel,$=O.offset,U=(A=k.props.active)!==null&&A!==void 0?A:D;return H.cloneElement(k,{viewBox:ce(ce({},$),{},{x:$.left,y:$.top}),active:U,label:z,payload:U?j:[],coordinate:N,accessibilityLayer:I})}),Ke(T,"renderBrush",function(A){var M=T.props,P=M.margin,I=M.data,k=T.state,O=k.offset,D=k.dataStartIndex,N=k.dataEndIndex,j=k.updateId;return H.cloneElement(A,{key:A.key||"_recharts-brush",onChange:vx(T.handleBrushChange,A.props.onChange),data:I,x:we(A.props.x)?A.props.x:O.left,y:we(A.props.y)?A.props.y:O.top+O.height+O.brushBottom-(P.bottom||0),width:we(A.props.width)?A.props.width:O.width,startIndex:D,endIndex:N,updateId:"brush-".concat(j)})}),Ke(T,"renderReferenceElement",function(A,M,P){if(!A)return null;var I=T,k=I.clipPathId,O=T.state,D=O.xAxisMap,N=O.yAxisMap,j=O.offset,z=A.type.defaultProps||{},$=A.props,U=$.xAxisId,F=U===void 0?z.xAxisId:U,V=$.yAxisId,W=V===void 0?z.yAxisId:V;return H.cloneElement(A,{key:A.key||"".concat(M,"-").concat(P),xAxis:D[F],yAxis:N[W],viewBox:{x:j.left,y:j.top,width:j.width,height:j.height},clipPathId:k})}),Ke(T,"renderActivePoints",function(A){var M=A.item,P=A.activePoint,I=A.basePoint,k=A.childIndex,O=A.isRange,D=[],N=M.props.key,j=M.item.type.defaultProps!==void 0?ce(ce({},M.item.type.defaultProps),M.item.props):M.item.props,z=j.activeDot,$=j.dataKey,U=ce(ce({index:k,dataKey:$,cx:P.x,cy:P.y,r:4,fill:YD(M.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},ct(z,!1)),Ub(z));return D.push(x.renderActiveDot(z,U,"".concat(N,"-activePoint-").concat(k))),I?D.push(x.renderActiveDot(z,ce(ce({},U),{},{cx:I.x,cy:I.y}),"".concat(N,"-basePoint-").concat(k))):O&&D.push(null),D}),Ke(T,"renderGraphicChild",function(A,M,P){var I=T.filterFormatItem(A,M,P);if(!I)return null;var k=T.getTooltipEventType(),O=T.state,D=O.isTooltipActive,N=O.tooltipAxis,j=O.activeTooltipIndex,z=O.activeLabel,$=T.props.children,U=xi($,os),F=I.props,V=F.points,W=F.isRange,Y=F.baseLine,Z=I.item.type.defaultProps!==void 0?ce(ce({},I.item.type.defaultProps),I.item.props):I.item.props,J=Z.activeDot,ne=Z.hide,le=Z.activeBar,fe=Z.activeShape,ze=!!(!ne&&D&&U&&(J||le||fe)),xe={};k!=="axis"&&U&&U.props.trigger==="click"?xe={onClick:vx(T.handleItemMouseEnter,A.props.onClick)}:k!=="axis"&&(xe={onMouseLeave:vx(T.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:vx(T.handleItemMouseEnter,A.props.onMouseEnter)});var ie=H.cloneElement(A,ce(ce({},I.props),xe));function he(Jn){return typeof N.dataKey=="function"?N.dataKey(Jn.payload):null}if(ze)if(j>=0){var ue,ee;if(N.dataKey&&!N.allowDuplicatedCategory){var Ve=typeof N.dataKey=="function"?he:"payload.".concat(N.dataKey.toString());ue=Hb(V,Ve,z),ee=W&&Y&&Hb(Y,Ve,z)}else ue=V==null?void 0:V[j],ee=W&&Y&&Y[j];if(fe||le){var Se=A.props.activeIndex!==void 0?A.props.activeIndex:j;return[H.cloneElement(A,ce(ce(ce({},I.props),xe),{},{activeIndex:Se})),null,null]}if(!dt(ue))return[ie].concat(Hd(T.renderActivePoints({item:I,activePoint:ue,basePoint:ee,childIndex:j,isRange:W})))}else{var Ge,Ye=(Ge=T.getItemByXY(T.state.activeCoordinate))!==null&&Ge!==void 0?Ge:{graphicalItem:ie},vt=Ye.graphicalItem,Vt=vt.item,nr=Vt===void 0?A:Vt,jn=vt.childIndex,qr=ce(ce(ce({},I.props),xe),{},{activeIndex:jn});return[H.cloneElement(nr,qr),null,null]}return W?[ie,null,null]:[ie,null]}),Ke(T,"renderCustomized",function(A,M,P){return H.cloneElement(A,ce(ce({key:"recharts-customized-".concat(P)},T.props),T.state))}),Ke(T,"renderMap",{CartesianGrid:{handler:xx,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:xx},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:xx},YAxis:{handler:xx},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((b=_.id)!==null&&b!==void 0?b:_v("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=eX(T.triggeredAfterMouseMove,(S=_.throttleDelay)!==null&&S!==void 0?S:1e3/60),T.state={},T}return EDe(x,m),LDe(x,[{key:"componentDidMount",value:function(){var b,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,S=b.children,T=b.data,A=b.height,M=b.layout,P=xi(S,os);if(P){var I=P.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,O=Lk(this.state,T,I,k),D=this.state.tooltipTicks[I].coordinate,N=(this.state.offset.top+A)/2,j=M==="horizontal",z=j?{x:D,y:N}:{y:D,x:N},$=this.state.formattedGraphicalItems.find(function(F){var V=F.item;return V.type.name==="Scatter"});$&&(z=ce(ce({},z),$.props.points[I].tooltipPosition),O=$.props.points[I].tooltipPayload);var U={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:k,activePayload:O,activeCoordinate:z};this.setState(U),this.renderCursor(P),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var T,A;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(b){sL([xi(b.children,os)],[xi(this.props.children,os)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=xi(this.props.children,os);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,T=S.getBoundingClientRect(),A=Hwe(T),M={chartX:Math.round(b.pageX-A.left),chartY:Math.round(b.pageY-A.top)},P=T.width/S.offsetWidth||1,I=this.inRange(M.chartX,M.chartY,P);if(!I)return null;var k=this.state,O=k.xAxisMap,D=k.yAxisMap,N=this.getTooltipEventType(),j=Q$(this.state,this.props.data,this.props.layout,I);if(N!=="axis"&&O&&D){var z=_h(O).scale,$=_h(D).scale,U=z&&z.invert?z.invert(M.chartX):null,F=$&&$.invert?$.invert(M.chartY):null;return ce(ce({},M),{},{xValue:U,yValue:F},j)}return j?ce(ce({},M),j):null}},{key:"inRange",value:function(b,S){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,M=b/T,P=S/T;if(A==="horizontal"||A==="vertical"){var I=this.state.offset,k=M>=I.left&&M<=I.left+I.width&&P>=I.top&&P<=I.top+I.height;return k?{x:M,y:P}:null}var O=this.state,D=O.angleAxisMap,N=O.radiusAxisMap;if(D&&N){var j=_h(D);return j4({x:M,y:P},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),T=xi(b,os),A={};T&&S==="axis"&&(T.props.trigger==="click"?A={onClick:this.handleClick}:A={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=Ub(this.props,this.handleOuterEvent);return ce(ce({},M),A)}},{key:"addListener",value:function(){IC.on(OC,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){IC.removeListener(OC,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,T){for(var A=this.state.formattedGraphicalItems,M=0,P=A.length;M<P;M++){var I=A[M];if(I.item===b||I.props.key===b.key||S===bs(I.item.type)&&T===I.childIndex)return I}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,S=this.state.offset,T=S.left,A=S.top,M=S.height,P=S.width;return Q.createElement("defs",null,Q.createElement("clipPath",{id:b},Q.createElement("rect",{x:T,y:A,height:M,width:P})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(S,T){var A=X$(T,2),M=A[0],P=A[1];return ce(ce({},S),{},Ke({},M,P.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(S,T){var A=X$(T,2),M=A[0],P=A[1];return ce(ce({},S),{},Ke({},M,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(b){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[b])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(b){var S=this.state,T=S.formattedGraphicalItems,A=S.activeItem;if(T&&T.length)for(var M=0,P=T.length;M<P;M++){var I=T[M],k=I.props,O=I.item,D=O.type.defaultProps!==void 0?ce(ce({},O.type.defaultProps),O.props):O.props,N=bs(O.type);if(N==="Bar"){var j=(k.data||[]).find(function(F){return ILe(b,F)});if(j)return{graphicalItem:I,payload:j}}else if(N==="RadialBar"){var z=(k.data||[]).find(function(F){return j4(b,F)});if(z)return{graphicalItem:I,payload:z}}else if(nT(I,A)||iT(I,A)||Jm(I,A)){var $=Dke({graphicalItem:I,activeTooltipItem:A,itemData:D.data}),U=D.activeIndex===void 0?$:D.activeIndex;return{graphicalItem:ce(ce({},I),{},{childIndex:U}),payload:Jm(I,A)?D.data[$]:I.props.data[$]}}}return null}},{key:"render",value:function(){var b=this;if(!M3(this))return null;var S=this.props,T=S.children,A=S.className,M=S.width,P=S.height,I=S.style,k=S.compact,O=S.title,D=S.desc,N=q$(S,wDe),j=ct(N,!1);if(k)return Q.createElement(I$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement(uL,zh({},j,{width:M,height:P,title:O,desc:D}),this.renderClipPath(),L3(T,this.renderMap)));if(this.props.accessibilityLayer){var z,$;j.tabIndex=(z=this.props.tabIndex)!==null&&z!==void 0?z:0,j.role=($=this.props.role)!==null&&$!==void 0?$:"application",j.onKeyDown=function(F){b.accessibilityManager.keyboardEvent(F)},j.onFocus=function(){b.accessibilityManager.focus()}}var U=this.parseEventsOfWrapper();return Q.createElement(I$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement("div",zh({className:xt("recharts-wrapper",A),style:ce({position:"relative",cursor:"default",width:M,height:P},I)},U,{ref:function(V){b.container=V}}),Q.createElement(uL,zh({},j,{width:M,height:P,title:O,desc:D,style:zDe}),this.renderClipPath(),L3(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(H.Component);Ke(v,"displayName",r),Ke(v,"defaultProps",ce({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Ke(v,"getDerivedStateFromProps",function(m,x){var _=m.dataKey,b=m.data,S=m.children,T=m.width,A=m.height,M=m.layout,P=m.stackOffset,I=m.margin,k=x.dataStartIndex,O=x.dataEndIndex;if(x.updateId===void 0){var D=J$(m);return ce(ce(ce({},D),{},{updateId:0},d(ce(ce({props:m},D),{},{updateId:0}),x)),{},{prevDataKey:_,prevData:b,prevWidth:T,prevHeight:A,prevLayout:M,prevStackOffset:P,prevMargin:I,prevChildren:S})}if(_!==x.prevDataKey||b!==x.prevData||T!==x.prevWidth||A!==x.prevHeight||M!==x.prevLayout||P!==x.prevStackOffset||!td(I,x.prevMargin)){var N=J$(m),j={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},z=ce(ce({},Q$(x,b,M)),{},{updateId:x.updateId+1}),$=ce(ce(ce({},N),j),z);return ce(ce(ce({},$),d(ce({props:m},$),x)),{},{prevDataKey:_,prevData:b,prevWidth:T,prevHeight:A,prevLayout:M,prevStackOffset:P,prevMargin:I,prevChildren:S})}if(!sL(S,x.prevChildren)){var U,F,V,W,Y=xi(S,Dd),Z=Y&&(U=(F=Y.props)===null||F===void 0?void 0:F.startIndex)!==null&&U!==void 0?U:k,J=Y&&(V=(W=Y.props)===null||W===void 0?void 0:W.endIndex)!==null&&V!==void 0?V:O,ne=Z!==k||J!==O,le=!dt(b),fe=le&&!ne?x.updateId:x.updateId+1;return ce(ce({updateId:fe},d(ce(ce({props:m},x),{},{updateId:fe,dataStartIndex:Z,dataEndIndex:J}),x)),{},{prevChildren:S,dataStartIndex:Z,dataEndIndex:J})}return null}),Ke(v,"renderActiveDot",function(m,x,_){var b;return H.isValidElement(m)?b=H.cloneElement(m,x):ft(m)?b=m(x):b=Q.createElement(rT,x),Q.createElement(Xt,{className:"recharts-active-dot",key:_},b)});var g=H.forwardRef(function(x,_){return Q.createElement(v,zh({},x,{ref:_}))});return g.displayName=v.displayName,g},XDe=gK({chartName:"LineChart",GraphicalChild:e0,axisComponents:[{axisType:"xAxis",AxisComp:Pv},{axisType:"yAxis",AxisComp:Lv}],formatAxisMap:Pq}),qDe=gK({chartName:"AreaChart",GraphicalChild:gu,axisComponents:[{axisType:"xAxis",AxisComp:Pv},{axisType:"yAxis",AxisComp:Lv}],formatAxisMap:Pq});function KDe({health:e}){const t=e.score,r=e.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(t),a=2*Math.PI*45,o=t/100*a;return y.jsx("div",{className:"flex flex-col items-center",children:y.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[y.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),y.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),y.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:t.toFixed(1)}),y.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function _x({label:e,value:t}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:e}),y.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:y.jsx("div",{className:`h-full ${r(t)} transition-all duration-300`,style:{width:`${t}%`}})}),y.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:t.toFixed(1)})]})}function QDe({alert:e}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",icon:xd,iconColor:"text-red-500"};case"warning":case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ns,iconColor:"text-amber-500"};case"routine":default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:Sm,iconColor:"text-blue-500"}}})(e.severity),n=r.icon;return y.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[y.jsx(n,{size:16,className:r.iconColor}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-slate-200",children:e.message}),y.jsx("div",{className:"text-xs text-slate-500 mt-1",children:e.timestamp||"Just now"})]})]})}function JDe({source:e}){const t=()=>e.is_loaded?e.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return y.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[y.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-slate-200 truncate",children:e.name}),y.jsxs("div",{className:"text-xs text-slate-500",children:[e.node_count," nodes · ",e.type]})]})]})}function bx({icon:e,label:t,value:r,subvalue:n}){return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[y.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[y.jsx(e,{size:14}),y.jsx("span",{className:"text-xs",children:t})]}),y.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&y.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function DC({label:e,value:t}){const r=()=>t===0?"bg-green-500/20 text-green-400 border-green-500/50":t<=2?"bg-amber-500/20 text-amber-400 border-amber-500/50":"bg-red-500/20 text-red-400 border-red-500/50";return y.jsxs("span",{className:`px-2 py-1 rounded text-xs font-mono font-medium border ${r()}`,children:[e,t]})}function tF({label:e,value:t,unit:r,getColor:n}){const i=t!==void 0?n(t):"text-slate-400";return y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:e}),y.jsx("div",{className:`font-mono text-3xl font-bold ${i}`,children:(t==null?void 0:t.toFixed(0))??"—"}),r&&y.jsx("div",{className:"text-xs text-slate-500",children:r})]})}function eNe({history:e}){var a;const t=H.useMemo(()=>!e||e.length===0?[]:e.slice(-16).map((o,s)=>({idx:s,value:o.value,time:o.time})),[e]);if(t.length===0)return null;const r=Math.max(...t.map(o=>o.value),5),n=((a=t[t.length-1])==null?void 0:a.value)??0,i=()=>r>5?"kpGradientRed":r>3?"kpGradientAmber":"kpGradientGreen";return y.jsxs("div",{className:"h-20 w-full",children:[y.jsx(tX,{width:"100%",height:"100%",children:y.jsxs(qDe,{data:t,margin:{top:5,right:5,bottom:5,left:5},children:[y.jsxs("defs",{children:[y.jsxs("linearGradient",{id:"kpGradientGreen",x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"#22c55e",stopOpacity:.4}),y.jsx("stop",{offset:"100%",stopColor:"#22c55e",stopOpacity:.05})]}),y.jsxs("linearGradient",{id:"kpGradientAmber",x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:.4}),y.jsx("stop",{offset:"100%",stopColor:"#f59e0b",stopOpacity:.05})]}),y.jsxs("linearGradient",{id:"kpGradientRed",x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:.4}),y.jsx("stop",{offset:"100%",stopColor:"#ef4444",stopOpacity:.05})]})]}),y.jsx(Lv,{domain:[0,Math.ceil(r)],hide:!0}),y.jsx(Pv,{dataKey:"idx",hide:!0}),y.jsx(ny,{y:3,stroke:"#f59e0b",strokeDasharray:"3 3",strokeOpacity:.5}),y.jsx(ny,{y:5,stroke:"#ef4444",strokeDasharray:"3 3",strokeOpacity:.5}),y.jsx(gu,{type:"monotone",dataKey:"value",stroke:n>5?"#ef4444":n>3?"#f59e0b":"#22c55e",fill:`url(#${i()})`,strokeWidth:2})]})}),y.jsxs("div",{className:"flex justify-between text-xs text-slate-600 px-1",children:[y.jsx("span",{children:"48h ago"}),y.jsx("span",{children:"now"})]})]})}function tNe({profile:e}){const t=H.useMemo(()=>!e||e.length===0?[]:[...e].sort((r,n)=>r.height_m-n.height_m).map(r=>({height:r.height_m,M:r.M})),[e]);return t.length===0?null:y.jsxs("div",{className:"h-24 w-full",children:[y.jsx(tX,{width:"100%",height:"100%",children:y.jsxs(XDe,{data:t,margin:{top:5,right:10,bottom:5,left:5},children:[y.jsx(Pv,{dataKey:"M",type:"number",domain:["dataMin - 20","dataMax + 20"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"}}),y.jsx(Lv,{dataKey:"height",type:"number",domain:[0,"dataMax"],tick:{fontSize:10,fill:"#64748b"},tickLine:!1,axisLine:{stroke:"#334155"},tickFormatter:r=>`${(r/1e3).toFixed(1)}k`}),y.jsx(e0,{type:"monotone",dataKey:"M",stroke:"#3b82f6",strokeWidth:2,dot:{r:3,fill:"#3b82f6"}})]})}),y.jsx("div",{className:"text-center text-xs text-slate-600",children:"M-units vs Height (km)"})]})}function rNe({swpc:e,ducting:t}){const r=a=>a>=120?"text-green-400":a>=80?"text-amber-400":"text-red-400",n=a=>a<=3?"text-green-400":a<=5?"text-amber-400":"text-red-400",i=a=>{if(!a)return null;const o={normal:"bg-green-500/20 text-green-400 border-green-500/50",super_refraction:"bg-amber-500/20 text-amber-400 border-amber-500/50",surface_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50",elevated_duct:"bg-blue-500/20 text-blue-400 border-blue-500/50"},s={normal:"Normal",super_refraction:"Super Refraction",surface_duct:"Surface Duct",elevated_duct:"Elevated Duct"};return y.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium border ${o[a]||o.normal}`,children:s[a]||a})};return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Tm,{size:14}),"RF Propagation"]}),y.jsxs("div",{className:"flex justify-around mb-4",children:[y.jsx(tF,{label:"SFI",value:e==null?void 0:e.sfi,getColor:r}),y.jsx("div",{className:"w-px bg-border"}),y.jsx(tF,{label:"Kp",value:e==null?void 0:e.kp_current,getColor:n})]}),y.jsxs("div",{className:"flex justify-center gap-2 mb-4",children:[y.jsx(DC,{label:"R",value:(e==null?void 0:e.r_scale)??0}),y.jsx(DC,{label:"S",value:(e==null?void 0:e.s_scale)??0}),y.jsx(DC,{label:"G",value:(e==null?void 0:e.g_scale)??0})]}),(e==null?void 0:e.kp_history)&&e.kp_history.length>0&&y.jsxs("div",{className:"mb-4",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Kp Trend (48h)"}),y.jsx(eNe,{history:e.kp_history})]}),y.jsx("div",{className:"border-t border-border my-3"}),y.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[y.jsx(qc,{size:14,className:"text-slate-400"}),y.jsx("span",{className:"text-xs text-slate-500",children:"Tropospheric"}),i(t==null?void 0:t.condition)]}),(t==null?void 0:t.min_gradient)!==void 0&&y.jsxs("div",{className:"text-xs text-slate-400 font-mono mb-2",children:["dM/dz: ",t.min_gradient.toFixed(1)," M-units/km"]}),(t==null?void 0:t.profile)&&t.profile.length>0&&y.jsx(tNe,{profile:t.profile}),(e==null?void 0:e.active_warnings)&&e.active_warnings.length>0&&y.jsxs("div",{className:"mt-auto pt-3 border-t border-border",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"SWPC Alerts"}),y.jsx("div",{className:"flex flex-wrap gap-1",children:e.active_warnings.slice(0,3).map((a,o)=>y.jsx("span",{className:"px-2 py-0.5 rounded text-xs bg-amber-500/20 text-amber-400 border border-amber-500/30 truncate max-w-full",children:a.replace("Space Weather Message Code: ","")},o))})]})]})}const nNe={nws:{icon:qc,color:"text-blue-400",label:"NWS"},swpc:{icon:Wb,color:"text-yellow-400",label:"SWPC"},ducting:{icon:Ds,color:"text-cyan-400",label:"Tropo"},nifc:{icon:UE,color:"text-orange-400",label:"NIFC"},firms:{icon:YE,color:"text-red-400",label:"FIRMS"},avalanche:{icon:ZE,color:"text-slate-300",label:"Avy"},usgs:{icon:GE,color:"text-blue-300",label:"USGS"},traffic:{icon:VE,color:"text-purple-400",label:"Traffic"},roads:{icon:_Z,color:"text-amber-400",label:"511"}},rF={routine:"bg-blue-500/20 text-blue-400 border-blue-500/30",priority:"bg-amber-500/20 text-amber-400 border-amber-500/30",immediate:"bg-red-600/20 text-red-300 border-red-600/30",info:"bg-blue-500/20 text-blue-400 border-blue-500/30",advisory:"bg-blue-500/20 text-blue-400 border-blue-500/30",moderate:"bg-amber-500/20 text-amber-400 border-amber-500/30",watch:"bg-amber-500/20 text-amber-400 border-amber-500/30",warning:"bg-amber-500/20 text-amber-400 border-amber-500/30",severe:"bg-red-500/20 text-red-400 border-red-500/30",extreme:"bg-red-600/20 text-red-300 border-red-600/30",critical:"bg-red-600/20 text-red-300 border-red-600/30",emergency:"bg-red-700/20 text-red-200 border-red-700/30"};function iNe({event:e,isLocal:t}){var f;const r=nNe[e.source]||{icon:Sm,color:"text-slate-400",label:e.source},n=r.icon,i=rF[(f=e.severity)==null?void 0:f.toLowerCase()]||rF.info,a=h=>{const d=new Date(h*1e3),g=new Date().getTime()-d.getTime(),m=Math.floor(g/6e4);return m<1?"just now":m<60?`${m}m ago`:m<1440?`${Math.floor(m/60)}h ago`:d.toLocaleDateString(void 0,{month:"short",day:"numeric"})},o=e.event_type,s=e.area_desc,l=e.description;let u=e.headline;if(o&&s){const h=s.replace(/ County/g,"").split(";")[0];u=`${o} — ${h}`}else o&&(u=o);const c=l?l.split(". ")[0]:null;return y.jsxs("div",{className:`flex items-start gap-2 py-2 border-b border-border/50 last:border-0 ${t?"border-l-2 border-l-blue-500 pl-2 -ml-2":""}`,children:[y.jsx(n,{size:14,className:`mt-0.5 flex-shrink-0 ${r.color}`}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[y.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs border ${i}`,children:e.severity||"info"}),t&&y.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-blue-500/20 text-blue-400 border border-blue-500/30",children:"LOCAL"}),y.jsx("span",{className:"text-xs text-slate-500",children:r.label}),y.jsx("span",{className:"text-xs text-slate-600 ml-auto",children:a(e.fetched_at)})]}),y.jsx("div",{className:`text-sm truncate ${t?"text-slate-100":"text-slate-300"}`,children:u}),c&&y.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c})]})]})}function aNe({events:e,envStatus:t}){const r={immediate:0,priority:1,routine:2},n=H.useMemo(()=>{const a=new Set;return e.filter(s=>s.event_id?a.has(s.event_id)?!1:(a.add(s.event_id),!0):!0).sort((s,l)=>{var d,v;const u=s.is_local?1:0,c=l.is_local?1:0;if(u!==c)return c-u;const f=r[((d=s.severity)==null?void 0:d.toLowerCase())||"routine"]??2,h=r[((v=l.severity)==null?void 0:v.toLowerCase())||"routine"]??2;return f!==h?f-h:(l.fetched_at||0)-(s.fetched_at||0)})},[e]),i=H.useMemo(()=>{if(!(t!=null&&t.feeds))return null;const a=t.feeds.length,o=t.feeds.filter(c=>c.is_loaded&&!c.last_error).length,s=t.feeds.filter(c=>c.last_error).map(c=>c.source),l=Math.max(...t.feeds.map(c=>c.last_fetch||0)),u=l?Math.floor(Date.now()/1e3-l):null;return{total:a,active:o,errors:s,secAgo:u}},[t]);return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4 flex flex-col h-full",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[y.jsx(Hy,{size:14}),"Live Event Feed"]}),n.length>0?y.jsx("div",{className:"flex-1 overflow-y-auto max-h-80 pr-1 -mr-1",children:n.map((a,o)=>y.jsx(iNe,{event:a,isLocal:a.is_local},a.event_id||o))}):y.jsx("div",{className:"flex-1 flex items-center justify-center",children:y.jsxs("div",{className:"text-center py-8",children:[y.jsx(ed,{size:24,className:"text-green-500 mx-auto mb-2"}),y.jsx("div",{className:"text-slate-400",children:"No active events"}),y.jsx("div",{className:"text-xs text-slate-500",children:"All clear"})]})}),i&&y.jsxs("div",{className:`text-xs mt-3 pt-3 border-t border-border ${i.errors.length>0?"text-amber-400":"text-slate-500"}`,children:[i.active," of ",i.total," feeds active",i.secAgo!==null&&` · Last update ${i.secAgo}s ago`,i.errors.length>0&&y.jsxs("span",{className:"text-amber-400",children:[" · ",i.errors.join(", "),": error"]})]})]})}function oNe(){var S,T,A,M,P;const[e,t]=H.useState(null),[r,n]=H.useState([]),[i,a]=H.useState([]),[o,s]=H.useState(null),[l,u]=H.useState([]),[c,f]=H.useState(null),[h,d]=H.useState(null),[v,g]=H.useState(!0),[m,x]=H.useState(null),{lastHealth:_,lastMessage:b}=KE();return H.useEffect(()=>{Promise.all([uce(),hce(),OZ(),EZ(),DZ().catch(()=>[]),NZ().catch(()=>null),jZ().catch(()=>null)]).then(([I,k,O,D,N,j,z])=>{t(I),n(k),a(O),s(D),u(N),f(j),d(z),g(!1),document.title="Dashboard — MeshAI"}).catch(I=>{x(I.message),g(!1),document.title="Dashboard — MeshAI"})},[]),H.useEffect(()=>{_&&t(_)},[_]),H.useEffect(()=>{(b==null?void 0:b.type)==="env_update"&&b.event&&u(I=>{const k=b.event,O=I.filter(D=>D.event_id!==k.event_id);return[k,...O].slice(0,100)})},[b]),v?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading..."})}):m?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsxs("div",{className:"text-red-400",children:["Error: ",m]})}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),e&&y.jsxs(y.Fragment,{children:[y.jsx(KDe,{health:e}),y.jsxs("div",{className:"mt-6 space-y-3",children:[y.jsx(_x,{label:"Infrastructure",value:((S=e.pillars)==null?void 0:S.infrastructure)??0}),y.jsx(_x,{label:"Utilization",value:((T=e.pillars)==null?void 0:T.utilization)??0}),y.jsx(_x,{label:"Behavior",value:((A=e.pillars)==null?void 0:A.behavior)??0}),y.jsx(_x,{label:"Power",value:((M=e.pillars)==null?void 0:M.power)??0})]})]})]}),y.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?y.jsx("div",{className:"space-y-3 max-h-48 overflow-y-auto",children:i.map((I,k)=>y.jsx(QDe,{alert:I},k))}):y.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[y.jsx(ed,{size:16,className:"text-green-500"}),y.jsx("span",{children:"No active alerts"})]})]}),y.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[y.jsx(bx,{icon:Ds,label:"Nodes Online",value:(e==null?void 0:e.total_nodes)||0,subvalue:`${(e==null?void 0:e.unlocated_count)||0} unlocated`}),y.jsx(bx,{icon:bZ,label:"Infrastructure",value:`${(e==null?void 0:e.infra_online)||0}/${(e==null?void 0:e.infra_total)||0}`,subvalue:(e==null?void 0:e.infra_online)===(e==null?void 0:e.infra_total)?"All online":"Some offline"}),y.jsx(bx,{icon:Hy,label:"Utilization",value:`${((P=e==null?void 0:e.util_percent)==null?void 0:P.toFixed(1))||0}%`,subvalue:`${(e==null?void 0:e.flagged_nodes)||0} flagged`}),y.jsx(bx,{icon:AZ,label:"Regions",value:(e==null?void 0:e.total_regions)||0,subvalue:`${(e==null?void 0:e.battery_warnings)||0} battery warnings`})]})]})]}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?y.jsx("div",{className:"space-y-2",children:r.map((I,k)=>y.jsx(JDe,{source:I},k))}):y.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),y.jsx(rNe,{swpc:c,ducting:h}),y.jsx(aNe,{events:l,envStatus:o})]})]})}/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var kk=function(e,t){return kk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},kk(e,t)};function q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kk(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var zg=function(){return zg=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},zg.apply(this,arguments)};function sNe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function nF(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(e,[])).next())})}function iF(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var lNe=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),uNe=function(){function e(){this.browser=new lNe,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}(),nt=new uNe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(nt.wxa=!0,nt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?nt.worker=!0:!nt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(nt.node=!0,nt.svgSupported=!0):cNe(navigator.userAgent,nt);function cNe(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),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 s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}}var JD=12,mK="sans-serif",zs=JD+"px "+mK,fNe=20,hNe=100,dNe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function vNe(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-fNe)/hNe;t[n]=i}return t}var pNe=vNe(dNe),hi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var i=hi.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||zs),e.measureText(r);r=r||"",n=n||zs;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||JD,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=pNe[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}};function yK(e){for(var t in hi)e[t]&&(hi[t]=e[t])}var xK=ha(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),_K=ha(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),kv=Object.prototype.toString,hT=Array.prototype,gNe=hT.forEach,mNe=hT.filter,eN=hT.slice,yNe=hT.map,aF=(function(){}).constructor,Sx=aF?aF.prototype:null,tN="__proto__",xNe=2311;function rN(){return xNe++}function dT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Ce(e){if(e==null||typeof e!="object")return e;var t=e,r=kv.call(e);if(r==="[object Array]"){if(!od(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=Ce(e[n])}}else if(_K[r]){if(!od(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!xK[r]&&!od(e)&&!tf(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==tN&&(t[o]=Ce(e[o]))}return t}function He(e,t,r){if(!Le(t)||!Le(e))return r?Ce(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==tN){var i=e[n],a=t[n];Le(a)&&Le(i)&&!ae(a)&&!ae(i)&&!tf(a)&&!tf(i)&&!Ik(a)&&!Ik(i)&&!od(a)&&!od(i)?He(i,a,r):(r||!(n in e))&&(e[n]=Ce(t[n]))}return e}function vT(e,t){for(var r=e[0],n=1,i=e.length;n<i;n++)r=He(r,e[n],t);return r}function re(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==tN&&(e[r]=t[r]);return e}function Pe(e,t,r){for(var n=it(t),i=0,a=n.length;i<a;i++){var o=n[i];(r?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var _Ne=hi.createCanvas;function We(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 nN(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(e.prototype[i]=r[i]);e.prototype.constructor=e,e.superClass=t}function fr(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),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else Pe(e,t,r)}function xn(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}function B(e,t,r){if(e&&t)if(e.forEach&&e.forEach===gNe)e.forEach(t,r);else if(e.length===+e.length)for(var n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(r,e[a],a,e)}function se(e,t,r){if(!e)return[];if(!t)return pT(e);if(e.map&&e.map===yNe)return e.map(t,r);for(var n=[],i=0,a=e.length;i<a;i++)n.push(t.call(r,e[i],i,e));return n}function ha(e,t,r,n){if(e&&t){for(var i=0,a=e.length;i<a;i++)r=t.call(n,r,e[i],i,e);return r}}function ht(e,t,r){if(!e)return[];if(!t)return pT(e);if(e.filter&&e.filter===mNe)return e.filter(t,r);for(var n=[],i=0,a=e.length;i<a;i++)t.call(r,e[i],i,e)&&n.push(e[i]);return n}function mu(e,t,r){if(e&&t){for(var n=0,i=e.length;n<i;n++)if(t.call(r,e[n],n,e))return e[n]}}function it(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 bNe(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return function(){return e.apply(t,r.concat(eN.call(arguments)))}}var ge=Sx&&Ae(Sx.bind)?Sx.call.bind(Sx.bind):bNe;function Fe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return function(){return e.apply(this,t.concat(eN.call(arguments)))}}function ae(e){return Array.isArray?Array.isArray(e):kv.call(e)==="[object Array]"}function Ae(e){return typeof e=="function"}function pe(e){return typeof e=="string"}function Y1(e){return kv.call(e)==="[object String]"}function ot(e){return typeof e=="number"}function Le(e){var t=typeof e;return t==="function"||!!e&&t==="object"}function Ik(e){return!!xK[kv.call(e)]}function Zn(e){return!!_K[kv.call(e)]}function tf(e){return typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.ownerDocument=="object"}function t0(e){return e.colorStops!=null}function bK(e){return e.image!=null}function wK(e){return kv.call(e)==="[object RegExp]"}function mn(e){return e!==e}function nn(){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 be(e,t){return e??t}function fi(e,t,r){return e??t??r}function pT(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return eN.apply(e,t)}function r0(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 _n(e,t){if(!e)throw new Error(t)}function Ci(e){return e==null?null:typeof e.trim=="function"?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var SK="__ec_primitive__";function sy(e){e[SK]=!0}function od(e){return e[SK]}var wNe=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 it(this.data)},e.prototype.forEach=function(t){var r=this.data;for(var n in r)r.hasOwnProperty(n)&&t(r[n],n)},e}(),TK=typeof Map=="function";function SNe(){return TK?new Map:new wNe}var AK=function(){function e(t){var r=ae(t);this.data=SNe();var n=this;t instanceof e?t.each(i):t&&B(t,i);function i(a,o){r?n.set(a,o):n.set(o,a)}}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,i){t.call(r,n,i)})},e.prototype.keys=function(){var t=this.data.keys();return TK?Array.from(t):t},e.prototype.removeKey=function(t){this.data.delete(t)},e}();function _e(e){return new AK(e)}function Ud(e,t){for(var r=new e.constructor(e.length+t.length),n=0;n<e.length;n++)r[n]=e[n];for(var i=e.length,n=0;n<t.length;n++)r[n+i]=t[n];return r}function n0(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&re(r,t),r}function iN(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function ye(e,t){return e.hasOwnProperty(t)}function lr(){}var $g=180/Math.PI,TNe=Number.EPSILON||Math.pow(2,-52);const ANe=Object.freeze(Object.defineProperty({__proto__:null,EPSILON:TNe,HashMap:AK,RADIAN_TO_DEGREE:$g,assert:_n,bind:ge,clone:Ce,concatArray:Ud,createCanvas:_Ne,createHashMap:_e,createObject:n0,curry:Fe,defaults:Pe,disableUserSelect:iN,each:B,eqNaN:mn,extend:re,filter:ht,find:mu,guid:rN,hasOwn:ye,indexOf:We,inherits:nN,isArray:ae,isArrayLike:xn,isBuiltInObject:Ik,isDom:tf,isFunction:Ae,isGradientObject:t0,isImagePatternObject:bK,isNumber:ot,isObject:Le,isPrimitive:od,isRegExp:wK,isString:pe,isStringSafe:Y1,isTypedArray:Zn,keys:it,logError:dT,map:se,merge:He,mergeAll:vT,mixin:fr,noop:lr,normalizeCssArray:r0,reduce:ha,retrieve:nn,retrieve2:be,retrieve3:fi,setAsPrimitive:sy,slice:pT,trim:Ci},Symbol.toStringTag,{value:"Module"}));function yu(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function Pn(e,t){return e[0]=t[0],e[1]=t[1],e}function Io(e){return[e[0],e[1]]}function gT(e,t,r){return e[0]=t,e[1]=r,e}function Ok(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function X1(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e}function Pl(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function ly(e){return Math.sqrt(aN(e))}var CNe=ly;function aN(e){return e[0]*e[0]+e[1]*e[1]}var MNe=aN;function PNe(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function LNe(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function kNe(e,t){return e[0]*t[0]+e[1]*t[1]}function Fg(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function wf(e,t){var r=ly(t);return r===0?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function q1(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var ps=q1;function CK(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Hl=CK;function INe(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Vg(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 ur(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e}function gs(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function ms(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}const ONe=Object.freeze(Object.defineProperty({__proto__:null,add:Ok,applyTransform:ur,clone:Io,copy:Pn,create:yu,dist:ps,distSquare:Hl,distance:q1,distanceSquare:CK,div:LNe,dot:kNe,len:ly,lenSquare:aN,length:CNe,lengthSquare:MNe,lerp:Vg,max:ms,min:gs,mul:PNe,negate:INe,normalize:wf,scale:Fg,scaleAndAdd:X1,set:gT,sub:Pl},Symbol.toStringTag,{value:"Module"}));var Uf=function(){function e(t,r){this.target=t,this.topTarget=r&&r.topTarget}return e}(),ENe=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 Uf(r,t),"dragstart",t.event))},e.prototype._drag=function(t){var r=this._draggingTarget;if(r){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,r.drift(a,o,t),this.handler.dispatchToElement(new Uf(r,t),"drag",t.event);var s=this.handler.findHover(n,i,r).target,l=this._dropTarget;this._dropTarget=s,r!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Uf(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Uf(s,t),"dragenter",t.event))}},e.prototype._dragEnd=function(t){var r=this._draggingTarget;r&&(r.dragging=!1),this.handler.dispatchToElement(new Uf(r,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Uf(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},e}(),ya=function(){function e(t){t&&(this._$eventProcessor=t)}return e.prototype.on=function(t,r,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof r=="function"&&(i=n,n=r,r=null),!n||!t)return this;var o=this._$eventProcessor;r!=null&&o&&o.normalizeQuery&&(r=o.normalizeQuery(r)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var l={h:n,query:r,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,c=a[t][u];return c&&c.callAtLast?a[t].splice(u,0,l):a[t].push(l),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 i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==r&&i.push(n[t][a]);n[t]=i}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 i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}return a&&a.afterTrigger&&a.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 i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=r.length,s=r[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(t,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,r[0]);break;case 2:c.h.call(s,r[0],r[1]);break;default:c.h.apply(s,r.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},e}(),DNe=Math.log(2);function Ek(e,t,r,n,i,a){var o=n+"-"+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/DNe);return e[r][l]}for(var u=n|1<<r,c=r+1;n&1<<c;)c++;for(var f=0,h=0,d=0;h<s;h++){var v=1<<h;v&i||(f+=(d%2?-1:1)*e[r][h]*Ek(e,t-1,c,u,i|v,a),d++)}return a[o]=f,f}function oF(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={},i=Ek(r,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*Ek(r,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var K1="___zrEVENTSAVED",NC=[];function NNe(e,t,r,n,i){return Dk(NC,t,n,i,!0)&&Dk(e,r,NC[0],NC[1])}function jNe(e,t){e&&r(e),t&&r(t);function r(n){var i=n[K1];i&&(i.clearMarkers&&i.clearMarkers(),delete n[K1])}}function Dk(e,t,r,n,i){if(t.getBoundingClientRect&&nt.domSupported&&!MK(t)){var a=t[K1]||(t[K1]={}),o=RNe(t,a),s=BNe(o,a,i);if(s)return s(e,r,n),!0}return!1}function RNe(e,t){var r=t.markers;if(r)return r;r=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(o),r.push(o)}return t.clearMarkers=function(){B(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function BNe(e,t,r){for(var n=r?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=r?oF(s,o):oF(o,s))}function MK(e){return e.nodeName.toUpperCase()==="CANVAS"}var zNe=/([&<>"'])/g,$Ne={"&":"&","<":"<",">":">",'"':""","'":"'"};function On(e){return e==null?"":(e+"").replace(zNe,function(t,r){return $Ne[r]})}var FNe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,jC=[],VNe=nt.browser.firefox&&+nt.browser.version.split(".")[0]<39;function Nk(e,t,r,n){return r=r||{},n?sF(e,t,r):VNe&&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):sF(e,t,r),r}function sF(e,t,r){if(nt.domSupported&&e.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(MK(e)){var a=e.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Dk(jC,e,n,i)){r.zrX=jC[0],r.zrY=jC[1];return}}r.zrX=r.zrY=0}function oN(e){return e||window.event}function Zi(e,t,r){if(t=oN(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Nk(e,o,t,r)}else{Nk(e,t,t,r);var a=GNe(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&FNe.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function GNe(e){var t=e.wheelDelta;if(t)return t;var r=e.deltaX,n=e.deltaY;if(r==null||n==null)return t;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function jk(e,t,r,n){e.addEventListener(t,r,n)}function WNe(e,t,r,n){e.removeEventListener(t,r,n)}var $s=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function lF(e){return e.which===2||e.which===3}var HNe=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 i=t.touches;if(i){for(var a={points:[],touches:[],target:r,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=Nk(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},e.prototype._recognize=function(t){for(var r in RC)if(RC.hasOwnProperty(r)){var n=RC[r](this._track,t);if(n)return n}},e}();function uF(e){var t=e[1][0]-e[0][0],r=e[1][1]-e[0][1];return Math.sqrt(t*t+r*r)}function UNe(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var RC={pinch:function(e,t){var r=e.length;if(r){var n=(e[r-1]||{}).points,i=(e[r-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=uF(n)/uF(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=UNe(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Wr(){return[1,0,0,1,0,0]}function i0(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function a0(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 Fa(e,t,r){var n=t[0]*r[0]+t[2]*r[1],i=t[1]*r[0]+t[3]*r[1],a=t[0]*r[2]+t[2]*r[3],o=t[1]*r[2]+t[3]*r[3],s=t[0]*r[4]+t[2]*r[5]+t[4],l=t[1]*r[4]+t[3]*r[5]+t[5];return e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e}function Ua(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 Ks(e,t,r,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(r),f=Math.cos(r);return e[0]=i*f+s*c,e[1]=-i*c+s*f,e[2]=a*f+l*c,e[3]=-a*c+f*l,e[4]=f*(o-n[0])+c*(u-n[1])+n[0],e[5]=f*(u-n[1])-c*(o-n[0])+n[1],e}function mT(e,t,r){var n=r[0],i=r[1];return e[0]=t[0]*n,e[1]=t[1]*i,e[2]=t[2]*n,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*i,e}function da(e,t){var r=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=r*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*s-o*i)*l,e[5]=(a*i-r*s)*l,e):null}function PK(e){var t=Wr();return a0(t,e),t}const ZNe=Object.freeze(Object.defineProperty({__proto__:null,clone:PK,copy:a0,create:Wr,identity:i0,invert:da,mul:Fa,rotate:Ks,scale:mT,translate:Ua},Symbol.toStringTag,{value:"Module"}));var Ie=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,i){t.x=r.x+n.x*i,t.y=r.y+n.y*i},e.lerp=function(t,r,n,i){var a=1-i;t.x=a*r.x+i*n.x,t.y=a*r.y+i*n.y},e}(),Tc=Math.min,$h=Math.max,Rk=Math.abs,cF=["x","y"],YNe=["width","height"],Lu=new Ie,ku=new Ie,Iu=new Ie,Ou=new Ie,bi=LK(),hg=bi.minTv,Bk=bi.maxTv,Gg=[0,0],Oe=function(){function e(t,r,n,i){e.set(this,t,r,n,i)}return e.set=function(t,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),t.x=r,t.y=n,t.width=i,t.height=a,t},e.prototype.union=function(t){var r=Tc(t.x,this.x),n=Tc(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$h(t.x+t.width,this.x+this.width)-r:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=$h(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){var r=this,n=t.width/r.width,i=t.height/r.height,a=Wr();return Ua(a,a,[-r.x,-r.y]),mT(a,a,[n,i]),Ua(a,a,[t.x,t.y]),a},e.prototype.intersect=function(t,r,n){return e.intersect(this,t,r,n)},e.intersect=function(t,r,n,i){n&&Ie.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!r)return!1;t instanceof e||(t=e.set(XNe,t.x,t.y,t.width,t.height)),r instanceof e||(r=e.set(qNe,r.x,r.y,r.width,r.height));var s=!!n;bi.reset(i,s);var l=bi.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,h=t.y+t.height-l,d=r.x+l,v=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||d>v||g>m)return!1;var x=!(c<d||v<u||h<g||m<f);return(s||a)&&(Gg[0]=1/0,Gg[1]=0,fF(u,c,d,v,0,s,a,o),fF(f,h,g,m,1,s,a,o),s&&Ie.copy(n,x?bi.useDir?bi.dirMinTv:hg:Bk)),x},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){e.copy(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.x,t.y,t.width,t.height)},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&&e.copy(t,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=r.x*i+o,t.y=r.y*a+s,t.width=r.width*i,t.height=r.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Lu.x=Iu.x=r.x,Lu.y=Ou.y=r.y,ku.x=Ou.x=r.x+r.width,ku.y=Iu.y=r.y+r.height,Lu.transform(n),Ou.transform(n),ku.transform(n),Iu.transform(n),t.x=Tc(Lu.x,ku.x,Iu.x,Ou.x),t.y=Tc(Lu.y,ku.y,Iu.y,Ou.y);var l=$h(Lu.x,ku.x,Iu.x,Ou.x),u=$h(Lu.y,ku.y,Iu.y,Ou.y);t.width=l-t.x,t.height=u-t.y},e}(),XNe=new Oe(0,0,0,0),qNe=new Oe(0,0,0,0);function fF(e,t,r,n,i,a,o,s){var l=Rk(t-r),u=Rk(n-e),c=Tc(l,u),f=cF[i],h=cF[1-i],d=YNe[i];t<r||n<e?l<u?(a&&(Bk[f]=-l),s&&(o[f]=t,o[d]=0)):(a&&(Bk[f]=u),s&&(o[f]=e,o[d]=0)):(o&&(o[f]=$h(e,r),o[d]=Tc(t,n)-o[f]),a&&(c<Gg[0]||bi.useDir)&&(Gg[0]=Tc(c,Gg[0]),(l<u||!bi.bidirectional)&&(hg[f]=l,hg[h]=0,bi.useDir&&bi.calcDirMTV()),(l>=u||!bi.bidirectional)&&(hg[f]=-u,hg[h]=0,bi.useDir&&bi.calcDirMTV())))}function LK(){var e=0,t=new Ie,r=new Ie,n={minTv:new Ie,maxTv:new Ie,useDir:!1,dirMinTv:new Ie,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=$h(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),e=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(e),u=Math.cos(e),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||t.dot(r)>0)&&r.len()<o.len()&&o.copy(r)}};function i(a){return Rk(a)<1e-10}return n}var kK="silent";function KNe(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:QNe}}function QNe(){$s(this.event)}var JNe=function(e){q(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}(ya),Pp=function(){function e(t,r){this.x=t,this.y=r}return e}(),eje=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],BC=new Oe(0,0,0,0),IK=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this)||this;return s._hovered=new Pp(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new JNe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new ENe(s),s}return t.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(B(eje,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,i=r.zrY,a=OK(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Pp(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"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 Pp(0,0)},t.prototype.dispatch=function(r,n){var i=this[r];i&&i.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,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=KNe(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new Pp(r,n);if(hF(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Oe(r-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(BC.copy(h.getBoundingRect()),h.transform&&BC.applyTransform(h.transform),BC.intersect(c)&&s.push(h))}if(s.length)for(var d=4,v=Math.PI/12,g=Math.PI*2,m=0;m<u;m+=d)for(var x=0;x<g;x+=v){var _=r+m*Math.cos(x),b=n+m*Math.sin(x);if(hF(s,o,_,b,i),o.target)return o}}return o},t.prototype.processGesture=function(r,n){this._gestureMgr||(this._gestureMgr=new HNe);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(r,this.findHover(r.zrX,r.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;r.gestureEvent=o;var s=new Pp;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(ya);B(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){IK.prototype[e]=function(t){var r=t.zrX,n=t.zrY,i=OK(this,r,n),a,o;if((e!=="mouseup"||!i)&&(a=this.findHover(r,n),o=a.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||ps(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function tje(e,t,r){if(e[e.rectHover?"rectContain":"contain"](t,r)){for(var n=e,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?kK:!0}return!1}function hF(e,t,r,n,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=tje(o,r,n))&&(!t.topTarget&&(t.topTarget=o),s!==kK)){t.target=o;break}}}function OK(e,t,r){var n=e.painter;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var EK=32,Lp=7;function rje(e){for(var t=0;e>=EK;)t|=e&1,e>>=1;return e+t}function dF(e,t,r,n){var i=t+1;if(i===r)return 1;if(n(e[i++],e[t])<0){for(;i<r&&n(e[i],e[i-1])<0;)i++;nje(e,t,i)}else for(;i<r&&n(e[i],e[i-1])>=0;)i++;return i-t}function nje(e,t,r){for(r--;t<r;){var n=e[t];e[t++]=e[r],e[r--]=n}}function vF(e,t,r,n,i){for(n===t&&n++;n<r;n++){for(var a=e[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,e[l])<0?s=l:o=l+1;var u=n-o;switch(u){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(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=a}}function zC(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])>0){for(s=n-i;l<s&&a(e,t[r+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(e,t[r+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[r+c])>0?o=c+1:l=c}return l}function $C(e,t,r,n,i,a){var o=0,s=0,l=1;if(a(e,t[r+i])<0){for(s=i+1;l<s&&a(e,t[r+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(e,t[r+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[r+c])<0?l=c:o=c+1}return l}function ije(e,t){var r=Lp,n,i,a=0,o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var v=n[d],g=i[d],m=n[d+1],x=i[d+1];i[d]=g+x,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var _=$C(e[m],e,v,g,0,t);v+=_,g-=_,g!==0&&(x=zC(e[v+g-1],e,m,x,x-1,t),x!==0&&(g<=x?f(v,g,m,x):h(v,g,m,x)))}function f(d,v,g,m){var x=0;for(x=0;x<v;x++)o[x]=e[d+x];var _=0,b=g,S=d;if(e[S++]=e[b++],--m===0){for(x=0;x<v;x++)e[S+x]=o[_+x];return}if(v===1){for(x=0;x<m;x++)e[S+x]=e[b+x];e[S+m]=o[_];return}for(var T=r,A,M,P;;){A=0,M=0,P=!1;do if(t(e[b],o[_])<0){if(e[S++]=e[b++],M++,A=0,--m===0){P=!0;break}}else if(e[S++]=o[_++],A++,M=0,--v===1){P=!0;break}while((A|M)<T);if(P)break;do{if(A=$C(e[b],o,_,v,0,t),A!==0){for(x=0;x<A;x++)e[S+x]=o[_+x];if(S+=A,_+=A,v-=A,v<=1){P=!0;break}}if(e[S++]=e[b++],--m===0){P=!0;break}if(M=zC(o[_],e,b,m,0,t),M!==0){for(x=0;x<M;x++)e[S+x]=e[b+x];if(S+=M,b+=M,m-=M,m===0){P=!0;break}}if(e[S++]=o[_++],--v===1){P=!0;break}T--}while(A>=Lp||M>=Lp);if(P)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),v===1){for(x=0;x<m;x++)e[S+x]=e[b+x];e[S+m]=o[_]}else{if(v===0)throw new Error;for(x=0;x<v;x++)e[S+x]=o[_+x]}}function h(d,v,g,m){var x=0;for(x=0;x<m;x++)o[x]=e[g+x];var _=d+v-1,b=m-1,S=g+m-1,T=0,A=0;if(e[S--]=e[_--],--v===0){for(T=S-(m-1),x=0;x<m;x++)e[T+x]=o[x];return}if(m===1){for(S-=v,_-=v,A=S+1,T=_+1,x=v-1;x>=0;x--)e[A+x]=e[T+x];e[S]=o[b];return}for(var M=r;;){var P=0,I=0,k=!1;do if(t(o[b],e[_])<0){if(e[S--]=e[_--],P++,I=0,--v===0){k=!0;break}}else if(e[S--]=o[b--],I++,P=0,--m===1){k=!0;break}while((P|I)<M);if(k)break;do{if(P=v-$C(o[b],e,d,v,v-1,t),P!==0){for(S-=P,_-=P,v-=P,A=S+1,T=_+1,x=P-1;x>=0;x--)e[A+x]=e[T+x];if(v===0){k=!0;break}}if(e[S--]=o[b--],--m===1){k=!0;break}if(I=m-zC(e[_],o,0,m,m-1,t),I!==0){for(S-=I,b-=I,m-=I,A=S+1,T=b+1,x=0;x<I;x++)e[A+x]=o[T+x];if(m<=1){k=!0;break}}if(e[S--]=e[_--],--v===0){k=!0;break}M--}while(P>=Lp||I>=Lp);if(k)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),m===1){for(S-=v,_-=v,A=S+1,T=_+1,x=v-1;x>=0;x--)e[A+x]=e[T+x];e[S]=o[b]}else{if(m===0)throw new Error;for(T=S-(m-1),x=0;x<m;x++)e[T+x]=o[x]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function q_(e,t,r,n){r||(r=0),n||(n=e.length);var i=n-r;if(!(i<2)){var a=0;if(i<EK){a=dF(e,r,n,t),vF(e,r,n,r+a,t);return}var o=ije(e,t),s=rje(i);do{if(a=dF(e,r,n,t),a<s){var l=i;l>s&&(l=s),vF(e,r,r+l,r+a,t),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Si=1,dg=2,bh=4,pF=!1;function FC(){pF||(pF=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function gF(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var aje=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=gF}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,i=0,a=r.length;i<a;i++)this._updateAndAddDisplayable(r[i],null,t);n.length=this._displayListLen,q_(n,gF)},e.prototype._updateAndAddDisplayable=function(t,r,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),a=r&&r.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||i)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<r.length;l++)s[o++]=r[l];for(var u=i,c=t;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var f=t.childrenRef(),h=0;h<f.length;h++){var d=f[h];t.__dirty&&(d.__dirty|=Si),this._updateAndAddDisplayable(d,s,n)}t.__dirty=0}else{var v=t;isNaN(v.z)&&(FC(),v.z=0),isNaN(v.z2)&&(FC(),v.z2=0),isNaN(v.zlevel)&&(FC(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var g=t.getDecalElement&&t.getDecalElement();g&&this._updateAndAddDisplayable(g,s,n);var m=t.getTextGuideLine();m&&this._updateAndAddDisplayable(m,s,n);var x=t.getTextContent();x&&this._updateAndAddDisplayable(x,s,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 i=We(this._roots,t);i>=0&&this._roots.splice(i,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}(),Q1;Q1=nt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Wg={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-Wg.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?Wg.bounceIn(e*2)*.5:Wg.bounceOut(e*2-1)*.5+.5}},Tx=Math.pow,Ul=Math.sqrt,J1=1e-8,DK=1e-4,mF=Ul(3),Ax=1/3,go=yu(),Ji=yu(),sd=yu();function Ll(e){return e>-J1&&e<J1}function NK(e){return e>J1||e<-J1}function $r(e,t,r,n,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*n+3*a*r)}function yF(e,t,r,n,i){var a=1-i;return 3*(((t-e)*a+2*(r-t)*i)*a+(n-r)*i*i)}function ew(e,t,r,n,i,a){var o=n+3*(t-r)-e,s=3*(r-t*2+e),l=3*(t-e),u=e-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Ll(c)&&Ll(f))if(Ll(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var g=f*f-4*c*h;if(Ll(g)){var m=f/c,v=-s/o+m,x=-m/2;v>=0&&v<=1&&(a[d++]=v),x>=0&&x<=1&&(a[d++]=x)}else if(g>0){var _=Ul(g),b=c*s+1.5*o*(-f+_),S=c*s+1.5*o*(-f-_);b<0?b=-Tx(-b,Ax):b=Tx(b,Ax),S<0?S=-Tx(-S,Ax):S=Tx(S,Ax);var v=(-s-(b+S))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var T=(2*c*s-3*o*f)/(2*Ul(c*c*c)),A=Math.acos(T)/3,M=Ul(c),P=Math.cos(A),v=(-s-2*M*P)/(3*o),x=(-s+M*(P+mF*Math.sin(A)))/(3*o),I=(-s+M*(P-mF*Math.sin(A)))/(3*o);v>=0&&v<=1&&(a[d++]=v),x>=0&&x<=1&&(a[d++]=x),I>=0&&I<=1&&(a[d++]=I)}}return d}function jK(e,t,r,n,i){var a=6*r-12*t+6*e,o=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(Ll(o)){if(NK(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Ll(c))i[0]=-a/(2*o);else if(c>0){var f=Ul(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function nu(e,t,r,n,i,a){var o=(t-e)*i+e,s=(r-t)*i+t,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=e,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function RK(e,t,r,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,v,g,m,x;go[0]=l,go[1]=u;for(var _=0;_<1;_+=.05)Ji[0]=$r(e,r,i,o,_),Ji[1]=$r(t,n,a,s,_),m=Hl(go,Ji),m<d&&(f=_,d=m);d=1/0;for(var b=0;b<32&&!(h<DK);b++)v=f-h,g=f+h,Ji[0]=$r(e,r,i,o,v),Ji[1]=$r(t,n,a,s,v),m=Hl(Ji,go),v>=0&&m<d?(f=v,d=m):(sd[0]=$r(e,r,i,o,g),sd[1]=$r(t,n,a,s,g),x=Hl(sd,go),g<=1&&x<d?(f=g,d=x):h*=.5);return c&&(c[0]=$r(e,r,i,o,f),c[1]=$r(t,n,a,s,f)),Ul(d)}function oje(e,t,r,n,i,a,o,s,l){for(var u=e,c=t,f=0,h=1/l,d=1;d<=l;d++){var v=d*h,g=$r(e,r,i,o,v),m=$r(t,n,a,s,v),x=g-u,_=m-c;f+=Math.sqrt(x*x+_*_),u=g,c=m}return f}function rn(e,t,r,n){var i=1-n;return i*(i*e+2*n*t)+n*n*r}function zk(e,t,r,n){return 2*((1-n)*(t-e)+n*(r-t))}function sje(e,t,r,n,i){var a=e-2*t+r,o=2*(t-e),s=e-n,l=0;if(Ll(a)){if(NK(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Ll(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=Ul(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function BK(e,t,r){var n=e+r-2*t;return n===0?.5:(e-t)/n}function uy(e,t,r,n,i){var a=(t-e)*n+e,o=(r-t)*n+t,s=(o-a)*n+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function zK(e,t,r,n,i,a,o,s,l){var u,c=.005,f=1/0;go[0]=o,go[1]=s;for(var h=0;h<1;h+=.05){Ji[0]=rn(e,r,i,h),Ji[1]=rn(t,n,a,h);var d=Hl(go,Ji);d<f&&(u=h,f=d)}f=1/0;for(var v=0;v<32&&!(c<DK);v++){var g=u-c,m=u+c;Ji[0]=rn(e,r,i,g),Ji[1]=rn(t,n,a,g);var d=Hl(Ji,go);if(g>=0&&d<f)u=g,f=d;else{sd[0]=rn(e,r,i,m),sd[1]=rn(t,n,a,m);var x=Hl(sd,go);m<=1&&x<f?(u=m,f=x):c*=.5}}return l&&(l[0]=rn(e,r,i,u),l[1]=rn(t,n,a,u)),Ul(f)}function lje(e,t,r,n,i,a,o){for(var s=e,l=t,u=0,c=1/o,f=1;f<=o;f++){var h=f*c,d=rn(e,r,i,h),v=rn(t,n,a,h),g=d-s,m=v-l;u+=Math.sqrt(g*g+m*m),s=d,l=v}return u}var uje=/cubic-bezier\(([0-9,\.e ]+)\)/;function sN(e){var t=e&&uje.exec(e);if(t){var r=t[1].split(","),n=+Ci(r[0]),i=+Ci(r[1]),a=+Ci(r[2]),o=+Ci(r[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:ew(0,n,a,1,l,s)&&$r(0,i,o,1,s[0])}}}var cje=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||lr,this.ondestroy=t.ondestroy||lr,this.onrestart=t.onrestart||lr,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,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,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=Ae(t)?t:Wg[t]||sN(t)},e}(),$K=function(){function e(t){this.value=t}return e}(),fje=function(){function e(){this._len=0}return e.prototype.insert=function(t){var r=new $K(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}(),Zd=function(){function e(t){this._list=new fje,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,r){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new $K(r),s.key=t,n.insertEntry(s),i[t]=s}return a},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}(),xF={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 Va(e){return e=Math.round(e),e<0?0:e>255?255:e}function hje(e){return e=Math.round(e),e<0?0:e>360?360:e}function cy(e){return e<0?0:e>1?1:e}function K_(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Va(parseFloat(t)/100*255):Va(parseInt(t,10))}function Ts(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?cy(parseFloat(t)/100):cy(parseFloat(t))}function VC(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 kl(e,t,r){return e+(t-e)*r}function Ui(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function $k(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var FK=new Zd(20),Cx=null;function Zf(e,t){Cx&&$k(Cx,t),Cx=FK.put(e,Cx||t.slice())}function En(e,t){if(e){t=t||[];var r=FK.get(e);if(r)return $k(t,r);e=e+"";var n=e.replace(/ /g,"").toLowerCase();if(n in xF)return $k(t,xF[n]),Zf(e,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Ui(t,0,0,0,1);return}return Ui(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Zf(e,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ui(t,0,0,0,1);return}return Ui(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Zf(e,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ui(t,+u[0],+u[1],+u[2],1):Ui(t,0,0,0,1);c=Ts(u.pop());case"rgb":if(u.length>=3)return Ui(t,K_(u[0]),K_(u[1]),K_(u[2]),u.length===3?c:Ts(u[3])),Zf(e,t),t;Ui(t,0,0,0,1);return;case"hsla":if(u.length!==4){Ui(t,0,0,0,1);return}return u[3]=Ts(u[3]),Fk(u,t),Zf(e,t),t;case"hsl":if(u.length!==3){Ui(t,0,0,0,1);return}return Fk(u,t),Zf(e,t),t;default:return}}Ui(t,0,0,0,1)}}function Fk(e,t){var r=(parseFloat(e[0])%360+360)%360/360,n=Ts(e[1]),i=Ts(e[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Ui(t,Va(VC(o,a,r+1/3)*255),Va(VC(o,a,r)*255),Va(VC(o,a,r-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function dje(e){if(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-t)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;t===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return e[3]!=null&&d.push(e[3]),d}}function tw(e,t){var r=En(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 sa(r,r.length===4?"rgba":"rgb")}}function vje(e){var t=En(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Hg(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){r=r||[];var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return r[0]=Va(kl(o[0],s[0],l)),r[1]=Va(kl(o[1],s[1],l)),r[2]=Va(kl(o[2],s[2],l)),r[3]=cy(kl(o[3],s[3],l)),r}}var pje=Hg;function lN(e,t,r){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var n=e*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=En(t[i]),s=En(t[a]),l=n-i,u=sa([Va(kl(o[0],s[0],l)),Va(kl(o[1],s[1],l)),Va(kl(o[2],s[2],l)),cy(kl(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var gje=lN;function As(e,t,r,n){var i=En(e);if(e)return i=dje(i),t!=null&&(i[0]=hje(Ae(t)?t(i[0]):t)),r!=null&&(i[1]=Ts(Ae(r)?r(i[1]):r)),n!=null&&(i[2]=Ts(Ae(n)?n(i[2]):n)),sa(Fk(i),"rgba")}function fy(e,t){var r=En(e);if(r&&t!=null)return r[3]=cy(t),sa(r,"rgba")}function sa(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 hy(e,t){var r=En(e);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*t:0}function mje(){return sa([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var _F=new Zd(100);function rw(e){if(pe(e)){var t=_F.get(e);return t||(t=tw(e,-.1),_F.put(e,t)),t}else if(t0(e)){var r=re({},e);return r.colorStops=se(e.colorStops,function(n){return{offset:n.offset,color:tw(n.color,-.1)}}),r}return e}const yje=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Hg,fastMapToColor:pje,lerp:lN,lift:tw,liftColor:rw,lum:hy,mapToColor:gje,modifyAlpha:fy,modifyHSL:As,parse:En,parseCssFloat:Ts,parseCssInt:K_,random:mje,stringify:sa,toHex:vje},Symbol.toStringTag,{value:"Module"}));var nw=Math.round;function dy(e){var t;if(!e||e==="transparent")e="none";else if(typeof e=="string"&&e.indexOf("rgba")>-1){var r=En(e);r&&(e="rgb("+r[0]+","+r[1]+","+r[2]+")",t=r[3])}return{color:e,opacity:t??1}}var bF=1e-4;function Il(e){return e<bF&&e>-bF}function Mx(e){return nw(e*1e3)/1e3}function Vk(e){return nw(e*1e4)/1e4}function xje(e){return"matrix("+Mx(e[0])+","+Mx(e[1])+","+Mx(e[2])+","+Mx(e[3])+","+Vk(e[4])+","+Vk(e[5])+")"}var _je={left:"start",right:"end",center:"middle",middle:"middle"};function bje(e,t,r){return r==="top"?e+=t/2:r==="bottom"&&(e-=t/2),e}function wje(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Sje(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 VK(e){return e&&!!e.image}function Tje(e){return e&&!!e.svgElement}function uN(e){return VK(e)||Tje(e)}function GK(e){return e.type==="linear"}function WK(e){return e.type==="radial"}function HK(e){return e&&(e.type==="linear"||e.type==="radial")}function yT(e){return"url(#"+e+")"}function UK(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 ZK(e){var t=e.x||0,r=e.y||0,n=(e.rotation||0)*$g,i=be(e.scaleX,1),a=be(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,l=[];return(t||r)&&l.push("translate("+t+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+nw(o*$g)+"deg, "+nw(s*$g)+"deg)"),l.join(" ")}var Aje=function(){return nt.hasGlobalWindow&&Ae(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}}(),Gk=Array.prototype.slice;function ss(e,t,r){return(t-e)*r+e}function GC(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=ss(t[a],r[a],n);return e}function Cje(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=ss(t[o][s],r[o][s],n)}return e}function Px(e,t,r,n){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+r[a]*n;return e}function wF(e,t,r,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+r[o][s]*n}return e}function Mje(e,t){for(var r=e.length,n=t.length,i=r>n?t:e,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(r,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function Pje(e,t,r){var n=e,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(r===1?i[l]:Gk.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(r===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function Ug(e){if(xn(e)){var t=e.length;if(xn(e[0])){for(var r=[],n=0;n<t;n++)r.push(Gk.call(e[n]));return r}return Gk.call(e)}return e}function Q_(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 Lje(e){return xn(e&&e[0])?2:1}var Lx=0,J_=1,YK=2,vg=3,Wk=4,Hk=5,SF=6;function TF(e){return e===Wk||e===Hk}function kx(e){return e===J_||e===YK}var kp=[0,0,0,0],kje=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 i=this.keyframes,a=i.length,o=!1,s=SF,l=r;if(xn(r)){var u=Lje(r);s=u,(u===1&&!ot(r[0])||u===2&&!ot(r[0][0]))&&(o=!0)}else if(ot(r)&&!mn(r))s=Lx;else if(pe(r))if(!isNaN(+r))s=Lx;else{var c=En(r);c&&(l=c,s=vg)}else if(t0(r)){var f=re({},l);f.colorStops=se(r.colorStops,function(d){return{offset:d.offset,color:En(d.color)}}),GK(r)?s=Wk:WK(r)&&(s=Hk),l=f}a===0?this.valType=s:(s!==this.valType||s===SF)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=Ae(n)?n:Wg[n]||sN(n)),i.push(h),h},e.prototype.prepare=function(t,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=kx(i),u=TF(i),c=0;c<a;c++){var f=n[c],h=f.value,d=o.value;f.percent=f.time/t,s||(l&&c!==a-1?Pje(h,d,i):u&&Mje(h.colorStops,d.colorStops))}if(!s&&i!==Hk&&r&&this.needsAnimate()&&r.needsAnimate()&&i===r.valType&&!r._finished){this._additiveTrack=r;for(var v=n[0].value,c=0;c<a;c++)i===Lx?n[c].additiveValue=n[c].value-v:i===vg?n[c].additiveValue=Px([],n[c].value,v,-1):kx(i)&&(n[c].additiveValue=i===J_?Px([],n[c].value,v,-1):wF([],n[c].value,v,-1))}},e.prototype.step=function(t,r){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===vg,c,f=this._lastFr,h=Math.min,d,v;if(s===1)d=v=o[0];else{if(r<0)c=0;else if(r<this._lastFrP){var g=h(f+1,s-1);for(c=g;c>=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>r);c++);c=h(c-1,s-2)}v=o[c+1],d=o[c]}if(d&&v){this._lastFr=c,this._lastFrP=r;var m=v.percent-d.percent,x=m===0?1:h((r-d.percent)/m,1);v.easingFunc&&(x=v.easingFunc(x));var _=n?this._additiveValue:u?kp:t[l];if((kx(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)t[l]=x<1?d.rawValue:v.rawValue;else if(kx(a))a===J_?GC(_,d[i],v[i],x):Cje(_,d[i],v[i],x);else if(TF(a)){var b=d[i],S=v[i],T=a===Wk;t[l]={type:T?"linear":"radial",x:ss(b.x,S.x,x),y:ss(b.y,S.y,x),colorStops:se(b.colorStops,function(M,P){var I=S.colorStops[P];return{offset:ss(M.offset,I.offset,x),color:Q_(GC([],M.color,I.color,x))}}),global:S.global},T?(t[l].x2=ss(b.x2,S.x2,x),t[l].y2=ss(b.y2,S.y2,x)):t[l].r=ss(b.r,S.r,x)}else if(u)GC(_,d[i],v[i],x),n||(t[l]=Q_(_));else{var A=ss(d[i],v[i],x);n?this._additiveValue=A:t[l]=A}n&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var r=this.valType,n=this.propName,i=this._additiveValue;r===Lx?t[n]=t[n]+i:r===vg?(En(t[n],kp),Px(kp,kp,i,1),t[n]=Q_(kp)):r===J_?Px(t[n],t[n],i,1):r===YK&&wF(t[n],t[n],i,1)},e}(),cN=function(){function e(t,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=r,r&&i){dT("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,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,it(r),n)},e.prototype.whenWithKeys=function(t,r,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new kje(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,h=f[f.length-1];u=h&&h.value,c.valType===vg&&u&&(u=Q_(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Ug(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Ug(r[s]),i)}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 i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(r=a)}return r},e.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(r._target[s.propName]=f.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var h=new cje({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){r._started=2;var v=r._additiveAnimators;if(v){for(var g=!1,m=0;m<v.length;m++)if(v[m]._clip){g=!0;break}g||(r._additiveAnimators=null)}for(var m=0;m<n.length;m++)n[m].step(r._target,d);var x=r._onframeCbs;if(x)for(var m=0;m<x.length;m++)x[m](r._target,d)},ondestroy:function(){r._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),t&&h.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 se(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,i=this._trackKeys,a=0;a<t.length;a++){var o=n[t[a]];o&&!o.isFinished()&&(r?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},e.prototype.saveTo=function(t,r,n){if(t){r=r||this._trackKeys;for(var i=0;i<r.length;i++){var a=r[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=Ug(l.rawValue))}}}},e.prototype.__changeFinalValue=function(t,r){r=r||it(t);for(var n=0;n<r.length;n++){var i=r[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},e}();function Fh(){return new Date().getTime()}var Ije=function(e){q(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,i=r.next;n?n.next=i:this._head=i,i?i.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=Fh()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Q1(n),!r._paused&&r.update())}Q1(n)},t.prototype.start=function(){this._running||(this._time=Fh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Fh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Fh()-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 i=new cN(r,n.loop);return this.addAnimator(i),i},t}(ya),Oje=300,WC=nt.domSupported,HC=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=se(e,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:e,touch:t,pointer:n}}(),AF={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},CF=!1;function Uk(e){var t=e.pointerType;return t==="pen"||t==="touch"}function Eje(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 UC(e){e&&(e.zrByTouch=!0)}function Dje(e,t){return Zi(e.dom,new Nje(e,t),!0)}function XK(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 Nje=function(){function e(t,r){this.stopPropagation=lr,this.stopImmediatePropagation=lr,this.preventDefault=lr,this.type=r.type,this.target=this.currentTarget=t.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return e}(),Ma={mousedown:function(e){e=Zi(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Zi(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=Zi(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=Zi(this.dom,e);var t=e.toElement||e.relatedTarget;XK(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){CF=!0,e=Zi(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){CF||(e=Zi(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=Zi(this.dom,e),UC(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Ma.mousemove.call(this,e),Ma.mousedown.call(this,e)},touchmove:function(e){e=Zi(this.dom,e),UC(e),this.handler.processGesture(e,"change"),Ma.mousemove.call(this,e)},touchend:function(e){e=Zi(this.dom,e),UC(e),this.handler.processGesture(e,"end"),Ma.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<Oje&&Ma.click.call(this,e)},pointerdown:function(e){Ma.mousedown.call(this,e)},pointermove:function(e){Uk(e)||Ma.mousemove.call(this,e)},pointerup:function(e){Ma.mouseup.call(this,e)},pointerout:function(e){Uk(e)||Ma.mouseout.call(this,e)}};B(["click","dblclick","contextmenu"],function(e){Ma[e]=function(t){t=Zi(this.dom,t),this.trigger(e,t)}});var Zk={pointermove:function(e){Uk(e)||Zk.mousemove.call(this,e)},pointerup:function(e){Zk.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 jje(e,t){var r=t.domHandlers;nt.pointerEventsSupported?B(HC.pointer,function(n){eb(t,n,function(i){r[n].call(e,i)})}):(nt.touchEventsSupported&&B(HC.touch,function(n){eb(t,n,function(i){r[n].call(e,i),Eje(t)})}),B(HC.mouse,function(n){eb(t,n,function(i){i=oN(i),t.touching||r[n].call(e,i)})}))}function Rje(e,t){nt.pointerEventsSupported?B(AF.pointer,r):nt.touchEventsSupported||B(AF.mouse,r);function r(n){function i(a){a=oN(a),XK(e,a.target)||(a=Dje(e,a),t.domHandlers[n].call(e,a))}eb(t,n,i,{capture:!0})}}function eb(e,t,r,n){e.mounted[t]=r,e.listenerOpts[t]=n,jk(e.domTarget,t,r,n)}function ZC(e){var t=e.mounted;for(var r in t)t.hasOwnProperty(r)&&WNe(e.domTarget,r,t[r],e.listenerOpts[r]);e.mounted={}}var MF=function(){function e(t,r){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=r}return e}(),Bje=function(e){q(t,e);function t(r,n){var i=e.call(this)||this;return i.__pointerCapturing=!1,i.dom=r,i.painterRoot=n,i._localHandlerScope=new MF(r,Ma),WC&&(i._globalHandlerScope=new MF(document,Zk)),jje(i,i._localHandlerScope),i}return t.prototype.dispose=function(){ZC(this._localHandlerScope),WC&&ZC(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,WC&&+this.__pointerCapturing^+r){this.__pointerCapturing=r;var n=this._globalHandlerScope;r?Rje(this,n):ZC(n)}},t}(ya),qK=1;nt.hasGlobalWindow&&(qK=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var iw=qK,Yk=.4,Xk="#333",qk="#ccc",zje="#eee",PF=i0,LF=5e-5;function Eu(e){return e>LF||e<-LF}var Du=[],Yf=[],YC=Wr(),XC=Math.abs,ys=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(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 Eu(this.rotation)||Eu(this.x)||Eu(this.y)||Eu(this.scaleX-1)||Eu(this.scaleY-1)||Eu(this.skewX)||Eu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||t)){n&&(PF(n),this.invTransform=null);return}n=n||Wr(),r?this.getLocalTransform(n):PF(n),t&&(r?Fa(n,t,n):a0(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(t){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Du);var n=Du[0]<0?-1:1,i=Du[1]<0?-1:1,a=((Du[0]-n)*r+n)/Du[0]||0,o=((Du[1]-i)*r+i)/Du[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Wr(),da(this.invTransform,t)},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],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,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||Wr(),Fa(Yf,t.invTransform,r),r=Yf);var n=this.originX,i=this.originY;(n||i)&&(YC[4]=n,YC[5]=i,Fa(Yf,r,YC),Yf[4]-=n,Yf[5]-=i,r=Yf),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],i=this.invTransform;return i&&ur(n,n,i),n},e.prototype.transformCoordToGlobal=function(t,r){var n=[t,r],i=this.transform;return i&&ur(n,n,i),n},e.prototype.getLineScale=function(){var t=this.transform;return t&&XC(t[0]-1)>1e-10&&XC(t[3]-1)>1e-10?Math.sqrt(XC(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){aw(this,t)},e.getLocalTransform=function(t,r){r=r||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var v=n+s,g=i+l;r[4]=-v*a-h*g*o,r[5]=-g*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=h*o,u&&Ks(r,r,u),r[4]+=n+c,r[5]+=i+f,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}(),Bo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function aw(e,t){for(var r=0;r<Bo.length;r++){var n=Bo[r];e[n]=t[n]}}function Oo(e){Ix||(Ix=new Zd(100)),e=e||zs;var t=Ix.get(e);return t||(t={font:e,strWidthCache:new Zd(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:hi.measureText("国",e).width,asciiCharWidth:hi.measureText("a",e).width},Ix.put(e,t)),t}var Ix;function $je(e){if(!(qC>=kF)){e=e||zs;for(var t=[],r=+new Date,n=0;n<=127;n++)t[n]=hi.measureText(String.fromCharCode(n),e).width;var i=+new Date-r;return i>16?qC=kF:i>2&&qC++,t}}var qC=0,kF=5;function KK(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=$je(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap!=null?e.asciiWidthMap[t]:e.asciiCharWidth:e.stWideCharWidth}function Eo(e,t){var r=e.strWidthCache,n=r.get(t);return n==null&&(n=hi.measureText(t,e.font).width,r.put(t,n)),n}function IF(e,t,r,n){var i=Eo(Oo(t),e),a=o0(t),o=Yd(0,i,r),s=jc(0,a,n),l=new Oe(o,s,i,a);return l}function xT(e,t,r,n){var i=((e||"")+"").split(`
|
||
`),a=i.length;if(a===1)return IF(i[0],t,r,n);for(var o=new Oe(0,0,0,0),s=0;s<i.length;s++){var l=IF(i[s],t,r,n);s===0?o.copy(l):o.union(l)}return o}function Yd(e,t,r,n){return r==="right"?n?e+=t:e-=t:r==="center"&&(n?e+=t/2:e-=t/2),e}function jc(e,t,r,n){return r==="middle"?n?e+=t/2:e-=t/2:r==="bottom"&&(n?e+=t:e-=t),e}function o0(e){return Oo(e).stWideCharWidth}function Za(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function ow(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Za(n[0],r.width),u+=Za(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var KC="__zr_normal__",QC=Bo.concat(["ignore"]),Fje=ha(Bo,function(e,t){return e[t]=!0,e},{ignore:!1}),Xf={},Vje=new Oe(0,0,0,0),Ox=[],_T=function(){function e(t){this.id=rN(),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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[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,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=Vje,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Xf,n,h):ow(Xf,n,h),a.x=Xf.x,a.y=Xf.y,o=Xf.align,s=Xf.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var v=void 0,g=void 0;d==="center"?(v=h.width*.5,g=h.height*.5):(v=Za(d[0],h.width),g=Za(d[1],h.height)),u=!0,a.originX=-a.x+v+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var x=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=x.overflowRect=x.overflowRect||new Oe(0,0,0,0);a.getLocalTransform(Ox),da(Ox,Ox),Oe.copy(_,h),_.applyTransform(Ox)}else x.overflowRect=null;var b=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,S=void 0,T=void 0,A=void 0;b&&this.canBeInsideText()?(S=n.insideFill,T=n.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(S),A=!0)):(S=n.outsideFill,T=n.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(S),A=!0)),S=S||"#000",(S!==x.fill||T!==x.stroke||A!==x.autoStroke||o!==x.align||s!==x.verticalAlign)&&(l=!0,x.fill=S,x.stroke=T,x.autoStroke=A,x.align=o,x.verticalAlign=s,r.setDefaultTextStyle(x)),r.__dirty|=Si,l&&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()?qk:Xk},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&En(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,sa(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||{},re(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(Le(t))for(var n=t,i=it(n),a=0;a<i.length;a++){var o=i[a];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 i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==KC)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},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,QC)},e.prototype._savePrimaryToNormal=function(t,r,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in r)&&(r[a]=this[a])}},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(KC,!1,t)},e.prototype.useState=function(t,r,n,i){var a=t===KC,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(We(s,t)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){dT("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(t,r,n,c),h&&h.useState(t,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Si),u}}},e.prototype.useStates=function(t,r,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&i.push(c)}var f=i[o-1],h=!!(f&&f.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),v=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!r&&!this.__inHover&&v&&v.duration>0,v);var g=this._textContent,m=this._textGuide;g&&g.useStates(t,r,h),m&&m.useStates(t,r,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Si)}},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=We(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 i=this.currentStates.slice(),a=We(i,t),o=We(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},e.prototype.toggleState=function(t,r){r?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var r={},n,i=0;i<t.length;i++){var a=t[i];re(r,a),a.textConfig&&(n=n||{},re(n,a.textConfig))}return n&&(r.textConfig=n),r},e.prototype._applyStateObj=function(t,r,n,i,a,o){var s=!(r&&i);r&&r.textConfig?(this.textConfig=re({},i?this.textConfig:n.textConfig),re(this.textConfig,r.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<QC.length;c++){var f=QC[c],h=a&&Fje[f];r&&r[f]!=null?h?(u=!0,l[f]=r[f]):this[f]=r[f]:s&&n[f]!=null&&(h?(u=!0,l[f]=n[f]):this[f]=n[f])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],v=d.targetName;d.getLoop()||d.__changeFinalValue(v?(r||n)[v]:r||n)}u&&this._transitionState(t,l,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 ys,this._attachComponent(t),this._textContent=t,this.markRedraw())},e.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),re(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|=Si;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var r=this._textContent,n=this._textGuide;r&&(r.__inHover=t),n&&(n.__inHover=t)},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 i=t?this[t]:this,a=new cN(i,r,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},e.prototype.addAnimator=function(t,r){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(r)}).done(function(){var a=i.animators,o=We(a,t);o>=0&&a.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,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(r):a.push(s)}return this.animators=a,this},e.prototype.animateTo=function(t,r,n){JC(this,t,r,n)},e.prototype.animateFrom=function(t,r,n){JC(this,t,r,n,!0)},e.prototype._transitionState=function(t,r,n,i){for(var a=JC(this,r,n,i),o=0;o<a.length;o++)a[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=t.__inHover=!1,t.__dirty=Si;function r(n,i,a,o){Object.defineProperty(t,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),e}();fr(_T,ya);fr(_T,ys);function JC(e,t,r,n,i){r=r||{};var a=[];QK(e,"",e,t,r,n,a,i);var o=a.length,s=!1,l=r.done,u=r.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&r.during&&a[0].during(function(v,g){r.during(g)});for(var h=0;h<a.length;h++){var d=a[h];c&&d.done(c),f&&d.aborted(f),r.force&&d.duration(r.duration),d.start(r.easing)}return a}function e2(e,t,r){for(var n=0;n<r;n++)e[n]=t[n]}function Gje(e){return xn(e[0])}function Wje(e,t,r){if(xn(t[r]))if(xn(e[r])||(e[r]=[]),Zn(t[r])){var n=t[r].length;e[r].length!==n&&(e[r]=new t[r].constructor(n),e2(e[r],t[r],n))}else{var i=t[r],a=e[r],o=i.length;if(Gje(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?e2(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else e2(a,i,o);a.length=i.length}else e[r]=t[r]}function Hje(e,t){return e===t||xn(e)&&xn(t)&&Uje(e,t)}function Uje(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 QK(e,t,r,n,i,a,o,s){for(var l=it(n),u=i.duration,c=i.delay,f=i.additive,h=i.setToFinal,d=!Le(a),v=e.animators,g=[],m=0;m<l.length;m++){var x=l[m],_=n[x];if(_!=null&&r[x]!=null&&(d||a[x]))if(Le(_)&&!xn(_)&&!t0(_)){if(t){s||(r[x]=_,e.updateDuringAnimation(t));continue}QK(e,x,r[x],_,i,a&&a[x],o,s)}else g.push(x);else s||(r[x]=_,e.updateDuringAnimation(t),g.push(x))}var b=g.length;if(!f&&b)for(var S=0;S<v.length;S++){var T=v[S];if(T.targetName===t){var A=T.stopTracks(g);if(A){var M=We(v,T);v.splice(M,1)}}}if(i.force||(g=ht(g,function(O){return!Hje(n[O],r[O])}),b=g.length),b>0||i.force&&!o.length){var P=void 0,I=void 0,k=void 0;if(s){I={},h&&(P={});for(var S=0;S<b;S++){var x=g[S];I[x]=r[x],h?P[x]=n[x]:r[x]=n[x]}}else if(h){k={};for(var S=0;S<b;S++){var x=g[S];k[x]=Ug(r[x]),Wje(r,n,x)}}var T=new cN(r,!1,!1,f?ht(v,function(D){return D.targetName===t}):null);T.targetName=t,i.scope&&(T.scope=i.scope),h&&P&&T.whenWithKeys(0,P,g),k&&T.whenWithKeys(0,k,g),T.whenWithKeys(u??500,s?I:n,g).delay(c||0),e.addAnimator(T,t),o.push(T)}}var Me=function(e){q(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,i=0;i<n.length;i++)if(n[i].name===r)return n[i]},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 i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,r),this._doAdd(r))}return this},t.prototype.replace=function(r,n){var i=We(this._children,r);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},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,i=this._children,a=We(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i<r.length;i++){var a=r[i];n&&a.removeSelfFromZr(n),a.parent=null}return r.length=0,this},t.prototype.eachChild=function(r,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];r.call(n,o,a)}return this},t.prototype.traverse=function(r,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=r.call(n,a);a.isGroup&&!o&&a.traverse(r,n)}return this},t.prototype.addSelfToZr=function(r){e.prototype.addSelfToZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(r)}},t.prototype.removeSelfFromZr=function(r){e.prototype.removeSelfFromZr.call(this,r);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(r)}},t.prototype.getBoundingRect=function(r){for(var n=new Oe(0,0,0,0),i=r||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(Oe.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t}(_T);Me.prototype.type="group";/*!
|
||
* ZRender, a high performance 2d drawing library.
|
||
*
|
||
* Copyright (c) 2013, Baidu Inc.
|
||
* All rights reserved.
|
||
*
|
||
* LICENSE
|
||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
*/var tb={},Ac={};function Zje(e){delete Ac[e]}function Yje(e){if(!e)return!1;if(typeof e=="string")return hy(e,1)<Yk;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=hy(t[i].color,1);return r/=n,r<Yk}return!1}var Xje=function(){function e(t,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var a=new aje,o=n.renderer||"canvas";tb[o]||(o=it(tb)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new tb[o](r,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!nt.node&&!nt.worker&&!l?new Bje(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,f=c==null||c==="auto"?nt.touchEventsSupported:!!c,h=44,d;f&&(d=be(n.pointerSize,h)),this.handler=new IK(a,s,u,s.root,d),this.animation=new Ije({stage:{update:l?null:function(){return i._flush(!0)}}}),l||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=Yje(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||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(t){var r,n=Fh();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=Fh();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-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._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},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 Me&&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,Zje(this.id))},e}();function Kk(e,t){var r=new Xje(rN(),e,t);return Ac[r.id]=r,r}function qje(e){e.dispose()}function Kje(){for(var e in Ac)Ac.hasOwnProperty(e)&&Ac[e].dispose();Ac={}}function Qje(e){return Ac[e]}function JK(e,t){tb[e]=t}var Qk;function eQ(e){if(typeof Qk=="function")return Qk(e)}function tQ(e){Qk=e}var Jje="6.0.0";const eRe=Object.freeze(Object.defineProperty({__proto__:null,dispose:qje,disposeAll:Kje,getElementSSRData:eQ,getInstance:Qje,init:Kk,registerPainter:JK,registerSSRDataGetter:tQ,version:Jje},Symbol.toStringTag,{value:"Module"}));var OF=1e-4,rQ=20;function tRe(e){return e.replace(/^\s+|\s+$/g,"")}var Ii=Math.min,gr=Math.max,bo=Math.abs;function gt(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}var ve=rRe;function rRe(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 sw(e,t,r)}function sw(e,t,r){return pe(e)?tRe(e).match(/%$/)?parseFloat(e)/100*t+(r||0):parseFloat(e):e==null?NaN:+e}function mr(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),rQ),e=(+e).toFixed(t),r?e:+e}function Mi(e){return e.sort(function(t,r){return t-r}),e}function Ra(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return nQ(e)}function nQ(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function fN(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(bo(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function nRe(e,t,r){if(!e[t])return 0;var n=iQ(e,r);return n[t]||0}function iQ(e,t){var r=ha(e,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=se(e,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=se(i,function(d){return Math.floor(d)}),s=ha(o,function(d,v){return d+v},0),l=se(i,function(d,v){return d-o[v]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,h=l.length;f<h;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return se(o,function(d){return d/n})}function iRe(e,t){var r=Math.max(Ra(e),Ra(t)),n=e+t;return r>rQ?n:mr(n,r)}var Jk=9007199254740991;function hN(e){var t=Math.PI*2;return(e%t+t)%t}function Xd(e){return e>-OF&&e<OF}var aRe=/^(?:(\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 Uo(e){if(e instanceof Date)return e;if(pe(e)){var t=aRe.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(Math.round(e))}function aQ(e){return Math.pow(10,bT(e))}function bT(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function dN(e,t){var r=bT(e),n=Math.pow(10,r),i=e/n,a;return t?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,e=a*n,r>=-20?+e.toFixed(r<0?-r:0):e}function rb(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),i=+e[n-1],a=r-n;return a?i+a*(e[n]-i):i}function eI(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,r=1,n=0;n<e.length;){for(var i=e[n].interval,a=e[n].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-r),t=i[o],r=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(n,1):n++}return e;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function zo(e){var t=parseFloat(e);return t==e&&(t!==0||!pe(e)||e.indexOf("x")<=0)?t:NaN}function vN(e){return!isNaN(zo(e))}function oQ(){return Math.round(Math.random()*9)}function sQ(e,t){return t===0?e:sQ(t,e%t)}function EF(e,t){return e==null?t:t==null?e:e*t/sQ(e,t)}var oRe="[ECharts] ",sRe=typeof console<"u"&&console.warn&&console.log;function lRe(e,t,r){sRe&&console[e](oRe+t)}function lQ(e,t){lRe("error",e)}function mt(e){throw new Error(e)}function DF(e,t,r){return(t-e)*r+e}var uQ="series\0",cQ="\0_ec_\0";function Pt(e){return e instanceof Array?e:e==null?[]:[e]}function rf(e,t,r){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,i=r.length;n<i;n++){var a=r[n];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var NF=["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 Iv(e){return Le(e)&&!ae(e)&&!(e instanceof Date)?e.value:e}function uRe(e){return Le(e)&&!(e instanceof Array)}function fQ(e,t,r){var n=r==="normalMerge",i=r==="replaceMerge",a=r==="replaceAll";e=e||[],t=(t||[]).slice();var o=_e();B(t,function(l,u){if(!Le(l)){t[u]=null;return}});var s=cRe(e,o,r);return(n||i)&&fRe(s,e,o,t),n&&hRe(s,t),n||i?dRe(s,t,i):a&&vRe(s,t),pRe(s),s}function cRe(e,t,r){var n=[];if(r==="replaceAll")return n;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:r==="replaceMerge"||vy(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function fRe(e,t,r,n){B(n,function(i,a){if(!(!i||i.id==null)){var o=Zg(i.id),s=r.get(o);if(s!=null){var l=e[s];_n(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function hRe(e,t){B(t,function(r,n){if(!(!r||r.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||r.id==null)&&!vy(r)&&!vy(a)&&hQ("name",a,r)){e[i].newOption=r,t[n]=null;return}}})}function dRe(e,t,r){B(t,function(n){if(n){for(var i,a=0;(i=e[a])&&(i.newOption||vy(i.existing)||i.existing&&n.id!=null&&!hQ("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=r):e.push({newOption:n,brandNew:r,existing:null,keyInfo:null}),a++}})}function vRe(e,t){B(t,function(r){e.push({newOption:r,brandNew:!0,existing:null,keyInfo:null})})}function pRe(e){var t=_e();B(e,function(r){var n=r.existing;n&&t.set(n.id,r)}),B(e,function(r){var n=r.newOption;_n(!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 i=r.existing,a=r.newOption,o=r.keyInfo;if(Le(a)){if(o.name=a.name!=null?Zg(a.name):i?i.name:uQ+n,i)o.id=Zg(i.id);else if(a.id!=null)o.id=Zg(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,r)}})}function hQ(e,t,r){var n=Ir(t[e],null),i=Ir(r[e],null);return n!=null&&i!=null&&n===i}function Zg(e){return Ir(e,"")}function Ir(e,t){return e==null?t:pe(e)?e:ot(e)||Y1(e)?e+"":t}function pN(e){var t=e.name;return!!(t&&t.indexOf(uQ))}function vy(e){return e&&e.id!=null&&Zg(e.id).indexOf(cQ)===0}function gRe(e){return cQ+e}function mRe(e,t,r){B(e,function(n){var i=n.newOption;Le(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=yRe(t,i,n.existing,r))})}function yRe(e,t,r,n){var i=t.type?t.type:r?r.subType:n.determineSubType(e,t);return i}function xRe(e,t){var r={},n={};return i(e||[],r),i(t||[],n,r),[a(r),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=Ir(o[u].seriesId,null);if(f==null)return;for(var h=Pt(o[u].dataIndex),d=l&&l[f],v=0,g=h.length;v<g;v++){var m=h[v];d&&d[m]?d[m]=null:(s[f]||(s[f]={}))[m]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function nf(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return ae(t.dataIndex)?se(t.dataIndex,function(r){return e.indexOfRawIndex(r)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return ae(t.name)?se(t.name,function(r){return e.indexOfName(r)}):e.indexOfName(t.name)}function Je(){var e="__ec_inner_"+_Re++;return function(t){return t[e]||(t[e]={})}}var _Re=oQ();function ld(e,t,r){var n=gN(t,r),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=r?r.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=Ov(e,c,u,{useDefault:l===c,enableAll:r&&r.enableAll!=null?r.enableAll:!0,enableNone:r&&r.enableNone!=null?r.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function gN(e,t){var r;if(pe(e)){var n={};n[e+"Index"]=0,r=n}else r=e;var i=_e(),a={},o=!1;return B(r,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||t&&t.includeMainTypes&&We(t.includeMainTypes,c)<0)){o=o||!!c;var h=i.get(c)||i.set(c,{});h[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var tr={useDefault:!0,enableAll:!1,enableNone:!1},bRe={useDefault:!1,enableAll:!0,enableNone:!0};function Ov(e,t,r,n){n=n||tr;var i=r.index,a=r.id,o=r.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=e.getComponent(t))?[l]:[],s}if(i==="none"||i===!1){if(n.enableNone)return s.models=[],s;i=-1}return i==="all"&&(n.enableAll?i=a=o=null:i=-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function dQ(e,t,r){e.setAttribute?e.setAttribute(t,r):e[t]=r}function wRe(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function SRe(e){return e==="auto"?nt.domSupported?"html":"richText":e||"html"}function tI(e,t){var r=_e(),n=[];return B(e,function(i){var a=t(i);(r.get(a)||(n.push(a),r.set(a,[]))).push(i)}),{keys:n,buckets:r}}function vQ(e,t,r,n,i){var a=t==null||t==="auto";if(n==null)return n;if(ot(n)){var o=DF(r||0,n,i);return mr(o,a?Math.max(Ra(r||0),Ra(n)):t)}else{if(pe(n))return i<1?r:n;for(var s=[],l=r,u=n,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var h=e.getDimensionInfo(f);if(h&&h.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var d=l&&l[f]?l[f]:0,v=u[f],o=DF(d,v,i);s[f]=mr(o,a?Math.max(Ra(d),Ra(v)):t)}}return s}}var Zl=function(){function e(){}return e.prototype.reset=function(t,r,n,i){return this._list=t,this._step=i=i||1,this._idx=r,this._end=n??(i>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 t2(e){e.option=e.parentModel=e.ecModel=null}var TRe=".",Nu="___EC__COMPONENT__CONTAINER___",pQ="___EC__EXTENDED_CLASS___";function wo(e){var t={main:"",sub:""};if(e){var r=e.split(TRe);t.main=r[0]||"",t.sub=r[1]||""}return t}function ARe(e){_n(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}function CRe(e){return!!(e&&e[pQ])}function mN(e,t){e.$constructor=e,e.extend=function(r){var n=this,i;return MRe(n)?i=function(a){q(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},nN(i,this)),re(i.prototype,r),i[pQ]=!0,i.extend=this.extend,i.superCall=kRe,i.superApply=IRe,i.superClass=n,i}}function MRe(e){return Ae(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function gQ(e,t){e.extend=t.extend}var PRe=Math.round(Math.random()*10);function LRe(e){var t=["__\0is_clz",PRe++].join("_");e.prototype[t]=!0,e.isInstance=function(r){return!!(r&&r[t])}}function kRe(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 IRe(e,t,r){return this.superClass.prototype[t].apply(e,r)}function wT(e){var t={};e.registerClass=function(n){var i=n.type||n.prototype.type;if(i){ARe(i),n.prototype.type=i;var a=wo(i);if(!a.sub)t[a.main]=n;else if(a.sub!==Nu){var o=r(a);o[a.sub]=n}}return n},e.getClass=function(n,i,a){var o=t[n];if(o&&o[Nu]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},e.getClassesByMainType=function(n){var i=wo(n),a=[],o=t[i.main];return o&&o[Nu]?B(o,function(s,l){l!==Nu&&a.push(s)}):a.push(o),a},e.hasClass=function(n){var i=wo(n);return!!t[i.main]},e.getAllClassMainTypes=function(){var n=[];return B(t,function(i,a){n.push(a)}),n},e.hasSubTypes=function(n){var i=wo(n),a=t[i.main];return a&&a[Nu]};function r(n){var i=t[n.main];return(!i||!i[Nu])&&(i=t[n.main]={},i[Nu]=!0),i}}function af(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,i,a){for(var o={},s=0;s<e.length;s++){var l=e[s][1];if(!(i&&We(i,l)>=0||a&&We(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var ORe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],ERe=af(ORe),DRe=function(){function e(){}return e.prototype.getAreaStyle=function(t,r){return ERe(this,t,r)},e}(),rI=new Zd(50);function NRe(e){if(typeof e=="string"){var t=rI.get(e);return t&&t.image}else return e}function yN(e,t,r,n,i){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!r)return t;var a=rI.get(e),o={hostEl:r,cb:n,cbPayload:i};return a?(t=a.image,!ST(t)&&a.pending.push(o)):(t=hi.loadImage(e,jF,jF),t.__zrImageSrc=e,rI.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function jF(){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 ST(e){return e&&e.width&&e.height}var r2=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function jRe(e,t,r,n,i){var a={};return mQ(a,e,t,r,n,i),a.text}function mQ(e,t,r,n,i,a){if(!r){e.text="",e.isTruncated=!1;return}var o=(t+"").split(`
|
||
`);a=yQ(r,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)xQ(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;e.text=o.join(`
|
||
`),e.isTruncated=s}function yQ(e,t,r,n){n=n||{};var i=re({},n);r=be(r,"..."),i.maxIterations=be(n.maxIterations,2);var a=i.minChar=be(n.minChar,0),o=i.fontMeasureInfo=Oo(t),s=o.asciiCharWidth;i.placeholder=be(n.placeholder,"");for(var l=e=Math.max(0,e-1),u=0;u<a&&l>=s;u++)l-=s;var c=Eo(o,r);return c>l&&(r="",c=0),l=e-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=e,i}function xQ(e,t,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){e.textLine="",e.isTruncated=!1;return}var o=Eo(a,t);if(o<=n){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){t+=r.ellipsis;break}var l=s===0?RRe(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=Eo(a,t)}t===""&&(t=r.placeholder),e.textLine=t,e.isTruncated=!0}function RRe(e,t,r){for(var n=0,i=0,a=e.length;i<a&&n<t;i++)n+=KK(r,e.charCodeAt(i));return i}function BRe(e,t,r,n){var i=xN(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,c=a==="truncate",f=o0(u),h=be(t.lineHeight,f),d=t.lineOverflow==="truncate",v=!1,g=t.width;g==null&&r!=null&&(g=r-s);var m=t.height;m==null&&n!=null&&(m=n-l);var x;g!=null&&(a==="break"||a==="breakAll")?x=i?_Q(i,t.font,g,a==="breakAll",0).lines:[]:x=i?i.split(`
|
||
`):[];var _=x.length*h;if(m==null&&(m=_),_>m&&d){var b=Math.floor(m/h);v=v||x.length>b,x=x.slice(0,b),_=x.length*h}if(i&&c&&g!=null)for(var S=yQ(g,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),T={},A=0;A<x.length;A++)xQ(T,x[A],S),x[A]=T.textLine,v=v||T.isTruncated;for(var M=m,P=0,I=Oo(u),A=0;A<x.length;A++)P=Math.max(Eo(I,x[A]),P);g==null&&(g=P);var k=g;return M+=l,k+=s,{lines:x,height:m,outerWidth:k,outerHeight:M,lineHeight:h,calculatedLineHeight:f,contentWidth:P,contentHeight:_,width:g,isTruncated:v}}var zRe=function(){function e(){}return e}(),RF=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),$Re=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 FRe(e,t,r,n,i){var a=new $Re,o=xN(e);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,c=t.width;c==null&&r!=null&&(c=r-l);var f=t.height;f==null&&n!=null&&(f=n-u);for(var h=t.overflow,d=(h==="break"||h==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:h==="breakAll"}:null,v=r2.lastIndex=0,g;(g=r2.exec(o))!=null;){var m=g.index;m>v&&n2(a,o.substring(v,m),t,d),n2(a,g[2],t,d,g[1]),v=r2.lastIndex}v<o.length&&n2(a,o.substring(v,o.length),t,d);var x=[],_=0,b=0,S=h==="truncate",T=t.lineOverflow==="truncate",A={};function M(fe,ze,xe){fe.width=ze,fe.lineHeight=xe,_+=xe,b=Math.max(b,ze)}e:for(var P=0;P<a.lines.length;P++){for(var I=a.lines[P],k=0,O=0,D=0;D<I.tokens.length;D++){var N=I.tokens[D],j=N.styleName&&t.rich[N.styleName]||{},z=N.textPadding=j.padding,$=z?z[1]+z[3]:0,U=N.font=j.font||t.font;N.contentHeight=o0(U);var F=be(j.height,N.contentHeight);if(N.innerHeight=F,z&&(F+=z[0]+z[2]),N.height=F,N.lineHeight=fi(j.lineHeight,t.lineHeight,F),N.align=j&&j.align||i,N.verticalAlign=j&&j.verticalAlign||"middle",T&&f!=null&&_+N.lineHeight>f){var V=a.lines.length;D>0?(I.tokens=I.tokens.slice(0,D),M(I,O,k),a.lines=a.lines.slice(0,P+1)):a.lines=a.lines.slice(0,P),a.isTruncated=a.isTruncated||a.lines.length<V;break e}var W=j.width,Y=W==null||W==="auto";if(typeof W=="string"&&W.charAt(W.length-1)==="%")N.percentWidth=W,x.push(N),N.contentWidth=Eo(Oo(U),N.text);else{if(Y){var Z=j.backgroundColor,J=Z&&Z.image;J&&(J=NRe(J),ST(J)&&(N.width=Math.max(N.width,J.width*F/J.height)))}var ne=S&&c!=null?c-O:null;ne!=null&&ne<N.width?!Y||ne<$?(N.text="",N.width=N.contentWidth=0):(mQ(A,N.text,ne-$,U,t.ellipsis,{minChar:t.truncateMinChar}),N.text=A.text,a.isTruncated=a.isTruncated||A.isTruncated,N.width=N.contentWidth=Eo(Oo(U),N.text)):N.contentWidth=Eo(Oo(U),N.text)}N.width+=$,O+=N.width,j&&(k=Math.max(k,N.lineHeight))}M(I,O,k)}a.outerWidth=a.width=be(c,b),a.outerHeight=a.height=be(f,_),a.contentHeight=_,a.contentWidth=b,a.outerWidth+=l,a.outerHeight+=u;for(var P=0;P<x.length;P++){var N=x[P],le=N.percentWidth;N.width=parseInt(le,10)/100*a.width}return a}function n2(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},s=e.lines,l=o.font||r.font,u=!1,c,f;if(n){var h=o.padding,d=h?h[1]+h[3]:0;if(o.width!=null&&o.width!=="auto"){var v=Za(o.width,n.width)+d;s.length>0&&v+n.accumWidth>n.width&&(c=t.split(`
|
||
`),u=!0),n.accumWidth=v}else{var g=_Q(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,f=g.linesWidths,c=g.lines}}c||(c=t.split(`
|
||
`));for(var m=Oo(l),x=0;x<c.length;x++){var _=c[x],b=new zRe;if(b.styleName=i,b.text=_,b.isLineHolder=!_&&!a,typeof o.width=="number"?b.width=o.width:b.width=f?f[x]:Eo(m,_),!x&&!u){var S=(s[s.length-1]||(s[0]=new RF)).tokens,T=S.length;T===1&&S[0].isLineHolder?S[0]=b:(_||!T||a)&&S.push(b)}else s.push(new RF([b]))}}function VRe(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var GRe=ha(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function WRe(e){return VRe(e)?!!GRe[e]:!0}function _Q(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=Oo(t),h=0;h<e.length;h++){var d=e.charAt(h);if(d===`
|
||
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var v=KK(f,d.charCodeAt(0)),g=n?!1:!WRe(d);if(a.length?c+v>r:i+c+v>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=v,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=v)):g?(a.push(l),o.push(u),l=d,u=v):(a.push(d),o.push(v));continue}c+=v,g?(l+=d,u+=v):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function BF(e,t,r,n,i,a){if(e.baseX=r,e.baseY=n,e.outerWidth=e.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;Oe.set(zF,Yd(r,o,i),jc(n,s,a),o,s),Oe.intersect(t,zF,null,$F);var l=$F.outIntersectRect;e.outerWidth=l.width,e.outerHeight=l.height,e.baseX=Yd(l.x,l.width,i,!0),e.baseY=jc(l.y,l.height,a,!0)}}var zF=new Oe(0,0,0,0),$F={outIntersectRect:{},clamp:!0};function xN(e){return e!=null?e+="":e=""}function HRe(e){var t=xN(e.text),r=e.font,n=Eo(Oo(r),t),i=o0(r);return nI(e,n,i,null)}function nI(e,t,r,n){var i=new Oe(Yd(e.x||0,t,e.textAlign),jc(e.y||0,r,e.textBaseline),t,r),a=n??(bQ(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function bQ(e){var t=e.stroke;return t!=null&&t!=="none"&&e.lineWidth>0}var iI="__zr_style_"+Math.round(Math.random()*10),Rc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},TT={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Rc[iI]=!0;var FF=["z","z2","invisible"],URe=["invisible"],va=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=it(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ZRe(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.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 i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new Oe(0,0,0,0)),n?Oe.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new Oe(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:re(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=dg,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&dg)},t.prototype.styleUpdated=function(){this.__dirty&=~dg},t.prototype.createStyle=function(r){return n0(Rc,r)},t.prototype.useStyle=function(r){r[iI]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[iI]},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,FF)},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var f=it(c),h=0;h<f.length;h++){var d=f[h];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var v=it(u),h=0;h<v.length;h++){var d=v[h];this.style[d]=this.style[d]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?URe:FF,h=0;h<g.length;h++){var d=g[h];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(r,n){return re(r,n),r},t.prototype.getAnimationStyleProps=function(){return TT},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=!1,r._rect=null,r.dirtyRectTolerance=0,r.__dirty=Si|dg}(),t}(_T),i2=new Oe(0,0,0,0),a2=new Oe(0,0,0,0);function ZRe(e,t,r){return i2.copy(e.getBoundingRect()),e.transform&&i2.applyTransform(e.transform),a2.width=t,a2.height=r,!i2.intersect(a2)}var ni=Math.min,ii=Math.max,o2=Math.sin,s2=Math.cos,ju=Math.PI*2,Ex=yu(),Dx=yu(),Nx=yu();function AT(e,t,r){if(e.length!==0){for(var n=e[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<e.length;l++)n=e[l],i=ni(i,n[0]),a=ii(a,n[0]),o=ni(o,n[1]),s=ii(s,n[1]);t[0]=i,t[1]=o,r[0]=a,r[1]=s}}function VF(e,t,r,n,i,a){i[0]=ni(e,r),i[1]=ni(t,n),a[0]=ii(e,r),a[1]=ii(t,n)}var GF=[],WF=[];function YRe(e,t,r,n,i,a,o,s,l,u){var c=jK,f=$r,h=c(e,r,i,o,GF);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<h;d++){var v=f(e,r,i,o,GF[d]);l[0]=ni(v,l[0]),u[0]=ii(v,u[0])}h=c(t,n,a,s,WF);for(var d=0;d<h;d++){var g=f(t,n,a,s,WF[d]);l[1]=ni(g,l[1]),u[1]=ii(g,u[1])}l[0]=ni(e,l[0]),u[0]=ii(e,u[0]),l[0]=ni(o,l[0]),u[0]=ii(o,u[0]),l[1]=ni(t,l[1]),u[1]=ii(t,u[1]),l[1]=ni(s,l[1]),u[1]=ii(s,u[1])}function XRe(e,t,r,n,i,a,o,s){var l=BK,u=rn,c=ii(ni(l(e,r,i),1),0),f=ii(ni(l(t,n,a),1),0),h=u(e,r,i,c),d=u(t,n,a,f);o[0]=ni(e,i,h),o[1]=ni(t,a,d),s[0]=ii(e,i,h),s[1]=ii(t,a,d)}function qRe(e,t,r,n,i,a,o,s,l){var u=gs,c=ms,f=Math.abs(i-a);if(f%ju<1e-4&&f>1e-4){s[0]=e-r,s[1]=t-n,l[0]=e+r,l[1]=t+n;return}if(Ex[0]=s2(i)*r+e,Ex[1]=o2(i)*n+t,Dx[0]=s2(a)*r+e,Dx[1]=o2(a)*n+t,u(s,Ex,Dx),c(l,Ex,Dx),i=i%ju,i<0&&(i=i+ju),a=a%ju,a<0&&(a=a+ju),i>a&&!o?a+=ju:i<a&&o&&(i+=ju),o){var h=a;a=i,i=h}for(var d=0;d<a;d+=Math.PI/2)d>i&&(Nx[0]=s2(d)*r+e,Nx[1]=o2(d)*n+t,u(s,Nx,s),c(l,Nx,l))}var It={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ru=[],Bu=[],no=[],nl=[],io=[],ao=[],l2=Math.min,u2=Math.max,zu=Math.cos,$u=Math.sin,es=Math.abs,aI=Math.PI,vl=aI*2,c2=typeof Float32Array<"u",Ip=[];function f2(e){var t=Math.round(e/aI*1e8)/1e8;return t%2*aI}function CT(e,t){var r=f2(e[0]);r<0&&(r+=vl);var n=r-e[0],i=e[1];i+=n,!t&&i-r>=vl?i=r+vl:t&&r-i>=vl?i=r-vl:!t&&r>i?i=r+(vl-f2(r-i)):t&&r<i&&(i=r-(vl-f2(i-r))),e[0]=r,e[1]=i}var $o=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=es(n/iw/t)||0,this._uy=es(n/iw/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(It.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=es(t-this._xi),i=es(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(It.L,t,r),this._ctx&&a&&this._ctx.lineTo(t,r),a)this._xi=t,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=r,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,r,n,i,a,o){return this._drawPendingPt(),this.addData(It.C,t,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,r,n,i,a,o),this._xi=a,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,r,n,i){return this._drawPendingPt(),this.addData(It.Q,t,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,r,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(t,r,n,i,a,o){this._drawPendingPt(),Ip[0]=i,Ip[1]=a,CT(Ip,o),i=Ip[0],a=Ip[1];var s=a-i;return this.addData(It.A,t,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,r,n,i,a,o),this._xi=zu(a)*n+t,this._yi=$u(a)*n+r,this},e.prototype.arcTo=function(t,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,r,n,i,a),this},e.prototype.rect=function(t,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,r,n,i),this.addData(It.R,t,r,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(It.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)&&c2&&(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,i=this._len,a=0;a<r;a++)n+=t[a].len();var o=this.data;if(c2&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+n),i>0&&o))for(var s=0;s<i;s++)this.data[s]=o[s];for(var a=0;a<r;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},e.prototype.addData=function(t,r,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var f=0;f<arguments.length;f++)c[this._len++]=arguments[f]}},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,c2&&this._len>11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){no[0]=no[1]=io[0]=io[1]=Number.MAX_VALUE,nl[0]=nl[1]=ao[0]=ao[1]=-Number.MAX_VALUE;var t=this.data,r=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(r=t[o],n=t[o+1],i=r,a=n),s){case It.M:r=i=t[o++],n=a=t[o++],io[0]=i,io[1]=a,ao[0]=i,ao[1]=a;break;case It.L:VF(r,n,t[o],t[o+1],io,ao),r=t[o++],n=t[o++];break;case It.C:YRe(r,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],io,ao),r=t[o++],n=t[o++];break;case It.Q:XRe(r,n,t[o++],t[o++],t[o],t[o+1],io,ao),r=t[o++],n=t[o++];break;case It.A:var u=t[o++],c=t[o++],f=t[o++],h=t[o++],d=t[o++],v=t[o++]+d;o+=1;var g=!t[o++];l&&(i=zu(d)*f+u,a=$u(d)*h+c),qRe(u,c,f,h,d,v,g,io,ao),r=zu(v)*f+u,n=$u(v)*h+c;break;case It.R:i=r=t[o++],a=n=t[o++];var m=t[o++],x=t[o++];VF(i,a,i+m,a+x,io,ao);break;case It.Z:r=i,n=a;break}gs(no,no,io),ms(nl,nl,ao)}return o===0&&(no[0]=no[1]=nl[0]=nl[1]=0),new Oe(no[0],no[1],nl[0]-no[0],nl[1]-no[1])},e.prototype._calculateLength=function(){var t=this.data,r=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,f=0,h=0;h<r;){var d=t[h++],v=h===1;v&&(a=t[h],o=t[h+1],s=a,l=o);var g=-1;switch(d){case It.M:a=s=t[h++],o=l=t[h++];break;case It.L:{var m=t[h++],x=t[h++],_=m-a,b=x-o;(es(_)>n||es(b)>i||h===r-1)&&(g=Math.sqrt(_*_+b*b),a=m,o=x);break}case It.C:{var S=t[h++],T=t[h++],m=t[h++],x=t[h++],A=t[h++],M=t[h++];g=oje(a,o,S,T,m,x,A,M,10),a=A,o=M;break}case It.Q:{var S=t[h++],T=t[h++],m=t[h++],x=t[h++];g=lje(a,o,S,T,m,x,10),a=m,o=x;break}case It.A:var P=t[h++],I=t[h++],k=t[h++],O=t[h++],D=t[h++],N=t[h++],j=N+D;h+=1,v&&(s=zu(D)*k+P,l=$u(D)*O+I),g=u2(k,O)*l2(vl,Math.abs(N)),a=zu(j)*k+P,o=$u(j)*O+I;break;case It.R:{s=a=t[h++],l=o=t[h++];var z=t[h++],$=t[h++];g=z*2+$*2;break}case It.Z:{var _=s-a,b=l-o;g=Math.sqrt(_*_+b*b),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=r<1,v,g,m=0,x=0,_,b=0,S,T;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var A=0;A<o;){var M=n[A++],P=A===1;switch(P&&(u=n[A],c=n[A+1],s=u,l=c),M!==It.L&&b>0&&(t.lineTo(S,T),b=0),M){case It.M:s=u=n[A++],l=c=n[A++],t.moveTo(u,c);break;case It.L:{f=n[A++],h=n[A++];var I=es(f-u),k=es(h-c);if(I>i||k>a){if(d){var O=v[x++];if(m+O>_){var D=(_-m)/O;t.lineTo(u*(1-D)+f*D,c*(1-D)+h*D);break e}m+=O}t.lineTo(f,h),u=f,c=h,b=0}else{var N=I*I+k*k;N>b&&(S=f,T=h,b=N)}break}case It.C:{var j=n[A++],z=n[A++],$=n[A++],U=n[A++],F=n[A++],V=n[A++];if(d){var O=v[x++];if(m+O>_){var D=(_-m)/O;nu(u,j,$,F,D,Ru),nu(c,z,U,V,D,Bu),t.bezierCurveTo(Ru[1],Bu[1],Ru[2],Bu[2],Ru[3],Bu[3]);break e}m+=O}t.bezierCurveTo(j,z,$,U,F,V),u=F,c=V;break}case It.Q:{var j=n[A++],z=n[A++],$=n[A++],U=n[A++];if(d){var O=v[x++];if(m+O>_){var D=(_-m)/O;uy(u,j,$,D,Ru),uy(c,z,U,D,Bu),t.quadraticCurveTo(Ru[1],Bu[1],Ru[2],Bu[2]);break e}m+=O}t.quadraticCurveTo(j,z,$,U),u=$,c=U;break}case It.A:var W=n[A++],Y=n[A++],Z=n[A++],J=n[A++],ne=n[A++],le=n[A++],fe=n[A++],ze=!n[A++],xe=Z>J?Z:J,ie=es(Z-J)>.001,he=ne+le,ue=!1;if(d){var O=v[x++];m+O>_&&(he=ne+le*(_-m)/O,ue=!0),m+=O}if(ie&&t.ellipse?t.ellipse(W,Y,Z,J,fe,ne,he,ze):t.arc(W,Y,xe,ne,he,ze),ue)break e;P&&(s=zu(ne)*Z+W,l=$u(ne)*J+Y),u=zu(he)*Z+W,c=$u(he)*J+Y;break;case It.R:s=u=n[A],l=c=n[A+1],f=n[A++],h=n[A++];var ee=n[A++],Ve=n[A++];if(d){var O=v[x++];if(m+O>_){var Se=_-m;t.moveTo(f,h),t.lineTo(f+l2(Se,ee),h),Se-=ee,Se>0&&t.lineTo(f+ee,h+l2(Se,Ve)),Se-=Ve,Se>0&&t.lineTo(f+u2(ee-Se,0),h+Ve),Se-=ee,Se>0&&t.lineTo(f,h+u2(Ve-Se,0));break e}m+=O}t.rect(f,h,ee,Ve);break;case It.Z:if(d){var O=v[x++];if(m+O>_){var D=(_-m)/O;t.lineTo(u*(1-D)+s*D,c*(1-D)+l*D);break e}m+=O}t.closePath(),u=s,c=l}}},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=It,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function xl(e,t,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=e;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>e+s&&a>r+s||a<e-s&&a<r-s)return!1;if(e!==r)l=(t-n)/(e-r),u=(e*n-r*t)/(e-r);else return Math.abs(a-e)<=s/2;var c=l*a-o+u,f=c*c/(l*l+1);return f<=s/2*s/2}function KRe(e,t,r,n,i,a,o,s,l,u,c){if(l===0)return!1;var f=l;if(c>t+f&&c>n+f&&c>a+f&&c>s+f||c<t-f&&c<n-f&&c<a-f&&c<s-f||u>e+f&&u>r+f&&u>i+f&&u>o+f||u<e-f&&u<r-f&&u<i-f&&u<o-f)return!1;var h=RK(e,t,r,n,i,a,o,s,u,c,null);return h<=f/2}function wQ(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>e+u&&s>r+u&&s>i+u||s<e-u&&s<r-u&&s<i-u)return!1;var c=zK(e,t,r,n,i,a,s,l,null);return c<=u/2}var HF=Math.PI*2;function Pi(e){return e%=HF,e<0&&(e+=HF),e}var Op=Math.PI*2;function QRe(e,t,r,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>r||c+u<r)return!1;if(Math.abs(n-i)%Op<1e-4)return!0;if(a){var f=n;n=Pi(i),i=Pi(f)}else n=Pi(n),i=Pi(i);n>i&&(i+=Op);var h=Math.atan2(l,s);return h<0&&(h+=Op),h>=n&&h<=i||h+Op>=n&&h+Op<=i}function ls(e,t,r,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(r-e)+e;return l===i?1/0:l>i?s:0}var il=$o.CMD,Fu=Math.PI*2,JRe=1e-4;function e5e(e,t){return Math.abs(e-t)<JRe}var $n=[-1,-1,-1],Xi=[-1,-1];function t5e(){var e=Xi[0];Xi[0]=Xi[1],Xi[1]=e}function r5e(e,t,r,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var c=ew(t,n,a,s,u,$n);if(c===0)return 0;for(var f=0,h=-1,d=void 0,v=void 0,g=0;g<c;g++){var m=$n[g],x=m===0||m===1?.5:1,_=$r(e,r,i,o,m);_<l||(h<0&&(h=jK(t,n,a,s,Xi),Xi[1]<Xi[0]&&h>1&&t5e(),d=$r(t,n,a,s,Xi[0]),h>1&&(v=$r(t,n,a,s,Xi[1]))),h===2?m<Xi[0]?f+=d<t?x:-x:m<Xi[1]?f+=v<d?x:-x:f+=s<v?x:-x:m<Xi[0]?f+=d<t?x:-x:f+=s<d?x:-x)}return f}function n5e(e,t,r,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=sje(t,n,a,s,$n);if(l===0)return 0;var u=BK(t,n,a);if(u>=0&&u<=1){for(var c=0,f=rn(t,n,a,u),h=0;h<l;h++){var d=$n[h]===0||$n[h]===1?.5:1,v=rn(e,r,i,$n[h]);v<o||($n[h]<u?c+=f<t?d:-d:c+=a<f?d:-d)}return c}else{var d=$n[0]===0||$n[0]===1?.5:1,v=rn(e,r,i,$n[0]);return v<o?0:a<t?d:-d}}function i5e(e,t,r,n,i,a,o,s){if(s-=t,s>r||s<-r)return 0;var l=Math.sqrt(r*r-s*s);$n[0]=-l,$n[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Fu-1e-4){n=0,i=Fu;var c=a?1:-1;return o>=$n[0]+e&&o<=$n[1]+e?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Fu,i+=Fu);for(var h=0,d=0;d<2;d++){var v=$n[d];if(v+e>o){var g=Math.atan2(s,v),c=a?1:-1;g<0&&(g=Fu+g),(g>=n&&g<=i||g+Fu>=n&&g+Fu<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(c=-c),h+=c)}}return h}function SQ(e,t,r,n,i){for(var a=e.data,o=e.len(),s=0,l=0,u=0,c=0,f=0,h,d,v=0;v<o;){var g=a[v++],m=v===1;switch(g===il.M&&v>1&&(r||(s+=ls(l,u,c,f,n,i))),m&&(l=a[v],u=a[v+1],c=l,f=u),g){case il.M:c=a[v++],f=a[v++],l=c,u=f;break;case il.L:if(r){if(xl(l,u,a[v],a[v+1],t,n,i))return!0}else s+=ls(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case il.C:if(r){if(KRe(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=r5e(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case il.Q:if(r){if(wQ(l,u,a[v++],a[v++],a[v],a[v+1],t,n,i))return!0}else s+=n5e(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case il.A:var x=a[v++],_=a[v++],b=a[v++],S=a[v++],T=a[v++],A=a[v++];v+=1;var M=!!(1-a[v++]);h=Math.cos(T)*b+x,d=Math.sin(T)*S+_,m?(c=h,f=d):s+=ls(l,u,h,d,n,i);var P=(n-x)*S/b+x;if(r){if(QRe(x,_,S,T,T+A,M,t,P,i))return!0}else s+=i5e(x,_,S,T,T+A,M,P,i);l=Math.cos(T+A)*b+x,u=Math.sin(T+A)*S+_;break;case il.R:c=l=a[v++],f=u=a[v++];var I=a[v++],k=a[v++];if(h=c+I,d=f+k,r){if(xl(c,f,h,f,t,n,i)||xl(h,f,h,d,t,n,i)||xl(h,d,c,d,t,n,i)||xl(c,d,c,f,t,n,i))return!0}else s+=ls(h,f,h,d,n,i),s+=ls(c,d,c,f,n,i);break;case il.Z:if(r){if(xl(l,u,c,f,t,n,i))return!0}else s+=ls(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!e5e(u,f)&&(s+=ls(l,u,c,f,n,i)||0),s!==0}function a5e(e,t,r){return SQ(e,0,!1,t,r)}function o5e(e,t,r,n){return SQ(e,t,!0,r,n)}var lw=Pe({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Rc),s5e={style:Pe({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},TT.style)},h2=Bo.concat(["invisible","culling","z","z2","zlevel","parent"]),rt=function(e){q(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 i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<h2.length;++s)i[h2[s]]=this[h2[s]];i.__dirty|=Si}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(r){var n=it(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=r[o];o==="style"?this.style?re(this.style,s):this.useStyle(s):o==="shape"?re(this.shape,s):e.prototype.attrKV.call(this,o,s)}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(pe(r)){var n=hy(r,0);return n>.5?Xk:n>.2?zje:qk}else if(r)return qk}return Xk},t.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(pe(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=hy(r,0)<Yk;if(a===o)return n}},t.prototype.buildPath=function(r,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~bh},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 $o(!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,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&bh)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),o5e(s,l/u,r,n)))return!0}if(this.hasFill())return a5e(s,r,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=bh,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 i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:re(i,r),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&bh)},t.prototype.createStyle=function(r){return n0(lw,r)},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=re({},this.shape))},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=re({},i.shape),re(u,n.shape)):(u=re({},a?this.shape:i.shape),re(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=re({},this.shape);for(var c={},f=it(u),h=0;h<f.length;h++){var d=f[h];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(r,{shape:c},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return s5e},t.prototype.isZeroArea=function(){return!1},t.extend=function(r){var n=function(a){q(o,a);function o(s){var l=a.call(this,s)||this;return r.init&&r.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Ce(r.style)},o.prototype.getDefaultShape=function(){return Ce(r.shape)},o}(t);for(var i in r)typeof r[i]=="function"&&(n.prototype[i]=r[i]);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=Si|dg|bh}(),t}(va),l5e=Pe({strokeFirst:!0,font:zs,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},lw),qd=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return bQ(this.style)},t.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(r){return n0(l5e,r)},t.prototype.setBoundingRect=function(r){this._rect=r},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=HRe(this.style)),this._rect},t.initDefaultProps=function(){var r=t.prototype;r.dirtyRectTolerance=10}(),t}(va);qd.prototype.type="tspan";var u5e=Pe({x:0,y:0},Rc),c5e={style:Pe({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},TT.style)};function f5e(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Xr=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(r){return n0(u5e,r)},t.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=f5e(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return c5e},t.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new Oe(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},t}(va);Xr.prototype.type="image";function h5e(e,t){var r=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,c;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),e.moveTo(r+s,n),e.lineTo(r+i-l,n),l!==0&&e.arc(r+i-l,n+l,l,-Math.PI/2,0),e.lineTo(r+i,n+a-u),u!==0&&e.arc(r+i-u,n+a-u,u,0,Math.PI/2),e.lineTo(r+c,n+a),c!==0&&e.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),e.lineTo(r,n+s),s!==0&&e.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Vh=Math.round;function MT(e,t,r){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=i,e.y1=a,e.y2=o;var s=r&&r.lineWidth;return s&&(Vh(n*2)===Vh(i*2)&&(e.x1=e.x2=Li(n,s,!0)),Vh(a*2)===Vh(o*2)&&(e.y1=e.y2=Li(a,s,!0))),e}}function TQ(e,t,r){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;e.x=n,e.y=i,e.width=a,e.height=o;var s=r&&r.lineWidth;return s&&(e.x=Li(n,s,!0),e.y=Li(i,s,!0),e.width=Math.max(Li(n+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Li(i+o,s,!1)-e.y,o===0?0:1)),e}}function Li(e,t,r){if(!t)return e;var n=Vh(e*2);return(n+Vh(t))%2===0?n/2:(n+(r?1:-1))/2}var d5e=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),v5e={},Xe=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new d5e},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=TQ(v5e,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?h5e(r,n):r.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(rt);Xe.prototype.type="rect";var UF={fill:"#000"},ZF=2,oo={},p5e={style:Pe({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},TT.style)},at=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=UF,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,y5e(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 Oe(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(r.copy(l),r.applyTransform(u),a=a||r.clone(),a.union(r)):(a=a||l.clone(),a.union(l))}this._rect=a||r}return this._rect},t.prototype.setDefaultTextStyle=function(r){this._defaultStyle=r||UF},t.prototype.setTextContent=function(r){},t.prototype._mergeStyle=function(r,n){if(!n)return r;var i=n.rich,a=r.rich||i&&{};return re(r,n),i&&a?(this._mergeRich(a,i),r.rich=a):a&&(r.rich=a),r},t.prototype._mergeRich=function(r,n){for(var i=it(n),a=0;a<i.length;a++){var o=i[a];r[o]=r[o]||{},re(r[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return p5e},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||zs,i=r.padding,a=this._defaultStyle,o=r.x||0,s=r.y||0,l=r.align||a.align||"left",u=r.verticalAlign||a.verticalAlign||"top";BF(oo,a.overflowRect,o,s,l,u),o=oo.baseX,s=oo.baseY;var c=eV(r),f=BRe(c,r,oo.outerWidth,oo.outerHeight),h=d2(r),d=!!r.backgroundColor,v=f.outerHeight,g=f.outerWidth,m=f.lines,x=f.lineHeight;this.isTruncated=!!f.isTruncated;var _=o,b=jc(s,f.contentHeight,u);if(h||i){var S=Yd(o,g,l),T=jc(s,v,u);h&&this._renderBackground(r,r,S,T,g,v)}b+=x/2,i&&(_=JF(o,l,i),u==="top"?b+=i[0]:u==="bottom"&&(b-=i[2]));for(var A=0,M=!1,P=!1,I=QF("fill"in r?r.fill:(P=!0,a.fill)),k=KF("stroke"in r?r.stroke:!d&&(!a.autoStroke||P)?(A=ZF,M=!0,a.stroke):null),O=r.textShadowBlur>0,D=0;D<m.length;D++){var N=this._getOrCreateChild(qd),j=N.createStyle();N.useStyle(j),j.text=m[D],j.x=_,j.y=b,j.textAlign=l,j.textBaseline="middle",j.opacity=r.opacity,j.strokeFirst=!0,O&&(j.shadowBlur=r.textShadowBlur||0,j.shadowColor=r.textShadowColor||"transparent",j.shadowOffsetX=r.textShadowOffsetX||0,j.shadowOffsetY=r.textShadowOffsetY||0),j.stroke=k,j.fill=I,k&&(j.lineWidth=r.lineWidth||A,j.lineDash=r.lineDash,j.lineDashOffset=r.lineDashOffset||0),j.font=n,XF(j,r),b+=x,N.setBoundingRect(nI(j,f.contentWidth,f.calculatedLineHeight,M?0:null))}},t.prototype._updateRichTexts=function(){var r=this.style,n=this._defaultStyle,i=r.align||n.align,a=r.verticalAlign||n.verticalAlign,o=r.x||0,s=r.y||0;BF(oo,n.overflowRect,o,s,i,a),o=oo.baseX,s=oo.baseY;var l=eV(r),u=FRe(l,r,oo.outerWidth,oo.outerHeight,i),c=u.width,f=u.outerWidth,h=u.outerHeight,d=r.padding;this.isTruncated=!!u.isTruncated;var v=Yd(o,f,i),g=jc(s,h,a),m=v,x=g;d&&(m+=d[3],x+=d[0]);var _=m+c;d2(r)&&this._renderBackground(r,r,v,g,f,h);for(var b=!!r.backgroundColor,S=0;S<u.lines.length;S++){for(var T=u.lines[S],A=T.tokens,M=A.length,P=T.lineHeight,I=T.width,k=0,O=m,D=_,N=M-1,j=void 0;k<M&&(j=A[k],!j.align||j.align==="left");)this._placeToken(j,r,P,x,O,"left",b),I-=j.width,O+=j.width,k++;for(;N>=0&&(j=A[N],j.align==="right");)this._placeToken(j,r,P,x,D,"right",b),I-=j.width,D-=j.width,N--;for(O+=(c-(O-m)-(_-D)-I)/2;k<=N;)j=A[k],this._placeToken(j,r,P,x,O+j.width/2,"center",b),O+=j.width,k++;x+=P}},t.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&d2(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=JF(o,s,v),f-=r.height/2-v[0]-r.innerHeight/2);var g=this._getOrCreateChild(qd),m=g.createStyle();g.useStyle(m);var x=this._defaultStyle,_=!1,b=0,S=!1,T=QF("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,x.fill)),A=KF("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!x.autoStroke||_)?(b=ZF,S=!0,x.stroke):null),M=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,M&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||zs,m.opacity=fi(u.opacity,n.opacity,1),XF(m,u),A&&(m.lineWidth=fi(u.lineWidth,n.lineWidth,b),m.lineDash=be(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=A),T&&(m.fill=T),g.setBoundingRect(nI(m,r.contentWidth,r.contentHeight,S?0:null))},t.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,d=r.borderRadius,v=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(Xe),g.useStyle(g.createStyle()),g.style.fill=null;var x=g.shape;x.x=i,x.y=a,x.width=o,x.height=s,x.r=d,g.dirtyShape()}if(h){var _=g.style;_.fill=l||null,_.fillOpacity=be(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(Xr),m.onload=function(){v.dirtyStyle()};var b=m.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=be(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var S=(g||m).style;S.shadowBlur=r.shadowBlur||0,S.shadowColor=r.shadowColor||"transparent",S.shadowOffsetX=r.shadowOffsetX||0,S.shadowOffsetY=r.shadowOffsetY||0,S.opacity=fi(r.opacity,n.opacity,1)},t.makeFont=function(r){var n="";return CQ(r)&&(n=[r.fontStyle,r.fontWeight,AQ(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Ci(n)||r.textFont||r.font},t}(va),g5e={left:!0,right:1,center:1},m5e={top:1,bottom:1,middle:1},YF=["fontStyle","fontWeight","fontSize","fontFamily"];function AQ(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?JD+"px":e+"px"}function XF(e,t){for(var r=0;r<YF.length;r++){var n=YF[r],i=t[n];i!=null&&(e[n]=i)}}function CQ(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function y5e(e){return qF(e),B(e.rich,qF),e}function qF(e){if(e){e.font=at.makeFont(e);var t=e.align;t==="middle"&&(t="center"),e.align=t==null||g5e[t]?t:"left";var r=e.verticalAlign;r==="center"&&(r="middle"),e.verticalAlign=r==null||m5e[r]?r:"top";var n=e.padding;n&&(e.padding=r0(e.padding))}}function KF(e,t){return e==null||t<=0||e==="transparent"||e==="none"?null:e.image||e.colorStops?"#000":e}function QF(e){return e==null||e==="none"?null:e.image||e.colorStops?"#000":e}function JF(e,t,r){return t==="right"?e-r[1]:t==="center"?e+r[3]/2-r[1]/2:e+r[3]}function eV(e){var t=e.text;return t!=null&&(t+=""),t}function d2(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var De=Je(),oI=function(e,t,r,n){if(n){var i=De(n);i.dataIndex=r,i.dataType=t,i.seriesIndex=e,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=De(a);o.seriesIndex=e,o.dataIndex=r,o.dataType=t,o.ssrType="chart"})}},tV=1,rV={},MQ=Je(),_N=Je(),bN=0,s0=1,PT=2,Yn=["emphasis","blur","select"],py=["normal","emphasis","blur","select"],Ev=10,x5e=9,Bc="highlight",nb="downplay",uw="select",sI="unselect",cw="toggleSelect",wN="selectchanged";function qf(e){return e!=null&&e!=="none"}function LT(e,t,r){e.onHoverStateChange&&(e.hoverState||0)!==r&&e.onHoverStateChange(t),e.hoverState=r}function PQ(e){LT(e,"emphasis",PT)}function LQ(e){e.hoverState===PT&<(e,"normal",bN)}function SN(e){LT(e,"blur",s0)}function kQ(e){e.hoverState===s0&<(e,"normal",bN)}function _5e(e){e.selected=!0}function b5e(e){e.selected=!1}function nV(e,t,r){t(e,r)}function Qs(e,t,r){nV(e,t,r),e.isGroup&&e.traverse(function(n){nV(n,t,r)})}function fw(e,t){switch(t){case"emphasis":e.hoverState=PT;break;case"normal":e.hoverState=bN;break;case"blur":e.hoverState=s0;break;case"select":e.selected=!0}}function w5e(e,t,r,n){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<e.animators.length;o++){var u=e.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(r)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function S5e(e,t,r,n){var i=r&&We(r,"select")>=0,a=!1;if(e instanceof rt){var o=MQ(e),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(qf(s)||qf(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=re({},n),u=re({},u),u.fill=s):!qf(u.fill)&&qf(s)?(a=!0,n=re({},n),u=re({},u),u.fill=rw(s)):!qf(u.stroke)&&qf(l)&&(a||(n=re({},n),u=re({},u)),u.stroke=rw(l)),n.style=u}}if(n&&n.z2==null){a||(n=re({},n));var c=e.z2EmphasisLift;n.z2=e.z2+(c??Ev)}return n}function T5e(e,t,r){if(r&&r.z2==null){r=re({},r);var n=e.z2SelectLift;r.z2=e.z2+(n??x5e)}return r}function A5e(e,t,r){var n=We(e.currentStates,t)>=0,i=e.style.opacity,a=n?null:w5e(e,["opacity"],t,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=re({},r),o=re({opacity:n?i:a.opacity*.1},o),r.style=o),r}function v2(e,t){var r=this.states[e];if(this.style){if(e==="emphasis")return S5e(this,e,t,r);if(e==="blur")return A5e(this,e,r);if(e==="select")return T5e(this,e,r)}return r}function of(e){e.stateProxy=v2;var t=e.getTextContent(),r=e.getTextGuideLine();t&&(t.stateProxy=v2),r&&(r.stateProxy=v2)}function iV(e,t){!DQ(e,t)&&!e.__highByOuter&&Qs(e,PQ)}function aV(e,t){!DQ(e,t)&&!e.__highByOuter&&Qs(e,LQ)}function Fs(e,t){e.__highByOuter|=1<<(t||0),Qs(e,PQ)}function Vs(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Qs(e,LQ)}function IQ(e){Qs(e,SN)}function TN(e){Qs(e,kQ)}function OQ(e){Qs(e,_5e)}function EQ(e){Qs(e,b5e)}function DQ(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function NQ(e){var t=e.getModel(),r=[],n=[];t.eachComponent(function(i,a){var o=_N(a),s=i==="series",l=s?e.getViewOfSeriesModel(a):e.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){kQ(u)}),s&&r.push(a)),o.isBlured=!1}),B(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,t)})}function lI(e,t,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f<c.length;f++){var h=u.getItemGraphicEl(c[f]);h&&TN(h)}}if(e!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,f=u.coordinateSystem;f&&f.master&&(f=f.master);var h=f&&s?f===s:c;if(!(r==="series"&&!c||r==="coordinateSystem"&&!h||t==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(m){m.__highByOuter&&c&&t==="self"||SN(m)}),xn(t))a(u.getData(),t);else if(Le(t))for(var v=it(t),g=0;g<v.length;g++)a(u.getData(v[g]),t[v[g]]);l.push(u),_N(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var f=n.getViewOfComponentModel(c);f&&f.toggleBlurSeries&&f.toggleBlurSeries(l,!0,i)}})}}function uI(e,t,r){if(!(e==null||t==null)){var n=r.getModel().getComponent(e,t);if(n){_N(n).isBlured=!0;var i=r.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){SN(a)})}}}function C5e(e,t,r){var n=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=nf(i,t);a=(ae(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=De(o);lI(n,u.focus,u.blurScope,r)}else{var c=e.get(["emphasis","focus"]),f=e.get(["emphasis","blurScope"]);c!=null&&lI(n,c,f,r)}}}function AN(e,t,r,n){var i={focusSelf:!1,dispatchers:null};if(e==null||e==="series"||t==null||r==null)return i;var a=n.getModel().getComponent(e,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(r),l,u=0;u<s.length;u++)if(De(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function M5e(e,t,r){var n=De(e),i=AN(n.componentMainType,n.componentIndex,n.componentHighDownName,r),a=i.dispatchers,o=i.focusSelf;a?(o&&uI(n.componentMainType,n.componentIndex,r),B(a,function(s){return iV(s,t)})):(lI(n.seriesIndex,n.focus,n.blurScope,r),n.focus==="self"&&uI(n.componentMainType,n.componentIndex,r),iV(e,t))}function P5e(e,t,r){NQ(r);var n=De(e),i=AN(n.componentMainType,n.componentIndex,n.componentHighDownName,r).dispatchers;i?B(i,function(a){return aV(a,t)}):aV(e,t)}function L5e(e,t,r){if(fI(t)){var n=t.dataType,i=e.getData(n),a=nf(i,t);ae(a)||(a=[a]),e[t.type===cw?"toggleSelect":t.type===uw?"select":"unselect"](a,n)}}function oV(e){var t=e.getAllData();B(t,function(r){var n=r.data,i=r.type;n.eachItemGraphicEl(function(a,o){e.isSelected(o,i)?OQ(a):EQ(a)})})}function k5e(e){var t=[];return e.eachSeries(function(r){var n=r.getAllData();B(n,function(i){i.data;var a=i.type,o=r.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Yl(e,t,r){Cc(e,!0),Qs(e,of),cI(e,t,r)}function I5e(e){Cc(e,!1)}function Wt(e,t,r,n){n?I5e(e):Yl(e,t,r)}function cI(e,t,r){var n=De(e);t!=null?(n.focus=t,n.blurScope=r):n.focus&&(n.focus=null)}var sV=["emphasis","blur","select"],O5e={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Dr(e,t,r,n){r=r||"itemStyle";for(var i=0;i<sV.length;i++){var a=sV[i],o=t.getModel([a,r]),s=e.ensureState(a);s.style=n?n(o):o[O5e[r]]()}}function Cc(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 gy(e){return!!(e&&e.__highDownDispatcher)}function E5e(e,t,r){var n=De(e);n.componentMainType=t.mainType,n.componentIndex=t.componentIndex,n.componentHighDownName=r}function D5e(e){var t=rV[e];return t==null&&tV<=32&&(t=rV[e]=tV++),t}function fI(e){var t=e.type;return t===uw||t===sI||t===cw}function lV(e){var t=e.type;return t===Bc||t===nb}function N5e(e){var t=MQ(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 Kf=$o.CMD,j5e=[[],[],[]],uV=Math.sqrt,R5e=Math.atan2;function jQ(e,t){if(t){var r=e.data,n=e.len(),i,a,o,s,l,u,c=Kf.M,f=Kf.C,h=Kf.L,d=Kf.R,v=Kf.A,g=Kf.Q;for(o=0,s=0;o<n;){switch(i=r[o++],s=o,a=0,i){case c:a=1;break;case h:a=1;break;case f:a=3;break;case g:a=2;break;case v:var m=t[4],x=t[5],_=uV(t[0]*t[0]+t[1]*t[1]),b=uV(t[2]*t[2]+t[3]*t[3]),S=R5e(-t[1]/b,t[0]/_);r[o]*=_,r[o++]+=m,r[o]*=b,r[o++]+=x,r[o++]*=_,r[o++]*=b,r[o++]+=S,r[o++]+=S,o+=2,s=o;break;case d:u[0]=r[o++],u[1]=r[o++],ur(u,u,t),r[s++]=u[0],r[s++]=u[1],u[0]+=r[o++],u[1]+=r[o++],ur(u,u,t),r[s++]=u[0],r[s++]=u[1]}for(l=0;l<a;l++){var T=j5e[l];T[0]=r[o++],T[1]=r[o++],ur(T,T,t),r[s++]=T[0],r[s++]=T[1]}}e.increaseVersion()}}var p2=Math.sqrt,jx=Math.sin,Rx=Math.cos,Ep=Math.PI;function cV(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function hI(e,t){return(e[0]*t[0]+e[1]*t[1])/(cV(e)*cV(t))}function fV(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(hI(e,t))}function hV(e,t,r,n,i,a,o,s,l,u,c){var f=l*(Ep/180),h=Rx(f)*(e-r)/2+jx(f)*(t-n)/2,d=-1*jx(f)*(e-r)/2+Rx(f)*(t-n)/2,v=h*h/(o*o)+d*d/(s*s);v>1&&(o*=p2(v),s*=p2(v));var g=(i===a?-1:1)*p2((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,m=g*o*d/s,x=g*-s*h/o,_=(e+r)/2+Rx(f)*m-jx(f)*x,b=(t+n)/2+jx(f)*m+Rx(f)*x,S=fV([1,0],[(h-m)/o,(d-x)/s]),T=[(h-m)/o,(d-x)/s],A=[(-1*h-m)/o,(-1*d-x)/s],M=fV(T,A);if(hI(T,A)<=-1&&(M=Ep),hI(T,A)>=1&&(M=0),M<0){var P=Math.round(M/Ep*1e6)/1e6;M=Ep*2+P%2*Ep}c.addData(u,_,b,o,s,S,M,f,a)}var B5e=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,z5e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function $5e(e){var t=new $o;if(!e)return t;var r=0,n=0,i=r,a=n,o,s=$o.CMD,l=e.match(B5e);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],f=c.charAt(0),h=void 0,d=c.match(z5e)||[],v=d.length,g=0;g<v;g++)d[g]=parseFloat(d[g]);for(var m=0;m<v;){var x=void 0,_=void 0,b=void 0,S=void 0,T=void 0,A=void 0,M=void 0,P=r,I=n,k=void 0,O=void 0;switch(f){case"l":r+=d[m++],n+=d[m++],h=s.L,t.addData(h,r,n);break;case"L":r=d[m++],n=d[m++],h=s.L,t.addData(h,r,n);break;case"m":r+=d[m++],n+=d[m++],h=s.M,t.addData(h,r,n),i=r,a=n,f="l";break;case"M":r=d[m++],n=d[m++],h=s.M,t.addData(h,r,n),i=r,a=n,f="L";break;case"h":r+=d[m++],h=s.L,t.addData(h,r,n);break;case"H":r=d[m++],h=s.L,t.addData(h,r,n);break;case"v":n+=d[m++],h=s.L,t.addData(h,r,n);break;case"V":n=d[m++],h=s.L,t.addData(h,r,n);break;case"C":h=s.C,t.addData(h,d[m++],d[m++],d[m++],d[m++],d[m++],d[m++]),r=d[m-2],n=d[m-1];break;case"c":h=s.C,t.addData(h,d[m++]+r,d[m++]+n,d[m++]+r,d[m++]+n,d[m++]+r,d[m++]+n),r+=d[m-2],n+=d[m-1];break;case"S":x=r,_=n,k=t.len(),O=t.data,o===s.C&&(x+=r-O[k-4],_+=n-O[k-3]),h=s.C,P=d[m++],I=d[m++],r=d[m++],n=d[m++],t.addData(h,x,_,P,I,r,n);break;case"s":x=r,_=n,k=t.len(),O=t.data,o===s.C&&(x+=r-O[k-4],_+=n-O[k-3]),h=s.C,P=r+d[m++],I=n+d[m++],r+=d[m++],n+=d[m++],t.addData(h,x,_,P,I,r,n);break;case"Q":P=d[m++],I=d[m++],r=d[m++],n=d[m++],h=s.Q,t.addData(h,P,I,r,n);break;case"q":P=d[m++]+r,I=d[m++]+n,r+=d[m++],n+=d[m++],h=s.Q,t.addData(h,P,I,r,n);break;case"T":x=r,_=n,k=t.len(),O=t.data,o===s.Q&&(x+=r-O[k-4],_+=n-O[k-3]),r=d[m++],n=d[m++],h=s.Q,t.addData(h,x,_,r,n);break;case"t":x=r,_=n,k=t.len(),O=t.data,o===s.Q&&(x+=r-O[k-4],_+=n-O[k-3]),r+=d[m++],n+=d[m++],h=s.Q,t.addData(h,x,_,r,n);break;case"A":b=d[m++],S=d[m++],T=d[m++],A=d[m++],M=d[m++],P=r,I=n,r=d[m++],n=d[m++],h=s.A,hV(P,I,r,n,A,M,b,S,T,h,t);break;case"a":b=d[m++],S=d[m++],T=d[m++],A=d[m++],M=d[m++],P=r,I=n,r+=d[m++],n+=d[m++],h=s.A,hV(P,I,r,n,A,M,b,S,T,h,t);break}}(f==="z"||f==="Z")&&(h=s.Z,t.addData(h),r=i,n=a),o=h}return t.toStatic(),t}var RQ=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(r){},t}(rt);function BQ(e){return e.setData!=null}function zQ(e,t){var r=$5e(e),n=re({},t);return n.buildPath=function(i){var a=BQ(i);if(a&&i.canSave()){i.appendPath(r);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&r.rebuildPath(o,1)}},n.applyTransform=function(i){jQ(r,i),this.dirtyShape()},n}function $Q(e,t){return new RQ(zQ(e,t))}function F5e(e,t){var r=zQ(e,t),n=function(i){q(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=r.applyTransform,s.buildPath=r.buildPath,s}return a}(RQ);return n}function V5e(e,t){for(var r=[],n=e.length,i=0;i<n;i++){var a=e[i];r.push(a.getUpdatedPathProxy(!0))}var o=new rt(t);return o.createPathProxy(),o.buildPath=function(s){if(BQ(s)){s.appendPath(r);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function CN(e,t){t=t||{};var r=new rt;return e.shape&&r.setShape(e.shape),r.setStyle(e.style),t.bakeTransform?jQ(r.path,e.getComputedTransform()):t.toLocal?r.setLocalTransform(e.getComputedTransform()):r.copyTransform(e),r.buildPath=e.buildPath,r.applyTransform=r.applyTransform,r.z=e.z,r.z2=e.z2,r.zlevel=e.zlevel,r}var G5e=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Zo=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new G5e},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}(rt);Zo.prototype.type="circle";var W5e=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),l0=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new W5e},t.prototype.buildPath=function(r,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;r.moveTo(a-s,o),r.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),r.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),r.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),r.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),r.closePath()},t}(rt);l0.prototype.type="ellipse";var FQ=Math.PI,g2=FQ*2,Vu=Math.sin,Qf=Math.cos,H5e=Math.acos,An=Math.atan2,dV=Math.abs,Yg=Math.sqrt,pg=Math.max,so=Math.min,Ca=1e-4;function U5e(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=f*l-c*u;if(!(h*h<Ca))return h=(c*(t-a)-f*(e-i))/h,[e+h*l,t+h*u]}function Bx(e,t,r,n,i,a,o){var s=e-r,l=t-n,u=(o?a:-a)/Yg(s*s+l*l),c=u*l,f=-u*s,h=e+c,d=t+f,v=r+c,g=n+f,m=(h+v)/2,x=(d+g)/2,_=v-h,b=g-d,S=_*_+b*b,T=i-a,A=h*g-v*d,M=(b<0?-1:1)*Yg(pg(0,T*T*S-A*A)),P=(A*b-_*M)/S,I=(-A*_-b*M)/S,k=(A*b+_*M)/S,O=(-A*_+b*M)/S,D=P-m,N=I-x,j=k-m,z=O-x;return D*D+N*N>j*j+z*z&&(P=k,I=O),{cx:P,cy:I,x0:-c,y0:-f,x1:P*(i/T-1),y1:I*(i/T-1)}}function Z5e(e){var t;if(ae(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 Y5e(e,t){var r,n=pg(t.r,0),i=pg(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,h=!!t.clockwise,d=dV(u-l),v=d>g2&&d%g2;if(v>Ca&&(d=v),!(n>Ca))e.moveTo(c,f);else if(d>g2-Ca)e.moveTo(c+n*Qf(l),f+n*Vu(l)),e.arc(c,f,n,l,u,!h),i>Ca&&(e.moveTo(c+i*Qf(u),f+i*Vu(u)),e.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,x=void 0,_=void 0,b=void 0,S=void 0,T=void 0,A=void 0,M=void 0,P=void 0,I=void 0,k=void 0,O=void 0,D=void 0,N=void 0,j=void 0,z=n*Qf(l),$=n*Vu(l),U=i*Qf(u),F=i*Vu(u),V=d>Ca;if(V){var W=t.cornerRadius;W&&(r=Z5e(W),g=r[0],m=r[1],x=r[2],_=r[3]);var Y=dV(n-i)/2;if(b=so(Y,x),S=so(Y,_),T=so(Y,g),A=so(Y,m),I=M=pg(b,S),k=P=pg(T,A),(M>Ca||P>Ca)&&(O=n*Qf(u),D=n*Vu(u),N=i*Qf(l),j=i*Vu(l),d<FQ)){var Z=U5e(z,$,N,j,O,D,U,F);if(Z){var J=z-Z[0],ne=$-Z[1],le=O-Z[0],fe=D-Z[1],ze=1/Vu(H5e((J*le+ne*fe)/(Yg(J*J+ne*ne)*Yg(le*le+fe*fe)))/2),xe=Yg(Z[0]*Z[0]+Z[1]*Z[1]);I=so(M,(n-xe)/(ze+1)),k=so(P,(i-xe)/(ze-1))}}}if(!V)e.moveTo(c+z,f+$);else if(I>Ca){var ie=so(x,I),he=so(_,I),ue=Bx(N,j,z,$,n,ie,h),ee=Bx(O,D,U,F,n,he,h);e.moveTo(c+ue.cx+ue.x0,f+ue.cy+ue.y0),I<M&&ie===he?e.arc(c+ue.cx,f+ue.cy,I,An(ue.y0,ue.x0),An(ee.y0,ee.x0),!h):(ie>0&&e.arc(c+ue.cx,f+ue.cy,ie,An(ue.y0,ue.x0),An(ue.y1,ue.x1),!h),e.arc(c,f,n,An(ue.cy+ue.y1,ue.cx+ue.x1),An(ee.cy+ee.y1,ee.cx+ee.x1),!h),he>0&&e.arc(c+ee.cx,f+ee.cy,he,An(ee.y1,ee.x1),An(ee.y0,ee.x0),!h))}else e.moveTo(c+z,f+$),e.arc(c,f,n,l,u,!h);if(!(i>Ca)||!V)e.lineTo(c+U,f+F);else if(k>Ca){var ie=so(g,k),he=so(m,k),ue=Bx(U,F,O,D,i,-he,h),ee=Bx(z,$,N,j,i,-ie,h);e.lineTo(c+ue.cx+ue.x0,f+ue.cy+ue.y0),k<P&&ie===he?e.arc(c+ue.cx,f+ue.cy,k,An(ue.y0,ue.x0),An(ee.y0,ee.x0),!h):(he>0&&e.arc(c+ue.cx,f+ue.cy,he,An(ue.y0,ue.x0),An(ue.y1,ue.x1),!h),e.arc(c,f,i,An(ue.cy+ue.y1,ue.cx+ue.x1),An(ee.cy+ee.y1,ee.cx+ee.x1),h),ie>0&&e.arc(c+ee.cx,f+ee.cy,ie,An(ee.y1,ee.x1),An(ee.y0,ee.x0),!h))}else e.lineTo(c+U,f+F),e.arc(c,f,i,u,l,h)}e.closePath()}}}var X5e=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}(),bn=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new X5e},t.prototype.buildPath=function(r,n){Y5e(r,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(rt);bn.prototype.type="sector";var q5e=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Dv=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new q5e},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},t}(rt);Dv.prototype.type="ring";function K5e(e,t,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=e.length;h<d;h++)gs(c,c,e[h]),ms(f,f,e[h]);gs(c,c,n[0]),ms(f,f,n[1])}for(var h=0,d=e.length;h<d;h++){var v=e[h];if(r)l=e[h?h-1:d-1],u=e[(h+1)%d];else if(h===0||h===d-1){i.push(Io(e[h]));continue}else l=e[h-1],u=e[h+1];Pl(a,u,l),Fg(a,a,t);var g=q1(v,l),m=q1(v,u),x=g+m;x!==0&&(g/=x,m/=x),Fg(o,a,-g),Fg(s,a,m);var _=Ok([],v,o),b=Ok([],v,s);n&&(ms(_,_,c),gs(_,_,f),ms(b,b,c),gs(b,b,f)),i.push(_),i.push(b)}return r&&i.push(i.shift()),i}function VQ(e,t,r){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=K5e(i,n,r,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;s<f;s++)e.lineTo(i[s][0],i[s][1])}r&&e.closePath()}}var Q5e=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),wn=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new Q5e},t.prototype.buildPath=function(r,n){VQ(r,n,!0)},t}(rt);wn.prototype.type="polygon";var J5e=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),on=function(e){q(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 J5e},t.prototype.buildPath=function(r,n){VQ(r,n,!1)},t}(rt);on.prototype.type="polyline";var eBe={},tBe=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),yr=function(e){q(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 tBe},t.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=MT(eBe,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(r.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),r.lineTo(o,s))},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}(rt);yr.prototype.type="line";var ti=[],rBe=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 vV(e,t,r){var n=e.cpx2,i=e.cpy2;return n!=null||i!=null?[(r?yF:$r)(e.x1,e.cpx1,e.cpx2,e.x2,t),(r?yF:$r)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(r?zk:rn)(e.x1,e.cpx1,e.x2,t),(r?zk:rn)(e.y1,e.cpy1,e.y2,t)]}var Nv=function(e){q(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 rBe},t.prototype.buildPath=function(r,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,f=n.cpy2,h=n.percent;h!==0&&(r.moveTo(i,a),c==null||f==null?(h<1&&(uy(i,l,o,h,ti),l=ti[1],o=ti[2],uy(a,u,s,h,ti),u=ti[1],s=ti[2]),r.quadraticCurveTo(l,u,o,s)):(h<1&&(nu(i,l,c,o,h,ti),l=ti[1],c=ti[2],o=ti[3],nu(a,u,f,s,h,ti),u=ti[1],f=ti[2],s=ti[3]),r.bezierCurveTo(l,u,c,f,o,s)))},t.prototype.pointAt=function(r){return vV(this.shape,r,!1)},t.prototype.tangentAt=function(r){var n=vV(this.shape,r,!0);return wf(n,n)},t}(rt);Nv.prototype.type="bezier-curve";var nBe=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}(),u0=function(e){q(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 nBe},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),f=Math.sin(s);r.moveTo(c*o+i,f*o+a),r.arc(i,a,o,s,l,!u)},t}(rt);u0.prototype.type="arc";var c0=function(e){q(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(),i=0;i<r.length;i++)n=n||r[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var r=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<r.length;i++)r[i].path||r[i].createPathProxy(),r[i].path.setScale(n[0],n[1],r[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(r,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(r,i[a].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),rt.prototype.getBoundingRect.call(this)},t}(rt),GQ=function(){function e(t){this.colorStops=t||[]}return e.prototype.addColorStop=function(t,r){this.colorStops.push({offset:t,color:r})},e}(),Sf=function(e){q(t,e);function t(r,n,i,a,o,s){var l=e.call(this,o)||this;return l.x=r??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t}(GQ),MN=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,a)||this;return s.x=r??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t}(GQ),m2=Math.min,iBe=Math.max,zx=Math.abs,Gu=[0,0],Wu=[0,0],Jr=LK(),$x=Jr.minTv,Fx=Jr.maxTv,WQ=function(){function e(t,r){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Ie;for(var n=0;n<2;n++)this._axes[n]=new Ie;t&&this.fromBoundingRect(t,r)}return e.prototype.fromBoundingRect=function(t,r){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),r)for(var u=0;u<4;u++)n[u].transform(r);Ie.sub(i[0],n[1],n[0]),Ie.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},e.prototype.intersect=function(t,r,n){var i=!0,a=!r;return r&&Ie.set(r,0,0),Jr.reset(n,!a),!this._intersectCheckOneSide(this,t,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(i=!1,a)||!a&&!Jr.negativeSize&&Ie.copy(r,i?Jr.useDir?Jr.dirMinTv:$x:Fx),i},e.prototype._intersectCheckOneSide=function(t,r,n,i){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Gu),t._getProjMinMaxOnAxis(o,r._corners,Wu),Jr.negativeSize||Gu[1]<Wu[0]||Gu[0]>Wu[1]){if(a=!1,Jr.negativeSize||n)return a;var l=zx(Wu[0]-Gu[1]),u=zx(Gu[0]-Wu[1]);m2(l,u)>Fx.len()&&(l<u?Ie.scale(Fx,s,-l*i):Ie.scale(Fx,s,u*i))}else if(!n){var l=zx(Wu[0]-Gu[1]),u=zx(Gu[0]-Wu[1]);(Jr.useDir||m2(l,u)<$x.len())&&((l<u||!Jr.bidirectional)&&(Ie.scale($x,s,l*i),Jr.useDir&&Jr.calcDirMTV()),(l>=u||!Jr.bidirectional)&&(Ie.scale($x,s,-u*i),Jr.useDir&&Jr.calcDirMTV()))}}return a},e.prototype._getProjMinMaxOnAxis=function(t,r,n){for(var i=this._axes[t],a=this._origin,o=r[0].dot(i)+a[t],s=o,l=o,u=1;u<r.length;u++){var c=r[u].dot(i)+a[t];s=m2(c,s),l=iBe(c,l)}n[0]=s+Jr.touchThreshold,n[1]=l-Jr.touchThreshold,Jr.negativeSize=n[1]<n[0]},e}(),aBe=[],HQ=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.notClear=!0,r.incremental=!0,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.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 i=0;i<r.length;i++)this.addDisplayable(r[i],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 Oe(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(aBe)),r.union(a)}this._rect=r}return this._rect},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(r,n))return!0}return!1},t}(va),UQ=Je();function jv(e,t,r,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=e==="update";if(s){var u=void 0,c=void 0,f=void 0;n?(u=be(n.duration,200),c=be(n.easing,"cubicOut"),f=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),f=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(f=a.delay)),Ae(f)&&(f=f(r,i)),Ae(u)&&(u=u(r));var h={duration:u||0,delay:f,easing:c};return h}else return null}function PN(e,t,r,n,i,a,o){var s=!1,l;Ae(i)?(o=a,a=i,i=null):Le(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=e==="leave";u||t.stopAnimation("leave");var c=jv(e,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var f=c.duration,h=c.delay,d=c.easing,v={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(r,v):t.animateTo(r,v)}else t.stopAnimation(),!s&&t.attr(r),o&&o(1),a&&a()}function lt(e,t,r,n,i,a){PN("update",e,t,r,n,i,a)}function Nt(e,t,r,n,i,a){PN("enter",e,t,r,n,i,a)}function ud(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 iu(e,t,r,n,i,a){ud(e)||PN("leave",e,t,r,n,i,a)}function pV(e,t,r,n){e.removeTextContent(),e.removeTextGuideLine(),iu(e,{style:{opacity:0}},t,r,n)}function Cs(e,t,r){function n(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(i){i.isGroup||pV(i,t,r,n)}):pV(e,t,r,n)}function pa(e){UQ(e).oldStyle=e.style}function oBe(e){return UQ(e).oldStyle}var dI={},Re=["x","y"],Tr=["width","height"];function ZQ(e){return rt.extend(e)}var sBe=F5e;function YQ(e,t){return sBe(e,t)}function xa(e,t){dI[e]=t}function my(e){if(dI.hasOwnProperty(e))return dI[e]}function Kd(e,t,r,n){var i=$Q(e,t);return r&&(n==="center"&&(r=XQ(r,i.getBoundingRect())),kN(i,r)),i}function LN(e,t,r){var n=new Xr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(r==="center"){var a={width:i.width,height:i.height};n.setStyle(XQ(t,a))}}});return n}function XQ(e,t){var r=t.width/t.height,n=e.height*r,i;n<=e.width?i=e.height:(n=e.width,i=n/r);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Ti=V5e;function kN(e,t){if(e.applyTransform){var r=e.getBoundingRect(),n=r.calculateTransform(t);e.applyTransform(n)}}function Qd(e,t){return MT(e,e,{lineWidth:t}),e}function lBe(e,t){return TQ(e,e,t),e}var ib=Li;function Xl(e,t){for(var r=i0([]);e&&e!==t;)Fa(r,e.getLocalTransform(),r),e=e.parent;return r}function Ga(e,t,r){return t&&!xn(t)&&(t=ys.getLocalTransform(t)),r&&(t=da([],t)),ur([],e,t)}function kT(e,t,r){var n=t[4]===0||t[5]===0||t[0]===0?1:bo(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:bo(2*t[4]/t[2]),a=[e==="left"?-n:e==="right"?n:0,e==="top"?-i:e==="bottom"?i:0];return a=Ga(a,t,r),bo(a[0])>bo(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function gV(e){return!e.isGroup}function uBe(e){return e.shape!=null}function f0(e,t,r){if(!e||!t)return;function n(o){var s={};return o.traverse(function(l){gV(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return uBe(o)&&(s.shape=Ce(o.shape)),s}var a=n(e);t.traverse(function(o){if(gV(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),lt(o,l,r,De(o).dataIndex)}}})}function IN(e,t){return se(e,function(r){var n=r[0];n=gr(n,t.x),n=Ii(n,t.x+t.width);var i=r[1];return i=gr(i,t.y),i=Ii(i,t.y+t.height),[n,i]})}function qQ(e,t){var r=gr(e.x,t.x),n=Ii(e.x+e.width,t.x+t.width),i=gr(e.y,t.y),a=Ii(e.y+e.height,t.y+t.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Rv(e,t,r){var n=re({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(i.image=e.slice(8),Pe(i,r),new Xr(n)):Kd(e.replace("path://",""),n,r,"center")}function gg(e,t,r,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(KQ(e,t,r,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function KQ(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=y2(c,f,l,u);if(cBe(h))return!1;var d=e-i,v=t-a,g=y2(d,v,l,u)/h;if(g<0||g>1)return!1;var m=y2(d,v,c,f)/h;return!(m<0||m>1)}function y2(e,t,r,n){return e*n-r*t}function cBe(e){return e<=1e-6&&e>=-1e-6}function sf(e,t,r,n,i){return t==null||(ot(t)?Ut[0]=Ut[1]=Ut[2]=Ut[3]=t:(Ut[0]=t[0],Ut[1]=t[1],Ut[2]=t[2],Ut[3]=t[3]),n&&(Ut[0]=gr(0,Ut[0]),Ut[1]=gr(0,Ut[1]),Ut[2]=gr(0,Ut[2]),Ut[3]=gr(0,Ut[3])),r&&(Ut[0]=-Ut[0],Ut[1]=-Ut[1],Ut[2]=-Ut[2],Ut[3]=-Ut[3]),mV(e,Ut,"x","width",3,1,i&&i[0]||0),mV(e,Ut,"y","height",0,2,i&&i[1]||0)),e}var Ut=[0,0,0,0];function mV(e,t,r,n,i,a,o){var s=t[a]+t[i],l=e[n];e[n]+=s,o=gr(0,Ii(o,l)),e[n]<o?(e[n]=o,e[r]+=t[i]>=0?-t[i]:t[a]>=0?l+t[a]:bo(s)>1e-8?(l-o)*t[i]/s:0):e[r]-=t[i]}function Js(e){var t=e.itemTooltipOption,r=e.componentModel,n=e.itemName,i=pe(t)?{formatter:t}:t,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=e.formatterParamsExtra;l&&B(it(l),function(c){ye(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=De(e.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Pe({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function vI(e,t){var r;e.isGroup&&(r=t(e)),r||e.traverse(t)}function xu(e,t){if(e)if(ae(e))for(var r=0;r<e.length;r++)vI(e[r],t);else vI(e,t)}function ON(e){return!e||bo(e[1])<Vx&&bo(e[2])<Vx||bo(e[0])<Vx&&bo(e[3])<Vx}var Vx=1e-5;function yy(e,t){return e?Oe.copy(e,t):t.clone()}function EN(e,t){return t?a0(e||Wr(),t):void 0}function lf(e){return{z:e.get("z")||0,zlevel:e.get("zlevel")||0}}function QQ(e){var t=-1/0,r=1/0;vI(e,function(a){n(a),n(a.getTextContent()),n(a.getTextGuideLine())});function n(a){if(!(!a||a.isGroup)){var o=a.currentStates;if(o.length)for(var s=0;s<o.length;s++)i(a.states[o[s]]);i(a)}}function i(a){if(a){var o=a.z2;o>t&&(t=o),o<r&&(r=o)}}return r>t&&(r=t=0),{min:r,max:t}}function IT(e,t,r){JQ(e,t,r,-1/0)}function JQ(e,t,r,n){if(e.ignoreModelZ)return n;var i=e.getTextContent(),a=e.getTextGuideLine(),o=e.isGroup;if(o)for(var s=e.childrenRef(),l=0;l<s.length;l++)n=gr(JQ(s[l],t,r,n),n);else e.z=t,e.zlevel=r,n=gr(e.z2||0,n);if(i&&(i.z=t,i.zlevel=r,isFinite(n)&&(i.z2=n+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=r,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}xa("circle",Zo);xa("ellipse",l0);xa("sector",bn);xa("ring",Dv);xa("polygon",wn);xa("polyline",on);xa("rect",Xe);xa("line",yr);xa("bezierCurve",Nv);xa("arc",u0);const Tf=Object.freeze(Object.defineProperty({__proto__:null,Arc:u0,BezierCurve:Nv,BoundingRect:Oe,Circle:Zo,CompoundPath:c0,Ellipse:l0,Group:Me,Image:Xr,IncrementalDisplayable:HQ,Line:yr,LinearGradient:Sf,OrientedBoundingRect:WQ,Path:rt,Point:Ie,Polygon:wn,Polyline:on,RadialGradient:MN,Rect:Xe,Ring:Dv,Sector:bn,Text:at,WH:Tr,XY:Re,applyTransform:Ga,calcZ2Range:QQ,clipPointsByRect:IN,clipRectByRect:qQ,createIcon:Rv,ensureCopyRect:yy,ensureCopyTransform:EN,expandOrShrinkRect:sf,extendPath:YQ,extendShape:ZQ,getShapeClass:my,getTransform:Xl,groupTransition:f0,initProps:Nt,isBoundingRectAxisAligned:ON,isElementRemoved:ud,lineLineIntersect:KQ,linePolygonIntersect:gg,makeImage:LN,makePath:Kd,mergePath:Ti,registerShape:xa,removeElement:iu,removeElementWithFadeOut:Cs,resizePath:kN,retrieveZInfo:lf,setTooltipConfig:Js,subPixelOptimize:ib,subPixelOptimizeLine:Qd,subPixelOptimizeRect:lBe,transformDirection:kT,traverseElements:xu,traverseUpdateZ:IT,updateProps:lt},Symbol.toStringTag,{value:"Module"}));var OT={};function eJ(e,t){for(var r=0;r<Yn.length;r++){var n=Yn[r],i=t[n],a=e.ensureState(n);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function pI(e,t,r){var n=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),r!=null?{interpolatedValue:r}:null)),s==null&&(s=Ae(e.defaultText)?e.defaultText(i,e,r):e.defaultText);for(var l={normal:s},u=0;u<Yn.length;u++){var c=Yn[u],f=t[c];l[c]=be(n?n.getFormattedLabel(i,c,null,a,f&&f.get("formatter")):null,s)}return l}function Ur(e,t,r,n){r=r||OT;for(var i=e instanceof at,a=!1,o=0;o<py.length;o++){var s=t[py[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?e:e.getTextContent();if(a){i||(l||(l=new at,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=pI(r,t),c=t.normal,f=!!c.getShallow("show"),h=Mt(c,n&&n.normal,r,!1,!i);h.text=u.normal,i||e.setTextConfig(hw(c,r,!1));for(var o=0;o<Yn.length;o++){var d=Yn[o],s=t[d];if(s){var v=l.ensureState(d),g=!!be(s.getShallow("show"),f);if(g!==f&&(v.ignore=!g),v.style=Mt(s,n&&n[d],r,!0,!i),v.style.text=u[d],!i){var m=e.ensureState(d);m.textConfig=hw(s,r,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!f,l.useStyle(h),l.dirty(),r.enableTextSetter&&(Bv(l).setLabelText=function(x){var _=pI(r,t,x);eJ(l,_)})}else l&&(l.ignore=!0);e.dirty()}function Nr(e,t){t=t||"label";for(var r={normal:e.getModel(t)},n=0;n<Yn.length;n++){var i=Yn[n];r[i]=e.getModel([i,t])}return r}function Mt(e,t,r,n,i){var a={};return fBe(a,e,r,n,i),t&&re(a,t),a}function hw(e,t,r){t=t||{};var n={},i,a=e.getShallow("rotate"),o=be(e.getShallow("distance"),r?null:5),s=e.getShallow("offset");return i=e.getShallow("position")||(r?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=e.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(n.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(n.layoutRect=t.layoutRect),n}function fBe(e,t,r,n,i){r=r||OT;var a=t.ecModel,o=a&&a.option.textStyle,s=hBe(t),l;if(s){l={};var u="richInheritPlainLabel",c=be(t.get(u),a?a.get(u):void 0);for(var f in s)if(s.hasOwnProperty(f)){var h=t.getModel(["rich",f]);bV(l[f]={},h,o,t,c,r,n,i,!1,!0)}}l&&(e.rich=l);var d=t.get("overflow");d&&(e.overflow=d);var v=t.get("lineOverflow");v&&(e.lineOverflow=v);var g=e,m=t.get("minMargin");if(m!=null)m=ot(m)?m/2:0,g.margin=[m,m,m,m],g.__marginType=Gh.minMargin;else{var x=t.get("textMargin");x!=null&&(g.margin=r0(x),g.__marginType=Gh.textMargin)}bV(e,t,o,null,null,r,n,i,!0,!1)}function hBe(e){for(var t;e&&e!==e.ecModel;){var r=(e.option||OT).rich;if(r){t=t||{};for(var n=it(r),i=0;i<n.length;i++){var a=n[i];t[a]=1}}e=e.parentModel}return t}var yV=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],xV=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],_V=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function bV(e,t,r,n,i,a,o,s,l,u){r=!o&&r||OT;var c=a&&a.inheritColor,f=t.getShallow("color"),h=t.getShallow("textBorderColor"),d=be(t.getShallow("opacity"),r.opacity);(f==="inherit"||f==="auto")&&(c?f=c:f=null),(h==="inherit"||h==="auto")&&(c?h=c:h=null),s||(f=f||r.color,h=h||r.textBorderColor),f!=null&&(e.fill=f),h!=null&&(e.stroke=h);var v=be(t.getShallow("textBorderWidth"),r.textBorderWidth);v!=null&&(e.lineWidth=v);var g=be(t.getShallow("textBorderType"),r.textBorderType);g!=null&&(e.lineDash=g);var m=be(t.getShallow("textBorderDashOffset"),r.textBorderDashOffset);m!=null&&(e.lineDashOffset=m),!o&&d==null&&!u&&(d=a&&a.defaultOpacity),d!=null&&(e.opacity=d),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var x=0;x<yV.length;x++){var _=yV[x],b=i!==!1&&n?fi(t.getShallow(_),n.getShallow(_),r[_]):be(t.getShallow(_),r[_]);b!=null&&(e[_]=b)}for(var x=0;x<xV.length;x++){var _=xV[x],b=t.getShallow(_);b!=null&&(e[_]=b)}if(e.verticalAlign==null){var S=t.getShallow("baseline");S!=null&&(e.verticalAlign=S)}if(!l||!a.disableBox){for(var x=0;x<_V.length;x++){var _=_V[x],b=t.getShallow(_);b!=null&&(e[_]=b)}var T=t.getShallow("borderType");T!=null&&(e.borderDash=T),(e.backgroundColor==="auto"||e.backgroundColor==="inherit")&&c&&(e.backgroundColor=c),(e.borderColor==="auto"||e.borderColor==="inherit")&&c&&(e.borderColor=c)}}function DN(e,t){var r=t&&t.getModel("textStyle");return Ci([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 Bv=Je();function tJ(e,t,r,n){if(e){var i=Bv(e);i.prevValue=i.value,i.value=r;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}function rJ(e,t,r,n,i){var a=Bv(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=be(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var f=vQ(r,a.precision,s,l,c);a.interpolatedValue=c===1?null:f;var h=pI({labelDataIndex:t,labelFetcher:i,defaultText:o?o(f):f+""},a.statesModels,f);eJ(e,h)}e.percent=0,(a.prevValue==null?Nt:lt)(e,{percent:1},n,t,null,u)}var Gh={minMargin:1,textMargin:2},dBe=["textStyle","color"],x2=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],_2=new at,vBe=function(){function e(){}return e.prototype.getTextColor=function(t){var r=this.ecModel;return this.getShallow("color")||(!t&&r?r.get(dBe):null)},e.prototype.getFont=function(){return DN({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<x2.length;n++)r[x2[n]]=this.getShallow(x2[n]);return _2.useStyle(r),_2.update(),_2.getBoundingRect()},e}(),nJ=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],pBe=af(nJ),gBe=function(){function e(){}return e.prototype.getLineStyle=function(t){return pBe(this,t)},e}(),iJ=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],mBe=af(iJ),yBe=function(){function e(){}return e.prototype.getItemStyle=function(t,r){return mBe(this,t,r)},e}(),tt=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){He(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,i=n==null?n:n[t];if(i==null&&!r){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},e.prototype.getModel=function(t,r){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return r=r||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,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(Ce(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(!nt.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 i=0;i<t.length&&!(t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&r&&(n=r._doGet(this.resolveParentPath(t),r.parentModel)),n},e}();mN(tt);LRe(tt);fr(tt,gBe);fr(tt,yBe);fr(tt,DRe);fr(tt,vBe);var xBe=Math.round(Math.random()*10);function zv(e){return[e||"",xBe++].join("_")}function _Be(e){var t={};e.registerSubTypeDefaulter=function(r,n){var i=wo(r);t[i.main]=n},e.determineSubType=function(r,n){var i=n.type;if(!i){var a=wo(r).main;e.hasSubTypes(r)&&t[a]&&(i=t[a](n))}return i}}function bBe(e,t){e.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=r(o),c=u.graph,f=u.noEntryList,h={};for(B(a,function(_){h[_]=!0});f.length;){var d=f.pop(),v=c[d],g=!!h[d];g&&(s.call(l,d,v.originalDeps.slice()),delete h[d]),B(v.successor,g?x:m)}B(h,function(){var _="";throw new Error(_)});function m(_){c[_].entryCount--,c[_].entryCount===0&&f.push(_)}function x(_){h[_]=!0,m(_)}};function r(a){var o={},s=[];return B(a,function(l){var u=n(o,l),c=u.originalDeps=t(l),f=i(c,a);u.entryCount=f.length,u.entryCount===0&&s.push(l),B(f,function(h){We(u.predecessor,h)<0&&u.predecessor.push(h);var d=n(o,h);We(d.successor,h)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return B(a,function(l){We(o,l)>=0&&s.push(l)}),s}}function _u(e,t){return He(He({},e,!0),t,!0)}const wBe={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:". "}}}},SBe={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 dw="ZH",NN="EN",cd=NN,ab={},jN={},aJ=nt.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||cd).toUpperCase();return e.indexOf(dw)>-1?dw:cd}():cd;function RN(e,t){e=e.toUpperCase(),jN[e]=new tt(t),ab[e]=t}function TBe(e){if(pe(e)){var t=ab[e.toUpperCase()]||{};return e===dw||e===NN?Ce(t):He(Ce(t),Ce(ab[cd]),!1)}else return He(Ce(e),Ce(ab[cd]),!1)}function gI(e){return jN[e]}function ABe(){return jN[cd]}RN(NN,wBe);RN(dw,SBe);var mI=null;function CBe(e){mI||(mI=e)}function Sr(){return mI}var BN=1e3,zN=BN*60,Xg=zN*60,ta=Xg*24,wV=ta*365,MBe={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})/},ob={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},PBe="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Gx="{yyyy}-{MM}-{dd}",SV={year:"{yyyy}",month:"{yyyy}-{MM}",day:Gx,hour:Gx+" "+ob.hour,minute:Gx+" "+ob.minute,second:Gx+" "+ob.second,millisecond:PBe},_i=["year","month","day","hour","minute","second","millisecond"],LBe=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function kBe(e){return!pe(e)&&!Ae(e)?IBe(e):e}function IBe(e){e=e||{};var t={},r=!0;return B(_i,function(n){r&&(r=e[n]==null)}),B(_i,function(n,i){var a=e[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=_i[s],u=Le(a)&&!ae(a)?a[l]:a,c=void 0;ae(u)?(c=u.slice(),o=c[0]||""):pe(u)?(o=u,c=[o]):(o==null?o=ob[n]:MBe[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),t[n][l]=c}}),t}function Fn(e,t){return e+="","0000".substr(0,t-e.length)+e}function qg(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 OBe(e){return e===qg(e)}function EBe(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function h0(e,t,r,n){var i=Uo(e),a=i[oJ(r)](),o=i[$N(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[FN(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[VN(r)](),f=(c-1)%12+1,h=i[GN(r)](),d=i[WN(r)](),v=i[HN(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),x=n instanceof tt?n:gI(n||aJ)||ABe(),_=x.getModel("time"),b=_.get("month"),S=_.get("monthAbbr"),T=_.get("dayOfWeek"),A=_.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Fn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Fn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Fn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,A[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Fn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Fn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Fn(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Fn(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Fn(v,3)).replace(/{S}/g,v+"")}function DBe(e,t,r,n,i){var a=null;if(pe(r))a=r;else if(Ae(r)){var o={time:e.time,level:e.time.level},s=Sr();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=r(e.value,t,o)}else{var l=e.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Wh(e.value,i);a=r[c][c][0]}}return h0(new Date(e.value),a,i,n)}function Wh(e,t){var r=Uo(e),n=r[$N(t)]()+1,i=r[FN(t)](),a=r[VN(t)](),o=r[GN(t)](),s=r[WN(t)](),l=r[HN(t)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,v=d&&n===1;return v?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function vw(e,t,r){switch(t){case"year":e[sJ(r)](0);case"month":e[lJ(r)](1);case"day":e[uJ(r)](0);case"hour":e[cJ(r)](0);case"minute":e[fJ(r)](0);case"second":e[hJ(r)](0)}return e}function oJ(e){return e?"getUTCFullYear":"getFullYear"}function $N(e){return e?"getUTCMonth":"getMonth"}function FN(e){return e?"getUTCDate":"getDate"}function VN(e){return e?"getUTCHours":"getHours"}function GN(e){return e?"getUTCMinutes":"getMinutes"}function WN(e){return e?"getUTCSeconds":"getSeconds"}function HN(e){return e?"getUTCMilliseconds":"getMilliseconds"}function NBe(e){return e?"setUTCFullYear":"setFullYear"}function sJ(e){return e?"setUTCMonth":"setMonth"}function lJ(e){return e?"setUTCDate":"setDate"}function uJ(e){return e?"setUTCHours":"setHours"}function cJ(e){return e?"setUTCMinutes":"setMinutes"}function fJ(e){return e?"setUTCSeconds":"setSeconds"}function hJ(e){return e?"setUTCMilliseconds":"setMilliseconds"}function jBe(e,t,r,n,i,a,o,s){var l=new at({style:{text:e,font:t,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function UN(e){if(!vN(e))return pe(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ZN(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 $v=r0;function yI(e,t,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Ci(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?Uo(e):e;if(isNaN(+l)){if(s)return"-"}else return h0(l,n,r)}if(t==="ordinal")return Y1(e)?i(e):ot(e)&&a(e)?e+"":"-";var u=zo(e);return a(u)?UN(u):Y1(e)?i(e):typeof e=="boolean"?e+"":"-"}var TV=["a","b","c","d","e","f","g"],b2=function(e,t){return"{"+e+(t??"")+"}"};function YN(e,t,r){ae(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=TV[a];e=e.replace(b2(o),b2(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(b2(TV[l],s),r?On(u):u)}return e}function RBe(e,t,r){return B(t,function(n,i){e=e.replace("{"+i+"}",n)}),e}function dJ(e,t){var r=pe(e)?{color:e,extraCssText:t}:e||{},n=r.color,i=r.type;t=r.extraCssText;var a=r.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+On(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+On(n)+";"+(t||"")+'"></span>';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function BBe(e,t,r){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd
|
||
yyyy`);var n=Uo(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return e=e.replace("MM",Fn(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Fn(a%100+"",2)).replace("dd",Fn(s,2)).replace("d",s).replace("hh",Fn(l,2)).replace("h",l).replace("mm",Fn(u,2)).replace("m",u).replace("ss",Fn(c,2)).replace("s",c).replace("SSS",Fn(f,3)),e}function zBe(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function uf(e,t){return t=t||"transparent",pe(e)?e:Le(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function pw(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var sb={},w2={},Fv=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(t,r){this._nonSeriesBoxMasterList=n(sb),this._normalMasterList=n(w2);function n(i,a){var o=[];return B(i,function(s,l){var u=s.create(t,r);o=o.concat(u||[])}),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"){sb[t]=r;return}w2[t]=r},e.get=function(t){return w2[t]||sb[t]},e}();function $Be(e){return!!sb[e]}var xI={coord:1,coord2:2};function FBe(e){vJ.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var vJ=_e();function VBe(e){var t=e.getShallow("coord",!0),r=xI.coord;if(t==null){var n=vJ.get(e.type);n&&n.getCoord2&&(r=xI.coord2,t=n.getCoord2(e))}return{coord:t,from:r}}var mo={none:0,dataCoordSys:1,boxCoordSys:2};function pJ(e,t){var r=e.getShallow("coordinateSystem"),n=e.getShallow("coordinateSystemUsage",!0),i=mo.none;if(r){var a=e.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=mo.dataCoordSys,a||(i=mo.none)):n==="box"&&(i=mo.boxCoordSys,!a&&!$Be(r)&&(i=mo.none))}return{coordSysType:r,kind:i}}function d0(e){var t=e.targetModel,r=e.coordSysType,n=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=pJ(t),o=a.kind,s=a.coordSysType;if(i&&o!==mo.dataCoordSys&&(o=mo.dataCoordSys,s=r),o===mo.none||s!==r)return!1;var l=n(r,t);return l?(o===mo.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var gJ=function(e,t){var r=t.getReferringComponents(e,tr).models[0];return r&&r.coordinateSystem},lb=B,mJ=["left","right","top","bottom","width","height"],Mc=[["width","left","right"],["height","top","bottom"]];function XN(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),h=f&&f.getBoundingRect(),d,v;if(e==="horizontal"){var g=c.width+(h?-h.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);v=o+m,v>i||l.newline?(a+=s+r,o=0,v=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),e==="horizontal"?a=d+r:o=v+r)})}var zc=XN;Fe(XN,"vertical");Fe(XN,"horizontal");function yJ(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 GBe(e,t){var r=jr(e,t,{enableLayoutOnlyByCenter:!0}),n=e.getBoxLayoutParams(),i,a;if(r.type===mg.point)a=r.refPoint,i=$t(n,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get("center"),s=ae(o)?o:[o,o];i=$t(n,r.refContainer),a=r.boxCoordFrom===xI.coord2?r.refPoint:[ve(s[0],i.width)+i.x,ve(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function xJ(e,t){var r=GBe(e,t),n=r.viewRect,i=r.center,a=e.get("radius");ae(a)||(a=[0,a]);var o=ve(n.width,t.getWidth()),s=ve(n.height,t.getHeight()),l=Math.min(o,s),u=ve(a[0],l/2),c=ve(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function $t(e,t,r){r=$v(r||0);var n=t.width,i=t.height,a=ve(e.left,n),o=ve(e.top,i),s=ve(e.right,n),l=ve(e.bottom,i),u=ve(e.width,n),c=ve(e.height,i),f=r[2]+r[0],h=r[1]+r[3],d=e.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),e.left||e.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var v=new Oe((t.x||0)+a+r[3],(t.y||0)+o+r[0],u,c);return v.margin=r,v}function _J(e,t,r){var n=e.getShallow("preserveAspect",!0);if(!n)return t;var i=t.width/t.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return t;var a=e.getShallow("preserveAspectAlign",!0),o=e.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=n==="cover";return i>r&&!l||i<r&&l?(s.width=t.height*r,a==="left"?s.left=0:a==="right"?s.right=0:s.left="center"):(s.height=t.width/r,o==="top"?s.top=0:o==="bottom"?s.bottom=0:s.top="middle"),$t(s,t)}var mg={rect:1,point:2};function jr(e,t,r){var n,i,a,o=e.boxCoordinateSystem,s;if(o){var l=VBe(e),u=l.coord,c=l.from;if(o.dataToLayout){a=mg.rect,s=c;var f=o.dataToLayout(u);n=f.contentRect||f.rect}else r&&r.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=mg.point,s=c,i=o.dataToPoint(u))}return a==null&&(a=mg.rect),a===mg.rect&&(n||(n={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),i=[n.x+n.width/2,n.y+n.height/2]),{type:a,refContainer:n,refPoint:i,boxCoordFrom:s}}function ET(e,t,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var u;if(l==="raw")u=e.type==="group"?new Oe(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=$t(Pe({width:u.width,height:u.height},t),r,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===e&&e.markRedraw(),!0}function WBe(e,t){return e[Mc[t][0]]!=null||e[Mc[t][1]]!=null&&e[Mc[t][2]]!=null}function xy(e){var t=e.layoutMode||e.constructor.layoutMode;return Le(t)?t:t?{type:t}:null}function Fo(e,t,r){var n=r&&r.ignoreSize;!ae(n)&&(n=[n,n]);var i=o(Mc[0],0),a=o(Mc[1],1);l(Mc[0],e,i),l(Mc[1],e,a);function o(u,c){var f={},h=0,d={},v=0,g=2;if(lb(u,function(_){d[_]=e[_]}),lb(u,function(_){ye(t,_)&&(f[_]=d[_]=t[_]),s(f,_)&&h++,s(d,_)&&v++}),n[c])return s(t,u[1])?d[u[2]]=null:s(t,u[2])&&(d[u[1]]=null),d;if(v===g||!h)return d;if(h>=g)return f;for(var m=0;m<u.length;m++){var x=u[m];if(!ye(f,x)&&ye(e,x)){f[x]=e[x];break}}return f}function s(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,f){lb(u,function(h){c[h]=f[h]})}}function Af(e){return bJ({},e)}function bJ(e,t){return t&&e&&lb(mJ,function(r){ye(t,r)&&(e[r]=t[r])}),e}var HBe=Je(),Qe=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.uid=zv("ec_cpt_model"),a}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=xy(this),a=i?Af(r):{},o=n.getTheme();He(r,o.get(this.mainType)),He(r,this.getDefaultOption()),i&&Fo(r,a,i)},t.prototype.mergeOption=function(r,n){He(this.option,r,!0);var i=xy(this);i&&Fo(this.option,r,i)},t.prototype.optionUpdated=function(r,n){},t.prototype.getDefaultOption=function(){var r=this.constructor;if(!CRe(r))return r.defaultOption;var n=HBe(this);if(!n.defaultOption){for(var i=[],a=r;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=He(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return Ov(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return yJ(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}(tt);gQ(Qe,tt);wT(Qe);_Be(Qe);bBe(Qe,UBe);function UBe(e){var t=[];return B(Qe.getClassesByMainType(e),function(r){t=t.concat(r.dependencies||r.prototype.dependencies||[])}),t=se(t,function(r){return wo(r).main}),e!=="dataset"&&We(t,"dataset")<=0&&t.unshift("dataset"),t}var K={color:{},darkColor:{},size:{}},hr=K.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)"};re(hr,{primary:hr.neutral80,secondary:hr.neutral70,tertiary:hr.neutral60,quaternary:hr.neutral50,disabled:hr.neutral20,border:hr.neutral30,borderTint:hr.neutral20,borderShade:hr.neutral40,background:hr.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:hr.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:hr.neutral70,axisLineTint:hr.neutral40,axisTick:hr.neutral70,axisTickMinor:hr.neutral60,axisLabel:hr.neutral70,axisSplitLine:hr.neutral15,axisMinorSplitLine:hr.neutral05});for(var Hu in hr)if(hr.hasOwnProperty(Hu)){var AV=hr[Hu];Hu==="theme"?K.darkColor.theme=hr.theme.slice():Hu==="highlight"?K.darkColor.highlight="rgba(255,231,130,0.4)":Hu.indexOf("accent")===0?K.darkColor[Hu]=As(AV,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):K.darkColor[Hu]=As(AV,null,function(e){return e*.9},function(e){return 1-Math.pow(e,1.5)})}K.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var wJ="";typeof navigator<"u"&&(wJ=navigator.platform||"");var Jf="rgba(0, 0, 0, 0.2)",SJ=K.color.theme[0],ZBe=As(SJ,null,null,.9);const YBe={darkMode:"auto",colorBy:"series",color:K.color.theme,gradientColor:[ZBe,SJ],aria:{decal:{decals:[{color:Jf,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Jf,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Jf,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Jf,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Jf,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Jf,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:wJ.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 TJ=_e(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ni="original",sn="arrayRows",ji="objectRows",qa="keyedColumns",ql="typedArray",AJ="unknown",Wa="column",Cf="row",hn={Must:1,Might:2,Not:3},CJ=Je();function XBe(e){CJ(e).datasetMap=_e()}function MJ(e,t,r){var n={},i=KN(t);if(!i||!e)return n;var a=[],o=[],s=t.ecModel,l=CJ(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;e=e.slice(),B(e,function(g,m){var x=Le(g)?g:e[m]={name:g};x.type==="ordinal"&&c==null&&(c=m,f=v(x)),n[x.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});B(e,function(g,m){var x=g.name,_=v(g);if(c==null){var b=h.valueWayDim;d(n[x],b,_),d(o,b,_),h.valueWayDim+=_}else if(c===m)d(n[x],0,_),d(a,0,_);else{var b=h.categoryWayDim;d(n[x],b,_),d(o,b,_),h.categoryWayDim+=_}});function d(g,m,x){for(var _=0;_<x;_++)g.push(m+_)}function v(g){var m=g.dimsDef;return m?m.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function qN(e,t,r){var n={},i=KN(e);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===ji||a===qa)&&B(o,function(c,f){(Le(c)?c.name:c)==="name"&&(s=f)});var l=function(){for(var c={},f={},h=[],d=0,v=Math.min(5,r);d<v;d++){var g=LJ(t.data,a,t.seriesLayoutBy,o,t.startIndex,d);h.push(g);var m=g===hn.Not;if(m&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!m&&h[c.n]===hn.Not)&&(c.n=d),x(c)&&h[c.n]!==hn.Not)return c;m||(g===hn.Might&&f.v==null&&d!==s&&(f.v=d),(f.n==null||f.n===f.v)&&(f.n=d))}function x(_){return _.v!=null&&_.n!=null}return x(c)?c:x(f)?f:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function KN(e){var t=e.get("data",!0);if(!t)return Ov(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},tr).models[0]}function qBe(e){return!e.get("transform",!0)&&!e.get("fromTransformResult",!0)?[]:Ov(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},tr).models}function PJ(e,t){return LJ(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function LJ(e,t,r,n,i,a){var o,s=5;if(Zn(e))return hn.Not;var l,u;if(n){var c=n[a];Le(c)?(l=c.name,u=c.type):pe(c)&&(l=c)}if(u!=null)return u==="ordinal"?hn.Must:hn.Not;if(t===sn){var f=e;if(r===Cf){for(var h=f[a],d=0;d<(h||[]).length&&d<s;d++)if((o=S(h[i+d]))!=null)return o}else for(var d=0;d<f.length&&d<s;d++){var v=f[i+d];if(v&&(o=S(v[a]))!=null)return o}}else if(t===ji){var g=e;if(!l)return hn.Not;for(var d=0;d<g.length&&d<s;d++){var m=g[d];if(m&&(o=S(m[l]))!=null)return o}}else if(t===qa){var x=e;if(!l)return hn.Not;var h=x[l];if(!h||Zn(h))return hn.Not;for(var d=0;d<h.length&&d<s;d++)if((o=S(h[d]))!=null)return o}else if(t===Ni)for(var _=e,d=0;d<_.length&&d<s;d++){var m=_[d],b=Iv(m);if(!ae(b))return hn.Not;if((o=S(b[a]))!=null)return o}function S(T){var A=pe(T);if(T!=null&&Number.isFinite(Number(T))&&T!=="")return A?hn.Might:hn.Not;if(A&&T!=="-")return hn.Must}return hn.Not}var _I=_e();function KBe(e,t){_n(_I.get(e)==null&&t),_I.set(e,t)}function QBe(e,t,r){var n=_I.get(t);if(!n)return r;var i=n(e);return i?r.concat(i):r}var CV=Je(),JBe=Je(),QN=function(){function e(){}return e.prototype.getColorFromPalette=function(t,r,n){var i=Pt(this.get("color",!0)),a=this.get("colorLayer",!0);return kJ(this,CV,i,a,t,r,n)},e.prototype.clearColorPalette=function(){t3e(this,CV)},e}();function bI(e,t,r,n){var i=Pt(e.get(["aria","decal","decals"]));return kJ(e,JBe,i,null,t,r,n)}function e3e(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 kJ(e,t,r,n,i,a,o){a=a||e;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:e3e(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function t3e(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Wx,Dp,MV,PV="\0_ec_inner",r3e=1,JN=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new tt(a),this._locale=new tt(o),this._optionManager=s},t.prototype.setOption=function(r,n,i){var a=IV(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(r,n){return this._resetOption(r,IV(n))},t.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?MV(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&B(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(r){this._mergeOption(r,null)},t.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=_e(),u=n&&n.replaceMergeMainTypeMap;XBe(this),B(r,function(f,h){f!=null&&(Qe.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?Ce(f):He(i[h],f,!0))}),u&&u.each(function(f,h){Qe.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Qe.topologicalTravel(s,Qe.getAllClassMainTypes(),c,this);function c(f){var h=QBe(this,f,Pt(r[f])),d=a.get(f),v=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=fQ(d,h,v);mRe(g,f,Qe),i[f]=null,a.set(f,null),o.set(f,0);var m=[],x=[],_=0,b;B(g,function(S,T){var A=S.existing,M=S.newOption;if(!M)A&&(A.mergeOption({},this),A.optionUpdated({},!1));else{var P=f==="series",I=Qe.getClass(f,S.keyInfo.subType,!P);if(!I)return;if(f==="tooltip"){if(b)return;b=!0}if(A&&A.constructor===I)A.name=S.keyInfo.name,A.mergeOption(M,this),A.optionUpdated(M,!1);else{var k=re({componentIndex:T},S.keyInfo);A=new I(M,this,this,k),re(A,k),S.brandNew&&(A.__requireNewView=!0),A.init(M,this,this),A.optionUpdated(null,!0)}}A?(m.push(A.option),x.push(A),_++):(m.push(void 0),x.push(void 0))},this),i[f]=m,a.set(f,x),o.set(f,_),f==="series"&&Wx(this)}this._seriesIndices||Wx(this)},t.prototype.getOption=function(){var r=Ce(this.option);return B(r,function(n,i){if(Qe.hasClass(i)){for(var a=Pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!vy(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[PV],r},t.prototype.setTheme=function(r){this._theme=new tt(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 i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(r){var n=r.mainType;if(!n)return[];var i=r.index,a=r.id,o=r.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],B(Pt(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=LV("id",a,s):o!=null?l=LV("name",o,s):l=ht(s,function(u){return!!u}),kV(l,r)},t.prototype.findComponents=function(r){var n=r.query,i=r.mainType,a=s(n),o=a?this.queryComponents(a):ht(this._componentsMap.get(i),function(u){return!!u});return l(kV(o,r));function s(u){var c=i+"Index",f=i+"Id",h=i+"Name";return u&&(u[c]!=null||u[f]!=null||u[h]!=null)?{mainType:i,index:u[c],id:u[f],name:u[h]}:null}function l(u){return r.filter?ht(u,r.filter):u}},t.prototype.eachComponent=function(r,n,i){var a=this._componentsMap;if(Ae(r)){var o=n,s=r;a.each(function(f,h){for(var d=0;f&&d<f.length;d++){var v=f[d];v&&s.call(o,h,v,v.componentIndex)}})}else for(var l=pe(r)?a.get(r):Le(r)?this.findComponents(r):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},t.prototype.getSeriesByName=function(r){var n=Ir(r,null);return ht(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(r){return this._componentsMap.get("series")[r]},t.prototype.getSeriesByType=function(r){return ht(this._componentsMap.get("series"),function(n){return!!n&&n.subType===r})},t.prototype.getSeries=function(){return ht(this._componentsMap.get("series"),function(r){return!!r})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(r,n){Dp(this),B(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];r.call(n,a,i)},this)},t.prototype.eachRawSeries=function(r,n){B(this._componentsMap.get("series"),function(i){i&&r.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(r,n,i){Dp(this),B(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===r&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(r,n,i){return B(this.getSeriesByType(r),n,i)},t.prototype.isSeriesFiltered=function(r){return Dp(this),this._seriesIndicesMap.get(r.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(r,n){Dp(this);var i=[];B(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];r.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=_e(i)},t.prototype.restoreData=function(r){Wx(this);var n=this._componentsMap,i=[];n.each(function(a,o){Qe.hasClass(o)&&i.push(o)}),Qe.topologicalTravel(i,Qe.getAllClassMainTypes(),function(a){B(n.get(a),function(o){o&&(a!=="series"||!n3e(o,r))&&o.restoreData()})})},t.internalField=function(){Wx=function(r){var n=r._seriesIndices=[];B(r._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),r._seriesIndicesMap=_e(n)},Dp=function(r){},MV=function(r,n){r.option={},r.option[PV]=r3e,r._componentsMap=_e({series:[]}),r._componentsCount=_e();var i=n.aria;Le(i)&&i.enabled==null&&(i.enabled=!0),i3e(n,r._theme.option),He(n,YBe,!1),r._mergeOption(n,null)}}(),t}(tt);function n3e(e,t){if(t){var r=t.seriesIndex,n=t.seriesId,i=t.seriesName;return r!=null&&e.componentIndex!==r||n!=null&&e.id!==n||i!=null&&e.name!==i}}function i3e(e,t){var r=e.color&&!e.colorLayer;B(t,function(n,i){i==="colorLayer"&&r||i==="color"&&e.color||Qe.hasClass(i)||(typeof n=="object"?e[i]=e[i]?He(e[i],n,!1):Ce(n):e[i]==null&&(e[i]=n))})}function LV(e,t,r){if(ae(t)){var n=_e();return B(t,function(a){if(a!=null){var o=Ir(a,null);o!=null&&n.set(a,!0)}}),ht(r,function(a){return a&&n.get(a[e])})}else{var i=Ir(t,null);return ht(r,function(a){return a&&i!=null&&a[e]===i})}}function kV(e,t){return t.hasOwnProperty("subType")?ht(e,function(r){return r&&r.subType===t.subType}):e}function IV(e){var t=_e();return e&&B(Pt(e.replaceMerge),function(r){t.set(r,!0)}),{replaceMergeMainTypeMap:t}}fr(JN,QN);var a3e=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],IJ=function(){function e(t){B(a3e,function(r){this[r]=ge(t[r],t)},this)}return e}(),o3e=/^(min|max)?(.+)$/,s3e=function(){function e(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return e.prototype.setOption=function(t,r,n){t&&(B(Pt(t.series),function(o){o&&o.data&&Zn(o.data)&&sy(o.data)}),B(Pt(t.dataset),function(o){o&&o.source&&Zn(o.source)&&sy(o.source)})),t=Ce(t);var i=this._optionBackup,a=l3e(t,r,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},e.prototype.mountOption=function(t){var r=this._optionBackup;return this._timelineOptions=r.timelineOptions,this._mediaList=r.mediaList,this._mediaDefault=r.mediaDefault,this._currentMediaIndices=[],Ce(t?r.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(t){var r,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(r=Ce(n[i.getCurrentIndex()]))}return r},e.prototype.getMediaOption=function(t){var r=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)u3e(i[l].query,r,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!f3e(o,this._currentMediaIndices)&&(s=se(o,function(c){return Ce(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},e}();function l3e(e,t,r){var n=[],i,a,o=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,f=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((f||c)&&(e.options=e.media=null),a=e),c&&ae(u)&&B(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),h(a),B(l,function(d){return h(d)}),B(n,function(d){return h(d.option)});function h(d){B(t,function(v){v(d,r)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function u3e(e,t,r){var n={width:t,height:r,aspectratio:t/r},i=!0;return B(e,function(a,o){var s=o.match(o3e);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();c3e(n[u],a,l)||(i=!1)}}),i}function c3e(e,t,r){return r==="min"?e>=t:r==="max"?e<=t:e===t}function f3e(e,t){return e.join(",")===t.join(",")}var Aa=B,_y=Le,OV=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function S2(e){var t=e&&e.itemStyle;if(t)for(var r=0,n=OV.length;r<n;r++){var i=OV[r],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?He(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?He(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function Ln(e,t,r){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,i=e[t].emphasis;n&&(r?(e[t].normal=e[t].emphasis=null,Pe(e[t],n)):e[t]=n),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function yg(e){Ln(e,"itemStyle"),Ln(e,"lineStyle"),Ln(e,"areaStyle"),Ln(e,"label"),Ln(e,"labelLine"),Ln(e,"upperLabel"),Ln(e,"edgeLabel")}function br(e,t){var r=_y(e)&&e[t],n=_y(r)&&r.textStyle;if(n)for(var i=0,a=NF.length;i<a;i++){var o=NF[i];n.hasOwnProperty(o)&&(r[o]=n[o])}}function Yi(e){e&&(yg(e),br(e,"label"),e.emphasis&&br(e.emphasis,"label"))}function h3e(e){if(_y(e)){S2(e),yg(e),br(e,"label"),br(e,"upperLabel"),br(e,"edgeLabel"),e.emphasis&&(br(e.emphasis,"label"),br(e.emphasis,"upperLabel"),br(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(S2(t),Yi(t));var r=e.markLine;r&&(S2(r),Yi(r));var n=e.markArea;n&&Yi(n);var i=e.data;if(e.type==="graph"){i=i||e.nodes;var a=e.links||e.edges;if(a&&!Zn(a))for(var o=0;o<a.length;o++)Yi(a[o]);B(e.categories,function(u){yg(u)})}if(i&&!Zn(i))for(var o=0;o<i.length;o++)Yi(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Yi(s[o]);if(r=e.markLine,r&&r.data)for(var l=r.data,o=0;o<l.length;o++)ae(l[o])?(Yi(l[o][0]),Yi(l[o][1])):Yi(l[o]);e.type==="gauge"?(br(e,"axisLabel"),br(e,"title"),br(e,"detail")):e.type==="treemap"?(Ln(e.breadcrumb,"itemStyle"),B(e.levels,function(u){yg(u)})):e.type==="tree"&&yg(e.leaves)}}function ts(e){return ae(e)?e:e?[e]:[]}function EV(e){return(ae(e)?e[0]:e)||{}}function d3e(e,t){Aa(ts(e.series),function(n){_y(n)&&h3e(n)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),Aa(r,function(n){Aa(ts(e[n]),function(i){i&&(br(i,"axisLabel"),br(i.axisPointer,"label"))})}),Aa(ts(e.parallel),function(n){var i=n&&n.parallelAxisDefault;br(i,"axisLabel"),br(i&&i.axisPointer,"label")}),Aa(ts(e.calendar),function(n){Ln(n,"itemStyle"),br(n,"dayLabel"),br(n,"monthLabel"),br(n,"yearLabel")}),Aa(ts(e.radar),function(n){br(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)}),Aa(ts(e.geo),function(n){_y(n)&&(Yi(n),Aa(ts(n.regions),function(i){Yi(i)}))}),Aa(ts(e.timeline),function(n){Yi(n),Ln(n,"label"),Ln(n,"itemStyle"),Ln(n,"controlStyle",!0);var i=n.data;ae(i)&&B(i,function(a){Le(a)&&(Ln(a,"label"),Ln(a,"itemStyle"))})}),Aa(ts(e.toolbox),function(n){Ln(n,"iconStyle"),Aa(n.feature,function(i){Ln(i,"iconStyle")})}),br(EV(e.axisPointer),"label"),br(EV(e.tooltip).axisPointer,"label")}function v3e(e,t){for(var r=t.split(","),n=e,i=0;i<r.length&&(n=n&&n[r[i]],n!=null);i++);return n}function p3e(e,t,r,n){for(var i=t.split(","),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=r)}function DV(e){e&&B(g3e,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var g3e=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],m3e=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],T2=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Np(e){var t=e&&e.itemStyle;if(t)for(var r=0;r<T2.length;r++){var n=T2[r][1],i=T2[r][0];t[n]!=null&&(t[i]=t[n])}}function NV(e){e&&e.alignTo==="edge"&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function jV(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function y3e(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(e.emphasis.focus="adjacency"))}function OJ(e,t){if(e)for(var r=0;r<e.length;r++)t(e[r]),e[r]&&OJ(e[r].children,t)}function EJ(e,t){d3e(e,t),e.series=Pt(e.series),B(e.series,function(r){if(Le(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),NV(r.label);var i=r.data;if(i&&!Zn(i))for(var a=0;a<i.length;a++)NV(i[a]);r.hoverOffset!=null&&(r.emphasis=r.emphasis||{},(r.emphasis.scaleSize=null)&&(r.emphasis.scaleSize=r.hoverOffset))}else if(n==="gauge"){var o=v3e(r,"pointer.color");o!=null&&p3e(r,"itemStyle.color",o)}else if(n==="bar"){Np(r),Np(r.backgroundStyle),Np(r.emphasis);var i=r.data;if(i&&!Zn(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Np(i[a]),Np(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=r.highlightPolicy;s&&(r.emphasis=r.emphasis||{},r.emphasis.focus||(r.emphasis.focus=s)),jV(r),OJ(r.data,jV)}else n==="graph"||n==="sankey"?y3e(r):n==="map"&&(r.mapType&&!r.map&&(r.map=r.mapType),r.mapLocation&&Pe(r,r.mapLocation));r.hoverAnimation!=null&&(r.emphasis=r.emphasis||{},r.emphasis&&r.emphasis.scale==null&&(r.emphasis.scale=r.hoverAnimation)),DV(r)}}),e.dataRange&&(e.visualMap=e.dataRange),B(m3e,function(r){var n=e[r];n&&(ae(n)||(n=[n]),B(n,function(i){DV(i)}))})}function x3e(e){var t=_e();e.eachSeries(function(r){var n=r.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=r.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:r};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(r){if(r.length!==0){var n=r[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&r.reverse(),B(r,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?r[o-1].seriesModel:null)}),_3e(r)}})}function _3e(e){B(e,function(t,r){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(t.stackedDimension,f);if(isNaN(h))return i;var d,v;s?v=o.getRawIndex(f):d=o.get(t.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var x=e[m];if(s||(v=x.data.rawIndexOf(x.stackedByDimension,d)),v>=0){var _=x.data.getByRawIndex(x.stackResultDimension,v);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=iRe(h,_),g=_;break}}}return n[0]=h,n[1]=g,n})})}var DT=function(){function e(t){this.data=t.data||(t.sourceFormat===qa?{}:[]),this.sourceFormat=t.sourceFormat||AJ,this.seriesLayoutBy=t.seriesLayoutBy||Wa,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 i=r[n];i.type==null&&PJ(this,n)===hn.Must&&(i.type="ordinal")}}return e}();function ej(e){return e instanceof DT}function wI(e,t,r){r=r||DJ(e);var n=t.seriesLayoutBy,i=w3e(e,r,n,t.sourceHeader,t.dimensions),a=new DT({data:e,sourceFormat:r,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Ce(t)});return a}function tj(e){return new DT({data:e,sourceFormat:Zn(e)?ql:Ni})}function b3e(e){return new DT({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Ce(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function DJ(e){var t=AJ;if(Zn(e))t=ql;else if(ae(e)){e.length===0&&(t=sn);for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i!=null){if(ae(i)||Zn(i)){t=sn;break}else if(Le(i)){t=ji;break}}}}else if(Le(e)){for(var a in e)if(ye(e,a)&&xn(e[a])){t=qa;break}}return t}function w3e(e,t,r,n,i){var a,o;if(!e)return{dimensionsDefine:RV(i),startIndex:o,dimensionsDetectedCount:a};if(t===sn){var s=e;n==="auto"||n==null?BV(function(u){u!=null&&u!=="-"&&(pe(u)?o==null&&(o=1):o=0)},r,s,10):o=ot(n)?n:n?1:0,!i&&o===1&&(i=[],BV(function(u,c){i[c]=u!=null?u+"":""},r,s,1/0)),a=i?i.length:r===Cf?s.length:s[0]?s[0].length:null}else if(t===ji)i||(i=S3e(e));else if(t===qa)i||(i=[],B(e,function(u,c){i.push(c)}));else if(t===Ni){var l=Iv(e[0]);a=ae(l)&&l.length||1}return{startIndex:o,dimensionsDefine:RV(i),dimensionsDetectedCount:a}}function S3e(e){for(var t=0,r;t<e.length&&!(r=e[t++]););if(r)return it(r)}function RV(e){if(e){var t=_e();return se(e,function(r,n){r=Le(r)?r:{name:r};var i={name:r.name,displayName:r.displayName,type:r.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function BV(e,t,r,n){if(t===Cf)for(var i=0;i<r.length&&i<n;i++)e(r[i]?r[i][0]:null,i);else for(var a=r[0]||[],i=0;i<a.length&&i<n;i++)e(a[i],i)}function NJ(e){var t=e.sourceFormat;return t===ji||t===qa}var Uu,Zu,Yu,Xu,zV,$V,jJ=function(){function e(t,r){var n=ej(t)?t:tj(t);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===ql&&(this._offset=0,this._dimSize=r,this._data=i),$V(this,i,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;$V=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,f=l.startIndex,h=l.dimensionsDefine,d=zV[rj(u,c)];if(re(o,d),u===ql)o.getItem=r,o.count=i,o.fillStorage=n;else{var v=RJ(u,c);o.getItem=ge(v,null,s,f,h);var g=BJ(u,c);o.count=ge(g,null,s,f,h)}};var r=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,f=0;f<u;f++)s[f]=l[c+f];return s},n=function(o,s,l,u){for(var c=this._data,f=this._dimSize,h=0;h<f;h++){for(var d=u[h],v=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],m=s-o,x=l[h],_=0;_<m;_++){var b=c[_*f+h];x[o+_]=b,b<v&&(v=b),b>g&&(g=b)}d[0]=v,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};zV=(t={},t[sn+"_"+Wa]={pure:!0,appendData:a},t[sn+"_"+Cf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ji]={pure:!0,appendData:a},t[qa]={pure:!0,appendData:function(o){var s=this._data;B(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Ni]={appendData:a},t[ql]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),e}(),Hx=function(e){ae(e)||lQ("series.data or dataset.source must be an array.")};Uu={},Uu[sn+"_"+Wa]=Hx,Uu[sn+"_"+Cf]=Hx,Uu[ji]=Hx,Uu[qa]=function(e,t){for(var r=0;r<t.length;r++){var n=t[r].name;n==null&&lQ("dimension name must not be null/undefined.")}},Uu[Ni]=Hx;var FV=function(e,t,r,n){return e[n]},T3e=(Zu={},Zu[sn+"_"+Wa]=function(e,t,r,n){return e[n+t]},Zu[sn+"_"+Cf]=function(e,t,r,n,i){n+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Zu[ji]=FV,Zu[qa]=function(e,t,r,n,i){for(var a=i||[],o=0;o<r.length;o++){var s=r[o].name,l=s!=null?e[s]:null;a[o]=l?l[n]:null}return a},Zu[Ni]=FV,Zu);function RJ(e,t){var r=T3e[rj(e,t)];return r}var VV=function(e,t,r){return e.length},A3e=(Yu={},Yu[sn+"_"+Wa]=function(e,t,r){return Math.max(0,e.length-t)},Yu[sn+"_"+Cf]=function(e,t,r){var n=e[0];return n?Math.max(0,n.length-t):0},Yu[ji]=VV,Yu[qa]=function(e,t,r){var n=r[0].name,i=n!=null?e[n]:null;return i?i.length:0},Yu[Ni]=VV,Yu);function BJ(e,t){var r=A3e[rj(e,t)];return r}var A2=function(e,t,r){return e[t]},C3e=(Xu={},Xu[sn]=A2,Xu[ji]=function(e,t,r){return e[r]},Xu[qa]=A2,Xu[Ni]=function(e,t,r){var n=Iv(e);return n instanceof Array?n[t]:n},Xu[ql]=A2,Xu);function zJ(e){var t=C3e[e];return t}function rj(e,t){return e===sn?e+"_"+t:e}function Jd(e,t,r){if(e){var n=e.getRawDataItem(t);if(n!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(r!=null){var o=e.getDimensionIndex(r),s=i.getDimensionProperty(o);return zJ(a)(n,o,s)}else{var l=n;return a===Ni&&(l=Iv(n)),l}}}}var M3e=/\{@(.+?)\}/g,NT=function(){function e(){}return e.prototype.getDataParams=function(t,r){var n=this.getData(r),i=this.getRawValue(t,r),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,f=this.mainType,h=f==="series",d=n.userOutput&&n.userOutput.get();return{componentType:f,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:a,data:s,dataType:r,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(t,r,n,i,a,o){r=r||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&ae(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(r==="normal"?["label","formatter"]:[r,"label","formatter"])}if(Ae(a))return l.status=r,l.dimensionIndex=i,a(l);if(pe(a)){var c=YN(a,l);return c.replace(M3e,function(f,h){var d=h.length,v=h;v.charAt(0)==="["&&v.charAt(d-1)==="]"&&(v=+v.slice(1,d-1));var g=Jd(s,t,v);if(o&&ae(o.interpolatedValue)){var m=s.getDimensionIndex(v);m>=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},e.prototype.getRawValue=function(t,r){return Jd(this.getData(r),t)},e.prototype.formatTooltip=function(t,r,n){},e}();function GV(e){var t,r;return Le(e)?e.type&&(r=e):t=e,{text:t,frag:r}}function Kg(e){return new P3e(e)}var P3e=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 i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d<v)){var g=this._progress;if(ae(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],d,v,l,u);else this._doProgress(g,d,v,l,u)}this._dueIndex=v;var x=this._settedOutputEnd!=null?this._settedOutputEnd:v;this._outputDueEnd=x}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,i,a){WV.reset(r,n,i,a),this._callingProgress=t,this._callingProgress({start:r,end:n,count:n-r,next:WV.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),ae(r)&&!r.length&&(r=null)),this._progress=r,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.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}(),WV=function(){var e,t,r,n,i,a={reset:function(l,u,c,f){t=l,e=u,r=c,n=f,i=Math.ceil(n/r),a.next=r>1&&n>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var l=t%i*r+Math.ceil(t/i),u=t>=e?null:l<n?l:t;return t++,u}}();function Kl(e,t){var r=t&&t.type;return r==="ordinal"?e:(r==="time"&&!ot(e)&&e!=null&&e!=="-"&&(e=+Uo(e)),e==null||e===""?NaN:Number(e))}var L3e=_e({number:function(e){return parseFloat(e)},time:function(e){return+Uo(e)},trim:function(e){return pe(e)?Ci(e):e}});function $J(e){return L3e.get(e)}var FJ={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}},k3e=function(){function e(t,r){if(!ot(r)){var n="";mt(n)}this._opFn=FJ[t],this._rvalFloat=zo(r)}return e.prototype.evaluate=function(t){return ot(t)?this._opFn(t,this._rvalFloat):this._opFn(zo(t),this._rvalFloat)},e}(),VJ=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=ot(t)?t:zo(t),i=ot(r)?r:zo(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=pe(t),l=pe(r);s&&(n=l?t:0),l&&(i=s?r:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}(),I3e=function(){function e(t,r){this._rval=r,this._isEQ=t,this._rvalTypeof=typeof r,this._rvalFloat=zo(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=zo(t)===this._rvalFloat)}return this._isEQ?r:!r},e}();function O3e(e,t){return e==="eq"||e==="ne"?new I3e(e==="eq",t):ye(FJ,e)?new k3e(e,t):null}var E3e=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 Kl(t,r)},e}();function D3e(e,t){var r=new E3e,n=e.data,i=r.sourceFormat=e.sourceFormat,a=e.startIndex,o="";e.seriesLayoutBy!==Wa&&mt(o);var s=[],l={},u=e.dimensionsDefine;if(u)B(u,function(g,m){var x=g.name,_={index:m,name:x,displayName:g.displayName};if(s.push(_),x!=null){var b="";ye(l,x)&&mt(b),l[x]=_}});else for(var c=0;c<e.dimensionsDetectedCount;c++)s.push({index:c});var f=RJ(i,Wa);t.__isBuiltIn&&(r.getRawDataItem=function(g){return f(n,a,s,g)},r.getRawData=ge(N3e,null,e)),r.cloneRawData=ge(j3e,null,e);var h=BJ(i,Wa);r.count=ge(h,null,n,a,s);var d=zJ(i);r.retrieveValue=function(g,m){var x=f(n,a,s,g);return v(x,m)};var v=r.retrieveValueFromItem=function(g,m){if(g!=null){var x=s[m];if(x)return d(g,m,x.name)}};return r.getDimensionInfo=ge(R3e,null,s,l),r.cloneAllDimensionInfo=ge(B3e,null,s),r}function N3e(e){var t=e.sourceFormat;if(!nj(t)){var r="";mt(r)}return e.data}function j3e(e){var t=e.sourceFormat,r=e.data;if(!nj(t)){var n="";mt(n)}if(t===sn){for(var i=[],a=0,o=r.length;a<o;a++)i.push(r[a].slice());return i}else if(t===ji){for(var i=[],a=0,o=r.length;a<o;a++)i.push(re({},r[a]));return i}}function R3e(e,t,r){if(r!=null){if(ot(r)||!isNaN(r)&&!ye(t,r))return e[r];if(ye(t,r))return t[r]}}function B3e(e){return Ce(e)}var GJ=_e();function z3e(e){e=Ce(e);var t=e.type,r="";t||mt(r);var n=t.split(":");n.length!==2&&mt(r);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),e.__isBuiltIn=i,GJ.set(t,e)}function $3e(e,t,r){var n=Pt(e),i=n.length,a="";i||mt(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=F3e(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function F3e(e,t,r,n){var i="";t.length||mt(i),Le(e)||mt(i);var a=e.type,o=GJ.get(a);o||mt(i);var s=se(t,function(u){return D3e(u,o)}),l=Pt(o.transform({upstream:s[0],upstreamList:s,config:Ce(e.config)}));return se(l,function(u,c){var f="";Le(u)||mt(f),u.data||mt(f);var h=DJ(u.data);nj(h)||mt(f);var d,v=t[0];if(v&&c===0&&!u.dimensions){var g=v.startIndex;g&&(u.data=v.data.slice(0,g).concat(u.data)),d={seriesLayoutBy:Wa,sourceHeader:g,dimensions:v.metaRawOption.dimensions}}else d={seriesLayoutBy:Wa,sourceHeader:0,dimensions:u.dimensions};return wI(u.data,d,null)})}function nj(e){return e===sn||e===ji}var jT="undefined",V3e=typeof Uint32Array===jT?Array:Uint32Array,G3e=typeof Uint16Array===jT?Array:Uint16Array,WJ=typeof Int32Array===jT?Array:Int32Array,HV=typeof Float64Array===jT?Array:Float64Array,HJ={float:HV,int:WJ,ordinal:Array,number:Array,time:HV},C2;function eh(e){return e>65535?V3e:G3e}function th(){return[1/0,-1/0]}function W3e(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function UV(e,t,r,n,i){var a=HJ[r||"float"];if(i){var o=e[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];e[t]=l}}else e[t]=new a(n)}var SI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=_e()}return e.prototype.initData=function(t,r,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=C2[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],NJ(i),this._dimensions=se(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,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===r)return a}else a=i.length;return i[a]={type:r},n.set(t,a),this._chunks[a]=new HJ[r||"float"](this._rawCount),this._rawExtent[a]=th(),a},e.prototype.collectOrdinalMeta=function(t,r){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=th());for(var l=a[t],u=o;u<s;u++){var c=n[u]=r.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=r,i.ordinalOffset=s,i.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 i=r.count();return r.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(t,r){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,r||0),u=0;u<a;u++){var c=i[u];UV(n,u,c.type,l,!0)}for(var f=[],h=s;h<l;h++)for(var d=h-s,v=0;v<a;v++){var c=i[v],g=C2.arrayRows.call(this,t[d]||f,c.property,d,v);n[v][h]=g;var m=o[v];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=se(o,function(_){return _.property}),c=0;c<s;c++){var f=o[c];l[c]||(l[c]=th()),UV(a,c,f.type,r,n)}if(i.fillStorage)i.fillStorage(t,r,a,l);else for(var h=[],d=t;d<r;d++){h=i.getItem(d,h);for(var v=0;v<s;v++){var g=a[v],m=this._dimValueGetter(h,u[v],d,v);g[d]=m;var x=l[v];m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}!i.persistent&&i.clean&&i.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=[],i=[];if(r==null){r=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],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 i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},e.prototype.getMedian=function(t){var r=[];this.each([t],function(a){isNaN(a)||r.push(a)});var n=r.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},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 i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(r[o]<t)i=o+1;else if(r[o]>t)a=o-1;else return o}return-1},e.prototype.getIndices=function(){var t,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=r[a]}else t=new n(r.buffer,0,i)}else{var n=eh(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},e.prototype.filter=function(t,r){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=eh(n._rawCount),o=new a(i),s=[],l=t.length,u=0,c=t[0],f=n._chunks,h=0;h<i;h++){var d=void 0,v=n.getRawIndex(h);if(l===0)d=r(h);else if(l===1){var g=f[c][v];d=r(g,h)}else{for(var m=0;m<l;m++)s[m]=f[t[m]][v];s[m]=h,d=r.apply(null,s)}d&&(o[u++]=v)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(t){var r=this.clone(),n=r._count;if(!n)return this;var i=it(t),a=i.length;if(!a)return this;var o=r.count(),s=eh(r._rawCount),l=new s(o),u=0,c=i[0],f=t[c][0],h=t[c][1],d=r._chunks,v=!1;if(!r._indices){var g=0;if(a===1){for(var m=d[i[0]],x=0;x<n;x++){var _=m[x];(_>=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}v=!0}else if(a===2){for(var m=d[i[0]],b=d[i[1]],S=t[i[1]][0],T=t[i[1]][1],x=0;x<n;x++){var _=m[x],A=b[x];(_>=f&&_<=h||isNaN(_))&&(A>=S&&A<=T||isNaN(A))&&(l[u++]=g),g++}v=!0}}if(!v)if(a===1)for(var x=0;x<o;x++){var M=r.getRawIndex(x),_=d[i[0]][M];(_>=f&&_<=h||isNaN(_))&&(l[u++]=M)}else for(var x=0;x<o;x++){for(var P=!0,M=r.getRawIndex(x),I=0;I<a;I++){var k=i[I],_=d[k][M];(_<t[k][0]||_>t[k][1])&&(P=!1)}P&&(l[u++]=r.getRawIndex(x))}return u<o&&(r._indices=l),r._count=u,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 i=t._chunks,a=[],o=r.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<r.length;c++)u[r[c]]=th();for(var f=0;f<s;f++){for(var h=t.getRawIndex(f),d=0;d<o;d++)l[d]=i[r[d]][h];l[o]=f;var v=n&&n.apply(null,l);if(v!=null){typeof v!="object"&&(a[0]=v,v=a);for(var c=0;c<v.length;c++){var g=r[c],m=v[c],x=u[g],_=i[g];_&&(_[h]=m),m<x[0]&&(x[0]=m),m>x[1]&&(x[1]=m)}}}},e.prototype.lttbDownSample=function(t,r){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,d=new(eh(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;v<o-1;v+=l){for(var g=Math.min(v+l,o-1),m=Math.min(v+l*2,o),x=(m+g)/2,_=0,b=g;b<m;b++){var S=this.getRawIndex(b),T=a[S];isNaN(T)||(_+=T)}_/=m-g;var A=v,M=Math.min(v+l,o),P=v-1,I=a[u];c=-1,h=A;for(var k=-1,O=0,b=A;b<M;b++){var S=this.getRawIndex(b),T=a[S];if(isNaN(T)){O++,k<0&&(k=S);continue}f=Math.abs((P-x)*(T-I)-(P-b)*(_-I)),f>c&&(c=f,h=S)}O>0&&O<M-A&&(d[s++]=Math.min(k,h),h=Math.max(k,h)),d[s++]=h,u=h}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(t,r){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/r),o=i[t],s=this.count(),l=new(eh(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var f=c,h=o[this.getRawIndex(f)],d=c,v=o[this.getRawIndex(d)],g=a;c+a>s&&(g=s-c);for(var m=0;m<g;m++){var x=this.getRawIndex(c+m),_=o[x];_<h&&(h=_,f=c+m),_>v&&(v=_,d=c+m)}var b=this.getRawIndex(f),S=this.getRawIndex(d);f<d?(l[u++]=b,l[u++]=S):(l[u++]=S,l[u++]=b)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(t,r,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/r),u=o[t],c=this.count(),f=a._rawExtent[t]=th(),h=new(eh(this._rawCount))(Math.ceil(c/l)),d=0,v=0;v<c;v+=l){l>c-v&&(l=c-v,s.length=l);for(var g=0;g<l;g++){var m=this.getRawIndex(v+g);s[g]=u[m]}var x=n(s),_=this.getRawIndex(Math.min(v+i(s,x)||0,c-1));u[_]=x,x<f[0]&&(f[0]=x),x>f[1]&&(f[1]=x),h[d++]=_}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},e.prototype.each=function(t,r){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:r(a);break;case 1:r(i[t[0]][s],a);break;case 2:r(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,r.apply(null,u)}}},e.prototype.getDataExtent=function(t){var r=this._chunks[t],n=th();if(!r)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),f=r[c];f<s&&(s=f),f>l&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var r=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][r]);return n},e.prototype.clone=function(t,r){var n=new e,i=this._chunks,a=t&&ha(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?W3e(i[o]):i[o];else n._chunks=i;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=Ce(this._extent),t._rawExtent=Ce(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 i=0;i<n;i++)r[i]=this._indices[i]}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,i,a){return Kl(r[a],this._dimensions[a])}C2={arrayRows:t,objectRows:function(r,n,i,a){return Kl(r[n],this._dimensions[a])},keyedColumns:t,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return Kl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),e}(),UJ=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,i,a;if(Ux(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Zn(s)?ql:Ni,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=be(f.seriesLayoutBy,h.seriesLayoutBy)||null,v=be(f.sourceHeader,h.sourceHeader),g=be(f.dimensions,h.dimensions),m=d!==h.seriesLayoutBy||!!v!=!!h.sourceHeader||g;i=m?[wI(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:g},l)]:[]}else{var x=t;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var b=x.get("source",!0);i=[wI(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},e.prototype._applyTransform=function(t){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&YV(a)}var o,s=[],l=[];return B(t,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&YV(f),s.push(c),l.push(u._getVersionSign())}),n?o=$3e(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[b3e(s[0])]),{sourceList:o,upstreamSignList:l}},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 i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];Ux(this._sourceHost)&&l?s=l._innerGetDataStore(t,r,n):(s=new SI,s.initData(new jJ(r,t.length),t)),o[n]=s}return s},e.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(Ux(t)){var r=KN(t);return r?[r.getSourceManager()]:[]}else return se(qBe(t),function(n){return n.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,r,n,i;if(Ux(t))r=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;r=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:r,sourceHeader:n,dimensions:i}},e}();function ZV(e){var t=e.option.transform;t&&sy(e.option.transform)}function Ux(e){return e.mainType==="series"}function YV(e){throw new Error(e)}var H3e="line-height:1";function ZJ(e){var t=e.lineHeight;return t==null?H3e:"line-height:"+On(t+"")+"px"}function YJ(e,t){var r=e.color||K.color.tertiary,n=e.fontSize||12,i=e.fontWeight||"400",a=e.color||K.color.secondary,o=e.fontSize||14,s=e.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+On(n+"")+"px;color:"+On(r)+";font-weight:"+On(i+""),valueStyle:"font-size:"+On(o+"")+"px;color:"+On(a)+";font-weight:"+On(s+"")}:{nameStyle:{fontSize:n,fill:r,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var U3e=[0,10,20,30],Z3e=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function Ar(e,t){return t.type=e,t}function TI(e){return e.type==="section"}function XJ(e){return TI(e)?Y3e:X3e}function qJ(e){if(TI(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return B(e.blocks,function(i){var a=qJ(i);a>=t&&(t=a+ +(n&&(!a||TI(i)&&!i.noHeader)))}),t}return 0}function Y3e(e,t,r,n){var i=t.noHeader,a=q3e(qJ(t)),o=[],s=t.blocks||[];_n(!s||ae(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ye(u,l)){var c=new VJ(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}B(s,function(g,m){var x=t.valueFormatter,_=XJ(g)(x?re(re({},e),{valueFormatter:x}):e,g,m>0?a.html:0,n);_!=null&&o.push(_)});var f=e.renderMode==="richText"?o.join(a.richText):AI(n,o.join(""),i?r:a.html);if(i)return f;var h=yI(t.header,"ordinal",e.useUTC),d=YJ(n,e.renderMode).nameStyle,v=ZJ(n);return e.renderMode==="richText"?KJ(e,h,d)+a.richText+f:AI(n,'<div style="'+d+";"+v+';">'+On(h)+"</div>"+f,r)}function X3e(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(S){return S=ae(S)?S:[S],se(S,function(T,A){return yI(T,ae(d)?d[A]:d,u)})};if(!(a&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||K.color.secondary,i),h=a?"":yI(l,"ordinal",u),d=t.valueType,v=o?[]:c(t.value,t.dataIndex),g=!s||!a,m=!s&&a,x=YJ(n,i),_=x.nameStyle,b=x.valueStyle;return i==="richText"?(s?"":f)+(a?"":KJ(e,h,_))+(o?"":J3e(e,v,g,m,b)):AI(n,(s?"":f)+(a?"":K3e(h,!s,_))+(o?"":Q3e(v,g,m,b)),r)}}function XV(e,t,r,n,i,a){if(e){var o=XJ(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function q3e(e){return{html:U3e[e],richText:Z3e[e]}}function AI(e,t,r){var n='<div style="clear:both"></div>',i="margin: "+r+"px 0 0",a=ZJ(e);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function K3e(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+On(e)+"</span>"}function Q3e(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ae(e)?e:[e],'<span style="'+a+";"+n+'">'+se(e,function(o){return On(o)}).join(" ")+"</span>"}function KJ(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function J3e(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ae(t)?t.join(" "):t,a)}function QJ(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return uf(n)}function JJ(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var M2=function(){function e(){this.richTextStyles={},this._nextStyleNameId=oQ()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=dJ({color:r,type:t,renderMode:n,markerId:i});return pe(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ae(r)?B(r,function(a){return re(n,a)}):re(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function eee(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ae(s),u=QJ(t,r),c,f,h,d;if(o>1||l&&!o){var v=eze(s,t,r,a,u);c=v.inlineValues,f=v.inlineValueTypes,h=v.blocks,d=v.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=Jd(i,r,a[0]),f=g.type}else d=c=l?s[0]:s;var m=pN(t),x=m&&t.name||"",_=i.getName(r),b=n?x:_;return Ar("section",{header:x,noHeader:n||!m,sortParam:d,blocks:[Ar("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Ci(b),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function eze(e,t,r,n,i){var a=t.getData(),o=ha(e,function(f,h,d){var v=a.getDimensionInfo(d);return f=f||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?B(n,function(f){c(Jd(a,r,f),f)}):B(e,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Ar("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var al=Je();function Zx(e,t){return e.getName(t)||e.getId(t)}var ub="__universalTransitionEnabled",St=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Kg({count:rze,reset:nze}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=al(this).sourceManager=new UJ(this);a.prepareSource();var o=this.getInitialData(r,i);KV(o,this),this.dataTask.context.data=o,al(this).dataBeforeProcessed=o,qV(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=xy(this),a=i?Af(r):{},o=this.subType;Qe.hasClass(o)&&(o+="Series"),He(r,n.getTheme().get(this.subType)),He(r,this.getDefaultOption()),rf(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Fo(r,a,i)},t.prototype.mergeOption=function(r,n){r=He(this.option,r,!0),this.fillDataTextStyle(r.data);var i=xy(this);i&&Fo(this.option,r,i);var a=al(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);KV(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,al(this).dataBeforeProcessed=o,qV(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(r){if(r&&!Zn(r))for(var n=["show"],i=0;i<r.length;i++)r[i]&&r[i].label&&rf(r[i],"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=CI(this);if(n){var i=n.context.data;return r==null||!i.getLinkedData?i:i.getLinkedData(r)}else return al(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=CI(this);if(n){var i=n.context;i.outputData=r,n!==this.dataTask&&(i.data=r)}al(this).data=r},t.prototype.getEncode=function(){var r=this.get("encode",!0);if(r)return _e(r)},t.prototype.getSourceManager=function(){return al(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return al(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,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(r);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var c=[],f=1/0,h=-1,d=0;return o.each(n,function(v,g){var m=l.dataToCoord(v),x=u-m,_=Math.abs(x);_<=a&&((_<f||_===f&&x>=0&&h<0)&&(f=_,h=x,d=0),x===h&&(c[d++]=g))}),c.length=d,c},t.prototype.formatTooltip=function(r,n,i){return eee({series:this,dataIndex:r,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(nt.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,i){var a=this.ecModel,o=QN.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),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 i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<r.length;s++){var l=r[s],u=Zx(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(r,n){for(var i=[],a=0;a<r.length;a++)i[0]=r[a],this.isSelected(r[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var r=this._selectedDataIndicesMap,n=it(r),i=[],a=0;a<n.length;a++){var o=r[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Zx(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[ub])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},t.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Le(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var f=n[c],h=Zx(r,f);u[h]=!0,this._selectedDataIndicesMap[h]=r.getRawIndex(f)}}else if(s==="single"||s===!0){var d=n[l-1],h=Zx(r,d);o.selectedMap=(i={},i[h]=!0,i),this._selectedDataIndicesMap=(a={},a[h]=r.getRawIndex(d),a)}}},t.prototype._initSelectedMapFromData=function(r){if(!this.option.selectedMap){var n=[];r.hasItemOption&&r.each(function(i){var a=r.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(r,n)}},t.registerClass=function(r){return Qe.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}(Qe);fr(St,NT);fr(St,QN);gQ(St,Qe);function qV(e){var t=e.name;pN(e)||(e.name=tze(e)||t)}function tze(e){var t=e.getRawData(),r=t.mapDimensionsAll("seriesName"),n=[];return B(r,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function rze(e){return e.model.getRawData().count()}function nze(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ize}function ize(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function KV(e,t){B(Ud(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(r){e.wrapMethod(r,Fe(aze,t))})}function aze(e,t){var r=CI(e);return r&&r.setOutputEnd((t||this).count()),t}function CI(e){var t=(e.ecModel||{}).scheduler,r=t&&t.getPipeline(e.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(e.uid))}return n}}var Lt=function(){function e(){this.group=new Me,this.uid=zv("viewComponent")}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){},e.prototype.updateLayout=function(t,r,n,i){},e.prototype.updateVisual=function(t,r,n,i){},e.prototype.toggleBlurSeries=function(t,r,n){},e.prototype.eachRendered=function(t){var r=this.group;r&&r.traverse(t)},e}();mN(Lt);wT(Lt);function Vv(){var e=Je();return function(t){var r=e(t),n=t.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var tee=Je(),oze=Vv(),_t=function(){function e(){this.group=new Me,this.uid=zv("viewChart"),this.renderTask=Kg({plan:sze,reset:lze}),this.renderTask.context={view:this}}return e.prototype.init=function(t,r){},e.prototype.render=function(t,r,n,i){},e.prototype.highlight=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&JV(a,i,"emphasis")},e.prototype.downplay=function(t,r,n,i){var a=t.getData(i&&i.dataType);a&&JV(a,i,"normal")},e.prototype.remove=function(t,r){this.group.removeAll()},e.prototype.dispose=function(t,r){},e.prototype.updateView=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateLayout=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.updateVisual=function(t,r,n,i){this.render(t,r,n,i)},e.prototype.eachRendered=function(t){xu(this.group,t)},e.markUpdateMethod=function(t,r){tee(t).updateMethod=r},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function QV(e,t,r){e&&gy(e)&&(t==="emphasis"?Fs:Vs)(e,r)}function JV(e,t,r){var n=nf(e,t),i=t&&t.highlightKey!=null?D5e(t.highlightKey):null;n!=null?B(Pt(n),function(a){QV(e.getItemGraphicEl(a),r,i)}):e.eachItemGraphicEl(function(a){QV(a,r,i)})}mN(_t);wT(_t);function sze(e){return oze(e.model)}function lze(e){var t=e.model,r=e.ecModel,n=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&tee(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,r,n,i),uze[l]}var uze={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)}}},gw="\0__throttleOriginMethod",e6="\0__throttleRate",t6="\0__throttleType";function RT(e,t,r){var n,i=0,a=0,o=null,s,l,u,c;t=t||0;function f(){a=new Date().getTime(),o=null,e.apply(l,u||[])}var h=function(){for(var d=[],v=0;v<arguments.length;v++)d[v]=arguments[v];n=new Date().getTime(),l=this,u=d;var g=c||t,m=c||r;c=null,s=n-(m?i:a)-g,clearTimeout(o),m?o=setTimeout(f,g):s>=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Gv(e,t,r,n){var i=e[t];if(i){var a=i[gw]||i,o=i[t6],s=i[e6];if(s!==r||o!==n){if(r==null||!n)return e[t]=a;i=e[t]=RT(a,r,n==="debounce"),i[gw]=a,i[t6]=n,i[e6]=r}return i}}function by(e,t){var r=e[t];r&&r[gw]&&(r.clear&&r.clear(),e[t]=r[gw])}var r6=Je(),n6={itemStyle:af(iJ,!0),lineStyle:af(nJ,!0)},cze={lineStyle:"stroke",itemStyle:"fill"};function ree(e,t){var r=e.visualStyleMapper||n6[t];return r||(console.warn("Unknown style type '"+t+"'."),n6.itemStyle)}function nee(e,t){var r=e.visualDrawType||cze[t];return r||(console.warn("Unknown style type '"+t+"'."),"fill")}var fze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=e.getModel(n),a=ree(e,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=nee(e,n),u=o[l],c=Ae(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Ae(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||Ae(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var g=e.getDataParams(v),m=re({},o);m[l]=c(g),d.setItemVisual(v,"style",m)}}}},jp=new tt,hze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var r=e.getData(),n=e.visualStyleAccessPath||"itemStyle",i=ree(e,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){jp.option=l[n];var u=i(jp),c=o.ensureUniqueItemVisual(s,"style");re(c,u),jp.option.decal&&(o.setItemVisual(s,"decal",jp.option.decal),jp.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},dze={performRawSeries:!0,overallReset:function(e){var t=_e();e.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),r6(r).scope=a}}),e.eachSeries(function(r){if(!(r.isColorBySeries()||e.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=r6(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=nee(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",v=n.count();h[l]=r.getColorFromPalette(d,o,v)}})}})}},Yx=Math.PI;function vze(e,t){t=t||{},Pe(t,{text:"loading",textColor:K.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:K.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new Me,n=new Xe({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(n);var i=new at({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Xe({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});r.add(a);var o;return t.showSpinner&&(o=new u0({shape:{startAngle:-Yx/2,endAngle:-Yx/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:Yx*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Yx*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r}var iee=function(){function e(t,r,n,i){this._stageTaskMap=_e(),this.ecInstance=t,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(t,r){t.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},e.prototype.getPerformArgs=function(t,r){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,r){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var r=this,n=r._pipelineMap=_e();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,r=this.api.getModel(),n=this.api;B(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";_n(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},e.prototype.prepareView=function(t,r,n,i){var a=t.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(r,a)},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,i){i=i||{};var a=!1,o=this;B(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,v=h.agentStubMap;v.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);v.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,x){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||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,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=_e(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||Kg({plan:xze,reset:_ze,count:wze}));d.context={model:f,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(f,d)}},e.prototype._createOverallStageTask=function(t,r,n,i){var a=this,o=r.overallTask=r.overallTask||Kg({reset:pze});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=_e(),u=t.seriesType,c=t.getTargetSeries,f=!0,h=!1,d="";_n(!t.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):c?c(n,i).each(v):(f=!1,B(n.getSeries(),v));function v(g){var m=g.uid,x=l.set(m,s&&s.get(m)||(h=!0,Kg({reset:gze,onDirty:yze})));x.context={model:g,overallProgress:f},x.agent=o,x.__block=f,a._pipe(g,x)}h&&o.dirty()},e.prototype._pipe=function(t,r){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},e.wrapStageHandler=function(t,r){return Ae(t)&&(t={overallReset:t,seriesType:Sze(t)}),t.uid=zv("stageHandler"),r&&(t.visualType=r),t},e}();function pze(e){e.overallReset(e.ecModel,e.api,e.payload)}function gze(e){return e.overallProgress&&mze}function mze(){this.agent.dirty(),this.getDownstream().dirty()}function yze(){this.agent&&this.agent.dirty()}function xze(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function _ze(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Pt(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?se(t,function(r,n){return aee(n)}):bze}var bze=aee(0);function aee(e){return function(t,r){var n=r.data,i=r.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function wze(e){return e.data.count()}function Sze(e){mw=null;try{e(wy,oee)}catch{}return mw}var wy={},oee={},mw;see(wy,JN);see(oee,IJ);wy.eachSeriesByType=wy.eachRawSeriesByType=function(e){mw=e};wy.eachComponent=function(e){e.mainType==="series"&&e.subType&&(mw=e.subType)};function see(e,t){for(var r in t.prototype)e[r]=lr}var ke=K.darkColor,Tze=ke.background,Rp=function(){return{axisLine:{lineStyle:{color:ke.axisLine}},splitLine:{lineStyle:{color:ke.axisSplitLine}},splitArea:{areaStyle:{color:[ke.backgroundTint,ke.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:ke.axisMinorSplitLine}},axisLabel:{color:ke.axisLabel},axisName:{}}},i6={label:{color:ke.secondary},itemStyle:{borderColor:ke.borderTint},dividerLineStyle:{color:ke.border}},lee={darkMode:!0,color:ke.theme,backgroundColor:Tze,axisPointer:{lineStyle:{color:ke.border},crossStyle:{color:ke.borderShade},label:{color:ke.tertiary}},legend:{textStyle:{color:ke.secondary},pageTextStyle:{color:ke.tertiary}},textStyle:{color:ke.secondary},title:{textStyle:{color:ke.primary},subtextStyle:{color:ke.quaternary}},toolbox:{iconStyle:{borderColor:ke.accent50}},tooltip:{backgroundColor:ke.neutral20,defaultBorderColor:ke.border,textStyle:{color:ke.tertiary}},dataZoom:{borderColor:ke.accent10,textStyle:{color:ke.tertiary},brushStyle:{color:ke.backgroundTint},handleStyle:{color:ke.neutral00,borderColor:ke.accent20},moveHandleStyle:{color:ke.accent40},emphasis:{handleStyle:{borderColor:ke.accent50}},dataBackground:{lineStyle:{color:ke.accent30},areaStyle:{color:ke.accent20}},selectedDataBackground:{lineStyle:{color:ke.accent50},areaStyle:{color:ke.accent30}}},visualMap:{textStyle:{color:ke.secondary},handleStyle:{borderColor:ke.neutral30}},timeline:{lineStyle:{color:ke.accent10},label:{color:ke.tertiary},controlStyle:{color:ke.accent30,borderColor:ke.accent30}},calendar:{itemStyle:{color:ke.neutral00,borderColor:ke.neutral20},dayLabel:{color:ke.tertiary},monthLabel:{color:ke.secondary},yearLabel:{color:ke.secondary}},matrix:{x:i6,y:i6,backgroundColor:{borderColor:ke.axisLine},body:{itemStyle:{borderColor:ke.borderTint}}},timeAxis:Rp(),logAxis:Rp(),valueAxis:Rp(),categoryAxis:Rp(),line:{symbol:"circle"},graph:{color:ke.theme},gauge:{title:{color:ke.secondary},axisLine:{lineStyle:{color:[[1,ke.neutral05]]}},axisLabel:{color:ke.axisLabel},detail:{color:ke.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:ke.background}},radar:function(){var e=Rp();return e.axisName={color:ke.axisLabel},e.axisLine.lineStyle.color=ke.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:ke.neutral20,textStyle:{color:ke.secondary}},emphasis:{itemStyle:{color:ke.neutral30}}}},sunburst:{itemStyle:{borderColor:ke.background}},map:{itemStyle:{borderColor:ke.border,areaColor:ke.neutral10},label:{color:ke.tertiary},emphasis:{label:{color:ke.primary},itemStyle:{areaColor:ke.highlight}},select:{label:{color:ke.primary},itemStyle:{areaColor:ke.highlight}}},geo:{itemStyle:{borderColor:ke.border,areaColor:ke.neutral10},emphasis:{label:{color:ke.primary},itemStyle:{areaColor:ke.highlight}},select:{label:{color:ke.primary},itemStyle:{color:ke.highlight}}}};lee.categoryAxis.splitLine.show=!1;var Aze=function(){function e(){}return e.prototype.normalizeQuery=function(t){var r={},n={},i={};if(pe(t)){var a=wo(t);r.mainType=a.main||null,r.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};B(t,function(l,u){for(var c=!1,f=0;f<o.length;f++){var h=o[f],d=u.lastIndexOf(h);if(d>0&&d===u.length-h.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},e.prototype.filter=function(t,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,r.otherQuery,i,a));function c(f,h,d,v){return f[d]==null||h[v||d]===f[d]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),MI=["symbol","symbolSize","symbolRotate","symbolOffset"],a6=MI.concat(["symbolKeepAspect"]),Cze={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={},i={},a=!1,o=0;o<MI.length;o++){var s=MI[o],l=e.get(s);Ae(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||e.defaultSymbol,r.setVisual(re({legendIcon:e.legendIcon||n.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},n)),t.isSeriesFiltered(e))return;var u=it(i);function c(f,h){for(var d=e.getRawValue(h),v=e.getDataParams(h),g=0;g<u.length;g++){var m=u[g];f.setItemVisual(h,m,i[m](d,v))}}return{dataEach:a?c:null}}},Mze={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var r=e.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<a6.length;s++){var l=a6[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:r.hasItemOption?n:null}}};function ij(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 v0(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 uee(e,t,r,n){switch(r){case"color":var i=e.ensureUniqueItemVisual(t,"style");i[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 cee(e,t){function r(n,i){var a=[];return n.eachComponent({mainType:"series",subType:e,query:i},function(o){a.push(o.seriesIndex)}),a}B([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=re({},i),o.dispatchAction(re(i,{type:n[1],seriesIndex:r(a,i)}))})})}function rh(e,t,r,n,i){var a=e+t;r.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var f=o.getData(),h=nf(f,i.fromActionPayload);r.trigger(a,{type:a,seriesId:o.id,name:ae(h)?f.getName(h[0]):f.getName(h),selected:pe(l)?l:re({},l)})}})}function Pze(e,t,r){e.on("selectchanged",function(n){var i=r.getModel();n.isFromClick?(rh("map","selectchanged",t,i,n),rh("pie","selectchanged",t,i,n)):n.fromAction==="select"?(rh("map","selected",t,i,n),rh("pie","selected",t,i,n)):n.fromAction==="unselect"&&(rh("map","unselected",t,i,n),rh("pie","unselected",t,i,n))})}function Pc(e,t,r){for(var n;e&&!(t(e)&&(n=e,r));)e=e.__hostTarget||e.parent;return n}var Lze=Math.round(Math.random()*9),kze=typeof Object.defineProperty=="function",Ize=function(){function e(){this._id="__ec_inner_"+Lze++}return e.prototype.get=function(t){return this._guard(t)[this._id]},e.prototype.set=function(t,r){var n=this._guard(t);return kze?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}(),Oze=rt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n+a),e.lineTo(r-i,n+a),e.closePath()}}),Eze=rt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var r=t.cx,n=t.cy,i=t.width/2,a=t.height/2;e.moveTo(r,n-a),e.lineTo(r+i,n),e.lineTo(r,n+a),e.lineTo(r-i,n),e.closePath()}}),Dze=rt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,f=Math.sin(u),h=Math.cos(u),d=o*.6,v=o*.7;e.moveTo(r-c,l+s),e.arc(r,l,o,Math.PI-u,Math.PI*2+u),e.bezierCurveTo(r+c-f*d,l+s+h*d,r,n-v,r,n),e.bezierCurveTo(r,n-v,r-c+f*d,l+s+h*d,r-c,l+s),e.closePath()}}),Nze=rt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var r=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;e.moveTo(i,a),e.lineTo(i+o,a+r),e.lineTo(i,a+r/4*3),e.lineTo(i-o,a+r),e.lineTo(i,a),e.closePath()}}),jze={line:yr,rect:Xe,roundRect:Xe,square:Xe,circle:Zo,diamond:Eze,pin:Dze,arrow:Nze,triangle:Oze},Rze={line:function(e,t,r,n,i){i.x1=e,i.y1=t+n/2,i.x2=e+r,i.y2=t+n/2},rect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n},roundRect:function(e,t,r,n,i){i.x=e,i.y=t,i.width=r,i.height=n,i.r=Math.min(r,n)/4},square:function(e,t,r,n,i){var a=Math.min(r,n);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.r=Math.min(r,n)/2},diamond:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n},pin:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},arrow:function(e,t,r,n,i){i.x=e+r/2,i.y=t+n/2,i.width=r,i.height=n},triangle:function(e,t,r,n,i){i.cx=e+r/2,i.cy=t+n/2,i.width=r,i.height=n}},yw={};B(jze,function(e,t){yw[t]=new e});var Bze=rt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,r){var n=ow(e,t,r),i=this.shape;return i&&i.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 i=yw[n];i||(n="rect",i=yw[n]),Rze[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,r)}}});function zze(e,t){if(this.type!=="image"){var r=this.style;this.__isEmptyBrush?(r.stroke=e,r.fill=t||K.color.neutral00,r.lineWidth=2):this.shape.symbolType==="line"?r.stroke=e:r.fill=e,this.markRedraw()}}function xr(e,t,r,n,i,a,o){var s=e.indexOf("empty")===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var l;return e.indexOf("image://")===0?l=LN(e.slice(8),new Oe(t,r,n,i),o?"center":"cover"):e.indexOf("path://")===0?l=Kd(e.slice(7),{},new Oe(t,r,n,i),o?"center":"cover"):l=new Bze({shape:{symbolType:e,x:t,y:r,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=zze,a&&l.setColor(a),l}function Wv(e){return ae(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Mf(e,t){if(e!=null)return ae(e)||(e=[e,e]),[ve(e[0],t[0])||0,ve(be(e[1],e[0]),t[1])||0]}function Lc(e){return isFinite(e)}function $ze(e,t,r){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*r.width+r.x,i=i*r.width+r.x,a=a*r.height+r.y,o=o*r.height+r.y),n=Lc(n)?n:0,i=Lc(i)?i:1,a=Lc(a)?a:0,o=Lc(o)?o:0;var s=e.createLinearGradient(n,a,i,o);return s}function Fze(e,t,r){var n=r.width,i=r.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+r.x,s=s*i+r.y,l=l*a),o=Lc(o)?o:.5,s=Lc(s)?s:.5,l=l>=0&&Lc(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function PI(e,t,r){for(var n=t.type==="radial"?Fze(e,t,r):$ze(e,t,r),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function Vze(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 Xx(e){return parseInt(e,10)}function Hh(e,t,r){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(r[n]!=null&&r[n]!=="auto")return parseFloat(r[n]);var s=document.defaultView.getComputedStyle(e);return(e[i]||Xx(s[n])||Xx(e.style[n]))-(Xx(s[a])||0)-(Xx(s[o])||0)|0}function Gze(e,t){return!e||e==="solid"||!(t>0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:ot(e)?[e]:ae(e)?e:null}function aj(e){var t=e.style,r=t.lineDash&&t.lineWidth>0&&Gze(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(r){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(r=se(r,function(a){return a/i}),n/=i)}return[r,n]}var Wze=new $o(!0);function xw(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function o6(e){return typeof e=="string"&&e!=="none"}function _w(e){var t=e.fill;return t!=null&&t!=="none"}function s6(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 l6(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 LI(e,t,r){var n=yN(t.image,t.__image,r);if(ST(n)){var i=e.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*$g),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Hze(e,t,r,n){var i,a=xw(r),o=_w(r),s=r.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||Wze,f=t.__dirty;if(!n){var h=r.fill,d=r.stroke,v=o&&!!h.colorStops,g=a&&!!d.colorStops,m=o&&!!h.image,x=a&&!!d.image,_=void 0,b=void 0,S=void 0,T=void 0,A=void 0;(v||g)&&(A=t.getBoundingRect()),v&&(_=f?PI(e,h,A):t.__canvasFillGradient,t.__canvasFillGradient=_),g&&(b=f?PI(e,d,A):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),m&&(S=f||!t.__canvasFillPattern?LI(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=S),x&&(T=f||!t.__canvasStrokePattern?LI(e,d,t):t.__canvasStrokePattern,t.__canvasStrokePattern=T),v?e.fillStyle=_:m&&(S?e.fillStyle=S:o=!1),g?e.strokeStyle=b:x&&(T?e.strokeStyle=T:a=!1)}var M=t.getGlobalScale();c.setScale(M[0],M[1],t.segmentIgnoreThreshold);var P,I;e.setLineDash&&r.lineDash&&(i=aj(t),P=i[0],I=i[1]);var k=!0;(u||f&bh)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),k=!1),c.reset(),t.buildPath(c,t.shape,n),c.toStatic(),t.pathUpdated()),k&&c.rebuildPath(e,l?s:1),P&&(e.setLineDash(P),e.lineDashOffset=I),n||(r.strokeFirst?(a&&l6(e,r),o&&s6(e,r)):(o&&s6(e,r),a&&l6(e,r))),P&&e.setLineDash([])}function Uze(e,t,r){var n=t.__image=yN(r.image,t.__image,t,t.onload);if(!(!n||!ST(n))){var i=r.x||0,a=r.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;e.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;e.drawImage(n,u,c,f,h,i,a,o,s)}else e.drawImage(n,i,a,o,s)}}function Zze(e,t,r){var n,i=r.text;if(i!=null&&(i+=""),i){e.font=r.font||zs,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline;var a=void 0,o=void 0;e.setLineDash&&r.lineDash&&(n=aj(t),a=n[0],o=n[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),r.strokeFirst?(xw(r)&&e.strokeText(i,r.x,r.y),_w(r)&&e.fillText(i,r.x,r.y)):(_w(r)&&e.fillText(i,r.x,r.y),xw(r)&&e.strokeText(i,r.x,r.y)),a&&e.setLineDash([])}}var u6=["shadowBlur","shadowOffsetX","shadowOffsetY"],c6=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fee(e,t,r,n,i){var a=!1;if(!n&&(r=r||{},t===r))return!1;if(n||t.opacity!==r.opacity){ai(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Rc.opacity:o}(n||t.blend!==r.blend)&&(a||(ai(e,i),a=!0),e.globalCompositeOperation=t.blend||Rc.blend);for(var s=0;s<u6.length;s++){var l=u6[s];(n||t[l]!==r[l])&&(a||(ai(e,i),a=!0),e[l]=e.dpr*(t[l]||0))}return(n||t.shadowColor!==r.shadowColor)&&(a||(ai(e,i),a=!0),e.shadowColor=t.shadowColor||Rc.shadowColor),a}function f6(e,t,r,n,i){var a=Sy(t,i.inHover),o=n?null:r&&Sy(r,i.inHover)||{};if(a===o)return!1;var s=fee(e,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(ai(e,i),s=!0),o6(a.fill)&&(e.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(ai(e,i),s=!0),o6(a.stroke)&&(e.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(ai(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==u&&(s||(ai(e,i),s=!0),e.lineWidth=u)}for(var c=0;c<c6.length;c++){var f=c6[c],h=f[0];(n||a[h]!==o[h])&&(s||(ai(e,i),s=!0),e[h]=a[h]||f[1])}return s}function Yze(e,t,r,n,i){return fee(e,Sy(t,i.inHover),r&&Sy(r,i.inHover),n,i)}function hee(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 Xze(e,t,r){for(var n=!1,i=0;i<e.length;i++){var a=e[i];n=n||a.isZeroArea(),hee(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}r.allClipped=n}function qze(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 h6=1,d6=2,v6=3,p6=4;function Kze(e){var t=_w(e),r=xw(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 ai(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function Sy(e,t){return t&&e.__hoverStyle||e.style}function oj(e,t){kc(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function kc(e,t,r,n){var i=t.transform;if(!t.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1)){t.__dirty&=~Si,t.__isRendered=!1;return}var a=t.__clipPaths,o=r.prevElClipPaths,s=!1,l=!1;if((!o||Vze(a,o))&&(o&&o.length&&(ai(e,r),e.restore(),l=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),a&&a.length&&(ai(e,r),e.save(),Xze(a,e,r),s=!0),r.prevElClipPaths=a),r.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=r.prevEl;u||(l=s=!0);var c=t instanceof rt&&t.autoBatch&&Kze(t.style);s||qze(i,u.transform)?(ai(e,r),hee(e,t)):c||ai(e,r);var f=Sy(t,r.inHover);t instanceof rt?(r.lastDrawType!==h6&&(l=!0,r.lastDrawType=h6),f6(e,t,u,l,r),(!c||!r.batchFill&&!r.batchStroke)&&e.beginPath(),Hze(e,t,f,c),c&&(r.batchFill=f.fill||"",r.batchStroke=f.stroke||"")):t instanceof qd?(r.lastDrawType!==v6&&(l=!0,r.lastDrawType=v6),f6(e,t,u,l,r),Zze(e,t,f)):t instanceof Xr?(r.lastDrawType!==d6&&(l=!0,r.lastDrawType=d6),Yze(e,t,u,l,r),Uze(e,t,f)):t.getTemporalDisplayables&&(r.lastDrawType!==p6&&(l=!0,r.lastDrawType=p6),Qze(e,t,r)),c&&n&&ai(e,r),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),r.prevEl=t,t.__dirty=0,t.__isRendered=!0}function Qze(e,t,r){var n=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),kc(e,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),kc(e,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var P2=new Ize,g6=new Zd(100),m6=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function ev(e,t){if(e==="none")return null;var r=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";e.dirty&&P2.delete(e);var a=P2.get(e);if(a)return a;var o=Pe(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 s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/r,P2.set(e,s),e.dirty=!1,s;function l(u){for(var c=[r],f=!0,h=0;h<m6.length;++h){var d=o[m6[h]];if(d!=null&&!ae(d)&&!pe(d)&&!ot(d)&&typeof d!="boolean"){f=!1;break}c.push(d)}var v;if(f){v=c.join(",")+(i?"-svg":"");var g=g6.get(v);g&&(i?u.svgElement=g:u.image=g)}var m=vee(o.dashArrayX),x=Jze(o.dashArrayY),_=dee(o.symbol),b=e4e(m),S=pee(x),T=!i&&hi.createCanvas(),A=i&&{tag:"g",attrs:{},key:"dcl",children:[]},M=I(),P;T&&(T.width=M.width*r,T.height=M.height*r,P=T.getContext("2d")),k(),f&&g6.put(v,T||A),u.image=T,u.svgElement=A,u.svgWidth=M.width,u.svgHeight=M.height;function I(){for(var O=1,D=0,N=b.length;D<N;++D)O=EF(O,b[D]);for(var j=1,D=0,N=_.length;D<N;++D)j=EF(j,_[D].length);O*=j;var z=S*b.length*_.length;return{width:Math.max(1,Math.min(O,o.maxTileWidth)),height:Math.max(1,Math.min(z,o.maxTileHeight))}}function k(){P&&(P.clearRect(0,0,T.width,T.height),o.backgroundColor&&(P.fillStyle=o.backgroundColor,P.fillRect(0,0,T.width,T.height)));for(var O=0,D=0;D<x.length;++D)O+=x[D];if(O<=0)return;for(var N=-S,j=0,z=0,$=0;N<M.height;){if(j%2===0){for(var U=z/2%_.length,F=0,V=0,W=0;F<M.width*2;){for(var Y=0,D=0;D<m[$].length;++D)Y+=m[$][D];if(Y<=0)break;if(V%2===0){var Z=(1-o.symbolSize)*.5,J=F+m[$][V]*Z,ne=N+x[j]*Z,le=m[$][V]*o.symbolSize,fe=x[j]*o.symbolSize,ze=W/2%_[U].length;xe(J,ne,le,fe,_[U][ze])}F+=m[$][V],++W,++V,V===m[$].length&&(V=0)}++$,$===m.length&&($=0)}N+=x[j],++z,++j,j===x.length&&(j=0)}function xe(ie,he,ue,ee,Ve){var Se=i?1:r,Ge=xr(Ve,ie*Se,he*Se,ue*Se,ee*Se,o.color,o.symbolKeepAspect);if(i){var Ye=n.painter.renderOneToVNode(Ge);Ye&&A.children.push(Ye)}else oj(P,Ge)}}}}function dee(e){if(!e||e.length===0)return[["rect"]];if(pe(e))return[[e]];for(var t=!0,r=0;r<e.length;++r)if(!pe(e[r])){t=!1;break}if(t)return dee([e]);for(var n=[],r=0;r<e.length;++r)pe(e[r])?n.push([e[r]]):n.push(e[r]);return n}function vee(e){if(!e||e.length===0)return[[0,0]];if(ot(e)){var t=Math.ceil(e);return[[t,t]]}for(var r=!0,n=0;n<e.length;++n)if(!ot(e[n])){r=!1;break}if(r)return vee([e]);for(var i=[],n=0;n<e.length;++n)if(ot(e[n])){var t=Math.ceil(e[n]);i.push([t,t])}else{var t=se(e[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function Jze(e){if(!e||typeof e=="object"&&e.length===0)return[0,0];if(ot(e)){var t=Math.ceil(e);return[t,t]}var r=se(e,function(n){return Math.ceil(n)});return e.length%2?r.concat(r):r}function e4e(e){return se(e,function(t){return pee(t)})}function pee(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return e.length%2===1?t*2:t}function t4e(e,t){e.eachRawSeries(function(r){if(!e.isSeriesFiltered(r)){var n=r.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=ev(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=ev(i,t)}}})}var Pa=new ya,gee={};function r4e(e,t){gee[e]=t}function mee(e){return gee[e]}var yee={};function xee(e,t){yee[e]=t}function n4e(e){return yee[e]}var i4e="6.0.0",a4e={zrender:"6.0.0"},o4e=1,s4e=800,l4e=900,u4e=1e3,c4e=2e3,f4e=5e3,_ee=1e3,h4e=1100,sj=2e3,bee=3e3,d4e=4e3,BT=4500,v4e=4600,p4e=5e3,g4e=6e3,wee=7e3,See={PROCESSOR:{FILTER:u4e,SERIES_FILTER:s4e,STATISTIC:f4e},VISUAL:{LAYOUT:_ee,PROGRESSIVE_LAYOUT:h4e,GLOBAL:sj,CHART:bee,POST_CHART_LAYOUT:v4e,COMPONENT:d4e,BRUSH:p4e,CHART_ITEM:BT,ARIA:g4e,DECAL:wee}},Pr="__flagInMainProcess",qx="__mainProcessVersion",Qr="__pendingUpdate",L2="__needsUpdateStatus",y6=/^[a-zA-Z0-9_]+$/,k2="__connectUpdateStatus",x6=0,m4e=1,y4e=2;function Tee(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDisposed()){this.id;return}return Cee(this,e,t)}}function Aee(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Cee(this,e,t)}}function Cee(e,t,r){return r[0]=r[0]&&r[0].toLowerCase(),ya.prototype[t].apply(e,r)}var Mee=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ya),Pee=Mee.prototype;Pee.on=Aee("on");Pee.off=Aee("off");var qu,I2,Kx,rs,Qx,O2,E2,nh,ih,_6,b6,D2,w6,Jx,S6,Lee,Gi,T6,ah,bw=function(e){q(t,e);function t(r,n,i){var a=e.call(this,new Aze)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=r;var o="canvas",s="auto",l=!1;a[qx]=1,i.ssr&&tQ(function(h){var d=De(h),v=d.dataIndex;if(v!=null){var g=_e();return g.set("series_index",d.seriesIndex),g.set("data_index",v),d.ssrType&&g.set("ssr_type",d.ssrType),g}});var u=a._zr=Kk(r,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:be(i.useDirtyRect,l),useCoarsePointer:be(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=RT(ge(u.flush,u),17),a._updateTheme(n),a._locale=TBe(i.locale||aJ),a._coordSysMgr=new Fv;var c=a._api=S6(a);function f(h,d){return h.__prio-d.__prio}return q_(Sw,f),q_(OI,f),a._scheduler=new iee(a,c,OI,Sw),a._messageCenter=new Mee,a._initEvents(),a.resize=ge(a.resize,a),u.animation.on("frame",a._onframe,a),_6(u,a),b6(u,a),sy(a),a}return t.prototype._onframe=function(){if(!this._disposed){T6(this);var r=this._scheduler;if(this[Qr]){var n=this[Qr].silent;this[Pr]=!0,ah(this);try{qu(this),rs.update.call(this,null,this[Qr].updateParams)}catch(l){throw this[Pr]=!1,this[Qr]=null,l}this._zr.flush(),this[Pr]=!1,this[Qr]=null,nh.call(this,n),ih.call(this,n)}else if(r.unfinished){var i=o4e,a=this._model,o=this._api;r.unfinished=!1;do{var s=+new Date;r.performSeriesTasks(a),r.performDataProcessorTasks(a),O2(this,a),r.performVisualTasks(a),Jx(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>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,i){if(!this[Pr]){if(this._disposed){this.id;return}var a,o,s;if(Le(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Pr]=!0,ah(this),!this._model||n){var l=new s3e(this._api),u=this._theme,c=this._model=new JN;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},EI);var f={seriesTransition:s,optionChanged:!0};if(i)this[Qr]={silent:a,updateParams:f},this[Pr]=!1,this.getZr().wakeUp();else{try{qu(this),rs.update.call(this,null,f)}catch(h){throw this[Qr]=null,this[Pr]=!1,h}this._ssr||this._zr.flush(),this[Qr]=null,this[Pr]=!1,nh.call(this,a),ih.call(this,a)}}},t.prototype.setTheme=function(r,n){if(!this[Pr]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[Qr]&&(a==null&&(a=this[Qr].silent),o=this[Qr].updateParams,this[Qr]=null),this[Pr]=!0,ah(this);try{this._updateTheme(r),i.setTheme(this._theme),qu(this),rs.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Pr]=!1,s}this[Pr]=!1,nh.call(this,a),ih.call(this,a)}}},t.prototype._updateTheme=function(r){pe(r)&&(r=kee[r]),r&&(r=Ce(r),r&&EJ(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||nt.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(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},t.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;B(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return B(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Tw[i]){var l=s,u=s,c=-s,f=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();B($c,function(b,S){if(b.group===i){var T=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(Ce(r)),A=b.getDom().getBoundingClientRect();l=a(A.left,l),u=a(A.top,u),c=o(A.right,c),f=o(A.bottom,f),h.push({dom:T,left:A.left,top:A.top})}}),l*=d,u*=d,c*=d,f*=d;var v=c-l,g=f-u,m=hi.createCanvas(),x=Kk(m,{renderer:n?"svg":"canvas"});if(x.resize({width:v,height:g}),n){var _="";return B(h,function(b){var S=b.left-l,T=b.top-u;_+='<g transform="translate('+S+","+T+')">'+b.dom+"</g>"}),x.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&x.painter.setBackgroundColor(r.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}else return r.connectedBackgroundColor&&x.add(new Xe({shape:{x:0,y:0,width:v,height:g},style:{fill:r.connectedBackgroundColor}})),B(h,function(b){var S=new Xr({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});x.add(S)}),x.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},t.prototype.convertToPixel=function(r,n,i){return Qx(this,"convertToPixel",r,n,i)},t.prototype.convertToLayout=function(r,n,i){return Qx(this,"convertToLayout",r,n,i)},t.prototype.convertFromPixel=function(r,n,i){return Qx(this,"convertFromPixel",r,n,i)},t.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=ld(i,r);return B(o,function(s,l){l.indexOf("Models")>=0&&B(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(r,n){var i=this._model,a=ld(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?ij(s,l,n):v0(s,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(x4e,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Pc(l,function(g){var m=De(g);if(m&&m.dataIndex!=null){var x=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=x&&x.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=re({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var d=f&&h!=null&&s.getComponent(f,h),v=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:v},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;B(II,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),Pze(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&&dQ(this.getDom(),uj,"");var n=this,i=n._api,a=n._model;B(n._componentsViews,function(o){o.dispose(a,i)}),B(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete $c[n.id]},t.prototype.resize=function(r){if(!this[Pr]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Qr]&&(a==null&&(a=this[Qr].silent),i=!0,this[Qr]=null),this[Pr]=!0,ah(this);try{i&&qu(this),rs.update.call(this,{type:"resize",animation:re({duration:0},r&&r.animation)})}catch(o){throw this[Pr]=!1,o}this[Pr]=!1,nh.call(this,a),ih.call(this,a)}}},t.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Le(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!DI[r]){var i=DI[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},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=re({},r);return n.type=kI[r.type],n},t.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Le(n)||(n={silent:!!n}),!!ww[r.type]&&this._model){if(this[Pr]){this._pendingActions.push(r);return}var i=n.silent;E2.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&nt.browser.weChat&&this._throttledZrFlush(),nh.call(this,i),ih.call(this,i)}},t.prototype.updateLabelLayout=function(){Pa.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){qu=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),I2(f,!0),I2(f,!1),h.plan()},I2=function(f,h){for(var d=f._model,v=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,x=f._zr,_=f._api,b=0;b<g.length;b++)g[b].__alive=!1;h?d.eachComponent(function(A,M){A!=="series"&&S(M)}):d.eachSeries(S);function S(A){var M=A.__requireNewView;A.__requireNewView=!1;var P="_ec_"+A.id+"_"+A.type,I=!M&&m[P];if(!I){var k=wo(A.type),O=h?Lt.getClass(k.main,k.sub):_t.getClass(k.sub);I=new O,I.init(d,_),m[P]=I,g.push(I),x.add(I.group)}A.__viewId=I.__id=P,I.__alive=!0,I.__model=A,I.group.__ecComponentInfo={mainType:A.mainType,index:A.componentIndex},!h&&v.prepareView(I,A,d,_)}for(var b=0;b<g.length;){var T=g[b];T.__alive?b++:(!h&&T.renderTask.dispose(),x.remove(T.group),T.dispose(d,_),g.splice(b,1),m[T.__id]===T&&delete m[T.__id],T.__id=T.group.__ecComponentInfo=null)}},Kx=function(f,h,d,v,g){var m=f._model;if(m.setUpdatePayload(d),!v){B([].concat(f._componentsViews).concat(f._chartsViews),T);return}var x={};x[v+"Id"]=d[v+"Id"],x[v+"Index"]=d[v+"Index"],x[v+"Name"]=d[v+"Name"];var _={mainType:v,query:x};g&&(_.subType=g);var b=d.excludeSeriesId,S;b!=null&&(S=_e(),B(Pt(b),function(A){var M=Ir(A,null);M!=null&&S.set(M,!0)})),m&&m.eachComponent(_,function(A){var M=S&&S.get(A.id)!=null;if(!M)if(lV(d))if(A instanceof St)d.type===Bc&&!d.notBlur&&!A.get(["emphasis","disabled"])&&C5e(A,d,f._api);else{var P=AN(A.mainType,A.componentIndex,d.name,f._api),I=P.focusSelf,k=P.dispatchers;d.type===Bc&&I&&!d.notBlur&&uI(A.mainType,A.componentIndex,f._api),k&&B(k,function(O){d.type===Bc?Fs(O):Vs(O)})}else fI(d)&&A instanceof St&&(L5e(A,d,f._api),oV(A),Gi(f))},f),m&&m.eachComponent(_,function(A){var M=S&&S.get(A.id)!=null;M||T(f[v==="series"?"_chartsMap":"_componentsMap"][A.__viewId])},f);function T(A){A&&A.__alive&&A[h]&&A[h](A.__model,m,f._api,d)}},rs={prepareAndUpdate:function(f){qu(this),rs.update.call(this,f,f&&{optionChanged:f.newOption!=null})},update:function(f,h){var d=this._model,v=this._api,g=this._zr,m=this._coordSysMgr,x=this._scheduler;if(d){d.setUpdatePayload(f),x.restoreData(d,f),x.performSeriesTasks(d),m.create(d,v),x.performDataProcessorTasks(d,f),O2(this,d),m.update(d,v),n(d),x.performVisualTasks(d,f);var _=d.get("backgroundColor")||"transparent";g.setBackgroundColor(_);var b=d.get("darkMode");b!=null&&b!=="auto"&&g.setDarkMode(b),D2(this,d,v,f,h),Pa.trigger("afterupdate",d,v)}},updateTransform:function(f){var h=this,d=this._model,v=this._api;if(d){d.setUpdatePayload(f);var g=[];d.eachComponent(function(x,_){if(x!=="series"){var b=h.getViewOfComponentModel(_);if(b&&b.__alive)if(b.updateTransform){var S=b.updateTransform(_,d,v,f);S&&S.update&&g.push(b)}else g.push(b)}});var m=_e();d.eachSeries(function(x){var _=h._chartsMap[x.__viewId];if(_.updateTransform){var b=_.updateTransform(x,d,v,f);b&&b.update&&m.set(x.uid,1)}else m.set(x.uid,1)}),n(d),this._scheduler.performVisualTasks(d,f,{setDirty:!0,dirtyMap:m}),Jx(this,d,v,f,{},m),Pa.trigger("afterupdate",d,v)}},updateView:function(f){var h=this._model;h&&(h.setUpdatePayload(f),_t.markUpdateMethod(f,"updateView"),n(h),this._scheduler.performVisualTasks(h,f,{setDirty:!0}),D2(this,h,this._api,f,{}),Pa.trigger("afterupdate",h,this._api))},updateVisual:function(f){var h=this,d=this._model;d&&(d.setUpdatePayload(f),d.eachSeries(function(v){v.getData().clearAllVisual()}),_t.markUpdateMethod(f,"updateVisual"),n(d),this._scheduler.performVisualTasks(d,f,{visualType:"visual",setDirty:!0}),d.eachComponent(function(v,g){if(v!=="series"){var m=h.getViewOfComponentModel(g);m&&m.__alive&&m.updateVisual(g,d,h._api,f)}}),d.eachSeries(function(v){var g=h._chartsMap[v.__viewId];g.updateVisual(v,d,h._api,f)}),Pa.trigger("afterupdate",d,this._api))},updateLayout:function(f){rs.update.call(this,f)}};function r(f,h,d,v,g){if(f._disposed){f.id;return}for(var m=f._model,x=f._coordSysMgr.getCoordinateSystems(),_,b=ld(m,d),S=0;S<x.length;S++){var T=x[S];if(T[h]&&(_=T[h](m,b,v,g))!=null)return _}}Qx=r,O2=function(f,h){var d=f._chartsMap,v=f._scheduler;h.eachSeries(function(g){v.updateStreamModes(g,d[g.__viewId])})},E2=function(f,h){var d=this,v=this.getModel(),g=f.type,m=f.escapeConnect,x=ww[g],_=(x.update||"update").split(":"),b=_.pop(),S=_[0]!=null&&wo(_[0]);this[Pr]=!0,ah(this);var T=[f],A=!1;f.batch&&(A=!0,T=se(f.batch,function($){return $=Pe(re({},$),f),$.batch=null,$}));var M=[],P,I=[],k=x.nonRefinedEventType,O=fI(f),D=lV(f);if(D&&NQ(this._api),B(T,function($){var U=x.action($,v,d._api);if(x.refineEvent?I.push(U):P=U,P=P||re({},$),P.type=k,M.push(P),D){var F=gN(f),V=F.queryOptionMap,W=F.mainTypeSpecified,Y=W?V.keys()[0]:"series";Kx(d,b,$,Y),Gi(d)}else O?(Kx(d,b,$,"series"),Gi(d)):S&&Kx(d,b,$,S.main,S.sub)}),b!=="none"&&!D&&!O&&!S)try{this[Qr]?(qu(this),rs.update.call(this,f),this[Qr]=null):rs[b].call(this,f)}catch($){throw this[Pr]=!1,$}if(A?P={type:k,escapeConnect:m,batch:M}:P=M[0],this[Pr]=!1,!h){var N=void 0;if(x.refineEvent){var j=x.refineEvent(I,f,v,this._api).eventContent;_n(Le(j)),N=Pe({type:x.refinedEventType},j),N.fromAction=f.type,N.fromActionPayload=f,N.escapeConnect=!0}var z=this._messageCenter;z.trigger(P.type,P),N&&z.trigger(N.type,N)}},nh=function(f){for(var h=this._pendingActions;h.length;){var d=h.shift();E2.call(this,d,f)}},ih=function(f){!f&&this.trigger("updated")},_6=function(f,h){f.on("rendered",function(d){h.trigger("rendered",d),f.animation.isFinished()&&!h[Qr]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},b6=function(f,h){f.on("mouseover",function(d){var v=d.target,g=Pc(v,gy);g&&(M5e(g,d,h._api),Gi(h))}).on("mouseout",function(d){var v=d.target,g=Pc(v,gy);g&&(P5e(g,d,h._api),Gi(h))}).on("click",function(d){var v=d.target,g=Pc(v,function(_){return De(_).dataIndex!=null},!0);if(g){var m=g.selected?"unselect":"select",x=De(g);h._api.dispatchAction({type:m,dataType:x.dataType,dataIndexInside:x.dataIndex,seriesIndex:x.seriesIndex,isFromClick:!0})}})};function n(f){f.clearColorPalette(),f.eachSeries(function(h){h.clearColorPalette()})}function i(f){var h=[],d=[],v=!1;if(f.eachComponent(function(_,b){var S=b.get("zlevel")||0,T=b.get("z")||0,A=b.getZLevelKey();v=v||!!A,(_==="series"?d:h).push({zlevel:S,z:T,idx:b.componentIndex,type:_,key:A})}),v){var g=h.concat(d),m,x;q_(g,function(_,b){return _.zlevel===b.zlevel?_.z-b.z:_.zlevel-b.zlevel}),B(g,function(_){var b=f.getComponent(_.type,_.idx),S=_.zlevel,T=_.key;m!=null&&(S=Math.max(m,S)),T?(S===m&&T!==x&&S++,x=T):x&&(S===m&&S++,x=""),m=S,b.setZLevel(S)})}}D2=function(f,h,d,v,g){i(h),w6(f,h,d,v,g),B(f._chartsViews,function(m){m.__alive=!1}),Jx(f,h,d,v,g),B(f._chartsViews,function(m){m.__alive||m.remove(h,d)})},w6=function(f,h,d,v,g,m){B(m||f._componentsViews,function(x){var _=x.__model;u(_,x),x.render(_,h,d,v),l(_,x),c(_,x)})},Jx=function(f,h,d,v,g,m){var x=f._scheduler;g=re(g||{},{updatedSeries:h.getSeries()}),Pa.trigger("series:beforeupdate",h,d,g);var _=!1;h.eachSeries(function(b){var S=f._chartsMap[b.__viewId];S.__alive=!0;var T=S.renderTask;x.updatePayload(T,v),u(b,S),m&&m.get(b.uid)&&T.dirty(),T.perform(x.getPerformArgs(T))&&(_=!0),S.group.silent=!!b.get("silent"),s(b,S),oV(b)}),x.unfinished=_||x.unfinished,Pa.trigger("series:layoutlabels",h,d,g),Pa.trigger("series:transition",h,d,g),h.eachSeries(function(b){var S=f._chartsMap[b.__viewId];l(b,S),c(b,S)}),o(f,h),Pa.trigger("series:afterupdate",h,d,g)},Gi=function(f){f[L2]=!0,f.getZr().wakeUp()},ah=function(f){f[qx]=(f[qx]+1)%1e3},T6=function(f){f[L2]&&(f.getZr().storage.traverse(function(h){ud(h)||a(h)}),f[L2]=!1)};function a(f){for(var h=[],d=f.currentStates,v=0;v<d.length;v++){var g=d[v];g==="emphasis"||g==="blur"||g==="select"||h.push(g)}f.selected&&f.states.select&&h.push("select"),f.hoverState===PT&&f.states.emphasis?h.push("emphasis"):f.hoverState===s0&&f.states.blur&&h.push("blur"),f.useStates(h)}function o(f,h){var d=f._zr,v=d.storage,g=0;v.traverse(function(m){m.isGroup||g++}),g>h.get("hoverLayerThreshold")&&!nt.node&&!nt.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var x=f._chartsMap[m.__viewId];x.__alive&&x.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function l(f,h){if(!f.preventAutoZ){var d=lf(f);h.eachRendered(function(v){return IT(v,d.z,d.zlevel),!0})}}function u(f,h){h.eachRendered(function(d){if(!ud(d)){var v=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),v&&v.stateTransition&&(v.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(f,h){var d=f.getModel("stateAnimation"),v=f.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(x){if(x.states&&x.states.emphasis){if(ud(x))return;if(x instanceof rt&&N5e(x),x.__dirty){var _=x.prevStates;_&&x.useStates(_)}if(v){x.stateTransition=m;var b=x.getTextContent(),S=x.getTextGuideLine();b&&(b.stateTransition=m),S&&(S.stateTransition=m)}x.__dirty&&a(x)}})}S6=function(f){return new(function(h){q(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var g=v.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);v=v.parent}},d.prototype.enterEmphasis=function(v,g){Fs(v,g),Gi(f)},d.prototype.leaveEmphasis=function(v,g){Vs(v,g),Gi(f)},d.prototype.enterBlur=function(v){IQ(v),Gi(f)},d.prototype.leaveBlur=function(v){TN(v),Gi(f)},d.prototype.enterSelect=function(v){OQ(v),Gi(f)},d.prototype.leaveSelect=function(v){EQ(v),Gi(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(v){return f.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return f.getViewOfSeriesModel(v)},d.prototype.getMainProcessVersion=function(){return f[qx]},d}(IJ))(f)},Lee=function(f){function h(d,v){for(var g=0;g<d.length;g++){var m=d[g];m[k2]=v}}B(kI,function(d,v){f._messageCenter.on(v,function(g){if(Tw[f.group]&&f[k2]!==x6){if(g&&g.escapeConnect)return;var m=f.makeActionFromEvent(g),x=[];B($c,function(_){_!==f&&_.group===f.group&&x.push(_)}),h(x,x6),B(x,function(_){_[k2]!==m4e&&_.dispatchAction(m)}),h(x,y4e)}})})}}(),t}(ya),lj=bw.prototype;lj.on=Tee("on");lj.off=Tee("off");lj.one=function(e,t,r){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(e,i)}this.on.call(this,e,i,r)};var x4e=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var ww={},kI={},II={},OI=[],EI=[],Sw=[],kee={},DI={},$c={},Tw={},_4e=+new Date-0,b4e=+new Date-0,uj="_echarts_instance_";function w4e(e,t,r){var n=!(r&&r.ssr);if(n){var i=cj(e);if(i)return i}var a=new bw(e,t,r);return a.id="ec_"+_4e++,$c[a.id]=a,n&&dQ(e,uj,a.id),Lee(a),Pa.trigger("afterinit",a),a}function S4e(e){if(ae(e)){var t=e;e=null,B(t,function(r){r.group!=null&&(e=r.group)}),e=e||"g_"+b4e++,B(t,function(r){r.group=e})}return Tw[e]=!0,e}function Iee(e){Tw[e]=!1}var T4e=Iee;function A4e(e){pe(e)?e=$c[e]:e instanceof bw||(e=cj(e)),e instanceof bw&&!e.isDisposed()&&e.dispose()}function cj(e){return $c[wRe(e,uj)]}function C4e(e){return $c[e]}function fj(e,t){kee[e]=t}function hj(e){We(EI,e)<0&&EI.push(e)}function dj(e,t){vj(OI,e,t,c4e)}function Oee(e){zT("afterinit",e)}function Eee(e){zT("afterupdate",e)}function zT(e,t){Pa.on(e,t)}function Ka(e,t,r){var n,i,a,o,s;Ae(t)&&(r=t,t=""),Le(e)?(n=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,r||(r=e.action),a=e.refineEvent):(n=e,i=t);function l(c){return c.toLowerCase()}i=l(i||n);var u=a?l(n):i;ww[n]||(_n(y6.test(n)&&y6.test(i)),a&&_n(i!==n),ww[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:r,refineEvent:a},II[i]=1,a&&s&&(II[u]=1),kI[u]=n)}function Dee(e,t){Fv.register(e,t)}function M4e(e){var t=Fv.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function P4e(e,t){xee(e,t)}function Nee(e,t){vj(Sw,e,t,_ee,"layout")}function bu(e,t){vj(Sw,e,t,bee,"visual")}var A6=[];function vj(e,t,r,n,i){if((Ae(t)||Le(t))&&(r=t,t=n),!(We(A6,r)>=0)){A6.push(r);var a=iee.wrapStageHandler(r,i);a.__prio=t,a.__raw=r,e.push(a)}}function pj(e,t){DI[e]=t}function L4e(e){yK({createCanvas:e})}function jee(e,t,r){var n=mee("registerMap");n&&n(e,t,r)}function k4e(e){var t=mee("getMap");return t&&t(e)}var Ree=z3e;bu(sj,fze);bu(BT,hze);bu(BT,dze);bu(sj,Cze);bu(BT,Mze);bu(wee,t4e);hj(EJ);dj(l4e,x3e);pj("default",vze);Ka({type:Bc,event:Bc,update:Bc},lr);Ka({type:nb,event:nb,update:nb},lr);Ka({type:uw,event:wN,update:uw,action:lr,refineEvent:gj,publishNonRefinedEvent:!0});Ka({type:sI,event:wN,update:sI,action:lr,refineEvent:gj,publishNonRefinedEvent:!0});Ka({type:cw,event:wN,update:cw,action:lr,refineEvent:gj,publishNonRefinedEvent:!0});function gj(e,t,r,n){return{eventContent:{selected:k5e(r),isFromClick:t.isFromClick||!1}}}fj("default",{});fj("dark",lee);var I4e={},C6=[],O4e={registerPreprocessor:hj,registerProcessor:dj,registerPostInit:Oee,registerPostUpdate:Eee,registerUpdateLifecycle:zT,registerAction:Ka,registerCoordinateSystem:Dee,registerLayout:Nee,registerVisual:bu,registerTransform:Ree,registerLoading:pj,registerMap:jee,registerImpl:r4e,PRIORITY:See,ComponentModel:Qe,ComponentView:Lt,SeriesModel:St,ChartView:_t,registerComponentModel:function(e){Qe.registerClass(e)},registerComponentView:function(e){Lt.registerClass(e)},registerSeriesModel:function(e){St.registerClass(e)},registerChartView:function(e){_t.registerClass(e)},registerCustomSeries:function(e,t){xee(e,t)},registerSubTypeDefaulter:function(e,t){Qe.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){JK(e,t)}};function Ze(e){if(ae(e)){B(e,function(t){Ze(t)});return}We(C6,e)>=0||(C6.push(e),Ae(e)&&(e={install:e}),e.install(O4e))}function Bp(e){return e==null?0:e.length||1}function M6(e){return e}var Gs=function(){function e(t,r,n,i,a,o){this._old=t,this._new=r,this._oldKeyGetter=n||M6,this._newKeyGetter=i||M6,this.context=a,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={},i=new Array(t.length),a=new Array(r.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=Bp(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},e.prototype._executeMultiple=function(){var t=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],f=Bp(u),h=Bp(c);if(f>1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d<f;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(t,r){for(var n=0;n<t.length;n++){var i=t[n],a=r[i],o=Bp(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);r[i]=null}},e.prototype._initIndexMap=function(t,r,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!r){var l=r[s],u=Bp(l);u===0?(r[s]=o,a&&n.push(s)):u===1?r[s]=[l,o]:l.push(o)}}},e}(),E4e=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 D4e(e,t){var r={},n=r.encode={},i=_e(),a=[],o=[],s={};B(e.dimensions,function(h){var d=e.getDimensionInfo(h),v=d.coordDim;if(v){var g=d.coordDimIndex;N2(n,v)[g]=h,d.isExtraCoord||(i.set(v,1),N4e(d.type)&&(a[0]=h),N2(s,v)[g]=e.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(h)}TJ.each(function(m,x){var _=N2(n,x),b=d.otherDims[x];b!=null&&b!==!1&&(_[b]=d.name)})});var l=[],u={};i.each(function(h,d){var v=n[d];u[d]=v[0],l=l.concat(v)}),r.dataDimsOnCoord=l,r.dataDimIndicesOnCoord=se(l,function(h){return e.getDimensionInfo(h).storeDimIndex}),r.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var f=n.tooltip;return f&&f.length?o=f.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,r.userOutput=new E4e(s,t),r}function N2(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Aw(e){return e==="category"?"ordinal":e==="time"?"time":"float"}function N4e(e){return!(e==="ordinal"||e==="time")}var cb=function(){function e(t){this.otherDims={},t!=null&&re(this,t)}return e}(),j4e=Je(),R4e={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Bee=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=Fee(this.source)))},e.prototype.getSourceDimensionIndex=function(t){return be(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=NJ(this.source),n=!Vee(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,c=void 0,f=this.dimensions[s];if(f&&f.storeDimIndex===o)l=r?f.name:null,u=f.type,c=f.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=r?h.name:null,u=h.type)}a.push({property:l,type:u,ordinalMeta:c}),r&&l!=null&&(!f||!f.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=R4e[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,v=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:v}},e.prototype.makeOutputDimensionNames=function(){for(var t=[],r=0,n=0;r<this._fullDimCount;r++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===r)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(r);o&&(i=o.name)}t.push(i)}return t},e.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function zee(e){return e instanceof Bee}function $ee(e){for(var t=_e(),r=0;r<(e||[]).length;r++){var n=e[r],i=Le(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,r)}return t}function Fee(e){var t=j4e(e);return t.dimNameMap||(t.dimNameMap=$ee(e.dimensionsDefine))}function Vee(e){return e>30}var zp=Le,ol=se,B4e=typeof Int32Array>"u"?Array:Int32Array,z4e="e\0\0",P6=-1,$4e=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],F4e=["_approximateExtent"],L6,e_,$p,Fp,j2,Vp,R2,Dn=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,i=!1;zee(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var f=n[c],h=pe(f)?new cb({name:f}):f instanceof cb?f:new cb(f),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var v=h.otherDims=h.otherDims||{};o.push(d),a[d]=h,u[d]!=null&&(l=!0),h.createInvertedIndices&&(s[d]=[]);var g=c;ot(h.storeDimIndex)&&(g=h.storeDimIndex),v.itemName===0&&(this._nameDimIdx=g),v.itemId===0&&(this._idDimIdx=g),i&&(h.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=r,this._invertedIndicesMap=s,this._dimOmitted){var m=this._dimIdxToName=_e();B(o,function(x){m.set(a[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 i=this._schema.getSourceDimension(r);if(i)return i.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(ot(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 i=n.encode[t];return i?i[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 i=this,a;if(t instanceof SI&&(a=t),!a){var o=this.dimensions,s=ej(t)||xn(t)?new jJ(t,o.length):t;a=new SI;var l=ol(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(r||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=D4e(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),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),r)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=r[l],o&&R2(this,s)}},e.prototype._updateOrdinalMeta=function(){for(var t=this._store,r=this.dimensions,n=0;n<r.length;n++){var i=this._dimInfos[r[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==ql&&!t.fillStorage},e.prototype._doInit=function(t,r){if(!(t>=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Ni;if(l&&!i.pure)for(var u=[],c=t;c<r;c++){var f=i.getItem(c,u);if(!this.hasItemOption&&uRe(f)&&(this.hasItemOption=!0),f){var h=f.name;a[c]==null&&h!=null&&(a[c]=Ir(h,null));var d=f.id;o[c]==null&&d!=null&&(o[c]=Ir(d,null))}}if(this._shouldMakeIdFromName())for(var c=t;c<r;c++)R2(this,c);L6(this)}},e.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},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){zp(t)?re(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=$p(this,this._nameDimIdx,r)),n==null&&(n=""),n},e.prototype._getCategory=function(t,r){var n=this._store.get(t,r),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},e.prototype.getId=function(t){return e_(this,this.getRawIndex(t))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,r)},e.prototype.getByRawIndex=function(t,r){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,r)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},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,i=this._store;return ae(t)?i.getValues(ol(t,function(a){return n._getStoreDimIndex(a)}),r):i.getValues(t)},e.prototype.hasValue=function(t){for(var r=this._dimSummary.dataDimIndicesOnCoord,n=0,i=r.length;n<i;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],i=n&&n[r];return i==null||isNaN(i)?P6:i},e.prototype.each=function(t,r,n){Ae(t)&&(n=r,r=t,t=[]);var i=n||this,a=ol(Fp(t),this._getStoreDimIndex,this);this._store.each(a,i?ge(r,i):r)},e.prototype.filterSelf=function(t,r,n){Ae(t)&&(n=r,r=t,t=[]);var i=n||this,a=ol(Fp(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?ge(r,i):r),this},e.prototype.selectRange=function(t){var r=this,n={},i=it(t);return B(i,function(a){var o=r._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(t,r,n){Ae(t)&&(n=r,r=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(r&&r.apply(this,arguments))},n),i},e.prototype.map=function(t,r,n,i){var a=n||i||this,o=ol(Fp(t),this._getStoreDimIndex,this),s=Vp(this);return s._store=this._store.map(o,a?ge(r,a):r),s},e.prototype.modify=function(t,r,n,i){var a=n||i||this,o=ol(Fp(t),this._getStoreDimIndex,this);this._store.modify(o,a?ge(r,a):r)},e.prototype.downSample=function(t,r,n,i){var a=Vp(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),r,n,i),a},e.prototype.minmaxDownSample=function(t,r){var n=Vp(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),r),n},e.prototype.lttbDownSample=function(t,r){var n=Vp(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 tt(n,r,r&&r.ecModel)},e.prototype.diff=function(t){var r=this;return new Gs(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return e_(t,n)},function(n){return e_(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||{},zp(t)?re(this._visual,t):this._visual[t]=r},e.prototype.getItemVisual=function(t,r){var n=this._itemVisuals[t],i=n&&n[r];return i??this.getVisual(r)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(t,r){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[r];return a==null&&(a=this.getVisual(r),ae(a)?a=a.slice():zp(a)&&(a=re({},a)),i[r]=a),a},e.prototype.setItemVisual=function(t,r,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,zp(r)?re(i,r):i[r]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,r){zp(t)?re(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?re(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;oI(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,i){n&&t&&t.call(r,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:ol(this.dimensions,this._getDimInfo,this),this.hostModel)),j2(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,r){var n=this[t];Ae(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(pT(arguments)))})},e.internalField=function(){L6=function(t){var r=t._invertedIndicesMap;B(r,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=r[i]=new B4e(o.categories.length);for(var l=0;l<n.length;l++)n[l]=P6;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},$p=function(t,r,n){return Ir(t._getCategory(r,n),null)},e_=function(t,r){var n=t._idList[r];return n==null&&t._idDimIdx!=null&&(n=$p(t,t._idDimIdx,r)),n==null&&(n=z4e+r),n},Fp=function(t){return ae(t)||(t=t!=null?[t]:[]),t},Vp=function(t){var r=new e(t._schema?t._schema:ol(t.dimensions,t._getDimInfo,t),t.hostModel);return j2(r,t),r},j2=function(t,r){B($4e.concat(r.__wrappedMethods||[]),function(n){r.hasOwnProperty(n)&&(t[n]=r[n])}),t.__wrappedMethods=r.__wrappedMethods,B(F4e,function(n){t[n]=Ce(r[n])}),t._calculationInfo=re({},r._calculationInfo)},R2=function(t,r){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[r],l=i[r];if(s==null&&a!=null&&(n[r]=s=$p(t,a,r)),l==null&&o!=null&&(i[r]=l=$p(t,o,r)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[r]=l}}}(),e}();function V4e(e,t){return Hv(e,t).dimensions}function Hv(e,t){ej(e)||(e=tj(e)),t=t||{};var r=t.coordDimensions||[],n=t.dimensionsDefine||e.dimensionsDefine||[],i=_e(),a=[],o=W4e(e,r,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Vee(o),l=n===e.dimensionsDefine,u=l?Fee(e):$ee(n),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=_e(c),h=new WJ(o),d=0;d<h.length;d++)h[d]=-1;function v(I){var k=h[I];if(k<0){var O=n[I],D=Le(O)?O:{name:O},N=new cb,j=D.name;j!=null&&u.get(j)!=null&&(N.name=N.displayName=j),D.type!=null&&(N.type=D.type),D.displayName!=null&&(N.displayName=D.displayName);var z=a.length;return h[I]=z,N.storeDimIndex=I,a.push(N),N}return a[k]}if(!s)for(var d=0;d<o;d++)v(d);f.each(function(I,k){var O=Pt(I).slice();if(O.length===1&&!pe(O[0])&&O[0]<0){f.set(k,!1);return}var D=f.set(k,[]);B(O,function(N,j){var z=pe(N)?u.get(N):N;z!=null&&z<o&&(D[j]=z,m(v(z),k,j))})});var g=0;B(r,function(I){var k,O,D,N;if(pe(I))k=I,N={};else{N=I,k=N.name;var j=N.ordinalMeta;N.ordinalMeta=null,N=re({},N),N.ordinalMeta=j,O=N.dimsDef,D=N.otherDims,N.name=N.coordDim=N.coordDimIndex=N.dimsDef=N.otherDims=null}var z=f.get(k);if(z!==!1){if(z=Pt(z),!z.length)for(var $=0;$<(O&&O.length||1);$++){for(;g<o&&v(g).coordDim!=null;)g++;g<o&&z.push(g++)}B(z,function(U,F){var V=v(U);if(l&&N.type!=null&&(V.type=N.type),m(Pe(V,N),k,F),V.name==null&&O){var W=O[F];!Le(W)&&(W={name:W}),V.name=V.displayName=W.name,V.defaultTooltip=W.defaultTooltip}D&&Pe(V.otherDims,D)})}});function m(I,k,O){TJ.get(k)!=null?I.otherDims[k]=O:(I.coordDim=k,I.coordDimIndex=O,i.set(k,!0))}var x=t.generateCoord,_=t.generateCoordCount,b=_!=null;_=x?_||1:0;var S=x||"value";function T(I){I.name==null&&(I.name=I.coordDim)}if(s)B(a,function(I){T(I)}),a.sort(function(I,k){return I.storeDimIndex-k.storeDimIndex});else for(var A=0;A<o;A++){var M=v(A),P=M.coordDim;P==null&&(M.coordDim=H4e(S,i,b),M.coordDimIndex=0,(!x||_<=0)&&(M.isExtraCoord=!0),_--),T(M),M.type==null&&(PJ(e,A)===hn.Must||M.isExtraCoord&&(M.otherDims.itemName!=null||M.otherDims.seriesName!=null))&&(M.type="ordinal")}return G4e(a),new Bee({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function G4e(e){for(var t=_e(),r=0;r<e.length;r++){var n=e[r],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function W4e(e,t,r,n){var i=Math.max(e.dimensionsDetectedCount||1,t.length,r.length,n||0);return B(t,function(a){var o;Le(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function H4e(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 U4e=function(){function e(t){this.coordSysDims=[],this.axisMap=_e(),this.categoryAxisMap=_e(),this.coordSysName=t}return e}();function Z4e(e){var t=e.get("coordinateSystem"),r=new U4e(t),n=Y4e[t];if(n)return n(e,r,r.axisMap,r.categoryAxisMap),r}var Y4e={cartesian2d:function(e,t,r,n){var i=e.getReferringComponents("xAxis",tr).models[0],a=e.getReferringComponents("yAxis",tr).models[0];t.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),oh(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),oh(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,r,n){var i=e.getReferringComponents("singleAxis",tr).models[0];t.coordSysDims=["single"],r.set("single",i),oh(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,r,n){var i=e.getReferringComponents("polar",tr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),oh(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),oh(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 i=e.ecModel,a=i.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();B(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),oh(u)&&(n.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(e,t,r,n){var i=e.getReferringComponents("matrix",tr).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function oh(e){return e.get("type")==="category"}function Gee(e,t,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;X4e(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,h;if(B(a,function(_,b){pe(_)&&(a[b]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+e.id,h="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,v=c.type,g=0;B(a,function(_){_.coordDim===d&&g++});var m={name:f,coordDim:d,coordDimIndex:g,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},x={name:h,coordDim:h,coordDimIndex:g+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,v),x.storeDimIndex=s.ensureCalculationDimension(f,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(x)):(a.push(m),a.push(x))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function X4e(e){return!zee(e.schema)}function Ws(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function mj(e,t){return Ws(e,t)?e.getCalculationInfo("stackResultDimension"):t}function q4e(e,t){var r=e.get("coordinateSystem"),n=Fv.get(r),i;return t&&t.coordSysDims&&(i=se(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=Aw(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function K4e(e,t,r){var n,i;return r&&B(e,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(e[n].otherDims.itemName=0),n}function Yo(e,t,r){r=r||{};var n=t.getSourceManager(),i,a=!1;e?(a=!0,i=tj(e)):(i=n.getSource(),a=i.sourceFormat===Ni);var o=Z4e(t),s=q4e(t,o),l=r.useEncodeDefaulter,u=Ae(l)?l:l?Fe(MJ,s,t):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Hv(i,c),h=K4e(f.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),v=Gee(t,{schema:f,store:d}),g=new Dn(f,t);g.setCalculationInfo(v);var m=h!=null&&Q4e(i)?function(x,_,b,S){return S===h?b:this.defaultDimValueGetter(x,_,b,S)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function Q4e(e){if(e.sourceFormat===Ni){var t=J4e(e.data||[]);return!ae(Iv(t))}}function J4e(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function NI(e){return e.type==="interval"||e.type==="log"}function e$e(e,t,r,n,i){var a={},o=a.interval=dN(t/r,!0);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=Ty(o),l=a.niceTickExtent=[mr(Math.ceil(e[0]/o)*o,s),mr(Math.floor(e[1]/o)*o,s)];return t$e(l,e),a}function B2(e){var t=Math.pow(10,bT(e)),r=e/t;return r?r===2?r=3:r===3?r=5:r*=2:r=1,mr(r*t)}function Ty(e){return Ra(e)+2}function k6(e,t,r){e[t]=Math.max(Math.min(e[t],r[1]),r[0])}function t$e(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),k6(e,0,t),k6(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function yj(e,t){return e>=t[0]&&e<=t[1]}var r$e=function(){function e(){this.normalize=I6,this.scale=O6}return e.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=ge(t.normalize,t),this.scale=ge(t.scale,t)):(this.normalize=I6,this.scale=O6)},e}();function I6(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function O6(e,t){return e*(t[1]-t[0])+t[0]}function jI(e,t,r){var n=Math.log(e);return[Math.log(r?t[0]:Math.max(0,t[0]))/n,Math.log(r?t[1]:Math.max(0,t[1]))/n]}var wu=function(){function e(t){this._calculator=new r$e,this._setting=t||{},this._extent=[1/0,-1/0];var r=Sr();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(t){return this._setting[t]},e.prototype._innerUnionExtent=function(t){var r=this._extent;this._innerSetExtent(t[0]<r[0]?t[0]:r[0],t[1]>r[1]?t[1]:r[1])},e.prototype.unionExtentFromData=function(t,r){this._innerUnionExtent(t.getApproximateExtent(r))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,r){this._innerSetExtent(t,r)},e.prototype._innerSetExtent=function(t,r){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(t){var r=Sr();r&&this._innerSetBreak(r.parseAxisBreakOption(t,ge(this.parse,this)))},e.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();wT(wu);var n$e=0,Ay=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++n$e,this._onCollect=t.onCollect}return e.createByAxisModel=function(t){var r=t.option,n=r.data,i=n&&se(n,i$e);return new e({categories:i,needCollect:!i,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(!pe(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 i=this._getOrCreateMap();return r=i.get(t),r==null&&(n?(r=this.categories.length,this.categories[r]=t,i.set(t,r),this._onCollect&&this._onCollect(t,r)):r=NaN),r},e.prototype._getOrCreateMap=function(){return this._map||(this._map=_e(this.categories))},e}();function i$e(e){return Le(e)&&e.value!=null?e.value:e+""}var tv=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Ay({})),ae(i)&&(i=new Ay({categories:se(i,function(a){return Le(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(r){return r==null?NaN:pe(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},t.prototype.contain=function(r){return yj(r,this._extent)&&r>=0&&r<this._ordinalMeta.categories.length},t.prototype.normalize=function(r){return r=this._getTickNumber(r),this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return r=Math.round(this._calculator.scale(r,this._extent)),this.getRawOrdinalNumber(r)},t.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return 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,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=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),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.isInExtentRange=function(r){return r=this._getTickNumber(r),this._extent[0]<=r&&this._extent[1]>=r},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(wu);wu.registerClass(tv);var sl=mr,Hs=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return t.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},t.prototype.contain=function(r){return yj(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ty(r)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Sr(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]<a[0]&&(r.expandToNicedExtent?l.push({value:sl(a[0]-n,o)}):l.push({value:i[0]}));for(var c=function(v,g){return Math.round((g-v)/n)},f=a[0];f<=a[1];){if(l.push({value:f}),f=sl(f+n,o),this._brkCtx){var h=this._brkCtx.calcNiceTickMultiple(f,c);h>=0&&(f=sl(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:sl(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(v){return v.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;o<n.length;o++){var s=n[o],l=n[o-1];if(!(l.break||s.break)){for(var u=0,c=[],f=s.value-l.value,h=f/r,d=Ty(h);u<r-1;){var v=sl(l.value+(u+1)*h,d);v>a[0]&&v<a[1]&&c.push(v),u++}var g=Sr();g&&g.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(m){return m},this._interval,a),i.push(c)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(r,n){if(r==null)return"";var i=n&&n.precision;i==null?i=Ra(r.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=sl(r.value,i,!0);return UN(a)},t.prototype.calcNiceTicks=function(r,n,i){r=r||5;var a=this._extent.slice(),o=this._getExtentSpanWithBreaks();if(isFinite(o)){o<0&&(o=-o,a.reverse(),this._innerSetExtent(a[0],a[1]),a=this._extent.slice());var s=e$e(a,o,r,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(r){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);r.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this._innerSetExtent(n[0],n[1]),n=this._extent.slice(),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval);var o=this._interval,s=this._intervalPrecision;r.fixMin||(n[0]=sl(Math.floor(n[0]/o)*o,s)),r.fixMax||(n[1]=sl(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(r,n){this._niceExtent=[r,n]},t.type="interval",t}(wu);wu.registerClass(Hs);var Wee=typeof Float32Array<"u",a$e=Wee?Float32Array:Array;function So(e){return ae(e)?Wee?new Float32Array(e):e:new a$e(e)}var RI="__ec_stack_";function Hee(e){return e.get("stack")||RI+e.seriesIndex}function xj(e){return e.dim+e.index}function o$e(e){var t=[],r=e.axis,n="axis0";if(r.type==="category"){for(var i=r.getBandWidth(),a=0;a<e.count;a++)t.push(Pe({bandWidth:i,axisKey:n,stackId:RI+a},e));for(var o=Yee(t),s=[],a=0;a<e.count;a++){var l=o[n][RI+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function Uee(e,t){var r=[];return t.eachSeriesByType(e,function(n){Kee(n)&&r.push(n)}),r}function s$e(e){var t={};B(e,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var f=l.getData(),h=c.dim+"_"+c.index,d=f.getDimensionIndex(f.mapDimension(c.dim)),v=f.getStore(),g=0,m=v.count();g<m;++g){var x=v.get(d,g);t[h]?t[h].push(x):t[h]=[x]}});var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function Zee(e){var t=s$e(e),r=[];return B(e,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=ve(n.get("barWidth"),s),g=ve(n.get("barMaxWidth"),s),m=ve(n.get("barMinWidth")||(Qee(n)?.5:1),s),x=n.get("barGap"),_=n.get("barCategoryGap"),b=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:g,barMinWidth:m,barGap:x,barCategoryGap:_,defaultBarGap:b,axisKey:xj(a),stackId:Hee(n)})}),Yee(r)}function Yee(e){var t={};B(e,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return B(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=it(a).length;s=Math.max(35-l*4,15)+"%"}var u=ve(s,o),c=ve(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),B(a,function(x){var _=x.maxWidth,b=x.minWidth;if(x.width){var S=x.width;_&&(S=Math.min(S,_)),b&&(S=Math.max(S,b)),x.width=S,f-=S+c*S,h--}else{var S=d;_&&_<S&&(S=Math.min(_,f)),b&&b>S&&(S=b),S!==d&&(x.width=S,f-=S+c*S,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var v=0,g;B(a,function(x,_){x.width||(x.width=d),g=x,v+=x.width*(1+c)}),g&&(v-=g.width*c);var m=-v/2;B(a,function(x,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:x.width},m+=x.width*(1+c)})}),r}function l$e(e,t,r){if(e&&t){var n=e[xj(t)];return n}}function Xee(e,t){var r=Uee(e,t),n=Zee(r);B(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Hee(i),u=n[xj(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function qee(e){return{seriesType:e,plan:Vv(),reset:function(t){if(Kee(t)){var r=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=t.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=Ws(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=u$e(i,a),v=Qee(t),g=t.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),x=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(b,S){for(var T=b.count,A=v&&So(T*3),M=v&&l&&So(T*3),P=v&&So(T),I=n.master.getRect(),k=h?I.width:I.height,O,D=S.getStore(),N=0;(O=b.next())!=null;){var j=D.get(f?m:o,O),z=D.get(s,O),$=d,U=void 0;f&&(U=+j-D.get(o,O));var F=void 0,V=void 0,W=void 0,Y=void 0;if(h){var Z=n.dataToPoint([j,z]);if(f){var J=n.dataToPoint([U,z]);$=J[0]}F=$,V=Z[1]+_,W=Z[0]-$,Y=x,Math.abs(W)<g&&(W=(W<0?-1:1)*g)}else{var Z=n.dataToPoint([z,j]);if(f){var J=n.dataToPoint([z,U]);$=J[1]}F=Z[0]+_,V=$,W=x,Y=Z[1]-$,Math.abs(Y)<g&&(Y=(Y<=0?-1:1)*g)}v?(A[N]=F,A[N+1]=V,A[N+2]=h?W:Y,M&&(M[N]=h?I.x:F,M[N+1]=h?V:I.y,M[N+2]=k),P[O]=O):S.setItemLayout(O,{x:F,y:V,width:W,height:Y}),N+=3}v&&S.setLayout({largePoints:A,largeDataIndices:P,largeBackgroundPoints:M,valueAxisHorizontal:h})}}}}}}function Kee(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function Qee(e){return e.pipelineContext&&e.pipelineContext.large}function u$e(e,t){var r=t.model.get("startValue");return r||(r=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?r>0?r:1:r))}var c$e=function(e,t,r,n){for(;r<n;){var i=r+n>>>1;e[i][1]<t?r=i+1:n=i}return r},_j=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="time",n}return t.prototype.getLabel=function(r){var n=this.getSetting("useUTC");return h0(r.value,SV[EBe(qg(this._minLevelUnit))]||SV.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(r,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return DBe(r,n,i,o,a)},t.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=Sr(),o=[];if(!n)return o;var s=this.getSetting("useUTC");if(a&&r.breakTicks==="only_break")return Sr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var l=Wh(i[1],s);o.push({value:i[0],time:{level:0,upperTimeUnit:l,lowerTimeUnit:l}});var u=m$e(this._minLevelUnit,this._approxInterval,s,i,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(u);var c=Wh(i[1],s);o.push({value:i[1],time:{level:0,upperTimeUnit:c,lowerTimeUnit:c}});var f=this.getSetting("useUTC"),h=_i.length-1,d=0;return B(o,function(v){h=Math.min(h,We(_i,v.time.upperTimeUnit)),d=Math.max(d,v.time.level)}),a&&Sr().pruneTicksByBreak(r.pruneByBreak,o,this._brkCtx.breaks,function(v){return v.value},this._approxInterval,this._extent),a&&r.breakTicks!=="none"&&Sr().addBreaksToTicks(o,this._brkCtx.breaks,this._extent,function(v){for(var g=Math.max(We(_i,Wh(v.vmin,f)),We(_i,Wh(v.vmax,f))),m=0,x=0;x<_i.length;x++)if(!Jee(_i[x],v.vmin,v.vmax,f)){m=x;break}var _=Math.min(m,h),b=Math.max(_,g);return{level:d,lowerTimeUnit:_i[b],upperTimeUnit:_i[_]}}),o},t.prototype.calcNiceExtent=function(r){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=ta,n[1]+=ta),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-ta}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(r.splitNumber,r.minInterval,r.maxInterval)},t.prototype.calcNiceTicks=function(r,n,i){r=r||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/r,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=t_.length,s=Math.min(c$e(t_,this._approxInterval,0,o),o-1);this._interval=t_[s][1],this._intervalPrecision=Ty(this._interval),this._minLevelUnit=t_[Math.max(s-1,0)][0]},t.prototype.parse=function(r){return ot(r)?r:+Uo(r)},t.prototype.contain=function(r){return yj(r,this._extent)},t.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},t.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},t.type="time",t}(Hs),t_=[["second",BN],["minute",zN],["hour",Xg],["quarter-day",Xg*6],["half-day",Xg*12],["day",ta*1.2],["half-week",ta*3.5],["week",ta*7],["month",ta*31],["quarter",ta*95],["half-year",wV/2],["year",wV]];function Jee(e,t,r,n){return vw(new Date(t),e,n).getTime()===vw(new Date(r),e,n).getTime()}function f$e(e,t){return e/=ta,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function h$e(e){var t=30*ta;return e/=t,e>6?6:e>3?3:e>2?2:1}function d$e(e){return e/=Xg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function E6(e,t){return e/=t?zN:BN,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function v$e(e){return dN(e,!0)}function p$e(e,t,r){var n=Math.max(0,We(_i,t)-1);return vw(new Date(e),_i[n],r).getTime()}function g$e(e,t){var r=new Date(0);r[e](1);var n=r.getTime();r[e](1+t);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function m$e(e,t,r,n,i,a){var o=1e4,s=LBe,l=0;function u(N,j,z,$,U,F,V){for(var W=g$e(U,N),Y=j,Z=new Date(Y);Y<z&&Y<=n[1]&&(V.push({value:Y}),!(l++>o));)if(Z[U](Z[$]()+N),Y=Z.getTime(),a){var J=a.calcNiceTickMultiple(Y,W);J>0&&(Z[U](Z[$]()+J*N),Y=Z.getTime())}V.push({value:Y,notAdd:!0})}function c(N,j,z){var $=[],U=!j.length;if(!Jee(qg(N),n[0],n[1],r)){U&&(j=[{value:p$e(n[0],N,r)},{value:n[1]}]);for(var F=0;F<j.length-1;F++){var V=j[F].value,W=j[F+1].value;if(V!==W){var Y=void 0,Z=void 0,J=void 0,ne=!1;switch(N){case"year":Y=Math.max(1,Math.round(t/ta/365)),Z=oJ(r),J=NBe(r);break;case"half-year":case"quarter":case"month":Y=h$e(t),Z=$N(r),J=sJ(r);break;case"week":case"half-week":case"day":Y=f$e(t),Z=FN(r),J=lJ(r),ne=!0;break;case"half-day":case"quarter-day":case"hour":Y=d$e(t),Z=VN(r),J=uJ(r);break;case"minute":Y=E6(t,!0),Z=GN(r),J=cJ(r);break;case"second":Y=E6(t,!1),Z=WN(r),J=fJ(r);break;case"millisecond":Y=v$e(t),Z=HN(r),J=hJ(r);break}W>=n[0]&&V<=n[1]&&u(Y,V,W,Z,J,ne,$),N==="year"&&z.length>1&&F===0&&z.unshift({value:z[0].value-Y})}}for(var F=0;F<$.length;F++)z.push($[F])}}for(var f=[],h=[],d=0,v=0,g=0;g<s.length;++g){var m=qg(s[g]);if(OBe(s[g])){c(s[g],f[f.length-1]||[],h);var x=s[g+1]?qg(s[g+1]):null;if(m!==x){if(h.length){v=d,h.sort(function(N,j){return N.value-j.value});for(var _=[],b=0;b<h.length;++b){var S=h[b].value;(b===0||h[b-1].value!==S)&&(_.push(h[b]),S>=n[0]&&S<=n[1]&&d++)}var T=i/t;if(d>T*1.5&&v>T/1.5||(f.push(_),d>T||e===s[g]))break}h=[]}}}for(var A=ht(se(f,function(N){return ht(N,function(j){return j.value>=n[0]&&j.value<=n[1]&&!j.notAdd})}),function(N){return N.length>0}),M=[],P=A.length-1,g=0;g<A.length;++g)for(var I=A[g],k=0;k<I.length;++k){var O=Wh(I[k].value,r);M.push({value:I[k].value,time:{level:P-g,upperTimeUnit:O,lowerTimeUnit:O}})}M.sort(function(N,j){return N.value-j.value});for(var D=[],g=0;g<M.length;++g)(g===0||M[g].value!==M[g-1].value)&&D.push(M[g]);return D}wu.registerClass(_j);var BI=mr,y$e=Math.floor,x$e=Math.ceil,r_=Math.pow,n_=Math.log,ete=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="log",r.base=10,r._originalScale=new Hs,r}return t.prototype.getTicks=function(r){r=r||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=e.prototype.getTicks.call(this,r),o=this.base,s=this._originalScale._innerGetBreaks(),l=Sr();return se(a,function(u){var c=u.value,f=null,h=r_(o,c);c===n[0]&&this._fixMin?f=i[0]:c===n[1]&&this._fixMax&&(f=i[1]);var d;if(l){var v=l.getTicksLogTransformBreak(u,o,s,i_);d=v.vBreak,f==null&&(f=v.brkRoundingCriterion)}return f!=null&&(h=i_(h,f)),{value:h,break:d}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(r,n){this._originalScale.setExtent(r,n);var i=jI(this.base,[r,n]);e.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var r=this.base,n=e.prototype.getExtent.call(this);n[0]=r_(r,n[0]),n[1]=r_(r,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=i_(n[0],i[0])),this._fixMax&&(n[1]=i_(n[1],i[1])),n},t.prototype.unionExtentFromData=function(r,n){this._originalScale.unionExtentFromData(r,n);var i=jI(this.base,r.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(r){r=r||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=aQ(i),o=r/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[BI(x$e(n[0]/a)*a),BI(y$e(n[1]/a)*a)];this._interval=a,this._intervalPrecision=Ty(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(r){e.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},t.prototype.contain=function(r){return r=n_(r)/n_(this.base),e.prototype.contain.call(this,r)},t.prototype.normalize=function(r){return r=n_(r)/n_(this.base),e.prototype.normalize.call(this,r)},t.prototype.scale=function(r){return r=e.prototype.scale.call(this,r),r_(this.base,r)},t.prototype.setBreaksFromOption=function(r){var n=Sr();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,ge(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},t.type="log",t}(Hs);function i_(e,t){return BI(e,Ra(t))}wu.registerClass(ete);var _$e=function(){function e(t,r,n){this._prepareParams(t,r,n)}return e.prototype._prepareParams=function(t,r,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&r.getNeedCrossZero&&r.getNeedCrossZero();var a=r.get("min",!0);a==null&&(a=r.get("startValue",!0));var o=this._modelMinRaw=a;Ae(o)?this._modelMinNum=a_(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=a_(t,o));var s=this._modelMaxRaw=r.get("max",!0);if(Ae(s)?this._modelMaxNum=a_(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=a_(t,s)),i)this._axisDataLen=r.getCategories().length;else{var l=r.get("boundaryGap"),u=ae(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Za(u[0],1),Za(u[1],1)]}},e.prototype.calculate=function(){var t=this._isOrdinal,r=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-r||Math.abs(r),s=this._modelMinRaw==="dataMin"?r:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?i?0:NaN:r-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var f=mn(s)||mn(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,r){this[w$e[t]]=r},e.prototype.setDeterminedMinMax=function(t,r){var n=b$e[t];this[n]=r},e.prototype.freeze=function(){this.frozen=!0},e}(),b$e={min:"_determinedMin",max:"_determinedMax"},w$e={min:"_dataMin",max:"_dataMax"};function tte(e,t,r){var n=e.rawExtentInfo;return n||(n=new _$e(e,t,r),e.rawExtentInfo=n,n)}function a_(e,t){return t==null?null:mn(t)?NaN:e.parse(t)}function rte(e,t){var r=e.type,n=tte(e,t,e.getExtent()).calculate();e.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&r==="time"){var s=Uee("bar",o),l=!1;if(B(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=Zee(s),c=S$e(i,a,t,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function S$e(e,t,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=l$e(n,r.axis);if(o===void 0)return{min:e,max:t};var s=1/0;B(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;B(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/a,h=c/f-c;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}function cf(e,t){var r=t,n=rte(e,r),i=n.extent,a=r.get("splitNumber");e instanceof ete&&(e.base=r.get("logBase"));var o=e.type,s=r.get("interval"),l=o==="interval"||o==="time";e.setBreaksFromOption(ite(r)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function p0(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new tv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new _j({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(wu.getClass(t)||Hs)}}function T$e(e){var t=e.scale.getExtent(),r=t[0],n=t[1];return!(r>0&&n>0||r<0&&n<0)}function Uv(e){var t=e.getLabelModel().get("formatter");if(e.type==="time"){var r=kBe(t);return function(i,a){return e.scale.getFormattedLabel(i,a,r)}}else{if(pe(t))return function(i){var a=e.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Ae(t)){if(e.type==="category")return function(i,a){return t(Cw(e,i),i.value-e.scale.getExtent()[0],null)};var n=Sr();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(Cw(e,i),a,o)}}else return function(i){return e.scale.getLabel(i)}}}function Cw(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function bj(e){var t=e.get("interval");return t??"auto"}function nte(e){return e.type==="category"&&bj(e.getLabelModel())===0}function Mw(e,t){var r={};return B(e.mapDimensionsAll(t),function(n){r[mj(e,n)]=!0}),it(r)}function A$e(e,t,r){t&&B(Mw(t,r),function(n){var i=t.getApproximateExtent(n);i[0]<e[0]&&(e[0]=i[0]),i[1]>e[1]&&(e[1]=i[1])})}function rv(e){return e==="middle"||e==="center"}function Cy(e){return e.getShallow("show")}function ite(e){var t=e.get("breaks",!0);if(t!=null)return!Sr()||!C$e(e.axis)?void 0:t}function C$e(e){return(e.dim==="x"||e.dim==="y"||e.dim==="z"||e.dim==="single")&&e.type!=="category"}var Zv=function(){function e(){}return e.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},e.prototype.getCoordSysModel=function(){},e}();function M$e(e){return Yo(null,e)}var P$e={isDimensionStacked:Ws,enableDataStack:Gee,getStackedDimension:mj};function L$e(e,t){var r=t;t instanceof tt||(r=new tt(t));var n=p0(r);return n.setExtent(e[0],e[1]),cf(n,r),n}function k$e(e){fr(e,Zv)}function I$e(e,t){return t=t||{},Mt(e,null,null,t.state!=="normal")}const O$e=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:V4e,createList:M$e,createScale:L$e,createSymbol:xr,createTextStyle:I$e,dataStack:P$e,enableHoverEmphasis:Yl,getECData:De,getLayoutRect:$t,mixinAxisModelCommonMethods:k$e},Symbol.toStringTag,{value:"Module"}));var E$e=1e-8;function D6(e,t){return Math.abs(e-t)<E$e}function hc(e,t,r){var n=0,i=e[0];if(!i)return!1;for(var a=1;a<e.length;a++){var o=e[a];n+=ls(i[0],i[1],o[0],o[1],t,r),i=o}var s=e[0];return(!D6(i[0],s[0])||!D6(i[1],s[1]))&&(n+=ls(i[0],i[1],s[0],s[1],t,r)),n!==0}var D$e=[];function z2(e,t){for(var r=0;r<e.length;r++)ur(e[r],e[r],t)}function N6(e,t,r,n){for(var i=0;i<e.length;i++){var a=e[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(gs(t,t,a),ms(r,r,a))}}function N$e(e){for(var t=0,r=0,n=0,i=e.length,a=e[i-1][0],o=e[i-1][1],s=0;s<i;s++){var l=e[s][0],u=e[s][1],c=a*u-l*o;t+=c,r+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return t?[r/t/3,n/t/3,t]:[e[0][0]||0,e[0][1]||0]}var ate=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}(),j6=function(){function e(t,r){this.type="polygon",this.exterior=t,this.interiors=r}return e}(),R6=function(){function e(t){this.type="linestring",this.points=t}return e}(),ote=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return t.prototype.calcCenter=function(){for(var r=this.geometries,n,i=0,a=0;a<r.length;a++){var o=r[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return N$e(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return B(o,function(s){s.type==="polygon"?N6(s.exterior,i,a,r):B(s.points,function(l){N6(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},t.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(hc(l,r[0],r[1])){for(var c=0;c<(u?u.length:0);c++)if(hc(u[c],r[0],r[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new Oe(r,n,i,a),u=o.calculateTransform(l),c=this.geometries,f=0;f<c.length;f++){var h=c[f];h.type==="polygon"?(z2(h.exterior,u),B(h.interiors,function(d){z2(d,u)})):B(h.points,function(d){z2(d,u)})}o=this._rect,o.copy(l),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}(ate),j$e=function(e){q(t,e);function t(r,n){var i=e.call(this,r)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return t.prototype.calcCenter=function(){for(var r=this._elOnlyForCalculate,n=r.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=i0(D$e),o=r;o&&!o.isGeoSVGGraphicRoot;)Fa(a,o.getLocalTransform(),a),o=o.parent;return da(a,a),ur(i,i,a),i},t}(ate);function R$e(e){if(!e.UTF8Encoding)return e;var t=e,r=t.UTF8Scale;r==null&&(r=1024);var n=t.features;return B(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=ste(s,o,r);break;case"Polygon":$2(s,o,r);break;case"MultiLineString":$2(s,o,r);break;case"MultiPolygon":B(s,function(l,u){return $2(l,o[u],r)})}}),t.UTF8Encoding=!1,t}function $2(e,t,r){for(var n=0;n<e.length;n++)e[n]=ste(e[n],t[n],r)}function ste(e,t,r){for(var n=[],i=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function zI(e,t){return e=R$e(e),se(ht(e.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new j6(o[0],o.slice(1)));break;case"MultiPolygon":B(i.coordinates,function(l){l[0]&&a.push(new j6(l[0],l.slice(1)))});break;case"LineString":a.push(new R6([i.coordinates]));break;case"MultiLineString":a.push(new R6(i.coordinates))}var s=new ote(n[t||"name"],a,n.cp);return s.properties=n,s})}const B$e=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Jk,asc:Mi,getPercentWithPrecision:nRe,getPixelPrecision:fN,getPrecision:Ra,getPrecisionSafe:nQ,isNumeric:vN,isRadianAroundZero:Xd,linearMap:gt,nice:dN,numericToNumber:zo,parseDate:Uo,parsePercent:ve,quantile:rb,quantity:aQ,quantityExponent:bT,reformIntervals:eI,remRadian:hN,round:mr},Symbol.toStringTag,{value:"Module"})),z$e=Object.freeze(Object.defineProperty({__proto__:null,format:h0,parse:Uo,roundTime:vw},Symbol.toStringTag,{value:"Module"})),$$e=Object.freeze(Object.defineProperty({__proto__:null,Arc:u0,BezierCurve:Nv,BoundingRect:Oe,Circle:Zo,CompoundPath:c0,Ellipse:l0,Group:Me,Image:Xr,IncrementalDisplayable:HQ,Line:yr,LinearGradient:Sf,Polygon:wn,Polyline:on,RadialGradient:MN,Rect:Xe,Ring:Dv,Sector:bn,Text:at,clipPointsByRect:IN,clipRectByRect:qQ,createIcon:Rv,extendPath:YQ,extendShape:ZQ,getShapeClass:my,getTransform:Xl,initProps:Nt,makeImage:LN,makePath:Kd,mergePath:Ti,registerShape:xa,resizePath:kN,updateProps:lt},Symbol.toStringTag,{value:"Module"})),F$e=Object.freeze(Object.defineProperty({__proto__:null,addCommas:UN,capitalFirst:zBe,encodeHTML:On,formatTime:BBe,formatTpl:YN,getTextRect:jBe,getTooltipMarker:dJ,normalizeCssArray:$v,toCamelCase:ZN,truncateText:jRe},Symbol.toStringTag,{value:"Module"})),V$e=Object.freeze(Object.defineProperty({__proto__:null,bind:ge,clone:Ce,curry:Fe,defaults:Pe,each:B,extend:re,filter:ht,indexOf:We,inherits:nN,isArray:ae,isFunction:Ae,isObject:Le,isString:pe,map:se,merge:He,reduce:ha},Symbol.toStringTag,{value:"Module"}));var G$e=Je(),Qg=Je(),Ya={estimate:1,determine:2};function Pw(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function lte(e,t){var r=se(t,function(n){return e.scale.parse(n)});return e.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function W$e(e,t){var r=e.getLabelModel().get("customValues");if(r){var n=Uv(e),i=e.scale.getExtent(),a=lte(e,r),o=ht(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:se(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:e.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return e.type==="category"?U$e(e,t):Y$e(e)}function H$e(e,t,r){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent(),a=lte(e,n);return{ticks:ht(a,function(o){return o>=i[0]&&o<=i[1]})}}return e.type==="category"?Z$e(e,t):{ticks:se(e.scale.getTicks(r),function(o){return o.value})}}function U$e(e,t){var r=e.getLabelModel(),n=ute(e,r,t);return!r.get("show")||e.scale.isBlank()?{labels:[]}:n}function ute(e,t,r){var n=q$e(e),i=bj(t),a=r.kind===Ya.estimate;if(!a){var o=fte(n,i);if(o)return o}var s,l;Ae(i)?s=vte(e,i):(l=i==="auto"?K$e(e,r):i,s=dte(e,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return $I(n,i,u),!0}):$I(n,i,u),u}function Z$e(e,t){var r=X$e(e),n=bj(t),i=fte(r,n);if(i)return i;var a,o;if((!t.get("show")||e.scale.isBlank())&&(a=[]),Ae(n))a=vte(e,n,!0);else if(n==="auto"){var s=ute(e,e.getLabelModel(),Pw(Ya.determine));o=s.labelCategoryInterval,a=se(s.labels,function(l){return l.tickValue})}else o=n,a=dte(e,o,!0);return $I(r,n,{ticks:a,tickCategoryInterval:o})}function Y$e(e){var t=e.scale.getTicks(),r=Uv(e);return{labels:se(t,function(n,i){return{formattedLabel:r(n,i),rawLabel:e.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var X$e=cte("axisTick"),q$e=cte("axisLabel");function cte(e){return function(r){return Qg(r)[e]||(Qg(r)[e]={list:[]})}}function fte(e,t){for(var r=0;r<e.list.length;r++)if(e.list[r].key===t)return e.list[r].value}function $I(e,t,r){return e.list.push({key:t,value:r}),r}function K$e(e,t){if(t.kind===Ya.estimate){var r=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return Qg(e).autoInterval=r,!0}),r}var n=Qg(e).autoInterval;return n??(Qg(e).autoInterval=e.calculateCategoryInterval(t))}function Q$e(e,t){var r=t.kind,n=eFe(e),i=Uv(e),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=e.dataToCoord(f+1)-e.dataToCoord(f),d=Math.abs(h*Math.cos(a)),v=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var x=0,_=0,b=xT(i({value:f}),n.font,"center","top");x=b.width*1.3,_=b.height*1.3,g=Math.max(g,x,7),m=Math.max(m,_,7)}var S=g/d,T=m/v;isNaN(S)&&(S=1/0),isNaN(T)&&(T=1/0);var A=Math.max(0,Math.floor(Math.min(S,T)));if(r===Ya.estimate)return t.out.noPxChangeTryDetermine.push(ge(J$e,null,e,A,l)),A;var M=hte(e,A,l);return M??A}function J$e(e,t,r){return hte(e,t,r)==null}function hte(e,t,r){var n=G$e(e.model),i=e.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-r)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function eFe(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 dte(e,t,r){var n=Uv(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=nte(e),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var v=u;v<=a[1];v+=l)g(v);d&&v-l!==a[1]&&g(a[1]);function g(m){var x={value:m};s.push(r?m:{formattedLabel:n(x),rawLabel:i.getLabel(x),tickValue:m,time:void 0,break:void 0})}return s}function vte(e,t,r){var n=e.scale,i=Uv(e),a=[];return B(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var B6=[0,1],_a=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]),i=Math.max(r[0],r[1]);return t>=n&&t<=i},e.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return fN(t||this.scale.getExtent(),this._extent)},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._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),z6(n,i.count())),gt(t,B6,n,r)},e.prototype.coordToData=function(t,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),z6(n,i.count()));var a=gt(t,n,B6,r);return this.scale.scale(a)},e.prototype.pointToData=function(t,r){},e.prototype.getTicksCoords=function(t){t=t||{};var r=t.tickModel||this.getTickModel(),n=H$e(this,r,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=se(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return tFe(this,a,o,t.clamp),a},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),r=t.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=se(n,function(a){return se(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},e.prototype.getViewLabels=function(t){return t=t||Pw(Ya.determine),W$e(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(){var t=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(t){return t=t||Pw(Ya.determine),Q$e(this,t)},e}();function z6(e,t){var r=e[1]-e[0],n=t,i=r/n/2;e[0]+=i,e[1]-=i}function tFe(e,t,r,n){var i=t.length;if(!e.onBand||r||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;B(t,function(d){d.coord-=u/2,d.onBand=!0});var c=e.scale.getExtent();s=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=a[0]>a[1];h(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&h(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&h(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function h(d,v){return d=mr(d),v=mr(v),f?d>v:d<v}}function rFe(e){var t=Qe.extend(e);return Qe.registerClass(t),t}function nFe(e){var t=Lt.extend(e);return Lt.registerClass(t),t}function iFe(e){var t=St.extend(e);return St.registerClass(t),t}function aFe(e){var t=_t.extend(e);return _t.registerClass(t),t}var Gp=Math.PI*2,Ku=$o.CMD,oFe=["top","right","bottom","left"];function sFe(e,t,r,n,i){var a=r.width,o=r.height;switch(e){case"top":n.set(r.x+a/2,r.y-t),i.set(0,-1);break;case"bottom":n.set(r.x+a/2,r.y+o+t),i.set(0,1);break;case"left":n.set(r.x-t,r.y+o/2),i.set(-1,0);break;case"right":n.set(r.x+a+t,r.y+o/2),i.set(1,0);break}}function lFe(e,t,r,n,i,a,o,s,l){o-=e,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*r+e,f=s*r+t;if(Math.abs(n-i)%Gp<1e-4)return l[0]=c,l[1]=f,u-r;if(a){var h=n;n=Pi(i),i=Pi(h)}else n=Pi(n),i=Pi(i);n>i&&(i+=Gp);var d=Math.atan2(s,o);if(d<0&&(d+=Gp),d>=n&&d<=i||d+Gp>=n&&d+Gp<=i)return l[0]=c,l[1]=f,u-r;var v=r*Math.cos(n)+e,g=r*Math.sin(n)+t,m=r*Math.cos(i)+e,x=r*Math.sin(i)+t,_=(v-o)*(v-o)+(g-s)*(g-s),b=(m-o)*(m-o)+(x-s)*(x-s);return _<b?(l[0]=v,l[1]=g,Math.sqrt(_)):(l[0]=m,l[1]=x,Math.sqrt(b))}function Lw(e,t,r,n,i,a,o,s){var l=i-e,u=a-t,c=r-e,f=n-t,h=Math.sqrt(c*c+f*f);c/=h,f/=h;var d=l*c+u*f,v=d/h;s&&(v=Math.min(Math.max(v,0),1)),v*=h;var g=o[0]=e+v*c,m=o[1]=t+v*f;return Math.sqrt((g-i)*(g-i)+(m-a)*(m-a))}function pte(e,t,r,n,i,a,o){r<0&&(e=e+r,r=-r),n<0&&(t=t+n,n=-n);var s=e+r,l=t+n,u=o[0]=Math.min(Math.max(i,e),s),c=o[1]=Math.min(Math.max(a,t),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var ka=[];function uFe(e,t,r){var n=pte(t.x,t.y,t.width,t.height,e.x,e.y,ka);return r.set(ka[0],ka[1]),n}function cFe(e,t,r){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=t.data,f=e.x,h=e.y,d=0;d<c.length;){var v=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var g=u;switch(v){case Ku.M:a=c[d++],o=c[d++],n=a,i=o;break;case Ku.L:g=Lw(n,i,c[d],c[d+1],f,h,ka,!0),n=c[d++],i=c[d++];break;case Ku.C:g=RK(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],f,h,ka),n=c[d++],i=c[d++];break;case Ku.Q:g=zK(n,i,c[d++],c[d++],c[d],c[d+1],f,h,ka),n=c[d++],i=c[d++];break;case Ku.A:var m=c[d++],x=c[d++],_=c[d++],b=c[d++],S=c[d++],T=c[d++];d+=1;var A=!!(1-c[d++]);s=Math.cos(S)*_+m,l=Math.sin(S)*b+x,d<=1&&(a=s,o=l);var M=(f-m)*b/_+m;g=lFe(m,x,b,S,S+T,A,M,h,ka),n=Math.cos(S+T)*_+m,i=Math.sin(S+T)*b+x;break;case Ku.R:a=n=c[d++],o=i=c[d++];var P=c[d++],I=c[d++];g=pte(a,o,P,I,f,h,ka);break;case Ku.Z:g=Lw(n,i,a,o,f,h,ka,!0),n=a,i=o;break}g<u&&(u=g,r.set(ka[0],ka[1]))}return u}var Ba=new Ie,Ot=new Ie,vr=new Ie,To=new Ie,yo=new Ie;function $6(e,t){if(e){var r=e.getTextGuideLine(),n=e.getTextContent();if(n&&r){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||oFe,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=e.getComputedTransform(),f=c&&da([],c),h=t.get("length2")||0;u&&vr.copy(u);for(var d=0;d<o.length;d++){var v=o[d];sFe(v,0,s,Ba,To),Ie.scaleAndAdd(Ot,Ba,To,h),Ot.transform(f);var g=e.getBoundingRect(),m=u?u.distance(Ot):e instanceof rt?cFe(Ot,e.path,vr):uFe(Ot,g,vr);m<l&&(l=m,Ot.transform(c),vr.transform(c),vr.toArray(a[0]),Ot.toArray(a[1]),Ba.toArray(a[2]))}gte(a,t.get("minTurnAngle")),r.setShape({points:a})}}}var kw=[],Vn=new Ie;function gte(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Ba.fromArray(e[0]),Ot.fromArray(e[1]),vr.fromArray(e[2]),Ie.sub(To,Ba,Ot),Ie.sub(yo,vr,Ot);var r=To.len(),n=yo.len();if(!(r<.001||n<.001)){To.scale(1/r),yo.scale(1/n);var i=To.dot(yo),a=Math.cos(t);if(a<i){var o=Lw(Ot.x,Ot.y,vr.x,vr.y,Ba.x,Ba.y,kw,!1);Vn.fromArray(kw),Vn.scaleAndAdd(yo,o/Math.tan(Math.PI-t));var s=vr.x!==Ot.x?(Vn.x-Ot.x)/(vr.x-Ot.x):(Vn.y-Ot.y)/(vr.y-Ot.y);if(isNaN(s))return;s<0?Ie.copy(Vn,Ot):s>1&&Ie.copy(Vn,vr),Vn.toArray(e[1])}}}}function fFe(e,t,r){if(r<=180&&r>0){r=r/180*Math.PI,Ba.fromArray(e[0]),Ot.fromArray(e[1]),vr.fromArray(e[2]),Ie.sub(To,Ot,Ba),Ie.sub(yo,vr,Ot);var n=To.len(),i=yo.len();if(!(n<.001||i<.001)){To.scale(1/n),yo.scale(1/i);var a=To.dot(t),o=Math.cos(r);if(a<o){var s=Lw(Ot.x,Ot.y,vr.x,vr.y,Ba.x,Ba.y,kw,!1);Vn.fromArray(kw);var l=Math.PI/2,u=Math.acos(yo.dot(t)),c=l+u-r;if(c>=l)Ie.copy(Vn,vr);else{Vn.scaleAndAdd(yo,s/Math.tan(Math.PI/2-c));var f=vr.x!==Ot.x?(Vn.x-Ot.x)/(vr.x-Ot.x):(Vn.y-Ot.y)/(vr.y-Ot.y);if(isNaN(f))return;f<0?Ie.copy(Vn,Ot):f>1&&Ie.copy(Vn,vr)}Vn.toArray(e[1])}}}}function F2(e,t,r,n){var i=r==="normal",a=i?e:e.ensureState(r);a.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?e.useStyle(s):a.style=s}function hFe(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 i=ps(n[0],n[1]),a=ps(n[1],n[2]);if(!i||!a){e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Vg([],n[1],n[0],o/i),l=Vg([],n[1],n[2],o/a),u=Vg([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c<n.length;c++)e.lineTo(n[c][0],n[c][1])}function wj(e,t,r){var n=e.getTextGuideLine(),i=e.getTextContent();if(!i){n&&e.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<py.length;l++){var u=py[l],c=t[u],f=u==="normal";if(c){var h=c.get("show"),d=f?s:be(i.states[u]&&i.states[u].ignore,s);if(d||!be(h,o)){var v=f?n:n&&n.states[u];v&&(v.ignore=!0),n&&F2(n,!0,u,c);continue}n||(n=new on,e.setTextGuideLine(n),!f&&(s||!o)&&F2(n,!0,"normal",t.normal),e.stateProxy&&(n.stateProxy=e.stateProxy)),F2(n,!1,u,c)}}if(n){Pe(n.style,r),n.style.fill=null;var g=a.get("showAbove"),m=e.textGuideLineConfig=e.textGuideLineConfig||{};m.showAbove=g||!1,n.buildPath=hFe}}function Sj(e,t){t=t||"labelLine";for(var r={normal:e.getModel(t)},n=0;n<Yn.length;n++){var i=Yn[n];r[i]=e.getModel([i,t])}return r}var F6=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],dFe=1,Iw=2,mte=dFe|Iw;function Ow(e,t,r){r=r||mte,t?e.dirty|=r:e.dirty&=~r}function yte(e,t){return t=t||mte,e.dirty==null||!!(e.dirty&t)}function Vo(e){if(e)return yte(e)&&xte(e,e.label,e),e}function xte(e,t,r){var n=t.getComputedTransform();e.transform=EN(e.transform,n);var i=e.localRect=yy(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=r&&r.marginForce,l=r&&r.minMarginForce,u=r&&r.marginDefault,c=a.__marginType;c==null&&u&&(o=u,c=Gh.textMargin);for(var f=0;f<4;f++)V2[f]=c===Gh.minMargin&&l&&l[f]!=null?l[f]:s&&s[f]!=null?s[f]:o?o[f]:0;c===Gh.textMargin&&sf(i,V2,!1,!1);var h=e.rect=yy(e.rect,i);return n&&h.applyTransform(n),c===Gh.minMargin&&sf(h,V2,!1,!1),e.axisAligned=ON(n),(e.label=e.label||{}).ignore=t.ignore,Ow(e,!1),Ow(e,!0,Iw),e}var V2=[0,0,0,0];function vFe(e,t,r){return e.transform=EN(e.transform,r),e.localRect=yy(e.localRect,t),e.rect=yy(e.rect,t),r&&e.rect.applyTransform(r),e.axisAligned=ON(r),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function FI(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 i=e.obb;i&&i.fromBoundingRect(e.localRect,r)}}function VI(e,t){for(var r=0;r<F6.length;r++){var n=F6[r];e[n]==null&&(e[n]=t[n])}return Vo(e)}function V6(e){var t=e.obb;return(!t||yte(e,Iw))&&(e.obb=t=t||new WQ,t.fromBoundingRect(e.localRect,e.transform),Ow(e,!1,Iw)),t}function GI(e,t,r,n,i){var a=e.length,o=Re[t],s=Tr[t];if(a<2)return!1;e.sort(function(M,P){return M.rect[o]-P.rect[o]});for(var l=0,u,c=!1,f=0;f<a;f++){var h=e[f],d=h.rect;u=d[o]-l,u<0&&(d[o]-=u,h.label[o]-=u,c=!0),l=d[o]+d[s]}var v=e[0],g=e[a-1],m,x;_(),m<0&&T(-m,.8),x<0&&T(x,.8),_(),b(m,x,1),b(x,m,-1),_(),m<0&&A(-m),x<0&&A(x);function _(){m=v.rect[o]-r,x=n-g.rect[o]-g.rect[s]}function b(M,P,I){if(M<0){var k=Math.min(P,-M);if(k>0){S(k*I,0,a);var O=k+M;O<0&&T(-O*I,1)}else T(-M*I,1)}}function S(M,P,I){M!==0&&(c=!0);for(var k=P;k<I;k++){var O=e[k],D=O.rect;D[o]+=M,O.label[o]+=M}}function T(M,P){for(var I=[],k=0,O=1;O<a;O++){var D=e[O-1].rect,N=Math.max(e[O].rect[o]-D[o]-D[s],0);I.push(N),k+=N}if(k){var j=Math.min(Math.abs(M)/k,P);if(M>0)for(var O=0;O<a-1;O++){var z=I[O]*j;S(z,0,O+1)}else for(var O=a-1;O>0;O--){var z=I[O-1]*j;S(-z,O,a)}}}function A(M){var P=M<0?-1:1;M=Math.abs(M);for(var I=Math.ceil(M/(a-1)),k=0;k<a-1;k++)if(P>0?S(I,0,k+1):S(-I,a-k-1,a),M-=I,M<=0)return}return c}function pFe(e){for(var t=0;t<e.length;t++){var r=e[t],n=r.defaultAttr,i=r.labelLine;r.label.attr("ignore",n.ignore),i&&i.attr("ignore",n.labelGuideIgnore)}}function _te(e){var t=[];e.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function r(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var n=0;n<e.length;n++){var i=Vo(e[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if($T(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(r(a),o&&r(o)):t.push(i)}}}function $T(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:V6(e).intersect(V6(t),r,n)}function gFe(e){if(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].slice());return t}}function mFe(e,t){var r=e.label,n=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:r.style.align,verticalAlign:r.style.verticalAlign,labelLinePoints:gFe(n&&n.shape.points)}}var G6=["align","verticalAlign","width","height","fontSize"],Bn=new ys,G2=Je(),yFe=Je();function o_(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];t[i]!=null&&(e[i]=t[i])}}var s_=["x","y","rotation"],xFe=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(t,r,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();Oe.applyTransform(c,c,u),u?Bn.setLocalTransform(u):(Bn.x=Bn.y=Bn.rotation=Bn.originX=Bn.originY=0,Bn.scaleX=Bn.scaleY=1),Bn.rotation=Pi(Bn.rotation);var f=i.__hostTarget,h;if(f){h=f.getBoundingRect().plain();var d=f.getComputedTransform();Oe.applyTransform(h,h,d)}var v=h&&f.getTextGuideLine();this._labelList.push({label:i,labelLine:v,seriesModel:n,dataIndex:t,dataType:r,layoutOptionOrCb:a,layoutOption:null,rect:c,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:v&&v.ignore,x:Bn.x,y:Bn.y,scaleX:Bn.scaleX,scaleY:Bn.scaleY,rotation:Bn.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},e.prototype.addLabelsOfSeries=function(t){var r=this;this._chartViewList.push(t);var n=t.__model,i=n.get("labelLayout");(Ae(i)||it(i).length)&&t.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=De(a);o&&!o.disableLabelLayout&&r._addLabel(s.dataIndex,s.dataType,n,o,i)})},e.prototype.updateLayoutConfig=function(t){var r=t.getWidth(),n=t.getHeight();function i(b,S){return function(){$6(b,S)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;Ae(o.layoutOptionOrCb)?c=o.layoutOptionOrCb(mFe(o,l)):c=o.layoutOptionOrCb,c=c||{},o.layoutOption=c;var f=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*f:u.attachedRot,offset:[c.dx||0,c.dy||0]});var h=!1;if(c.x!=null?(s.x=ve(c.x,r),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=ve(c.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),h=!1)}var v=G2(s);v.needsUpdateLabelLine=h,s.rotation=c.rotate!=null?c.rotate*f:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var g=0;g<G6.length;g++){var m=G6[g];s.setStyle(m,c[m]!=null?c[m]:u.style[m])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var x=o.seriesModel;if(o.dataIndex!=null){var _=o.seriesModel.getData(o.dataType);x=_.getItemModel(o.dataIndex)}s.on("drag",i(l,x.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},e.prototype.layout=function(t){var r=t.getWidth(),n=t.getHeight(),i=[];B(this._labelList,function(l){l.defaultAttr.ignore||i.push(VI({},l))});var a=ht(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=ht(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});GI(a,0,0,r),GI(o,1,0,n);var s=ht(i,function(l){return l.layoutOption.hideOverlap});pFe(s),_te(s)},e.prototype.processLabelsOverall=function(){var t=this;B(this._chartViewList,function(r){var n=r.__model,i=r.ignoreLabelLineUpdate,a=n.isAnimationEnabled();r.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=G2(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,n),a&&t._animateLabels(o,n)})})},e.prototype._updateLabelLine=function(t,r){var n=t.getTextContent(),i=De(t),a=i.dataIndex;if(n&&a!=null){var o=r.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var f=s.getModel("labelLine");wj(t,Sj(s),l),$6(t,f)}},e.prototype._animateLabels=function(t,r){var n=t.getTextContent(),i=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!ud(t))){var a=G2(n),o=a.oldLayout,s=De(t),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=r.getData(s.dataType);if(o){n.attr(o);var h=t.prevStates;h&&(We(h,"select")>=0&&n.attr(a.oldLayoutSelect),We(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),lt(n,u,r,l)}else if(n.attr(u),!Bv(n).valueAnimation){var f=be(n.style.opacity,1);n.style.opacity=0,Nt(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};o_(d,u,s_),o_(d,n.states.select,s_)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};o_(v,u,s_),o_(v,n.states.emphasis,s_)}rJ(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=yFe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),lt(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,Nt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},e}(),W2=Je();function _Fe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){var i=W2(r).labelManager;i||(i=W2(r).labelManager=new xFe),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(t,r,n){var i=W2(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var H2=Math.sin,U2=Math.cos,bte=Math.PI,Qu=Math.PI*2,bFe=180/bte,wte=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,i,a,o){this._add("C",t,r,n,i,a,o)},e.prototype.quadraticCurveTo=function(t,r,n,i){this._add("Q",t,r,n,i)},e.prototype.arc=function(t,r,n,i,a,o){this.ellipse(t,r,n,n,0,i,a,o)},e.prototype.ellipse=function(t,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Il(f-Qu)||(c?u>=Qu:-u>=Qu),d=u>0?u%Qu:u%Qu+Qu,v=!1;h?v=!0:Il(f)?v=!1:v=d>=bte==!!c;var g=t+n*U2(o),m=r+i*H2(o);this._start&&this._add("M",g,m);var x=Math.round(a*bFe);if(h){var _=1/this._p,b=(c?1:-1)*(Qu-_);this._add("A",n,i,x,1,+c,t+n*U2(o+b),r+i*H2(o+b)),_>.01&&this._add("A",n,i,x,0,+c,g,m)}else{var S=t+n*U2(s),T=r+i*H2(s);this._add("A",n,i,x,+v,+c,S,T)}},e.prototype.rect=function(t,r,n,i){this._add("M",t,r),this._add("l",n,0),this._add("l",0,i),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,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h<arguments.length;h++){var d=arguments[h];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*f)/f)}this._d.push(t+c.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}(),Tj="none",wFe=Math.round;function SFe(e){var t=e.fill;return t!=null&&t!==Tj}function TFe(e){var t=e.stroke;return t!=null&&t!==Tj}var WI=["lineCap","miterLimit","lineJoin"],AFe=se(WI,function(e){return"stroke-"+e.toLowerCase()});function CFe(e,t,r,n){var i=t.opacity==null?1:t.opacity;if(r instanceof Xr){e("opacity",i);return}if(SFe(t)){var a=dy(t.fill);e("fill",a.color);var o=t.fillOpacity!=null?t.fillOpacity*a.opacity*i:a.opacity*i;o<1&&e("fill-opacity",o)}else e("fill",Tj);if(TFe(t)){var s=dy(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?r.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=t.strokeOpacity!=null?t.strokeOpacity*s.opacity*i:s.opacity*i,f=t.strokeFirst;if(u!==1&&e("stroke-width",u),f&&e("paint-order",f?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var h=aj(r),d=h[0],v=h[1];d&&(v=wFe(v||0),e("stroke-dasharray",d.join(",")),(v||n)&&e("stroke-dashoffset",v))}for(var g=0;g<WI.length;g++){var m=WI[g];if(t[m]!==lw[m]){var x=t[m]||lw[m];x&&e(AFe[g],x)}}}}var Ste="http://www.w3.org/2000/svg",Tte="http://www.w3.org/1999/xlink",MFe="http://www.w3.org/2000/xmlns/",PFe="http://www.w3.org/XML/1998/namespace",W6="ecmeta_";function Ate(e){return document.createElementNS(Ste,e)}function Gr(e,t,r,n,i){return{tag:e,attrs:r||{},children:n,text:i,key:t}}function LFe(e,t){var r=[];if(t)for(var n in t){var i=t[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),r.push(a))}return"<"+e+" "+r.join(" ")+">"}function kFe(e){return"</"+e+">"}function Aj(e,t){t=t||{};var r=t.newline?`
|
||
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return LFe(o,s)+(o!=="style"?On(l):l||"")+(a?""+r+se(a,function(u){return n(u)}).join(r)+r:"")+kFe(o)}return n(e)}function IFe(e,t,r){r=r||{};var n=r.newline?`
|
||
`:"",i=" {"+n,a=n+"}",o=se(it(e),function(l){return l+i+se(it(e[l]),function(u){return u+":"+e[l][u]+";"}).join(n)+a}).join(n),s=se(it(t),function(l){return"@keyframes "+l+i+se(it(t[l]),function(u){return u+i+se(it(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function HI(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function H6(e,t,r,n){return Gr("svg","root",{width:e,height:t,xmlns:Ste,"xmlns:xlink":Tte,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+e+" "+t:!1},r)}var OFe=0;function Cte(){return OFe++}var U6={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"},oc="transform-origin";function EFe(e,t,r){var n=re({},e.shape);re(n,t),e.buildPath(r,n);var i=new wte;return i.reset(UK(e)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function DFe(e,t){var r=t.originX,n=t.originY;(r||n)&&(e[oc]=r+"px "+n+"px")}var NFe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Mte(e,t){var r=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[r]=e,r}function jFe(e,t,r){var n=e.shape.paths,i={},a,o;if(B(n,function(l){var u=HI(r.zrId);u.animation=!0,FT(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=it(c),d=h.length;if(d){o=h[d-1];var v=c[o];for(var g in v){var m=v[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var x in f){var _=f[x].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){t.d=!1;var s=Mte(i,r);return a.replace(o,s)}}function Z6(e){return pe(e)?U6[e]?"cubic-bezier("+U6[e]+")":sN(e)?e:"":""}function FT(e,t,r,n){var i=e.animators,a=i.length,o=[];if(e instanceof c0){var s=jFe(e,t,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],f=[c.getMaxTime()/1e3+"s"],h=Z6(c.getClip().easing),d=c.getDelay();h?f.push(h):f.push("linear"),d&&f.push(d/1e3+"s"),c.getLoop()&&f.push("infinite");var v=f.join(" ");l[v]=l[v]||[v,[]],l[v][1].push(c)}function g(_){var b=_[1],S=b.length,T={},A={},M={},P="animation-timing-function";function I(xe,ie,he){for(var ue=xe.getTracks(),ee=xe.getMaxTime(),Ve=0;Ve<ue.length;Ve++){var Se=ue[Ve];if(Se.needsAnimate()){var Ge=Se.keyframes,Ye=Se.propName;if(he&&(Ye=he(Ye)),Ye)for(var vt=0;vt<Ge.length;vt++){var Vt=Ge[vt],nr=Math.round(Vt.time/ee*100)+"%",jn=Z6(Vt.easing),qr=Vt.rawValue;(pe(qr)||ot(qr))&&(ie[nr]=ie[nr]||{},ie[nr][Ye]=Vt.rawValue,jn&&(ie[nr][P]=jn))}}}}for(var k=0;k<S;k++){var O=b[k],D=O.targetName;D?D==="shape"&&I(O,A):!n&&I(O,T)}for(var N in T){var j={};aw(j,e),re(j,T[N]);var z=ZK(j),$=T[N][P];M[N]=z?{transform:z}:{},DFe(M[N],j),$&&(M[N][P]=$)}var U,F=!0;for(var N in A){M[N]=M[N]||{};var V=!U,$=A[N][P];V&&(U=new $o);var W=U.len();U.reset(),M[N].d=EFe(e,A[N],U);var Y=U.len();if(!V&&W!==Y){F=!1;break}$&&(M[N][P]=$)}if(!F)for(var N in M)delete M[N].d;if(!n)for(var k=0;k<S;k++){var O=b[k],D=O.targetName;D==="style"&&I(O,M,function(ue){return NFe[ue]})}for(var Z=it(M),J=!0,ne,k=1;k<Z.length;k++){var le=Z[k-1],fe=Z[k];if(M[le][oc]!==M[fe][oc]){J=!1;break}ne=M[le][oc]}if(J&&ne){for(var N in M)M[N][oc]&&delete M[N][oc];t[oc]=ne}if(ht(Z,function(xe){return it(M[xe]).length>0}).length){var ze=Mte(M,r);return ze+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var x=r.zrId+"-cls-"+Cte();r.cssNodes["."+x]={animation:o.join(",")},t.class=x}}function RFe(e,t,r){if(!e.ignore)if(e.isSilent()){var n={"pointer-events":"none"};Y6(n,t,r)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&s||o;l&&(a=rw(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&e.transform?e.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),Y6(n,t,r)}}function Y6(e,t,r,n){var i=JSON.stringify(e),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+Cte(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=e),t.class=t.class?t.class+" "+a:a}var My=Math.round;function Pte(e){return e&&pe(e.src)}function Lte(e){return e&&Ae(e.toDataURL)}function Cj(e,t,r,n){CFe(function(i,a){var o=i==="fill"||i==="stroke";o&&HK(a)?Ite(t,e,i,n):o&&uN(a)?Ote(r,e,i,n):e[i]=a,o&&n.ssr&&a==="none"&&(e["pointer-events"]="visible")},t,r,!1),WFe(r,e,n)}function Mj(e,t){var r=eQ(t);r&&(r.each(function(n,i){n!=null&&(e[(W6+i).toLowerCase()]=n+"")}),t.isSilent()&&(e[W6+"silent"]="true"))}function X6(e){return Il(e[0]-1)&&Il(e[1])&&Il(e[2])&&Il(e[3]-1)}function BFe(e){return Il(e[4])&&Il(e[5])}function Pj(e,t,r){if(t&&!(BFe(t)&&X6(t))){var n=1e4;e.transform=X6(t)?"translate("+My(t[4]*n)/n+" "+My(t[5]*n)/n+")":xje(t)}}function q6(e,t,r){for(var n=e.points,i=[],a=0;a<n.length;a++)i.push(My(n[a][0]*r)/r),i.push(My(n[a][1]*r)/r);t.points=i.join(" ")}function K6(e){return!e.smooth}function zFe(e){var t=se(e,function(r){return typeof r=="string"?[r,r]:r});return function(r,n,i){for(var a=0;a<t.length;a++){var o=t[a],s=r[o[0]];s!=null&&(n[o[1]]=My(s*i)/i)}}}var $Fe={circle:[zFe(["cx","cy","r"])],polyline:[q6,K6],polygon:[q6,K6]};function FFe(e){for(var t=e.animators,r=0;r<t.length;r++)if(t[r].targetName==="shape")return!0;return!1}function kte(e,t){var r=e.style,n=e.shape,i=$Fe[e.type],a={},o=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&UK(e)||4;if(i&&!t.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&FFe(e))&&!(l<1)){s=e.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var f=!e.path||e.shapeChanged();e.path||e.createPathProxy();var h=e.path;f&&(h.beginPath(),e.buildPath(h,e.shape),e.pathUpdated());var d=h.getVersion(),v=e,g=v.__svgPathBuilder;(v.__svgPathVersion!==d||!g||l!==v.__svgPathStrokePercent)&&(g||(g=v.__svgPathBuilder=new wte),g.reset(u),h.rebuildPath(g,l),g.generateStr(),v.__svgPathVersion=d,v.__svgPathStrokePercent=l),a.d=g.getStr()}return Pj(a,e.transform),Cj(a,r,e,t),Mj(a,e),t.animation&&FT(e,a,t),t.emphasis&&RFe(e,a,t),Gr(s,e.id+"",a)}function VFe(e,t){var r=e.style,n=r.image;if(n&&!pe(n)&&(Pte(n)?n=n.src:Lte(n)&&(n=n.toDataURL())),!!n){var i=r.x||0,a=r.y||0,o=r.width,s=r.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),Pj(l,e.transform),Cj(l,r,e,t),Mj(l,e),t.animation&&FT(e,l,t),Gr("image",e.id+"",l)}}function GFe(e,t){var r=e.style,n=r.text;if(n!=null&&(n+=""),!(!n||isNaN(r.x)||isNaN(r.y))){var i=r.font||zs,a=r.x||0,o=bje(r.y||0,o0(i),r.textBaseline),s=_je[r.textAlign]||r.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(CQ(r)){var u="",c=r.fontStyle,f=AQ(r.fontSize);if(!parseFloat(f))return;var h=r.fontFamily||mK,d=r.fontWeight;u+="font-size:"+f+";font-family:"+h+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),Pj(l,e.transform),Cj(l,r,e,t),Mj(l,e),t.animation&&FT(e,l,t),Gr("text",e.id+"",l,void 0,n)}}function Q6(e,t){if(e instanceof rt)return kte(e,t);if(e instanceof Xr)return VFe(e,t);if(e instanceof qd)return GFe(e,t)}function WFe(e,t,r){var n=e.style;if(wje(n)){var i=Sje(e),a=r.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,f=n.shadowOffsetY||0,h=n.shadowBlur,d=dy(n.shadowColor),v=d.opacity,g=d.color,m=h/2/l,x=h/2/u,_=m+" "+x;o=r.zrId+"-s"+r.shadowIdx++,r.defs[o]=Gr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Gr("feDropShadow","",{dx:c/l,dy:f/u,stdDeviation:_,"flood-color":g,"flood-opacity":v})]),a[i]=o}t.filter=yT(o)}}function Ite(e,t,r,n){var i=e[r],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(GK(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(WK(i))a="radialGradient",o.cx=be(i.x,.5),o.cy=be(i.y,.5),o.r=be(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var f=Vk(s[u].offset)*100+"%",h=s[u].color,d=dy(h),v=d.color,g=d.opacity,m={offset:f};m["stop-color"]=v,g<1&&(m["stop-opacity"]=g),l.push(Gr("stop",u+"",m))}var x=Gr(a,"",o,l),_=Aj(x),b=n.gradientCache,S=b[_];S||(S=n.zrId+"-g"+n.gradientIdx++,b[_]=S,o.id=S,n.defs[S]=Gr(a,S,o,l)),t[r]=yT(S)}function Ote(e,t,r,n){var i=e.style[r],a=e.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",f;if(VK(i)){var h=i.imageWidth,d=i.imageHeight,v=void 0,g=i.image;if(pe(g)?v=g:Pte(g)?v=g.src:Lte(g)&&(v=g.toDataURL()),typeof Image>"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";_n(h,m),_n(d,m)}else if(h==null||d==null){var x=function(k,O){if(k){var D=k.elm,N=h||O.width,j=d||O.height;k.tag==="pattern"&&(u?(j=1,N/=a.width):c&&(N=1,j/=a.height)),k.attrs.width=N,k.attrs.height=j,D&&(D.setAttribute("width",N),D.setAttribute("height",j))}},_=yN(v,null,e,function(k){l||x(A,k),x(f,k)});_&&_.width&&_.height&&(h=h||_.width,d=d||_.height)}f=Gr("image","img",{href:v,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=Ce(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var b,S;l?b=S=1:u?(S=1,b=o.width/a.width):c?(b=1,S=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),S!=null&&!isNaN(S)&&(o.height=S);var T=ZK(i);T&&(o.patternTransform=T);var A=Gr("pattern","",o,[f]),M=Aj(A),P=n.patternCache,I=P[M];I||(I=n.zrId+"-p"+n.patternIdx++,P[M]=I,o.id=I,A=n.defs[I]=Gr("pattern",I,o,[f])),t[r]=yT(I)}}function HFe(e,t,r){var n=r.clipPathCache,i=r.defs,a=n[e.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[e.id]=a,i[a]=Gr("clipPath",a,o,[kte(e,r)])}t["clip-path"]=yT(a)}function J6(e){return document.createTextNode(e)}function dc(e,t,r){e.insertBefore(t,r)}function eG(e,t){e.removeChild(t)}function tG(e,t){e.appendChild(t)}function Ete(e){return e.parentNode}function Dte(e){return e.nextSibling}function Z2(e,t){e.textContent=t}var rG=58,UFe=120,ZFe=Gr("","");function UI(e){return e===void 0}function vo(e){return e!==void 0}function YFe(e,t,r){for(var n={},i=t;i<=r;++i){var a=e[i].key;a!==void 0&&(n[a]=i)}return n}function xg(e,t){var r=e.key===t.key,n=e.tag===t.tag;return n&&r}function Py(e){var t,r=e.children,n=e.tag;if(vo(n)){var i=e.elm=Ate(n);if(Lj(ZFe,e),ae(r))for(t=0;t<r.length;++t){var a=r[t];a!=null&&tG(i,Py(a))}else vo(e.text)&&!Le(e.text)&&tG(i,J6(e.text))}else e.elm=J6(e.text);return e.elm}function Nte(e,t,r,n,i){for(;n<=i;++n){var a=r[n];a!=null&&dc(e,Py(a),t)}}function Ew(e,t,r,n){for(;r<=n;++r){var i=t[r];if(i!=null)if(vo(i.tag)){var a=Ete(i.elm);eG(a,i.elm)}else eG(e,i.elm)}}function Lj(e,t){var r,n=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(r in a){var o=a[r],s=i[r];s!==o&&(o===!0?n.setAttribute(r,""):o===!1?n.removeAttribute(r):r==="style"?n.style.cssText=o:r.charCodeAt(0)!==UFe?n.setAttribute(r,o):r==="xmlns:xlink"||r==="xmlns"?n.setAttributeNS(MFe,r,o):r.charCodeAt(3)===rG?n.setAttributeNS(PFe,r,o):r.charCodeAt(5)===rG?n.setAttributeNS(Tte,r,o):n.setAttribute(r,o))}for(r in i)r in a||n.removeAttribute(r)}}function XFe(e,t,r){for(var n=0,i=0,a=t.length-1,o=t[0],s=t[a],l=r.length-1,u=r[0],c=r[l],f,h,d,v;n<=a&&i<=l;)o==null?o=t[++n]:s==null?s=t[--a]:u==null?u=r[++i]:c==null?c=r[--l]:xg(o,u)?(wh(o,u),o=t[++n],u=r[++i]):xg(s,c)?(wh(s,c),s=t[--a],c=r[--l]):xg(o,c)?(wh(o,c),dc(e,o.elm,Dte(s.elm)),o=t[++n],c=r[--l]):xg(s,u)?(wh(s,u),dc(e,s.elm,o.elm),s=t[--a],u=r[++i]):(UI(f)&&(f=YFe(t,n,a)),h=f[u.key],UI(h)?dc(e,Py(u),o.elm):(d=t[h],d.tag!==u.tag?dc(e,Py(u),o.elm):(wh(d,u),t[h]=void 0,dc(e,d.elm,o.elm))),u=r[++i]);(n<=a||i<=l)&&(n>a?(v=r[l+1]==null?null:r[l+1].elm,Nte(e,v,r,i,l)):Ew(e,t,n,a))}function wh(e,t){var r=t.elm=e.elm,n=e.children,i=t.children;e!==t&&(Lj(e,t),UI(t.text)?vo(n)&&vo(i)?n!==i&&XFe(r,n,i):vo(i)?(vo(e.text)&&Z2(r,""),Nte(r,null,i,0,i.length-1)):vo(n)?Ew(r,n,0,n.length-1):vo(e.text)&&Z2(r,""):e.text!==t.text&&(vo(n)&&Ew(r,n,0,n.length-1),Z2(r,t.text)))}function qFe(e,t){if(xg(e,t))wh(e,t);else{var r=e.elm,n=Ete(r);Py(t),n!==null&&(dc(n,t.elm,Dte(r)),Ew(n,[e],0,0))}return t}var KFe=0,QFe=function(){function e(t,r,n){if(this.type="svg",this.refreshHover=nG(),this.configLayer=nG(),this.storage=r,this._opts=n=re({},n),this.root=t,this._id="zr"+KFe++,this._oldVNode=H6(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Ate("svg");Lj(null,this._oldVNode),i.appendChild(a),t.appendChild(i)}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",qFe(this._oldVNode,t),this._oldVNode=t}},e.prototype.renderOneToVNode=function(t){return Q6(t,HI(this._id))},e.prototype.renderToVNode=function(t){t=t||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=HI(this._id);a.animation=t.animation,a.willUpdate=t.willUpdate,a.compress=t.compress,a.emphasis=t.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=JFe(n,i,this._backgroundColor,a);s&&o.push(s);var l=t.compress?null:this._mainVNode=Gr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=se(it(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(Gr("defs","defs",{},u)),t.animation){var c=IFe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=Gr("style","stl",{},[],c);o.push(f)}}return H6(n,i,o,t.useViewBox)},e.prototype.renderToString=function(t){return t=t||{},Aj(this.renderToVNode({animation:be(t.cssAnimation,!0),emphasis:be(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:be(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 i=t.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var f=t[c];if(!f.invisible){var h=f.__clipPaths,d=h&&h.length||0,v=l&&l.length||0,g=void 0;for(g=Math.max(d-1,v-1);g>=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=v-1;m>g;m--)o--,s=a[o-1];for(var x=g+1;x<d;x++){var _={};HFe(h[x],_,r);var b=Gr("g","clip-g-"+u++,_,[]);(s?s.children:n).push(b),a[o++]=b,s=b}l=h;var S=Q6(f,r);S&&(s?s.children:n).push(S)}}},e.prototype.resize=function(t,r){var n=this._opts,i=this.root,a=this._viewport;if(t!=null&&(n.width=t),r!=null&&(n.height=r),i&&a&&(a.style.display="none",t=Hh(i,0,n),r=Hh(i,1,n),a.style.display=""),this._width!==t||this._height!==r){if(this._width=t,this._height=r,a){var o=a.style;o.width=t+"px",o.height=r+"px"}if(uN(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",t),s.setAttribute("height",r));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",t),l.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=Aje(r),r&&n+"base64,"+r):n+"charset=UTF-8,"+encodeURIComponent(r)},e}();function nG(e){return function(){}}function JFe(e,t,r,n){var i;if(r&&r!=="none")if(i=Gr("rect","bg",{width:e,height:t,x:"0",y:"0"}),HK(r))Ite({fill:r},i.attrs,"fill",n);else if(uN(r))Ote({style:{fill:r},dirty:lr,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",n);else{var a=dy(r),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}function eVe(e){e.registerPainter("svg",QFe)}function iG(e,t,r){var n=hi.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=i*r,n.height=a*r,n}var Y2=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||iw,typeof r=="string"?o=iG(r,n,i):Le(r)&&(o=r,r=o.id),a.id=r,a.dom=o;var s=o.style;return s&&(iN(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},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=iG("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,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Oe(0,0,0,0);function c(_){if(!(!_.isFinite()||_.isZero()))if(o.length===0){var b=new Oe(0,0,0,0);b.copy(_),o.push(b)}else{for(var S=!1,T=1/0,A=0,M=0;M<o.length;++M){var P=o[M];if(P.intersect(_)){var I=new Oe(0,0,0,0);I.copy(P),I.union(_),o[M]=I,S=!0;break}else if(l){u.copy(_),u.union(P);var k=_.width*_.height,O=P.width*P.height,D=u.width*u.height,N=D-k-O;N<T&&(T=N,A=M)}}if(l&&(o[A].union(_),S=!0),!S){var b=new Oe(0,0,0,0);b.copy(_),o.push(b)}l||(l=o.length>=s)}}for(var f=this.__startIndex;f<this.__endIndex;++f){var h=r[f];if(h){var d=h.shouldBePainted(i,a,!0,!0),v=h.__isRendered&&(h.__dirty&Si||!d)?h.getPrevPaintRect():null;v&&c(v);var g=d&&(h.__dirty&Si||!h.__isRendered)?h.getPaintRect():null;g&&c(g)}}for(var f=this.__prevStartIndex;f<this.__prevEndIndex;++f){var h=n[f],d=h&&h.shouldBePainted(i,a,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var v=h.getPrevPaintRect();v&&c(v)}}var m;do{m=!1;for(var f=0;f<o.length;){if(o[f].isZero()){o.splice(f,1);continue}for(var x=f+1;x<o.length;)o[f].intersect(o[x])?(m=!0,o[f].union(o[x]),o.splice(x,1)):x++;f++}}while(m);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(r,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=r+"px",o.height=n+"px"),a.width=r*i,a.height=n*i,s&&(s.width=r*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(r,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!r,c=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/f,l/f));var d=this.domBack;function v(g,m,x,_){if(o.clearRect(g,m,x,_),n&&n!=="transparent"){var b=void 0;if(t0(n)){var S=n.global||n.__width===x&&n.__height===_;b=S&&n.__canvasGradient||PI(o,n,{x:0,y:0,width:x,height:_}),n.__canvasGradient=b,n.__width=x,n.__height=_}else bK(n)&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,b=LI(o,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}}));o.save(),o.fillStyle=b||n,o.fillRect(g,m,x,_),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,g,m,x,_),o.restore())}!i||u?v(0,0,s,l):i.length&&B(i,function(g){v(g.x*f,g.y*f,g.width*f,g.height*f)})},t}(ya),aG=1e5,Ju=314159,l_=.01,tVe=.001;function rVe(e){return e?e.__builtin__?!0:!(typeof e.resize!="function"||typeof e.refresh!="function"):!1}function nVe(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}var iVe=function(){function e(t,r,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=re({},n||{}),this.dpr=n.devicePixelRatio||iw,this._singleCanvas=a,this.root=t;var o=t.style;o&&(iN(t),t.innerHTML=""),this.storage=r;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=t,f=c.width,h=c.height;n.width!=null&&(f=n.width),n.height!=null&&(h=n.height),this.dpr=n.devicePixelRatio||1,c.width=f*this.dpr,c.height=h*this.dpr,this._width=f,this._height=h;var d=new Y2(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[Ju]=d,d.zlevel=Ju,s.push(Ju),this._domRoot=t}else{this._width=Hh(t,0,n),this._height=Hh(t,1,n);var u=this._domRoot=nVe(this._width,this._height);t.appendChild(u)}}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=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(r,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=r.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(t){var r=t.length,n=this._hoverlayer;if(n&&n.clear(),!!r){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<r;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(aG)),a||(a=n.ctx,a.save()),kc(a,s,i,o===r-1))}a&&a.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(aG)},e.prototype.paintOne=function(t,r){oj(t,r)},e.prototype._paintList=function(t,r,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,r,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Q1(function(){l._paintList(t,r,n,i)})}}},e.prototype._compositeManually=function(){var t=this.getLayer(Ju).ctx,r=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,r,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,r,n)})},e.prototype._doPaintList=function(t,r,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,f=!1,h=function(g){var m=a[g],x=m.ctx,_=o&&m.createRepaintRects(t,r,d._width,d._height),b=n?m.__startIndex:m.__drawIndex,S=!n&&m.incremental&&Date.now,T=S&&Date.now(),A=m.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(m.__startIndex===m.__endIndex)m.clear(!1,A,_);else if(b===m.__startIndex){var M=t[b];(!M.incremental||!M.notClear||n)&&m.clear(!1,A,_)}b===-1&&(console.error("For some unknown reason. drawIndex is -1"),b=m.__startIndex);var P,I=function(N){var j={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(P=b;P<m.__endIndex;P++){var z=t[P];if(z.__inHover&&(f=!0),i._doPaintEl(z,m,o,N,j,P===m.__endIndex-1),S){var $=Date.now()-T;if($>15)break}}j.prevElClipPaths&&x.restore()};if(_)if(_.length===0)P=m.__endIndex;else for(var k=d.dpr,O=0;O<_.length;++O){var D=_[O];x.save(),x.beginPath(),x.rect(D.x*k,D.y*k,D.width*k,D.height*k),x.clip(),I(D),x.restore()}else x.save(),I(),x.restore();m.__drawIndex=P,m.__drawIndex<m.__endIndex&&(c=!1)},d=this,v=0;v<a.length;v++)h(v);return nt.wxa&&B(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:c,needsRefreshHover:f}},e.prototype._doPaintEl=function(t,r,n,i,a,o){var s=r.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(kc(s,t,a,o),t.setPrevPaintRect(l))}else kc(s,t,a,o)},e.prototype.getLayer=function(t,r){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ju);var n=this._layers[t];return n||(n=new Y2("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?He(n,this._layerConfig[t],!0):this._layerConfig[t-l_]&&He(n,this._layerConfig[t-l_],!0),r&&(n.virtual=r),this.insertLayer(t,n),n.initContext()),n},e.prototype.insertLayer=function(t,r){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[t]&&rVe(r)){if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},e.prototype.eachLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(r,this._layers[a],a)}},e.prototype.eachBuiltinLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(r,o,a)}},e.prototype.eachOtherLayer=function(t,r){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(r,o,a)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(f,h){f.__dirty=f.__used=!1});function r(f){a&&(a.__endIndex!==f&&(a.__dirty=!0),a.__endIndex=f)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+tVe,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?l_:0),this._needsManuallyCompositing),c.__builtin__||dT("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Si&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,B(this._layers,function(r){r.setUnpainted()})},e.prototype.configLayer=function(t,r){if(r){var n=this._layerConfig;n[t]?He(n[t],r,!0):n[t]=r;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+l_){var o=this._layers[a];He(o,n[t],!0)}}}},e.prototype.delLayer=function(t){var r=this._layers,n=this._zlevelList,i=r[t];i&&(i.dom.parentNode.removeChild(i.dom),delete r[t],n.splice(We(n,t),1))},e.prototype.resize=function(t,r){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),r!=null&&(i.height=r),t=Hh(a,0,i),r=Hh(a,1,i),n.style.display="",this._width!==t||r!==this._height){n.style.width=t+"px",n.style.height=r+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,r);this.refresh(!0)}this._width=t,this._height=r}else{if(t==null||r==null)return;this._width=t,this._height=r,this.getLayer(Ju).resize(t,r)}return this},e.prototype.clearLayer=function(t){var r=this._layers[t];r&&r.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ju].dom;var r=new Y2("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 i=r.dom.width,a=r.dom.height;this.eachLayer(function(f){f.__builtin__?n.drawImage(f.dom,0,0,i,a):f.renderToCanvas&&(n.save(),f.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];kc(n,c,o,l===u-1)}return r.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function aVe(e){e.registerPainter("canvas",iVe)}var oVe=function(e){q(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 Yo(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(r){var n=new Me,i=xr("line",0,r.itemHeight/2,r.itemWidth,0,r.lineStyle.stroke,!1);n.add(i),i.setStyle(r.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=r.itemHeight*.8,u=xr(s,(r.itemWidth-l)/2,(r.itemHeight-l)/2,l,l,r.itemStyle.fill);n.add(u),u.setStyle(r.itemStyle);var c=r.iconRotate==="inherit"?o:r.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([r.itemWidth/2,r.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=K.color.neutral00,u.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},t}(St);function nv(e,t){var r=e.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Jd(e,t,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<r.length;o++)a.push(Jd(e,t,r[o]));return a.join(" ")}}function jte(e,t){var r=e.mapDimensionsAll("defaultedLabel");if(!ae(t))return t+"";for(var n=[],i=0;i<r.length;i++){var a=e.getDimensionIndex(r[i]);a>=0&&n.push(t[a])}return n.join(" ")}var g0=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return o.updateData(r,n,i,a),o}return t.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=xr(r,-1,-1,2,2,null,s);l.attr({z2:be(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=sVe,this._symbolType=r,this.add(l)},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(){Fs(this.childAt(0))},t.prototype.downplay=function(){Vs(this.childAt(0))},t.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},t.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},t.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=t.getSymbolSize(r,n),u=t.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var d=this.childAt(0);d.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?d.attr(v):lt(d,v,s,n),pa(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Nt(d,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,d,v,g,m,x;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,x=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=_.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),v=b.get("disabled"),g=Nr(_),m=b.getShallow("scale"),x=_.getShallow("cursor")}var S=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var T=Mf(r.getItemVisual(n,"symbolOffset"),i);T&&(s.x=T[0],s.y=T[1]),x&&s.attr("cursor",x);var A=r.getItemVisual(n,"style"),M=A.fill;if(s instanceof Xr){var P=s.style;s.useStyle(re({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},A))}else s.__isEmptyBrush?s.useStyle(re({},A)):s.useStyle(A),s.style.decal=null,s.setColor(M,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var I=r.getItemVisual(n,"liftZ"),k=this._z2;I!=null?k==null&&(this._z2=s.z2,s.z2+=I):k!=null&&(s.z2=k,this._z2=null);var O=o&&o.useNameLabel;Ur(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:D,inheritColor:M,defaultOpacity:A.opacity});function D(z){return O?r.getName(z):nv(r,z)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var N=s.ensureState("emphasis");N.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var j=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;N.scaleX=this._sizeX*j,N.scaleY=this._sizeY*j,this.setSymbolScale(1),Wt(this,h,d,v)},t.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},t.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=De(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&iu(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();iu(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},t.getSymbolSize=function(r,n){return Wv(r.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},t}(Me);function sVe(e,t){this.parent.drift(e,t)}function X2(e,t,r,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&e.getItemVisual(r,"symbol")!=="none"}function oG(e){return e!=null&&!Le(e)&&(e={isIgnore:e}),e||{}}function sG(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:Nr(t),cursorStyle:t.get("cursor")}}var m0=function(){function e(t){this.group=new Me,this._SymbolCtor=t||g0}return e.prototype.updateData=function(t,r){this._progressiveEls=null,r=oG(r);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=sG(t),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return t.getItemLayout(f)};a||n.removeAll(),t.diff(a).add(function(f){var h=c(f);if(X2(t,h,f,r)){var d=new o(t,f,l,u);d.setPosition(h),t.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),v=c(f);if(!X2(t,v,f,r)){n.remove(d);return}var g=t.getItemVisual(f,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(t,f,l,u),d.setPosition(v);else{d.updateData(t,f,l,u);var x={x:v[0],y:v[1]};s?d.attr(x):lt(d,x,i)}n.add(d),t.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=sG(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r,n){this._progressiveEls=[],n=oG(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=r.getItemLayout(a);if(X2(r,o,a,n)){var s=new this._SymbolCtor(r,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),r.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(t){xu(this._progressiveEls||this.group,t)},e.prototype.remove=function(t){var r=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){r.remove(i)},n.hostModel)}):r.removeAll()},e}();function Rte(e,t,r){var n=e.getBaseAxis(),i=e.getOtherAxis(n),a=lVe(i,r),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),c=s==="x"||s==="radius"?1:0,f=se(e.dimensions,function(v){return t.mapDimension(v)}),h=!1,d=t.getCalculationInfo("stackResultDimension");return Ws(t,f[0])&&(h=!0,f[0]=d),Ws(t,f[1])&&(h=!0,f[1]=d),{dataDimsForPoint:f,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function lVe(e,t){var r=0,n=e.scale.getExtent();return t==="start"?r=n[0]:t==="end"?r=n[1]:ot(t)&&!isNaN(t)?r=t:n[0]>0?r=n[0]:n[1]<0&&(r=n[1]),r}function Bte(e,t,r,n){var i=NaN;e.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=r.get(e.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function uVe(e,t){var r=[];return t.diff(e).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function cVe(e,t,r,n,i,a,o,s){for(var l=uVe(e,t),u=[],c=[],f=[],h=[],d=[],v=[],g=[],m=Rte(i,t,o),x=e.getLayout("points")||[],_=t.getLayout("points")||[],b=0;b<l.length;b++){var S=l[b],T=!0,A=void 0,M=void 0;switch(S.cmd){case"=":A=S.idx*2,M=S.idx1*2;var P=x[A],I=x[A+1],k=_[M],O=_[M+1];(isNaN(P)||isNaN(I))&&(P=k,I=O),u.push(P,I),c.push(k,O),f.push(r[A],r[A+1]),h.push(n[M],n[M+1]),g.push(t.getRawIndex(S.idx1));break;case"+":var D=S.idx,N=m.dataDimsForPoint,j=i.dataToPoint([t.get(N[0],D),t.get(N[1],D)]);M=D*2,u.push(j[0],j[1]),c.push(_[M],_[M+1]);var z=Bte(m,i,t,D);f.push(z[0],z[1]),h.push(n[M],n[M+1]),g.push(t.getRawIndex(D));break;case"-":T=!1}T&&(d.push(S),v.push(v.length))}v.sort(function(le,fe){return g[le]-g[fe]});for(var $=u.length,U=So($),F=So($),V=So($),W=So($),Y=[],b=0;b<v.length;b++){var Z=v[b],J=b*2,ne=Z*2;U[J]=u[ne],U[J+1]=u[ne+1],F[J]=c[ne],F[J+1]=c[ne+1],V[J]=f[ne],V[J+1]=f[ne+1],W[J]=h[ne],W[J+1]=h[ne+1],Y[b]=d[Z]}return{current:U,next:F,stackedOnCurrent:V,stackedOnNext:W,status:Y}}var ll=Math.min,ul=Math.max;function Fc(e,t){return isNaN(e)||isNaN(t)}function ZI(e,t,r,n,i,a,o,s,l){for(var u,c,f,h,d,v,g=r,m=0;m<n;m++){var x=t[g*2],_=t[g*2+1];if(g>=i||g<0)break;if(Fc(x,_)){if(l){g+=a;continue}break}if(g===r)e[a>0?"moveTo":"lineTo"](x,_),f=x,h=_;else{var b=x-u,S=_-c;if(b*b+S*S<.5){g+=a;continue}if(o>0){for(var T=g+a,A=t[T*2],M=t[T*2+1];A===x&&M===_&&m<n;)m++,T+=a,g+=a,A=t[T*2],M=t[T*2+1],x=t[g*2],_=t[g*2+1],b=x-u,S=_-c;var P=m+1;if(l)for(;Fc(A,M)&&P<n;)P++,T+=a,A=t[T*2],M=t[T*2+1];var I=.5,k=0,O=0,D=void 0,N=void 0;if(P>=n||Fc(A,M))d=x,v=_;else{k=A-u,O=M-c;var j=x-u,z=A-x,$=_-c,U=M-_,F=void 0,V=void 0;if(s==="x"){F=Math.abs(j),V=Math.abs(z);var W=k>0?1:-1;d=x-W*F*o,v=_,D=x+W*V*o,N=_}else if(s==="y"){F=Math.abs($),V=Math.abs(U);var Y=O>0?1:-1;d=x,v=_-Y*F*o,D=x,N=_+Y*V*o}else F=Math.sqrt(j*j+$*$),V=Math.sqrt(z*z+U*U),I=V/(V+F),d=x-k*o*(1-I),v=_-O*o*(1-I),D=x+k*o*I,N=_+O*o*I,D=ll(D,ul(A,x)),N=ll(N,ul(M,_)),D=ul(D,ll(A,x)),N=ul(N,ll(M,_)),k=D-x,O=N-_,d=x-k*F/V,v=_-O*F/V,d=ll(d,ul(u,x)),v=ll(v,ul(c,_)),d=ul(d,ll(u,x)),v=ul(v,ll(c,_)),k=x-d,O=_-v,D=x+k*V/F,N=_+O*V/F}e.bezierCurveTo(f,h,d,v,x,_),f=D,h=N}else e.lineTo(x,_)}u=x,c=_,g+=a}return m}var zte=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),fVe=function(e){q(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:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new zte},t.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Fc(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Fc(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=ZI(r,i,a,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 i=this.path,a=i.data,o=$o.CMD,s,l,u=n==="x",c=[],f=0;f<a.length;){var h=a[f++],d=void 0,v=void 0,g=void 0,m=void 0,x=void 0,_=void 0,b=void 0;switch(h){case o.M:s=a[f++],l=a[f++];break;case o.L:if(d=a[f++],v=a[f++],b=u?(r-s)/(d-s):(r-l)/(v-l),b<=1&&b>=0){var S=u?(v-l)*b+l:(d-s)*b+s;return u?[r,S]:[S,r]}s=d,l=v;break;case o.C:d=a[f++],v=a[f++],g=a[f++],m=a[f++],x=a[f++],_=a[f++];var T=u?ew(s,d,g,x,r,c):ew(l,v,m,_,r,c);if(T>0)for(var A=0;A<T;A++){var M=c[A];if(M<=1&&M>=0){var S=u?$r(l,v,m,_,M):$r(s,d,g,x,M);return u?[r,S]:[S,r]}}s=x,l=_;break}}},t}(rt),hVe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(zte),$te=function(e){q(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 hVe},t.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Fc(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Fc(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=ZI(r,i,o,s,s,1,n.smooth,l,n.connectNulls);ZI(r,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,r.closePath()}},t}(rt);function Fte(e,t,r,n,i){var a=e.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=r.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var f=new Xe({shape:{x:o,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),d=h.isHorizontal(),v=h.inverse;d?(v&&(f.shape.x+=l),f.shape.width=0):(v||(f.shape.y+=u),f.shape.height=0);var g=Ae(i)?function(m){i(m,f)}:null;Nt(f,{shape:{width:l,height:u,x:o,y:s}},r,null,n,g)}return f}function Vte(e,t,r){var n=e.getArea(),i=mr(n.r0,1),a=mr(n.r,1),o=new bn({shape:{cx:mr(e.cx,1),cy:mr(e.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=e.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Nt(o,{shape:{endAngle:n.endAngle,r:a}},r)}return o}function y0(e,t,r,n,i){if(e){if(e.type==="polar")return Vte(e,t,r);if(e.type==="cartesian2d")return Fte(e,t,r,n,i)}else return null;return null}function au(e,t){return e.type===t}function lG(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return;return!0}}function uG(e){for(var t=1/0,r=1/0,n=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(r=Math.min(s,r),i=Math.max(s,i))}return[[t,r],[n,i]]}function cG(e,t){var r=uG(e),n=r[0],i=r[1],a=uG(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function fG(e){return ot(e)?e:e?.5:0}function dVe(e,t,r){if(!r.valueDim)return[];for(var n=t.count(),i=So(n*2),a=0;a<n;a++){var o=Bte(r,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function cl(e,t,r,n,i){var a=r.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],f=[],h=[];if(i){for(l=0;l<e.length;l+=2){var d=t||e;!isNaN(d[l])&&!isNaN(d[l+1])&&h.push(e[l],e[l+1])}e=h}for(l=0;l<e.length-2;l+=2)switch(f[0]=e[l+2],f[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),n){case"end":u[o]=f[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var v=(c[o]+f[o])/2,g=[];u[o]=g[o]=v,u[1-o]=c[1-o],g[1-o]=f[1-o],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[o]=c[o],u[1-o]=f[1-o],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function vVe(e,t){var r=[],n=e.length,i,a;function o(c,f,h){var d=c.coord,v=(h-d)/(f.coord-d),g=lN(v,[c.color,f.color]);return{coord:h,color:g}}for(var s=0;s<n;s++){var l=e[s],u=l.coord;if(u<0)i=l;else if(u>t){a?r.push(o(a,l,t)):i&&r.push(o(i,l,0),o(i,l,t));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function pVe(e,t,r){var n=e.getVisual("visualMeta");if(!(!n||!n.length||!e.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=e.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=t.getAxis(i),u=se(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=vVe(u,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var v=10,g=h[0].coord-v,m=h[d-1].coord+v,x=m-g;if(x<.001)return"transparent";B(h,function(b){b.offset=(b.coord-g)/x}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var _=new Sf(0,0,0,0,h,!0);return _[i]=g,_[i+"2"]=m,_}}}function gVe(e,t,r){var n=e.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&mVe(a,t))){var o=t.mapDimension(a.dim),s={};return B(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function mVe(e,t){var r=e.getExtent(),n=Math.abs(r[1]-r[0])/e.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(g0.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>n)return!1;return!0}function yVe(e,t){return isNaN(e)||isNaN(t)}function xVe(e){for(var t=e.length/2;t>0&&yVe(e[t*2-2],e[t*2-1]);t--);return t-1}function hG(e,t){return[e[t*2],e[t*2+1]]}function _Ve(e,t,r){for(var n=e.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=e[u*2+i],!(isNaN(o)||isNaN(e[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function Gte(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Yn.length;t++)if(e.get([Yn[t],"endLabel","show"]))return!0;return!1}function q2(e,t,r,n){if(au(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=Gte(n)?function(d,v){e._endLabelOnDuring(d,v,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=Fte(t,r,n,function(){var d=e._endLabel;d&&r&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var f=c.shape,h=Math.max(f.width,f.height);u?(f.y-=h,f.height+=h*2):(f.x-=h,f.width+=h*2)}return l&&l(1,c),c}else return Vte(t,r,n)}function bVe(e,t){var r=t.getBaseAxis(),n=r.isHorizontal(),i=r.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||a,verticalAlign:e.get("verticalAlign")||o}}}var wVe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var r=new Me,n=new m0;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=r,this._changePolyState=ge(this._changePolyState,this)},t.prototype.render=function(r,n,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=r.getModel("lineStyle"),u=r.getModel("areaStyle"),c=s.getLayout("points")||[],f=a.type==="polar",h=this._coordSys,d=this._symbolDraw,v=this._polyline,g=this._polygon,m=this._lineGroup,x=!n.ssr&&r.get("animation"),_=!u.isEmpty(),b=u.get("origin"),S=Rte(a,s,b),T=_&&dVe(a,s,S),A=r.get("showSymbol"),M=r.get("connectNulls"),P=A&&!f&&gVe(r,s,a),I=this._data;I&&I.eachItemGraphicEl(function(le,fe){le.__temp&&(o.remove(le),I.setItemGraphicEl(fe,null))}),A||d.remove(),o.add(m);var k=f?!1:r.get("step"),O;a&&a.getArea&&r.get("clip",!0)&&(O=a.getArea(),O.width!=null?(O.x-=.1,O.y-=.1,O.width+=.2,O.height+=.2):O.r0&&(O.r0-=.5,O.r+=.5)),this._clipShapeForSymbol=O;var D=pVe(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(v&&h.type===a.type&&k===this._step))A&&d.updateData(s,{isIgnore:P,clipShape:O,disableAnimation:!0,getSymbolPoint:function(le){return[c[le*2],c[le*2+1]]}}),x&&this._initSymbolLabelAnimation(s,a,O),k&&(T&&(T=cl(T,c,a,k,M)),c=cl(c,null,a,k,M)),v=this._newPolyline(c),_?g=this._newPolygon(c,T):g&&(m.remove(g),g=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,uf(D)),m.setClipPath(q2(this,a,!0,r));else{_&&!g?g=this._newPolygon(c,T):g&&!_&&(m.remove(g),g=this._polygon=null),f||this._initOrUpdateEndLabel(r,a,uf(D));var N=m.getClipPath();if(N){var j=q2(this,a,!1,r);Nt(N,{shape:j.shape},r)}else m.setClipPath(q2(this,a,!0,r));A&&d.updateData(s,{isIgnore:P,clipShape:O,disableAnimation:!0,getSymbolPoint:function(le){return[c[le*2],c[le*2+1]]}}),(!lG(this._stackedOnPoints,T)||!lG(this._points,c))&&(x?this._doUpdateAnimation(s,T,a,i,k,b,M):(k&&(T&&(T=cl(T,c,a,k,M)),c=cl(c,null,a,k,M)),v.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:T})))}var z=r.getModel("emphasis"),$=z.get("focus"),U=z.get("blurScope"),F=z.get("disabled");if(v.useStyle(Pe(l.getLineStyle(),{fill:"none",stroke:D,lineJoin:"bevel"})),Dr(v,r,"lineStyle"),v.style.lineWidth>0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var V=v.getState("emphasis").style;V.lineWidth=+v.style.lineWidth+1}De(v).seriesIndex=r.seriesIndex,Wt(v,$,U,F);var W=fG(r.get("smooth")),Y=r.get("smoothMonotone");if(v.setShape({smooth:W,smoothMonotone:Y,connectNulls:M}),g){var Z=s.getCalculationInfo("stackedOnSeries"),J=0;g.useStyle(Pe(u.getAreaStyle(),{fill:D,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),Z&&(J=fG(Z.get("smooth"))),g.setShape({smooth:W,stackedOnSmooth:J,smoothMonotone:Y,connectNulls:M}),Dr(g,r,"areaStyle"),De(g).seriesIndex=r.seriesIndex,Wt(g,$,U,F)}var ne=this._changePolyState;s.eachItemGraphicEl(function(le){le&&(le.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=s,this._coordSys=a,this._stackedOnPoints=T,this._points=c,this._step=k,this._valueOrigin=b,r.get("triggerLineEvent")&&(this.packEventData(r,v),g&&this.packEventData(r,g))},t.prototype.packEventData=function(r,n){De(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},t.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=nf(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,d=r.get("z")||0;u=new g0(o,s),u.x=c,u.y=f,u.setZ(h,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=h,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else _t.prototype.highlight.call(this,r,n,i,a)},t.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=nf(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else _t.prototype.downplay.call(this,r,n,i,a)},t.prototype._changePolyState=function(r){var n=this._polygon;fw(this._polyline,r),n&&fw(n,r)},t.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new fVe({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new $te({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");Ae(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=Ae(f)?f(null):f;r.eachItemGraphicEl(function(d,v){var g=d;if(g){var m=[d.x,d.y],x=void 0,_=void 0,b=void 0;if(i)if(o){var S=i,T=n.pointToCoord(m);a?(x=S.startAngle,_=S.endAngle,b=-T[1]/180*Math.PI):(x=S.r0,_=S.r,b=T[0])}else{var A=i;a?(x=A.x,_=A.x+A.width,b=d.x):(x=A.y+A.height,_=A.y,b=d.y)}var M=_===x?0:(b-x)/(_-x);l&&(M=1-M);var P=Ae(f)?f(v):c*M+h,I=g.getSymbolPath(),k=I.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:P}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:P}),I.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(Gte(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new at({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=xVe(l);c>=0&&(Ur(s,Nr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?jte(o,d):nv(o,f)},enableTextSetter:!0},bVe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),v=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),x=m.isHorizontal(),_=m.inverse,b=n.shape,S=_?x?b.x:b.y+b.height:x?b.x+b.width:b.y,T=(x?g:0)*(_?-1:1),A=(x?0:-g)*(_?-1:1),M=x?"x":"y",P=_Ve(f,S,M),I=P.range,k=I[1]-I[0],O=void 0;if(k>=1){if(k>1&&!d){var D=hG(f,I[0]);u.attr({x:D[0]+T,y:D[1]+A}),o&&(O=h.getRawValue(I[0]))}else{var D=c.getPointOn(S,M);D&&u.attr({x:D[0]+T,y:D[1]+A});var N=h.getRawValue(I[0]),j=h.getRawValue(I[1]);o&&(O=vQ(i,v,N,j,P.t))}a.lastFrameIndex=I[0]}else{var z=r===1||a.lastFrameIndex>0?I[0]:0,D=hG(f,z);o&&(O=h.getRawValue(z)),u.attr({x:D[0]+T,y:D[1]+A})}if(o){var $=Bv(u);typeof $.setLabelText=="function"&&$.setLabelText(O)}}},t.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=cVe(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,v=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(v=cl(h.stackedOnCurrent,h.current,i,o,l),d=cl(h.current,null,i,o,l),m=cl(h.stackedOnNext,h.next,i,o,l),g=cl(h.next,null,i,o,l)),cG(d,g)>3e3||c&&cG(v,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=d;var x={shape:{points:g}};h.current!==d&&(x.shape.__points=h.next),u.stopAnimation(),lt(u,x,f),c&&(c.setShape({points:d,stackedOnPoints:v}),c.stopAnimation(),lt(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],b=h.status,S=0;S<b.length;S++){var T=b[S].cmd;if(T==="="){var A=r.getItemGraphicEl(b[S].idx1);A&&_.push({el:A,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var M=u.shape.__points,P=0;P<_.length;P++){var I=_[P].el,k=_[P].ptIdx*2;I.x=M[k],I.y=M[k+1],I.markRedraw()}})},t.prototype.remove=function(r){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(_t);function x0(e,t){return{seriesType:e,plan:Vv(),reset:function(r){var n=r.getData(),i=r.coordinateSystem,a=r.pipelineContext,o=t||a.large;if(i){var s=se(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Ws(n,s[0])&&(s[0]=u),Ws(n,s[1])&&(s[1]=u);var c=n.getStore(),f=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(d,v){for(var g=d.end-d.start,m=o&&So(g*l),x=[],_=[],b=d.start,S=0;b<d.end;b++){var T=void 0;if(l===1){var A=c.get(f,b);T=i.dataToPoint(A,null,_)}else x[0]=c.get(f,b),x[1]=c.get(h,b),T=i.dataToPoint(x,null,_);o?(m[S++]=T[0],m[S++]=T[1]):v.setItemLayout(b,T.slice())}o&&v.setLayout("points",m)}}}}}}var SVe={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]}},TVe=function(e){return Math.round(e.length/2)};function Wte(e){return{seriesType:e,reset:function(t,r,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var v=void 0;pe(a)?v=SVe[a]:Ae(a)&&(v=a),v&&t.setData(i.downSample(i.mapDimension(u.dim),1/d,v,TVe))}}}}}function AVe(e){e.registerChartView(wVe),e.registerSeriesModel(oVe),e.registerLayout(x0("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,Wte("line"))}var Ly=function(e){q(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 Yo(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)B(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var v=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[d],x=n[d]==="x1"||n[d]==="y1";if(x&&!g&&(m+=1),v.length<2)return;if(v.length===2){s[d]=h.toGlobalCoord(h.getExtent()[x?1:0]);return}for(var _=void 0,b=void 0,S=1,T=0;T<v.length;T++){var A=v[T].coord,M=T===v.length-1?v[T-1].tickValue+S:v[T].tickValue;if(M===m){b=A;break}else if(M<m)_=A;else if(_!=null&&M>m){b=(A+_)/2;break}T===1&&(S=M-v[0].tickValue)}b==null&&(_?_&&(b=v[v.length-1].coord):b=v[0].coord),s[d]=h.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},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}(St);St.registerClass(Ly);var CVe=function(e){q(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 Yo(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},t.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=_u(Ly.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:K.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Ly),MVe=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}(),Dw=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new MVe},t.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,v=h?f-c<d:c-f<d;v||(c=f-(h?d:-d));var g=Math.cos(c),m=Math.sin(c),x=Math.cos(f),_=Math.sin(f);v?(r.moveTo(g*o+i,m*o+a),r.arc(g*u+i,m*u+a,l,-Math.PI+c,c,!h)):r.moveTo(g*s+i,m*s+a),r.arc(i,a,s,c,f,!h),r.arc(x*u+i,_*u+a,l,f-Math.PI*2,f-Math.PI,!h),o!==0&&r.arc(i,a,o,f,c,h)},t}(rt);function PVe(e,t){t=t||{};var r=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return ow(n,i,a);var s=e(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,f=u.cy,h=u.r,d=u.r0,v=(h+d)/2,g=u.startAngle,m=u.endAngle,x=(g+m)/2,_=r?Math.abs(h-d)/2:0,b=Math.cos,S=Math.sin,T=c+h*b(g),A=f+h*S(g),M="left",P="top";switch(s){case"startArc":T=c+(d-l)*b(x),A=f+(d-l)*S(x),M="center",P="top";break;case"insideStartArc":T=c+(d+l)*b(x),A=f+(d+l)*S(x),M="center",P="bottom";break;case"startAngle":T=c+v*b(g)+u_(g,l+_,!1),A=f+v*S(g)+c_(g,l+_,!1),M="right",P="middle";break;case"insideStartAngle":T=c+v*b(g)+u_(g,-l+_,!1),A=f+v*S(g)+c_(g,-l+_,!1),M="left",P="middle";break;case"middle":T=c+v*b(x),A=f+v*S(x),M="center",P="middle";break;case"endArc":T=c+(h+l)*b(x),A=f+(h+l)*S(x),M="center",P="bottom";break;case"insideEndArc":T=c+(h-l)*b(x),A=f+(h-l)*S(x),M="center",P="top";break;case"endAngle":T=c+v*b(m)+u_(m,l+_,!0),A=f+v*S(m)+c_(m,l+_,!0),M="left",P="middle";break;case"insideEndAngle":T=c+v*b(m)+u_(m,-l+_,!0),A=f+v*S(m)+c_(m,-l+_,!0),M="right",P="middle";break;default:return ow(n,i,a)}return n=n||{},n.x=T,n.y=A,n.align=M,n.verticalAlign=P,n}}function LVe(e,t,r,n){if(ot(n)){e.setTextConfig({rotation:n});return}else if(ae(t)){e.setTextConfig({rotation:0});return}var i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=r(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:e.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),e.setTextConfig({rotation:c})}function u_(e,t,r){return t*Math.sin(e)*(r?-1:1)}function c_(e,t,r){return t*Math.cos(e)*(r?1:-1)}function Ao(e,t,r){var n=e.get("borderRadius");if(n==null)return r?{cornerRadius:0}:null;ae(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:se(n,function(a){return Za(a,i)})}}var K2=Math.max,Q2=Math.min;function kVe(e,t){var r=e.getArea&&e.getArea();if(au(e,"cartesian2d")){var n=e.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(r.x-=i,r.width+=i*2):(r.y-=i,r.height+=i*2)}}return r}var IVe=function(e){q(t,e);function t(){var r=e.call(this)||this;return r.type=t.type,r._isFirstFrame=!0,r}return t.prototype.render=function(r,n,i,a){this._model=r,this._removeOnRenderedListener(i),this._updateDrawMode(r);var o=r.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(r,n,i):this._renderNormal(r,n,i,a))},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){xu(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,i,a){var o=this.group,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.getBaseAxis(),f;u.type==="cartesian2d"?f=c.isHorizontal():u.type==="polar"&&(f=c.dim==="angle");var h=r.isAnimationEnabled()?r:null,d=OVe(r,u);d&&this._enableRealtimeSort(d,s,i);var v=r.get("clip",!0)||d,g=kVe(u,s);o.removeClipPath();var m=r.get("roundCap",!0),x=r.get("showBackground",!0),_=r.getModel("backgroundStyle"),b=_.get("borderRadius")||0,S=[],T=this._backgroundEls,A=a&&a.isInitSort,M=a&&a.type==="changeAxisOrder";function P(O){var D=f_[u.type](s,O);if(!D)return null;var N=zVe(u,f,D);return N.useStyle(_.getItemStyle()),u.type==="cartesian2d"?N.setShape("r",b):N.setShape("cornerRadius",b),S[O]=N,N}s.diff(l).add(function(O){var D=s.getItemModel(O),N=f_[u.type](s,O,D);if(N&&(x&&P(O),!(!s.hasValue(O)||!mG[u.type](N)))){var j=!1;v&&(j=dG[u.type](g,N));var z=vG[u.type](r,s,O,N,f,h,c.model,!1,m);d&&(z.forceLabelAnimation=!0),yG(z,s,O,D,N,r,f,u.type==="polar"),A?z.attr({shape:N}):d?pG(d,h,z,N,O,f,!1,!1):Nt(z,{shape:N},r,O),s.setItemGraphicEl(O,z),o.add(z),z.ignore=j}}).update(function(O,D){var N=s.getItemModel(O),j=f_[u.type](s,O,N);if(j){if(x){var z=void 0;T.length===0?z=P(D):(z=T[D],z.useStyle(_.getItemStyle()),u.type==="cartesian2d"?z.setShape("r",b):z.setShape("cornerRadius",b),S[O]=z);var $=f_[u.type](s,O),U=Ute(f,$,u);lt(z,{shape:U},h,O)}var F=l.getItemGraphicEl(D);if(!s.hasValue(O)||!mG[u.type](j)){o.remove(F);return}var V=!1;v&&(V=dG[u.type](g,j),V&&o.remove(F));var W=F&&(F.type==="sector"&&m||F.type==="sausage"&&!m);if(W&&(F&&Cs(F,r,D),F=null),F?pa(F):F=vG[u.type](r,s,O,j,f,h,c.model,!0,m),d&&(F.forceLabelAnimation=!0),M){var Y=F.getTextContent();if(Y){var Z=Bv(Y);Z.prevValue!=null&&(Z.prevValue=Z.value)}}else yG(F,s,O,N,j,r,f,u.type==="polar");A?F.attr({shape:j}):d?pG(d,h,F,j,O,f,!0,M):lt(F,{shape:j},r,O,null),s.setItemGraphicEl(O,F),F.ignore=V,o.add(F)}}).remove(function(O){var D=l.getItemGraphicEl(O);D&&Cs(D,r,O)}).execute();var I=this._backgroundGroup||(this._backgroundGroup=new Me);I.removeAll();for(var k=0;k<S.length;++k)I.add(S[k]);o.add(I),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(r,n,i){this._clear(),_G(r,this.group),this._updateLargeClip(r)},t.prototype._incrementalRenderLarge=function(r,n){this._removeBackground(),_G(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(r){var n=r.get("clip",!0)&&y0(r.coordinateSystem,!1,r),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(r,n,i){var a=this;if(n.count()){var o=r.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,r,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(r,n,i){var a=[];return r.each(r.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:se(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(r,n,i){for(var a=i.scale,o=r.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=r.rawIndexOf(o,a.getRawOrdinalNumber(l)),f=c<0?Number.MIN_VALUE:n(r.indexOfRawIndex(c));if(f>s)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},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,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Cs(a,r,De(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(_t),dG={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 i=e.x+e.width,a=e.y+e.height,o=K2(t.x,e.x),s=Q2(t.x+t.width,i),l=K2(t.y,e.y),u=Q2(t.y+t.height,a),c=s<o,f=u<l;return t.x=c&&o>i?s:o,t.y=f&&l>a?u:l,t.width=c?0:s-o,t.height=f?0:u-l,r<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),c||f},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 i=Q2(t.r,e.r),a=K2(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(r<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},vG={cartesian2d:function(e,t,r,n,i,a,o,s,l){var u=new Xe({shape:re({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(e,t,r,n,i,a,o,s,l){var u=!i&&l?Dw:bn,c=new u({shape:n,z2:1});c.name="item";var f=Hte(i);if(c.calculateTextPosition=PVe(f,{isRoundCap:u===Dw}),a){var h=c.shape,d=i?"r":"endAngle",v={};h[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?lt:Nt)(c,{shape:v},a)}return c}};function OVe(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 pG(e,t,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?lt:Nt)(r,{shape:l},t,i,null);var c=t?e.baseAxis.model:null;(o?lt:Nt)(r,{shape:u},c,i)}function gG(e,t){for(var r=0;r<t.length;r++)if(!isFinite(e[t[r]]))return!0;return!1}var EVe=["x","y","width","height"],DVe=["cx","cy","r","startAngle","endAngle"],mG={cartesian2d:function(e){return!gG(e,EVe)},polar:function(e){return!gG(e,DVe)}},f_={cartesian2d:function(e,t,r){var n=e.getItemLayout(t);if(!n)return null;var i=r?jVe(r,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(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 NVe(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Hte(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 yG(e,t,r,n,i,a,o,s){var l=t.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=e.shape,f=Ao(n.getModel("itemStyle"),c,!0);re(c,f),e.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var h=n.getShallow("cursor");h&&e.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Nr(n);Ur(e,v,{labelFetcher:a,labelDataIndex:r,defaultText:nv(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=e.getTextContent();if(s&&g){var m=n.get(["label","position"]);e.textConfig.inside=m==="middle"?!0:null,LVe(e,m==="outside"?d:m,Hte(o),n.get(["label","rotate"]))}tJ(g,v,a.getRawValue(r),function(_){return jte(t,_)});var x=n.getModel(["emphasis"]);Wt(e,x.get("focus"),x.get("blurScope"),x.get("disabled")),Dr(e,n),NVe(i)&&(e.style.fill="none",e.style.stroke="none",B(e.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function jVe(e,t){var r=e.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var RVe=function(){function e(){}return e}(),xG=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new RVe},t.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],r.rect(s[0],s[1],l[0],l[1])},t}(rt);function _G(e,t,r,n){var i=e.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new xG({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),r&&r.push(c)}var f=new xG({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual("style")),f.style.stroke=null,De(f).seriesIndex=e.seriesIndex,e.get("silent")||(f.on("mousedown",bG),f.on("mousemove",bG)),r&&r.push(f)}var bG=RT(function(e){var t=this,r=BVe(t,e.offsetX,e.offsetY);De(t).dataIndex=r>=0?r:null},30,!1);function BVe(e,t,r){for(var n=e.baseDimIdx,i=1-n,a=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=a.length/3;c<f;c++){var h=c*3;if(l[n]=u,l[i]=a[h+2],s[n]=a[h+n],s[i]=a[h+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function Ute(e,t,r){if(au(r,"cartesian2d")){var n=t,i=r.getArea();return{x:e?n.x:i.x,y:e?i.y:n.y,width:e?n.width:i.width,height:e?i.height:n.height}}else{var i=r.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function zVe(e,t,r){var n=e.type==="polar"?bn:Xe;return new n({shape:Ute(t,r,e),silent:!0,z2:0})}function $Ve(e){e.registerChartView(IVe),e.registerSeriesModel(CVe),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Fe(Xee,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,qee("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Wte("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,r){var n=t.componentType||"series";r.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var wG=Math.PI*2,h_=Math.PI/180;function FVe(e,t,r){t.eachSeriesByType(e,function(n){var i=n.getData(),a=i.mapDimension("value"),o=xJ(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*h_,d=n.get("endAngle"),v=n.get("padAngle")*h_;d=d==="auto"?h-wG:-d*h_;var g=n.get("minAngle")*h_,m=g+v,x=0;i.each(a,function(U){!isNaN(U)&&x++});var _=i.getSum(a),b=Math.PI/(_||x)*2,S=n.get("clockwise"),T=n.get("roseType"),A=n.get("stillShowZeroSum"),M=i.getDataExtent(a);M[0]=0;var P=S?1:-1,I=[h,d],k=P*v/2;CT(I,!S),h=I[0],d=I[1];var O=Zte(n);O.startAngle=h,O.endAngle=d,O.clockwise=S,O.cx=s,O.cy=l,O.r=u,O.r0=c;var D=Math.abs(d-h),N=D,j=0,z=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(U,F){var V;if(isNaN(U)){i.setItemLayout(F,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:c,r:T?NaN:u});return}T!=="area"?V=_===0&&A?b:U*b:V=D/x,V<m?(V=m,N-=m):j+=U;var W=z+P*V,Y=0,Z=0;v>V?(Y=z+P*V/2,Z=Y):(Y=z+k,Z=W-k),i.setItemLayout(F,{angle:V,startAngle:Y,endAngle:Z,clockwise:S,cx:s,cy:l,r0:c,r:T?gt(U,M,[c,u]):u}),z=W}),N<wG&&x)if(N<=.001){var $=D/x;i.each(a,function(U,F){if(!isNaN(U)){var V=i.getItemLayout(F);V.angle=$;var W=0,Y=0;$<v?(W=h+P*(F+1/2)*$,Y=W):(W=h+P*F*$+k,Y=h+P*(F+1)*$-k),V.startAngle=W,V.endAngle=Y}})}else b=N/j,z=h,i.each(a,function(U,F){if(!isNaN(U)){var V=i.getItemLayout(F),W=V.angle===m?m:U*b,Y=0,Z=0;W<v?(Y=z+P*W/2,Z=Y):(Y=z+k,Z=z+P*W-k),V.startAngle=Y,V.endAngle=Z,z+=P*W}})})}var Zte=Je();function Yv(e){return{seriesType:e,reset:function(t,r){var n=r.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var VVe=Math.PI/180;function SG(e,t,r,n,i,a,o,s,l,u){if(e.length<2)return;function c(g){for(var m=g.rB,x=m*m,_=0;_<g.list.length;_++){var b=g.list[_],S=Math.abs(b.label.y-r),T=n+b.len,A=T*T,M=Math.sqrt(Math.abs((1-S*S/x)*A)),P=t+(M+b.len2)*i,I=P-b.label.x,k=b.targetTextWidth-I*i;Yte(b,k,!0),b.label.x=P}}function f(g){for(var m={list:[],maxY:0},x={list:[],maxY:0},_=0;_<g.length;_++)if(g[_].labelAlignTo==="none"){var b=g[_],S=b.label.y>r?x:m,T=Math.abs(b.label.y-r);if(T>=S.maxY){var A=b.label.x-t-b.len2*i,M=n+b.len,P=Math.abs(A)<M?Math.sqrt(T*T/(1-A*A/M/M)):M;S.rB=P,S.maxY=T}S.list.push(b)}c(m),c(x)}for(var h=e.length,d=0;d<h;d++)if(e[d].position==="outer"&&e[d].labelAlignTo==="labelLine"){var v=e[d].label.x-u;e[d].linePoints[1][0]+=v,e[d].label.x=u}GI(e,1,l,l+o)&&f(e)}function GVe(e,t,r,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0;h<e.length;h++){var d=e[h].label;J2(e[h])||(d.x<t?(c=Math.min(c,d.x),l.push(e[h])):(f=Math.max(f,d.x),u.push(e[h])))}for(var h=0;h<e.length;h++){var v=e[h];if(!J2(v)&&v.linePoints){if(v.labelStyleWidth!=null)continue;var d=v.label,g=v.linePoints,m=void 0;v.labelAlignTo==="edge"?d.x<t?m=g[2][0]-v.labelDistance-o-v.edgeDistance:m=o+i-v.edgeDistance-g[2][0]-v.labelDistance:v.labelAlignTo==="labelLine"?d.x<t?m=c-o-v.bleedMargin:m=o+i-f-v.bleedMargin:d.x<t?m=d.x-o-v.bleedMargin:m=o+i-d.x-v.bleedMargin,v.targetTextWidth=m,Yte(v,m,!1)}}SG(u,t,r,n,1,i,a,o,s,f),SG(l,t,r,n,-1,i,a,o,s,c);for(var h=0;h<e.length;h++){var v=e[h];if(!J2(v)&&v.linePoints){var d=v.label,g=v.linePoints,x=v.labelAlignTo==="edge",_=d.style.padding,b=_?_[1]+_[3]:0,S=d.style.backgroundColor?0:b,T=v.rect.width+S,A=g[1][0]-g[2][0];x?d.x<t?g[2][0]=o+v.edgeDistance+T+v.labelDistance:g[2][0]=o+i-v.edgeDistance-T-v.labelDistance:(d.x<t?g[2][0]=d.x+v.labelDistance:g[2][0]=d.x-v.labelDistance,g[1][0]=g[2][0]+A),g[1][1]=g[2][1]=d.y}}}function Yte(e,t,r){if(e.labelStyleWidth==null){var n=e.label,i=n.style,a=e.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(t<c||r){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var h=t-l,d=t<c?h:r?h>e.unconstrainedWidth?null:h:null;n.setStyle("width",d)}Xte(a,n)}}}function Xte(e,t){TG.rect=e,xte(TG,t,WVe)}var WVe={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},TG={};function J2(e){return e.position==="center"}function HVe(e){var t=e.getData(),r=[],n,i,a=!1,o=(e.get("minShowLabelAngle")||0)*VVe,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(A){A.ignore=!0}function v(A){if(!A.ignore)return!0;for(var M in A.states)if(A.states[M].ignore===!1)return!0;return!1}t.each(function(A){var M=t.getItemGraphicEl(A),P=M.shape,I=M.getTextContent(),k=M.getTextGuideLine(),O=t.getItemModel(A),D=O.getModel("label"),N=D.get("position")||O.get(["emphasis","label","position"]),j=D.get("distanceToLabelLine"),z=D.get("alignTo"),$=ve(D.get("edgeDistance"),u),U=D.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var F=O.getModel("labelLine"),V=F.get("length");V=ve(V,u);var W=F.get("length2");if(W=ve(W,u),Math.abs(P.endAngle-P.startAngle)<o){B(I.states,d),I.ignore=!0,k&&(B(k.states,d),k.ignore=!0);return}if(v(I)){var Y=(P.startAngle+P.endAngle)/2,Z=Math.cos(Y),J=Math.sin(Y),ne,le,fe,ze;n=P.cx,i=P.cy;var xe=N==="inside"||N==="inner";if(N==="center")ne=P.cx,le=P.cy,ze="center";else{var ie=(xe?(P.r+P.r0)/2*Z:P.r*Z)+n,he=(xe?(P.r+P.r0)/2*J:P.r*J)+i;if(ne=ie+Z*3,le=he+J*3,!xe){var ue=ie+Z*(V+l-P.r),ee=he+J*(V+l-P.r),Ve=ue+(Z<0?-1:1)*W,Se=ee;z==="edge"?ne=Z<0?c+$:c+u-$:ne=Ve+(Z<0?-j:j),le=Se,fe=[[ie,he],[ue,ee],[Ve,Se]]}ze=xe?"center":z==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var Ge=Math.PI,Ye=0,vt=D.get("rotate");if(ot(vt))Ye=vt*(Ge/180);else if(N==="center")Ye=0;else if(vt==="radial"||vt===!0){var Vt=Z<0?-Y+Ge:-Y;Ye=Vt}else if(vt==="tangential"&&N!=="outside"&&N!=="outer"){var nr=Math.atan2(Z,J);nr<0&&(nr=Ge*2+nr);var jn=J>0;jn&&(nr=Ge+nr),Ye=nr-Ge}if(a=!!Ye,I.x=ne,I.y=le,I.rotation=Ye,I.setStyle({verticalAlign:"middle"}),xe){I.setStyle({align:ze});var Jn=I.states.select;Jn&&(Jn.x+=I.x,Jn.y+=I.y)}else{var qr=new Oe(0,0,0,0);Xte(qr,I),r.push({label:I,labelLine:k,position:N,len:V,len2:W,minTurnAngle:F.get("minTurnAngle"),maxSurfaceAngle:F.get("maxSurfaceAngle"),surfaceNormal:new Ie(Z,J),linePoints:fe,textAlign:ze,labelDistance:j,labelAlignTo:z,edgeDistance:$,bleedMargin:U,rect:qr,unconstrainedWidth:qr.width,labelStyleWidth:I.style.width})}M.setTextConfig({inside:xe})}}),!a&&e.get("avoidLabelOverlap")&&GVe(r,n,i,l,u,h,c,f);for(var g=0;g<r.length;g++){var m=r[g],x=m.label,_=m.labelLine,b=isNaN(x.x)||isNaN(x.y);if(x){x.setStyle({align:m.textAlign}),b&&(B(x.states,d),x.ignore=!0);var S=x.states.select;S&&(S.x+=x.x,S.y+=x.y)}if(_){var T=m.linePoints;b||!T?(B(_.states,d),_.ignore=!0):(gte(T,m.minTurnAngle),fFe(T,m.surfaceNormal,m.maxSurfaceAngle),_.setShape({points:T}),x.__hostTarget.textGuideLineConfig={anchor:new Ie(T[0][0],T[0][1])})}}}var UVe=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;a.z2=2;var o=new at;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.hostModel,l=r.getItemModel(n),u=l.getModel("emphasis"),c=r.getItemLayout(n),f=re(Ao(l.getModel("itemStyle"),c,!0),c);if(isNaN(f.startAngle)){o.setShape(f);return}if(a){o.setShape(f);var h=s.getShallow("animationType");s.ecModel.ssr?(Nt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=f.cx,o.originY=f.cy):h==="scale"?(o.shape.r=c.r0,Nt(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Nt(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,lt(o,{shape:{endAngle:c.endAngle}},s,n))}else pa(o),lt(o,{shape:f},s,n);o.useStyle(r.getItemVisual(n,"style")),Dr(o,l);var d=(c.startAngle+c.endAngle)/2,v=s.get("selectedOffset"),g=Math.cos(d)*v,m=Math.sin(d)*v,x=l.getShallow("cursor");x&&o.attr("cursor",x),this._updateLabel(s,r,n),o.ensureState("emphasis").shape=re({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Ao(u.getModel("itemStyle"),c)),re(o.ensureState("select"),{x:g,y:m,shape:Ao(l.getModel(["select","itemStyle"]),c)}),re(o.ensureState("blur"),{shape:Ao(l.getModel(["blur","itemStyle"]),c)});var _=o.getTextGuideLine(),b=o.getTextContent();_&&re(_.ensureState("select"),{x:g,y:m}),re(b.ensureState("select"),{x:g,y:m}),Wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;Ur(a,Nr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:r.getFormattedLabel(i,"normal")||n.getName(i)});var f=a.getTextContent();a.setTextConfig({position:null,rotation:null}),f.attr({z2:10});var h=o.get(["label","position"]);if(h!=="outside"&&h!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new on,this.setTextGuideLine(d)),wj(this,Sj(o),{stroke:u,opacity:fi(s.get(["lineStyle","opacity"]),c,1)})}},t}(bn),ZVe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i,a){var o=r.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f<o.count();++f)c=o.getItemLayout(f);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&r.get("showEmptyCircle")){var h=Zte(r),d=new bn({shape:Ce(h)});d.useStyle(r.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(v){var g=new UVe(o,v,u);o.setItemGraphicEl(v,g),l.add(g)}).update(function(v,g){var m=s.getItemGraphicEl(g);m.updateData(o,v,u),m.off("click"),l.add(m),o.setItemGraphicEl(v,m)}).remove(function(v){var g=s.getItemGraphicEl(v);Cs(g,r,v)}).execute(),HVe(r),r.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(_t);function Xv(e,t,r){t=ae(t)&&{coordDimensions:t}||re({encodeDefine:e.getEncode()},t);var n=e.getSource(),i=Hv(n,t).dimensions,a=new Dn(i,e);return a.initData(n,r),a}var qv=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}(),YVe=Je(),qte=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qv(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Xv(this,{coordDimensions:["value"],encodeDefaulter:Fe(qN,this)})},t.prototype.getDataParams=function(r){var n=this.getData(),i=YVe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=iQ(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(r){rf(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.type="series.pie",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}(St);FBe({fullType:qte.type,getCoord2:function(e){return e.getShallow("center")}});function XVe(e){return{seriesType:e,reset:function(t,r){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(ot(o)&&!isNaN(o)&&o<0)})}}}function qVe(e){e.registerChartView(ZVe),e.registerSeriesModel(qte),cee("pie",e.registerAction),e.registerLayout(Fe(FVe,"pie")),e.registerProcessor(Yv("pie")),e.registerProcessor(XVe("pie"))}var KVe=function(e){q(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 Yo(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,i){return i.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:K.color.primary}},universalTransition:{divideShape:"clone"}},t}(St),Kte=4,QVe=function(){function e(){}return e}(),JVe=function(e){q(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 QVe},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]<Kte,c=this.softClipShape,f;if(u){this._ctx=l;return}for(this._ctx=null,f=this._off;f<i.length;){var h=i[f++],d=i[f++];isNaN(h)||isNaN(d)||c&&!c.contain(h,d)||(s.x=h-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(r,s,!0))}this.incremental&&(this._off=f,this.notClear=!0)},t.prototype.afterBrush=function(){var r=this.shape,n=r.points,i=r.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(r,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.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,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h<i.length;){var d=i[h++],v=i[h++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(v,u),f=Math.max(v,f)}r=this._rect=new Oe(l-o/2,u-s/2,c-l+o,f-u+s)}return r},t}(rt),e6e=function(){function e(){this.group=new Me}return e.prototype.updateData=function(t,r){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,r)},e.prototype.updateLayout=function(t){var r=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;r=new Float32Array(r.buffer,a,i)}n.setShape("points",r),n.reset()})},e.prototype.incrementalPrepareUpdate=function(t){this._clear()},e.prototype.incrementalUpdate=function(t,r,n){var i=this._newAdded[0],a=r.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,r,n)}},e.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},e.prototype._create=function(){var t=new JVe({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;n=n||{};var a=r.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=xr(r.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Kte;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=r.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=De(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(c){u.dataIndex=null;var f=t.hoverDataIdx;f>=0&&(u.dataIndex=f+(t.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),t6e=function(e){q(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,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},t.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=x0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},t.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new e6e:new m0,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(_t),Qte={left:0,right:0,top:0,bottom:0},Nw=["25%","25%"],r6e=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(r,n){var i=Af(r.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Fo(r.outerBounds,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Fo(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:Qte,outerBoundsContain:"all",outerBoundsClampWidth:Nw[0],outerBoundsClampHeight:Nw[1],backgroundColor:K.color.transparent,borderWidth:1,borderColor:K.color.neutral30},t}(Qe),YI=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",tr).models[0]},t.type="cartesian2dAxis",t}(Qe);fr(YI,Zv);var Jte={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:K.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:K.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:K.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[K.color.backgroundTint,K.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:K.color.neutral00,borderColor:K.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},n6e=He({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Jte),kj=He({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:K.color.axisMinorSplitLine,width:1}}},Jte),i6e=He({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},kj),a6e=Pe({logBase:10},kj);const ere={category:n6e,value:kj,time:i6e,log:a6e};var o6e={value:1,category:1,time:1,log:1},XI=null;function s6e(e){XI||(XI=e)}function _0(){return XI}function iv(e,t,r,n){B(o6e,function(i,a){var o=He(He({},ere[a],!0),n,!0),s=function(l){q(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=xy(this),d=h?Af(c):{},v=f.getTheme();He(c,v.get(a+"Axis")),He(c,this.getDefaultOption()),c.type=AG(c),h&&Fo(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=Ay.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=_0();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(r);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",AG)}function AG(e){return e.type||(e.data?"category":"value")}var l6e=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 se(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),ht(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}(),qI=["x","y"];function CG(e){return(e.type==="interval"||e.type==="time")&&!e.hasBreaks()}var u6e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=qI,r}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!CG(r)||!CG(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,v=this._transform=[c,0,0,f,h,d];this._invTransform=da([],v)}}},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"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.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 i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Oe(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return ur(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return ur(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},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(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Oe(a,o,s,l)},t}(l6e),tre=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}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}(_a),VT="expandAxisBreak",rre="collapseAxisBreak",nre="toggleAxisBreak",Ij="axisbreakchanged",c6e={type:VT,event:Ij,update:"update",refineEvent:Oj},f6e={type:rre,event:Ij,update:"update",refineEvent:Oj},h6e={type:nre,event:Ij,update:"update",refineEvent:Oj};function Oj(e,t,r,n){var i=[];return B(e,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function d6e(e){e.registerAction(c6e,t),e.registerAction(f6e,t),e.registerAction(h6e,t);function t(r,n){var i=[],a=ld(n,r);function o(s,l){B(a[s],function(u){var c=u.updateAxisBreaks(r);B(c.breaks,function(f){var h;i.push(Pe((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Ol=Math.PI,v6e=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],p6e=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],av=Je(),ire=Je(),are=function(){function e(t){this.recordMap={},this.resolveAxisNameOverlap=t}return e.prototype.ensureRecord=function(t){var r=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},e}();function g6e(e,t,r,n){var i=r.axis,a=t.ensureRecord(r),o=[],s,l=Ej(e.axisName)&&rv(e.nameLocation);B(n,function(v){var g=Vo(v);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?da(Wp,m.transform):i0(Wp),g.transform&&Fa(Wp,Wp,g.transform),Oe.copy(d_,g.localRect),d_.applyTransform(Wp),s?s.union(d_):Oe.copy(s=new Oe(0,0,0,0),d_))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(v,g){return Math.abs(v.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1])-h;s.union(new Oe(h,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Wp=Wr(),d_=new Oe(0,0,0,0),ore=function(e,t,r,n,i,a){if(rv(e.nameLocation)){var o=a.stOccupiedRect;o&&sre(vFe({},o,a.transGroup.transform),n,i)}else lre(a.labelInfoList,a.dirVec,n,i)};function sre(e,t,r){var n=new Ie;$T(e,t,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&FI(t,n)}function lre(e,t,r,n){for(var i=Ie.dot(n,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||sre(s,r,n)}}var Hn=function(){function e(t,r,n,i){this.group=new Me,this._axisModel=t,this._api=r,this._local={},this._shared=i||new are(ore),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():{},i=be(t.axisName,r.get("name")),a=r.get("nameMoveOverlap");(a==null||a==="auto")&&(a=be(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:be(t.nameDirection,1),tickDirection:be(t.tickDirection,1),labelDirection:be(t.labelDirection,1),labelOffset:be(t.labelOffset,0),silent:be(t.silent,!0),axisName:i,nameLocation:fi(r.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:Ej(i)&&a,optionHideOverlap:r.get(["axisLabel","hideOverlap"]),showMinorTicks:r.get(["minorTick","show"])};this._cfg=o;var s=new Me({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(r);l.transGroup=this._transformGroup,l.dirVec=new Ie(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(m6e,function(i){t[i]&&y6e[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,r||{})}),this},e.innerTextLayout=function(t,r,n){var i=hN(r-t),a,o;return Xd(i)?(o=n>0?"top":"bottom",a="center"):Xd(i-Ol)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Ol?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,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}(),m6e=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],y6e={axisLine:function(e,t,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(ur(c,c,u),ur(f,f,u));var d=re({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())_0().buildAxisBreakLine(n,i,a,v);else{var g=new yr(re({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},v));Qd(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var x=n.get(["axisLine","symbolSize"]);pe(m)&&(m=[m,m]),(pe(x)||ot(x))&&(x=[x,x]);var _=Mf(n.get(["axisLine","symbolOffset"])||0,x),b=x[0],S=x[1];B([{rotate:e.rotation+Math.PI/2,offset:_[0],r:0},{rotate:e.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(T,A){if(m[A]!=="none"&&m[A]!=null){var M=xr(m[A],-b/2,-S/2,b,S,d.stroke,!0),P=T.r+T.offset,I=h?f:c;M.attr({rotation:T.rotate,x:I[0]+P*Math.cos(e.rotation),y:I[1]-P*Math.sin(e.rotation),silent:!0,z2:11}),i.add(M)}})}}},axisTickLabelEstimate:function(e,t,r,n,i,a,o,s){var l=PG(t,i,s);l&&MG(e,t,r,n,i,a,o,Ya.estimate)},axisTickLabelDetermine:function(e,t,r,n,i,a,o,s){var l=PG(t,i,s);l&&MG(e,t,r,n,i,a,o,Ya.determine);var u=w6e(e,i,a,n);b6e(e,t.labelLayoutList,u),S6e(e,i,a,n,e.tickDirection)},axisName:function(e,t,r,n,i,a,o,s){var l=r.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=e.axisName;if(Ej(u)){var c=e.nameLocation,f=e.nameDirection,h=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,v=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Ie(0,0),x=new Ie(0,0);c==="start"?(m.x=v[0]-g*d,x.x=-g):c==="end"?(m.x=v[1]+g*d,x.x=g):(m.x=(v[0]+v[1])/2,m.y=e.labelOffset+f*d,x.y=f);var _=Wr();x.transform(Ks(_,_,e.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Ol/180);var S,T;rv(c)?S=Hn.innerTextLayout(e.rotation,b??e.rotation,f):(S=x6e(e.rotation,c,b||0,v),T=e.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(S.rotation)),!isFinite(T)&&(T=null)));var A=h.getFont(),M=n.get("nameTruncate",!0)||{},P=M.ellipsis,I=nn(e.raw.nameTruncateMaxWidth,M.maxWidth,T),k=s.nameMarginLevel||0,O=new at({x:m.x,y:m.y,rotation:S.rotation,silent:Hn.isLabelSilent(n),style:Mt(h,{text:u,font:A,overflow:"truncate",width:I,ellipsis:P,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Js({el:O,componentModel:n,itemName:u}),O.__fullText=u,O.anid="name",n.get("triggerEvent")){var D=Hn.makeAxisEventDataBase(n);D.targetType="axisName",D.name=u,De(O).eventData=D}a.add(O),O.updateTransform(),t.nameEl=O;var N=l.nameLayout=Vo({label:O,priority:O.z2,defaultAttr:{ignore:O.ignore},marginDefault:rv(c)?v6e[k]:p6e[k]});if(l.nameLocation=c,i.add(O),O.decomposeTransform(),e.shouldNameMoveOverlap&&N){var j=r.ensureRecord(n);r.resolveAxisNameOverlap(e,r,n,N,x,j)}}}};function MG(e,t,r,n,i,a,o,s){cre(t)||T6e(e,t,i,s,n,o);var l=t.labelLayoutList;A6e(e,n,l,a),P6e(n,e.rotation,l);var u=e.optionHideOverlap;_6e(n,l,u),u&&_te(ht(l,function(c){return c&&!c.label.ignore})),g6e(e,r,n,l)}function x6e(e,t,r,n){var i=hN(r-e),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Xd(i-Ol/2)?(o=l?"bottom":"top",a="center"):Xd(i-Ol*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Ol*1.5&&i>Ol/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function _6e(e,t,r){if(nte(e.axis))return;function n(s,l,u){var c=Vo(t[l]),f=Vo(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){_g(c.label);return}if(f.suggestIgnore){_g(f.label);return}var h=.1;if(!r){var d=[0,0,0,0];c=VI({marginForce:d},c),f=VI({marginForce:d},f)}$T(c,f,null,{touchThreshold:h})&&_g(s?f.label:c.label)}}var i=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function b6e(e,t,r){e.showMinorTicks||B(t,function(n){if(n&&n.label.ignore)for(var i=0;i<r.length;i++){var a=r[i],o=ire(a),s=av(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){_g(a);return}}})}function _g(e){e&&(e.ignore=!0)}function ure(e,t,r,n,i){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=r,t&&(ur(o,o,t),ur(s,s,t));var c=new yr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Qd(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,a.push(c);var f=ire(c);f.onBand=!!e[l].onBand,f.tickValue=e[l].tickValue}return a}function w6e(e,t,r,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=e.tickDirection*a.get("length"),u=i.getTicksCoords(),c=ure(u,r.transform,l,Pe(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),f=0;f<c.length;f++)t.add(c[f]);return c}function S6e(e,t,r,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),c=Pe(l.getLineStyle(),Pe(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),f=0;f<s.length;f++)for(var h=ure(s[f],r.transform,u,c,"minorticks_"+f),d=0;d<h.length;d++)t.add(h[d])}}function PG(e,t,r){if(cre(e)){var n=e.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(r.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(e.labelGroup),KI(e,null,null,null))}return!0}function T6e(e,t,r,n,i,a){var o=i.axis,s=nn(e.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Me;r.add(l);var u=Pw(n);if(!s||o.scale.isBlank()){KI(t,[],l,u);return}var c=i.getModel("axisLabel"),f=o.getViewLabels(u),h=(nn(e.raw.labelRotate,c.get("rotate"))||0)*Ol/180,d=Hn.innerTextLayout(e.rotation,h,e.labelDirection),v=i.getCategories&&i.getCategories(!0),g=[],m=i.get("triggerEvent"),x=1/0,_=-1/0;B(f,function(S,T){var A,M=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(S.tickValue):S.tickValue,P=S.formattedLabel,I=S.rawLabel,k=c;if(v&&v[M]){var O=v[M];Le(O)&&O.textStyle&&(k=new tt(O.textStyle,c,i.ecModel))}var D=k.getTextColor()||i.get(["axisLine","lineStyle","color"]),N=k.getShallow("align",!0)||d.textAlign,j=be(k.getShallow("alignMinLabel",!0),N),z=be(k.getShallow("alignMaxLabel",!0),N),$=k.getShallow("verticalAlign",!0)||k.getShallow("baseline",!0)||d.textVerticalAlign,U=be(k.getShallow("verticalAlignMinLabel",!0),$),F=be(k.getShallow("verticalAlignMaxLabel",!0),$),V=10+(((A=S.time)===null||A===void 0?void 0:A.level)||0);x=Math.min(x,V),_=Math.max(_,V);var W=new at({x:0,y:0,rotation:0,silent:Hn.isLabelSilent(i),z2:V,style:Mt(k,{text:P,align:T===0?j:T===f.length-1?z:N,verticalAlign:T===0?U:T===f.length-1?F:$,fill:Ae(D)?D(o.type==="category"?I:o.type==="value"?M+"":M,T):D})});W.anid="label_"+M;var Y=av(W);if(Y.break=S.break,Y.tickValue=M,Y.layoutRotation=d.rotation,Js({el:W,componentModel:i,itemName:P,formatterParamsExtra:{isTruncated:function(){return W.isTruncated},value:I,tickIndex:T}}),m){var Z=Hn.makeAxisEventDataBase(i);Z.targetType="axisLabel",Z.value=I,Z.tickIndex=T,S.break&&(Z.break={start:S.break.parsedBreak.vmin,end:S.break.parsedBreak.vmax}),o.type==="category"&&(Z.dataIndex=M),De(W).eventData=Z,S.break&&M6e(i,a,W,S.break)}g.push(W),l.add(W)});var b=se(g,function(S){return{label:S,priority:av(S).break?S.z2+(_-x+1):S.z2,defaultAttr:{ignore:S.ignore}}});KI(t,b,l,u)}function cre(e){return!!e.labelLayoutList}function KI(e,t,r,n){e.labelLayoutList=t,e.labelGroup=r,e.axisLabelsCreationContext=n}function A6e(e,t,r,n){var i=t.get(["axisLabel","margin"]);B(r,function(a,o){var s=Vo(a);if(s){var l=s.label,u=av(l);s.suggestIgnore=l.ignore,l.ignore=!1,aw(ns,C6e),ns.x=t.axis.dataToCoord(u.tickValue),ns.y=e.labelOffset+e.labelDirection*i,ns.rotation=u.layoutRotation,n.add(ns),ns.updateTransform(),n.remove(ns),ns.decomposeTransform(),aw(l,ns),l.markRedraw(),Ow(s,!0),Vo(s)}})}var ns=new Xe,C6e=new Xe;function Ej(e){return!!e}function M6e(e,t,r,n){r.on("click",function(i){var a={type:VT,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[e.axis.dim+"AxisIndex"]=e.componentIndex,t.dispatchAction(a)})}function P6e(e,t,r){var n=Sr();if(n){var i=n.retrieveAxisBreakPairs(r,function(o){return o&&av(o.label).break},!0),a=e.get(["breakLabelLayout","moveOverlap"],!0);(a===!0||a==="auto")&&B(i,function(o){_0().adjustBreakLabelPair(e.axis.inverse,t,[Vo(r[o[0]]),Vo(r[o[1]])])})}}function jw(e,t,r){r=r||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[e.x,e.x+e.width,e.y,e.y+e.height],c={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,h=l==="x"?[u[2]-f,u[3]+f]:[u[0]-f,u[1]+f];if(a){var d=a.toGlobalCoord(a.dataToCoord(0));h[c.onZero]=Math.max(Math.min(d,h[1]),h[0])}i.position=[l==="y"?h[c[s]]:u[0],l==="x"?h[c[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=v[o],i.labelOffset=a?h[c[o]]-h[c.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),nn(r.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var g=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-g:g,i.z2=1,i}function L6e(e){return e.coordinateSystem&&e.coordinateSystem.type==="cartesian2d"}function LG(e){var t={xAxisModel:null,yAxisModel:null};return B(t,function(r,n){var i=n.replace(/Model$/,""),a=e.getReferringComponents(i,tr).models[0];t[n]=a}),t}function k6e(e,t,r,n,i,a){for(var o=jw(e,r),s=!1,l=!1,u=0;u<t.length;u++)NI(t[u].getOtherAxis(r.axis).scale)&&(s=l=!0,r.axis.type==="category"&&r.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Hn(r,n,o,i)}function I6e(e,t,r){var n=jw(t,r);e.updateCfg(n)}function fre(e,t,r){var n=Hs.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(r),l=rte(e,t),u=l.extent,c=l.fixMin,f=l.fixMax;e.type==="log"&&(u=jI(e.base,u,!0)),e.setBreaksFromOption(ite(t)),e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=n.getExtent.call(e);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var d=n.getInterval.call(e),v=u[0],g=u[1];if(c&&f)d=(g-v)/o;else if(c)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=B2(d),g=u[0]+d*o;else if(f)for(v=u[1]-d*o;v>u[0]&&isFinite(v)&&isFinite(u[0]);)d=B2(d),v=u[1]-d*o;else{var m=e.getTicks().length-1;m>o&&(d=B2(d));var x=d*o;g=Math.ceil(u[1]/d)*d,v=mr(g-x),v<0&&u[0]>=0?(v=0,g=mr(x)):g>0&&u[1]<=0&&(g=0,v=-mr(x))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(e,v+d*_,g+d*b),n.setInterval.call(e,d),(_||b)&&n.setNiceExtent.call(e,v+d,g-d)}var kG=[[3,1],[0,2]],O6e=function(){function e(t,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=qI,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;this._updateScale(t,this.model);function i(o){var s,l=it(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],v=d.model,g=d.scale;NI(g)&&v.get("alignTicks")&&v.get("interval")==null?c.push(d):(cf(g,v),NI(g)&&(s=d))}c.length&&(s||(s=c.pop(),cf(s.scale,s.model)),B(c,function(m){fre(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};B(n.x,function(o){IG(n,"y",o,a)}),B(n.y,function(o){IG(n,"x",o,a)}),this.resize(this.model,r)},e.prototype.resize=function(t,r,n){var i=jr(t,r),a=this._rect=$t(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(QI(o,a),!n){var u=N6e(a,s,o,l,r),c=void 0;if(l)JI?(JI(this._axesList,a),QI(o,a)):c=DG(a.clone(),"axisLabel",null,a,o,u,i);else{var f=j6e(t,a,i),h=f.outerBoundsRect,d=f.parsedOuterBoundsContain,v=f.outerBoundsClamp;h&&(c=DG(h,d,v,a,o,u,i))}hre(a,o,Ya.determine,null,c,i)}B(this._coordsList,function(g){g.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]}Le(t)&&(r=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===r)return a[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(t,r,n){var i=this._findConvertTarget(r);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(t){var r=t.seriesModel,n=t.xAxisModel||r&&r.getReferringComponents("xAxis",tr).models[0],i=t.yAxisModel||r&&r.getReferringComponents("yAxis",tr).models[0],a=t.gridModel,o=this._coordsList,s,l;if(r)s=r.coordinateSystem,We(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},e.prototype.containPoint=function(t){var r=this._coordsList[0];if(r)return r.containPoint(t)},e.prototype._initCartesian=function(t,r,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(r.eachComponent("xAxis",u("x"),this),r.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,B(s.x,function(c,f){B(s.y,function(h,d){var v="x"+f+"y"+d,g=new u6e(v);g.master=i,g.model=t,i._coordsMap[v]=g,i._coordsList.push(g),g.addAxis(c),g.addAxis(h)})});function u(c){return function(f,h){if(eM(f,t)){var d=f.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var v=new tre(c,p0(f),[0,0],f.get("type"),d),g=v.type==="category";v.onBand=g&&f.get("boundaryGap"),v.inverse=f.get("inverse"),f.axis=v,v.model=f,v.grid=a,v.index=h,a._axesList.push(v),s[c][h]=v,l[c]++}}}},e.prototype._updateScale=function(t,r){B(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(L6e(i)){var a=LG(i),o=a.xAxisModel,s=a.yAxisModel;if(!eM(o,r)||!eM(s,r))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),f=l.getAxis("y");n(u,c),n(u,f)}},this);function n(i,a){B(Mw(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},e.prototype.getTooltipAxes=function(t){var r=[],n=[];return B(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);We(r,a)<0&&r.push(a),We(n,o)<0&&n.push(o)}),{baseAxes:r,otherAxes:n}},e.create=function(t,r){var n=[];return t.eachComponent("grid",function(i,a){var o=new e(i,t,r);o.name="grid_"+a,o.resize(i,r,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){d0({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=LG(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(s.componentIndex,l.componentIndex)}}),n},e.dimensions=qI,e}();function eM(e,t){return e.getCoordSysModel()===t}function IG(e,t,r,n){r.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=r.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)OG(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&OG(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(f){return f.dim+"_"+f.index}}function OG(e){return e&&e.type!=="category"&&e.type!=="time"&&T$e(e)}function E6e(e,t){var r=e.getExtent(),n=r[0]+r[1];e.toGlobalCoord=e.dim==="x"?function(i){return i+t}:function(i){return n-i+t},e.toLocalCoord=e.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function QI(e,t){B(e.x,function(r){return EG(r,t.x,t.width)}),B(e.y,function(r){return EG(r,t.y,t.height)})}function EG(e,t,r){var n=[0,r],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),E6e(e,t)}var JI;function D6e(e){JI=e}function DG(e,t,r,n,i,a,o){hre(n,i,Ya.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),c(n,0,NaN),c(n,1,NaN);var l=mu(s,function(h){return h>0})==null;return sf(n,s,!0,!0,r),QI(i,n),l;function u(h){B(i[Re[h]],function(d){if(Cy(d.model)){var v=a.ensureRecord(d.model),g=v.labelInfoList;if(g)for(var m=0;m<g.length;m++){var x=g[m],_=d.scale.normalize(av(x.label).tickValue);_=h===1?1-_:_,c(x.rect,h,_),c(x.rect,1-h,NaN)}var b=v.nameLayout;if(b){var _=rv(v.nameLocation)?.5:NaN;c(b.rect,h,_),c(b.rect,1-h,NaN)}}})}function c(h,d,v){var g=e[Re[d]]-h[Re[d]],m=h[Tr[d]]+h[Re[d]]-(e[Tr[d]]+e[Re[d]]);g=f(g,1-v),m=f(m,v);var x=kG[d][0],_=kG[d][1];s[x]=gr(s[x],g),s[_]=gr(s[_],m)}function f(h,d){return h>0&&!mn(d)&&d>1e-4&&(h/=d),h}}function N6e(e,t,r,n,i){var a=new are(R6e);return B(r,function(o){return B(o,function(s){if(Cy(s.model)){var l=!n;s.axisBuilder=k6e(e,t,s.model,i,a,l)}})}),a}function hre(e,t,r,n,i,a){var o=r===Ya.determine;B(t,function(u){return B(u,function(c){Cy(c.model)&&(I6e(c.axisBuilder,e,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Re[1-u]]=e[Tr[u]]<=a.refContainer[Tr[u]]*.5?0:1-u===1?2:1}B(t,function(u,c){return B(u,function(f){Cy(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function j6e(e,t,r){var n,i=e.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=$t(e.get("outerBounds",!0)||Qte,r.refContainer));var a=e.get("outerBoundsContain",!0),o;a==null||a==="auto"||We(["all","axisLabel"],a)<0?o="all":o=a;var s=[sw(be(e.get("outerBoundsClampWidth",!0),Nw[0]),t.width),sw(be(e.get("outerBoundsClampHeight",!0),Nw[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var R6e=function(e,t,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";ore(e,t,r,n,i,a),rv(e.nameLocation)||B(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&lre(s.labelInfoList,s.dirVec,n,i)})};function B6e(e,t){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return z6e(r,e,t),r.seriesInvolved&&F6e(r,e),r}function z6e(e,t,r){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];B(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=ky(s.model),u=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(B(s.getAxes(),Fe(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",v=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&B(v.baseAxes,Fe(g,d?"cross":!0,h)),d&&B(v.otherAxes,Fe(g,"cross",!1))}function g(m,x,_){var b=_.model.getModel("axisPointer",i),S=b.get("show");if(!(!S||S==="auto"&&!m&&!eO(b))){x==null&&(x=b.get("triggerTooltip")),b=m?$6e(_,f,i,t,m,x):b;var T=b.get("snap"),A=b.get("triggerEmphasis"),M=ky(_.model),P=x||T||_.type==="category",I=e.axesInfo[M]={key:M,axis:_,coordSys:s,axisPointerModel:b,triggerTooltip:x,triggerEmphasis:A,involveSeries:P,snap:T,useHandle:eO(b),seriesModels:[],linkGroup:null};u[M]=I,e.seriesInvolved=e.seriesInvolved||P;var k=V6e(a,_);if(k!=null){var O=o[k]||(o[k]={axesInfo:{}});O.axesInfo[M]=I,O.mapper=a[k].mapper,I.linkGroup=O}}}})}function $6e(e,t,r,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};B(s,function(h){l[h]=Ce(o.get(h))}),l.snap=e.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Pe(u,f.textStyle)}}return e.model.getModel("axisPointer",new tt(l,r,n))}function F6e(e,t){t.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||B(e.coordSysAxesInfo[ky(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function V6e(e,t){for(var r=t.model,n=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(tM(a[n+"AxisId"],r.id)||tM(a[n+"AxisIndex"],r.componentIndex)||tM(a[n+"AxisName"],r.name))return i}}function tM(e,t){return e==="all"||ae(e)&&We(e,t)>=0||e===t}function G6e(e){var t=Dj(e);if(t){var r=t.axisPointerModel,n=t.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=eO(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function Dj(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[ky(e)]}function W6e(e){var t=Dj(e);return t&&t.axisPointerModel}function eO(e){return!!e.get(["handle","show"])}function ky(e){return e.type+"||"+e.id}var NG={},Pf=function(e){q(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,i,a){this.axisPointerClass&&G6e(r),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(r,i,!0)},t.prototype.updateAxisPointer=function(r,n,i,a){this._doUpdateAxisPointerClass(r,i,!1)},t.prototype.remove=function(r,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(r,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(r,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=W6e(r);o?(this._axisPointer||(this._axisPointer=new a)).render(r,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(r){this._axisPointer&&this._axisPointer.dispose(r),this._axisPointer=null},t.registerAxisPointerClass=function(r,n){NG[r]=n},t.getAxisPointerClass=function(r){return r&&NG[r]},t.type="axis",t}(Lt),tO=Je();function dre(e,t,r,n){var i=r.axis;if(!i.scale.isBlank()){var a=r.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=s.length,f=tO(e).splitAreaColors,h=_e(),d=0;if(f)for(var v=0;v<u.length;v++){var g=f.get(u[v].tickValue);if(g!=null){d=(g+(c-1)*v)%c;break}}var m=i.toGlobalCoord(u[0].coord),x=o.getAreaStyle();s=ae(s)?s:[s];for(var v=1;v<u.length;v++){var _=i.toGlobalCoord(u[v].coord),b=void 0,S=void 0,T=void 0,A=void 0;i.isHorizontal()?(b=m,S=l.y,T=_-b,A=l.height,m=b+T):(b=l.x,S=m,T=l.width,A=_-S,m=S+A);var M=u[v-1].tickValue;M!=null&&h.set(M,d),t.add(new Xe({anid:M!=null?"area_"+M:null,shape:{x:b,y:S,width:T,height:A},style:Pe({fill:s[d]},x),autoBatch:!0,silent:!0})),d=(d+1)%c}tO(e).splitAreaColors=h}}}function vre(e){tO(e).splitAreaColors=null}var H6e=["splitArea","splitLine","minorSplitLine","breakArea"],pre=function(e){q(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,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Me,this.group.add(this._axisGroup),!!Cy(r)){this._axisGroup.add(r.axis.axisBuilder.group),B(H6e,function(l){r.get([l,"show"])&&U6e[l](this,this._axisGroup,r,r.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||f0(o,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)}},t.prototype.remove=function(){vre(this)},t.type="cartesianAxis",t}(Pf),U6e={splitLine:function(e,t,r,n,i){var a=r.axis;if(!a.scale.isBlank()){var o=r.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,c=o.get("showMaxLine")!==!1;l=ae(l)?l:[l];for(var f=n.coordinateSystem.getRect(),h=a.isHorizontal(),d=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],x=s.getLineStyle(),_=0;_<v.length;_++){var b=a.toGlobalCoord(v[_].coord);if(!(_===0&&!u||_===v.length-1&&!c)){var S=v[_].tickValue;h?(g[0]=b,g[1]=f.y,m[0]=b,m[1]=f.y+f.height):(g[0]=f.x,g[1]=b,m[0]=f.x+f.width,m[1]=b);var T=d++%l.length,A=new yr({anid:S!=null?"line_"+S:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:Pe({stroke:l[T]},x),silent:!0});Qd(A.shape,x.lineWidth),t.add(A)}}}},minorSplitLine:function(e,t,r,n,i){var a=r.axis,o=r.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),c=a.getMinorTicksCoords();if(c.length)for(var f=[],h=[],d=s.getLineStyle(),v=0;v<c.length;v++)for(var g=0;g<c[v].length;g++){var m=a.toGlobalCoord(c[v][g].coord);u?(f[0]=m,f[1]=l.y,h[0]=m,h[1]=l.y+l.height):(f[0]=l.x,f[1]=m,h[0]=l.x+l.width,h[1]=m);var x=new yr({anid:"minor_line_"+c[v][g].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:d,silent:!0});Qd(x.shape,d.lineWidth),t.add(x)}},splitArea:function(e,t,r,n,i){dre(e,t,r,n)},breakArea:function(e,t,r,n,i){var a=_0(),o=r.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,r,n.coordinateSystem.getRect(),i)}},gre=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="xAxis",t}(pre),Z6e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=gre.type,r}return t.type="yAxis",t}(pre),Y6e=function(e){q(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 Xe({shape:r.coordinateSystem.getRect(),style:Pe({fill:r.get("backgroundColor")},r.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Lt),jG={offset:0};function mre(e){e.registerComponentView(Y6e),e.registerComponentModel(r6e),e.registerCoordinateSystem("cartesian2d",O6e),iv(e,"x",YI,jG),iv(e,"y",YI,jG),e.registerComponentView(gre),e.registerComponentView(Z6e),e.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function X6e(e,t){var r=e.coordinateSystem,n=r&&r.type,i=r&&r.getBaseAxis&&r.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=n==="cartesian2d"&&a==="ordinal"||n==="single",s=t.model.get("jitter")>0;return o&&s}var q6e=Je();function RG(e,t,r,n){if(e instanceof tre){var i=e.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=e.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=e.scale.type==="ordinal"?e.getBandWidth():null;return o>0?s?yre(r,o,u,n):K6e(e,t,r,n,o,l):r}function yre(e,t,r,n){if(r===null)return e+(Math.random()-.5)*t;var i=r-n*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function K6e(e,t,r,n,i,a){var o=q6e(e);o.items||(o.items=[]);var s=o.items,l=BG(s,t,r,n,i,a,1),u=BG(s,t,r,n,i,a,-1),c=Math.abs(l-r)<Math.abs(u-r)?l:u,f=e.scale.type==="ordinal"?e.getBandWidth():null,h=Math.abs(c-r);return h>i/2||f&&h>f/2-n?yre(r,i,f,n):(s.push({fixedCoord:t,floatCoord:c,r:n}),c)}function BG(e,t,r,n,i,a,o){for(var s=r,l=0;l<e.length;l++){var u=e[l],c=t-u.fixedCoord,f=s-u.floatCoord,h=c*c+f*f,d=n+u.r+a;if(h<d*d){var v=u.floatCoord+Math.sqrt(d*d-c*c)*o;if(Math.abs(v-r)>i/2)return Number.MAX_VALUE;if(o===1&&v>s||o===-1&&v<s){s=v,l=-1;continue}}}return s}function Q6e(e){e.eachSeriesByType("scatter",function(t){var r=t.coordinateSystem;if(r&&(r.type==="cartesian2d"||r.type==="single")){var n=r.getBaseAxis?r.getBaseAxis():null,i=n&&X6e(t,n);if(i){var a=t.getData();a.each(function(o){var s=n.dim,l=n.orient,u=l==="horizontal"&&n.type!=="category"||l==="vertical"&&n.type==="category",c=a.getItemLayout(o),f=a.getItemVisual(o,"symbolSize"),h=f instanceof Array?(f[1]+f[0])/2:f;if(s==="y"||s==="single"&&u){var d=RG(n,c[0],c[1],h/2);a.setItemLayout(o,[c[0],d])}else if(s==="x"||s==="single"&&!u){var d=RG(n,c[1],c[0],h/2);a.setItemLayout(o,[d,c[1]])}})}}})}function J6e(e){Ze(mre),e.registerSeriesModel(KVe),e.registerChartView(t6e),e.registerLayout(x0("scatter"))}function eGe(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Q6e)}function tGe(e){e.eachSeriesByType("radar",function(t){var r=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();B(a,function(o,s){r.each(r.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=zG(c)?c:$G(i)})}),r.each(function(o){var s=mu(n[o],function(l){return zG(l)})||$G(i);n[o].push(s.slice()),r.setItemLayout(o,n[o])})}})}function zG(e){return!isNaN(e[0])&&!isNaN(e[1])}function $G(e){return[e.cx,e.cy]}function rGe(e){var t=e.polar;if(t){ae(t)||(t=[t]);var r=[];B(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),e.radar=e.radar||[],ae(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 nGe=function(e){q(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,i){var a=r.coordinateSystem,o=this.group,s=r.getData(),l=this._data;function u(h,d){var v=h.getItemVisual(d,"symbol")||"circle";if(v!=="none"){var g=Wv(h.getItemVisual(d,"symbolSize")),m=xr(v,-1,-1,2,2),x=h.getItemVisual(d,"symbolRotate")||0;return m.attr({style:{strokeNoScale:!0},z2:100,scaleX:g[0]/2,scaleY:g[1]/2,rotation:x*Math.PI/180||0}),m}}function c(h,d,v,g,m,x){v.removeAll();for(var _=0;_<d.length-1;_++){var b=u(g,m);b&&(b.__dimIdx=_,h[_]?(b.setPosition(h[_]),Tf[x?"initProps":"updateProps"](b,{x:d[_][0],y:d[_][1]},r,m)):b.setPosition(d[_]),v.add(b))}}function f(h){return se(h,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(h){var d=s.getItemLayout(h);if(d){var v=new wn,g=new on,m={shape:{points:d}};v.shape.points=f(d),g.shape.points=f(d),Nt(v,m,r,h),Nt(g,m,r,h);var x=new Me,_=new Me;x.add(g),x.add(v),x.add(_),c(g.shape.points,d,_,s,h,!0),s.setItemGraphicEl(h,x)}}).update(function(h,d){var v=l.getItemGraphicEl(d),g=v.childAt(0),m=v.childAt(1),x=v.childAt(2),_={shape:{points:s.getItemLayout(h)}};_.shape.points&&(c(g.shape.points,_.shape.points,x,s,h,!1),pa(m),pa(g),lt(g,_,r),lt(m,_,r),s.setItemGraphicEl(h,v))}).remove(function(h){o.remove(l.getItemGraphicEl(h))}).execute(),s.eachItemGraphicEl(function(h,d){var v=s.getItemModel(d),g=h.childAt(0),m=h.childAt(1),x=h.childAt(2),_=s.getItemVisual(d,"style"),b=_.fill;o.add(h),g.useStyle(Pe(v.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:b})),Dr(g,v,"lineStyle"),Dr(m,v,"areaStyle");var S=v.getModel("areaStyle"),T=S.isEmpty()&&S.parentModel.isEmpty();m.ignore=T,B(["emphasis","select","blur"],function(M){var P=v.getModel([M,"areaStyle"]),I=P.isEmpty()&&P.parentModel.isEmpty();m.ensureState(M).ignore=I&&T;var k=v.getModel([M,"lineStyle"]).getLineStyle();g.ensureState(M).style=k;var O=P.getAreaStyle();m.ensureState(M).style=O;var D=v.getModel([M,"itemStyle"]).getItemStyle();x.eachChild(function(N){N.ensureState(M).style=Ce(D)})}),m.useStyle(Pe(v.getModel("areaStyle").getAreaStyle(),{fill:b,opacity:.7,decal:_.decal}));var A=v.getModel("emphasis");x.eachChild(function(M){if(M instanceof Xr){var P=M.style;M.useStyle(re({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},_))}else M.useStyle(_),M.setColor(b),M.style.strokeNoScale=!0;var I=s.getStore().get(s.getDimensionIndex(M.__dimIdx),d);(I==null||isNaN(I))&&(I=""),Ur(M,Nr(v),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:M.__dimIdx,defaultText:I,inheritColor:b,defaultOpacity:_.opacity})}),Wt(h,A.get("focus"),A.get("blurScope"),A.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(_t),iGe=function(e){q(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 qv(ge(this.getData,this),ge(this.getRawData,this))},t.prototype.getInitialData=function(r,n){return Xv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(r),u=l===""?this.name:l,c=QJ(this,r);return Ar("section",{header:u,sortBlocks:!0,blocks:se(s,function(f){var h=a.get(a.mapDimension(f.dim),r);return Ar("nameValue",{markerType:"subItem",markerColor:c,name:f.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(r){if(r!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(se(i.dimensions,function(u){return n.mapDimension(u)}),r),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},t.type="series.radar",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}(St),Hp=ere.value;function v_(e,t){return Pe({show:t},e)}var aGe=function(e){q(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"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),f=this.get("axisNameGap"),h=this.get("triggerEvent"),d=se(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var g=l;v.color!=null&&(g=Pe({color:v.color},l));var m=He(Ce(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(pe(c)){var x=m.name;m.name=c.replace("{value}",x??"")}else Ae(c)&&(m.name=c(m.name,m));var _=new tt(m,null,this.ecModel);return fr(_,Zv.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:K.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:He({lineStyle:{color:K.color.neutral20}},Hp.axisLine),axisLabel:v_(Hp.axisLabel,!1),axisTick:v_(Hp.axisTick,!1),splitLine:v_(Hp.splitLine,!0),splitArea:v_(Hp.splitArea,!0),indicator:[]},t}(Qe),oGe=function(e){q(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,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},t.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=se(a,function(s){var l=s.model.get("showName")?s.name:"",u=new Hn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});B(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),v=ae(h)?h:[h],g=ae(d)?d:[d],m=[],x=[];function _(z,$,U){var F=U%$.length;return z[F]=z[F]||[],F}if(a==="circle")for(var b=i[0].getTicksCoords(),S=n.cx,T=n.cy,A=0;A<b.length;A++){if(c){var M=_(m,v,A);m[M].push(new Zo({shape:{cx:S,cy:T,r:b[A].coord}}))}if(f&&A<b.length-1){var M=_(x,g,A);x[M].push(new Dv({shape:{cx:S,cy:T,r0:b[A].coord,r:b[A+1].coord}}))}}else for(var P,I=se(i,function(z,$){var U=z.getTicksCoords();return P=P==null?U.length-1:Math.min(U.length-1,P),se(U,function(F){return n.coordToPoint(F.coord,$)})}),k=[],A=0;A<=P;A++){for(var O=[],D=0;D<i.length;D++)O.push(I[D][A]);if(O[0]&&O.push(O[0].slice()),c){var M=_(m,v,A);m[M].push(new on({shape:{points:O}}))}if(f&&k){var M=_(x,g,A-1);x[M].push(new wn({shape:{points:O.concat(k)}}))}k=O.slice().reverse()}var N=l.getLineStyle(),j=u.getAreaStyle();B(x,function(z,$){this.group.add(Ti(z,{style:Pe({stroke:"none",fill:g[$%g.length]},j),silent:!0}))},this),B(m,function(z,$){this.group.add(Ti(z,{style:Pe({fill:"none",stroke:v[$%v.length]},N),silent:!0}))},this)},t.type="radar",t}(Lt),sGe=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t}(_a),lGe=function(){function e(t,r,n){this.dimensions=[],this._model=t,this._indicatorAxes=se(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new sGe(o,new Hs);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},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],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},e.prototype.pointToData=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(r*r+n*n);r/=i,n/=i;for(var a=Math.atan2(-n,r),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],f=Math.abs(a-c.angle);f<o&&(s=c,l=u,o=f)}return[l,+(s&&s.coordToData(i))]},e.prototype.resize=function(t,r){var n=jr(t,r).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=ve(i[0],n.width)+n.x,this.cy=ve(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(pe(o)||ot(o))&&(o=[0,o]),this.r0=ve(o[0],a),this.r=ve(o[1],a),B(this._indicatorAxes,function(s,l){s.setExtent(this.r0,this.r);var u=this.startAngle+l*Math.PI*2/this._indicatorAxes.length;u=Math.atan2(Math.sin(u),Math.cos(u)),s.angle=u},this)},e.prototype.update=function(t,r){var n=this._indicatorAxes,i=this._model;B(n,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||t.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();B(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Hs;o.setExtent(0,a),o.setInterval(1),B(n,function(s,l){fre(s.scale,s.model,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("radar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},e.dimensions=[],e}();function uGe(e){e.registerCoordinateSystem("radar",lGe),e.registerComponentModel(aGe),e.registerComponentView(oGe),e.registerVisual({seriesType:"radar",reset:function(t){var r=t.getData();r.each(function(n){r.setItemVisual(n,"legendIcon","roundRect")}),r.setVisual("legendIcon","roundRect")}})}function cGe(e){Ze(uGe),e.registerChartView(nGe),e.registerSeriesModel(iGe),e.registerLayout(tGe),e.registerProcessor(Yv("radar")),e.registerPreprocessor(rGe)}var Nj=Je();function fGe(e,t,r){Nj(e)[t]=r}function hGe(e,t,r){var n=Nj(e),i=n[t];i===r&&(n[t]=null)}function FG(e,t){return!!Nj(e)[t]}Ka({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},lr);var dGe={axisPointer:1,tooltip:1,brush:1};function xre(e,t,r){var n=t.getComponentByElement(e.topTarget);if(!n||n===r||dGe.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===r)return!1;var a=lf(n),o=lf(r);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var Lf=function(e){q(t,e);function t(r){var n=e.call(this)||this;n._zr=r;var i=ge(n._mousedownHandler,n),a=ge(n._mousemoveHandler,n),o=ge(n._mouseupHandler,n),s=ge(n._mousewheelHandler,n),l=ge(n._pinchHandler,n);return n.enable=function(u,c){var f=c.zInfo,h=lf(f.component),d=h.z,v=h.zlevel,g={component:f.component,z:d,zlevel:v,z2:be(f.z2,-1/0)},m=re({},c.triggerInfo);this._opt=Pe(re({},c),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:g,triggerInfo:m}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(Zp(r,"mousedown",i,g),Zp(r,"mousemove",a,g),Zp(r,"mouseup",o,g)),(u===!0||u==="scale"||u==="zoom")&&(Zp(r,"mousewheel",s,g),Zp(r,"pinch",l,g)))},n.disable=function(){this._enabled=!1,Yp(r,"mousedown",i),Yp(r,"mousemove",a),Yp(r,"mouseup",o),Yp(r,"mousewheel",s),Yp(r,"pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(r,n,i){var a=this._opt,o=a.zInfoParsed;if(xre(r,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(r,n,i)),u&&s.isInClip&&!s.isInClip(r,n,i)&&(u=!1),u},t.prototype._decideCursorStyle=function(r,n,i,a){var o=r.target;if(!o&&this._checkPointer(r,n,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(r){if(!(lF(r)||Up(r))){for(var n=r.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=r.offsetX,a=r.offsetY;this._checkPointer(r,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(r){var n=this._zr;if(!(r.gestureEvent==="pinch"||FG(n,"globalPan")||Up(r))){var i=r.offsetX,a=r.offsetY;if(!this._dragging||!fb("moveOnMouseMove",r,this._opt)){var o=this._decideCursorStyle(r,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,c=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&$s(r.event),r.__ecRoamConsumed=!0,VG(this,"pan","moveOnMouseMove",r,{dx:u,dy:c,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(r){if(!Up(r)){var n=this._zr;if(!lF(r)){this._dragging=!1;var i=this._decideCursorStyle(r,r.offsetX,r.offsetY,!0);i&&n.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(r){if(!Up(r)){var n=fb("zoomOnMouseWheel",r,this._opt),i=fb("moveOnMouseWheel",r,this._opt),a=r.wheelDelta,o=Math.abs(a),s=r.offsetX,l=r.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(r){if(!(FG(this._zr,"globalPan")||Up(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,i,a,o){r._checkPointer(a,o.originX,o.originY)&&($s(a.event),a.__ecRoamConsumed=!0,VG(r,n,i,a,o))},t}(ya);function Up(e){return e.__ecRoamConsumed}var vGe=Je();function GT(e){var t=vGe(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function Zp(e,t,r,n){for(var i=GT(e),a=i.roam,o=a[t]=a[t]||[],s=0;s<o.length;s++){var l=o[s].zInfoParsed;if((l.zlevel-n.zlevel||l.z-n.z||l.z2-n.z2)<=0)break}o.splice(s,0,{listener:r,zInfoParsed:n}),pGe(e,t)}function Yp(e,t,r){for(var n=GT(e),i=n.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===r){i.splice(a,1),i.length||gGe(e,t);return}}function pGe(e,t){var r=GT(e);r.uniform[t]||e.on(t,r.uniform[t]=function(n){var i=r.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function gGe(e,t){var r=GT(e),n=r.uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function VG(e,t,r,n,i){i.isAvailableBehavior=ge(fb,null,r,n),e.trigger(t,i)}function fb(e,t,r){var n=r[e];return!e||n&&(!pe(n)||t.event[n+"Key"])}function jj(e,t,r){var n=e.target;n.x+=t,n.y+=r,n.dirty()}function Rj(e,t,r,n){var i=e.target,a=e.zoomLimit,o=e.zoom=e.zoom||1;o*=t,o=Bj(o,a);var s=o/e.zoom;e.zoom=o,bre(i,r,n,s),i.dirty()}function _re(e,t,r,n,i,a){var o=new Oe(0,0,0,0);n.enable(e.get("roam"),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get("roamTrigger"),isInSelf:function(u,c,f){return o.copy(r.getBoundingRect()),o.applyTransform(r.getComputedTransform()),o.contain(c,f)},isInClip:function(u,c,f){return!a||a.contain(c,f)}}}),i.zoomLimit=e.get("scaleLimit");var s=e.coordinateSystem;i.zoom=s?s.getZoom():1;var l=e.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){jj(i,u.dx,u.dy),t.dispatchAction({seriesId:e.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){Rj(i,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:e.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function GG(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function WT(e,t,r){var n=e.getZoom(),i=e.getCenter(),a=t.zoom,o=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,e.setCenter(GG(e,o))),a!=null&&(a=Bj(n*a,r)/n,bre(e,t.originX,t.originY,a),e.updateTransform(),e.setCenter(GG(e,o)),e.setZoom(a*n)),{center:e.getCenter(),zoom:e.getZoom()}}function bre(e,t,r,n){e.x-=(t-e.x)*(n-1),e.y-=(r-e.y)*(n-1),e.scaleX*=n,e.scaleY*=n}function Bj(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 wre(e){if(pe(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 rM,Rw={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"},WG=it(Rw),Bw={"alignment-baseline":"textBaseline","stop-color":"stopColor"},HG=it(Bw),mGe=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(t,r){r=r||{};var n=wre(t);this._defsUsePending=[];var i=new Me;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),vi(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;_Ge(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=HT(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=Tre(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new Me,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Xe({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},e.prototype._parseNode=function(t,r,n,i,a,o){var s=t.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=rM[s];if(c&&ye(rM,s)){l=c.call(this,t,r);var f=t.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=UG[s];if(d&&ye(UG,s)){var v=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var m=t.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},e.prototype._parseText=function(t,r){var n=new qd({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wi(r,n),vi(t,n,this._defsUsePending,!1,!1),yGe(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},e.internalField=function(){rM={g:function(t,r){var n=new Me;return Wi(r,n),vi(t,n,this._defsUsePending,!1,!1),n},rect:function(t,r){var n=new Xe;return Wi(r,n),vi(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 Zo;return Wi(r,n),vi(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 yr;return Wi(r,n),vi(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 l0;return Wi(r,n),vi(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"),i;n&&(i=XG(n));var a=new wn({shape:{points:i||[]},silent:!0});return Wi(r,a),vi(t,a,this._defsUsePending,!1,!1),a},polyline:function(t,r){var n=t.getAttribute("points"),i;n&&(i=XG(n));var a=new on({shape:{points:i||[]},silent:!0});return Wi(r,a),vi(t,a,this._defsUsePending,!1,!1),a},image:function(t,r){var n=new Xr;return Wi(r,n),vi(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",i=t.getAttribute("y")||"0",a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new Me;return Wi(r,s),vi(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,r){var n=t.getAttribute("x"),i=t.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new Me;return Wi(r,s),vi(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(t,r){var n=t.getAttribute("d")||"",i=$Q(n);return Wi(r,i),vi(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),e}(),UG={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),i=parseInt(e.getAttribute("y2")||"0",10),a=new Sf(t,r,n,i);return ZG(e,a),YG(e,a),a},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),i=new MN(t,r,n);return ZG(e,i),YG(e,i),i}};function ZG(e,t){var r=e.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(t.global=!0)}function YG(e,t){for(var r=e.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};Sre(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=En(o),u=l&&l[3];u&&(l[3]*=Ts(s),o=sa(l,"rgba"))}t.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Wi(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Pe(t.__inheritedStyle,e.__inheritedStyle))}function XG(e){for(var t=HT(e),r=[],n=0;n<t.length;n+=2){var i=parseFloat(t[n]),a=parseFloat(t[n+1]);r.push([i,a])}return r}function vi(e,t,r,n,i){var a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(SGe(e,t),Sre(e,o,s),n||TGe(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=qG(a,"fill",o.fill,r)),o.stroke!=null&&(a.style.stroke=qG(a,"stroke",o.stroke,r)),B(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),B(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=se(HT(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function yGe(e,t){var r=t.__selfStyle;if(r){var n=r.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),e.style.textBaseline=i}var a=t.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),e.style.textAlign=s)}}var xGe=/^url\(\s*#(.*?)\)/;function qG(e,t,r,n){var i=r&&r.match(xGe);if(i){var a=Ci(i[1]);n.push([e,t,a]);return}return r==="none"&&(r=null),r}function _Ge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n[0].style[n[1]]=e[n[2]]}}var bGe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function HT(e){return e.match(bGe)||[]}var wGe=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,nM=Math.PI/180;function SGe(e,t){var r=e.getAttribute("transform");if(r){r=r.replace(/,/g," ");var n=[],i=null;r.replace(wGe,function(f,h,d){return n.push(h,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=HT(o);switch(i=i||Wr(),s){case"translate":Ua(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":mT(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ks(i,i,-parseFloat(l[0])*nM,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*nM);Fa(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*nM);Fa(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}t.setLocalTransform(i)}}var KG=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Sre(e,t,r){var n=e.getAttribute("style");if(n){KG.lastIndex=0;for(var i;(i=KG.exec(n))!=null;){var a=i[1],o=ye(Rw,a)?Rw[a]:null;o&&(t[o]=i[2]);var s=ye(Bw,a)?Bw[a]:null;s&&(r[s]=i[2])}}}function TGe(e,t,r){for(var n=0;n<WG.length;n++){var i=WG[n],a=e.getAttribute(i);a!=null&&(t[Rw[i]]=a)}for(var n=0;n<HG.length;n++){var i=HG[n],a=e.getAttribute(i);a!=null&&(r[Bw[i]]=a)}}function Tre(e,t){var r=t.width/e.width,n=t.height/e.height,i=Math.min(r,n);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function AGe(e,t){var r=new mGe;return r.parse(e,t)}var CGe=_e(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),MGe=function(){function e(t,r){this.type="geoSVG",this._usedGraphicMap=_e(),this._freedGraphics=[],this._mapName=t,this._parsedXML=wre(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=LGe(t.named),n=r.regions,i=r.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(t){var r,n;try{r=t&&AGe(t,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=r.root,_n(n!=null)}catch(m){throw new Error(`Invalid svg format
|
||
`+m.message)}var i=new Me;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=r.width,o=r.height,s=r.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,f=void 0,h=void 0;if(a!=null?(u=0,f=a):s&&(u=s.x,f=s.width),o!=null?(c=0,h=o):s&&(c=s.y,h=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,f=d.width),c==null&&(c=d.y,h=d.height)}l=this._boundingRect=new Oe(u,c,f,h)}if(s){var v=Tre(s,l);n.scaleX=n.scaleY=v.scale,n.x=v.x,n.y=v.y}i.setClipPath(new Xe({shape:l.plain()}));var g=[];return B(r.named,function(m){CGe.get(m.svgNodeTagLower)!=null&&(g.push(m),PGe(m.el))}),{root:i,boundingRect:l,named:g}},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 PGe(e){e.silent=!1,e.isGroup&&e.traverse(function(t){t.silent=!1})}function LGe(e){var t=[],r=_e();return B(e,function(n){if(n.namedFrom==null){var i=new j$e(n.name,n.el);t.push(i),r.set(n.name,i)}}),{regions:t,regionsMap:r}}var rO=[126,25],QG="南海诸岛",sc=[[[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 ec=0;ec<sc.length;ec++)for(var sh=0;sh<sc[ec].length;sh++)sc[ec][sh][0]/=10.5,sc[ec][sh][1]/=-10.5/.75,sc[ec][sh][0]+=rO[0],sc[ec][sh][1]+=rO[1];function kGe(e,t){if(e==="china"){for(var r=0;r<t.length;r++)if(t[r].name===QG)return;t.push(new ote(QG,se(sc,function(n){return{type:"polygon",exterior:n}}),rO))}}var IGe={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function OGe(e,t){if(e==="china"){var r=IGe[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 EGe=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function DGe(e,t){e==="china"&&t.name==="台湾"&&t.geometries.push({type:"polygon",exterior:EGe[0]})}var NGe="name",jGe=function(){function e(t,r,n){this.type="geoJSON",this._parsedMap=_e(),this._mapName=t,this._specialAreas=n,this._geoJSON=BGe(r)}return e.prototype.load=function(t,r){r=r||NGe;var n=this._parsedMap.get(r);if(!n){var i=this._parseToRegions(r);n=this._parsedMap.set(r,{regions:i,boundingRect:RGe(i)})}var a=_e(),o=[];return B(n.regions,function(s){var l=s.name;t&&ye(t,l)&&(s=s.cloneShallow(l=t[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new Oe(0,0,0,0),regionsMap:a}},e.prototype._parseToRegions=function(t){var r=this._mapName,n=this._geoJSON,i;try{i=n?zI(n,t):[]}catch(a){throw new Error(`Invalid geoJson format
|
||
`+a.message)}return kGe(r,i),B(i,function(a){var o=a.name;OGe(r,a),DGe(r,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function RGe(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 BGe(e){return pe(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var Xp=_e();const Us={registerMap:function(e,t,r){if(t.svg){var n=new MGe(e,t.svg);Xp.set(e,n)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?r=t.specialAreas:i=t;var n=new jGe(e,i,r);Xp.set(e,n)}},getGeoResource:function(e){return Xp.get(e)},getMapForUser:function(e){var t=Xp.get(e);return t&&t.type==="geoJSON"&&t.getMapForUser()},load:function(e,t,r){var n=Xp.get(e);if(n)return n.load(t,r)}};var zj=["rect","circle","line","ellipse","polygon","polyline","path"],zGe=_e(zj),$Ge=_e(zj.concat(["g"])),FGe=_e(zj.concat(["g"])),Are=Je();function p_(e){var t=e.getItemStyle(),r=e.get("areaColor");return r!=null&&(t.fill=r),t}function JG(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var Cre=function(){function e(t){var r=this.group=new Me,n=this._transformGroup=new Me;r.add(n),this.uid=zv("ec_map_draw"),this._controller=new Lf(t.getZr()),this._controllerHost={target:n},n.add(this._regionsGroup=new Me),n.add(this._svgGroup=new Me)}return e.prototype.draw=function(t,r,n,i,a){var o=t.mainType==="geo",s=t.getData&&t.getData();o&&r.eachComponent({mainType:"series",subType:"map"},function(b){!s&&b.getHostGeoModel()===t&&(s=b.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this._transformGroup,f=l.getTransformInfo(),h=f.raw,d=f.roam,v=!u.childAt(0)||a,g=t.getShallow("clip",!0),m;g?(m=l.getViewRect().clone(),this.group.setClipPath(new Xe({shape:m.clone()}))):this.group.removeClipPath(),v?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):lt(c,d,t);var x=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,_={api:n,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:x,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(t,m,r,n),this._updateMapSelectHandler(t,u,n,i)},e.prototype._buildGeoJSON=function(t){var r=this._regionsGroupByName=_e(),n=_e(),i=this._regionsGroup,a=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var v=[],g=!u&&l&&l.project,m=0;m<d.length;++m){var x=c(d[m],g);x&&v.push(x)}return v}function h(d){return{shape:{points:f(d)}}}i.removeAll(),B(t.geo.regions,function(d){var v=d.name,g=r.get(v),m=n.get(v)||{},x=m.dataIdx,_=m.regionModel;if(!g){g=r.set(v,new Me),i.add(g),x=s?s.indexOfName(v):null,_=t.isGeo?o.getRegionModel(v):s?s.getItemModel(x):null;var b=_.get("silent",!0);b!=null&&(g.silent=b),n.set(v,{dataIdx:x,regionModel:_})}var S=[],T=[];B(d.geometries,function(P){if(P.type==="polygon"){var I=[P.exterior].concat(P.interiors||[]);u&&(I=aW(I,u)),B(I,function(O){S.push(new wn(h(O)))})}else{var k=P.points;u&&(k=aW(k,u,!0)),B(k,function(O){T.push(new on(h(O)))})}});var A=c(d.getCenter(),l&&l.project);function M(P,I){if(P.length){var k=new c0({culling:!0,segmentIgnoreThreshold:1,shape:{paths:P}});g.add(k),eW(t,k,x,_),tW(t,k,v,_,o,x,A),I&&(JG(k),B(k.states,JG))}}M(S),M(T,!0)}),r.each(function(d,v){var g=n.get(v),m=g.dataIdx,x=g.regionModel;rW(t,d,v,x,o,m),nW(t,d,v,x,o),iW(t,d,v,x,o)},this)},e.prototype._buildSVG=function(t){var r=t.geo.map,n=t.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(r)&&(this._freeSVG(),this._useSVG(r));var i=this._svgDispatcherMap=_e(),a=!1;B(this._svgGraphicRecord.named,function(o){var s=o.name,l=t.mapOrGeoModel,u=t.data,c=o.svgNodeTagLower,f=o.el,h=u?u.indexOfName(s):null,d=l.getRegionModel(s);zGe.get(c)!=null&&f instanceof va&&eW(t,f,h,d),f instanceof va&&(f.culling=!0);var v=d.get("silent",!0);if(v!=null&&(f.silent=v),f.z2EmphasisLift=0,!o.namedFrom&&(FGe.get(c)!=null&&tW(t,f,s,d,l,h,null),rW(t,f,s,d,l,h),nW(t,f,s,d,l),$Ge.get(c)!=null)){var g=iW(t,f,s,d,l);g==="self"&&(a=!0);var m=i.get(s)||i.set(s,[]);m.push(f)}},this),this._enableBlurEntireSVG(a,t)},e.prototype._enableBlurEntireSVG=function(t,r){if(t&&r.isGeo){var n=r.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){of(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(t,r){if(t==null)return[];var n=r.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(t);return a?[a]:[]}}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=Us.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=Us.getGeoResource(t);r&&r.type==="geoSVG"&&r.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(t,r,n,i){var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1,{api:i,zInfo:{component:t},triggerInfo:{roamTrigger:t.get("roamTrigger"),isInSelf:function(c,f,h){return a.containPoint([f,h])},isInClip:function(c,f,h){return!r||r.contain(f,h)}}});var l=t.mainType;function u(){var c={type:"geoRoam",componentType:l};return c[l+"Id"]=t.id,c}o.off("pan").on("pan",function(c){this._mouseDownFlag=!1,jj(s,c.dx,c.dy),i.dispatchAction(re(u(),{dx:c.dx,dy:c.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(c){this._mouseDownFlag=!1,Rj(s,c.scale,c.originX,c.originY),i.dispatchAction(re(u(),{totalZoom:s.zoom,zoom:c.scale,originX:c.originX,originY:c.originY,animation:{duration:0}}))},this)},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var r=t.getTextContent();r&&(r.ignore=Are(r).ignore)})},e.prototype._updateMapSelectHandler=function(t,r,n,i){var a=this;r.off("mousedown"),r.off("click"),t.get("selectedMode")&&(r.on("mousedown",function(){a._mouseDownFlag=!0}),r.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},e}();function eW(e,t,r,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=p_(i),u=p_(a),c=p_(s),f=p_(o),h=e.data;if(h){var d=h.getItemVisual(r,"style"),v=h.getItemVisual(r,"decal");e.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),v&&(l.decal=ev(v,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=f,of(t)}function tW(e,t,r,n,i,a,o){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var f=l?r:a,h=void 0;(!s||a>=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Ur(t,Nr(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},d);var v=t.getTextContent();if(v&&(Are(v).ignore=v.ignore,t.textConfig&&o)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function rW(e,t,r,n,i,a){e.data?e.data.setItemGraphicEl(a,t):De(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function nW(e,t,r,n,i){e.data||Js({el:t,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function iW(e,t,r,n,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Wt(t,o,a.get("blurScope"),a.get("disabled")),e.isGeo&&E5e(t,i,r),o}function aW(e,t,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),B(e,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!r&&s.polygonEnd(),n}var VGe=function(e){q(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,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!r.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===r.id){var s=this._mapDraw;s&&o.add(s.group)}else if(r.needsDrawMap){var s=this._mapDraw||new Cre(i);o.add(s.group),s.draw(r,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;r.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(r,n,i)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(r,n,i){var a=r.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,f=u.offset,h=new Zo({style:{fill:r.getData().getVisual("style").fill},shape:{cx:c[0]+f*9,cy:c[1],r:3},silent:!0,z2:8+(f?0:Ev+1)});if(!f){var d=r.mainSeries.getData(),v=a.getName(l),g=d.indexOfName(v),m=a.getItemModel(l),x=m.getModel("label"),_=d.getItemGraphicEl(g);Ur(h,Nr(m),{labelFetcher:{getFormattedLabel:function(b,S){return r.getFormattedLabel(g,S)}},defaultText:v}),h.disableLabelAnimation=!0,x.get("position")||h.setTextConfig({position:"bottom"}),_.onHoverStateChange=function(b){fw(h,b)}}o.add(h)}}})},t.type="map",t}(_t),GGe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.needsDrawMap=!1,r.seriesGroup=[],r.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},r}return t.prototype.getInitialData=function(r){for(var n=Xv(this,{coordDimensions:["value"],encodeDefaulter:Fe(qN,this)}),i=_e(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Us.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return B(u.regions,function(c){var f=c.name,h=i.get(f),d=c.properties&&c.properties.echartsStyle,v;h==null?(v={name:f},a.push(v)):v=n.getRawDataItem(h),d&&He(v,d)}),n.appendData(a),n},t.prototype.getHostGeoModel=function(){if(pJ(this).kind!==mo.boxCoordSys)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,i){for(var a=this.getData(),o=this.getRawValue(r),s=a.getName(r),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var f=l[c].originalData.indexOfName(s),h=a.mapDimension("value");isNaN(l[c].originalData.get(h,f))||u.push(l[c].name)}return Ar("section",{header:u.join(", "),noHeader:!u.length,blocks:[Ar("nameValue",{name:s,value:o})]})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.getLegendIcon=function(r){var n=r.icon||"roundRect",i=xr(n,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill);return i.setStyle(r.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill=K.color.neutral00,i.style.lineWidth=2),i},t.type="series.map",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:K.color.tertiary},itemStyle:{borderWidth:.5,borderColor:K.color.border,areaColor:K.color.background},emphasis:{label:{show:!0,color:K.color.primary},itemStyle:{areaColor:K.color.highlight}},select:{label:{show:!0,color:K.color.primary},itemStyle:{color:K.color.highlight}},nameProperty:"name"},t}(St);function WGe(e,t){var r={};return B(e,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),e[0].map(e[0].mapDimension("value"),function(n,i){for(var a="ec-"+e[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c<u;c++)s=Math.min(s,r[a][c]),l=Math.max(l,r[a][c]),o+=r[a][c];var f;return t==="min"?f=s:t==="max"?f=l:t==="average"?f=o/u:f=o,u===0?NaN:f})}function HGe(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getHostGeoModel(),i=n?"o"+n.id:"i"+r.getMapType();(t[i]=t[i]||[]).push(r)}),B(t,function(r,n){for(var i=WGe(se(r,function(o){return o.getData()}),r[0].get("mapValueCalculation")),a=0;a<r.length;a++)r[a].originalData=r[a].getData();for(var a=0;a<r.length;a++)r[a].seriesGroup=r,r[a].needsDrawMap=a===0&&!r[a].getHostGeoModel(),r[a].setData(i.cloneShallow()),r[a].mainSeries=r[0]})}function UGe(e){var t={};e.eachSeriesByType("map",function(r){var n=r.getMapType();if(!(r.getHostGeoModel()||t[n])){var i={};B(r.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&e.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var f=l.getName(c),h=s.getRegion(f);if(!(!h||isNaN(u))){var d=i[f]||0,v=s.dataToPoint(h.getCenter());i[f]=d+1,l.setItemLayout(c,{point:v,offset:d})}})});var a=r.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),t[n]=!0}})}var oW=ur,kf=function(e){q(t,e);function t(r,n){var i=e.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new ys,i._rawTransformable=new ys,i.name=r,i._opt=n,i}return t.prototype.setBoundingRect=function(r,n,i,a){return this._rect=new Oe(r,n,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(r,n,i,a){this._transformTo(r,n,i,a),this._viewRect=new Oe(r,n,i,a)},t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new Oe(r,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(r){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&r&&(r=[ve(r[0],n.api.getWidth()),ve(r[1],n.api.getWidth())]),this._centerOption=Ce(r),this._updateCenterAndZoom()},t.prototype.setZoom=function(r){this._zoom=Bj(r||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var r=this.getBoundingRect(),n=r.x+r.width/2,i=r.y+r.height/2;return[n,i]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var r=this._centerOption,n=this._rect;r&&n&&(this._center=[ve(r[0],n.width,n.x),ve(r[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=ur([],s,i),o=ur([],o,i),a.originX=s[0],a.originY=s[1],a.x=o[0]-s[0],a.y=o[1]-s[1],a.scaleX=a.scaleY=l,this._updateTransform()},t.prototype._updateTransform=function(){var r=this._roamTransformable,n=this._rawTransformable;n.parent=r,r.updateTransform(),n.updateTransform(),a0(this.transform||(this.transform=[]),n.transform||Wr()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],da(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var r=this._rawTransformable,n=this._roamTransformable,i=new ys;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var r=this.getBoundingRect().clone();return r.applyTransform(this.transform),r},t.prototype.dataToPoint=function(r,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?oW(i,r,a):Pn(i,r)},t.prototype.pointToData=function(r,n,i){i=i||[];var a=this.invTransform;return a?oW(i,r,a):(i[0]=r[0],i[1]=r[1],i)},t.prototype.convertToPixel=function(r,n,i){var a=sW(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=sW(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(r){return this.getViewRectAfterRoam().contain(r[0],r[1])},t.dimensions=["x","y"],t}(ys);function sW(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var ZGe={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},Mre=["lng","lat"],nO=function(e){q(t,e);function t(r,n,i){var a=e.call(this,r,{api:i.api,ecModel:i.ecModel})||this;a.dimensions=Mre,a.type="geo",a._nameCoordMap=_e(),a.map=n;var o=i.projection,s=Us.load(n,i.nameMap,i.nameProperty),l=Us.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=ZGe[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var f;if(o)for(var h=0;h<u.length;h++){var d=u[h].getBoundingRect(o);f=f||d.clone(),f.union(d)}else f=s.boundingRect;return a.setBoundingRect(f.x,f.y,f.width,f.height),a.aspectScale=o?1:be(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return t.prototype._transformTo=function(r,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new Oe(r,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(r){return this._regionsMap.get(r)},t.prototype.getRegionByCoord=function(r){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(r))return n[i]}},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,i){if(pe(r)&&(r=this.getGeoCoord(r)),r){var a=this.projection;return a&&(r=a.project(r)),r&&this.projectedToPoint(r,n,i)}},t.prototype.pointToData=function(r,n,i){var a=this.projection;return a&&(r=a.unproject(r)),r&&this.pointToProjected(r,i)},t.prototype.pointToProjected=function(r,n){return e.prototype.pointToData.call(this,r,0,n)},t.prototype.projectedToPoint=function(r,n,i){return e.prototype.dataToPoint.call(this,r,n,i)},t.prototype.convertToPixel=function(r,n,i){var a=lW(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(r,n,i){var a=lW(n);return a===this?a.pointToData(i):null},t}(kf);fr(nO,kf);function lW(e){var t=e.geoModel,r=e.seriesModel;return t?t.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo",tr).models[0]||{}).coordinateSystem:null}function uW(e,t){var r=e.get("boundingCoords");if(r!=null){var n=r[0],i=r[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(T,A,M,P){for(var I=M-T,k=P-A,O=0;O<=100;O++){var D=O/100,N=a.project([T+I*D,A+k*D]);gs(n,n,N),ms(i,i,N)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var f=this.getBoundingRect(),h=e.get("layoutCenter"),d=e.get("layoutSize"),v=jr(e,t).refContainer,g=f.width/f.height*this.aspectScale,m=!1,x,_;h&&d&&(x=[ve(h[0],v.width)+v.x,ve(h[1],v.height)+v.y],_=ve(d,Math.min(v.width,v.height)),!isNaN(x[0])&&!isNaN(x[1])&&!isNaN(_)&&(m=!0));var b;if(m)b={},g>1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=x[1]-b.height/2,b.x=x[0]-b.width/2;else{var S=e.getBoxLayoutParams();S.aspect=g,b=$t(S,v),b=_J(e,b,g)}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function YGe(e,t){B(t.get("geoCoord"),function(r,n){e.addGeoCoord(n,r)})}var XGe=function(){function e(){this.dimensions=Mre}return e.prototype.create=function(t,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new nO(l+s,l,re({nameMap:o.get("nameMap"),api:r,ecModel:t},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=uW,u.resize(o,r)}),t.eachSeries(function(o){d0({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",tr).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),B(a,function(o,s){var l=se(o,function(c){return c.get("nameMap")}),u=new nO(s,s,re({nameMap:vT(l),api:r,ecModel:t},i(o[0])));u.zoomLimit=nn.apply(null,se(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=uW,u.resize(o[0],r),B(o,function(c){c.coordinateSystem=u,YGe(u,c)})}),n},e.prototype.getFilledRegions=function(t,r,n,i){for(var a=(t||[]).slice(),o=_e(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Us.load(r,n,i);return B(l.regions,function(u){var c=u.name,f=o.get(c),h=u.properties&&u.properties.echartsStyle;f||(f={name:c},a.push(f)),h&&He(f,h)}),a},e}(),Pre=new XGe,qGe=function(e){q(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,i){this.mergeDefaultAndTheme(r,i);var a=Us.getGeoResource(r.map);if(a&&a.type==="geoJSON"){var o=r.itemStyle=r.itemStyle||{};"color"in o||(o.color=r.defaultItemStyleColor||K.color.backgroundTint)}rf(r,"label",["show"])},t.prototype.optionUpdated=function(){var r=this,n=this.option;n.regions=Pre.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=ha(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new tt(o,r,r.ecModel)),o.selected&&(i[s]=!0)),a},_e()),n.selectedMap||(n.selectedMap=i)},t.prototype.getRegionModel=function(r){return this._optionModelMap.get(r)||new tt(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(r,n){var i=this.getRegionModel(r),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:r};if(Ae(a))return o.status=n,a(o);if(pe(a))return a.replace("{a}",r??"")},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.select=function(r){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[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.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:K.color.tertiary},itemStyle:{borderWidth:.5,borderColor:K.color.border},emphasis:{label:{show:!0,color:K.color.primary},itemStyle:{color:K.color.highlight}},select:{label:{show:!0,color:K.color.primary},itemStyle:{color:K.color.highlight}},regions:[]},t}(Qe),KGe=function(e){q(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,i,a){if(this._model=r,!r.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new Cre(i));var o=this._mapDraw;o.draw(r,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=r.get("silent"),this.group.add(o.group),this.updateSelectStatus(r,n,i)},t.prototype._handleRegionClick=function(r){var n;Pc(r.target,function(i){return(n=De(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},t.prototype.updateSelectStatus=function(r,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=De(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.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}(Lt);function QGe(e,t,r){Us.registerMap(e,t,r)}function Lre(e){e.registerCoordinateSystem("geo",Pre),e.registerComponentModel(qGe),e.registerComponentView(KGe),e.registerImpl("registerMap",QGe),e.registerImpl("getMap",function(r){return Us.getMapForUser(r)});function t(r,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[r](i.name);var u=l.coordinateSystem;B(u.regions,function(f){o[f.name]=l.isSelected(f.name)||!1});var c=[];B(o,function(f,h){o[h]&&c.push(h)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.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,i){var a=r.componentType;a||(r.geoId!=null?a="geo":r.seriesId!=null&&(a="series")),a||(a="series"),n.eachComponent({mainType:a,query:r},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=WT(s,r,o.get("scaleLimit"));o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&B(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function JGe(e){Ze(Lre),e.registerChartView(VGe),e.registerSeriesModel(GGe),e.registerLayout(UGe),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,HGe),cee("map",e.registerAction)}function eWe(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,i;n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function tWe(e,t){var r=e.isExpand?e.children:[],n=e.parentNode.children,i=e.hierNode.i?n[e.hierNode.i-1]:null;if(r.length){nWe(e);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=iWe(e,i,e.parentNode.hierNode.defaultAncestor||n[0],t)}function rWe(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function cW(e){return arguments.length?e:sWe}function bg(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function nWe(e){for(var t=e.children,r=t.length,n=0,i=0;--r>=0;){var a=t[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function iWe(e,t,r,n){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=iM(s),a=aM(a),s&&a;){i=iM(i),o=aM(o),i.hierNode.ancestor=e;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(oWe(aWe(s,e,r),e,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!iM(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!aM(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=e)}return r}function iM(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function aM(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function aWe(e,t,r){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:r}function oWe(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 sWe(e,t){return e.parentNode===t.parentNode?1:2}var lWe=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),uWe=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new lWe},t.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=ve(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var v=1;v<a-1;v++){var g=i[v];r.moveTo(g[0],g[1]),d[c]=g[c],r.lineTo(d[0],d[1])}},t}(rt),cWe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Me,r}return t.prototype.init=function(r,n){this._controller=new Lf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=r.getData(),o=r.layoutInfo,s=this._mainGroup,l=r.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(r,i),this._updateController(r,null,n,i);var u=this._data;a.diff(u).add(function(c){fW(a,c)&&hW(a,c,null,s,r)}).update(function(c,f){var h=u.getItemGraphicEl(f);if(!fW(a,c)){h&&vW(u,f,h,s,r);return}hW(a,c,h,s,r)}).remove(function(c){var f=u.getItemGraphicEl(c);f&&vW(u,c,f,s,r)}).execute(),this._nodeScaleRatio=r.get("nodeScaleRatio"),this._updateNodeAndLinkScale(r),r.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,f){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:r.id,dataIndex:f})})}),this._data=a},t.prototype._updateViewCoordSys=function(r,n){var i=r.getData(),a=[];i.each(function(f){var h=i.getItemLayout(f);h&&!isNaN(h.x)&&!isNaN(h.y)&&a.push([+h.x,+h.y])});var o=[],s=[];AT(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=r.coordinateSystem=new kf(null,{api:n,ecModel:r.ecModel});c.zoomLimit=r.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(r.get("center")),c.setZoom(r.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},t.prototype._updateController=function(r,n,i,a){var o=this;_re(r,a,this.group,this._controller,this._controllerHost,n),this._controller.on("zoom",function(s){o._updateNodeAndLinkScale(r)})},t.prototype._updateNodeAndLinkScale=function(r){var n=r.getData(),i=this._getNodeGlobalScale(r);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},t.prototype._getNodeGlobalScale=function(r){var n=r.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(_t);function fW(e,t){var r=e.getItemLayout(t);return r&&!isNaN(r.x)&&!isNaN(r.y)}function hW(e,t,r,n,i){var a=!r,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:K.color.neutral00,c=e.tree.root,f=o.parentNode===c?o:o.parentNode||o,h=e.getItemGraphicEl(f.dataIndex),d=f.getLayout(),v=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,g=o.getLayout();a?(r=new g0(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.x=v.x,r.y=v.y):r.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),r.__radialOldRawX=r.__radialRawX,r.__radialOldRawY=r.__radialRawY,r.__radialRawX=g.rawX,r.__radialRawY=g.rawY,n.add(r),e.setItemGraphicEl(t,r),r.__oldX=r.x,r.__oldY=r.y,lt(r,{x:g.x,y:g.y},i);var m=r.getSymbolPath();if(i.get("layout")==="radial"){var x=c.children[0],_=x.getLayout(),b=x.children.length,S=void 0,T=void 0;if(g.x===_.x&&o.isExpand===!0&&x.children.length){var A={x:(x.children[0].getLayout().x+x.children[b-1].getLayout().x)/2,y:(x.children[0].getLayout().y+x.children[b-1].getLayout().y)/2};S=Math.atan2(A.y-_.y,A.x-_.x),S<0&&(S=Math.PI*2+S),T=A.x<_.x,T&&(S=S-Math.PI)}else S=Math.atan2(g.y-_.y,g.x-_.x),S<0&&(S=Math.PI*2+S),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(T=g.x<_.x,T&&(S=S-Math.PI)):(T=g.x>_.x,T||(S=S-Math.PI));var M=T?"left":"right",P=s.getModel("label"),I=P.get("rotate"),k=I*(Math.PI/180),O=m.getTextContent();O&&(m.setTextConfig({position:P.get("position")||M,rotation:I==null?-S:k,origin:"center"}),O.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),N=D==="relative"?Ud(o.getAncestorsIndices(),o.getDescendantIndices()):D==="ancestor"?o.getAncestorsIndices():D==="descendant"?o.getDescendantIndices():null;N&&(De(r).focus=N),fWe(i,o,c,r,v,d,g,n),r.__edge&&(r.onHoverStateChange=function(j){if(j!=="blur"){var z=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);z&&z.hoverState===s0||fw(r.__edge,j)}})}function fWe(e,t,r,n,i,a,o,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),f=e.getOrient(),h=e.get(["lineStyle","curveness"]),d=e.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")t.parentNode&&t.parentNode!==r&&(g||(g=n.__edge=new Nv({shape:iO(c,f,h,i,i)})),lt(g,{shape:iO(c,f,h,a,o)},e));else if(u==="polyline"&&c==="orthogonal"&&t!==r&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var m=t.children,x=[],_=0;_<m.length;_++){var b=m[_].getLayout();x.push([b.x,b.y])}g||(g=n.__edge=new uWe({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:f,forkPosition:d}})),lt(g,{shape:{parentPoint:[o.x,o.y],childPoints:x}},e)}g&&!(u==="polyline"&&!t.isExpand)&&(g.useStyle(Pe({strokeNoScale:!0,fill:null},v)),Dr(g,l,"lineStyle"),of(g),s.add(g))}function dW(e,t,r,n,i){var a=t.tree.root,o=kre(a,e),s=o.source,l=o.sourceLayout,u=t.getItemGraphicEl(e.dataIndex);if(u){var c=t.getItemGraphicEl(s.dataIndex),f=c.__edge,h=u.__edge||(s.isExpand===!1||s.children.length===1?f:void 0),d=n.get("edgeShape"),v=n.get("layout"),g=n.get("orient"),m=n.get(["lineStyle","curveness"]);h&&(d==="curve"?iu(h,{shape:iO(v,g,m,l,l),style:{opacity:0}},n,{cb:function(){r.remove(h)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&iu(h,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){r.remove(h)},removeOpt:i}))}}function kre(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 vW(e,t,r,n,i){var a=e.tree.getNodeByDataIndex(t),o=e.tree.root,s=kre(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};iu(r,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(r),e.setItemGraphicEl(t,null)},removeOpt:l}),r.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){dW(u,e,n,i,l)}),dW(a,e,n,i,l)}function iO(e,t,r,n,i){var a,o,s,l,u,c,f,h;if(e==="radial"){u=n.rawX,f=n.rawY,c=i.rawX,h=i.rawY;var d=bg(u,f),v=bg(u,f+(h-f)*r),g=bg(c,h+(f-h)*r),m=bg(c,h);return{x1:d.x||0,y1:d.y||0,x2:m.x||0,y2:m.y||0,cpx1:v.x||0,cpy1:v.y||0,cpx2:g.x||0,cpy2:g.y||0}}else u=n.x,f=n.y,c=i.x,h=i.y,(t==="LR"||t==="RL")&&(a=u+(c-u)*r,o=f,s=c+(u-c)*r,l=h),(t==="TB"||t==="BT")&&(a=u,o=f+(h-f)*r,s=c,l=h+(f-h)*r);return{x1:u,y1:f,x2:c,y2:h,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}var la=Je();function Ire(e){var t=e.mainData,r=e.datas;r||(r={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,Ore(t,r,e),B(r,function(n){B(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,Fe(hWe,e))})}),t.wrapMethod("cloneShallow",Fe(vWe,e)),B(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Fe(dWe,e))}),_n(r[t.dataType]===t)}function hWe(e,t){if(mWe(this)){var r=re({},la(this).datas);r[this.dataType]=t,Ore(t,r,e)}else $j(t,this.dataType,la(this).mainData,e);return t}function dWe(e,t){return e.struct&&e.struct.update(),t}function vWe(e,t){return B(la(t).datas,function(r,n){r!==t&&$j(r.cloneShallow(),n,t,e)}),t}function pWe(e){var t=la(this).mainData;return e==null||t==null?t:la(t).datas[e]}function gWe(){var e=la(this).mainData;return e==null?[{data:e}]:se(it(la(e).datas),function(t){return{type:t,data:la(e).datas[t]}})}function mWe(e){return la(e).mainData===e}function Ore(e,t,r){la(e).datas={},B(t,function(n,i){$j(n,i,e,r)})}function $j(e,t,r,n){la(r).datas[t]=e,la(e).mainData=r,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=pWe,e.getLinkedDataAll=gWe}var yWe=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){Ae(t)&&(n=r,r=t,t=null),t=t||{},pe(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=r.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,r,n);i==="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 i=this.children[n];i.updateDepthAndHeight(t+1),i.height>r&&(r=i.height)}this.height=r+1},e.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].getNodeById(t);if(a)return a}},e.prototype.contains=function(t){if(t===this)return!0;for(var r=0,n=this.children,i=n.length;r<i;r++){var a=n[r].contains(t);if(a)return a}},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}(),Fj=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,i=r.length;n<i;n++)r[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)r[t.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,r,n){var i=new e(r),a=[],o=1;s(t);function s(c,f){var h=c.value;o=Math.max(o,ae(h)?h.length:1),a.push(c);var d=new yWe(Ir(c.name,""),i);f?xWe(d,f):i.root=d,i._nodes.push(d);var v=c.children;if(v)for(var g=0;g<v.length;g++)s(v[g],d)}i.root.updateDepthAndHeight(0);var l=Hv(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Dn(l,r);return u.initData(a),n&&n(u),Ire({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},e}();function xWe(e,t){var r=t.children;e.parentNode!==t&&(r.push(e),e.parentNode=t)}function Iy(e,t,r){if(e&&We(t,e.type)>=0){var n=r.getData().tree.root,i=e.targetNode;if(pe(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function Ere(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function Vj(e,t){var r=Ere(e);return We(r,t)>=0}function UT(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 _We=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return t.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new tt(i,this,this.ecModel),o=Fj.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},t.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ar("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=UT(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",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:K.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(St);function bWe(e,t,r){for(var n=[e],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)t(a,r)}function qp(e,t){for(var r=[e],n;n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}function wWe(e,t){e.eachSeriesByType("tree",function(r){SWe(r,t)})}function SWe(e,t){var r=jr(e,t).refContainer,n=$t(e.getBoxLayoutParams(),r);e.layoutInfo=n;var i=e.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=cW(function(S,T){return(S.parentNode===T.parentNode?1:2)/S.depth})):(a=n.width,o=n.height,s=cW());var l=e.getData().tree.root,u=l.children[0];if(u){eWe(l),bWe(u,tWe,s),l.hierNode.modifier=-u.hierNode.prelim,qp(u,rWe);var c=u,f=u,h=u;qp(u,function(S){var T=S.getLayout().x;T<c.getLayout().x&&(c=S),T>f.getLayout().x&&(f=S),S.depth>h.depth&&(h=S)});var d=c===f?1:s(c,f)/2,v=d-c.getLayout().x,g=0,m=0,x=0,_=0;if(i==="radial")g=a/(f.getLayout().x+d+v),m=o/(h.depth-1||1),qp(u,function(S){x=(S.getLayout().x+v)*g,_=(S.depth-1)*m;var T=bg(x,_);S.setLayout({x:T.x,y:T.y,rawX:x,rawY:_},!0)});else{var b=e.getOrient();b==="RL"||b==="LR"?(m=o/(f.getLayout().x+d+v),g=a/(h.depth-1||1),qp(u,function(S){_=(S.getLayout().x+v)*m,x=b==="LR"?(S.depth-1)*g:a-(S.depth-1)*g,S.setLayout({x,y:_},!0)})):(b==="TB"||b==="BT")&&(g=a/(f.getLayout().x+d+v),m=o/(h.depth-1||1),qp(u,function(S){x=(S.getLayout().x+v)*g,_=b==="TB"?(S.depth-1)*m:o-(S.depth-1)*m,S.setLayout({x,y:_},!0)}))}}}function TWe(e){e.eachSeriesByType("tree",function(t){var r=t.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");re(s,o)})})}function AWe(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=t.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"tree",query:t},function(i){var a=i.coordinateSystem,o=WT(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function CWe(e){e.registerChartView(cWe),e.registerSeriesModel(_We),e.registerLayout(wWe),e.registerVisual(TWe),AWe(e)}var pW=["treemapZoomToNode","treemapRender","treemapMove"];function MWe(e){for(var t=0;t<pW.length;t++)e.registerAction({type:pW[t],update:"updateView"},lr);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(r,n){n.eachComponent({mainType:"series",subType:"treemap",query:r},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=Iy(r,s,a);if(l){var u=a.getViewRoot();u&&(r.direction=Vj(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function Dre(e){var t=e.getData(),r=t.tree,n={};r.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=bI(e.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var PWe=function(e){q(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 i={name:r.name,children:r.data};Nre(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new tt({itemStyle:o},this,n);a=r.levels=LWe(a,n);var l=se(a||[],function(f){return new tt(f,s,n)},this),u=Fj.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var v=u.getNodeByDataIndex(d),g=v?l[v.depth]:null;return h.parentModel=g||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Ar("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=UT(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},re(this.layoutInfo,r)},t.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=_e(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},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(){Dre(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:K.size.l,top:K.size.xxxl,right:K.size.l,bottom:K.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:K.size.m,emptyItemWidth:25,itemStyle:{color:K.color.backgroundShade,textStyle:{color:K.color.secondary}},emphasis:{itemStyle:{color:K.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:K.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:K.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}(St);function Nre(e){var t=0;B(e.children,function(n){Nre(n);var i=n.value;ae(i)&&(i=i[0]),t+=i});var r=e.value;ae(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ae(e.value)?e.value[0]=r:e.value=r}function LWe(e,t){var r=Pt(t.get("color")),n=Pt(t.get(["aria","decal","decals"]));if(r){e=e||[];var i,a;B(e,function(s){var l=new tt(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),e}}var kWe=8,gW=8,oM=5,IWe=function(){function e(t){this.group=new Me,t.add(this.group)}return e.prototype.render=function(t,r,n,i){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=jr(t,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},v=$t(h,f);this._prepare(n,d,u),this._renderContent(t,d,v,s,l,u,c,i),ET(o,h,f)}},e.prototype._prepare=function(t,r,n){for(var i=t;i;i=i.parentNode){var a=Ir(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+kWe*2,r.emptyItemWidth);r.totalWidth+=s+gW,r.renderList.push({node:i,text:a,width:s})}},e.prototype._renderContent=function(t,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=t.get(["breadcrumb","height"]),h=r.totalWidth,d=r.renderList,v=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],x=m.node,_=m.width,b=m.text;h>n.width&&(h-=_-c,_=c,b=null);var S=new wn({shape:{points:OWe(u,0,_,f,g===d.length-1,g===0)},style:Pe(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new at({style:Mt(o,{text:b})}),textConfig:{position:"inside"},z2:Ev*1e4,onclick:Fe(l,x)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Mt(s,{text:b}),S.ensureState("emphasis").style=v,Wt(S,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(S),EWe(S,t,x),u+=_+gW}},e.prototype.remove=function(){this.group.removeAll()},e}();function OWe(e,t,r,n,i,a){var o=[[i?e:e-oM,t],[e+r,t],[e+r,t+n],[i?e:e-oM,t+n]];return!a&&o.splice(2,0,[e+r+oM,t+n/2]),!i&&o.push([e,t+n/2]),o}function EWe(e,t,r){De(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&&UT(r,t)}}var DWe=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(t,r,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:r,duration:n,delay:i,easing:a}),!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())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();function NWe(){return new DWe}var aO=Me,mW=Xe,yW=3,xW="label",_W="upperLabel",jWe=Ev*10,RWe=Ev*2,BWe=Ev*3,lc=af([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),bW=function(e){var t=lc(e);return t.stroke=t.fill=t.lineWidth=null,t},zw=Je(),zWe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._state="ready",r._storage=Kp(),r}return t.prototype.render=function(r,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(We(o,r)<0)){this.seriesModel=r,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=Iy(a,s,r),u=a&&a.type,c=r.layoutInfo,f=!this._oldTree,h=this._storage,d=u==="treemapRootToNode"&&l&&h?{rootNodeGroup:h.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,v=this._giveContainerGroup(c),g=r.get("animation"),m=this._doRender(v,r,d);g&&!f&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(v,m,r,d):m.renderFinally(),this._resetController(i),this._renderBreadcrumb(r,i,l)}},t.prototype._giveContainerGroup=function(r){var n=this._containerGroup;return n||(n=this._containerGroup=new aO,this._initEvents(n),this.group.add(n)),n.x=r.x,n.y=r.y,n},t.prototype._doRender=function(r,n,i){var a=n.getData().tree,o=this._oldTree,s=Kp(),l=Kp(),u=this._storage,c=[];function f(_,b,S,T){return $We(n,l,u,i,s,c,_,b,S,T)}g(a.root?[a.root]:[],o&&o.root?[o.root]:[],r,a===o||!o,0);var h=m(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,v=a.root.getLayout();v.width===d.width&&v.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:h,renderFinally:x};function g(_,b,S,T,A){T?(b=_,B(_,function(I,k){!I.isRemoved()&&P(k,k)})):new Gs(b,_,M,M).add(P).update(P).remove(Fe(P,null)).execute();function M(I){return I.getId()}function P(I,k){var O=I!=null?_[I]:null,D=k!=null?b[k]:null,N=f(O,D,S,A);N&&g(O&&O.viewChildren||[],D&&D.viewChildren||[],N,T,A+1)}}function m(_){var b=Kp();return _&&B(_,function(S,T){var A=b[T];B(S,function(M){M&&(A.push(M),zw(M).willDelete=!0)})}),b}function x(){B(h,function(_){B(_,function(b){b.parent&&b.parent.remove(b)})}),B(c,function(_){_.invisible=!0,_.dirty()})}},t.prototype._doAnimation=function(r,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(Ae(o)?0:o)||0,u=(Ae(s)?null:s)||"cubicOut",c=NWe();B(n.willDeleteEls,function(f,h){B(f,function(d,v){if(!d.invisible){var g=d.parent,m,x=zw(g);if(a&&a.direction==="drillDown")m=g===a.rootNodeGroup?{shape:{x:0,y:0,width:x.nodeWidth,height:x.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var _=0,b=0;x.willDelete||(_=x.nodeWidth/2,b=x.nodeHeight/2),m=h==="nodeGroup"?{x:_,y:b,style:{opacity:0}}:{shape:{x:_,y:b,width:0,height:0},style:{opacity:0}}}m&&c.add(d,m,l,0,u)}})}),B(this._storage,function(f,h){B(f,function(d,v){var g=n.lastsForAnimation[h][v],m={};g&&(d instanceof Me?g.oldX!=null&&(m.x=d.x,m.y=d.y,d.x=g.oldX,d.y=g.oldY):(g.oldShape&&(m.shape=re({},d.shape),d.setShape(g.oldShape)),g.fadein?(d.setStyle("opacity",0),m.style={opacity:1}):d.style.opacity!==1&&(m.style={opacity:1})),c.add(d,m,l,0,u))})},this),this._state="animating",c.finished(ge(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(r){var n=this,i=this._controller,a=this._controllerHost;a||(this._controllerHost={target:this.group},a=this._controllerHost);var o=this.seriesModel;i||(i=this._controller=new Lf(r.getZr()),i.on("pan",ge(this._onPan,this)),i.on("zoom",ge(this._onZoom,this))),i.enable(o.get("roam"),{api:r,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var c=n._containerGroup;return c?c.getBoundingRect().contain(l-c.x,u-c.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var r=this._controller;this._controllerHost=null,r&&(r.dispose(),r=null)},t.prototype._onPan=function(r){if(this._state!=="animating"&&(Math.abs(r.dx)>yW||Math.abs(r.dy)>yW)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Oe(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var v=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=Wr();Ua(m,m,[-n,-i]),mT(m,m,[v,v]),Ua(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&pw(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new IWe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(Vj(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Kp(),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 i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},t.type="treemap",t}(_t);function Kp(){return{nodeGroup:[],background:[],content:[]}}function $We(e,t,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=e.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,v=c.height,g=c.borderWidth,m=c.invisible,x=o.getRawIndex(),_=s&&s.getRawIndex(),b=o.viewChildren,S=c.upperHeight,T=b&&b.length,A=h.getModel("itemStyle"),M=h.getModel(["emphasis","itemStyle"]),P=h.getModel(["blur","itemStyle"]),I=h.getModel(["select","itemStyle"]),k=A.get("borderRadius")||0,O=le("nodeGroup",aO);if(!O)return;if(l.add(O),O.x=c.x||0,O.y=c.y||0,O.markRedraw(),zw(O).nodeWidth=d,zw(O).nodeHeight=v,c.isAboveViewRoot)return O;var D=le("background",mW,u,RWe);D&&W(O,D,T&&c.upperLabelHeight);var N=h.getModel("emphasis"),j=N.get("focus"),z=N.get("blurScope"),$=N.get("disabled"),U=j==="ancestor"?o.getAncestorsIndices():j==="descendant"?o.getDescendantIndices():j;if(T)gy(O)&&Cc(O,!1),D&&(Cc(D,!$),f.setItemGraphicEl(o.dataIndex,D),cI(D,U,z));else{var F=le("content",mW,u,BWe);F&&Y(O,F),D.disableMorphing=!0,D&&gy(D)&&Cc(D,!1),Cc(O,!$),f.setItemGraphicEl(o.dataIndex,O);var V=h.getShallow("cursor");V&&F.attr("cursor",V),cI(O,U,z)}return O;function W(xe,ie,he){var ue=De(ie);if(ue.dataIndex=o.dataIndex,ue.seriesIndex=e.seriesIndex,ie.setShape({x:0,y:0,width:d,height:v,r:k}),m)Z(ie);else{ie.invisible=!1;var ee=o.getVisual("style"),Ve=ee.stroke,Se=bW(A);Se.fill=Ve;var Ge=lc(M);Ge.fill=M.get("borderColor");var Ye=lc(P);Ye.fill=P.get("borderColor");var vt=lc(I);if(vt.fill=I.get("borderColor"),he){var Vt=d-2*g;J(ie,Ve,ee.opacity,{x:g,y:0,width:Vt,height:S})}else ie.removeTextContent();ie.setStyle(Se),ie.ensureState("emphasis").style=Ge,ie.ensureState("blur").style=Ye,ie.ensureState("select").style=vt,of(ie)}xe.add(ie)}function Y(xe,ie){var he=De(ie);he.dataIndex=o.dataIndex,he.seriesIndex=e.seriesIndex;var ue=Math.max(d-2*g,0),ee=Math.max(v-2*g,0);if(ie.culling=!0,ie.setShape({x:g,y:g,width:ue,height:ee,r:k}),m)Z(ie);else{ie.invisible=!1;var Ve=o.getVisual("style"),Se=Ve.fill,Ge=bW(A);Ge.fill=Se,Ge.decal=Ve.decal;var Ye=lc(M),vt=lc(P),Vt=lc(I);J(ie,Se,Ve.opacity,null),ie.setStyle(Ge),ie.ensureState("emphasis").style=Ye,ie.ensureState("blur").style=vt,ie.ensureState("select").style=Vt,of(ie)}xe.add(ie)}function Z(xe){!xe.invisible&&a.push(xe)}function J(xe,ie,he,ue){var ee=h.getModel(ue?_W:xW),Ve=Ir(h.get("name"),null),Se=ee.getShallow("show");Ur(xe,Nr(h,ue?_W:xW),{defaultText:Se?Ve:null,inheritColor:ie,defaultOpacity:he,labelFetcher:e,labelDataIndex:o.dataIndex});var Ge=xe.getTextContent();if(Ge){var Ye=Ge.style,vt=r0(Ye.padding||0);ue&&(xe.setTextConfig({layoutRect:ue}),Ge.disableLabelLayout=!0),Ge.beforeUpdate=function(){var nr=Math.max((ue?ue.width:xe.shape.width)-vt[1]-vt[3],0),jn=Math.max((ue?ue.height:xe.shape.height)-vt[0]-vt[2],0);(Ye.width!==nr||Ye.height!==jn)&&Ge.setStyle({width:nr,height:jn})},Ye.truncateMinChar=2,Ye.lineOverflow="truncate",ne(Ye,ue,c);var Vt=Ge.getState("emphasis");ne(Vt?Vt.style:null,ue,c)}}function ne(xe,ie,he){var ue=xe?xe.text:null;if(!ie&&he.isLeafRoot&&ue!=null){var ee=e.get("drillDownIcon",!0);xe.text=ee?ee+" "+ue:ue}}function le(xe,ie,he,ue){var ee=_!=null&&r[xe][_],Ve=i[xe];return ee?(r[xe][_]=null,fe(Ve,ee)):m||(ee=new ie,ee instanceof va&&(ee.z2=FWe(he,ue)),ze(Ve,ee)),t[xe][x]=ee}function fe(xe,ie){var he=xe[x]={};ie instanceof aO?(he.oldX=ie.x,he.oldY=ie.y):he.oldShape=re({},ie.shape)}function ze(xe,ie){var he=xe[x]={},ue=o.parentNode,ee=ie instanceof Me;if(ue&&(!n||n.direction==="drillDown")){var Ve=0,Se=0,Ge=i.background[ue.getRawIndex()];!n&&Ge&&Ge.oldShape&&(Ve=Ge.oldShape.width,Se=Ge.oldShape.height),ee?(he.oldX=0,he.oldY=Se):he.oldShape={x:Ve,y:Se,width:0,height:0}}he.fadein=!ee}}function FWe(e,t){return e*jWe+t}var Oy=B,VWe=Le,$w=-1,Hr=function(){function e(t){var r=t.mappingMethod,n=t.type,i=this.option=Ce(t);this.type=n,this.mappingMethod=r,this._normalizeData=HWe[r];var a=e.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(sM(i),GWe(i)):r==="category"?i.categories?WWe(i):sM(i,!0):(_n(r!=="linear"||i.dataExtent),sM(i))}return e.prototype.mapValueToVisual=function(t){var r=this._normalizeData(t);return this._normalizedToVisual(r,t)},e.prototype.getNormalizer=function(){return ge(this._normalizeData,this)},e.listVisualTypes=function(){return it(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(t,r,n){Le(t)?B(t,r,n):r.call(n,t)},e.mapVisual=function(t,r,n){var i,a=ae(t)?[]:Le(t)?{}:(i=!0,null);return e.eachVisual(t,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},e.retrieveVisuals=function(t){var r={},n;return t&&Oy(e.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(r[a]=t[a],n=!0)}),n?r:null},e.prepareVisualTypes=function(t){if(ae(t))t=t.slice();else if(VWe(t)){var r=[];Oy(t,function(n,i){r.push(i)}),t=r}else return[];return t.sort(function(n,i){return i==="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 i,a=1/0,o=0,s=r.length;o<s;o++){var l=r[o].value;if(l!=null){if(l===t||pe(l)&&l===t+"")return o;n&&h(l,o)}}for(var o=0,s=r.length;o<s;o++){var u=r[o],c=u.interval,f=u.close;if(c){if(c[0]===-1/0){if(m_(f[1],t,c[1]))return o}else if(c[1]===1/0){if(m_(f[0],c[0],t))return o}else if(m_(f[0],c[0],t)&&m_(f[1],t,c[1]))return o;n&&h(c[0],o),n&&h(c[1],o)}}if(n)return t===1/0?r.length-1:t===-1/0?0:i;function h(d,v){var g=Math.abs(d-t);g<a&&(a=g,i=v)}},e.visualHandlers={color:{applyVisual:Qp("color"),getColorMapper:function(){var t=this.option;return ge(t.mappingMethod==="category"?function(r,n){return!n&&(r=this._normalizeData(r)),wg.call(this,r)}:function(r,n,i){var a=!!i;return!n&&(r=this._normalizeData(r)),i=Hg(r,t.parsedVisual,i),a?i:sa(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return sa(Hg(t,this.option.parsedVisual),"rgba")},category:wg,piecewise:function(t,r){var n=sO.call(this,r);return n==null&&(n=sa(Hg(t,this.option.parsedVisual),"rgba")),n},fixed:uc}},colorHue:g_(function(t,r){return As(t,r)}),colorSaturation:g_(function(t,r){return As(t,null,r)}),colorLightness:g_(function(t,r){return As(t,null,null,r)}),colorAlpha:g_(function(t,r){return fy(t,r)}),decal:{applyVisual:Qp("decal"),_normalizedToVisual:{linear:null,category:wg,piecewise:null,fixed:null}},opacity:{applyVisual:Qp("opacity"),_normalizedToVisual:oO([0,1])},liftZ:{applyVisual:Qp("liftZ"),_normalizedToVisual:{linear:uc,category:uc,piecewise:uc,fixed:uc}},symbol:{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:wW,category:wg,piecewise:function(t,r){var n=sO.call(this,r);return n==null&&(n=wW.call(this,t)),n},fixed:uc}},symbolSize:{applyVisual:Qp("symbolSize"),_normalizedToVisual:oO([0,1])}},e}();function GWe(e){var t=e.pieceList;e.hasSpecialVisual=!1,B(t,function(r,n){r.originIndex=n,r.visual!=null&&(e.hasSpecialVisual=!0)})}function WWe(e){var t=e.categories,r=e.categoryMap={},n=e.visual;if(Oy(t,function(o,s){r[o]=s}),!ae(n)){var i=[];Le(n)?Oy(n,function(o,s){var l=r[s];i[l??$w]=o}):i[$w]=n,n=jre(e,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete r[t[a]],t.pop())}function sM(e,t){var r=e.visual,n=[];Le(r)?Oy(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(e.type)&&(n[1]=n[0]),jre(e,n)}function g_(e){return{applyVisual:function(t,r,n){var i=this.mapValueToVisual(t);n("color",e(r("color"),i))},_normalizedToVisual:oO([0,1])}}function wW(e){var t=this.option.visual;return t[Math.round(gt(e,[0,1],[0,t.length-1],!0))]||{}}function Qp(e){return function(t,r,n){n(e,this.mapValueToVisual(t))}}function wg(e){var t=this.option.visual;return t[this.option.loop&&e!==$w?e%t.length:e]}function uc(){return this.option.visual[0]}function oO(e){return{linear:function(t){return gt(t,e,this.option.visual,!0)},category:wg,piecewise:function(t,r){var n=sO.call(this,r);return n==null&&(n=gt(t,e,this.option.visual,!0)),n},fixed:uc}}function sO(e){var t=this.option,r=t.pieceList;if(t.hasSpecialVisual){var n=Hr.findPieceIndex(e,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function jre(e,t){return e.visual=t,e.type==="color"&&(e.parsedVisual=se(t,function(r){var n=En(r);return n||[0,0,0,1]})),t}var HWe={linear:function(e){return gt(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,r=Hr.findPieceIndex(e,t,!0);if(r!=null)return gt(r,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return t??$w},fixed:lr};function m_(e,t,r){return e?t<=r:t<r}var UWe="itemStyle",Rre=Je();const ZWe={seriesType:"treemap",reset:function(e){var t=e.getData().tree,r=t.root;r.isRemoved()||Bre(r,{},e.getViewRoot().getAncestors(),e)}};function Bre(e,t,r,n){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(UWe),l=YWe(s,t,n),u=o.ensureUniqueItemVisual(e.dataIndex,"style"),c=s.get("borderColor"),f=s.get("borderColorSaturation"),h;f!=null&&(h=SW(l),c=XWe(f,h)),u.stroke=c;var d=e.viewChildren;if(!d||!d.length)h=SW(l),u.fill=h;else{var v=qWe(e,i,a,s,l,d);B(d,function(g,m){if(g.depth>=r.length||g===r[g.depth]){var x=KWe(i,l,g,m,v,n);Bre(g,x,r,n)}})}}}function YWe(e,t,r){var n=re({},t),i=r.designatedVisualItemStyle;return B(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=e.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function SW(e){var t=lM(e,"color");if(t){var r=lM(e,"colorAlpha"),n=lM(e,"colorSaturation");return n&&(t=As(t,null,null,n)),r&&(t=fy(t,r)),t}}function XWe(e,t){return t!=null?As(t,null,null,e):null}function lM(e,t){var r=e[t];if(r!=null&&r!=="none")return r}function qWe(e,t,r,n,i,a){if(!(!a||!a.length)){var o=uM(t,"color")||i.color!=null&&i.color!=="none"&&(uM(t,"colorAlpha")||uM(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=r.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new Hr(f);return Rre(h).drColorMappingBy=c,h}}}function uM(e,t){var r=e.get(t);return ae(r)&&r.length?{name:t,range:r}:null}function KWe(e,t,r,n,i,a){var o=re({},t);if(i){var s=i.type,l=s==="color"&&Rre(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(e.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Ey=Math.max,Fw=Math.min,TW=nn,Gj=B,zre=["itemStyle","borderWidth"],QWe=["itemStyle","gapWidth"],JWe=["upperLabel","show"],eHe=["upperLabel","height"];const tHe={seriesType:"treemap",reset:function(e,t,r,n){var i=e.option,a=jr(e,r).refContainer,o=$t(e.getBoxLayoutParams(),a),s=i.size||[],l=ve(TW(o.width,s[0]),a.width),u=ve(TW(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=Iy(n,f,e),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,v=e.getViewRoot(),g=Ere(v);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?sHe(e,h,v,l,u):d?[d.width,d.height]:[l,u],x=i.sort;x&&x!=="asc"&&x!=="desc"&&(x="desc");var _={squareRatio:i.squareRatio,sort:x,leafDepth:i.leafDepth};v.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};v.setLayout(b),$re(v,_,!1,0),b=v.getLayout(),Gj(g,function(T,A){var M=(g[A+1]||v).getValue();T.setLayout(re({dataExtent:[M,M],borderWidth:0,upperHeight:0},b))})}var S=e.getData().tree.root;S.setLayout(lHe(o,d,h),!0),e.setLayoutInfo(o),Fre(S,new Oe(-o.x,-o.y,r.getWidth(),r.getHeight()),g,v,0)}};function $re(e,t,r,n){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),l=s.get(zre),u=s.get(QWe)/2,c=Vre(s),f=Math.max(l,c),h=l-u,d=f-u;e.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=Ey(i-2*h,0),a=Ey(a-h-d,0);var v=i*a,g=rHe(e,s,v,t,r,n);if(g.length){var m={x:h,y:d,width:i,height:a},x=Fw(i,a),_=1/0,b=[];b.area=0;for(var S=0,T=g.length;S<T;){var A=g[S];b.push(A),b.area+=A.getLayout().area;var M=oHe(b,x,t.squareRatio);M<=_?(S++,_=M):(b.area-=b.pop().getLayout().area,AW(b,x,m,u,!1),x=Fw(m.width,m.height),b.length=b.area=0,_=1/0)}if(b.length&&AW(b,x,m,u,!0),!r){var P=s.get("childrenVisibleMin");P!=null&&v<P&&(r=!0)}for(var S=0,T=g.length;S<T;S++)$re(g[S],t,r,n+1)}}}function rHe(e,t,r,n,i,a){var o=e.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return e.viewChildren=[];o=ht(o,function(d){return!d.isRemoved()}),iHe(o,s);var u=aHe(t,o,s);if(u.sum===0)return e.viewChildren=[];if(u.sum=nHe(t,r,u.sum,s,o),u.sum===0)return e.viewChildren=[];for(var c=0,f=o.length;c<f;c++){var h=o[c].getValue()/u.sum*r;o[c].setLayout({area:h})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}function nHe(e,t,r,n,i){if(!n)return r;for(var a=e.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*t<a&&(s=l,r-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),r}function iHe(e,t){return t&&e.sort(function(r,n){var i=t==="asc"?r.getValue()-n.getValue():n.getValue()-r.getValue();return i===0?t==="asc"?r.dataIndex-n.dataIndex:n.dataIndex-r.dataIndex:i}),e}function aHe(e,t,r){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=e.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&r?(s=[t[t.length-1].getValue(),t[0].getValue()],r==="asc"&&s.reverse()):(s=[1/0,-1/0],Gj(t,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function oHe(e,t,r){for(var n=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=e.area*e.area,u=t*t*r;return l?Ey(u*n/l,l/(u*i)):1/0}function AW(e,t,r,n,i){var a=t===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=t?e.area/t:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=e.length;f<h;f++){var d=e[f],v={},g=c?d.getLayout().area/c:0,m=v[l[o]]=Ey(c-2*n,0),x=r[s[a]]+r[l[a]]-u,_=f===h-1||x<g?x:g,b=v[l[a]]=Ey(_-2*n,0);v[s[o]]=r[s[o]]+Fw(n,m/2),v[s[a]]=u+Fw(n,b/2),u+=_,d.setLayout(v,!0)}r[s[o]]+=c,r[l[o]]-=c}function sHe(e,t,r,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===r)return o;for(var s,l=n*i,u=l*e.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,f=s.children,h=0,d=f.length;h<d;h++)c+=f[h].getValue();var v=a.getValue();if(v===0)return o;u*=c/v;var g=s.getModel(),m=g.get(zre),x=Math.max(m,Vre(g));u+=4*m*m+(3*m+x)*Math.pow(u,.5),u>Jk&&(u=Jk),a=s}u<l&&(u=l);var _=Math.pow(u/l,.5);return[n*_,i*_]}function lHe(e,t,r){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!r)return n;var i=r.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function Fre(e,t,r,n,i){var a=e.getLayout(),o=r[i],s=o&&o===e;if(!(o&&!s||i===r.length&&e!==n)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new Oe(t.x-a.x,t.y-a.y,t.width,t.height);Gj(e.viewChildren||[],function(u){Fre(u,l,r,n,i+1)})}}function Vre(e){return e.get(JWe)?e.get(eHe):0}function uHe(e){e.registerSeriesModel(PWe),e.registerChartView(zWe),e.registerVisual(ZWe),e.registerLayout(tHe),MWe(e)}function cHe(e){var t=e.findComponents({mainType:"legend"});!t||!t.length||e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){ot(u)&&(u=o[u]);for(var c=0;c<t.length;c++)if(!t[c].isSelected(u))return!1}return!0})})}function fHe(e){var t={};e.eachSeriesByType("graph",function(r){var n=r.getCategoriesData(),i=r.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=r.getColorFromPalette(s,t)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],f=0;f<c.length;f++){var h=l.getShallow(c[f],!0);h!=null&&n.setItemVisual(o,c[f],h)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){pe(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");re(c,u);for(var f=["symbol","symbolSize","symbolKeepAspect"],h=0;h<f.length;h++)i.setItemVisual(o,f[h],n.getItemVisual(l,f[h]))}})})}function y_(e){return e instanceof Array||(e=[e,e]),e}function hHe(e){e.eachSeriesByType("graph",function(t){var r=t.getGraph(),n=t.getEdgeData(),i=y_(t.get("edgeSymbol")),a=y_(t.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",t.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=r.getEdgeByIndex(o),u=y_(s.getShallow("symbol",!0)),c=y_(s.getShallow("symbolSize",!0)),f=s.getModel("lineStyle").getLineStyle(),h=n.ensureUniqueItemVisual(o,"style");switch(re(h,f),h.stroke){case"source":{var d=l.node1.getVisual("style");h.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");h.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var lO="-->",ZT=function(e){return e.get("autoCurveness")||null},Gre=function(e,t){var r=ZT(e),n=20,i=[];if(ot(r))n=r;else if(ae(r)){e.__curvenessList=r;return}t>n&&(n=t);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},Dy=function(e,t,r){var n=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[r.uid,n,i].join(lO)},Wre=function(e){var t=e.split(lO);return[t[0],t[2],t[1]].join(lO)},dHe=function(e,t){var r=Dy(e.node1,e.node2,t);return t.__edgeMap[r]},vHe=function(e,t){var r=uO(Dy(e.node1,e.node2,t),t),n=uO(Dy(e.node2,e.node1,t),t);return r+n},uO=function(e,t){var r=t.__edgeMap;return r[e]?r[e].length:0};function pHe(e){ZT(e)&&(e.__curvenessList=[],e.__edgeMap={},Gre(e))}function gHe(e,t,r,n){if(ZT(r)){var i=Dy(e,t,r),a=r.__edgeMap,o=a[Wre(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function Wj(e,t,r,n){var i=ZT(t),a=ae(i);if(!i)return null;var o=dHe(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===r){s=l;break}var u=vHe(e,t);Gre(t,u),e.lineStyle=e.lineStyle||{};var c=Dy(e.node1,e.node2,t),f=t.__curvenessList,h=a||u%2?0:1;if(o.isForward)return f[h+s];var d=Wre(c),v=uO(d,t),g=f[s+v+h];return n?a?i&&i[0]===0?(v+h)%2?g:-g:((v%2?0:1)+h)%2?g:-g:(v+h)%2?g:-g:f[s+v+h]}function Hre(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view")){var r=e.getGraph();r.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),Hj(r,e)}}function Hj(e,t){e.eachEdge(function(r,n){var i=fi(r.getModel().get(["lineStyle","curveness"]),-Wj(r,t,n,!0),0),a=Io(r.node1.getLayout()),o=Io(r.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),r.setLayout(s)})}function mHe(e,t){e.eachSeriesByType("graph",function(r){var n=r.get("layout"),i=r.coordinateSystem;if(i&&i.type!=="view"){var a=r.getData(),o=[];B(i.dimensions,function(h){o=o.concat(a.mapDimensionsAll(h))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var f=a.get(o[c],s);isNaN(f)||(u=!0),l.push(f)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}Hj(a.graph,r)}else(!n||n==="none")&&Hre(r)})}function Sg(e){var t=e.coordinateSystem;if(t.type!=="view")return 1;var r=e.option.nodeScaleRatio,n=t.scaleX,i=t.getZoom(),a=(i-1)*r+1;return a/n}function Tg(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var CW=Math.PI,cM=[];function Uj(e,t,r,n){var i=e.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=e.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,f=o.count();if(o.setLayout({cx:l,cy:u}),!!f){if(r){var h=i.pointToData(n),d=h[0],v=h[1],g=[d-l,v-u];wf(g,g),Fg(g,g,c),r.setLayout([l+g[0],u+g[1]],!0);var m=e.get(["circular","rotateLabel"]);Ure(r,m,l,u)}yHe[t](e,s,o,c,l,u,f),s.eachEdge(function(x,_){var b=fi(x.getModel().get(["lineStyle","curveness"]),Wj(x,e,_),0),S=Io(x.node1.getLayout()),T=Io(x.node2.getLayout()),A,M=(S[0]+T[0])/2,P=(S[1]+T[1])/2;+b&&(b*=3,A=[l*b+M*(1-b),u*b+P*(1-b)]),x.setLayout([S,T,A])})}}}var yHe={value:function(e,t,r,n,i,a,o){var s=0,l=r.getSum("value"),u=Math.PI*2/(l||o);t.eachNode(function(c){var f=c.getValue("value"),h=u*(l?f:1)/2;s+=h,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=h})},symbolSize:function(e,t,r,n,i,a,o){var s=0;cM.length=o;var l=Sg(e);t.eachNode(function(f){var h=Tg(f);isNaN(h)&&(h=2),h<0&&(h=0),h*=l;var d=Math.asin(h/2/n);isNaN(d)&&(d=CW/2),cM[f.dataIndex]=d,s+=d*2});var u=(2*CW-s)/o/2,c=0;t.eachNode(function(f){var h=u+cM[f.dataIndex];c+=h,(!f.getLayout()||!f.getLayout().fixed)&&f.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=h})}};function Ure(e,t,r,n){var i=e.getGraphicEl();if(i){var a=e.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(t){var l=e.getLayout(),u=Math.atan2(l[1]-n,l[0]-r);u<0&&(u=Math.PI*2+u);var c=l[0]<r;c&&(u=u-Math.PI);var f=c?"left":"right";s.setTextConfig({rotation:-u,position:f,origin:"center"});var h=s.ensureState("emphasis");re(h.textConfig||(h.textConfig={}),{position:f})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function xHe(e){e.eachSeriesByType("graph",function(t){t.get("layout")==="circular"&&Uj(t,"symbolSize")})}var lh=X1;function _He(e,t,r){for(var n=e,i=t,a=r.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=r.gravity==null?.1:r.gravity,c=0;c<n.length;c++){var f=n[c];f.p||(f.p=yu(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),f.pp=Io(f.p),f.edges=null}var h=r.friction==null?.6:r.friction,d=h,v,g;return{warmUp:function(){d=h*.8},setFixed:function(m){n[m].fixed=!0},setUnfixed:function(m){n[m].fixed=!1},beforeStep:function(m){v=m},afterStep:function(m){g=m},step:function(m){v&&v(n,i);for(var x=[],_=n.length,b=0;b<i.length;b++){var S=i[b];if(!S.ignoreForceLayout){var T=S.n1,A=S.n2;Pl(x,A.p,T.p);var M=ly(x)-S.d,P=A.w/(T.w+A.w);isNaN(P)&&(P=0),wf(x,x),!T.fixed&&lh(T.p,T.p,x,P*M*d),!A.fixed&&lh(A.p,A.p,x,-(1-P)*M*d)}}for(var b=0;b<_;b++){var I=n[b];I.fixed||(Pl(x,l,I.p),lh(I.p,I.p,x,u*d))}for(var b=0;b<_;b++)for(var T=n[b],k=b+1;k<_;k++){var A=n[k];Pl(x,A.p,T.p);var M=ly(x);M===0&&(gT(x,Math.random()-.5,Math.random()-.5),M=1);var O=(T.rep+A.rep)/M/M;!T.fixed&&lh(T.pp,T.pp,x,O),!A.fixed&&lh(A.pp,A.pp,x,-O)}for(var D=[],b=0;b<_;b++){var I=n[b];I.fixed||(Pl(D,I.p,I.pp),lh(I.p,I.p,D,d),Pn(I.pp,I.p))}d=d*.992;var N=d<.01;g&&g(n,i,N),m&&m(N)}}}function bHe(e){e.eachSeriesByType("graph",function(t){var r=t.coordinateSystem;if(!(r&&r.type!=="view"))if(t.get("layout")==="force"){var n=t.preservedPoints||{},i=t.getGraph(),a=i.data,o=i.edgeData,s=t.getModel("force"),l=s.get("initLayout");t.preservedPoints?a.each(function(b){var S=a.getId(b);a.setItemLayout(b,n[S]||[NaN,NaN])}):!l||l==="none"?Hre(t):l==="circular"&&Uj(t,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),f=s.get("repulsion"),h=s.get("edgeLength"),d=ae(f)?f:[f,f],v=ae(h)?h:[h,h];v=[v[1],v[0]];var g=a.mapArray("value",function(b,S){var T=a.getItemLayout(S),A=gt(b,u,d);return isNaN(A)&&(A=(d[0]+d[1])/2),{w:A,rep:A,fixed:a.getItemModel(S).get("fixed"),p:!T||isNaN(T[0])||isNaN(T[1])?null:T}}),m=o.mapArray("value",function(b,S){var T=i.getEdgeByIndex(S),A=gt(b,c,v);isNaN(A)&&(A=(v[0]+v[1])/2);var M=T.getModel(),P=fi(T.getModel().get(["lineStyle","curveness"]),-Wj(T,t,S,!0),0);return{n1:g[T.node1.dataIndex],n2:g[T.node2.dataIndex],d:A,curveness:P,ignoreForceLayout:M.get("ignoreForceLayout")}}),x=r.getBoundingRect(),_=_He(g,m,{rect:x,gravity:s.get("gravity"),friction:s.get("friction")});_.beforeStep(function(b,S){for(var T=0,A=b.length;T<A;T++)b[T].fixed&&Pn(b[T].p,i.getNodeByIndex(T).getLayout())}),_.afterStep(function(b,S,T){for(var A=0,M=b.length;A<M;A++)b[A].fixed||i.getNodeByIndex(A).setLayout(b[A].p),n[a.getId(A)]=b[A].p;for(var A=0,M=S.length;A<M;A++){var P=S[A],I=i.getEdgeByIndex(A),k=P.n1.p,O=P.n2.p,D=I.getLayout();D=D?D.slice():[],D[0]=D[0]||[],D[1]=D[1]||[],Pn(D[0],k),Pn(D[1],O),+P.curveness&&(D[2]=[(k[0]+O[0])/2-(k[1]-O[1])*P.curveness,(k[1]+O[1])/2-(O[0]-k[0])*P.curveness]),I.setLayout(D)}}),t.forceLayout=_,t.preservedPoints=n,_.step()}else t.forceLayout=null})}function wHe(e,t,r){var n=jr(e,t),i=re(e.getBoxLayoutParams(),{aspect:r}),a=$t(i,n.refContainer);return _J(e,a,r)}function SHe(e,t){var r=[];return e.eachSeriesByType("graph",function(n){d0({targetModel:n,coordSysType:"view",coordSysProvider:i,isDefaultDataCoordSys:!0});function i(){var a=n.getData(),o=a.mapArray(function(v){var g=a.getItemModel(v);return[+g.get("x"),+g.get("y")]}),s=[],l=[];AT(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=wHe(n,t,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var f=l[0]-s[0],h=l[1]-s[1],d=new kf(null,{api:t,ecModel:e});return d.zoomLimit=n.get("scaleLimit"),d.setBoundingRect(s[0],s[1],f,h),d.setViewRect(c.x,c.y,c.width,c.height),d.setCenter(n.get("center")),d.setZoom(n.get("zoom")),r.push(d),d}}),r}var MW=yr.prototype,fM=Nv.prototype,Zre=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Zre);function hM(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var Yre=function(e){q(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:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Zre},t.prototype.buildPath=function(r,n){hM(n)?MW.buildPath.call(this,r,n):fM.buildPath.call(this,r,n)},t.prototype.pointAt=function(r){return hM(this.shape)?MW.pointAt.call(this,r):fM.pointAt.call(this,r)},t.prototype.tangentAt=function(r){var n=this.shape,i=hM(n)?[n.x2-n.x1,n.y2-n.y1]:fM.tangentAt.call(this,r);return wf(i,i)},t}(rt),dM=["fromSymbol","toSymbol"];function PW(e){return"_"+e+"Type"}function LW(e,t,r){var n=t.getItemVisual(r,e);if(!n||n==="none")return n;var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Wv(i),u=Mf(o||0,l);return n+l+u+(a||"")+(s||"")}function kW(e,t,r){var n=t.getItemVisual(r,e);if(!(!n||n==="none")){var i=t.getItemVisual(r,e+"Size"),a=t.getItemVisual(r,e+"Rotate"),o=t.getItemVisual(r,e+"Offset"),s=t.getItemVisual(r,e+"KeepAspect"),l=Wv(i),u=Mf(o||0,l),c=xr(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=e,c}}function THe(e){var t=new Yre({name:"line",subPixelOptimize:!0});return cO(t.shape,e),t}function cO(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 Zj=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createLine(r,n,i),a}return t.prototype._createLine=function(r,n,i){var a=r.hostModel,o=r.getItemLayout(n),s=r.getItemVisual(n,"z2"),l=THe(o);l.shape.percent=0,Nt(l,{z2:be(s,0),shape:{percent:1}},a,n),this.add(l),B(dM,function(u){var c=kW(u,r,n);this.add(c),this[PW(u)]=LW(u,r,n)},this),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=r.getItemLayout(n),l={shape:{}};cO(l.shape,s),lt(o,l,a,n),B(dM,function(u){var c=LW(u,r,n),f=PW(u);if(this[f]!==c){this.remove(this.childOfName(u));var h=kW(u,r,n);this.add(h)}this[f]=c},this),this._updateCommonStl(r,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(r,n,i){var a=r.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,f=i&&i.emphasisDisabled,h=i&&i.focus,d=i&&i.blurScope;if(!i||r.hasItemOption){var v=r.getItemModel(n),g=v.getModel("emphasis");s=g.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),f=g.get("disabled"),h=g.get("focus"),d=g.get("blurScope"),c=Nr(v)}var m=r.getItemVisual(n,"style"),x=m.stroke;o.useStyle(m),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,B(dM,function(A){var M=this.childOfName(A);if(M){M.setColor(x),M.style.opacity=m.opacity;for(var P=0;P<Yn.length;P++){var I=Yn[P],k=o.getState(I);if(k){var O=k.style||{},D=M.ensureState(I),N=D.style||(D.style={});O.stroke!=null&&(N[M.__isEmptyBrush?"stroke":"fill"]=O.stroke),O.opacity!=null&&(N.opacity=O.opacity)}}M.markRedraw()}},this);var _=a.getRawValue(n);Ur(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(A,M){return a.getFormattedLabel(A,M,r.dataType)}},inheritColor:x||K.color.neutral99,defaultOpacity:m.opacity,defaultText:(_==null?r.getName(n):isFinite(_)?mr(_):_)+""});var b=this.getTextContent();if(b){var S=c.normal;b.__align=b.style.align,b.__verticalAlign=b.style.verticalAlign,b.__position=S.get("position")||"middle";var T=S.get("distance");ae(T)||(T=[T,T]),b.__labelDistance=T}this.setTextConfig({position:null,local:!0,inside:!1}),Wt(this,h,d,f)},t.prototype.highlight=function(){Fs(this)},t.prototype.downplay=function(){Vs(this)},t.prototype.updateLayout=function(r,n){this.setLinePoints(r.getItemLayout(n))},t.prototype.setLinePoints=function(r){var n=this.childOfName("line");cO(n.shape,r),n.dirty()},t.prototype.beforeUpdate=function(){var r=this,n=r.childOfName("fromSymbol"),i=r.childOfName("toSymbol"),a=r.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=r.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),f=l.pointAt(u),h=Pl([],f,c);wf(h,h);function d(k,O){var D=k.__specifiedRotation;if(D==null){var N=l.tangentAt(O);k.attr("rotation",(O===1?-1:1)*Math.PI/2-Math.atan2(N[1],N[0]))}else k.attr("rotation",D)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(f),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var v=void 0,g=void 0,m=a.__labelDistance,x=m[0]*o,_=m[1]*o,b=u/2,S=l.tangentAt(b),T=[S[1],-S[0]],A=l.pointAt(b);T[1]>0&&(T[0]=-T[0],T[1]=-T[1]);var M=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var P=-Math.atan2(S[1],S[0]);f[0]<c[0]&&(P=Math.PI+P),a.rotation=P}var I=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":I=-_,g="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":I=_,g="top";break;default:I=0,g="middle"}switch(a.__position){case"end":a.x=h[0]*x+f[0],a.y=h[1]*_+f[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*x+c[0],a.y=-h[1]*_+c[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=x*M+c[0],a.y=c[1]+I,v=S[0]<0?"right":"left",a.originX=-x*M,a.originY=-I;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=A[0],a.y=A[1]+I,v="center",a.originY=-I;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-x*M+f[0],a.y=f[1]+I,v=S[0]>=0?"right":"left",a.originX=x*M,a.originY=-I;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||v})}},t}(Me),Yj=function(){function e(t){this.group=new Me,this._LineCtor=t||Zj}return e.prototype.updateData=function(t){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=IW(t);t.diff(a).add(function(s){r._doAdd(t,s,o)}).update(function(s,l){r._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).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=IW(t),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,r){this._progressiveEls=[];function n(s){!s.isGroup&&!AHe(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=r.getItemLayout(i);if(vM(a)){var o=new this._LineCtor(r,i,this._seriesScope);o.traverse(n),this.group.add(o),r.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(t){xu(this._progressiveEls||this.group,t)},e.prototype._doAdd=function(t,r,n){var i=t.getItemLayout(r);if(vM(i)){var a=new this._LineCtor(t,r,n);t.setItemGraphicEl(r,a),this.group.add(a)}},e.prototype._doUpdate=function(t,r,n,i,a){var o=t.getItemGraphicEl(n);if(!vM(r.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(r,i,a):o=new this._LineCtor(r,i,a),r.setItemGraphicEl(i,o),this.group.add(o)},e}();function AHe(e){return e.animators&&e.animators.length>0}function IW(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:Nr(t)}}function OW(e){return isNaN(e[0])||isNaN(e[1])}function vM(e){return e&&!OW(e[0])&&!OW(e[1])}var pM=[],gM=[],mM=[],uh=rn,yM=Hl,EW=Math.abs;function DW(e,t,r){for(var n=e[0],i=e[1],a=e[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){pM[0]=uh(n[0],i[0],a[0],c),pM[1]=uh(n[1],i[1],a[1],c);var f=EW(yM(pM,t)-l);f<o&&(o=f,s=c)}for(var h=0;h<32;h++){var d=s+u;gM[0]=uh(n[0],i[0],a[0],s),gM[1]=uh(n[1],i[1],a[1],s),mM[0]=uh(n[0],i[0],a[0],d),mM[1]=uh(n[1],i[1],a[1],d);var f=yM(gM,t)-l;if(EW(f)<.01)break;var v=yM(mM,t)-l;u/=2,f<0?v>=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function xM(e,t){var r=[],n=uy,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Io(u[0]),Io(u[1])],u[2]&&u.__original.push(Io(u[2])));var h=u.__original;if(u[2]!=null){if(Pn(i[0],h[0]),Pn(i[1],h[2]),Pn(i[2],h[1]),c&&c!=="none"){var d=Tg(s.node1),v=DW(i,h[0],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],v,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var d=Tg(s.node2),v=DW(i,h[1],d*t);n(i[0][0],i[1][0],i[2][0],v,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],v,r),i[1][1]=r[1],i[2][1]=r[2]}Pn(u[0],i[0]),Pn(u[1],i[2]),Pn(u[2],i[1])}else{if(Pn(a[0],h[0]),Pn(a[1],h[1]),Pl(o,a[1],a[0]),wf(o,o),c&&c!=="none"){var d=Tg(s.node1);X1(a[0],a[0],o,d*t)}if(f&&f!=="none"){var d=Tg(s.node2);X1(a[1],a[1],o,-d*t)}Pn(u[0],a[0]),Pn(u[1],a[1])}})}var Xre=Je();function CHe(e){if(e)return Xre(e).bridge}function NW(e,t){e&&(Xre(e).bridge=t)}function jW(e){return e.type==="view"}var MHe=function(e){q(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){var i=new m0,a=new Yj,o=this.group,s=new Me;this._controller=new Lf(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(jW(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):lt(this._mainGroup,f,r)}xM(r.getGraph(),Sg(r));var h=r.getData();u.updateData(h);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var v=r.forceLayout,g=r.get(["force","layoutAnimation"]);v&&(s=!0,this._startForceLayoutIteration(v,i,g));var m=r.get("layout");h.graph.eachNode(function(S){var T=S.dataIndex,A=S.getGraphicEl(),M=S.getModel();if(A){A.off("drag").off("dragend");var P=M.get("draggable");P&&A.on("drag",function(k){switch(m){case"force":v.warmUp(),!a._layouting&&a._startForceLayoutIteration(v,i,g),v.setFixed(T),h.setItemLayout(T,[A.x,A.y]);break;case"circular":h.setItemLayout(T,[A.x,A.y]),S.setLayout({fixed:!0},!0),Uj(r,"symbolSize",S,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(T,[A.x,A.y]),Hj(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){v&&v.setUnfixed(T)}),A.setDraggable(P,!!M.get("cursor"));var I=M.get(["emphasis","focus"]);I==="adjacency"&&(De(A).focus=S.getAdjacentDataIndices())}}),h.graph.eachEdge(function(S){var T=S.getGraphicEl(),A=S.getModel().get(["emphasis","focus"]);T&&A==="adjacency"&&(De(T).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var x=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),b=h.getLayout("cy");h.graph.eachNode(function(S){Ure(S,x,_,b)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!jW(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(r,n,i){this._active&&(jj(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(r,n,i){this._active&&(Rj(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),xM(r.getGraph(),Sg(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Sg(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},t.prototype.updateLayout=function(r){this._active&&(xM(r.getGraph(),Sg(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 i=CHe(r);if(i)return{bridge:i,coordSys:n}}},t.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new Me,l=i.group.children(),u=a.group.children(),c=new Me,f=new Me;s.add(f),s.add(c);for(var h=0;h<l.length;h++){var d=l[h],v=d.children()[0],g=d.x,m=d.y,x=Ce(v.shape),_=re(x,{width:v.scaleX,height:v.scaleY,x:g-v.scaleX/2,y:m-v.scaleY/2}),b=Ce(v.style),S=new v.constructor({shape:_,style:b,z2:151});f.add(S)}for(var h=0;h<u.length;h++){var d=u[h],T=d.children()[0],b=Ce(T.style),_=Ce(T.shape),A=new Yre({style:b,shape:_,z2:151});c.add(A)}o.bridge.renderContent({api:n,roamType:r.get("roam"),viewportRect:null,group:s,targetTrans:o.coordSys.transform})}},t.type="graph",t}(_t);function ch(e){return"_EC_"+e}var PHe=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 i=new cc(t,r);return i.hostGraph=this,this.nodes.push(i),n[ch(t)]=i,i}},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 i=this._nodesMap,a=this._edgesMap;if(ot(t)&&(t=this.nodes[t]),ot(r)&&(r=this.nodes[r]),t instanceof cc||(t=i[ch(t)]),r instanceof cc||(r=i[ch(r)]),!(!t||!r)){var o=t.id+"-"+r.id,s=new qre(t,r,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),r.inEdges.push(s)),t.edges.push(s),t!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},e.prototype.getEdgeByIndex=function(t){var r=this.edgeData.getRawIndex(t);return this.edges[r]},e.prototype.getEdge=function(t,r){t instanceof cc&&(t=t.id),r instanceof cc&&(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,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(r,n[a],a)},e.prototype.eachEdge=function(t,r){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&t.call(r,n[a],a)},e.prototype.breadthFirstTraverse=function(t,r,n,i){if(r instanceof cc||(r=this._nodesMap[ch(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(i,r,null))for(var s=[r];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],f=c.node1===l?c.node2:c.node1;if(!f.__visited){if(t.call(i,f,l))return;s.push(f),f.__visited=!0}}}},e.prototype.update=function(){for(var t=this.data,r=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)n[t.getRawIndex(a)].dataIndex=a;r.filterSelf(function(s){var l=i[r.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=r.count();a<o;a++)i[r.getRawIndex(a)].dataIndex=a},e.prototype.clone=function(){for(var t=new e(this._directed),r=this.nodes,n=this.edges,i=0;i<r.length;i++)t.addNode(r[i].id,r[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),cc=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=_e(),r=_e(),n=0,i=this.edges.length;n<i;n++){var a=this.edges[n];if(!(a.dataIndex<0)){t.set(a.dataIndex,!0);for(var o=[a.node1],s=[a.node2],l=0;l<o.length;){var u=o[l];l++,r.set(u.dataIndex,!0);for(var c=u.inEdges,f=0,h=c.length,d=void 0,v=void 0;f<h;f++)d=c[f],v=d.dataIndex,v>=0&&!t.hasKey(v)&&(t.set(v,!0),o.push(d.node1))}for(l=0;l<s.length;){var g=s[l];l++,r.set(g.dataIndex,!0);for(var m=g.outEdges,f=0,x=m.length,_=void 0,b=void 0;f<x;f++)_=m[f],b=_.dataIndex,b>=0&&!t.hasKey(b)&&(t.set(b,!0),s.push(_.node2))}}}return{edge:t.keys(),node:r.keys()}},e}(),qre=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=_e(),r=_e();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,r.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,c=void 0,f=void 0;l<u;l++)c=o.inEdges[l],f=c.dataIndex,f>=0&&!t.hasKey(f)&&(t.set(f,!0),n.push(c.node1))}for(a=0;a<i.length;){var h=i[a];a++,r.set(h.dataIndex,!0);for(var d=h.outEdges,l=0,u=d.length,v=void 0,g=void 0;l<u;l++)v=h.outEdges[l],g=v.dataIndex,g>=0&&!t.hasKey(g)&&(t.set(g,!0),i.push(v.node2))}return{edge:t.keys(),node:r.keys()}},e}();function Kre(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)}}}fr(cc,Kre("hostGraph","data"));fr(qre,Kre("hostGraph","edgeData"));function Xj(e,t,r,n,i){for(var a=new PHe(n),o=0;o<e.length;o++)a.addNode(nn(e[o].id,e[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var c=t[o],f=c.source,h=c.target;a.addEdge(f,h,u)&&(l.push(c),s.push(nn(Ir(c.id,null),f+" > "+h)),u++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar"||d==="matrix")v=Yo(e,r);else{var g=Fv.get(d),m=g?g.dimensions||[]:[];We(m,"value")<0&&m.concat(["value"]);var x=Hv(e,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;v=new Dn(x,r),v.initData(e)}var _=new Dn(["value"],r);return _.initData(l,s),i&&i(v,_),Ire({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var LHe=function(e){q(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 i(){return n._categoriesData}this.legendVisualProvider=new qv(i,i),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),rf(r,"edgeLabel",["show"])},t.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){pHe(this);var s=Xj(a,i,this,!0,l);return B(s.edges,function(u){gHe(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(v){var g=o._categoriesModels,m=v.getShallow("category"),x=g[m];return x&&(x.parentModel=v.parentModel,v.parentModel=x),v});var f=tt.prototype.getModel;function h(v,g){var m=f.call(this,v,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=h,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var g=v.slice();return v[0]==="label"?g[0]="edgeLabel":v[1]==="label"&&(g[1]="edgeLabel"),g}return v}}},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,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Ar("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=eee({series:this,dataIndex:r,multipleSeries:n});return f},t.prototype._updateCategoriesData=function(){var r=se(this.option.categories||[],function(i){return i.value!=null?i:re({value:0},i)}),n=new Dn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",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:K.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:K.color.primary}}},t}(St);function kHe(e){e.registerChartView(MHe),e.registerSeriesModel(LHe),e.registerProcessor(cHe),e.registerVisual(fHe),e.registerVisual(hHe),e.registerLayout(mHe),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,xHe),e.registerLayout(bHe),e.registerCoordinateSystem("graphView",{dimensions:kf.dimensions,create:SHe}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},lr),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},lr),e.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",query:t},function(i){var a=n.getViewOfSeriesModel(i);a&&(t.dx!=null&&t.dy!=null&&a.updateViewOnPan(i,n,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&a.updateViewOnZoom(i,n,t));var o=i.coordinateSystem,s=WT(o,t,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var RW=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;De(a).dataType="node",a.z2=2;var o=new at;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return t.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=re(Ao(u.getModel("itemStyle"),f,!0),f),d=this;if(isNaN(h.startAngle)){d.setShape(h);return}a?d.setShape(h):lt(d,{shape:h},l,n);var v=re(Ao(u.getModel("itemStyle"),f,!0),f);o.setShape(v),o.useStyle(r.getItemVisual(n,"style")),Dr(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),Dr(d,u,"itemStyle");var g=c.get("focus");Wt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=Nr(n),h=i.getVisual("style");Ur(a,f,{labelFetcher:{getFormattedLabel:function(_,b,S,T,A,M){return r.getFormattedLabel(_,b,"node",T,fi(A,f.normal&&f.normal.get("formatter"),n.get("name")),M)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",v=c.get("distance")||0,g;d==="outside"?g=o.r+v:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",x=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:x}})},t}(bn),IHe=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;return De(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return t.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},t.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),d=f.getModel("emphasis"),v=d.get("focus"),g=re(Ao(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),BW(m,l,r,h)):(pa(m),BW(m,l,r,h),lt(m,{shape:g},s,i)),Wt(this,v==="adjacency"?l.getAdjacentDataIndices():v,d.get("blurScope"),d.get("disabled")),Dr(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},t}(rt);function BW(e,t,r,n){var i=t.node1,a=t.node2,o=e.style;e.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(pe(l)&&pe(u)){var c=e.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,v=(c.t1[1]+c.t2[1])/2;o.fill=new Sf(f,h,d,v,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var OHe=Math.PI/180,EHe=function(e){q(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){},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*OHe;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new RW(a,c,l);De(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),d=a.getItemLayout(c);if(!d){h&&Cs(h,r,f);return}h?h.updateData(a,c,l):h=new RW(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&Cs(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=ve(u[0],i.getWidth()),this.group.originY=ve(u[1],i.getHeight()),Nt(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},t.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new IHe(i,a,l,n);De(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Cs(u,r,l)}).execute(),this._edgeData=a},t.prototype.dispose=function(){},t.type="chord",t}(_t),DHe=function(e){q(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 qv(ge(this.getData,this),ge(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 i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=Xj(a,i,this,!0,s);return o.data}function s(l,u){var c=tt.prototype.getModel;function f(d,v){var g=c.call(this,d,v);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var v=d.slice();return d[0]==="label"?v[0]="edgeLabel":d[1]==="label"&&(v[1]="edgeLabel"),v}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Ar("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Ar("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},t.type="series.chord",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}(St),_M=Math.PI/180;function NHe(e,t){e.eachSeriesByType("chord",function(r){jHe(r,t)})}function jHe(e,t){var r=e.getData(),n=r.graph,i=e.getEdgeData(),a=i.count();if(a){var o=xJ(e,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((e.get("padAngle")||0)*_M,0),h=Math.max((e.get("minAngle")||0)*_M,0),d=-e.get("startAngle")*_M,v=d+Math.PI*2,g=e.get("clockwise"),m=g?1:-1,x=[d,v];CT(x,!g);var _=x[0],b=x[1],S=b-_,T=r.getSum("value")===0&&i.getSum("value")===0,A=[],M=0;n.eachEdge(function(F){var V=T?1:F.getValue("value");T&&(V>0||h)&&(M+=2);var W=F.node1.dataIndex,Y=F.node2.dataIndex;A[W]=(A[W]||0)+V,A[Y]=(A[Y]||0)+V});var P=0;if(n.eachNode(function(F){var V=F.getValue("value");isNaN(V)||(A[F.dataIndex]=Math.max(V,A[F.dataIndex]||0)),!T&&(A[F.dataIndex]>0||h)&&M++,P+=A[F.dataIndex]||0}),!(M===0||P===0)){f*M>=Math.abs(S)&&(f=Math.max(0,(Math.abs(S)-h*M)/M)),(f+h)*M>=Math.abs(S)&&(h=(Math.abs(S)-f*M)/M);var I=(S-f*M*m)/P,k=0,O=0,D=0;n.eachNode(function(F){var V=A[F.dataIndex]||0,W=I*(P?V:1)*m;Math.abs(W)<h?k+=h-Math.abs(W):(O+=Math.abs(W)-h,D+=Math.abs(W)),F.setLayout({angle:W,value:V})});var N=!1;if(k>O){var j=k/O;n.eachNode(function(F){var V=F.getLayout().angle;Math.abs(V)>=h?F.setLayout({angle:V*j,ratio:j},!0):F.setLayout({angle:h,ratio:h===0?1:V/h},!0)})}else n.eachNode(function(F){if(!N){var V=F.getLayout().angle,W=Math.min(V/D,1),Y=W*k;V-Y<h&&(N=!0)}});var z=k;n.eachNode(function(F){if(!(z<=0)){var V=F.getLayout().angle;if(V>h&&h>0){var W=N?1:Math.min(V/D,1),Y=V-h,Z=Math.min(Y,Math.min(z,k*W));z-=Z,F.setLayout({angle:V-Z,ratio:(V-Z)/V},!0)}else h>0&&F.setLayout({angle:h,ratio:V===0?1:h/V},!0)}});var $=_,U=[];n.eachNode(function(F){var V=Math.max(F.getLayout().angle,h);F.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:$,endAngle:$+V*m,clockwise:g},!0),U[F.dataIndex]=$,$+=(V+f)*m}),n.eachEdge(function(F){var V=T?1:F.getValue("value"),W=I*(P?V:1)*m,Y=F.node1.dataIndex,Z=U[Y]||0,J=Math.abs((F.node1.getLayout().ratio||1)*W),ne=Z+J*m,le=[s+c*Math.cos(Z),l+c*Math.sin(Z)],fe=[s+c*Math.cos(ne),l+c*Math.sin(ne)],ze=F.node2.dataIndex,xe=U[ze]||0,ie=Math.abs((F.node2.getLayout().ratio||1)*W),he=xe+ie*m,ue=[s+c*Math.cos(xe),l+c*Math.sin(xe)],ee=[s+c*Math.cos(he),l+c*Math.sin(he)];F.setLayout({s1:le,s2:fe,sStartAngle:Z,sEndAngle:ne,t1:ue,t2:ee,tStartAngle:xe,tEndAngle:he,cx:s,cy:l,r:c,value:V,clockwise:g}),U[Y]=ne,U[ze]=he})}}}function RHe(e){e.registerChartView(EHe),e.registerSeriesModel(DHe),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,NHe),e.registerProcessor(Yv("chord"))}var BHe=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),zHe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new BHe},t.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},t}(rt);function $He(e,t){var r=e.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=ve(r[0],t.getWidth()),s=ve(r[1],t.getHeight()),l=ve(e.get("radius"),a/2);return{cx:o,cy:s,r:l}}function x_(e,t){var r=e==null?"":e+"";return t&&(pe(t)?r=t.replace("{value}",r):Ae(t)&&(r=t(e))),r}var FHe=function(e){q(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,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=$He(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),d=h?Dw:bn,v=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),x=[u,c];CT(x,!l),u=x[0],c=x[1];for(var _=c-u,b=u,S=[],T=0;v&&T<a.length;T++){var A=Math.min(Math.max(a[T][0],0),1);c=u+_*A;var M=new d({shape:{startAngle:b,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-m,r:o.r},silent:!0});M.setStyle({fill:a[T][1]}),M.setStyle(g.getLineStyle(["color","width"])),S.push(M),b=c}S.reverse(),B(S,function(I){return s.add(I)});var P=function(I){if(I<=0)return a[0][1];var k;for(k=0;k<a.length;k++)if(a[k][0]>=I&&(k===0?0:a[k-1][0])<I)return a[k][1];return a[k-1][1]};this._renderTicks(r,n,i,P,o,u,c,l,m),this._renderTitleAndDetail(r,n,i,P,o),this._renderAnchor(r,o),this._renderPointer(r,n,i,P,o,u,c,l,m)},t.prototype._renderTicks=function(r,n,i,a,o,s,l,u,c){for(var f=this.group,h=o.cx,d=o.cy,v=o.r,g=+r.get("min"),m=+r.get("max"),x=r.getModel("splitLine"),_=r.getModel("axisTick"),b=r.getModel("axisLabel"),S=r.get("splitNumber"),T=_.get("splitNumber"),A=ve(x.get("length"),v),M=ve(_.get("length"),v),P=s,I=(l-s)/S,k=I/T,O=x.getModel("lineStyle").getLineStyle(),D=_.getModel("lineStyle").getLineStyle(),N=x.get("distance"),j,z,$=0;$<=S;$++){if(j=Math.cos(P),z=Math.sin(P),x.get("show")){var U=N?N+c:c,F=new yr({shape:{x1:j*(v-U)+h,y1:z*(v-U)+d,x2:j*(v-A-U)+h,y2:z*(v-A-U)+d},style:O,silent:!0});O.stroke==="auto"&&F.setStyle({stroke:a($/S)}),f.add(F)}if(b.get("show")){var U=b.get("distance")+N,V=x_(mr($/S*(m-g)+g),b.get("formatter")),W=a($/S),Y=j*(v-A-U)+h,Z=z*(v-A-U)+d,J=b.get("rotate"),ne=0;J==="radial"?(ne=-P+2*Math.PI,ne>Math.PI/2&&(ne+=Math.PI)):J==="tangential"?ne=-P-Math.PI/2:ot(J)&&(ne=J*Math.PI/180),ne===0?f.add(new at({style:Mt(b,{text:V,x:Y,y:Z,verticalAlign:z<-.8?"top":z>.8?"bottom":"middle",align:j<-.4?"left":j>.4?"right":"center"},{inheritColor:W}),silent:!0})):f.add(new at({style:Mt(b,{text:V,x:Y,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:W}),silent:!0,originX:Y,originY:Z,rotation:ne}))}if(_.get("show")&&$!==S){var U=_.get("distance");U=U?U+c:c;for(var le=0;le<=T;le++){j=Math.cos(P),z=Math.sin(P);var fe=new yr({shape:{x1:j*(v-U)+h,y1:z*(v-U)+d,x2:j*(v-M-U)+h,y2:z*(v-M-U)+d},silent:!0,style:D});D.stroke==="auto"&&fe.setStyle({stroke:a(($+le/T)/S)}),f.add(fe),P+=k}P-=k}else P+=I}},t.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,v=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),x=m.get("show"),_=r.getData(),b=_.mapDimension("value"),S=+r.get("min"),T=+r.get("max"),A=[S,T],M=[s,l];function P(k,O){var D=_.getItemModel(k),N=D.getModel("pointer"),j=ve(N.get("width"),o.r),z=ve(N.get("length"),o.r),$=r.get(["pointer","icon"]),U=N.get("offsetCenter"),F=ve(U[0],o.r),V=ve(U[1],o.r),W=N.get("keepAspect"),Y;return $?Y=xr($,F-j/2,V-z,j,z,null,W):Y=new zHe({shape:{angle:-Math.PI/2,width:j,r:z,x:F,y:V}}),Y.rotation=-(O+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function I(k,O){var D=m.get("roundCap"),N=D?Dw:bn,j=m.get("overlap"),z=j?m.get("width"):c/_.count(),$=j?o.r-z:o.r-(k+1)*z,U=j?o.r:o.r-k*z,F=new N({shape:{startAngle:s,endAngle:O,cx:o.cx,cy:o.cy,clockwise:u,r0:$,r:U}});return j&&(F.z2=gt(_.get(b,k),[S,T],[100,0],!0)),F}(x||g)&&(_.diff(h).add(function(k){var O=_.get(b,k);if(g){var D=P(k,s);Nt(D,{rotation:-((isNaN(+O)?M[0]:gt(O,A,M,!0))+Math.PI/2)},r),f.add(D),_.setItemGraphicEl(k,D)}if(x){var N=I(k,s),j=m.get("clip");Nt(N,{shape:{endAngle:gt(O,A,M,j)}},r),f.add(N),oI(r.seriesIndex,_.dataType,k,N),v[k]=N}}).update(function(k,O){var D=_.get(b,k);if(g){var N=h.getItemGraphicEl(O),j=N?N.rotation:s,z=P(k,j);z.rotation=j,lt(z,{rotation:-((isNaN(+D)?M[0]:gt(D,A,M,!0))+Math.PI/2)},r),f.add(z),_.setItemGraphicEl(k,z)}if(x){var $=d[O],U=$?$.shape.endAngle:s,F=I(k,U),V=m.get("clip");lt(F,{shape:{endAngle:gt(D,A,M,V)}},r),f.add(F),oI(r.seriesIndex,_.dataType,k,F),v[k]=F}}).execute(),_.each(function(k){var O=_.getItemModel(k),D=O.getModel("emphasis"),N=D.get("focus"),j=D.get("blurScope"),z=D.get("disabled");if(g){var $=_.getItemGraphicEl(k),U=_.getItemVisual(k,"style"),F=U.fill;if($ instanceof Xr){var V=$.style;$.useStyle(re({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},U))}else $.useStyle(U),$.type!=="pointer"&&$.setColor(F);$.setStyle(O.getModel(["pointer","itemStyle"]).getItemStyle()),$.style.fill==="auto"&&$.setStyle("fill",a(gt(_.get(b,k),A,[0,1],!0))),$.z2EmphasisLift=0,Dr($,O),Wt($,N,j,z)}if(x){var W=v[k];W.useStyle(_.getItemVisual(k,"style")),W.setStyle(O.getModel(["progress","itemStyle"]).getItemStyle()),W.z2EmphasisLift=0,Dr(W,O),Wt(W,N,j,z)}}),this._progressEls=v)},t.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=xr(s,n.cx-o/2+ve(l[0],n.r),n.cy-o/2+ve(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new Me,d=[],v=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(x){d[x]=new at({silent:!0}),v[x]=new at({silent:!0})}).update(function(x,_){d[x]=s._titleEls[_],v[x]=s._detailEls[_]}).execute(),l.each(function(x){var _=l.getItemModel(x),b=l.get(u,x),S=new Me,T=a(gt(b,[c,f],[0,1],!0)),A=_.getModel("title");if(A.get("show")){var M=A.get("offsetCenter"),P=o.cx+ve(M[0],o.r),I=o.cy+ve(M[1],o.r),k=d[x];k.attr({z2:m?0:2,style:Mt(A,{x:P,y:I,text:l.getName(x),align:"center",verticalAlign:"middle"},{inheritColor:T})}),S.add(k)}var O=_.getModel("detail");if(O.get("show")){var D=O.get("offsetCenter"),N=o.cx+ve(D[0],o.r),j=o.cy+ve(D[1],o.r),z=ve(O.get("width"),o.r),$=ve(O.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(x,"style").fill:T,k=v[x],F=O.get("formatter");k.attr({z2:m?0:2,style:Mt(O,{x:N,y:j,text:x_(b,F),width:isNaN(z)?null:z,height:isNaN($)?null:$,align:"center",verticalAlign:"middle"},{inheritColor:U})}),tJ(k,{normal:O},b,function(W){return x_(W,F)}),g&&rJ(k,x,l,r,{getFormattedLabel:function(W,Y,Z,J,ne,le){return x_(le?le.interpolatedValue:b,F)}}),S.add(k)}h.add(S)}),this.group.add(h),this._titleEls=d,this._detailEls=v},t.type="gauge",t}(_t),VHe=function(e){q(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 Xv(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,K.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:K.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:K.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:K.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:K.color.neutral00,borderWidth:0,borderColor:K.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:K.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:K.color.transparent,borderWidth:0,borderColor:K.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:K.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(St);function GHe(e){e.registerChartView(FHe),e.registerSeriesModel(VHe)}var WHe=["itemStyle","opacity"],HHe=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=i,o=new on,s=new at;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return t.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(WHe);c=c??1,i||pa(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Nt(a,{style:{opacity:c}},o,n)):lt(a,{style:{opacity:c},shape:{points:l.points}},o,n),Dr(a,s),this._updateLabel(r,n),Wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;Ur(o,Nr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),v=d.get("color"),g=v==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Ie(m[0][0],m[0][1]):null},lt(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),wj(i,Sj(l),{stroke:h})},t}(wn),UHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.ignoreLabelLineUpdate=!0,r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new HHe(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Cs(u,r,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(_t),ZHe=function(e){q(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 qv(ge(this.getData,this),ge(this.getRawData,this)),this._defaultLabelLine(r)},t.prototype.getInitialData=function(r,n){return Xv(this,{coordDimensions:["value"],encodeDefaulter:Fe(qN,this)})},t.prototype._defaultLabelLine=function(r){rf(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},t.prototype.getDataParams=function(r){var n=this.getData(),i=e.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",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:K.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:K.color.primary}}},t}(St);function YHe(e,t){for(var r=e.mapDimension("value"),n=e.mapArray(r,function(l){return l}),i=[],a=t==="ascending",o=0,s=e.count();o<s;o++)i[o]=o;return Ae(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function XHe(e){var t=e.hostModel,r=t.get("orient");e.each(function(n){var i=e.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=e.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",f,h,d,v;if(c)o==="insideLeft"?(h=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,f="left"):o==="insideRight"?(h=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,f="right"):(h=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,f="center"),v=[[h,d],[h,d]];else{var g=void 0,m=void 0,x=void 0,_=void 0,b=s.get("length");o==="left"?(g=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,x=g-b,h=x-5,f="right"):o==="right"?(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,x=g+b,h=x+5,f="left"):o==="top"?(g=(u[3][0]+u[0][0])/2,m=(u[3][1]+u[0][1])/2,_=m-b,d=_-5,f="center"):o==="bottom"?(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,_=m+b,d=_+5,f="center"):o==="rightTop"?(g=r==="horizontal"?u[3][0]:u[1][0],m=r==="horizontal"?u[3][1]:u[1][1],r==="horizontal"?(_=m-b,d=_-5,f="center"):(x=g+b,h=x+5,f="top")):o==="rightBottom"?(g=u[2][0],m=u[2][1],r==="horizontal"?(_=m+b,d=_+5,f="center"):(x=g+b,h=x+5,f="bottom")):o==="leftTop"?(g=u[0][0],m=r==="horizontal"?u[0][1]:u[1][1],r==="horizontal"?(_=m-b,d=_-5,f="center"):(x=g-b,h=x-5,f="right")):o==="leftBottom"?(g=r==="horizontal"?u[1][0]:u[3][0],m=r==="horizontal"?u[1][1]:u[2][1],r==="horizontal"?(_=m+b,d=_+5,f="center"):(x=g-b,h=x-5,f="right")):(g=(u[1][0]+u[2][0])/2,m=(u[1][1]+u[2][1])/2,r==="horizontal"?(_=m+b,d=_+5,f="center"):(x=g+b,h=x+5,f="left")),r==="horizontal"?(x=g,h=x):(_=m,d=_),v=[[g,m],[x,_]]}l.label={linePoints:v,x:h,y:d,verticalAlign:"middle",textAlign:f,inside:c}})}function qHe(e,t){e.eachSeriesByType("funnel",function(r){var n=r.getData(),i=n.mapDimension("value"),a=r.get("sort"),o=jr(r,t),s=$t(r.getBoxLayoutParams(),o.refContainer),l=r.get("orient"),u=s.width,c=s.height,f=YHe(n,a),h=s.x,d=s.y,v=l==="horizontal"?[ve(r.get("minSize"),c),ve(r.get("maxSize"),c)]:[ve(r.get("minSize"),u),ve(r.get("maxSize"),u)],g=n.getDataExtent(i),m=r.get("min"),x=r.get("max");m==null&&(m=Math.min(g[0],0)),x==null&&(x=g[1]);var _=r.get("funnelAlign"),b=r.get("gap"),S=l==="horizontal"?u:c,T=(S-b*(n.count()-1))/n.count(),A=function(z,$){if(l==="horizontal"){var U=n.get(i,z)||0,F=gt(U,[m,x],v,!0),V=void 0;switch(_){case"top":V=d;break;case"center":V=d+(c-F)/2;break;case"bottom":V=d+(c-F);break}return[[$,V],[$,V+F]]}var W=n.get(i,z)||0,Y=gt(W,[m,x],v,!0),Z;switch(_){case"left":Z=h;break;case"center":Z=h+(u-Y)/2;break;case"right":Z=h+u-Y;break}return[[Z,$],[Z+Y,$]]};a==="ascending"&&(T=-T,b=-b,l==="horizontal"?h+=u:d+=c,f=f.reverse());for(var M=0;M<f.length;M++){var P=f[M],I=f[M+1],k=n.getItemModel(P);if(l==="horizontal"){var O=k.get(["itemStyle","width"]);O==null?O=T:(O=ve(O,u),a==="ascending"&&(O=-O));var D=A(P,h),N=A(I,h+O);h+=O+b,n.setItemLayout(P,{points:D.concat(N.slice().reverse())})}else{var j=k.get(["itemStyle","height"]);j==null?j=T:(j=ve(j,c),a==="ascending"&&(j=-j));var D=A(P,d),N=A(I,d+j);d+=j+b,n.setItemLayout(P,{points:D.concat(N.slice().reverse())})}}XHe(n)})}function KHe(e){e.registerChartView(UHe),e.registerSeriesModel(ZHe),e.registerLayout(qHe),e.registerProcessor(Yv("funnel"))}var QHe=.3,JHe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._dataGroup=new Me,r._initialized=!1,r}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(r,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=r.getData(),l=this._data,u=r.coordinateSystem,c=u.dimensions,f=$W(r);s.diff(l).add(h).update(d).remove(v).execute();function h(m){var x=zW(s,o,m,c,u);bM(x,s,m,f)}function d(m,x){var _=l.getItemGraphicEl(x),b=Qre(s,m,c,u);s.setItemGraphicEl(m,_),lt(_,{shape:{points:b}},r,m),pa(_),bM(_,s,m,f)}function v(m){var x=l.getItemGraphicEl(m);o.remove(x)}if(!this._initialized){this._initialized=!0;var g=e8e(u,r,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(g)}this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(r,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=$W(n),u=this._progressiveEls=[],c=r.start;c<r.end;c++){var f=zW(a,this._dataGroup,c,s,o);f.incremental=!0,bM(f,a,c,l),u.push(f)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(_t);function e8e(e,t,r){var n=e.model,i=e.getRect(),a=new Xe({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Nt(a,{shape:{width:i.width,height:i.height}},t,r),a}function Qre(e,t,r,n){for(var i=[],a=0;a<r.length;a++){var o=r[a],s=e.get(e.mapDimension(o),t);t8e(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function zW(e,t,r,n,i){var a=Qre(e,r,n,i),o=new on({shape:{points:a},z2:10});return t.add(o),e.setItemGraphicEl(r,o),o}function $W(e){var t=e.get("smooth",!0);return t===!0&&(t=QHe),t=zo(t),mn(t)&&(t=0),{smooth:t}}function bM(e,t,r,n){e.useStyle(t.getItemVisual(r,"style")),e.style.fill=null,e.setShape("smooth",n.smooth);var i=t.getItemModel(r),a=i.getModel("emphasis");Dr(e,i,"lineStyle"),Wt(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function t8e(e,t){return t==="category"?e==null:e==null||isNaN(e)}var r8e=function(e){q(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 Yo(null,this,{useEncodeDefaulter:ge(n8e,null,this)})},t.prototype.getRawIndicesByActiveState=function(r){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){r===o&&a.push(i.getRawIndex(s))}),a},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:500,smooth:!1,animationEasing:"linear"},t}(St);function n8e(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var r={};return B(t.dimensions,function(n){var i=i8e(n);r[n]=i}),r}}function i8e(e){return+e.replace("dim","")}var a8e=["lineStyle","opacity"],o8e={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(i,a){r.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(a8e,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};function s8e(e){l8e(e),u8e(e)}function l8e(e){if(!e.parallel){var t=!1;B(e.series,function(r){r&&r.type==="parallel"&&(t=!0)}),t&&(e.parallel=[{}])}}function u8e(e){var t=Pt(e.parallelAxis);B(t,function(r){if(Le(r)){var n=r.parallelIndex||0,i=Pt(e.parallel)[n];i&&i.parallelAxisDefault&&He(r,i.parallelAxisDefault,!1)}})}var c8e=5,f8e=function(e){q(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,i){this._model=r,this._api=i,this._handlers||(this._handlers={},B(h8e,function(a,o){i.getZr().on(o,this._handlers[o]=ge(a,this))},this)),Gv(this,"_throttledDispatchExpand",r.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(r,n){by(this,"_throttledDispatchExpand"),B(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(r){this._dispatchExpand(r)},t.prototype._dispatchExpand=function(r){r&&this._api.dispatchAction(re({type:"parallelAxisExpand"},r))},t.type="parallel",t}(Lt),h8e={mousedown:function(e){wM(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(wM(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>c8e)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!wM(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 wM(e,t){var r=e._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===t}var d8e=function(e){q(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&&He(n,r,!0),this._initDimensions()},t.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===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=[],i=ht(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);B(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},t.type="parallel",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}(Qe),v8e=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(_a);function ou(e,t,r,n,i,a){e=e||0;var o=r[1]-r[0];if(i!=null&&(i=fh(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=fh(s,[0,o]),i=a=fh(s,[i,a]),n=0}t[0]=fh(t[0],r),t[1]=fh(t[1],r);var l=SM(t,n);t[n]+=e;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=fh(t[n],c);var f;return f=SM(t,n),i!=null&&(f.sign!==l.sign||f.span<i)&&(t[1-n]=t[n]+l.sign*i),f=SM(t,n),a!=null&&f.span>a&&(t[1-n]=t[n]+f.sign*a),t}function SM(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 fh(e,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,e))}var TM=B,Jre=Math.min,ene=Math.max,FW=Math.floor,p8e=Math.ceil,VW=mr,g8e=Math.PI,m8e=function(){function e(t,r,n){this.type="parallel",this._axesMap=_e(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=t.dimensions,a=t.parallelAxisIndex;TM(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new v8e(o,p0(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},e.prototype.update=function(t,r){this._updateAxesFromSeries(this._model,t)},e.prototype.containPoint=function(t){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(t,r){r.eachSeries(function(n){if(t.contains(n,r)){var i=n.getData();TM(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),cf(o.scale,o.model)},this)}},this)},e.prototype.resize=function(t,r){var n=jr(t,r).refContainer;this._rect=$t(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"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=__(t.get("axisExpandWidth"),l),f=__(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=t.get("axisExpandWindow"),v;if(d)v=__(d[1]-d[0],l),d[1]=d[0]+v;else{v=__(c*(f-1),l);var g=t.get("axisExpandCenter")||FW(u/2);d=[c*g-v/2],d[1]=d[0]+v}var m=(s-v)/(u-f);m<3&&(m=0);var x=[FW(VW(d[0]/c,1))+1,p8e(VW(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:x,axisExpandWindow0Pos:_}},e.prototype._layoutAxes=function(){var t=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),TM(n,function(o,s){var l=(i.axisExpandable?x8e:y8e)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:g8e/2,vertical:0},f=[u[a].x+t.x,u[a].y+t.y],h=c[a],d=Wr();Ks(d,d,h),Ua(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.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,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];B(o,function(m){s.push(t.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var f=void 0;if(!u)f="normal";else{f="active";for(var h=t.getValues(s,c),d=0,v=o.length;d<v;d++){var g=l[d].getActiveState(h[d]);if(g==="inactive"){f="inactive";break}}}r(f,c)}},e.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,r=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)r.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},e.prototype.axisCoordToPoint=function(t,r){var n=this._axesLayout[r];return Ga([t,0],n.transform)},e.prototype.getAxisLayout=function(t){return Ce(this._axesLayout[t])},e.prototype.getSlidedAxisExpandWindow=function(t){var r=this._makeLayoutInfo(),n=r.pixelDimIndex,i=r.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,r.axisExpandWidth*(r.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-r.layoutBase-r.axisExpandWindow0Pos,l,u="slide",c=r.axisCollapseWidth,f=this._model.get("axisExpandSlideTriggerArea"),h=f[0]!=null;if(c)h&&c&&s<a*f[0]?(u="jump",l=s-a*f[2]):h&&c&&s>a*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ou(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[ene(0,v-d/2)],i[1]=Jre(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},e}();function __(e,t){return Jre(ene(e,t[0]),t[1])}function y8e(e,t){var r=t.layoutLength/(t.axisCount-1);return{position:r*e,axisNameAvailableWidth:r,axisLabelShow:!0}}function x8e(e,t){var r=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,c;return e<o[0]?(s=e*a,c=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*n-t.axisExpandWindow[0],l=n,u=!0):(s=r-(i-1-e)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}function _8e(e,t){var r=[];return e.eachComponent("parallel",function(n,i){var a=new m8e(n,e,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",tr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}var b8e={create:_8e},fO=function(e){q(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 af([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(r){var n=this.activeIntervals=Ce(r);if(n)for(var i=n.length-1;i>=0;i--)Mi(n[i])},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 i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=r&&r<=n[a][1])return"active";return"inactive"},t}(Qe);fr(fO,Zv);var ff=!0,Ny=Math.min,ov=Math.max,w8e=Math.pow,S8e=1e4,T8e=6,A8e=6,GW="globalPan",C8e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},M8e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},WW={brushStyle:{lineWidth:2,stroke:K.color.backgroundTint,fill:K.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},P8e=0,qj=function(e){q(t,e);function t(r){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=r,n.group=new Me,n._uid="brushController_"+P8e++,B(N8e,function(i,a){this._handlers[a]=ge(i,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||fGe(n,GW,this._uid),B(this._handlers,function(i,a){n.on(a,i)}),this._brushType=r.brushType,this._brushOption=He(Ce(WW),r,!0)},t.prototype._doDisableBrush=function(){var r=this._zr;hGe(r,GW,this._uid),B(this._handlers,function(n,i){r.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(r){if(r&&r.length){var n=this._panels={};B(r,function(i){n[i.panelId]=Ce(i)})}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=se(r,function(h){return He(Ce(WW),h,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Gs(i,r,u,l).add(c).update(c).remove(f).execute(),this;function l(h,d){return(h.id!=null?h.id:n+d)+"-"+h.brushType}function u(h,d){return l(h.__brushOption,d)}function c(h,d){var v=r[h];if(d!=null&&i[d]===s)a[h]=i[d];else{var g=a[h]=d!=null?(i[d].__brushOption=v,i[d]):rne(o,tne(o,v));Kj(o,g)}}function f(h){i[h]!==s&&o.group.remove(i[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),hO(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(ya);function tne(e,t){var r=YT[t.brushType].createCover(e,t);return r.__brushOption=t,ine(r,t),e.group.add(r),r}function rne(e,t){var r=Qj(t);return r.endCreating&&(r.endCreating(e,t),ine(t,t.__brushOption)),t}function nne(e,t){var r=t.__brushOption;Qj(t).updateCoverShape(e,t,r.range,r)}function ine(e,t){var r=t.z;r==null&&(r=S8e),e.traverse(function(n){n.z=r,n.z2=r})}function Kj(e,t){Qj(t).updateCommon(e,t),nne(e,t)}function Qj(e){return YT[e.__brushOption.brushType]}function Jj(e,t,r){var n=e._panels;if(!n)return ff;var i,a=e._transform;return B(n,function(o){o.isTargetByCursor(t,r,a)&&(i=o)}),i}function ane(e,t){var r=e._panels;if(!r)return ff;var n=t.__brushOption.panelId;return n!=null?r[n]:ff}function hO(e){var t=e._covers,r=t.length;return B(t,function(n){e.group.remove(n)},e),t.length=0,!!r}function hf(e,t){var r=se(e._covers,function(n){var i=n.__brushOption,a=Ce(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});e.trigger("brush",{areas:r,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function L8e(e){var t=e._track;if(!t.length)return!1;var r=t[t.length-1],n=t[0],i=r[0]-n[0],a=r[1]-n[1],o=w8e(i*i+a*a,.5);return o>T8e}function one(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function sne(e,t,r,n){var i=new Me;return i.add(new Xe({name:"main",style:eR(r),silent:!0,draggable:!0,cursor:"move",drift:Fe(HW,e,t,i,["n","s","w","e"]),ondragend:Fe(hf,t,{isEnd:!0})})),B(n,function(a){i.add(new Xe({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Fe(HW,e,t,i,a),ondragend:Fe(hf,t,{isEnd:!0})}))}),i}function lne(e,t,r,n){var i=n.brushStyle.lineWidth||0,a=ov(i,A8e),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,d=f-a+i/2,v=c-o,g=f-s,m=v+i,x=g+i;is(e,t,"main",o,s,v,g),n.transformable&&(is(e,t,"w",l,u,a,x),is(e,t,"e",h,u,a,x),is(e,t,"n",l,u,m,a),is(e,t,"s",l,d,m,a),is(e,t,"nw",l,u,a,a),is(e,t,"ne",h,u,a,a),is(e,t,"sw",l,d,a,a),is(e,t,"se",h,d,a,a))}function dO(e,t){var r=t.__brushOption,n=r.transformable,i=t.childAt(0);i.useStyle(eR(r)),i.attr({silent:!n,cursor:n?"move":"default"}),B([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?vO(e,a[0]):I8e(e,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?M8e[s]+"-resize":null})})}function is(e,t,r,n,i,a,o){var s=t.childOfName(r);s&&s.setShape(E8e(tR(e,t,[[n,i],[n+a,i+o]])))}function eR(e){return Pe({strokeNoScale:!0},e.brushStyle)}function une(e,t,r,n){var i=[Ny(e,r),Ny(t,n)],a=[ov(e,r),ov(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function k8e(e){return Xl(e.group)}function vO(e,t){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=kT(r[t],k8e(e));return n[i]}function I8e(e,t){var r=[vO(e,t[0]),vO(e,t[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function HW(e,t,r,n,i,a){var o=r.__brushOption,s=e.toRectRange(o.range),l=cne(t,i,a);B(n,function(u){var c=C8e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=e.fromRectRange(une(s[0][0],s[1][0],s[0][1],s[1][1])),Kj(t,r),hf(t,{isEnd:!1})}function O8e(e,t,r,n){var i=t.__brushOption.range,a=cne(e,r,n);B(i,function(o){o[0]+=a[0],o[1]+=a[1]}),Kj(e,t),hf(e,{isEnd:!1})}function cne(e,t,r){var n=e.group,i=n.transformCoordToLocal(t,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function tR(e,t,r){var n=ane(e,t);return n&&n!==ff?n.clipPath(r,e._transform):Ce(r)}function E8e(e){var t=Ny(e[0][0],e[1][0]),r=Ny(e[0][1],e[1][1]),n=ov(e[0][0],e[1][0]),i=ov(e[0][1],e[1][1]);return{x:t,y:r,width:n-t,height:i-r}}function D8e(e,t,r){if(!(!e._brushType||j8e(e,t.offsetX,t.offsetY))){var n=e._zr,i=e._covers,a=Jj(e,t,r);if(!e._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===ff||s.panelId===a.panelId)&&YT[s.brushType].contain(i[o],r[0],r[1]))return}a&&n.setCursorStyle("crosshair")}}function pO(e){var t=e.event;t.preventDefault&&t.preventDefault()}function gO(e,t,r){return e.childOfName("main").contain(t,r)}function fne(e,t,r,n){var i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(r.slice()),L8e(e)||i){if(a&&!i){o.brushMode==="single"&&hO(e);var l=Ce(o);l.brushType=UW(l.brushType,a),l.panelId=a===ff?null:a.panelId,i=e._creatingCover=tne(e,l),e._covers.push(i)}if(i){var u=YT[UW(e._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(tR(e,i,e._track)),n&&(rne(e,i),u.updateCommon(e,i)),nne(e,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&Jj(e,t,r)&&hO(e)&&(s={isEnd:n,removeOnClick:!0});return s}function UW(e,t){return e==="auto"?t.defaultBrushType:e}var N8e={mousedown:function(e){if(this._dragging)ZW(this,e);else if(!e.target||!e.target.draggable){pO(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null;var r=this._creatingPanel=Jj(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(D8e(this,e,n),this._dragging){pO(e);var i=fne(this,e,n,!1);i&&hf(this,i)}},mouseup:function(e){ZW(this,e)}};function ZW(e,t){if(e._dragging){pO(t);var r=t.offsetX,n=t.offsetY,i=e.group.transformCoordToLocal(r,n),a=fne(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&hf(e,a)}}function j8e(e,t,r){var n=e._zr;return t<0||t>n.getWidth()||r<0||r>n.getHeight()}var YT={lineX:YW(0),lineY:YW(1),rect:{createCover:function(e,t){function r(n){return n}return sne({toRectRange:r,fromRectRange:r},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=one(e);return une(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,r,n){lne(e,t,r,n)},updateCommon:dO,contain:gO},polygon:{createCover:function(e,t){var r=new Me;return r.add(new on({name:"main",style:eR(t),silent:!0})),r},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new wn({name:"main",draggable:!0,drift:Fe(O8e,e,t),ondragend:Fe(hf,e,{isEnd:!0})}))},updateCoverShape:function(e,t,r,n){t.childAt(0).setShape({points:tR(e,t,r)})},updateCommon:dO,contain:gO}};function YW(e){return{createCover:function(t,r){return sne({toRectRange:function(n){var i=[n,[0,100]];return e&&i.reverse(),i},fromRectRange:function(n){return n[e]}},t,r,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var r=one(t),n=Ny(r[0][e],r[1][e]),i=ov(r[0][e],r[1][e]);return[n,i]},updateCoverShape:function(t,r,n,i){var a,o=ane(t,r);if(o!==ff&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),lne(t,r,l,i)},updateCommon:dO,contain:gO}}function hne(e){return e=rR(e),function(t){return IN(t,e)}}function dne(e,t){return e=rR(e),function(r){var n=t??r,i=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(i||0)]}}function vne(e,t,r){var n=rR(e);return function(i,a){return n.contain(a[0],a[1])&&!xre(i,t,r)}}function rR(e){return Oe.create(e)}var R8e=function(e){q(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 qj(n.getZr())).on("brush",ge(this._onBrush,this))},t.prototype.render=function(r,n,i,a){if(!B8e(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Me,this.group.add(this._axisGroup),!!r.get("show")){var s=$8e(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),d=re({strokeContainThreshold:c},h),v=new Hn(r,i,d);v.build(),this._axisGroup.add(v.group),this._refreshBrushController(d,u,r,s,c,i),f0(o,this._axisGroup,r)}}},t.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Oe.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:hne(f),isTargetByCursor:vne(f,s,a),getLinearBrushOtherExtent:dne(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(z8e(i))},t.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=se(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Lt);function B8e(e,t,r){return r&&r.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:r})[0]===e}function z8e(e){var t=e.axis;return se(e.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(r[0],!0),t.dataToCoord(r[1],!0)]}})}function $8e(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}var F8e={type:"axisAreaSelect",event:"axisAreaSelected"};function V8e(e){e.registerAction(F8e,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 G8e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function pne(e){e.registerComponentView(f8e),e.registerComponentModel(d8e),e.registerCoordinateSystem("parallel",b8e),e.registerPreprocessor(s8e),e.registerComponentModel(fO),e.registerComponentView(R8e),iv(e,"parallel",fO,G8e),V8e(e)}function W8e(e){Ze(pne),e.registerChartView(JHe),e.registerSeriesModel(r8e),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,o8e)}var H8e=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}(),U8e=function(e){q(t,e);function t(r){return e.call(this,r)||this}return t.prototype.getDefaultShape=function(){return new H8e},t.prototype.buildPath=function(r,n){var i=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+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},t.prototype.highlight=function(){Fs(this)},t.prototype.downplay=function(){Vs(this)},t}(rt),Z8e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._mainGroup=new Me,r._focusAdjacencyDisabled=!1,r}return t.prototype.init=function(r,n){this._controller=new Lf(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),_re(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(v){var g=new U8e,m=De(g);m.dataIndex=v.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var x=v.getModel(),_=x.getModel("lineStyle"),b=_.get("curveness"),S=v.node1.getLayout(),T=v.node1.getModel(),A=T.get("localX"),M=T.get("localY"),P=v.node2.getLayout(),I=v.node2.getModel(),k=I.get("localX"),O=I.get("localY"),D=v.getLayout(),N,j,z,$,U,F,V,W;g.shape.extent=Math.max(1,D.dy),g.shape.orient=d,d==="vertical"?(N=(A!=null?A*u:S.x)+D.sy,j=(M!=null?M*c:S.y)+S.dy,z=(k!=null?k*u:P.x)+D.ty,$=O!=null?O*c:P.y,U=N,F=j*(1-b)+$*b,V=z,W=j*b+$*(1-b)):(N=(A!=null?A*u:S.x)+S.dx,j=(M!=null?M*c:S.y)+D.sy,z=k!=null?k*u:P.x,$=(O!=null?O*c:P.y)+D.ty,U=N*(1-b)+z*b,F=j,V=N*b+z*(1-b),W=$),g.setShape({x1:N,y1:j,x2:z,y2:$,cpx1:U,cpy1:F,cpx2:V,cpy2:W}),g.useStyle(_.getItemStyle()),XW(g.style,d,v);var Y=""+x.get("value"),Z=Nr(x,"edgeLabel");Ur(g,Z,{labelFetcher:{getFormattedLabel:function(le,fe,ze,xe,ie,he){return r.getFormattedLabel(le,fe,"edge",xe,fi(ie,Z.normal&&Z.normal.get("formatter"),Y),he)}},labelDataIndex:v.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var J=x.getModel("emphasis");Dr(g,x,"lineStyle",function(le){var fe=le.getItemStyle();return XW(fe,d,v),fe}),s.add(g),h.setItemGraphicEl(v.dataIndex,g);var ne=J.get("focus");Wt(g,ne==="adjacency"?v.getAdjacentDataIndices():ne==="trajectory"?v.getTrajectoryDataIndices():ne,J.get("blurScope"),J.get("disabled"))}),o.eachNode(function(v){var g=v.getLayout(),m=v.getModel(),x=m.get("localX"),_=m.get("localY"),b=m.getModel("emphasis"),S=m.get(["itemStyle","borderRadius"])||0,T=new Xe({shape:{x:x!=null?x*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:S},style:m.getModel("itemStyle").getItemStyle(),z2:10});Ur(T,Nr(m),{labelFetcher:{getFormattedLabel:function(M,P){return r.getFormattedLabel(M,P,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),T.disableLabelAnimation=!0,T.setStyle("fill",v.getVisual("color")),T.setStyle("decal",v.getVisual("style").decal),Dr(T,m),s.add(T),f.setItemGraphicEl(v.dataIndex,T),De(T).dataType="node";var A=b.get("focus");Wt(T,A==="adjacency"?v.getAdjacentDataIndices():A==="trajectory"?v.getTrajectoryDataIndices():A,b.get("blurScope"),b.get("disabled"))}),f.eachItemGraphicEl(function(v,g){var m=f.getItemModel(g);m.get("draggable")&&(v.drift=function(x,_){a._focusAdjacencyDisabled=!0,this.shape.x+=x,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Y8e(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new kf(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(_t);function XW(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"),i=r.node2.getVisual("color");pe(n)&&pe(i)&&(e.fill=new Sf(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Y8e(e,t,r){var n=new Xe({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Nt(n,{shape:{width:e.width+20}},t,r),n}var X8e=function(e){q(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 i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new tt(o[l],this,n));var u=Xj(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getData().getItemLayout(v);if(m){var x=m.depth,_=g.levelModels[x];_&&(d.parentModel=_)}return d}),h.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(v),x=m.node1.getLayout();if(x){var _=x.depth,b=g.levelModels[_];b&&(d.parentModel=b)}return d})}},t.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(r){this.option.center=r},t.prototype.setZoom=function(r){this.option.zoom=r},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ar("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Ar("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(r,n){var i=e.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},t.type="series.sankey",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:K.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:K.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(St);function q8e(e,t){e.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=jr(r,t).refContainer,o=$t(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;Q8e(c);var h=ht(c,function(m){return m.getLayout().value===0}),d=h.length!==0?0:r.get("layoutIterations"),v=r.get("orient"),g=r.get("nodeAlign");K8e(c,f,n,i,s,l,d,v,g)})}function K8e(e,t,r,n,i,a,o,s,l){J8e(e,t,r,i,a,s,l),nUe(e,t,a,i,n,o,s),hUe(e,s)}function Q8e(e){B(e,function(t){var r=Ql(t.outEdges,Vw),n=Ql(t.inEdges,Vw),i=t.getValue()||0,a=Math.max(r,n,i);t.setLayout({value:a},!0)})}function J8e(e,t,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h<t.length;h++)s[h]=1;for(var h=0;h<e.length;h++)l[h]=e[h].inEdges.length,l[h]===0&&u.push(e[h]);for(var d=-1;u.length;){for(var v=0;v<u.length;v++){var g=u[v],m=g.hostGraph.data.getRawDataItem(g.dataIndex),x=m.depth!=null&&m.depth>=0;x&&m.depth>d&&(d=m.depth),g.setLayout({depth:x?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_<g.outEdges.length;_++){var b=g.outEdges[_],S=t.indexOf(b);s[S]=0;var T=b.node2,A=e.indexOf(T);--l[A]===0&&c.indexOf(T)<0&&c.push(T)}}++f,u=c,c=[]}for(var h=0;h<s.length;h++)if(s[h]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var M=d>f-1?d:f-1;o&&o!=="left"&&eUe(e,o,a,M);var P=a==="vertical"?(i-r)/M:(n-r)/M;rUe(e,P,a)}function gne(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function eUe(e,t,r,n){if(t==="right"){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}B(e,function(f){gne(f)||f.setLayout({depth:Math.max(0,n-f.getLayout().skNodeHeight)},!0)})}else t==="justify"&&tUe(e,n)}function tUe(e,t){B(e,function(r){!gne(r)&&!r.outEdges.length&&r.setLayout({depth:t},!0)})}function rUe(e,t,r){B(e,function(n){var i=n.getLayout().depth*t;r==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function nUe(e,t,r,n,i,a,o){var s=iUe(e,o);aUe(s,t,r,n,i,o),AM(s,i,r,n,o);for(var l=1;a>0;a--)l*=.99,oUe(s,l,o),AM(s,i,r,n,o),fUe(s,l,o),AM(s,i,r,n,o)}function iUe(e,t){var r=[],n=t==="vertical"?"y":"x",i=tI(e,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),B(i.keys,function(a){r.push(i.buckets.get(a))}),r}function aUe(e,t,r,n,i,a){var o=1/0;B(e,function(s){var l=s.length,u=0;B(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c<o&&(o=c)}),B(e,function(s){B(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),B(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function AM(e,t,r,n,i){var a=i==="vertical"?"x":"y";B(e,function(o){o.sort(function(g,m){return g.getLayout()[a]-m.getLayout()[a]});for(var s,l,u,c=0,f=o.length,h=i==="vertical"?"dx":"dy",d=0;d<f;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+t;var v=i==="vertical"?n:r;if(u=c-t-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+t-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function oUe(e,t,r){B(e.slice().reverse(),function(n){B(n,function(i){if(i.outEdges.length){var a=Ql(i.outEdges,sUe,r)/Ql(i.outEdges,Vw);if(isNaN(a)){var o=i.outEdges.length;a=o?Ql(i.outEdges,lUe,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-su(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-su(i,r))*t;i.setLayout({y:l},!0)}}})})}function sUe(e,t){return su(e.node2,t)*e.getValue()}function lUe(e,t){return su(e.node2,t)}function uUe(e,t){return su(e.node1,t)*e.getValue()}function cUe(e,t){return su(e.node1,t)}function su(e,t){return t==="vertical"?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Vw(e){return e.getValue()}function Ql(e,t,r){for(var n=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],r);isNaN(o)||(n+=o)}return n}function fUe(e,t,r){B(e,function(n){B(n,function(i){if(i.inEdges.length){var a=Ql(i.inEdges,uUe,r)/Ql(i.inEdges,Vw);if(isNaN(a)){var o=i.inEdges.length;a=o?Ql(i.inEdges,cUe,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-su(i,r))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-su(i,r))*t;i.setLayout({y:l},!0)}}})})}function hUe(e,t){var r=t==="vertical"?"x":"y";B(e,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[r]-a.node2.getLayout()[r]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[r]-a.node1.getLayout()[r]})}),B(e,function(n){var i=0,a=0;B(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),B(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function dUe(e){e.eachSeriesByType("sankey",function(t){var r=t.getGraph(),n=r.nodes,i=r.edges;if(n.length){var a=1/0,o=-1/0;B(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),B(n,function(s){var l=new Hr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&B(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function vUe(e){e.registerChartView(Z8e),e.registerSeriesModel(X8e),e.registerLayout(q8e),e.registerVisual(dUe),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,r){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),e.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=WT(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var mne=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,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],v=d[c].get("type"),g=d[1-c].get("type"),m=t.data;if(m&&l){var x=[];B(m,function(S,T){var A;ae(S)?(A=S.slice(),S.unshift(T)):ae(S.value)?(A=re({},S),A.value=A.value.slice(),S.value.unshift(T)):A=S,x.push(A)}),t.data=x}var _=this.defaultValueDimensions,b=[{name:f,type:Aw(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Aw(g),dimsDef:_.slice()}];return Xv(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:Fe(MJ,b,this)})},e.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},e}(),yne=function(e){q(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.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:K.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:K.color.shadow}},animationDuration:800},t}(St);fr(yne,mne,!0);var pUe=function(e){q(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,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=qW(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(pa(f),xne(h,f,a,u)):f=qW(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},t.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t}(_t),gUe=function(){function e(){}return e}(),mUe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new gUe},t.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();a<i.length;a++)r.moveTo(i[a][0],i[a][1]),a++,r.lineTo(i[a][0],i[a][1])},t}(rt);function qW(e,t,r,n,i){var a=e.ends,o=new mUe({shape:{points:i?yUe(a,n,e):a}});return xne(e,o,t,r,i),o}function xne(e,t,r,n,i){var a=r.hostModel,o=Tf[i?"initProps":"updateProps"];o(t,{shape:{points:e.ends}},a,n),t.useStyle(r.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=r.getItemModel(n),l=s.getModel("emphasis");Dr(t,s),Wt(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function yUe(e,t,r){return se(e,function(n){return n=n.slice(),n[t]=r.initBaseline,n})}var Jg=B;function xUe(e){var t=_Ue(e);Jg(t,function(r){var n=r.seriesModels;n.length&&(bUe(r),Jg(n,function(i,a){wUe(i,r.boxOffsetList[a],r.boxWidthList[a])}))})}function _Ue(e){var t=[],r=[];return e.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=We(r,i);a<0&&(a=r.length,r[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function bUe(e){var t=e.axis,r=e.seriesModels,n=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Jg(r,function(v){l=Math.max(l,v.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Jg(r,function(v){var g=v.get("boxWidth");ae(g)||(g=[g,g]),o.push([ve(g[0],s)||0,ve(g[1],s)||0])});var c=s*.8-2,f=c/n*.3,h=(c-f*(n-1))/n,d=h/2-c/2;Jg(r,function(v,g){a.push(d),d+=f+h,i.push(Math.min(Math.max(h,o[g][0]),o[g][1]))})}function wUe(e,t,r){var n=e.coordinateSystem,i=e.getData(),a=r/2,o=e.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var f=0;f<i.count();f++){var h=i.get(u,f),d=b(h,c[2],f),v=b(h,c[0],f),g=b(h,c[1],f),m=b(h,c[3],f),x=b(h,c[4],f),_=[];S(_,g,!1),S(_,m,!0),_.push(v,g,x,m),T(_,v),T(_,x),T(_,d),i.setItemLayout(f,{initBaseline:d[s],ends:_})}function b(A,M,P){var I=i.get(M,P),k=[];k[o]=A,k[s]=I;var O;return isNaN(A)||isNaN(I)?O=[NaN,NaN]:(O=n.dataToPoint(k),O[o]+=t),O}function S(A,M,P){var I=M.slice(),k=M.slice();I[o]+=a,k[o]-=a,P?A.push(I,k):A.push(k,I)}function T(A,M){var P=M.slice(),I=M.slice();P[o]-=a,I[o]+=a,A.push(P,I)}}function SUe(e,t){t=t||{};for(var r=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<e.length;o++){var s=Mi(e[o].slice()),l=rb(s,.25),u=rb(s,.5),c=rb(s,.75),f=s[0],h=s[s.length-1],d=(i??1.5)*(c-l),v=a?f:Math.max(f,l-d),g=a?h:Math.min(h,c+d),m=t.itemNameFormatter,x=Ae(m)?m({value:o}):pe(m)?m.replace("{value}",o+""):o+"";r.push([x,v,l,u,c,g]);for(var _=0;_<s.length;_++){var b=s[_];if(b<v||b>g){var S=[x,b];n.push(S)}}}return{boxData:r,outliers:n}}var TUe={type:"echarts:boxplot",transform:function(t){var r=t.upstream;if(r.sourceFormat!==sn){var n="";mt(n)}var i=SUe(r.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function AUe(e){e.registerSeriesModel(yne),e.registerChartView(pUe),e.registerLayout(xUe),e.registerTransform(TUe)}var CUe=["itemStyle","borderColor"],MUe=["itemStyle","borderColor0"],PUe=["itemStyle","borderColorDoji"],LUe=["itemStyle","color"],kUe=["itemStyle","color0"];function nR(e,t){return t.get(e>0?LUe:kUe)}function iR(e,t){return t.get(e===0?PUe:e>0?CUe:MUe)}var IUe={seriesType:"candlestick",plan:Vv(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e)){var r=e.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=nR(s,o),l.stroke=iR(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");re(u,l)}}}}}},OUe=["color","borderColor"],EUe=function(e){q(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,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},t.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},t.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},t.prototype.eachRendered=function(r){xu(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(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&KW(u,f))return;var h=CM(f,c,!0);Nt(h,{shape:{points:f.ends}},r,c),MM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&KW(u,d)){a.remove(h);return}h?(lt(h,{shape:{points:d.ends}},r,c),pa(h)):h=CM(d),MM(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},t.prototype._renderLarge=function(r){this._clear(),QW(r,this.group);var n=r.get("clip",!0)?y0(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=CM(s);MM(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(r,n){QW(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(r){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(_t),DUe=function(){function e(){}return e}(),NUe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new DUe},t.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},t}(rt);function CM(e,t,r){var n=e.ends;return new NUe({shape:{points:r?jUe(n,e):n},z2:100})}function KW(e,t){for(var r=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){r=!1;break}return r}function MM(e,t,r,n){var i=t.getItemModel(r);e.useStyle(t.getItemVisual(r,"style")),e.style.strokeNoScale=!0,e.__simpleBox=n,Dr(e,i);var a=t.getItemLayout(r).sign;B(e.states,function(s,l){var u=i.getModel(l),c=nR(a,u),f=iR(a,u)||c,h=s.style||(s.style={});c&&(h.fill=c),f&&(h.stroke=f)});var o=i.getModel("emphasis");Wt(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function jUe(e,t){return se(e,function(r){return r=r.slice(),r[1]=t.initBaseline,r})}var RUe=function(){function e(){}return e}(),PM=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new RUe},t.prototype.buildPath=function(r,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];r.moveTo(o,i[a++]),r.lineTo(o,i[a++])}else a+=3},t}(rt);function QW(e,t,r,n){var i=e.getData(),a=i.getLayout("largePoints"),o=new PM({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new PM({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new PM({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),LM(1,o,e),LM(-1,s,e),LM(0,l,e),n&&(o.incremental=!0,s.incremental=!0),r&&r.push(o,s)}function LM(e,t,r,n){var i=iR(e,r)||nR(e,r),a=r.getModel("itemStyle").getItemStyle(OUe);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var _ne=function(e){q(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,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},t.type="series.candlestick",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}(St);fr(_ne,mne,!0);function BUe(e){!e||!ae(e.series)||B(e.series,function(t){Le(t)&&t.type==="k"&&(t.type="candlestick")})}var zUe={seriesType:"candlestick",plan:Vv(),reset:function(e){var t=e.coordinateSystem,r=e.getData(),n=$Ue(e,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=se(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],c=l[1],f=l[2],h=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:e.pipelineContext.large?v:d};function d(g,m){for(var x,_=m.getStore();(x=g.next())!=null;){var b=_.get(s,x),S=_.get(u,x),T=_.get(c,x),A=_.get(f,x),M=_.get(h,x),P=Math.min(S,T),I=Math.max(S,T),k=U(P,b),O=U(I,b),D=U(A,b),N=U(M,b),j=[];F(j,O,0),F(j,k,1),j.push(W(N),W(O),W(D),W(k));var z=m.getItemModel(x),$=!!z.get(["itemStyle","borderColorDoji"]);m.setItemLayout(x,{sign:JW(_,x,S,T,c,$),initBaseline:S>T?O[a]:k[a],ends:j,brushRect:V(A,M,b)})}function U(Y,Z){var J=[];return J[i]=Z,J[a]=Y,isNaN(Z)||isNaN(Y)?[NaN,NaN]:t.dataToPoint(J)}function F(Y,Z,J){var ne=Z.slice(),le=Z.slice();ne[i]=ib(ne[i]+n/2,1,!1),le[i]=ib(le[i]-n/2,1,!0),J?Y.push(ne,le):Y.push(le,ne)}function V(Y,Z,J){var ne=U(Y,J),le=U(Z,J);return ne[i]-=n/2,le[i]-=n/2,{x:ne[0],y:ne[1],width:n,height:le[1]-ne[1]}}function W(Y){return Y[i]=ib(Y[i],1),Y}}function v(g,m){for(var x=So(g.count*4),_=0,b,S=[],T=[],A,M=m.getStore(),P=!!e.get(["itemStyle","borderColorDoji"]);(A=g.next())!=null;){var I=M.get(s,A),k=M.get(u,A),O=M.get(c,A),D=M.get(f,A),N=M.get(h,A);if(isNaN(I)||isNaN(D)||isNaN(N)){x[_++]=NaN,_+=3;continue}x[_++]=JW(M,A,k,O,c,P),S[i]=I,S[a]=D,b=t.dataToPoint(S,null,T),x[_++]=b?b[0]:NaN,x[_++]=b?b[1]:NaN,S[a]=N,b=t.dataToPoint(S,null,T),x[_++]=b?b[1]:NaN}m.setLayout("largePoints",x)}}};function JW(e,t,r,n,i,a){var o;return r>n?o=-1:r<n?o=1:o=a?0:t>0?e.get(i,t-1)<=n?1:-1:1,o}function $Ue(e,t){var r=e.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=ve(be(e.get("barMaxWidth"),i),i),o=ve(be(e.get("barMinWidth"),1),i),s=e.get("barWidth");return s!=null?ve(s,i):Math.max(Math.min(i/2,a),o)}function FUe(e){e.registerChartView(EUe),e.registerSeriesModel(_ne),e.registerPreprocessor(BUe),e.registerVisual(IUe),e.registerLayout(zUe)}function eH(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 VUe=function(e){q(t,e);function t(r,n){var i=e.call(this)||this,a=new g0(r,n),o=new Me;return i.add(a),i.add(o),i.updateData(r,n),i}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=xr(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*r.period+r.effectOffset;l.animate("",!0).when(r.period,{scaleX:r.rippleScale/2,scaleY:r.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(r.period,{opacity:0}).delay(u).start(),o.add(l)}eH(o,r)},t.prototype.updateEffectAnimation=function(r){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==r[s]){this.stopEffectAnimation(),this.startEffectAnimation(r);return}}eH(i,r)},t.prototype.highlight=function(){Fs(this)},t.prototype.downplay=function(){Vs(this)},t.prototype.getSymbolType=function(){var r=this.childAt(0);return r&&r.getSymbolType()},t.prototype.updateData=function(r,n){var i=this,a=r.hostModel;this.childAt(0).updateData(r,n);var o=this.childAt(1),s=r.getItemModel(n),l=r.getItemVisual(n,"symbol"),u=Wv(r.getItemVisual(n,"symbolSize")),c=r.getItemVisual(n,"style"),f=c&&c.fill,h=s.getModel("emphasis");o.setScale(u),o.traverse(function(m){m.setStyle("fill",f)});var d=Mf(r.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var v=r.getItemVisual(n,"symbolRotate");o.rotation=(v||0)*Math.PI/180||0;var g={};g.showEffectOn=a.get("showEffectOn"),g.rippleScale=s.get(["rippleEffect","scale"]),g.brushType=s.get(["rippleEffect","brushType"]),g.period=s.get(["rippleEffect","period"])*1e3,g.effectOffset=n/r.count(),g.z=a.getShallow("z")||0,g.zlevel=a.getShallow("zlevel")||0,g.symbolType=l,g.color=f,g.rippleEffectColor=s.get(["rippleEffect","color"]),g.rippleNumber=s.get(["rippleEffect","number"]),g.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(g):this.startEffectAnimation(g),this._effectCfg=g):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(m){m==="emphasis"?g.showEffectOn!=="render"&&i.startEffectAnimation(g):m==="normal"&&g.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=g,Wt(this,h.get("focus"),h.get("blurScope"),h.get("disabled"))},t.prototype.fadeOut=function(r){r&&r()},t}(Me),GUe=function(e){q(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 m0(VUe)},t.prototype.render=function(r,n,i){var a=r.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(r)}),this.group.add(o.group)},t.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},t.prototype.updateTransform=function(r,n,i){var a=r.getData();this.group.dirty();var o=x0("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(r){var n=r.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=PK(n.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(_t),WUe=function(e){q(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 Yo(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(r,n,i){return i.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}(St);function HUe(e){e.registerChartView(GUe),e.registerSeriesModel(WUe),e.registerLayout(x0("effectScatter"))}var bne=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a.add(a.createLine(r,n,i)),a._updateEffectSymbol(r,n),a}return t.prototype.createLine=function(r,n,i){return new Zj(r,n,i)},t.prototype._updateEffectSymbol=function(r,n){var i=r.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");ae(o)||(o=[o,o]);var l=r.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=xr(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(r,a,n))},t.prototype._updateEffectAnimation=function(r,n,i){var a=this.childAt(1);if(a){var o=r.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),f=nn(n.get("delay"),function(d){return d/r.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;Ae(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},t.prototype._getLineLength=function(r){return ps(r.__p1,r.__cp1)+ps(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,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},t.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=rn,c=zk;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT<r.__t?(r.scaleY=ps(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):r.__lastT===1?r.scaleY=2*ps(n,s):r.scaleY=this._symbolScale[1]),r.__lastT=r.__t,r.ignore=!1,r.x=s[0],r.y=s[1]},t.prototype.updateLayout=function(r,n){this.childAt(0).updateLayout(r,n);var i=r.getItemModel(n).getModel("effect");this._updateEffectAnimation(r,i,n)},t}(Me),wne=function(e){q(t,e);function t(r,n,i){var a=e.call(this)||this;return a._createPolyline(r,n,i),a}return t.prototype._createPolyline=function(r,n,i){var a=r.getItemLayout(n),o=new on({shape:{points:a}});this.add(o),this._updateCommonStl(r,n,i)},t.prototype.updateData=function(r,n,i){var a=r.hostModel,o=this.childAt(0),s={shape:{points:r.getItemLayout(n)}};lt(o,s,a,n),this._updateCommonStl(r,n,i)},t.prototype._updateCommonStl=function(r,n,i){var a=this.childAt(0),o=r.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||r.hasItemOption){var f=o.getModel("emphasis");s=f.getModel("lineStyle").getLineStyle(),c=f.get("disabled"),l=f.get("focus"),u=f.get("blurScope")}a.useStyle(r.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var h=a.ensureState("emphasis");h.style=s,Wt(this,l,u,c)},t.prototype.updateLayout=function(r,n){var i=this.childAt(0);i.setShape("points",r.getItemLayout(n))},t}(Me),UUe=function(e){q(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,i){return new wne(r,n,i)},t.prototype._updateAnimationPoints=function(r,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=ps(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(r){var n=r.__t<1?r.__t:2-r.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var d=r.__t<1?h[0]-f[0]:f[0]-h[0],v=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},t}(bne),ZUe=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),YUe=function(e){q(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.getDefaultStyle=function(){return{stroke:K.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new ZUe},t.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){r.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)r.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],f=i[o++],h=i[o++];if(r.moveTo(u,c),a>0){var d=(u+f)/2-(c-h)*a,v=(c+h)/2-(f-u)*a;r.quadraticCurveTo(d,v,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var f=a[u++],h=a[u++],d=1;d<c;d++){var v=a[u++],g=a[u++];if(xl(f,h,v,g,s,r,n))return l}l++}else for(var l=0,u=0;u<a.length;){var f=a[u++],h=a[u++],v=a[u++],g=a[u++];if(o>0){var m=(f+v)/2-(h-g)*o,x=(h+g)/2-(v-f)*o;if(wQ(f,h,m,x,v,g,s,r,n))return l}else if(xl(f,h,v,g,s,r,n))return l;l++}return-1},t.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.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,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],f=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(f,o),l=Math.max(f,l)}r=this._rect=new Oe(a,o,s,l)}return r},t}(rt),XUe=function(){function e(){this.group=new Me}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){var n=this._newAdded[0],i=r.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,r),l.__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 YUe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(t),this.group.add(t),t},e.prototype._setCommon=function(t,r,n){var i=r.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=r.getVisual("style");a&&a.stroke&&t.setStyle("stroke",a.stroke),t.setStyle("fill",null);var o=De(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(s){o.dataIndex=null;var l=t.hoverDataIdx;l>0&&(o.dataIndex=l+t.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),Sne={seriesType:"lines",plan:Vv(),reset:function(e){var t=e.coordinateSystem;if(t){var r=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var f=0,h=[],c=i.start;c<i.end;c++){var d=e.getLineCoords(c,o);r&&(s[f++]=d);for(var v=0;v<d;v++)h=t.dataToPoint(o[v],!1,h),s[f++]=h[0],s[f++]=h[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var g=a.getItemModel(c),d=e.getLineCoords(c,o),m=[];if(r)for(var x=0;x<d;x++)m.push(t.dataToPoint(o[x]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var _=g.get(["lineStyle","curveness"]);+_&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*_,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*_])}a.setItemLayout(c,m)}}}}}},qUe=function(e){q(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,i){var a=r.getData(),o=this._updateLineDraw(a,r),s=r.get("zlevel"),l=r.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(r)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&y0(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},t.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},t.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},t.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=Sne.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},t.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new XUe:new Yj(o?a?UUe:wne:a?bne:Zj),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},t.prototype._showEffect=function(r){return!!r.get(["effect","show"])},t.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.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}(_t),KUe=typeof Uint32Array>"u"?Array:Uint32Array,QUe=typeof Float64Array>"u"?Array:Float64Array;function tH(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=se(t,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),vT([i,r[0],r[1]])}))}var JUe=function(e){q(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||[],tH(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(tH(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=Ud(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Ud(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),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},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 i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(r),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},t.prototype._processFlatCoordsArray=function(r){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),ot(r[0])){for(var i=r.length,a=new KUe(i),o=new QUe(i),s=0,l=0,u=0,c=0;c<i;){u++;var f=r[c++];a[l++]=s+n,a[l++]=f;for(var h=0;h<f;h++){var d=r[c++],v=r[c++];o[s++]=d,o[s++]=v}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:r.length}},t.prototype.getInitialData=function(r,n){var i=new Dn(["value"],this);return i.hasItemOption=!1,i.initData(r.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getItemModel(r),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Ar("nameValue",{name:c.join(" > ")})},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}(St);function b_(e){return e instanceof Array||(e=[e,e]),e}var e7e={seriesType:"lines",reset:function(e){var t=b_(e.get("symbol")),r=b_(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 i(a,o){var s=a.getItemModel(o),l=b_(s.getShallow("symbol",!0)),u=b_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function t7e(e){e.registerChartView(qUe),e.registerSeriesModel(JUe),e.registerLayout(Sne),e.registerVisual(e7e)}var r7e=256,n7e=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=hi.createCanvas();this.canvas=t}return e.prototype.update=function(t,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=t.length;f.width=r,f.height=n;for(var v=0;v<d;++v){var g=t[v],m=g[0],x=g[1],_=g[2],b=i(_);h.globalAlpha=b,h.drawImage(s,m-c,x-c)}if(!f.width||!f.height)return f;for(var S=h.getImageData(0,0,f.width,f.height),T=S.data,A=0,M=T.length,P=this.minOpacity,I=this.maxOpacity,k=I-P;A<M;){var b=T[A+3]/256,O=Math.floor(b*(r7e-1))*4;if(b>0){var D=o(b)?l:u;b>0&&(b=b*k+P),T[A++]=D[O],T[A++]=D[O+1],T[A++]=D[O+2],T[A++]=D[O+3]*b*256}else A+=4}return h.putImageData(S,0,0),f},e.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=hi.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=K.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},e.prototype._getGradient=function(t,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},e}();function i7e(e,t,r){var n=e[1]-e[0];t=se(t,function(o){return{interval:[(o.interval[0]-e[0])/n,(o.interval[1]-e[0])/n]}});var i=t.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&r[s]}}function a7e(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]}}function rH(e){var t=e.dimensions;return t[0]==="lng"&&t[1]==="lat"}var o7e=function(e){q(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,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):rH(o)&&this._renderOnGeo(o,r,a,i)},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(rH(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},t.prototype.eachRendered=function(r){xu(this._progressiveEls||this.group,r)},t.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=au(s,"cartesian2d"),u=au(s,"matrix"),c,f,h,d;if(l){var v=s.getAxis("x"),g=s.getAxis("y");c=v.getBandWidth()+.5,f=g.getBandWidth()+.5,h=v.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,x=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),S=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),A=Nr(r),M=r.getModel("emphasis"),P=M.get("focus"),I=M.get("blurScope"),k=M.get("disabled"),O=l||u?[x.mapDimension("x"),x.mapDimension("y"),x.mapDimension("value")]:[x.mapDimension("time"),x.mapDimension("value")],D=i;D<a;D++){var N=void 0,j=x.getItemVisual(D,"style");if(l){var z=x.get(O[0],D),$=x.get(O[1],D);if(isNaN(x.get(O[2],D))||isNaN(z)||isNaN($)||z<h[0]||z>h[1]||$<d[0]||$>d[1])continue;var U=s.dataToPoint([z,$]);N=new Xe({shape:{x:U[0]-c/2,y:U[1]-f/2,width:c,height:f},style:j})}else if(u){var F=s.dataToLayout([x.get(O[0],D),x.get(O[1],D)]).rect;if(mn(F.x))continue;N=new Xe({z2:1,shape:F,style:j})}else{if(isNaN(x.get(O[1],D)))continue;var V=s.dataToLayout([x.get(O[0],D)]),F=V.contentRect||V.rect;if(mn(F.x)||mn(F.y))continue;N=new Xe({z2:1,shape:F,style:j})}if(x.hasItemOption){var W=x.getItemModel(D),Y=W.getModel("emphasis");_=Y.getModel("itemStyle").getItemStyle(),b=W.getModel(["blur","itemStyle"]).getItemStyle(),S=W.getModel(["select","itemStyle"]).getItemStyle(),T=W.get(["itemStyle","borderRadius"]),P=Y.get("focus"),I=Y.get("blurScope"),k=Y.get("disabled"),A=Nr(W)}N.shape.r=T;var Z=r.getRawValue(D),J="-";Z&&Z[2]!=null&&(J=Z[2]+""),Ur(N,A,{labelFetcher:r,labelDataIndex:D,defaultOpacity:j.opacity,defaultText:J}),N.ensureState("emphasis").style=_,N.ensureState("blur").style=b,N.ensureState("select").style=S,Wt(N,P,I,k),N.incremental=o,o&&(N.states.emphasis.hoverLayer=!0),m.add(N),x.setItemGraphicEl(D,N),this._progressiveEls&&this._progressiveEls.push(N)}},t.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new n7e;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),v=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=v-h,x=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(_,function(M,P,I){var k=r.dataToPoint([M,P]);return k[0]-=h,k[1]-=d,k.push(I),k}),S=i.getExtent(),T=i.type==="visualMap.continuous"?a7e(S,i.option.range):i7e(S,i.getPieceList(),i.option.selected);u.update(b,m,x,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},T);var A=new Xr({style:{width:m,height:x,x:h,y:d,image:u.canvas},silent:!0});this.group.add(A)},t.type="heatmap",t}(_t),s7e=function(e){q(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 Yo(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var r=Fv.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:K.color.primary}}},t}(St);function l7e(e){e.registerChartView(o7e),e.registerSeriesModel(s7e)}var u7e=["itemStyle","borderWidth"],nH=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],kM=new Zo,c7e=function(e){q(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,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:nH[+c],categoryDim:nH[1-+c]};o.diff(s).add(function(v){if(o.hasValue(v)){var g=aH(o,v),m=iH(o,v,g,h),x=oH(o,h,m);o.setItemGraphicEl(v,x),a.add(x),lH(x,h,m)}}).update(function(v,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(v)){a.remove(m);return}var x=aH(o,v),_=iH(o,v,x,h),b=Lne(o,_);m&&b!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(v,null),m=null),m?m7e(m,h,_):m=oH(o,h,_,!0),o.setItemGraphicEl(v,m),m.__pictorialSymbolMeta=_,a.add(m),lH(m,h,_)}).remove(function(v){var g=s.getItemGraphicEl(v);g&&sH(s,v,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?y0(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){sH(a,De(o).dataIndex,r,o)}):i.removeAll()},t.type="pictorialBar",t}(_t);function iH(e,t,r,n){var i=e.getItemLayout(t),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:t,layout:i,itemModel:r,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};f7e(r,a,i,n,h),h7e(e,t,i,a,o,h.boundingLength,h.pxSign,c,n,h),d7e(r,h.symbolScale,u,n,h);var d=h.symbolSize,v=Mf(r.get("symbolOffset"),d);return v7e(r,d,i,a,o,v,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function f7e(e,t,r,n,i){var a=n.valueDim,o=e.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ae(o)){var f=[IM(s,o[0])-l,IM(s,o[1])-l];f[1]<f[0]&&f.reverse(),c=f[u]}else o!=null?c=IM(s,o)-l:t?c=n.coordSysExtent[a.index][u]-l:c=r[a.wh];i.boundingLength=c,t&&(i.repeatCutLength=r[a.wh]);var h=a.xy==="x",d=s.inverse;i.pxSign=h&&!d||!h&&d?c>=0?1:-1:c>0?1:-1}function IM(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function h7e(e,t,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),d=e.getItemVisual(t,"symbolSize"),v;ae(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[f.index]=ve(v[f.index],h),v[c.index]=ve(v[c.index],n?h:Math.abs(a)),u.symbolSize=v;var g=u.symbolScale=[v[0]/s,v[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function d7e(e,t,r,n,i){var a=e.get(u7e)||0;a&&(kM.attr({scaleX:t[0],scaleY:t[1],rotation:r}),kM.updateTransform(),a/=kM.getLineScale(),a*=t[n.valueDim.index]),i.valueLineWidth=a||0}function v7e(e,t,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,v=f.pxSign,g=Math.max(t[d.index]+s,0),m=g;if(n){var x=Math.abs(l),_=nn(e.get("symbolMargin"),"15%")+"",b=!1;_.lastIndexOf("!")===_.length-1&&(b=!0,_=_.slice(0,_.length-1));var S=ve(_,t[d.index]),T=Math.max(g+S*2,0),A=b?0:S*2,M=vN(n),P=M?n:uH((x+A)/T),I=x-P*g;S=I/2/(b?P:Math.max(P-1,1)),T=g+S*2,A=b?0:S*2,!M&&n!=="fixed"&&(P=u?uH((Math.abs(u)+A)/T):0),m=P*T-A,f.repeatTimes=P,f.symbolMargin=S}var k=v*(m/2),O=f.pathPosition=[];O[h.index]=r[h.wh]/2,O[d.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(O[0]+=a[0],O[1]+=a[1]);var D=f.bundlePosition=[];D[h.index]=r[h.xy],D[d.index]=r[d.xy];var N=f.barRectShape=re({},r);N[d.wh]=v*Math.max(Math.abs(r[d.wh]),Math.abs(O[d.index]+k)),N[h.wh]=r[h.wh];var j=f.clipShape={};j[h.xy]=-r[h.xy],j[h.wh]=c.ecSize[h.wh],j[d.xy]=0,j[d.wh]=r[d.wh]}function Tne(e){var t=e.symbolPatternSize,r=xr(e.symbolType,-t/2,-t/2,t,t);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Ane(e,t,r,n){var i=e.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=t.valueDim,u=r.repeatTimes||0,c=0,f=a[t.valueDim.index]+o+r.symbolMargin*2;for(aR(e,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c<u?fd(g,null,v(c),r,n):fd(g,null,{scaleX:0,scaleY:0},r,n,function(){i.remove(g)}),c++});c<u;c++){var h=Tne(r);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var d=v(c);fd(h,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},r,n)}function v(g){var m=s.slice(),x=r.pxSign,_=g;return(r.symbolRepeatDirection==="start"?x>0:x<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function Cne(e,t,r,n){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?fd(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=e.__pictorialMainPath=Tne(r),i.add(a),fd(a,{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 Mne(e,t,r){var n=re({},t.barRectShape),i=e.__pictorialBarRect;i?fd(i,null,{shape:n},t,r):(i=e.__pictorialBarRect=new Xe({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function Pne(e,t,r,n){if(r.symbolClip){var i=e.__pictorialClipPath,a=re({},r.clipShape),o=t.valueDim,s=r.animationModel,l=r.dataIndex;if(i)lt(i,{shape:a},s,l);else{a[o.wh]=0,i=new Xe({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Tf[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function aH(e,t){var r=e.getItemModel(t);return r.getAnimationDelayParams=p7e,r.isAnimationEnabled=g7e,r}function p7e(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function g7e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function oH(e,t,r,n){var i=new Me,a=new Me;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?Ane(i,t,r):Cne(i,t,r),Mne(i,r,n),Pne(i,t,r,n),i.__pictorialShapeStr=Lne(e,r),i.__pictorialSymbolMeta=r,i}function m7e(e,t,r){var n=r.animationModel,i=r.dataIndex,a=e.__pictorialBundle;lt(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?Ane(e,t,r,!0):Cne(e,t,r,!0),Mne(e,r,!0),Pne(e,t,r,!0)}function sH(e,t,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];aR(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),B(a,function(o){iu(o,{scaleX:0,scaleY:0},r,t,function(){n.parent&&n.parent.remove(n)})}),e.setItemGraphicEl(t,null)}function Lne(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function aR(e,t,r){B(e.__pictorialBundle.children(),function(n){n!==e.__pictorialBarRect&&t.call(r,n)})}function fd(e,t,r,n,i,a){t&&e.attr(t),n.symbolClip&&!i?r&&e.attr(r):r&&Tf[i?"updateProps":"initProps"](e,r,n.animationModel,n.dataIndex,a)}function lH(e,t,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");aR(e,function(g){if(g instanceof Xr){var m=g.style;g.useStyle(re({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var x=g.ensureState("emphasis");x.style=o,h&&(x.scaleX=g.scaleX*1.1,x.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=t.valueDim.posDesc[+(r.boundingLength>0)],v=e.__pictorialBarRect;v.ignoreClip=!0,Ur(v,Nr(i),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:nv(t.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),Wt(e,c,f,a.get("disabled"))}function uH(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var y7e=function(e){q(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.pictorialBar",t.dependencies=["grid"],t.defaultOption=_u(Ly.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:K.color.primary}}}),t}(Ly);function x7e(e){e.registerChartView(c7e),e.registerSeriesModel(y7e),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Fe(Xee,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,qee("pictorialBar"))}var _7e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r._layers=[],r}return t.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var d=new Gs(this._layersSeries||[],l,h,h),v=[];d.add(ge(g,this,"add")).update(ge(g,this,"update")).remove(ge(g,this,"remove")).execute();function g(m,x,_){var b=o._layers;if(m==="remove"){s.remove(b[x]);return}for(var S=[],T=[],A,M=l[x].indices,P=0;P<M.length;P++){var I=a.getItemLayout(M[P]),k=I.x,O=I.y0,D=I.y;S.push(k,O),T.push(k,O+D),A=a.getItemVisual(M[P],"style")}var N,j=a.getItemLayout(M[0]),z=r.getModel("label"),$=z.get("margin"),U=r.getModel("emphasis");if(m==="add"){var F=v[x]=new Me;N=new $te({shape:{points:S,stackedOnPoints:T,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),F.add(N),s.add(F),r.isAnimationEnabled()&&N.setClipPath(b7e(N.getBoundingRect(),r,function(){N.removeClipPath()}))}else{var F=b[_];N=F.childAt(0),s.add(F),v[x]=F,lt(N,{shape:{points:S,stackedOnPoints:T}},r),pa(N)}Ur(N,Nr(r),{labelDataIndex:M[P-1],defaultText:a.getName(M[P-1]),inheritColor:A.fill},{normal:{verticalAlign:"middle"}}),N.setTextConfig({position:null,local:!0});var V=N.getTextContent();V&&(V.x=j.x-$,V.y=j.y0+j.y/2),N.useStyle(A),a.setItemGraphicEl(x,N),Dr(N,r),Wt(N,U.get("focus"),U.get("blurScope"),U.get("disabled"))}this._layersSeries=l,this._layers=v},t.type="themeRiver",t}(_t);function b7e(e,t,r){var n=new Xe({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Nt(n,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,r),n}var OM=2,w7e=function(e){q(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 qv(ge(this.getData,this),ge(this.getRawData,this))},t.prototype.fixData=function(r){var n=r.length,i={},a=tI(r,function(h){return i.hasOwnProperty(h[0]+"")||(i[h[0]+""]=-1),h[2]}),o=[];a.buckets.each(function(h,d){o.push({name:d,dataList:h})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var f=o[l].dataList[c][0]+"";i[f]=l}for(var f in i)i.hasOwnProperty(f)&&i[f]!==l&&(i[f]=l,r[n]=[f,0,u],n++)}return r},t.prototype.getInitialData=function(r,n){for(var i=this.getReferringComponents("singleAxis",tr).models[0],a=i.get("type"),o=ht(r.data,function(v){return v[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=_e(),c=0,f=0;f<s.length;++f)l.push(s[f][OM]),u.get(s[f][OM])||(u.set(s[f][OM],c),c++);var h=Hv(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Aw(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new Dn(h,this);return d.initData(s),d},t.prototype.getLayerSeries=function(){for(var r=this.getData(),n=r.count(),i=[],a=0;a<n;++a)i[a]=a;var o=r.mapDimension("single"),s=tI(i,function(u){return r.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(f,h){return r.get(o,f)-r.get(o,h)}),l.push({name:c,indices:u})}),l},t.prototype.getAxisTooltipData=function(r,n,i){ae(r)||(r=r?[r]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var f=Number.MAX_VALUE,h=-1,d=o[c].indices.length,v=0;v<d;++v){var g=a.get(r[0],o[c].indices[v]),m=Math.abs(g-n);m<=f&&(u=g,f=m,h=o[c].indices[v])}s.push(h)}return{dataIndices:s,nestestValue:u}},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=a.getName(r),s=a.get(a.mapDimension("value"),r);return Ar("nameValue",{name:o,value:s})},t.type="series.themeRiver",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}(St);function S7e(e,t){e.eachSeriesByType("themeRiver",function(r){var n=r.getData(),i=r.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=r.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=ve(s[0],o.height),s[1]=ve(s[1],o.height);var u=o.height-s[0]-s[1];cH(n,r,u)}else{s[0]=ve(s[0],o.width),s[1]=ve(s[1],o.width);var c=o.width-s[0]-s[1];cH(n,r,c)}n.setLayout("layoutInfo",a)})}function cH(e,t,r){if(e.count())for(var n=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),o=e.mapDimension("value"),s=se(i,function(m){return se(m.indices,function(x){var _=n.dataToPoint(e.get(a,x));return _[1]=e.get(o,x),_})}),l=T7e(s),u=l.y0,c=r/l.max,f=i.length,h=i[0].indices.length,d,v=0;v<h;++v){d=u[v]*c,e.setItemLayout(i[0].indices[v],{layerIndex:0,x:s[0][v][0],y0:d,y:s[0][v][1]*c});for(var g=1;g<f;++g)d+=s[g-1][v][1]*c,e.setItemLayout(i[g].indices[v],{layerIndex:g,x:s[g][v][0],y0:d,y:s[g][v][1]*c})}}function T7e(e){for(var t=e.length,r=e[0].length,n=[],i=[],a=0,o=0;o<r;++o){for(var s=0,l=0;l<t;++l)s+=e[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<r;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<r;++c){var f=n[c]+i[c];f>a&&(a=f)}return{y0:i,max:a}}function A7e(e){e.registerChartView(_7e),e.registerSeriesModel(w7e),e.registerLayout(S7e),e.registerProcessor(Yv("themeRiver"))}var C7e=2,M7e=4,fH=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this)||this;o.z2=C7e,o.textConfig={inside:!0},De(o).seriesIndex=n.seriesIndex;var s=new at({z2:M7e,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return t.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;De(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=re({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=ev(d,o));var v=Ao(l.getModel("itemStyle"),f,!0);re(f,v),B(Yn,function(_){var b=s.ensureState(_),S=l.getModel([_,"itemStyle"]);b.style=S.getItemStyle();var T=Ao(S,f);T&&(b.shape=T)}),r?(s.setShape(f),s.shape.r=c.r0,Nt(s,{shape:{r:c.r}},i,n.dataIndex)):(lt(s,{shape:f},i),pa(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),x=m==="relative"?Ud(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;Wt(this,x,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(v!=null&&Math.abs(s)<v);h.ignore=!g,B(py,function(x){var _=x==="normal"?i.getModel("label"):i.getModel([x,"label"]),b=x==="normal",S=b?h:h.ensureState(x),T=r.getFormattedLabel(d,x);b&&(T=T||n.node.name),S.style=Mt(_,{},null,x!=="normal",!0),T&&(S.style.text=T);var A=_.get("show");A!=null&&!b&&(S.ignore=!A);var M=m(_,"position"),P=b?f:f.states[x],I=P.style.fill;P.textConfig={outsideFill:_.get("color")==="inherit"?I:null,inside:M!=="outside"};var k,O=m(_,"distance")||0,D=m(_,"align"),N=m(_,"rotate"),j=Math.PI*.5,z=Math.PI*1.5,$=Pi(N==="tangential"?Math.PI/2-l:l),U=$>j&&!Xd($-j)&&$<z;M==="outside"?(k=o.r+O,D=U?"right":"left"):!D||D==="center"?(s===2*Math.PI&&o.r0===0?k=0:k=(o.r+o.r0)/2,D="center"):D==="left"?(k=o.r0+O,D=U?"right":"left"):D==="right"&&(k=o.r-O,D=U?"left":"right"),S.style.align=D,S.style.verticalAlign=m(_,"verticalAlign")||"middle",S.x=k*u+o.cx,S.y=k*c+o.cy;var F=0;N==="radial"?F=Pi(-l)+(U?Math.PI:0):N==="tangential"?F=Pi(Math.PI/2-l)+(U?Math.PI:0):ot(N)&&(F=N*Math.PI/180),S.rotation=Pi(F)});function m(x,_){var b=x.get(_);return b??a.get(_)}h.dirtyStyle()},t}(bn),mO="sunburstRootToNode",hH="sunburstHighlight",P7e="sunburstUnhighlight";function L7e(e){e.registerAction({type:mO,update:"updateView"},function(t,r){r.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=Iy(t,[mO],i);if(o){var s=i.getViewRoot();s&&(t.direction=Vj(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),e.registerAction({type:hH,update:"none"},function(t,r,n){t=re({},t),r.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=Iy(t,[hH],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(re(t,{type:"highlight"}))}),e.registerAction({type:P7e,update:"updateView"},function(t,r,n){t=re({},t),n.dispatchAction(re(t,{type:"downplay"}))})}var k7e=function(e){q(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,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),c=this.group,f=r.get("renderLabelForZeroData"),h=[];u.eachNode(function(_){h.push(_)});var d=this._oldChildren||[];v(h,d),x(l,u),this._initEvents(),this._oldChildren=h;function v(_,b){if(_.length===0&&b.length===0)return;new Gs(b,_,S,S).add(T).update(T).remove(Fe(T,null)).execute();function S(A){return A.getId()}function T(A,M){var P=A==null?null:_[A],I=M==null?null:b[M];g(P,I)}}function g(_,b){if(!f&&_&&!_.getValue()&&(_=null),_!==l&&b!==l){if(b&&b.piece)_?(b.piece.updateData(!1,_,r,n,i),s.setItemGraphicEl(_.dataIndex,b.piece)):m(b);else if(_){var S=new fH(_,r,n,i);c.add(S),s.setItemGraphicEl(_.dataIndex,S)}}}function m(_){_&&_.piece&&(c.remove(_.piece),_.piece=null)}function x(_,b){b.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new fH(_,r,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";pw(u,c)}}i=!0}})})},t.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:mO,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},t.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t}(_t),I7e=function(e){q(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 i={name:r.name,children:r.data};kne(i);var a=this._levelModels=se(r.levels||[],function(l){return new tt(l,this,n)},this),o=Fj.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(r){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=UT(i,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(){Dre(this)},t.type="series.sunburst",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}(St);function kne(e){var t=0;B(e.children,function(n){kne(n);var i=n.value;ae(i)&&(i=i[0]),t+=i});var r=e.value;ae(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=t),r<0&&(r=0),ae(e.value)?e.value[0]=r:e.value=r}var dH=Math.PI/180;function O7e(e,t,r){t.eachSeriesByType(e,function(n){var i=n.get("center"),a=n.get("radius");ae(a)||(a=[0,a]),ae(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=ve(i[0],o),c=ve(i[1],s),f=ve(a[0],l/2),h=ve(a[1],l/2),d=-n.get("startAngle")*dH,v=n.get("minAngle")*dH,g=n.getData().tree.root,m=n.getViewRoot(),x=m.depth,_=n.get("sort");_!=null&&Ine(m,_);var b=0;B(m.children,function($){!isNaN($.getValue())&&b++});var S=m.getValue(),T=Math.PI/(S||b)*2,A=m.depth>0,M=m.height-(A?-1:1),P=(h-f)/(M||1),I=n.get("clockwise"),k=n.get("stillShowZeroSum"),O=I?1:-1,D=function($,U){if($){var F=U;if($!==g){var V=$.getValue(),W=S===0&&k?T:V*T;W<v&&(W=v),F=U+O*W;var Y=$.depth-x-(A?-1:1),Z=f+P*Y,J=f+P*(Y+1),ne=n.getLevelModel($);if(ne){var le=ne.get("r0",!0),fe=ne.get("r",!0),ze=ne.get("radius",!0);ze!=null&&(le=ze[0],fe=ze[1]),le!=null&&(Z=ve(le,l/2)),fe!=null&&(J=ve(fe,l/2))}$.setLayout({angle:W,startAngle:U,endAngle:F,clockwise:I,cx:u,cy:c,r0:Z,r:J})}if($.children&&$.children.length){var xe=0;B($.children,function(ie){xe+=D(ie,U+xe)})}return F-U}};if(A){var N=f,j=f+P,z=Math.PI*2;g.setLayout({angle:z,startAngle:d,endAngle:d+z,clockwise:I,cx:u,cy:c,r0:N,r:j})}D(m,d)})}function Ine(e,t){var r=e.children||[];e.children=E7e(r,t),r.length&&B(e.children,function(n){Ine(n,t)})}function E7e(e,t){if(Ae(t)){var r=se(e,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return r.sort(function(i,a){return t(i.params,a.params)}),se(r,function(i){return e[i.index]})}else{var n=t==="asc";return e.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function D7e(e){var t={};function r(n,i,a){if(n.depth===0)return K.color.neutral50;for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",t);return n.depth>1&&pe(s)&&(s=tw(s,(n.depth-1)/(a-1)*.5)),s}e.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");re(u,l)})})}function N7e(e){e.registerChartView(k7e),e.registerSeriesModel(I7e),e.registerLayout(Fe(O7e,"sunburst")),e.registerProcessor(Fe(Yv,"sunburst")),e.registerVisual(D7e),L7e(e)}var vH={color:"fill",borderColor:"stroke"},j7e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ms=Je(),R7e=function(e){q(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 Yo(null,this)},t.prototype.getDataParams=function(r,n,i){var a=e.prototype.getDataParams.call(this,r,n);return i&&(a.info=Ms(i).info),a},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(St);function B7e(e,t){return t=t||[0,0],se(["x","y"],function(r,n){var i=this.getAxis(r),a=t[n],o=e[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function z7e(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:ge(B7e,e)}}}function $7e(e,t){return t=t||[0,0],se([0,1],function(r){var n=t[r],i=e[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=t[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function F7e(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(r){return e.dataToPoint(r)},size:ge($7e,e)}}}function V7e(e,t){var r=this.getAxis(),n=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function G7e(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:ge(V7e,e)}}}function W7e(e,t){return t=t||[0,0],se(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=t[n],s=e[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function H7e(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(i){var a=t.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=e.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:ge(W7e,e)}}}function U7e(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,i){return e.dataToPoint(n,i)},layout:function(n,i){return e.dataToLayout(n,i)}}}}function Z7e(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)}}}}function One(e,t,r,n){return e&&(e.legacy||e.legacy!==!1&&!r&&!n&&t!=="tspan"&&(t==="text"||ye(e,"text")))}function Ene(e,t,r){var n=e,i,a,o;if(t==="text")o=n;else{o={},ye(n,"text")&&(o.text=n.text),ye(n,"rich")&&(o.rich=n.rich),ye(n,"textFill")&&(o.fill=n.textFill),ye(n,"textStroke")&&(o.stroke=n.textStroke),ye(n,"fontFamily")&&(o.fontFamily=n.fontFamily),ye(n,"fontSize")&&(o.fontSize=n.fontSize),ye(n,"fontStyle")&&(o.fontStyle=n.fontStyle),ye(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=ye(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),ye(n,"textPosition")&&(i.position=n.textPosition),ye(n,"textOffset")&&(i.offset=n.textOffset),ye(n,"textRotation")&&(i.rotation=n.textRotation),ye(n,"textDistance")&&(i.distance=n.textDistance)}return pH(o,e),B(o.rich,function(l){pH(l,l)}),{textConfig:i,textContent:a}}function pH(e,t){t&&(t.font=t.textFont||t.font,ye(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),ye(t,"textAlign")&&(e.align=t.textAlign),ye(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),ye(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),ye(t,"textWidth")&&(e.width=t.textWidth),ye(t,"textHeight")&&(e.height=t.textHeight),ye(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),ye(t,"textPadding")&&(e.padding=t.textPadding),ye(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),ye(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),ye(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),ye(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),ye(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),ye(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),ye(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function gH(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 i=n.textPosition.indexOf("inside")>=0,a=e.fill||K.color.neutral99;mH(n,t);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||K.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=e.fill||r.outsideFill||K.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=t.text,n.rich=t.rich,B(t.rich,function(s){mH(s,s)}),n}function mH(e,t){t&&(ye(t,"fill")&&(e.textFill=t.fill),ye(t,"stroke")&&(e.textStroke=t.fill),ye(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),ye(t,"font")&&(e.font=t.font),ye(t,"fontStyle")&&(e.fontStyle=t.fontStyle),ye(t,"fontWeight")&&(e.fontWeight=t.fontWeight),ye(t,"fontSize")&&(e.fontSize=t.fontSize),ye(t,"fontFamily")&&(e.fontFamily=t.fontFamily),ye(t,"align")&&(e.textAlign=t.align),ye(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),ye(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),ye(t,"width")&&(e.textWidth=t.width),ye(t,"height")&&(e.textHeight=t.height),ye(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),ye(t,"padding")&&(e.textPadding=t.padding),ye(t,"borderColor")&&(e.textBorderColor=t.borderColor),ye(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),ye(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),ye(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),ye(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),ye(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),ye(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),ye(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),ye(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),ye(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),ye(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Dne={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},yH=it(Dne);ha(Bo,function(e,t){return e[t]=1,e},{});Bo.join(", ");var Gw=["","style","shape","extra"],sv=Je();function oR(e,t,r,n,i){var a=e+"Animation",o=jv(e,n,i)||{},s=sv(t).userDuring;return o.duration>0&&(o.during=s?ge(Q7e,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),re(o,r[a]),o}function hb(e,t,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=sv(e),u=t.style;l.userDuring=t.during;var c={},f={};if(e9e(e,t,f),e.type==="compound")for(var h=e.shape.paths,d=t.shape.paths,v=0;v<d.length;v++){var g=d[v];EM("shape",g,h[v])}else EM("shape",t,f),EM("extra",t,f);if(!a&&s&&(J7e(e,t,c),xH("shape",e,t,c),xH("extra",e,t,c),t9e(e,t,u,c)),f.style=u,Y7e(e,f,o),q7e(e,t),s)if(a){var m={};B(Gw,function(_){var b=_?t[_]:t;b&&b.enterFrom&&(_&&(m[_]=m[_]||{}),re(_?m[_]:m,b.enterFrom))});var x=oR("enter",e,t,r,i);x.duration>0&&e.animateFrom(m,x)}else X7e(e,t,i||0,r,c);Nne(e,t),u?e.dirty():e.markRedraw()}function Nne(e,t){for(var r=sv(e).leaveToProps,n=0;n<Gw.length;n++){var i=Gw[n],a=i?t[i]:t;a&&a.leaveTo&&(r||(r=sv(e).leaveToProps={}),i&&(r[i]=r[i]||{}),re(i?r[i]:r,a.leaveTo))}}function XT(e,t,r,n){if(e){var i=e.parent,a=sv(e).leaveToProps;if(a){var o=oR("update",e,t,r,0);o.done=function(){i&&i.remove(e)},e.animateTo(a,o)}else i&&i.remove(e)}}function Vc(e){return e==="all"}function Y7e(e,t,r){var n=t.style;if(!e.isGroup&&n){if(r){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(e.style)}}e.setStyle(n)}t&&(t.style=null,t&&e.attr(t),t.style=n)}function X7e(e,t,r,n,i){if(i){var a=oR("update",e,t,n,r);a.duration>0&&e.animateFrom(i,a)}}function q7e(e,t){ye(t,"silent")&&(e.silent=t.silent),ye(t,"ignore")&&(e.ignore=t.ignore),e instanceof va&&ye(t,"invisible")&&(e.invisible=t.invisible),e instanceof rt&&ye(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}var co={},K7e={setTransform:function(e,t){return co.el[e]=t,this},getTransform:function(e){return co.el[e]},setShape:function(e,t){var r=co.el,n=r.shape||(r.shape={});return n[e]=t,r.dirtyShape&&r.dirtyShape(),this},getShape:function(e){var t=co.el.shape;if(t)return t[e]},setStyle:function(e,t){var r=co.el,n=r.style;return n&&(n[e]=t,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(e){var t=co.el.style;if(t)return t[e]},setExtra:function(e,t){var r=co.el.extra||(co.el.extra={});return r[e]=t,this},getExtra:function(e){var t=co.el.extra;if(t)return t[e]}};function Q7e(){var e=this,t=e.el;if(t){var r=sv(t).userDuring,n=e.userDuring;if(r!==n){e.el=e.userDuring=null;return}co.el=t,n(K7e)}}function xH(e,t,r,n){var i=r[e];if(i){var a=t[e],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[e]={}),Vc(l))re(o,a);else for(var u=Pt(l),c=0;c<u.length;c++){var f=u[c],h=a[f];o[f]=h}else if(Vc(s)||We(s,e)>=0){!o&&(o=n[e]={});for(var d=it(a),c=0;c<d.length;c++){var f=d[c],h=a[f];r9e(i[f],h)&&(o[f]=h)}}}}}function EM(e,t,r){var n=t[e];if(n)for(var i=r[e]={},a=it(n),o=0;o<a.length;o++){var s=a[o];i[s]=Ug(n[s])}}function J7e(e,t,r){for(var n=t.transition,i=Vc(n)?Bo:Pt(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=e[o];r[o]=s}}}function e9e(e,t,r){for(var n=0;n<yH.length;n++){var i=yH[n],a=Dne[i],o=t[i];o&&(r[a[0]]=o[0],r[a[1]]=o[1])}for(var n=0;n<Bo.length;n++){var s=Bo[n];t[s]!=null&&(r[s]=t[s])}}function t9e(e,t,r,n){if(r){var i=e.style,a;if(i){var o=r.transition,s=t.transition;if(o&&!Vc(o)){var l=Pt(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],f=i[c];a[c]=f}}else if(e.getAnimationStyleProps&&(Vc(s)||Vc(o)||We(s,"style")>=0)){var h=e.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var v=it(r),u=0;u<v.length;u++){var c=v[u];if(d[c]){var f=i[c];a[c]=f}}}}}}}function r9e(e,t){return xn(e)?e!==t:e!=null&&isFinite(e)}var jne=Je(),n9e=["percent","easing","shape","style","extra"];function Rne(e){e.stopAnimation("keyframe"),e.attr(jne(e))}function Ww(e,t,r){if(!(!r.isAnimationEnabled()||!t)){if(ae(t)){B(t,function(s){Ww(e,s,r)});return}var n=t.keyframes,i=t.duration;if(r&&i==null){var a=jv("enter",r,0);i=a&&a.duration}if(!(!n||!i)){var o=jne(e);B(Gw,function(s){if(!(s&&!e[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),B(n,function(u){var c=e.animators,f=s?u[s]:u;if(f){var h=it(f);if(s||(h=ht(h,function(g){return We(n9e,g)<0})),!!h.length){l||(l=e.animate(s,t.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(h);s&&(o[s]=o[s]||{});var v=s?o[s]:o;B(h,function(g){v[g]=((s?e[s]:e)||{})[g]}),l.whenWithKeys(i*u.percent,f,h,u.easing)}}}),l&&l.delay(t.delay||0).duration(i).start(t.easing)}})}}}var Ps="emphasis",El="normal",sR="blur",lR="select",lu=[El,Ps,sR,lR],DM={normal:["itemStyle"],emphasis:[Ps,"itemStyle"],blur:[sR,"itemStyle"],select:[lR,"itemStyle"]},NM={normal:["label"],emphasis:[Ps,"label"],blur:[sR,"label"],select:[lR,"label"]},i9e=["x","y"],a9e="e\0\0",Hi={normal:{},emphasis:{},blur:{},select:{}},o9e={cartesian2d:z7e,geo:F7e,single:G7e,polar:H7e,calendar:U7e,matrix:Z7e};function yO(e){return e instanceof rt}function xO(e){return e instanceof va}function s9e(e,t){t.copyTransform(e),xO(t)&&xO(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,yO(t)&&yO(e)&&t.setShape(e.shape))}var l9e=function(e){q(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,i,a){this._progressiveEls=null;var o=this._data,s=r.getData(),l=this.group,u=_H(r,s,n,i);o||l.removeAll(),s.diff(o).add(function(f){jM(i,null,f,u(f,a),r,l,s)}).remove(function(f){var h=o.getItemGraphicEl(f);h&&XT(h,Ms(h).option,r)}).update(function(f,h){var d=o.getItemGraphicEl(h);jM(i,d,f,u(f,a),r,l,s)}).execute();var c=r.get("clip",!0)?y0(r.coordinateSystem,!1,r):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},t.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(r,n,i,a,o){var s=n.getData(),l=_H(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var f=r.start;f<r.end;f++){var h=jM(null,null,f,l(f,o),n,this.group,s);h&&(h.traverse(c),u.push(h))}},t.prototype.eachRendered=function(r){xu(this._progressiveEls||this.group,r)},t.prototype.filterForExposedEvent=function(r,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},t.type="custom",t}(_t);function uR(e){var t=e.type,r;if(t==="path"){var n=e.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=$ne(n);r=Kd(a,null,i,n.layout||"center"),Ms(r).customPathData=a}else if(t==="image")r=new Xr({}),Ms(r).customImagePath=e.style.image;else if(t==="text")r=new at({});else if(t==="group")r=new Me;else if(t==="compoundPath"){var n=e.shape;if(!n||!n.paths){var o="";mt(o)}var s=se(n.paths,function(c){if(c.type==="path")return Kd(c.shape.pathData,c,null);var f=my(c.type);if(!f){var h="";mt(h)}return new f});r=new c0({shape:{paths:s}})}else{var l=my(t);if(!l){var o="";mt(o)}r=new l}return Ms(r).customGraphicType=t,r.name=e.name,r.z2EmphasisLift=1,r.z2SelectLift=1,r}function cR(e,t,r,n,i,a,o){Rne(t);var s=i&&i.normal.cfg;s&&t.setTextConfig(s),n&&n.transition==null&&(n.transition=i9e);var l=n&&n.style;if(l){if(t.type==="text"){var u=l;ye(u,"textFill")&&(u.fill=u.textFill),ye(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,f=yO(t)?l.decal:null;e&&f&&(f.dirty=!0,c=ev(f,e)),l.__decalPattern=c}if(xO(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}hb(t,n,a,{dataIndex:r,isInit:o,clearStyle:!0}),Ww(t,n.keyframeAnimation,a)}function Bne(e,t,r,n,i){var a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){var s=a.ensureState(e);if(n===!1){var l=a.getState(e);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),of(a)}}function u9e(e,t,r){if(!e.isGroup){var n=e,i=r.currentZ,a=r.currentZLevel;n.z=i,n.zlevel=a;var o=t.z2;o!=null&&(n.z2=o||0);for(var s=0;s<lu.length;s++)c9e(n,t,lu[s])}}function c9e(e,t,r){var n=r===El,i=n?t:Hw(t,r),a=i?i.z2:null,o;a!=null&&(o=n?e:e.ensureState(r),o.z2=a||0)}function _H(e,t,r,n){var i=e.get("renderItem");if(typeof i=="string"){var a=n4e(i);a&&(i=a)}var o=e.coordinateSystem,s={};o&&(s=o.prepareCustoms?o.prepareCustoms(o):o9e[o.type](o));for(var l=Pe({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:T,style:M,ordinalRawValue:A,styleEmphasis:P,visual:O,barLayout:D,currentSeriesIndices:N,font:j},s.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:s.coordSys,dataInsideLength:t.count(),encode:f9e(e.getData()),itemPayload:e.get("itemPayload")||{}},c,f,h={},d={},v={},g={},m=0;m<lu.length;m++){var x=lu[m];v[x]=e.getModel(DM[x]),g[x]=e.getModel(NM[x])}function _(z){return z===c?f||(f=t.getItemModel(z)):t.getItemModel(z)}function b(z,$){return t.hasItemOption?z===c?h[$]||(h[$]=_(z).getModel(DM[$])):_(z).getModel(DM[$]):v[$]}function S(z,$){return t.hasItemOption?z===c?d[$]||(d[$]=_(z).getModel(NM[$])):_(z).getModel(NM[$]):g[$]}return function(z,$){return c=z,f=null,h={},d={},i&&i(Pe({dataIndexInside:z,dataIndex:t.getRawIndex(z),actionType:$?$.type:null},u),l)};function T(z,$){return $==null&&($=c),t.getStore().get(t.getDimensionIndex(z||0),$)}function A(z,$){$==null&&($=c),z=z||0;var U=t.getDimensionInfo(z);if(!U){var F=t.getDimensionIndex(z);return F>=0?t.getStore().get(F,$):void 0}var V=t.get(U.name,$),W=U&&U.ordinalMeta;return W?W.categories[V]:V}function M(z,$){$==null&&($=c);var U=t.getItemVisual($,"style"),F=U&&U.fill,V=U&&U.opacity,W=b($,El).getItemStyle();F!=null&&(W.fill=F),V!=null&&(W.opacity=V);var Y={inheritColor:pe(F)?F:K.color.neutral99},Z=S($,El),J=Mt(Z,null,Y,!1,!0);J.text=Z.getShallow("show")?be(e.getFormattedLabel($,El),nv(t,$)):null;var ne=hw(Z,Y,!1);return k(z,W),W=gH(W,J,ne),z&&I(W,z),W.legacy=!0,W}function P(z,$){$==null&&($=c);var U=b($,Ps).getItemStyle(),F=S($,Ps),V=Mt(F,null,null,!0,!0);V.text=F.getShallow("show")?fi(e.getFormattedLabel($,Ps),e.getFormattedLabel($,El),nv(t,$)):null;var W=hw(F,null,!0);return k(z,U),U=gH(U,V,W),z&&I(U,z),U.legacy=!0,U}function I(z,$){for(var U in $)ye($,U)&&(z[U]=$[U])}function k(z,$){z&&(z.textFill&&($.textFill=z.textFill),z.textPosition&&($.textPosition=z.textPosition))}function O(z,$){if($==null&&($=c),ye(vH,z)){var U=t.getItemVisual($,"style");return U?U[vH[z]]:null}if(ye(j7e,z))return t.getItemVisual($,z)}function D(z){if(o.type==="cartesian2d"){var $=o.getBaseAxis();return o$e(Pe({axis:$},z))}}function N(){return r.getCurrentSeriesIndices()}function j(z){return DN(z,r)}}function f9e(e){var t={};return B(e.dimensions,function(r){var n=e.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=t[i]=t[i]||[];a[n.coordDimIndex]=e.getDimensionIndex(r)}}),t}function jM(e,t,r,n,i,a,o){if(!n){a.remove(t);return}var s=fR(e,t,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function fR(e,t,r,n,i,a){var o=-1,s=t;t&&zne(t,n,i)&&(o=We(a.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=uR(n),s&&s9e(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Hi.normal.cfg=Hi.normal.conOpt=Hi.emphasis.cfg=Hi.emphasis.conOpt=Hi.blur.cfg=Hi.blur.conOpt=Hi.select.cfg=Hi.select.conOpt=null,Hi.isLegacy=!1,d9e(u,r,n,i,l,Hi),h9e(u,r,n,i,l),cR(e,u,r,n,Hi,i,l),ye(n,"info")&&(Ms(u).info=n.info);for(var c=0;c<lu.length;c++){var f=lu[c];if(f!==El){var h=Hw(n,f),d=hR(n,h,f);Bne(f,u,h,d,Hi)}}return u9e(u,n,i),n.type==="group"&&v9e(e,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function zne(e,t,r){var n=Ms(e),i=t.type,a=t.shape,o=t.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&y9e(a)&&$ne(a)!==n.customPathData||i==="image"&&ye(o,"image")&&o.image!==n.customImagePath}function h9e(e,t,r,n,i){var a=r.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&zne(o,a,n)&&(o=null),o||(o=uR(a),e.setClipPath(o)),cR(null,o,t,a,null,n,i)}}function d9e(e,t,r,n,i,a){if(!(e.isGroup||e.type==="compoundPath")){bH(r,null,a),bH(r,Ps,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=e.getTextContent();if(o===!1)c&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=uR(o),e.setTextContent(c)),cR(null,c,t,o,null,n,i);for(var f=o&&o.style,h=0;h<lu.length;h++){var d=lu[h];if(d!==El){var v=a[d].conOpt;Bne(d,c,v,hR(o,v,d),null)}}f?c.dirty():c.markRedraw()}}}}function bH(e,t,r){var n=t?Hw(e,t):e,i=t?hR(e,n,Ps):e.style,a=e.type,o=n?n.textConfig:null,s=e.textContent,l=s?t?Hw(s,t):s:null;if(i&&(r.isLegacy||One(i,a,!!o,!!l))){r.isLegacy=!0;var u=Ene(i,a,!t);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var f=t?r[t]:r.normal;f.cfg=o,f.conOpt=l}function Hw(e,t){return t?e?e[t]:null:e}function hR(e,t,r){var n=t&&t.style;return n==null&&r===Ps&&e&&(n=e.styleEmphasis),n}function v9e(e,t,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){g9e({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:t});return}u&&t.removeAll();for(var c=0;c<o;c++){var f=a[c],h=t.childAt(c);f?(f.ignore==null&&(f.ignore=!1),fR(e,h,r,f,i,t)):h.ignore=!0}for(var d=t.childCount()-1;d>=c;d--){var v=t.childAt(d);p9e(t,v,i)}}}function p9e(e,t,r){t&&XT(t,Ms(e).option,r)}function g9e(e){new Gs(e.oldChildren,e.newChildren,wH,wH,e).add(SH).update(SH).remove(m9e).execute()}function wH(e,t){var r=e&&e.name;return r??a9e+t}function SH(e,t){var r=this.context,n=e!=null?r.newChildren[e]:null,i=t!=null?r.oldChildren[t]:null;fR(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function m9e(e){var t=this.context,r=t.oldChildren[e];r&&XT(r,Ms(r).option,t.seriesModel)}function $ne(e){return e&&(e.pathData||e.d)}function y9e(e){return e&&(ye(e,"pathData")||ye(e,"d"))}function x9e(e){e.registerChartView(l9e),e.registerSeriesModel(R7e)}var vc=Je(),TH=Ce,RM=ge,dR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=t,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,r);if(!s)s=this._group=new Me,this.createPointerEl(s,u,t,r),this.createLabelEl(s,u,t,r),n.getZr().add(s);else{var h=Fe(AH,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}MH(s,r,!0),this._renderHandle(a)}},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"),i=t.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Dj(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},e.prototype.makeElOption=function(t,r,n,i,a){},e.prototype.createPointerEl=function(t,r,n,i){var a=r.pointer;if(a){var o=vc(t).pointerEl=new Tf[a.type](TH(r.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,r,n,i){if(r.label){var a=vc(t).labelEl=new at(TH(r.label));t.add(a),CH(a,i)}},e.prototype.updatePointerEl=function(t,r,n){var i=vc(t).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},e.prototype.updateLabelEl=function(t,r,n,i){var a=vc(t).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),CH(a,i))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Rv(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){$s(u.event)},onmousedown:RM(this._onHandleDragMove,this,0,0),drift:RM(this._onHandleDragMove,this),ondragend:RM(this._onHandleDragEnd,this)}),n.add(i)),MH(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ae(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Gv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,r){AH(this._axisPointerModel,!r&&this._moveAnimation,this._handle,BM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(BM(n),[t,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(BM(i)),vc(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,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),by(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 AH(e,t,r,n){Fne(vc(r).lastProp,n)||(vc(r).lastProp=n,t?lt(r,n,e):(r.stopAnimation(),r.attr(n)))}function Fne(e,t){if(Le(e)&&Le(t)){var r=!0;return B(t,function(n,i){r=r&&Fne(e[i],n)}),!!r}else return e===t}function CH(e,t){e[t.get(["label","show"])?"show":"hide"]()}function BM(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function MH(e,t,r){var n=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function vR(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 Vne(e,t,r,n,i){var a=r.get("value"),o=Gne(a,t.axis,t.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=$v(s.get("padding")||0),u=s.getFont(),c=xT(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],v=i.align;v==="right"&&(f[0]-=h),v==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=d),g==="middle"&&(f[1]-=d/2),_9e(f,h,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:Mt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function _9e(e,t,r,n){var i=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+r,a)-r,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function Gne(e,t,r,n,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Cw(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};B(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),pe(o)?a=o.replace("{value}",a):Ae(o)&&(a=o(s))}return a}function pR(e,t,r){var n=Wr();return Ks(n,n,r.rotation),Ua(n,n,r.position),Ga([e.dataToCoord(t),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function Wne(e,t,r,n,i,a){var o=Hn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),Vne(t,n,i,a,{position:pR(n.axis,e,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function gR(e,t,r){return r=r||0,{x1:e[r],y1:e[1-r],x2:t[r],y2:t[1-r]}}function Hne(e,t,r){return r=r||0,{x:e[r],y:e[1-r],width:t[r],height:t[1-r]}}function PH(e,t,r,n,i,a){return{cx:e,cy:t,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var b9e=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=LH(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=vR(a),d=w9e[u](s,f,c);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=jw(l.getRect(),i);Wne(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=jw(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=pR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=LH(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[c]}},t}(dR);function LH(e,t){var r={};return r[t.dim+"AxisIndex"]=t.index,e.getCartesian(r)}var w9e={line:function(e,t,r){var n=gR([t,r[0]],[t,r[1]],kH(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=Math.max(1,e.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Hne([t-n/2,r[0]],[n,i],kH(e))}}};function kH(e){return e.dim==="x"?0:1}var S9e=function(e){q(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:K.color.border,width:1,type:"dashed"},shadowStyle:{color:K.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:K.color.neutral00,padding:[5,7,5,7],backgroundColor:K.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:K.color.accent40,throttle:40}},t}(Qe),xs=Je(),T9e=B;function Une(e,t,r){if(!nt.node){var n=t.getZr();xs(n).records||(xs(n).records={}),A9e(n,t);var i=xs(n).records[e]||(xs(n).records[e]={});i.handler=r}}function A9e(e,t){if(xs(e).initialized)return;xs(e).initialized=!0,r("click",Fe(IH,"click")),r("mousemove",Fe(IH,"mousemove")),r("globalout",M9e);function r(n,i){e.on(n,function(a){var o=P9e(t);T9e(xs(e).records,function(s){s&&i(s,a,o.dispatchAction)}),C9e(o.pendings,t)})}}function C9e(e,t){var r=e.showTip.length,n=e.hideTip.length,i;r?i=e.showTip[r-1]:n&&(i=e.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function M9e(e,t,r){e.handler("leave",null,r)}function IH(e,t,r,n){t.handler(e,r,n)}function P9e(e){var t={showTip:[],hideTip:[]},r=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=r,e.dispatchAction(n))};return{dispatchAction:r,pendings:t}}function _O(e,t){if(!nt.node){var r=t.getZr(),n=(xs(r).records||{})[e];n&&(xs(r).records[e]=null)}}var L9e=function(e){q(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,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Une("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(r,n){_O("axisPointer",n)},t.prototype.dispose=function(r,n){_O("axisPointer",n)},t.type="axisPointer",t}(Lt);function Zne(e,t){var r=[],n=e.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=nf(a,e);if(o==null||o<0||ae(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,v=a.mapDimension(h),g=[];g[d]=a.get(v,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(se(l.dimensions,function(x){return a.mapDimension(x)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var OH=Je();function k9e(e,t,r){var n=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||ge(r.dispatchAction,r),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){db(i)&&(i=Zne({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=db(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||db(i),h={},d={},v={list:[],map:{}},g={showPointer:Fe(O9e,d),showTooltip:Fe(E9e,v)};B(s.coordSysMap,function(x,_){var b=l||x.containPoint(i);B(s.coordSysAxesInfo[_],function(S,T){var A=S.axis,M=R9e(u,S);if(!f&&b&&(!u||M)){var P=M&&M.value;P==null&&!l&&(P=A.pointToData(i)),P!=null&&EH(S,P,g,!1,h)}})});var m={};return B(c,function(x,_){var b=x.linkGroup;b&&!d[_]&&B(b.axesInfo,function(S,T){var A=d[T];if(S!==x&&A){var M=A.value;b.mapper&&(M=x.axis.scale.parse(b.mapper(M,DH(S),DH(x)))),m[x.key]=M}})}),B(m,function(x,_){EH(c[_],x,g,!0,h)}),D9e(d,c,h),N9e(v,i,e,o),j9e(c,o,r),h}}function EH(e,t,r,n,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){r.showPointer(e,t);return}var o=I9e(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&re(i,s[0]),!n&&e.snap&&a.containData(l)&&l!=null&&(t=l),r.showPointer(e,t,s),r.showTooltip(e,o,l)}}function I9e(e,t){var r=t.axis,n=r.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return B(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,e,r);h=d.dataIndices,f=d.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],e,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var v=e-f,g=Math.abs(v);g<=o&&((g<o||v>=0&&s<0)&&(o=g,s=v,i=f,a.length=0),B(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function O9e(e,t,r,n){e[t.key]={value:r,payloadBatch:n}}function E9e(e,t,r,n){var i=r.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=ky(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function D9e(e,t,r){var n=r.axesInfo=[];B(t,function(i,a){var o=i.axisPointerModel.option,s=e[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function N9e(e,t,r,n){if(db(t)||!e.list.length){n({type:"hideTip"});return}var i=((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:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function j9e(e,t,r){var n=r.getZr(),i="axisPointerLastHighlights",a=OH(n)[i]||{},o=OH(n)[i]={};B(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&B(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];B(a,function(u,c){!o[c]&&l.push(u)}),B(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function R9e(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 DH(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 db(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function b0(e){Pf.registerAxisPointerClass("CartesianAxisPointer",b9e),e.registerComponentModel(S9e),e.registerComponentView(L9e),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var r=t.axisPointer.link;r&&!ae(r)&&(t.axisPointer.link=[r])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,r){t.getComponent("axisPointer").coordSysAxesInfo=B6e(t,r)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},k9e)}function B9e(e){Ze(mre),Ze(b0)}var z9e=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=vR(a),v=F9e[h](s,l,f,c);v.style=d,r.graphicKey=v.type,r.pointer=v}var g=a.get(["label","margin"]),m=$9e(n,i,a,l,g);Vne(r,i,a,o,m)},t}(dR);function $9e(e,t,r,n,i){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=Wr();Ks(h,h,s),Ua(h,h,[n.cx,n.cy]),u=Ga([o,-i],h);var d=t.getModel("axisLabel").get("rotate")||0,v=Hn.innerTextLayout(s,d*Math.PI/180,-1);c=v.textAlign,f=v.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,x=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-x)/g<.3?"middle":u[1]>x?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var F9e={line:function(e,t,r,n){return e.dim==="angle"?{type:"Line",shape:gR(t.coordToPoint([n[0],r]),t.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r}}},shadow:function(e,t,r,n){var i=Math.max(1,e.getBandWidth()),a=Math.PI/180;return e.dim==="angle"?{type:"Sector",shape:PH(t.cx,t.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:PH(t.cx,t.cy,r-i/2,r+i/2,0,Math.PI*2)}}},V9e=function(e){q(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,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(Qe),mR=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",tr).models[0]},t.type="polarAxis",t}(Qe);fr(mR,Zv);var G9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="angleAxis",t}(mR),W9e=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="radiusAxis",t}(mR),yR=function(e){q(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}(_a);yR.prototype.dataToRadius=_a.prototype.dataToCoord;yR.prototype.radiusToData=_a.prototype.coordToData;var H9e=Je(),xR=function(e){q(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(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=xT(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),v=H9e(r.model),g=v.lastAutoInterval,m=v.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(v.lastTickCount=o,v.lastAutoInterval=d),d},t}(_a);xR.prototype.dataToAngle=_a.prototype.dataToCoord;xR.prototype.angleToData=_a.prototype.coordToData;var Yne=["radius","angle"],U9e=function(){function e(t){this.dimensions=Yne,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new yR,this._angleAxis=new xR,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,i=this._radiusAxis;return n.scale.type===t&&r.push(n),i.scale.type===t&&r.push(i),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 i=this.pointToCoord(t);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},e.prototype.pointToCoord=function(t){var r=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},e.prototype.coordToPoint=function(t,r){r=r||[];var n=t[0],i=t[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*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 i=t.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+o>=d*d},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 i=NH(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=NH(r);return i===this?this.pointToData(n):null},e}();function NH(e){var t=e.seriesModel,r=e.polarModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function Z9e(e,t,r){var n=t.get("center"),i=jr(t,r).refContainer;e.cx=ve(n[0],i.width)+i.x,e.cy=ve(n[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:ae(s)||(s=[0,s]);var l=[ve(s[0],o),ve(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Y9e(e,t){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();B(Mw(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),B(Mw(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),cf(n.scale,n.model),cf(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function X9e(e){return e.mainType==="angleAxis"}function jH(e,t){var r;if(e.type=t.get("type"),e.scale=p0(t),e.onBand=t.get("boundaryGap")&&e.type==="category",e.inverse=t.get("inverse"),X9e(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle"),i=(r=t.get("endAngle"))!==null&&r!==void 0?r:n+(e.inverse?-360:360);e.setExtent(n,i)}t.axis=e,e.model=t}var q9e={dimensions:Yne,create:function(e,t){var r=[];return e.eachComponent("polar",function(n,i){var a=new U9e(i+"");a.update=Y9e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");jH(o,l),jH(s,u),Z9e(a,n,t),r.push(a),n.coordinateSystem=a,a.model=n}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",tr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},K9e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function w_(e,t,r){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],r]),i=e.coordToPoint([t[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function S_(e){var t=e.getRadiusAxis();return t.inverse?0:1}function RH(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 Q9e=function(e){q(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 i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=se(i.getViewLabels(),function(c){c=Ce(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});RH(u),RH(s),B(K9e,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&J9e[c](this.group,r,a,s,l,o,u)},this)}},t.type="angleAxis",t}(Pf),J9e={axisLine:function(e,t,r,n,i,a){var o=t.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=S_(r),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Tf[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new Dv({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,e.add(h)},axisTick:function(e,t,r,n,i,a){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[S_(r)],u=se(n,function(c){return new yr({shape:w_(r,[l,l+s],c.coord)})});e.add(Ti(u,{style:Pe(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[S_(r)],c=[],f=0;f<i.length;f++)for(var h=0;h<i[f].length;h++)c.push(new yr({shape:w_(r,[u,u+l],i[f][h].coord)}));e.add(Ti(c,{style:Pe(s.getModel("lineStyle").getLineStyle(),Pe(o.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,r,n,i,a,o){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");B(o,function(f,h){var d=l,v=f.tickValue,g=a[S_(r)],m=r.coordToPoint([g+u,f.coord]),x=r.cx,_=r.cy,b=Math.abs(m[0]-x)/g<.3?"center":m[0]>x?"left":"right",S=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[v]){var T=s[v];Le(T)&&T.textStyle&&(d=new tt(T.textStyle,l,l.ecModel))}var A=new at({silent:Hn.isLabelSilent(t),style:Mt(d,{x:m[0],y:m[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:b,verticalAlign:S})});if(e.add(A),Js({el:A,componentModel:t,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return A.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var M=Hn.makeAxisEventDataBase(t);M.targetType="axisLabel",M.value=f.rawLabel,De(A).eventData=M}},this)},splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f<n.length;f++){var h=u++%l.length;c[h]=c[h]||[],c[h].push(new yr({shape:w_(r,a,n[f].coord)}))}for(var f=0;f<c.length;f++)e.add(Ti(c[f],{style:Pe({stroke:l[f%l.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,r,n,i,a){if(i.length){for(var o=t.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new yr({shape:w_(r,a,i[u][c].coord)}));e.add(Ti(l,{style:s.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,r,n,i,a){if(n.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=Math.PI/180,h=-n[0].coord*f,d=Math.min(a[0],a[1]),v=Math.max(a[0],a[1]),g=t.get("clockwise"),m=1,x=n.length;m<=x;m++){var _=m===x?n[0].coord:n[m].coord,b=u++%l.length;c[b]=c[b]||[],c[b].push(new bn({shape:{cx:r.cx,cy:r.cy,r0:d,r:v,startAngle:h,endAngle:-_*f,clockwise:g},silent:!0})),h=-_*f}for(var m=0;m<c.length;m++)e.add(Ti(c[m],{style:Pe({fill:l[m%l.length]},s.getAreaStyle()),silent:!0}))}}},eZe=["splitLine","splitArea","minorSplitLine"],tZe=function(e){q(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,i){if(this.group.removeAll(),!!r.get("show")){var a=this._axisGroup,o=this._axisGroup=new Me;this.group.add(o);var s=r.axis,l=s.polar,u=l.getAngleAxis(),c=s.getTicksCoords(),f=s.getMinorTicksCoords(),h=u.getExtent()[0],d=s.getExtent(),v=nZe(l,r,h),g=new Hn(r,i,v);g.build(),o.add(g.group),f0(a,o,r),B(eZe,function(m){r.get([m,"show"])&&!s.scale.isBlank()&&rZe[m](this.group,r,l,h,d,c,f)},this)}},t.type="radiusAxis",t}(Pf),rZe={splitLine:function(e,t,r,n,i,a){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=r.getAngleAxis(),f=Math.PI/180,h=c.getExtent(),d=Math.abs(h[1]-h[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var v=[],g=0;g<a.length;g++){var m=u++%l.length;v[m]=v[m]||[],v[m].push(new Tf[d]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[g].coord,0),startAngle:-h[0]*f,endAngle:-h[1]*f,clockwise:c.inverse}}))}for(var g=0;g<v.length;g++)e.add(Ti(v[g],{style:Pe({stroke:l[g%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,r,n,i,a,o){if(o.length){for(var s=t.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var f=0;f<o[c].length;f++)u.push(new Zo({shape:{cx:r.cx,cy:r.cy,r:o[c][f].coord}}));e.add(Ti(u,{style:Pe({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,r,n,i,a){if(a.length){var o=t.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=a[0].coord,h=1;h<a.length;h++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new bn({shape:{cx:r.cx,cy:r.cy,r0:f,r:a[h].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),f=a[h].coord}for(var h=0;h<c.length;h++)e.add(Ti(c[h],{style:Pe({fill:l[h%l.length]},s.getAreaStyle()),silent:!0}))}}};function nZe(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}}function Xne(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function qne(e,t){return t.dim+e.model.componentIndex}function iZe(e,t,r){var n={},i=aZe(ht(t.getSeriesByType(e),function(a){return!t.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));t.eachSeriesByType(e,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=qne(s,l),c=Xne(a),f=i[u][c],h=f.offset,d=f.width,v=s.getOtherAxis(l),g=a.coordinateSystem.cx,m=a.coordinateSystem.cy,x=a.get("barMinHeight")||0,_=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var b=o.mapDimension(v.dim),S=o.mapDimension(l.dim),T=Ws(o,b),A=l.dim!=="radius"||!a.get("roundCap",!0),M=v.model,P=M.get("startValue"),I=v.dataToCoord(P||0),k=0,O=o.count();k<O;k++){var D=o.get(b,k),N=o.get(S,k),j=D>=0?"p":"n",z=I;T&&(n[c][N]||(n[c][N]={p:I,n:I}),z=n[c][N][j]);var $=void 0,U=void 0,F=void 0,V=void 0;if(v.dim==="radius"){var W=v.dataToCoord(D)-I,Y=l.dataToCoord(N);Math.abs(W)<x&&(W=(W<0?-1:1)*x),$=z,U=z+W,F=Y-h,V=F-d,T&&(n[c][N][j]=U)}else{var Z=v.dataToCoord(D,A)-I,J=l.dataToCoord(N);Math.abs(Z)<_&&(Z=(Z<0?-1:1)*_),$=J+h,U=$+d,F=z,V=z+Z,T&&(n[c][N][j]=V)}o.setItemLayout(k,{cx:g,cy:m,r0:$,r:U,startAngle:-F*Math.PI/180,endAngle:-V*Math.PI/180,clockwise:F>=V})}}})}function aZe(e){var t={};B(e,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=qne(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;t[l]=f;var d=Xne(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var v=ve(n.get("barWidth"),c),g=ve(n.get("barMaxWidth"),c),m=n.get("barGap"),x=n.get("barCategoryGap");v&&!h[d].width&&(v=Math.min(f.remainedWidth,v),h[d].width=v,f.remainedWidth-=v),g&&(h[d].maxWidth=g),m!=null&&(f.gap=m),x!=null&&(f.categoryGap=x)});var r={};return B(t,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=ve(n.categoryGap,o),l=ve(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),B(a,function(g,m){var x=g.maxWidth;x&&x<f&&(x=Math.min(x,u),g.width&&(x=Math.min(x,g.width)),u-=x,g.width=x,c--)}),f=(u-s)/(c+(c-1)*l),f=Math.max(f,0);var h=0,d;B(a,function(g,m){g.width||(g.width=f),d=g,h+=g.width*(1+l)}),d&&(h-=d.width*l);var v=-h/2;B(a,function(g,m){r[i][m]=r[i][m]||{offset:v,width:g.width},v+=g.width*(1+l)})}),r}var oZe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},sZe={splitNumber:5},lZe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="polar",t}(Lt);function uZe(e){Ze(b0),Pf.registerAxisPointerClass("PolarAxisPointer",z9e),e.registerCoordinateSystem("polar",q9e),e.registerComponentModel(V9e),e.registerComponentView(lZe),iv(e,"angle",G9e,oZe),iv(e,"radius",W9e,sZe),e.registerComponentView(Q9e),e.registerComponentView(tZe),e.registerLayout(Fe(iZe,"bar"))}function bO(e,t){t=t||{};var r=e.coordinateSystem,n=e.axis,i={},a=n.position,o=n.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[a],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),nn(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var h=e.get(["axisLabel","rotate"]);return i.labelRotate=a==="top"?-h:h,i.z2=1,i}var cZe=["splitArea","splitLine","breakArea"],fZe=function(e){q(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,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new Me;var l=bO(r),u=new Hn(r,i,l);u.build(),o.add(this._axisGroup),o.add(u.group),B(cZe,function(c){r.get([c,"show"])&&hZe[c](this,this.group,this._axisGroup,r,i)},this),f0(s,this._axisGroup,r),e.prototype.render.call(this,r,n,i,a)},t.prototype.remove=function(){vre(this)},t.type="singleAxis",t}(Pf),hZe={splitLine:function(e,t,r,n,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color");l=l instanceof Array?l:[l];for(var u=s.get("width"),c=n.coordinateSystem.getRect(),f=a.isHorizontal(),h=[],d=0,v=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],m=[],x=0;x<v.length;++x){var _=a.toGlobalCoord(v[x].coord);f?(g[0]=_,g[1]=c.y,m[0]=_,m[1]=c.y+c.height):(g[0]=c.x,g[1]=_,m[0]=c.x+c.width,m[1]=_);var b=new yr({shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},silent:!0});Qd(b.shape,u);var S=d++%l.length;h[S]=h[S]||[],h[S].push(b)}for(var T=s.getLineStyle(["color"]),x=0;x<h.length;++x)t.add(Ti(h[x],{style:Pe({stroke:l[x%l.length]},T),silent:!0}))}},splitArea:function(e,t,r,n,i){dre(e,r,n,n)},breakArea:function(e,t,r,n,i){var a=_0(),o=n.axis.scale;a&&o.type!=="ordinal"&&a.rectCoordBuildBreakAxis(t,e,n,n.coordinateSystem.getRect(),i)}},vb=function(e){q(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="singleAxis",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}(Qe);fr(vb,Zv.prototype);var dZe=function(e){q(t,e);function t(r,n,i,a,o){var s=e.call(this,r,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}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}(_a),Kne=["single"],vZe=function(){function e(t,r,n){this.type="single",this.dimension="single",this.dimensions=Kne,this.axisPointerEnabled=!0,this.model=t,this._init(t,r,n)}return e.prototype._init=function(t,r,n){var i=this.dimension,a=new dZe(i,p0(t),[0,0],t.get("type"),t.get("position")),o=a.type==="category";a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},e.prototype.update=function(t,r){t.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();B(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),cf(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(t,r){var n=jr(t,r).refContainer;this._rect=$t(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(),i=n?[0,t.width]:[0,t.height],a=r.inverse?1:0;r.setExtent(i[a],i[1-a]),this._updateAxisTransform(r,n?t.x:t.y)},e.prototype._updateAxisTransform=function(t,r){var n=t.getExtent(),i=n[0]+n[1],a=t.isHorizontal();t.toGlobalCoord=a?function(o){return o+r}:function(o){return i-o+r},t.toLocalCoord=a?function(o){return o-r}:function(o){return i-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(),i=n.orient;return i==="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 i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(t[i.orient==="horizontal"?0:1])),n},e.prototype.dataToPoint=function(t,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+t)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},e.prototype.convertToPixel=function(t,r,n){var i=BH(r);return i===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=BH(r);return i===this?this.pointToData(n):null},e}();function BH(e){var t=e.seriesModel,r=e.singleAxisModel;return r&&r.coordinateSystem||t&&t.coordinateSystem}function pZe(e,t){var r=[];return e.eachComponent("singleAxis",function(n,i){var a=new vZe(n,e,t);a.name="single_"+i,a.resize(n,t),n.coordinateSystem=a,r.push(a)}),e.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",tr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var gZe={create:pZe,dimensions:Kne},zH=["x","y"],mZe=["width","height"],yZe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=zM(l,1-Uw(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=vR(a),d=xZe[f](s,c,u);d.style=h,r.graphicKey=d.type,r.pointer=d}var v=bO(i);Wne(n,r,v,i,a,o)},t.prototype.getHandleTransform=function(r,n,i){var a=bO(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=pR(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Uw(o),u=zM(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=zM(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(dR),xZe={line:function(e,t,r){var n=gR([t,r[0]],[t,r[1]],Uw(e));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(e,t,r){var n=e.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:Hne([t-n/2,r[0]],[n,i],Uw(e))}}};function Uw(e){return e.isHorizontal()?0:1}function zM(e,t){var r=e.getRect();return[r[zH[t]],r[zH[t]]+r[mZe[t]]]}var _Ze=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="single",t}(Lt);function bZe(e){Ze(b0),Pf.registerAxisPointerClass("SingleAxisPointer",yZe),e.registerComponentView(_Ze),e.registerComponentView(fZe),e.registerComponentModel(vb),iv(e,"single",vb,vb.defaultOption),e.registerCoordinateSystem("single",gZe)}var wZe=function(e){q(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,i){var a=Af(r);e.prototype.init.apply(this,arguments),$H(r,a)},t.prototype.mergeOption=function(r){e.prototype.mergeOption.apply(this,arguments),$H(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:K.color.axisLine,width:1,type:"solid"}},itemStyle:{color:K.color.neutral00,borderWidth:1,borderColor:K.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:K.size.s,color:K.color.secondary},monthLabel:{show:!0,position:"start",margin:K.size.s,align:"center",formatter:null,color:K.color.secondary},yearLabel:{show:!0,position:null,margin:K.size.xl,formatter:null,color:K.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(Qe);function $H(e,t){var r=e.cellSize,n;ae(r)?n=r:n=e.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=se([0,1],function(a){return WBe(t,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Fo(e,t,{type:"box",ignoreSize:i})}var SZe=function(e){q(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,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},t.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new Xe({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},t.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){v(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},t.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},t.prototype._drawSplitline=function(r,n,i){var a=new on({z2:20,shape:{points:r},style:n});i.add(a)},t.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(r,n){return pe(r)&&r?RBe(r,n):Ae(r)?r(n):n.nameMap},t.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},x=this._formatterLabel(g,m),_=new at({z2:30,style:Mt(o,{text:x}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},t.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||pe(s))&&(s&&(n=gI(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=c==="center",g=o.get("silent"),m=0;m<f[h].length-1;m++){var x=f[h][m].slice(),_=this._firstDayOfMonth[m];if(v){var b=this._firstDayPoints[m];x[d]=(b[d]+f[0][m+1][d])/2}var S=o.get("formatter"),T=s[+_.m-1],A={yyyy:_.y,yy:(_.y+"").slice(2),MM:_.m,M:+_.m,nameMap:T},M=this._formatterLabel(S,A),P=new at({z2:30,style:re(Mt(o,{text:M}),this._monthTextPositionControl(x,v,i,u,l)),silent:g});a.add(P)}}},t.prototype._weekTextPositionControl=function(r,n,i,a,o){var s="center",l="middle",u=r[0],c=r[1],f=i==="start";return n==="horizontal"?(u=u+a+(f?1:-1)*o[0]/2,s=f?"right":"left"):(c=c+a+(f?1:-1)*o[1]/2,l=f?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderWeekText=function(r,n,i,a,o){var s=r.getModel("dayLabel");if(s.get("show")){var l=r.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),f=s.get("margin"),h=l.getFirstDayOfWeek();if(!c||pe(c)){c&&(n=gI(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||se(n.get(["time","dayOfWeekAbbr"]),function(A){return A[0]})}var v=l.getNextNDay(i.end.time,7-i.lweek).time,g=[l.getCellWidth(),l.getCellHeight()];f=ve(f,Math.min(g[1],g[0])),u==="start"&&(v=l.getNextNDay(i.start.time,-(7+i.fweek)).time,f=-f);for(var m=s.get("silent"),x=0;x<7;x++){var _=l.getNextNDay(v,x),b=l.dataToCalendarLayout([_.time],!1).center,S=x;S=Math.abs((x+h)%7);var T=new at({z2:30,style:re(Mt(s,{text:c[S]}),this._weekTextPositionControl(b,a,u,f,g)),silent:m});o.add(T)}}},t.type="calendar",t}(Lt),$M=864e5,TZe=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=Uo(t);var r=t.getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,a=t.getDate(),o=a<10?"0"+a:""+a,s=t.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:r+"",m:i,d:o,day:s,time:t.getTime(),formatedDate:r+"-"+i+"-"+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,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];B([0,1],function(f){c(a,f)&&(o[i[f]]=a[f]*s[f])});var l={width:r.getWidth(),height:r.getHeight()},u=this._rect=$t(o,l);B([0,1],function(f){c(a,f)||(a[f]=u[i[f]]/s[f])});function c(f,h){return f[h]!=null&&f[h]!=="auto"}this._sw=a[0],this._sh=a[1]},e.prototype.dataToPoint=function(t,r,n){n=n||[],ae(t)&&(t=t[0]),r==null&&(r=!0);var i=this.getDateInfo(t),a=this._rangeInfo,o=i.formatedDate;if(r&&!(i.time>=a.start.time&&i.time<a.end.time+$M))return n[0]=n[1]=NaN,n;var s=i.day,l=this._getRangeInfo([a.start.time,o]).nthWeek;return this._orient==="vertical"?(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+l*this._sh+this._sh/2):(n[0]=this._rect.x+l*this._sw+this._sw/2,n[1]=this._rect.y+s*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 i=n.rect=n.rect||{},a=n.contentRect=n.contentRect||{},o=this.dataToPoint(t,r);return i.x=o[0]-this._sw/2,i.y=o[1]-this._sh/2,i.width=this._sw,i.height=this._sh,Oe.copy(a,i),sf(a,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,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,r-1,i):this._getDateByWeeksAndDay(r,n-1,i)},e.prototype.convertToPixel=function(t,r,n){var i=FM(r);return i===this?i.dataToPoint(n):null},e.prototype.convertToLayout=function(t,r,n){var i=FM(r);return i===this?i.dataToLayout(n):null},e.prototype.convertFromPixel=function(t,r,n){var i=FM(r);return i===this?i.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(ae(t)&&t.length===1&&(t=t[0]),ae(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 i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);r=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(r=[n,n])}if(!r)return t;var s=this._getRangeInfo(r);return s.start.time>s.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 i=Math.floor(r[1].time/$M)-Math.floor(r[0].time/$M)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},e.prototype._getDateByWeeksAndDay=function(t,r,n){var i=this._getRangeInfo(n);if(t>i.weeks||t===0&&r<i.fweek||t===i.weeks&&r>i.lweek)return null;var a=(t-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},e.create=function(t,r){var n=[];return t.eachComponent("calendar",function(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){d0({targetModel:a,coordSysType:"calendar",coordSysProvider:gJ})}),n},e.dimensions=["time","value"],e}();function FM(e){var t=e.calendarModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}function AZe(e){e.registerComponentModel(wZe),e.registerComponentView(SZe),e.registerCoordinateSystem("calendar",TZe)}var cs={level:1,leaf:2,nonLeaf:3},Ls={none:0,all:1,body:2,corner:3};function wO(e,t,r){var n=t[Re[r]].getCell(e);return!n&&ot(e)&&e<0&&(n=t[Re[1-r]].getUnitLayoutInfo(r,Math.round(e))),n}function Qne(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 Jne(e,t,r,n,i){FH(e[0],t,i,r,n,0),FH(e[1],t,i,r,n,1)}function FH(e,t,r,n,i,a){e[0]=1/0,e[1]=-1/0;var o=n[a],s=ae(o)?o:[o],l=s.length,u=!!r;if(l>=1?(VH(e,t,s,u,i,a,0),l>1&&VH(e,t,s,u,i,a,l-1)):e[0]=e[1]=NaN,u){var c=-i[Re[1-a]].getLocatorCount(a),f=i[Re[a]].getLocatorCount(a)-1;r===Ls.body?c=gr(0,c):r===Ls.corner&&(f=Ii(-1,f)),f<c&&(c=f=NaN),mn(e[0])&&(e[0]=c),mn(e[1])&&(e[1]=f),e[0]=gr(Ii(e[0],f),c),e[1]=gr(Ii(e[1],f),c)}}function VH(e,t,r,n,i,a,o){var s=wO(r[o],i,a);if(!s){e[0]=e[1]=NaN;return}var l=s.id[Re[a]],u=l,c=LZe(s);c&&(u+=c.span[Re[a]]-1),e[0]=Ii(e[0],l,u),e[1]=gr(e[1],l,u)}function T_(e,t){return mn(e[t][0])||mn(e[t][1])}function GH(e,t,r,n){t=t||CZe;for(var i=0;i<n;i++)t[i]=!1;for(;;){for(var a=!1,i=0;i<n;i++){var o=r[i];!t[i]&&o.cellMergeOwner&&MZe(e,o.locatorRange)&&(t[i]=!0,a=!0)}if(!a)break}}var CZe=[];function MZe(e,t){return!WH(e[0],t[0])||!WH(e[1],t[1])?!1:(e[0][0]=Ii(e[0][0],t[0][0]),e[0][1]=gr(e[0][1],t[0][1]),e[1][0]=Ii(e[1][0],t[1][0]),e[1][1]=gr(e[1][1],t[1][1]),!0)}function WH(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function HH(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 PZe(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 UH(e,t,r,n){var i=wO(t[n][0],r,n),a=wO(t[n][1],r,n);e[Re[n]]=e[Tr[n]]=NaN,i&&a&&(e[Re[n]]=i.xy,e[Tr[n]]=a.xy+a.wh-i.xy)}function Jp(e,t,r,n){return e[Re[t]]=r,e[Re[1-t]]=n,e}function LZe(e){return e&&(e.type===cs.leaf||e.type===cs.nonLeaf)?e:null}function Zw(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var ZH=function(){function e(t,r){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=r,this._uniqueValueGen=kZe(t);var n=r.get("data",!0);n!=null&&!ae(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return e.prototype._initByDimModelData=function(t){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(t,0,0),l();return;function s(u,c,f){var h=0;return u&&B(u,function(d,v){var g;pe(d)?g={value:d}:Le(d)?(g=d,d.value!=null&&!pe(d.value)&&(g={value:null})):g={value:null};var m={type:cs.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Ie,span:Jp(new Ie,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Zw()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:cs.level,xy:NaN,wh:NaN,option:null,id:new Ie,dim:r});var x=s(g.children,c,f+1),_=Math.max(1,x);m.span[Re[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length<o;)for(var c=0;c<a.length;c++){var f=a[c].pop();if(f){f.ordinal=u.length;var h=f.option.value;u.push(h),n.push(f),r._uniqueValueGen.calcDupBase(h)}}r._uniqueValueGen.ensureValueUnique(u,n);var d=r._ordinalMeta=new Ay({categories:u,needCollect:!1,deduplication:!1});r._scale=new tv({ordinalMeta:d});for(var v=0;v<r._leavesCount;v++){var g=r._cells[v];g.type=cs.leaf,g.span[Re[1-r.dimIdx]]=r._levels.length-g.level}r._initCellsId(),r._initLevelIdOptions()}},e.prototype._initBySeriesData=function(){var t=this;t._leavesCount=0,t._levels=[{type:cs.level,xy:NaN,wh:NaN,option:null,id:new Ie,dim:t}],t._initLevelIdOptions();var r=t._ordinalMeta=new Ay({needCollect:!0,deduplication:!0,onCollect:function(n,i){var a=t._cells[i]={type:cs.leaf,ordinal:i,level:0,firstLeafLocator:i,id:new Ie,span:Jp(new Ie,t.dimIdx,1,1),option:{value:n+""},xy:NaN,wh:NaN,dim:t,rect:Zw()};t._leavesCount++,t._setCellId(a)}});t._scale=new tv({ordinalMeta:r})},e.prototype._setCellId=function(t){var r=this._levels.length,n=this.dimIdx;Jp(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){Jp(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=ae(n)?n:[],B(this._levels,function(i,a){Jp(i.id,r,0,a-t),i.option=n[a]})},e.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},e.prototype.resetLayoutIterator=function(t,r,n,i){if(t=t||new Zl,r===this.dimIdx){var a=this._leavesCount,o=n!=null?Math.max(0,n):0;i=i!=null?Math.min(i,a):a,t.reset(this._cells,o,o+i)}else{var a=this._levels.length,o=n!=null?Math.max(0,n+a):0;i=i!=null?Math.min(i,a):a,t.reset(this._levels,o,o+i)}return t},e.prototype.resetCellIterator=function(t){return(t||new Zl).reset(this._cells,0)},e.prototype.resetLevelIterator=function(t){return(t||new Zl).reset(this._levels,0)},e.prototype.getLayout=function(t,r,n){var i=this.getUnitLayoutInfo(r,n);t[Re[r]]=i?i.xy:NaN,t[Tr[r]]=i?i.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 mn(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 kZe(e){var t=e.toUpperCase(),r=new RegExp("^"+t+"([0-9]+)$"),n=0;function i(s){var l;s!=null&&(l=s.match(r))&&(n=gr(n,+l[1]+1))}function a(){return""+t+n++}function o(s,l){for(var u=_e(),c=0;c<s.length;c++){var f=s[c];(f==null||u.get(f)!=null)&&(s[c]=f=a(),l[c].option=Pe({value:f},l[c].option)),u.set(f,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var YH=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=_e(),n()),r;function n(){var a=[],o=t._model.getShallow("data");o&&!ae(o)&&(o=null),B(o,function(v,g){if(!(!Le(v)||!ae(v.coord))){var m=Qne([]),x=null;if(Jne(m,x,v.coord,t._dims,v.coordClamp?Ls[t._kind]:Ls.none),!(T_(m,0)||T_(m,1))){var _=v&&v.mergeCells,b={id:new Ie,span:new Ie,locatorRange:m,option:v,cellMergeOwner:_};HH(b,m),a.push(b)}}});for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u.cellMergeOwner){var c=u.locatorRange;GH(c,s,a,l);for(var f=0;f<l;f++)s[f]&&(a[f].cellMergeOwner=!1);if(c[0][0]!==u.id.x||c[1][0]!==u.id.y){u.cellMergeOwner=!1;var h=re({},u.option);h.coord=null;var d={id:new Ie,span:new Ie,locatorRange:c,option:h,cellMergeOwner:!0};HH(d,c),a.push(d)}}}B(a,function(v){var g=i(v.id.x,v.id.y);if(v.cellMergeOwner&&(g.cellMergeOwner=!0,g.span=v.span,g.locatorRange=v.locatorRange,g.spanRect=Zw(),t._cellMergeOwnerList.push(g)),!(!v.cellMergeOwner&&!v.option))for(var m=0;m<v.span.y;m++)for(var x=0;x<v.span.x;x++){var _=i(v.id.x+x,v.id.y+m);_.option=v.option,v.cellMergeOwner&&(_.inSpanOf=g)}})}function i(a,o){var s=XH(a,o),l=r.get(s);return l||(l=r.set(s,{id:new Ie(a,o),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),l}},e.prototype.getCell=function(t){return this._ensureCellMap().get(XH(t[0],t[1]))},e.prototype.travelExistingCells=function(t){this._ensureCellMap().each(t)},e.prototype.expandRangeByCellMerge=function(t){if(!T_(t,0)&&!T_(t,1)&&t[0][0]===t[0][1]&&t[1][0]===t[1][1]){VM[0]=t[0][0],VM[1]=t[1][0];var r=this.getCell(VM),n=r&&r.inSpanOf;if(n){PZe(t,n.locatorRange);return}}var i=this._cellMergeOwnerList;GH(t,null,i,i.length)},e}(),VM=[];function XH(e,t){return e+"|"+t}var _R={show:!0,color:K.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function bR(e){return{color:"none",borderWidth:1,borderColor:e?"none":K.color.borderTint}}var qH={show:!0,label:_R,itemStyle:bR(!1),silent:void 0,dividerLineStyle:{width:1,color:K.color.border}},IZe={label:_R,itemStyle:bR(!1),silent:void 0},OZe={label:_R,itemStyle:bR(!0),silent:void 0},EZe={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:qH,y:qH,body:IZe,corner:OZe,backgroundStyle:{color:"none",borderColor:K.color.axisLine,borderWidth:1}},DZe=function(e){q(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 KH(this.get("x",!0)||{}),y:new KH(this.get("y",!0)||{})};r.x.option.type=r.y.option.type="category";var n=r.x.dim=new ZH("x",r.x),i=r.y.dim=new ZH("y",r.y),a={x:n,y:i};this._body=new YH("body",new tt(this.getShallow("body")),a),this._corner=new YH("corner",new tt(this.getShallow("corner")),a)},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=EZe,t}(Qe),KH=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},t}(tt),A_=Math.round,NZe=0,jZe=99,RZe={normal:25,special:100},BZe={normal:50,special:125},zZe=function(e){q(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 i=this.group,a=r.coordinateSystem,o=a.getRect(),s=r.getDimensionModel("x"),l=r.getDimensionModel("y"),u=s.dim,c=l.dim;$Ze(i,r,n),FZe(i,r,u,c,n);var f=r.getShallow("borderZ2",!0),h=be(f,jZe),d=h-1,v=r.getModel("backgroundStyle").getItemStyle(["borderWidth"]);v.lineWidth=0;var g=r.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);g.fill="none";var m=SO(o.clone(),v,NZe),x=SO(o.clone(),g,h);m.silent=!0,x.silent=!0,i.add(m),i.add(x);var _=u.getUnitLayoutInfo(0,0),b=c.getUnitLayoutInfo(1,0);_&&b&&(u.shouldShow()&&i.add(QH({x1:o.x,y1:b.xy,x2:o.x+o.width,y2:b.xy},s.getModel("dividerLineStyle").getLineStyle(),d)),c.shouldShow()&&i.add(QH({x1:_.xy,y1:o.y,x2:_.xy,y2:o.y+o.height},l.getModel("dividerLineStyle").getLineStyle(),d)))},t.type="matrix",t}(Lt);function $Ze(e,t,r){n(0),n(1);function n(i){var a=t.getDimensionModel(Re[i]),o=a.dim;if(o.shouldShow())for(var s=a.getModel("itemStyle"),l=a.getModel("label"),u=t.getShallow("tooltip",!0),c=[],f=o.resetCellIterator();f.next();){var h=f.item,d={};Oe.copy(d,h.rect),gT(c,h.id.x,h.id.y),eie(c,t,e,r,h.option,s,l,a,d,h.option.value,BZe,u)}}}function FZe(e,t,r,n,i){a("body",t.getBody(),r,n),r.shouldShow()&&n.shouldShow()&&a("corner",t.getCorner(),n,r);function a(o,s,l,u){var c=new tt(t.getShallow(o,!0)),f=c.getModel("itemStyle"),h=c.getModel("label"),d=new Zl,v=new Zl,g=[],m=t.getShallow("tooltip",!0);for(u.resetLayoutIterator(v,1);v.next();)for(l.resetLayoutIterator(d,0);d.next();){var x=d.item,_=v.item;gT(g,x.id.x,_.id.y);var b=s.getCell(g);if(!(b&&b.inSpanOf&&b.inSpanOf!==b)){var S={};b&&b.span?Oe.copy(S,b.spanRect):(x.dim.getLayout(S,0,g[0]),_.dim.getLayout(S,1,g[1]));var T=b?b.option:null;eie(g,t,e,i,T,f,h,c,S,T?T.value:null,RZe,m)}}}}function eie(e,t,r,n,i,a,o,s,l,u,c,f){var h;C_.option=i?i.itemStyle:null,C_.parentModel=a,hh.option=i,hh.parentModel=s;var d=be(hh.getShallow("z2"),i&&i.itemStyle?c.special:c.normal),v=f&&f.show,g=SO(l,C_.getItemStyle(),d);r.add(g);var m=hh.get("cursor");m!=null&&g.attr("cursor",m);var x;if(u!=null){var _=u+"";if(dh.option=i?i.label:null,dh.parentModel=o,dh.ecModel=n,Ur(g,{normal:dh},{defaultText:_,autoOverflowArea:!0,layoutRect:Ce(g.shape)}),x=g.getTextContent(),x){x.z2=d+1;var b=x.style;if(b&&b.overflow&&b.overflow!=="none"&&b.lineOverflow){var S={};Oe.copy(S,l),sf(S,(((h=g.style)===null||h===void 0?void 0:h.lineWidth)||0)/2,!0,!0),g.updateInnerText(),x.getLocalTransform(M_),da(M_,M_),Oe.applyTransform(S,S,M_),x.setClipPath(new Xe({shape:S}))}}Js({el:g,componentModel:t,itemName:_,itemTooltipOption:f,formatterParamsExtra:{xyLocator:e.slice()}})}if(x){var T=dh.get("silent");T==null&&(T=!v),x.silent=T,x.ignoreHostSilent=!0}var A=hh.get("silent");A==null&&(A=!g.style||g.style.fill==="none"||!g.style.fill),g.silent=A,t2(hh),t2(C_),t2(dh)}var hh=new tt,C_=new tt,dh=new tt,M_=[];function SO(e,t,r){var n=t.lineWidth;if(n){var i=e.x+e.width,a=e.y+e.height;e.x=Li(e.x,n,!0),e.y=Li(e.y,n,!0),e.width=Li(i,n,!0)-e.x,e.height=Li(a,n,!0)-e.y}return new Xe({shape:e,style:t,z2:r})}function QH(e,t,r){var n=t.lineWidth;return n&&(A_(e.x1*2)===A_(e.x2*2)&&(e.x1=e.x2=Li(e.x1,n,!0)),A_(e.y1*2)===A_(e.y2*2)&&(e.y1=e.y2=Li(e.y1,n,!0))),new yr({shape:e,style:t,silent:!0,z2:r})}var VZe=function(){function e(t,r,n){this.dimensions=e.dimensions,this.type="matrix",this._model=t;var i=this._dimModels={x:t.getDimensionModel("x"),y:t.getDimensionModel("y")};this._dims={x:i.x.dim,y:i.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(i){var a=new e(i,t,r);n.push(a),i.coordinateSystem=a}),t.eachComponent(function(i,a){d0({targetModel:a,coordSysType:"matrix",coordSysProvider:gJ})}),n},e.prototype.getRect=function(){return this._rect},e.prototype._resize=function(t,r){var n=this._dims,i=this._dimModels,a=this._rect=$t(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()});JH(i,n,a,0),JH(i,n,a,1),e8(0,n),e8(1,n),t8(this._model.getBody(),n),t8(this._model.getCorner(),n)},e.prototype.dataToPoint=function(t,r,n){return n=n||[],this.dataToLayout(t,r,eg),n[0]=eg.rect.x+eg.rect.width/2,n[1]=eg.rect.y+eg.rect.height/2,n},e.prototype.dataToLayout=function(t,r,n){var i=this._dims;n=n||{};var a=n.rect=n.rect||{};a.x=a.y=a.width=a.height=NaN;var o=n.matrixXYLocatorRange=Qne(n.matrixXYLocatorRange);return ae(t)&&(Jne(o,null,t,i,be(r&&r.clamp,Ls.none)),(!r||!r.ignoreMergeCells)&&((!r||r.clamp!==Ls.corner)&&this._model.getBody().expandRangeByCellMerge(o),(!r||r.clamp!==Ls.body)&&this._model.getCorner().expandRangeByCellMerge(o)),UH(a,o,i,0),UH(a,o,i,1)),n},e.prototype.pointToData=function(t,r,n){var i=this._dims;return r8(lo,0,i,t,r&&r.clamp),r8(lo,1,i,t,r&&r.clamp),n=n||[],n[0]=n[1]=NaN,lo.y===dn.inCorner&&lo.x===dn.inBody?n8(lo,n,0,i):lo.x===dn.inCorner&&lo.y===dn.inBody?n8(lo,n,1,i):(i8(lo,n,0,i),i8(lo,n,1,i)),n},e.prototype.convertToPixel=function(t,r,n,i){var a=WM(r);return a===this?a.dataToPoint(n,i):void 0},e.prototype.convertToLayout=function(t,r,n,i){var a=WM(r);return a===this?a.dataToLayout(n,i):void 0},e.prototype.convertFromPixel=function(t,r,n,i){var a=WM(r);return a===this?a.pointToData(n,i):void 0},e.prototype.containPoint=function(t){return this._rect.contain(t[0],t[1])},e.dimensions=["x","y","value"],e}(),eg={rect:Zw()},P_=new Zl,GM=new Zl;function JH(e,t,r,n){for(var i=1-n,a=t[Re[n]],o=t[Re[i]],s=o.shouldShow(),l=a.resetCellIterator();l.next();)l.item.wh=l.item.xy=NaN;for(var u=o.resetLayoutIterator(null,n);u.next();)u.item.wh=u.item.xy=NaN;for(var c=r[Tr[n]],f=a.getLocatorCount(n)+o.getLocatorCount(n),h=new tt,d=o.resetLevelIterator();d.next();)h.option=d.item.option,h.parentModel=e[Re[i]],m(d.item,s?h.get("levelSize"):0);for(var v=new tt,g=a.resetCellIterator();g.next();)g.item.type===cs.leaf&&(v.option=g.item.option,v.parentModel=void 0,m(g.item,v.get("size")));function m(M,P){var I=GZe(P,n,r);mn(I)||(M.wh=TO(I,c),c=TO(c-M.wh),f--)}var x=f?c/f:0,_=!f&&c>=1,b=r[Re[n]],S=a.getLocatorCount(n)-1,T=new Zl;for(o.resetLayoutIterator(T,n);T.next();)A(T.item);for(a.resetLayoutIterator(T,n);T.next();)A(T.item);function A(M){mn(M.wh)&&(M.wh=x),M.xy=b,M.id[Re[n]]===S&&!_&&(M.wh=r[Re[n]]+r[Tr[n]]-M.xy),b+=M.wh}}function e8(e,t){for(var r=t[Re[e]].resetCellIterator();r.next();){var n=r.item;Yw(n.rect,e,n.id,n.span,t),Yw(n.rect,1-e,n.id,n.span,t),n.type===cs.nonLeaf&&(n.xy=n.rect[Re[e]],n.wh=n.rect[Tr[e]])}}function t8(e,t){e.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;Yw(i,0,a,n,t),Yw(i,1,a,n,t)}})}function Yw(e,t,r,n,i){e[Tr[t]]=0;var a=r[Re[t]],o=a<0?i[Re[1-t]]:i[Re[t]],s=o.getUnitLayoutInfo(t,r[Re[t]]);if(e[Re[t]]=s.xy,e[Tr[t]]=s.wh,n[Re[t]]>1){var l=o.getUnitLayoutInfo(t,r[Re[t]]+n[Re[t]]-1);e[Tr[t]]=l.xy+l.wh-s.xy}}function GZe(e,t,r){var n=sw(e,r[Tr[t]]);return TO(n,r[Tr[t]])}function TO(e,t){return Math.max(Math.min(e,be(t,1/0)),0)}function WM(e){var t=e.matrixModel,r=e.seriesModel,n=t?t.coordinateSystem:r?r.coordinateSystem:null;return n}var dn={inBody:1,inCorner:2,outside:3},lo={x:null,y:null,point:[]};function r8(e,t,r,n,i){var a=r[Re[t]],o=r[Re[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),l=a.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,f=e.point[t]=n[t];if(!l&&!c){e[Re[t]]=dn.outside;return}if(i===Ls.body){l?(e[Re[t]]=dn.inBody,f=Ii(s.xy+s.wh,gr(l.xy,f)),e.point[t]=f):e[Re[t]]=dn.outside;return}else if(i===Ls.corner){c?(e[Re[t]]=dn.inCorner,f=Ii(c.xy+c.wh,gr(u.xy,f)),e.point[t]=f):e[Re[t]]=dn.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:h,v=s?s.xy+s.wh:h;if(f<d){if(!i){e[Re[t]]=dn.outside;return}f=d}else if(f>v){if(!i){e[Re[t]]=dn.outside;return}f=v}e.point[t]=f,e[Re[t]]=h<=f&&f<=v?dn.inBody:d<=f&&f<=h?dn.inCorner:dn.outside}function n8(e,t,r,n){var i=1-r;if(e[Re[r]]!==dn.outside)for(n[Re[r]].resetCellIterator(GM);GM.next();){var a=GM.item;if(a8(e.point[r],a.rect,r)&&a8(e.point[i],a.rect,i)){t[r]=a.ordinal,t[i]=a.id[Re[i]];return}}}function i8(e,t,r,n){if(e[Re[r]]!==dn.outside){var i=e[Re[r]]===dn.inCorner?n[Re[1-r]]:n[Re[r]];for(i.resetLayoutIterator(P_,r);P_.next();)if(WZe(e.point[r],P_.item)){t[r]=P_.item.id[Re[r]];return}}}function WZe(e,t){return t.xy<=e&&e<=t.xy+t.wh}function a8(e,t,r){return t[Re[r]]<=e&&e<=t[Re[r]]+t[Tr[r]]}function HZe(e){e.registerComponentModel(DZe),e.registerComponentView(zZe),e.registerCoordinateSystem("matrix",VZe)}function UZe(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 o8(e,t){var r;return B(t,function(n){e[n]!=null&&e[n]!=="auto"&&(r=!0)}),r}function ZZe(e,t,r){var n=re({},r),i=e[t],a=r.$action||"merge";a==="merge"?i?(He(i,n,!0),Fo(i,n,{ignoreSize:!0}),bJ(r,i),L_(r,i),L_(r,i,"shape"),L_(r,i,"style"),L_(r,i,"extra"),r.clipPath=i.clipPath):e[t]=n:a==="replace"?e[t]=n:a==="remove"&&i&&(e[t]=null)}var tie=["transition","enterFrom","leaveTo"],YZe=tie.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function L_(e,t,r){if(r&&(!e[r]&&t[r]&&(e[r]={}),e=e[r],t=t[r]),!(!e||!t))for(var n=r?tie:YZe,i=0;i<n.length;i++){var a=n[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function XZe(e,t){if(e&&(e.hv=t.hv=[o8(t,["left","right"]),o8(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 qZe=function(e){q(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 i=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,r,n),this.option.elements=i},t.prototype.optionUpdated=function(r,n){var i=this.option,a=(n?i:r).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=fQ(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];B(l,function(c,f){var h=c.newOption;h&&(u.push(h),UZe(c,h),ZZe(o,f,h),XZe(o[f],h))},this),i.elements=ht(o,function(c){return c&&delete c.$action,c!=null})},t.prototype._flatten=function(r,n,i){B(r,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},t.prototype.useElOptionsToUpdate=function(){var r=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,r},t.type="graphic",t.defaultOption={elements:[]},t}(Qe),s8={path:null,compoundPath:null,group:Me,image:Xr,text:at},qi=Je(),KZe=function(e){q(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=_e()},t.prototype.render=function(r,n,i){r!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=r,this._updateElements(r),this._relocate(r,i)},t.prototype._updateElements=function(r){var n=r.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=r.get("z"),s=r.get("zlevel");B(n,function(l){var u=Ir(l.id,null),c=u!=null?i.get(u):null,f=Ir(l.parentId,null),h=f!=null?i.get(f):a,d=l.type,v=l.style;d==="text"&&v&&l.hv&&l.hv[1]&&(v.textVerticalAlign=v.textBaseline=v.verticalAlign=v.align=null);var g=l.textContent,m=l.textConfig;if(v&&One(v,d,!!m,!!g)){var x=Ene(v,d,!0);!m&&x.textConfig&&(m=l.textConfig=x.textConfig),!g&&x.textContent&&(g=x.textContent)}var _=QZe(l),b=l.$action||"merge",S=b==="merge",T=b==="replace";if(S){var A=!c,M=c;A?M=l8(u,h,l.type,i):(M&&(qi(M).isNew=!1),Rne(M)),M&&(hb(M,_,r,{isInit:A}),u8(M,l,o,s))}else if(T){pb(c,l,i,r);var P=l8(u,h,l.type,i);P&&(hb(P,_,r,{isInit:!0}),u8(P,l,o,s))}else b==="remove"&&(Nne(c,l),pb(c,l,i,r));var I=i.get(u);if(I&&g)if(S){var k=I.getTextContent();k?k.attr(g):I.setTextContent(new at(g))}else T&&I.setTextContent(new at(g));if(I){var O=l.clipPath;if(O){var D=O.type,N=void 0,A=!1;if(S){var j=I.getClipPath();A=!j||qi(j).type!==D,N=A?AO(D):j}else T&&(A=!0,N=AO(D));I.setClipPath(N),hb(N,O,r,{isInit:A}),Ww(N,O.keyframeAnimation,r)}var z=qi(I);I.setTextConfig(m),z.option=l,JZe(I,r,l),Js({el:I,componentModel:r,itemName:I.name,itemTooltipOption:l.tooltip}),Ww(I,l.keyframeAnimation,r)}})}},t.prototype._relocate=function(r,n){for(var i=r.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var f=i[c],h=Ir(f.id,null),d=h!=null?o.get(h):null;if(!(!d||!d.isGroup)){var v=d.parent,g=v===a,m=qi(d),x=qi(v);m.width=ve(m.option.width,g?s:x.width)||0,m.height=ve(m.option.height,g?l:x.height)||0}}for(var c=i.length-1;c>=0;c--){var f=i[c],h=Ir(f.id,null),d=h!=null?o.get(h):null;if(d){var v=d.parent,x=qi(v),_=v===a?{width:s,height:l}:{width:x.width,height:x.height},b={},S=ET(d,f,_,null,{hv:f.hv,boundingMode:f.bounding},b);if(!qi(d).isNew&&S){for(var T=f.transition,A={},M=0;M<u.length;M++){var P=u[M],I=b[P];T&&(Vc(T)||We(T,P)>=0)?A[P]=I:d[P]=I}lt(d,A,r,0)}else d.attr(b)}}},t.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){pb(i,qi(i).option,n,r._lastGraphicModel)}),this._elMap=_e()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Lt);function AO(e){var t=ye(s8,e)?s8[e]:my(e),r=new t({});return qi(r).type=e,r}function l8(e,t,r,n){var i=AO(r);return t.add(i),n.set(e,i),qi(i).id=e,qi(i).isNew=!0,i}function pb(e,t,r,n){var i=e&&e.parent;i&&(e.type==="group"&&e.traverse(function(a){pb(a,t,r,n)}),XT(e,t,n),r.removeKey(qi(e).id))}function u8(e,t,r,n){e.isGroup||B([["cursor",va.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];ye(t,a)?e[a]=be(t[a],i[1]):e[a]==null&&(e[a]=i[1])}),B(it(t),function(i){if(i.indexOf("on")===0){var a=t[i];e[i]=Ae(a)?a:null}}),ye(t,"draggable")&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function QZe(e){return e=re({},e),B(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(mJ),function(t){delete e[t]}),e}function JZe(e,t,r){var n=De(e).eventData;!e.silent&&!e.ignore&&!n&&(n=De(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=r.info)}function eYe(e){e.registerComponentModel(qZe),e.registerComponentView(KZe),e.registerPreprocessor(function(t){var r=t.graphic;ae(r)?!r[0]||!r[0].elements?t.graphic=[{elements:r}]:t.graphic=[t.graphic[0]]:r&&!r.elements&&(t.graphic=[{elements:[r]}])})}var c8=["x","y","radius","angle","single"],tYe=["cartesian2d","polar","singleAxis"];function rYe(e){var t=e.get("coordinateSystem");return We(tYe,t)>=0}function Dl(e){return e+"Axis"}function nYe(e,t){var r=_e(),n=[],i=_e();e.eachComponent({mainType:"dataZoom",query:t},function(c){i.get(c.uid)||s(c)});var a;do a=!1,e.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var v=r.get(h);v&&v[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function rie(e){var t=e.ecModel,r={infoList:[],infoMap:_e()};return e.eachTargetAxis(function(n,i){var a=t.getComponent(Dl(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var HM=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}(),jy=function(e){q(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,i){var a=f8(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},t.prototype.mergeOption=function(r){var n=f8(r);He(this.option,r,!0),He(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=_e(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return B(c8,function(i){var a=this.getReferringComponents(Dl(i),bRe);if(a.specified){n=!0;var o=new HM;B(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new HM;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",tr).models[0];d&&B(u,function(v){f.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",tr).models[0]&&h.add(v.componentIndex)})}}}a&&B(c8,function(u){if(a){var c=i.findComponents({mainType:Dl(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new HM;f.add(c[0].componentIndex),r.set(u,f),a=!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,i=this.get("rangeMode");B([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Dl(n),i))},this),r},t.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){B(i.indexList,function(o){r.call(n,a,o)})})},t.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Dl(r),n)},t.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},t.prototype.setCalculatedRange=function(r){var n=this.option;B(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},t.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},t.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}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}(Qe);function f8(e){var t={};return B(["start","end","startValue","endValue","throttle"],function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var iYe=function(e){q(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}(jy),wR=function(e){q(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,i,a){this.dataZoomModel=r,this.ecModel=n,this.api=i},t.type="dataZoom",t}(Lt),aYe=function(e){q(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}(wR),Sh=B,h8=Mi,oYe=function(){function e(t,r,n,i){this._dimName=t,this._axisIndex=r,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(t){return this._dataZoomModel===t},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(r){if(rYe(r)){var n=Dl(this._dimName),i=r.getReferringComponents(n,tr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(r)}},this),t},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return Ce(this._minMaxSpan)},e.prototype.calculateDataWindow=function(t){var r=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;Sh(["start","end"],function(h,d){var v=t[h],g=t[h+"Value"];a[d]==="percent"?(v==null&&(v=o[d]),g=i.parse(gt(v,o,r))):(u=!0,g=g==null?r[d]:i.parse(g),v=gt(g,r,o)),l[d]=g==null||isNaN(g)?r[d]:g,s[d]=v==null||isNaN(v)?o[d]:v}),h8(l),h8(s);var c=this._minMaxSpan;u?f(l,s,r,o,!1):f(s,l,o,r,!0);function f(h,d,v,g,m){var x=m?"Span":"ValueSpan";ou(0,h,v,"all",c["min"+x],c["max"+x]);for(var _=0;_<2;_++)d[_]=gt(h[_],v,g,!0),m&&(d[_]=i.parse(d[_]))}return{valueWindow:l,percentWindow:s}},e.prototype.reset=function(t){if(t===this._dataZoomModel){var r=this.getTargetSeriesModels();this._dataExtent=sYe(this,this._dimName,r),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(t,r){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;Sh(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var f=u.getStore(),h=se(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var v,g,m,x=0;x<c.length;x++){var _=f.get(h[x],d),b=!isNaN(_),S=_<o[0],T=_>o[1];if(b&&!S&&!T)return!0;b&&(m=!0),S&&(v=!0),T&&(g=!0)}return m&&v&&g})}else Sh(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});Sh(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},e.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;Sh(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=gt(n[0]+o,n,[0,100],!0):a!=null&&(o=gt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var t=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=fN(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},e}();function sYe(e,t,r){var n=[1/0,-1/0];Sh(r,function(o){A$e(n,o.getData(),t)});var i=e.getAxisModel(),a=tte(i.axis.scale,i,n).calculate();return[a.min,a.max]}var lYe={getTargetSeries:function(e){function t(i){e.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=e.getComponent(Dl(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new oYe(i,a,s,e),r.push(o.__dzAxisProxy))});var n=_e();return B(r,function(i){B(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(e,t){e.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,t)})}),e.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function uYe(e){e.registerAction("dataZoom",function(t,r){var n=nYe(r,t);B(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var d8=!1;function SR(e){d8||(d8=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,lYe),uYe(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function cYe(e){e.registerComponentModel(iYe),e.registerComponentView(aYe),SR(e)}var ea=function(){function e(){}return e}(),nie={};function Th(e,t){nie[e]=t}function iie(e){return nie[e]}var fYe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;B(this.option.feature,function(n,i){var a=iie(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),He(n,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:K.size.m,itemSize:15,itemGap:K.size.s,showTitle:!0,iconStyle:{borderColor:K.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:K.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(Qe);function aie(e,t){var r=$v(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new Xe({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 i}var hYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];B(u,function(_,b){f.push(b)}),new Gs(this._featureNames||[],f).add(h).update(h).remove(Fe(h,null)).execute(),this._featureNames=f;function h(_,b){var S=f[_],T=f[b],A=u[S],M=new tt(A,r,r.ecModel),P;if(a&&a.newTitle!=null&&a.featureName===S&&(A.title=a.newTitle),S&&!T){if(dYe(S))P={onclick:M.option.onclick,featureName:S};else{var I=iie(S);if(!I)return;P=new I}c[S]=P}else if(P=c[T],!P)return;P.uid=zv("toolbox-feature"),P.model=M,P.ecModel=n,P.api=i;var k=P instanceof ea;if(!S&&T){k&&P.dispose&&P.dispose(n,i);return}if(!M.get("show")||k&&P.unusable){k&&P.remove&&P.remove(n,i);return}d(M,P,S),M.setIconStatus=function(O,D){var N=this.option,j=this.iconPaths;N.iconStatus=N.iconStatus||{},N.iconStatus[O]=D,j[O]&&(D==="emphasis"?Fs:Vs)(j[O])},P instanceof ea&&P.render&&P.render(M,n,i,a)}function d(_,b,S){var T=_.getModel("iconStyle"),A=_.getModel(["emphasis","iconStyle"]),M=b instanceof ea&&b.getIcons?b.getIcons():_.get("icon"),P=_.get("title")||{},I,k;pe(M)?(I={},I[S]=M):I=M,pe(P)?(k={},k[S]=P):k=P;var O=_.iconPaths={};B(I,function(D,N){var j=Rv(D,{},{x:-s/2,y:-s/2,width:s,height:s});j.setStyle(T.getItemStyle());var z=j.ensureState("emphasis");z.style=A.getItemStyle();var $=new at({style:{text:k[N],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:DN({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},n)},ignore:!0});j.setTextContent($),Js({el:j,componentModel:r,itemName:N,formatterParamsExtra:{title:k[N]}}),j.__title=k[N],j.on("mouseover",function(){var U=A.getItemStyle(),F=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";$.setStyle({fill:A.get("textFill")||U.fill||U.stroke||K.color.neutral99,backgroundColor:A.get("textBackgroundColor")}),j.setTextConfig({position:A.get("textPosition")||F}),$.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",N])!=="emphasis"&&i.leaveEmphasis(this),$.hide()}),(_.get(["iconStatus",N])==="emphasis"?Fs:Vs)(j),o.add(j),j.on("click",ge(b.onclick,b,n,i,N)),O[N]=j})}var v=jr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),x=$t(g,v,m);zc(r.get("orient"),o,r.get("itemGap"),x.width,x.height),ET(o,g,v,m),o.add(aie(o.getBoundingRect(),r)),l||o.eachChild(function(_){var b=_.__title,S=_.ensureState("emphasis"),T=S.textConfig||(S.textConfig={}),A=_.getTextContent(),M=A&&A.ensureState("emphasis");if(M&&!Ae(M)&&b){var P=M.style||(M.style={}),I=xT(b,at.makeFont(P)),k=_.x+o.x,O=_.y+o.y+s,D=!1;O+I.height>i.getHeight()&&(T.position="top",D=!0);var N=D?-5-I.height:s+10;k+I.width/2>i.getWidth()?(T.position=["100%",N],P.align="right"):k-I.width/2<0&&(T.position=[0,N],P.align="left")}})},t.prototype.updateView=function(r,n,i,a){B(this._features,function(o){o instanceof ea&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(r,n){B(this._features,function(i){i instanceof ea&&i.remove&&i.remove(r,n)}),this.group.removeAll()},t.prototype.dispose=function(r,n){B(this._features,function(i){i instanceof ea&&i.dispose&&i.dispose(r,n)})},t.type="toolbox",t}(Lt);function dYe(e){return e.indexOf("my")===0}var vYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||K.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=nt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,v=o?decodeURIComponent(h[1]):h[1];d&&(v=window.atob(v));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,x=new Uint8Array(m);m--;)x[m]=v.charCodeAt(m);var _=new Blob([x]);window.navigator.msSaveOrOpenBlob(_,g)}else{var b=document.createElement("iframe");document.body.appendChild(b);var S=b.contentWindow,T=S.document;T.open("image/svg+xml","replace"),T.write(v),T.close(),S.focus(),T.execCommand("SaveAs",!0,g),document.body.removeChild(b)}}else{var A=i.get("lang"),M='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(A&&A[0]||"")+'" /></body>',P=window.open();P.document.write(M),P.document.title=a}},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:K.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(ea),v8="__ec_magicType_stack__",pYe=[["line","bar"],["stack"]],gYe=function(e){q(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"),i={};return B(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},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,i){var a=this.model,o=a.get(["seriesIndex",i]);if(p8[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,v=p8[i](h,d,f,a);v&&(Pe(v,f.option),s.series.push(v));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var x=m.dim,_=x+"Axis",b=f.getReferringComponents(_,tr).models[0],S=b.componentIndex;s[_]=s[_]||[];for(var T=0;T<=S;T++)s[_][S]=s[_][S]||{};s[_][S].boundaryGap=i==="bar"}}};B(pYe,function(f){We(f,i)>=0&&B(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=He({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(ea),p8={line:function(e,t,r,n){if(e==="bar")return He({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 He({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 i=r.get("stack")===v8;if(e==="line"||e==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),He({id:t,stack:i?"":v8},n.get(["option","stack"])||{},!0)}};Ka({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var qT=new Array(60).join("-"),lv=" ";function mYe(e){var t={},r=[],n=[];return e.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:t,other:r,meta:n}}function yYe(e){var t=[];return B(e,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(se(r.series,function(d){return d.name})),l=[i.model.getCategories()];B(r.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(g){return g}))});for(var u=[s.join(lv)],c=0;c<l[0].length;c++){for(var f=[],h=0;h<l.length;h++)f.push(l[h][c]);u.push(f.join(lv))}t.push(u.join(`
|
||
`))}),t.join(`
|
||
|
||
`+qT+`
|
||
|
||
`)}function xYe(e){return se(e,function(t){var r=t.getRawData(),n=[t.name],i=[];return r.each(r.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=r.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+lv:"")+i.join(lv))}),n.join(`
|
||
`)}).join(`
|
||
|
||
`+qT+`
|
||
|
||
`)}function _Ye(e){var t=mYe(e);return{value:ht([yYe(t.seriesGroupByCategoryAxis),xYe(t.other)],function(r){return!!r.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+qT+`
|
||
|
||
`),meta:t.meta}}function Xw(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function bYe(e){var t=e.slice(0,e.indexOf(`
|
||
`));if(t.indexOf(lv)>=0)return!0}var CO=new RegExp("["+lv+"]+","g");function wYe(e){for(var t=e.split(/\n+/g),r=Xw(t.shift()).split(CO),n=[],i=se(r,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=Xw(t[a]).split(CO);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function SYe(e){for(var t=e.split(/\n+/g),r=Xw(t.shift()),n=[],i=0;i<t.length;i++){var a=Xw(t[i]);if(a){var o=a.split(CO),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:r,data:n}}function TYe(e,t){var r=e.split(new RegExp(`
|
||
*`+qT+`
|
||
*`,"g")),n={series:[]};return B(r,function(i,a){if(bYe(i)){var o=wYe(i),s=t[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=SYe(i);n.series.push(o)}}),n}var AYe=function(e){q(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 i=n.getDom(),a=this.model;this._dom&&i.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=a.get("backgroundColor")||K.color.neutral00;var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var f=a.get("optionToContent"),h=a.get("contentToOption"),d=_Ye(r);if(Ae(f)){var v=f(n.getOption());pe(v)?u.innerHTML=v:tf(v)&&u.appendChild(v)}else{c.readOnly=a.get("readOnly");var g=c.style;g.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",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var m=d.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var _="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",b=document.createElement("div"),S=document.createElement("div");_+=";background-color:"+a.get("buttonColor"),_+=";color:"+a.get("buttonTextColor");var T=this;function A(){i.removeChild(o),T._dom=null}jk(b,"click",A),jk(S,"click",function(){if(h==null&&f!=null||h!=null&&f==null){A();return}var M;try{Ae(h)?M=h(u,n.getOption()):M=TYe(c.value,m)}catch(P){throw A(),new Error("Data view format error "+P)}M&&n.dispatchAction({type:"changeDataView",newOption:M}),A()}),b.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=b.style.cssText=_,!a.get("readOnly")&&x.appendChild(S),x.appendChild(b),o.appendChild(s),o.appendChild(u),o.appendChild(x),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(r,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(r,n){this.remove(r,n)},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:K.color.background,textColor:K.color.primary,textareaColor:K.color.background,textareaBorderColor:K.color.border,buttonColor:K.color.accent50,buttonTextColor:K.color.neutral00};return n},t}(ea);function CYe(e,t){return se(e,function(r,n){var i=t&&t[n];if(Le(i)&&!ae(i)){var a=Le(r)&&!ae(r);a||(r={value:r});var o=i.name!=null&&r.name==null;return r=Pe(r,i),o&&delete r.name,r}else return r})}Ka({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var r=[];B(e.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)r.push(re({type:"scatter"},n));else{var a=i.get("data");r.push({name:n.name,data:CYe(n.data,a)})}}),t.mergeOption(Pe({series:r},e.newOption))});var oie=B,sie=Je();function MYe(e,t){var r=TR(e);oie(t,function(n,i){for(var a=r.length-1;a>=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(t)}function PYe(e){var t=TR(e),r=t[t.length-1];t.length>1&&t.pop();var n={};return oie(r,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function LYe(e){sie(e).snapshots=null}function kYe(e){return TR(e).length}function TR(e){var t=sie(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var IYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(r,n){LYe(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}(ea);Ka({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var OYe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],AR=function(){function e(t,r,n){var i=this;this._targetInfoList=[];var a=g8(r,t);B(EYe,function(o,s){(!n||!n.include||We(n.include,s)>=0)&&o(a,i._targetInfoList)})}return e.prototype.setOutputRanges=function(t,r){return this.matchOutputRanges(t,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=UM[n.brushType](0,a,i);n.__rangeOffset={offset:_8[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},e.prototype.matchOutputRanges=function(t,r,n){B(t,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&B(a.coordSyses,function(o){var s=UM[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},e.prototype.setInputRanges=function(t,r){B(t,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=UM[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?_8[n.brushType](a.values,o.offset,DYe(a.xyMinMax,o.xyMinMax)):a.values}},this)},e.prototype.makePanelOpts=function(t,r){return se(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:hne(i),isTargetByCursor:vne(i,t,n.coordSysModel),getLinearBrushOtherExtent:dne(i)}})},e.prototype.controlSeries=function(t,r,n){var i=this.findTargetInfo(t,n);return i===!0||i&&We(i.coordSyses,r.coordinateSystem)>=0},e.prototype.findTargetInfo=function(t,r){for(var n=this._targetInfoList,i=g8(r,t),a=0;a<n.length;a++){var o=n[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<m8.length;l++)if(m8[l](i,o))return o}return!0},e}();function MO(e){return e[0]>e[1]&&e.reverse(),e}function g8(e,t){return ld(e,t,{includeMainTypes:OYe})}var EYe={grid:function(e,t){var r=e.xAxisModels,n=e.yAxisModels,i=e.gridModels,a=_e(),o={},s={};!r&&!n&&!i||(B(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),B(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),B(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];B(u.getCartesians(),function(f,h){(We(r,f.getAxis("x").model)>=0||We(n,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:y8.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.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:y8.geo})})}},m8=[function(e,t){var r=e.xAxisModel,n=e.yAxisModel,i=e.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(e,t){var r=e.geoModel;return r&&r===t.geoModel}],y8={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Xl(e)),t}},UM={lineX:Fe(x8,0),lineY:Fe(x8,1),rect:function(e,t,r,n){var i=e?t.pointToData([r[0][0],r[1][0]],n):t.dataToPoint([r[0][0],r[1][0]],n),a=e?t.pointToData([r[0][1],r[1][1]],n):t.dataToPoint([r[0][1],r[1][1]],n),o=[MO([i[0],a[0]]),MO([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=se(r,function(o){var s=e?t.pointToData(o,n):t.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function x8(e,t,r,n){var i=r.getAxis(["x","y"][e]),a=MO(se([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var _8={lineX:Fe(b8,0),lineY:Fe(b8,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 se(e,function(n,i){return[n[0]-r[0]*t[i][0],n[1]-r[1]*t[i][1]]})}};function b8(e,t,r,n){return[t[0]-n[e]*r[0],t[1]-n[e]*r[1]]}function DYe(e,t){var r=w8(e),n=w8(t),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function w8(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var PO=B,NYe=gRe("toolbox-dataZoom_"),jYe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new qj(i.getZr()),this._brushController.on("brush",ge(this._onBrush,this)).mount()),zYe(r,n,this,a,i),BYe(r,n)},t.prototype.onclick=function(r,n,i){RYe[i].call(this)},t.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},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 i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new AR(CR(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),MYe(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,v=l(u,d,a),g=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=ou(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,c.componentIndex);v&&(h=d)}),h}},t.prototype._dispatchZoomAction=function(r){var n=[];PO(r,function(i,a){n.push(Ce(i))}),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:K.color.backgroundTint}};return n},t}(ea),RYe={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(PYe(this.ecModel))}};function CR(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 BYe(e,t){e.setIconStatus("back",kYe(t)>1?"emphasis":"normal")}function zYe(e,t,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new AR(CR(e),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()}:!1)}KBe("dataZoom",function(e){var t=e.getComponent("toolbox",0),r=["feature","dataZoom"];if(!t||t.get(r)==null)return;var n=t.getModel(r),i=[],a=CR(n),o=ld(e,a);PO(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),PO(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:NYe+u+f};h[c]=f,i.push(h)}return i});function $Ye(e){e.registerComponentModel(fYe),e.registerComponentView(hYe),Th("saveAsImage",vYe),Th("magicType",gYe),Th("dataView",AYe),Th("dataZoom",jYe),Th("restore",IYe),Ze(cYe)}var FYe=function(e){q(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",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:K.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:K.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:K.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:K.color.tertiary,fontSize:14}},t}(Qe);function lie(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function uie(e){if(nt.domSupported){for(var t=document.documentElement.style,r=0,n=e.length;r<n;r++)if(e[r]in t)return e[r]}}var cie=uie(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),VYe=uie(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function fie(e,t){if(!e)return t;t=ZN(t,!0);var r=e.indexOf(t);return e=r===-1?t:"-"+e.slice(0,r)+"-"+t,e.toLowerCase()}function GYe(e,t){var r=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return r?r[t]:null}var WYe=fie(VYe,"transition"),MR=fie(cie,"transform"),HYe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(nt.transform3dSupported?"will-change:transform;":"");function UYe(e){return e=e==="left"?"right":e==="right"?"left":e==="top"?"bottom":"top",e}function ZYe(e,t,r){if(!pe(r)||r==="inside")return"";var n=e.get("backgroundColor"),i=e.get("borderWidth");t=uf(t);var a=UYe(r),o=Math.max(Math.round(i)*1.5,6),s="",l=MR+":",u;We(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=t+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function YYe(e,t,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+e/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+e+"s "+n,a+=(a.length?",":"")+(nt.transformSupported?""+MR+i:",left"+i+",top"+i)),WYe+":"+a}function S8(e,t,r){var n=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!nt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=nt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+MR+":"+o+";":[["top",0],["left",0],[cie,o]]}function XYe(e){var t=[],r=e.get("fontSize"),n=e.getTextColor();n&&t.push("color:"+n),t.push("font:"+e.getFont());var i=be(e.get("lineHeight"),Math.round(r*3/2));r&&t.push("line-height:"+i+"px");var a=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),B(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function qYe(e,t,r,n){var i=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),f=e.getModel("textStyle"),h=JJ(e,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),t&&a>0&&i.push(YYe(a,r,n)),o&&i.push("background-color:"+o),B(["width","color","radius"],function(v){var g="border-"+v,m=ZN(g),x=e.get(m);x!=null&&i.push(g+":"+x+(v==="color"?"":"px"))}),i.push(XYe(f)),h!=null&&i.push("padding:"+$v(h).join("px ")+"px"),i.join(";")+";"}function T8(e,t,r,n,i){var a=t&&t.painter;if(r){var o=a&&a.getViewportRoot();o&&NNe(e,o,r,n,i)}else{e[0]=n,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var KYe=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,nt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=r.appendTo,o=a&&(pe(a)?document.querySelector(a):tf(a)?a:Ae(a)&&a(t.getDom()));T8(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Zi(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var r=this._api.getDom(),n=GYe(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,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,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=HYe+qYe(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+S8(a[0],a[1],!0)+("border-color:"+uf(r)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,r,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(pe(a)&&n.get("trigger")==="item"&&!lie(n)&&(s=ZYe(n,i,a)),pe(t))o.innerHTML=t+s;else if(t){o.innerHTML="",ae(t)||(t=[t]);for(var l=0;l<t.length;l++)tf(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},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(T8(n,this._zr,this._container,t,r),n[0]!=null&&n[1]!=null){var i=this.el.style,a=S8(n[0],n[1]);B(a,function(o){i[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",nt.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(ge(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;jNe(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}(),QYe=function(){function e(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),C8(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,i,a){var o=this;Le(t)&&mt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new at({style:{rich:r.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:JJ(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),B(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),B(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(t){this._enterable=t},e.prototype.getSize=function(){var t=this.el,r=this.el.getBoundingRect(),n=A8(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 i=this._styleCoord;C8(i,this._zr,t,r),t=i[0],r=i[1];var a=n.style,o=pl(a.borderWidth||0),s=A8(a);n.x=t+o+s.left,n.y=r+o+s.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(ge(this.hide,this),t)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function pl(e){return Math.max(0,e)}function A8(e){var t=pl(e.shadowBlur||0),r=pl(e.shadowOffsetX||0),n=pl(e.shadowOffsetY||0);return{left:pl(t-r),right:pl(t+r),top:pl(t-n),bottom:pl(t+n)}}function C8(e,t,r,n){e[0]=r,e[1]=n,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var JYe=new Xe({shape:{x:-1,y:-1,width:2,height:2}}),eXe=function(e){q(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(!(nt.node||!n.getDom())){var i=r.getComponent("tooltip"),a=this._renderMode=SRe(i.get("renderMode"));this._tooltipContent=a==="richText"?new QYe(n):new KYe(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(r,n,i){if(!(nt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=r,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(r),a.setEnterable(r.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&r.get("transitionDuration")?Gv(this,"_updatePosition",50,"fixRate"):by(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var r=this._tooltipModel,n=r.get("triggerOn");Une("itemTooltip",this._api,ge(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||nt.node||!i.getDom())){var o=M8(a,i);this._ticket="";var s=a.dataByCoordSys,l=iXe(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=JYe;c.x=a.x,c.y=a.y,c.update(),De(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=Zne(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(M8(a,i))},t.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=tg([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=De(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Pc(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(De(c).dataIndex!=null?l=c:De(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=ge(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=tg([n.tooltipOption],a),l=this._renderMode,u=[],c=Ar("section",{blocks:[],noHeader:!0}),f=[],h=new M2;B(r,function(_){B(_.dataByAxis,function(b){var S=i.getComponent(b.axisDim+"Axis",b.axisIndex),T=b.value;if(!(!S||T==null)){var A=Gne(T,S.axis,i,b.seriesDataIndices,b.valueLabelOpt),M=Ar("section",{header:A,noHeader:!Ci(A),sortBlocks:!0,blocks:[]});c.blocks.push(M),B(b.seriesDataIndices,function(P){var I=i.getSeriesByIndex(P.seriesIndex),k=P.dataIndexInside,O=I.getDataParams(k);if(!(O.dataIndex<0)){O.axisDim=b.axisDim,O.axisIndex=b.axisIndex,O.axisType=b.axisType,O.axisId=b.axisId,O.axisValue=Cw(S.axis,{value:T}),O.axisValueLabel=A,O.marker=h.makeTooltipMarker("item",uf(O.color),l);var D=GV(I.formatTooltip(k,!0,null)),N=D.frag;if(N){var j=tg([I],a).get("valueFormatter");M.blocks.push(j?re({valueFormatter:j},N):N)}D.text&&f.push(D.text),u.push(O)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,v=s.get("order"),g=XV(c,h,l,v,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?`
|
||
|
||
`:"<br/>",x=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,x,u,Math.random()+"",o[0],o[1],d,null,h)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=De(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,v=r.positionDefault,g=tg([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var x=u.getDataParams(c,f),_=new M2;x.marker=_.makeTooltipMarker("item",uf(x.color),d);var b=GV(u.formatTooltip(c,!1,f)),S=g.get("order"),T=g.get("valueFormatter"),A=b.frag,M=A?XV(T?re({valueFormatter:T},A):A,_,d,S,a.get("useUTC"),g.get("textStyle")):b.text,P="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,x,P,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=De(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(pe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Ce(l),l.content=On(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=r.positionDefault,v=tg(f,this._tooltipModel,d?{position:d}:null),g=v.get("content"),m=Math.random()+"",x=new M2;this._showOrMove(v,function(){var _=Ce(v.get("formatterParams")||{});this._showTooltipContent(v,g,_,m,r.offsetX,r.offsetY,r.position,n,x)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=v.color;if(h)if(pe(h)){var m=r.ecModel.get("useUTC"),x=ae(i)?i[0]:i,_=x&&x.axisType&&x.axisType.indexOf("time")>=0;d=h,_&&(d=h0(x.axisValue,d,m)),d=YN(d,i,!0)}else if(Ae(h)){var b=ge(function(S,T){S===this._ticket&&(f.setContent(T,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,b)}else d=h;f.setContent(d,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ae(n))return{color:a||o};if(!ae(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Ae(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,c],contentSize:f.slice()})),ae(n))i=ve(n[0],u),a=ve(n[1],c);else if(Le(n)){var g=n;g.width=f[0],g.height=f[1];var m=$t(g,{width:u,height:c});i=m.x,a=m.y,h=null,d=null}else if(pe(n)&&l){var x=nXe(n,v,f,r.get("borderWidth"));i=x[0],a=x[1]}else{var x=tXe(i,a,o,u,c,h?null:20,d?null:20);i=x[0],a=x[1]}if(h&&(i-=P8(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=P8(d)?f[1]/2:d==="bottom"?f[1]:0),lie(r)){var x=rXe(i,a,o,u,c);i=x[0],a=x[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&B(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&B(u,function(h,d){var v=f[d]||{},g=h.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&h.value===v.value&&h.axisType===v.axisType&&h.axisId===v.axisId&&g.length===m.length,o&&B(g,function(x,_){var b=m[_];o=o&&x.seriesIndex===b.seriesIndex&&x.dataIndex===b.dataIndex}),a&&B(h.seriesDataIndices,function(x){var _=x.seriesIndex,b=n[_],S=a[_];b&&S&&S.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){nt.node||!n.getDom()||(by(this,"_updatePosition"),this._tooltipContent.dispose(),_O("itemTooltip",n))},t.type="tooltip",t}(Lt);function tg(e,t,r){var n=t.ecModel,i;r?(i=new tt(r,n,n),i=new tt(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof tt&&(o=o.get("tooltip",!0)),pe(o)&&(o={formatter:o}),o&&(i=new tt(o,i,n)))}return i}function M8(e,t){return e.dispatchAction||ge(t.dispatchAction,t)}function tXe(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function rXe(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function nXe(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+o;break;case"left":s=t.x-i-o,l=t.y+c/2-a/2;break;case"right":s=t.x+u+o,l=t.y+c/2-a/2}return[s,l]}function P8(e){return e==="center"||e==="middle"}function iXe(e,t,r){var n=gN(e).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Ov(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=De(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function aXe(e){Ze(b0),e.registerComponentModel(FYe),e.registerComponentView(eXe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},lr),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},lr)}var oXe=["rect","polygon","keep","clear"];function sXe(e,t){var r=Pt(e?e.brush:[]);if(r.length){var n=[];B(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=e&&e.toolbox;ae(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),lXe(s),t&&!s.length&&s.push.apply(s,oXe)}}function lXe(e){var t={};B(e,function(r){t[r]=1}),e.length=0,B(t,function(r,n){e.push(n)})}var L8=B;function k8(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function LO(e,t,r){var n={};return L8(t,function(a){var o=n[a]=i();L8(e[a],function(s,l){if(Hr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new Hr(u),l==="opacity"&&(u=Ce(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Hr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function hie(e,t,r){var n;B(r,function(i){t.hasOwnProperty(i)&&k8(t[i])&&(n=!0)}),n&&B(r,function(i){t.hasOwnProperty(i)&&k8(t[i])?e[i]=Ce(t[i]):delete e[i]})}function uXe(e,t,r,n,i,a){var o={};B(e,function(f){var h=Hr.prepareVisualTypes(t[f]);o[f]=h});var s;function l(f){return ij(r,s,f)}function u(f,h){uee(r,s,f,h)}r.each(c);function c(f,h){s=f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,f),g=t[v],m=o[v],x=0,_=m.length;x<_;x++){var b=m[x];g[b]&&g[b].applyVisual(f,l,u)}}}function cXe(e,t,r,n){var i={};return B(e,function(a){var o=Hr.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(T){return ij(s,f,T)}function c(T,A){uee(s,f,T,A)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var v=n!=null?h.get(l,f):f,g=r(v),m=t[g],x=i[g],_=0,b=x.length;_<b;_++){var S=x[_];m[S]&&m[S].applyVisual(v,u,c)}}}}}function fXe(e){var t=e.brushType,r={point:function(n){return I8[t].point(n,r,e)},rect:function(n){return I8[t].rect(n,r,e)}};return r}var I8={lineX:O8(0),lineY:O8(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])&&hc(r.range,e[0],e[1])},rect:function(e,t,r){var n=r.range;if(!e||n.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,l=n[0];if(hc(n,i,a)||hc(n,i+o,a)||hc(n,i,a+s)||hc(n,i+o,a+s)||Oe.create(e).contain(l[0],l[1])||gg(i,a,i+o,a,n)||gg(i,a,i,a+s,n)||gg(i+o,a,i+o,a+s,n)||gg(i,a+s,i+o,a+s,n))return!0}}};function O8(e){var t=["x","y"],r=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[e];return rg(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[r[e]]];return s[1]<s[0]&&s.reverse(),rg(s[0],o)||rg(s[1],o)||rg(o[0],s)||rg(o[1],s)}}}}function rg(e,t){return t[0]<=e&&e<=t[1]}var E8=["inBrush","outOfBrush"],ZM="__ecBrushSelect",kO="__ecInBrushSelectEvent";function die(e){e.eachComponent({mainType:"brush"},function(t){var r=t.brushTargetManager=new AR(t.option,e);r.setInputRanges(t.areas,e)})}function hXe(e,t,r){var n=[],i,a;e.eachComponent({mainType:"brush"},function(o){r&&r.type==="takeGlobalCursor"&&o.setBrushOption(r.key==="brush"?r.brushOption:{brushType:!1})}),die(e),e.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Ce(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,f=[],h=[],d=[],v=!1;s||(i=u.throttleType,a=u.throttleDelay);var g=se(o.areas,function(T){var A=gXe[T.brushType],M=Pe({boundingRect:A?A(T):void 0},T);return M.selectors=fXe(M),M}),m=LO(o.option,E8,function(T){T.mappingMethod="fixed"});ae(c)&&B(c,function(T){f[T]=1});function x(T){return c==="all"||!!f[T]}function _(T){return!!T.length}e.eachSeries(function(T,A){var M=d[A]=[];T.subType==="parallel"?b(T,A):S(T,A,M)});function b(T,A){var M=T.coordinateSystem;v=v||M.hasAxisBrushed(),x(A)&&M.eachActiveState(T.getData(),function(P,I){P==="active"&&(h[I]=1)})}function S(T,A,M){if(!(!T.brushSelector||pXe(o,A))&&(B(g,function(I){o.brushTargetManager.controlSeries(I,T,e)&&M.push(I),v=v||_(M)}),x(A)&&_(M))){var P=T.getData();P.each(function(I){D8(T,M,P,I)&&(h[I]=1)})}}e.eachSeries(function(T,A){var M={seriesId:T.id,seriesIndex:A,seriesName:T.name,dataIndex:[]};l.selected.push(M);var P=d[A],I=T.getData(),k=x(A)?function(O){return h[O]?(M.dataIndex.push(I.getRawIndex(O)),"inBrush"):"outOfBrush"}:function(O){return D8(T,P,I,O)?(M.dataIndex.push(I.getRawIndex(O)),"inBrush"):"outOfBrush"};(x(A)?v:_(P))&&uXe(E8,m,I,k)})}),dXe(t,i,a,n,r)}function dXe(e,t,r,n,i){if(i){var a=e.getZr();if(!a[kO]){a[ZM]||(a[ZM]=vXe);var o=Gv(a,ZM,r,t);o(e,n)}}}function vXe(e,t){if(!e.isDisposed()){var r=e.getZr();r[kO]=!0,e.dispatchAction({type:"brushSelect",batch:t}),r[kO]=!1}}function D8(e,t,r,n){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(n,r,o.selectors,o))return!0}}function pXe(e,t){var r=e.option.seriesIndex;return r!=null&&r!=="all"&&(ae(r)?We(r,t)<0:t!==r)}var gXe={rect:function(e){return N8(e.range)},polygon:function(e){for(var t,r=e.range,n=0,i=r.length;n<i;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=r[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&N8(t)}};function N8(e){return new Oe(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var mXe=function(e){q(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 qj(n.getZr())).on("brush",ge(this._onBrush,this)).mount()},t.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},t.prototype.updateTransform=function(r,n,i,a){die(n),this._updateController(r,n,i,a)},t.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},t.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},t.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Ce(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Ce(i),$from:n})},t.type="brush",t}(Lt),yXe=function(e){q(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 i=this.option;!n&&hie(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},t.prototype.setAreas=function(r){r&&(this.areas=se(r,function(n){return j8(this.option,n)},this))},t.prototype.setBrushOption=function(r){this.brushOption=j8(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:K.color.backgroundTint,borderColor:K.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:K.color.disabled},t}(Qe);function j8(e,t){return He({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new tt(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var xXe=["rect","polygon","lineX","lineY","keep","clear"],_Xe=function(e){q(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,B(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},t.prototype.updateView=function(r,n,i){this.render(r,n,i)},t.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return B(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},t.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(r){var n={show:!0,type:xXe.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}(ea);function bXe(e){e.registerComponentView(mXe),e.registerComponentModel(yXe),e.registerPreprocessor(sXe),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,hXe),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"},lr),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},lr),Th("brush",_Xe)}var wXe=function(e){q(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:K.size.m,backgroundColor:K.color.transparent,borderColor:K.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:K.color.primary},subtextStyle:{fontSize:12,color:K.color.quaternary}},t}(Qe),SXe=function(e){q(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,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=be(r.get("textBaseline"),r.get("textVerticalAlign")),c=new at({style:Mt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),d=new at({style:Mt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!v&&!m,d.silent=!g&&!m,v&&c.on("click",function(){pw(v,"_"+r.get("target"))}),g&&d.on("click",function(){pw(g,"_"+r.get("subtarget"))}),De(c).eventData=De(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(d);var x=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=x.width,_.height=x.height;var b=jr(r,i),S=$t(_,b.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),a.x=S.x,a.y=S.y,a.markRedraw();var T={align:l,verticalAlign:u};c.setStyle(T),d.setStyle(T),x=a.getBoundingRect();var A=S.margin,M=r.getItemStyle(["color","opacity"]);M.fill=r.get("backgroundColor");var P=new Xe({shape:{x:x.x-A[3],y:x.y-A[0],width:x.width+A[1]+A[3],height:x.height+A[0]+A[2],r:r.get("borderRadius")},style:M,subPixelOptimize:!0,silent:!0});a.add(P)}},t.type="title",t}(Lt);function TXe(e){e.registerComponentModel(wXe),e.registerComponentView(SXe)}var R8=function(e){q(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,i){this.mergeDefaultAndTheme(r,i),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||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],B(n,function(u,c){var f=Ir(Iv(u),""),h;Le(u)?(h=Ce(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Dn([{name:"value",type:s}],this);l.initData(o,a)},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:K.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:K.color.secondary},data:[]},t}(Qe),vie=function(e){q(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=_u(R8.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:K.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:K.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:K.color.tertiary},itemStyle:{color:K.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:K.color.accent50,borderColor:K.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:K.color.accent50,borderColor:K.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:K.color.accent60},itemStyle:{color:K.color.accent60,borderColor:K.color.accent60},controlStyle:{color:K.color.accent70,borderColor:K.color.accent70}},progress:{lineStyle:{color:K.color.accent30},itemStyle:{color:K.color.accent40}},data:[]}),t}(R8);fr(vie,NT.prototype);var AXe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.type="timeline",t}(Lt),CXe=function(e){q(t,e);function t(r,n,i,a){var o=e.call(this,r,n,i)||this;return o.type=a||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(_a),YM=Math.PI,B8=Je(),MXe=function(e){q(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,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Ar("nameValue",{noName:!0,value:c})},B(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,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 i=r.get(["label","position"]),a=r.get("orient"),o=LXe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":pe(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:YM/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),d=h.get("show",!0),v=d?h.get("itemSize"):0,g=d?h.get("itemGap"):0,m=v+g,x=r.get(["label","rotate"])||0;x=x*YM/180;var _,b,S,T=h.get("position",!0),A=d&&h.get("showPlayBtn",!0),M=d&&h.get("showPrevBtn",!0),P=d&&h.get("showNextBtn",!0),I=0,k=f;T==="left"||T==="bottom"?(A&&(_=[0,0],I+=m),M&&(b=[I,0],I+=m),P&&(S=[k-v,0],k-=m)):(A&&(_=[k-v,0],k-=m),M&&(b=[0,0],I+=m),P&&(S=[k-v,0],k-=m));var O=[I,k];return r.get("inverse")&&O.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:x,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:b,nextBtnPosition:S,axisExtent:O,controlSize:v,controlGap:g}},t.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Wr(),l=o.x,u=o.y+o.height;Ua(s,s,[-l,-u]),Ks(s,s,-YM/2),Ua(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||pe(g)){var m=g==="+"?0:1;b(d,f,c,1,m),b(v,h,c,1,1-m)}else{var m=g>=0?0:1;b(d,f,c,1,m),v[1]=d[1]+g}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=r.rotation,x(i),x(a);function x(S){S.originX=c[0][0]-S.x,S.originY=c[1][0]-S.y}function _(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function b(S,T,A,M,P){S[M]+=A[M][P]-T[M][P]}},t.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=PXe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new CXe("value",o,r.axisExtent,a);return l.model=n,l},t.prototype._createGroup=function(r){var n=this[r]=new Me;return this.group.add(n),n},t.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new yr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:re({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new yr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Pe({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},t.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],B(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),v=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:ge(o._changeTimeline,o,u.value)},m=z8(f,h,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),Yl(m);var x=De(m);f.get("tooltip")?(x.dataIndex=u.value,x.dataModel=a):x.dataIndex=x.dataModel=null,o._tickSymbols.push(m)})},t.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],B(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),v=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),x=new at({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:ge(o._changeTimeline,o,f),silent:!1,style:Mt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});x.ensureState("emphasis").style=Mt(v),x.ensureState("progress").style=Mt(g),n.add(x),Yl(x),B8(x).dataIndex=f,o._tickLabels.push(x)})}},t.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",ge(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",ge(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",ge(this._handlePlayClick,this,!c),!0);function h(d,v,g,m){if(d){var x=Za(be(a.get(["controlStyle",v+"BtnSize"]),o),o),_=[0,-x/2,x,x],b=kXe(a,v+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});b.ensureState("emphasis").style=u,n.add(b),Yl(b)}}},t.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=ge(u._handlePointerDrag,u),f.ondragend=ge(u._handlePointerDragend,u),$8(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){$8(f,u._progressLine,s,i,a)}};this._currentPointer=z8(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},t.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},t.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},t.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Mi(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},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 Ga(r,n,!0)},t.prototype._findNearestTick=function(r){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-r);c<i&&(i=c,a=l)}),a},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,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<r);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",B8(i[a]).dataIndex<=r)},t.type="timeline.slider",t}(AXe);function PXe(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new tv({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new _j({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Hs}}function LXe(e,t){return $t(e.getBoxLayoutParams(),jr(e,t).refContainer,e.get("padding"))}function kXe(e,t,r,n){var i=n.style,a=Rv(e.get(["controlStyle",t]),n||{},new Oe(r[0],r[1],r[2],r[3]));return i&&a.setStyle(i),a}function z8(e,t,r,n,i,a){var o=t.get("color");if(i)i.setColor(o),r.add(i),a&&a.onUpdate(i);else{var s=e.get("symbol");i=xr(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),r.add(i),a&&a.onCreate(i)}var l=t.getItemStyle(["color"]);i.setStyle(l),n=He({rectHover:!0,z2:100},n,!0);var u=Wv(e.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Mf(e.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var f=e.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function $8(e,t,r,n,i,a){if(!e.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",r));if(a||!o.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function IXe(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,r,n){var i=r.getComponent("timeline");return i&&t.currentIndex!=null&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),r.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),Pe({currentIndex:i.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 OXe(e){var t=e&&e.timeline;ae(t)||(t=t?[t]:[]),B(t,function(r){r&&EXe(r)})}function EXe(e){var t=e.type,r={number:"value",time:"time"};if(r[t]&&(e.axisType=r[t],delete e.type),F8(e),pc(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});pc(n,"position")||(n.position=e.controlPosition),n.position==="none"&&!pc(n,"show")&&(n.show=!1,delete n.position),delete e.controlPosition}B(e.data||[],function(i){Le(i)&&!ae(i)&&(!pc(i,"value")&&pc(i,"name")&&(i.value=i.name),F8(i))})}function F8(e){var t=e.itemStyle||(e.itemStyle={}),r=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};B(n,function(o,s){!a[s]&&!pc(i,s)&&(i[s]=o)}),r.label&&!pc(n,"emphasis")&&(n.emphasis=r.label,delete r.label)}function pc(e,t){return e.hasOwnProperty(t)}function DXe(e){e.registerComponentModel(vie),e.registerComponentView(MXe),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),IXe(e),e.registerPreprocessor(OXe)}function PR(e,t){if(!e)return!1;for(var r=ae(e)?e:[e],n=0;n<r.length;n++)if(r[n]&&r[n][t])return!0;return!1}function k_(e){rf(e,"label",["show"])}var I_=Je(),Go=function(e){q(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,i){this.mergeDefaultAndTheme(r,i),this._mergeOption(r,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(nt.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,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=I_(s)[o];if(!l||!l.data){I_(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&k_(l),B(l.data,function(c){c instanceof Array?(k_(c[0]),k_(c[1])):k_(c)}),u=this.createMarkerModelFromSeries(l,this,n),re(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),I_(s)[o]=u},this)},t.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Ar("section",{header:this.name,blocks:[Ar("nameValue",{name:s,value:o,noName:!s,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 i=NT.prototype.getDataParams.call(this,r,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(r,n){return I_(r)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(Qe);fr(Go,NT.prototype);var NXe=function(e){q(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,i){return new t(r,n,i)},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}(Go);function IO(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function jXe(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function O_(e,t,r,n,i,a,o){var s=[],l=Ws(t,i),u=l?t.getCalculationInfo("stackResultDimension"):i,c=qw(t,u,e),f=t.hostModel,h=f.indicesOfNearest(r,u,c)[0];s[a]=t.get(n,h),s[o]=t.get(u,h);var d=t.get(i,h),v=Ra(t.get(i,h));return v=Math.min(v,20),v>=0&&(s[o]=+s[o].toFixed(v)),[s,d]}var E_={min:Fe(O_,"min"),max:Fe(O_,"max"),average:Fe(O_,"average"),median:Fe(O_,"median")};function Ry(e,t){if(t){var r=e.getData(),n=e.coordinateSystem,i=n&&n.dimensions;if(!jXe(t)&&!ae(t.coord)&&ae(i)){var a=pie(t,r,n,e);if(t=Ce(t),t.type&&E_[t.type]&&a.baseAxis&&a.valueAxis){var o=We(i,a.baseAxis.dim),s=We(i,a.valueAxis.dim),l=E_[t.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!ae(i)){t.coord=[];var u=e.getBaseAxis();if(u&&t.type&&E_[t.type]){var c=n.getOtherAxis(u);c&&(t.value=qw(r,r.mapDimension(c.dim),t.type))}}else for(var f=t.coord,h=0;h<2;h++)E_[f[h]]&&(f[h]=qw(r,r.mapDimension(i[h]),f[h]));return t}}function pie(e,t,r,n){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex!=null?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=r.getAxis(RXe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function RXe(e,t){var r=e.getData().getDimensionInfo(t);return r&&r.coordDim}function By(e,t){return e&&e.containData&&t.coord&&!IO(t)?e.containData(t.coord):!0}function BXe(e,t,r){return e&&e.containZone&&t.coord&&r.coord&&!IO(t)&&!IO(r)?e.containZone(t.coord,r.coord):!0}function gie(e,t){return e?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return Kl(o,t[a])}:function(r,n,i,a){return Kl(r.value,t[a])}}function qw(e,t,r){if(r==="average"){var n=0,i=0;return e.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?e.getMedian(t):e.getDataExtent(t)[r==="max"?1:0]}var XM=Je(),LR=function(e){q(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=_e()},t.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){XM(s).keep=!1}),n.eachSeries(function(s){var l=Go.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!XM(s).keep&&a.group.remove(s.group)}),zXe(n,o,this.type)},t.prototype.markKeep=function(r){XM(r).keep=!0},t.prototype.toggleBlurSeries=function(r,n){var i=this;B(r,function(a){var o=Go.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?IQ(l):TN(l))})}})},t.type="marker",t}(Lt);function zXe(e,t,r){e.eachSeries(function(n){var i=Go.getMarkerModelFromSeries(n,r),a=t.get(n.id);if(i&&a&&a.group){var o=lf(i),s=o.z,l=o.zlevel;IT(a.group,s,l)}})}function V8(e,t,r){var n=t.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();e.each(function(s){var l=e.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,d=u&&o?o.y:0,v,g=ve(l.get("x"),c)+h,m=ve(l.get("y"),f)+d;if(!isNaN(g)&&!isNaN(m))v=[g,m];else if(t.getMarkerPosition)v=t.getMarkerPosition(e.getValues(e.dimensions,s));else if(n){var x=e.get(n.dimensions[0],s),_=e.get(n.dimensions[1],s);v=n.dataToPoint([x,_])}isNaN(g)||(v[0]=g),isNaN(m)||(v[1]=m),e.setItemLayout(s,v)})}var $Xe=function(e){q(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,i){n.eachSeries(function(a){var o=Go.getMarkerModelFromSeries(a,"markPoint");o&&(V8(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new m0),f=FXe(o,r,n);n.setData(f),V8(n.getData(),r,a),f.each(function(h){var d=f.getItemModel(h),v=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),x=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(Ae(v)||Ae(g)||Ae(m)||Ae(x)){var b=n.getRawValue(h),S=n.getDataParams(h);Ae(v)&&(v=v(b,S)),Ae(g)&&(g=g(b,S)),Ae(m)&&(m=m(b,S)),Ae(x)&&(x=x(b,S))}var T=d.getModel("itemStyle").getItemStyle(),A=d.get("z2"),M=v0(l,"color");T.fill||(T.fill=M),f.setItemVisual(h,{z2:be(A,0),symbol:v,symbolSize:g,symbolRotate:m,symbolOffset:x,symbolKeepAspect:_,style:T})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){De(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markPoint",t}(LR);function FXe(e,t,r){var n;e?n=se(e&&e.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return re(re({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Dn(n,r),a=se(r.get("data"),Fe(Ry,t));e&&(a=ht(a,Fe(By,e)));var o=gie(!!e,n);return i.initData(a,null,o),i}function VXe(e){e.registerComponentModel(NXe),e.registerComponentView($Xe),e.registerPreprocessor(function(t){PR(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var GXe=function(e){q(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,i){return new t(r,n,i)},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}(Go),D_=Je(),WXe=function(e,t,r,n){var i=e.getData(),a;if(ae(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=t.getAxis(n.yAxis!=null?"y":"x"),l=nn(n.yAxis,n.xAxis);else{var u=pie(n,i,t,e);s=u.valueAxis;var c=mj(i,u.valueDataDim);l=qw(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=Ce(n),v={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,v.coord[h]=1/0;var g=r.get("precision");g>=0&&ot(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[f]=v.coord[f]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[Ry(e,a[0]),Ry(e,a[1]),re({},a[2])];return m[2].type=m[2].type||null,He(m[2],m[0]),He(m[2],m[1]),m};function Kw(e){return!isNaN(e)&&!isFinite(e)}function G8(e,t,r,n){var i=1-e,a=n.dimensions[e];return Kw(t[i])&&Kw(r[i])&&t[e]===r[e]&&n.getAxis(a).containData(t[e])}function HXe(e,t){if(e.type==="cartesian2d"){var r=t[0].coord,n=t[1].coord;if(r&&n&&(G8(1,r,n,e)||G8(0,r,n,e)))return!0}return By(e,t[0])&&By(e,t[1])}function qM(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=ve(o.get("x"),i.getWidth()),u=ve(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),h=e.get(c[1],t);s=a.dataToPoint([f,h])}if(au(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),c=a.dimensions;Kw(e.get(c[0],t))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):Kw(e.get(c[1],t))&&(s[1]=v.toGlobalCoord(v.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}e.setItemLayout(t,s)}var UXe=function(e){q(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,i){n.eachSeries(function(a){var o=Go.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=D_(o).from,u=D_(o).to;l.each(function(c){qM(l,c,!0,a,i),qM(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Yj);this.group.add(c.group);var f=ZXe(o,r,n),h=f.from,d=f.to,v=f.line;D_(n).from=h,D_(n).to=d,n.setData(v);var g=n.get("symbol"),m=n.get("symbolSize"),x=n.get("symbolRotate"),_=n.get("symbolOffset");ae(g)||(g=[g,g]),ae(m)||(m=[m,m]),ae(x)||(x=[x,x]),ae(_)||(_=[_,_]),f.from.each(function(S){b(h,S,!0),b(d,S,!1)}),v.each(function(S){var T=v.getItemModel(S),A=T.getModel("lineStyle").getLineStyle();v.setItemLayout(S,[h.getItemLayout(S),d.getItemLayout(S)]);var M=T.get("z2");A.stroke==null&&(A.stroke=h.getItemVisual(S,"style").fill),v.setItemVisual(S,{z2:be(M,0),fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:d.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(S,"symbolOffset"),toSymbolRotate:d.getItemVisual(S,"symbolRotate"),toSymbolSize:d.getItemVisual(S,"symbolSize"),toSymbol:d.getItemVisual(S,"symbol"),style:A})}),c.updateData(v),f.line.eachItemGraphicEl(function(S){De(S).dataModel=n,S.traverse(function(T){De(T).dataModel=n})});function b(S,T,A){var M=S.getItemModel(T);qM(S,T,A,r,a);var P=M.getModel("itemStyle").getItemStyle();P.fill==null&&(P.fill=v0(l,"color")),S.setItemVisual(T,{symbolKeepAspect:M.get("symbolKeepAspect"),symbolOffset:be(M.get("symbolOffset",!0),_[A?0:1]),symbolRotate:be(M.get("symbolRotate",!0),x[A?0:1]),symbolSize:be(M.get("symbolSize"),m[A?0:1]),symbol:be(M.get("symbol",!0),g[A?0:1]),style:P})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},t.type="markLine",t}(LR);function ZXe(e,t,r){var n;e?n=se(e&&e.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return re(re({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Dn(n,r),a=new Dn(n,r),o=new Dn([],r),s=se(r.get("data"),Fe(WXe,t,e,r));e&&(s=ht(s,Fe(HXe,e)));var l=gie(!!e,n);return i.initData(se(s,function(u){return u[0]}),null,l),a.initData(se(s,function(u){return u[1]}),null,l),o.initData(se(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function YXe(e){e.registerComponentModel(GXe),e.registerComponentView(UXe),e.registerPreprocessor(function(t){PR(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var XXe=function(e){q(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,i){return new t(r,n,i)},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}(Go),N_=Je(),qXe=function(e,t,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Ry(e,i),s=Ry(e,a),l=o.coord,u=s.coord;l[0]=nn(l[0],-1/0),l[1]=nn(l[1],-1/0),u[0]=nn(u[0],1/0),u[1]=nn(u[1],1/0);var c=vT([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Qw(e){return!isNaN(e)&&!isFinite(e)}function W8(e,t,r,n){var i=1-e;return Qw(t[i])&&Qw(r[i])}function KXe(e,t){var r=t.coord[0],n=t.coord[1],i={coord:r,x:t.x0,y:t.y0},a={coord:n,x:t.x1,y:t.y1};return au(e,"cartesian2d")?r&&n&&(W8(1,r,n)||W8(0,r,n))?!0:BXe(e,i,a):By(e,i)||By(e,a)}function H8(e,t,r,n,i){var a=n.coordinateSystem,o=e.getItemModel(t),s,l=ve(o.get(r[0]),i.getWidth()),u=ve(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=e.getValues(["x0","y0"],t),f=e.getValues(["x1","y1"],t),h=a.clampData(c),d=a.clampData(f),v=[];r[0]==="x0"?v[0]=h[0]>d[0]?f[0]:c[0]:v[0]=h[0]>d[0]?c[0]:f[0],r[1]==="y0"?v[1]=h[1]>d[1]?f[1]:c[1]:v[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(v,r,!0)}else{var g=e.get(r[0],t),m=e.get(r[1],t),x=[g,m];a.clampData&&a.clampData(x,x),s=a.dataToPoint(x,!0)}if(au(a,"cartesian2d")){var _=a.getAxis("x"),b=a.getAxis("y"),g=e.get(r[0],t),m=e.get(r[1],t);Qw(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):Qw(m)&&(s[1]=b.toGlobalCoord(b.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var U8=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],QXe=function(e){q(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,i){n.eachSeries(function(a){var o=Go.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=se(U8,function(f){return H8(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new Me});this.group.add(c.group),this.markKeep(c);var f=JXe(o,r,n);n.setData(f),f.each(function(h){var d=se(U8,function(k){return H8(f,h,k,r,a)}),v=o.getAxis("x").scale,g=o.getAxis("y").scale,m=v.getExtent(),x=g.getExtent(),_=[v.parse(f.get("x0",h)),v.parse(f.get("x1",h))],b=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Mi(_),Mi(b);var S=!(m[0]>_[1]||m[1]<_[0]||x[0]>b[1]||x[1]<b[0]),T=!S;f.setItemLayout(h,{points:d,allClipped:T});var A=f.getItemModel(h),M=A.getModel("itemStyle").getItemStyle(),P=A.get("z2"),I=v0(l,"color");M.fill||(M.fill=I,pe(M.fill)&&(M.fill=fy(M.fill,.4))),M.stroke||(M.stroke=I),f.setItemVisual(h,"style",M),f.setItemVisual(h,"z2",be(P,0))}),f.diff(N_(c).data).add(function(h){var d=f.getItemLayout(h),v=f.getItemVisual(h,"z2");if(!d.allClipped){var g=new wn({z2:be(v,0),shape:{points:d.points}});f.setItemGraphicEl(h,g),c.group.add(g)}}).update(function(h,d){var v=N_(c).data.getItemGraphicEl(d),g=f.getItemLayout(h),m=f.getItemVisual(h,"z2");g.allClipped?v&&c.group.remove(v):(v?lt(v,{z2:be(m,0),shape:{points:g.points}},n,h):v=new wn({shape:{points:g.points}}),f.setItemGraphicEl(h,v),c.group.add(v))}).remove(function(h){var d=N_(c).data.getItemGraphicEl(h);c.group.remove(d)}).execute(),f.eachItemGraphicEl(function(h,d){var v=f.getItemModel(d),g=f.getItemVisual(d,"style");h.useStyle(f.getItemVisual(d,"style")),Ur(h,Nr(v),{labelFetcher:n,labelDataIndex:d,defaultText:f.getName(d)||"",inheritColor:pe(g.fill)?fy(g.fill,1):K.color.neutral99}),Dr(h,v),Wt(h,null,null,v.get(["emphasis","disabled"])),De(h).dataModel=n}),N_(c).data=f,c.group.silent=n.get("silent")||r.get("silent")},t.type="markArea",t}(LR);function JXe(e,t,r){var n,i,a=["x0","y0","x1","y1"];if(e){var o=se(e&&e.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return re(re({},f),{name:u,ordinalMeta:null})});i=se(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new Dn(i,r)}else i=[{name:"value",type:"float"}],n=new Dn(i,r);var s=se(r.get("data"),Fe(qXe,t,e,r));e&&(s=ht(s,Fe(KXe,e)));var l=e?function(u,c,f,h){var d=u.coord[Math.floor(h/2)][h%2];return Kl(d,i[h])}:function(u,c,f,h){return Kl(u.value,i[h])};return n.initData(s,null,l),n.hasItemOption=!0,n}function eqe(e){e.registerComponentModel(XXe),e.registerComponentView(QXe),e.registerPreprocessor(function(t){PR(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var tqe=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"])}},OO=function(e){q(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,i){this.mergeDefaultAndTheme(r,i),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,i=this.ecModel;n===!0&&(n=r.selector=["all","inverse"]),ae(n)&&B(n,function(a,o){pe(a)&&(a={type:a}),n[o]=He(a,tqe(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var r=this._data;if(r[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<r.length;i++){var a=r[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(r[0].get("name"))}},t.prototype._updateData=function(r){var n=[],i=[];r.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var f=l.legendVisualProvider,h=f.getAllNames();r.isSeriesFiltered(l)||(i=i.concat(h)),h.length?n=n.concat(h):c=!0}else c=!0;c&&pN(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=_e(),s=se(a,function(l){return(pe(l)||ot(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new tt(l,this,this.ecModel))},this);this._data=ht(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(r){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;B(a,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(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var r=this._data,n=this.option.selected;B(r,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(r){var n=this.option.selected;return!(n.hasOwnProperty(r)&&!n[r])&&We(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:K.size.m,align:"auto",backgroundColor:K.color.transparent,borderColor:K.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:K.color.disabled,inactiveBorderColor:K.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:K.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:K.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:K.color.tertiary,borderWidth:1,borderColor:K.color.border},emphasis:{selectorLabel:{show:!0,color:K.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Qe),vh=Fe,EO=B,j_=Me,mie=function(e){q(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 j_),this.group.add(this._selectorGroup=new j_),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=jr(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),d=$t(f,c,h),v=this.layoutInner(r,o,d,a,l,u),g=$t(Pe({width:v.width,height:v.height},f),c,h);this.group.x=g.x-v.x,this.group.y=g.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=aie(v,r))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=_e(),f=n.get("selectedMode"),h=n.get("triggerEvent"),d=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&d.push(v.id)}),EO(n.getData(),function(v,g){var m=this,x=v.get("name");if(!this.newlineDisabled&&(x===""||x===`
|
||
`)){var _=new j_;_.newline=!0,u.add(_);return}var b=i.getSeriesByName(x)[0];if(!c.get(x))if(b){var S=b.getData(),T=S.getVisual("legendLineStyle")||{},A=S.getVisual("legendIcon"),M=S.getVisual("style"),P=this._createItem(b,x,g,v,n,r,T,M,A,f,a);P.on("click",vh(Z8,x,null,a,d)).on("mouseover",vh(DO,b.name,null,a,d)).on("mouseout",vh(NO,b.name,null,a,d)),i.ssr&&P.eachChild(function(I){var k=De(I);k.seriesIndex=b.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&P.eachChild(function(I){m.packEventData(I,n,b,g,x)}),c.set(x,!0)}else i.eachRawSeries(function(I){var k=this;if(!c.get(x)&&I.legendVisualProvider){var O=I.legendVisualProvider;if(!O.containName(x))return;var D=O.indexOfName(x),N=O.getItemVisual(D,"style"),j=O.getItemVisual(D,"legendIcon"),z=En(N.fill);z&&z[3]===0&&(z[3]=.2,N=re(re({},N),{fill:sa(z,"rgba")}));var $=this._createItem(I,x,g,v,n,r,{},N,j,f,a);$.on("click",vh(Z8,null,x,a,d)).on("mouseover",vh(DO,null,x,a,d)).on("mouseout",vh(NO,null,x,a,d)),i.ssr&&$.eachChild(function(U){var F=De(U);F.seriesIndex=I.seriesIndex,F.dataIndex=g,F.ssrType="legend"}),h&&$.eachChild(function(U){k.packEventData(U,n,I,g,x)}),c.set(x,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};De(r).eventData=s},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();EO(r,function(u){var c=u.type,f=new at({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);Ur(f,{normal:h,emphasis:d},{defaultText:u.title}),Yl(f)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var d=r.visualDrawType,v=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),x=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var S=rqe(c,a,l,u,d,m,h),T=new j_,A=a.getModel("textStyle");if(Ae(r.getLegendIcon)&&(!b||b==="inherit"))T.add(r.getLegendIcon({itemWidth:v,itemHeight:g,icon:c,iconRotate:x,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:_}));else{var M=b==="inherit"&&r.getData().getVisual("symbol")?x==="inherit"?r.getData().getVisual("symbolRotate"):x:0;T.add(nqe({itemWidth:v,itemHeight:g,icon:c,iconRotate:M,itemStyle:S.itemStyle,symbolKeepAspect:_}))}var P=s==="left"?v+5:-5,I=s,k=o.get("formatter"),O=n;pe(k)&&k?O=k.replace("{name}",n??""):Ae(k)&&(O=k(n));var D=m?A.getTextColor():a.get("inactiveColor");T.add(new at({style:Mt(A,{text:O,x:P,y:g/2,fill:D,align:I,verticalAlign:"middle"},{inheritColor:D})}));var N=new Xe({shape:T.getBoundingRect(),style:{fill:"transparent"}}),j=a.getModel("tooltip");return j.get("show")&&Js({el:N,componentModel:o,itemName:n,itemTooltipOption:j.option}),T.add(N),T.eachChild(function(z){z.silent=!0}),N.silent=!f,this.getContentGroup().add(T),Yl(T),T.__legendDataIndex=i,T},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();zc(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){zc("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],v=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",x=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+v:f[g]+=h[m]+v,d[1-g]+=c[x]/2-h[x]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[m]=c[m]+v+h[m],b[x]=Math.max(c[x],h[x]),b[_]=Math.min(0,h[_]+d[1-g]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Lt);function rqe(e,t,r,n,i,a,o){function s(m,x){m.lineWidth==="auto"&&(m.lineWidth=x.lineWidth>0?2:0),EO(m,function(_,b){m[b]==="inherit"&&(m[b]=x[b])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:ev(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=t.getModel("lineStyle"),d=h.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth=v==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function nqe(e){var t=e.icon||"roundRect",r=xr(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=K.color.neutral00,r.style.lineWidth=2),r}function Z8(e,t,r,n){NO(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),DO(e,t,r,n)}function yie(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function DO(e,t,r,n){yie(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function NO(e,t,r,n){yie(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}function iqe(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 ng(e,t,r){var n=e==="allSelect"||e==="inverseSelect",i={},a=[];r.eachComponent({mainType:"legend",query:t},function(s){n?s[e]():s[e](t.name),Y8(s,i),a.push(s.componentIndex)});var o={};return r.eachComponent("legend",function(s){B(i,function(l,u){s[l?"select":"unSelect"](u)}),Y8(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Y8(e,t){var r=t||{};return B(e.getData(),function(n){var i=n.get("name");if(!(i===`
|
||
`||i==="")){var a=e.isSelected(i);ye(r,i)?r[i]=r[i]&&a:r[i]=a}}),r}function aqe(e){e.registerAction("legendToggleSelect","legendselectchanged",Fe(ng,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Fe(ng,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Fe(ng,"inverseSelect")),e.registerAction("legendSelect","legendselected",Fe(ng,"select")),e.registerAction("legendUnSelect","legendunselected",Fe(ng,"unSelect"))}function xie(e){e.registerComponentModel(OO),e.registerComponentView(mie),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,iqe),e.registerSubTypeDefaulter("legend",function(){return"plain"}),aqe(e)}var oqe=function(e){q(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,i){var a=Af(r);e.prototype.init.call(this,r,n,i),X8(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),X8(this,this.option,r)},t.type="legend.scroll",t.defaultOption=_u(OO.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:K.color.accent50,pageIconInactiveColor:K.color.accent10,pageIconSize:15,pageTextStyle:{color:K.color.tertiary},animationDurationUpdate:800}),t}(OO);function X8(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,Fo(t,r,{type:"box",ignoreSize:!!i})}var q8=Me,KM=["width","height"],QM=["x","y"],sqe=function(e){q(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 q8),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new q8)},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,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var c=this._controllerGroup,f=n.get("pageIconSize",!0),h=ae(f)?f:[f,f];v("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new at({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(g,m){var x=g+"DataIndex",_=Rv(n.get("pageIcons",!0)[n.getOrient().name][m],{onclick:ge(u._pageGo,u,x,n,a)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});_.name=g,c.add(_)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,c=KM[u],f=QM[u],h=KM[1-u],d=QM[1-u];o&&zc("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),g=l.getBoundingRect(),m=[-g.x,-g.y],x=Ce(i);o&&(x[c]=i[c]-g[c]-v);var _=this._layoutContentAndController(r,a,x,u,c,h,d,f);if(o){if(s==="end")m[u]+=_[c]+v;else{var b=g[c]+v;m[u]-=b,_[f]-=b}_[c]+=g[c]+v,m[1-u]+=_[d]+_[h]/2-g[h]/2,_[h]=Math.max(_[h],g[h]),_[d]=Math.min(_[d],g[d]+m[1-u]),l.x=m[0],l.y=m[1],l.markRedraw()}return _},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var c=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;zc(r.get("orient"),c,r.get("itemGap"),a?i.width:null,a?null:i.height),zc("horizontal",h,r.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),v=h.getBoundingRect(),g=this._showController=d[o]>i[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var x=[0,0],_=[-v.x,-v.y],b=be(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var S=r.get("pageButtonPosition",!0);S==="end"?_[a]+=i[o]-v[o]:x[a]+=v[o]+b}_[1-a]+=d[s]/2-v[s]/2,c.setPosition(m),f.setPosition(x),h.setPosition(_);var T={x:0,y:0};if(T[o]=g?i[o]:d[o],T[s]=Math.max(d[s],v[s]),T[l]=Math.min(0,v[l]+_[1-a]),f.__rectSize=i[o],g){var A={x:0,y:0};A[o]=Math.max(i[o]-v[o]-b,0),A[s]=T[s],f.setClipPath(new Xe({shape:A})),f.__rectSize=A[o]}else h.eachChild(function(P){P.attr({invisible:!0,silent:!0})});var M=this._getPageInfo(r);return M.pageIndex!=null&<(c,{x:M.contentPosition[0],y:M.contentPosition[1]},g?r:null),this._updatePageInfoView(r,M),T},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;B(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",pe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=KM[o],l=QM[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return v;var g=S(f);v.contentPosition[o]=-g.s;for(var m=u+1,x=g,_=g,b=null;m<=h;++m)b=S(c[m]),(!b&&_.e>x.s+a||b&&!T(b,x.s))&&(_.i>x.i?x=_:x=b,x&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=x.i),++v.pageCount)),_=b;for(var m=u-1,x=g,_=g,b=null;m>=-1;--m)b=S(c[m]),(!b||!T(_,b.s))&&x.i<_.i&&(_=x,v.pagePrevDataIndex==null&&(v.pagePrevDataIndex=x.i),++v.pageCount,++v.pageIndex),x=b;return v;function S(A){if(A){var M=A.getBoundingRect(),P=M[l]+A[l];return{s:P,e:P+M[s],i:A.__legendDataIndex}}}function T(A,M){return A.e>=M&&A.s<=M+a}},t.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},t.type="legend.scroll",t}(mie);function lqe(e){e.registerAction("legendScroll","legendscroll",function(t,r){var n=t.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function uqe(e){Ze(xie),e.registerComponentModel(oqe),e.registerComponentView(sqe),lqe(e)}function cqe(e){Ze(xie),Ze(uqe)}var fqe=function(e){q(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=_u(jy.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(jy),kR=Je();function hqe(e,t,r){kR(e).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=r)})}function dqe(e,t){for(var r=kR(e).coordSysRecordMap,n=r.keys(),i=0;i<n.length;i++){var a=n[i],o=r.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||_ie(r,o))}}}function _ie(e,t){if(t){e.removeKey(t.model.uid);var r=t.controller;r&&r.dispose()}}function vqe(e,t){var r={model:t,containsPoint:Fe(gqe,t),dispatchAction:Fe(pqe,e),dataZoomInfoMap:null,controller:null},n=r.controller=new Lf(e.getZr());return B(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];r.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,r.model.mainType,r.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&r.dispatchAction(o)})}),r}function pqe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function gqe(e,t,r,n){return e.coordinateSystem.containPoint([r,n])}function mqe(e,t,r){var n,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each(function(s){var l=s.model,u=l.get("disabled",!0)?!1:l.get("zoomLock",!0)?"move":!0;a[i+u]>a[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function yqe(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(t,r){var n=kR(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=_e());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=rie(a);B(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,vqe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=_e());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){_ie(i,a);return}var c=mqe(l,a,r);o.enable(c.controlType,c.opt),Gv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var xqe=function(e){q(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,i){if(e.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),hqe(i,r,{pan:ge(JM.pan,this),zoom:ge(JM.zoom,this),scrollMove:ge(JM.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){dqe(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(wR),JM={zoom:function(e,t,r,n){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=eP[t](null,[n.originX,n.originY],o,r,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ou(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:K8(function(e,t,r,n,i,a){var o=eP[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,r);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:K8(function(e,t,r,n,i,a){var o=eP[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,r);return o.signal*(e[1]-e[0])*a.scrollDelta})};function K8(e){return function(t,r,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,r,n,i);if(ou(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var eP={grid:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim==="x"?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),r.mainType==="radiusAxis"?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function bie(e){SR(e),e.registerComponentModel(fqe),e.registerComponentView(xqe),yqe(e)}var _qe=function(e){q(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=_u(jy.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:K.color.accent10,borderRadius:0,backgroundColor:K.color.transparent,dataBackground:{lineStyle:{color:K.color.accent30,width:.5},areaStyle:{color:K.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:K.color.accent40,width:.5},areaStyle:{color:K.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:K.color.neutral00,borderColor:K.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:K.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:K.color.tertiary},brushSelect:!0,brushStyle:{color:K.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:K.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(jy),ig=Xe,bqe=1,tP=30,wqe=7,ag="horizontal",Q8="vertical",Sqe=5,Tqe=["line","bar","candlestick","scatter"],Aqe={easing:"cubicOut",duration:100,delay:0},Cqe=function(e){q(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=ge(this._onBrush,this),this._onBrushEnd=ge(this._onBrushEnd,this)},t.prototype.render=function(r,n,i,a){if(e.prototype.render.apply(this,arguments),Gv(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){by(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 Me;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?wqe:0,o=jr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===ag?{right:o.width-s.x-s.width,top:o.height-tP-l-a,width:s.width,height:tP}:{right:l,top:s.y,width:tP,height:s.height},c=Af(r.option);B(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=$t(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Q8&&this._size.reverse()},t.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===ag&&!o?{scaleY:l?1:-1,scaleX:1}:i===ag&&o?{scaleY:l?1:-1,scaleX:-1}:i===Q8&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new ig({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new ig({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:ge(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var v=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],x=[],_=g[1]/Math.max(1,o.count()-1),b=n[0]/(f[1]-f[0]),S=r.thisAxis.type==="time",T=-_,A=Math.round(o.count()/n[0]),M;o.each([r.thisDim,l],function(D,N,j){if(A>0&&j%A){S||(T+=_);return}T=S?(+D-f[0])*b:T+_;var z=N==null||isNaN(N)||N==="",$=z?0:gt(N,h,v,!0);z&&!M&&j?(m.push([m[m.length-1][0],0]),x.push([x[x.length-1][0],0])):!z&&M&&(m.push([T,0]),x.push([T,0])),z||(m.push([T,$]),x.push([T,$])),M=z}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=x}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var P=this.dataZoomModel;function I(D){var N=P.getModel(D?"selectedDataBackground":"dataBackground"),j=new Me,z=new wn({shape:{points:u},segmentIgnoreThreshold:1,style:N.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),$=new on({shape:{points:c},segmentIgnoreThreshold:1,style:N.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return j.add(z),j.add($),j}for(var k=0;k<3;k++){var O=I(k===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},t.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();B(l,function(u){if(!i&&!(n!==!0&&We(Tqe,u.get("type"))<0)){var c=a.getComponent(Dl(o),s).axis,f=Mqe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var v=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:v,otherDim:f,otherAxisInverse:h}}},this)},this),i}},t.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new ig({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new ig({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:bqe,fill:K.color.transparent}})),B([0,1],function(b){var S=l.get("handleIcon");!yw[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var T=xr(S,-1,0,2,2,null,!0);T.attr({cursor:Pqe(this._orient),draggable:!0,drift:ge(this._onDragMove,this,b),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1),z2:5});var A=T.getBoundingRect(),M=l.get("handleSize");this._handleHeight=ve(M,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Yl(T);var P=l.get("handleColor");P!=null&&(T.style.fill=P),o.add(i[b]=T);var I=l.getModel("textStyle"),k=l.get("handleLabel")||{},O=k.show||!1;r.add(a[b]=new at({silent:!0,invisible:!O,style:Mt(I,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:I.getTextColor(),font:I.getFont()}),z2:10}))},this);var d=h;if(f){var v=ve(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Xe({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,x=n.moveHandleIcon=xr(l.get("moveHandleIcon"),-m/2,-m/2,m,m,K.color.neutral00,!0);x.silent=!0,x.y=s[1]+v/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new Xe({invisible:!0,shape:{y:s[1]-_,height:v+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(x),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:ge(this._onDragMove,this,"all"),ondragstart:ge(this._showDataInfo,this,!0),ondragend:ge(this._onDragEnd,this),onmouseover:ge(this._showDataInfo,this,!0),onmouseout:ge(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[gt(r[0],[0,100],n,!0),gt(r[1],[0,100],n,!0)]},t.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ou(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?gt(s.minSpan,l,o,!0):null,s.maxSpan!=null?gt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Mi([gt(a[0],o,l,!0),gt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Mi(i.slice()),o=this._size;B([0,1],function(d){var v=n.handles[d],g=this._handleHeight;v.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;c<l.length;c++){var f=l[c],h=f.getClipPath();h||(h=new Xe,f.setClipPath(h)),h.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(r)},t.prototype._updateDataInfo=function(r){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,f=r?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(f[0],u),this._formatLabel(f[1],u)]}}var h=Mi(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(v){var g=Xl(i.handles[v].parent,this.group),m=kT(v===0?"right":"left",g),x=this._handleWidth/2+Sqe,_=Ga([h[v]+(v===0?-x:x),this._size[1]/2],g);a[v].setStyle({x:_[0],y:_[1],verticalAlign:o===ag?"middle":m,align:o===ag?m:"center",text:s[v]})}},t.prototype._formatLabel=function(r,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=r==null||isNaN(r)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(r)}):r.toFixed(Math.min(o,20));return Ae(a)?a(r,s):pe(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(r){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=r||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(r,n,i,a){this._dragging=!0,$s(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Ga([n,i],o,!0),l=this._updateInterval(r,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var r=this.dataZoomModel.get("realtime");!r&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(r){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(r.offsetX,r.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Ie(n,i),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 i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ou(0,l,o,0,u.minSpan!=null?gt(u.minSpan,s,o,!0):null,u.maxSpan!=null?gt(u.maxSpan,s,o,!0):null),this._range=Mi([gt(l[0],o,s,!0),gt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(r){this._brushing&&($s(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},t.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ig({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Aqe:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var r,n=rie(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},t.type="dataZoom.slider",t}(wR);function Mqe(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}function Pqe(e){return e==="vertical"?"ns-resize":"ew-resize"}function wie(e){e.registerComponentModel(_qe),e.registerComponentView(Cqe),SR(e)}function Lqe(e){Ze(bie),Ze(wie)}var Sie={get:function(e,t,r){var n=Ce((kqe[e]||{})[t]);return r&&ae(n)?n[n.length-1]:n}},kqe={color:{active:["#006edd","#e0ffff"],inactive:[K.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]}},J8=Hr.mapVisual,Iqe=Hr.eachVisual,Oqe=ae,eU=B,Eqe=Mi,Dqe=gt,Jw=function(e){q(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,i){this.mergeDefaultAndTheme(r,i)},t.prototype.optionUpdated=function(r,n){var i=this.option;!n&&hie(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(r){var n=this.stateList;r=ge(r,this),this.controllerVisuals=LO(this.option.controller,n,r),this.targetVisuals=LO(this.option.target,n,r)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=Ov(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return se(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(r,n){B(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},t.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},t.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ae(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(pe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(Ae(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var r=this.option,n=Eqe([r.min,r.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);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,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});He(a,i),He(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Oqe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var v=f[h],g=f[d];v&&!g&&(g=f[d]={},eU(v,function(m,x){if(Hr.isValidType(x)){var _=Sie.get(x,"inactive",s);_!=null&&(g[x]=_,x==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";eU(this.stateList,function(x){var _=this.itemSize,b=f[x];b||(b=f[x]={color:s?v:[v]}),b.symbol==null&&(b.symbol=h&&Ce(h)||(s?m:[m])),b.symbolSize==null&&(b.symbolSize=d&&Ce(d)||(s?_[0]:[_[0],_[0]])),b.symbol=J8(b.symbol,function(A){return A==="none"?m:A});var S=b.symbolSize;if(S!=null){var T=-1/0;Iqe(S,function(A){A>T&&(T=A)}),b.symbolSize=J8(S,function(A){return Dqe(A,[0,T],[0,_[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:K.color.transparent,borderColor:K.color.borderTint,contentColor:K.color.theme[0],inactiveColor:K.color.disabled,borderWidth:0,padding:K.size.m,textGap:10,precision:0,textStyle:{color:K.color.secondary}},t}(Qe),tU=[20,140],Nqe=function(e){q(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(i){i.mappingMethod="linear",i.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]=tU[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=tU[1])},t.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ae(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=Mi((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,i=this.getExtent(),a=be(this.option.unboundedRange,!0);return(a&&n[0]<=i[0]||n[0]<=r)&&(a&&n[1]>=i[1]||r<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(r){var n=rU(this,"outOfRange",this.getExtent()),i=rU(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:r(d,v)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var f=1;s<u;s++,f=0)f&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var f=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(f&&(a.length&&o(a[a.length-1].value,"outOfRange"),f=0),o(n[l],"outOfRange"));var h=a.length;return{stops:a,outerColors:[h?a[0].color:"transparent",h?a[h-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=_u(Jw.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:K.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:K.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:K.color.shadow}}),t}(Jw);function rU(e,t,r){if(r[0]===r[1])return r.slice();for(var n=200,i=(r[1]-r[0])/n,a=r[0],o=[],s=0;s<=n&&a<r[1];s++)o.push(a),a+=i;return o.push(r[1]),o}var Tie=function(e){q(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,i,a){if(this.visualMapModel=r,r.get("show")===!1){this.group.removeAll();return}this.doRender(r,n,i,a)},t.prototype.renderBackground=function(r){var n=this.visualMapModel,i=$v(n.get("padding")||0),a=r.getBoundingRect();r.add(new Xe({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},t.prototype.getControllerVisual=function(r,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,v){s[d]=v}var f=o.controllerVisuals[a||o.getValueState(r)],h=Hr.prepareVisualTypes(f);return B(h,function(d){var v=f[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",v=f.__alphaForOpacity),Hr.dependsOn(d,n)&&v&&v.applyVisual(r,u,c)}),s[n]},t.prototype.positionGroup=function(r){var n=this.visualMapModel,i=this.api,a=jr(n,i).refContainer;ET(r,n.getBoxLayoutParams(),a)},t.prototype.doRender=function(r,n,i,a){},t.type="visualMap",t}(Lt),nU=[["left","right","width"],["top","bottom","height"]];function Aie(e,t,r){var n=e.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=n.orient==="horizontal"?1:0,s=nU[o],l=[0,null,10],u={},c=0;c<3;c++)u[nU[1-o][c]]=l[c],u[s[c]]=c===2?r[0]:n[s[c]];var f=[["x","width",3],["y","height",0]][o],h=$t(u,a,n.padding);return s[(h.margin[f[2]]||0)+h[f[0]]+h[f[1]]*.5<a[f[1]]*.5?0:1]}function gb(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 fo=gt,jqe=B,iU=Math.min,rP=Math.max,Rqe=12,Bqe=6,zqe=function(e){q(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=ge(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=ge(this._hideIndicator,this)},t.prototype.doRender=function(r,n,i,a){(!a||a.type!=="selectDataRange"||a.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 i=r.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},t.prototype._renderEndsText=function(r,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),f=this._applyTransform(i===0?"bottom":"top",u),h=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new at({style:Mt(d,{x:c[0],y:c[1],verticalAlign:d.get("verticalAlign")||(h==="horizontal"?"middle":f),align:d.get("align")||(h==="horizontal"?f:"center"),text:a})}))}},t.prototype._renderBar=function(r){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=Aie(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new Me;u.add(c),c.add(i.outOfRange=aU()),c.add(i.inRange=aU(null,s?sU(this._orient):null,ge(this._dragHandle,this,"all",!1),ge(this._dragHandle,this,"all",!0))),c.setClipPath(new Xe({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var f=n.textStyleModel.getTextRect("国"),h=rP(f.width,f.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,h,o),this._createHandle(n,u,1,a,h,o)),this._createIndicator(n,u,a,h,o),r.add(u)},t.prototype._createHandle=function(r,n,i,a,o,s){var l=ge(this._dragHandle,this,i,!1),u=ge(this._dragHandle,this,i,!0),c=Za(r.get("handleSize"),a[0]),f=xr(r.get("handleIcon"),-c/2,-c/2,c,c,null,!0),h=sU(this._orient);f.attr({cursor:h,draggable:!0,drift:l,ondragend:u,onmousemove:function(x){$s(x.event)}}),f.x=a[0]/2,f.useStyle(r.getModel("handleStyle").getItemStyle()),f.setStyle({strokeNoScale:!0,strokeFirst:!0}),f.style.lineWidth*=2,f.ensureState("emphasis").style=r.getModel(["emphasis","handleStyle"]).getItemStyle(),Cc(f,!0),n.add(f);var d=this.visualMapModel.textStyleModel,v=new at({cursor:h,draggable:!0,drift:l,onmousemove:function(x){$s(x.event)},ondragend:u,style:Mt(d,{x:0,y:0,text:""})});v.ensureState("blur").style={opacity:.1},v.stateTransition={duration:200},this.group.add(v);var g=[c,0],m=this._shapes;m.handleThumbs[i]=f,m.handleLabelPoints[i]=g,m.handleLabels[i]=v},t.prototype._createIndicator=function(r,n,i,a,o){var s=Za(r.get("indicatorSize"),i[0]),l=xr(r.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=r.getModel("indicatorStyle").getItemStyle();if(l instanceof Xr){var c=l.style;l.useStyle(re({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var f=this.visualMapModel.textStyleModel,h=new at({silent:!0,invisible:!0,style:Mt(f,{x:0,y:0,text:""})});this.group.add(h);var d=[(o==="horizontal"?a/2:Bqe)+i[0]/2,0],v=this._shapes;v.indicator=l,v.indicatorLabel=h,v.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(r,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],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():oU(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[r],!1)}},t.prototype._resetInterval=function(){var r=this.visualMapModel,n=this._dataInterval=r.getSelected(),i=r.getExtent(),a=[0,r.itemSize[1]];this._handleEnds=[fo(n[0],i,a,!0),fo(n[1],i,a,!0)]},t.prototype._updateInterval=function(r,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];ou(n,a,o,r,0);var s=i.getExtent();this._dataInterval=[fo(a[0],o,s,!0),fo(a[1],o,s,!0)]},t.prototype._updateView=function(r){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=r?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(r,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(r,o),l=[this.getControllerVisual(r[0],"symbolSize",o),this.getControllerVisual(r[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Sf(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(r,n){var i=100,a=[],o=(r[1]-r[0])/i;a.push({color:this.getControllerVisual(r[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=r[0]+o*s;if(l>r[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},t.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new Me(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},t.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);jqe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var d=fo(r[f],[0,l[1]],u,!0),v=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=v/l[0],h.x=l[0]-v/2;var g=Ga(i.handleLabelPoints[f],Xl(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-v)/2:(l[0]-v)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),v=this.getControllerVisual(r,"symbolSize"),g=fo(r,s,u,!0),m=l[0]-v/2,x={x:f.x,y:f.y};f.y=g,f.x=m;var _=Ga(c.indicatorLabelPoint,Xl(f,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var S=this._applyTransform("left",c.mainGroup),T=this._orient,A=T==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:A?S:"middle",align:A?"center":S});var M={x:m,y:g,style:{fill:d}},P={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var I={duration:100,easing:"cubicInOut",additive:!0};f.x=x.x,f.y=x.y,f.animateTo(M,I),b.animateTo(P,I)}else f.attr(M),b.attr(P);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var O=0;O<k.length;O++)this.api.enterBlur(k[O])}},t.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=iU(rP(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[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 i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=iU(rP(o[0],r),o[1]);var l=$qe(i,s,o),u=[r-l,r+l],c=fo(r,o,s,!0),f=[fo(u[0],o,s,!0),fo(u[1],o,s,!0)];u[0]<o[0]&&(f[0]=-1/0),u[1]>o[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||oU(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var v=xRe(h,d);this._dispatchHighDown("downplay",gb(v[0],i)),this._dispatchHighDown("highlight",gb(v[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Pc(r.target,function(l){var u=De(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},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 i=0;i<n.length;i++)this.api.leaveBlur(n[i])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var r=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",gb(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,i,a){var o=Xl(n,a?null:this.group);return ae(r)?Ga(r,o,i):kT(r,o,i)},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}(Tie);function aU(e,t,r,n){return new wn({shape:{points:e},draggable:!!r,cursor:t,drift:r,onmousemove:function(i){$s(i.event)},ondragend:n})}function $qe(e,t,r){var n=Rqe/2,i=e.get("hoverLinkDataSize");return i&&(n=fo(i,t,r,!0)/2),n}function oU(e){var t=e.get("hoverLinkOnHandle");return!!(t??e.get("realtime"))}function sU(e){return e==="vertical"?"ns-resize":"ew-resize"}var Fqe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Vqe=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(r){r.setSelected(e.selected)})},Gqe=[{createOnAllSeries:!0,reset:function(e,t){var r=[];return t.eachComponent("visualMap",function(n){var i=e.pipelineContext;!n.isTargetSeries(e)||i&&i.large||r.push(cXe(n.stateList,n.targetVisuals,ge(n.getValueState,n),n.getDataDimensionIndex(e.getData())))}),r}},{createOnAllSeries:!0,reset:function(e,t){var r=e.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(e)){var a=i.getVisualMeta(ge(Wqe,null,e,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(r);o>=0&&(a.dimension=o,n.push(a))}}),e.getData().setVisual("visualMeta",n)}}];function Wqe(e,t,r,n){for(var i=t.targetVisuals[n],a=Hr.prepareVisualTypes(i),o={color:v0(e.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(r,f,h)}return o.color;function f(d){return o[d]}function h(d,v){o[d]=v}}var lU=B;function Hqe(e){var t=e&&e.visualMap;ae(t)||(t=t?[t]:[]),lU(t,function(r){if(r){ph(r,"splitList")&&!ph(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var n=r.pieces;n&&ae(n)&&lU(n,function(i){Le(i)&&(ph(i,"start")&&!ph(i,"min")&&(i.min=i.start),ph(i,"end")&&!ph(i,"max")&&(i.max=i.end))})}})}function ph(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var uU=!1;function Cie(e){uU||(uU=!0,e.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),e.registerAction(Fqe,Vqe),B(Gqe,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Hqe))}function Mie(e){e.registerComponentModel(Nqe),e.registerComponentView(zqe),Cie(e)}var Uqe=function(e){q(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 i=this._mode=this._determineMode();this._pieceList=[],Zqe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Ce(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=se(this._pieceList,function(l){return l=Ce(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var r=this.option,n={},i=Hr.listVisualTypes(),a=this.isCategory();B(r.pieces,function(s){B(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),B(n,function(s,l){var u=!1;B(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&B(this.stateList,function(c){(r[c]||(r[c]={}))[l]=Sie.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,B(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;B(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!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=Ce(r)},t.prototype.getValueState=function(r){var n=Hr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Hr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.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 i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return B(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=_u(Jw.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}(Jw),Zqe={splitNumber:function(e){var t=this.option,r=Math.min(t.precision,20),n=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;t.precision=r,a=+a.toFixed(r),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),eI(e),B(e,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(e){var t=this.option;B(t.categories,function(r){e.push({text:this.formatValueText(r,!0),value:r})},this),cU(t,e)},pieces:function(e){var t=this.option;B(t.pieces,function(r,n){Le(r)||(r={value:r});var i={text:"",index:n};if(r.label!=null&&(i.text=r.label),r.hasOwnProperty("value")){var a=i.value=r.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],f=0;f<2;f++){for(var h=[["gte","gt","min"],["lte","lt","max"]][f],d=0;d<3&&o[f]==null;d++)o[f]=r[h[d]],s[f]=l[d],c[f]=d===2;o[f]==null&&(o[f]=u[f])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Hr.retrieveVisuals(r),e.push(i)},this),cU(t,e),eI(e),B(e,function(r){var n=r.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function cU(e,t){var r=e.inverse;(e.orient==="vertical"?!r:r)&&t.reverse()}var Yqe=function(e){q(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,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=nn(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),B(l.viewPieceList,function(h){var d=h.piece,v=new Me;v.onclick=ge(this._onItemClick,this,d),this._enableHoverLink(v,h.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(v,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),x=a.get("align")||o;v.add(new at({style:Mt(a,{x:x==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:x,opacity:be(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(v)},this),u&&this._renderEndsText(r,u[1],s,c,o),zc(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},t.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:gb(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return Aie(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new Me,l=this.visualMapModel.textStyleModel;s.add(new at({style:Mt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},t.prototype._getViewData=function(){var r=this.visualMapModel,n=se(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(r,n,i,a){var o=xr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},t.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Ce(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,B(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(Tie);function Pie(e){e.registerComponentModel(Uqe),e.registerComponentView(Yqe),Cie(e)}function Xqe(e){Ze(Mie),Ze(Pie)}var qqe=function(){function e(t){this._thumbnailModel=t}return e.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},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:QQ(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}(),Kqe=function(e){q(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 qqe(this);if(this._target=null,this.ecModel.eachSeries(function(i){NW(i,null)}),this.shouldShow()){var n=this.getTarget();NW(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:K.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:K.color.neutral30,borderColor:K.color.neutral40,opacity:.3},z:10},t}(Qe),Qqe=function(e){q(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,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new kf),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||K.color.neutral00);var l=jr(r,i).refContainer,u=$t(yJ(r,!0),l),c=s.lineWidth||0,f=this._contentRect=sf(u.clone(),c/2,!0,!0),h=new Me;a.add(h),h.setClipPath(new Xe({shape:f.plain()}));var d=this._targetGroup=new Me;h.add(d);var v=u.plain();v.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new Xe({style:s,shape:v,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new Xe({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),hU(r,this)},t.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),hU(this._model,this))},t.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=$t({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),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=da([],r.targetTrans),i=Fa([],this._coordSys.transform,n);this._transThisToTarget=da([],i);var a=r.viewportRect;a?a=a.clone():a=new Oe(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Pe({r:s},a))}},t.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new Lf(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",ge(this._onPan,this)).on("zoom",ge(this._onZoom,this))},t.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=ur([],[r.oldX,r.oldY],n),a=ur([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(fU(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},t.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=ur([],[r.originX,r.originY],n);this._api.dispatchAction(fU(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[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}(Lt);function fU(e,t){var r=e.mainType==="series"?e.subType+"Roam":e.mainType+"Roam",n={type:r};return n[e.mainType+"Id"]=e.id,re(n,t),n}function hU(e,t){var r=lf(e);IT(t.group,r.z,r.zlevel)}function Jqe(e){e.registerComponentModel(Kqe),e.registerComponentView(Qqe)}var eKe={label:{enabled:!0},decal:{show:!1}},dU=Je(),tKe={};function rKe(e,t){var r=e.getModel("aria");if(!r.get("enabled"))return;var n=Ce(eKe);He(n.label,e.getLocaleModel().get("aria"),!1),He(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=_e();e.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),dU(h).scope=d}}),e.eachRawSeries(function(h){if(e.isSeriesFiltered(h))return;if(Ae(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var _=bI(h.ecModel,h.name,tKe,e.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",S(b,_))}else{var v=h.getRawData(),g={},m=dU(h).scope;d.each(function(T){var A=d.getRawIndex(T);g[A]=T});var x=v.count();v.each(function(T){var A=g[T],M=v.getName(T)||T+"",P=bI(h.ecModel,M,m,x),I=d.getItemVisual(A,"decal");d.setItemVisual(A,"decal",S(I,P))})}function S(T,A){var M=T?re(re({},A),T):A;return M.dirty=!0,M}})}}function a(){var u=t.getZr().dom;if(u){var c=e.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Pe(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=e.getSeriesCount(),d=f.get(["data","maxCount"])||10,v=f.get(["series","maxCount"])||10,g=Math.min(h,v),m;if(!(h<1)){var x=s();if(x){var _=f.get(["general","withTitle"]);m=o(_,{title:x})}else m=f.get(["general","withoutTitle"]);var b=[],S=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(S,{seriesCount:h}),e.eachSeries(function(P,I){if(I<g){var k=void 0,O=P.get("name"),D=O?"withName":"withoutName";k=h>1?f.get(["series","multiple",D]):f.get(["series","single",D]),k=o(k,{seriesId:P.seriesIndex,seriesName:P.get("name"),seriesType:l(P.subType)});var N=P.getData();if(N.count()>d){var j=f.get(["data","partialData"]);k+=o(j,{displayCnt:d})}else k+=f.get(["data","allData"]);for(var z=f.get(["data","separator","middle"]),$=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),F=[],V=0;V<N.count();V++)if(V<d){var W=N.getName(V),Y=U?ht(N.getValues(V),function(J,ne){return We(U,ne)===-1}):N.getValues(V),Z=f.get(["data",W?"withName":"withoutName"]);F.push(o(Z,{name:W,value:Y.join(z)}))}k+=F.join(z)+$,b.push(k)}});var T=f.getModel(["series","multiple","separator"]),A=T.get("middle"),M=T.get("end");m+=b.join(A)+M,u.setAttribute("aria-label",m)}}}}function o(u,c){if(!pe(u))return u;var f=u;return B(c,function(h,d){f=f.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),h)}),f}function s(){var u=e.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=e.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function nKe(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 iKe(e){e.registerPreprocessor(nKe),e.registerVisual(e.PRIORITY.VISUAL.ARIA,rKe)}var vU={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},aKe=function(){function e(t){var r=this._condVal=pe(t)?new RegExp(t):wK(t)?t:null;if(r==null){var n="";mt(n)}}return e.prototype.evaluate=function(t){var r=typeof t;return pe(r)?this._condVal.test(t):ot(r)?this._condVal.test(t+""):!1},e}(),oKe=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),sKe=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}(),lKe=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}(),uKe=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),cKe=function(){function e(){}return e.prototype.evaluate=function(){for(var t=!!this.valueParser,r=this.getValue,n=r(this.valueGetterParam),i=t?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(t?i:n))return!1;return!0},e}();function IR(e,t){if(e===!0||e===!1){var r=new oKe;return r.value=e,r}var n="";return Lie(e)||mt(n),e.and?pU("and",e,t):e.or?pU("or",e,t):e.not?fKe(e,t):hKe(e,t)}function pU(e,t,r){var n=t[e],i="";ae(n)||mt(i),n.length||mt(i);var a=e==="and"?new sKe:new lKe;return a.children=se(n,function(o){return IR(o,r)}),a.children.length||mt(i),a}function fKe(e,t){var r=e.not,n="";Lie(r)||mt(n);var i=new uKe;return i.child=IR(r,t),i.child||mt(n),i}function hKe(e,t){for(var r="",n=t.prepareGetValue(e),i=[],a=it(e),o=e.parser,s=o?$J(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var c=ye(vU,u)?vU[u]:u,f=e[u],h=s?s(f):f,d=O3e(c,h)||c==="reg"&&new aKe(h);d||mt(r),i.push(d)}}i.length||mt(r);var v=new cKe;return v.valueGetterParam=n,v.valueParser=s,v.getValue=t.getValue,v.subCondList=i,v}function Lie(e){return Le(e)&&!xn(e)}var dKe=function(){function e(t,r){this._cond=IR(t,r)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();function vKe(e,t){return new dKe(e,t)}var pKe={type:"echarts:filter",transform:function(e){for(var t=e.upstream,r,n=vKe(e.config,{valueGetterAttrMap:_e({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ye(s,"dimension")||mt(l);var c=t.getDimensionInfo(u);return c||mt(l),{dimIdx:c.index}},getValue:function(s){return t.retrieveValueFromItem(r,s.dimIdx)}}),i=[],a=0,o=t.count();a<o;a++)r=t.getRawDataItem(a),n.evaluate()&&i.push(r);return{data:i}}},gKe={type:"echarts:sort",transform:function(e){var t=e.upstream,r=e.config,n="",i=Pt(r);i.length||mt(n);var a=[];B(i,function(c){var f=c.dimension,h=c.order,d=c.parser,v=c.incomparable;if(f==null&&mt(n),h!=="asc"&&h!=="desc"&&mt(n),v&&v!=="min"&&v!=="max"){var g="";mt(g)}if(h!=="asc"&&h!=="desc"){var m="";mt(m)}var x=t.getDimensionInfo(f);x||mt(n);var _=d?$J(d):null;d&&!_&&mt(n),a.push({dimIdx:x.index,parser:_,comparator:new VJ(h,v)})});var o=t.sourceFormat;o!==sn&&o!==ji&&mt(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(c,f){for(var h=0;h<a.length;h++){var d=a[h],v=t.retrieveValueFromItem(c,d.dimIdx),g=t.retrieveValueFromItem(f,d.dimIdx);d.parser&&(v=d.parser(v),g=d.parser(g));var m=d.comparator.evaluate(v,g);if(m!==0)return m}return 0}),{data:s}}};function mKe(e){e.registerTransform(pKe),e.registerTransform(gKe)}var yKe=function(e){q(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,i){e.prototype.init.call(this,r,n,i),this._sourceManager=new UJ(this),ZV(this)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),ZV(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Wa},t}(Qe),xKe=function(e){q(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type="dataset",r}return t.type="dataset",t}(Lt);function _Ke(e){e.registerComponentModel(yKe),e.registerComponentView(xKe)}var uo=$o.CMD;function Uh(e,t){return Math.abs(e-t)<1e-5}function jO(e){var t=e.data,r=e.len(),n=[],i,a=0,o=0,s=0,l=0;function u(N,j){i&&i.length>2&&n.push(i),i=[N,j]}function c(N,j,z,$){Uh(N,z)&&Uh(j,$)||i.push(N,j,z,$,z,$)}function f(N,j,z,$,U,F){var V=Math.abs(j-N),W=Math.tan(V/4)*4/3,Y=j<N?-1:1,Z=Math.cos(N),J=Math.sin(N),ne=Math.cos(j),le=Math.sin(j),fe=Z*U+z,ze=J*F+$,xe=ne*U+z,ie=le*F+$,he=U*W*Y,ue=F*W*Y;i.push(fe-he*J,ze+ue*Z,xe+he*le,ie-ue*ne,xe,ie)}for(var h,d,v,g,m=0;m<r;){var x=t[m++],_=m===1;switch(_&&(a=t[m],o=t[m+1],s=a,l=o,(x===uo.L||x===uo.C||x===uo.Q)&&(i=[s,l])),x){case uo.M:a=s=t[m++],o=l=t[m++],u(s,l);break;case uo.L:h=t[m++],d=t[m++],c(a,o,h,d),a=h,o=d;break;case uo.C:i.push(t[m++],t[m++],t[m++],t[m++],a=t[m++],o=t[m++]);break;case uo.Q:h=t[m++],d=t[m++],v=t[m++],g=t[m++],i.push(a+2/3*(h-a),o+2/3*(d-o),v+2/3*(h-v),g+2/3*(d-g),v,g),a=v,o=g;break;case uo.A:var b=t[m++],S=t[m++],T=t[m++],A=t[m++],M=t[m++],P=t[m++]+M;m+=1;var I=!t[m++];h=Math.cos(M)*T+b,d=Math.sin(M)*A+S,_?(s=h,l=d,u(s,l)):c(a,o,h,d),a=Math.cos(P)*T+b,o=Math.sin(P)*A+S;for(var k=(I?-1:1)*Math.PI/2,O=M;I?O>P:O<P;O+=k){var D=I?Math.max(O+k,P):Math.min(O+k,P);f(O,D,b,S,T,A)}break;case uo.R:s=a=t[m++],l=o=t[m++],h=s+t[m++],d=l+t[m++],u(h,l),c(h,l,h,d),c(h,d,s,d),c(s,d,s,l),c(s,l,h,l);break;case uo.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function RO(e,t,r,n,i,a,o,s,l,u){if(Uh(e,r)&&Uh(t,n)&&Uh(i,o)&&Uh(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-e,d=s-t,v=Math.sqrt(h*h+d*d);h/=v,d/=v;var g=r-e,m=n-t,x=i-o,_=a-s,b=g*g+m*m,S=x*x+_*_;if(b<f&&S<f){l.push(o,s);return}var T=h*g+d*m,A=-h*x-d*_,M=b-T*T,P=S-A*A;if(M<f&&T>=0&&P<f&&A>=0){l.push(o,s);return}var I=[],k=[];nu(e,r,i,o,.5,I),nu(t,n,a,s,.5,k),RO(I[0],k[0],I[1],k[1],I[2],k[2],I[3],k[3],l,u),RO(I[4],k[4],I[5],k[5],I[6],k[6],I[7],k[7],l,u)}function bKe(e,t){var r=jO(e),n=[];t=t||1;for(var i=0;i<r.length;i++){var a=r[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],f=a[u++],h=a[u++],d=a[u++],v=a[u++],g=a[u++];RO(s,l,c,f,h,d,v,g,o,t),s=v,l=g}n.push(o)}return n}function kie(e,t,r){var n=e[t],i=e[1-t],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,f=r-c;if(f>0)for(var u=0;u<f;u++)l[u%o]+=1;return l}function gU(e,t,r){for(var n=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),f=kie([l,u],c?0:1,t),h=(c?s:u)/f.length,d=0;d<f.length;d++)for(var v=(c?u:s)/f[d],g=0;g<f[d];g++){var m={};c?(m.startAngle=a+h*d,m.endAngle=a+h*(d+1),m.r0=n+v*g,m.r=n+v*(g+1)):(m.startAngle=a+v*g,m.endAngle=a+v*(g+1),m.r0=n+h*d,m.r=n+h*(d+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,r.push(m)}}function wKe(e,t,r){for(var n=e.width,i=e.height,a=n>i,o=kie([n,i],a?0:1,t),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=e[s]/o.length,h=0;h<o.length;h++)for(var d=e[l]/o[h],v=0;v<o[h];v++){var g={};g[u]=h*f,g[c]=v*d,g[s]=f,g[l]=d,g.x+=e.x,g.y+=e.y,r.push(g)}}function mU(e,t,r,n){return e*n-r*t}function SKe(e,t,r,n,i,a,o,s){var l=r-e,u=n-t,c=o-i,f=s-a,h=mU(c,f,l,u);if(Math.abs(h)<1e-6)return null;var d=e-i,v=t-a,g=mU(d,v,c,f)/h;return g<0||g>1?null:new Ie(g*l+e,g*u+t)}function TKe(e,t,r){var n=new Ie;Ie.sub(n,r,t),n.normalize();var i=new Ie;Ie.sub(i,e,t);var a=i.dot(n);return a}function gh(e,t){var r=e[e.length-1];r&&r[0]===t[0]&&r[1]===t[1]||e.push(t)}function AKe(e,t,r){for(var n=e.length,i=[],a=0;a<n;a++){var o=e[a],s=e[(a+1)%n],l=SKe(o[0],o[1],s[0],s[1],t.x,t.y,r.x,r.y);l&&i.push({projPt:TKe(l,t,r),pt:l,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(m,x){return m.projPt-x.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var f=u;u=c,c=f}for(var h=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],v=[h],g=[d],a=u.idx+1;a<=c.idx;a++)gh(v,e[a].slice());gh(v,d),gh(v,h);for(var a=c.idx+1;a<=u.idx+n;a++)gh(g,e[a%n].slice());return gh(g,h),gh(g,d),[{points:v},{points:g}]}function yU(e){var t=e.points,r=[],n=[];AT(t,r,n);var i=new Oe(r[0],r[1],n[0]-r[0],n[1]-r[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new Ie,c=new Ie;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),AKe(t,u,c)}function eS(e,t,r,n){if(r===1)n.push(t);else{var i=Math.floor(r/2),a=e(t);eS(e,a[0],i,n),eS(e,a[1],r-i,n)}return n}function CKe(e,t){for(var r=[],n=0;n<t;n++)r.push(CN(e));return r}function MKe(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function PKe(e){for(var t=[],r=0;r<e.length;)t.push([e[r++],e[r++]]);return t}function LKe(e,t){var r=[],n=e.shape,i;switch(e.type){case"rect":wKe(n,t,r),i=Xe;break;case"sector":gU(n,t,r),i=bn;break;case"circle":gU({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},t,r),i=bn;break;default:var a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=se(bKe(e.getUpdatedPathProxy(),o),function(x){return PKe(x)}),l=s.length;if(l===0)eS(yU,{points:s[0]},t,r);else if(l===t)for(var u=0;u<l;u++)r.push({points:s[u]});else{var c=0,f=se(s,function(x){var _=[],b=[];AT(x,_,b);var S=(b[1]-_[1])*(b[0]-_[0]);return c+=S,{poly:x,area:S}});f.sort(function(x,_){return _.area-x.area});for(var h=t,u=0;u<l;u++){var d=f[u];if(h<=0)break;var v=u===l-1?h:Math.ceil(d.area/c*t);v<0||(eS(yU,{points:d.poly},v,r),h-=v)}}i=wn;break}if(!i)return CKe(e,t);for(var g=[],u=0;u<r.length;u++){var m=new i;m.setShape(r[u]),MKe(e,m),g.push(m)}return g}function kKe(e,t){var r=e.length,n=t.length;if(r===n)return[e,t];for(var i=[],a=[],o=r<n?e:t,s=Math.min(r,n),l=Math.abs(n-r)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,f=[o[0],o[1]],h=l,d=2;d<s;){var v=o[d-2],g=o[d-1],m=o[d++],x=o[d++],_=o[d++],b=o[d++],S=o[d++],T=o[d++];if(h<=0){f.push(m,x,_,b,S,T);continue}for(var A=Math.min(h,c-1)+1,M=1;M<=A;M++){var P=M/A;nu(v,m,_,S,P,i),nu(g,x,b,T,P,a),v=i[3],g=a[3],f.push(i[1],a[1],i[2],a[2],v,g),m=i[5],x=a[5],_=i[6],b=a[6]}h-=A-1}return o===e?[f,t]:[e,f]}function xU(e,t){for(var r=e.length,n=e[r-2],i=e[r-1],a=[],o=0;o<t.length;)a[o++]=n,a[o++]=i;return a}function IKe(e,t){for(var r,n,i,a=[],o=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,f=void 0;l?u?(r=kKe(l,u),c=r[0],f=r[1],n=c,i=f):(f=xU(i||l,l),c=l):(c=xU(n||u,u),f=u),a.push(c),o.push(f)}return[a,o]}function _U(e){for(var t=0,r=0,n=0,i=e.length,a=0,o=i-2;a<i;o=a,a+=2){var s=e[o],l=e[o+1],u=e[a],c=e[a+1],f=s*c-u*l;t+=f,r+=(s+u)*f,n+=(l+c)*f}return t===0?[e[0]||0,e[1]||0]:[r/t/3,n/t/3,t]}function OKe(e,t,r,n){for(var i=(e.length-2)/6,a=1/0,o=0,s=e.length,l=s-2,u=0;u<i;u++){for(var c=u*6,f=0,h=0;h<s;h+=2){var d=h===0?c:(c+h-2)%l+2,v=e[d]-r[0],g=e[d+1]-r[1],m=t[h]-n[0],x=t[h+1]-n[1],_=m-v,b=x-g;f+=_*_+b*b}f<a&&(a=f,o=u)}return o}function EKe(e){for(var t=[],r=e.length,n=0;n<r;n+=2)t[n]=e[r-n-2],t[n+1]=e[r-n-1];return t}function DKe(e,t,r,n){for(var i=[],a,o=0;o<e.length;o++){var s=e[o],l=t[o],u=_U(s),c=_U(l);a==null&&(a=u[2]<0!=c[2]<0);var f=[],h=[],d=0,v=1/0,g=[],m=s.length;a&&(s=EKe(s));for(var x=OKe(s,l,u,c)*6,_=m-2,b=0;b<_;b+=2){var S=(x+b)%_+2;f[b+2]=s[S]-u[0],f[b+3]=s[S+1]-u[1]}f[0]=s[x]-u[0],f[1]=s[x+1]-u[1];for(var T=n/r,A=-n/2;A<=n/2;A+=T){for(var M=Math.sin(A),P=Math.cos(A),I=0,b=0;b<s.length;b+=2){var k=f[b],O=f[b+1],D=l[b]-c[0],N=l[b+1]-c[1],j=D*P-N*M,z=D*M+N*P;g[b]=j,g[b+1]=z;var $=j-k,U=z-O;I+=$*$+U*U}if(I<v){v=I,d=A;for(var F=0;F<g.length;F++)h[F]=g[F]}}i.push({from:f,to:h,fromCp:u,toCp:c,rotation:-d})}return i}function tS(e){return e.__isCombineMorphing}var Iie="__mOriginal_";function rS(e,t,r){var n=Iie+t,i=e[n]||e[t];e[n]||(e[n]=e[t]);var a=r.replace,o=r.after,s=r.before;e[t]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function em(e,t){var r=Iie+t;e[r]&&(e[t]=e[r],e[r]=null)}function bU(e,t){for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=t[0]*a+t[2]*o+t[4],n[i++]=t[1]*a+t[3]*o+t[5]}}function Oie(e,t){var r=e.getUpdatedPathProxy(),n=t.getUpdatedPathProxy(),i=IKe(jO(r),jO(n)),a=i[0],o=i[1],s=e.getComputedTransform(),l=t.getComputedTransform();function u(){this.transform=null}s&&bU(a,s),l&&bU(o,l),rS(t,"updateTransform",{replace:u}),t.transform=null;var c=DKe(a,o,10,Math.PI),f=[];rS(t,"buildPath",{replace:function(h){for(var d=t.__morphT,v=1-d,g=[],m=0;m<c.length;m++){var x=c[m],_=x.from,b=x.to,S=x.rotation*d,T=x.fromCp,A=x.toCp,M=Math.sin(S),P=Math.cos(S);Vg(g,T,A,d);for(var I=0;I<_.length;I+=2){var k=_[I],O=_[I+1],D=b[I],N=b[I+1],j=k*v+D*d,z=O*v+N*d;f[I]=j*P-z*M+g[0],f[I+1]=j*M+z*P+g[1]}var $=f[0],U=f[1];h.moveTo($,U);for(var I=2;I<_.length;){var D=f[I++],N=f[I++],F=f[I++],V=f[I++],W=f[I++],Y=f[I++];$===D&&U===N&&F===W&&V===Y?h.lineTo(W,Y):h.bezierCurveTo(D,N,F,V,W,Y),$=W,U=Y}}}})}function OR(e,t,r){if(!e||!t)return t;var n=r.done,i=r.during;Oie(e,t),t.__morphT=0;function a(){em(t,"buildPath"),em(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},Pe({during:function(o){t.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},r)),t}function NKe(e,t,r,n,i,a){var o=16;e=i===r?0:Math.round(32767*(e-r)/(i-r)),t=a===n?0:Math.round(32767*(t-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,f=0;(e&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(e=u-1-e,t=u-1-t),l=e,e=t,t=l)}return s}function nS(e){var t=1/0,r=1/0,n=-1/0,i=-1/0,a=se(e,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=se(a,function(s,l){return{cp:s,z:NKe(s[0],s[1],t,r,n,i),path:e[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function Eie(e){return LKe(e.path,e.count)}function BO(){return{fromIndividuals:[],toIndividuals:[],count:0}}function jKe(e,t,r){var n=[];function i(T){for(var A=0;A<T.length;A++){var M=T[A];tS(M)?i(M.childrenRef()):M instanceof rt&&n.push(M)}}i(e);var a=n.length;if(!a)return BO();var o=r.dividePath||Eie,s=o({path:t,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),BO();n=nS(n),s=nS(s);for(var l=r.done,u=r.during,c=r.individualDelay,f=new ys,h=0;h<a;h++){var d=n[h],v=s[h];v.parent=t,v.copyTransform(f),c||Oie(d,v)}t.__isCombineMorphing=!0,t.childrenRef=function(){return s};function g(T){for(var A=0;A<s.length;A++)s[A].addSelfToZr(T)}rS(t,"addSelfToZr",{after:function(T){g(T)}}),rS(t,"removeSelfFromZr",{after:function(T){for(var A=0;A<s.length;A++)s[A].removeSelfFromZr(T)}});function m(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,em(t,"addSelfToZr"),em(t,"removeSelfFromZr")}var x=s.length;if(c)for(var _=x,b=function(){_--,_===0&&(m(),l&&l())},h=0;h<x;h++){var S=c?Pe({delay:(r.delay||0)+c(h,x,n[h],s[h]),done:b},r):r;OR(n[h],s[h],S)}else t.__morphT=0,t.animateTo({__morphT:1},Pe({during:function(T){for(var A=0;A<x;A++){var M=s[A];M.__morphT=t.__morphT,M.dirtyShape()}u&&u(T)},done:function(){m();for(var T=0;T<e.length;T++)em(e[T],"updateTransform");l&&l()}},r));return t.__zr&&g(t.__zr),{fromIndividuals:n,toIndividuals:s,count:x}}function RKe(e,t,r){var n=t.length,i=[],a=r.dividePath||Eie;function o(d){for(var v=0;v<d.length;v++){var g=d[v];tS(g)?o(g.childrenRef()):g instanceof rt&&i.push(g)}}if(tS(e)){o(e.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(CN(i[l++%s]));i.length=n}else{i=a({path:e,count:n});for(var c=e.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),BO()}i=nS(i),t=nS(t);for(var f=r.individualDelay,u=0;u<n;u++){var h=f?Pe({delay:(r.delay||0)+f(u,n,i[u],t[u])},r):r;OR(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function wU(e){return ae(e[0])}function SU(e,t){for(var r=[],n=e.length,i=0;i<n;i++)r.push({one:e[i],many:[]});for(var i=0;i<t.length;i++){var a=t[i].length,o=void 0;for(o=0;o<a;o++)r[o%n].many.push(t[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var BKe={clone:function(e){for(var t=[],r=1-Math.pow(1-e.path.style.opacity,1/e.count),n=0;n<e.count;n++){var i=CN(e.path);i.setStyle("opacity",r),t.push(i)}return t},split:null};function nP(e,t,r,n,i,a){if(!e.length||!t.length)return;var o=jv("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;wU(e)&&(u=e,c=t),wU(t)&&(u=t,c=e);function f(x,_,b,S,T){var A=x.many,M=x.one;if(A.length===1&&!T){var P=_?A[0]:M,I=_?M:A[0];if(tS(P))f({many:[P],one:I},!0,b,S,!0);else{var k=s?Pe({delay:s(b,S)},l):l;OR(P,I,k),a(P,I,P,I,k)}}else for(var O=Pe({dividePath:BKe[r],individualDelay:s&&function(U,F,V,W){return s(U+b,S)}},l),D=_?jKe(A,M,O):RKe(M,A,O),N=D.fromIndividuals,j=D.toIndividuals,z=N.length,$=0;$<z;$++){var k=s?Pe({delay:s($,z)},l):l;a(N[$],j[$],_?A[$]:x.one,_?x.one:A[$],k)}}for(var h=u?u===e:e.length>t.length,d=u?SU(c,u):SU(h?t:e,[h?e:t]),v=0,g=0;g<d.length;g++)v+=d[g].many.length;for(var m=0,g=0;g<d.length;g++)f(d[g],h,m,v),m+=d[g].many.length}function fc(e){if(!e)return[];if(ae(e)){for(var t=[],r=0;r<e.length;r++)t.push(fc(e[r]));return t}var n=[];return e.traverse(function(i){i instanceof rt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var Die=1e4,zKe=0,TU=1,AU=2,$Ke=Je();function FKe(e,t){for(var r=e.dimensions,n=0;n<r.length;n++){var i=e.getDimensionInfo(r[n]);if(i&&i.otherDims[t]===0)return r[n]}}function VKe(e,t,r){var n=e.getDimensionInfo(r),i=n&&n.ordinalMeta;if(n){var a=e.get(n.name,t);return i&&i.categories[a]||a+""}}function CU(e,t,r,n){var i=n?"itemChildGroupId":"itemGroupId",a=FKe(e,i);if(a){var o=VKe(e,t,a);return o}var s=e.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return r||e.getId(t)}function MU(e){var t=[];return B(e,function(r){var n=r.data,i=r.dataGroupId;if(!(n.count()>Die))for(var a=n.getIndices(),o=0;o<a.length;o++)t.push({data:n,groupId:CU(n,o,i,!1),childGroupId:CU(n,o,i,!0),divide:r.divide,dataIndex:o})}),t}function iP(e,t,r){e.traverse(function(n){n instanceof rt&&Nt(n,{style:{opacity:0}},t,{dataIndex:r,isFrom:!0})})}function aP(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function mh(e){e.stopAnimation(),e.isGroup&&e.traverse(function(t){t.stopAnimation()})}function GKe(e,t,r){var n=jv("update",r,t);n&&e.traverse(function(i){if(i instanceof va){var a=oBe(i);a&&i.animateFrom({style:a},n)}})}function WKe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++){var i=e[n],a=t[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function Nie(e,t,r){var n=MU(e),i=MU(t);function a(b,S,T,A,M){(T||b)&&S.animateFrom({style:T&&T!==b?re(re({},T.style),b.style):b.style},M)}var o=!1,s=zKe,l=_e(),u=_e();n.forEach(function(b){b.groupId&&l.set(b.groupId,!0),b.childGroupId&&u.set(b.childGroupId,!0)});for(var c=0;c<i.length;c++){var f=i[c].groupId;if(u.get(f)){s=TU;break}var h=i[c].childGroupId;if(h&&l.get(h)){s=AU;break}}function d(b,S){return function(T){var A=T.data,M=T.dataIndex;return S?A.getId(M):b?s===TU?T.childGroupId:T.groupId:s===AU?T.childGroupId:T.groupId}}var v=WKe(n,i),g={};if(!v)for(var c=0;c<i.length;c++){var m=i[c],x=m.data.getItemGraphicEl(m.dataIndex);x&&(g[x.id]=!0)}function _(b,S){var T=n[S],A=i[b],M=A.data.hostModel,P=T.data.getItemGraphicEl(T.dataIndex),I=A.data.getItemGraphicEl(A.dataIndex);if(P===I){I&&GKe(I,A.dataIndex,M);return}P&&g[P.id]||I&&(mh(I),P?(mh(P),aP(P),o=!0,nP(fc(P),fc(I),A.divide,M,b,a)):iP(I,M,b))}new Gs(n,i,d(!0,v),d(!1,v),null,"multiple").update(_).updateManyToOne(function(b,S){var T=i[b],A=T.data,M=A.hostModel,P=A.getItemGraphicEl(T.dataIndex),I=ht(se(S,function(k){return n[k].data.getItemGraphicEl(n[k].dataIndex)}),function(k){return k&&k!==P&&!g[k.id]});P&&(mh(P),I.length?(B(I,function(k){mh(k),aP(k)}),o=!0,nP(fc(I),fc(P),T.divide,M,b,a)):iP(P,M,T.dataIndex))}).updateOneToMany(function(b,S){var T=n[S],A=T.data.getItemGraphicEl(T.dataIndex);if(!(A&&g[A.id])){var M=ht(se(b,function(I){return i[I].data.getItemGraphicEl(i[I].dataIndex)}),function(I){return I&&I!==A}),P=i[b[0]].data.hostModel;M.length&&(B(M,function(I){return mh(I)}),A?(mh(A),aP(A),o=!0,nP(fc(A),fc(M),T.divide,P,b[0],a)):B(M,function(I){return iP(I,P,b[0])}))}}).updateManyToMany(function(b,S){new Gs(S,b,function(T){return n[T].data.getId(n[T].dataIndex)},function(T){return i[T].data.getId(i[T].dataIndex)}).update(function(T,A){_(b[T],S[A])}).execute()}).execute(),o&&B(t,function(b){var S=b.data,T=S.hostModel,A=T&&r.getViewOfSeriesModel(T),M=jv("update",T,0);A&&T.isAnimationEnabled()&&M&&M.duration>0&&A.group.traverse(function(P){P instanceof rt&&!P.animators.length&&P.animateFrom({style:{opacity:0}},M)})})}function PU(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function LU(e){return ae(e)?e.sort().join(","):e}function _l(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function HKe(e,t){var r=_e(),n=_e(),i=_e();return B(e.oldSeries,function(a,o){var s=e.oldDataGroupIds[o],l=e.oldData[o],u=PU(a),c=LU(u);n.set(c,{dataGroupId:s,data:l}),ae(u)&&B(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),B(t.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=PU(a),u=LU(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:_l(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:_l(s),data:s}]});else if(ae(l)){var f=[];B(l,function(v){var g=n.get(v);g.data&&f.push({dataGroupId:g.dataGroupId,divide:_l(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:_l(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:_l(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:_l(s)})}}}}),r}function kU(e,t){for(var r=0;r<e.length;r++){var n=t.seriesIndex!=null&&t.seriesIndex===e[r].seriesIndex||t.seriesId!=null&&t.seriesId===e[r].id;if(n)return r}}function UKe(e,t,r,n){var i=[],a=[];B(Pt(e.from),function(o){var s=kU(t.oldSeries,o);s>=0&&i.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:_l(t.oldData[s]),groupIdDim:o.dimension})}),B(Pt(e.to),function(o){var s=kU(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:_l(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&Nie(i,a,n)}function ZKe(e){e.registerUpdateLifecycle("series:beforeupdate",function(t,r,n){B(Pt(n.seriesTransition),function(i){B(Pt(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][ub]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(t,r,n){var i=$Ke(r);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)B(Pt(a),function(d){UKe(d,i,n,r)});else{var o=HKe(i,n);B(o.keys(),function(d){var v=o.get(d);Nie(v.oldSeries,v.newSeries,r)})}B(n.updatedSeries,function(d){d[ub]&&(d[ub]=!1)})}for(var s=t.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],f=0;f<s.length;f++){var h=s[f].getData();h.count()<Die&&(l.push(s[f]),u.push(s[f].get("dataGroupId")),c.push(h))}})}var YKe=function(){function e(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return e.prototype.setBreaks=function(t){this.breaks=t.breaks},e.prototype.update=function(t){qKe(this,t);var r=this._elapsedExtent;r[0]=this.elapse(t[0]),r[1]=this.elapse(t[1])},e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(t,r){for(var n=0;n<this.breaks.length;n++){var i=this.breaks[n];if(i.vmin<t&&t<i.vmax){var a=r(t,i.vmax);return a}}return 0},e.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},e.prototype.normalize=function(t){var r=this._elapsedExtent[1]-this._elapsedExtent[0];return r===0?.5:(this.elapse(t)-this._elapsedExtent[0])/r},e.prototype.scale=function(t){return this.unelapse(t*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},e.prototype.elapse=function(t){for(var r=IU,n=OU,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(t<=o.vmax){t>o.vmin?r+=o.vmin-n+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=t-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=t-n),r},e.prototype.unelapse=function(t){for(var r=IU,n=OU,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],l=r+s.vmin-n,u=l+s.gapReal;if(t<=u){t>l?a=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):a=n+t-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+t-r),a},e}();function XKe(){return new YKe}var IU=0,OU=0;function qKe(e,t){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};B(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=ER(s,t);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=h,a[d][l.type].inExtFrac=h/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(t[1]-t[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));B(e.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function KKe(e,t,r,n,i,a){e!=="no"&&B(r,function(o){var s=ER(o,a);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=n(u),f=i*3/4;c>s.vmin-f&&c<s.vmax+f&&(e!=="preserve_extent_bound"||c!==a[0]&&c!==a[1])&&t.splice(l,1)}})}function QKe(e,t,r,n){B(t,function(i){var a=ER(i,r);a&&(e.push({value:a.vmin,break:{type:"vmin",parsedBreak:a},time:n?n(a):void 0}),e.push({value:a.vmax,break:{type:"vmax",parsedBreak:a},time:n?n(a):void 0}))}),t.length&&e.sort(function(i,a){return i.value-a.value})}function ER(e,t){var r=Math.max(e.vmin,t[0]),n=Math.min(e.vmax,t[1]);return r<n||r===n&&r>t[0]&&r<t[1]?{vmin:r,vmax:n,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function zO(e,t,r){var n=[];if(!e)return{breaks:n};function i(o,s){return o>=0&&o<1-1e-5}B(e,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:Ce(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(pe(o.gap)){var u=Ci(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=t(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&B(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return B(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function DR(e,t){return $O(t)===$O(e)}function $O(e){return e.start+"_\0_"+e.end}function JKe(e,t,r){var n=[];B(e,function(a,o){var s=t(a);s&&s.type==="vmin"&&n.push([o])}),B(e,function(a,o){var s=t(a);if(s&&s.type==="vmax"){var l=mu(n,function(u){return DR(t(e[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return B(n,function(a){a.length===2&&i.push(r?a:[e[a[0]],e[a[1]]])}),i}function eQe(e,t,r,n){var i,a;if(e.break){var o=e.break.parsedBreak,s=mu(r,function(f){return DR(f.breakOption,e.break.parsedBreak.breakOption)}),l=n(Math.pow(t,o.vmin),s.vmin),u=n(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?mr(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:e.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[e.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function tQe(e,t,r){var n={noNegative:!0},i=zO(e,r,n),a=zO(e,r,n),o=Math.log(t);return a.breaks=se(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var rQe={vmin:"start",vmax:"end"};function nQe(e,t){return t&&(e=e||{},e.break={type:rQe[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function iQe(){CBe({createScaleBreakContext:XKe,pruneTicksByBreak:KKe,addBreaksToTicks:QKe,parseAxisBreakOption:zO,identifyAxisBreak:DR,serializeAxisBreakIdentifier:$O,retrieveAxisBreakPairs:JKe,getTicksLogTransformBreak:eQe,logarithmicParseBreaksFromOption:tQe,makeAxisLabelFormatterParamBreak:nQe})}var EU=Je();function aQe(e,t){var r=mu(e,function(n){return Sr().identifyAxisBreak(n.parsedBreak.breakOption,t.breakOption)});return r||e.push(r={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),r}function oQe(e){B(e,function(t){return t.shouldRemove=!0})}function sQe(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function lQe(e,t,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Sr())return;var o=Sr().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(I){return I.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),d=s.getModel("itemStyle"),v=d.getItemStyle(),g=v.stroke,m=v.lineWidth,x=v.lineDash,_=v.fill,b=new Me({ignoreModelZ:!0}),S=a.isHorizontal(),T=EU(t).visualList||(EU(t).visualList=[]);oQe(T);for(var A=function(I){var k=o[I][0].break.parsedBreak,O=[];O[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),O[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),O[1]<O[0]&&O.reverse();var D=aQe(T,k);D.shouldRemove=!1;var N=new Me;P(D.zigzagRandomList,N,O[0],O[1],S,k),f&&N.on("click",function(){var j={type:VT,breaks:[{start:k.breakOption.start,end:k.breakOption.end}]};j[a.dim+"AxisIndex"]=r.componentIndex,i.dispatchAction(j)}),N.silent=!f,b.add(N)},M=0;M<o.length;M++)A(M);e.add(b),sQe(T);function P(I,k,O,D,N,j){var z={stroke:g,lineWidth:m,lineDash:x,fill:"none"},$=N?0:1,U=1-$,F=n[Re[U]]+n[Tr[U]];function V(Ve){var Se=[],Ge=[];Se[$]=Ge[$]=Ve,Se[U]=n[Re[U]],Ge[U]=F;var Ye={x1:Se[0],y1:Se[1],x2:Ge[0],y2:Ge[1]};return MT(Ye,Ye,{lineWidth:1}),Se[0]=Ye.x1,Se[1]=Ye.y1,Se[$]}O=V(O),D=V(D);for(var W=[],Y=[],Z=!0,J=n[Re[U]],ne=0;;ne++){var le=J===n[Re[U]],fe=J>=F;fe&&(J=F);var ze=[],xe=[];ze[$]=O,xe[$]=D,!le&&!fe&&(ze[$]+=Z?-l:l,xe[$]-=Z?l:-l),ze[U]=J,xe[U]=J,W.push(ze),Y.push(xe);var ie=void 0;if(ne<I.length?ie=I[ne]:(ie=Math.random(),I.push(ie)),J+=ie*(c-u)+u,Z=!Z,fe)break}var he=Sr().serializeAxisBreakIdentifier(j.breakOption);if(k.add(new on({anid:"break_a_"+he,shape:{points:W},style:z,z:h})),j.gapReal!==0){k.add(new on({anid:"break_b_"+he,shape:{points:Y},style:z,z:h}));var ue=Y.slice();ue.reverse();var ee=W.concat(ue);k.add(new wn({anid:"break_c_"+he,shape:{points:ee},style:{fill:_,opacity:v.opacity},z:h}))}}}function uQe(e,t,r,n){var i=e.axis,a=r.transform;_n(n.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=Sr().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(m){return m.break},!1),l=se(s,function(m){var x=m[0].break.parsedBreak,_=[i.dataToCoord(x.vmin,!0),i.dataToCoord(x.vmax,!0)];return _[0]>_[1]&&_.reverse(),{coordPair:_,brkId:Sr().serializeAxisBreakIdentifier(x.breakOption)}});l.sort(function(m,x){return m.coordPair[0]-x.coordPair[0]});for(var u=o[0],c=null,f=0;f<l.length;f++){var h=l[f],d=Math.max(h.coordPair[0],o[0]),v=Math.min(h.coordPair[1],o[1]);u<=d&&g(u,d,c,h),u=v,c=h}u<=o[1]&&g(u,o[1],c,null);function g(m,x,_,b){function S(O,D){a&&(ur(O,O,a),ur(D,D,a))}function T(O,D){var N={x1:O[0],y1:O[1],x2:D[0],y2:D[1]};MT(N,N,n.style),O[0]=N.x1,O[1]=N.y1,D[0]=N.x2,D[1]=N.y2}var A=[m,0],M=[x,0],P=[m,5],I=[x,5];S(A,P),T(A,P),S(M,I),T(M,I),T(A,M);var k=new yr(re({shape:{x1:A[0],y1:A[1],x2:M[0],y2:M[1]}},n));t.add(k),k.anid="breakLine_"+(_?_.brkId:"\0")+"_\0_"+(b?b.brkId:"\0")}}function cQe(e,t,r){if(mu(r,function(_){return!_}))return;var n=new Ie;if(!$T(r[0],r[1],n,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=Wr();Ks(i,i,-t);var a=se(r,function(_){return _.transform?Fa(Wr(),i,_.transform):i});function o(_){var b=r[0].localRect,S=new Ie(b[Tr[_]]*a[0][0],b[Tr[_]]*a[0][1]);return Math.abs(S.y)<1e-5}var s=.5;if(o(0)||o(1)){var l=se(r,function(_,b){var S=_.localRect.clone();return S.applyTransform(a[b]),S}),u=new Ie;u.copy(r[0].label).add(r[1].label).scale(.5),u.transform(i);var c=n.clone().transform(i),f=l[0].x+l[1].x+(c.x>=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,d=Math.min(h,h-c.x),v=Math.max(h,h-c.x),g=v<0?v:d>0?d:0;s=(h-g)/c.x}var m=new Ie,x=new Ie;Ie.scale(m,n,-s),Ie.scale(x,n,1-s),FI(r[0],m),FI(r[1],x)}function fQe(e,t){var r={breaks:[]};return B(t.breaks,function(n){if(n){var i=mu(e.get("breaks",!0),function(s){return Sr().identifyAxisBreak(s,n)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===VT?!0:a===rre?!1:a===nre?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function hQe(){s6e({adjustBreakLabelPair:cQe,buildAxisBreakLine:uQe,rectCoordBuildBreakAxis:lQe,updateModelAxisBreak:fQe})}function dQe(e){d6e(e),iQe(),hQe()}function vQe(){D6e(pQe)}function pQe(e,t){B(e,function(r){if(!r.model.get(["axisLabel","inside"])){var n=gQe(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,r.position==="top"?t.y+=n.height+a:r.position==="left"&&(t.x+=n.width+a)}}})}function gQe(e){var t=e.model,r=e.scale;if(!t.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof tv?i=r.count():(n=r.getTicks(),i=n.length);var o=e.getLabelModel(),s=Uv(e),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var f=n?n[c]:{value:a[0]+c},h=s(f,c),d=o.getTextRect(h),v=g(d,o.get("rotate")||0);l?l.union(v):l=v}return l;function g(m,x){var _=x*Math.PI/180,b=m.width,S=m.height,T=b*Math.abs(Math.cos(_))+Math.abs(S*Math.sin(_)),A=b*Math.abs(Math.sin(_))+Math.abs(S*Math.cos(_)),M=new Oe(m.x,m.y,T,A);return M}}Ze([aVe]);Ze([eVe]);Ze([AVe,$Ve,qVe,J6e,cGe,JGe,CWe,uHe,kHe,RHe,GHe,KHe,W8e,vUe,AUe,FUe,HUe,t7e,l7e,x7e,A7e,N7e,x9e]);Ze(B9e);Ze(uZe);Ze(Lre);Ze(bZe);Ze(pne);Ze(AZe);Ze(HZe);Ze(eYe);Ze($Ye);Ze(aXe);Ze(b0);Ze(bXe);Ze(TXe);Ze(DXe);Ze(VXe);Ze(YXe);Ze(eqe);Ze(cqe);Ze(Lqe);Ze(bie);Ze(wie);Ze(Xqe);Ze(Mie);Ze(Pie);Ze(Jqe);Ze(iKe);Ze(mKe);Ze(_Ke);Ze(ZKe);Ze(_Fe);Ze(dQe);Ze(vQe);Ze(eGe);const mQe=Object.freeze(Object.defineProperty({__proto__:null,Axis:_a,ChartView:_t,ComponentModel:Qe,ComponentView:Lt,List:Dn,Model:tt,PRIORITY:See,SeriesModel:St,color:yje,connect:S4e,dataTool:I4e,dependencies:a4e,disConnect:T4e,disconnect:Iee,dispose:A4e,env:nt,extendChartView:aFe,extendComponentModel:rFe,extendComponentView:nFe,extendSeriesModel:iFe,format:F$e,getCoordinateSystemDimensions:M4e,getInstanceByDom:cj,getInstanceById:C4e,getMap:k4e,graphic:$$e,helper:O$e,init:w4e,innerDrawElementOnCanvas:oj,matrix:ZNe,number:B$e,parseGeoJSON:zI,parseGeoJson:zI,registerAction:Ka,registerCoordinateSystem:Dee,registerCustomSeries:P4e,registerLayout:Nee,registerLoading:pj,registerLocale:RN,registerMap:jee,registerPostInit:Oee,registerPostUpdate:Eee,registerPreprocessor:hj,registerProcessor:dj,registerTheme:fj,registerTransform:Ree,registerUpdateLifecycle:zT,registerVisual:bu,setCanvasCreator:L4e,setPlatformAPI:yK,throttle:RT,time:z$e,use:Ze,util:V$e,vector:ONe,version:i4e,zrUtil:ANe,zrender:eRe},Symbol.toStringTag,{value:"Module"}));var Gc={},Jl={},jie={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return"".concat(t++)}})(jie);var KT={},QT={},NR={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];clearTimeout(i),i=setTimeout(function(){r.apply(a,s)},n)}}})(NR);var Do={};Object.defineProperty(Do,"__esModule",{value:!0});Do.SizeSensorId=Do.SensorTabIndex=Do.SensorClassName=void 0;Do.SizeSensorId="size-sensor-id";Do.SensorClassName="size-sensor-object";Do.SensorTabIndex="-1";Object.defineProperty(QT,"__esModule",{value:!0});QT.createSensor=void 0;var yQe=xQe(NR),oP=Do;function xQe(e){return e&&e.__esModule?e:{default:e}}QT.createSensor=function(t,r){var n=void 0,i=[],a=function(){getComputedStyle(t).position==="static"&&(t.style.position="relative");var f=document.createElement("object");return f.onload=function(){f.contentDocument.defaultView.addEventListener("resize",o),o()},f.style.display="block",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.height="100%",f.style.width="100%",f.style.overflow="hidden",f.style.pointerEvents="none",f.style.zIndex="-1",f.style.opacity="0",f.setAttribute("class",oP.SensorClassName),f.setAttribute("tabindex",oP.SensorTabIndex),f.type="text/html",t.appendChild(f),f.data="about:blank",f},o=(0,yQe.default)(function(){i.forEach(function(c){c(t)})}),s=function(f){n||(n=a()),i.indexOf(f)===-1&&i.push(f)},l=function(){n&&n.parentNode&&(n.contentDocument&&n.contentDocument.defaultView.removeEventListener("resize",o),n.parentNode.removeChild(n),t.removeAttribute(oP.SizeSensorId),n=void 0,i=[],r&&r())},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&l()};return{element:t,bind:s,destroy:l,unbind:u}};var JT={};Object.defineProperty(JT,"__esModule",{value:!0});JT.createSensor=void 0;var _Qe=Do,bQe=wQe(NR);function wQe(e){return e&&e.__esModule?e:{default:e}}JT.createSensor=function(t,r){var n=void 0,i=[],a=(0,bQe.default)(function(){i.forEach(function(c){c(t)})}),o=function(){var f=new ResizeObserver(a);return f.observe(t),a(),f},s=function(f){n||(n=o()),i.indexOf(f)===-1&&i.push(f)},l=function(){n&&n.disconnect(),i=[],n=void 0,t.removeAttribute(_Qe.SizeSensorId),r&&r()},u=function(f){var h=i.indexOf(f);h!==-1&&i.splice(h,1),i.length===0&&n&&l()};return{element:t,bind:s,destroy:l,unbind:u}};Object.defineProperty(KT,"__esModule",{value:!0});KT.createSensor=void 0;var SQe=QT,TQe=JT;KT.createSensor=typeof ResizeObserver<"u"?TQe.createSensor:SQe.createSensor;Object.defineProperty(Jl,"__esModule",{value:!0});Jl.removeSensor=Jl.getSensor=Jl.Sensors=void 0;var AQe=MQe(jie),CQe=KT,FO=Do;function MQe(e){return e&&e.__esModule?e:{default:e}}var tm=Jl.Sensors={};function Rie(e){e&&tm[e]&&delete tm[e]}Jl.getSensor=function(t){var r=t.getAttribute(FO.SizeSensorId);if(r&&tm[r])return tm[r];var n=(0,AQe.default)();t.setAttribute(FO.SizeSensorId,n);var i=(0,CQe.createSensor)(t,function(){return Rie(n)});return tm[n]=i,i};Jl.removeSensor=function(t){var r=t.element.getAttribute(FO.SizeSensorId);t.destroy(),Rie(r)};var jR,RR;Object.defineProperty(Gc,"__esModule",{value:!0});Gc.ver=RR=Gc.clear=jR=Gc.bind=void 0;var VO=Jl;jR=Gc.bind=function(t,r){var n=(0,VO.getSensor)(t);return n.bind(r),function(){n.unbind(r)}};RR=Gc.clear=function(t){var r=(0,VO.getSensor)(t);(0,VO.removeSensor)(r)};Gc.ver="1.0.3";function DU(e,t){var r={};return t.forEach(function(n){r[n]=e[n]}),r}function sP(e){return typeof e=="function"}function PQe(e){return typeof e=="string"}var LQe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r};const yh=Ft(LQe);var kQe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.echarts=r.echarts,n.ele=null,n.isInitialResize=!0,n.eventHandlerRefs={},n}return t.prototype.componentDidMount=function(){this.renderNewEcharts()},t.prototype.componentDidUpdate=function(r){var n=this.props.shouldSetOption;if(!(sP(n)&&!n(r,this.props))){if(!yh(r.theme,this.props.theme)||!yh(r.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var i=this.getEchartsInstance();yh(r.onEvents,this.props.onEvents)||(this.unbindEvents(i),this.bindEvents(i,this.props.onEvents));var a=["option","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption"];yh(DU(this.props,a),DU(r,a))||this.updateEChartsOption(),(!yh(r.style,this.props.style)||!yh(r.className,this.props.className))&&this.resize()}},t.prototype.componentWillUnmount=function(){this.dispose()},t.prototype.initEchartsInstance=function(){return nF(this,void 0,void 0,function(){var r=this;return iF(this,function(n){return[2,new Promise(function(i){r.echarts.init(r.ele,r.props.theme,r.props.opts);var a=r.getEchartsInstance();a.on("finished",function(){var o=r.ele.clientWidth,s=r.ele.clientHeight;r.echarts.dispose(r.ele);var l=zg({width:o,height:s},r.props.opts);i(r.echarts.init(r.ele,r.props.theme,l))})})]})})},t.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},t.prototype.dispose=function(){if(this.ele){try{RR(this.ele)}catch(r){console.warn(r)}this.echarts.dispose(this.ele)}},t.prototype.renderNewEcharts=function(){return nF(this,void 0,void 0,function(){var r,n,i,a,o,s,l=this;return iF(this,function(u){switch(u.label){case 0:return r=this.props,n=r.onEvents,i=r.onChartReady,a=r.autoResize,o=a===void 0?!0:a,[4,this.initEchartsInstance()];case 1:return u.sent(),s=this.updateEChartsOption(),this.bindEvents(s,n||{}),sP(i)&&i(s),this.ele&&o&&jR(this.ele,function(){l.resize()}),[2]}})})},t.prototype.bindEvents=function(r,n){var i=this,a=function(s,l){if(PQe(s)&&sP(l)){var u=function(c){l(c,r)};r.on(s,u),i.eventHandlerRefs[s]=u}};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&a(o,n[o])},t.prototype.unbindEvents=function(r){for(var n=0,i=Object.entries(this.eventHandlerRefs);n<i.length;n++){var a=i[n],o=a[0],s=a[1];r.off(o,s)}this.eventHandlerRefs={}},t.prototype.updateEChartsOption=function(){var r=this.props,n=r.option,i=r.notMerge,a=i===void 0?!1:i,o=r.replaceMerge,s=o===void 0?null:o,l=r.lazyUpdate,u=l===void 0?!1:l,c=r.showLoading,f=r.loadingOption,h=f===void 0?null:f,d=this.getEchartsInstance();return d.setOption(n,{notMerge:a,replaceMerge:s,lazyUpdate:u}),c?d.showLoading(h):d.hideLoading(),d},t.prototype.resize=function(){var r=this.getEchartsInstance();if(!this.isInitialResize)try{r.resize({width:"auto",height:"auto"})}catch(n){console.warn(n)}this.isInitialResize=!1},t.prototype.render=function(){var r=this,n=this.props,i=n.style,a=n.className,o=a===void 0?"":a;n.echarts,n.option,n.theme,n.notMerge,n.replaceMerge,n.lazyUpdate,n.showLoading,n.loadingOption,n.opts,n.onChartReady,n.onEvents,n.shouldSetOption,n.autoResize;var s=sNe(n,["style","className","echarts","option","theme","notMerge","replaceMerge","lazyUpdate","showLoading","loadingOption","opts","onChartReady","onEvents","shouldSetOption","autoResize"]),l=zg({height:300},i);return Q.createElement("div",zg({ref:function(u){r.ele=u},style:l,className:"echarts-for-react ".concat(o)},s))},t}(H.PureComponent),IQe=function(e){q(t,e);function t(r){var n=e.call(this,r)||this;return n.echarts=mQe,n}return t}(kQe);const NU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],jU=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function OQe(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function EQe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function DQe(e){return e==="ROUTER"||e==="ROUTER_LATE"?30:e==="REPEATER"||e==="TRACKER"?25:e==="CLIENT_MUTE"?7:e==="CLIENT_BASE"?12:15}function NQe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=H.useRef(null),[a,o]=H.useState("connected"),s=H.useMemo(()=>{const m=new Set;return t.forEach(x=>{m.add(x.from_node),m.add(x.to_node)}),m},[t]),l=H.useMemo(()=>{let m=e;return a==="connected"?m=m.filter(x=>s.has(x.node_num)):a==="infra"&&(m=m.filter(x=>jU.includes(x.role))),m},[e,a,s]),u=H.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=H.useMemo(()=>t.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[t,u]),f=H.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(x=>{x.from_node===r&&m.add(x.to_node),x.to_node===r&&m.add(x.from_node)}),m},[r,c]),h=H.useMemo(()=>{const m=l.map(_=>{const b=EQe(_.latitude),S=NU[b%NU.length],T=jU.includes(_.role),A=_.node_num===r,M=f.has(_.node_num),P=r===null||A||M;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:DQe(_.role),itemStyle:{color:T?S:"#111827",borderColor:S,borderWidth:T?0:2,opacity:P?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:P?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),x=c.map(_=>{const b=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:OQe(_.snr),width:b&&r!==null?2:1,opacity:r===null?.4:b?.6:.04}}});return{nodes:m,links:x}},[l,c,r,f]),d=H.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const x=m.data;return`<strong>${x.name}</strong><br/>${x.longName}<br/>Role: ${x.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),v=H.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const x=m.data.nodeNum;n(r===x?null:x??null)}},[r,n]),g=H.useMemo(()=>({click:v}),[v]);return H.useEffect(()=>{var x;const m=(x=i.current)==null?void 0:x.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),y.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[y.jsx(IQe,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),y.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[y.jsx(HE,{size:14,className:"text-slate-500"}),y.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:x})=>y.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:x},m))}),y.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),y.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[y.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),y.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),y.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),y.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[y.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),y.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),y.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function Bie(e,t){const r=H.useRef(t);H.useEffect(function(){t!==r.current&&e.attributionControl!=null&&(r.current!=null&&e.attributionControl.removeAttribution(r.current),t!=null&&e.attributionControl.addAttribution(t)),r.current=t},[e,t])}function jQe(e,t,r){t.center!==r.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==r.radius&&e.setRadius(t.radius)}const RQe=1;function BQe(e){return Object.freeze({__version:RQe,map:e})}function zie(e,t){return Object.freeze({...e,...t})}const $ie=H.createContext(null),Fie=$ie.Provider;function eA(){const e=H.useContext($ie);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function zQe(e){function t(r,n){const{instance:i,context:a}=e(r).current;return H.useImperativeHandle(n,()=>i),r.children==null?null:Q.createElement(Fie,{value:a},r.children)}return H.forwardRef(t)}function $Qe(e){function t(r,n){const[i,a]=H.useState(!1),{instance:o}=e(r,a).current;H.useImperativeHandle(n,()=>o),H.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?aZ.createPortal(r.children,s):null}return H.forwardRef(t)}function FQe(e){function t(r,n){const{instance:i}=e(r).current;return H.useImperativeHandle(n,()=>i),null}return H.forwardRef(t)}function BR(e,t){const r=H.useRef();H.useEffect(function(){return t!=null&&e.instance.on(t),r.current=t,function(){r.current!=null&&e.instance.off(r.current),r.current=null}},[e,t])}function tA(e,t){const r=e.pane??t.pane;return r?{...e,pane:r}:e}function VQe(e,t){return function(n,i){const a=eA(),o=e(tA(n,a),a);return Bie(a.map,n.attribution),BR(o.current,n.eventHandlers),t(o.current,a,n,i),o}}var GO={exports:{}};/* @preserve
|
||
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
||
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||
*/(function(e,t){(function(r,n){n(t)})(og,function(r){var n="1.9.4";function i(p){var w,C,E,R;for(C=1,E=arguments.length;C<E;C++){R=arguments[C];for(w in R)p[w]=R[w]}return p}var a=Object.create||function(){function p(){}return function(w){return p.prototype=w,new p}}();function o(p,w){var C=Array.prototype.slice;if(p.bind)return p.bind.apply(p,C.call(arguments,1));var E=C.call(arguments,2);return function(){return p.apply(w,E.length?E.concat(C.call(arguments)):arguments)}}var s=0;function l(p){return"_leaflet_id"in p||(p._leaflet_id=++s),p._leaflet_id}function u(p,w,C){var E,R,G,X;return X=function(){E=!1,R&&(G.apply(C,R),R=!1)},G=function(){E?R=arguments:(p.apply(C,arguments),setTimeout(X,w),E=!0)},G}function c(p,w,C){var E=w[1],R=w[0],G=E-R;return p===E&&C?p:((p-R)%G+G)%G+R}function f(){return!1}function h(p,w){if(w===!1)return p;var C=Math.pow(10,w===void 0?6:w);return Math.round(p*C)/C}function d(p){return p.trim?p.trim():p.replace(/^\s+|\s+$/g,"")}function v(p){return d(p).split(/\s+/)}function g(p,w){Object.prototype.hasOwnProperty.call(p,"options")||(p.options=p.options?a(p.options):{});for(var C in w)p.options[C]=w[C];return p.options}function m(p,w,C){var E=[];for(var R in p)E.push(encodeURIComponent(C?R.toUpperCase():R)+"="+encodeURIComponent(p[R]));return(!w||w.indexOf("?")===-1?"?":"&")+E.join("&")}var x=/\{ *([\w_ -]+) *\}/g;function _(p,w){return p.replace(x,function(C,E){var R=w[E];if(R===void 0)throw new Error("No value provided for variable "+C);return typeof R=="function"&&(R=R(w)),R})}var b=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"};function S(p,w){for(var C=0;C<p.length;C++)if(p[C]===w)return C;return-1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function A(p){return window["webkit"+p]||window["moz"+p]||window["ms"+p]}var M=0;function P(p){var w=+new Date,C=Math.max(0,16-(w-M));return M=w+C,window.setTimeout(p,C)}var I=window.requestAnimationFrame||A("RequestAnimationFrame")||P,k=window.cancelAnimationFrame||A("CancelAnimationFrame")||A("CancelRequestAnimationFrame")||function(p){window.clearTimeout(p)};function O(p,w,C){if(C&&I===P)p.call(w);else return I.call(window,o(p,w))}function D(p){p&&k.call(window,p)}var N={__proto__:null,extend:i,create:a,bind:o,get lastId(){return s},stamp:l,throttle:u,wrapNum:c,falseFn:f,formatNum:h,trim:d,splitWords:v,setOptions:g,getParamString:m,template:_,isArray:b,indexOf:S,emptyImageUrl:T,requestFn:I,cancelFn:k,requestAnimFrame:O,cancelAnimFrame:D};function j(){}j.extend=function(p){var w=function(){g(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},C=w.__super__=this.prototype,E=a(C);E.constructor=w,w.prototype=E;for(var R in this)Object.prototype.hasOwnProperty.call(this,R)&&R!=="prototype"&&R!=="__super__"&&(w[R]=this[R]);return p.statics&&i(w,p.statics),p.includes&&(z(p.includes),i.apply(null,[E].concat(p.includes))),i(E,p),delete E.statics,delete E.includes,E.options&&(E.options=C.options?a(C.options):{},i(E.options,p.options)),E._initHooks=[],E.callInitHooks=function(){if(!this._initHooksCalled){C.callInitHooks&&C.callInitHooks.call(this),this._initHooksCalled=!0;for(var G=0,X=E._initHooks.length;G<X;G++)E._initHooks[G].call(this)}},w},j.include=function(p){var w=this.prototype.options;return i(this.prototype,p),p.options&&(this.prototype.options=w,this.mergeOptions(p.options)),this},j.mergeOptions=function(p){return i(this.prototype.options,p),this},j.addInitHook=function(p){var w=Array.prototype.slice.call(arguments,1),C=typeof p=="function"?p:function(){this[p].apply(this,w)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(C),this};function z(p){if(!(typeof L>"u"||!L||!L.Mixin)){p=b(p)?p:[p];for(var w=0;w<p.length;w++)p[w]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var $={on:function(p,w,C){if(typeof p=="object")for(var E in p)this._on(E,p[E],w);else{p=v(p);for(var R=0,G=p.length;R<G;R++)this._on(p[R],w,C)}return this},off:function(p,w,C){if(!arguments.length)delete this._events;else if(typeof p=="object")for(var E in p)this._off(E,p[E],w);else{p=v(p);for(var R=arguments.length===1,G=0,X=p.length;G<X;G++)R?this._off(p[G]):this._off(p[G],w,C)}return this},_on:function(p,w,C,E){if(typeof w!="function"){console.warn("wrong listener type: "+typeof w);return}if(this._listens(p,w,C)===!1){C===this&&(C=void 0);var R={fn:w,ctx:C};E&&(R.once=!0),this._events=this._events||{},this._events[p]=this._events[p]||[],this._events[p].push(R)}},_off:function(p,w,C){var E,R,G;if(this._events&&(E=this._events[p],!!E)){if(arguments.length===1){if(this._firingCount)for(R=0,G=E.length;R<G;R++)E[R].fn=f;delete this._events[p];return}if(typeof w!="function"){console.warn("wrong listener type: "+typeof w);return}var X=this._listens(p,w,C);if(X!==!1){var te=E[X];this._firingCount&&(te.fn=f,this._events[p]=E=E.slice()),E.splice(X,1)}}},fire:function(p,w,C){if(!this.listens(p,C))return this;var E=i({},w,{type:p,target:this,sourceTarget:w&&w.sourceTarget||this});if(this._events){var R=this._events[p];if(R){this._firingCount=this._firingCount+1||1;for(var G=0,X=R.length;G<X;G++){var te=R[G],oe=te.fn;te.once&&this.off(p,oe,te.ctx),oe.call(te.ctx||this,E)}this._firingCount--}}return C&&this._propagateEvent(E),this},listens:function(p,w,C,E){typeof p!="string"&&console.warn('"string" type argument expected');var R=w;typeof w!="function"&&(E=!!w,R=void 0,C=void 0);var G=this._events&&this._events[p];if(G&&G.length&&this._listens(p,R,C)!==!1)return!0;if(E){for(var X in this._eventParents)if(this._eventParents[X].listens(p,w,C,E))return!0}return!1},_listens:function(p,w,C){if(!this._events)return!1;var E=this._events[p]||[];if(!w)return!!E.length;C===this&&(C=void 0);for(var R=0,G=E.length;R<G;R++)if(E[R].fn===w&&E[R].ctx===C)return R;return!1},once:function(p,w,C){if(typeof p=="object")for(var E in p)this._on(E,p[E],w,!0);else{p=v(p);for(var R=0,G=p.length;R<G;R++)this._on(p[R],w,C,!0)}return this},addEventParent:function(p){return this._eventParents=this._eventParents||{},this._eventParents[l(p)]=p,this},removeEventParent:function(p){return this._eventParents&&delete this._eventParents[l(p)],this},_propagateEvent:function(p){for(var w in this._eventParents)this._eventParents[w].fire(p.type,i({layer:p.target,propagatedFrom:p.target},p),!0)}};$.addEventListener=$.on,$.removeEventListener=$.clearAllEventListeners=$.off,$.addOneTimeEventListener=$.once,$.fireEvent=$.fire,$.hasEventListeners=$.listens;var U=j.extend($);function F(p,w,C){this.x=C?Math.round(p):p,this.y=C?Math.round(w):w}var V=Math.trunc||function(p){return p>0?Math.floor(p):Math.ceil(p)};F.prototype={clone:function(){return new F(this.x,this.y)},add:function(p){return this.clone()._add(W(p))},_add:function(p){return this.x+=p.x,this.y+=p.y,this},subtract:function(p){return this.clone()._subtract(W(p))},_subtract:function(p){return this.x-=p.x,this.y-=p.y,this},divideBy:function(p){return this.clone()._divideBy(p)},_divideBy:function(p){return this.x/=p,this.y/=p,this},multiplyBy:function(p){return this.clone()._multiplyBy(p)},_multiplyBy:function(p){return this.x*=p,this.y*=p,this},scaleBy:function(p){return new F(this.x*p.x,this.y*p.y)},unscaleBy:function(p){return new F(this.x/p.x,this.y/p.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=V(this.x),this.y=V(this.y),this},distanceTo:function(p){p=W(p);var w=p.x-this.x,C=p.y-this.y;return Math.sqrt(w*w+C*C)},equals:function(p){return p=W(p),p.x===this.x&&p.y===this.y},contains:function(p){return p=W(p),Math.abs(p.x)<=Math.abs(this.x)&&Math.abs(p.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function W(p,w,C){return p instanceof F?p:b(p)?new F(p[0],p[1]):p==null?p:typeof p=="object"&&"x"in p&&"y"in p?new F(p.x,p.y):new F(p,w,C)}function Y(p,w){if(p)for(var C=w?[p,w]:p,E=0,R=C.length;E<R;E++)this.extend(C[E])}Y.prototype={extend:function(p){var w,C;if(!p)return this;if(p instanceof F||typeof p[0]=="number"||"x"in p)w=C=W(p);else if(p=Z(p),w=p.min,C=p.max,!w||!C)return this;return!this.min&&!this.max?(this.min=w.clone(),this.max=C.clone()):(this.min.x=Math.min(w.x,this.min.x),this.max.x=Math.max(C.x,this.max.x),this.min.y=Math.min(w.y,this.min.y),this.max.y=Math.max(C.y,this.max.y)),this},getCenter:function(p){return W((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,p)},getBottomLeft:function(){return W(this.min.x,this.max.y)},getTopRight:function(){return W(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(p){var w,C;return typeof p[0]=="number"||p instanceof F?p=W(p):p=Z(p),p instanceof Y?(w=p.min,C=p.max):w=C=p,w.x>=this.min.x&&C.x<=this.max.x&&w.y>=this.min.y&&C.y<=this.max.y},intersects:function(p){p=Z(p);var w=this.min,C=this.max,E=p.min,R=p.max,G=R.x>=w.x&&E.x<=C.x,X=R.y>=w.y&&E.y<=C.y;return G&&X},overlaps:function(p){p=Z(p);var w=this.min,C=this.max,E=p.min,R=p.max,G=R.x>w.x&&E.x<C.x,X=R.y>w.y&&E.y<C.y;return G&&X},isValid:function(){return!!(this.min&&this.max)},pad:function(p){var w=this.min,C=this.max,E=Math.abs(w.x-C.x)*p,R=Math.abs(w.y-C.y)*p;return Z(W(w.x-E,w.y-R),W(C.x+E,C.y+R))},equals:function(p){return p?(p=Z(p),this.min.equals(p.getTopLeft())&&this.max.equals(p.getBottomRight())):!1}};function Z(p,w){return!p||p instanceof Y?p:new Y(p,w)}function J(p,w){if(p)for(var C=w?[p,w]:p,E=0,R=C.length;E<R;E++)this.extend(C[E])}J.prototype={extend:function(p){var w=this._southWest,C=this._northEast,E,R;if(p instanceof le)E=p,R=p;else if(p instanceof J){if(E=p._southWest,R=p._northEast,!E||!R)return this}else return p?this.extend(fe(p)||ne(p)):this;return!w&&!C?(this._southWest=new le(E.lat,E.lng),this._northEast=new le(R.lat,R.lng)):(w.lat=Math.min(E.lat,w.lat),w.lng=Math.min(E.lng,w.lng),C.lat=Math.max(R.lat,C.lat),C.lng=Math.max(R.lng,C.lng)),this},pad:function(p){var w=this._southWest,C=this._northEast,E=Math.abs(w.lat-C.lat)*p,R=Math.abs(w.lng-C.lng)*p;return new J(new le(w.lat-E,w.lng-R),new le(C.lat+E,C.lng+R))},getCenter:function(){return new le((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new le(this.getNorth(),this.getWest())},getSouthEast:function(){return new le(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(p){typeof p[0]=="number"||p instanceof le||"lat"in p?p=fe(p):p=ne(p);var w=this._southWest,C=this._northEast,E,R;return p instanceof J?(E=p.getSouthWest(),R=p.getNorthEast()):E=R=p,E.lat>=w.lat&&R.lat<=C.lat&&E.lng>=w.lng&&R.lng<=C.lng},intersects:function(p){p=ne(p);var w=this._southWest,C=this._northEast,E=p.getSouthWest(),R=p.getNorthEast(),G=R.lat>=w.lat&&E.lat<=C.lat,X=R.lng>=w.lng&&E.lng<=C.lng;return G&&X},overlaps:function(p){p=ne(p);var w=this._southWest,C=this._northEast,E=p.getSouthWest(),R=p.getNorthEast(),G=R.lat>w.lat&&E.lat<C.lat,X=R.lng>w.lng&&E.lng<C.lng;return G&&X},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(p,w){return p?(p=ne(p),this._southWest.equals(p.getSouthWest(),w)&&this._northEast.equals(p.getNorthEast(),w)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ne(p,w){return p instanceof J?p:new J(p,w)}function le(p,w,C){if(isNaN(p)||isNaN(w))throw new Error("Invalid LatLng object: ("+p+", "+w+")");this.lat=+p,this.lng=+w,C!==void 0&&(this.alt=+C)}le.prototype={equals:function(p,w){if(!p)return!1;p=fe(p);var C=Math.max(Math.abs(this.lat-p.lat),Math.abs(this.lng-p.lng));return C<=(w===void 0?1e-9:w)},toString:function(p){return"LatLng("+h(this.lat,p)+", "+h(this.lng,p)+")"},distanceTo:function(p){return xe.distance(this,fe(p))},wrap:function(){return xe.wrapLatLng(this)},toBounds:function(p){var w=180*p/40075017,C=w/Math.cos(Math.PI/180*this.lat);return ne([this.lat-w,this.lng-C],[this.lat+w,this.lng+C])},clone:function(){return new le(this.lat,this.lng,this.alt)}};function fe(p,w,C){return p instanceof le?p:b(p)&&typeof p[0]!="object"?p.length===3?new le(p[0],p[1],p[2]):p.length===2?new le(p[0],p[1]):null:p==null?p:typeof p=="object"&&"lat"in p?new le(p.lat,"lng"in p?p.lng:p.lon,p.alt):w===void 0?null:new le(p,w,C)}var ze={latLngToPoint:function(p,w){var C=this.projection.project(p),E=this.scale(w);return this.transformation._transform(C,E)},pointToLatLng:function(p,w){var C=this.scale(w),E=this.transformation.untransform(p,C);return this.projection.unproject(E)},project:function(p){return this.projection.project(p)},unproject:function(p){return this.projection.unproject(p)},scale:function(p){return 256*Math.pow(2,p)},zoom:function(p){return Math.log(p/256)/Math.LN2},getProjectedBounds:function(p){if(this.infinite)return null;var w=this.projection.bounds,C=this.scale(p),E=this.transformation.transform(w.min,C),R=this.transformation.transform(w.max,C);return new Y(E,R)},infinite:!1,wrapLatLng:function(p){var w=this.wrapLng?c(p.lng,this.wrapLng,!0):p.lng,C=this.wrapLat?c(p.lat,this.wrapLat,!0):p.lat,E=p.alt;return new le(C,w,E)},wrapLatLngBounds:function(p){var w=p.getCenter(),C=this.wrapLatLng(w),E=w.lat-C.lat,R=w.lng-C.lng;if(E===0&&R===0)return p;var G=p.getSouthWest(),X=p.getNorthEast(),te=new le(G.lat-E,G.lng-R),oe=new le(X.lat-E,X.lng-R);return new J(te,oe)}},xe=i({},ze,{wrapLng:[-180,180],R:6371e3,distance:function(p,w){var C=Math.PI/180,E=p.lat*C,R=w.lat*C,G=Math.sin((w.lat-p.lat)*C/2),X=Math.sin((w.lng-p.lng)*C/2),te=G*G+Math.cos(E)*Math.cos(R)*X*X,oe=2*Math.atan2(Math.sqrt(te),Math.sqrt(1-te));return this.R*oe}}),ie=6378137,he={R:ie,MAX_LATITUDE:85.0511287798,project:function(p){var w=Math.PI/180,C=this.MAX_LATITUDE,E=Math.max(Math.min(C,p.lat),-C),R=Math.sin(E*w);return new F(this.R*p.lng*w,this.R*Math.log((1+R)/(1-R))/2)},unproject:function(p){var w=180/Math.PI;return new le((2*Math.atan(Math.exp(p.y/this.R))-Math.PI/2)*w,p.x*w/this.R)},bounds:function(){var p=ie*Math.PI;return new Y([-p,-p],[p,p])}()};function ue(p,w,C,E){if(b(p)){this._a=p[0],this._b=p[1],this._c=p[2],this._d=p[3];return}this._a=p,this._b=w,this._c=C,this._d=E}ue.prototype={transform:function(p,w){return this._transform(p.clone(),w)},_transform:function(p,w){return w=w||1,p.x=w*(this._a*p.x+this._b),p.y=w*(this._c*p.y+this._d),p},untransform:function(p,w){return w=w||1,new F((p.x/w-this._b)/this._a,(p.y/w-this._d)/this._c)}};function ee(p,w,C,E){return new ue(p,w,C,E)}var Ve=i({},xe,{code:"EPSG:3857",projection:he,transformation:function(){var p=.5/(Math.PI*he.R);return ee(p,.5,-p,.5)}()}),Se=i({},Ve,{code:"EPSG:900913"});function Ge(p){return document.createElementNS("http://www.w3.org/2000/svg",p)}function Ye(p,w){var C="",E,R,G,X,te,oe;for(E=0,G=p.length;E<G;E++){for(te=p[E],R=0,X=te.length;R<X;R++)oe=te[R],C+=(R?"L":"M")+oe.x+" "+oe.y;C+=w?Ue.svg?"z":"x":""}return C||"M0 0"}var vt=document.documentElement.style,Vt="ActiveXObject"in window,nr=Vt&&!document.addEventListener,jn="msLaunchUri"in navigator&&!("documentMode"in document),qr=Qa("webkit"),Jn=Qa("android"),Of=Qa("android 2")||Qa("android 3"),S0=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),T0=Jn&&Qa("Google")&&S0<537&&!("AudioNode"in window),rA=!!window.opera,VR=!jn&&Qa("chrome"),GR=Qa("gecko")&&!qr&&!rA&&!Vt,Zie=!VR&&Qa("safari"),WR=Qa("phantom"),HR="OTransition"in vt,Yie=navigator.platform.indexOf("Win")===0,UR=Vt&&"transition"in vt,nA="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Of,ZR="MozPerspective"in vt,Xie=!window.L_DISABLE_3D&&(UR||nA||ZR)&&!HR&&!WR,Kv=typeof orientation<"u"||Qa("mobile"),qie=Kv&&qr,Kie=Kv&&nA,YR=!window.PointerEvent&&window.MSPointerEvent,XR=!!(window.PointerEvent||YR),qR="ontouchstart"in window||!!window.TouchEvent,Qie=!window.L_NO_TOUCH&&(qR||XR),Jie=Kv&&rA,eae=Kv&&GR,tae=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,rae=function(){var p=!1;try{var w=Object.defineProperty({},"passive",{get:function(){p=!0}});window.addEventListener("testPassiveEventSupport",f,w),window.removeEventListener("testPassiveEventSupport",f,w)}catch{}return p}(),nae=function(){return!!document.createElement("canvas").getContext}(),iA=!!(document.createElementNS&&Ge("svg").createSVGRect),iae=!!iA&&function(){var p=document.createElement("div");return p.innerHTML="<svg/>",(p.firstChild&&p.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),aae=!iA&&function(){try{var p=document.createElement("div");p.innerHTML='<v:shape adj="1"/>';var w=p.firstChild;return w.style.behavior="url(#default#VML)",w&&typeof w.adj=="object"}catch{return!1}}(),oae=navigator.platform.indexOf("Mac")===0,sae=navigator.platform.indexOf("Linux")===0;function Qa(p){return navigator.userAgent.toLowerCase().indexOf(p)>=0}var Ue={ie:Vt,ielt9:nr,edge:jn,webkit:qr,android:Jn,android23:Of,androidStock:T0,opera:rA,chrome:VR,gecko:GR,safari:Zie,phantom:WR,opera12:HR,win:Yie,ie3d:UR,webkit3d:nA,gecko3d:ZR,any3d:Xie,mobile:Kv,mobileWebkit:qie,mobileWebkit3d:Kie,msPointer:YR,pointer:XR,touch:Qie,touchNative:qR,mobileOpera:Jie,mobileGecko:eae,retina:tae,passiveEvents:rae,canvas:nae,svg:iA,vml:aae,inlineSvg:iae,mac:oae,linux:sae},KR=Ue.msPointer?"MSPointerDown":"pointerdown",QR=Ue.msPointer?"MSPointerMove":"pointermove",JR=Ue.msPointer?"MSPointerUp":"pointerup",e5=Ue.msPointer?"MSPointerCancel":"pointercancel",aA={touchstart:KR,touchmove:QR,touchend:JR,touchcancel:e5},t5={touchstart:dae,touchmove:A0,touchend:A0,touchcancel:A0},Ef={},r5=!1;function lae(p,w,C){return w==="touchstart"&&hae(),t5[w]?(C=t5[w].bind(this,C),p.addEventListener(aA[w],C,!1),C):(console.warn("wrong event specified:",w),f)}function uae(p,w,C){if(!aA[w]){console.warn("wrong event specified:",w);return}p.removeEventListener(aA[w],C,!1)}function cae(p){Ef[p.pointerId]=p}function fae(p){Ef[p.pointerId]&&(Ef[p.pointerId]=p)}function n5(p){delete Ef[p.pointerId]}function hae(){r5||(document.addEventListener(KR,cae,!0),document.addEventListener(QR,fae,!0),document.addEventListener(JR,n5,!0),document.addEventListener(e5,n5,!0),r5=!0)}function A0(p,w){if(w.pointerType!==(w.MSPOINTER_TYPE_MOUSE||"mouse")){w.touches=[];for(var C in Ef)w.touches.push(Ef[C]);w.changedTouches=[w],p(w)}}function dae(p,w){w.MSPOINTER_TYPE_TOUCH&&w.pointerType===w.MSPOINTER_TYPE_TOUCH&&un(w),A0(p,w)}function vae(p){var w={},C,E;for(E in p)C=p[E],w[E]=C&&C.bind?C.bind(p):C;return p=w,w.type="dblclick",w.detail=2,w.isTrusted=!1,w._simulated=!0,w}var pae=200;function gae(p,w){p.addEventListener("dblclick",w);var C=0,E;function R(G){if(G.detail!==1){E=G.detail;return}if(!(G.pointerType==="mouse"||G.sourceCapabilities&&!G.sourceCapabilities.firesTouchEvents)){var X=l5(G);if(!(X.some(function(oe){return oe instanceof HTMLLabelElement&&oe.attributes.for})&&!X.some(function(oe){return oe instanceof HTMLInputElement||oe instanceof HTMLSelectElement}))){var te=Date.now();te-C<=pae?(E++,E===2&&w(vae(G))):E=1,C=te}}}return p.addEventListener("click",R),{dblclick:w,simDblclick:R}}function mae(p,w){p.removeEventListener("dblclick",w.dblclick),p.removeEventListener("click",w.simDblclick)}var oA=P0(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Qv=P0(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),i5=Qv==="webkitTransition"||Qv==="OTransition"?Qv+"End":"transitionend";function a5(p){return typeof p=="string"?document.getElementById(p):p}function Jv(p,w){var C=p.style[w]||p.currentStyle&&p.currentStyle[w];if((!C||C==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(p,null);C=E?E[w]:null}return C==="auto"?null:C}function Tt(p,w,C){var E=document.createElement(p);return E.className=w||"",C&&C.appendChild(E),E}function ir(p){var w=p.parentNode;w&&w.removeChild(p)}function C0(p){for(;p.firstChild;)p.removeChild(p.firstChild)}function Df(p){var w=p.parentNode;w&&w.lastChild!==p&&w.appendChild(p)}function Nf(p){var w=p.parentNode;w&&w.firstChild!==p&&w.insertBefore(p,w.firstChild)}function sA(p,w){if(p.classList!==void 0)return p.classList.contains(w);var C=M0(p);return C.length>0&&new RegExp("(^|\\s)"+w+"(\\s|$)").test(C)}function ut(p,w){if(p.classList!==void 0)for(var C=v(w),E=0,R=C.length;E<R;E++)p.classList.add(C[E]);else if(!sA(p,w)){var G=M0(p);lA(p,(G?G+" ":"")+w)}}function _r(p,w){p.classList!==void 0?p.classList.remove(w):lA(p,d((" "+M0(p)+" ").replace(" "+w+" "," ")))}function lA(p,w){p.className.baseVal===void 0?p.className=w:p.className.baseVal=w}function M0(p){return p.correspondingElement&&(p=p.correspondingElement),p.className.baseVal===void 0?p.className:p.className.baseVal}function Ri(p,w){"opacity"in p.style?p.style.opacity=w:"filter"in p.style&&yae(p,w)}function yae(p,w){var C=!1,E="DXImageTransform.Microsoft.Alpha";try{C=p.filters.item(E)}catch{if(w===1)return}w=Math.round(w*100),C?(C.Enabled=w!==100,C.Opacity=w):p.style.filter+=" progid:"+E+"(opacity="+w+")"}function P0(p){for(var w=document.documentElement.style,C=0;C<p.length;C++)if(p[C]in w)return p[C];return!1}function Su(p,w,C){var E=w||new F(0,0);p.style[oA]=(Ue.ie3d?"translate("+E.x+"px,"+E.y+"px)":"translate3d("+E.x+"px,"+E.y+"px,0)")+(C?" scale("+C+")":"")}function Cr(p,w){p._leaflet_pos=w,Ue.any3d?Su(p,w):(p.style.left=w.x+"px",p.style.top=w.y+"px")}function Tu(p){return p._leaflet_pos||new F(0,0)}var ep,tp,uA;if("onselectstart"in document)ep=function(){st(window,"selectstart",un)},tp=function(){Ht(window,"selectstart",un)};else{var rp=P0(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ep=function(){if(rp){var p=document.documentElement.style;uA=p[rp],p[rp]="none"}},tp=function(){rp&&(document.documentElement.style[rp]=uA,uA=void 0)}}function cA(){st(window,"dragstart",un)}function fA(){Ht(window,"dragstart",un)}var L0,hA;function dA(p){for(;p.tabIndex===-1;)p=p.parentNode;p.style&&(k0(),L0=p,hA=p.style.outlineStyle,p.style.outlineStyle="none",st(window,"keydown",k0))}function k0(){L0&&(L0.style.outlineStyle=hA,L0=void 0,hA=void 0,Ht(window,"keydown",k0))}function o5(p){do p=p.parentNode;while((!p.offsetWidth||!p.offsetHeight)&&p!==document.body);return p}function vA(p){var w=p.getBoundingClientRect();return{x:w.width/p.offsetWidth||1,y:w.height/p.offsetHeight||1,boundingClientRect:w}}var xae={__proto__:null,TRANSFORM:oA,TRANSITION:Qv,TRANSITION_END:i5,get:a5,getStyle:Jv,create:Tt,remove:ir,empty:C0,toFront:Df,toBack:Nf,hasClass:sA,addClass:ut,removeClass:_r,setClass:lA,getClass:M0,setOpacity:Ri,testProp:P0,setTransform:Su,setPosition:Cr,getPosition:Tu,get disableTextSelection(){return ep},get enableTextSelection(){return tp},disableImageDrag:cA,enableImageDrag:fA,preventOutline:dA,restoreOutline:k0,getSizedParentNode:o5,getScale:vA};function st(p,w,C,E){if(w&&typeof w=="object")for(var R in w)gA(p,R,w[R],C);else{w=v(w);for(var G=0,X=w.length;G<X;G++)gA(p,w[G],C,E)}return this}var Ja="_leaflet_events";function Ht(p,w,C,E){if(arguments.length===1)s5(p),delete p[Ja];else if(w&&typeof w=="object")for(var R in w)mA(p,R,w[R],C);else if(w=v(w),arguments.length===2)s5(p,function(te){return S(w,te)!==-1});else for(var G=0,X=w.length;G<X;G++)mA(p,w[G],C,E);return this}function s5(p,w){for(var C in p[Ja]){var E=C.split(/\d/)[0];(!w||w(E))&&mA(p,E,null,null,C)}}var pA={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function gA(p,w,C,E){var R=w+l(C)+(E?"_"+l(E):"");if(p[Ja]&&p[Ja][R])return this;var G=function(te){return C.call(E||p,te||window.event)},X=G;!Ue.touchNative&&Ue.pointer&&w.indexOf("touch")===0?G=lae(p,w,G):Ue.touch&&w==="dblclick"?G=gae(p,G):"addEventListener"in p?w==="touchstart"||w==="touchmove"||w==="wheel"||w==="mousewheel"?p.addEventListener(pA[w]||w,G,Ue.passiveEvents?{passive:!1}:!1):w==="mouseenter"||w==="mouseleave"?(G=function(te){te=te||window.event,xA(p,te)&&X(te)},p.addEventListener(pA[w],G,!1)):p.addEventListener(w,X,!1):p.attachEvent("on"+w,G),p[Ja]=p[Ja]||{},p[Ja][R]=G}function mA(p,w,C,E,R){R=R||w+l(C)+(E?"_"+l(E):"");var G=p[Ja]&&p[Ja][R];if(!G)return this;!Ue.touchNative&&Ue.pointer&&w.indexOf("touch")===0?uae(p,w,G):Ue.touch&&w==="dblclick"?mae(p,G):"removeEventListener"in p?p.removeEventListener(pA[w]||w,G,!1):p.detachEvent("on"+w,G),p[Ja][R]=null}function Au(p){return p.stopPropagation?p.stopPropagation():p.originalEvent?p.originalEvent._stopped=!0:p.cancelBubble=!0,this}function yA(p){return gA(p,"wheel",Au),this}function np(p){return st(p,"mousedown touchstart dblclick contextmenu",Au),p._leaflet_disable_click=!0,this}function un(p){return p.preventDefault?p.preventDefault():p.returnValue=!1,this}function Cu(p){return un(p),Au(p),this}function l5(p){if(p.composedPath)return p.composedPath();for(var w=[],C=p.target;C;)w.push(C),C=C.parentNode;return w}function u5(p,w){if(!w)return new F(p.clientX,p.clientY);var C=vA(w),E=C.boundingClientRect;return new F((p.clientX-E.left)/C.x-w.clientLeft,(p.clientY-E.top)/C.y-w.clientTop)}var _ae=Ue.linux&&Ue.chrome?window.devicePixelRatio:Ue.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function c5(p){return Ue.edge?p.wheelDeltaY/2:p.deltaY&&p.deltaMode===0?-p.deltaY/_ae:p.deltaY&&p.deltaMode===1?-p.deltaY*20:p.deltaY&&p.deltaMode===2?-p.deltaY*60:p.deltaX||p.deltaZ?0:p.wheelDelta?(p.wheelDeltaY||p.wheelDelta)/2:p.detail&&Math.abs(p.detail)<32765?-p.detail*20:p.detail?p.detail/-32765*60:0}function xA(p,w){var C=w.relatedTarget;if(!C)return!0;try{for(;C&&C!==p;)C=C.parentNode}catch{return!1}return C!==p}var bae={__proto__:null,on:st,off:Ht,stopPropagation:Au,disableScrollPropagation:yA,disableClickPropagation:np,preventDefault:un,stop:Cu,getPropagationPath:l5,getMousePosition:u5,getWheelDelta:c5,isExternalTarget:xA,addListener:st,removeListener:Ht},f5=U.extend({run:function(p,w,C,E){this.stop(),this._el=p,this._inProgress=!0,this._duration=C||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=Tu(p),this._offset=w.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=O(this._animate,this),this._step()},_step:function(p){var w=+new Date-this._startTime,C=this._duration*1e3;w<C?this._runFrame(this._easeOut(w/C),p):(this._runFrame(1),this._complete())},_runFrame:function(p,w){var C=this._startPos.add(this._offset.multiplyBy(p));w&&C._round(),Cr(this._el,C),this.fire("step")},_complete:function(){D(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(p){return 1-Math.pow(1-p,this._easeOutPower)}}),bt=U.extend({options:{crs:Ve,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(p,w){w=g(this,w),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(p),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),w.maxBounds&&this.setMaxBounds(w.maxBounds),w.zoom!==void 0&&(this._zoom=this._limitZoom(w.zoom)),w.center&&w.zoom!==void 0&&this.setView(fe(w.center),w.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Qv&&Ue.any3d&&!Ue.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),st(this._proxy,i5,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(p,w,C){if(w=w===void 0?this._zoom:this._limitZoom(w),p=this._limitCenter(fe(p),w,this.options.maxBounds),C=C||{},this._stop(),this._loaded&&!C.reset&&C!==!0){C.animate!==void 0&&(C.zoom=i({animate:C.animate},C.zoom),C.pan=i({animate:C.animate,duration:C.duration},C.pan));var E=this._zoom!==w?this._tryAnimatedZoom&&this._tryAnimatedZoom(p,w,C.zoom):this._tryAnimatedPan(p,C.pan);if(E)return clearTimeout(this._sizeTimer),this}return this._resetView(p,w,C.pan&&C.pan.noMoveStart),this},setZoom:function(p,w){return this._loaded?this.setView(this.getCenter(),p,{zoom:w}):(this._zoom=p,this)},zoomIn:function(p,w){return p=p||(Ue.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+p,w)},zoomOut:function(p,w){return p=p||(Ue.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-p,w)},setZoomAround:function(p,w,C){var E=this.getZoomScale(w),R=this.getSize().divideBy(2),G=p instanceof F?p:this.latLngToContainerPoint(p),X=G.subtract(R).multiplyBy(1-1/E),te=this.containerPointToLatLng(R.add(X));return this.setView(te,w,{zoom:C})},_getBoundsCenterZoom:function(p,w){w=w||{},p=p.getBounds?p.getBounds():ne(p);var C=W(w.paddingTopLeft||w.padding||[0,0]),E=W(w.paddingBottomRight||w.padding||[0,0]),R=this.getBoundsZoom(p,!1,C.add(E));if(R=typeof w.maxZoom=="number"?Math.min(w.maxZoom,R):R,R===1/0)return{center:p.getCenter(),zoom:R};var G=E.subtract(C).divideBy(2),X=this.project(p.getSouthWest(),R),te=this.project(p.getNorthEast(),R),oe=this.unproject(X.add(te).divideBy(2).add(G),R);return{center:oe,zoom:R}},fitBounds:function(p,w){if(p=ne(p),!p.isValid())throw new Error("Bounds are not valid.");var C=this._getBoundsCenterZoom(p,w);return this.setView(C.center,C.zoom,w)},fitWorld:function(p){return this.fitBounds([[-90,-180],[90,180]],p)},panTo:function(p,w){return this.setView(p,this._zoom,{pan:w})},panBy:function(p,w){if(p=W(p).round(),w=w||{},!p.x&&!p.y)return this.fire("moveend");if(w.animate!==!0&&!this.getSize().contains(p))return this._resetView(this.unproject(this.project(this.getCenter()).add(p)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new f5,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),w.noMoveStart||this.fire("movestart"),w.animate!==!1){ut(this._mapPane,"leaflet-pan-anim");var C=this._getMapPanePos().subtract(p).round();this._panAnim.run(this._mapPane,C,w.duration||.25,w.easeLinearity)}else this._rawPanBy(p),this.fire("move").fire("moveend");return this},flyTo:function(p,w,C){if(C=C||{},C.animate===!1||!Ue.any3d)return this.setView(p,w,C);this._stop();var E=this.project(this.getCenter()),R=this.project(p),G=this.getSize(),X=this._zoom;p=fe(p),w=w===void 0?X:w;var te=Math.max(G.x,G.y),oe=te*this.getZoomScale(X,w),de=R.distanceTo(E)||1,Ee=1.42,et=Ee*Ee;function pt(Mr){var V0=Mr?-1:1,uoe=Mr?oe:te,coe=oe*oe-te*te+V0*et*et*de*de,foe=2*uoe*et*de,kA=coe/foe,H5=Math.sqrt(kA*kA+1)-kA,hoe=H5<1e-9?-18:Math.log(H5);return hoe}function Rn(Mr){return(Math.exp(Mr)-Math.exp(-Mr))/2}function Kr(Mr){return(Math.exp(Mr)+Math.exp(-Mr))/2}function zi(Mr){return Rn(Mr)/Kr(Mr)}var ei=pt(0);function Ff(Mr){return te*(Kr(ei)/Kr(ei+Ee*Mr))}function aoe(Mr){return te*(Kr(ei)*zi(ei+Ee*Mr)-Rn(ei))/et}function ooe(Mr){return 1-Math.pow(1-Mr,1.5)}var soe=Date.now(),G5=(pt(1)-ei)/Ee,loe=C.duration?1e3*C.duration:1e3*G5*.8;function W5(){var Mr=(Date.now()-soe)/loe,V0=ooe(Mr)*G5;Mr<=1?(this._flyToFrame=O(W5,this),this._move(this.unproject(E.add(R.subtract(E).multiplyBy(aoe(V0)/de)),X),this.getScaleZoom(te/Ff(V0),X),{flyTo:!0})):this._move(p,w)._moveEnd(!0)}return this._moveStart(!0,C.noMoveStart),W5.call(this),this},flyToBounds:function(p,w){var C=this._getBoundsCenterZoom(p,w);return this.flyTo(C.center,C.zoom,w)},setMaxBounds:function(p){return p=ne(p),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),p.isValid()?(this.options.maxBounds=p,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(p){var w=this.options.minZoom;return this.options.minZoom=p,this._loaded&&w!==p&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(p):this},setMaxZoom:function(p){var w=this.options.maxZoom;return this.options.maxZoom=p,this._loaded&&w!==p&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(p):this},panInsideBounds:function(p,w){this._enforcingBounds=!0;var C=this.getCenter(),E=this._limitCenter(C,this._zoom,ne(p));return C.equals(E)||this.panTo(E,w),this._enforcingBounds=!1,this},panInside:function(p,w){w=w||{};var C=W(w.paddingTopLeft||w.padding||[0,0]),E=W(w.paddingBottomRight||w.padding||[0,0]),R=this.project(this.getCenter()),G=this.project(p),X=this.getPixelBounds(),te=Z([X.min.add(C),X.max.subtract(E)]),oe=te.getSize();if(!te.contains(G)){this._enforcingBounds=!0;var de=G.subtract(te.getCenter()),Ee=te.extend(G).getSize().subtract(oe);R.x+=de.x<0?-Ee.x:Ee.x,R.y+=de.y<0?-Ee.y:Ee.y,this.panTo(this.unproject(R),w),this._enforcingBounds=!1}return this},invalidateSize:function(p){if(!this._loaded)return this;p=i({animate:!1,pan:!0},p===!0?{animate:!0}:p);var w=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var C=this.getSize(),E=w.divideBy(2).round(),R=C.divideBy(2).round(),G=E.subtract(R);return!G.x&&!G.y?this:(p.animate&&p.pan?this.panBy(G):(p.pan&&this._rawPanBy(G),this.fire("move"),p.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:w,newSize:C}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(p){if(p=this._locateOptions=i({timeout:1e4,watch:!1},p),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var w=o(this._handleGeolocationResponse,this),C=o(this._handleGeolocationError,this);return p.watch?this._locationWatchId=navigator.geolocation.watchPosition(w,C,p):navigator.geolocation.getCurrentPosition(w,C,p),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(p){if(this._container._leaflet_id){var w=p.code,C=p.message||(w===1?"permission denied":w===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:w,message:"Geolocation error: "+C+"."})}},_handleGeolocationResponse:function(p){if(this._container._leaflet_id){var w=p.coords.latitude,C=p.coords.longitude,E=new le(w,C),R=E.toBounds(p.coords.accuracy*2),G=this._locateOptions;if(G.setView){var X=this.getBoundsZoom(R);this.setView(E,G.maxZoom?Math.min(X,G.maxZoom):X)}var te={latlng:E,bounds:R,timestamp:p.timestamp};for(var oe in p.coords)typeof p.coords[oe]=="number"&&(te[oe]=p.coords[oe]);this.fire("locationfound",te)}},addHandler:function(p,w){if(!w)return this;var C=this[p]=new w(this);return this._handlers.push(C),this.options[p]&&C.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),ir(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(D(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var p;for(p in this._layers)this._layers[p].remove();for(p in this._panes)ir(this._panes[p]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(p,w){var C="leaflet-pane"+(p?" leaflet-"+p.replace("Pane","")+"-pane":""),E=Tt("div",C,w||this._mapPane);return p&&(this._panes[p]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var p=this.getPixelBounds(),w=this.unproject(p.getBottomLeft()),C=this.unproject(p.getTopRight());return new J(w,C)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(p,w,C){p=ne(p),C=W(C||[0,0]);var E=this.getZoom()||0,R=this.getMinZoom(),G=this.getMaxZoom(),X=p.getNorthWest(),te=p.getSouthEast(),oe=this.getSize().subtract(C),de=Z(this.project(te,E),this.project(X,E)).getSize(),Ee=Ue.any3d?this.options.zoomSnap:1,et=oe.x/de.x,pt=oe.y/de.y,Rn=w?Math.max(et,pt):Math.min(et,pt);return E=this.getScaleZoom(Rn,E),Ee&&(E=Math.round(E/(Ee/100))*(Ee/100),E=w?Math.ceil(E/Ee)*Ee:Math.floor(E/Ee)*Ee),Math.max(R,Math.min(G,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new F(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(p,w){var C=this._getTopLeftPoint(p,w);return new Y(C,C.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(p){return this.options.crs.getProjectedBounds(p===void 0?this.getZoom():p)},getPane:function(p){return typeof p=="string"?this._panes[p]:p},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(p,w){var C=this.options.crs;return w=w===void 0?this._zoom:w,C.scale(p)/C.scale(w)},getScaleZoom:function(p,w){var C=this.options.crs;w=w===void 0?this._zoom:w;var E=C.zoom(p*C.scale(w));return isNaN(E)?1/0:E},project:function(p,w){return w=w===void 0?this._zoom:w,this.options.crs.latLngToPoint(fe(p),w)},unproject:function(p,w){return w=w===void 0?this._zoom:w,this.options.crs.pointToLatLng(W(p),w)},layerPointToLatLng:function(p){var w=W(p).add(this.getPixelOrigin());return this.unproject(w)},latLngToLayerPoint:function(p){var w=this.project(fe(p))._round();return w._subtract(this.getPixelOrigin())},wrapLatLng:function(p){return this.options.crs.wrapLatLng(fe(p))},wrapLatLngBounds:function(p){return this.options.crs.wrapLatLngBounds(ne(p))},distance:function(p,w){return this.options.crs.distance(fe(p),fe(w))},containerPointToLayerPoint:function(p){return W(p).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(p){return W(p).add(this._getMapPanePos())},containerPointToLatLng:function(p){var w=this.containerPointToLayerPoint(W(p));return this.layerPointToLatLng(w)},latLngToContainerPoint:function(p){return this.layerPointToContainerPoint(this.latLngToLayerPoint(fe(p)))},mouseEventToContainerPoint:function(p){return u5(p,this._container)},mouseEventToLayerPoint:function(p){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(p))},mouseEventToLatLng:function(p){return this.layerPointToLatLng(this.mouseEventToLayerPoint(p))},_initContainer:function(p){var w=this._container=a5(p);if(w){if(w._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");st(w,"scroll",this._onScroll,this),this._containerId=l(w)},_initLayout:function(){var p=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ue.any3d,ut(p,"leaflet-container"+(Ue.touch?" leaflet-touch":"")+(Ue.retina?" leaflet-retina":"")+(Ue.ielt9?" leaflet-oldie":"")+(Ue.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var w=Jv(p,"position");w!=="absolute"&&w!=="relative"&&w!=="fixed"&&w!=="sticky"&&(p.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var p=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Cr(this._mapPane,new F(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ut(p.markerPane,"leaflet-zoom-hide"),ut(p.shadowPane,"leaflet-zoom-hide"))},_resetView:function(p,w,C){Cr(this._mapPane,new F(0,0));var E=!this._loaded;this._loaded=!0,w=this._limitZoom(w),this.fire("viewprereset");var R=this._zoom!==w;this._moveStart(R,C)._move(p,w)._moveEnd(R),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(p,w){return p&&this.fire("zoomstart"),w||this.fire("movestart"),this},_move:function(p,w,C,E){w===void 0&&(w=this._zoom);var R=this._zoom!==w;return this._zoom=w,this._lastCenter=p,this._pixelOrigin=this._getNewPixelOrigin(p),E?C&&C.pinch&&this.fire("zoom",C):((R||C&&C.pinch)&&this.fire("zoom",C),this.fire("move",C)),this},_moveEnd:function(p){return p&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return D(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(p){Cr(this._mapPane,this._getMapPanePos().subtract(p))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(p){this._targets={},this._targets[l(this._container)]=this;var w=p?Ht:st;w(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&w(window,"resize",this._onResize,this),Ue.any3d&&this.options.transform3DLimit&&(p?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){D(this._resizeRequest),this._resizeRequest=O(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var p=this._getMapPanePos();Math.max(Math.abs(p.x),Math.abs(p.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(p,w){for(var C=[],E,R=w==="mouseout"||w==="mouseover",G=p.target||p.srcElement,X=!1;G;){if(E=this._targets[l(G)],E&&(w==="click"||w==="preclick")&&this._draggableMoved(E)){X=!0;break}if(E&&E.listens(w,!0)&&(R&&!xA(G,p)||(C.push(E),R))||G===this._container)break;G=G.parentNode}return!C.length&&!X&&!R&&this.listens(w,!0)&&(C=[this]),C},_isClickDisabled:function(p){for(;p&&p!==this._container;){if(p._leaflet_disable_click)return!0;p=p.parentNode}},_handleDOMEvent:function(p){var w=p.target||p.srcElement;if(!(!this._loaded||w._leaflet_disable_events||p.type==="click"&&this._isClickDisabled(w))){var C=p.type;C==="mousedown"&&dA(w),this._fireDOMEvent(p,C)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(p,w,C){if(p.type==="click"){var E=i({},p);E.type="preclick",this._fireDOMEvent(E,E.type,C)}var R=this._findEventTargets(p,w);if(C){for(var G=[],X=0;X<C.length;X++)C[X].listens(w,!0)&&G.push(C[X]);R=G.concat(R)}if(R.length){w==="contextmenu"&&un(p);var te=R[0],oe={originalEvent:p};if(p.type!=="keypress"&&p.type!=="keydown"&&p.type!=="keyup"){var de=te.getLatLng&&(!te._radius||te._radius<=10);oe.containerPoint=de?this.latLngToContainerPoint(te.getLatLng()):this.mouseEventToContainerPoint(p),oe.layerPoint=this.containerPointToLayerPoint(oe.containerPoint),oe.latlng=de?te.getLatLng():this.layerPointToLatLng(oe.layerPoint)}for(X=0;X<R.length;X++)if(R[X].fire(w,oe,!0),oe.originalEvent._stopped||R[X].options.bubblingMouseEvents===!1&&S(this._mouseEvents,w)!==-1)return}},_draggableMoved:function(p){return p=p.dragging&&p.dragging.enabled()?p:this,p.dragging&&p.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var p=0,w=this._handlers.length;p<w;p++)this._handlers[p].disable()},whenReady:function(p,w){return this._loaded?p.call(w||this,{target:this}):this.on("load",p,w),this},_getMapPanePos:function(){return Tu(this._mapPane)||new F(0,0)},_moved:function(){var p=this._getMapPanePos();return p&&!p.equals([0,0])},_getTopLeftPoint:function(p,w){var C=p&&w!==void 0?this._getNewPixelOrigin(p,w):this.getPixelOrigin();return C.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(p,w){var C=this.getSize()._divideBy(2);return this.project(p,w)._subtract(C)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(p,w,C){var E=this._getNewPixelOrigin(C,w);return this.project(p,w)._subtract(E)},_latLngBoundsToNewLayerBounds:function(p,w,C){var E=this._getNewPixelOrigin(C,w);return Z([this.project(p.getSouthWest(),w)._subtract(E),this.project(p.getNorthWest(),w)._subtract(E),this.project(p.getSouthEast(),w)._subtract(E),this.project(p.getNorthEast(),w)._subtract(E)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(p){return this.latLngToLayerPoint(p).subtract(this._getCenterLayerPoint())},_limitCenter:function(p,w,C){if(!C)return p;var E=this.project(p,w),R=this.getSize().divideBy(2),G=new Y(E.subtract(R),E.add(R)),X=this._getBoundsOffset(G,C,w);return Math.abs(X.x)<=1&&Math.abs(X.y)<=1?p:this.unproject(E.add(X),w)},_limitOffset:function(p,w){if(!w)return p;var C=this.getPixelBounds(),E=new Y(C.min.add(p),C.max.add(p));return p.add(this._getBoundsOffset(E,w))},_getBoundsOffset:function(p,w,C){var E=Z(this.project(w.getNorthEast(),C),this.project(w.getSouthWest(),C)),R=E.min.subtract(p.min),G=E.max.subtract(p.max),X=this._rebound(R.x,-G.x),te=this._rebound(R.y,-G.y);return new F(X,te)},_rebound:function(p,w){return p+w>0?Math.round(p-w)/2:Math.max(0,Math.ceil(p))-Math.max(0,Math.floor(w))},_limitZoom:function(p){var w=this.getMinZoom(),C=this.getMaxZoom(),E=Ue.any3d?this.options.zoomSnap:1;return E&&(p=Math.round(p/E)*E),Math.max(w,Math.min(C,p))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_r(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(p,w){var C=this._getCenterOffset(p)._trunc();return(w&&w.animate)!==!0&&!this.getSize().contains(C)?!1:(this.panBy(C,w),!0)},_createAnimProxy:function(){var p=this._proxy=Tt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(p),this.on("zoomanim",function(w){var C=oA,E=this._proxy.style[C];Su(this._proxy,this.project(w.center,w.zoom),this.getZoomScale(w.zoom,1)),E===this._proxy.style[C]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ir(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var p=this.getCenter(),w=this.getZoom();Su(this._proxy,this.project(p,w),this.getZoomScale(w,1))},_catchTransitionEnd:function(p){this._animatingZoom&&p.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(p,w,C){if(this._animatingZoom)return!0;if(C=C||{},!this._zoomAnimated||C.animate===!1||this._nothingToAnimate()||Math.abs(w-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(w),R=this._getCenterOffset(p)._divideBy(1-1/E);return C.animate!==!0&&!this.getSize().contains(R)?!1:(O(function(){this._moveStart(!0,C.noMoveStart||!1)._animateZoom(p,w,!0)},this),!0)},_animateZoom:function(p,w,C,E){this._mapPane&&(C&&(this._animatingZoom=!0,this._animateToCenter=p,this._animateToZoom=w,ut(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:p,zoom:w,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_r(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function wae(p,w){return new bt(p,w)}var ba=j.extend({options:{position:"topright"},initialize:function(p){g(this,p)},getPosition:function(){return this.options.position},setPosition:function(p){var w=this._map;return w&&w.removeControl(this),this.options.position=p,w&&w.addControl(this),this},getContainer:function(){return this._container},addTo:function(p){this.remove(),this._map=p;var w=this._container=this.onAdd(p),C=this.getPosition(),E=p._controlCorners[C];return ut(w,"leaflet-control"),C.indexOf("bottom")!==-1?E.insertBefore(w,E.firstChild):E.appendChild(w),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ir(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(p){this._map&&p&&p.screenX>0&&p.screenY>0&&this._map.getContainer().focus()}}),ip=function(p){return new ba(p)};bt.include({addControl:function(p){return p.addTo(this),this},removeControl:function(p){return p.remove(),this},_initControlPos:function(){var p=this._controlCorners={},w="leaflet-",C=this._controlContainer=Tt("div",w+"control-container",this._container);function E(R,G){var X=w+R+" "+w+G;p[R+G]=Tt("div",X,C)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var p in this._controlCorners)ir(this._controlCorners[p]);ir(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var h5=ba.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(p,w,C,E){return C<E?-1:E<C?1:0}},initialize:function(p,w,C){g(this,C),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var E in p)this._addLayer(p[E],E);for(E in w)this._addLayer(w[E],E,!0)},onAdd:function(p){this._initLayout(),this._update(),this._map=p,p.on("zoomend",this._checkDisabledLayers,this);for(var w=0;w<this._layers.length;w++)this._layers[w].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(p){return ba.prototype.addTo.call(this,p),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var p=0;p<this._layers.length;p++)this._layers[p].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(p,w){return this._addLayer(p,w),this._map?this._update():this},addOverlay:function(p,w){return this._addLayer(p,w,!0),this._map?this._update():this},removeLayer:function(p){p.off("add remove",this._onLayerChange,this);var w=this._getLayer(l(p));return w&&this._layers.splice(this._layers.indexOf(w),1),this._map?this._update():this},expand:function(){ut(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var p=this._map.getSize().y-(this._container.offsetTop+50);return p<this._section.clientHeight?(ut(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=p+"px"):_r(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _r(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var p="leaflet-control-layers",w=this._container=Tt("div",p),C=this.options.collapsed;w.setAttribute("aria-haspopup",!0),np(w),yA(w);var E=this._section=Tt("section",p+"-list");C&&(this._map.on("click",this.collapse,this),st(w,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var R=this._layersLink=Tt("a",p+"-toggle",w);R.href="#",R.title="Layers",R.setAttribute("role","button"),st(R,{keydown:function(G){G.keyCode===13&&this._expandSafely()},click:function(G){un(G),this._expandSafely()}},this),C||this.expand(),this._baseLayersList=Tt("div",p+"-base",E),this._separator=Tt("div",p+"-separator",E),this._overlaysList=Tt("div",p+"-overlays",E),w.appendChild(E)},_getLayer:function(p){for(var w=0;w<this._layers.length;w++)if(this._layers[w]&&l(this._layers[w].layer)===p)return this._layers[w]},_addLayer:function(p,w,C){this._map&&p.on("add remove",this._onLayerChange,this),this._layers.push({layer:p,name:w,overlay:C}),this.options.sortLayers&&this._layers.sort(o(function(E,R){return this.options.sortFunction(E.layer,R.layer,E.name,R.name)},this)),this.options.autoZIndex&&p.setZIndex&&(this._lastZIndex++,p.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;C0(this._baseLayersList),C0(this._overlaysList),this._layerControlInputs=[];var p,w,C,E,R=0;for(C=0;C<this._layers.length;C++)E=this._layers[C],this._addItem(E),w=w||E.overlay,p=p||!E.overlay,R+=E.overlay?0:1;return this.options.hideSingleBase&&(p=p&&R>1,this._baseLayersList.style.display=p?"":"none"),this._separator.style.display=w&&p?"":"none",this},_onLayerChange:function(p){this._handlingClick||this._update();var w=this._getLayer(l(p.target)),C=w.overlay?p.type==="add"?"overlayadd":"overlayremove":p.type==="add"?"baselayerchange":null;C&&this._map.fire(C,w)},_createRadioElement:function(p,w){var C='<input type="radio" class="leaflet-control-layers-selector" name="'+p+'"'+(w?' checked="checked"':"")+"/>",E=document.createElement("div");return E.innerHTML=C,E.firstChild},_addItem:function(p){var w=document.createElement("label"),C=this._map.hasLayer(p.layer),E;p.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=C):E=this._createRadioElement("leaflet-base-layers_"+l(this),C),this._layerControlInputs.push(E),E.layerId=l(p.layer),st(E,"click",this._onInputClick,this);var R=document.createElement("span");R.innerHTML=" "+p.name;var G=document.createElement("span");w.appendChild(G),G.appendChild(E),G.appendChild(R);var X=p.overlay?this._overlaysList:this._baseLayersList;return X.appendChild(w),this._checkDisabledLayers(),w},_onInputClick:function(){if(!this._preventClick){var p=this._layerControlInputs,w,C,E=[],R=[];this._handlingClick=!0;for(var G=p.length-1;G>=0;G--)w=p[G],C=this._getLayer(w.layerId).layer,w.checked?E.push(C):w.checked||R.push(C);for(G=0;G<R.length;G++)this._map.hasLayer(R[G])&&this._map.removeLayer(R[G]);for(G=0;G<E.length;G++)this._map.hasLayer(E[G])||this._map.addLayer(E[G]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var p=this._layerControlInputs,w,C,E=this._map.getZoom(),R=p.length-1;R>=0;R--)w=p[R],C=this._getLayer(w.layerId).layer,w.disabled=C.options.minZoom!==void 0&&E<C.options.minZoom||C.options.maxZoom!==void 0&&E>C.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var p=this._section;this._preventClick=!0,st(p,"click",un),this.expand();var w=this;setTimeout(function(){Ht(p,"click",un),w._preventClick=!1})}}),Sae=function(p,w,C){return new h5(p,w,C)},_A=ba.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(p){var w="leaflet-control-zoom",C=Tt("div",w+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,w+"-in",C,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,w+"-out",C,this._zoomOut),this._updateDisabled(),p.on("zoomend zoomlevelschange",this._updateDisabled,this),C},onRemove:function(p){p.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(p){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(p.shiftKey?3:1))},_zoomOut:function(p){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(p.shiftKey?3:1))},_createButton:function(p,w,C,E,R){var G=Tt("a",C,E);return G.innerHTML=p,G.href="#",G.title=w,G.setAttribute("role","button"),G.setAttribute("aria-label",w),np(G),st(G,"click",Cu),st(G,"click",R,this),st(G,"click",this._refocusOnMap,this),G},_updateDisabled:function(){var p=this._map,w="leaflet-disabled";_r(this._zoomInButton,w),_r(this._zoomOutButton,w),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||p._zoom===p.getMinZoom())&&(ut(this._zoomOutButton,w),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||p._zoom===p.getMaxZoom())&&(ut(this._zoomInButton,w),this._zoomInButton.setAttribute("aria-disabled","true"))}});bt.mergeOptions({zoomControl:!0}),bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new _A,this.addControl(this.zoomControl))});var Tae=function(p){return new _A(p)},d5=ba.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(p){var w="leaflet-control-scale",C=Tt("div",w),E=this.options;return this._addScales(E,w+"-line",C),p.on(E.updateWhenIdle?"moveend":"move",this._update,this),p.whenReady(this._update,this),C},onRemove:function(p){p.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(p,w,C){p.metric&&(this._mScale=Tt("div",w,C)),p.imperial&&(this._iScale=Tt("div",w,C))},_update:function(){var p=this._map,w=p.getSize().y/2,C=p.distance(p.containerPointToLatLng([0,w]),p.containerPointToLatLng([this.options.maxWidth,w]));this._updateScales(C)},_updateScales:function(p){this.options.metric&&p&&this._updateMetric(p),this.options.imperial&&p&&this._updateImperial(p)},_updateMetric:function(p){var w=this._getRoundNum(p),C=w<1e3?w+" m":w/1e3+" km";this._updateScale(this._mScale,C,w/p)},_updateImperial:function(p){var w=p*3.2808399,C,E,R;w>5280?(C=w/5280,E=this._getRoundNum(C),this._updateScale(this._iScale,E+" mi",E/C)):(R=this._getRoundNum(w),this._updateScale(this._iScale,R+" ft",R/w))},_updateScale:function(p,w,C){p.style.width=Math.round(this.options.maxWidth*C)+"px",p.innerHTML=w},_getRoundNum:function(p){var w=Math.pow(10,(Math.floor(p)+"").length-1),C=p/w;return C=C>=10?10:C>=5?5:C>=3?3:C>=2?2:1,w*C}}),Aae=function(p){return new d5(p)},Cae='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',bA=ba.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ue.inlineSvg?Cae+" ":"")+"Leaflet</a>"},initialize:function(p){g(this,p),this._attributions={}},onAdd:function(p){p.attributionControl=this,this._container=Tt("div","leaflet-control-attribution"),np(this._container);for(var w in p._layers)p._layers[w].getAttribution&&this.addAttribution(p._layers[w].getAttribution());return this._update(),p.on("layeradd",this._addAttribution,this),this._container},onRemove:function(p){p.off("layeradd",this._addAttribution,this)},_addAttribution:function(p){p.layer.getAttribution&&(this.addAttribution(p.layer.getAttribution()),p.layer.once("remove",function(){this.removeAttribution(p.layer.getAttribution())},this))},setPrefix:function(p){return this.options.prefix=p,this._update(),this},addAttribution:function(p){return p?(this._attributions[p]||(this._attributions[p]=0),this._attributions[p]++,this._update(),this):this},removeAttribution:function(p){return p?(this._attributions[p]&&(this._attributions[p]--,this._update()),this):this},_update:function(){if(this._map){var p=[];for(var w in this._attributions)this._attributions[w]&&p.push(w);var C=[];this.options.prefix&&C.push(this.options.prefix),p.length&&C.push(p.join(", ")),this._container.innerHTML=C.join(' <span aria-hidden="true">|</span> ')}}});bt.mergeOptions({attributionControl:!0}),bt.addInitHook(function(){this.options.attributionControl&&new bA().addTo(this)});var Mae=function(p){return new bA(p)};ba.Layers=h5,ba.Zoom=_A,ba.Scale=d5,ba.Attribution=bA,ip.layers=Sae,ip.zoom=Tae,ip.scale=Aae,ip.attribution=Mae;var eo=j.extend({initialize:function(p){this._map=p},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});eo.addTo=function(p,w){return p.addHandler(w,this),this};var Pae={Events:$},v5=Ue.touch?"touchstart mousedown":"mousedown",el=U.extend({options:{clickTolerance:3},initialize:function(p,w,C,E){g(this,E),this._element=p,this._dragStartTarget=w||p,this._preventOutline=C},enable:function(){this._enabled||(st(this._dragStartTarget,v5,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(el._dragging===this&&this.finishDrag(!0),Ht(this._dragStartTarget,v5,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(p){if(this._enabled&&(this._moved=!1,!sA(this._element,"leaflet-zoom-anim"))){if(p.touches&&p.touches.length!==1){el._dragging===this&&this.finishDrag();return}if(!(el._dragging||p.shiftKey||p.which!==1&&p.button!==1&&!p.touches)&&(el._dragging=this,this._preventOutline&&dA(this._element),cA(),ep(),!this._moving)){this.fire("down");var w=p.touches?p.touches[0]:p,C=o5(this._element);this._startPoint=new F(w.clientX,w.clientY),this._startPos=Tu(this._element),this._parentScale=vA(C);var E=p.type==="mousedown";st(document,E?"mousemove":"touchmove",this._onMove,this),st(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(p){if(this._enabled){if(p.touches&&p.touches.length>1){this._moved=!0;return}var w=p.touches&&p.touches.length===1?p.touches[0]:p,C=new F(w.clientX,w.clientY)._subtract(this._startPoint);!C.x&&!C.y||Math.abs(C.x)+Math.abs(C.y)<this.options.clickTolerance||(C.x/=this._parentScale.x,C.y/=this._parentScale.y,un(p),this._moved||(this.fire("dragstart"),this._moved=!0,ut(document.body,"leaflet-dragging"),this._lastTarget=p.target||p.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ut(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(C),this._moving=!0,this._lastEvent=p,this._updatePosition())}},_updatePosition:function(){var p={originalEvent:this._lastEvent};this.fire("predrag",p),Cr(this._element,this._newPos),this.fire("drag",p)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(p){_r(document.body,"leaflet-dragging"),this._lastTarget&&(_r(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ht(document,"mousemove touchmove",this._onMove,this),Ht(document,"mouseup touchend touchcancel",this._onUp,this),fA(),tp();var w=this._moved&&this._moving;this._moving=!1,el._dragging=!1,w&&this.fire("dragend",{noInertia:p,distance:this._newPos.distanceTo(this._startPos)})}});function p5(p,w,C){var E,R=[1,4,2,8],G,X,te,oe,de,Ee,et,pt;for(G=0,Ee=p.length;G<Ee;G++)p[G]._code=Mu(p[G],w);for(te=0;te<4;te++){for(et=R[te],E=[],G=0,Ee=p.length,X=Ee-1;G<Ee;X=G++)oe=p[G],de=p[X],oe._code&et?de._code&et||(pt=I0(de,oe,et,w,C),pt._code=Mu(pt,w),E.push(pt)):(de._code&et&&(pt=I0(de,oe,et,w,C),pt._code=Mu(pt,w),E.push(pt)),E.push(oe));p=E}return p}function g5(p,w){var C,E,R,G,X,te,oe,de,Ee;if(!p||p.length===0)throw new Error("latlngs not passed");Bi(p)||(console.warn("latlngs are not flat! Only the first ring will be used"),p=p[0]);var et=fe([0,0]),pt=ne(p),Rn=pt.getNorthWest().distanceTo(pt.getSouthWest())*pt.getNorthEast().distanceTo(pt.getNorthWest());Rn<1700&&(et=wA(p));var Kr=p.length,zi=[];for(C=0;C<Kr;C++){var ei=fe(p[C]);zi.push(w.project(fe([ei.lat-et.lat,ei.lng-et.lng])))}for(te=oe=de=0,C=0,E=Kr-1;C<Kr;E=C++)R=zi[C],G=zi[E],X=R.y*G.x-G.y*R.x,oe+=(R.x+G.x)*X,de+=(R.y+G.y)*X,te+=X*3;te===0?Ee=zi[0]:Ee=[oe/te,de/te];var Ff=w.unproject(W(Ee));return fe([Ff.lat+et.lat,Ff.lng+et.lng])}function wA(p){for(var w=0,C=0,E=0,R=0;R<p.length;R++){var G=fe(p[R]);w+=G.lat,C+=G.lng,E++}return fe([w/E,C/E])}var Lae={__proto__:null,clipPolygon:p5,polygonCenter:g5,centroid:wA};function m5(p,w){if(!w||!p.length)return p.slice();var C=w*w;return p=Oae(p,C),p=Iae(p,C),p}function y5(p,w,C){return Math.sqrt(ap(p,w,C,!0))}function kae(p,w,C){return ap(p,w,C)}function Iae(p,w){var C=p.length,E=typeof Uint8Array<"u"?Uint8Array:Array,R=new E(C);R[0]=R[C-1]=1,SA(p,R,w,0,C-1);var G,X=[];for(G=0;G<C;G++)R[G]&&X.push(p[G]);return X}function SA(p,w,C,E,R){var G=0,X,te,oe;for(te=E+1;te<=R-1;te++)oe=ap(p[te],p[E],p[R],!0),oe>G&&(X=te,G=oe);G>C&&(w[X]=1,SA(p,w,C,E,X),SA(p,w,C,X,R))}function Oae(p,w){for(var C=[p[0]],E=1,R=0,G=p.length;E<G;E++)Eae(p[E],p[R])>w&&(C.push(p[E]),R=E);return R<G-1&&C.push(p[G-1]),C}var x5;function _5(p,w,C,E,R){var G=E?x5:Mu(p,C),X=Mu(w,C),te,oe,de;for(x5=X;;){if(!(G|X))return[p,w];if(G&X)return!1;te=G||X,oe=I0(p,w,te,C,R),de=Mu(oe,C),te===G?(p=oe,G=de):(w=oe,X=de)}}function I0(p,w,C,E,R){var G=w.x-p.x,X=w.y-p.y,te=E.min,oe=E.max,de,Ee;return C&8?(de=p.x+G*(oe.y-p.y)/X,Ee=oe.y):C&4?(de=p.x+G*(te.y-p.y)/X,Ee=te.y):C&2?(de=oe.x,Ee=p.y+X*(oe.x-p.x)/G):C&1&&(de=te.x,Ee=p.y+X*(te.x-p.x)/G),new F(de,Ee,R)}function Mu(p,w){var C=0;return p.x<w.min.x?C|=1:p.x>w.max.x&&(C|=2),p.y<w.min.y?C|=4:p.y>w.max.y&&(C|=8),C}function Eae(p,w){var C=w.x-p.x,E=w.y-p.y;return C*C+E*E}function ap(p,w,C,E){var R=w.x,G=w.y,X=C.x-R,te=C.y-G,oe=X*X+te*te,de;return oe>0&&(de=((p.x-R)*X+(p.y-G)*te)/oe,de>1?(R=C.x,G=C.y):de>0&&(R+=X*de,G+=te*de)),X=p.x-R,te=p.y-G,E?X*X+te*te:new F(R,G)}function Bi(p){return!b(p[0])||typeof p[0][0]!="object"&&typeof p[0][0]<"u"}function b5(p){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Bi(p)}function w5(p,w){var C,E,R,G,X,te,oe,de;if(!p||p.length===0)throw new Error("latlngs not passed");Bi(p)||(console.warn("latlngs are not flat! Only the first ring will be used"),p=p[0]);var Ee=fe([0,0]),et=ne(p),pt=et.getNorthWest().distanceTo(et.getSouthWest())*et.getNorthEast().distanceTo(et.getNorthWest());pt<1700&&(Ee=wA(p));var Rn=p.length,Kr=[];for(C=0;C<Rn;C++){var zi=fe(p[C]);Kr.push(w.project(fe([zi.lat-Ee.lat,zi.lng-Ee.lng])))}for(C=0,E=0;C<Rn-1;C++)E+=Kr[C].distanceTo(Kr[C+1])/2;if(E===0)de=Kr[0];else for(C=0,G=0;C<Rn-1;C++)if(X=Kr[C],te=Kr[C+1],R=X.distanceTo(te),G+=R,G>E){oe=(G-E)/R,de=[te.x-oe*(te.x-X.x),te.y-oe*(te.y-X.y)];break}var ei=w.unproject(W(de));return fe([ei.lat+Ee.lat,ei.lng+Ee.lng])}var Dae={__proto__:null,simplify:m5,pointToSegmentDistance:y5,closestPointOnSegment:kae,clipSegment:_5,_getEdgeIntersection:I0,_getBitCode:Mu,_sqClosestPointOnSegment:ap,isFlat:Bi,_flat:b5,polylineCenter:w5},TA={project:function(p){return new F(p.lng,p.lat)},unproject:function(p){return new le(p.y,p.x)},bounds:new Y([-180,-90],[180,90])},AA={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(p){var w=Math.PI/180,C=this.R,E=p.lat*w,R=this.R_MINOR/C,G=Math.sqrt(1-R*R),X=G*Math.sin(E),te=Math.tan(Math.PI/4-E/2)/Math.pow((1-X)/(1+X),G/2);return E=-C*Math.log(Math.max(te,1e-10)),new F(p.lng*w*C,E)},unproject:function(p){for(var w=180/Math.PI,C=this.R,E=this.R_MINOR/C,R=Math.sqrt(1-E*E),G=Math.exp(-p.y/C),X=Math.PI/2-2*Math.atan(G),te=0,oe=.1,de;te<15&&Math.abs(oe)>1e-7;te++)de=R*Math.sin(X),de=Math.pow((1-de)/(1+de),R/2),oe=Math.PI/2-2*Math.atan(G*de)-X,X+=oe;return new le(X*w,p.x*w/C)}},Nae={__proto__:null,LonLat:TA,Mercator:AA,SphericalMercator:he},jae=i({},xe,{code:"EPSG:3395",projection:AA,transformation:function(){var p=.5/(Math.PI*AA.R);return ee(p,.5,-p,.5)}()}),S5=i({},xe,{code:"EPSG:4326",projection:TA,transformation:ee(1/180,1,-1/180,.5)}),Rae=i({},ze,{projection:TA,transformation:ee(1,0,-1,0),scale:function(p){return Math.pow(2,p)},zoom:function(p){return Math.log(p)/Math.LN2},distance:function(p,w){var C=w.lng-p.lng,E=w.lat-p.lat;return Math.sqrt(C*C+E*E)},infinite:!0});ze.Earth=xe,ze.EPSG3395=jae,ze.EPSG3857=Ve,ze.EPSG900913=Se,ze.EPSG4326=S5,ze.Simple=Rae;var wa=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(p){return p.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(p){return p&&p.removeLayer(this),this},getPane:function(p){return this._map.getPane(p?this.options[p]||p:this.options.pane)},addInteractiveTarget:function(p){return this._map._targets[l(p)]=this,this},removeInteractiveTarget:function(p){return delete this._map._targets[l(p)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(p){var w=p.target;if(w.hasLayer(this)){if(this._map=w,this._zoomAnimated=w._zoomAnimated,this.getEvents){var C=this.getEvents();w.on(C,this),this.once("remove",function(){w.off(C,this)},this)}this.onAdd(w),this.fire("add"),w.fire("layeradd",{layer:this})}}});bt.include({addLayer:function(p){if(!p._layerAdd)throw new Error("The provided object is not a Layer.");var w=l(p);return this._layers[w]?this:(this._layers[w]=p,p._mapToAdd=this,p.beforeAdd&&p.beforeAdd(this),this.whenReady(p._layerAdd,p),this)},removeLayer:function(p){var w=l(p);return this._layers[w]?(this._loaded&&p.onRemove(this),delete this._layers[w],this._loaded&&(this.fire("layerremove",{layer:p}),p.fire("remove")),p._map=p._mapToAdd=null,this):this},hasLayer:function(p){return l(p)in this._layers},eachLayer:function(p,w){for(var C in this._layers)p.call(w,this._layers[C]);return this},_addLayers:function(p){p=p?b(p)?p:[p]:[];for(var w=0,C=p.length;w<C;w++)this.addLayer(p[w])},_addZoomLimit:function(p){(!isNaN(p.options.maxZoom)||!isNaN(p.options.minZoom))&&(this._zoomBoundLayers[l(p)]=p,this._updateZoomLevels())},_removeZoomLimit:function(p){var w=l(p);this._zoomBoundLayers[w]&&(delete this._zoomBoundLayers[w],this._updateZoomLevels())},_updateZoomLevels:function(){var p=1/0,w=-1/0,C=this._getZoomSpan();for(var E in this._zoomBoundLayers){var R=this._zoomBoundLayers[E].options;p=R.minZoom===void 0?p:Math.min(p,R.minZoom),w=R.maxZoom===void 0?w:Math.max(w,R.maxZoom)}this._layersMaxZoom=w===-1/0?void 0:w,this._layersMinZoom=p===1/0?void 0:p,C!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var jf=wa.extend({initialize:function(p,w){g(this,w),this._layers={};var C,E;if(p)for(C=0,E=p.length;C<E;C++)this.addLayer(p[C])},addLayer:function(p){var w=this.getLayerId(p);return this._layers[w]=p,this._map&&this._map.addLayer(p),this},removeLayer:function(p){var w=p in this._layers?p:this.getLayerId(p);return this._map&&this._layers[w]&&this._map.removeLayer(this._layers[w]),delete this._layers[w],this},hasLayer:function(p){var w=typeof p=="number"?p:this.getLayerId(p);return w in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(p){var w=Array.prototype.slice.call(arguments,1),C,E;for(C in this._layers)E=this._layers[C],E[p]&&E[p].apply(E,w);return this},onAdd:function(p){this.eachLayer(p.addLayer,p)},onRemove:function(p){this.eachLayer(p.removeLayer,p)},eachLayer:function(p,w){for(var C in this._layers)p.call(w,this._layers[C]);return this},getLayer:function(p){return this._layers[p]},getLayers:function(){var p=[];return this.eachLayer(p.push,p),p},setZIndex:function(p){return this.invoke("setZIndex",p)},getLayerId:function(p){return l(p)}}),Bae=function(p,w){return new jf(p,w)},Xo=jf.extend({addLayer:function(p){return this.hasLayer(p)?this:(p.addEventParent(this),jf.prototype.addLayer.call(this,p),this.fire("layeradd",{layer:p}))},removeLayer:function(p){return this.hasLayer(p)?(p in this._layers&&(p=this._layers[p]),p.removeEventParent(this),jf.prototype.removeLayer.call(this,p),this.fire("layerremove",{layer:p})):this},setStyle:function(p){return this.invoke("setStyle",p)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var p=new J;for(var w in this._layers){var C=this._layers[w];p.extend(C.getBounds?C.getBounds():C.getLatLng())}return p}}),zae=function(p,w){return new Xo(p,w)},Rf=j.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(p){g(this,p)},createIcon:function(p){return this._createIcon("icon",p)},createShadow:function(p){return this._createIcon("shadow",p)},_createIcon:function(p,w){var C=this._getIconUrl(p);if(!C){if(p==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var E=this._createImg(C,w&&w.tagName==="IMG"?w:null);return this._setIconStyles(E,p),(this.options.crossOrigin||this.options.crossOrigin==="")&&(E.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),E},_setIconStyles:function(p,w){var C=this.options,E=C[w+"Size"];typeof E=="number"&&(E=[E,E]);var R=W(E),G=W(w==="shadow"&&C.shadowAnchor||C.iconAnchor||R&&R.divideBy(2,!0));p.className="leaflet-marker-"+w+" "+(C.className||""),G&&(p.style.marginLeft=-G.x+"px",p.style.marginTop=-G.y+"px"),R&&(p.style.width=R.x+"px",p.style.height=R.y+"px")},_createImg:function(p,w){return w=w||document.createElement("img"),w.src=p,w},_getIconUrl:function(p){return Ue.retina&&this.options[p+"RetinaUrl"]||this.options[p+"Url"]}});function $ae(p){return new Rf(p)}var op=Rf.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(p){return typeof op.imagePath!="string"&&(op.imagePath=this._detectIconPath()),(this.options.imagePath||op.imagePath)+Rf.prototype._getIconUrl.call(this,p)},_stripUrl:function(p){var w=function(C,E,R){var G=E.exec(C);return G&&G[R]};return p=w(p,/^url\((['"])?(.+)\1\)$/,2),p&&w(p,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var p=Tt("div","leaflet-default-icon-path",document.body),w=Jv(p,"background-image")||Jv(p,"backgroundImage");if(document.body.removeChild(p),w=this._stripUrl(w),w)return w;var C=document.querySelector('link[href$="leaflet.css"]');return C?C.href.substring(0,C.href.length-11-1):""}}),T5=eo.extend({initialize:function(p){this._marker=p},addHooks:function(){var p=this._marker._icon;this._draggable||(this._draggable=new el(p,p,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ut(p,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&_r(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(p){var w=this._marker,C=w._map,E=this._marker.options.autoPanSpeed,R=this._marker.options.autoPanPadding,G=Tu(w._icon),X=C.getPixelBounds(),te=C.getPixelOrigin(),oe=Z(X.min._subtract(te).add(R),X.max._subtract(te).subtract(R));if(!oe.contains(G)){var de=W((Math.max(oe.max.x,G.x)-oe.max.x)/(X.max.x-oe.max.x)-(Math.min(oe.min.x,G.x)-oe.min.x)/(X.min.x-oe.min.x),(Math.max(oe.max.y,G.y)-oe.max.y)/(X.max.y-oe.max.y)-(Math.min(oe.min.y,G.y)-oe.min.y)/(X.min.y-oe.min.y)).multiplyBy(E);C.panBy(de,{animate:!1}),this._draggable._newPos._add(de),this._draggable._startPos._add(de),Cr(w._icon,this._draggable._newPos),this._onDrag(p),this._panRequest=O(this._adjustPan.bind(this,p))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(p){this._marker.options.autoPan&&(D(this._panRequest),this._panRequest=O(this._adjustPan.bind(this,p)))},_onDrag:function(p){var w=this._marker,C=w._shadow,E=Tu(w._icon),R=w._map.layerPointToLatLng(E);C&&Cr(C,E),w._latlng=R,p.latlng=R,p.oldLatLng=this._oldLatLng,w.fire("move",p).fire("drag",p)},_onDragEnd:function(p){D(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",p)}}),O0=wa.extend({options:{icon:new op,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(p,w){g(this,w),this._latlng=fe(p)},onAdd:function(p){this._zoomAnimated=this._zoomAnimated&&p.options.markerZoomAnimation,this._zoomAnimated&&p.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(p){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&p.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(p){var w=this._latlng;return this._latlng=fe(p),this.update(),this.fire("move",{oldLatLng:w,latlng:this._latlng})},setZIndexOffset:function(p){return this.options.zIndexOffset=p,this.update()},getIcon:function(){return this.options.icon},setIcon:function(p){return this.options.icon=p,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var p=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(p)}return this},_initIcon:function(){var p=this.options,w="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),C=p.icon.createIcon(this._icon),E=!1;C!==this._icon&&(this._icon&&this._removeIcon(),E=!0,p.title&&(C.title=p.title),C.tagName==="IMG"&&(C.alt=p.alt||"")),ut(C,w),p.keyboard&&(C.tabIndex="0",C.setAttribute("role","button")),this._icon=C,p.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&st(C,"focus",this._panOnFocus,this);var R=p.icon.createShadow(this._shadow),G=!1;R!==this._shadow&&(this._removeShadow(),G=!0),R&&(ut(R,w),R.alt=""),this._shadow=R,p.opacity<1&&this._updateOpacity(),E&&this.getPane().appendChild(this._icon),this._initInteraction(),R&&G&&this.getPane(p.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ht(this._icon,"focus",this._panOnFocus,this),ir(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ir(this._shadow),this._shadow=null},_setPos:function(p){this._icon&&Cr(this._icon,p),this._shadow&&Cr(this._shadow,p),this._zIndex=p.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(p){this._icon&&(this._icon.style.zIndex=this._zIndex+p)},_animateZoom:function(p){var w=this._map._latLngToNewLayerPoint(this._latlng,p.zoom,p.center).round();this._setPos(w)},_initInteraction:function(){if(this.options.interactive&&(ut(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),T5)){var p=this.options.draggable;this.dragging&&(p=this.dragging.enabled(),this.dragging.disable()),this.dragging=new T5(this),p&&this.dragging.enable()}},setOpacity:function(p){return this.options.opacity=p,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var p=this.options.opacity;this._icon&&Ri(this._icon,p),this._shadow&&Ri(this._shadow,p)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var p=this._map;if(p){var w=this.options.icon.options,C=w.iconSize?W(w.iconSize):W(0,0),E=w.iconAnchor?W(w.iconAnchor):W(0,0);p.panInside(this._latlng,{paddingTopLeft:E,paddingBottomRight:C.subtract(E)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Fae(p,w){return new O0(p,w)}var tl=wa.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(p){this._renderer=p.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(p){return g(this,p),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&p&&Object.prototype.hasOwnProperty.call(p,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),E0=tl.extend({options:{fill:!0,radius:10},initialize:function(p,w){g(this,w),this._latlng=fe(p),this._radius=this.options.radius},setLatLng:function(p){var w=this._latlng;return this._latlng=fe(p),this.redraw(),this.fire("move",{oldLatLng:w,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(p){return this.options.radius=this._radius=p,this.redraw()},getRadius:function(){return this._radius},setStyle:function(p){var w=p&&p.radius||this._radius;return tl.prototype.setStyle.call(this,p),this.setRadius(w),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var p=this._radius,w=this._radiusY||p,C=this._clickTolerance(),E=[p+C,w+C];this._pxBounds=new Y(this._point.subtract(E),this._point.add(E))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(p){return p.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Vae(p,w){return new E0(p,w)}var CA=E0.extend({initialize:function(p,w,C){if(typeof w=="number"&&(w=i({},C,{radius:w})),g(this,w),this._latlng=fe(p),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(p){return this._mRadius=p,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var p=[this._radius,this._radiusY||this._radius];return new J(this._map.layerPointToLatLng(this._point.subtract(p)),this._map.layerPointToLatLng(this._point.add(p)))},setStyle:tl.prototype.setStyle,_project:function(){var p=this._latlng.lng,w=this._latlng.lat,C=this._map,E=C.options.crs;if(E.distance===xe.distance){var R=Math.PI/180,G=this._mRadius/xe.R/R,X=C.project([w+G,p]),te=C.project([w-G,p]),oe=X.add(te).divideBy(2),de=C.unproject(oe).lat,Ee=Math.acos((Math.cos(G*R)-Math.sin(w*R)*Math.sin(de*R))/(Math.cos(w*R)*Math.cos(de*R)))/R;(isNaN(Ee)||Ee===0)&&(Ee=G/Math.cos(Math.PI/180*w)),this._point=oe.subtract(C.getPixelOrigin()),this._radius=isNaN(Ee)?0:oe.x-C.project([de,p-Ee]).x,this._radiusY=oe.y-X.y}else{var et=E.unproject(E.project(this._latlng).subtract([this._mRadius,0]));this._point=C.latLngToLayerPoint(this._latlng),this._radius=this._point.x-C.latLngToLayerPoint(et).x}this._updateBounds()}});function Gae(p,w,C){return new CA(p,w,C)}var qo=tl.extend({options:{smoothFactor:1,noClip:!1},initialize:function(p,w){g(this,w),this._setLatLngs(p)},getLatLngs:function(){return this._latlngs},setLatLngs:function(p){return this._setLatLngs(p),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(p){for(var w=1/0,C=null,E=ap,R,G,X=0,te=this._parts.length;X<te;X++)for(var oe=this._parts[X],de=1,Ee=oe.length;de<Ee;de++){R=oe[de-1],G=oe[de];var et=E(p,R,G,!0);et<w&&(w=et,C=E(p,R,G))}return C&&(C.distance=Math.sqrt(w)),C},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return w5(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(p,w){return w=w||this._defaultShape(),p=fe(p),w.push(p),this._bounds.extend(p),this.redraw()},_setLatLngs:function(p){this._bounds=new J,this._latlngs=this._convertLatLngs(p)},_defaultShape:function(){return Bi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(p){for(var w=[],C=Bi(p),E=0,R=p.length;E<R;E++)C?(w[E]=fe(p[E]),this._bounds.extend(w[E])):w[E]=this._convertLatLngs(p[E]);return w},_project:function(){var p=new Y;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,p),this._bounds.isValid()&&p.isValid()&&(this._rawPxBounds=p,this._updateBounds())},_updateBounds:function(){var p=this._clickTolerance(),w=new F(p,p);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(w),this._rawPxBounds.max.add(w)]))},_projectLatlngs:function(p,w,C){var E=p[0]instanceof le,R=p.length,G,X;if(E){for(X=[],G=0;G<R;G++)X[G]=this._map.latLngToLayerPoint(p[G]),C.extend(X[G]);w.push(X)}else for(G=0;G<R;G++)this._projectLatlngs(p[G],w,C)},_clipPoints:function(){var p=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(p))){if(this.options.noClip){this._parts=this._rings;return}var w=this._parts,C,E,R,G,X,te,oe;for(C=0,R=0,G=this._rings.length;C<G;C++)for(oe=this._rings[C],E=0,X=oe.length;E<X-1;E++)te=_5(oe[E],oe[E+1],p,E,!0),te&&(w[R]=w[R]||[],w[R].push(te[0]),(te[1]!==oe[E+1]||E===X-2)&&(w[R].push(te[1]),R++))}},_simplifyPoints:function(){for(var p=this._parts,w=this.options.smoothFactor,C=0,E=p.length;C<E;C++)p[C]=m5(p[C],w)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(p,w){var C,E,R,G,X,te,oe=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(p))return!1;for(C=0,G=this._parts.length;C<G;C++)for(te=this._parts[C],E=0,X=te.length,R=X-1;E<X;R=E++)if(!(!w&&E===0)&&y5(p,te[R],te[E])<=oe)return!0;return!1}});function Wae(p,w){return new qo(p,w)}qo._flat=b5;var Bf=qo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return g5(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(p){var w=qo.prototype._convertLatLngs.call(this,p),C=w.length;return C>=2&&w[0]instanceof le&&w[0].equals(w[C-1])&&w.pop(),w},_setLatLngs:function(p){qo.prototype._setLatLngs.call(this,p),Bi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Bi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var p=this._renderer._bounds,w=this.options.weight,C=new F(w,w);if(p=new Y(p.min.subtract(C),p.max.add(C)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(p))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,R=this._rings.length,G;E<R;E++)G=p5(this._rings[E],p,!0),G.length&&this._parts.push(G)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(p){var w=!1,C,E,R,G,X,te,oe,de;if(!this._pxBounds||!this._pxBounds.contains(p))return!1;for(G=0,oe=this._parts.length;G<oe;G++)for(C=this._parts[G],X=0,de=C.length,te=de-1;X<de;te=X++)E=C[X],R=C[te],E.y>p.y!=R.y>p.y&&p.x<(R.x-E.x)*(p.y-E.y)/(R.y-E.y)+E.x&&(w=!w);return w||qo.prototype._containsPoint.call(this,p,!0)}});function Hae(p,w){return new Bf(p,w)}var Ko=Xo.extend({initialize:function(p,w){g(this,w),this._layers={},p&&this.addData(p)},addData:function(p){var w=b(p)?p:p.features,C,E,R;if(w){for(C=0,E=w.length;C<E;C++)R=w[C],(R.geometries||R.geometry||R.features||R.coordinates)&&this.addData(R);return this}var G=this.options;if(G.filter&&!G.filter(p))return this;var X=D0(p,G);return X?(X.feature=R0(p),X.defaultOptions=X.options,this.resetStyle(X),G.onEachFeature&&G.onEachFeature(p,X),this.addLayer(X)):this},resetStyle:function(p){return p===void 0?this.eachLayer(this.resetStyle,this):(p.options=i({},p.defaultOptions),this._setLayerStyle(p,this.options.style),this)},setStyle:function(p){return this.eachLayer(function(w){this._setLayerStyle(w,p)},this)},_setLayerStyle:function(p,w){p.setStyle&&(typeof w=="function"&&(w=w(p.feature)),p.setStyle(w))}});function D0(p,w){var C=p.type==="Feature"?p.geometry:p,E=C?C.coordinates:null,R=[],G=w&&w.pointToLayer,X=w&&w.coordsToLatLng||MA,te,oe,de,Ee;if(!E&&!C)return null;switch(C.type){case"Point":return te=X(E),A5(G,p,te,w);case"MultiPoint":for(de=0,Ee=E.length;de<Ee;de++)te=X(E[de]),R.push(A5(G,p,te,w));return new Xo(R);case"LineString":case"MultiLineString":return oe=N0(E,C.type==="LineString"?0:1,X),new qo(oe,w);case"Polygon":case"MultiPolygon":return oe=N0(E,C.type==="Polygon"?1:2,X),new Bf(oe,w);case"GeometryCollection":for(de=0,Ee=C.geometries.length;de<Ee;de++){var et=D0({geometry:C.geometries[de],type:"Feature",properties:p.properties},w);et&&R.push(et)}return new Xo(R);case"FeatureCollection":for(de=0,Ee=C.features.length;de<Ee;de++){var pt=D0(C.features[de],w);pt&&R.push(pt)}return new Xo(R);default:throw new Error("Invalid GeoJSON object.")}}function A5(p,w,C,E){return p?p(w,C):new O0(C,E&&E.markersInheritOptions&&E)}function MA(p){return new le(p[1],p[0],p[2])}function N0(p,w,C){for(var E=[],R=0,G=p.length,X;R<G;R++)X=w?N0(p[R],w-1,C):(C||MA)(p[R]),E.push(X);return E}function PA(p,w){return p=fe(p),p.alt!==void 0?[h(p.lng,w),h(p.lat,w),h(p.alt,w)]:[h(p.lng,w),h(p.lat,w)]}function j0(p,w,C,E){for(var R=[],G=0,X=p.length;G<X;G++)R.push(w?j0(p[G],Bi(p[G])?0:w-1,C,E):PA(p[G],E));return!w&&C&&R.length>0&&R.push(R[0].slice()),R}function zf(p,w){return p.feature?i({},p.feature,{geometry:w}):R0(w)}function R0(p){return p.type==="Feature"||p.type==="FeatureCollection"?p:{type:"Feature",properties:{},geometry:p}}var LA={toGeoJSON:function(p){return zf(this,{type:"Point",coordinates:PA(this.getLatLng(),p)})}};O0.include(LA),CA.include(LA),E0.include(LA),qo.include({toGeoJSON:function(p){var w=!Bi(this._latlngs),C=j0(this._latlngs,w?1:0,!1,p);return zf(this,{type:(w?"Multi":"")+"LineString",coordinates:C})}}),Bf.include({toGeoJSON:function(p){var w=!Bi(this._latlngs),C=w&&!Bi(this._latlngs[0]),E=j0(this._latlngs,C?2:w?1:0,!0,p);return w||(E=[E]),zf(this,{type:(C?"Multi":"")+"Polygon",coordinates:E})}}),jf.include({toMultiPoint:function(p){var w=[];return this.eachLayer(function(C){w.push(C.toGeoJSON(p).geometry.coordinates)}),zf(this,{type:"MultiPoint",coordinates:w})},toGeoJSON:function(p){var w=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(w==="MultiPoint")return this.toMultiPoint(p);var C=w==="GeometryCollection",E=[];return this.eachLayer(function(R){if(R.toGeoJSON){var G=R.toGeoJSON(p);if(C)E.push(G.geometry);else{var X=R0(G);X.type==="FeatureCollection"?E.push.apply(E,X.features):E.push(X)}}}),C?zf(this,{geometries:E,type:"GeometryCollection"}):{type:"FeatureCollection",features:E}}});function C5(p,w){return new Ko(p,w)}var Uae=C5,B0=wa.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(p,w,C){this._url=p,this._bounds=ne(w),g(this,C)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ut(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ir(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(p){return this.options.opacity=p,this._image&&this._updateOpacity(),this},setStyle:function(p){return p.opacity&&this.setOpacity(p.opacity),this},bringToFront:function(){return this._map&&Df(this._image),this},bringToBack:function(){return this._map&&Nf(this._image),this},setUrl:function(p){return this._url=p,this._image&&(this._image.src=p),this},setBounds:function(p){return this._bounds=ne(p),this._map&&this._reset(),this},getEvents:function(){var p={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(p.zoomanim=this._animateZoom),p},setZIndex:function(p){return this.options.zIndex=p,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var p=this._url.tagName==="IMG",w=this._image=p?this._url:Tt("img");if(ut(w,"leaflet-image-layer"),this._zoomAnimated&&ut(w,"leaflet-zoom-animated"),this.options.className&&ut(w,this.options.className),w.onselectstart=f,w.onmousemove=f,w.onload=o(this.fire,this,"load"),w.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),p){this._url=w.src;return}w.src=this._url,w.alt=this.options.alt},_animateZoom:function(p){var w=this._map.getZoomScale(p.zoom),C=this._map._latLngBoundsToNewLayerBounds(this._bounds,p.zoom,p.center).min;Su(this._image,C,w)},_reset:function(){var p=this._image,w=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),C=w.getSize();Cr(p,w.min),p.style.width=C.x+"px",p.style.height=C.y+"px"},_updateOpacity:function(){Ri(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var p=this.options.errorOverlayUrl;p&&this._url!==p&&(this._url=p,this._image.src=p)},getCenter:function(){return this._bounds.getCenter()}}),Zae=function(p,w,C){return new B0(p,w,C)},M5=B0.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var p=this._url.tagName==="VIDEO",w=this._image=p?this._url:Tt("video");if(ut(w,"leaflet-image-layer"),this._zoomAnimated&&ut(w,"leaflet-zoom-animated"),this.options.className&&ut(w,this.options.className),w.onselectstart=f,w.onmousemove=f,w.onloadeddata=o(this.fire,this,"load"),p){for(var C=w.getElementsByTagName("source"),E=[],R=0;R<C.length;R++)E.push(C[R].src);this._url=C.length>0?E:[w.src];return}b(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(w.style,"objectFit")&&(w.style.objectFit="fill"),w.autoplay=!!this.options.autoplay,w.loop=!!this.options.loop,w.muted=!!this.options.muted,w.playsInline=!!this.options.playsInline;for(var G=0;G<this._url.length;G++){var X=Tt("source");X.src=this._url[G],w.appendChild(X)}}});function Yae(p,w,C){return new M5(p,w,C)}var P5=B0.extend({_initImage:function(){var p=this._image=this._url;ut(p,"leaflet-image-layer"),this._zoomAnimated&&ut(p,"leaflet-zoom-animated"),this.options.className&&ut(p,this.options.className),p.onselectstart=f,p.onmousemove=f}});function Xae(p,w,C){return new P5(p,w,C)}var to=wa.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(p,w){p&&(p instanceof le||b(p))?(this._latlng=fe(p),g(this,w)):(g(this,p),this._source=w),this.options.content&&(this._content=this.options.content)},openOn:function(p){return p=arguments.length?p:this._source._map,p.hasLayer(this)||p.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(p){return this._map?this.close():(arguments.length?this._source=p:p=this._source,this._prepareOpen(),this.openOn(p._map)),this},onAdd:function(p){this._zoomAnimated=p._zoomAnimated,this._container||this._initLayout(),p._fadeAnimated&&Ri(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),p._fadeAnimated&&Ri(this._container,1),this.bringToFront(),this.options.interactive&&(ut(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(p){p._fadeAnimated?(Ri(this._container,0),this._removeTimeout=setTimeout(o(ir,void 0,this._container),200)):ir(this._container),this.options.interactive&&(_r(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(p){return this._latlng=fe(p),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(p){return this._content=p,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var p={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(p.zoomanim=this._animateZoom),p},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Df(this._container),this},bringToBack:function(){return this._map&&Nf(this._container),this},_prepareOpen:function(p){var w=this._source;if(!w._map)return!1;if(w instanceof Xo){w=null;var C=this._source._layers;for(var E in C)if(C[E]._map){w=C[E];break}if(!w)return!1;this._source=w}if(!p)if(w.getCenter)p=w.getCenter();else if(w.getLatLng)p=w.getLatLng();else if(w.getBounds)p=w.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(p),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var p=this._contentNode,w=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof w=="string")p.innerHTML=w;else{for(;p.hasChildNodes();)p.removeChild(p.firstChild);p.appendChild(w)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var p=this._map.latLngToLayerPoint(this._latlng),w=W(this.options.offset),C=this._getAnchor();this._zoomAnimated?Cr(this._container,p.add(C)):w=w.add(p).add(C);var E=this._containerBottom=-w.y,R=this._containerLeft=-Math.round(this._containerWidth/2)+w.x;this._container.style.bottom=E+"px",this._container.style.left=R+"px"}},_getAnchor:function(){return[0,0]}});bt.include({_initOverlay:function(p,w,C,E){var R=w;return R instanceof p||(R=new p(E).setContent(w)),C&&R.setLatLng(C),R}}),wa.include({_initOverlay:function(p,w,C,E){var R=C;return R instanceof p?(g(R,E),R._source=this):(R=w&&!E?w:new p(E,this),R.setContent(C)),R}});var z0=to.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(p){return p=arguments.length?p:this._source._map,!p.hasLayer(this)&&p._popup&&p._popup.options.autoClose&&p.removeLayer(p._popup),p._popup=this,to.prototype.openOn.call(this,p)},onAdd:function(p){to.prototype.onAdd.call(this,p),p.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof tl||this._source.on("preclick",Au))},onRemove:function(p){to.prototype.onRemove.call(this,p),p.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof tl||this._source.off("preclick",Au))},getEvents:function(){var p=to.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(p.preclick=this.close),this.options.keepInView&&(p.moveend=this._adjustPan),p},_initLayout:function(){var p="leaflet-popup",w=this._container=Tt("div",p+" "+(this.options.className||"")+" leaflet-zoom-animated"),C=this._wrapper=Tt("div",p+"-content-wrapper",w);if(this._contentNode=Tt("div",p+"-content",C),np(w),yA(this._contentNode),st(w,"contextmenu",Au),this._tipContainer=Tt("div",p+"-tip-container",w),this._tip=Tt("div",p+"-tip",this._tipContainer),this.options.closeButton){var E=this._closeButton=Tt("a",p+"-close-button",w);E.setAttribute("role","button"),E.setAttribute("aria-label","Close popup"),E.href="#close",E.innerHTML='<span aria-hidden="true">×</span>',st(E,"click",function(R){un(R),this.close()},this)}},_updateLayout:function(){var p=this._contentNode,w=p.style;w.width="",w.whiteSpace="nowrap";var C=p.offsetWidth;C=Math.min(C,this.options.maxWidth),C=Math.max(C,this.options.minWidth),w.width=C+1+"px",w.whiteSpace="",w.height="";var E=p.offsetHeight,R=this.options.maxHeight,G="leaflet-popup-scrolled";R&&E>R?(w.height=R+"px",ut(p,G)):_r(p,G),this._containerWidth=this._container.offsetWidth},_animateZoom:function(p){var w=this._map._latLngToNewLayerPoint(this._latlng,p.zoom,p.center),C=this._getAnchor();Cr(this._container,w.add(C))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var p=this._map,w=parseInt(Jv(this._container,"marginBottom"),10)||0,C=this._container.offsetHeight+w,E=this._containerWidth,R=new F(this._containerLeft,-C-this._containerBottom);R._add(Tu(this._container));var G=p.layerPointToContainerPoint(R),X=W(this.options.autoPanPadding),te=W(this.options.autoPanPaddingTopLeft||X),oe=W(this.options.autoPanPaddingBottomRight||X),de=p.getSize(),Ee=0,et=0;G.x+E+oe.x>de.x&&(Ee=G.x+E-de.x+oe.x),G.x-Ee-te.x<0&&(Ee=G.x-te.x),G.y+C+oe.y>de.y&&(et=G.y+C-de.y+oe.y),G.y-et-te.y<0&&(et=G.y-te.y),(Ee||et)&&(this.options.keepInView&&(this._autopanning=!0),p.fire("autopanstart").panBy([Ee,et]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),qae=function(p,w){return new z0(p,w)};bt.mergeOptions({closePopupOnClick:!0}),bt.include({openPopup:function(p,w,C){return this._initOverlay(z0,p,w,C).openOn(this),this},closePopup:function(p){return p=arguments.length?p:this._popup,p&&p.close(),this}}),wa.include({bindPopup:function(p,w){return this._popup=this._initOverlay(z0,this._popup,p,w),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(p){return this._popup&&(this instanceof Xo||(this._popup._source=this),this._popup._prepareOpen(p||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(p){return this._popup&&this._popup.setContent(p),this},getPopup:function(){return this._popup},_openPopup:function(p){if(!(!this._popup||!this._map)){Cu(p);var w=p.layer||p.target;if(this._popup._source===w&&!(w instanceof tl)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(p.latlng);return}this._popup._source=w,this.openPopup(p.latlng)}},_movePopup:function(p){this._popup.setLatLng(p.latlng)},_onKeyPress:function(p){p.originalEvent.keyCode===13&&this._openPopup(p)}});var $0=to.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(p){to.prototype.onAdd.call(this,p),this.setOpacity(this.options.opacity),p.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(p){to.prototype.onRemove.call(this,p),p.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var p=to.prototype.getEvents.call(this);return this.options.permanent||(p.preclick=this.close),p},_initLayout:function(){var p="leaflet-tooltip",w=p+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Tt("div",w),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(p){var w,C,E=this._map,R=this._container,G=E.latLngToContainerPoint(E.getCenter()),X=E.layerPointToContainerPoint(p),te=this.options.direction,oe=R.offsetWidth,de=R.offsetHeight,Ee=W(this.options.offset),et=this._getAnchor();te==="top"?(w=oe/2,C=de):te==="bottom"?(w=oe/2,C=0):te==="center"?(w=oe/2,C=de/2):te==="right"?(w=0,C=de/2):te==="left"?(w=oe,C=de/2):X.x<G.x?(te="right",w=0,C=de/2):(te="left",w=oe+(Ee.x+et.x)*2,C=de/2),p=p.subtract(W(w,C,!0)).add(Ee).add(et),_r(R,"leaflet-tooltip-right"),_r(R,"leaflet-tooltip-left"),_r(R,"leaflet-tooltip-top"),_r(R,"leaflet-tooltip-bottom"),ut(R,"leaflet-tooltip-"+te),Cr(R,p)},_updatePosition:function(){var p=this._map.latLngToLayerPoint(this._latlng);this._setPosition(p)},setOpacity:function(p){this.options.opacity=p,this._container&&Ri(this._container,p)},_animateZoom:function(p){var w=this._map._latLngToNewLayerPoint(this._latlng,p.zoom,p.center);this._setPosition(w)},_getAnchor:function(){return W(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Kae=function(p,w){return new $0(p,w)};bt.include({openTooltip:function(p,w,C){return this._initOverlay($0,p,w,C).openOn(this),this},closeTooltip:function(p){return p.close(),this}}),wa.include({bindTooltip:function(p,w){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay($0,this._tooltip,p,w),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(p){if(!(!p&&this._tooltipHandlersAdded)){var w=p?"off":"on",C={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?C.add=this._openTooltip:(C.mouseover=this._openTooltip,C.mouseout=this.closeTooltip,C.click=this._openTooltip,this._map?this._addFocusListeners():C.add=this._addFocusListeners),this._tooltip.options.sticky&&(C.mousemove=this._moveTooltip),this[w](C),this._tooltipHandlersAdded=!p}},openTooltip:function(p){return this._tooltip&&(this instanceof Xo||(this._tooltip._source=this),this._tooltip._prepareOpen(p)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(p){return this._tooltip&&this._tooltip.setContent(p),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(p){var w=typeof p.getElement=="function"&&p.getElement();w&&(st(w,"focus",function(){this._tooltip._source=p,this.openTooltip()},this),st(w,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(p){var w=typeof p.getElement=="function"&&p.getElement();w&&w.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(p){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var w=this;this._map.once("moveend",function(){w._openOnceFlag=!1,w._openTooltip(p)});return}this._tooltip._source=p.layer||p.target,this.openTooltip(this._tooltip.options.sticky?p.latlng:void 0)}},_moveTooltip:function(p){var w=p.latlng,C,E;this._tooltip.options.sticky&&p.originalEvent&&(C=this._map.mouseEventToContainerPoint(p.originalEvent),E=this._map.containerPointToLayerPoint(C),w=this._map.layerPointToLatLng(E)),this._tooltip.setLatLng(w)}});var L5=Rf.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(p){var w=p&&p.tagName==="DIV"?p:document.createElement("div"),C=this.options;if(C.html instanceof Element?(C0(w),w.appendChild(C.html)):w.innerHTML=C.html!==!1?C.html:"",C.bgPos){var E=W(C.bgPos);w.style.backgroundPosition=-E.x+"px "+-E.y+"px"}return this._setIconStyles(w,"icon"),w},createShadow:function(){return null}});function Qae(p){return new L5(p)}Rf.Default=op;var sp=wa.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ue.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(p){g(this,p)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(p){p._addZoomLimit(this)},onRemove:function(p){this._removeAllTiles(),ir(this._container),p._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Df(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Nf(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(p){return this.options.opacity=p,this._updateOpacity(),this},setZIndex:function(p){return this.options.zIndex=p,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var p=this._clampZoom(this._map.getZoom());p!==this._tileZoom&&(this._tileZoom=p,this._updateLevels()),this._update()}return this},getEvents:function(){var p={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=u(this._onMoveEnd,this.options.updateInterval,this)),p.move=this._onMove),this._zoomAnimated&&(p.zoomanim=this._animateZoom),p},createTile:function(){return document.createElement("div")},getTileSize:function(){var p=this.options.tileSize;return p instanceof F?p:new F(p,p)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(p){for(var w=this.getPane().children,C=-p(-1/0,1/0),E=0,R=w.length,G;E<R;E++)G=w[E].style.zIndex,w[E]!==this._container&&G&&(C=p(C,+G));isFinite(C)&&(this.options.zIndex=C+p(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ue.ielt9){Ri(this._container,this.options.opacity);var p=+new Date,w=!1,C=!1;for(var E in this._tiles){var R=this._tiles[E];if(!(!R.current||!R.loaded)){var G=Math.min(1,(p-R.loaded)/200);Ri(R.el,G),G<1?w=!0:(R.active?C=!0:this._onOpaqueTile(R),R.active=!0)}}C&&!this._noPrune&&this._pruneTiles(),w&&(D(this._fadeFrame),this._fadeFrame=O(this._updateOpacity,this))}},_onOpaqueTile:f,_initContainer:function(){this._container||(this._container=Tt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var p=this._tileZoom,w=this.options.maxZoom;if(p!==void 0){for(var C in this._levels)C=Number(C),this._levels[C].el.children.length||C===p?(this._levels[C].el.style.zIndex=w-Math.abs(p-C),this._onUpdateLevel(C)):(ir(this._levels[C].el),this._removeTilesAtZoom(C),this._onRemoveLevel(C),delete this._levels[C]);var E=this._levels[p],R=this._map;return E||(E=this._levels[p]={},E.el=Tt("div","leaflet-tile-container leaflet-zoom-animated",this._container),E.el.style.zIndex=w,E.origin=R.project(R.unproject(R.getPixelOrigin()),p).round(),E.zoom=p,this._setZoomTransform(E,R.getCenter(),R.getZoom()),f(E.el.offsetWidth),this._onCreateLevel(E)),this._level=E,E}},_onUpdateLevel:f,_onRemoveLevel:f,_onCreateLevel:f,_pruneTiles:function(){if(this._map){var p,w,C=this._map.getZoom();if(C>this.options.maxZoom||C<this.options.minZoom){this._removeAllTiles();return}for(p in this._tiles)w=this._tiles[p],w.retain=w.current;for(p in this._tiles)if(w=this._tiles[p],w.current&&!w.active){var E=w.coords;this._retainParent(E.x,E.y,E.z,E.z-5)||this._retainChildren(E.x,E.y,E.z,E.z+2)}for(p in this._tiles)this._tiles[p].retain||this._removeTile(p)}},_removeTilesAtZoom:function(p){for(var w in this._tiles)this._tiles[w].coords.z===p&&this._removeTile(w)},_removeAllTiles:function(){for(var p in this._tiles)this._removeTile(p)},_invalidateAll:function(){for(var p in this._levels)ir(this._levels[p].el),this._onRemoveLevel(Number(p)),delete this._levels[p];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(p,w,C,E){var R=Math.floor(p/2),G=Math.floor(w/2),X=C-1,te=new F(+R,+G);te.z=+X;var oe=this._tileCoordsToKey(te),de=this._tiles[oe];return de&&de.active?(de.retain=!0,!0):(de&&de.loaded&&(de.retain=!0),X>E?this._retainParent(R,G,X,E):!1)},_retainChildren:function(p,w,C,E){for(var R=2*p;R<2*p+2;R++)for(var G=2*w;G<2*w+2;G++){var X=new F(R,G);X.z=C+1;var te=this._tileCoordsToKey(X),oe=this._tiles[te];if(oe&&oe.active){oe.retain=!0;continue}else oe&&oe.loaded&&(oe.retain=!0);C+1<E&&this._retainChildren(R,G,C+1,E)}},_resetView:function(p){var w=p&&(p.pinch||p.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),w,w)},_animateZoom:function(p){this._setView(p.center,p.zoom,!0,p.noUpdate)},_clampZoom:function(p){var w=this.options;return w.minNativeZoom!==void 0&&p<w.minNativeZoom?w.minNativeZoom:w.maxNativeZoom!==void 0&&w.maxNativeZoom<p?w.maxNativeZoom:p},_setView:function(p,w,C,E){var R=Math.round(w);this.options.maxZoom!==void 0&&R>this.options.maxZoom||this.options.minZoom!==void 0&&R<this.options.minZoom?R=void 0:R=this._clampZoom(R);var G=this.options.updateWhenZooming&&R!==this._tileZoom;(!E||G)&&(this._tileZoom=R,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),R!==void 0&&this._update(p),C||this._pruneTiles(),this._noPrune=!!C),this._setZoomTransforms(p,w)},_setZoomTransforms:function(p,w){for(var C in this._levels)this._setZoomTransform(this._levels[C],p,w)},_setZoomTransform:function(p,w,C){var E=this._map.getZoomScale(C,p.zoom),R=p.origin.multiplyBy(E).subtract(this._map._getNewPixelOrigin(w,C)).round();Ue.any3d?Su(p.el,R,E):Cr(p.el,R)},_resetGrid:function(){var p=this._map,w=p.options.crs,C=this._tileSize=this.getTileSize(),E=this._tileZoom,R=this._map.getPixelWorldBounds(this._tileZoom);R&&(this._globalTileRange=this._pxBoundsToTileRange(R)),this._wrapX=w.wrapLng&&!this.options.noWrap&&[Math.floor(p.project([0,w.wrapLng[0]],E).x/C.x),Math.ceil(p.project([0,w.wrapLng[1]],E).x/C.y)],this._wrapY=w.wrapLat&&!this.options.noWrap&&[Math.floor(p.project([w.wrapLat[0],0],E).y/C.x),Math.ceil(p.project([w.wrapLat[1],0],E).y/C.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(p){var w=this._map,C=w._animatingZoom?Math.max(w._animateToZoom,w.getZoom()):w.getZoom(),E=w.getZoomScale(C,this._tileZoom),R=w.project(p,this._tileZoom).floor(),G=w.getSize().divideBy(E*2);return new Y(R.subtract(G),R.add(G))},_update:function(p){var w=this._map;if(w){var C=this._clampZoom(w.getZoom());if(p===void 0&&(p=w.getCenter()),this._tileZoom!==void 0){var E=this._getTiledPixelBounds(p),R=this._pxBoundsToTileRange(E),G=R.getCenter(),X=[],te=this.options.keepBuffer,oe=new Y(R.getBottomLeft().subtract([te,-te]),R.getTopRight().add([te,-te]));if(!(isFinite(R.min.x)&&isFinite(R.min.y)&&isFinite(R.max.x)&&isFinite(R.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var de in this._tiles){var Ee=this._tiles[de].coords;(Ee.z!==this._tileZoom||!oe.contains(new F(Ee.x,Ee.y)))&&(this._tiles[de].current=!1)}if(Math.abs(C-this._tileZoom)>1){this._setView(p,C);return}for(var et=R.min.y;et<=R.max.y;et++)for(var pt=R.min.x;pt<=R.max.x;pt++){var Rn=new F(pt,et);if(Rn.z=this._tileZoom,!!this._isValidTile(Rn)){var Kr=this._tiles[this._tileCoordsToKey(Rn)];Kr?Kr.current=!0:X.push(Rn)}}if(X.sort(function(ei,Ff){return ei.distanceTo(G)-Ff.distanceTo(G)}),X.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var zi=document.createDocumentFragment();for(pt=0;pt<X.length;pt++)this._addTile(X[pt],zi);this._level.el.appendChild(zi)}}}},_isValidTile:function(p){var w=this._map.options.crs;if(!w.infinite){var C=this._globalTileRange;if(!w.wrapLng&&(p.x<C.min.x||p.x>C.max.x)||!w.wrapLat&&(p.y<C.min.y||p.y>C.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(p);return ne(this.options.bounds).overlaps(E)},_keyToBounds:function(p){return this._tileCoordsToBounds(this._keyToTileCoords(p))},_tileCoordsToNwSe:function(p){var w=this._map,C=this.getTileSize(),E=p.scaleBy(C),R=E.add(C),G=w.unproject(E,p.z),X=w.unproject(R,p.z);return[G,X]},_tileCoordsToBounds:function(p){var w=this._tileCoordsToNwSe(p),C=new J(w[0],w[1]);return this.options.noWrap||(C=this._map.wrapLatLngBounds(C)),C},_tileCoordsToKey:function(p){return p.x+":"+p.y+":"+p.z},_keyToTileCoords:function(p){var w=p.split(":"),C=new F(+w[0],+w[1]);return C.z=+w[2],C},_removeTile:function(p){var w=this._tiles[p];w&&(ir(w.el),delete this._tiles[p],this.fire("tileunload",{tile:w.el,coords:this._keyToTileCoords(p)}))},_initTile:function(p){ut(p,"leaflet-tile");var w=this.getTileSize();p.style.width=w.x+"px",p.style.height=w.y+"px",p.onselectstart=f,p.onmousemove=f,Ue.ielt9&&this.options.opacity<1&&Ri(p,this.options.opacity)},_addTile:function(p,w){var C=this._getTilePos(p),E=this._tileCoordsToKey(p),R=this.createTile(this._wrapCoords(p),o(this._tileReady,this,p));this._initTile(R),this.createTile.length<2&&O(o(this._tileReady,this,p,null,R)),Cr(R,C),this._tiles[E]={el:R,coords:p,current:!0},w.appendChild(R),this.fire("tileloadstart",{tile:R,coords:p})},_tileReady:function(p,w,C){w&&this.fire("tileerror",{error:w,tile:C,coords:p});var E=this._tileCoordsToKey(p);C=this._tiles[E],C&&(C.loaded=+new Date,this._map._fadeAnimated?(Ri(C.el,0),D(this._fadeFrame),this._fadeFrame=O(this._updateOpacity,this)):(C.active=!0,this._pruneTiles()),w||(ut(C.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:C.el,coords:p})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ue.ielt9||!this._map._fadeAnimated?O(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(p){return p.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(p){var w=new F(this._wrapX?c(p.x,this._wrapX):p.x,this._wrapY?c(p.y,this._wrapY):p.y);return w.z=p.z,w},_pxBoundsToTileRange:function(p){var w=this.getTileSize();return new Y(p.min.unscaleBy(w).floor(),p.max.unscaleBy(w).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var p in this._tiles)if(!this._tiles[p].loaded)return!1;return!0}});function Jae(p){return new sp(p)}var $f=sp.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(p,w){this._url=p,w=g(this,w),w.detectRetina&&Ue.retina&&w.maxZoom>0?(w.tileSize=Math.floor(w.tileSize/2),w.zoomReverse?(w.zoomOffset--,w.minZoom=Math.min(w.maxZoom,w.minZoom+1)):(w.zoomOffset++,w.maxZoom=Math.max(w.minZoom,w.maxZoom-1)),w.minZoom=Math.max(0,w.minZoom)):w.zoomReverse?w.minZoom=Math.min(w.maxZoom,w.minZoom):w.maxZoom=Math.max(w.minZoom,w.maxZoom),typeof w.subdomains=="string"&&(w.subdomains=w.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(p,w){return this._url===p&&w===void 0&&(w=!0),this._url=p,w||this.redraw(),this},createTile:function(p,w){var C=document.createElement("img");return st(C,"load",o(this._tileOnLoad,this,w,C)),st(C,"error",o(this._tileOnError,this,w,C)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(C.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(C.referrerPolicy=this.options.referrerPolicy),C.alt="",C.src=this.getTileUrl(p),C},getTileUrl:function(p){var w={r:Ue.retina?"@2x":"",s:this._getSubdomain(p),x:p.x,y:p.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var C=this._globalTileRange.max.y-p.y;this.options.tms&&(w.y=C),w["-y"]=C}return _(this._url,i(w,this.options))},_tileOnLoad:function(p,w){Ue.ielt9?setTimeout(o(p,this,null,w),0):p(null,w)},_tileOnError:function(p,w,C){var E=this.options.errorTileUrl;E&&w.getAttribute("src")!==E&&(w.src=E),p(C,w)},_onTileRemove:function(p){p.tile.onload=null},_getZoomForUrl:function(){var p=this._tileZoom,w=this.options.maxZoom,C=this.options.zoomReverse,E=this.options.zoomOffset;return C&&(p=w-p),p+E},_getSubdomain:function(p){var w=Math.abs(p.x+p.y)%this.options.subdomains.length;return this.options.subdomains[w]},_abortLoading:function(){var p,w;for(p in this._tiles)if(this._tiles[p].coords.z!==this._tileZoom&&(w=this._tiles[p].el,w.onload=f,w.onerror=f,!w.complete)){w.src=T;var C=this._tiles[p].coords;ir(w),delete this._tiles[p],this.fire("tileabort",{tile:w,coords:C})}},_removeTile:function(p){var w=this._tiles[p];if(w)return w.el.setAttribute("src",T),sp.prototype._removeTile.call(this,p)},_tileReady:function(p,w,C){if(!(!this._map||C&&C.getAttribute("src")===T))return sp.prototype._tileReady.call(this,p,w,C)}});function k5(p,w){return new $f(p,w)}var I5=$f.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(p,w){this._url=p;var C=i({},this.defaultWmsParams);for(var E in w)E in this.options||(C[E]=w[E]);w=g(this,w);var R=w.detectRetina&&Ue.retina?2:1,G=this.getTileSize();C.width=G.x*R,C.height=G.y*R,this.wmsParams=C},onAdd:function(p){this._crs=this.options.crs||p.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var w=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[w]=this._crs.code,$f.prototype.onAdd.call(this,p)},getTileUrl:function(p){var w=this._tileCoordsToNwSe(p),C=this._crs,E=Z(C.project(w[0]),C.project(w[1])),R=E.min,G=E.max,X=(this._wmsVersion>=1.3&&this._crs===S5?[R.y,R.x,G.y,G.x]:[R.x,R.y,G.x,G.y]).join(","),te=$f.prototype.getTileUrl.call(this,p);return te+m(this.wmsParams,te,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+X},setParams:function(p,w){return i(this.wmsParams,p),w||this.redraw(),this}});function eoe(p,w){return new I5(p,w)}$f.WMS=I5,k5.wms=eoe;var Qo=wa.extend({options:{padding:.1},initialize:function(p){g(this,p),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ut(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var p={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(p.zoomanim=this._onAnimZoom),p},_onAnimZoom:function(p){this._updateTransform(p.center,p.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(p,w){var C=this._map.getZoomScale(w,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),R=this._map.project(this._center,w),G=E.multiplyBy(-C).add(R).subtract(this._map._getNewPixelOrigin(p,w));Ue.any3d?Su(this._container,G,C):Cr(this._container,G)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var p in this._layers)this._layers[p]._reset()},_onZoomEnd:function(){for(var p in this._layers)this._layers[p]._project()},_updatePaths:function(){for(var p in this._layers)this._layers[p]._update()},_update:function(){var p=this.options.padding,w=this._map.getSize(),C=this._map.containerPointToLayerPoint(w.multiplyBy(-p)).round();this._bounds=new Y(C,C.add(w.multiplyBy(1+p*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),O5=Qo.extend({options:{tolerance:0},getEvents:function(){var p=Qo.prototype.getEvents.call(this);return p.viewprereset=this._onViewPreReset,p},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var p=this._container=document.createElement("canvas");st(p,"mousemove",this._onMouseMove,this),st(p,"click dblclick mousedown mouseup contextmenu",this._onClick,this),st(p,"mouseout",this._handleMouseOut,this),p._leaflet_disable_events=!0,this._ctx=p.getContext("2d")},_destroyContainer:function(){D(this._redrawRequest),delete this._ctx,ir(this._container),Ht(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var p;this._redrawBounds=null;for(var w in this._layers)p=this._layers[w],p._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qo.prototype._update.call(this);var p=this._bounds,w=this._container,C=p.getSize(),E=Ue.retina?2:1;Cr(w,p.min),w.width=E*C.x,w.height=E*C.y,w.style.width=C.x+"px",w.style.height=C.y+"px",Ue.retina&&this._ctx.scale(2,2),this._ctx.translate(-p.min.x,-p.min.y),this.fire("update")}},_reset:function(){Qo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(p){this._updateDashArray(p),this._layers[l(p)]=p;var w=p._order={layer:p,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=w),this._drawLast=w,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(p){this._requestRedraw(p)},_removePath:function(p){var w=p._order,C=w.next,E=w.prev;C?C.prev=E:this._drawLast=E,E?E.next=C:this._drawFirst=C,delete p._order,delete this._layers[l(p)],this._requestRedraw(p)},_updatePath:function(p){this._extendRedrawBounds(p),p._project(),p._update(),this._requestRedraw(p)},_updateStyle:function(p){this._updateDashArray(p),this._requestRedraw(p)},_updateDashArray:function(p){if(typeof p.options.dashArray=="string"){var w=p.options.dashArray.split(/[, ]+/),C=[],E,R;for(R=0;R<w.length;R++){if(E=Number(w[R]),isNaN(E))return;C.push(E)}p.options._dashArray=C}else p.options._dashArray=p.options.dashArray},_requestRedraw:function(p){this._map&&(this._extendRedrawBounds(p),this._redrawRequest=this._redrawRequest||O(this._redraw,this))},_extendRedrawBounds:function(p){if(p._pxBounds){var w=(p.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(p._pxBounds.min.subtract([w,w])),this._redrawBounds.extend(p._pxBounds.max.add([w,w]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var p=this._redrawBounds;if(p){var w=p.getSize();this._ctx.clearRect(p.min.x,p.min.y,w.x,w.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var p,w=this._redrawBounds;if(this._ctx.save(),w){var C=w.getSize();this._ctx.beginPath(),this._ctx.rect(w.min.x,w.min.y,C.x,C.y),this._ctx.clip()}this._drawing=!0;for(var E=this._drawFirst;E;E=E.next)p=E.layer,(!w||p._pxBounds&&p._pxBounds.intersects(w))&&p._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(p,w){if(this._drawing){var C,E,R,G,X=p._parts,te=X.length,oe=this._ctx;if(te){for(oe.beginPath(),C=0;C<te;C++){for(E=0,R=X[C].length;E<R;E++)G=X[C][E],oe[E?"lineTo":"moveTo"](G.x,G.y);w&&oe.closePath()}this._fillStroke(oe,p)}}},_updateCircle:function(p){if(!(!this._drawing||p._empty())){var w=p._point,C=this._ctx,E=Math.max(Math.round(p._radius),1),R=(Math.max(Math.round(p._radiusY),1)||E)/E;R!==1&&(C.save(),C.scale(1,R)),C.beginPath(),C.arc(w.x,w.y/R,E,0,Math.PI*2,!1),R!==1&&C.restore(),this._fillStroke(C,p)}},_fillStroke:function(p,w){var C=w.options;C.fill&&(p.globalAlpha=C.fillOpacity,p.fillStyle=C.fillColor||C.color,p.fill(C.fillRule||"evenodd")),C.stroke&&C.weight!==0&&(p.setLineDash&&p.setLineDash(w.options&&w.options._dashArray||[]),p.globalAlpha=C.opacity,p.lineWidth=C.weight,p.strokeStyle=C.color,p.lineCap=C.lineCap,p.lineJoin=C.lineJoin,p.stroke())},_onClick:function(p){for(var w=this._map.mouseEventToLayerPoint(p),C,E,R=this._drawFirst;R;R=R.next)C=R.layer,C.options.interactive&&C._containsPoint(w)&&(!(p.type==="click"||p.type==="preclick")||!this._map._draggableMoved(C))&&(E=C);this._fireEvent(E?[E]:!1,p)},_onMouseMove:function(p){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var w=this._map.mouseEventToLayerPoint(p);this._handleMouseHover(p,w)}},_handleMouseOut:function(p){var w=this._hoveredLayer;w&&(_r(this._container,"leaflet-interactive"),this._fireEvent([w],p,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(p,w){if(!this._mouseHoverThrottled){for(var C,E,R=this._drawFirst;R;R=R.next)C=R.layer,C.options.interactive&&C._containsPoint(w)&&(E=C);E!==this._hoveredLayer&&(this._handleMouseOut(p),E&&(ut(this._container,"leaflet-interactive"),this._fireEvent([E],p,"mouseover"),this._hoveredLayer=E)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,p),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(p,w,C){this._map._fireDOMEvent(w,C||w.type,p)},_bringToFront:function(p){var w=p._order;if(w){var C=w.next,E=w.prev;if(C)C.prev=E;else return;E?E.next=C:C&&(this._drawFirst=C),w.prev=this._drawLast,this._drawLast.next=w,w.next=null,this._drawLast=w,this._requestRedraw(p)}},_bringToBack:function(p){var w=p._order;if(w){var C=w.next,E=w.prev;if(E)E.next=C;else return;C?C.prev=E:E&&(this._drawLast=E),w.prev=null,w.next=this._drawFirst,this._drawFirst.prev=w,this._drawFirst=w,this._requestRedraw(p)}}});function E5(p){return Ue.canvas?new O5(p):null}var lp=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(p){return document.createElement("<lvml:"+p+' class="lvml">')}}catch{}return function(p){return document.createElement("<"+p+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),toe={_initContainer:function(){this._container=Tt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qo.prototype._update.call(this),this.fire("update"))},_initPath:function(p){var w=p._container=lp("shape");ut(w,"leaflet-vml-shape "+(this.options.className||"")),w.coordsize="1 1",p._path=lp("path"),w.appendChild(p._path),this._updateStyle(p),this._layers[l(p)]=p},_addPath:function(p){var w=p._container;this._container.appendChild(w),p.options.interactive&&p.addInteractiveTarget(w)},_removePath:function(p){var w=p._container;ir(w),p.removeInteractiveTarget(w),delete this._layers[l(p)]},_updateStyle:function(p){var w=p._stroke,C=p._fill,E=p.options,R=p._container;R.stroked=!!E.stroke,R.filled=!!E.fill,E.stroke?(w||(w=p._stroke=lp("stroke")),R.appendChild(w),w.weight=E.weight+"px",w.color=E.color,w.opacity=E.opacity,E.dashArray?w.dashStyle=b(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):w.dashStyle="",w.endcap=E.lineCap.replace("butt","flat"),w.joinstyle=E.lineJoin):w&&(R.removeChild(w),p._stroke=null),E.fill?(C||(C=p._fill=lp("fill")),R.appendChild(C),C.color=E.fillColor||E.color,C.opacity=E.fillOpacity):C&&(R.removeChild(C),p._fill=null)},_updateCircle:function(p){var w=p._point.round(),C=Math.round(p._radius),E=Math.round(p._radiusY||C);this._setPath(p,p._empty()?"M0 0":"AL "+w.x+","+w.y+" "+C+","+E+" 0,"+65535*360)},_setPath:function(p,w){p._path.v=w},_bringToFront:function(p){Df(p._container)},_bringToBack:function(p){Nf(p._container)}},F0=Ue.vml?lp:Ge,up=Qo.extend({_initContainer:function(){this._container=F0("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=F0("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ir(this._container),Ht(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qo.prototype._update.call(this);var p=this._bounds,w=p.getSize(),C=this._container;(!this._svgSize||!this._svgSize.equals(w))&&(this._svgSize=w,C.setAttribute("width",w.x),C.setAttribute("height",w.y)),Cr(C,p.min),C.setAttribute("viewBox",[p.min.x,p.min.y,w.x,w.y].join(" ")),this.fire("update")}},_initPath:function(p){var w=p._path=F0("path");p.options.className&&ut(w,p.options.className),p.options.interactive&&ut(w,"leaflet-interactive"),this._updateStyle(p),this._layers[l(p)]=p},_addPath:function(p){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(p._path),p.addInteractiveTarget(p._path)},_removePath:function(p){ir(p._path),p.removeInteractiveTarget(p._path),delete this._layers[l(p)]},_updatePath:function(p){p._project(),p._update()},_updateStyle:function(p){var w=p._path,C=p.options;w&&(C.stroke?(w.setAttribute("stroke",C.color),w.setAttribute("stroke-opacity",C.opacity),w.setAttribute("stroke-width",C.weight),w.setAttribute("stroke-linecap",C.lineCap),w.setAttribute("stroke-linejoin",C.lineJoin),C.dashArray?w.setAttribute("stroke-dasharray",C.dashArray):w.removeAttribute("stroke-dasharray"),C.dashOffset?w.setAttribute("stroke-dashoffset",C.dashOffset):w.removeAttribute("stroke-dashoffset")):w.setAttribute("stroke","none"),C.fill?(w.setAttribute("fill",C.fillColor||C.color),w.setAttribute("fill-opacity",C.fillOpacity),w.setAttribute("fill-rule",C.fillRule||"evenodd")):w.setAttribute("fill","none"))},_updatePoly:function(p,w){this._setPath(p,Ye(p._parts,w))},_updateCircle:function(p){var w=p._point,C=Math.max(Math.round(p._radius),1),E=Math.max(Math.round(p._radiusY),1)||C,R="a"+C+","+E+" 0 1,0 ",G=p._empty()?"M0 0":"M"+(w.x-C)+","+w.y+R+C*2+",0 "+R+-C*2+",0 ";this._setPath(p,G)},_setPath:function(p,w){p._path.setAttribute("d",w)},_bringToFront:function(p){Df(p._path)},_bringToBack:function(p){Nf(p._path)}});Ue.vml&&up.include(toe);function D5(p){return Ue.svg||Ue.vml?new up(p):null}bt.include({getRenderer:function(p){var w=p.options.renderer||this._getPaneRenderer(p.options.pane)||this.options.renderer||this._renderer;return w||(w=this._renderer=this._createRenderer()),this.hasLayer(w)||this.addLayer(w),w},_getPaneRenderer:function(p){if(p==="overlayPane"||p===void 0)return!1;var w=this._paneRenderers[p];return w===void 0&&(w=this._createRenderer({pane:p}),this._paneRenderers[p]=w),w},_createRenderer:function(p){return this.options.preferCanvas&&E5(p)||D5(p)}});var N5=Bf.extend({initialize:function(p,w){Bf.prototype.initialize.call(this,this._boundsToLatLngs(p),w)},setBounds:function(p){return this.setLatLngs(this._boundsToLatLngs(p))},_boundsToLatLngs:function(p){return p=ne(p),[p.getSouthWest(),p.getNorthWest(),p.getNorthEast(),p.getSouthEast()]}});function roe(p,w){return new N5(p,w)}up.create=F0,up.pointsToPath=Ye,Ko.geometryToLayer=D0,Ko.coordsToLatLng=MA,Ko.coordsToLatLngs=N0,Ko.latLngToCoords=PA,Ko.latLngsToCoords=j0,Ko.getFeature=zf,Ko.asFeature=R0,bt.mergeOptions({boxZoom:!0});var j5=eo.extend({initialize:function(p){this._map=p,this._container=p._container,this._pane=p._panes.overlayPane,this._resetStateTimeout=0,p.on("unload",this._destroy,this)},addHooks:function(){st(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ht(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ir(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(p){if(!p.shiftKey||p.which!==1&&p.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ep(),cA(),this._startPoint=this._map.mouseEventToContainerPoint(p),st(document,{contextmenu:Cu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(p){this._moved||(this._moved=!0,this._box=Tt("div","leaflet-zoom-box",this._container),ut(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(p);var w=new Y(this._point,this._startPoint),C=w.getSize();Cr(this._box,w.min),this._box.style.width=C.x+"px",this._box.style.height=C.y+"px"},_finish:function(){this._moved&&(ir(this._box),_r(this._container,"leaflet-crosshair")),tp(),fA(),Ht(document,{contextmenu:Cu,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(p){if(!(p.which!==1&&p.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var w=new J(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(w).fire("boxzoomend",{boxZoomBounds:w})}},_onKeyDown:function(p){p.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bt.addInitHook("addHandler","boxZoom",j5),bt.mergeOptions({doubleClickZoom:!0});var R5=eo.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(p){var w=this._map,C=w.getZoom(),E=w.options.zoomDelta,R=p.originalEvent.shiftKey?C-E:C+E;w.options.doubleClickZoom==="center"?w.setZoom(R):w.setZoomAround(p.containerPoint,R)}});bt.addInitHook("addHandler","doubleClickZoom",R5),bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var B5=eo.extend({addHooks:function(){if(!this._draggable){var p=this._map;this._draggable=new el(p._mapPane,p._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),p.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),p.on("zoomend",this._onZoomEnd,this),p.whenReady(this._onZoomEnd,this))}ut(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_r(this._map._container,"leaflet-grab"),_r(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var p=this._map;if(p._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var w=ne(this._map.options.maxBounds);this._offsetLimit=Z(this._map.latLngToContainerPoint(w.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(w.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;p.fire("movestart").fire("dragstart"),p.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(p){if(this._map.options.inertia){var w=this._lastTime=+new Date,C=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(C),this._times.push(w),this._prunePositions(w)}this._map.fire("move",p).fire("drag",p)},_prunePositions:function(p){for(;this._positions.length>1&&p-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var p=this._map.getSize().divideBy(2),w=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=w.subtract(p).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(p,w){return p-(p-w)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var p=this._draggable._newPos.subtract(this._draggable._startPos),w=this._offsetLimit;p.x<w.min.x&&(p.x=this._viscousLimit(p.x,w.min.x)),p.y<w.min.y&&(p.y=this._viscousLimit(p.y,w.min.y)),p.x>w.max.x&&(p.x=this._viscousLimit(p.x,w.max.x)),p.y>w.max.y&&(p.y=this._viscousLimit(p.y,w.max.y)),this._draggable._newPos=this._draggable._startPos.add(p)}},_onPreDragWrap:function(){var p=this._worldWidth,w=Math.round(p/2),C=this._initialWorldOffset,E=this._draggable._newPos.x,R=(E-w+C)%p+w-C,G=(E+w+C)%p-w-C,X=Math.abs(R+C)<Math.abs(G+C)?R:G;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=X},_onDragEnd:function(p){var w=this._map,C=w.options,E=!C.inertia||p.noInertia||this._times.length<2;if(w.fire("dragend",p),E)w.fire("moveend");else{this._prunePositions(+new Date);var R=this._lastPos.subtract(this._positions[0]),G=(this._lastTime-this._times[0])/1e3,X=C.easeLinearity,te=R.multiplyBy(X/G),oe=te.distanceTo([0,0]),de=Math.min(C.inertiaMaxSpeed,oe),Ee=te.multiplyBy(de/oe),et=de/(C.inertiaDeceleration*X),pt=Ee.multiplyBy(-et/2).round();!pt.x&&!pt.y?w.fire("moveend"):(pt=w._limitOffset(pt,w.options.maxBounds),O(function(){w.panBy(pt,{duration:et,easeLinearity:X,noMoveStart:!0,animate:!0})}))}}});bt.addInitHook("addHandler","dragging",B5),bt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var z5=eo.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(p){this._map=p,this._setPanDelta(p.options.keyboardPanDelta),this._setZoomDelta(p.options.zoomDelta)},addHooks:function(){var p=this._map._container;p.tabIndex<=0&&(p.tabIndex="0"),st(p,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ht(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var p=document.body,w=document.documentElement,C=p.scrollTop||w.scrollTop,E=p.scrollLeft||w.scrollLeft;this._map._container.focus(),window.scrollTo(E,C)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(p){var w=this._panKeys={},C=this.keyCodes,E,R;for(E=0,R=C.left.length;E<R;E++)w[C.left[E]]=[-1*p,0];for(E=0,R=C.right.length;E<R;E++)w[C.right[E]]=[p,0];for(E=0,R=C.down.length;E<R;E++)w[C.down[E]]=[0,p];for(E=0,R=C.up.length;E<R;E++)w[C.up[E]]=[0,-1*p]},_setZoomDelta:function(p){var w=this._zoomKeys={},C=this.keyCodes,E,R;for(E=0,R=C.zoomIn.length;E<R;E++)w[C.zoomIn[E]]=p;for(E=0,R=C.zoomOut.length;E<R;E++)w[C.zoomOut[E]]=-p},_addHooks:function(){st(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ht(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(p){if(!(p.altKey||p.ctrlKey||p.metaKey)){var w=p.keyCode,C=this._map,E;if(w in this._panKeys){if(!C._panAnim||!C._panAnim._inProgress)if(E=this._panKeys[w],p.shiftKey&&(E=W(E).multiplyBy(3)),C.options.maxBounds&&(E=C._limitOffset(W(E),C.options.maxBounds)),C.options.worldCopyJump){var R=C.wrapLatLng(C.unproject(C.project(C.getCenter()).add(E)));C.panTo(R)}else C.panBy(E)}else if(w in this._zoomKeys)C.setZoom(C.getZoom()+(p.shiftKey?3:1)*this._zoomKeys[w]);else if(w===27&&C._popup&&C._popup.options.closeOnEscapeKey)C.closePopup();else return;Cu(p)}}});bt.addInitHook("addHandler","keyboard",z5),bt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var $5=eo.extend({addHooks:function(){st(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ht(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(p){var w=c5(p),C=this._map.options.wheelDebounceTime;this._delta+=w,this._lastMousePos=this._map.mouseEventToContainerPoint(p),this._startTime||(this._startTime=+new Date);var E=Math.max(C-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),E),Cu(p)},_performZoom:function(){var p=this._map,w=p.getZoom(),C=this._map.options.zoomSnap||0;p._stop();var E=this._delta/(this._map.options.wheelPxPerZoomLevel*4),R=4*Math.log(2/(1+Math.exp(-Math.abs(E))))/Math.LN2,G=C?Math.ceil(R/C)*C:R,X=p._limitZoom(w+(this._delta>0?G:-G))-w;this._delta=0,this._startTime=null,X&&(p.options.scrollWheelZoom==="center"?p.setZoom(w+X):p.setZoomAround(this._lastMousePos,w+X))}});bt.addInitHook("addHandler","scrollWheelZoom",$5);var noe=600;bt.mergeOptions({tapHold:Ue.touchNative&&Ue.safari&&Ue.mobile,tapTolerance:15});var F5=eo.extend({addHooks:function(){st(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ht(this._map._container,"touchstart",this._onDown,this)},_onDown:function(p){if(clearTimeout(this._holdTimeout),p.touches.length===1){var w=p.touches[0];this._startPos=this._newPos=new F(w.clientX,w.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(st(document,"touchend",un),st(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",w))},this),noe),st(document,"touchend touchcancel contextmenu",this._cancel,this),st(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function p(){Ht(document,"touchend",un),Ht(document,"touchend touchcancel",p)},_cancel:function(){clearTimeout(this._holdTimeout),Ht(document,"touchend touchcancel contextmenu",this._cancel,this),Ht(document,"touchmove",this._onMove,this)},_onMove:function(p){var w=p.touches[0];this._newPos=new F(w.clientX,w.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(p,w){var C=new MouseEvent(p,{bubbles:!0,cancelable:!0,view:window,screenX:w.screenX,screenY:w.screenY,clientX:w.clientX,clientY:w.clientY});C._simulated=!0,w.target.dispatchEvent(C)}});bt.addInitHook("addHandler","tapHold",F5),bt.mergeOptions({touchZoom:Ue.touch,bounceAtZoomLimits:!0});var V5=eo.extend({addHooks:function(){ut(this._map._container,"leaflet-touch-zoom"),st(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_r(this._map._container,"leaflet-touch-zoom"),Ht(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(p){var w=this._map;if(!(!p.touches||p.touches.length!==2||w._animatingZoom||this._zooming)){var C=w.mouseEventToContainerPoint(p.touches[0]),E=w.mouseEventToContainerPoint(p.touches[1]);this._centerPoint=w.getSize()._divideBy(2),this._startLatLng=w.containerPointToLatLng(this._centerPoint),w.options.touchZoom!=="center"&&(this._pinchStartLatLng=w.containerPointToLatLng(C.add(E)._divideBy(2))),this._startDist=C.distanceTo(E),this._startZoom=w.getZoom(),this._moved=!1,this._zooming=!0,w._stop(),st(document,"touchmove",this._onTouchMove,this),st(document,"touchend touchcancel",this._onTouchEnd,this),un(p)}},_onTouchMove:function(p){if(!(!p.touches||p.touches.length!==2||!this._zooming)){var w=this._map,C=w.mouseEventToContainerPoint(p.touches[0]),E=w.mouseEventToContainerPoint(p.touches[1]),R=C.distanceTo(E)/this._startDist;if(this._zoom=w.getScaleZoom(R,this._startZoom),!w.options.bounceAtZoomLimits&&(this._zoom<w.getMinZoom()&&R<1||this._zoom>w.getMaxZoom()&&R>1)&&(this._zoom=w._limitZoom(this._zoom)),w.options.touchZoom==="center"){if(this._center=this._startLatLng,R===1)return}else{var G=C._add(E)._divideBy(2)._subtract(this._centerPoint);if(R===1&&G.x===0&&G.y===0)return;this._center=w.unproject(w.project(this._pinchStartLatLng,this._zoom).subtract(G),this._zoom)}this._moved||(w._moveStart(!0,!1),this._moved=!0),D(this._animRequest);var X=o(w._move,w,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=O(X,this,!0),un(p)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,D(this._animRequest),Ht(document,"touchmove",this._onTouchMove,this),Ht(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bt.addInitHook("addHandler","touchZoom",V5),bt.BoxZoom=j5,bt.DoubleClickZoom=R5,bt.Drag=B5,bt.Keyboard=z5,bt.ScrollWheelZoom=$5,bt.TapHold=F5,bt.TouchZoom=V5,r.Bounds=Y,r.Browser=Ue,r.CRS=ze,r.Canvas=O5,r.Circle=CA,r.CircleMarker=E0,r.Class=j,r.Control=ba,r.DivIcon=L5,r.DivOverlay=to,r.DomEvent=bae,r.DomUtil=xae,r.Draggable=el,r.Evented=U,r.FeatureGroup=Xo,r.GeoJSON=Ko,r.GridLayer=sp,r.Handler=eo,r.Icon=Rf,r.ImageOverlay=B0,r.LatLng=le,r.LatLngBounds=J,r.Layer=wa,r.LayerGroup=jf,r.LineUtil=Dae,r.Map=bt,r.Marker=O0,r.Mixin=Pae,r.Path=tl,r.Point=F,r.PolyUtil=Lae,r.Polygon=Bf,r.Polyline=qo,r.Popup=z0,r.PosAnimation=f5,r.Projection=Nae,r.Rectangle=N5,r.Renderer=Qo,r.SVG=up,r.SVGOverlay=P5,r.TileLayer=$f,r.Tooltip=$0,r.Transformation=ue,r.Util=N,r.VideoOverlay=M5,r.bind=o,r.bounds=Z,r.canvas=E5,r.circle=Gae,r.circleMarker=Vae,r.control=ip,r.divIcon=Qae,r.extend=i,r.featureGroup=zae,r.geoJSON=C5,r.geoJson=Uae,r.gridLayer=Jae,r.icon=$ae,r.imageOverlay=Zae,r.latLng=fe,r.latLngBounds=ne,r.layerGroup=Bae,r.map=wae,r.marker=Fae,r.point=W,r.polygon=Hae,r.polyline=Wae,r.popup=qae,r.rectangle=roe,r.setOptions=g,r.stamp=l,r.svg=D5,r.svgOverlay=Xae,r.tileLayer=k5,r.tooltip=Kae,r.transformation=ee,r.version=n,r.videoOverlay=Yae;var ioe=window.L;r.noConflict=function(){return window.L=ioe,this},window.L=r})})(GO,GO.exports);var If=GO.exports;const Vie=Ft(If);function w0(e,t,r){return Object.freeze({instance:e,context:t,container:r})}function zR(e,t){return t==null?function(n,i){const a=H.useRef();return a.current||(a.current=e(n,i)),a}:function(n,i){const a=H.useRef();a.current||(a.current=e(n,i));const o=H.useRef(n),{instance:s}=a.current;return H.useEffect(function(){o.current!==n&&(t(s,n,o.current),o.current=n)},[s,n,i]),a}}function Gie(e,t){H.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function GQe(e){return function(r){const n=eA(),i=e(tA(r,n),n);return Bie(n.map,r.attribution),BR(i.current,r.eventHandlers),Gie(i.current,n),i}}function WQe(e,t){const r=H.useRef();H.useEffect(function(){if(t.pathOptions!==r.current){const i=t.pathOptions??{};e.instance.setStyle(i),r.current=i}},[e,t])}function HQe(e){return function(r){const n=eA(),i=e(tA(r,n),n);return BR(i.current,r.eventHandlers),Gie(i.current,n),WQe(i.current,r),i}}function Wie(e,t){const r=zR(e),n=VQe(r,t);return $Qe(n)}function Hie(e,t){const r=zR(e,t),n=HQe(r);return zQe(n)}function UQe(e,t){const r=zR(e,t),n=GQe(r);return FQe(n)}function ZQe(e,t,r){const{opacity:n,zIndex:i}=t;n!=null&&n!==r.opacity&&e.setOpacity(n),i!=null&&i!==r.zIndex&&e.setZIndex(i)}function YQe(){return eA().map}const XQe=Hie(function({center:t,children:r,...n},i){const a=new If.CircleMarker(t,n);return w0(a,zie(i,{overlayContainer:a}))},jQe);function WO(){return WO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WO.apply(this,arguments)}function qQe({bounds:e,boundsOptions:t,center:r,children:n,className:i,id:a,placeholder:o,style:s,whenReady:l,zoom:u,...c},f){const[h]=H.useState({className:i,id:a,style:s}),[d,v]=H.useState(null);H.useImperativeHandle(f,()=>(d==null?void 0:d.map)??null,[d]);const g=H.useCallback(x=>{if(x!==null&&d===null){const _=new If.Map(x,c);r!=null&&u!=null?_.setView(r,u):e!=null&&_.fitBounds(e,t),l!=null&&_.whenReady(l),v(BQe(_))}},[]);H.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Q.createElement(Fie,{value:d},n):o??null;return Q.createElement("div",WO({},h,{ref:g}),m)}const KQe=H.forwardRef(qQe),QQe=Hie(function({positions:t,...r},n){const i=new If.Polyline(t,r);return w0(i,zie(n,{overlayContainer:i}))},function(t,r,n){r.positions!==n.positions&&t.setLatLngs(r.positions)}),JQe=Wie(function(t,r){const n=new If.Popup(t,r.overlayContainer);return w0(n,r)},function(t,r,{position:n},i){H.useEffect(function(){const{instance:o}=t;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[t,r,i,n])}),eJe=UQe(function({url:t,...r},n){const i=new If.TileLayer(t,tA(r,n));return w0(i,n)},function(t,r,n){ZQe(t,r,n);const{url:i}=r;i!=null&&i!==n.url&&t.setUrl(i)}),tJe=Wie(function(t,r){const n=new If.Tooltip(t,r.overlayContainer);return w0(n,r)},function(t,r,{position:n},i){H.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=t,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[t,r,i,n])}),rJe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",nJe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",iJe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete Vie.Icon.Default.prototype._getIconUrl;Vie.Icon.Default.mergeOptions({iconUrl:rJe,iconRetinaUrl:nJe,shadowUrl:iJe});const RU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],aJe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function oJe(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function sJe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function lJe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function uJe({bounds:e}){const t=YQe();return H.useEffect(()=>{e&&t.fitBounds(e,{padding:[50,50]})},[t,e]),null}function cJe({node:e}){const t=e.latitude!==null&&e.longitude!==null,r=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`:"Unknown";return y.jsxs("div",{className:"min-w-[200px]",children:[y.jsx("div",{className:"font-semibold text-slate-800",children:e.short_name}),y.jsx("div",{className:"text-xs text-slate-600 mb-2",children:e.long_name}),y.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[y.jsx("div",{className:"text-slate-500",children:"Role"}),y.jsx("div",{className:"text-slate-700 font-medium",children:e.role}),y.jsx("div",{className:"text-slate-500",children:"Hardware"}),y.jsx("div",{className:"text-slate-700",children:e.hardware||"Unknown"}),y.jsx("div",{className:"text-slate-500",children:"Battery"}),y.jsx("div",{className:"text-slate-700",children:r}),y.jsx("div",{className:"text-slate-500",children:"Last Heard"}),y.jsx("div",{className:"text-slate-700",children:lJe(e.last_heard)})]}),t&&y.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[y.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[y.jsx(bd,{size:10}),"Google Maps"]}),y.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[y.jsx(bd,{size:10}),"OSM"]})]})]})}function fJe({nodes:e,edges:t,selectedNodeId:r,onSelectNode:n}){const i=H.useMemo(()=>e.filter(f=>f.latitude!==null&&f.longitude!==null),[e]),a=e.length-i.length,o=H.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=H.useMemo(()=>t.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[t,o]),l=H.useMemo(()=>{if(i.length===0)return null;const f=i.map(d=>d.latitude),h=i.map(d=>d.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=H.useMemo(()=>{const f=new Set;return r!==null&&t.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,t]);return y.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[y.jsxs(KQe,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[y.jsx(eJe,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attributions">CARTO</a>'}),y.jsx(uJe,{bounds:l}),s.map((f,h)=>{const d=o.get(f.from_node),v=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return y.jsx(QQe,{positions:[[d.latitude,d.longitude],[v.latitude,v.longitude]],color:oJe(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,d=c.has(f.node_num),v=r===null||h||d,g=aJe.includes(f.role),m=sJe(f.latitude),x=RU[m%RU.length];return y.jsxs(XQe,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?x:"#111827",fillOpacity:v?.9:.2,stroke:!0,color:h?"#ffffff":x,weight:h?3:g?0:2,opacity:v?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[y.jsx(tJe,{direction:"top",offset:[0,-8],children:y.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),y.jsx(JQe,{children:y.jsx(cJe,{node:f})})]},f.node_num)})]}),y.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[y.jsx(AZ,{size:12}),y.jsxs("span",{children:["Showing ",i.length," of ",e.length," nodes",a>0&&y.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const BU=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],hJe=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function zU(e){return e>12?"#22c55e":e>8?"#4ade80":e>5?"#f59e0b":e>3?"#f97316":"#ef4444"}function dJe(e){return e>12?"excellent":e>8?"good":e>5?"fair":e>3?"marginal":"poor"}function vJe(e){return e===null||e>46?0:e>44.5?1:e>43?2:3}function pJe(e){return["Northern ID","Central ID","SW Idaho","SC Idaho"][e]||"Unknown"}function gJe(e){if(!e)return"Unknown";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function mJe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function yJe({node:e,edges:t,nodes:r,onSelectNode:n}){const i=H.useMemo(()=>{if(!e)return[];const f=new Map(r.map(d=>[d.node_num,d])),h=[];return t.forEach(d=>{if(d.from_node===e.node_num){const v=f.get(d.to_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}else if(d.to_node===e.node_num){const v=f.get(d.from_node);v&&h.push({node:v,snr:d.snr,quality:d.quality})}}),h.sort((d,v)=>v.snr-d.snr)},[e,t,r]);if(!e)return y.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[y.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:y.jsx(Ds,{size:24,className:"text-slate-500"})}),y.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=hJe.includes(e.role),o=vJe(e.latitude),s=BU[o%BU.length],l=e.latitude!==null&&e.longitude!==null,u=e.battery_level!==null?e.battery_level>100||e.voltage&&e.voltage>4.1?"USB":`${e.battery_level.toFixed(0)}%`:"—",c=e.battery_level!==null&&(e.battery_level>100||e.voltage&&e.voltage>4.1);return y.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[y.jsxs("div",{className:"p-4 border-b border-border",children:[y.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:e.node_id_hex}),y.jsx("div",{className:"font-mono text-lg text-slate-100",children:e.short_name}),y.jsx("div",{className:"text-xs text-slate-500 truncate",children:e.long_name})]}),y.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),y.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:e.role})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),y.jsx("div",{className:"text-sm text-slate-300",children:pJe(o)})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),y.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&y.jsx(Tm,{size:12,className:"text-amber-400"}),u]})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:`w-2 h-2 rounded-full ${mJe(e.last_heard)}`}),y.jsx("span",{className:"text-sm text-slate-300",children:gJe(e.last_heard)})]})]}),y.jsxs("div",{className:"col-span-2",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),y.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:e.hardware||"Unknown"})]})]}),l&&y.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[y.jsxs("a",{href:`https://www.google.com/maps?q=${e.latitude},${e.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[y.jsx(bd,{size:10}),"Google Maps"]}),y.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${e.latitude}&mlon=${e.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[y.jsx(bd,{size:10}),"OSM"]})]}),y.jsxs("div",{className:"flex-1 overflow-y-auto",children:[y.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?y.jsx("div",{className:"divide-y divide-border",children:i.map(f=>y.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:zU(f.snr)},children:[y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),y.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),y.jsxs("div",{className:"text-right flex-shrink-0",children:[y.jsxs("div",{className:"text-xs font-mono",style:{color:zU(f.snr)},children:[f.snr.toFixed(1)," dB"]}),y.jsx("div",{className:"text-xs text-slate-500",children:dJe(f.snr)})]})]},f.node.node_num))}):y.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const $U=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function xJe(e){if(!e)return"bg-slate-500";const t=new Date(e),n=(new Date().getTime()-t.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function _Je(e){if(!e)return"—";const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function bJe(e){return e.battery_level===null?"—":e.battery_level>100||e.voltage&&e.voltage>4.1?"USB ⚡":`${e.battery_level.toFixed(0)}%`}function FU(e){return e===null?"—":e>46?"Northern":e>44.5?"Central":e>43?"SW Idaho":"SC Idaho"}function wJe({nodes:e,selectedNodeId:t,onSelectNode:r}){const[n,i]=H.useState(""),[a,o]=H.useState("short_name"),[s,l]=H.useState("asc"),[u,c]=H.useState("all"),f=H.useMemo(()=>{let v=[...e];if(u==="infra"?v=v.filter(g=>$U.includes(g.role)):u==="online"&&(v=v.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();v=v.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||FU(m.latitude).toLowerCase().includes(g))}return v.sort((g,m)=>{let x="",_="";switch(a){case"short_name":x=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":x=g.role,_=m.role;break;case"battery_level":x=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":x=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":x=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return x<_?s==="asc"?-1:1:x>_?s==="asc"?1:-1:0}),v},[e,n,a,s,u]),h=v=>{a===v?l(s==="asc"?"desc":"asc"):(o(v),l("asc"))},d=({field:v})=>a!==v?null:s==="asc"?y.jsx(Kue,{size:14,className:"inline ml-1"}):y.jsx(Uy,{size:14,className:"inline ml-1"});return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[y.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[y.jsxs("div",{className:"relative flex-1 max-w-xs",children:[y.jsx(XE,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:v=>i(v.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(HE,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(v=>y.jsx("button",{onClick:()=>c(v),className:`px-2 py-1 text-xs rounded transition-colors ${u===v?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:v==="all"?"All":v==="infra"?"Infra":"Online"},v))]}),y.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",e.length," nodes"]})]}),y.jsxs("div",{className:"overflow-x-auto",children:[y.jsxs("table",{className:"w-full text-sm",children:[y.jsx("thead",{children:y.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[y.jsx("th",{className:"w-8 px-3 py-2"}),y.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",y.jsx(d,{field:"short_name"})]}),y.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",y.jsx(d,{field:"role"})]}),y.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),y.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",y.jsx(d,{field:"battery_level"})]}),y.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",y.jsx(d,{field:"last_heard"})]}),y.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",y.jsx(d,{field:"hardware"})]})]})}),y.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(v=>{const g=$U.includes(v.role),m=v.node_num===t;return y.jsxs("tr",{onClick:()=>r(v.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[y.jsx("td",{className:"px-3 py-2",children:y.jsx("div",{className:`w-2 h-2 rounded-full ${xJe(v.last_heard)}`})}),y.jsxs("td",{className:"px-3 py-2",children:[y.jsx("div",{className:"font-mono text-slate-200",children:v.short_name}),y.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:v.long_name})]}),y.jsx("td",{className:"px-3 py-2",children:y.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:v.role})}),y.jsx("td",{className:"px-3 py-2 text-slate-400",children:FU(v.latitude)}),y.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:bJe(v)}),y.jsx("td",{className:"px-3 py-2 text-slate-400",children:_Je(v.last_heard)}),y.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:v.hardware||"—"})]},v.node_num)})})]}),f.length>100&&y.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&y.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function SJe(){const[e,t]=H.useState([]),[r,n]=H.useState([]),[i,a]=H.useState([]),[o,s]=H.useState(null),[l,u]=H.useState("topo"),[c,f]=H.useState(!0),[h,d]=H.useState(null);H.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([cce(),fce(),_ce()]).then(([m,x,_])=>{t(m),n(x),a(_),f(!1)}).catch(m=>{d(m.message),f(!1)})},[]);const v=H.useMemo(()=>e.find(m=>m.node_num===o)||null,[e,o]),g=H.useCallback(m=>{s(m)},[]);return c?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"text-sm text-slate-400",children:[e.length," nodes • ",r.length," edges"]}),y.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[y.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[y.jsx(oce,{size:14}),"Topology"]}),y.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[y.jsx(ice,{size:14}),"Geographic"]})]})]}),y.jsxs("div",{className:"flex gap-0",children:[y.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?y.jsx(NQe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g}):y.jsx(fJe,{nodes:e,edges:r,selectedNodeId:o,onSelectNode:g})}),y.jsx(yJe,{node:v,edges:r,nodes:e,onSelectNode:g})]}),y.jsx(wJe,{nodes:e,selectedNodeId:o,onSelectNode:g})]})}function TJe({feed:e}){const t=()=>e.is_loaded?e.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>e.is_loaded?e.consecutive_errors>0?`${e.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return y.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:`w-2 h-2 rounded-full ${t()}`}),y.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:e.source})]}),y.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),y.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[y.jsxs("div",{children:["Events: ",e.event_count]}),y.jsxs("div",{children:["Last fetch: ",n(e.last_fetch)]}),e.last_error&&y.jsx("div",{className:"text-amber-500 truncate",children:e.last_error})]})]})}function AJe({event:e}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",icon:xd,iconColor:"text-red-500"};case"moderate":case"warning":case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:Ns,iconColor:"text-amber-500"};case"minor":case"routine":return{bg:"bg-blue-500/10",border:"border-blue-500",icon:Sm,iconColor:"text-blue-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:Sm,iconColor:"text-slate-400"}}})(e.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return y.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:y.jsxs("div",{className:"flex items-start gap-3",children:[y.jsx(n,{size:18,className:r.iconColor}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("span",{className:"text-sm font-medium text-slate-200",children:e.event_type}),y.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:e.severity})]}),y.jsx("div",{className:"text-sm text-slate-300 mb-2",children:e.headline}),e.description&&y.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:e.description}),y.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[y.jsx("span",{className:"uppercase",children:e.source}),e.expires&&y.jsxs("span",{children:["Expires: ",i(e.expires)]})]})]})]})})}function CJe({swpc:e}){var n,i;if(!e||!e.enabled)return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Wb,{size:14}),"Solar/Geomagnetic Indices"]}),y.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Wb,{size:14}),"Solar/Geomagnetic Indices"]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),y.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=e.sfi)==null?void 0:n.toFixed(0))??"—"}),y.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),y.jsx("div",{className:`text-2xl font-mono ${t(e.kp_current)}`,children:((i=e.kp_current)==null?void 0:i.toFixed(1))??"—"}),y.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),y.jsx("span",{className:`text-sm font-mono ${r(e.r_scale)}`,children:e.r_scale??0})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),y.jsx("span",{className:`text-sm font-mono ${r(e.s_scale)}`,children:e.s_scale??0})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),y.jsx("span",{className:`text-sm font-mono ${r(e.g_scale)}`,children:e.g_scale??0})]})]}),y.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),e.active_warnings&&e.active_warnings.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),e.active_warnings.slice(0,3).map((a,o)=>y.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function MJe({ducting:e}){if(!e||!e.enabled)return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(f3,{size:14}),"Tropospheric Ducting"]}),y.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const t=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(f3,{size:14}),"Tropospheric Ducting"]}),y.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),y.jsx("div",{className:`text-xl font-medium ${t(e.condition)}`,children:r(e.condition)})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),y.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.min_gradient??"—"}),y.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),e.duct_thickness_m&&y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),y.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_thickness_m}),y.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),e.duct_base_m&&y.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),y.jsx("div",{className:"text-lg font-mono text-slate-100",children:e.duct_base_m}),y.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),y.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[y.jsx("div",{children:"dM/dz reference:"}),y.jsxs("div",{className:"mt-1 space-y-0.5",children:[y.jsx("div",{children:">79: Normal propagation"}),y.jsx("div",{children:"0–79: Super-refraction"}),y.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),e.last_update&&y.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",e.last_update]})]})}function PJe(){var k;const[e,t]=H.useState(null),[r,n]=H.useState([]),[i,a]=H.useState(null),[o,s]=H.useState(null),[l,u]=H.useState([]),[c,f]=H.useState(null),[h,d]=H.useState([]),[v,g]=H.useState([]),[m,x]=H.useState([]),[_,b]=H.useState([]),[S,T]=H.useState(0),[A,M]=H.useState(!0),[P,I]=H.useState(null);return H.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([EZ().catch(()=>null),DZ().catch(()=>[]),NZ().catch(()=>null),jZ().catch(()=>null),vce().catch(()=>[]),pce().catch(()=>null),gce().catch(()=>[]),mce().catch(()=>[]),yce().catch(()=>[]),xce().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([O,D,N,j,z,$,U,F,V,W])=>{t(O),n(D),a(N),s(j),u(z),f($),d(U||[]),g(F||[]),x(V||[]),b((W==null?void 0:W.hotspots)||[]),T((W==null?void 0:W.new_ignitions)||0),M(!1)}).catch(O=>{I(O.message),M(!1)})},[]),A?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):P?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsxs("div",{className:"text-red-400",children:["Error: ",P]})}):e!=null&&e.enabled?y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),y.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Hy,{size:14}),"Feed Status"]}),y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:e.feeds.map(O=>y.jsx(TJe,{feed:O},O.source))})]}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsx(CJe,{swpc:i}),y.jsx(MJe,{ducting:o})]}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(UE,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?y.jsx("div",{className:"space-y-3",children:l.map(O=>y.jsxs("div",{className:`p-3 rounded-lg ${O.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":O.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsx("span",{className:"text-sm font-medium text-slate-200",children:O.name}),y.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${O.severity==="warning"?"bg-red-500/20 text-red-400":O.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:O.severity})]}),y.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[y.jsxs("div",{children:[O.acres.toLocaleString()," acres, ",O.pct_contained,"% contained"]}),O.distance_km&&O.nearest_anchor&&y.jsxs("div",{children:[Math.round(O.distance_km)," km from ",O.nearest_anchor]})]})]},O.event_id))}):y.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[y.jsx(ed,{size:16,className:"text-green-500"}),y.jsx("span",{children:"No active wildfires in the area"})]})]}),y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(ZE,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?y.jsx("div",{className:"text-slate-500 py-4",children:y.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?y.jsxs("div",{className:"space-y-3",children:[c.advisories.map(O=>y.jsxs("div",{className:`p-3 rounded-lg ${O.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":O.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":O.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[y.jsxs("div",{className:"flex items-center justify-between mb-1",children:[y.jsx("span",{className:"text-sm font-medium text-slate-200",children:O.zone_name}),y.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${O.danger_level>=4?"bg-red-500/20 text-red-400":O.danger_level>=3?"bg-amber-500/20 text-amber-400":O.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:O.danger_name})]}),y.jsx("div",{className:"text-xs text-slate-400",children:O.center}),O.travel_advice&&y.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:O.travel_advice})]},O.event_id)),((k=c.advisories[0])==null?void 0:k.center_link)&&y.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):y.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[y.jsx(ed,{size:16,className:"text-green-500"}),y.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(GE,{size:14}),"Stream Gauges (",h.length,")"]}),y.jsx("div",{className:"space-y-2",children:h.map(O=>{var D,N,j,z,$;return y.jsxs("div",{className:`p-3 rounded-lg ${O.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-slate-200",children:((D=O.properties)==null?void 0:D.site_name)||"Unknown Site"}),y.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(j=(N=O.properties)==null?void 0:N.value)==null?void 0:j.toLocaleString()," ",(z=O.properties)==null?void 0:z.unit]})]}),y.jsx("div",{className:"text-xs text-slate-500 mt-1",children:($=O.properties)==null?void 0:$.parameter})]},O.event_id)})})]}),(v.length>0||m.length>0)&&y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(VE,{size:14}),"Road Conditions"]}),v.length>0&&y.jsxs("div",{className:"mb-4",children:[y.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),y.jsx("div",{className:"space-y-2",children:v.map(O=>{var D,N,j,z,$,U,F,V,W;return y.jsxs("div",{className:`p-3 rounded-lg ${(D=O.properties)!=null&&D.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((N=O.properties)==null?void 0:N.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((j=O.properties)==null?void 0:j.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-slate-200",children:((z=O.properties)==null?void 0:z.corridor)||"Unknown"}),y.jsx("span",{className:"text-sm font-mono text-slate-300",children:($=O.properties)!=null&&$.roadClosure?"CLOSED":`${Math.round(((U=O.properties)==null?void 0:U.currentSpeed)||0)}mph`})]}),!((F=O.properties)!=null&&F.roadClosure)&&y.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((V=O.properties)==null?void 0:V.speedRatio)||1)*100),"% of free flow (",Math.round(((W=O.properties)==null?void 0:W.freeFlowSpeed)||0),"mph)"]})]},O.event_id)})})]}),m.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),y.jsx("div",{className:"space-y-2",children:m.map(O=>{var D,N;return y.jsxs("div",{className:`p-3 rounded-lg ${(D=O.properties)!=null&&D.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[y.jsxs("div",{className:"flex items-center gap-2",children:[((N=O.properties)==null?void 0:N.is_closure)&&y.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),y.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:O.headline})]}),y.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:O.event_type})]},O.event_id)})})]})]}),_.length>0&&y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(YE,{size:14}),"Satellite Hotspots (",_.length,")",S>0&&y.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[S," NEW"]})]}),y.jsx("div",{className:"space-y-2",children:_.map(O=>{var D,N,j,z,$,U;return y.jsxs("div",{className:`p-3 rounded-lg ${(D=O.properties)!=null&&D.new_ignition?"bg-red-500/10 border-l-2 border-red-500":O.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[((N=O.properties)==null?void 0:N.new_ignition)&&y.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),y.jsx("span",{className:"text-sm text-slate-200",children:O.headline})]}),((j=O.properties)==null?void 0:j.frp)&&y.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(O.properties.frp)," MW"]})]}),y.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[y.jsxs("span",{children:["Conf: ",((z=O.properties)==null?void 0:z.confidence)||"N/A"]}),(($=O.properties)==null?void 0:$.acq_time)&&y.jsxs("span",{children:["@",O.properties.acq_time,"Z"]}),((U=O.properties)==null?void 0:U.near_fire)&&y.jsxs("span",{children:["Near: ",O.properties.near_fire]})]})]},O.event_id)})})]}),y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Ns,{size:14}),"Active Events (",r.length,")"]}),r.length>0?y.jsx("div",{className:"space-y-3",children:r.map(O=>y.jsx(AJe,{event:O},O.event_id))}):y.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[y.jsx(ed,{size:16,className:"text-green-500"}),y.jsx("span",{children:"No active environmental events"})]})]})]}):y.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[y.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:y.jsx(qc,{size:32,className:"text-slate-500"})}),y.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),y.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}function $R({label:e,value:t,onChange:r,helper:n,info:i,roleFilter:a,valueType:o="short_name"}){const[s,l]=H.useState([]),[u,c]=H.useState(!0),[f,h]=H.useState(""),[d,v]=H.useState(!1);H.useEffect(()=>{fetch("/api/nodes").then(S=>S.json()).then(S=>{l(S),c(!1)}).catch(()=>{l([]),c(!1)})},[]);const g=H.useMemo(()=>{let S=s;if(a&&(S=S.filter(T=>a==="ROUTER"||a==="infrastructure"?T.is_infrastructure||T.role==="ROUTER"||T.role==="ROUTER_CLIENT"||T.role==="REPEATER":T.role===a)),f.trim()){const T=f.toLowerCase();S=S.filter(A=>{var M,P,I,k;return((M=A.short_name)==null?void 0:M.toLowerCase().includes(T))||((P=A.long_name)==null?void 0:P.toLowerCase().includes(T))||((I=A.role)==null?void 0:I.toLowerCase().includes(T))||((k=A.node_id_hex)==null?void 0:k.toLowerCase().includes(T))})}return S.sort((T,A)=>(T.short_name||"").localeCompare(A.short_name||""))},[s,f,a]),m=S=>{switch(o){case"node_num":return String(S.node_num);case"node_id_hex":return S.node_id_hex;default:return S.short_name||String(S.node_num)}},x=S=>{const T=m(S);return t.includes(T)},_=S=>{const T=m(S);t.includes(T)?r(t.filter(A=>A!==T)):r([...t,T])},b=S=>{const T=[S.short_name];return S.long_name&&S.long_name!==S.short_name&&T.push(`— ${S.long_name}`),S.role&&T.push(`(${S.role})`),T.join(" ")};return!u&&s.length===0?y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),y.jsx("input",{type:"text",value:t.join(", "),onChange:S=>r(S.target.value.split(",").map(T=>T.trim()).filter(Boolean)),placeholder:"Enter node IDs separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]}):y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e}),t.length>0&&y.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:t.map(S=>{const T=s.find(A=>m(A)===S);return y.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-accent/20 text-accent rounded text-sm",children:[T?T.short_name:S,y.jsx("button",{type:"button",onClick:()=>r(t.filter(A=>A!==S)),className:"hover:text-white",children:y.jsx(ru,{size:14})})]},S)})}),y.jsxs("div",{className:"relative",children:[y.jsxs("div",{className:"relative",children:[y.jsx(XE,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",value:f,onChange:S=>h(S.target.value),onFocus:()=>v(!0),placeholder:u?"Loading nodes...":"Search nodes...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"})]}),d&&!u&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>v(!1)}),y.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 max-h-64 overflow-y-auto bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl",children:g.length===0?y.jsx("div",{className:"p-3 text-sm text-slate-500 text-center",children:"No nodes found"}):g.map(S=>y.jsxs("button",{type:"button",onClick:()=>_(S),className:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[#1e2a3a] ${x(S)?"bg-accent/10":""}`,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${x(S)?"bg-accent border-accent":"border-slate-600"}`,children:x(S)&&y.jsx(Xc,{size:12,className:"text-white"})}),y.jsx("span",{className:"text-slate-200",children:b(S)})]},S.node_num))})]})]}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function FR(e){const[t,r]=H.useState([]),[n,i]=H.useState(!0);H.useEffect(()=>{fetch("/api/channels").then(h=>h.json()).then(h=>{r(h),i(!1)}).catch(()=>{r([]),i(!1)})},[]);const a=h=>{const d=h.role==="PRIMARY"?"Primary":h.role==="SECONDARY"?"Secondary":"";return`${h.index}: ${h.name}${d?` (${d})`:""}`};if(!n&&t.length===0)return e.mode==="single"?y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),y.jsx("input",{type:"number",value:e.value,onChange:h=>e.onChange(Number(h.target.value)),min:e.includeDisabled?-1:0,max:7,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&y.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]}):y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:e.label}),y.jsx("input",{type:"text",value:e.value.join(", "),onChange:h=>{const d=h.target.value.split(",").map(v=>parseInt(v.trim())).filter(v=>!isNaN(v));e.onChange(d)},placeholder:"Enter channel numbers separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),e.helper&&y.jsx("p",{className:"text-xs text-slate-600",children:e.helper})]});if(e.mode==="single"){const{value:h,onChange:d,label:v,helper:g,includeDisabled:m}=e,x=t.filter(_=>_.enabled);return y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:v}),y.jsxs("select",{value:h,onChange:_=>d(Number(_.target.value)),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:[m&&y.jsx("option",{value:-1,children:"Disabled"}),x.map(_=>y.jsx("option",{value:_.index,children:a(_)},_.index))]}),g&&y.jsx("p",{className:"text-xs text-slate-600",children:g})]})}const{value:o,onChange:s,label:l,helper:u}=e,c=t.filter(h=>h.enabled),f=h=>{o.includes(h)?s(o.filter(d=>d!==h)):s([...o,h].sort((d,v)=>d-v))};return y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:l}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:[c.map(h=>y.jsxs("label",{onClick:()=>f(h.index),className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${o.includes(h.index)?"bg-accent border-accent":"border-slate-600"}`,children:o.includes(h.index)&&y.jsx(Xc,{size:12,className:"text-white"})}),y.jsx("span",{className:"text-sm text-slate-200",children:a(h)})]},h.index)),c.length===0&&y.jsx("div",{className:"text-sm text-slate-500 p-2",children:"No channels available"})]}),u&&y.jsx("p",{className:"text-xs text-slate-600",children:u})]})}const VU=[{key:"bot",label:"Bot",icon:Zue},{key:"connection",label:"Connection",icon:TS},{key:"response",label:"Response",icon:CZ},{key:"history",label:"History",icon:tce},{key:"memory",label:"Memory",icon:Yue},{key:"context",label:"Context",icon:WE},{key:"commands",label:"Commands",icon:kZ},{key:"llm",label:"LLM",icon:bZ},{key:"weather",label:"Weather",icon:qc},{key:"meshmonitor",label:"MeshMonitor",icon:Ds},{key:"knowledge",label:"Knowledge",icon:xZ},{key:"mesh_sources",label:"Mesh Sources",icon:SZ},{key:"mesh_intelligence",label:"Intelligence",icon:Hy},{key:"environmental",label:"Environmental",icon:sce},{key:"dashboard",label:"Dashboard",icon:TZ}],Kn={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",dashboard:"Web dashboard settings. You're looking at it right now."},LJe=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],kJe=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function Wo({info:e,link:t,linkText:r="Learn more"}){const[n,i]=H.useState(!1),a=H.useRef(null);return H.useEffect(()=>{if(!n)return;function o(l){a.current&&!a.current.contains(l.target)&&i(!1)}const s=setTimeout(()=>document.addEventListener("mousedown",o),0);return()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[n]),y.jsxs("div",{className:"relative inline-block",ref:a,children:[y.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&y.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[y.jsx("button",{type:"button",onClick:()=>i(!1),className:"absolute top-1 right-1 w-5 h-5 rounded hover:bg-slate-700 text-slate-500 hover:text-slate-300 inline-flex items-center justify-center transition-colors","aria-label":"Close",children:y.jsx(ru,{size:12})}),y.jsx("div",{className:"pr-4",children:e}),t&&y.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:o=>o.stopPropagation(),children:[r," ",y.jsx(bd,{size:10})]})]})]})}function Qn({text:e}){return y.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:e})}function At({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=H.useState(!1),c=n==="password";return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&y.jsx(Wo,{info:o,link:s})]}),y.jsxs("div",{className:"relative",children:[y.jsx("input",{type:c&&!l?"password":"text",value:t,onChange:f=>r(f.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&y.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?y.jsx(wZ,{size:16}):y.jsx(WE,{size:16})})]}),a&&y.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function qe({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&y.jsx(Wo,{info:s,link:l})]}),y.jsx("input",{type:"number",value:t,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&y.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function Et({label:e,checked:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){return y.jsxs("div",{className:"flex items-center justify-between py-2",children:[y.jsxs("div",{children:[y.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&y.jsx(Wo,{info:i,link:a})]}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]}),y.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:y.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function Co({label:e,value:t,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&y.jsx(Wo,{info:a,link:o})]}),y.jsx("select",{value:t,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>y.jsx("option",{value:s.value,children:s.label},s.value))}),i&&y.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function IJe({label:e,value:t,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&y.jsx(Wo,{info:a,link:o})]}),y.jsx("textarea",{value:t,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&y.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Zh({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=H.useState(t.join(", "));H.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&y.jsx(Wo,{info:i,link:a})]}),y.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function OJe({label:e,value:t,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=H.useState(t.join(", "));H.useEffect(()=>{s(t.join(", "))},[t]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&y.jsx(Wo,{info:i,link:a})]}),y.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Cn({label:e,description:t,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx("span",{className:"text-sm text-slate-300",children:e}),y.jsx("p",{className:"text-xs text-slate-600",children:t})]}),y.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:y.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&y.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[y.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),y.jsx("input",{type:"number",value:i,onChange:f=>a(Number(f.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&y.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function EJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.bot}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Bot Name",value:e.name,onChange:r=>t({...e,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),y.jsx(At,{label:"Owner",value:e.owner,onChange:r=>t({...e,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),y.jsx(Et,{label:"Respond to DMs",checked:e.respond_to_dms,onChange:r=>t({...e,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),y.jsx(Et,{label:"Filter BBS Protocols",checked:e.filter_bbs_protocols,onChange:r=>t({...e,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function DJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.connection}),y.jsx(Co,{label:"Connection Type",value:e.type,onChange:r=>t({...e,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),e.type==="serial"?y.jsx(At,{label:"Serial Port",value:e.serial_port,onChange:r=>t({...e,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"TCP Host",value:e.tcp_host,onChange:r=>t({...e,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),y.jsx(qe,{label:"TCP Port",value:e.tcp_port,onChange:r=>t({...e,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function NJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.response}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Delay Min (sec)",value:e.delay_min,onChange:r=>t({...e,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),y.jsx(qe,{label:"Delay Max (sec)",value:e.delay_max,onChange:r=>t({...e,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Max Length",value:e.max_length,onChange:r=>t({...e,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),y.jsx(qe,{label:"Max Messages",value:e.max_messages,onChange:r=>t({...e,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function jJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.history}),y.jsx(At,{label:"Database Path",value:e.database,onChange:r=>t({...e,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Max Messages Per User",value:e.max_messages_per_user,onChange:r=>t({...e,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),y.jsx(qe,{label:"Conversation Timeout (sec)",value:e.conversation_timeout,onChange:r=>t({...e,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),y.jsx(Et,{label:"Auto Cleanup",checked:e.auto_cleanup,onChange:r=>t({...e,auto_cleanup:r}),helper:"Automatically prune old conversations"}),e.auto_cleanup&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Cleanup Interval (hours)",value:e.cleanup_interval_hours,onChange:r=>t({...e,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),y.jsx(qe,{label:"Max Age (days)",value:e.max_age_days,onChange:r=>t({...e,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function RJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.memory}),y.jsx(Et,{label:"Enable Memory",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Keep conversation context between messages"}),e.enabled&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Window Size",value:e.window_size,onChange:r=>t({...e,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),y.jsx(qe,{label:"Summarize Threshold",value:e.summarize_threshold,onChange:r=>t({...e,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function BJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.context}),y.jsx(Et,{label:"Enable Passive Context",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(FR,{label:"Observe Channels",value:e.observe_channels,onChange:r=>t({...e,observe_channels:r}),helper:"Channels to monitor (empty = all)",info:"Meshtastic channels to listen on. Leave empty to monitor all channels.",mode:"multi"}),y.jsx($R,{label:"Ignore Nodes",value:e.ignore_nodes,onChange:r=>t({...e,ignore_nodes:r}),helper:"Nodes to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Max Age (sec)",value:e.max_age,onChange:r=>t({...e,max_age:r}),min:0,helper:"Ignore messages older than this"}),y.jsx(qe,{label:"Max Context Items",value:e.max_context_items,onChange:r=>t({...e,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function zJe({data:e,onChange:t}){const r=new Set(e.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?t({...e,disabled_commands:e.disabled_commands.filter(o=>o.toLowerCase()!==a)}):t({...e,disabled_commands:[...e.disabled_commands,i]})};return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.commands}),y.jsx(Et,{label:"Enable Commands",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Allow !commands on the mesh"}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"Command Prefix",value:e.prefix,onChange:i=>t({...e,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",y.jsx(Wo,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),y.jsx("div",{className:"grid gap-1",children:LJe.map(i=>{const a=!r.has(i.name.toLowerCase());return y.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),y.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),y.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:y.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function $Je({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.llm}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(Co,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),y.jsx(At,{label:"Model",value:e.model,onChange:r=>t({...e,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),y.jsx(At,{label:"API Key",value:e.api_key,onChange:r=>t({...e,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),y.jsx(At,{label:"Base URL",value:e.base_url,onChange:r=>t({...e,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Timeout (sec)",value:e.timeout,onChange:r=>t({...e,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),y.jsx(qe,{label:"Max Response Tokens",value:e.max_response_tokens,onChange:r=>t({...e,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),y.jsx(Et,{label:"Use System Prompt",checked:e.use_system_prompt,onChange:r=>t({...e,use_system_prompt:r}),helper:"Enable custom system instructions"}),e.use_system_prompt&&y.jsx(IJe,{label:"System Prompt",value:e.system_prompt,onChange:r=>t({...e,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),y.jsx(Et,{label:"Web Search",checked:e.web_search,onChange:r=>t({...e,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),y.jsx(Et,{label:"Google Grounding",checked:e.google_grounding,onChange:r=>t({...e,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function FJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.weather}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(Co,{label:"Primary Provider",value:e.primary,onChange:r=>t({...e,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),y.jsx(Co,{label:"Fallback Provider",value:e.fallback,onChange:r=>t({...e,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),y.jsx(At,{label:"Default Location",value:e.default_location,onChange:r=>t({...e,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function VJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.meshmonitor}),y.jsx(Et,{label:"Enable MeshMonitor",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"URL",value:e.url,onChange:r=>t({...e,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),y.jsx(Et,{label:"Inject Into Prompt",checked:e.inject_into_prompt,onChange:r=>t({...e,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),y.jsx(qe,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:r=>t({...e,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),y.jsx(Et,{label:"Polite Mode",checked:e.polite_mode,onChange:r=>t({...e,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function GJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.knowledge}),y.jsx(Et,{label:"Enable Knowledge Base",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(Co,{label:"Backend",value:e.backend,onChange:r=>t({...e,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(e.backend==="qdrant"||e.backend==="auto")&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Qdrant Host",value:e.qdrant_host,onChange:r=>t({...e,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),y.jsx(qe,{label:"Qdrant Port",value:e.qdrant_port,onChange:r=>t({...e,qdrant_port:r}),helper:"Default 6333"})]}),y.jsx(At,{label:"Collection",value:e.qdrant_collection,onChange:r=>t({...e,qdrant_collection:r}),helper:"Qdrant collection name"}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"TEI Host",value:e.tei_host,onChange:r=>t({...e,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),y.jsx(qe,{label:"TEI Port",value:e.tei_port,onChange:r=>t({...e,tei_port:r}),helper:"Default 8090"})]}),y.jsx(Et,{label:"Use Sparse Embeddings",checked:e.use_sparse,onChange:r=>t({...e,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),y.jsx(At,{label:"SQLite DB Path",value:e.db_path,onChange:r=>t({...e,db_path:r}),helper:"Local knowledge database file"}),y.jsx(qe,{label:"Top K Results",value:e.top_k,onChange:r=>t({...e,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function WJe({source:e,onChange:t,onDelete:r}){const[n,i]=H.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[y.jsxs("div",{className:"flex items-center gap-3",children:[n?y.jsx(Uy,{size:16}):y.jsx(wm,{size:16}),y.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`}),y.jsx("span",{className:"font-mono text-sm text-slate-200",children:e.name||"Unnamed Source"}),y.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:e.type})]}),y.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:y.jsx(qE,{size:14})})]}),n&&y.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Name",value:e.name,onChange:o=>t({...e,name:o}),helper:"Friendly name for this source"}),y.jsx(Co,{label:"Type",value:e.type,onChange:o=>t({...e,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[e.type]||""})]}),e.type!=="mqtt"&&y.jsx(At,{label:"URL",value:e.url,onChange:o=>t({...e,url:o}),helper:"Full URL including protocol"}),e.type==="meshmonitor"&&y.jsx(At,{label:"API Token",value:e.api_token,onChange:o=>t({...e,api_token:o}),type:"password",helper:"Bearer token for authentication"}),e.type==="mqtt"&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Host",value:e.host||"",onChange:o=>t({...e,host:o}),helper:"MQTT broker hostname"}),y.jsx(qe,{label:"Port",value:e.port||1883,onChange:o=>t({...e,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Username",value:e.username||"",onChange:o=>t({...e,username:o})}),y.jsx(At,{label:"Password",value:e.password||"",onChange:o=>t({...e,password:o}),type:"password"})]}),y.jsx(At,{label:"Topic Root",value:e.topic_root||"msh/US",onChange:o=>t({...e,topic_root:o}),helper:"Base topic to subscribe to"}),y.jsx(Et,{label:"Use TLS",checked:e.use_tls||!1,onChange:o=>t({...e,use_tls:o}),helper:"Encrypt MQTT connection"})]}),y.jsx(qe,{label:"Refresh Interval (sec)",value:e.refresh_interval,onChange:o=>t({...e,refresh_interval:o}),min:10,helper:"Polling frequency"}),y.jsx(Et,{label:"Enabled",checked:e.enabled,onChange:o=>t({...e,enabled:o})}),y.jsx(Et,{label:"Polite Mode",checked:e.polite_mode,onChange:o=>t({...e,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function HJe({data:e,onChange:t}){const r=()=>{t([...e,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.mesh_sources}),e.map((n,i)=>y.jsx(WJe,{source:n,onChange:a=>{const o=[...e];o[i]=a,t(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&t(e.filter((a,o)=>o!==i))}},i)),y.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[y.jsx(SS,{size:16})," Add Source"]})]})}function UJe({data:e,onChange:t}){const[r,n]=H.useState(null);return y.jsxs("div",{className:"space-y-6",children:[y.jsx(Qn,{text:Kn.mesh_intelligence}),y.jsx(Et,{label:"Enable Mesh Intelligence",checked:e.enabled,onChange:i=>t({...e,enabled:i}),helper:"Activate health scoring and alerting"}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Locality Radius (miles)",value:e.locality_radius_miles,onChange:i=>t({...e,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),y.jsx(qe,{label:"Offline Threshold (hours)",value:e.offline_threshold_hours,onChange:i=>t({...e,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Packet Threshold",value:e.packet_threshold,onChange:i=>t({...e,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),y.jsx(qe,{label:"Battery Warning %",value:e.battery_warning_percent,onChange:i=>t({...e,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),y.jsx($R,{label:"Critical Nodes",value:e.critical_nodes,onChange:i=>t({...e,critical_nodes:i}),helper:"Critical infrastructure nodes",info:"Nodes that get priority alerting when they go offline.",roleFilter:"infrastructure"}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(FR,{label:"Alert Channel",value:e.alert_channel,onChange:i=>t({...e,alert_channel:i}),helper:"Channel for broadcast alerts",info:"Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting.",mode:"single",includeDisabled:!0}),y.jsx(qe,{label:"Alert Cooldown (min)",value:e.alert_cooldown_minutes,onChange:i=>t({...e,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",y.jsx(Wo,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),e.regions.map((i,a)=>y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[y.jsxs("div",{className:"flex items-center gap-3",children:[r===a?y.jsx(Uy,{size:16}):y.jsx(wm,{size:16}),y.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),y.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),y.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=e.regions.filter((l,u)=>u!==a);t({...e,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:y.jsx(qE,{size:14})})]}),r===a&&y.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Name",value:i.name,onChange:o=>{const s=[...e.regions];s[a]={...i,name:o},t({...e,regions:s})}}),y.jsx(At,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...e.regions];s[a]={...i,local_name:o},t({...e,regions:s})}})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...e.regions];s[a]={...i,lat:o},t({...e,regions:s})},step:1e-4}),y.jsx(qe,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...e.regions];s[a]={...i,lon:o},t({...e,regions:s})},step:1e-4})]}),y.jsx(At,{label:"Description",value:i.description,onChange:o=>{const s=[...e.regions];s[a]={...i,description:o},t({...e,regions:s})}}),y.jsx(Zh,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...e.regions];s[a]={...i,aliases:o},t({...e,regions:s})}}),y.jsx(Zh,{label:"Cities",value:i.cities,onChange:o=>{const s=[...e.regions];s[a]={...i,cities:o},t({...e,regions:s})}})]})]},a)),y.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};t({...e,regions:[...e.regions,i]}),n(e.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[y.jsx(SS,{size:16})," Add Region"]})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",y.jsx(Wo,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),y.jsx(Cn,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:e.alert_rules.infra_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_offline:i}})}),y.jsx(Cn,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:e.alert_rules.infra_recovery,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_recovery:i}})}),y.jsx(Cn,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:e.alert_rules.new_router,onChange:i=>t({...e,alert_rules:{...e.alert_rules,new_router:i}})}),y.jsx(Cn,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:e.alert_rules.feeder_offline,onChange:i=>t({...e,alert_rules:{...e.alert_rules,feeder_offline:i}})}),y.jsx(Cn,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:e.alert_rules.infra_single_gateway,onChange:i=>t({...e,alert_rules:{...e.alert_rules,infra_single_gateway:i}})}),y.jsx(Cn,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:e.alert_rules.region_total_blackout,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_total_blackout:i}})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),y.jsx(Cn,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:e.alert_rules.battery_warning,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning:i}}),threshold:e.alert_rules.battery_warning_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),y.jsx(Cn,{label:"Battery Critical",description:"Alert at critical battery level",checked:e.alert_rules.battery_critical,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical:i}}),threshold:e.alert_rules.battery_critical_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),y.jsx(Cn,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:e.alert_rules.battery_emergency,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency:i}}),threshold:e.alert_rules.battery_emergency_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),y.jsx(Cn,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:e.alert_rules.battery_trend_declining,onChange:i=>t({...e,alert_rules:{...e.alert_rules,battery_trend_declining:i}})}),y.jsx(Cn,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:e.alert_rules.power_source_change,onChange:i=>t({...e,alert_rules:{...e.alert_rules,power_source_change:i}})}),y.jsx(Cn,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:e.alert_rules.solar_not_charging,onChange:i=>t({...e,alert_rules:{...e.alert_rules,solar_not_charging:i}})})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),y.jsx(Cn,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:e.alert_rules.sustained_high_util,onChange:i=>t({...e,alert_rules:{...e.alert_rules,sustained_high_util:i}}),threshold:e.alert_rules.high_util_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${e.alert_rules.high_util_hours}h`}),y.jsx(Cn,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:e.alert_rules.packet_flood,onChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood:i}}),threshold:e.alert_rules.packet_flood_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),y.jsx(Cn,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:e.alert_rules.mesh_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_alert:i}}),threshold:e.alert_rules.mesh_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),y.jsx(Cn,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:e.alert_rules.region_score_alert,onChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_alert:i}}),threshold:e.alert_rules.region_score_threshold,onThresholdChange:i=>t({...e,alert_rules:{...e.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function ZJe({data:e,onChange:t}){var r,n,i,a,o,s,l,u,c,f,h,d,v,g,m,x;return y.jsxs("div",{className:"space-y-6",children:[y.jsx(Qn,{text:Kn.environmental}),y.jsx(Et,{label:"Enable Environmental Feeds",checked:e.enabled,onChange:_=>t({...e,enabled:_}),helper:"Activate live data polling"}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(Zh,{label:"NWS Zones",value:e.nws_zones,onChange:_=>t({...e,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),y.jsx(Et,{label:"",checked:e.nws.enabled,onChange:_=>t({...e,nws:{...e.nws,enabled:_}})})]}),e.nws.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"User Agent",value:e.nws.user_agent,onChange:_=>t({...e,nws:{...e.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Tick Seconds",value:e.nws.tick_seconds,onChange:_=>t({...e,nws:{...e.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),y.jsx(Co,{label:"Min Severity",value:e.nws.severity_min,onChange:_=>t({...e,nws:{...e.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),y.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),y.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),y.jsx(Et,{label:"",checked:e.swpc.enabled,onChange:_=>t({...e,swpc:{...e.swpc,enabled:_}})})]})}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),y.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),y.jsx(Et,{label:"",checked:e.ducting.enabled,onChange:_=>t({...e,ducting:{...e.ducting,enabled:_}})})]}),e.ducting.enabled&&y.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[y.jsx(qe,{label:"Tick Seconds",value:e.ducting.tick_seconds,onChange:_=>t({...e,ducting:{...e.ducting,tick_seconds:_}}),min:60}),y.jsx(qe,{label:"Latitude",value:e.ducting.latitude,onChange:_=>t({...e,ducting:{...e.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),y.jsx(qe,{label:"Longitude",value:e.ducting.longitude,onChange:_=>t({...e,ducting:{...e.ducting,longitude:_}}),step:.01})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),y.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),y.jsx(Et,{label:"",checked:e.fires.enabled,onChange:_=>t({...e,fires:{...e.fires,enabled:_}})})]}),e.fires.enabled&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(qe,{label:"Tick Seconds",value:e.fires.tick_seconds,onChange:_=>t({...e,fires:{...e.fires,tick_seconds:_}}),min:60}),y.jsx(Co,{label:"State",value:e.fires.state,onChange:_=>t({...e,fires:{...e.fires,state:_}}),options:kJe,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),y.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),y.jsx(Et,{label:"",checked:e.avalanche.enabled,onChange:_=>t({...e,avalanche:{...e.avalanche,enabled:_}})})]}),e.avalanche.enabled&&y.jsxs(y.Fragment,{children:[y.jsx(qe,{label:"Tick Seconds",value:e.avalanche.tick_seconds,onChange:_=>t({...e,avalanche:{...e.avalanche,tick_seconds:_}}),min:60}),y.jsx(Zh,{label:"Center IDs",value:e.avalanche.center_ids,onChange:_=>t({...e,avalanche:{...e.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),y.jsx(OJe,{label:"Season Months",value:e.avalanche.season_months,onChange:_=>t({...e,avalanche:{...e.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),y.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),y.jsx(Et,{label:"",checked:((r=e.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var b,S;return t({...e,usgs:{...e.usgs,enabled:_,tick_seconds:((b=e.usgs)==null?void 0:b.tick_seconds)||900,sites:((S=e.usgs)==null?void 0:S.sites)||[]}})}})]}),((n=e.usgs)==null?void 0:n.enabled)&&y.jsxs(y.Fragment,{children:[y.jsx(qe,{label:"Tick Seconds",value:e.usgs.tick_seconds,onChange:_=>t({...e,usgs:{...e.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),y.jsx(Zh,{label:"Site IDs",value:e.usgs.sites,onChange:_=>t({...e,usgs:{...e.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),y.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),y.jsx(Et,{label:"",checked:((i=e.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var b,S,T;return t({...e,traffic:{...e.traffic,enabled:_,tick_seconds:((b=e.traffic)==null?void 0:b.tick_seconds)||300,api_key:((S=e.traffic)==null?void 0:S.api_key)||"",corridors:((T=e.traffic)==null?void 0:T.corridors)||[]}})}})]}),((a=e.traffic)==null?void 0:a.enabled)&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"API Key",value:e.traffic.api_key,onChange:_=>t({...e,traffic:{...e.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),y.jsx(qe,{label:"Tick Seconds",value:e.traffic.tick_seconds,onChange:_=>t({...e,traffic:{...e.traffic,tick_seconds:_}}),min:60}),y.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(e.traffic.corridors||[]).map((_,b)=>y.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[y.jsx(At,{label:"Name",value:_.name,onChange:S=>{const T=[...e.traffic.corridors];T[b]={..._,name:S},t({...e,traffic:{...e.traffic,corridors:T}})}}),y.jsx(qe,{label:"Lat",value:_.lat,onChange:S=>{const T=[...e.traffic.corridors];T[b]={..._,lat:S},t({...e,traffic:{...e.traffic,corridors:T}})},step:.01}),y.jsx(qe,{label:"Lon",value:_.lon,onChange:S=>{const T=[...e.traffic.corridors];T[b]={..._,lon:S},t({...e,traffic:{...e.traffic,corridors:T}})},step:.01}),y.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:e.traffic.corridors.filter((S,T)=>T!==b)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},b)),y.jsx("button",{onClick:()=>t({...e,traffic:{...e.traffic,corridors:[...e.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),y.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),y.jsx(Et,{label:"",checked:((o=e.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var b,S,T,A,M;return t({...e,roads511:{...e.roads511,enabled:_,tick_seconds:((b=e.roads511)==null?void 0:b.tick_seconds)||300,api_key:((S=e.roads511)==null?void 0:S.api_key)||"",base_url:((T=e.roads511)==null?void 0:T.base_url)||"",endpoints:((A=e.roads511)==null?void 0:A.endpoints)||["/get/event"],bbox:((M=e.roads511)==null?void 0:M.bbox)||[]}})}})]}),((s=e.roads511)==null?void 0:s.enabled)&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"Base URL",value:e.roads511.base_url,onChange:_=>t({...e,roads511:{...e.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),y.jsx(At,{label:"API Key",value:e.roads511.api_key,onChange:_=>t({...e,roads511:{...e.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),y.jsx(qe,{label:"Tick Seconds",value:e.roads511.tick_seconds,onChange:_=>t({...e,roads511:{...e.roads511,tick_seconds:_}}),min:60}),y.jsx(Zh,{label:"Endpoints",value:e.roads511.endpoints,onChange:_=>t({...e,roads511:{...e.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),y.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[y.jsx(qe,{label:"West",value:((l=e.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[0]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),y.jsx(qe,{label:"South",value:((u=e.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[1]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),y.jsx(qe,{label:"East",value:((c=e.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[2]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01}),y.jsx(qe,{label:"North",value:((f=e.roads511.bbox)==null?void 0:f[3])||0,onChange:_=>{const b=[...e.roads511.bbox||[0,0,0,0]];b[3]=_,t({...e,roads511:{...e.roads511,bbox:b}})},step:.01})]}),y.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),y.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),y.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),y.jsx(Et,{label:"",checked:((h=e.firms)==null?void 0:h.enabled)||!1,onChange:_=>{var b,S,T,A,M,P,I;return t({...e,firms:{...e.firms,enabled:_,tick_seconds:((b=e.firms)==null?void 0:b.tick_seconds)||1800,map_key:((S=e.firms)==null?void 0:S.map_key)||"",source:((T=e.firms)==null?void 0:T.source)||"VIIRS_SNPP_NRT",bbox:((A=e.firms)==null?void 0:A.bbox)||[],day_range:((M=e.firms)==null?void 0:M.day_range)||1,confidence_min:((P=e.firms)==null?void 0:P.confidence_min)||"nominal",proximity_km:((I=e.firms)==null?void 0:I.proximity_km)||10}})}})]}),((d=e.firms)==null?void 0:d.enabled)&&y.jsxs(y.Fragment,{children:[y.jsx(At,{label:"MAP Key",value:e.firms.map_key,onChange:_=>t({...e,firms:{...e.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),y.jsx(qe,{label:"Tick Seconds",value:e.firms.tick_seconds,onChange:_=>t({...e,firms:{...e.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),y.jsx(Co,{label:"Satellite Source",value:e.firms.source,onChange:_=>t({...e,firms:{...e.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),y.jsx(qe,{label:"Day Range",value:e.firms.day_range,onChange:_=>t({...e,firms:{...e.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),y.jsx(Co,{label:"Minimum Confidence",value:e.firms.confidence_min,onChange:_=>t({...e,firms:{...e.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),y.jsx(qe,{label:"Proximity (km)",value:e.firms.proximity_km,onChange:_=>t({...e,firms:{...e.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),y.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[y.jsx(qe,{label:"West",value:((v=e.firms.bbox)==null?void 0:v[0])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[0]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),y.jsx(qe,{label:"South",value:((g=e.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[1]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),y.jsx(qe,{label:"East",value:((m=e.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[2]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01}),y.jsx(qe,{label:"North",value:((x=e.firms.bbox)==null?void 0:x[3])||0,onChange:_=>{const b=[...e.firms.bbox||[0,0,0,0]];b[3]=_,t({...e,firms:{...e.firms,bbox:b}})},step:.01})]}),y.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function YJe({data:e,onChange:t}){return y.jsxs("div",{className:"space-y-4",children:[y.jsx(Qn,{text:Kn.dashboard}),y.jsx(Et,{label:"Enable Dashboard",checked:e.enabled,onChange:r=>t({...e,enabled:r}),helper:"Run the web dashboard"}),e.enabled&&y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(At,{label:"Host",value:e.host,onChange:r=>t({...e,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),y.jsx(qe,{label:"Port",value:e.port,onChange:r=>t({...e,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function XJe(){var I;const[e,t]=H.useState(null),[r,n]=H.useState(null),[i,a]=H.useState("bot"),[o,s]=H.useState(!0),[l,u]=H.useState(!1),[c,f]=H.useState(null),[h,d]=H.useState(null),[v,g]=H.useState(!1),[m,x]=H.useState(!1),_=H.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const O=await k.json();t(O),n(JSON.parse(JSON.stringify(O))),x(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);H.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),H.useEffect(()=>{e&&r&&x(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const b=async()=>{if(e){u(!0),f(null),d(null);try{const k=e[i],O=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),D=await O.json();if(!O.ok)throw new Error(D.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(e))),x(!1),D.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},S=()=>{r&&(t(JSON.parse(JSON.stringify(r))),x(!1))},T=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{f("Restart failed")}},A=(k,O)=>{e&&t({...e,[k]:O})};if(o)return y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!e)return y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const M=()=>{switch(i){case"bot":return y.jsx(EJe,{data:e.bot,onChange:k=>A("bot",k)});case"connection":return y.jsx(DJe,{data:e.connection,onChange:k=>A("connection",k)});case"response":return y.jsx(NJe,{data:e.response,onChange:k=>A("response",k)});case"history":return y.jsx(jJe,{data:e.history,onChange:k=>A("history",k)});case"memory":return y.jsx(RJe,{data:e.memory,onChange:k=>A("memory",k)});case"context":return y.jsx(BJe,{data:e.context,onChange:k=>A("context",k)});case"commands":return y.jsx(zJe,{data:e.commands,onChange:k=>A("commands",k)});case"llm":return y.jsx($Je,{data:e.llm,onChange:k=>A("llm",k)});case"weather":return y.jsx(FJe,{data:e.weather,onChange:k=>A("weather",k)});case"meshmonitor":return y.jsx(VJe,{data:e.meshmonitor,onChange:k=>A("meshmonitor",k)});case"knowledge":return y.jsx(GJe,{data:e.knowledge,onChange:k=>A("knowledge",k)});case"mesh_sources":return y.jsx(HJe,{data:e.mesh_sources,onChange:k=>A("mesh_sources",k)});case"mesh_intelligence":return y.jsx(UJe,{data:e.mesh_intelligence,onChange:k=>A("mesh_intelligence",k)});case"environmental":return y.jsx(ZJe,{data:e.environmental,onChange:k=>A("environmental",k)});case"dashboard":return y.jsx(YJe,{data:e.dashboard,onChange:k=>A("dashboard",k)});default:return null}},P=((I=VU.find(k=>k.key===i))==null?void 0:I.label)||i;return y.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[y.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:VU.map(({key:k,label:O,icon:D})=>y.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[y.jsx(D,{size:16}),y.jsx("span",{children:O}),m&&i===k&&y.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),y.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(LZ,{size:20,className:"text-slate-500"}),y.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:P})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[m&&y.jsxs("button",{onClick:S,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[y.jsx(MZ,{size:14}),"Discard"]}),y.jsxs("button",{onClick:b,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?y.jsx(Gb,{size:14,className:"animate-spin"}):y.jsx(PZ,{size:14}),"Save"]})]})]}),v&&y.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[y.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[y.jsx(Ns,{size:16}),y.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),y.jsx("button",{onClick:T,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&y.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[y.jsx(ru,{size:16}),y.jsx("span",{className:"text-sm",children:c})]}),h&&y.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[y.jsx(Xc,{size:16}),y.jsx("span",{className:"text-sm",children:h})]}),y.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:y.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:M()})})]})]})}const GU={infra_offline:IZ,infra_recovery:TS,battery_warning:iC,battery_critical:iC,battery_emergency:iC,hf_blackout:Tm,uhf_ducting:Ds,weather_warning:qc,weather_watch:qc,new_router:Ds,packet_flood:Ns,sustained_high_util:Ns,region_blackout:xd,default:bm};function qJe(e){return GU[e]||GU.default}function Uie(e){switch(e==null?void 0:e.toLowerCase()){case"immediate":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"priority":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"routine":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function KJe(e){const t=typeof e=="number"?new Date(e*1e3):new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function QJe(e){return(typeof e=="number"?new Date(e*1e3):new Date(e)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function JJe(e){return e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`${Math.floor(e/86400)}d`}function eet({alert:e,onAcknowledge:t}){var i;const r=Uie(e.severity),n=qJe(e.type);return y.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:y.jsxs("div",{className:"flex items-start gap-3",children:[y.jsx(n,{size:20,className:r.iconColor}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=e.severity)==null?void 0:i.toUpperCase()}),y.jsx("span",{className:"text-xs text-slate-500",children:e.type})]}),y.jsx("div",{className:"text-sm text-slate-200",children:e.message}),y.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[y.jsxs("span",{className:"flex items-center gap-1",children:[y.jsx(_d,{size:12}),e.timestamp?KJe(e.timestamp):"Just now"]}),e.scope_value&&y.jsxs("span",{children:[e.scope_type,": ",e.scope_value]})]})]}),y.jsx("button",{onClick:()=>t(e),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function tet({history:e,typeFilter:t,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","immediate","priority","routine"];return y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[y.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(HE,{size:14,className:"text-slate-400"}),y.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),y.jsx("select",{value:t,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>y.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),y.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>y.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full",children:[y.jsx("thead",{children:y.jsxs("tr",{className:"border-b border-border",children:[y.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),y.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),y.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),y.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),y.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),y.jsx("tbody",{children:e.length>0?e.map((c,f)=>{const h=Uie(c.severity);return y.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[y.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:QJe(c.timestamp)}),y.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),y.jsx("td",{className:"p-4",children:y.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.badge}`,children:c.severity})}),y.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),y.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?JJe(c.duration):"-"})]},c.id||f)}):y.jsx("tr",{children:y.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&y.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[y.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:y.jsx(que,{size:16})}),y.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:y.jsx(wm,{size:16})})]})]})]})}function ret({subscription:e,nodes:t}){const r=o=>{const s=t.find(l=>l.node_id_hex===o||String(l.node_num)===o||l.short_name===o);return s?s.long_name&&s.long_name!==s.short_name?`${s.short_name} (${s.long_name})`:s.short_name:o},n=()=>{if(e.sub_type==="alerts")return"Real-time";const o=e.schedule_time||"0000",s=parseInt(o.slice(0,2)),l=o.slice(2),u=s>=12?"PM":"AM";let f=`${s%12||12}:${l} ${u}`;return e.sub_type==="weekly"&&e.schedule_day&&(f+=` ${e.schedule_day.charAt(0).toUpperCase()}${e.schedule_day.slice(1)}`),f},a=(()=>{switch(e.sub_type){case"alerts":return bm;case"daily":return _d;case"weekly":return _d;default:return bm}})();return y.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:y.jsx(a,{size:18,className:"text-blue-400"})}),y.jsxs("div",{className:"flex-1",children:[y.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[e.sub_type.charAt(0).toUpperCase()+e.sub_type.slice(1),e.scope_type!=="mesh"&&e.scope_value&&y.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",e.scope_type,": ",e.scope_value,")"]})]}),y.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[n()," • ",r(e.user_id)]})]}),y.jsx("div",{className:`w-2 h-2 rounded-full ${e.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function net(){const[e,t]=H.useState([]),[r,n]=H.useState([]),[i,a]=H.useState([]),[o,s]=H.useState([]),[l,u]=H.useState(!0),[c,f]=H.useState(null),[h,d]=H.useState("all"),[v,g]=H.useState("all"),[m,x]=H.useState(1),[_,b]=H.useState(1),S=20,[T,A]=H.useState(new Set),{lastAlert:M}=KE();H.useEffect(()=>{document.title="Alerts — MeshAI"},[]),H.useEffect(()=>{Promise.all([OZ().catch(()=>[]),d3(S,0).catch(()=>({items:[],total:0})),dce().catch(()=>[]),fetch("/api/nodes").then(k=>k.json()).catch(()=>[])]).then(([k,O,D,N])=>{t(k),Array.isArray(O)?(n(O),b(1)):(n(O.items||[]),b(Math.ceil((O.total||0)/S))),a(D),s(N),u(!1)}).catch(k=>{f(k.message),u(!1)})},[]),H.useEffect(()=>{M&&t(k=>k.some(D=>D.type===M.type&&D.message===M.message)?k:[M,...k])},[M]),H.useEffect(()=>{const k=(m-1)*S;d3(S,k,h,v).then(O=>{Array.isArray(O)?(n(O),b(1)):(n(O.items||[]),b(Math.ceil((O.total||0)/S)))}).catch(()=>{})},[m,h,v]);const P=H.useCallback(k=>{const O=`${k.type}-${k.message}-${k.timestamp}`;A(D=>new Set([...D,O]))},[]),I=e.filter(k=>{const O=`${k.type}-${k.message}-${k.timestamp}`;return!T.has(O)});return l?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):c?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsxs("div",{className:"text-red-400",children:["Error: ",c]})}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(Ns,{size:14}),"Active Alerts (",I.length,")"]}),I.length>0?y.jsx("div",{className:"space-y-3",children:I.map((k,O)=>y.jsx(eet,{alert:k,onAcknowledge:P},`${k.type}-${k.timestamp}-${O}`))}):y.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[y.jsx(ed,{size:20,className:"text-green-500"}),y.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),y.jsxs("div",{children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(_d,{size:14}),"Alert History"]}),y.jsx(tet,{history:r,typeFilter:h,severityFilter:v,onTypeFilterChange:k=>{d(k),x(1)},onSeverityFilterChange:k=>{g(k),x(1)},page:m,totalPages:_,onPageChange:x})]}),y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[y.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[y.jsx(lce,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(k=>y.jsx(ret,{subscription:k,nodes:o},k.id))}):y.jsxs("div",{className:"text-slate-500 py-4",children:[y.jsx("p",{children:"No active subscriptions."}),y.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",y.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}const mb=[{value:"routine",label:"Routine",description:"Informational, no time pressure (ducting, new node, weather advisory, battery declining)"},{value:"priority",label:"Priority",description:"Needs attention soon (severe weather, fire nearby, node offline, HF blackout)"},{value:"immediate",label:"Immediate",description:"Act now, drop everything (fire at infrastructure, extreme weather, region blackout)"}],WU=[{id:"mesh_health",name:"Mesh Health Monitoring",description:"Infrastructure problems - offline nodes, low battery, channel congestion",rule:{name:"Mesh Health Monitoring",enabled:!0,trigger_type:"condition",categories:["infra_offline","critical_node_down","infra_recovery","battery_warning","battery_critical","battery_emergency","high_utilization","packet_flood","mesh_score_low"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:30,override_quiet:!1,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"weather_fire",name:"Weather & Fire Alerts",description:"Environmental threats - severe weather, nearby wildfires, new ignitions, flooding",rule:{name:"Weather & Fire Alerts",enabled:!0,trigger_type:"condition",categories:["weather_warning","fire_proximity","new_ignition","stream_flood_warning"],min_severity:"priority",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:15,override_quiet:!1,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"rf_conditions",name:"RF Conditions",description:"Propagation changes - solar events, HF blackouts, tropospheric ducting",rule:{name:"RF Conditions",enabled:!0,trigger_type:"condition",categories:["hf_blackout","tropospheric_ducting","geomagnetic_storm"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:60,override_quiet:!1,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"road_traffic",name:"Road & Traffic",description:"Road closures and severe congestion",rule:{name:"Road & Traffic",enabled:!0,trigger_type:"condition",categories:["road_closure","traffic_congestion"],min_severity:"routine",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:30,override_quiet:!1,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"everything_critical",name:"Everything Critical",description:"All emergency-level events regardless of type",rule:{name:"Everything Critical",enabled:!0,trigger_type:"condition",categories:[],min_severity:"immediate",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:5,override_quiet:!0,schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"",custom_message:"",node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}},{id:"morning_briefing",name:"Morning Briefing",description:"Daily health and conditions summary at 7am",rule:{name:"Morning Briefing",enabled:!0,trigger_type:"schedule",categories:[],min_severity:"routine",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"",schedule_days:[],message_type:"mesh_health_summary",custom_message:"",delivery_type:"mesh_broadcast",broadcast_channel:0,cooldown_minutes:0,override_quiet:!1,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{}}}];function lP(e){if(!e)return"Never";const r=Date.now()/1e3-e;return r<60?"Just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:r<604800?`${Math.floor(r/86400)}d ago`:new Date(e*1e3).toLocaleDateString()}function No({info:e}){const[t,r]=H.useState(!1);return y.jsxs("div",{className:"relative inline-block",children:[y.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(!t)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),t&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),y.jsx("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:e})]})]})}function xh({label:e,value:t,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=H.useState(!1),u=n==="password";return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,o&&y.jsx(No,{info:o})]}),y.jsxs("div",{className:"relative",children:[y.jsx("input",{type:u&&!s?"password":"text",value:t,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&y.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?y.jsx(wZ,{size:16}):y.jsx(WE,{size:16})})]}),a&&y.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function HU({label:e,value:t,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,s&&y.jsx(No,{info:s})]}),y.jsx("input",{type:"number",value:t,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&y.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function iS({label:e,checked:t,onChange:r,helper:n="",info:i=""}){return y.jsxs("div",{className:"flex items-center justify-between py-2",children:[y.jsxs("div",{children:[y.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[e,i&&y.jsx(No,{info:i})]}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]}),y.jsx("button",{type:"button",onClick:()=>r(!t),className:`relative w-11 h-6 rounded-full transition-colors ${t?"bg-accent":"bg-[#1e2a3a]"}`,children:y.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${t?"translate-x-5":""}`})})]})}function aS({label:e,value:t,onChange:r,helper:n="",info:i=""}){return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,i&&y.jsx(No,{info:i})]}),y.jsx("input",{type:"time",value:t,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"}),n&&y.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function iet({label:e,value:t,onChange:r,placeholder:n="Add item...",helper:i="",info:a=""}){const[o,s]=H.useState(""),l=()=>{o.trim()&&!t.includes(o.trim())&&(r([...t,o.trim()]),s(""))},u=c=>{r(t.filter((f,h)=>h!==c))};return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[e,a&&y.jsx(No,{info:a})]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{type:"text",value:o,onChange:c=>s(c.target.value),onKeyDown:c=>c.key==="Enter"&&(c.preventDefault(),l()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:n}),y.jsx("button",{type:"button",onClick:l,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:y.jsx(SS,{size:16})})]}),t.length>0&&y.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:t.map((c,f)=>y.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[c,y.jsx("button",{type:"button",onClick:()=>u(f),className:"text-slate-500 hover:text-red-400",children:y.jsx(ru,{size:14})})]},f))}),i&&y.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function aet({value:e,onChange:t}){const[r,n]=H.useState(!1),i=mb.find(a=>a.value===e)||mb[0];return y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Severity Threshold",y.jsx(No,{info:"Only alerts at or above this severity trigger this rule. ROUTINE = informational, PRIORITY = needs attention, IMMEDIATE = act now."})]}),y.jsxs("div",{className:"relative",children:[y.jsxs("button",{type:"button",onClick:()=>n(!r),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-left flex items-center justify-between hover:border-accent transition-colors",children:[y.jsxs("div",{children:[y.jsx("span",{className:"text-slate-200",children:i.label}),y.jsxs("span",{className:"text-slate-500 ml-2",children:["- ",i.description]})]}),y.jsx(Uy,{size:16,className:`text-slate-500 transition-transform ${r?"rotate-180":""}`})]}),r&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),y.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl overflow-hidden",children:mb.map(a=>y.jsxs("button",{type:"button",onClick:()=>{t(a.value),n(!1)},className:`w-full px-3 py-2.5 text-left text-sm hover:bg-[#1e2a3a] transition-colors ${e===a.value?"bg-accent/10":""}`,children:[y.jsx("div",{className:"font-medium text-slate-200",children:a.label}),y.jsx("div",{className:"text-xs text-slate-500",children:a.description})]},a.value))})]})]}),y.jsx("p",{className:"text-xs text-slate-600",children:'Lower = more notifications. "Warning" recommended for most rules.'})]})}function R_({rule:e}){const[t,r]=H.useState(!1),[n,i]=H.useState(null),a=async()=>{r(!0),i(null);try{let s={type:e.delivery_type};e.delivery_type==="mesh_broadcast"?s.channel_index=e.broadcast_channel:e.delivery_type==="mesh_dm"?s.node_ids=e.node_ids:e.delivery_type==="email"?s={type:"email",smtp_host:e.smtp_host,smtp_port:e.smtp_port,smtp_user:e.smtp_user,smtp_password:e.smtp_password,smtp_tls:e.smtp_tls,from_address:e.from_address,recipients:e.recipients}:e.delivery_type==="webhook"&&(s={type:"webhook",url:e.webhook_url,headers:e.webhook_headers});const u=await(await fetch("/api/notifications/channels/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();i(u)}catch(s){i({success:!1,message:"Test failed",error:s instanceof Error?s.message:"Unknown error",details:{}})}finally{r(!1)}};if(!e.delivery_type)return null;const o={mesh_broadcast:y.jsx(Ds,{size:14}),mesh_dm:y.jsx(CZ,{size:14}),email:y.jsx(nce,{size:14}),webhook:y.jsx(rce,{size:14})}[e.delivery_type]||y.jsx(TS,{size:14});return y.jsxs("div",{className:"space-y-2",children:[y.jsx("button",{type:"button",onClick:a,disabled:t,className:"flex items-center gap-2 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",children:t?y.jsxs(y.Fragment,{children:[y.jsx(Gb,{size:14,className:"animate-spin"}),"Testing..."]}):y.jsxs(y.Fragment,{children:[o,"Test Channel"]})}),n&&y.jsx("div",{className:`p-2 rounded text-xs ${n.success?"bg-green-500/10 border border-green-500/30 text-green-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[n.success?y.jsx(Xc,{size:14,className:"mt-0.5 flex-shrink-0"}):y.jsx(ru,{size:14,className:"mt-0.5 flex-shrink-0"}),y.jsxs("div",{children:[y.jsx("div",{className:"font-medium",children:n.message}),n.error&&y.jsx("div",{className:"mt-1 text-red-300",children:n.error})]})]})})]})}function oet({rule:e,ruleIndex:t,categories:r,quietHoursEnabled:n,onChange:i,onDelete:a,onDuplicate:o,onTest:s}){var k,O,D,N;const[l,u]=H.useState(!e.name),[c,f]=H.useState(!1),[h,d]=H.useState(null),[v,g]=H.useState(null);H.useEffect(()=>{var j;e.name&&t>=0&&(fetch(`/api/notifications/rules/${t}/stats`).then(z=>z.json()).then(z=>d(z)).catch(()=>{}),(j=e.categories)!=null&&j.length&&fetch("/api/notifications/rules/sources",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({categories:e.categories})}).then(z=>z.json()).then(z=>g(z)).catch(()=>{}))},[e.name,t,e.categories]);const m=[{value:"",label:"(None)",description:"Rule matches but does not deliver"},{value:"mesh_broadcast",label:"Mesh Broadcast",description:"Send to a mesh radio channel"},{value:"mesh_dm",label:"Mesh DM",description:"Direct message to specific nodes"},{value:"email",label:"Email",description:"Send via SMTP"},{value:"webhook",label:"Webhook",description:"POST to any URL"}],x=[{value:"daily",label:"Daily"},{value:"twice_daily",label:"Twice Daily"},{value:"weekly",label:"Weekly"}],_=[{value:"mesh_health_summary",label:"Mesh Health Summary",description:"Current health score, pillar breakdown, problem nodes"},{value:"rf_propagation_report",label:"RF Propagation Report",description:"Solar indices, Kp, ducting conditions"},{value:"alerts_digest",label:"Active Alerts Digest",description:"Summary of all active environmental alerts"},{value:"environmental_conditions",label:"Environmental Conditions",description:"Full conditions: weather, fire, streams, roads"},{value:"custom",label:"Custom Message",description:"Write your own with template tokens"}],b=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],S=j=>{const z=e.categories||[];z.includes(j)?i({...e,categories:z.filter($=>$!==j)}):i({...e,categories:[...z,j]})},T=j=>{const z=e.schedule_days||[];z.includes(j)?i({...e,schedule_days:z.filter($=>$!==j)}):i({...e,schedule_days:[...z,j]})},A=async()=>{f(!0),await s(),f(!1)},M=()=>{if(e.trigger_type==="schedule")return"[Scheduled report preview would appear here]";const j=e.categories||[];if(j.length===0&&r.length>0)return r[0].example_message||"Alert notification";const z=r.find($=>j.includes($.id));return(z==null?void 0:z.example_message)||"Alert notification"},P=()=>{var z,$,U,F,V,W,Y,Z;const j=[];if(e.trigger_type==="schedule"){const J=((z=x.find(le=>le.value===e.schedule_frequency))==null?void 0:z.label)||e.schedule_frequency,ne=(($=_.find(le=>le.value===e.message_type))==null?void 0:$.label)||e.message_type;j.push(`${J} at ${e.schedule_time||"??:??"}`),j.push(ne)}else{const J=((U=e.categories)==null?void 0:U.length)||0,ne=J===0?"All":r.filter(fe=>{var ze;return(ze=e.categories)==null?void 0:ze.includes(fe.id)}).map(fe=>fe.name).slice(0,2).join(", ")+(J>2?` +${J-2}`:""),le=((F=mb.find(fe=>fe.value===e.min_severity))==null?void 0:F.label)||e.min_severity;j.push(`${ne} at ${le}+`)}if(!e.delivery_type)j.push("No delivery");else{const J=((V=m.find(le=>le.value===e.delivery_type))==null?void 0:V.label)||e.delivery_type;let ne="";if(e.delivery_type==="mesh_broadcast")ne=`Ch ${e.broadcast_channel}`;else if(e.delivery_type==="mesh_dm")ne=`${((W=e.node_ids)==null?void 0:W.length)||0} nodes`;else if(e.delivery_type==="email")ne=(Y=e.recipients)!=null&&Y.length?e.recipients[0]+(e.recipients.length>1?` +${e.recipients.length-1}`:""):"no recipients";else if(e.delivery_type==="webhook")try{ne=new URL(e.webhook_url).hostname}catch{ne=((Z=e.webhook_url)==null?void 0:Z.slice(0,20))||"no URL"}j.push(`${J}${ne?` (${ne})`:""}`)}return j.join(" -> ")},I=()=>{var z;if(!v||!((z=e.categories)!=null&&z.length))return null;const j=new Map;for(const[,$]of Object.entries(v)){const U=j.get($.source);U?(U.events+=$.active_events,U.enabled=U.enabled&&$.enabled):j.set($.source,{enabled:$.enabled,events:$.active_events})}return Array.from(j.entries()).map(([$,{enabled:U,events:F}])=>y.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs ${U?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,title:U?`${F} active`:"Not enabled",children:[U?y.jsx(TS,{size:10}):y.jsx(IZ,{size:10}),$.toUpperCase(),U&&F>0&&` (${F})`]},$))};return y.jsxs("div",{className:`border rounded-lg overflow-hidden ${e.enabled?"border-[#1e2a3a]":"border-slate-700 opacity-60"}`,children:[y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>u(!l),children:[y.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l?y.jsx(Uy,{size:16,className:"text-slate-500 flex-shrink-0"}):y.jsx(wm,{size:16,className:"text-slate-500 flex-shrink-0"}),y.jsx("button",{onClick:j=>{j.stopPropagation(),i({...e,enabled:!e.enabled})},className:`w-2 h-2 rounded-full flex-shrink-0 ${e.enabled?"bg-green-500":"bg-slate-500"}`,title:e.enabled?"Enabled":"Disabled"}),e.trigger_type==="schedule"?y.jsx(_d,{size:14,className:"text-blue-400 flex-shrink-0"}):y.jsx(Tm,{size:14,className:"text-yellow-400 flex-shrink-0"}),y.jsx("span",{className:"font-medium text-slate-200 truncate",children:e.name||"New Rule"}),!l&&y.jsx("span",{className:`text-xs truncate hidden sm:block ${e.delivery_type?"text-slate-500":"text-amber-400"}`,children:P()})]}),y.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[h&&!l&&y.jsx("span",{className:"hidden sm:inline-flex items-center gap-1 px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400 mr-2",children:h.last_fired?lP(h.last_fired):"Never fired"}),!l&&y.jsx("div",{className:"hidden md:flex items-center gap-1 mr-2",children:I()}),y.jsx("button",{onClick:j=>{j.stopPropagation(),A()},disabled:c||!e.name,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Test rule",children:y.jsx(c3,{size:14})}),y.jsx("button",{onClick:j=>{j.stopPropagation(),o()},className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-500/10 rounded",title:"Duplicate",children:y.jsx(ece,{size:14})}),y.jsx("button",{onClick:j=>{j.stopPropagation(),a()},className:"p-1.5 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",title:"Delete",children:y.jsx(qE,{size:14})})]})]}),!l&&e.name&&y.jsxs("div",{className:"px-3 pb-2 pt-0 bg-[#0a0e17] flex items-center gap-2 flex-wrap text-xs",children:[!e.delivery_type&&y.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 bg-amber-500/10 text-amber-400 rounded",children:[y.jsx(xd,{size:10}),"No delivery method"]}),(h==null?void 0:h.fire_count)!==void 0&&h.fire_count>0&&y.jsxs("span",{className:"text-slate-500",children:["Fired ",h.fire_count,"x"]})]}),l&&y.jsxs("div",{className:"p-4 space-y-6 border-t border-[#1e2a3a]",children:[y.jsx(xh,{label:"Rule Name",value:e.name,onChange:j=>i({...e,name:j}),placeholder:"e.g., Emergency Broadcast, Daily Health Report",helper:"A descriptive name for this rule"}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Trigger Type"}),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("button",{type:"button",onClick:()=>i({...e,trigger_type:"condition"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type!=="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[y.jsx(Tm,{size:16}),y.jsx("span",{children:"Condition"})]}),y.jsxs("button",{type:"button",onClick:()=>i({...e,trigger_type:"schedule"}),className:`flex-1 flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors ${e.trigger_type==="schedule"?"bg-accent/10 border-accent text-accent":"bg-[#0a0e17] border-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:[y.jsx(_d,{size:16}),y.jsx("span",{children:"Schedule"})]})]}),y.jsx("p",{className:"text-xs text-slate-600",children:e.trigger_type==="schedule"?"Send reports on a schedule (daily briefings, weekly digests)":"React to alert conditions (fires, outages, weather warnings)"})]}),e.trigger_type!=="schedule"&&y.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[y.jsx(Ns,{size:14}),"WHEN (Condition)"]}),y.jsx(aet,{value:e.min_severity,onChange:j=>i({...e,min_severity:j})}),y.jsxs("div",{className:"space-y-2",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",y.jsx(No,{info:"Select which types of alerts trigger this rule. Leave all unchecked to match ALL categories."})]}),y.jsx("div",{className:"text-xs text-slate-500 mb-2",children:(((k=e.categories)==null?void 0:k.length)||0)===0?"All categories (none selected)":`${(O=e.categories)==null?void 0:O.length} selected`}),y.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:r.map(j=>{var z,$;return y.jsxs("label",{onClick:()=>S(j.id),className:"flex items-start gap-2 p-2 rounded hover:bg-[#1e2a3a]/50 cursor-pointer",children:[y.jsx("div",{className:`w-4 h-4 mt-0.5 rounded border flex items-center justify-center flex-shrink-0 ${(z=e.categories)!=null&&z.includes(j.id)?"bg-accent border-accent":"border-slate-600"}`,children:(($=e.categories)==null?void 0:$.includes(j.id))&&y.jsx(Xc,{size:12,className:"text-white"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"text-sm text-slate-200",children:j.name}),y.jsx("div",{className:"text-xs text-slate-500",children:j.description})]})]},j.id)})})]}),v&&Object.keys(v).length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Data Sources"}),y.jsx("div",{className:"flex flex-wrap gap-2",children:I()})]})]}),e.trigger_type==="schedule"&&y.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[y.jsx(Xue,{size:14}),"WHEN (Schedule)"]}),y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Frequency"}),y.jsx("select",{value:e.schedule_frequency||"daily",onChange:j=>i({...e,schedule_frequency:j.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:x.map(j=>y.jsx("option",{value:j.value,children:j.label},j.value))})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(aS,{label:"Time",value:e.schedule_time||"07:00",onChange:j=>i({...e,schedule_time:j})}),e.schedule_frequency==="twice_daily"&&y.jsx(aS,{label:"Second Time",value:e.schedule_time_2||"19:00",onChange:j=>i({...e,schedule_time_2:j})})]}),e.schedule_frequency==="weekly"&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Days"}),y.jsx("div",{className:"flex flex-wrap gap-2",children:b.map(j=>{var z;return y.jsx("button",{type:"button",onClick:()=>T(j),className:`px-3 py-1.5 rounded text-sm capitalize transition-colors ${(z=e.schedule_days)!=null&&z.includes(j)?"bg-accent text-white":"bg-[#1e2a3a] text-slate-400 hover:text-slate-200"}`,children:j.slice(0,3)},j)})})]}),y.jsxs("div",{className:"space-y-1",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Report Type"}),y.jsx("select",{value:e.message_type||"mesh_health_summary",onChange:j=>i({...e,message_type:j.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:_.map(j=>y.jsx("option",{value:j.value,children:j.label},j.value))}),y.jsx("p",{className:"text-xs text-slate-600",children:(D=_.find(j=>j.value===e.message_type))==null?void 0:D.description})]}),e.message_type==="custom"&&y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Custom Message",y.jsx(No,{info:"Available tokens: {MESH_SCORE}, {NODE_COUNT}, {NODES_ONLINE}, {ACTIVE_ALERTS}, {KP}, {SFI}, {DATE}, {TIME}"})]}),y.jsx("textarea",{value:e.custom_message||"",onChange:j=>i({...e,custom_message:j.target.value}),rows:4,placeholder:"Good morning! Mesh health: {MESH_SCORE}/100 with {NODE_COUNT} nodes online.",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"})]})]}),y.jsxs("div",{className:"space-y-4 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-300",children:[y.jsx(c3,{size:14}),"SEND VIA"]}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Method",y.jsx(No,{info:"Where this notification gets delivered. Select (None) to save the rule without delivery - it will match conditions but won't send until you configure a delivery method."})]}),y.jsx("select",{value:e.delivery_type||"",onChange:j=>i({...e,delivery_type:j.target.value}),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:m.map(j=>y.jsx("option",{value:j.value,children:j.label},j.value))}),y.jsx("p",{className:"text-xs text-slate-600",children:(N=m.find(j=>j.value===(e.delivery_type||"")))==null?void 0:N.description})]}),!e.delivery_type&&y.jsxs("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[y.jsx(xd,{size:16,className:"text-amber-400 mt-0.5 flex-shrink-0"}),y.jsx("div",{className:"text-sm text-amber-300",children:"Rule will log matches but not deliver until a delivery method is configured."})]}),e.delivery_type==="mesh_broadcast"&&y.jsxs(y.Fragment,{children:[y.jsx(FR,{label:"Broadcast Channel",value:e.broadcast_channel??0,onChange:j=>i({...e,broadcast_channel:j}),helper:"Select the mesh radio channel",mode:"single"}),y.jsx(R_,{rule:e})]}),e.delivery_type==="mesh_dm"&&y.jsxs(y.Fragment,{children:[y.jsx($R,{label:"Recipient Nodes",value:e.node_ids||[],onChange:j=>i({...e,node_ids:j}),helper:"Nodes that receive direct messages",valueType:"node_id_hex"}),y.jsx(R_,{rule:e})]}),e.delivery_type==="email"&&y.jsxs("div",{className:"space-y-4",children:[y.jsx(iet,{label:"Recipients",value:e.recipients||[],onChange:j=>i({...e,recipients:j}),placeholder:"email@example.com",helper:"Email addresses to receive alerts"}),y.jsxs("details",{className:"group",children:[y.jsxs("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-400 hover:text-slate-200",children:[y.jsx(wm,{size:14,className:"group-open:rotate-90 transition-transform"}),"SMTP Configuration"]}),y.jsxs("div",{className:"mt-4 space-y-4 pl-6 border-l border-[#1e2a3a]",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(xh,{label:"SMTP Host",value:e.smtp_host||"",onChange:j=>i({...e,smtp_host:j}),placeholder:"smtp.gmail.com"}),y.jsx(HU,{label:"SMTP Port",value:e.smtp_port??587,onChange:j=>i({...e,smtp_port:j}),min:1,max:65535})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(xh,{label:"Username",value:e.smtp_user||"",onChange:j=>i({...e,smtp_user:j})}),y.jsx(xh,{label:"Password",value:e.smtp_password||"",onChange:j=>i({...e,smtp_password:j}),type:"password",info:"Gmail users: use an App Password from myaccount.google.com/apppasswords"})]}),y.jsx(iS,{label:"Use TLS",checked:e.smtp_tls??!0,onChange:j=>i({...e,smtp_tls:j})}),y.jsx(xh,{label:"From Address",value:e.from_address||"",onChange:j=>i({...e,from_address:j}),placeholder:"alerts@yourdomain.com"})]})]}),y.jsx(R_,{rule:e})]}),e.delivery_type==="webhook"&&y.jsxs(y.Fragment,{children:[y.jsx(xh,{label:"Webhook URL",value:e.webhook_url||"",onChange:j=>i({...e,webhook_url:j}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST alert as JSON",info:"Works with Discord webhooks, ntfy.sh, Slack, Home Assistant, Pushover, or any HTTP POST endpoint."}),y.jsx(R_,{rule:e})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(HU,{label:"Cooldown (minutes)",value:e.cooldown_minutes??10,onChange:j=>i({...e,cooldown_minutes:j}),min:0,helper:"Min time between repeat sends",info:"Prevents alert spam. Same condition won't re-trigger this rule within this window."}),n&&y.jsx("div",{className:"flex items-end pb-1",children:y.jsx(iS,{label:"Override Quiet Hours",checked:e.override_quiet??!1,onChange:j=>i({...e,override_quiet:j}),helper:"Deliver during quiet hours"})})]}),h&&y.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[y.jsxs("span",{children:["Last fired: ",lP(h.last_fired)]}),y.jsxs("span",{children:["Last tested: ",lP(h.last_test)]}),y.jsxs("span",{children:["Total fires: ",h.fire_count]})]}),e.trigger_type!=="schedule"&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Example Message"}),y.jsx("div",{className:"p-3 bg-[#1e2a3a]/50 rounded-lg border border-[#1e2a3a]",children:y.jsx("p",{className:"text-sm text-slate-300 font-mono",children:M()})}),y.jsx("p",{className:"text-xs text-slate-600",children:"This is an example of what this rule would send."})]})]})]})}function set(){var $,U,F;const[e,t]=H.useState(null),[r,n]=H.useState(null),[i,a]=H.useState([]),[o,s]=H.useState(!0),[l,u]=H.useState(!1),[c,f]=H.useState(null),[h,d]=H.useState(null),[v,g]=H.useState(null),[m,x]=H.useState({open:!1,ruleIndex:-1,loading:!1,action:""}),[_,b]=H.useState(!1),[S,T]=H.useState(!1),A=H.useCallback(async()=>{try{const[V,W]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories")]);if(!V.ok)throw new Error("Failed to fetch notifications config");const Y=await V.json(),Z=await W.json();t(Y),n(JSON.parse(JSON.stringify(Y))),a(Z),T(!1),f(null)}catch(V){f(V instanceof Error?V.message:"Unknown error")}finally{s(!1)}},[]);H.useEffect(()=>{document.title="Notifications - MeshAI",A()},[A]),H.useEffect(()=>{e&&r&&T(JSON.stringify(e)!==JSON.stringify(r))},[e,r]);const M=async()=>{if(e){u(!0),f(null),d(null);try{const V=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),W=await V.json();if(!V.ok)throw new Error(W.detail||"Save failed");d("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(e))),T(!1),setTimeout(()=>d(null),3e3)}catch(V){f(V instanceof Error?V.message:"Save failed")}finally{u(!1)}}},P=()=>{r&&(t(JSON.parse(JSON.stringify(r))),T(!1))},I=()=>({name:"",enabled:!0,trigger_type:"condition",categories:[],min_severity:"routine",schedule_frequency:"daily",schedule_time:"07:00",schedule_time_2:"19:00",schedule_days:["monday"],message_type:"mesh_health_summary",custom_message:"",delivery_type:"",broadcast_channel:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],webhook_url:"",webhook_headers:{},cooldown_minutes:10,override_quiet:!1}),k=()=>{e&&t({...e,rules:[...e.rules||[],I()]})},O=V=>{if(!e)return;const W=WU.find(Y=>Y.id===V);W&&(t({...e,rules:[...e.rules||[],{...W.rule}]}),b(!1))},D=V=>{if(!e)return;const W=e.rules[V],Y={...JSON.parse(JSON.stringify(W)),name:`${W.name} (copy)`},Z=[...e.rules];Z.splice(V+1,0,Y),t({...e,rules:Z})},N=async V=>{x({open:!0,ruleIndex:V,loading:!0,action:""});try{const Y=await(await fetch(`/api/notifications/rules/${V}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview"})})).json();g(Y),x(Z=>({...Z,loading:!1}))}catch{g({success:!1,message:"Failed to get preview"}),x(W=>({...W,loading:!1}))}},j=async V=>{const W=m.ruleIndex;x(Y=>({...Y,loading:!0,action:V}));try{const Z=await(await fetch(`/api/notifications/rules/${W}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:V})})).json();g(Z),x(J=>({...J,loading:!1}))}catch{g({success:!1,message:`Failed to ${V}`}),x(Y=>({...Y,loading:!1}))}},z=()=>{x({open:!1,ruleIndex:-1,loading:!1,action:""}),g(null)};return o?y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):e?y.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[m.open&&y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:y.jsxs("div",{className:"bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[85vh] overflow-auto",children:[y.jsxs("div",{className:"p-4 border-b border-[#2a3a4a] flex items-center justify-between sticky top-0 bg-[#1a2332]",children:[y.jsx("h3",{className:"text-lg font-semibold",children:"Test Notification Rule"}),y.jsx("button",{onClick:z,className:"text-slate-500 hover:text-slate-300",children:y.jsx(ru,{size:20})})]}),y.jsx("div",{className:"p-4 space-y-4",children:m.loading?y.jsxs("div",{className:"flex items-center justify-center py-8",children:[y.jsx(Gb,{size:20,className:"animate-spin text-slate-400 mr-2"}),y.jsx("div",{className:"text-slate-400",children:m.action?`${m.action.replace("_"," ").replace("send ","Sending ")}...`:"Loading current data..."})]}):v?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:"Current Data"}),v.live_data_summary&&v.live_data_summary.length>0?y.jsx("div",{className:"p-3 bg-slate-800/50 rounded space-y-1",children:v.live_data_summary.map((V,W)=>y.jsx("div",{className:`text-sm font-mono ${V.startsWith("[!]")?"text-amber-400":""}`,children:V},W))}):y.jsx("div",{className:"p-3 bg-slate-800/50 rounded text-sm text-slate-500",children:"No live data available for this rule's categories"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:"Rule Matching"}),y.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[v.conditions_matched&&v.conditions_matched>0?y.jsxs("span",{className:"px-2 py-1 bg-green-500/20 text-green-400 rounded text-sm",children:[v.conditions_matched," condition",v.conditions_matched!==1?"s":""," match - this rule WOULD fire"]}):y.jsx("span",{className:"px-2 py-1 bg-slate-700 text-slate-400 rounded text-sm",children:"No conditions trigger this rule right now"}),v.conditions_below_threshold&&v.conditions_below_threshold>0&&y.jsxs("span",{className:"px-2 py-1 bg-yellow-500/20 text-yellow-400 rounded text-sm",children:[v.conditions_below_threshold," below threshold"]})]}),v.conditions_below_threshold&&v.conditions_below_threshold>0&&y.jsxs("div",{className:"p-3 bg-yellow-500/10 border border-yellow-500/30 rounded text-sm space-y-2",children:[y.jsx("div",{className:"text-yellow-300",children:v.below_threshold_summary}),v.below_threshold_events&&v.below_threshold_events.length>0&&y.jsx("div",{className:"space-y-1 text-yellow-200/80",children:v.below_threshold_events.slice(0,3).map((V,W)=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-yellow-500/20 rounded",children:V.severity}),y.jsx("span",{children:V.headline})]},W))}),v.suggestion&&y.jsxs("div",{className:"text-yellow-400 text-xs mt-2",children:["Tip: ",v.suggestion]})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm font-medium text-slate-400 uppercase tracking-wide",children:v.is_example?"Example Messages":"Messages That Would Fire"}),($=v.preview_messages)==null?void 0:$.map((V,W)=>y.jsx("div",{className:"p-3 bg-slate-800 rounded text-sm font-mono break-words",children:V},W))]}),v.delivered!==void 0&&v.delivery_result&&y.jsx("div",{className:`p-3 rounded text-sm ${v.delivered?"bg-green-500/10 border border-green-500/30 text-green-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[v.delivered?y.jsx(Xc,{size:16,className:"mt-0.5"}):y.jsx(ru,{size:16,className:"mt-0.5"}),y.jsxs("div",{children:[y.jsx("div",{children:v.delivery_result}),v.delivery_error&&y.jsx("div",{className:"mt-1 text-red-300",children:v.delivery_error})]})]})}),v.message&&!v.preview_messages&&y.jsx("div",{className:`p-3 rounded text-sm ${v.success?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:v.message})]}):null}),y.jsxs("div",{className:"p-4 border-t border-[#2a3a4a] flex justify-between sticky bottom-0 bg-[#1a2332]",children:[y.jsx("button",{onClick:z,className:"px-4 py-2 text-slate-400 hover:text-slate-200",children:"Close"}),v&&!v.delivered&&y.jsx("div",{className:"flex gap-2",children:v.delivery_method?y.jsxs(y.Fragment,{children:[v.live_data_summary&&v.live_data_summary.length>0&&y.jsx("button",{onClick:()=>j("send_status"),disabled:m.loading,className:"px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",title:"Send current conditions summary",children:"Send Current Conditions"}),y.jsx("button",{onClick:()=>j("send_test"),disabled:m.loading,className:"px-3 py-2 bg-slate-700 hover:bg-slate-600 rounded text-sm disabled:opacity-50",title:"Send example alert message",children:"Send Example Alert"}),v.can_send_live&&y.jsx("button",{onClick:()=>j("send_live"),disabled:m.loading,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm disabled:opacity-50",title:"Send actual live alert",children:"Send Live Alert"})]}):y.jsx("span",{className:"px-3 py-2 text-amber-400 text-sm",children:"Configure a delivery method to send test messages"})})]})]})}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{children:y.jsx("p",{className:"text-sm text-slate-500",children:"Alert delivery and scheduled reports. Rules define what triggers a notification and where it gets sent."})}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:A,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:y.jsx(Gb,{size:18})}),y.jsxs("button",{onClick:P,disabled:!S,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[y.jsx(MZ,{size:16}),"Discard"]}),y.jsxs("button",{onClick:M,disabled:l||!S,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[y.jsx(PZ,{size:16}),l?"Saving...":"Save"]})]})]}),c&&y.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:c}),h&&y.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[y.jsx(Xc,{size:14,className:"inline mr-2"}),h]}),y.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[y.jsx(iS,{label:"Enable Notifications",checked:e.enabled,onChange:V=>t({...e,enabled:V}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts or scheduled messages will be delivered. Alerts still get recorded to history."}),e.enabled&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"space-y-3 p-4 bg-[#0a0e17] rounded-lg border border-[#1e2a3a]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(ace,{size:14,className:"text-slate-400"}),y.jsx("label",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Quiet Hours"})]}),y.jsx(iS,{label:"Enable Quiet Hours",checked:e.quiet_hours_enabled??!0,onChange:V=>t({...e,quiet_hours_enabled:V}),helper:"Suppress non-emergency alerts during sleeping hours",info:"When enabled, ROUTINE alerts are suppressed during quiet hours. PRIORITY and IMMEDIATE always deliver."}),e.quiet_hours_enabled&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(aS,{label:"Start Time",value:e.quiet_hours_start||"22:00",onChange:V=>t({...e,quiet_hours_start:V}),helper:"When quiet hours begin"}),y.jsx(aS,{label:"End Time",value:e.quiet_hours_end||"06:00",onChange:V=>t({...e,quiet_hours_end:V}),helper:"When quiet hours end"})]}),y.jsx("p",{className:"text-xs text-slate-600",children:'Emergency alerts and rules with "Override Quiet Hours" enabled always deliver.'})]})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Notification Rules",y.jsx(No,{info:"Each rule is self-contained: define what triggers it (condition or schedule), where to send it (mesh, email, webhook), and behavior settings."})]}),y.jsxs("span",{className:"text-xs text-slate-500",children:[((U=e.rules)==null?void 0:U.length)||0," rule",(((F=e.rules)==null?void 0:F.length)||0)!==1?"s":""]})]}),(e.rules||[]).map((V,W)=>y.jsx(oet,{rule:V,ruleIndex:W,categories:i,quietHoursEnabled:e.quiet_hours_enabled??!0,onChange:Y=>{const Z=[...e.rules||[]];Z[W]=Y,t({...e,rules:Z})},onDelete:()=>{confirm(`Delete rule "${V.name||"New Rule"}"?`)&&t({...e,rules:(e.rules||[]).filter((Y,Z)=>Z!==W)})},onDuplicate:()=>D(W),onTest:()=>N(W)},W)),y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("button",{onClick:k,className:"flex-1 py-3 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[y.jsx(SS,{size:16})," Add Rule"]}),y.jsxs("div",{className:"relative",children:[y.jsxs("button",{onClick:()=>b(!_),className:"py-3 px-4 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center gap-2 transition-colors",children:[y.jsx(SZ,{size:16})," Add from Template"]}),_&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>b(!1)}),y.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl overflow-hidden",children:[y.jsx("div",{className:"p-2 border-b border-[#2a3a4a] text-xs text-slate-500 uppercase",children:"Rule Templates"}),WU.map(V=>y.jsxs("button",{onClick:()=>O(V.id),className:"w-full p-3 text-left hover:bg-[#2a3a4a] transition-colors",children:[y.jsx("div",{className:"font-medium text-slate-200",children:V.name}),y.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:V.description})]},V.id))]})]})]})]})]})]})]})]}):y.jsx("div",{className:"flex items-center justify-center h-64",children:y.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}const UU=[{id:"stream-gauges",label:"Stream Gauges",icon:GE},{id:"wildfire",label:"Wildfire",icon:UE},{id:"firms",label:"Satellite Fire Detection (FIRMS)",icon:YE},{id:"weather-alerts",label:"Weather Alerts",icon:Que},{id:"solar",label:"Solar & Geomagnetic",icon:Wb},{id:"ducting",label:"Tropospheric Ducting",icon:Ds},{id:"avalanche",label:"Avalanche Danger",icon:ZE},{id:"traffic",label:"Traffic Flow",icon:VE},{id:"roads-511",label:"Road Conditions (511)",icon:_Z},{id:"mesh-health",label:"Mesh Health",icon:Hy},{id:"notifications",label:"Notifications",icon:bm},{id:"commands",label:"Commands",icon:kZ},{id:"api",label:"API Reference",icon:Jue}];function ar({color:e}){const t={green:"bg-green-500",yellow:"bg-yellow-500",orange:"bg-orange-500",red:"bg-red-500",black:"bg-slate-800 border border-slate-600"};return y.jsx("span",{className:`inline-block w-3 h-3 rounded-full ${t[e]}`})}function Rt({headers:e,rows:t}){return y.jsx("div",{className:"overflow-x-auto my-4",children:y.jsxs("table",{className:"w-full text-sm",children:[y.jsx("thead",{children:y.jsx("tr",{className:"bg-[#1a2332] border-b border-[#2a3a4a]",children:e.map((r,n)=>y.jsx("th",{className:"px-4 py-2 text-left text-slate-400 font-medium",children:r},n))})}),y.jsx("tbody",{children:t.map((r,n)=>y.jsx("tr",{className:`border-b border-[#1e2a3a] ${n%2===0?"bg-[#0d1219]":"bg-[#0a0e17]"}`,children:r.map((i,a)=>y.jsx("td",{className:"px-4 py-2 text-slate-300",children:i},a))},n))})]})})}function Bt({href:e,children:t}){return y.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline inline-flex items-center gap-1",children:[t," ",y.jsx(bd,{size:12})]})}function Te({children:e}){return y.jsx("h3",{className:"text-lg font-semibold text-slate-200 mt-6 mb-3",children:e})}function fl({children:e}){return y.jsx("h4",{className:"text-base font-medium text-slate-300 mt-4 mb-2",children:e})}function $e({children:e}){return y.jsx("code",{className:"font-mono text-accent bg-[#1a2332] px-1 rounded",children:e})}function pi({id:e,title:t,children:r}){return y.jsxs("section",{id:e,className:"mb-12 scroll-mt-6",children:[y.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-4 pb-2 border-b border-[#2a3a4a]",children:t}),y.jsx("div",{className:"text-slate-300 leading-relaxed space-y-4",children:r})]})}function uet(){const e=dv(),[t,r]=H.useState(""),[n,i]=H.useState("stream-gauges"),a=H.useRef(null);H.useEffect(()=>{const l=e.hash.replace("#","");if(l&&UU.find(u=>u.id===l)){i(l);const u=document.getElementById(l);u&&u.scrollIntoView({behavior:"smooth"})}},[e.hash]);const o=UU.filter(l=>l.label.toLowerCase().includes(t.toLowerCase())),s=l=>{i(l);const u=document.getElementById(l);u&&u.scrollIntoView({behavior:"smooth"}),window.history.replaceState(null,"",`#${l}`)};return y.jsxs("div",{className:"flex h-full -m-6",children:[y.jsxs("aside",{className:"w-64 flex-shrink-0 bg-bg-card border-r border-border overflow-y-auto",children:[y.jsx("div",{className:"p-4 border-b border-border",children:y.jsxs("div",{className:"relative",children:[y.jsx(XE,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),y.jsx("input",{type:"text",value:t,onChange:l=>r(l.target.value),placeholder:"Search topics...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent placeholder-slate-600"})]})}),y.jsx("nav",{className:"py-2",children:o.map(l=>{const u=l.icon,c=n===l.id;return y.jsxs("button",{onClick:()=>s(l.id),className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left transition-colors ${c?"text-accent bg-accent/10 border-l-2 border-accent":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover border-l-2 border-transparent"}`,children:[y.jsx(u,{size:16}),l.label]},l.id)})})]}),y.jsx("div",{ref:a,className:"flex-1 overflow-y-auto p-6",children:y.jsxs("div",{className:"max-w-4xl",children:[y.jsx("p",{className:"text-slate-400 mb-8",children:"Everything you need to understand and configure MeshAI's monitoring and alerting systems."}),y.jsxs(pi,{id:"stream-gauges",title:"Stream Gauges",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI watches river and stream levels at gauges you configure. Each gauge reports two things:"}),y.jsxs("p",{children:[y.jsx("strong",{children:"Water Level (Gage Height)"}),` — how high the water is, measured in feet. Important: this is NOT the depth of the river. It's the height above a fixed measuring point that's different at every gauge. A reading of "10 feet" at one gauge means something completely different than "10 feet" at another. You can only compare readings from the SAME gauge over time.`]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Flow (Discharge)"}),` — how much water is moving past the gauge, in cubic feet per second (CFS). Think of it as the river's "throughput." For scale:`]}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"A small creek: 50-200 CFS"}),y.jsx("li",{children:"A mid-size river: 1,000-5,000 CFS"}),y.jsx("li",{children:"A big river in spring runoff: 10,000+ CFS"})]}),y.jsx(Te,{children:"When Does It Flood?"}),y.jsxs("p",{children:["Flood levels are set by the ",y.jsx("strong",{children:"National Weather Service"}),', not USGS. NWS looks at each specific gauge location and decides "at what water level does the road flood? At what level do buildings get water?" Those levels are different everywhere.']}),y.jsxs("p",{children:[y.jsx("strong",{children:"Action Stage"})," — water is rising, time to start paying attention. Usually still inside the riverbanks."]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Minor Flood"})," — low-lying roads start getting water on them. NWS issues a Flood Advisory."]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Moderate Flood"})," — water in buildings near the river. Some people need to evacuate. NWS issues a Flood Warning."]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Major Flood"})," — widespread flooding. Many people evacuating. Serious property damage."]}),y.jsx("p",{children:"MeshAI automatically looks up the flood levels for your gauge from NWS when you add a site. Some remote gauges don't have flood levels assigned — for those, you set them manually if you know what water levels cause problems in your area."}),y.jsx(Te,{children:"Low Water / Drought"}),y.jsx("p",{children:`There's no official "drought stage" for most gauges. If you need to monitor low water (irrigation, fish habitat), set a manual low-water threshold based on what you know about your local river.`}),y.jsx(Te,{children:"Setting It Up"}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:["Find your gauge at ",y.jsx(Bt,{href:"https://waterdata.usgs.gov/nwis",children:"waterdata.usgs.gov/nwis"})]}),y.jsxs("li",{children:["Copy the site number (like ",y.jsx($e,{children:"13090500"}),")"]}),y.jsx("li",{children:"Add it in Config → Environmental → USGS"}),y.jsx("li",{children:"MeshAI auto-fills the gauge name and flood levels from NWS"})]}),y.jsx("p",{children:"If NWS flood levels don't populate, your gauge may not have them. Set manual thresholds if you know your local conditions."}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://waterdata.usgs.gov/nwis",children:"USGS Water Data"})," — find gauges near you"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://water.noaa.gov",children:"NWS Water Prediction Service"})," — flood forecasts and thresholds"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.usgs.gov/special-topics/water-science-school/science/how-streamflow-measured",children:"Understanding Streamflow"})," — USGS explainer"]})]})]}),y.jsxs(pi,{id:"wildfire",title:"Wildfire",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI tracks active wildfire perimeters from the National Interagency Fire Center (NIFC). For each fire, you see the name, size, how much is contained, and how far it is from your mesh nodes."}),y.jsx(Te,{children:"Fire Size — How Big Is It?"}),y.jsx(Rt,{headers:["Size","What That Means"],rows:[["10 acres","Small fire. Usually handled quickly by initial crews."],["100 acres","Notable fire. Active firefighting effort."],["1,000 acres","Large fire. Major resources being deployed."],["10,000+ acres","Very large fire. Multiple teams, aircraft, heavy equipment."],["100,000+ acres","Mega-fire. These make the national news."]]}),y.jsx("p",{children:"For reference, 1,000 acres is about 1.5 square miles."}),y.jsx(Te,{children:"Containment — Is It Under Control?"}),y.jsx("p",{children:"Containment means the percentage of the fire's edge where firefighters have built a control line (a cleared strip to stop the fire from spreading further). It does NOT mean the fire is out inside that line."}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"0-30%"})," — Essentially uncontrolled. The fire goes where it wants."]}),y.jsxs("li",{children:[y.jsx("strong",{children:"50%"})," — Good progress, but half the edge can still grow."]}),y.jsxs("li",{children:[y.jsx("strong",{children:"80%+"})," — Well controlled. Major growth unlikely."]}),y.jsxs("li",{children:[y.jsx("strong",{children:"100%"}),' — The edge is fully controlled. But the fire may STILL be actively burning inside. "100% contained" does NOT mean "out."']})]}),y.jsx(Te,{children:"How Far Away Should I Worry?"}),y.jsx(Rt,{headers:["Distance","What To Do"],rows:[[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"red"})," Under 5 km (3 miles)"]}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Immediate threat."})," This is evacuation-order range. Embers can fly this far in wind."]})],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"orange"})," 5-15 km (3-10 miles)"]}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Prepare."})," The fire could reach you in hours under bad conditions. Have a plan."]})],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"yellow"})," 15-30 km (10-20 miles)"]}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Watch."})," Smoke is likely. Wind shifts could change things fast."]})],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"green"})," Over 30 km (20 miles)"]}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Awareness."})," Keep an eye on it, but no immediate threat."]})]]}),y.jsx("p",{children:"How fast can a fire travel? In grass with wind: up to 14 mph. In heavy timber: 1-6 mph. A fire 10 miles away could theoretically reach you in 1-2 hours under worst-case conditions, but typical spread is much slower."}),y.jsx(Te,{children:"Which Matters More — Size or Distance?"}),y.jsxs("p",{children:[y.jsx("strong",{children:"Distance is the immediate concern."})," A small uncontained fire 10 km away is more dangerous right now than a huge fire 50 km away. But big fires have more energy and can grow fast under wind shifts — keep watching them."]}),y.jsx(Te,{children:"Setting It Up"}),y.jsxs("p",{children:["Just configure your state code (like ",y.jsx($e,{children:"US-ID"})," for Idaho) in Config → Environmental → Fires. MeshAI polls NIFC every 10 minutes for active fires in that state and computes the distance to your mesh nodes automatically."]}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://inciweb.nwcg.gov",children:"InciWeb"})," — detailed incident information"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://data-nifc.opendata.arcgis.com",children:"NIFC Fire Map"})," — raw perimeter data"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.ready.gov/wildfires",children:"Ready.gov Wildfires"})," — preparedness guide"]})]})]}),y.jsxs(pi,{id:"firms",title:"Satellite Fire Detection (FIRMS)",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:`NASA's VIIRS satellites orbit the Earth and look for heat signatures on the ground. When they see something hot — a fire, a factory, a sunlit building — they flag it as a "hotspot." MeshAI checks these detections for your area.`}),y.jsxs("p",{children:[y.jsx("strong",{children:"Why this matters"}),": satellite hotspots show up ",y.jsx("strong",{children:"hours before"})," official fire perimeters are mapped. If a new fire starts near your mesh, the satellite might see it before anyone on the ground reports it."]}),y.jsx(Te,{children:"Confidence — Is It Really a Fire?"}),y.jsx("p",{children:"Each detection gets a confidence rating:"}),y.jsx(Rt,{headers:["Confidence","What It Means"],rows:[["High","Almost certainly a real fire. Strong heat signature."],["Nominal","Probably a real fire. Most actual fires get this rating."],["Low","Maybe a fire, maybe not. Could be a hot roof, sun reflecting off water, a factory, or a gas flare. Lots of false alarms."]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Recommendation"}),`: Set the filter to "Nominal + High." If you include "Low" you'll get alerts for every hot parking lot on a summer day.`]}),y.jsx(Te,{children:"FRP — How Intense Is It?"}),y.jsx("p",{children:'FRP (Fire Radiative Power) measures the heat output in megawatts. Think of it as "how hot is this thing":'}),y.jsx(Rt,{headers:["FRP","What It Probably Is"],rows:[["Under 5 MW","Hot surface, small agricultural burn, gas flare, or warm ground"],["5-50 MW","An actual fire — brush fire, grass fire, typical wildfire"],["50-300 MW","Intense fire — trees fully burning, active fire front"],["Over 300 MW","Extreme fire — major wildfire in full force"]]}),y.jsx("p",{children:"Setting the minimum FRP to 5 MW filters out most industrial and agricultural false alarms."}),y.jsx(Te,{children:"New Ignition Detection"}),y.jsxs("p",{children:["MeshAI cross-references satellite hotspots against known NIFC fire perimeters. If a hotspot is NOT near any known fire, it gets flagged as a ",y.jsx("strong",{children:"potential new ignition"})," — maybe a new fire just started. These get elevated priority regardless of confidence level."]}),y.jsx(Te,{children:"Timing"}),y.jsxs("p",{children:["Satellite data arrives ",y.jsx("strong",{children:"1-3 hours"})," after the satellite passes overhead. Each location gets observed about ",y.jsx("strong",{children:"6 times per day"}),` across all satellites, so there are multi-hour gaps. This is not real-time — it's "pretty recent."`]}),y.jsx(Te,{children:"Getting an API Key"}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:["Go to ",y.jsx(Bt,{href:"https://firms.modaps.eosdis.nasa.gov/api/area/",children:"FIRMS API page"})]}),y.jsx("li",{children:'Click "Get MAP_KEY"'}),y.jsx("li",{children:"Register for a free Earthdata account"}),y.jsx("li",{children:"Your key arrives by email"}),y.jsx("li",{children:"Enter it in Config → Environmental → FIRMS"})]}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://firms.modaps.eosdis.nasa.gov",children:"FIRMS Fire Map"})," — see hotspots on a map"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://earthdata.nasa.gov/data/tools/firms/faq",children:"FIRMS FAQ"})," — how it works"]})]})]}),y.jsxs(pi,{id:"weather-alerts",title:"Weather Alerts",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI watches for NWS (National Weather Service) alerts affecting your area — warnings, watches, and advisories."}),y.jsx(Te,{children:"Alert Severity — How Serious Is It?"}),y.jsx(Rt,{headers:["Severity","What It Means","Example"],rows:[["Extreme","Life-threatening. The most serious events.","Tornado Emergency, Hurricane Warning, Tsunami Warning"],["Severe","Dangerous. Take protective action.","Tornado Warning, Flash Flood Warning, Blizzard Warning, Red Flag Warning"],["Moderate","Be prepared. Could become dangerous.","Winter Weather Advisory, Wind Advisory, Flood Watch, Heat Advisory"],["Minor","Good to know. Probably won't hurt anyone.","Special Weather Statement, Air Quality Alert"]]}),y.jsx(Te,{children:"When Should I Act? (Urgency)"}),y.jsx(Rt,{headers:["Urgency","What It Means"],rows:[["Immediate","Do something NOW"],["Expected","Do something within the hour"],["Future","Coming in the next several hours"],["Past","It's over — NWS is clearing the alert"]]}),y.jsx(Te,{children:"How Sure Are They? (Certainty)"}),y.jsx(Rt,{headers:["Certainty","What It Means"],rows:[["Observed","It's happening right now. Verified."],["Likely","More than 50% chance"],["Possible","Could happen, but less than 50%"],["Unlikely","Probably won't, but mentioned for awareness"]]}),y.jsx(Te,{children:"These Are Separate Scales"}),y.jsx("p",{children:'A single alert has all three. A hurricane warning for next week is "Severe + Future + Likely." A tornado spotted on the ground is "Extreme + Immediate + Observed." An air quality advisory is "Minor + Expected + Possible."'}),y.jsx(Te,{children:"What Minimum Severity Should I Set?"}),y.jsx(Rt,{headers:["Setting","What You Get","What You Miss"],rows:[["Minor","Everything — high volume","Nothing"],[y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Moderate"})," ✓"]}),"Watches, Advisories, and Warnings","Special Weather Statements"],["Severe","Only Warnings — things happening NOW","Watches (which give you hours of advance warning)"],["Extreme","Only the rarest events","Most Tornado and Severe Thunderstorm Warnings"]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Moderate is recommended."})," It catches Watches (advance warning that conditions may worsen) and Advisories (conditions exist but aren't severe) while filtering out the informational stuff."]}),y.jsx(Te,{children:"Finding Your NWS Zone"}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:["Go to ",y.jsx(Bt,{href:"https://www.weather.gov",children:"weather.gov"})]}),y.jsx("li",{children:"Enter your location"}),y.jsxs("li",{children:["Find your zone code at ",y.jsx(Bt,{href:"https://www.weather.gov/pimar/PubZone",children:"NWS Zone Map"})]}),y.jsxs("li",{children:["Zone codes look like: ",y.jsx($e,{children:"IDZ016"}),", ",y.jsx($e,{children:"UTZ040"}),", etc."]})]}),y.jsx(Te,{children:"The User-Agent Field"}),y.jsx("p",{children:"NWS wants to know who's using their API — not for approval, just so they can contact you if something breaks. You make it up:"}),y.jsx("p",{children:y.jsx($e,{children:"(meshai, you@email.com)"})}),y.jsx("p",{children:"No registration. No waiting. Just type it in."}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://alerts.weather.gov",children:"NWS Active Alerts"})," — see current alerts"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.weather.gov/documentation/services-web-api",children:"NWS API Docs"})," — technical details"]})]})]}),y.jsxs(pi,{id:"solar",title:"Solar & Geomagnetic Conditions",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI tracks space weather — solar activity and its effects on Earth's magnetic field. This matters for radio operators because the sun directly controls how well HF radio works, and major solar events can affect all radio communications."}),y.jsx(Te,{children:"Solar Flux Index (SFI)"}),y.jsx("p",{children:'Think of SFI as a "how active is the sun" number. Higher = better for HF radio, but also higher risk of solar flares.'}),y.jsx(Rt,{headers:["SFI","What It Means for You"],rows:[["Below 70","Quiet sun. Higher HF bands (10m, 15m) are probably dead. Stick to lower bands."],["70-90","Getting better. Some openings on 15m and above, but inconsistent."],["90-120","Good. Most HF bands work. Reliable contacts on 20m and 15m."],["120-170","Great. All HF bands open. 10m works for worldwide contacts."],["Above 170","Excellent. Best HF conditions — but watch for flares."]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Quick rule"}),": SFI above 90 and Kp below 4 = good day for HF radio."]}),y.jsx(Te,{children:"Kp Index"}),y.jsx("p",{children:"Kp measures how disturbed Earth's magnetic field is, on a 0-9 scale. Higher = more disturbance = worse for HF radio but better for aurora viewing."}),y.jsx(Rt,{headers:["Kp","What It Means for You"],rows:[["0-2","Quiet. Best HF conditions."],["3","Slightly unsettled. You probably won't notice."],["4","Active. Some noise and fading on HF, especially if you're at higher latitudes."],[y.jsx("strong",{children:"5"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Minor storm (G1)."})," HF noticeably degraded. Aurora visible at high latitudes (~60°N)."]})],[y.jsx("strong",{children:"6"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Moderate storm (G2)."})," HF getting rough. Aurora moving south (~55°N)."]})],[y.jsx("strong",{children:"7"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Strong storm (G3)."})," HF unreliable for 1-2 days. Aurora at mid-latitudes."]})],[y.jsx("strong",{children:"8-9"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Severe/Extreme storm."})," HF may black out completely. Aurora visible at very low latitudes. Power grid stress possible."]})]]}),y.jsx(Te,{children:"R / S / G Scales"}),y.jsx("p",{children:"NOAA's shorthand for three types of space weather events:"}),y.jsx(fl,{children:"R (Radio Blackouts) — from solar flares:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"R1-R2: Brief HF disruption. You might not notice."}),y.jsx("li",{children:"R3: HF goes out for about an hour on the sunlit side of Earth."}),y.jsx("li",{children:"R4-R5: HF dead for hours. Serious."})]}),y.jsx(fl,{children:"S (Solar Radiation Storms) — from energetic particles:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"Mostly affects polar regions and satellites"}),y.jsx("li",{children:"S3+: Polar HF goes out entirely"})]}),y.jsx(fl,{children:"G (Geomagnetic Storms) — from solar wind disturbances:"}),y.jsx("ul",{className:"list-disc list-inside ml-4 space-y-1",children:y.jsx("li",{children:"Same as the Kp scale: G1 = Kp 5, up to G5 = Kp 9"})}),y.jsx(Te,{children:"Bz — The Storm Predictor"}),y.jsx("p",{children:"Bz measures the direction of the solar wind's magnetic field. When it points south (negative values), the solar wind can dump energy into Earth's magnetic field, causing storms."}),y.jsx(Rt,{headers:["Bz","What It Means"],rows:[["Positive","All good. Solar wind bouncing off."],["0 to -5","Slight coupling. Nothing dramatic."],["-5 to -10","Things starting to pick up. Storm possible."],["Below -10","Storm likely. Kp will start climbing."],["Below -20","Severe storm probable."]]}),y.jsx("p",{children:"Bz can change fast — minute to minute. What matters is whether it stays negative for hours, not brief dips."}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.swpc.noaa.gov",children:"SWPC Space Weather Dashboard"})," — live data"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.swpc.noaa.gov/noaa-scales-explanation",children:"NOAA Space Weather Scales"})," — what R/S/G mean"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.hamqsl.com/solar.html",children:"HamQSL Solar Page"})," — ham-friendly display"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.swpc.noaa.gov/products/planetary-k-index",children:"Planetary K-Index"})," — live Kp"]})]})]}),y.jsxs(pi,{id:"ducting",title:"Tropospheric Ducting",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:'Sometimes the atmosphere creates an invisible "pipe" that traps radio signals and carries them much farther than normal. This is called tropospheric ducting. It mostly affects VHF and UHF frequencies.'}),y.jsx("p",{children:"MeshAI watches for these conditions by analyzing weather data (temperature and humidity at different altitudes) over your mesh area."}),y.jsx(Te,{children:"How Do I Know If Ducting Is Happening?"}),y.jsx("p",{children:'MeshAI reports a "condition" based on the atmospheric profile:'}),y.jsx(Rt,{headers:["Condition","What It Means"],rows:[["Normal","Standard propagation. Nothing unusual."],["Super-refraction","Slightly enhanced range. You might hear a few more distant stations than usual."],["Surface Duct","Radio signals trapped near the ground. You may hear stations hundreds of km away that you've never heard before."],["Elevated Duct",'Same effect but the "pipe" is up in the atmosphere. Affects signals passing through that altitude.']]}),y.jsx(Te,{children:"What You'll Actually Notice"}),y.jsx("p",{children:"When ducting happens on your mesh:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"Distant repeaters you've never heard suddenly come in"}),y.jsx("li",{children:"Nodes appear from far outside your normal range"}),y.jsx("li",{children:"You hear FM radio stations from other cities"}),y.jsx("li",{children:"ADS-B flight tracking range gets much longer"}),y.jsx("li",{children:"There might be interference from distant stations on your frequency"})]}),y.jsx(Te,{children:"The dM/dz Number"}),y.jsx("p",{children:`The dashboard shows a "dM/dz" value in "M-units/km." You don't need to understand the math — just know:`}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"Around 118"})," = normal atmosphere"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Below 79"})," = enhanced propagation starting"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Below 0 (negative)"})," = ducting is happening"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Below -50"})," = strong ducting — classic VHF/UHF DX event"]})]}),y.jsx(Te,{children:"When Does Ducting Happen?"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"Under high-pressure weather systems (clear, stable air)"}),y.jsx("li",{children:"When warm air sits on top of cool air (temperature inversion)"}),y.jsx("li",{children:"Most common in late summer and early fall"}),y.jsx("li",{children:"Strongest along coastlines and over water"}),y.jsx("li",{children:"In mountain valleys: cold air pooling in fall/winter can create surface ducts"})]}),y.jsx(Te,{children:"Setting It Up"}),y.jsx("p",{children:"Just configure the latitude and longitude of the center of your mesh area in Config → Environmental → Ducting. MeshAI checks the atmospheric conditions there every 3 hours using free weather model data. No API key needed."}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://dxinfocentre.com/tropo.html",children:"Tropo Forecast Maps (Hepburn)"})," — 6-day tropo prediction"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://dxmaps.com",children:"DX Maps"})," — real-time VHF/UHF propagation reports"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://en.wikipedia.org/wiki/Tropospheric_propagation",children:"Wikipedia: Tropospheric Propagation"})," — background"]})]})]}),y.jsxs(pi,{id:"avalanche",title:"Avalanche Danger",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI pulls avalanche forecasts from your regional avalanche center during winter months. The danger scale has 5 levels and it's the same across all of North America."}),y.jsx(Te,{children:"The Danger Scale"}),y.jsx(Rt,{headers:["Level","Name","Color","What To Do"],rows:[["1","Low",y.jsx(ar,{color:"green"}),"Generally safe. Normal caution in steep terrain."],["2","Moderate",y.jsx(ar,{color:"yellow"}),"Be careful on specific terrain features. Evaluate conditions."],["3","Considerable",y.jsx(ar,{color:"orange"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"DANGEROUS."}),` This is where most people die in avalanches — they see "3 out of 5" and think it's fine. It's not. Use extreme caution.`]})],["4","High",y.jsx(ar,{color:"red"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Very dangerous."})," Stay off anything steep."]})],["5","Extreme",y.jsx(ar,{color:"black"}),y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Don't go out."})," Avalanches are happening on their own."]})]]}),y.jsx(Te,{children:"The Most Important Thing to Know"}),y.jsxs("p",{children:[y.jsx("strong",{children:"Level 3 (Considerable) kills more people than any other level."}),' People look at "3 out of 5" and think "middle of the road, probably okay." In reality, the risk roughly doubles at each step up the scale. Level 3 is where dangerous conditions overlap with people thinking they can handle it.']}),y.jsx(Te,{children:"Seasonal"}),y.jsx("p",{children:'MeshAI only checks avalanche conditions during winter months (configurable, default December through April). Outside season, it shows "off season" and saves API calls.'}),y.jsx(Te,{children:"Finding Your Avalanche Center"}),y.jsxs("p",{children:["Go to ",y.jsx(Bt,{href:"https://avalanche.org/avalanche-centers/",children:"avalanche.org/avalanche-centers/"})," for a map. Common center codes:"]}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"SNFAC"})," — Sawtooth (central Idaho)"]}),y.jsxs("li",{children:[y.jsx($e,{children:"UAC"})," — Utah"]}),y.jsxs("li",{children:[y.jsx($e,{children:"NWAC"})," — Cascades/Olympics (WA/OR)"]}),y.jsxs("li",{children:[y.jsx($e,{children:"CAIC"})," — Colorado"]}),y.jsxs("li",{children:[y.jsx($e,{children:"SAC"})," — Sierra Nevada (CA)"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GNFAC"})," — Gallatin (SW Montana)"]})]}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://avalanche.org",children:"Avalanche.org"})," — US forecasts"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://avalanche.org/avalanche-encyclopedia/human/resources/north-american-public-avalanche-danger-scale/",children:"Avalanche Danger Scale"})," — full scale explanation"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://kbyg.org",children:"Know Before You Go"})," — avalanche awareness"]})]})]}),y.jsxs(pi,{id:"traffic",title:"Traffic Flow",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"MeshAI monitors traffic speed on road segments you configure, using data from TomTom (real vehicles with navigation apps reporting their speed)."}),y.jsx(Te,{children:"Speed Ratio — The Key Number"}),y.jsx("p",{children:'MeshAI compares current speed to "free-flow speed" (what traffic normally does when the road is empty). The ratio tells you how congested it is:'}),y.jsx(Rt,{headers:["Ratio","What It Means"],rows:[[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"green"})," Above 85%"]}),"Normal. Traffic flowing fine."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"yellow"})," 65-85%"]}),"Slow. Heavier than usual but moving."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"orange"})," 40-65%"]}),"Congested. Significant delays."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"red"})," Below 40%"]}),"Gridlock. Barely moving."]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Note"}),`: "free-flow speed" is NOT the speed limit. It's what traffic actually does on that road when nobody's in the way. Drivers often exceed speed limits on open highways.`]}),y.jsx(Te,{children:"Confidence — Can You Trust the Data?"}),y.jsx("p",{children:"TomTom's confidence score tells you how much of the reading comes from real vehicles right now vs historical averages:"}),y.jsx(Rt,{headers:["Confidence","What It Means"],rows:[["Above 0.9","Very reliable — lots of real-time probe data"],["0.7-0.9","Good — mix of real-time and historical"],["Below 0.7",y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Unreliable"})," — mostly guessing from historical patterns. Don't alert on this."]})]]}),y.jsx("p",{children:"Set minimum confidence to 0.7 to avoid false congestion alerts at night or on rural roads where few probe vehicles drive."}),y.jsx(Te,{children:"Setting Up Corridors"}),y.jsx("p",{children:'Each "corridor" is a point on a road you want to monitor. To add one:'}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsx("li",{children:"Go to Google Maps, find the road"}),y.jsx("li",{children:`Right-click the road → "What's here?" → copy the coordinates`}),y.jsx("li",{children:"Add the corridor in Config with a name and those coordinates"}),y.jsx("li",{children:"TomTom finds the nearest road segment automatically"})]}),y.jsx(Te,{children:"Getting an API Key"}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:["Sign up at ",y.jsx(Bt,{href:"https://developer.tomtom.com",children:"developer.tomtom.com"})," (free)"]}),y.jsx("li",{children:"Create an app → get your API key"}),y.jsx("li",{children:"Free tier: 2,500 requests/day (plenty for 5-10 corridors)"})]}),y.jsx(Te,{children:"Learn More"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx(Bt,{href:"https://developer.tomtom.com",children:"TomTom Developer Portal"})," — API docs and key signup"]}),y.jsxs("li",{children:[y.jsx(Bt,{href:"https://www.tomtom.com/traffic-index/",children:"TomTom Traffic Index"})," — city congestion rankings"]})]})]}),y.jsxs(pi,{id:"roads-511",title:"Road Conditions (511)",children:[y.jsx(Te,{children:"What You're Looking At"}),y.jsx("p",{children:"511 systems report road closures, construction, weather events, mountain pass conditions, and incidents. Every state runs their own 511 system — there is no national API."}),y.jsx(Te,{children:"Setting It Up"}),y.jsx("p",{children:"You need to find YOUR state's 511 developer API. MeshAI does not include a default URL because every state is different. Some states have free public APIs, some require registration, and some don't have developer APIs at all."}),y.jsx("p",{children:"Configure in Config → Environmental → 511:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"Base URL"})," — your state's API endpoint"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"API Key"})," — if required by your state"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Endpoints"})," — which data feeds to poll (varies by state)"]})]}),y.jsx(Te,{children:"Learn More"}),y.jsx("p",{children:"Check your state's 511 or DOT website for developer information."})]}),y.jsxs(pi,{id:"mesh-health",title:"Mesh Health",children:[y.jsx(Te,{children:"Health Score"}),y.jsx("p",{children:"MeshAI computes a 0-100 health score for your mesh network by looking at five areas, each weighted differently:"}),y.jsx(Rt,{headers:["Pillar","Weight","What It Measures"],rows:[[y.jsx("strong",{children:"Infrastructure"}),"30%","Are your routers online?"],[y.jsx("strong",{children:"Utilization"}),"25%","Is the radio channel congested?"],[y.jsx("strong",{children:"Coverage"}),"20%","Do nodes have redundant paths to gateways?"],[y.jsx("strong",{children:"Behavior"}),"15%","Are any nodes flooding the channel?"],[y.jsx("strong",{children:"Power"}),"10%","Are battery-powered nodes running low?"]]}),y.jsx("p",{children:"The overall score is the weighted sum:"}),y.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"Score = (Infrastructure × 30%) + (Utilization × 25%) + (Coverage × 20%) + (Behavior × 15%) + (Power × 10%)"}),y.jsx(Te,{children:"How Each Pillar Is Calculated"}),y.jsx(fl,{children:"Infrastructure (30%)"}),y.jsx("p",{children:"This is the simplest pillar — what percentage of your infrastructure nodes are currently online?"}),y.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"(routers online ÷ total routers) × 100"}),y.jsxs("p",{children:["Only nodes with the ",y.jsx($e,{children:"ROUTER"}),", ",y.jsx($e,{children:"ROUTER_LATE"}),", or ",y.jsx($e,{children:"ROUTER_CLIENT"})," role count as infrastructure. Regular client nodes going offline doesn't affect this score. If you have 5 routers and 3 are online, infrastructure scores 60."]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Special case:"})," If you have no routers at all (all clients), this pillar scores 100. You're not penalized for not having infrastructure — you just don't have any to track."]}),y.jsx(fl,{children:"Utilization (25%)"}),y.jsxs("p",{children:["MeshAI reads the channel utilization that each router reports in its telemetry — this is the firmware's own measurement of how busy the radio channel is. MeshAI uses the ",y.jsx("strong",{children:"highest"})," value from any infrastructure node because the busiest router is the bottleneck for the whole mesh."]}),y.jsx("p",{children:y.jsx("strong",{children:"How it works:"})}),y.jsxs("ol",{className:"list-decimal list-inside space-y-1 ml-4",children:[y.jsxs("li",{children:["Collect ",y.jsx($e,{children:"channel_utilization"})," from all infrastructure nodes that report it"]}),y.jsx("li",{children:"If no infra nodes have telemetry, try all nodes"}),y.jsxs("li",{children:["Use the ",y.jsx("strong",{children:"maximum"})," value for scoring (busiest node = bottleneck)"]}),y.jsx("li",{children:"If no nodes report utilization (older firmware), fall back to packet count estimate"})]}),y.jsxs("p",{className:"mt-4",children:[y.jsx("strong",{children:"Fallback method"})," (when telemetry unavailable): estimates from packet counts using 200ms/packet airtime. This is less accurate — it assumes MediumFast preset and sums packets across all nodes."]}),y.jsx(Rt,{headers:["Channel Utilization","Score","What It Means"],rows:[["Under 20%","100","Channel is clear — this is the goal"],["20-25%","75-100","Slight degradation, occasional collisions"],["25-35%","50-75","Severe degradation — firmware throttling active"],["35-45%","25-50","Mesh struggling badly — reliability dropping"],["Over 45%","0-25","Mesh is effectively unusable"]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Special case:"})," If no utilization data is available (no telemetry and no packet data), this pillar scores 100. You're not penalized for missing data."]}),y.jsx(fl,{children:"Coverage (20%)"}),y.jsx("p",{children:'Measures gateway redundancy — how many of your data sources can "see" each node. A node reported by all 3 of your gateways has full coverage. A node only seen by 1 gateway is a single point of failure.'}),y.jsxs("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:["coverage_ratio = average_gateways_per_node ÷ total_sources",y.jsx("br",{}),"single_gw_penalty = (single_gateway_nodes ÷ total_nodes) × 40"]}),y.jsx("p",{children:"If a node is seen by 2 out of 3 sources, its coverage ratio is 0.67. Infrastructure nodes with only single-gateway coverage get an extra penalty — they're critical but have no backup path."}),y.jsx(Rt,{headers:["Coverage Ratio","Base Score","After Penalty"],rows:[["100% (all sources)","100","100 minus single-gw penalty"],["70-99%","90","Minus penalties"],["50-69%","70","Minus penalties"],["Under 50%","50 or less","Heavy penalty"]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Special case:"})," With only 1 data source, this pillar can't score well — there's no redundancy to measure. Coverage becomes meaningful when you have 2+ sources (MeshMonitor + MQTT, multiple gateways, etc.)."]}),y.jsx(fl,{children:"Behavior (15%)"}),y.jsx("p",{children:"Counts how many nodes are sending an unusually high number of non-text packets. This catches firmware bugs, stuck transmitters, and misconfigured nodes that are flooding the channel."}),y.jsxs("p",{children:[y.jsx("strong",{children:"What counts as flooding:"})," More than 500 non-text packets in 24 hours. Text messages don't count — the behavior pillar only flags telemetry, position, and routing packet floods."]}),y.jsx(Rt,{headers:["Flagged Nodes","Score"],rows:[["0","100"],["1","80"],["2-3","60"],["4-5","40"],["6+","20"]]}),y.jsx("p",{children:"A single misbehaving node only drops the score to 80. It takes multiple problem nodes to seriously hurt the behavior pillar."}),y.jsx(fl,{children:"Power (10%)"}),y.jsx("p",{children:"Measures what fraction of battery-powered nodes are below the warning threshold (default 20%)."}),y.jsx("p",{className:"p-3 bg-slate-800 rounded font-mono text-sm",children:"100 × (1 − low_battery_nodes ÷ total_battery_nodes)"}),y.jsx("p",{children:"If 2 out of 10 battery nodes are below 20%, power scores 80."}),y.jsxs("p",{children:[y.jsx("strong",{children:"Important:"})," USB-powered nodes are excluded from this calculation. Many nodes report 100% battery even when running on wall power with no battery installed. Only nodes actually running on batteries affect this pillar."]}),y.jsx(Te,{children:"Health Tiers"}),y.jsx(Rt,{headers:["Score","Tier","What It Means"],rows:[["90-100",y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"green"})," Healthy"]}),"Everything's working well."],["75-89",y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"yellow"})," Slight degradation"]}),"Some issues but the mesh is functional."],["50-74",y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"orange"})," Unhealthy"]}),"Multiple problems. Reliability is affected."],["25-49",y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"red"})," Warning"]}),"Significant issues. The mesh is struggling."],["0-24",y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"black"})," Critical"]}),"Major failures. Barely functional."]]}),y.jsx(Te,{children:"Channel Utilization — Is the Radio Channel Full?"}),y.jsx("p",{children:"Meshtastic radios share one LoRa channel. If too many nodes are transmitting too often, they step on each other and messages get lost."}),y.jsx(Rt,{headers:["Utilization","What's Happening"],rows:[[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"green"})," Under 25%"]}),"Healthy. The firmware itself starts throttling above 25% to protect the channel — so under 25% is the target."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"yellow"})," 25-40%"]}),"Getting busy. Common on larger meshes. Worth watching."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"orange"})," 40-50%"]}),"Congested. The firmware throttles GPS updates above 40%. Messages are colliding and retrying."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"red"})," Over 50%"]}),"Serious problem. More time is spent retrying than communicating. Mesh reliability drops fast."],[y.jsxs(y.Fragment,{children:[y.jsx(ar,{color:"black"})," Over 65%"]}),"Documented failure point on busy LONG_FAST meshes. The mesh becomes unusable."]]}),y.jsx(Te,{children:"Packet Flooding"}),y.jsx("p",{className:"p-3 bg-yellow-500/10 border border-yellow-500/30 rounded text-yellow-200",children:y.jsx("strong",{children:'⚠️ "Packet flooding" means a node sending too many RADIO PACKETS. This has nothing to do with water flooding.'})}),y.jsx("p",{children:"A normal Meshtastic node sends a packet every few minutes (announcing itself, reporting telemetry, updating position). If a node starts blasting packets every few seconds, something is wrong — firmware bug, stuck transmitter, or misconfiguration."}),y.jsx(Rt,{headers:["Packets per Minute","What It Means"],rows:[["1-5","Normal"],["5-10","Elevated — might be someone chatting a lot"],["10-20","Suspicious — worth investigating"],["Over 30","Something is broken. This node is actively hurting the mesh."]]}),y.jsx(Te,{children:"Battery Levels"}),y.jsx("p",{children:"Most Meshtastic radios (T-Beam, RAK4631, Heltec V3) use a single lithium battery cell. The voltage tells you how much charge is left:"}),y.jsx(Rt,{headers:["Voltage","Charge","What To Do"],rows:[["4.20V","100%","Full"],["3.80V","~60%","Fine"],[y.jsx("strong",{children:"3.60V"}),y.jsx("strong",{children:"~30%"}),y.jsx(y.Fragment,{children:y.jsx("strong",{children:"⚠️ Warning — charge it soon"})})],[y.jsx("strong",{children:"3.50V"}),y.jsx("strong",{children:"~15%"}),y.jsx(y.Fragment,{children:y.jsx("strong",{children:"🔴 Low — charge it now"})})],[y.jsx("strong",{children:"3.40V"}),y.jsx("strong",{children:"~7%"}),y.jsx(y.Fragment,{children:y.jsx("strong",{children:"⚫ About to die"})})],["3.30V","~3%","Device shutting down"]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"USB-powered nodes"})," report 100% battery even if there's no battery installed. Battery alerts only matter for nodes actually running on battery power."]}),y.jsx(Te,{children:"Node Offline Detection"}),y.jsx("p",{children:`MeshAI marks a node as "offline" when it hasn't been heard for a configurable time period. Different node types need different thresholds:`}),y.jsx(Rt,{headers:["Node Type","Recommended Threshold","Why"],rows:[["Fixed infrastructure (wall power)",y.jsx("strong",{children:"2 hours"}),"These should always be transmitting. 2 hours of silence means something is wrong."],["Fixed client (wall power)","2-4 hours","Same logic, slightly more lenient."],["Mobile / vehicle","4-8 hours","They go behind mountains, into garages, out of range. Normal."],["Solar-powered","12-24 hours","May shut down at night when solar stops charging."]]}),y.jsxs("p",{children:[y.jsx("strong",{children:"Rule of thumb"}),`: set the threshold to about 4× the node's beacon interval. Too tight and nodes will constantly flap "offline/online" from normal gaps. Too loose and real outages go unnoticed.`]})]}),y.jsxs(pi,{id:"notifications",title:"Notifications",children:[y.jsx(Te,{children:"How It Works"}),y.jsxs("ol",{className:"list-decimal list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"Something happens"})," — a fire is detected, weather warning issued, node goes offline, etc."]}),y.jsxs("li",{children:[y.jsx("strong",{children:"MeshAI checks your rules"})," — does this event match any of your notification rules? Is it severe enough? Are we in quiet hours?"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"If a rule matches"})," — MeshAI sends the notification through whatever delivery method that rule is configured for."]})]}),y.jsx(Te,{children:"Building Rules"}),y.jsx("p",{children:"Each rule answers three questions:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"WHEN"})," does it trigger? (which categories, what severity)"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"WHERE"})," does it send? (mesh broadcast, email, webhook, etc.)"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"HOW OFTEN"})," at most? (cooldown period)"]})]}),y.jsx("p",{children:'Use "Add from Template" to start with a pre-built rule and customize it, or build from scratch with "Add Rule."'}),y.jsx(Te,{children:"Severity Levels — What Should I Set?"}),y.jsx(Rt,{headers:["Level","When It's Used","Notification Volume"],rows:[["Info","Routine stuff (ducting detected, new router appeared)","High — lots of messages"],["Advisory","Worth knowing (weather advisory, slow traffic, battery declining)","Moderate"],["Watch","Pay attention (fire within 50km, weather watch, stream rising)","Low-moderate"],[y.jsxs(y.Fragment,{children:[y.jsx("strong",{children:"Warning"})," ✓"]}),"Take action (fire within 15km, severe weather, critical battery)","Low — recommended for most rules"],["Emergency","Life safety (extreme weather, fire at infrastructure, total blackout)","Very rare"]]}),y.jsxs("p",{children:[y.jsx("strong",{children:'"Warning" is the sweet spot for most rules.'})," You get alerted when something actually needs your attention without being overwhelmed by every minor event."]}),y.jsx(Te,{children:"Quiet Hours"}),y.jsx("p",{children:'When enabled, non-emergency notifications are held during sleeping hours (default 10pm-6am). Emergency alerts and rules marked "Override Quiet Hours" always get through.'}),y.jsx("p",{children:"You can turn quiet hours off entirely if you don't want them."}),y.jsx(Te,{children:"Webhook — The Swiss Army Knife"}),y.jsx("p",{children:"A webhook sends your alert as an HTTP POST to any URL. This one delivery method works with:"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx("strong",{children:"Discord"})," — use a Discord webhook URL"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Slack"})," — use a Slack incoming webhook URL"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"ntfy.sh"})," — POST to ",y.jsx($e,{children:"https://ntfy.sh/your-topic"})]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Pushover"})," — POST to the Pushover API"]}),y.jsxs("li",{children:[y.jsx("strong",{children:"Home Assistant"})," — POST to an automation webhook URL"]}),y.jsx("li",{children:"Anything else that accepts HTTP POST"})]}),y.jsx("p",{children:"MeshAI doesn't need to know what's on the other end. Give it the URL and it works."})]}),y.jsxs(pi,{id:"commands",title:"Commands",children:[y.jsxs("p",{children:["All commands use the ",y.jsx($e,{children:"!"})," prefix (configurable). Send these as a direct message to MeshAI on your mesh."]}),y.jsx(Te,{children:"Basic Commands"}),y.jsx(Rt,{headers:["Command","What It Does"],rows:[[y.jsx($e,{children:"!help"}),"Shows all available commands"],[y.jsx($e,{children:"!ping"}),"Tests if the bot is alive"],[y.jsx($e,{children:"!status"}),"Quick mesh summary (nodes online, health score)"],[y.jsx($e,{children:"!health"}),"Detailed health report with pillar scores"],[y.jsx($e,{children:"!weather"}),"Current weather for your area"]]}),y.jsx(Te,{children:"Environmental Commands"}),y.jsx(Rt,{headers:["Command","What It Does"],rows:[[y.jsx($e,{children:"!alerts"}),"Active NWS weather alerts for your area"],[y.jsxs(y.Fragment,{children:[y.jsx($e,{children:"!solar"})," (or ",y.jsx($e,{children:"!hf"}),")"]}),"Current solar indices and RF conditions"],[y.jsx($e,{children:"!fire"}),"Active wildfires near your mesh"],[y.jsx($e,{children:"!avy"}),'Avalanche advisory (seasonal — shows "off season" in summer)'],[y.jsxs(y.Fragment,{children:[y.jsx($e,{children:"!streams"})," (or ",y.jsx($e,{children:"!gauges"}),")"]}),"Stream gauge readings"],[y.jsxs(y.Fragment,{children:[y.jsx($e,{children:"!roads"})," (or ",y.jsx($e,{children:"!traffic"}),")"]}),"Road conditions and traffic flow"],[y.jsx($e,{children:"!hotspots"}),"Satellite fire detections"]]}),y.jsx(Te,{children:"Subscription Commands"}),y.jsx(Rt,{headers:["Command","What It Does"],rows:[[y.jsx($e,{children:"!subscribe"}),"Lists all alert categories you can subscribe to"],[y.jsx($e,{children:"!subscribe fire_proximity"}),"Subscribe to a specific category"],[y.jsx($e,{children:"!subscribe all"}),"Subscribe to everything"],[y.jsx($e,{children:"!unsubscribe fire_proximity"}),"Unsubscribe from a category"],[y.jsx($e,{children:"!subscriptions"}),"Shows what you're currently subscribed to"]]}),y.jsx(Te,{children:"Conversational"}),y.jsx("p",{children:`MeshAI isn't just commands — you can ask it questions in plain English. "How's the mesh doing?" "Is there any ducting?" "What's the fire situation?" "How's traffic on I-84?" It uses the live environmental data and mesh health data to answer.`})]}),y.jsxs(pi,{id:"api",title:"API Reference",children:[y.jsxs("p",{children:["MeshAI's REST API is available at ",y.jsx($e,{children:"http://your-host:8080"}),". All endpoints return JSON."]}),y.jsx(Te,{children:"System"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/status"})," — version, uptime, node count"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/channels"})," — radio channel list"]}),y.jsxs("li",{children:[y.jsx($e,{children:"POST /api/restart"})," — restart the bot"]})]}),y.jsx(Te,{children:"Mesh Data"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/health"})," — health score and pillars"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/nodes"})," — all nodes with positions and telemetry"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/edges"})," — neighbor links with signal quality"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/regions"})," — region summaries"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/sources"})," — data source health"]})]}),y.jsx(Te,{children:"Configuration"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/config"})," — full config"]}),y.jsxs("li",{children:[y.jsxs($e,{children:["GET /api/config/","{section}"]})," — one section"]}),y.jsxs("li",{children:[y.jsxs($e,{children:["PUT /api/config/","{section}"]})," — update a section"]})]}),y.jsx(Te,{children:"Environmental"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/status"})," — per-feed health"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/active"})," — all active events"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/swpc"})," — solar/geomagnetic data"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/ducting"})," — atmospheric profile"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/fires"})," — wildfire perimeters"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/env/hotspots"})," — satellite fire detections"]})]}),y.jsx(Te,{children:"Alerts"}),y.jsxs("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/alerts/active"})," — current alerts"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/alerts/history"})," — past alerts"]}),y.jsxs("li",{children:[y.jsx($e,{children:"GET /api/notifications/categories"})," — available alert categories"]})]}),y.jsx(Te,{children:"Real-time"}),y.jsx("ul",{className:"list-disc list-inside ml-4 space-y-1",children:y.jsxs("li",{children:[y.jsx($e,{children:"ws://your-host:8080/ws/live"})," — WebSocket for live updates"]})})]})]})})]})}function cet(){return y.jsx(Tce,{children:y.jsx(Mce,{children:y.jsxs(Iue,{children:[y.jsx(hl,{path:"/",element:y.jsx(oNe,{})}),y.jsx(hl,{path:"/mesh",element:y.jsx(SJe,{})}),y.jsx(hl,{path:"/environment",element:y.jsx(PJe,{})}),y.jsx(hl,{path:"/config",element:y.jsx(XJe,{})}),y.jsx(hl,{path:"/alerts",element:y.jsx(net,{})}),y.jsx(hl,{path:"/notifications",element:y.jsx(set,{})}),y.jsx(hl,{path:"/reference",element:y.jsx(uet,{})})]})})})}uP.createRoot(document.getElementById("root")).render(y.jsx(Q.StrictMode,{children:y.jsx(Bue,{children:y.jsx(cet,{})})}));
|