@wildo-ai/application-creation-workbench 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/wildo-workbench-serve.mjs +0 -0
- package/dist/.vite/manifest.json +399 -392
- package/dist/assets/ChartEmptyState-BP_Yq5V7.js +1 -0
- package/dist/assets/ChartView-07Vh3EtV.js +56 -0
- package/dist/assets/{_basePickBy-Br6YuOAk.js → _basePickBy-C0TWefH3.js} +1 -1
- package/dist/assets/{_baseUniq-K10bxMjs.js → _baseUniq-aBjj_hOi.js} +1 -1
- package/dist/assets/{arc-hTvUi_Jd.js → arc-B7pBcXhk.js} +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-CxaR1SOK.js +36 -0
- package/dist/assets/{blockDiagram-VD42YOAC-CMGydNsH.js → blockDiagram-VD42YOAC-FQ6rpl1q.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CTiIMIz5.js → c4Diagram-YG6GDRKO-MBotlECZ.js} +1 -1
- package/dist/assets/channel-BihP_0tn.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CBDMQNPS.js → chunk-4BX2VUAB-DH3JjsZf.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CEmaVN-l.js → chunk-55IACEB6-B-1eMtsJ.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-BuRJMfnQ.js → chunk-B4BG7PRW-DjqjS8Nd.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DTEvZEyn.js → chunk-DI55MBZ5-CNDJpkHu.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-CQL6IezS.js → chunk-FMBD7UC4-C_LJMr3H.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DIt1i8tt.js → chunk-QN33PNHL-DOWhVFKY.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-C8CdhpgW.js → chunk-QZHKN3VN-BqSJxIuw.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-2nOqyQPZ.js → chunk-TZMSLE5B-CnGhg192.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-DmlHswhx.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-DmlHswhx.js +1 -0
- package/dist/assets/clone-H3FbKF9K.js +1 -0
- package/dist/assets/{cm6-editor-C1am2PUt.js → cm6-editor-DpZrV-bm.js} +3 -3
- package/dist/assets/code-block-IT6T5CEO-CJXyw75w.js +3 -0
- package/dist/assets/{context-CjDY9wk7.js → context-CYZBYFJH.js} +1 -1
- package/dist/assets/cose-bilkent-S5V4N54A-BV1r6KdQ.js +1 -0
- package/dist/assets/dagre-6UL2VRFP-xo5kvHqM.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-yWnIouwj.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-7PaiBPsn.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-CLb_cZaK.js +24 -0
- package/dist/assets/{dropbox-picker-BcRq4q-0.js → dropbox-picker-dJzRo9BP.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-Dg-rHIsN.js → erDiagram-Q2GNP2WA-C7zQODGQ.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-BP-XXSqP.js → flowDiagram-NV44I4VS-CU90-nPK.js} +1 -1
- package/dist/assets/flows-actors-graph-runtime-I8VIayGy.js +1 -0
- package/dist/assets/ganttDiagram-JELNMOA3-QChqch-L.js +267 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-C9TJLfq4.js +65 -0
- package/dist/assets/{google-drive-picker-B7-UtQYR.js → google-drive-picker-DP0pskfD.js} +1 -1
- package/dist/assets/{graph-C0dMcX0W.js → graph-BSonitmV.js} +1 -1
- package/dist/assets/{graph-runtime-CWiE-wtz.js → graph-runtime-8-ugTIpe.js} +1 -1
- package/dist/assets/{index-DPnXh7rr.js → index-B3f48X5_.js} +1 -1
- package/dist/assets/{index-Be7Kt732.js → index-B5SFUruu.js} +1 -1
- package/dist/assets/{index-D9v8TSci.js → index-BAj7bJQ9.js} +1 -1
- package/dist/assets/{index-Dq_EnMVo.js → index-BVEXkCPp.js} +1 -1
- package/dist/assets/{index-Cey0RnOC.js → index-BZyZXiVP.js} +1 -1
- package/dist/assets/{index-DvFC4HED.js → index-BkfsYGDI.js} +1 -1
- package/dist/assets/{index-Dq0jp-Om.js → index-Bzi4leGz.js} +1 -1
- package/dist/assets/{index-9s27iSag.js → index-CFS2kf4X.js} +1 -1
- package/dist/assets/{index-t42UNDS6.js → index-CTGTArYi.js} +1 -1
- package/dist/assets/{index-DKCAweKx.js → index-CZfKMV0S.js} +1 -1
- package/dist/assets/{index-Bgs_pC_Y.js → index-CclRN4na.js} +1 -1
- package/dist/assets/index-CpNjptBT.js +347 -0
- package/dist/assets/{index-D5kqp6s0.js → index-CqAJwEb9.js} +1 -1
- package/dist/assets/{index-DZopo5F6.js → index-Cx98Z3Ta.js} +1 -1
- package/dist/assets/index-D-9PKSn4.js +1 -0
- package/dist/assets/index-D-THewyc.css +1 -0
- package/dist/assets/{index-Df0eJHBm.js → index-D12-fzIP.js} +1 -1
- package/dist/assets/index-D8dkqP85.js +1094 -0
- package/dist/assets/{index-ZpEoSVCX.js → index-DL_hDFJK.js} +1 -1
- package/dist/assets/{index-D7UJLb5I.js → index-DNdNQX3_.js} +1 -1
- package/dist/assets/{index-BOiBO34F.js → index-DRrfjJvh.js} +1 -1
- package/dist/assets/{index-BOxxilol.js → index-D_QZLEQq.js} +1 -1
- package/dist/assets/{index-BkvM_lMh.js → index-Dl0klRA0.js} +1 -1
- package/dist/assets/{index-DlJDBjRm.js → index-DwafvHBM.js} +1 -1
- package/dist/assets/{index-COFqdHy-.js → index-dEth1qer.js} +1 -1
- package/dist/assets/{index-B4dr2goB.js → index-jiRPxWhK.js} +1 -1
- package/dist/assets/{index-DrKP8dhg.js → index-tJ39cHN5.js} +1 -1
- package/dist/assets/{index-Cl_eCn7w.js → index-vvv2MPol.js} +1 -1
- package/dist/assets/{index.es-OTtV-Qaj.js → index.es-BIyJxiiZ.js} +1 -1
- package/dist/assets/infoDiagram-HS3SLOUP-Beor-41t.js +2 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C5l-W_D3.js → journeyDiagram-XKPGCS4Q-TTxuStRy.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-B__BbWoq.js → kanban-definition-3W4ZIXB7-BYqFfkjy.js} +1 -1
- package/dist/assets/{layout-Ct3mCMS9.js → layout-DrzykIoN.js} +1 -1
- package/dist/assets/{linear-Dz3rN3XM.js → linear-D86elEgL.js} +1 -1
- package/dist/assets/maximize-2-zJKkDRK0.js +11 -0
- package/dist/assets/{mermaid-VLURNSYL-C4UDY296.js → mermaid-VLURNSYL-BAygRTK6.js} +7 -7
- package/dist/assets/{mermaid.core-CRNTw-K2.js → mermaid.core-bwWKwscf.js} +5 -5
- package/dist/assets/{mindmap-definition-VGOIOE7T-Dns6Jp-h.js → mindmap-definition-VGOIOE7T-DmkSZj5s.js} +1 -1
- package/dist/assets/module-DUSXqJtA.js +3 -0
- package/dist/assets/{onedrive-picker-ClfxORZE.js → onedrive-picker-CyXOFDsr.js} +1 -1
- package/dist/assets/{pdf-viewer-BSApg-uG.js → pdf-viewer-BSy3edho.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-B8Jsapz3.js → pieDiagram-ADFJNKIX-BoqRK1Nj.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-C-kQhqve.js → quadrantDiagram-AYHSOK5B-iVG56kyl.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-CCFa12OF.js → requirementDiagram-UZGBJVZJ-BlfhbQSa.js} +1 -1
- package/dist/assets/sankeyDiagram-TZEHDZUN-CIqchrnr.js +10 -0
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6sTQliE.js → sequenceDiagram-WL72ISMW-D98Lehfv.js} +1 -1
- package/dist/assets/{shiki-highlighter-runtime-D7okHLco.js → shiki-highlighter-runtime-CUsH9pAI.js} +1 -1
- package/dist/assets/stateDiagram-FKZM4ZOC-DKCmtDHk.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BExRj50s.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-DZBb9YJX.js → timeline-definition-IT6M3QCI-DeDxHecT.js} +1 -1
- package/dist/assets/treemap-GDKQZRPO-DIQh1NSx.js +160 -0
- package/dist/assets/useQuickActionButtonBehavior-BpISdruD.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-BhTbi7nd.js → xychartDiagram-PRI3JC2R-DeAMabcI.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +8 -8
- package/dist/assets/ApplicationLevel_Toolbar-BddtfgIS.js +0 -1
- package/dist/assets/ChartEmptyState-lsMuirLh.js +0 -1
- package/dist/assets/ChartView-BTIzMUoU.js +0 -56
- package/dist/assets/architectureDiagram-VXUJARFQ-DTNeQb21.js +0 -36
- package/dist/assets/channel-DlvOdQcG.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-CJonpGbc.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CJonpGbc.js +0 -1
- package/dist/assets/clone-B5BftoQk.js +0 -1
- package/dist/assets/code-block-IT6T5CEO-rvNI7Npg.js +0 -3
- package/dist/assets/cose-bilkent-S5V4N54A-Bs72jpo-.js +0 -1
- package/dist/assets/dagre-6UL2VRFP-e0N82ZeJ.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-Wp6Xds16.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-DrkkEGhC.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-C3M-VMYn.js +0 -24
- package/dist/assets/flows-actors-graph-runtime-C8pD81-m.js +0 -1
- package/dist/assets/ganttDiagram-JELNMOA3-CroPqWYF.js +0 -267
- package/dist/assets/gitGraphDiagram-V2S2FVAM-DC9FCbno.js +0 -65
- package/dist/assets/index-Cn1WDMib.js +0 -1
- package/dist/assets/index-D2Lcurso.js +0 -994
- package/dist/assets/index-nHF1ekZC.css +0 -1
- package/dist/assets/index-wtSklh0n.js +0 -367
- package/dist/assets/infoDiagram-HS3SLOUP-BumgayY_.js +0 -2
- package/dist/assets/sankeyDiagram-TZEHDZUN-COr9DFuT.js +0 -10
- package/dist/assets/stateDiagram-FKZM4ZOC-Dpg3xi0D.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CK1yFthu.js +0 -1
- package/dist/assets/treemap-GDKQZRPO-Oo1I1edJ.js +0 -160
- package/dist/assets/x-CHMqFUz-.js +0 -21
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{aM as bT,r as Ht,rg as Ke,nS as Cs,In as wT,i5 as Gl,vI as K_,vJ as Q_,Dn as TT,Io as CT,xn as MT,ub as AT,zZ as Va,Ip as Bp,Iq as Nr,Ir as st,j as oi,aO as DT,ac as IT,u as Np,F as LT,xt as PT,uu as RT,tO as ET,h2 as kT,c as OT}from"./index-D2Lcurso.js";import{u as BT,a as NT,C as zT}from"./ChartEmptyState-lsMuirLh.js";function VT(r){return r.chartDefinition}function zp(r,t){const e=wT(r.valueType).safeParse(t);return e.success?e.data:void 0}function FT(r){const{binding:t,liveAppScopeContext:e,explicitContextResourceIdentifiers:n,urlParamValues:i}=r;switch(t.source){case Cs.APP_SCOPE:return t.contextKey?e?.[t.contextKey]:void 0;case Cs.PARENT_CONTEXT:return t.contextKey?n?.[t.contextKey]:void 0;case Cs.URL_PARAM:return t.contextKey?i?.[t.contextKey]:void 0;case Cs.FIXED_VALUE:return t.value}}function Vp(r){const t={},e=new Map((r.chartDefinition.inputs??[]).map(n=>[n.ref,n]));for(const n of r.chartDefinition.inputs??[])n.defaultValue!==void 0&&(t[n.ref]=n.defaultValue);for(const n of r.inputBindings??[]){const i=e.get(n.inputRef);if(!i)continue;const a=FT({binding:n,liveAppScopeContext:r.liveAppScopeContext,explicitContextResourceIdentifiers:r.explicitContextResourceIdentifiers,urlParamValues:r.urlParamValues});if(a===void 0)continue;const o=zp(i,a);o!==void 0&&(t[i.ref]=o)}for(const[n,i]of Object.entries(r.explicitInputs??{})){const a=e.get(n);if(!a)continue;const o=zp(a,i);o!==void 0&&(t[n]=o)}return Object.keys(t).length>0?t:void 0}function GT(r){const t=Ke.buildInitiatorIds({userId:r.appScope?.currentUserId,organizationId:r.appScope?.currentOrganizationId,applicationId:r.appScope?.currentApplicationId,anonymousUserId:r.appScope?.currentAnonymousUserId}),e=r.appScope?.buildContextResourceIdentifiers?.()??{},n=Ke.filterCustomScopeContextResourceIdentifiers(e),i=r.surfaceDefinition?Ke.getAllowedViewBindingKeys({primaryScope:r.surfaceDefinition.primaryScope,parentResourcesRequirements:r.surfaceDefinition.parentResourcesRequirements,additionalResourceRequirements:r.surfaceDefinition.additionalResourceRequirements}):void 0;if(r.runtimeDescriptor){const l=r.surfaceDefinition?Ke.resolveViewContextResourceIdentifiers({surfaceName:"ChartView",surfaceRef:r.runtimeDescriptor.identity.insertedViewRef,primaryScope:r.surfaceDefinition.primaryScope,parentResourcesRequirements:r.surfaceDefinition.parentResourcesRequirements,additionalResourceRequirements:r.surfaceDefinition.additionalResourceRequirements,primaryScopeContext:Ke.primaryScopeToContextIdentifiers(t,r.surfaceDefinition.primaryScope),customScopeContext:n,explicitContextResourceIdentifiers:Ke.scopeContextToBindingContract(r.runtimeDescriptor.contextResourceIdentifiers,i??new Set)}):Ke.mergeContextResourceIdentifiers(n,r.runtimeDescriptor.contextResourceIdentifiers),u=Vp({chartDefinition:r.runtimeDescriptor.chartDefinition,inputBindings:r.surfaceDefinition?.inputBindings,liveAppScopeContext:e,explicitContextResourceIdentifiers:l,explicitInputs:{...r.runtimeDescriptor.resolvedInputs??{},...r.explicitInputs??{}},urlParamValues:r.urlParamValues});return{chartDefinition:r.runtimeDescriptor.chartDefinition,executionChartRef:r.runtimeDescriptor.executionChartRef,contextResourceIdentifiers:l,resolvedInputs:u}}const a=r.surfaceDefinition,o=r.chartDefinition??(a?VT(a):void 0);if(!o)return;const s=a?Ke.resolveViewContextResourceIdentifiers({surfaceName:"ChartView",surfaceRef:a.ref,primaryScope:a.primaryScope,parentResourcesRequirements:a.parentResourcesRequirements,additionalResourceRequirements:a.additionalResourceRequirements,primaryScopeContext:Ke.primaryScopeToContextIdentifiers(t,a.primaryScope),customScopeContext:n,explicitContextResourceIdentifiers:Ke.scopeContextToBindingContract(r.explicitContextResourceIdentifiers,i??new Set)}):Ke.mergeContextResourceIdentifiers(n,r.explicitContextResourceIdentifiers);return{chartDefinition:o,executionChartRef:o.ref,contextResourceIdentifiers:s,resolvedInputs:Vp({chartDefinition:o,inputBindings:a?.inputBindings,liveAppScopeContext:e,explicitContextResourceIdentifiers:s,explicitInputs:r.explicitInputs,urlParamValues:r.urlParamValues})}}function HT(r){const t=bT();return Ht.useMemo(()=>GT({...r,appScope:t}),[r.runtimeDescriptor,r.surfaceDefinition,r.chartDefinition,r.explicitContextResourceIdentifiers,r.explicitInputs,r.urlParamValues,t,t?.currentUserId,t?.currentOrganizationId,t?.currentApplicationId,t?.currentAnonymousUserId])}/*! *****************************************************************************
|
|
2
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
-
|
|
4
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
-
purpose with or without fee is hereby granted.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */var oc=function(r,t){return oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},oc(r,t)};function B(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");oc(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var WT=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),UT=(function(){function r(){this.browser=new WT,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 r})(),ct=new UT;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ct.wxa=!0,ct.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ct.worker=!0:!ct.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ct.node=!0,ct.svgSupported=!0):YT(navigator.userAgent,ct);function YT(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),i&&(e.ie=!0,e.version=i[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var Xv=12,ZT="sans-serif",Tn=Xv+"px "+ZT,XT=20,$T=100,qT="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function KT(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var n=String.fromCharCode(e+32),i=(r.charCodeAt(e)-XT)/$T;t[n]=i}return t}var QT=KT(qT),or={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,n){if(!r){var i=or.createCanvas();r=i&&i.getContext("2d")}if(r)return t!==n&&(t=r.font=n||Tn),r.measureText(e);e=e||"",n=n||Tn;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Xv,s=0;if(n.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=QT[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var n=new Image;return n.onload=t,n.onerror=e,n.src=r,n}},j_=Cn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),J_=Cn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),hs=Object.prototype.toString,ku=Array.prototype,jT=ku.forEach,JT=ku.filter,$v=ku.slice,tC=ku.map,Fp=function(){}.constructor,Ms=Fp?Fp.prototype:null,qv="__proto__",eC=2311;function tS(){return eC++}function Kv(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function J(r){if(r==null||typeof r!="object")return r;var t=r,e=hs.call(r);if(e==="[object Array]"){if(!bo(r)){t=[];for(var n=0,i=r.length;n<i;n++)t[n]=J(r[n])}}else if(J_[e]){if(!bo(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var n=0,i=r.length;n<i;n++)t[n]=r[n]}}}else if(!j_[e]&&!bo(r)&&!ma(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==qv&&(t[o]=J(r[o]))}return t}function ft(r,t,e){if(!j(t)||!j(r))return e?J(t):r;for(var n in t)if(t.hasOwnProperty(n)&&n!==qv){var i=r[n],a=t[n];j(a)&&j(i)&&!H(a)&&!H(i)&&!ma(a)&&!ma(i)&&!Gp(a)&&!Gp(i)&&!bo(a)&&!bo(i)?ft(i,a,e):(e||!(n in r))&&(r[n]=J(t[n]))}return r}function F(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==qv&&(r[e]=t[e]);return r}function gt(r,t,e){for(var n=Pt(t),i=0,a=n.length;i<a;i++){var o=n[i];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function dt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e}return-1}function rC(r,t){var e=r.prototype;function n(){}n.prototype=t.prototype,r.prototype=new n;for(var i in e)e.hasOwnProperty(i)&&(r.prototype[i]=e[i]);r.prototype.constructor=r,r.superClass=t}function fe(r,t,e){if(r="prototype"in r?r.prototype:r,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"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else gt(r,t,e)}function be(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function M(r,t,e){if(r&&t)if(r.forEach&&r.forEach===jT)r.forEach(t,e);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)t.call(e,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function U(r,t,e){if(!r)return[];if(!t)return Qv(r);if(r.map&&r.map===tC)return r.map(t,e);for(var n=[],i=0,a=r.length;i<a;i++)n.push(t.call(e,r[i],i,r));return n}function Cn(r,t,e,n){if(r&&t){for(var i=0,a=r.length;i<a;i++)e=t.call(n,e,r[i],i,r);return e}}function kt(r,t,e){if(!r)return[];if(!t)return Qv(r);if(r.filter&&r.filter===JT)return r.filter(t,e);for(var n=[],i=0,a=r.length;i<a;i++)t.call(e,r[i],i,r)&&n.push(r[i]);return n}function eS(r,t,e){if(r&&t){for(var n=0,i=r.length;n<i;n++)if(t.call(e,r[n],n,r))return r[n]}}function Pt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function nC(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return function(){return r.apply(t,e.concat($v.call(arguments)))}}var Y=Ms&&Q(Ms.bind)?Ms.call.bind(Ms.bind):nC;function at(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat($v.call(arguments)))}}function H(r){return Array.isArray?Array.isArray(r):hs.call(r)==="[object Array]"}function Q(r){return typeof r=="function"}function X(r){return typeof r=="string"}function sc(r){return hs.call(r)==="[object String]"}function xt(r){return typeof r=="number"}function j(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Gp(r){return!!j_[hs.call(r)]}function we(r){return!!J_[hs.call(r)]}function ma(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Ou(r){return r.colorStops!=null}function iC(r){return r.image!=null}function Wr(r){return r!==r}function Xr(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,n=r.length;e<n;e++)if(r[e]!=null)return r[e]}function et(r,t){return r??t}function _n(r,t,e){return r??t??e}function Qv(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return $v.apply(r,t)}function Bu(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function We(r,t){if(!r)throw new Error(t)}function xr(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var rS="__ec_primitive__";function Hl(r){r[rS]=!0}function bo(r){return r[rS]}var aC=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return Pt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},r})(),nS=typeof Map=="function";function oC(){return nS?new Map:new aC}var sC=(function(){function r(t){var e=H(t);this.data=oC();var n=this;t instanceof r?t.each(i):t&&M(t,i);function i(a,o){e?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(n,i){t.call(e,n,i)})},r.prototype.keys=function(){var t=this.data.keys();return nS?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function it(r){return new sC(r)}function iS(r,t){for(var e=new r.constructor(r.length+t.length),n=0;n<r.length;n++)e[n]=r[n];for(var i=r.length,n=0;n<t.length;n++)e[n+i]=t[n];return e}function Nu(r,t){var e;if(Object.create)e=Object.create(r);else{var n=function(){};n.prototype=r,e=new n}return t&&F(e,t),e}function aS(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function nr(r,t){return r.hasOwnProperty(t)}function re(){}var lC=180/Math.PI;function La(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function uC(r,t){return r[0]=t[0],r[1]=t[1],r}function fC(r){return[r[0],r[1]]}function Hp(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function oS(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function hC(r){return Math.sqrt(cC(r))}function cC(r){return r[0]*r[0]+r[1]*r[1]}function gf(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function jv(r,t){var e=hC(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function lc(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var uc=lc;function vC(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var va=vC;function yf(r,t,e,n){return r[0]=t[0]+n*(e[0]-t[0]),r[1]=t[1]+n*(e[1]-t[1]),r}function pe(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function oa(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function sa(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var zi=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),dC=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new zi(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(a,o,t),this.handler.dispatchToElement(new zi(e,t),"drag",t.event);var s=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new zi(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new zi(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new zi(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new zi(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),Ze=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),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:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,f=a[t][u];return f&&f.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==e&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},r.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.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,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=e[o-1],l=i.length,u=0;u<l;u++){var f=i[u];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,e[0]);break;case 2:f.h.call(s,e[0],e[1]);break;default:f.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),pC=Math.log(2);function fc(r,t,e,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/pC);return r[e][l]}for(var u=n|1<<e,f=e+1;n&1<<f;)f++;for(var h=0,v=0,c=0;v<s;v++){var d=1<<v;d&i||(h+=(c%2?-1:1)*r[e][v]*fc(r,t-1,f,u,i|d,a),c++)}return a[o]=h,h}function Wp(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],n={},i=fc(e,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)*fc(e,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,f){var h=u*a[6]+f*a[7]+1;l[0]=(u*a[0]+f*a[1]+a[2])/h,l[1]=(u*a[3]+f*a[4]+a[5])/h}}}var Wl="___zrEVENTSAVED",mf=[];function gC(r,t,e,n,i){return hc(mf,t,n,i,!0)&&hc(r,e,mf[0],mf[1])}function yC(r,t){r&&e(r),t&&e(t);function e(n){var i=n[Wl];i&&(i.clearMarkers&&i.clearMarkers(),delete n[Wl])}}function hc(r,t,e,n,i){if(t.getBoundingClientRect&&ct.domSupported&&!sS(t)){var a=t[Wl]||(t[Wl]={}),o=mC(t,a),s=_C(o,a,i);if(s)return s(r,e,n),!0}return!1}function mC(r,t){var e=t.markers;if(e)return e;e=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;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){M(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function _C(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&a&&v===a[h]&&c===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=e?Wp(s,o):Wp(o,s))}function sS(r){return r.nodeName.toUpperCase()==="CANVAS"}var SC=/([&<>"'])/g,xC={"&":"&","<":"<",">":">",'"':""","'":"'"};function _e(r){return r==null?"":(r+"").replace(SC,function(t,e){return xC[e]})}var bC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_f=[],wC=ct.browser.firefox&&+ct.browser.version.split(".")[0]<39;function cc(r,t,e,n){return e=e||{},n?Up(r,t,e):wC&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Up(r,t,e),e}function Up(r,t,e){if(ct.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(sS(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(hc(_f,r,n,i)){e.zrX=_f[0],e.zrY=_f[1];return}}e.zrX=e.zrY=0}function Jv(r){return r||window.event}function Ee(r,t,e){if(t=Jv(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&&cc(r,o,t,e)}else{cc(r,t,t,e);var a=TC(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&bC.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function TC(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function vc(r,t,e,n){r.addEventListener(t,e,n)}function CC(r,t,e,n){r.removeEventListener(t,e,n)}var $r=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Yp(r){return r.which===2||r.which===3}var MC=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=cc(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in Sf)if(Sf.hasOwnProperty(e)){var n=Sf[e](this._track,t);if(n)return n}},r})();function Zp(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function AC(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Sf={pinch:function(r,t){var e=r.length;if(e){var n=(r[e-1]||{}).points,i=(r[e-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=Zp(n)/Zp(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=AC(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Fe(){return[1,0,0,1,0,0]}function td(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function ed(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function wo(r,t,e){var n=t[0]*e[0]+t[2]*e[1],i=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function _a(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function zu(r,t,e,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],f=Math.sin(e),h=Math.cos(e);return r[0]=i*h+s*f,r[1]=-i*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-n[0])+f*(u-n[1])+n[0],r[5]=h*(u-n[1])-f*(o-n[0])+n[1],r}function lS(r,t,e){var n=e[0],i=e[1];return r[0]=t[0]*n,r[1]=t[1]*i,r[2]=t[2]*n,r[3]=t[3]*i,r[4]=t[4]*n,r[5]=t[5]*i,r}function Pa(r,t){var e=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-e*s)*l,r):null}var ht=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},r.lerp=function(t,e,n,i){var a=1-i;t.x=a*e.x+i*n.x,t.y=a*e.y+i*n.y},r})(),hi=Math.min,la=Math.max,dc=Math.abs,Xp=["x","y"],DC=["width","height"],Bn=new ht,Nn=new ht,zn=new ht,Vn=new ht,Ce=uS(),vo=Ce.minTv,pc=Ce.maxTv,To=[0,0],ot=(function(){function r(t,e,n,i){r.set(this,t,e,n,i)}return r.set=function(t,e,n,i,a){return i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),t.x=e,t.y=n,t.width=i,t.height=a,t},r.prototype.union=function(t){var e=hi(t.x,this.x),n=hi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=la(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=la(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,a=Fe();return _a(a,a,[-e.x,-e.y]),lS(a,a,[n,i]),_a(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e,n){return r.intersect(this,t,e,n)},r.intersect=function(t,e,n,i){n&&ht.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||!e)return!1;t instanceof r||(t=r.set(IC,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(LC,e.x,e.y,e.width,e.height));var s=!!n;Ce.reset(i,s);var l=Ce.touchThreshold,u=t.x+l,f=t.x+t.width-l,h=t.y+l,v=t.y+t.height-l,c=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>f||h>v||c>d||p>g)return!1;var y=!(f<c||d<u||v<p||g<h);return(s||a)&&(To[0]=1/0,To[1]=0,$p(u,f,c,d,0,s,a,o),$p(h,v,p,g,1,s,a,o),s&&ht.copy(n,y?Ce.useDir?Ce.dirMinTv:vo:pc)),y},r.contain=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);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=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.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}Bn.x=zn.x=e.x,Bn.y=Vn.y=e.y,Nn.x=Vn.x=e.x+e.width,Nn.y=zn.y=e.y+e.height,Bn.transform(n),Vn.transform(n),Nn.transform(n),zn.transform(n),t.x=hi(Bn.x,Nn.x,zn.x,Vn.x),t.y=hi(Bn.y,Nn.y,zn.y,Vn.y);var l=la(Bn.x,Nn.x,zn.x,Vn.x),u=la(Bn.y,Nn.y,zn.y,Vn.y);t.width=l-t.x,t.height=u-t.y},r})(),IC=new ot(0,0,0,0),LC=new ot(0,0,0,0);function $p(r,t,e,n,i,a,o,s){var l=dc(t-e),u=dc(n-r),f=hi(l,u),h=Xp[i],v=Xp[1-i],c=DC[i];t<e||n<r?l<u?(a&&(pc[h]=-l),s&&(o[h]=t,o[c]=0)):(a&&(pc[h]=u),s&&(o[h]=r,o[c]=0)):(o&&(o[h]=la(r,e),o[c]=hi(t,n)-o[h]),a&&(f<To[0]||Ce.useDir)&&(To[0]=hi(f,To[0]),(l<u||!Ce.bidirectional)&&(vo[h]=l,vo[v]=0,Ce.useDir&&Ce.calcDirMTV()),(l>=u||!Ce.bidirectional)&&(vo[h]=-u,vo[v]=0,Ce.useDir&&Ce.calcDirMTV())))}function uS(){var r=0,t=new ht,e=new ht,n={minTv:new ht,maxTv:new ht,useDir:!1,dirMinTv:new ht,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=la(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),e.copy(n.minTv),r=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),f=l*a.y+u*a.x;if(i(f)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,i(e.x)&&i(e.y)){o.set(0,0);return}(n.bidirectional||t.dot(e)>0)&&e.len()<o.len()&&o.copy(e)}};function i(a){return dc(a)<1e-10}return n}var fS="silent";function PC(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:RC}}function RC(){$r(this.event)}var EC=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(Ze),Fa=(function(){function r(t,e){this.x=t,this.y=e}return r})(),kC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],xf=new ot(0,0,0,0),hS=(function(r){B(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Fa(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new EC,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new dC(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(M(kC,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=cS(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 Fa(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Fa(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];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(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=PC(n,e,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(e,n,i){var a=this.storage.getDisplayList(),o=new Fa(e,n);if(qp(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ot(e-u,n-u,l,l),h=a.length-1;h>=0;h--){var v=a[h];v!==i&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(xf.copy(v.getBoundingRect()),v.transform&&xf.applyTransform(v.transform),xf.intersect(f)&&s.push(v))}if(s.length)for(var c=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=c)for(var y=0;y<p;y+=d){var m=e+g*Math.cos(y),_=n+g*Math.sin(y);if(qp(s,o,m,_,i),o.target)return o}}return o},t.prototype.processGesture=function(e,n){this._gestureMgr||(this._gestureMgr=new MC);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;e.gestureEvent=o;var s=new Fa;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(Ze);M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){hS.prototype[r]=function(t){var e=t.zrX,n=t.zrY,i=cS(this,e,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(e,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||uc(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function OC(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?fS:!0}return!1}function qp(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=OC(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==fS)){t.target=o;break}}}function cS(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var vS=32,Ga=7;function BC(r){for(var t=0;r>=vS;)t|=r&1,r>>=1;return r+t}function Kp(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i<e&&n(r[i],r[i-1])<0;)i++;NC(r,t,i)}else for(;i<e&&n(r[i],r[i-1])>=0;)i++;return i-t}function NC(r,t,e){for(e--;t<e;){var n=r[t];r[t++]=r[e],r[e--]=n}}function Qp(r,t,e,n,i){for(n===t&&n++;n<e;n++){for(var a=r[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function bf(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])>0){for(s=n-i;l<s&&a(r,t[e+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(r,t[e+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 f=o+(l-o>>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function wf(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])<0){for(s=i+1;l<s&&a(r,t[e+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(r,t[e+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 f=o+(l-o>>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function zC(r,t){var e=Ga,n,i,a=0,o=[];n=[],i=[];function s(c,d){n[a]=c,i[a]=d,a+=1}function l(){for(;a>1;){var c=a-2;if(c>=1&&i[c-1]<=i[c]+i[c+1]||c>=2&&i[c-2]<=i[c]+i[c-1])i[c-1]<i[c+1]&&c--;else if(i[c]>i[c+1])break;f(c)}}function u(){for(;a>1;){var c=a-2;c>0&&i[c-1]<i[c+1]&&c--,f(c)}}function f(c){var d=n[c],p=i[c],g=n[c+1],y=i[c+1];i[c]=p+y,c===a-3&&(n[c+1]=n[c+2],i[c+1]=i[c+2]),a--;var m=wf(r[g],r,d,p,0,t);d+=m,p-=m,p!==0&&(y=bf(r[d+p-1],r,g,y,y-1,t),y!==0&&(p<=y?h(d,p,g,y):v(d,p,g,y)))}function h(c,d,p,g){var y=0;for(y=0;y<d;y++)o[y]=r[c+y];var m=0,_=p,S=c;if(r[S++]=r[_++],--g===0){for(y=0;y<d;y++)r[S+y]=o[m+y];return}if(d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m];return}for(var b=e,x,w,T;;){x=0,w=0,T=!1;do if(t(r[_],o[m])<0){if(r[S++]=r[_++],w++,x=0,--g===0){T=!0;break}}else if(r[S++]=o[m++],x++,w=0,--d===1){T=!0;break}while((x|w)<b);if(T)break;do{if(x=wf(r[_],o,m,d,0,t),x!==0){for(y=0;y<x;y++)r[S+y]=o[m+y];if(S+=x,m+=x,d-=x,d<=1){T=!0;break}}if(r[S++]=r[_++],--g===0){T=!0;break}if(w=bf(o[m],r,_,g,0,t),w!==0){for(y=0;y<w;y++)r[S+y]=r[_+y];if(S+=w,_+=w,g-=w,g===0){T=!0;break}}if(r[S++]=o[m++],--d===1){T=!0;break}b--}while(x>=Ga||w>=Ga);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(y=0;y<g;y++)r[S+y]=r[_+y];r[S+g]=o[m]}else{if(d===0)throw new Error;for(y=0;y<d;y++)r[S+y]=o[m+y]}}function v(c,d,p,g){var y=0;for(y=0;y<g;y++)o[y]=r[p+y];var m=c+d-1,_=g-1,S=p+g-1,b=0,x=0;if(r[S--]=r[m--],--d===0){for(b=S-(g-1),y=0;y<g;y++)r[b+y]=o[y];return}if(g===1){for(S-=d,m-=d,x=S+1,b=m+1,y=d-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=e;;){var T=0,D=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,D=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],D++,T=0,--g===1){A=!0;break}while((T|D)<w);if(A)break;do{if(T=d-wf(o[_],r,c,d,d-1,t),T!==0){for(S-=T,m-=T,d-=T,x=S+1,b=m+1,y=T-1;y>=0;y--)r[x+y]=r[b+y];if(d===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(D=g-bf(r[m],o,0,g,g-1,t),D!==0){for(S-=D,_-=D,g-=D,x=S+1,b=_+1,y=0;y<D;y++)r[x+y]=o[b+y];if(g<=1){A=!0;break}}if(r[S--]=r[m--],--d===0){A=!0;break}w--}while(T>=Ga||D>=Ga);if(A)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(S-=d,m-=d,x=S+1,b=m+1,y=d-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;y<g;y++)r[b+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Ml(r,t,e,n){e||(e=0),n||(n=r.length);var i=n-e;if(!(i<2)){var a=0;if(i<vS){a=Kp(r,e,n,t),Qp(r,e,n,e+a,t);return}var o=zC(r,t),s=BC(i);do{if(a=Kp(r,e,n,t),a<s){var l=i;l>s&&(l=s),Qp(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var Me=1,po=2,ia=4,jp=!1;function Tf(){jp||(jp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Jp(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var VC=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Jp}return r.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(e),n},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,a=e.length;i<a;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,Ml(n,Jp)},r.prototype._updateAndAddDisplayable=function(t,e,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),a=e&&e.length,o=0,s=t.__clipPaths;if(!t.ignoreClip&&(a||i)){if(s||(s=t.__clipPaths=[]),a)for(var l=0;l<e.length;l++)s[o++]=e[l];for(var u=i,f=t;u;)u.parent=f,u.updateTransform(),s[o++]=u,f=u,u=u.getClipPath()}if(s&&(s.length=o),t.childrenRef){for(var h=t.childrenRef(),v=0;v<h.length;v++){var c=h[v];t.__dirty&&(c.__dirty|=Me),this._updateAndAddDisplayable(c,s,n)}t.__dirty=0}else{var d=t;isNaN(d.z)&&(Tf(),d.z=0),isNaN(d.z2)&&(Tf(),d.z2=0),isNaN(d.zlevel)&&(Tf(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var p=t.getDecalElement&&t.getDecalElement();p&&this._updateAndAddDisplayable(p,s,n);var g=t.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,n);var y=t.getTextContent();y&&this._updateAndAddDisplayable(y,s,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);return}var i=dt(this._roots,t);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),Ul;Ul=ct.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Co={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Co.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Co.bounceIn(r*2)*.5:Co.bounceOut(r*2-1)*.5+.5}},As=Math.pow,Sn=Math.sqrt,Yl=1e-8,dS=1e-4,tg=Sn(3),Ds=1/3,_r=La(),Be=La(),da=La();function cn(r){return r>-Yl&&r<Yl}function pS(r){return r>Yl||r<-Yl}function te(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function eg(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function Zl(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(cn(f)&&cn(h))if(cn(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[c++]=d)}else{var p=h*h-4*f*v;if(cn(p)){var g=h/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(a[c++]=d),y>=0&&y<=1&&(a[c++]=y)}else if(p>0){var m=Sn(p),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-As(-_,Ds):_=As(_,Ds),S<0?S=-As(-S,Ds):S=As(S,Ds);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[c++]=d)}else{var b=(2*f*s-3*o*h)/(2*Sn(f*f*f)),x=Math.acos(b)/3,w=Sn(f),T=Math.cos(x),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+tg*Math.sin(x)))/(3*o),D=(-s+w*(T-tg*Math.sin(x)))/(3*o);d>=0&&d<=1&&(a[c++]=d),y>=0&&y<=1&&(a[c++]=y),D>=0&&D<=1&&(a[c++]=D)}}return c}function gS(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(cn(o)){if(pS(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(cn(f))i[0]=-a/(2*o);else if(f>0){var h=Sn(f),u=(-a+h)/(2*o),v=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function Xl(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,l=(n-e)*i+e,u=(s-o)*i+o,f=(l-s)*i+s,h=(f-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=n}function FC(r,t,e,n,i,a,o,s,l,u,f){var h,v=.005,c=1/0,d,p,g,y;_r[0]=l,_r[1]=u;for(var m=0;m<1;m+=.05)Be[0]=te(r,e,i,o,m),Be[1]=te(t,n,a,s,m),g=va(_r,Be),g<c&&(h=m,c=g);c=1/0;for(var _=0;_<32&&!(v<dS);_++)d=h-v,p=h+v,Be[0]=te(r,e,i,o,d),Be[1]=te(t,n,a,s,d),g=va(Be,_r),d>=0&&g<c?(h=d,c=g):(da[0]=te(r,e,i,o,p),da[1]=te(t,n,a,s,p),y=va(da,_r),p<=1&&y<c?(h=p,c=y):v*=.5);return Sn(c)}function GC(r,t,e,n,i,a,o,s,l){for(var u=r,f=t,h=0,v=1/l,c=1;c<=l;c++){var d=c*v,p=te(r,e,i,o,d),g=te(t,n,a,s,d),y=p-u,m=g-f;h+=Math.sqrt(y*y+m*m),u=p,f=g}return h}function Se(r,t,e,n){var i=1-n;return i*(i*r+2*n*t)+n*n*e}function rg(r,t,e,n){return 2*((1-n)*(t-r)+n*(e-t))}function HC(r,t,e,n,i){var a=r-2*t+e,o=2*(t-r),s=r-n,l=0;if(cn(a)){if(pS(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(cn(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var h=Sn(f),u=(-o+h)/(2*a),v=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),v>=0&&v<=1&&(i[l++]=v)}}return l}function yS(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function $l(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function WC(r,t,e,n,i,a,o,s,l){var u,f=.005,h=1/0;_r[0]=o,_r[1]=s;for(var v=0;v<1;v+=.05){Be[0]=Se(r,e,i,v),Be[1]=Se(t,n,a,v);var c=va(_r,Be);c<h&&(u=v,h=c)}h=1/0;for(var d=0;d<32&&!(f<dS);d++){var p=u-f,g=u+f;Be[0]=Se(r,e,i,p),Be[1]=Se(t,n,a,p);var c=va(Be,_r);if(p>=0&&c<h)u=p,h=c;else{da[0]=Se(r,e,i,g),da[1]=Se(t,n,a,g);var y=va(da,_r);g<=1&&y<h?(u=g,h=y):f*=.5}}return Sn(h)}function UC(r,t,e,n,i,a,o){for(var s=r,l=t,u=0,f=1/o,h=1;h<=o;h++){var v=h*f,c=Se(r,e,i,v),d=Se(t,n,a,v),p=c-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=c,l=d}return u}var YC=/cubic-bezier\(([0-9,\.e ]+)\)/;function mS(r){var t=r&&YC.exec(r);if(t){var e=t[1].split(","),n=+xr(e[0]),i=+xr(e[1]),a=+xr(e[2]),o=+xr(e[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Zl(0,n,a,1,l,s)&&te(0,i,o,1,s[0])}}}var ZC=(function(){function r(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||re,this.ondestroy=t.ondestroy||re,this.onrestart=t.onrestart||re,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;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},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Q(t)?t:Co[t]||mS(t)},r})(),_S=(function(){function r(t){this.value=t}return r})(),XC=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new _S(t);return this.insertEntry(e),e},r.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++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Sa=(function(){function r(t){this._list=new XC,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){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=e:s=new _S(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),ng={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 ir(r){return r=Math.round(r),r<0?0:r>255?255:r}function $C(r){return r=Math.round(r),r<0?0:r>360?360:r}function Bo(r){return r<0?0:r>1?1:r}function Cf(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ir(parseFloat(t)/100*255):ir(parseInt(t,10))}function mi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Bo(parseFloat(t)/100):Bo(parseFloat(t))}function Mf(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function vn(r,t,e){return r+(t-r)*e}function Re(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function gc(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var SS=new Sa(20),Is=null;function Vi(r,t){Is&&gc(Is,t),Is=SS.put(r,Is||t.slice())}function Ge(r,t){if(r){t=t||[];var e=SS.get(r);if(e)return gc(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in ng)return gc(t,ng[n]),Vi(r,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)){Re(t,0,0,0,1);return}return Re(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),Vi(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Re(t,0,0,0,1);return}return Re(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Vi(r,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(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Re(t,+u[0],+u[1],+u[2],1):Re(t,0,0,0,1);f=mi(u.pop());case"rgb":if(u.length>=3)return Re(t,Cf(u[0]),Cf(u[1]),Cf(u[2]),u.length===3?f:mi(u[3])),Vi(r,t),t;Re(t,0,0,0,1);return;case"hsla":if(u.length!==4){Re(t,0,0,0,1);return}return u[3]=mi(u[3]),yc(u,t),Vi(r,t),t;case"hsl":if(u.length!==3){Re(t,0,0,0,1);return}return yc(u,t),Vi(r,t),t;default:return}}Re(t,0,0,0,1)}}function yc(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=mi(r[1]),i=mi(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Re(t,ir(Mf(o,a,e+1/3)*255),ir(Mf(o,a,e)*255),ir(Mf(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function qC(r){if(r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,i=Math.min(t,e,n),a=Math.max(t,e,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 f=((a-t)/6+o/2)/o,h=((a-e)/6+o/2)/o,v=((a-n)/6+o/2)/o;t===a?l=v-h:e===a?l=1/3+f-v:n===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function mc(r,t){var e=Ge(r);if(e){for(var n=0;n<3;n++)t<0?e[n]=e[n]*(1-t)|0:e[n]=(255-e[n])*t+e[n]|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return Ur(e,e.length===4?"rgba":"rgb")}}function Af(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=t[i],s=t[a],l=n-i;return e[0]=ir(vn(o[0],s[0],l)),e[1]=ir(vn(o[1],s[1],l)),e[2]=ir(vn(o[2],s[2],l)),e[3]=Bo(vn(o[3],s[3],l)),e}}function KC(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ge(t[i]),s=Ge(t[a]),l=n-i,u=Ur([ir(vn(o[0],s[0],l)),ir(vn(o[1],s[1],l)),ir(vn(o[2],s[2],l)),Bo(vn(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function xn(r,t,e,n){var i=Ge(r);if(r)return i=qC(i),t!=null&&(i[0]=$C(Q(t)?t(i[0]):t)),e!=null&&(i[1]=mi(Q(e)?e(i[1]):e)),n!=null&&(i[2]=mi(Q(n)?n(i[2]):n)),Ur(yc(i),"rgba")}function xS(r,t){var e=Ge(r);if(e&&t!=null)return e[3]=Bo(t),Ur(e,"rgba")}function Ur(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function ql(r,t){var e=Ge(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var ig=new Sa(100);function ag(r){if(X(r)){var t=ig.get(r);return t||(t=mc(r,-.1),ig.put(r,t)),t}else if(Ou(r)){var e=F({},r);return e.colorStops=U(r.colorStops,function(n){return{offset:n.offset,color:mc(n.color,-.1)}}),e}return r}function QC(r){return r.type==="linear"}function jC(r){return r.type==="radial"}(function(){return ct.hasGlobalWindow&&Q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var _c=Array.prototype.slice;function zr(r,t,e){return(t-r)*e+r}function Df(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=zr(t[a],e[a],n);return r}function JC(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=zr(t[o][s],e[o][s],n)}return r}function Ls(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=t[a]+e[a]*n;return r}function og(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*n}return r}function tM(r,t){for(var e=r.length,n=t.length,i=e>n?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function eM(r,t,e){var n=r,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(e===1?i[l]:_c.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(e===1)isNaN(n[l])&&(n[l]=i[l]);else for(var f=0;f<u;f++)isNaN(n[l][f])&&(n[l][f]=i[l][f])}}function Al(r){if(be(r)){var t=r.length;if(be(r[0])){for(var e=[],n=0;n<t;n++)e.push(_c.call(r[n]));return e}return _c.call(r)}return r}function Dl(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function rM(r){return be(r&&r[0])?2:1}var Ps=0,Il=1,bS=2,go=3,Sc=4,xc=5,sg=6;function lg(r){return r===Sc||r===xc}function Rs(r){return r===Il||r===bS}var Ha=[0,0,0,0],nM=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=sg,l=e;if(be(e)){var u=rM(e);s=u,(u===1&&!xt(e[0])||u===2&&!xt(e[0][0]))&&(o=!0)}else if(xt(e)&&!Wr(e))s=Ps;else if(X(e))if(!isNaN(+e))s=Ps;else{var f=Ge(e);f&&(l=f,s=go)}else if(Ou(e)){var h=F({},l);h.colorStops=U(e.colorStops,function(c){return{offset:c.offset,color:Ge(c.color)}}),QC(e)?s=Sc:jC(e)&&(s=xc),l=h}a===0?this.valType=s:(s!==this.valType||s===sg)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:l,rawValue:e,percent:0};return n&&(v.easing=n,v.easingFunc=Q(n)?n:Co[n]||mS(n)),i.push(v),v},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Rs(i),u=lg(i),f=0;f<a;f++){var h=n[f],v=h.value,c=o.value;h.percent=h.time/t,s||(l&&f!==a-1?eM(v,c,i):u&&tM(v.colorStops,c.colorStops))}if(!s&&i!==xc&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var d=n[0].value,f=0;f<a;f++)i===Ps?n[f].additiveValue=n[f].value-d:i===go?n[f].additiveValue=Ls([],n[f].value,d,-1):Rs(i)&&(n[f].additiveValue=i===Il?Ls([],n[f].value,d,-1):og([],n[f].value,d,-1))}},r.prototype.step=function(t,e){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===go,f,h=this._lastFr,v=Math.min,c,d;if(s===1)c=d=o[0];else{if(e<0)f=0;else if(e<this._lastFrP){var p=v(h+1,s-1);for(f=p;f>=0&&!(o[f].percent<=e);f--);f=v(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>e);f++);f=v(f-1,s-2)}d=o[f+1],c=o[f]}if(c&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-c.percent,y=g===0?1:v((e-c.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=n?this._additiveValue:u?Ha:t[l];if((Rs(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?c.rawValue:d.rawValue;else if(Rs(a))a===Il?Df(m,c[i],d[i],y):JC(m,c[i],d[i],y);else if(lg(a)){var _=c[i],S=d[i],b=a===Sc;t[l]={type:b?"linear":"radial",x:zr(_.x,S.x,y),y:zr(_.y,S.y,y),colorStops:U(_.colorStops,function(w,T){var D=S.colorStops[T];return{offset:zr(w.offset,D.offset,y),color:Dl(Df([],w.color,D.color,y))}}),global:S.global},b?(t[l].x2=zr(_.x2,S.x2,y),t[l].y2=zr(_.y2,S.y2,y)):t[l].r=zr(_.r,S.r,y)}else if(u)Df(m,c[i],d[i],y),n||(t[l]=Dl(m));else{var x=zr(c[i],d[i],y);n?this._additiveValue=x:t[l]=x}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===Ps?t[n]=t[n]+i:e===go?(Ge(t[n],Ha),Ls(Ha,Ha,i,1),t[n]=Dl(Ha)):e===Il?Ls(t[n],t[n],i,1):e===bS&&og(t[n],t[n],i,1)},r})(),rd=(function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){Kv("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,Pt(e),n)},r.prototype.whenWithKeys=function(t,e,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 nM(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var h=f.keyframes,v=h[h.length-1];u=v&&v.value,f.valType===go&&u&&(u=Dl(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Al(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Al(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=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,f=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[f-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var v=new ZC({life:i,loop:this._loop,delay:this._delay||0,onframe:function(c){e._started=2;var d=e._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(e._target,c);var y=e._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](e._target,c)},ondestroy:function(){e._doneCallback()}});this._clip=v,this.animation&&this.animation.addClip(v),t&&v.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return U(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){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()&&(e?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},r.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var a=e[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=Al(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||Pt(t);for(var n=0;n<e.length;n++){var i=e[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())}}}},r})();function ua(){return new Date().getTime()}var iM=(function(r){B(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=ua()-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,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(Ul(n),!e._paused&&e.update())}Ul(n)},t.prototype.start=function(){this._running||(this._time=ua(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ua(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ua()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new rd(e,n.loop);return this.addAnimator(i),i},t})(Ze),aM=300,If=ct.domSupported,Lf=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=U(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}})(),ug={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},fg=!1;function bc(r){var t=r.pointerType;return t==="pen"||t==="touch"}function oM(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Pf(r){r&&(r.zrByTouch=!0)}function sM(r,t){return Ee(r.dom,new lM(r,t),!0)}function wS(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var lM=(function(){function r(t,e){this.stopPropagation=re,this.stopImmediatePropagation=re,this.preventDefault=re,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),tr={mousedown:function(r){r=Ee(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Ee(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Ee(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Ee(this.dom,r);var t=r.toElement||r.relatedTarget;wS(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){fg=!0,r=Ee(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){fg||(r=Ee(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Ee(this.dom,r),Pf(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),tr.mousemove.call(this,r),tr.mousedown.call(this,r)},touchmove:function(r){r=Ee(this.dom,r),Pf(r),this.handler.processGesture(r,"change"),tr.mousemove.call(this,r)},touchend:function(r){r=Ee(this.dom,r),Pf(r),this.handler.processGesture(r,"end"),tr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<aM&&tr.click.call(this,r)},pointerdown:function(r){tr.mousedown.call(this,r)},pointermove:function(r){bc(r)||tr.mousemove.call(this,r)},pointerup:function(r){tr.mouseup.call(this,r)},pointerout:function(r){bc(r)||tr.mouseout.call(this,r)}};M(["click","dblclick","contextmenu"],function(r){tr[r]=function(t){t=Ee(this.dom,t),this.trigger(r,t)}});var wc={pointermove:function(r){bc(r)||wc.mousemove.call(this,r)},pointerup:function(r){wc.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function uM(r,t){var e=t.domHandlers;ct.pointerEventsSupported?M(Lf.pointer,function(n){Ll(t,n,function(i){e[n].call(r,i)})}):(ct.touchEventsSupported&&M(Lf.touch,function(n){Ll(t,n,function(i){e[n].call(r,i),oM(t)})}),M(Lf.mouse,function(n){Ll(t,n,function(i){i=Jv(i),t.touching||e[n].call(r,i)})}))}function fM(r,t){ct.pointerEventsSupported?M(ug.pointer,e):ct.touchEventsSupported||M(ug.mouse,e);function e(n){function i(a){a=Jv(a),wS(r,a.target)||(a=sM(r,a),t.domHandlers[n].call(r,a))}Ll(t,n,i,{capture:!0})}}function Ll(r,t,e,n){r.mounted[t]=e,r.listenerOpts[t]=n,vc(r.domTarget,t,e,n)}function Rf(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&CC(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var hg=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),hM=(function(r){B(t,r);function t(e,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new hg(e,tr),If&&(i._globalHandlerScope=new hg(document,wc)),uM(i,i._localHandlerScope),i}return t.prototype.dispose=function(){Rf(this._localHandlerScope),If&&Rf(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,If&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var n=this._globalHandlerScope;e?fM(this,n):Rf(n)}},t})(Ze),TS=1;ct.hasGlobalWindow&&(TS=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Kl=TS,Tc=.4,Cc="#333",Mc="#ccc",cM="#eee",cg=td,vg=5e-5;function Fn(r){return r>vg||r<-vg}var Gn=[],Fi=[],Ef=Fe(),kf=Math.abs,ci=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Fn(this.rotation)||Fn(this.x)||Fn(this.y)||Fn(this.scaleX-1)||Fn(this.scaleY-1)||Fn(this.skewX)||Fn(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(cg(n),this.invTransform=null);return}n=n||Fe(),e?this.getLocalTransform(n):cg(n),t&&(e?wo(n,t,n):ed(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Gn);var n=Gn[0]<0?-1:1,i=Gn[1]<0?-1:1,a=((Gn[0]-n)*e+n)/Gn[0]||0,o=((Gn[1]-i)*e+i)/Gn[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Fe(),Pa(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=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),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Fe(),wo(Fi,t.invTransform,e),e=Fi);var n=this.originX,i=this.originY;(n||i)&&(Ef[4]=n,Ef[5]=i,wo(Fi,e,Ef),Fi[4]-=n,Fi[5]-=i,e=Fi),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&pe(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&pe(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&kf(t[0]-1)>1e-10&&kf(t[3]-1)>1e-10?Math.sqrt(kf(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Ac(this,t)},r.getLocalTransform=function(t,e){e=e||[];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,f=t.x,h=t.y,v=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,p=i+l;e[4]=-d*a-v*p*o,e[5]=-p*o-c*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=c*a,e[2]=v*o,u&&zu(e,e,u),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=(function(){var t=r.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})(),r})(),No=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Ac(r,t){for(var e=0;e<No.length;e++){var n=No[e];r[n]=t[n]}}function Cr(r){Es||(Es=new Sa(100)),r=r||Tn;var t=Es.get(r);return t||(t={font:r,strWidthCache:new Sa(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:or.measureText("国",r).width,asciiCharWidth:or.measureText("a",r).width},Es.put(r,t)),t}var Es;function vM(r){if(!(Of>=dg)){r=r||Tn;for(var t=[],e=+new Date,n=0;n<=127;n++)t[n]=or.measureText(String.fromCharCode(n),r).width;var i=+new Date-e;return i>16?Of=dg:i>2&&Of++,t}}var Of=0,dg=5;function CS(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=vM(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function Mr(r,t){var e=r.strWidthCache,n=e.get(t);return n==null&&(n=or.measureText(t,r.font).width,e.put(t,n)),n}function pg(r,t,e,n){var i=Mr(Cr(t),r),a=Vu(t),o=xa(0,i,e),s=_i(0,a,n),l=new ot(o,s,i,a);return l}function nd(r,t,e,n){var i=((r||"")+"").split(`
|
|
15
|
-
`),a=i.length;if(a===1)return pg(i[0],t,e,n);for(var o=new ot(0,0,0,0),s=0;s<i.length;s++){var l=pg(i[s],t,e,n);s===0?o.copy(l):o.union(l)}return o}function xa(r,t,e,n){return e==="right"?n?r+=t:r-=t:e==="center"&&(n?r+=t/2:r-=t/2),r}function _i(r,t,e,n){return e==="middle"?n?r+=t/2:r-=t/2:e==="bottom"&&(n?r+=t:r-=t),r}function Vu(r){return Cr(r).stWideCharWidth}function Dr(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function Ql(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(n instanceof Array)l+=Dr(n[0],e.width),u+=Dr(n[1],e.height),f=null,h=null;else switch(n){case"left":l-=i,u+=s,f="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Bf="__zr_normal__",Nf=No.concat(["ignore"]),dM=Cn(No,function(r,t){return r[t]=!0,r},{ignore:!1}),Gi={},pM=new ot(0,0,0,0),ks=[],Fu=(function(){function r(t){this.id=tS(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=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]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(e);var f=n.position!=null,h=n.autoOverflowArea,v=void 0;if((h||f)&&(v=pM,n.layoutRect?v.copy(n.layoutRect):v.copy(this.getBoundingRect()),i||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Gi,n,v):Ql(Gi,n,v),a.x=Gi.x,a.y=Gi.y,o=Gi.align,s=Gi.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var d=void 0,p=void 0;c==="center"?(d=v.width*.5,p=v.height*.5):(d=Dr(c[0],v.width),p=Dr(c[1],v.height)),u=!0,a.originX=-a.x+d+(i?0:v.x),a.originY=-a.y+p+(i?0:v.y)}}n.rotation!=null&&(a.rotation=n.rotation);var g=n.offset;g&&(a.x+=g[0],a.y+=g[1],u||(a.originX=-g[0],a.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var m=y.overflowRect=y.overflowRect||new ot(0,0,0,0);a.getLocalTransform(ks),Pa(ks,ks),ot.copy(m,v),m.applyTransform(ks)}else y.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,S=void 0,b=void 0,x=void 0;_&&this.canBeInsideText()?(S=n.insideFill,b=n.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),x=!0)):(S=n.outsideFill,b=n.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||b!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=b,y.autoStroke=x,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=Me,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Mc:Cc},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&Ge(e);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,Ur(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},F(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(j(t))for(var n=t,i=Pt(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==Bf)){var o=i.targetName,s=o?e[o]:e;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Nf)},r.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Bf,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===Bf,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(dt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){Kv("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(t,e,n,f),v&&v.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Me),u}}},r.prototype.useStates=function(t,e,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],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&i.push(f)}var h=i[o-1],v=!!(h&&h.hoverLayer||n);v&&this._toggleHoverLayerFlag(!0);var c=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,v),g&&g.useStates(t,e,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Me)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=dt(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=dt(i,t),o=dt(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i<t.length;i++){var a=t[i];F(e,a),a.textConfig&&(n=n||{},F(n,a.textConfig))}return n&&(e.textConfig=n),e},r.prototype._applyStateObj=function(t,e,n,i,a,o){var s=!(e&&i);e&&e.textConfig?(this.textConfig=F({},i?this.textConfig:n.textConfig),F(this.textConfig,e.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,f=0;f<Nf.length;f++){var h=Nf[f],v=a&&dM[h];e&&e[h]!=null?v?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&n[h]!=null&&(v?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var f=0;f<this.animators.length;f++){var c=this.animators[f],d=c.targetName;c.getLoop()||c.__changeFinalValue(d?(e||n)[d]:e||n)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new ci,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),F(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=Me;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,n){var i=t?this[t]:this,a=new rd(i,e,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var a=i.animators,o=dt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,n){zf(this,t,e,n)},r.prototype.animateFrom=function(t,e,n){zf(this,t,e,n,!0)},r.prototype._transitionState=function(t,e,n,i){for(var a=zf(this,e,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.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=Me;function e(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(f){l[a]=f}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(f){l[o]=f}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))})(),r})();fe(Fu,Ze);fe(Fu,ci);function zf(r,t,e,n,i){e=e||{};var a=[];MS(r,"",r,t,e,n,a,i);var o=a.length,s=!1,l=e.done,u=e.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var v=0;v<a.length;v++){var c=a[v];f&&c.done(f),h&&c.aborted(h),e.force&&c.duration(e.duration),c.start(e.easing)}return a}function Vf(r,t,e){for(var n=0;n<e;n++)r[n]=t[n]}function gM(r){return be(r[0])}function yM(r,t,e){if(be(t[e]))if(be(r[e])||(r[e]=[]),we(t[e])){var n=t[e].length;r[e].length!==n&&(r[e]=new t[e].constructor(n),Vf(r[e],t[e],n))}else{var i=t[e],a=r[e],o=i.length;if(gM(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?Vf(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else Vf(a,i,o);a.length=i.length}else r[e]=t[e]}function mM(r,t){return r===t||be(r)&&be(t)&&_M(r,t)}function _M(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function MS(r,t,e,n,i,a,o,s){for(var l=Pt(n),u=i.duration,f=i.delay,h=i.additive,v=i.setToFinal,c=!j(a),d=r.animators,p=[],g=0;g<l.length;g++){var y=l[g],m=n[y];if(m!=null&&e[y]!=null&&(c||a[y]))if(j(m)&&!be(m)&&!Ou(m)){if(t){s||(e[y]=m,r.updateDuringAnimation(t));continue}MS(r,y,e[y],m,i,a&&a[y],o,s)}else p.push(y);else s||(e[y]=m,r.updateDuringAnimation(t),p.push(y))}var _=p.length;if(!h&&_)for(var S=0;S<d.length;S++){var b=d[S];if(b.targetName===t){var x=b.stopTracks(p);if(x){var w=dt(d,b);d.splice(w,1)}}}if(i.force||(p=kt(p,function(C){return!mM(n[C],e[C])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,D=void 0,A=void 0;if(s){D={},v&&(T={});for(var S=0;S<_;S++){var y=p[S];D[y]=e[y],v?T[y]=n[y]:e[y]=n[y]}}else if(v){A={};for(var S=0;S<_;S++){var y=p[S];A[y]=Al(e[y]),yM(e,n,y)}}var b=new rd(e,!1,!1,h?kt(d,function(L){return L.targetName===t}):null);b.targetName=t,i.scope&&(b.scope=i.scope),v&&T&&b.whenWithKeys(0,T,p),A&&b.whenWithKeys(0,A,p),b.whenWithKeys(u??500,s?D:n,p).delay(f||0),r.addAnimator(b,t),o.push(b)}}var yt=(function(r){B(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===e)return n[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,n){if(e&&e!==this&&e.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=dt(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=dt(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i<e.length;i++){var a=e[i];n&&a.removeSelfFromZr(n),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];e.call(n,o,a)}return this},t.prototype.traverse=function(e,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=e.call(n,a);a.isGroup&&!o&&a.traverse(e,n)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var n=new ot(0,0,0,0),i=e||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(a);f?(ot.applyTransform(n,u,f),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t})(Fu);yt.prototype.type="group";/*!
|
|
16
|
-
* ZRender, a high performance 2d drawing library.
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
19
|
-
* All rights reserved.
|
|
20
|
-
*
|
|
21
|
-
* LICENSE
|
|
22
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
23
|
-
*/var Pl={},AS={};function SM(r){delete AS[r]}function xM(r){if(!r)return!1;if(typeof r=="string")return ql(r,1)<Tc;if(r.colorStops){for(var t=r.colorStops,e=0,n=t.length,i=0;i<n;i++)e+=ql(t[i].color,1);return e/=n,e<Tc}return!1}var bM=(function(){function r(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new VC,o=n.renderer||"canvas";Pl[o]||(o=Pt(Pl)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Pl[o](e,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!ct.node&&!ct.worker&&!l?new hM(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?ct.touchEventsSupported:!!f,v=44,c;h&&(c=et(n.pointerSize,v)),this.handler=new hS(a,s,u,s.root,c),this.animation=new iM({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=xM(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,n=ua();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=ua();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof yt&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.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,SM(this.id))},r})();function gg(r,t){var e=new bM(tS(),r,t);return AS[e.id]=e,e}function wM(r,t){Pl[r]=t}var yg=1e-4,DS=20;function TM(r){return r.replace(/^\s+|\s+$/g,"")}var zo=Math.min,Ae=Math.max,br=Math.abs;function St(r,t,e,n){var i=t[0],a=t[1],o=e[0],s=e[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}var q=CM;function CM(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Dc(r,t,e)}function Dc(r,t,e){return X(r)?TM(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function Xt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),DS),r=(+r).toFixed(t),e?r:+r}function Fr(r){return r.sort(function(t,e){return t-e}),r}function wr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return MM(r)}function MM(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function IS(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(br(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function AM(r,t){var e=Cn(r,function(c,d){return c+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),i=U(r,function(c){return(isNaN(c)?0:c)/e*n*100}),a=n*100,o=U(i,function(c){return Math.floor(c)}),s=Cn(o,function(c,d){return c+d},0),l=U(i,function(c,d){return c-o[d]});s<a;){for(var u=Number.NEGATIVE_INFINITY,f=null,h=0,v=l.length;h<v;++h)l[h]>u&&(u=l[h],f=h);++o[f],l[f]=0,++s}return U(o,function(c){return c/n})}function DM(r,t){var e=Math.max(wr(r),wr(t)),n=r+t;return e>DS?n:Xt(n,e)}var mg=9007199254740991;function LS(r){var t=Math.PI*2;return(r%t+t)%t}function Vo(r){return r>-yg&&r<yg}var IM=/^(?:(\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 Ra(r){if(r instanceof Date)return r;if(X(r)){var t=IM.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(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(r==null)return new Date(NaN);return new Date(Math.round(r))}function LM(r){return Math.pow(10,id(r))}function id(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function PS(r,t){var e=id(r),n=Math.pow(10,e),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function Ff(r,t){var e=(r.length-1)*t+1,n=Math.floor(e),i=+r[n-1],a=e-n;return a?i+a*(r[n]-i):i}function _g(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,n=0;n<r.length;){for(var i=r[n].interval,a=r[n].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-e),t=i[o],e=a[o];i[0]===i[1]&&a[0]*a[1]!==1?r.splice(n,1):n++}return r;function s(l,u,f){return l.interval[f]<u.interval[f]||l.interval[f]===u.interval[f]&&(l.close[f]-u.close[f]===(f?-1:1)||!f&&s(l,u,1))}}function Fo(r){var t=parseFloat(r);return t==r&&(t!==0||!X(r)||r.indexOf("x")<=0)?t:NaN}function PM(r){return!isNaN(Fo(r))}function RS(){return Math.round(Math.random()*9)}function ES(r,t){return t===0?r:ES(t,r%t)}function Sg(r,t){return r==null?t:t==null?r:r*t/ES(r,t)}var RM="[ECharts] ",EM=typeof console<"u"&&console.warn&&console.log;function kM(r,t,e){EM&&console[r](RM+t)}function kS(r,t){kM("error",r)}function de(r){throw new Error(r)}function xg(r,t,e){return(t-r)*e+r}var OS="series\0",BS="\0_ec_\0";function Ut(r){return r instanceof Array?r:r==null?[]:[r]}function Go(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,i=e.length;n<i;n++){var a=e[n];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var bg=["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 cs(r){return j(r)&&!H(r)&&!(r instanceof Date)?r.value:r}function OM(r){return j(r)&&!(r instanceof Array)}function BM(r,t,e){var n=e==="normalMerge",i=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=it();M(t,function(l,u){if(!j(l)){t[u]=null;return}});var s=NM(r,o,e);return(n||i)&&zM(s,r,o,t),n&&VM(s,t),n||i?FM(s,t,i):a&&GM(s,t),HM(s),s}function NM(r,t,e){var n=[];if(e==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:e==="replaceMerge"||Ho(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function zM(r,t,e,n){M(n,function(i,a){if(!(!i||i.id==null)){var o=Mo(i.id),s=e.get(o);if(s!=null){var l=r[s];We(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function VM(r,t){M(t,function(e,n){if(!(!e||e.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||e.id==null)&&!Ho(e)&&!Ho(a)&&NS("name",a,e)){r[i].newOption=e,t[n]=null;return}}})}function FM(r,t,e){M(t,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||Ho(i.existing)||i.existing&&n.id!=null&&!NS("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=e):r.push({newOption:n,brandNew:e,existing:null,keyInfo:null}),a++}})}function GM(r,t){M(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function HM(r){var t=it();M(r,function(e){var n=e.existing;n&&t.set(n.id,e)}),M(r,function(e){var n=e.newOption;We(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),M(r,function(e,n){var i=e.existing,a=e.newOption,o=e.keyInfo;if(j(a)){if(o.name=a.name!=null?Mo(a.name):i?i.name:OS+n,i)o.id=Mo(i.id);else if(a.id!=null)o.id=Mo(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function NS(r,t,e){var n=ge(t[r],null),i=ge(e[r],null);return n!=null&&i!=null&&n===i}function Mo(r){return ge(r,"")}function ge(r,t){return r==null?t:X(r)?r:xt(r)||sc(r)?r+"":t}function ad(r){var t=r.name;return!!(t&&t.indexOf(OS))}function Ho(r){return r&&r.id!=null&&Mo(r.id).indexOf(BS)===0}function WM(r){return BS+r}function UM(r,t,e){M(r,function(n){var i=n.newOption;j(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=YM(t,i,n.existing,e))})}function YM(r,t,e,n){var i=t.type?t.type:e?e.subType:n.determineSubType(r,t);return i}function ZM(r,t){var e={},n={};return i(r||[],e),i(t||[],n,e),[a(e),a(n)];function i(o,s,l){for(var u=0,f=o.length;u<f;u++){var h=ge(o[u].seriesId,null);if(h==null)return;for(var v=Ut(o[u].dataIndex),c=l&&l[h],d=0,p=v.length;d<p;d++){var g=v[d];c&&c[g]?c[g]=null:(s[h]||(s[h]={}))[g]=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 f=a(o[u],!0);f.length&&l.push({seriesId:u,dataIndex:f})}return l}}function Ai(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return H(t.dataIndex)?U(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return H(t.name)?U(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function wt(){var r="__ec_inner_"+XM++;return function(t){return t[r]||(t[r]={})}}var XM=RS();function Ao(r,t,e){var n=od(t,e),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=e?e.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,f){var h=Ea(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function od(r,t){var e;if(X(r)){var n={};n[r+"Index"]=0,e=n}else e=r;var i=it(),a={},o=!1;return M(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],h=(u[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&dt(t.includeMainTypes,f)<0)){o=o||!!f;var v=i.get(f)||i.set(f,{});v[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var ee={useDefault:!0,enableAll:!1,enableNone:!1},$M={useDefault:!1,enableAll:!0,enableNone:!0};function Ea(r,t,e,n){n=n||ee;var i=e.index,a=e.id,o=e.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.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=r.queryComponents({mainType:t,index:i,id:a,name:o}),s}function zS(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function qM(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function KM(r){return r==="auto"?ct.domSupported?"html":"richText":r||"html"}function QM(r,t){var e=it(),n=[];return M(r,function(i){var a=t(i);(e.get(a)||(n.push(a),e.set(a,[]))).push(i)}),{keys:n,buckets:e}}function VS(r,t,e,n,i){var a=t==null||t==="auto";if(n==null)return n;if(xt(n)){var o=xg(e||0,n,i);return Xt(o,a?Math.max(wr(e||0),wr(n)):t)}else{if(X(n))return i<1?e:n;for(var s=[],l=e,u=n,f=Math.max(l?l.length:0,u.length),h=0;h<f;++h){var v=r.getDimensionInfo(h);if(v&&v.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var c=l&&l[h]?l[h]:0,d=u[h],o=xg(c,d,i);s[h]=Xt(o,a?Math.max(wr(c),wr(d)):t)}}return s}}var jM=".",Hn="___EC__COMPONENT__CONTAINER___",FS="___EC__EXTENDED_CLASS___";function Tr(r){var t={main:"",sub:""};if(r){var e=r.split(jM);t.main=e[0]||"",t.sub=e[1]||""}return t}function JM(r){We(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function tA(r){return!!(r&&r[FS])}function sd(r,t){r.$constructor=r,r.extend=function(e){var n=this,i;return eA(n)?i=(function(a){B(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(e.$constructor||n).apply(this,arguments)},rC(i,this)),F(i.prototype,e),i[FS]=!0,i.extend=this.extend,i.superCall=iA,i.superApply=aA,i.superClass=n,i}}function eA(r){return Q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function GS(r,t){r.extend=t.extend}var rA=Math.round(Math.random()*10);function nA(r){var t=["__\0is_clz",rA++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function iA(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return this.superClass.prototype[t].apply(r,e)}function aA(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Gu(r){var t={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){JM(i),n.prototype.type=i;var a=Tr(i);if(!a.sub)t[a.main]=n;else if(a.sub!==Hn){var o=e(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=t[n];if(o&&o[Hn]&&(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},r.getClassesByMainType=function(n){var i=Tr(n),a=[],o=t[i.main];return o&&o[Hn]?M(o,function(s,l){l!==Hn&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=Tr(n);return!!t[i.main]},r.getAllClassMainTypes=function(){var n=[];return M(t,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=Tr(n),a=t[i.main];return a&&a[Hn]};function e(n){var i=t[n.main];return(!i||!i[Hn])&&(i=t[n.main]={},i[Hn]=!0),i}}function Di(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&dt(i,l)>=0||a&&dt(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var oA=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],sA=Di(oA),lA=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return sA(this,t,e)},r})(),Ic=new Sa(50);function uA(r){if(typeof r=="string"){var t=Ic.get(r);return t&&t.image}else return r}function HS(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=Ic.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!Hu(t)&&a.pending.push(o)):(t=or.loadImage(r,wg,wg),t.__zrImageSrc=r,Ic.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function wg(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],n=e.cb;n&&n(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Hu(r){return r&&r.width&&r.height}var Gf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function fA(r,t,e,n,i,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
24
|
-
`);a=WS(e,n,i,a);for(var s=!1,l={},u=0,f=o.length;u<f;u++)US(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
25
|
-
`),r.isTruncated=s}function WS(r,t,e,n){n=n||{};var i=F({},n);e=et(e,"..."),i.maxIterations=et(n.maxIterations,2);var a=i.minChar=et(n.minChar,0),o=i.fontMeasureInfo=Cr(t),s=o.asciiCharWidth;i.placeholder=et(n.placeholder,"");for(var l=r=Math.max(0,r-1),u=0;u<a&&l>=s;u++)l-=s;var f=Mr(o,e);return f>l&&(e="",f=0),l=r-f,i.ellipsis=e,i.ellipsisWidth=f,i.contentWidth=l,i.containerWidth=r,i}function US(r,t,e){var n=e.containerWidth,i=e.contentWidth,a=e.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=Mr(a,t);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?hA(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=Mr(a,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function hA(r,t,e){for(var n=0,i=0,a=r.length;i<a&&n<t;i++)n+=CS(e,r.charCodeAt(i));return i}function cA(r,t,e,n){var i=ld(r),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=t.font,f=a==="truncate",h=Vu(u),v=et(t.lineHeight,h),c=t.lineOverflow==="truncate",d=!1,p=t.width;p==null&&e!=null&&(p=e-s);var g=t.height;g==null&&n!=null&&(g=n-l);var y;p!=null&&(a==="break"||a==="breakAll")?y=i?YS(i,t.font,p,a==="breakAll",0).lines:[]:y=i?i.split(`
|
|
26
|
-
`):[];var m=y.length*v;if(g==null&&(g=m),m>g&&c){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(i&&f&&p!=null)for(var S=WS(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},x=0;x<y.length;x++)US(b,y[x],S),y[x]=b.textLine,d=d||b.isTruncated;for(var w=g,T=0,D=Cr(u),x=0;x<y.length;x++)T=Math.max(Mr(D,y[x]),T);p==null&&(p=T);var A=p;return w+=l,A+=s,{lines:y,height:g,outerWidth:A,outerHeight:w,lineHeight:v,calculatedLineHeight:h,contentWidth:T,contentHeight:m,width:p,isTruncated:d}}var vA=(function(){function r(){}return r})(),Tg=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),dA=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function pA(r,t,e,n,i){var a=new dA,o=ld(r);if(!o)return a;var s=t.padding,l=s?s[1]+s[3]:0,u=s?s[0]+s[2]:0,f=t.width;f==null&&e!=null&&(f=e-l);var h=t.height;h==null&&n!=null&&(h=n-u);for(var v=t.overflow,c=(v==="break"||v==="breakAll")&&f!=null?{width:f,accumWidth:0,breakAll:v==="breakAll"}:null,d=Gf.lastIndex=0,p;(p=Gf.exec(o))!=null;){var g=p.index;g>d&&Hf(a,o.substring(d,g),t,c),Hf(a,p[2],t,c,p[1]),d=Gf.lastIndex}d<o.length&&Hf(a,o.substring(d,o.length),t,c);var y=[],m=0,_=0,S=v==="truncate",b=t.lineOverflow==="truncate",x={};function w(Ct,Ot,ut){Ct.width=Ot,Ct.lineHeight=ut,m+=ut,_=Math.max(_,Ot)}t:for(var T=0;T<a.lines.length;T++){for(var D=a.lines[T],A=0,C=0,L=0;L<D.tokens.length;L++){var I=D.tokens[L],P=I.styleName&&t.rich[I.styleName]||{},R=I.textPadding=P.padding,E=R?R[1]+R[3]:0,O=I.font=P.font||t.font;I.contentHeight=Vu(O);var k=et(P.height,I.contentHeight);if(I.innerHeight=k,R&&(k+=R[0]+R[2]),I.height=k,I.lineHeight=_n(P.lineHeight,t.lineHeight,k),I.align=P&&P.align||i,I.verticalAlign=P&&P.verticalAlign||"middle",b&&h!=null&&m+I.lineHeight>h){var z=a.lines.length;L>0?(D.tokens=D.tokens.slice(0,L),w(D,C,A),a.lines=a.lines.slice(0,T+1)):a.lines=a.lines.slice(0,T),a.isTruncated=a.isTruncated||a.lines.length<z;break t}var V=P.width,G=V==null||V==="auto";if(typeof V=="string"&&V.charAt(V.length-1)==="%")I.percentWidth=V,y.push(I),I.contentWidth=Mr(Cr(O),I.text);else{if(G){var W=P.backgroundColor,Z=W&&W.image;Z&&(Z=uA(Z),Hu(Z)&&(I.width=Math.max(I.width,Z.width*k/Z.height)))}var rt=S&&f!=null?f-C:null;rt!=null&&rt<I.width?!G||rt<E?(I.text="",I.width=I.contentWidth=0):(fA(x,I.text,rt-E,O,t.ellipsis,{minChar:t.truncateMinChar}),I.text=x.text,a.isTruncated=a.isTruncated||x.isTruncated,I.width=I.contentWidth=Mr(Cr(O),I.text)):I.contentWidth=Mr(Cr(O),I.text)}I.width+=E,C+=I.width,P&&(A=Math.max(A,I.lineHeight))}w(D,C,A)}a.outerWidth=a.width=et(f,_),a.outerHeight=a.height=et(h,m),a.contentHeight=m,a.contentWidth=_,a.outerWidth+=l,a.outerHeight+=u;for(var T=0;T<y.length;T++){var I=y[T],lt=I.percentWidth;I.width=parseInt(lt,10)/100*a.width}return a}function Hf(r,t,e,n,i){var a=t==="",o=i&&e.rich[i]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(n){var v=o.padding,c=v?v[1]+v[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Dr(o.width,n.width)+c;s.length>0&&d+n.accumWidth>n.width&&(f=t.split(`
|
|
27
|
-
`),u=!0),n.accumWidth=d}else{var p=YS(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+c,h=p.linesWidths,f=p.lines}}f||(f=t.split(`
|
|
28
|
-
`));for(var g=Cr(l),y=0;y<f.length;y++){var m=f[y],_=new vA;if(_.styleName=i,_.text=m,_.isLineHolder=!m&&!a,typeof o.width=="number"?_.width=o.width:_.width=h?h[y]:Mr(g,m),!y&&!u){var S=(s[s.length-1]||(s[0]=new Tg)).tokens,b=S.length;b===1&&S[0].isLineHolder?S[0]=_:(m||!b||a)&&S.push(_)}else s.push(new Tg([_]))}}function gA(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var yA=Cn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function mA(r){return gA(r)?!!yA[r]:!0}function YS(r,t,e,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,h=Cr(t),v=0;v<r.length;v++){var c=r.charAt(v);if(c===`
|
|
29
|
-
`){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var d=CS(h,c.charCodeAt(0)),p=n?!1:!mA(c);if(a.length?f+d>e:i+f+d>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=d)):p?(a.push(l),o.push(u),l=c,u=d):(a.push(c),o.push(d));continue}f+=d,p?(l+=c,u+=d):(l&&(s+=l,l="",u=0),s+=c)}return l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}function Cg(r,t,e,n,i,a){if(r.baseX=e,r.baseY=n,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;ot.set(Mg,xa(e,o,i),_i(n,s,a),o,s),ot.intersect(t,Mg,null,Ag);var l=Ag.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=xa(l.x,l.width,i,!0),r.baseY=_i(l.y,l.height,a,!0)}}var Mg=new ot(0,0,0,0),Ag={outIntersectRect:{},clamp:!0};function ld(r){return r!=null?r+="":r=""}function _A(r){var t=ld(r.text),e=r.font,n=Mr(Cr(e),t),i=Vu(e);return Lc(r,n,i,null)}function Lc(r,t,e,n){var i=new ot(xa(r.x||0,t,r.textAlign),_i(r.y||0,e,r.textBaseline),t,e),a=n??(ZS(r)?r.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function ZS(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Pc="__zr_style_"+Math.round(Math.random()*10),Si={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Wu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Si[Pc]=!0;var Dg=["z","z2","invisible"],SA=["invisible"],ka=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=Pt(e),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[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(e,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&xA(this,e,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(e,n){return this.rectContain(e,n)},t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.rectContain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var e=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;e=this._paintRect||(this._paintRect=new ot(0,0,0,0)),n?ot.applyTransform(e,i,n):e.copy(i),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ot(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,n){e!=="style"?r.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,n){return typeof e=="string"?this.style[e]=n:F(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=po,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&po)},t.prototype.styleUpdated=function(){this.__dirty&=~po},t.prototype.createStyle=function(e){return Nu(Si,e)},t.prototype.useStyle=function(e){e[Pc]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Pc]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,Dg)},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,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 f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=Pt(f),v=0;v<h.length;v++){var c=h[v];c in u&&(u[c]=u[c],this.style[c]=f[c])}for(var d=Pt(u),v=0;v<d.length;v++){var c=d[v];this.style[c]=this.style[c]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?SA:Dg,v=0;v<p.length;v++){var c=p[v];n&&n[c]!=null?this[c]=n[c]:l&&i[c]!=null&&(this[c]=i[c])}},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(e,n){return F(e,n),e},t.prototype.getAnimationStyleProps=function(){return Wu},t.initDefaultProps=(function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=Me|po})(),t})(Fu),Wf=new ot(0,0,0,0),Uf=new ot(0,0,0,0);function xA(r,t,e){return Wf.copy(r.getBoundingRect()),r.transform&&Wf.applyTransform(r.transform),Uf.width=t,Uf.height=e,!Wf.intersect(Uf)}var Ne=Math.min,ze=Math.max,Yf=Math.sin,Zf=Math.cos,Wn=Math.PI*2,Os=La(),Bs=La(),Ns=La();function Ig(r,t,e,n,i,a){i[0]=Ne(r,e),i[1]=Ne(t,n),a[0]=ze(r,e),a[1]=ze(t,n)}var Lg=[],Pg=[];function bA(r,t,e,n,i,a,o,s,l,u){var f=gS,h=te,v=f(r,e,i,o,Lg);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var c=0;c<v;c++){var d=h(r,e,i,o,Lg[c]);l[0]=Ne(d,l[0]),u[0]=ze(d,u[0])}v=f(t,n,a,s,Pg);for(var c=0;c<v;c++){var p=h(t,n,a,s,Pg[c]);l[1]=Ne(p,l[1]),u[1]=ze(p,u[1])}l[0]=Ne(r,l[0]),u[0]=ze(r,u[0]),l[0]=Ne(o,l[0]),u[0]=ze(o,u[0]),l[1]=Ne(t,l[1]),u[1]=ze(t,u[1]),l[1]=Ne(s,l[1]),u[1]=ze(s,u[1])}function wA(r,t,e,n,i,a,o,s){var l=yS,u=Se,f=ze(Ne(l(r,e,i),1),0),h=ze(Ne(l(t,n,a),1),0),v=u(r,e,i,f),c=u(t,n,a,h);o[0]=Ne(r,i,v),o[1]=Ne(t,a,c),s[0]=ze(r,i,v),s[1]=ze(t,a,c)}function TA(r,t,e,n,i,a,o,s,l){var u=oa,f=sa,h=Math.abs(i-a);if(h%Wn<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(Os[0]=Zf(i)*e+r,Os[1]=Yf(i)*n+t,Bs[0]=Zf(a)*e+r,Bs[1]=Yf(a)*n+t,u(s,Os,Bs),f(l,Os,Bs),i=i%Wn,i<0&&(i=i+Wn),a=a%Wn,a<0&&(a=a+Wn),i>a&&!o?a+=Wn:i<a&&o&&(i+=Wn),o){var v=a;a=i,i=v}for(var c=0;c<a;c+=Math.PI/2)c>i&&(Ns[0]=Zf(c)*e+r,Ns[1]=Yf(c)*n+t,u(s,Ns,s),f(l,Ns,l))}var At={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Un=[],Yn=[],vr=[],jr=[],dr=[],pr=[],Xf=Math.min,$f=Math.max,Zn=Math.cos,Xn=Math.sin,Rr=Math.abs,Rc=Math.PI,ln=Rc*2,qf=typeof Float32Array<"u",Wa=[];function Kf(r){var t=Math.round(r/Rc*1e8)/1e8;return t%2*Rc}function ud(r,t){var e=Kf(r[0]);e<0&&(e+=ln);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=ln?i=e+ln:t&&e-i>=ln?i=e-ln:!t&&e>i?i=e+(ln-Kf(e-i)):t&&e<i&&(i=e-(ln-Kf(i-e))),r[0]=e,r[1]=i}var Ii=(function(){function r(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 r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,n){n=n||0,n>0&&(this._ux=Rr(n/Kl/t)||0,this._uy=Rr(n/Kl/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(At.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=Rr(t-this._xi),i=Rr(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(At.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(At.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(At.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),Wa[0]=i,Wa[1]=a,ud(Wa,o),i=Wa[0],a=Wa[1];var s=a-i;return this.addData(At.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=Zn(a)*n+t,this._yi=Xn(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(At.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(At.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&qf&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e}},r.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,a=0;a<e;a++)n+=t[a].len();var o=this.data;if(qf&&(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<e;a++)for(var l=t[a].data,s=0;s<l.length;s++)this.data[i++]=l[s];this._len=i}},r.prototype.addData=function(t,e,n,i,a,o,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,qf&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){vr[0]=vr[1]=dr[0]=dr[1]=Number.MAX_VALUE,jr[0]=jr[1]=pr[0]=pr[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],n=t[o+1],i=e,a=n),s){case At.M:e=i=t[o++],n=a=t[o++],dr[0]=i,dr[1]=a,pr[0]=i,pr[1]=a;break;case At.L:Ig(e,n,t[o],t[o+1],dr,pr),e=t[o++],n=t[o++];break;case At.C:bA(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],dr,pr),e=t[o++],n=t[o++];break;case At.Q:wA(e,n,t[o++],t[o++],t[o],t[o+1],dr,pr),e=t[o++],n=t[o++];break;case At.A:var u=t[o++],f=t[o++],h=t[o++],v=t[o++],c=t[o++],d=t[o++]+c;o+=1;var p=!t[o++];l&&(i=Zn(c)*h+u,a=Xn(c)*v+f),TA(u,f,h,v,c,d,p,dr,pr),e=Zn(d)*h+u,n=Xn(d)*v+f;break;case At.R:i=e=t[o++],a=n=t[o++];var g=t[o++],y=t[o++];Ig(i,a,i+g,a+y,dr,pr);break;case At.Z:e=i,n=a;break}oa(vr,vr,dr),sa(jr,jr,pr)}return o===0&&(vr[0]=vr[1]=jr[0]=jr[1]=0),new ot(vr[0],vr[1],jr[0]-vr[0],jr[1]-vr[1])},r.prototype._calculateLength=function(){var t=this.data,e=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,f=0,h=0,v=0;v<e;){var c=t[v++],d=v===1;d&&(a=t[v],o=t[v+1],s=a,l=o);var p=-1;switch(c){case At.M:a=s=t[v++],o=l=t[v++];break;case At.L:{var g=t[v++],y=t[v++],m=g-a,_=y-o;(Rr(m)>n||Rr(_)>i||v===e-1)&&(p=Math.sqrt(m*m+_*_),a=g,o=y);break}case At.C:{var S=t[v++],b=t[v++],g=t[v++],y=t[v++],x=t[v++],w=t[v++];p=GC(a,o,S,b,g,y,x,w,10),a=x,o=w;break}case At.Q:{var S=t[v++],b=t[v++],g=t[v++],y=t[v++];p=UC(a,o,S,b,g,y,10),a=g,o=y;break}case At.A:var T=t[v++],D=t[v++],A=t[v++],C=t[v++],L=t[v++],I=t[v++],P=I+L;v+=1,d&&(s=Zn(L)*A+T,l=Xn(L)*C+D),p=$f(A,C)*Xf(ln,Math.abs(I)),a=Zn(P)*A+T,o=Xn(P)*C+D;break;case At.R:{s=a=t[v++],l=o=t[v++];var R=t[v++],E=t[v++];p=R*2+E*2;break}case At.Z:{var m=s-a,_=l-o;p=Math.sqrt(m*m+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,h,v,c=e<1,d,p,g=0,y=0,m,_=0,S,b;if(!(c&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var x=0;x<o;){var w=n[x++],T=x===1;switch(T&&(u=n[x],f=n[x+1],s=u,l=f),w!==At.L&&_>0&&(t.lineTo(S,b),_=0),w){case At.M:s=u=n[x++],l=f=n[x++],t.moveTo(u,f);break;case At.L:{h=n[x++],v=n[x++];var D=Rr(h-u),A=Rr(v-f);if(D>i||A>a){if(c){var C=d[y++];if(g+C>m){var L=(m-g)/C;t.lineTo(u*(1-L)+h*L,f*(1-L)+v*L);break t}g+=C}t.lineTo(h,v),u=h,f=v,_=0}else{var I=D*D+A*A;I>_&&(S=h,b=v,_=I)}break}case At.C:{var P=n[x++],R=n[x++],E=n[x++],O=n[x++],k=n[x++],z=n[x++];if(c){var C=d[y++];if(g+C>m){var L=(m-g)/C;Xl(u,P,E,k,L,Un),Xl(f,R,O,z,L,Yn),t.bezierCurveTo(Un[1],Yn[1],Un[2],Yn[2],Un[3],Yn[3]);break t}g+=C}t.bezierCurveTo(P,R,E,O,k,z),u=k,f=z;break}case At.Q:{var P=n[x++],R=n[x++],E=n[x++],O=n[x++];if(c){var C=d[y++];if(g+C>m){var L=(m-g)/C;$l(u,P,E,L,Un),$l(f,R,O,L,Yn),t.quadraticCurveTo(Un[1],Yn[1],Un[2],Yn[2]);break t}g+=C}t.quadraticCurveTo(P,R,E,O),u=E,f=O;break}case At.A:var V=n[x++],G=n[x++],W=n[x++],Z=n[x++],rt=n[x++],lt=n[x++],Ct=n[x++],Ot=!n[x++],ut=W>Z?W:Z,tt=Rr(W-Z)>.001,pt=rt+lt,K=!1;if(c){var C=d[y++];g+C>m&&(pt=rt+lt*(m-g)/C,K=!0),g+=C}if(tt&&t.ellipse?t.ellipse(V,G,W,Z,Ct,rt,pt,Ot):t.arc(V,G,ut,rt,pt,Ot),K)break t;T&&(s=Zn(rt)*W+V,l=Xn(rt)*Z+G),u=Zn(pt)*W+V,f=Xn(pt)*Z+G;break;case At.R:s=u=n[x],l=f=n[x+1],h=n[x++],v=n[x++];var nt=n[x++],Rt=n[x++];if(c){var C=d[y++];if(g+C>m){var Mt=m-g;t.moveTo(h,v),t.lineTo(h+Xf(Mt,nt),v),Mt-=nt,Mt>0&&t.lineTo(h+nt,v+Xf(Mt,Rt)),Mt-=Rt,Mt>0&&t.lineTo(h+$f(nt-Mt,0),v+Rt),Mt-=nt,Mt>0&&t.lineTo(h,v+$f(Rt-Mt,0));break t}g+=C}t.rect(h,v,nt,Rt);break;case At.Z:if(c){var C=d[y++];if(g+C>m){var L=(m-g)/C;t.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}g+=C}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=At,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function Hi(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-n)/(r-e),u=(r*n-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var f=l*a-o+u,h=f*f/(l*l+1);return h<=s/2*s/2}function CA(r,t,e,n,i,a,o,s,l,u,f){if(l===0)return!1;var h=l;if(f>t+h&&f>n+h&&f>a+h&&f>s+h||f<t-h&&f<n-h&&f<a-h&&f<s-h||u>r+h&&u>e+h&&u>i+h&&u>o+h||u<r-h&&u<e-h&&u<i-h&&u<o-h)return!1;var v=FC(r,t,e,n,i,a,o,s,u,f);return v<=h/2}function MA(r,t,e,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>r+u&&s>e+u&&s>i+u||s<r-u&&s<e-u&&s<i-u)return!1;var f=WC(r,t,e,n,i,a,s,l);return f<=u/2}var Rg=Math.PI*2;function dn(r){return r%=Rg,r<0&&(r+=Rg),r}var Ua=Math.PI*2;function AA(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>e||f+u<e)return!1;if(Math.abs(n-i)%Ua<1e-4)return!0;if(a){var h=n;n=dn(i),i=dn(h)}else n=dn(n),i=dn(i);n>i&&(i+=Ua);var v=Math.atan2(l,s);return v<0&&(v+=Ua),v>=n&&v<=i||v+Ua>=n&&v+Ua<=i}function $n(r,t,e,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*(e-r)+r;return l===i?1/0:l>i?s:0}var Jr=Ii.CMD,qn=Math.PI*2,DA=1e-4;function IA(r,t){return Math.abs(r-t)<DA}var ce=[-1,-1,-1],Oe=[-1,-1];function LA(){var r=Oe[0];Oe[0]=Oe[1],Oe[1]=r}function PA(r,t,e,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 f=Zl(t,n,a,s,u,ce);if(f===0)return 0;for(var h=0,v=-1,c=void 0,d=void 0,p=0;p<f;p++){var g=ce[p],y=g===0||g===1?.5:1,m=te(r,e,i,o,g);m<l||(v<0&&(v=gS(t,n,a,s,Oe),Oe[1]<Oe[0]&&v>1&&LA(),c=te(t,n,a,s,Oe[0]),v>1&&(d=te(t,n,a,s,Oe[1]))),v===2?g<Oe[0]?h+=c<t?y:-y:g<Oe[1]?h+=d<c?y:-y:h+=s<d?y:-y:g<Oe[0]?h+=c<t?y:-y:h+=s<c?y:-y)}return h}function RA(r,t,e,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=HC(t,n,a,s,ce);if(l===0)return 0;var u=yS(t,n,a);if(u>=0&&u<=1){for(var f=0,h=Se(t,n,a,u),v=0;v<l;v++){var c=ce[v]===0||ce[v]===1?.5:1,d=Se(r,e,i,ce[v]);d<o||(ce[v]<u?f+=h<t?c:-c:f+=a<h?c:-c)}return f}else{var c=ce[0]===0||ce[0]===1?.5:1,d=Se(r,e,i,ce[0]);return d<o?0:a<t?c:-c}}function EA(r,t,e,n,i,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);ce[0]=-l,ce[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=qn-1e-4){n=0,i=qn;var f=a?1:-1;return o>=ce[0]+r&&o<=ce[1]+r?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=qn,i+=qn);for(var v=0,c=0;c<2;c++){var d=ce[c];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=qn+p),(p>=n&&p<=i||p+qn>=n&&p+qn<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(f=-f),v+=f)}}return v}function XS(r,t,e,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,f=0,h=0,v,c,d=0;d<o;){var p=a[d++],g=d===1;switch(p===Jr.M&&d>1&&(e||(s+=$n(l,u,f,h,n,i))),g&&(l=a[d],u=a[d+1],f=l,h=u),p){case Jr.M:f=a[d++],h=a[d++],l=f,u=h;break;case Jr.L:if(e){if(Hi(l,u,a[d],a[d+1],t,n,i))return!0}else s+=$n(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Jr.C:if(e){if(CA(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=PA(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Jr.Q:if(e){if(MA(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=RA(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case Jr.A:var y=a[d++],m=a[d++],_=a[d++],S=a[d++],b=a[d++],x=a[d++];d+=1;var w=!!(1-a[d++]);v=Math.cos(b)*_+y,c=Math.sin(b)*S+m,g?(f=v,h=c):s+=$n(l,u,v,c,n,i);var T=(n-y)*S/_+y;if(e){if(AA(y,m,S,b,b+x,w,t,T,i))return!0}else s+=EA(y,m,S,b,b+x,w,T,i);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case Jr.R:f=l=a[d++],h=u=a[d++];var D=a[d++],A=a[d++];if(v=f+D,c=h+A,e){if(Hi(f,h,v,h,t,n,i)||Hi(v,h,v,c,t,n,i)||Hi(v,c,f,c,t,n,i)||Hi(f,c,f,h,t,n,i))return!0}else s+=$n(v,h,v,c,n,i),s+=$n(f,c,f,h,n,i);break;case Jr.Z:if(e){if(Hi(l,u,f,h,t,n,i))return!0}else s+=$n(l,u,f,h,n,i);l=f,u=h;break}}return!e&&!IA(u,h)&&(s+=$n(l,u,f,h,n,i)||0),s!==0}function kA(r,t,e){return XS(r,0,!1,t,e)}function OA(r,t,e,n){return XS(r,t,!0,e,n)}var $S=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Si),BA={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Wu.style)},Qf=No.concat(["invisible","culling","z","z2","zlevel","parent"]),bt=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.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){e.buildPath(l,e.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<Qf.length;++s)i[Qf[s]]=this[Qf[s]];i.__dirty|=Me}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var n=Pt(e);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=e[o];o==="style"?this.style?F(this.style,s):this.useStyle(s):o==="shape"?F(this.shape,s):r.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 e=this.style.fill;if(e!=="none"){if(X(e)){var n=ql(e,0);return n>.5?Cc:n>.2?cM:Mc}else if(e)return Mc}return Cc},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(X(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ql(e,0)<Tc;if(a===o)return n}},t.prototype.buildPath=function(e,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~ia},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Ii(!1)},t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return!(n==null||n==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ia)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??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 e},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,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)),OA(s,l/u,e,n)))return!0}if(this.hasFill())return kA(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ia,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:F(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ia)},t.prototype.createStyle=function(e){return Nu($S,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=F({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=F({},i.shape),F(u,n.shape)):(u=F({},a?this.shape:i.shape),F(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=F({},this.shape);for(var f={},h=Pt(u),v=0;v<h.length;v++){var c=h[v];typeof u[c]=="object"?this.shape[c]=u[c]:f[c]=u[c]}this._transitionState(e,{shape:f},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return BA},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=(function(a){B(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return J(e.style)},o.prototype.getDefaultShape=function(){return J(e.shape)},o})(t);for(var i in e)typeof e[i]=="function"&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=Me|po|ia})(),t})(ka),NA=gt({strokeFirst:!0,font:Tn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},$S),jl=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return ZS(this.style)},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return Nu(NA,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||(this._rect=_A(this.style)),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(ka);jl.prototype.type="tspan";var zA=gt({x:0,y:0},Si),VA={style:gt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Wu.style)};function FA(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var Xe=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Nu(zA,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=FA(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return VA},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ot(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(ka);Xe.prototype.type="image";function GA(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+f>i&&(h=u+f,u*=i/h,f*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,n),r.lineTo(e+i-l,n),l!==0&&r.arc(e+i-l,n+l,l,-Math.PI/2,0),r.lineTo(e+i,n+a-u),u!==0&&r.arc(e+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(e+f,n+a),f!==0&&r.arc(e+f,n+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var fa=Math.round;function qS(r,t,e){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(fa(n*2)===fa(i*2)&&(r.x1=r.x2=vi(n,s,!0)),fa(a*2)===fa(o*2)&&(r.y1=r.y2=vi(a,s,!0))),r}}function KS(r,t,e){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=vi(n,s,!0),r.y=vi(i,s,!0),r.width=Math.max(vi(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(vi(i+o,s,!1)-r.y,o===0?0:1)),r}}function vi(r,t,e){if(!t)return r;var n=fa(r*2);return(n+fa(t))%2===0?n/2:(n+(e?1:-1))/2}var HA=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),WA={},_t=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new HA},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=KS(WA,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?GA(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(bt);_t.prototype.type="rect";var Eg={fill:"#000"},kg=2,gr={},UA={style:gt({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},Wu.style)},Tt=(function(r){B(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Eg,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];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 e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,qA(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);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 e=new ot(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?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Eg},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,n){if(!n)return e;var i=n.rich,a=e.rich||i&&{};return F(e,n),i&&a?(this._mergeRich(a,i),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,n){for(var i=Pt(n),a=0;a<i.length;a++){var o=i[a];e[o]=e[o]||{},F(e[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return UA},t.prototype._getOrCreateChild=function(e){var n=this._children[this._childCursor];return(!n||!(n instanceof e))&&(n=new e),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var e=this.style,n=e.font||Tn,i=e.padding,a=this._defaultStyle,o=e.x||0,s=e.y||0,l=e.align||a.align||"left",u=e.verticalAlign||a.verticalAlign||"top";Cg(gr,a.overflowRect,o,s,l,u),o=gr.baseX,s=gr.baseY;var f=Gg(e),h=cA(f,e,gr.outerWidth,gr.outerHeight),v=jf(e),c=!!e.backgroundColor,d=h.outerHeight,p=h.outerWidth,g=h.lines,y=h.lineHeight;this.isTruncated=!!h.isTruncated;var m=o,_=_i(s,h.contentHeight,u);if(v||i){var S=xa(o,p,l),b=_i(s,d,u);v&&this._renderBackground(e,e,S,b,p,d)}_+=y/2,i&&(m=Fg(o,l,i),u==="top"?_+=i[0]:u==="bottom"&&(_-=i[2]));for(var x=0,w=!1,T=!1,D=Vg("fill"in e?e.fill:(T=!0,a.fill)),A=zg("stroke"in e?e.stroke:!c&&(!a.autoStroke||T)?(x=kg,w=!0,a.stroke):null),C=e.textShadowBlur>0,L=0;L<g.length;L++){var I=this._getOrCreateChild(jl),P=I.createStyle();I.useStyle(P),P.text=g[L],P.x=m,P.y=_,P.textAlign=l,P.textBaseline="middle",P.opacity=e.opacity,P.strokeFirst=!0,C&&(P.shadowBlur=e.textShadowBlur||0,P.shadowColor=e.textShadowColor||"transparent",P.shadowOffsetX=e.textShadowOffsetX||0,P.shadowOffsetY=e.textShadowOffsetY||0),P.stroke=A,P.fill=D,A&&(P.lineWidth=e.lineWidth||x,P.lineDash=e.lineDash,P.lineDashOffset=e.lineDashOffset||0),P.font=n,Bg(P,e),_+=y,I.setBoundingRect(Lc(P,h.contentWidth,h.calculatedLineHeight,w?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,n=this._defaultStyle,i=e.align||n.align,a=e.verticalAlign||n.verticalAlign,o=e.x||0,s=e.y||0;Cg(gr,n.overflowRect,o,s,i,a),o=gr.baseX,s=gr.baseY;var l=Gg(e),u=pA(l,e,gr.outerWidth,gr.outerHeight,i),f=u.width,h=u.outerWidth,v=u.outerHeight,c=e.padding;this.isTruncated=!!u.isTruncated;var d=xa(o,h,i),p=_i(s,v,a),g=d,y=p;c&&(g+=c[3],y+=c[0]);var m=g+f;jf(e)&&this._renderBackground(e,e,d,p,h,v);for(var _=!!e.backgroundColor,S=0;S<u.lines.length;S++){for(var b=u.lines[S],x=b.tokens,w=x.length,T=b.lineHeight,D=b.width,A=0,C=g,L=m,I=w-1,P=void 0;A<w&&(P=x[A],!P.align||P.align==="left");)this._placeToken(P,e,T,y,C,"left",_),D-=P.width,C+=P.width,A++;for(;I>=0&&(P=x[I],P.align==="right");)this._placeToken(P,e,T,y,L,"right",_),D-=P.width,L-=P.width,I--;for(C+=(f-(C-g)-(m-L)-D)/2;A<=I;)P=x[A],this._placeToken(P,e,T,y,C+P.width/2,"center",_),C+=P.width,A++;y+=T}},t.prototype._placeToken=function(e,n,i,a,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+i/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+i-e.height/2);var v=!e.isLineHolder&&jf(u);v&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var c=!!u.backgroundColor,d=e.textPadding;d&&(o=Fg(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(jl),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,b=Vg("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),x=zg("stroke"in u?u.stroke:"stroke"in n?n.stroke:!c&&!l&&(!y.autoStroke||m)?(_=kg,S=!0,y.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Tn,g.opacity=_n(u.opacity,n.opacity,1),Bg(g,u),x&&(g.lineWidth=_n(u.lineWidth,n.lineWidth,_),g.lineDash=et(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),b&&(g.fill=b),p.setBoundingRect(Lc(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,n,i,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,v=l&&!h,c=e.borderRadius,d=this,p,g;if(v||e.lineHeight||u&&f){p=this._getOrCreateChild(_t),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=c,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=et(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild(Xe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=et(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=_n(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return $A(e)&&(n=[e.fontStyle,e.fontWeight,XA(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&xr(n)||e.textFont||e.font},t})(ka),YA={left:!0,right:1,center:1},ZA={top:1,bottom:1,middle:1},Og=["fontStyle","fontWeight","fontSize","fontFamily"];function XA(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Xv+"px":r+"px"}function Bg(r,t){for(var e=0;e<Og.length;e++){var n=Og[e],i=t[n];i!=null&&(r[n]=i)}}function $A(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function qA(r){return Ng(r),M(r.rich,Ng),r}function Ng(r){if(r){r.font=Tt.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||YA[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||ZA[e]?e:"top";var n=r.padding;n&&(r.padding=Bu(r.padding))}}function zg(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function Vg(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Fg(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Gg(r){var t=r.text;return t!=null&&(t+=""),t}function jf(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var vt=wt(),Ec=function(r,t,e,n){if(n){var i=vt(n);i.dataIndex=e,i.dataType=t,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=vt(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},Hg=1,Wg={},QS=wt(),fd=wt(),hd=0,Uu=1,Yu=2,ye=["emphasis","blur","select"],Wo=["normal","emphasis","blur","select"],vs=10,KA=9,xi="highlight",Rl="downplay",Jl="select",kc="unselect",tu="toggleSelect",cd="selectchanged";function Wi(r){return r!=null&&r!=="none"}function Zu(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function jS(r){Zu(r,"emphasis",Yu)}function JS(r){r.hoverState===Yu&&Zu(r,"normal",hd)}function vd(r){Zu(r,"blur",Uu)}function tx(r){r.hoverState===Uu&&Zu(r,"normal",hd)}function QA(r){r.selected=!0}function jA(r){r.selected=!1}function Ug(r,t,e){t(r,e)}function Kr(r,t,e){Ug(r,t,e),r.isGroup&&r.traverse(function(n){Ug(n,t,e)})}function Yg(r,t){switch(t){case"emphasis":r.hoverState=Yu;break;case"normal":r.hoverState=hd;break;case"blur":r.hoverState=Uu;break;case"select":r.selected=!0}}function JA(r,t,e,n){for(var i=r.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<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function tD(r,t,e,n){var i=e&&dt(e,"select")>=0,a=!1;if(r instanceof bt){var o=QS(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Wi(s)||Wi(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=F({},n),u=F({},u),u.fill=s):!Wi(u.fill)&&Wi(s)?(a=!0,n=F({},n),u=F({},u),u.fill=ag(s)):!Wi(u.stroke)&&Wi(l)&&(a||(n=F({},n),u=F({},u)),u.stroke=ag(l)),n.style=u}}if(n&&n.z2==null){a||(n=F({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??vs)}return n}function eD(r,t,e){if(e&&e.z2==null){e=F({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??KA)}return e}function rD(r,t,e){var n=dt(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:JA(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=F({},e),o=F({opacity:n?i:a.opacity*.1},o),e.style=o),e}function Jf(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return tD(this,r,t,e);if(r==="blur")return rD(this,r,e);if(r==="select")return eD(this,r,e)}return e}function Oc(r){r.stateProxy=Jf;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=Jf),e&&(e.stateProxy=Jf)}function Zg(r,t){!ix(r,t)&&!r.__highByOuter&&Kr(r,jS)}function Xg(r,t){!ix(r,t)&&!r.__highByOuter&&Kr(r,JS)}function Mn(r,t){r.__highByOuter|=1<<(t||0),Kr(r,jS)}function An(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Kr(r,JS)}function ex(r){Kr(r,vd)}function dd(r){Kr(r,tx)}function rx(r){Kr(r,QA)}function nx(r){Kr(r,jA)}function ix(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function ax(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=fd(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){tx(u)}),s&&e.push(a)),o.isBlured=!1}),M(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function Bc(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h<f.length;h++){var v=u.getItemGraphicEl(f[h]);v&&dd(v)}}if(r!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var f=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var v=h&&s?h===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!v||t==="series"&&f)){var c=n.getViewOfSeriesModel(u);if(c.group.traverse(function(g){g.__highByOuter&&f&&t==="self"||vd(g)}),be(t))a(u.getData(),t);else if(j(t))for(var d=Pt(t),p=0;p<d.length;p++)a(u.getData(d[p]),t[d[p]]);l.push(u),fd(u).isBlured=!0}}),i.eachComponent(function(u,f){if(u!=="series"){var h=n.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function Nc(r,t,e){if(!(r==null||t==null)){var n=e.getModel().getComponent(r,t);if(n){fd(n).isBlured=!0;var i=e.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){vd(a)})}}}function nD(r,t,e){var n=r.seriesIndex,i=r.getData(t.dataType);if(i){var a=Ai(i,t);a=(H(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=vt(o);Bc(n,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);f!=null&&Bc(n,f,h,e)}}}function pd(r,t,e,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return i;var a=n.getModel().getComponent(r,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(vt(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function iD(r,t,e){var n=vt(r),i=pd(n.componentMainType,n.componentIndex,n.componentHighDownName,e),a=i.dispatchers,o=i.focusSelf;a?(o&&Nc(n.componentMainType,n.componentIndex,e),M(a,function(s){return Zg(s,t)})):(Bc(n.seriesIndex,n.focus,n.blurScope,e),n.focus==="self"&&Nc(n.componentMainType,n.componentIndex,e),Zg(r,t))}function aD(r,t,e){ax(e);var n=vt(r),i=pd(n.componentMainType,n.componentIndex,n.componentHighDownName,e).dispatchers;i?M(i,function(a){return Xg(a,t)}):Xg(r,t)}function oD(r,t,e){if(Vc(t)){var n=t.dataType,i=r.getData(n),a=Ai(i,t);H(a)||(a=[a]),r[t.type===tu?"toggleSelect":t.type===Jl?"select":"unselect"](a,n)}}function $g(r){var t=r.getAllData();M(t,function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?rx(a):nx(a)})})}function sD(r){var t=[];return r.eachSeries(function(e){var n=e.getAllData();M(n,function(i){i.data;var a=i.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function eu(r,t,e){di(r,!0),Kr(r,Oc),zc(r,t,e)}function lD(r){di(r,!1)}function ne(r,t,e,n){n?lD(r):eu(r,t,e)}function zc(r,t,e){var n=vt(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var qg=["emphasis","blur","select"],uD={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function De(r,t,e,n){e=e||"itemStyle";for(var i=0;i<qg.length;i++){var a=qg[i],o=t.getModel([a,e]),s=r.ensureState(a);s.style=n?n(o):o[uD[e]]()}}function di(r,t){var e=t===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function Uo(r){return!!(r&&r.__highDownDispatcher)}function fD(r){var t=Wg[r];return t==null&&Hg<=32&&(t=Wg[r]=Hg++),t}function Vc(r){var t=r.type;return t===Jl||t===kc||t===tu}function Kg(r){var t=r.type;return t===xi||t===Rl}function hD(r){var t=QS(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var Ui=Ii.CMD,cD=[[],[],[]],Qg=Math.sqrt,vD=Math.atan2;function dD(r,t){if(t){var e=r.data,n=r.len(),i,a,o,s,l,u,f=Ui.M,h=Ui.C,v=Ui.L,c=Ui.R,d=Ui.A,p=Ui.Q;for(o=0,s=0;o<n;){switch(i=e[o++],s=o,a=0,i){case f:a=1;break;case v:a=1;break;case h:a=3;break;case p:a=2;break;case d:var g=t[4],y=t[5],m=Qg(t[0]*t[0]+t[1]*t[1]),_=Qg(t[2]*t[2]+t[3]*t[3]),S=vD(-t[1]/_,t[0]/m);e[o]*=m,e[o++]+=g,e[o]*=_,e[o++]+=y,e[o++]*=m,e[o++]*=_,e[o++]+=S,e[o++]+=S,o+=2,s=o;break;case c:u[0]=e[o++],u[1]=e[o++],pe(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],pe(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=cD[l];b[0]=e[o++],b[1]=e[o++],pe(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var th=Math.sqrt,zs=Math.sin,Vs=Math.cos,Ya=Math.PI;function jg(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Fc(r,t){return(r[0]*t[0]+r[1]*t[1])/(jg(r)*jg(t))}function Jg(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Fc(r,t))}function ty(r,t,e,n,i,a,o,s,l,u,f){var h=l*(Ya/180),v=Vs(h)*(r-e)/2+zs(h)*(t-n)/2,c=-1*zs(h)*(r-e)/2+Vs(h)*(t-n)/2,d=v*v/(o*o)+c*c/(s*s);d>1&&(o*=th(d),s*=th(d));var p=(i===a?-1:1)*th((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=p*o*c/s,y=p*-s*v/o,m=(r+e)/2+Vs(h)*g-zs(h)*y,_=(t+n)/2+zs(h)*g+Vs(h)*y,S=Jg([1,0],[(v-g)/o,(c-y)/s]),b=[(v-g)/o,(c-y)/s],x=[(-1*v-g)/o,(-1*c-y)/s],w=Jg(b,x);if(Fc(b,x)<=-1&&(w=Ya),Fc(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Ya*1e6)/1e6;w=Ya*2+T%2*Ya}f.addData(u,m,_,o,s,S,w,h,a)}var pD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yD(r){var t=new Ii;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=Ii.CMD,l=r.match(pD);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],h=f.charAt(0),v=void 0,c=f.match(gD)||[],d=c.length,p=0;p<d;p++)c[p]=parseFloat(c[p]);for(var g=0;g<d;){var y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=e,D=n,A=void 0,C=void 0;switch(h){case"l":e+=c[g++],n+=c[g++],v=s.L,t.addData(v,e,n);break;case"L":e=c[g++],n=c[g++],v=s.L,t.addData(v,e,n);break;case"m":e+=c[g++],n+=c[g++],v=s.M,t.addData(v,e,n),i=e,a=n,h="l";break;case"M":e=c[g++],n=c[g++],v=s.M,t.addData(v,e,n),i=e,a=n,h="L";break;case"h":e+=c[g++],v=s.L,t.addData(v,e,n);break;case"H":e=c[g++],v=s.L,t.addData(v,e,n);break;case"v":n+=c[g++],v=s.L,t.addData(v,e,n);break;case"V":n=c[g++],v=s.L,t.addData(v,e,n);break;case"C":v=s.C,t.addData(v,c[g++],c[g++],c[g++],c[g++],c[g++],c[g++]),e=c[g-2],n=c[g-1];break;case"c":v=s.C,t.addData(v,c[g++]+e,c[g++]+n,c[g++]+e,c[g++]+n,c[g++]+e,c[g++]+n),e+=c[g-2],n+=c[g-1];break;case"S":y=e,m=n,A=t.len(),C=t.data,o===s.C&&(y+=e-C[A-4],m+=n-C[A-3]),v=s.C,T=c[g++],D=c[g++],e=c[g++],n=c[g++],t.addData(v,y,m,T,D,e,n);break;case"s":y=e,m=n,A=t.len(),C=t.data,o===s.C&&(y+=e-C[A-4],m+=n-C[A-3]),v=s.C,T=e+c[g++],D=n+c[g++],e+=c[g++],n+=c[g++],t.addData(v,y,m,T,D,e,n);break;case"Q":T=c[g++],D=c[g++],e=c[g++],n=c[g++],v=s.Q,t.addData(v,T,D,e,n);break;case"q":T=c[g++]+e,D=c[g++]+n,e+=c[g++],n+=c[g++],v=s.Q,t.addData(v,T,D,e,n);break;case"T":y=e,m=n,A=t.len(),C=t.data,o===s.Q&&(y+=e-C[A-4],m+=n-C[A-3]),e=c[g++],n=c[g++],v=s.Q,t.addData(v,y,m,e,n);break;case"t":y=e,m=n,A=t.len(),C=t.data,o===s.Q&&(y+=e-C[A-4],m+=n-C[A-3]),e+=c[g++],n+=c[g++],v=s.Q,t.addData(v,y,m,e,n);break;case"A":_=c[g++],S=c[g++],b=c[g++],x=c[g++],w=c[g++],T=e,D=n,e=c[g++],n=c[g++],v=s.A,ty(T,D,e,n,x,w,_,S,b,v,t);break;case"a":_=c[g++],S=c[g++],b=c[g++],x=c[g++],w=c[g++],T=e,D=n,e+=c[g++],n+=c[g++],v=s.A,ty(T,D,e,n,x,w,_,S,b,v,t);break}}(h==="z"||h==="Z")&&(v=s.Z,t.addData(v),e=i,n=a),o=v}return t.toStatic(),t}var ox=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(bt);function sx(r){return r.setData!=null}function lx(r,t){var e=yD(r),n=F({},t);return n.buildPath=function(i){var a=sx(i);if(a&&i.canSave()){i.appendPath(e);var o=i.getContext();o&&i.rebuildPath(o,1)}else{var o=a?i.getContext():i;o&&e.rebuildPath(o,1)}},n.applyTransform=function(i){dD(e,i),this.dirtyShape()},n}function mD(r,t){return new ox(lx(r,t))}function _D(r,t){var e=lx(r,t),n=(function(i){B(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})(ox);return n}function SD(r,t){for(var e=[],n=r.length,i=0;i<n;i++){var a=r[i];e.push(a.getUpdatedPathProxy(!0))}var o=new bt(t);return o.createPathProxy(),o.buildPath=function(s){if(sx(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var xD=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),ds=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new xD},t.prototype.buildPath=function(e,n){e.moveTo(n.cx+n.r,n.cy),e.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t})(bt);ds.prototype.type="circle";var bD=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),gd=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new bD},t.prototype.buildPath=function(e,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,f=l*i;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-f,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-f,a+s,o),e.bezierCurveTo(a+s,o+f,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+f,a-s,o),e.closePath()},t})(bt);gd.prototype.type="ellipse";var ux=Math.PI,eh=ux*2,Kn=Math.sin,Yi=Math.cos,wD=Math.acos,oe=Math.atan2,ey=Math.abs,Do=Math.sqrt,yo=Math.max,yr=Math.min,je=1e-4;function TD(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,v=h*l-f*u;if(!(v*v<je))return v=(f*(t-a)-h*(r-i))/v,[r+v*l,t+v*u]}function Fs(r,t,e,n,i,a,o){var s=r-e,l=t-n,u=(o?a:-a)/Do(s*s+l*l),f=u*l,h=-u*s,v=r+f,c=t+h,d=e+f,p=n+h,g=(v+d)/2,y=(c+p)/2,m=d-v,_=p-c,S=m*m+_*_,b=i-a,x=v*p-d*c,w=(_<0?-1:1)*Do(yo(0,b*b*S-x*x)),T=(x*_-m*w)/S,D=(-x*m-_*w)/S,A=(x*_+m*w)/S,C=(-x*m+_*w)/S,L=T-g,I=D-y,P=A-g,R=C-y;return L*L+I*I>P*P+R*R&&(T=A,D=C),{cx:T,cy:D,x0:-f,y0:-h,x1:T*(i/b-1),y1:D*(i/b-1)}}function CD(r){var t;if(H(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function MD(r,t){var e,n=yo(t.r,0),i=yo(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 f=t.cx,h=t.cy,v=!!t.clockwise,c=ey(u-l),d=c>eh&&c%eh;if(d>je&&(c=d),!(n>je))r.moveTo(f,h);else if(c>eh-je)r.moveTo(f+n*Yi(l),h+n*Kn(l)),r.arc(f,h,n,l,u,!v),i>je&&(r.moveTo(f+i*Yi(u),h+i*Kn(u)),r.arc(f,h,i,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,D=void 0,A=void 0,C=void 0,L=void 0,I=void 0,P=void 0,R=n*Yi(l),E=n*Kn(l),O=i*Yi(u),k=i*Kn(u),z=c>je;if(z){var V=t.cornerRadius;V&&(e=CD(V),p=e[0],g=e[1],y=e[2],m=e[3]);var G=ey(n-i)/2;if(_=yr(G,y),S=yr(G,m),b=yr(G,p),x=yr(G,g),D=w=yo(_,S),A=T=yo(b,x),(w>je||T>je)&&(C=n*Yi(u),L=n*Kn(u),I=i*Yi(l),P=i*Kn(l),c<ux)){var W=TD(R,E,I,P,C,L,O,k);if(W){var Z=R-W[0],rt=E-W[1],lt=C-W[0],Ct=L-W[1],Ot=1/Kn(wD((Z*lt+rt*Ct)/(Do(Z*Z+rt*rt)*Do(lt*lt+Ct*Ct)))/2),ut=Do(W[0]*W[0]+W[1]*W[1]);D=yr(w,(n-ut)/(Ot+1)),A=yr(T,(i-ut)/(Ot-1))}}}if(!z)r.moveTo(f+R,h+E);else if(D>je){var tt=yr(y,D),pt=yr(m,D),K=Fs(I,P,R,E,n,tt,v),nt=Fs(C,L,O,k,n,pt,v);r.moveTo(f+K.cx+K.x0,h+K.cy+K.y0),D<w&&tt===pt?r.arc(f+K.cx,h+K.cy,D,oe(K.y0,K.x0),oe(nt.y0,nt.x0),!v):(tt>0&&r.arc(f+K.cx,h+K.cy,tt,oe(K.y0,K.x0),oe(K.y1,K.x1),!v),r.arc(f,h,n,oe(K.cy+K.y1,K.cx+K.x1),oe(nt.cy+nt.y1,nt.cx+nt.x1),!v),pt>0&&r.arc(f+nt.cx,h+nt.cy,pt,oe(nt.y1,nt.x1),oe(nt.y0,nt.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,n,l,u,!v);if(!(i>je)||!z)r.lineTo(f+O,h+k);else if(A>je){var tt=yr(p,A),pt=yr(g,A),K=Fs(O,k,C,L,i,-pt,v),nt=Fs(R,E,I,P,i,-tt,v);r.lineTo(f+K.cx+K.x0,h+K.cy+K.y0),A<T&&tt===pt?r.arc(f+K.cx,h+K.cy,A,oe(K.y0,K.x0),oe(nt.y0,nt.x0),!v):(pt>0&&r.arc(f+K.cx,h+K.cy,pt,oe(K.y0,K.x0),oe(K.y1,K.x1),!v),r.arc(f,h,i,oe(K.cy+K.y1,K.cx+K.x1),oe(nt.cy+nt.y1,nt.cx+nt.x1),v),tt>0&&r.arc(f+nt.cx,h+nt.cy,tt,oe(nt.y1,nt.x1),oe(nt.y0,nt.x0),!v))}else r.lineTo(f+O,h+k),r.arc(f,h,i,u,l,v)}r.closePath()}}}var AD=(function(){function r(){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 r})(),sr=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new AD},t.prototype.buildPath=function(e,n){MD(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(bt);sr.prototype.type="sector";var DD=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Xu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new DD},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t})(bt);Xu.prototype.type="ring";function ID(r,t,e,n){var i=[],a=[],o=[],s=[],l,u,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v<c;v++)oa(f,f,r[v]),sa(h,h,r[v]);oa(f,f,n[0]),sa(h,h,n[1])}for(var v=0,c=r.length;v<c;v++){var d=r[v];if(e)l=r[v?v-1:c-1],u=r[(v+1)%c];else if(v===0||v===c-1){i.push(fC(r[v]));continue}else l=r[v-1],u=r[v+1];oS(a,u,l),gf(a,a,t);var p=lc(d,l),g=lc(d,u),y=p+g;y!==0&&(p/=y,g/=y),gf(o,a,-p),gf(s,a,g);var m=Hp([],d,o),_=Hp([],d,s);n&&(sa(m,m,f),oa(m,m,h),sa(_,_,f),oa(_,_,h)),i.push(m),i.push(_)}return e&&i.push(i.shift()),i}function fx(r,t,e){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=ID(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}e&&r.closePath()}}var LD=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),Ir=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new LD},t.prototype.buildPath=function(e,n){fx(e,n,!0)},t})(bt);Ir.prototype.type="polygon";var PD=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),fr=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new PD},t.prototype.buildPath=function(e,n){fx(e,n,!1)},t})(bt);fr.prototype.type="polyline";var RD={},ED=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),lr=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ED},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=qS(RD,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&&(e.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var n=this.shape;return[n.x1*(1-e)+n.x2*e,n.y1*(1-e)+n.y2*e]},t})(bt);lr.prototype.type="line";var me=[],kD=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function ry(r,t,e){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(e?eg:te)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?eg:te)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?rg:Se)(r.x1,r.cpx1,r.x2,t),(e?rg:Se)(r.y1,r.cpy1,r.y2,t)]}var $u=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new kD},t.prototype.buildPath=function(e,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,f=n.cpx2,h=n.cpy2,v=n.percent;v!==0&&(e.moveTo(i,a),f==null||h==null?(v<1&&($l(i,l,o,v,me),l=me[1],o=me[2],$l(a,u,s,v,me),u=me[1],s=me[2]),e.quadraticCurveTo(l,u,o,s)):(v<1&&(Xl(i,l,f,o,v,me),l=me[1],f=me[2],o=me[3],Xl(a,u,h,s,v,me),u=me[1],h=me[2],s=me[3]),e.bezierCurveTo(l,u,f,h,o,s)))},t.prototype.pointAt=function(e){return ry(this.shape,e,!1)},t.prototype.tangentAt=function(e){var n=ry(this.shape,e,!0);return jv(n,n)},t})(bt);$u.prototype.type="bezier-curve";var OD=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),qu=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new OD},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,f=Math.cos(s),h=Math.sin(s);e.moveTo(f*o+i,h*o+a),e.arc(i,a,o,s,l,!u)},t})(bt);qu.prototype.type="arc";var BD=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,n=this.shapeChanged(),i=0;i<e.length;i++)n=n||e[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(n[0],n[1],e[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(e,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],n=0;n<e.length;n++)e[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),bt.prototype.getBoundingRect.call(this)},t})(bt),hx=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),Ku=(function(r){B(t,r);function t(e,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(hx),ND=(function(r){B(t,r);function t(e,n,i,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t})(hx),rh=Math.min,zD=Math.max,Gs=Math.abs,Qn=[0,0],jn=[0,0],Kt=uS(),Hs=Kt.minTv,Ws=Kt.maxTv,cx=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ht;for(var n=0;n<2;n++)this._axes[n]=new ht;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){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),e)for(var u=0;u<4;u++)n[u].transform(e);ht.sub(i[0],n[1],n[0]),ht.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])},r.prototype.intersect=function(t,e,n){var i=!0,a=!e;return e&&ht.set(e,0,0),Kt.reset(n,!a),!this._intersectCheckOneSide(this,t,a,1)&&(i=!1,a)||!this._intersectCheckOneSide(t,this,a,-1)&&(i=!1,a)||!a&&!Kt.negativeSize&&ht.copy(e,i?Kt.useDir?Kt.dirMinTv:Hs:Ws),i},r.prototype._intersectCheckOneSide=function(t,e,n,i){for(var a=!0,o=0;o<2;o++){var s=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Qn),t._getProjMinMaxOnAxis(o,e._corners,jn),Kt.negativeSize||Qn[1]<jn[0]||Qn[0]>jn[1]){if(a=!1,Kt.negativeSize||n)return a;var l=Gs(jn[0]-Qn[1]),u=Gs(Qn[0]-jn[1]);rh(l,u)>Ws.len()&&(l<u?ht.scale(Ws,s,-l*i):ht.scale(Ws,s,u*i))}else if(!n){var l=Gs(jn[0]-Qn[1]),u=Gs(Qn[0]-jn[1]);(Kt.useDir||rh(l,u)<Hs.len())&&((l<u||!Kt.bidirectional)&&(ht.scale(Hs,s,l*i),Kt.useDir&&Kt.calcDirMTV()),(l>=u||!Kt.bidirectional)&&(ht.scale(Hs,s,-u*i),Kt.useDir&&Kt.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],a=this._origin,o=e[0].dot(i)+a[t],s=o,l=o,u=1;u<e.length;u++){var f=e[u].dot(i)+a[t];s=rh(f,s),l=zD(f,l)}n[0]=s+Kt.touchThreshold,n[1]=l-Kt.touchThreshold,Kt.negativeSize=n[1]<n[0]},r})(),VD=[],FD=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,n){e.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(e,n){n?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,n){n=n||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var n=this._cursor;n<this._displayables.length;n++)e&&e(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)e&&e(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.parent=this,n.update(),n.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ot(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(VD)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,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(e,n))return!0}return!1},t})(ka),GD=wt();function HD(r,t,e,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,h=void 0;n?(u=et(n.duration,200),f=et(n.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(h=a.delay)),Q(h)&&(h=h(e,i)),Q(u)&&(u=u(e));var v={duration:u||0,delay:h,easing:f};return v}else return null}function yd(r,t,e,n,i,a,o){var s=!1,l;Q(i)?(o=a,a=i,i=null):j(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=HD(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(f&&f.duration>0){var h=f.duration,v=f.delay,c=f.easing,d={duration:h,delay:v||0,easing:c,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Et(r,t,e,n,i,a){yd("update",r,t,e,n,i,a)}function zt(r,t,e,n,i,a){yd("enter",r,t,e,n,i,a)}function Io(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function ru(r,t,e,n,i,a){Io(r)||yd("leave",r,t,e,n,i,a)}function ny(r,t,e,n){r.removeTextContent(),r.removeTextGuideLine(),ru(r,{style:{opacity:0}},t,e,n)}function pa(r,t,e){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||ny(i,t,e,n)}):ny(r,t,e,n)}function qr(r){GD(r).oldStyle=r.style}var Gc={},hn=["x","y"],ba=["width","height"];function WD(r){return bt.extend(r)}var UD=_D;function YD(r,t){return UD(r,t)}function hr(r,t){Gc[r]=t}function ZD(r){if(Gc.hasOwnProperty(r))return Gc[r]}function md(r,t,e,n){var i=mD(r,t);return e&&(n==="center"&&(e=dx(e,i.getBoundingRect())),px(i,e)),i}function vx(r,t,e){var n=new Xe({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(e==="center"){var a={width:i.width,height:i.height};n.setStyle(dx(t,a))}}});return n}function dx(r,t){var e=t.width/t.height,n=r.height*e,i;n<=r.width?i=r.height:(n=r.width,i=n/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Hc=SD;function px(r,t){if(r.applyTransform){var e=r.getBoundingRect(),n=e.calculateTransform(t);r.applyTransform(n)}}function Yo(r,t){return qS(r,r,{lineWidth:t}),r}function XD(r,t){return KS(r,r,t),r}var $D=vi;function bi(r,t){for(var e=td([]);r&&r!==t;)wo(e,r.getLocalTransform(),e),r=r.parent;return e}function Yr(r,t,e){return t&&!be(t)&&(t=ci.getLocalTransform(t)),e&&(t=Pa([],t)),pe([],r,t)}function Qu(r,t,e){var n=t[4]===0||t[5]===0||t[0]===0?1:br(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:br(2*t[4]/t[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=Yr(a,t,e),br(a[0])>br(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function iy(r){return!r.isGroup}function qD(r){return r.shape!=null}function _d(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){iy(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return qD(o)&&(s.shape=J(o.shape)),s}var a=n(r);t.traverse(function(o){if(iy(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Et(o,l,e,vt(o).dataIndex)}}})}function gx(r,t){return U(r,function(e){var n=e[0];n=Ae(n,t.x),n=zo(n,t.x+t.width);var i=e[1];return i=Ae(i,t.y),i=zo(i,t.y+t.height),[n,i]})}function KD(r,t){var e=Ae(r.x,t.x),n=zo(r.x+r.width,t.x+t.width),i=Ae(r.y,t.y),a=zo(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function ju(r,t,e){var n=F({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),gt(i,e),new Xe(n)):md(r.replace("path://",""),n,e,"center")}function QD(r,t,e,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(yx(r,t,e,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function yx(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,v=nh(f,h,l,u);if(jD(v))return!1;var c=r-i,d=t-a,p=nh(c,d,l,u)/v;if(p<0||p>1)return!1;var g=nh(c,d,f,h)/v;return!(g<0||g>1)}function nh(r,t,e,n){return r*n-e*t}function jD(r){return r<=1e-6&&r>=-1e-6}function nu(r,t,e,n,i){return t==null||(xt(t)?Lt[0]=Lt[1]=Lt[2]=Lt[3]=t:(Lt[0]=t[0],Lt[1]=t[1],Lt[2]=t[2],Lt[3]=t[3]),n&&(Lt[0]=Ae(0,Lt[0]),Lt[1]=Ae(0,Lt[1]),Lt[2]=Ae(0,Lt[2]),Lt[3]=Ae(0,Lt[3])),e&&(Lt[0]=-Lt[0],Lt[1]=-Lt[1],Lt[2]=-Lt[2],Lt[3]=-Lt[3]),ay(r,Lt,"x","width",3,1,i&&i[0]||0),ay(r,Lt,"y","height",0,2,i&&i[1]||0)),r}var Lt=[0,0,0,0];function ay(r,t,e,n,i,a,o){var s=t[a]+t[i],l=r[n];r[n]+=s,o=Ae(0,zo(o,l)),r[n]<o?(r[n]=o,r[e]+=t[i]>=0?-t[i]:t[a]>=0?l+t[a]:br(s)>1e-8?(l-o)*t[i]/s:0):r[e]-=t[i]}function ps(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=X(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&M(Pt(l),function(f){nr(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=vt(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:gt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Wc(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Oa(r,t){if(r)if(H(r))for(var e=0;e<r.length;e++)Wc(r[e],t);else Wc(r,t)}function Sd(r){return!r||br(r[1])<Us&&br(r[2])<Us||br(r[0])<Us&&br(r[3])<Us}var Us=1e-5;function Zo(r,t){return r?ot.copy(r,t):t.clone()}function xd(r,t){return t?ed(r||Fe(),t):void 0}function wa(r){return{z:r.get("z")||0,zlevel:r.get("zlevel")||0}}function JD(r){var t=-1/0,e=1/0;Wc(r,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<e&&(e=o)}}return e>t&&(e=t=0),{min:e,max:t}}function bd(r,t,e){mx(r,t,e,-1/0)}function mx(r,t,e,n){if(r.ignoreModelZ)return n;var i=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l<s.length;l++)n=Ae(mx(s[l],t,e,n),n);else r.z=t,r.zlevel=e,n=Ae(r.z2||0,n);if(i&&(i.z=t,i.zlevel=e,isFinite(n)&&(i.z2=n+2)),a){var u=r.textGuideLineConfig;a.z=t,a.zlevel=e,isFinite(n)&&(a.z2=n+(u&&u.showAbove?1:-1))}return n}hr("circle",ds);hr("ellipse",gd);hr("sector",sr);hr("ring",Xu);hr("polygon",Ir);hr("polyline",fr);hr("rect",_t);hr("line",lr);hr("bezierCurve",$u);hr("arc",qu);const wd=Object.freeze(Object.defineProperty({__proto__:null,Arc:qu,BezierCurve:$u,BoundingRect:ot,Circle:ds,CompoundPath:BD,Ellipse:gd,Group:yt,Image:Xe,IncrementalDisplayable:FD,Line:lr,LinearGradient:Ku,OrientedBoundingRect:cx,Path:bt,Point:ht,Polygon:Ir,Polyline:fr,RadialGradient:ND,Rect:_t,Ring:Xu,Sector:sr,Text:Tt,WH:ba,XY:hn,applyTransform:Yr,calcZ2Range:JD,clipPointsByRect:gx,clipRectByRect:KD,createIcon:ju,ensureCopyRect:Zo,ensureCopyTransform:xd,expandOrShrinkRect:nu,extendPath:YD,extendShape:WD,getShapeClass:ZD,getTransform:bi,groupTransition:_d,initProps:zt,isBoundingRectAxisAligned:Sd,isElementRemoved:Io,lineLineIntersect:yx,linePolygonIntersect:QD,makeImage:vx,makePath:md,mergePath:Hc,registerShape:hr,removeElement:ru,removeElementWithFadeOut:pa,resizePath:px,retrieveZInfo:wa,setTooltipConfig:ps,subPixelOptimize:$D,subPixelOptimizeLine:Yo,subPixelOptimizeRect:XD,transformDirection:Qu,traverseElements:Oa,traverseUpdateZ:bd,updateProps:Et},Symbol.toStringTag,{value:"Module"}));var Ju={};function _x(r,t){for(var e=0;e<ye.length;e++){var n=ye[e],i=t[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function Uc(r,t,e){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=Q(r.defaultText)?r.defaultText(i,r,e):r.defaultText);for(var l={normal:s},u=0;u<ye.length;u++){var f=ye[u],h=t[f];l[f]=et(n?n.getFormattedLabel(i,f,null,a,h&&h.get("formatter")):null,s)}return l}function Ue(r,t,e,n){e=e||Ju;for(var i=r instanceof Tt,a=!1,o=0;o<Wo.length;o++){var s=t[Wo[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new Tt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Uc(e,t),f=t.normal,h=!!f.getShallow("show"),v=Wt(f,n&&n.normal,e,!1,!i);v.text=u.normal,i||r.setTextConfig(oy(f,e,!1));for(var o=0;o<ye.length;o++){var c=ye[o],s=t[c];if(s){var d=l.ensureState(c),p=!!et(s.getShallow("show"),h);if(p!==h&&(d.ignore=!p),d.style=Wt(s,n&&n[c],e,!0,!i),d.style.text=u[c],!i){var g=r.ensureState(c);g.textConfig=oy(s,e,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(v.x=l.style.x),l.style.y!=null&&(v.y=l.style.y),l.ignore=!h,l.useStyle(v),l.dirty(),e.enableTextSetter&&(gs(l).setLabelText=function(y){var m=Uc(e,t,y);_x(l,m)})}else l&&(l.ignore=!0);r.dirty()}function Te(r,t){t=t||"label";for(var e={normal:r.getModel(t)},n=0;n<ye.length;n++){var i=ye[n];e[i]=r.getModel([i,t])}return e}function Wt(r,t,e,n,i){var a={};return tI(a,r,e,n,i),t&&F(a,t),a}function oy(r,t,e){t=t||{};var n={},i,a=r.getShallow("rotate"),o=et(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(e?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=r.get("color")==="inherit"?t.inheritColor||null:"auto",t.autoOverflowArea!=null&&(n.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(n.layoutRect=t.layoutRect),n}function tI(r,t,e,n,i){e=e||Ju;var a=t.ecModel,o=a&&a.option.textStyle,s=eI(t),l;if(s){l={};var u="richInheritPlainLabel",f=et(t.get(u),a?a.get(u):void 0);for(var h in s)if(s.hasOwnProperty(h)){var v=t.getModel(["rich",h]);fy(l[h]={},v,o,t,f,e,n,i,!1,!0)}}l&&(r.rich=l);var c=t.get("overflow");c&&(r.overflow=c);var d=t.get("lineOverflow");d&&(r.lineOverflow=d);var p=r,g=t.get("minMargin");if(g!=null)g=xt(g)?g/2:0,p.margin=[g,g,g,g],p.__marginType=ha.minMargin;else{var y=t.get("textMargin");y!=null&&(p.margin=Bu(y),p.__marginType=ha.textMargin)}fy(r,t,o,null,null,e,n,i,!0,!1)}function eI(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||Ju).rich;if(e){t=t||{};for(var n=Pt(e),i=0;i<n.length;i++){var a=n[i];t[a]=1}}r=r.parentModel}return t}var sy=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ly=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],uy=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function fy(r,t,e,n,i,a,o,s,l,u){e=!o&&e||Ju;var f=a&&a.inheritColor,h=t.getShallow("color"),v=t.getShallow("textBorderColor"),c=et(t.getShallow("opacity"),e.opacity);(h==="inherit"||h==="auto")&&(f?h=f:h=null),(v==="inherit"||v==="auto")&&(f?v=f:v=null),s||(h=h||e.color,v=v||e.textBorderColor),h!=null&&(r.fill=h),v!=null&&(r.stroke=v);var d=et(t.getShallow("textBorderWidth"),e.textBorderWidth);d!=null&&(r.lineWidth=d);var p=et(t.getShallow("textBorderType"),e.textBorderType);p!=null&&(r.lineDash=p);var g=et(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);g!=null&&(r.lineDashOffset=g),!o&&c==null&&!u&&(c=a&&a.defaultOpacity),c!=null&&(r.opacity=c),!o&&!s&&r.fill==null&&a.inheritColor&&(r.fill=a.inheritColor);for(var y=0;y<sy.length;y++){var m=sy[y],_=i!==!1&&n?_n(t.getShallow(m),n.getShallow(m),e[m]):et(t.getShallow(m),e[m]);_!=null&&(r[m]=_)}for(var y=0;y<ly.length;y++){var m=ly[y],_=t.getShallow(m);_!=null&&(r[m]=_)}if(r.verticalAlign==null){var S=t.getShallow("baseline");S!=null&&(r.verticalAlign=S)}if(!l||!a.disableBox){for(var y=0;y<uy.length;y++){var m=uy[y],_=t.getShallow(m);_!=null&&(r[m]=_)}var b=t.getShallow("borderType");b!=null&&(r.borderDash=b),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&f&&(r.backgroundColor=f),(r.borderColor==="auto"||r.borderColor==="inherit")&&f&&(r.borderColor=f)}}function Sx(r,t){var e=t&&t.getModel("textStyle");return xr([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var gs=wt();function xx(r,t,e,n){if(r){var i=gs(r);i.prevValue=i.value,i.value=e;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}function rI(r,t,e,n,i){var a=gs(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=et(a.interpolatedValue,a.prevValue),l=a.value;function u(f){var h=VS(e,a.precision,s,l,f);a.interpolatedValue=f===1?null:h;var v=Uc({labelDataIndex:t,labelFetcher:i,defaultText:o?o(h):h+""},a.statesModels,h);_x(r,v)}r.percent=0,(a.prevValue==null?zt:Et)(r,{percent:1},n,t,null,u)}var ha={minMargin:1,textMargin:2},nI=["textStyle","color"],ih=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],ah=new Tt,iI=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(nI):null)},r.prototype.getFont=function(){return Sx({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<ih.length;n++)e[ih[n]]=this.getShallow(ih[n]);return ah.useStyle(e),ah.update(),ah.getBoundingRect()},r})(),bx=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],aI=Di(bx),oI=(function(){function r(){}return r.prototype.getLineStyle=function(t){return aI(this,t)},r})(),Tx=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],sI=Di(Tx),lI=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return sI(this,t,e)},r})(),Dt=(function(){function r(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return r.prototype.init=function(t,e,n){},r.prototype.mergeOption=function(t,e){ft(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var n=this.option,i=n==null?n:n[t];if(i==null&&!e){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},r.prototype.getModel=function(t,e){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(J(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!ct.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){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&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},r})();sd(Dt);nA(Dt);fe(Dt,oI);fe(Dt,lI);fe(Dt,lA);fe(Dt,iI);var uI=Math.round(Math.random()*10);function ys(r){return[r||"",uI++].join("_")}function fI(r){var t={};r.registerSubTypeDefaulter=function(e,n){var i=Tr(e);t[i.main]=n},r.determineSubType=function(e,n){var i=n.type;if(!i){var a=Tr(e).main;r.hasSubTypes(e)&&t[a]&&(i=t[a](n))}return i}}function hI(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),f=u.graph,h=u.noEntryList,v={};for(M(a,function(m){v[m]=!0});h.length;){var c=h.pop(),d=f[c],p=!!v[c];p&&(s.call(l,c,d.originalDeps.slice()),delete v[c]),M(d.successor,p?y:g)}M(v,function(){var m="";throw new Error(m)});function g(m){f[m].entryCount--,f[m].entryCount===0&&h.push(m)}function y(m){v[m]=!0,g(m)}};function e(a){var o={},s=[];return M(a,function(l){var u=n(o,l),f=u.originalDeps=t(l),h=i(f,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),M(h,function(v){dt(u.predecessor,v)<0&&u.predecessor.push(v);var c=n(o,v);dt(c.successor,v)<0&&c.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 M(a,function(l){dt(o,l)>=0&&s.push(l)}),s}}function Ba(r,t){return ft(ft({},r,!0),t,!0)}const cI={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:". "}}}},vI={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 iu="ZH",Td="EN",ga=Td,El={},Cd={},Cx=ct.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ga).toUpperCase();return r.indexOf(iu)>-1?iu:ga})():ga;function Mx(r,t){r=r.toUpperCase(),Cd[r]=new Dt(t),El[r]=t}function dI(r){if(X(r)){var t=El[r.toUpperCase()]||{};return r===iu||r===Td?J(t):ft(J(t),J(El[ga]),!1)}else return ft(J(r),J(El[ga]),!1)}function pI(r){return Cd[r]}function gI(){return Cd[ga]}Mx(Td,cI);Mx(iu,vI);var yI=null;function au(){return yI}var Md=1e3,Ad=Md*60,Lo=Ad*60,Ve=Lo*24,hy=Ve*365,mI={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})/},kl={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},_I="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Ys="{yyyy}-{MM}-{dd}",cy={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ys,hour:Ys+" "+kl.hour,minute:Ys+" "+kl.minute,second:Ys+" "+kl.second,millisecond:_I},wi=["year","month","day","hour","minute","second","millisecond"],SI=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function xI(r){return!X(r)&&!Q(r)?bI(r):r}function bI(r){r=r||{};var t={},e=!0;return M(wi,function(n){e&&(e=r[n]==null)}),M(wi,function(n,i){var a=r[n];t[n]={};for(var o=null,s=i;s>=0;s--){var l=wi[s],u=j(a)&&!H(a)?a[l]:a,f=void 0;H(u)?(f=u.slice(),o=f[0]||""):X(u)?(o=u,f=[o]):(o==null?o=kl[n]:mI[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[n][l]=f}}),t}function tn(r,t){return r+="","0000".substr(0,t-r.length)+r}function Po(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function wI(r){return r===Po(r)}function TI(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function tf(r,t,e,n){var i=Ra(r),a=i[Ax(e)](),o=i[Dd(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[Id(e)](),u=i["get"+(e?"UTC":"")+"Day"](),f=i[Ld(e)](),h=(f-1)%12+1,v=i[Pd(e)](),c=i[Rd(e)](),d=i[Ed(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=n instanceof Dt?n:pI(n||Cx)||gI(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,tn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,tn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,tn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,tn(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,tn(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,tn(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,tn(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,tn(d,3)).replace(/{S}/g,d+"")}function CI(r,t,e,n,i){var a=null;if(X(e))a=e;else if(Q(e)){var o={time:r.time,level:r.time.level},s=au();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var f=ou(r.value,i);a=e[f][f][0]}}return tf(new Date(r.value),a,i,n)}function ou(r,t){var e=Ra(r),n=e[Dd(t)]()+1,i=e[Id(t)](),a=e[Ld(t)](),o=e[Pd(t)](),s=e[Rd(t)](),l=e[Ed(t)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&a===0,c=v&&i===1,d=c&&n===1;return d?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Yc(r,t,e){switch(t){case"year":r[Dx(e)](0);case"month":r[Ix(e)](1);case"day":r[Lx(e)](0);case"hour":r[Px(e)](0);case"minute":r[Rx(e)](0);case"second":r[Ex(e)](0)}return r}function Ax(r){return r?"getUTCFullYear":"getFullYear"}function Dd(r){return r?"getUTCMonth":"getMonth"}function Id(r){return r?"getUTCDate":"getDate"}function Ld(r){return r?"getUTCHours":"getHours"}function Pd(r){return r?"getUTCMinutes":"getMinutes"}function Rd(r){return r?"getUTCSeconds":"getSeconds"}function Ed(r){return r?"getUTCMilliseconds":"getMilliseconds"}function MI(r){return r?"setUTCFullYear":"setFullYear"}function Dx(r){return r?"setUTCMonth":"setMonth"}function Ix(r){return r?"setUTCDate":"setDate"}function Lx(r){return r?"setUTCHours":"setHours"}function Px(r){return r?"setUTCMinutes":"setMinutes"}function Rx(r){return r?"setUTCSeconds":"setSeconds"}function Ex(r){return r?"setUTCMilliseconds":"setMilliseconds"}function kx(r){if(!PM(r))return X(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Ox(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var ms=Bu;function Zc(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&xr(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?Ra(r):r;if(isNaN(+l)){if(s)return"-"}else return tf(l,n,e)}if(t==="ordinal")return sc(r)?i(r):xt(r)&&a(r)?r+"":"-";var u=Fo(r);return a(u)?kx(u):sc(r)?i(r):typeof r=="boolean"?r+"":"-"}var vy=["a","b","c","d","e","f","g"],oh=function(r,t){return"{"+r+(t??"")+"}"};function Bx(r,t,e){H(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=vy[a];r=r.replace(oh(o),oh(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];r=r.replace(oh(vy[l],s),e?_e(u):u)}return r}function AI(r,t){var e=X(r)?{color:r,extraCssText:t}:r||{},n=e.color,i=e.type;t=e.extraCssText;var a=e.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:'+_e(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+_e(n)+";"+(t||"")+'"></span>';var o=e.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 Li(r,t){return t=t||"transparent",X(r)?r:j(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function su(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Ol={},sh={},_s=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=n(Ol),this._normalMasterList=n(sh);function n(i,a){var o=[];return M(i,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){M(this._normalMasterList,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){Ol[t]=e;return}sh[t]=e},r.get=function(t){return sh[t]||Ol[t]},r})();function DI(r){return!!Ol[r]}var Xc={coord:1,coord2:2};function II(r){Nx.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var Nx=it();function LI(r){var t=r.getShallow("coord",!0),e=Xc.coord;if(t==null){var n=Nx.get(r.type);n&&n.getCoord2&&(e=Xc.coord2,t=n.getCoord2(r))}return{coord:t,from:e}}var Vr={none:0,dataCoordSys:1,boxCoordSys:2};function PI(r,t){var e=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),i=Vr.none;if(e){var a=r.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=Vr.dataCoordSys,a||(i=Vr.none)):n==="box"&&(i=Vr.boxCoordSys,!a&&!DI(e)&&(i=Vr.none))}return{coordSysType:e,kind:i}}function RI(r){var t=r.targetModel,e=r.coordSysType,n=r.coordSysProvider,i=r.isDefaultDataCoordSys,a=PI(t),o=a.kind,s=a.coordSysType;if(i&&o!==Vr.dataCoordSys&&(o=Vr.dataCoordSys,s=e),o===Vr.none||s!==e)return!1;var l=n(e,t);return l?(o===Vr.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var Bl=M,EI=["left","right","top","bottom","width","height"],Zs=[["width","left","right"],["height","top","bottom"]];function kd(r,t,e,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 f=l.getBoundingRect(),h=t.childAt(u+1),v=h&&h.getBoundingRect(),c,d;if(r==="horizontal"){var p=f.width+(v?-v.x+f.x:0);c=a+p,c>n||l.newline?(a=0,c=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);d=o+g,d>i||l.newline?(a+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=c+e:o=d+e)})}var Ti=kd;at(kd,"vertical");at(kd,"horizontal");function kI(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function OI(r,t){var e=Ie(r,t,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),i,a;if(e.type===mo.point)a=e.refPoint,i=ie(n,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=H(o)?o:[o,o];i=ie(n,e.refContainer),a=e.boxCoordFrom===Xc.coord2?e.refPoint:[q(s[0],i.width)+i.x,q(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function BI(r,t){var e=OI(r,t),n=e.viewRect,i=e.center,a=r.get("radius");H(a)||(a=[0,a]);var o=q(n.width,t.getWidth()),s=q(n.height,t.getHeight()),l=Math.min(o,s),u=q(a[0],l/2),f=q(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:f,viewRect:n}}function ie(r,t,e){e=ms(e||0);var n=t.width,i=t.height,a=q(r.left,n),o=q(r.top,i),s=q(r.right,n),l=q(r.bottom,i),u=q(r.width,n),f=q(r.height,i),h=e[2]+e[0],v=e[1]+e[3],c=r.aspect;switch(isNaN(u)&&(u=n-s-v-a),isNaN(f)&&(f=i-l-h-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(a)&&(a=n-s-u-v),isNaN(o)&&(o=i-l-f-h),r.left||r.right){case"center":a=n/2-u/2-e[3];break;case"right":a=n-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-e[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-v-a-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var d=new ot((t.x||0)+a+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}var mo={rect:1,point:2};function Ie(r,t,e){var n,i,a,o=r.boxCoordinateSystem,s;if(o){var l=LI(r),u=l.coord,f=l.from;if(o.dataToLayout){a=mo.rect,s=f;var h=o.dataToLayout(u);n=h.contentRect||h.rect}else e&&e.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=mo.point,s=f,i=o.dataToPoint(u))}return a==null&&(a=mo.rect),a===mo.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 Od(r,t,e,n,i,a){a=a||r,a.x=r.x,a.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=ie(gt({width:o.width,height:o.height},t),e,n),u=l.x-o.x,f=l.y-o.y;return a.x+=u,a.y+=f,a===r&&r.markRedraw(),!0}function Xo(r){var t=r.layoutMode||r.constructor.layoutMode;return j(t)?t:t?{type:t}:null}function Dn(r,t,e){var n=e&&e.ignoreSize;!H(n)&&(n=[n,n]);var i=o(Zs[0],0),a=o(Zs[1],1);l(Zs[0],r,i),l(Zs[1],r,a);function o(u,f){var h={},v=0,c={},d=0,p=2;if(Bl(u,function(m){c[m]=r[m]}),Bl(u,function(m){nr(t,m)&&(h[m]=c[m]=t[m]),s(h,m)&&v++,s(c,m)&&d++}),n[f])return s(t,u[1])?c[u[2]]=null:s(t,u[2])&&(c[u[1]]=null),c;if(d===p||!v)return c;if(v>=p)return h;for(var g=0;g<u.length;g++){var y=u[g];if(!nr(h,y)&&nr(r,y)){h[y]=r[y];break}}return h}function s(u,f){return u[f]!=null&&u[f]!=="auto"}function l(u,f,h){Bl(u,function(v){f[v]=h[v]})}}function Na(r){return NI({},r)}function NI(r,t){return t&&r&&Bl(EI,function(e){nr(t,e)&&(r[e]=t[e])}),r}var zI=wt(),mt=(function(r){B(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.uid=ys("ec_cpt_model"),a}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Xo(this),a=i?Na(e):{},o=n.getTheme();ft(e,o.get(this.mainType)),ft(e,this.getDefaultOption()),i&&Dn(e,a,i)},t.prototype.mergeOption=function(e,n){ft(this.option,e,!0);var i=Xo(this);i&&Dn(this.option,e,i)},t.prototype.optionUpdated=function(e,n){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!tA(e))return e.defaultOption;var n=zI(this);if(!n.defaultOption){for(var i=[],a=e;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=ft(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return Ea(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){return kI(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(Dt);GS(mt,Dt);Gu(mt);fI(mt);hI(mt,VI);function VI(r){var t=[];return M(mt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return Tr(e).main}),r!=="dataset"&&dt(t,"dataset")<=0&&t.unshift("dataset"),t}var N={color:{},darkColor:{},size:{}},Bt=N.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)"};F(Bt,{primary:Bt.neutral80,secondary:Bt.neutral70,tertiary:Bt.neutral60,quaternary:Bt.neutral50,disabled:Bt.neutral20,border:Bt.neutral30,borderTint:Bt.neutral20,borderShade:Bt.neutral40,background:Bt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Bt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Bt.neutral70,axisLineTint:Bt.neutral40,axisTick:Bt.neutral70,axisTickMinor:Bt.neutral60,axisLabel:Bt.neutral70,axisSplitLine:Bt.neutral15,axisMinorSplitLine:Bt.neutral05});for(var Jn in Bt)if(Bt.hasOwnProperty(Jn)){var dy=Bt[Jn];Jn==="theme"?N.darkColor.theme=Bt.theme.slice():Jn==="highlight"?N.darkColor.highlight="rgba(255,231,130,0.4)":Jn.indexOf("accent")===0?N.darkColor[Jn]=xn(dy,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):N.darkColor[Jn]=xn(dy,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}N.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var zx="";typeof navigator<"u"&&(zx=navigator.platform||"");var Zi="rgba(0, 0, 0, 0.2)",Vx=N.color.theme[0],FI=xn(Vx,null,null,.9);const GI={darkMode:"auto",colorBy:"series",color:N.color.theme,gradientColor:[FI,Vx],aria:{decal:{decals:[{color:Zi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Zi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Zi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Zi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Zi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Zi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:zx.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 Fx=it(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Le="original",ae="arrayRows",$e="objectRows",cr="keyedColumns",bn="typedArray",Gx="unknown",ar="column",Oi="row",jt={Must:1,Might:2,Not:3},Hx=wt();function HI(r){Hx(r).datasetMap=it()}function Wx(r,t,e){var n={},i=Bd(t);if(!i||!r)return n;var a=[],o=[],s=t.ecModel,l=Hx(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),M(r,function(p,g){var y=j(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,h=d(y)),n[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});M(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=v.valueWayDim;c(n[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(n[y],0,m),c(a,0,m);else{var _=v.categoryWayDim;c(n[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(p,g,y){for(var m=0;m<y;m++)p.push(g+m)}function d(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function Ux(r,t,e){var n={},i=Bd(r);if(!i)return n;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===$e||a===cr)&&M(o,function(f,h){(j(f)?f.name:f)==="name"&&(s=h)});var l=(function(){for(var f={},h={},v=[],c=0,d=Math.min(5,e);c<d;c++){var p=Zx(t.data,a,t.seriesLayoutBy,o,t.startIndex,c);v.push(p);var g=p===jt.Not;if(g&&f.v==null&&c!==s&&(f.v=c),(f.n==null||f.n===f.v||!g&&v[f.n]===jt.Not)&&(f.n=c),y(f)&&v[f.n]!==jt.Not)return f;g||(p===jt.Might&&h.v==null&&c!==s&&(h.v=c),(h.n==null||h.n===h.v)&&(h.n=c))}function y(m){return m.v!=null&&m.n!=null}return y(f)?f:y(h)?h:null})();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function Bd(r){var t=r.get("data",!0);if(!t)return Ea(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},ee).models[0]}function WI(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Ea(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},ee).models}function Yx(r,t){return Zx(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function Zx(r,t,e,n,i,a){var o,s=5;if(we(r))return jt.Not;var l,u;if(n){var f=n[a];j(f)?(l=f.name,u=f.type):X(f)&&(l=f)}if(u!=null)return u==="ordinal"?jt.Must:jt.Not;if(t===ae){var h=r;if(e===Oi){for(var v=h[a],c=0;c<(v||[]).length&&c<s;c++)if((o=S(v[i+c]))!=null)return o}else for(var c=0;c<h.length&&c<s;c++){var d=h[i+c];if(d&&(o=S(d[a]))!=null)return o}}else if(t===$e){var p=r;if(!l)return jt.Not;for(var c=0;c<p.length&&c<s;c++){var g=p[c];if(g&&(o=S(g[l]))!=null)return o}}else if(t===cr){var y=r;if(!l)return jt.Not;var v=y[l];if(!v||we(v))return jt.Not;for(var c=0;c<v.length&&c<s;c++)if((o=S(v[c]))!=null)return o}else if(t===Le)for(var m=r,c=0;c<m.length&&c<s;c++){var g=m[c],_=cs(g);if(!H(_))return jt.Not;if((o=S(_[a]))!=null)return o}function S(b){var x=X(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return x?jt.Might:jt.Not;if(x&&b!=="-")return jt.Must}return jt.Not}var $c=it();function UI(r,t){We($c.get(r)==null&&t),$c.set(r,t)}function YI(r,t,e){var n=$c.get(t);if(!n)return e;var i=n(r);return i?e.concat(i):e}var py=wt(),ZI=wt(),Nd=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var i=Ut(this.get("color",!0)),a=this.get("colorLayer",!0);return Xx(this,py,i,a,t,e,n)},r.prototype.clearColorPalette=function(){qI(this,py)},r})();function XI(r,t,e,n){var i=Ut(r.get(["aria","decal","decals"]));return Xx(r,ZI,i,null,t,e,n)}function $I(r,t){for(var e=r.length,n=0;n<e;n++)if(r[n].length>t)return r[n];return r[e-1]}function Xx(r,t,e,n,i,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?e:$I(n,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%f.length,h}}function qI(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Xs,Za,gy,yy="\0_ec_inner",KI=1,zd=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Dt(a),this._locale=new Dt(o),this._optionManager=s},t.prototype.setOption=function(e,n,i){var a=Sy(n);this._optionManager.setOption(e,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Sy(n))},t.prototype._resetOption=function(e,n){var i=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?gy(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&M(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=it(),u=n&&n.replaceMergeMainTypeMap;HI(this),M(e,function(h,v){h!=null&&(mt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):i[v]=i[v]==null?J(h):ft(i[v],h,!0))}),u&&u.each(function(h,v){mt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),mt.topologicalTravel(s,mt.getAllClassMainTypes(),f,this);function f(h){var v=YI(this,h,Ut(e[h])),c=a.get(h),d=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=BM(c,v,d);UM(p,h,mt),i[h]=null,a.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;M(p,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",D=mt.getClass(h,S.keyInfo.subType,!T);if(!D)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var A=F({componentIndex:b},S.keyInfo);x=new D(w,this,this,A),F(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),i[h]=g,a.set(h,y),o.set(h,m),h==="series"&&Xs(this)}this._seriesIndices||Xs(this)},t.prototype.getOption=function(){var e=J(this.option);return M(e,function(n,i){if(mt.hasClass(i)){for(var a=Ut(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Ho(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[yy],e},t.prototype.setTheme=function(e){this._theme=new Dt(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);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(e){var n=e.mainType;if(!n)return[];var i=e.index,a=e.id,o=e.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],M(Ut(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=my("id",a,s):o!=null?l=my("name",o,s):l=kt(s,function(u){return!!u}),_y(l,e)},t.prototype.findComponents=function(e){var n=e.query,i=e.mainType,a=s(n),o=a?this.queryComponents(a):kt(this._componentsMap.get(i),function(u){return!!u});return l(_y(o,e));function s(u){var f=i+"Index",h=i+"Id",v=i+"Name";return u&&(u[f]!=null||u[h]!=null||u[v]!=null)?{mainType:i,index:u[f],id:u[h],name:u[v]}:null}function l(u){return e.filter?kt(u,e.filter):u}},t.prototype.eachComponent=function(e,n,i){var a=this._componentsMap;if(Q(e)){var o=n,s=e;a.each(function(h,v){for(var c=0;h&&c<h.length;c++){var d=h[c];d&&s.call(o,v,d,d.componentIndex)}})}else for(var l=X(e)?a.get(e):j(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&n.call(i,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var n=ge(e,null);return kt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return kt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===e})},t.prototype.getSeries=function(){return kt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,n){Za(this),M(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];e.call(n,a,i)},this)},t.prototype.eachRawSeries=function(e,n){M(this._componentsMap.get("series"),function(i){i&&e.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(e,n,i){Za(this),M(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,n,i){return M(this.getSeriesByType(e),n,i)},t.prototype.isSeriesFiltered=function(e){return Za(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,n){Za(this);var i=[];M(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=it(i)},t.prototype.restoreData=function(e){Xs(this);var n=this._componentsMap,i=[];n.each(function(a,o){mt.hasClass(o)&&i.push(o)}),mt.topologicalTravel(i,mt.getAllClassMainTypes(),function(a){M(n.get(a),function(o){o&&(a!=="series"||!QI(o,e))&&o.restoreData()})})},t.internalField=(function(){Xs=function(e){var n=e._seriesIndices=[];M(e._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),e._seriesIndicesMap=it(n)},Za=function(e){},gy=function(e,n){e.option={},e.option[yy]=KI,e._componentsMap=it({series:[]}),e._componentsCount=it();var i=n.aria;j(i)&&i.enabled==null&&(i.enabled=!0),jI(n,e._theme.option),ft(n,GI,!1),e._mergeOption(n,null)}})(),t})(Dt);function QI(r,t){if(t){var e=t.seriesIndex,n=t.seriesId,i=t.seriesName;return e!=null&&r.componentIndex!==e||n!=null&&r.id!==n||i!=null&&r.name!==i}}function jI(r,t){var e=r.color&&!r.colorLayer;M(t,function(n,i){i==="colorLayer"&&e||i==="color"&&r.color||mt.hasClass(i)||(typeof n=="object"?r[i]=r[i]?ft(r[i],n,!1):J(n):r[i]==null&&(r[i]=n))})}function my(r,t,e){if(H(t)){var n=it();return M(t,function(a){if(a!=null){var o=ge(a,null);o!=null&&n.set(a,!0)}}),kt(e,function(a){return a&&n.get(a[r])})}else{var i=ge(t,null);return kt(e,function(a){return a&&i!=null&&a[r]===i})}}function _y(r,t){return t.hasOwnProperty("subType")?kt(r,function(e){return e&&e.subType===t.subType}):r}function Sy(r){var t=it();return r&&M(Ut(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}fe(zd,Nd);var JI=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],$x=(function(){function r(t){M(JI,function(e){this[e]=Y(t[e],t)},this)}return r})(),tL=/^(min|max)?(.+)$/,eL=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,n){t&&(M(Ut(t.series),function(o){o&&o.data&&we(o.data)&&Hl(o.data)}),M(Ut(t.dataset),function(o){o&&o.source&&we(o.source)&&Hl(o.source)})),t=J(t);var i=this._optionBackup,a=rL(t,e,!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},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],J(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=J(n[i.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=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++)nL(i[l].query,e,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!aL(o,this._currentMediaIndices)&&(s=U(o,function(f){return J(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},r})();function rL(r,t,e){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||f)&&(r.options=r.media=null),a=r),f&&H(u)&&M(u,function(c){c&&c.option&&(c.query?n.push(c):i||(i=c))}),v(a),M(l,function(c){return v(c)}),M(n,function(c){return v(c.option)});function v(c){M(t,function(d){d(c,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function nL(r,t,e){var n={width:t,height:e,aspectratio:t/e},i=!0;return M(r,function(a,o){var s=o.match(tL);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();iL(n[u],a,l)||(i=!1)}}),i}function iL(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function aL(r,t){return r.join(",")===t.join(",")}var Qe=M,$o=j,xy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function lh(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=xy.length;e<n;e++){var i=xy[e],a=t.normal,o=t.emphasis;a&&a[i]&&(r[i]=r[i]||{},r[i].normal?ft(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?ft(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function se(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var n=r[t].normal,i=r[t].emphasis;n&&(e?(r[t].normal=r[t].emphasis=null,gt(r[t],n)):r[t]=n),i&&(r.emphasis=r.emphasis||{},r.emphasis[t]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function _o(r){se(r,"itemStyle"),se(r,"lineStyle"),se(r,"areaStyle"),se(r,"label"),se(r,"labelLine"),se(r,"upperLabel"),se(r,"edgeLabel")}function Gt(r,t){var e=$o(r)&&r[t],n=$o(e)&&e.textStyle;if(n)for(var i=0,a=bg.length;i<a;i++){var o=bg[i];n.hasOwnProperty(o)&&(e[o]=n[o])}}function ke(r){r&&(_o(r),Gt(r,"label"),r.emphasis&&Gt(r.emphasis,"label"))}function oL(r){if($o(r)){lh(r),_o(r),Gt(r,"label"),Gt(r,"upperLabel"),Gt(r,"edgeLabel"),r.emphasis&&(Gt(r.emphasis,"label"),Gt(r.emphasis,"upperLabel"),Gt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(lh(t),ke(t));var e=r.markLine;e&&(lh(e),ke(e));var n=r.markArea;n&&ke(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!we(a))for(var o=0;o<a.length;o++)ke(a[o]);M(r.categories,function(u){_o(u)})}if(i&&!we(i))for(var o=0;o<i.length;o++)ke(i[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ke(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)H(l[o])?(ke(l[o][0]),ke(l[o][1])):ke(l[o]);r.type==="gauge"?(Gt(r,"axisLabel"),Gt(r,"title"),Gt(r,"detail")):r.type==="treemap"?(se(r.breadcrumb,"itemStyle"),M(r.levels,function(u){_o(u)})):r.type==="tree"&&_o(r.leaves)}}function Er(r){return H(r)?r:r?[r]:[]}function by(r){return(H(r)?r[0]:r)||{}}function sL(r,t){Qe(Er(r.series),function(n){$o(n)&&oL(n)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Qe(e,function(n){Qe(Er(r[n]),function(i){i&&(Gt(i,"axisLabel"),Gt(i.axisPointer,"label"))})}),Qe(Er(r.parallel),function(n){var i=n&&n.parallelAxisDefault;Gt(i,"axisLabel"),Gt(i&&i.axisPointer,"label")}),Qe(Er(r.calendar),function(n){se(n,"itemStyle"),Gt(n,"dayLabel"),Gt(n,"monthLabel"),Gt(n,"yearLabel")}),Qe(Er(r.radar),function(n){Gt(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)}),Qe(Er(r.geo),function(n){$o(n)&&(ke(n),Qe(Er(n.regions),function(i){ke(i)}))}),Qe(Er(r.timeline),function(n){ke(n),se(n,"label"),se(n,"itemStyle"),se(n,"controlStyle",!0);var i=n.data;H(i)&&M(i,function(a){j(a)&&(se(a,"label"),se(a,"itemStyle"))})}),Qe(Er(r.toolbox),function(n){se(n,"iconStyle"),Qe(n.feature,function(i){se(i,"iconStyle")})}),Gt(by(r.axisPointer),"label"),Gt(by(r.tooltip).axisPointer,"label")}function lL(r,t){for(var e=t.split(","),n=r,i=0;i<e.length&&(n=n&&n[e[i]],n!=null);i++);return n}function uL(r,t,e,n){for(var i=t.split(","),a=r,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]]=e)}function wy(r){r&&M(fL,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var fL=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],hL=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],uh=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Xa(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<uh.length;e++){var n=uh[e][1],i=uh[e][0];t[n]!=null&&(t[i]=t[n])}}function Ty(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function Cy(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function cL(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function qx(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&qx(r[e].children,t)}function Kx(r,t){sL(r,t),r.series=Ut(r.series),M(r.series,function(e){if(j(e)){var n=e.type;if(n==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(n==="pie"||n==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),Ty(e.label);var i=e.data;if(i&&!we(i))for(var a=0;a<i.length;a++)Ty(i[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(n==="gauge"){var o=lL(e,"pointer.color");o!=null&&uL(e,"itemStyle.color",o)}else if(n==="bar"){Xa(e),Xa(e.backgroundStyle),Xa(e.emphasis);var i=e.data;if(i&&!we(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Xa(i[a]),Xa(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),Cy(e),qx(e.data,Cy)}else n==="graph"||n==="sankey"?cL(e):n==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&>(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),wy(e)}}),r.dataRange&&(r.visualMap=r.dataRange),M(hL,function(e){var n=r[e];n&&(H(n)||(n=[n]),M(n,function(i){wy(i)}))})}function vL(r){var t=it();r.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.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:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.push(o)}}),t.each(function(e){if(e.length!==0){var n=e[0].seriesModel,i=n.get("stackOrder")||"seriesAsc";i==="seriesDesc"&&e.reverse(),M(e,function(a,o){a.data.setCalculationInfo("stackedOnSeries",o>0?e[o-1].seriesModel:null)}),dL(e)}})}function dL(r){M(r,function(t,e){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,f,h){var v=o.get(t.stackedDimension,h);if(isNaN(v))return i;var c,d;s?d=o.getRawIndex(h):c=o.get(t.stackedByDimension,h);for(var p=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,c)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=DM(v,m),p=m;break}}}return n[0]=v,n[1]=p,n})})}var ef=(function(){function r(t){this.data=t.data||(t.sourceFormat===cr?{}:[]),this.sourceFormat=t.sourceFormat||Gx,this.seriesLayoutBy=t.seriesLayoutBy||ar,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];i.type==null&&Yx(this,n)===jt.Must&&(i.type="ordinal")}}return r})();function Vd(r){return r instanceof ef}function qc(r,t,e){e=e||Qx(r);var n=t.seriesLayoutBy,i=gL(r,e,n,t.sourceHeader,t.dimensions),a=new ef({data:r,sourceFormat:e,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:J(t)});return a}function Fd(r){return new ef({data:r,sourceFormat:we(r)?bn:Le})}function pL(r){return new ef({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:J(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function Qx(r){var t=Gx;if(we(r))t=bn;else if(H(r)){r.length===0&&(t=ae);for(var e=0,n=r.length;e<n;e++){var i=r[e];if(i!=null){if(H(i)||we(i)){t=ae;break}else if(j(i)){t=$e;break}}}}else if(j(r)){for(var a in r)if(nr(r,a)&&be(r[a])){t=cr;break}}return t}function gL(r,t,e,n,i){var a,o;if(!r)return{dimensionsDefine:My(i),startIndex:o,dimensionsDetectedCount:a};if(t===ae){var s=r;n==="auto"||n==null?Ay(function(u){u!=null&&u!=="-"&&(X(u)?o==null&&(o=1):o=0)},e,s,10):o=xt(n)?n:n?1:0,!i&&o===1&&(i=[],Ay(function(u,f){i[f]=u!=null?u+"":""},e,s,1/0)),a=i?i.length:e===Oi?s.length:s[0]?s[0].length:null}else if(t===$e)i||(i=yL(r));else if(t===cr)i||(i=[],M(r,function(u,f){i.push(f)}));else if(t===Le){var l=cs(r[0]);a=H(l)&&l.length||1}return{startIndex:o,dimensionsDefine:My(i),dimensionsDetectedCount:a}}function yL(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return Pt(e)}function My(r){if(r){var t=it();return U(r,function(e,n){e=j(e)?e:{name:e};var i={name:e.name,displayName:e.displayName,type:e.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 Ay(r,t,e,n){if(t===Oi)for(var i=0;i<e.length&&i<n;i++)r(e[i]?e[i][0]:null,i);else for(var a=e[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function jx(r){var t=r.sourceFormat;return t===$e||t===cr}var ti,ei,ri,ni,Dy,Iy,Jx=(function(){function r(t,e){var n=Vd(t)?t:Fd(t);this._source=n;var i=this._data=n.data,a=n.sourceFormat;n.seriesLayoutBy,a===bn&&(this._offset=0,this._dimSize=e,this._data=i),Iy(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;Iy=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,v=l.dimensionsDefine,c=Dy[Gd(u,f)];if(F(o,c),u===bn)o.getItem=e,o.count=i,o.fillStorage=n;else{var d=tb(u,f);o.getItem=Y(d,null,s,h,v);var p=eb(u,f);o.count=Y(p,null,s,h,v)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,h=0;h<u;h++)s[h]=l[f+h];return s},n=function(o,s,l,u){for(var f=this._data,h=this._dimSize,v=0;v<h;v++){for(var c=u[v],d=c[0]==null?1/0:c[0],p=c[1]==null?-1/0:c[1],g=s-o,y=l[v],m=0;m<g;m++){var _=f[m*h+v];y[o+m]=_,_<d&&(d=_),_>p&&(p=_)}c[0]=d,c[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};Dy=(t={},t[ae+"_"+ar]={pure:!0,appendData:a},t[ae+"_"+Oi]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[$e]={pure:!0,appendData:a},t[cr]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Le]={appendData:a},t[bn]={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])}})(),r})(),$s=function(r){H(r)||kS("series.data or dataset.source must be an array.")};ti={},ti[ae+"_"+ar]=$s,ti[ae+"_"+Oi]=$s,ti[$e]=$s,ti[cr]=function(r,t){for(var e=0;e<t.length;e++){var n=t[e].name;n==null&&kS("dimension name must not be null/undefined.")}},ti[Le]=$s;var Ly=function(r,t,e,n){return r[n]},mL=(ei={},ei[ae+"_"+ar]=function(r,t,e,n){return r[n+t]},ei[ae+"_"+Oi]=function(r,t,e,n,i){n+=t;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},ei[$e]=Ly,ei[cr]=function(r,t,e,n,i){for(var a=i||[],o=0;o<e.length;o++){var s=e[o].name,l=s!=null?r[s]:null;a[o]=l?l[n]:null}return a},ei[Le]=Ly,ei);function tb(r,t){var e=mL[Gd(r,t)];return e}var Py=function(r,t,e){return r.length},_L=(ri={},ri[ae+"_"+ar]=function(r,t,e){return Math.max(0,r.length-t)},ri[ae+"_"+Oi]=function(r,t,e){var n=r[0];return n?Math.max(0,n.length-t):0},ri[$e]=Py,ri[cr]=function(r,t,e){var n=e[0].name,i=n!=null?r[n]:null;return i?i.length:0},ri[Le]=Py,ri);function eb(r,t){var e=_L[Gd(r,t)];return e}var fh=function(r,t,e){return r[t]},SL=(ni={},ni[ae]=fh,ni[$e]=function(r,t,e){return r[e]},ni[cr]=fh,ni[Le]=function(r,t,e){var n=cs(r);return n instanceof Array?n[t]:n},ni[bn]=fh,ni);function rb(r){var t=SL[r];return t}function Gd(r,t){return r===ae?r+"_"+t:r}function Ta(r,t,e){if(r){var n=r.getRawDataItem(t);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=i.getDimensionProperty(o);return rb(a)(n,o,s)}else{var l=n;return a===Le&&(l=cs(n)),l}}}}var xL=/\{@(.+?)\}/g,Hd=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),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"],f=l&&l.stroke,h=this.mainType,v=h==="series",c=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:v?this.subType:null,seriesIndex:this.seriesIndex,seriesId:v?this.id:null,seriesName:v?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:i,color:u,borderColor:f,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,i,a,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&H(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(Q(a))return l.status=e,l.dimensionIndex=i,a(l);if(X(a)){var f=Bx(a,l);return f.replace(xL,function(h,v){var c=v.length,d=v;d.charAt(0)==="["&&d.charAt(c-1)==="]"&&(d=+d.slice(1,c-1));var p=Ta(s,t,d);if(o&&H(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Ta(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r})();function Ry(r){var t,e;return j(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Ro(r){return new bL(r)}var bL=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var v=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!n&&(h||c<d)){var p=this._progress;if(H(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],c,d,l,u);else this._doProgress(p,c,d,l,u)}this._dueIndex=d;var y=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=y}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,n,i,a){Ey.reset(e,n,i,a),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:Ey.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),H(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r})(),Ey=(function(){var r,t,e,n,i,a={reset:function(l,u,f,h){t=l,r=u,e=f,n=h,i=Math.ceil(n/e),a.next=e>1&&n>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%i*e+Math.ceil(t/i),u=t>=r?null:l<n?l:t;return t++,u}})();function ya(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!xt(r)&&r!=null&&r!=="-"&&(r=+Ra(r)),r==null||r===""?NaN:Number(r))}it({number:function(r){return parseFloat(r)},time:function(r){return+Ra(r)},trim:function(r){return X(r)?xr(r):r}});var wL=(function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=xt(t)?t:Fo(t),i=xt(e)?e:Fo(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=X(t),l=X(e);s&&(n=l?t:0),l&&(i=s?e:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r})(),TL=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return ya(t,e)},r})();function CL(r,t){var e=new TL,n=r.data,i=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==ar&&de(o);var s=[],l={},u=r.dimensionsDefine;if(u)M(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";nr(l,y)&&de(_),l[y]=m}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var h=tb(i,ar);t.__isBuiltIn&&(e.getRawDataItem=function(p){return h(n,a,s,p)},e.getRawData=Y(ML,null,r)),e.cloneRawData=Y(AL,null,r);var v=eb(i,ar);e.count=Y(v,null,n,a,s);var c=rb(i);e.retrieveValue=function(p,g){var y=h(n,a,s,p);return d(y,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var y=s[g];if(y)return c(p,g,y.name)}};return e.getDimensionInfo=Y(DL,null,s,l),e.cloneAllDimensionInfo=Y(IL,null,s),e}function ML(r){var t=r.sourceFormat;if(!Wd(t)){var e="";de(e)}return r.data}function AL(r){var t=r.sourceFormat,e=r.data;if(!Wd(t)){var n="";de(n)}if(t===ae){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].slice());return i}else if(t===$e){for(var i=[],a=0,o=e.length;a<o;a++)i.push(F({},e[a]));return i}}function DL(r,t,e){if(e!=null){if(xt(e)||!isNaN(e)&&!nr(t,e))return r[e];if(nr(t,e))return t[e]}}function IL(r){return J(r)}var nb=it();function LL(r){r=J(r);var t=r.type,e="";t||de(e);var n=t.split(":");n.length!==2&&de(e);var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),r.__isBuiltIn=i,nb.set(t,r)}function PL(r,t,e){var n=Ut(r),i=n.length,a="";i||de(a);for(var o=0,s=i;o<s;o++){var l=n[o];t=RL(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function RL(r,t,e,n){var i="";t.length||de(i),j(r)||de(i);var a=r.type,o=nb.get(a);o||de(i);var s=U(t,function(u){return CL(u,o)}),l=Ut(o.transform({upstream:s[0],upstreamList:s,config:J(r.config)}));return U(l,function(u,f){var h="";j(u)||de(h),u.data||de(h);var v=Qx(u.data);Wd(v)||de(h);var c,d=t[0];if(d&&f===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),c={seriesLayoutBy:ar,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else c={seriesLayoutBy:ar,sourceHeader:0,dimensions:u.dimensions};return qc(u.data,c,null)})}function Wd(r){return r===ae||r===$e}var rf="undefined",EL=typeof Uint32Array===rf?Array:Uint32Array,kL=typeof Uint16Array===rf?Array:Uint16Array,ib=typeof Int32Array===rf?Array:Int32Array,ky=typeof Float64Array===rf?Array:Float64Array,ab={float:ky,int:ib,ordinal:Array,number:Array,time:ky},hh;function Xi(r){return r>65535?EL:kL}function $i(){return[1/0,-1/0]}function OL(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Oy(r,t,e,n,i){var a=ab[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(n)}var Kc=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=it()}return r.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=hh[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],jx(i),this._dimensions=U(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===e)return a}else a=i.length;return i[a]={type:e},n.set(t,a),this._chunks[a]=new ab[e||"float"](this._rawCount),this._rawExtent[a]=$i(),a},r.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=$i());for(var l=a[t],u=o;u<s;u++){var f=n[u]=e.parseAndCollect(n[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}i.ordinalMeta=e,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var f=i[u];Oy(n,u,f.type,l,!0)}for(var h=[],v=s;v<l;v++)for(var c=v-s,d=0;d<a;d++){var f=i[d],p=hh.arrayRows.call(this,t[c]||h,f.property,c,d);n[d][v]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(m){return m.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=$i()),Oy(a,f,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,a,l);else for(var v=[],c=t;c<e;c++){v=i.getItem(c,v);for(var d=0;d<s;d++){var p=a[d],g=this._dimValueGetter(v,u[d],c,d);p[c]=g;var y=l[d];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var n=[],i=[];if(e==null){e=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],e));return n},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var n=e.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},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[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(e[o]<t)i=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=e[a]}else t=new n(e.buffer,0,i)}else{var n=Xi(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Xi(n._rawCount),o=new a(i),s=[],l=t.length,u=0,f=t[0],h=n._chunks,v=0;v<i;v++){var c=void 0,d=n.getRawIndex(v);if(l===0)c=e(v);else if(l===1){var p=h[f][d];c=e(p,v)}else{for(var g=0;g<l;g++)s[g]=h[t[g]][d];s[g]=v,c=e.apply(null,s)}c&&(o[u++]=d)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=Pt(t),a=i.length;if(!a)return this;var o=e.count(),s=Xi(e._rawCount),l=new s(o),u=0,f=i[0],h=t[f][0],v=t[f][1],c=e._chunks,d=!1;if(!e._indices){var p=0;if(a===1){for(var g=c[i[0]],y=0;y<n;y++){var m=g[y];(m>=h&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=c[i[0]],_=c[i[1]],S=t[i[1]][0],b=t[i[1]][1],y=0;y<n;y++){var m=g[y],x=_[y];(m>=h&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var y=0;y<o;y++){var w=e.getRawIndex(y),m=c[i[0]][w];(m>=h&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;y<o;y++){for(var T=!0,w=e.getRawIndex(y),D=0;D<a;D++){var A=i[D],m=c[A][w];(m<t[A][0]||m>t[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,n){for(var i=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=$i();for(var h=0;h<s;h++){for(var v=t.getRawIndex(h),c=0;c<o;c++)l[c]=i[e[c]][v];l[o]=h;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var f=0;f<d.length;f++){var p=e[f],g=d[f],y=u[p],m=i[p];m&&(m[v]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,v,c=new(Xi(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),y=(g+p)/2,m=0,_=p;_<g;_++){var S=this.getRawIndex(_),b=a[S];isNaN(b)||(m+=b)}m/=g-p;var x=d,w=Math.min(d+l,o),T=d-1,D=a[u];f=-1,v=x;for(var A=-1,C=0,_=x;_<w;_++){var S=this.getRawIndex(_),b=a[S];if(isNaN(b)){C++,A<0&&(A=S);continue}h=Math.abs((T-y)*(b-D)-(T-_)*(m-D)),h>f&&(f=h,v=S)}C>0&&C<w-x&&(c[s++]=Math.min(A,v),v=Math.max(A,v)),c[s++]=v,u=v}return c[s++]=this.getRawIndex(o-1),n._count=s,n._indices=c,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/e),o=i[t],s=this.count(),l=new(Xi(this._rawCount))(Math.ceil(s/a)*2),u=0,f=0;f<s;f+=a){var h=f,v=o[this.getRawIndex(h)],c=f,d=o[this.getRawIndex(c)],p=a;f+a>s&&(p=s-f);for(var g=0;g<p;g++){var y=this.getRawIndex(f+g),m=o[y];m<v&&(v=m,h=f+g),m>d&&(d=m,c=f+g)}var _=this.getRawIndex(h),S=this.getRawIndex(c);h<c?(l[u++]=_,l[u++]=S):(l[u++]=S,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(t,e,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),h=a._rawExtent[t]=$i(),v=new(Xi(this._rawCount))(Math.ceil(f/l)),c=0,d=0;d<f;d+=l){l>f-d&&(l=f-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var y=n(s),m=this.getRawIndex(Math.min(d+i(s,y)||0,f-1));u[m]=y,y<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),v[c++]=m}return a._count=c,a._indices=v,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){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:e(a);break;case 1:e(i[t[0]][s],a);break;case 2:e(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,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],n=$i();if(!e)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 f=this.getRawIndex(u),h=e[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][e]);return n},r.prototype.clone=function(t,e){var n=new r,i=this._chunks,a=t&&Cn(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?OL(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),e||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=J(this._extent),t._rawExtent=J(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,n,i,a){return ya(e[a],this._dimensions[a])}hh={arrayRows:t,objectRows:function(e,n,i,a){return ya(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return ya(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}})(),r})(),ob=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(qs(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=we(s)?bn:Le,a=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=et(h.seriesLayoutBy,v.seriesLayoutBy)||null,d=et(h.sourceHeader,v.sourceHeader),p=et(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;i=g?[qc(s,{seriesLayoutBy:c,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(n){var m=this._applyTransform(e);i=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);i=[qc(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(i!=null){var a="";t.length!==1&&Ny(a)}var o,s=[],l=[];return M(t,function(u){u.prepareSource();var f=u.getSource(i||0),h="";i!=null&&!f&&Ny(h),s.push(f),l.push(u._getVersionSign())}),n?o=PL(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[pL(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,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];qs(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,n):(s=new Kc,s.initData(new Jx(e,t.length),t)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(qs(t)){var e=Bd(t);return e?[e.getSourceManager()]:[]}else return U(WI(t),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,n,i;if(qs(t))e=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:n,dimensions:i}},r})();function By(r){var t=r.option.transform;t&&Hl(r.option.transform)}function qs(r){return r.mainType==="series"}function Ny(r){throw new Error(r)}var BL="line-height:1";function sb(r){var t=r.lineHeight;return t==null?BL:"line-height:"+_e(t+"")+"px"}function lb(r,t){var e=r.color||N.color.tertiary,n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||N.color.secondary,o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+_e(n+"")+"px;color:"+_e(e)+";font-weight:"+_e(i+""),valueStyle:"font-size:"+_e(o+"")+"px;color:"+_e(a)+";font-weight:"+_e(s+"")}:{nameStyle:{fontSize:n,fill:e,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var NL=[0,10,20,30],zL=["",`
|
|
30
|
-
`,`
|
|
31
|
-
|
|
32
|
-
`,`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`];function Ye(r,t){return t.type=r,t}function Qc(r){return r.type==="section"}function ub(r){return Qc(r)?VL:FL}function fb(r){if(Qc(r)){var t=0,e=r.blocks.length,n=e>1||e>0&&!r.noHeader;return M(r.blocks,function(i){var a=fb(i);a>=t&&(t=a+ +(n&&(!a||Qc(i)&&!i.noHeader)))}),t}return 0}function VL(r,t,e,n){var i=t.noHeader,a=GL(fb(t)),o=[],s=t.blocks||[];We(!s||H(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(nr(u,l)){var f=new wL(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=t.valueFormatter,m=ub(p)(y?F(F({},r),{valueFormatter:y}):r,p,g>0?a.html:0,n);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):jc(n,o.join(""),i?e:a.html);if(i)return h;var v=Zc(t.header,"ordinal",r.useUTC),c=lb(n,r.renderMode).nameStyle,d=sb(n);return r.renderMode==="richText"?hb(r,v,c)+a.richText+h:jc(n,'<div style="'+c+";"+d+';">'+_e(v)+"</div>"+h,e)}function FL(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=H(S)?S:[S],U(S,function(b,x){return Zc(b,H(c)?c[x]:c,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||N.color.secondary,i),v=a?"":Zc(l,"ordinal",u),c=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=lb(n,i),m=y.nameStyle,_=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":hb(r,v,m))+(o?"":UL(r,d,p,g,_)):jc(n,(s?"":h)+(a?"":HL(v,!s,m))+(o?"":WL(d,p,g,_)),e)}}function zy(r,t,e,n,i,a){if(r){var o=ub(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function GL(r){return{html:NL[r],richText:zL[r]}}function jc(r,t,e){var n='<div style="clear:both"></div>',i="margin: "+e+"px 0 0",a=sb(r);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function HL(r,t,e){var n=t?"margin-left:2px":"";return'<span style="'+e+";"+n+'">'+_e(r)+"</span>"}function WL(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=H(r)?r:[r],'<span style="'+a+";"+n+'">'+U(r,function(o){return _e(o)}).join(" ")+"</span>"}function hb(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function UL(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(" "):t,a)}function cb(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Li(n)}function vb(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var ch=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=RS()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=AI({color:e,type:t,renderMode:n,markerId:i});return X(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};H(e)?M(e,function(a){return F(n,a)}):F(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r})();function YL(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=H(s),u=cb(t,e),f,h,v,c;if(o>1||l&&!o){var d=ZL(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,v=d.blocks,c=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);c=f=Ta(i,e,a[0]),h=p.type}else c=f=l?s[0]:s;var g=ad(t),y=g&&t.name||"",m=i.getName(e),_=n?y:m;return Ye("section",{header:y,noHeader:n||!g,sortParam:c,blocks:[Ye("nameValue",{markerType:"item",markerColor:u,name:_,noName:!xr(_),value:f,valueType:h,dataIndex:e})].concat(v||[])})}function ZL(r,t,e,n,i){var a=t.getData(),o=Cn(r,function(h,v,c){var d=a.getDimensionInfo(c);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?M(n,function(h){f(Ta(a,e,h),h)}):M(r,f);function f(h,v){var c=a.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(Ye("nameValue",{markerType:"subItem",markerColor:i,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var en=wt();function Ks(r,t){return r.getName(t)||r.getId(t)}var XL="__universalTransitionEnabled",Yt=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Ro({count:qL,reset:KL}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=en(this).sourceManager=new ob(this);a.prepareSource();var o=this.getInitialData(e,i);Fy(o,this),this.dataTask.context.data=o,en(this).dataBeforeProcessed=o,Vy(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Xo(this),a=i?Na(e):{},o=this.subType;mt.hasClass(o)&&(o+="Series"),ft(e,n.getTheme().get(this.subType)),ft(e,this.getDefaultOption()),Go(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&Dn(e,a,i)},t.prototype.mergeOption=function(e,n){e=ft(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Xo(this);i&&Dn(this.option,e,i);var a=en(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);Fy(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,en(this).dataBeforeProcessed=o,Vy(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!we(e))for(var n=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&Go(e[i],"label",n)},t.prototype.getInitialData=function(e,n){},t.prototype.appendData=function(e){var n=this.getRawData();n.appendData(e.data)},t.prototype.getData=function(e){var n=Jc(this);if(n){var i=n.context.data;return e==null||!i.getLinkedData?i:i.getLinkedData(e)}else return en(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var n=Jc(this);if(n){var i=n.context;i.outputData=e,n!==this.dataTask&&(i.data=e)}en(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return it(e)},t.prototype.getSourceManager=function(){return en(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return en(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,n,i,a){var o=this.getData(),s=this.coordinateSystem,l=s&&s.getAxis(e);if(!s||!l)return[];var u=l.dataToCoord(i);a==null&&(a=1/0);var f=[],h=1/0,v=-1,c=0;return o.each(n,function(d,p){var g=l.dataToCoord(d),y=u-g,m=Math.abs(y);m<=a&&((m<h||m===h&&y>=0&&v<0)&&(h=m,v=y,c=0),y===v&&(f[c++]=p))}),f.length=c,f},t.prototype.formatTooltip=function(e,n,i){return YL({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(ct.node&&!(e&&e.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(e,n,i){var a=this.ecModel,o=Nd.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,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<e.length;s++){var l=e[s],u=Ks(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,n){for(var i=[],a=0;a<e.length;a++)i[0]=e[a],this.isSelected(e[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 e=this._selectedDataIndicesMap,n=Pt(e),i=[],a=0;a<n.length;a++){var o=e[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Ks(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[XL])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,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"){j(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var h=n[f],v=Ks(e,h);u[v]=!0,this._selectedDataIndicesMap[v]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var c=n[l-1],v=Ks(e,c);o.selectedMap=(i={},i[v]=!0,i),this._selectedDataIndicesMap=(a={},a[v]=e.getRawIndex(c),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var n=[];e.hasItemOption&&e.each(function(i){var a=e.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(e,n)}},t.registerClass=function(e){return mt.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(mt);fe(Yt,Hd);fe(Yt,Nd);GS(Yt,mt);function Vy(r){var t=r.name;ad(r)||(r.name=$L(r)||t)}function $L(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return M(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function qL(r){return r.model.getRawData().count()}function KL(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),QL}function QL(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fy(r,t){M(iS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,at(jL,t))})}function jL(r,t){var e=Jc(r);return e&&e.setOutputEnd((t||this).count()),t}function Jc(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var $t=(function(){function r(){this.group=new yt,this.uid=ys("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();sd($t);Gu($t);function Ud(){var r=wt();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var db=wt(),JL=Ud(),Vt=(function(){function r(){this.group=new yt,this.uid=ys("viewChart"),this.renderTask=Ro({plan:t2,reset:e2}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);a&&Hy(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);a&&Hy(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){Oa(this.group,t)},r.markUpdateMethod=function(t,e){db(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function Gy(r,t,e){r&&Uo(r)&&(t==="emphasis"?Mn:An)(r,e)}function Hy(r,t,e){var n=Ai(r,t),i=t&&t.highlightKey!=null?fD(t.highlightKey):null;n!=null?M(Ut(n),function(a){Gy(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){Gy(a,e,i)})}sd(Vt);Gu(Vt);function t2(r){return JL(r.model)}function e2(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&db(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),r2[l]}var r2={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},lu="\0__throttleOriginMethod",Wy="\0__throttleRate",Uy="\0__throttleType";function Yd(r,t,e){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];n=new Date().getTime(),l=this,u=c;var p=f||t,g=f||e;f=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(h,p):s>=0?h():o=setTimeout(h,-s),i=n};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function Ss(r,t,e,n){var i=r[t];if(i){var a=i[lu]||i,o=i[Uy],s=i[Wy];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=Yd(a,e,n==="debounce"),i[lu]=a,i[Uy]=n,i[Wy]=e}return i}}function qo(r,t){var e=r[t];e&&e[lu]&&(e.clear&&e.clear(),r[t]=e[lu])}var Yy=wt(),Zy={itemStyle:Di(Tx,!0),lineStyle:Di(bx,!0)},n2={lineStyle:"stroke",itemStyle:"fill"};function pb(r,t){var e=r.visualStyleMapper||Zy[t];return e||(console.warn("Unknown style type '"+t+"'."),Zy.itemStyle)}function gb(r,t){var e=r.visualDrawType||n2[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var i2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=pb(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=gb(r,n),u=o[l],f=Q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=v,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?v:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(c,d){var p=r.getDataParams(d),g=F({},o);g[l]=f(p),c.setItemVisual(d,"style",g)}}}},$a=new Dt,a2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=pb(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){$a.option=l[n];var u=i($a),f=o.ensureUniqueItemVisual(s,"style");F(f,u),$a.option.decal&&(o.setItemVisual(s,"decal",$a.option.decal),$a.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},o2={performRawSeries:!0,overallReset:function(r){var t=it();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),Yy(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=Yy(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=gb(e,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var v=a.ensureUniqueItemVisual(f,"style"),c=n.getName(u)||u+"",d=n.count();v[l]=e.getColorFromPalette(c,o,d)}})}})}},Qs=Math.PI;function s2(r,t){t=t||{},gt(t,{text:"loading",textColor:N.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:N.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new yt,n=new _t({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new Tt({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 _t({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new qu({shape:{startAngle:-Qs/2,endAngle:-Qs/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:Qs*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qs*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.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),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var yb=(function(){function r(t,e,n,i){this._stageTaskMap=it(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&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}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.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}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=it();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}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;M(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";We(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;M(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,d=v.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,n);var p=o.getPerformArgs(v,i.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(a=!0)}else h&&h.each(function(g,y){s(i,g)&&g.dirty();var m=o.getPerformArgs(g,i.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=it(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(h){var v=h.uid,c=s.set(v,o&&o.get(v)||Ro({plan:c2,reset:v2,count:p2}));c.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,c)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||Ro({reset:l2});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=it(),u=t.seriesType,f=t.getTargetSeries,h=!0,v=!1,c="";We(!t.createOnAllSeries,c),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(h=!1,M(n.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,Ro({reset:u2,onDirty:h2})));y.context={model:p,overallProgress:h},y.agent=o,y.__block=h,a._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:g2(t)}),t.uid=ys("stageHandler"),e&&(t.visualType=e),t},r})();function l2(r){r.overallReset(r.ecModel,r.api,r.payload)}function u2(r){return r.overallProgress&&f2}function f2(){this.agent.dirty(),this.getDownstream().dirty()}function h2(){this.agent&&this.agent.dirty()}function c2(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function v2(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ut(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?U(t,function(e,n){return mb(n)}):d2}var d2=mb(0);function mb(r){return function(t,e){var n=e.data,i=e.resetDefines[r];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 p2(r){return r.data.count()}function g2(r){uu=null;try{r(Ko,_b)}catch{}return uu}var Ko={},_b={},uu;Sb(Ko,zd);Sb(_b,$x);Ko.eachSeriesByType=Ko.eachRawSeriesByType=function(r){uu=r};Ko.eachComponent=function(r){r.mainType==="series"&&r.subType&&(uu=r.subType)};function Sb(r,t){for(var e in t.prototype)r[e]=re}var $=N.darkColor,y2=$.background,qa=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},Xy={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},xb={darkMode:!0,color:$.theme,backgroundColor:y2,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:Xy,y:Xy,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:qa(),logAxis:qa(),valueAxis:qa(),categoryAxis:qa(),line:{symbol:"circle"},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:$.background}},radar:(function(){var r=qa();return r.axisName={color:$.axisLabel},r.axisLine.lineStyle.color=$.neutral20,r})(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};xb.categoryAxis.splitLine.show=!1;var m2=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},n={},i={};if(X(t)){var a=Tr(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};M(t,function(l,u){for(var f=!1,h=0;h<o.length;h++){var v=o[h],c=u.lastIndexOf(v);if(c>0&&c===u.length-v.length){var d=u.slice(0,c);d!=="data"&&(e.mainType=d,e[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){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=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(h,v,c,d){return h[c]==null||v[d||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),tv=["symbol","symbolSize","symbolRotate","symbolOffset"],$y=tv.concat(["symbolKeepAspect"]),_2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<tv.length;o++){var s=tv[o],l=r.get(s);Q(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,e.setVisual(F({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),t.isSeriesFiltered(r))return;var u=Pt(i);function f(h,v){for(var c=r.getRawValue(v),d=r.getDataParams(v),p=0;p<u.length;p++){var g=u[p];h.setItemVisual(v,g,i[g](c,d))}}return{dataEach:a?f:null}}},S2={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<$y.length;s++){var l=$y[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?n:null}}};function bb(r,t,e){switch(e){case"color":var n=r.getItemVisual(t,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function nf(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function x2(r,t,e,n){switch(e){case"color":var i=r.ensureUniqueItemVisual(t,"style");i[r.getVisual("drawType")]=n,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,n);break}}function b2(r,t){function e(n,i){var a=[];return n.eachComponent({mainType:"series",subType:r,query:i},function(o){a.push(o.seriesIndex)}),a}M([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){t(n[0],function(i,a,o){i=F({},i),o.dispatchAction(F(i,{type:n[1],seriesIndex:e(a,i)}))})})}function qi(r,t,e,n,i){var a=r+t;e.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var h=o.getData(),v=Ai(h,i.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:H(v)?h.getName(v[0]):h.getName(v),selected:X(l)?l:F({},l)})}})}function w2(r,t,e){r.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(qi("map","selectchanged",t,i,n),qi("pie","selectchanged",t,i,n)):n.fromAction==="select"?(qi("map","selected",t,i,n),qi("pie","selected",t,i,n)):n.fromAction==="unselect"&&(qi("map","unselected",t,i,n),qi("pie","unselected",t,i,n))})}function ca(r,t,e){for(var n;r&&!(t(r)&&(n=r,e));)r=r.__hostTarget||r.parent;return n}var T2=Math.round(Math.random()*9),C2=typeof Object.defineProperty=="function",M2=(function(){function r(){this._id="__ec_inner_"+T2++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var n=this._guard(t);return C2?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),A2=bt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n+a),r.lineTo(e-i,n+a),r.closePath()}}),D2=bt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n),r.lineTo(e,n+a),r.lineTo(e-i,n),r.closePath()}}),I2=bt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=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),f=Math.cos(u)*o,h=Math.sin(u),v=Math.cos(u),c=o*.6,d=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-h*c,l+s+v*c,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-f+h*c,l+s+v*c,e-f,l+s),r.closePath()}}),L2=bt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+e),r.lineTo(i,a+e/4*3),r.lineTo(i-o,a+e),r.lineTo(i,a),r.closePath()}}),P2={line:lr,rect:_t,roundRect:_t,square:_t,circle:ds,diamond:D2,pin:I2,arrow:L2,triangle:A2},R2={line:function(r,t,e,n,i){i.x1=r,i.y1=t+n/2,i.x2=r+e,i.y2=t+n/2},rect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n},roundRect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n,i.r=Math.min(e,n)/4},square:function(r,t,e,n,i){var a=Math.min(e,n);i.x=r,i.y=t,i.width=a,i.height=a},circle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.r=Math.min(e,n)/2},diamond:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n},pin:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},arrow:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},triangle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n}},fu={};M(P2,function(r,t){fu[t]=new r});var E2=bt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=Ql(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var i=fu[n];i||(n="rect",i=fu[n]),R2[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function k2(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||N.color.neutral00,e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function le(r,t,e,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=vx(r.slice(8),new ot(t,e,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=md(r.slice(7),{},new ot(t,e,n,i),o?"center":"cover"):l=new E2({shape:{symbolType:r,x:t,y:e,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=k2,a&&l.setColor(a),l}function af(r){return H(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function of(r,t){if(r!=null)return H(r)||(r=[r,r]),[q(r[0],t[0])||0,q(et(r[1],r[0]),t[1])||0]}function pi(r){return isFinite(r)}function O2(r,t,e){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*e.width+e.x,i=i*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),n=pi(n)?n:0,i=pi(i)?i:1,a=pi(a)?a:0,o=pi(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function B2(r,t,e){var n=e.width,i=e.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+e.x,s=s*i+e.y,l=l*a),o=pi(o)?o:.5,s=pi(s)?s:.5,l=l>=0&&pi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ev(r,t,e){for(var n=t.type==="radial"?B2(r,t,e):O2(r,t,e),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function N2(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function js(r){return parseInt(r,10)}function Js(r,t,e){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[n]!=null&&e[n]!=="auto")return parseFloat(e[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||js(s[n])||js(r.style[n]))-(js(s[a])||0)-(js(s[o])||0)|0}function z2(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:xt(r)?[r]:H(r)?r:null}function wb(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&z2(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=U(e,function(a){return a/i}),n/=i)}return[e,n]}var V2=new Ii(!0);function hu(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function qy(r){return typeof r=="string"&&r!=="none"}function cu(r){var t=r.fill;return t!=null&&t!=="none"}function Ky(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Qy(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function rv(r,t,e){var n=HS(t.image,t.__image,e);if(Hu(n)){var i=r.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)*lC),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function F2(r,t,e,n){var i,a=hu(e),o=cu(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||V2,h=t.__dirty;if(!n){var v=e.fill,c=e.stroke,d=o&&!!v.colorStops,p=a&&!!c.colorStops,g=o&&!!v.image,y=a&&!!c.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(d||p)&&(x=t.getBoundingRect()),d&&(m=h?ev(r,v,x):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=h?ev(r,c,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=h||!t.__canvasFillPattern?rv(r,v,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(b=h||!t.__canvasStrokePattern?rv(r,c,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:a=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,D;r.setLineDash&&e.lineDash&&(i=wb(t),T=i[0],D=i[1]);var A=!0;(u||h&ia)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=D),n||(e.strokeFirst?(a&&Qy(r,e),o&&Ky(r,e)):(o&&Ky(r,e),a&&Qy(r,e))),T&&r.setLineDash([])}function G2(r,t,e){var n=t.__image=HS(e.image,t.__image,t,t.onload);if(!(!n||!Hu(n))){var i=e.x||0,a=e.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),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,v=s-f;r.drawImage(n,u,f,h,v,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function H2(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||Tn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=wb(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(hu(e)&&r.strokeText(i,e.x,e.y),cu(e)&&r.fillText(i,e.x,e.y)):(cu(e)&&r.fillText(i,e.x,e.y),hu(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var jy=["shadowBlur","shadowOffsetX","shadowOffsetY"],Jy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Tb(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){xe(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Si.opacity:o}(n||t.blend!==e.blend)&&(a||(xe(r,i),a=!0),r.globalCompositeOperation=t.blend||Si.blend);for(var s=0;s<jy.length;s++){var l=jy[s];(n||t[l]!==e[l])&&(a||(xe(r,i),a=!0),r[l]=r.dpr*(t[l]||0))}return(n||t.shadowColor!==e.shadowColor)&&(a||(xe(r,i),a=!0),r.shadowColor=t.shadowColor||Si.shadowColor),a}function tm(r,t,e,n,i){var a=Qo(t,i.inHover),o=n?null:e&&Qo(e,i.inHover)||{};if(a===o)return!1;var s=Tb(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(xe(r,i),s=!0),qy(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(xe(r,i),s=!0),qy(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(xe(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(xe(r,i),s=!0),r.lineWidth=u)}for(var f=0;f<Jy.length;f++){var h=Jy[f],v=h[0];(n||a[v]!==o[v])&&(s||(xe(r,i),s=!0),r[v]=a[v]||h[1])}return s}function W2(r,t,e,n,i){return Tb(r,Qo(t,i.inHover),e&&Qo(e,i.inHover),n,i)}function Cb(r,t){var e=t.transform,n=r.dpr||1;e?r.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):r.setTransform(n,0,0,n,0,0)}function U2(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),Cb(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=n}function Y2(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var em=1,rm=2,nm=3,im=4;function Z2(r){var t=cu(r),e=hu(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function xe(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function Qo(r,t){return t&&r.__hoverStyle||r.style}function Mb(r,t){gi(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function gi(r,t,e,n){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~Me,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||N2(a,o))&&(o&&o.length&&(xe(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(xe(r,e),r.save(),U2(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var f=t instanceof bt&&t.autoBatch&&Z2(t.style);s||Y2(i,u.transform)?(xe(r,e),Cb(r,t)):f||xe(r,e);var h=Qo(t,e.inHover);t instanceof bt?(e.lastDrawType!==em&&(l=!0,e.lastDrawType=em),tm(r,t,u,l,e),(!f||!e.batchFill&&!e.batchStroke)&&r.beginPath(),F2(r,t,h,f),f&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof jl?(e.lastDrawType!==nm&&(l=!0,e.lastDrawType=nm),tm(r,t,u,l,e),H2(r,t,h)):t instanceof Xe?(e.lastDrawType!==rm&&(l=!0,e.lastDrawType=rm),W2(r,t,u,l,e),G2(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==im&&(l=!0,e.lastDrawType=im),X2(r,t,e)),f&&n&&xe(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function X2(r,t,e){var n=t.getDisplayables(),i=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),gi(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,f=i.length;u<f;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),gi(r,l,a,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var vh=new M2,am=new Sa(100),om=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function vu(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";r.dirty&&vh.delete(r);var a=vh.get(r);if(a)return a;var o=gt(r,{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/e,vh.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],h=!0,v=0;v<om.length;++v){var c=o[om[v]];if(c!=null&&!H(c)&&!X(c)&&!xt(c)&&typeof c!="boolean"){h=!1;break}f.push(c)}var d;if(h){d=f.join(",")+(i?"-svg":"");var p=am.get(d);p&&(i?u.svgElement=p:u.image=p)}var g=Db(o.dashArrayX),y=$2(o.dashArrayY),m=Ab(o.symbol),_=q2(g),S=Ib(y),b=!i&&or.createCanvas(),x=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=D(),T;b&&(b.width=w.width*e,b.height=w.height*e,T=b.getContext("2d")),A(),h&&am.put(d,b||x),u.image=b,u.svgElement=x,u.svgWidth=w.width,u.svgHeight=w.height;function D(){for(var C=1,L=0,I=_.length;L<I;++L)C=Sg(C,_[L]);for(var P=1,L=0,I=m.length;L<I;++L)P=Sg(P,m[L].length);C*=P;var R=S*_.length*m.length;return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var C=0,L=0;L<y.length;++L)C+=y[L];if(C<=0)return;for(var I=-S,P=0,R=0,E=0;I<w.height;){if(P%2===0){for(var O=R/2%m.length,k=0,z=0,V=0;k<w.width*2;){for(var G=0,L=0;L<g[E].length;++L)G+=g[E][L];if(G<=0)break;if(z%2===0){var W=(1-o.symbolSize)*.5,Z=k+g[E][z]*W,rt=I+y[P]*W,lt=g[E][z]*o.symbolSize,Ct=y[P]*o.symbolSize,Ot=V/2%m[O].length;ut(Z,rt,lt,Ct,m[O][Ot])}k+=g[E][z],++V,++z,z===g[E].length&&(z=0)}++E,E===g.length&&(E=0)}I+=y[P],++R,++P,P===y.length&&(P=0)}function ut(tt,pt,K,nt,Rt){var Mt=i?1:e,It=le(Rt,tt*Mt,pt*Mt,K*Mt,nt*Mt,o.color,o.symbolKeepAspect);if(i){var Ft=n.painter.renderOneToVNode(It);Ft&&x.children.push(Ft)}else Mb(T,It)}}}}function Ab(r){if(!r||r.length===0)return[["rect"]];if(X(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!X(r[e])){t=!1;break}if(t)return Ab([r]);for(var n=[],e=0;e<r.length;++e)X(r[e])?n.push([r[e]]):n.push(r[e]);return n}function Db(r){if(!r||r.length===0)return[[0,0]];if(xt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,n=0;n<r.length;++n)if(!xt(r[n])){e=!1;break}if(e)return Db([r]);for(var i=[],n=0;n<r.length;++n)if(xt(r[n])){var t=Math.ceil(r[n]);i.push([t,t])}else{var t=U(r[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function $2(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(xt(r)){var t=Math.ceil(r);return[t,t]}var e=U(r,function(n){return Math.ceil(n)});return r.length%2?e.concat(e):e}function q2(r){return U(r,function(t){return Ib(t)})}function Ib(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function K2(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var n=e.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=vu(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=vu(i,t)}}})}var er=new Ze,Lb={};function Q2(r,t){Lb[r]=t}function j2(r){return Lb[r]}var J2=1,tP=800,eP=900,rP=1e3,nP=2e3,iP=5e3,Pb=1e3,aP=1100,Zd=2e3,Rb=3e3,oP=4e3,sf=4500,sP=4600,lP=5e3,uP=6e3,Eb=7e3,fP={PROCESSOR:{FILTER:rP,SERIES_FILTER:tP,STATISTIC:iP},VISUAL:{LAYOUT:Pb,PROGRESSIVE_LAYOUT:aP,GLOBAL:Zd,CHART:Rb,POST_CHART_LAYOUT:sP,COMPONENT:oP,BRUSH:lP,CHART_ITEM:sf,ARIA:uP,DECAL:Eb}},Zt="__flagInMainProcess",tl="__mainProcessVersion",qt="__pendingUpdate",dh="__needsUpdateStatus",sm=/^[a-zA-Z0-9_]+$/,ph="__connectUpdateStatus",lm=0,hP=1,cP=2;function kb(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return Bb(this,r,t)}}function Ob(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Bb(this,r,t)}}function Bb(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Ze.prototype[t].apply(r,e)}var Nb=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Ze),zb=Nb.prototype;zb.on=Ob("on");zb.off=Ob("off");var ii,gh,el,kr,rl,yh,mh,Ki,Qi,um,fm,_h,hm,nl,cm,Vb,Pe,vm,ji,Fb=(function(r){B(t,r);function t(e,n,i){var a=r.call(this,new m2)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},a._dom=e;var o="canvas",s="auto",l=!1;a[tl]=1,i.ssr;var u=a._zr=gg(e,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:et(i.useDirtyRect,l),useCoarsePointer:et(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=Yd(Y(u.flush,u),17),a._updateTheme(n),a._locale=dI(i.locale||Cx),a._coordSysMgr=new _s;var f=a._api=cm(a);function h(v,c){return v.__prio-c.__prio}return Ml(pu,h),Ml(av,h),a._scheduler=new yb(a,f,av,pu),a._messageCenter=new Nb,a._initEvents(),a.resize=Y(a.resize,a),u.animation.on("frame",a._onframe,a),um(u,a),fm(u,a),Hl(a),a}return t.prototype._onframe=function(){if(!this._disposed){vm(this);var e=this._scheduler;if(this[qt]){var n=this[qt].silent;this[Zt]=!0,ji(this);try{ii(this),kr.update.call(this,null,this[qt].updateParams)}catch(l){throw this[Zt]=!1,this[qt]=null,l}this._zr.flush(),this[Zt]=!1,this[qt]=null,Ki.call(this,n),Qi.call(this,n)}else if(e.unfinished){var i=J2,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),yh(this,a),e.performVisualTasks(a),nl(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&e.unfinished);e.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(e,n,i){if(!this[Zt]){if(this._disposed){this.id;return}var a,o,s;if(j(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Zt]=!0,ji(this),!this._model||n){var l=new eL(this._api),u=this._theme,f=this._model=new zd;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},ov);var h={seriesTransition:s,optionChanged:!0};if(i)this[qt]={silent:a,updateParams:h},this[Zt]=!1,this.getZr().wakeUp();else{try{ii(this),kr.update.call(this,null,h)}catch(v){throw this[qt]=null,this[Zt]=!1,v}this._ssr||this._zr.flush(),this[qt]=null,this[Zt]=!1,Ki.call(this,a),Qi.call(this,a)}}},t.prototype.setTheme=function(e,n){if(!this[Zt]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[qt]&&(a==null&&(a=this[qt].silent),o=this[qt].updateParams,this[qt]=null),this[Zt]=!0,ji(this);try{this._updateTheme(e),i.setTheme(this._theme),ii(this),kr.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Zt]=!1,s}this[Zt]=!1,Ki.call(this,a),Qi.call(this,a)}}},t.prototype._updateTheme=function(e){X(e)&&(e=Gb[e]),e&&(e=J(e),e&&Kx(e,!0),this._theme=e)},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||ct.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,n=e.storage.getDisplayList();return M(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;M(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return M(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(dm[i]){var l=s,u=s,f=-s,h=-s,v=[],c=e&&e.pixelRatio||this.getDevicePixelRatio();M(Eo,function(_,S){if(_.group===i){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(J(e)),x=_.getDom().getBoundingClientRect();l=a(x.left,l),u=a(x.top,u),f=o(x.right,f),h=o(x.bottom,h),v.push({dom:b,left:x.left,top:x.top})}}),l*=c,u*=c,f*=c,h*=c;var d=f-l,p=h-u,g=or.createCanvas(),y=gg(g,{renderer:n?"svg":"canvas"});if(y.resize({width:d,height:p}),n){var m="";return M(v,function(_){var S=_.left-l,b=_.top-u;m+='<g transform="translate('+S+","+b+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new _t({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),M(v,function(_){var S=new Xe({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n,i){return rl(this,"convertToPixel",e,n,i)},t.prototype.convertToLayout=function(e,n,i){return rl(this,"convertToLayout",e,n,i)},t.prototype.convertFromPixel=function(e,n,i){return rl(this,"convertFromPixel",e,n,i)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var i=this._model,a,o=Ao(i,e);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=Ao(i,e,{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?bb(s,l,n):nf(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;M(vP,function(i){var a=function(o){var s=e.getModel(),l=o.target,u,f=i==="globalout";if(f?u={}:l&&ca(l,function(p){var g=vt(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=F({},g.eventData),!0},!0),u){var h=u.componentType,v=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",v=u.seriesIndex);var c=h&&v!=null&&s.getComponent(h,v),d=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=i,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:d},e.trigger(i,u)}};a.zrEventfulCallAtLast=!0,e._zr.on(i,a,e)});var n=this._messageCenter;M(iv,function(i,a){n.on(a,function(o){e.trigger(a,o)})}),w2(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 e=this.getDom();e&&zS(this.getDom(),$d,"");var n=this,i=n._api,a=n._model;M(n._componentsViews,function(o){o.dispose(a,i)}),M(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 Eo[n.id]},t.prototype.resize=function(e){if(!this[Zt]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[qt]&&(a==null&&(a=this[qt].silent),i=!0,this[qt]=null),this[Zt]=!0,ji(this);try{i&&ii(this),kr.update.call(this,{type:"resize",animation:F({duration:0},e&&e.animation)})}catch(o){throw this[Zt]=!1,o}this[Zt]=!1,Ki.call(this,a),Qi.call(this,a)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(j(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!sv[e]){var i=sv[e](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(e){var n=F({},e);return n.type=nv[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(j(n)||(n={silent:!!n}),!!du[e.type]&&this._model){if(this[Zt]){this._pendingActions.push(e);return}var i=n.silent;mh.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&ct.browser.weChat&&this._throttledZrFlush(),Ki.call(this,i),Qi.call(this,i)}},t.prototype.updateLabelLayout=function(){er.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){ii=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),gh(h,!0),gh(h,!1),v.plan()},gh=function(h,v){for(var c=h._model,d=h._scheduler,p=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_<p.length;_++)p[_].__alive=!1;v?c.eachComponent(function(x,w){x!=="series"&&S(w)}):c.eachSeries(S);function S(x){var w=x.__requireNewView;x.__requireNewView=!1;var T="_ec_"+x.id+"_"+x.type,D=!w&&g[T];if(!D){var A=Tr(x.type),C=v?$t.getClass(A.main,A.sub):Vt.getClass(A.sub);D=new C,D.init(c,m),g[T]=D,p.push(D),y.add(D.group)}x.__viewId=D.__id=T,D.__alive=!0,D.__model=x,D.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!v&&d.prepareView(D,x,c,m)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!v&&b.renderTask.dispose(),y.remove(b.group),b.dispose(c,m),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},el=function(h,v,c,d,p){var g=h._model;if(g.setUpdatePayload(c),!d){M([].concat(h._componentsViews).concat(h._chartsViews),b);return}var y={};y[d+"Id"]=c[d+"Id"],y[d+"Index"]=c[d+"Index"],y[d+"Name"]=c[d+"Name"];var m={mainType:d,query:y};p&&(m.subType=p);var _=c.excludeSeriesId,S;_!=null&&(S=it(),M(Ut(_),function(x){var w=ge(x,null);w!=null&&S.set(w,!0)})),g&&g.eachComponent(m,function(x){var w=S&&S.get(x.id)!=null;if(!w)if(Kg(c))if(x instanceof Yt)c.type===xi&&!c.notBlur&&!x.get(["emphasis","disabled"])&&nD(x,c,h._api);else{var T=pd(x.mainType,x.componentIndex,c.name,h._api),D=T.focusSelf,A=T.dispatchers;c.type===xi&&D&&!c.notBlur&&Nc(x.mainType,x.componentIndex,h._api),A&&M(A,function(C){c.type===xi?Mn(C):An(C)})}else Vc(c)&&x instanceof Yt&&(oD(x,c,h._api),$g(x),Pe(h))},h),g&&g.eachComponent(m,function(x){var w=S&&S.get(x.id)!=null;w||b(h[d==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},h);function b(x){x&&x.__alive&&x[v]&&x[v](x.__model,g,h._api,c)}},kr={prepareAndUpdate:function(h){ii(this),kr.update.call(this,h,h&&{optionChanged:h.newOption!=null})},update:function(h,v){var c=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,y=this._scheduler;if(c){c.setUpdatePayload(h),y.restoreData(c,h),y.performSeriesTasks(c),g.create(c,d),y.performDataProcessorTasks(c,h),yh(this,c),g.update(c,d),n(c),y.performVisualTasks(c,h);var m=c.get("backgroundColor")||"transparent";p.setBackgroundColor(m);var _=c.get("darkMode");_!=null&&_!=="auto"&&p.setDarkMode(_),_h(this,c,d,h,v),er.trigger("afterupdate",c,d)}},updateTransform:function(h){var v=this,c=this._model,d=this._api;if(c){c.setUpdatePayload(h);var p=[];c.eachComponent(function(y,m){if(y!=="series"){var _=v.getViewOfComponentModel(m);if(_&&_.__alive)if(_.updateTransform){var S=_.updateTransform(m,c,d,h);S&&S.update&&p.push(_)}else p.push(_)}});var g=it();c.eachSeries(function(y){var m=v._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,c,d,h);_&&_.update&&g.set(y.uid,1)}else g.set(y.uid,1)}),n(c),this._scheduler.performVisualTasks(c,h,{setDirty:!0,dirtyMap:g}),nl(this,c,d,h,{},g),er.trigger("afterupdate",c,d)}},updateView:function(h){var v=this._model;v&&(v.setUpdatePayload(h),Vt.markUpdateMethod(h,"updateView"),n(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0}),_h(this,v,this._api,h,{}),er.trigger("afterupdate",v,this._api))},updateVisual:function(h){var v=this,c=this._model;c&&(c.setUpdatePayload(h),c.eachSeries(function(d){d.getData().clearAllVisual()}),Vt.markUpdateMethod(h,"updateVisual"),n(c),this._scheduler.performVisualTasks(c,h,{visualType:"visual",setDirty:!0}),c.eachComponent(function(d,p){if(d!=="series"){var g=v.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,c,v._api,h)}}),c.eachSeries(function(d){var p=v._chartsMap[d.__viewId];p.updateVisual(d,c,v._api,h)}),er.trigger("afterupdate",c,this._api))},updateLayout:function(h){kr.update.call(this,h)}};function e(h,v,c,d,p){if(h._disposed){h.id;return}for(var g=h._model,y=h._coordSysMgr.getCoordinateSystems(),m,_=Ao(g,c),S=0;S<y.length;S++){var b=y[S];if(b[v]&&(m=b[v](g,_,d,p))!=null)return m}}rl=e,yh=function(h,v){var c=h._chartsMap,d=h._scheduler;v.eachSeries(function(p){d.updateStreamModes(p,c[p.__viewId])})},mh=function(h,v){var c=this,d=this.getModel(),p=h.type,g=h.escapeConnect,y=du[p],m=(y.update||"update").split(":"),_=m.pop(),S=m[0]!=null&&Tr(m[0]);this[Zt]=!0,ji(this);var b=[h],x=!1;h.batch&&(x=!0,b=U(h.batch,function(E){return E=gt(F({},E),h),E.batch=null,E}));var w=[],T,D=[],A=y.nonRefinedEventType,C=Vc(h),L=Kg(h);if(L&&ax(this._api),M(b,function(E){var O=y.action(E,d,c._api);if(y.refineEvent?D.push(O):T=O,T=T||F({},E),T.type=A,w.push(T),L){var k=od(h),z=k.queryOptionMap,V=k.mainTypeSpecified,G=V?z.keys()[0]:"series";el(c,_,E,G),Pe(c)}else C?(el(c,_,E,"series"),Pe(c)):S&&el(c,_,E,S.main,S.sub)}),_!=="none"&&!L&&!C&&!S)try{this[qt]?(ii(this),kr.update.call(this,h),this[qt]=null):kr[_].call(this,h)}catch(E){throw this[Zt]=!1,E}if(x?T={type:A,escapeConnect:g,batch:w}:T=w[0],this[Zt]=!1,!v){var I=void 0;if(y.refineEvent){var P=y.refineEvent(D,h,d,this._api).eventContent;We(j(P)),I=gt({type:y.refinedEventType},P),I.fromAction=h.type,I.fromActionPayload=h,I.escapeConnect=!0}var R=this._messageCenter;R.trigger(T.type,T),I&&R.trigger(I.type,I)}},Ki=function(h){for(var v=this._pendingActions;v.length;){var c=v.shift();mh.call(this,c,h)}},Qi=function(h){!h&&this.trigger("updated")},um=function(h,v){h.on("rendered",function(c){v.trigger("rendered",c),h.animation.isFinished()&&!v[qt]&&!v._scheduler.unfinished&&!v._pendingActions.length&&v.trigger("finished")})},fm=function(h,v){h.on("mouseover",function(c){var d=c.target,p=ca(d,Uo);p&&(iD(p,c,v._api),Pe(v))}).on("mouseout",function(c){var d=c.target,p=ca(d,Uo);p&&(aD(p,c,v._api),Pe(v))}).on("click",function(c){var d=c.target,p=ca(d,function(m){return vt(m).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",y=vt(p);v._api.dispatchAction({type:g,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function n(h){h.clearColorPalette(),h.eachSeries(function(v){v.clearColorPalette()})}function i(h){var v=[],c=[],d=!1;if(h.eachComponent(function(m,_){var S=_.get("zlevel")||0,b=_.get("z")||0,x=_.getZLevelKey();d=d||!!x,(m==="series"?c:v).push({zlevel:S,z:b,idx:_.componentIndex,type:m,key:x})}),d){var p=v.concat(c),g,y;Ml(p,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),M(p,function(m){var _=h.getComponent(m.type,m.idx),S=m.zlevel,b=m.key;g!=null&&(S=Math.max(g,S)),b?(S===g&&b!==y&&S++,y=b):y&&(S===g&&S++,y=""),g=S,_.setZLevel(S)})}}_h=function(h,v,c,d,p){i(v),hm(h,v,c,d,p),M(h._chartsViews,function(g){g.__alive=!1}),nl(h,v,c,d,p),M(h._chartsViews,function(g){g.__alive||g.remove(v,c)})},hm=function(h,v,c,d,p,g){M(g||h._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,v,c,d),l(m,y),f(m,y)})},nl=function(h,v,c,d,p,g){var y=h._scheduler;p=F(p||{},{updatedSeries:v.getSeries()}),er.trigger("series:beforeupdate",v,c,p);var m=!1;v.eachSeries(function(_){var S=h._chartsMap[_.__viewId];S.__alive=!0;var b=S.renderTask;y.updatePayload(b,d),u(_,S),g&&g.get(_.uid)&&b.dirty(),b.perform(y.getPerformArgs(b))&&(m=!0),S.group.silent=!!_.get("silent"),s(_,S),$g(_)}),y.unfinished=m||y.unfinished,er.trigger("series:layoutlabels",v,c,p),er.trigger("series:transition",v,c,p),v.eachSeries(function(_){var S=h._chartsMap[_.__viewId];l(_,S),f(_,S)}),o(h,v),er.trigger("series:afterupdate",v,c,p)},Pe=function(h){h[dh]=!0,h.getZr().wakeUp()},ji=function(h){h[tl]=(h[tl]+1)%1e3},vm=function(h){h[dh]&&(h.getZr().storage.traverse(function(v){Io(v)||a(v)}),h[dh]=!1)};function a(h){for(var v=[],c=h.currentStates,d=0;d<c.length;d++){var p=c[d];p==="emphasis"||p==="blur"||p==="select"||v.push(p)}h.selected&&h.states.select&&v.push("select"),h.hoverState===Yu&&h.states.emphasis?v.push("emphasis"):h.hoverState===Uu&&h.states.blur&&v.push("blur"),h.useStates(v)}function o(h,v){var c=h._zr,d=c.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>v.get("hoverLayerThreshold")&&!ct.node&&!ct.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=c)})}function l(h,v){if(!h.preventAutoZ){var c=wa(h);v.eachRendered(function(d){return bd(d,c.z,c.zlevel),!0})}}function u(h,v){v.eachRendered(function(c){if(!Io(c)){var d=c.getTextContent(),p=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function f(h,v){var c=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),p=c.get("duration"),g=p>0?{duration:p,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Io(y))return;if(y instanceof bt&&hD(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&a(y)}})}cm=function(h){return new((function(v){B(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},c.prototype.enterEmphasis=function(d,p){Mn(d,p),Pe(h)},c.prototype.leaveEmphasis=function(d,p){An(d,p),Pe(h)},c.prototype.enterBlur=function(d){ex(d),Pe(h)},c.prototype.leaveBlur=function(d){dd(d),Pe(h)},c.prototype.enterSelect=function(d){rx(d),Pe(h)},c.prototype.leaveSelect=function(d){nx(d),Pe(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},c.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},c.prototype.getMainProcessVersion=function(){return h[tl]},c})($x))(h)},Vb=function(h){function v(c,d){for(var p=0;p<c.length;p++){var g=c[p];g[ph]=d}}M(nv,function(c,d){h._messageCenter.on(d,function(p){if(dm[h.group]&&h[ph]!==lm){if(p&&p.escapeConnect)return;var g=h.makeActionFromEvent(p),y=[];M(Eo,function(m){m!==h&&m.group===h.group&&y.push(m)}),v(y,lm),M(y,function(m){m[ph]!==hP&&m.dispatchAction(g)}),v(y,cP)}})})}})(),t})(Ze),Xd=Fb.prototype;Xd.on=kb("on");Xd.off=kb("off");Xd.one=function(r,t,e){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(r,i)}this.on.call(this,r,i,e)};var vP=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var du={},nv={},iv={},av=[],ov=[],pu=[],Gb={},sv={},Eo={},dm={},dP=+new Date-0,$d="_echarts_instance_";function pP(r,t,e){{var n=gP(r);if(n)return n}var i=new Fb(r,t,e);return i.id="ec_"+dP++,Eo[i.id]=i,zS(r,$d,i.id),Vb(i),er.trigger("afterinit",i),i}function gP(r){return Eo[qM(r,$d)]}function qd(r,t){Gb[r]=t}function Hb(r){dt(ov,r)<0&&ov.push(r)}function Wb(r,t){Qd(av,r,t,nP)}function yP(r){Kd("afterinit",r)}function mP(r){Kd("afterupdate",r)}function Kd(r,t){er.on(r,t)}function Lr(r,t,e){var n,i,a,o,s;Q(t)&&(e=t,t=""),j(r)?(n=r.type,i=r.event,o=r.update,s=r.publishNonRefinedEvent,e||(e=r.action),a=r.refineEvent):(n=r,i=t);function l(f){return f.toLowerCase()}i=l(i||n);var u=a?l(n):i;du[n]||(We(sm.test(n)&&sm.test(i)),a&&We(i!==n),du[n]={actionType:n,refinedEventType:i,nonRefinedEventType:u,update:o,action:e,refineEvent:a},iv[i]=1,a&&s&&(iv[u]=1),nv[u]=n)}function _P(r,t){_s.register(r,t)}function SP(r,t){Qd(pu,r,t,Pb,"layout")}function Bi(r,t){Qd(pu,r,t,Rb,"visual")}var pm=[];function Qd(r,t,e,n,i){if((Q(t)||j(t))&&(e=t,t=n),!(dt(pm,e)>=0)){pm.push(e);var a=yb.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function Ub(r,t){sv[r]=t}function xP(r,t,e){var n=j2("registerMap");n&&n(r,t,e)}var bP=LL;Bi(Zd,i2);Bi(sf,a2);Bi(sf,o2);Bi(Zd,_2);Bi(sf,S2);Bi(Eb,K2);Hb(Kx);Wb(eP,vL);Ub("default",s2);Lr({type:xi,event:xi,update:xi},re);Lr({type:Rl,event:Rl,update:Rl},re);Lr({type:Jl,event:cd,update:Jl,action:re,refineEvent:jd,publishNonRefinedEvent:!0});Lr({type:kc,event:cd,update:kc,action:re,refineEvent:jd,publishNonRefinedEvent:!0});Lr({type:tu,event:cd,update:tu,action:re,refineEvent:jd,publishNonRefinedEvent:!0});function jd(r,t,e,n){return{eventContent:{selected:sD(e),isFromClick:t.isFromClick||!1}}}qd("default",{});qd("dark",xb);function Ka(r){return r==null?0:r.length||1}function gm(r){return r}var xs=(function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||gm,this._newKeyGetter=i||gm,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=Ka(l);if(u>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],f=i[l],h=Ka(u),v=Ka(f);if(h>1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),i[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(h>1)for(var c=0;c<h;c++)this._remove&&this._remove(u[c]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=e[i],o=Ka(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);e[i]=null}},r.prototype._initIndexMap=function(t,e,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),!!e){var l=e[s],u=Ka(l);u===0?(e[s]=o,a&&n.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),wP=(function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function TP(r,t){var e={},n=e.encode={},i=it(),a=[],o=[],s={};M(r.dimensions,function(v){var c=r.getDimensionInfo(v),d=c.coordDim;if(d){var p=c.coordDimIndex;Sh(n,d)[p]=v,c.isExtraCoord||(i.set(d,1),CP(c.type)&&(a[0]=v),Sh(s,d)[p]=r.getDimensionIndex(c.name)),c.defaultTooltip&&o.push(v)}Fx.each(function(g,y){var m=Sh(n,y),_=c.otherDims[y];_!=null&&_!==!1&&(m[_]=c.name)})});var l=[],u={};i.each(function(v,c){var d=n[c];u[c]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=U(l,function(v){return r.getDimensionInfo(v).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(a=f.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,e.userOutput=new wP(s,t),e}function Sh(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function lv(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function CP(r){return!(r==="ordinal"||r==="time")}var Nl=(function(){function r(t){this.otherDims={},t!=null&&F(this,t)}return r})(),MP=wt(),AP={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Yb=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=$b(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return et(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=jx(this.source),n=!qb(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,f=h.ordinalMeta,s++;else{var v=this.getSourceDimension(o);v&&(l=e?v.name:null,u=v.type)}a.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=AP[u]||"f",f&&(i+=f.uid),i+="$"}var c=this.source,d=[c.seriesLayoutBy,c.startIndex,i].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function Zb(r){return r instanceof Yb}function Xb(r){for(var t=it(),e=0;e<(r||[]).length;e++){var n=r[e],i=j(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,e)}return t}function $b(r){var t=MP(r);return t.dimNameMap||(t.dimNameMap=Xb(r.dimensionsDefine))}function qb(r){return r>30}var Qa=j,rn=U,DP=typeof Int32Array>"u"?Array:Int32Array,IP="e\0\0",ym=-1,LP=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],PP=["_approximateExtent"],mm,il,ja,Ja,xh,to,bh,Zr=(function(){function r(t,e){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;Zb(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={},f=0;f<n.length;f++){var h=n[f],v=X(h)?new Nl({name:h}):h instanceof Nl?h:new Nl(h),c=v.name;v.type=v.type||"float",v.coordDim||(v.coordDim=c,v.coordDimIndex=0);var d=v.otherDims=v.otherDims||{};o.push(c),a[c]=v,u[c]!=null&&(l=!0),v.createInvertedIndices&&(s[c]=[]);var p=f;xt(v.storeDimIndex)&&(p=v.storeDimIndex),d.itemName===0&&(this._nameDimIdx=p),d.itemId===0&&(this._idDimIdx=p),i&&(v.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=it();M(o,function(y){g.set(a[y].storeDimIndex,y)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(n!=null)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(xt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var i=this,a;if(t instanceof Kc&&(a=t),!a){var o=this.dimensions,s=Vd(t)||be(t)?new Jx(t,o.length):t;a=new Kc;var l=rn(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=TP(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=e[l],o&&bh(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==bn&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Le;if(l&&!i.pure)for(var u=[],f=t;f<e;f++){var h=i.getItem(f,u);if(!this.hasItemOption&&OM(h)&&(this.hasItemOption=!0),h){var v=h.name;a[f]==null&&v!=null&&(a[f]=ge(v,null));var c=h.id;o[f]==null&&c!=null&&(o[f]=ge(c,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)bh(this,f);mm(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){Qa(t)?F(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return n==null&&this._nameDimIdx!=null&&(n=ja(this,this._nameDimIdx,e)),n==null&&(n=""),n},r.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},r.prototype.getId=function(t){return il(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var n=this,i=this._store;return H(t)?i.getValues(rn(t,function(a){return n._getStoreDimIndex(a)}),e):i.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],i=n&&n[e];return i==null||isNaN(i)?ym:i},r.prototype.each=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=rn(Ja(t),this._getStoreDimIndex,this);this._store.each(a,i?Y(e,i):e)},r.prototype.filterSelf=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=rn(Ja(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?Y(e,i):e),this},r.prototype.selectRange=function(t){var e=this,n={},i=Pt(t);return M(i,function(a){var o=e._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(t,e,n){Q(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},r.prototype.map=function(t,e,n,i){var a=n||i||this,o=rn(Ja(t),this._getStoreDimIndex,this),s=to(this);return s._store=this._store.map(o,a?Y(e,a):e),s},r.prototype.modify=function(t,e,n,i){var a=n||i||this,o=rn(Ja(t),this._getStoreDimIndex,this);this._store.modify(o,a?Y(e,a):e)},r.prototype.downSample=function(t,e,n,i){var a=to(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),a},r.prototype.minmaxDownSample=function(t,e){var n=to(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),n},r.prototype.lttbDownSample=function(t,e){var n=to(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new Dt(n,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new xs(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return il(t,n)},function(n){return il(e,n)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},Qa(t)?F(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return i??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),H(a)?a=a.slice():Qa(a)&&(a=F({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Qa(e)?F(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Qa(t)?F(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?F(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Ec(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:rn(this.dimensions,this._getDimInfo,this),this.hostModel)),xh(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];Q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(Qv(arguments)))})},r.internalField=(function(){mm=function(t){var e=t._invertedIndicesMap;M(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new DP(o.categories.length);for(var l=0;l<n.length;l++)n[l]=ym;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},ja=function(t,e,n){return ge(t._getCategory(e,n),null)},il=function(t,e){var n=t._idList[e];return n==null&&t._idDimIdx!=null&&(n=ja(t,t._idDimIdx,e)),n==null&&(n=IP+e),n},Ja=function(t){return H(t)||(t=t!=null?[t]:[]),t},to=function(t){var e=new r(t._schema?t._schema:rn(t.dimensions,t._getDimInfo,t),t.hostModel);return xh(e,t),e},xh=function(t,e){M(LP.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,M(PP,function(n){t[n]=J(e[n])}),t._calculationInfo=F({},e._calculationInfo)},bh=function(t,e){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[e],l=i[e];if(s==null&&a!=null&&(n[e]=s=ja(t,a,e)),l==null&&o!=null&&(i[e]=l=ja(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),i[e]=l}}})(),r})();function lf(r,t){Vd(r)||(r=Fd(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=it(),a=[],o=EP(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&qb(o),l=n===r.dimensionsDefine,u=l?$b(r):Xb(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=it(f),v=new ib(o),c=0;c<v.length;c++)v[c]=-1;function d(D){var A=v[D];if(A<0){var C=n[D],L=j(C)?C:{name:C},I=new Nl,P=L.name;P!=null&&u.get(P)!=null&&(I.name=I.displayName=P),L.type!=null&&(I.type=L.type),L.displayName!=null&&(I.displayName=L.displayName);var R=a.length;return v[D]=R,I.storeDimIndex=D,a.push(I),I}return a[A]}if(!s)for(var c=0;c<o;c++)d(c);h.each(function(D,A){var C=Ut(D).slice();if(C.length===1&&!X(C[0])&&C[0]<0){h.set(A,!1);return}var L=h.set(A,[]);M(C,function(I,P){var R=X(I)?u.get(I):I;R!=null&&R<o&&(L[P]=R,g(d(R),A,P))})});var p=0;M(e,function(D){var A,C,L,I;if(X(D))A=D,I={};else{I=D,A=I.name;var P=I.ordinalMeta;I.ordinalMeta=null,I=F({},I),I.ordinalMeta=P,C=I.dimsDef,L=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var R=h.get(A);if(R!==!1){if(R=Ut(R),!R.length)for(var E=0;E<(C&&C.length||1);E++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&R.push(p++)}M(R,function(O,k){var z=d(O);if(l&&I.type!=null&&(z.type=I.type),g(gt(z,I),A,k),z.name==null&&C){var V=C[k];!j(V)&&(V={name:V}),z.name=z.displayName=V.name,z.defaultTooltip=V.defaultTooltip}L&>(z.otherDims,L)})}});function g(D,A,C){Fx.get(A)!=null?D.otherDims[A]=C:(D.coordDim=A,D.coordDimIndex=C,i.set(A,!0))}var y=t.generateCoord,m=t.generateCoordCount,_=m!=null;m=y?m||1:0;var S=y||"value";function b(D){D.name==null&&(D.name=D.coordDim)}if(s)M(a,function(D){b(D)}),a.sort(function(D,A){return D.storeDimIndex-A.storeDimIndex});else for(var x=0;x<o;x++){var w=d(x),T=w.coordDim;T==null&&(w.coordDim=kP(S,i,_),w.coordDimIndex=0,(!y||m<=0)&&(w.isExtraCoord=!0),m--),b(w),w.type==null&&(Yx(r,x)===jt.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return RP(a),new Yb({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function RP(r){for(var t=it(),e=0;e<r.length;e++){var n=r[e],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function EP(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return M(t,function(a){var o;j(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function kP(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var OP=(function(){function r(t){this.coordSysDims=[],this.axisMap=it(),this.categoryAxisMap=it(),this.coordSysName=t}return r})();function BP(r){var t=r.get("coordinateSystem"),e=new OP(t),n=NP[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var NP={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",ee).models[0],a=r.getReferringComponents("yAxis",ee).models[0];t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Ji(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Ji(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",ee).models[0];t.coordSysDims=["single"],e.set("single",i),Ji(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",ee).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Ji(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Ji(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();M(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Ji(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,n){var i=r.getReferringComponents("matrix",ee).models[0];t.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");e.set("x",a),e.set("y",o),n.set("x",a),n.set("y",o)}};function Ji(r){return r.get("type")==="category"}function zP(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;VP(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(M(a,function(m,_){X(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!i||i===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,d=f.type,p=0;M(a,function(m){m.coordDim===c&&p++});var g={name:h,coordDim:c,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(a.push(g),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:v,stackResultDimension:h}}function VP(r){return!Zb(r.schema)}function Pi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Kb(r,t){return Pi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function FP(r,t){var e=r.get("coordinateSystem"),n=_s.get(e),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=lv(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function GP(r,t,e){var n,i;return e&&M(r,function(a,o){var s=a.coordDim,l=e.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&&(r[n].otherDims.itemName=0),n}function Ni(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;r?(a=!0,i=Fd(r)):(i=n.getSource(),a=i.sourceFormat===Le);var o=BP(t),s=FP(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?at(Wx,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=lf(i,f),v=GP(h.dimensions,e.createInvertedIndices,o),c=a?null:n.getSharedDataStore(h),d=zP(t,{schema:h,store:c}),p=new Zr(h,t);p.setCalculationInfo(d);var g=v!=null&&HP(i)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(a?i:c,null,g),p}function HP(r){if(r.sourceFormat===Le){var t=WP(r.data||[]);return!H(cs(t))}}function WP(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}function uv(r){return r.type==="interval"||r.type==="log"}function UP(r,t,e,n,i){var a={},o=a.interval=PS(t/e);n!=null&&o<n&&(o=a.interval=n),i!=null&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=jo(o),l=a.niceTickExtent=[Xt(Math.ceil(r[0]/o)*o,s),Xt(Math.floor(r[1]/o)*o,s)];return YP(l,r),a}function wh(r){var t=Math.pow(10,id(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Xt(e*t)}function jo(r){return wr(r)+2}function _m(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function YP(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),_m(r,0,t),_m(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Jd(r,t){return r>=t[0]&&r<=t[1]}var ZP=(function(){function r(){this.normalize=Sm,this.scale=xm}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=Y(t.normalize,t),this.scale=Y(t.scale,t)):(this.normalize=Sm,this.scale=xm)},r})();function Sm(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function xm(r,t){return r*(t[1]-t[0])+t[0]}function fv(r,t,e){var n=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/n,Math.log(e?t[1]:Math.max(0,t[1]))/n]}var kn=(function(){function r(t){this._calculator=new ZP,this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]<e[0]?t[0]:e[0],t[1]>e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(t){},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Gu(kn);var XP=0,hv=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++XP,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&U(n,$P);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!X(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=it(this.categories))},r})();function $P(r){return j(r)&&r.value!=null?r.value:r+""}var tp=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new hv({})),H(i)&&(i=new hv({categories:U(i,function(a){return j(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:X(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Jd(e,this._extent)&&e>=0&&e<this._ordinalMeta.categories.length},t.prototype.normalize=function(e){return e=this._getTickNumber(e),this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(this._calculator.scale(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.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 f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},t.prototype._getTickNumber=function(e){var n=this._ticksByOrdinalNumber;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getRawOrdinalNumber=function(e){var n=this._ordinalNumbersByTick;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var n=this.getRawOrdinalNumber(e.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(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(kn);kn.registerClass(tp);var nn=Xt,In=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return Jd(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=jo(e)},t.prototype.getTicks=function(e){e=e||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=au(),l=[];if(!n)return l;e.breakTicks;var u=1e4;i[0]<a[0]&&(e.expandToNicedExtent?l.push({value:nn(a[0]-n,o)}):l.push({value:i[0]}));for(var f=function(d,p){return Math.round((p-d)/n)},h=a[0];h<=a[1];){if(l.push({value:h}),h=nn(h+n,o),this._brkCtx){var v=this._brkCtx.calcNiceTickMultiple(h,f);v>=0&&(h=nn(h+v*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var c=l.length?l[l.length-1].value:a[1];return i[1]>c&&(e.expandToNicedExtent?l.push({value:nn(c+n,o)}):l.push({value:i[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){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,f=[],h=s.value-l.value,v=h/e,c=jo(v);u<e-1;){var d=nn(l.value+(u+1)*v,c);d>a[0]&&d<a[1]&&f.push(d),u++}var p=au();p&&p.pruneTicksByBreak("auto",f,this._getNonTransBreaks(),function(g){return g},this._interval,a),i.push(f)}}return i},t.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.getLabel=function(e,n){if(e==null)return"";var i=n&&n.precision;i==null?i=wr(e.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=nn(e.value,i,!0);return kx(a)},t.prototype.calcNiceTicks=function(e,n,i){e=e||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=UP(a,o,e,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var n=this._extent.slice();if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);e.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(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval,s=this._intervalPrecision;e.fixMin||(n[0]=nn(Math.floor(n[0]/o)*o,s)),e.fixMax||(n[1]=nn(Math.ceil(n[1]/o)*o,s)),this._innerSetExtent(n[0],n[1])},t.prototype.setNiceExtent=function(e,n){this._niceExtent=[e,n]},t.type="interval",t})(kn);kn.registerClass(In);var Qb=typeof Float32Array<"u",qP=Qb?Float32Array:Array;function Gr(r){return H(r)?Qb?new Float32Array(r):r:new qP(r)}var KP="__ec_stack_";function jb(r){return r.get("stack")||KP+r.seriesIndex}function ep(r){return r.dim+r.index}function Jb(r,t){var e=[];return t.eachSeriesByType(r,function(n){e1(n)&&e.push(n)}),e}function QP(r){var t={};M(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=l.getData(),v=f.dim+"_"+f.index,c=h.getDimensionIndex(h.mapDimension(f.dim)),d=h.getStore(),p=0,g=d.count();p<g;++p){var y=d.get(c,p);t[v]?t[v].push(y):t[v]=[y]}});var e={};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))}e[n]=a}}return e}function t1(r){var t=QP(r),e=[];return M(r,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],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=n.getData();s=Math.abs(o[1]-o[0])/c.count()}var d=q(n.get("barWidth"),s),p=q(n.get("barMaxWidth"),s),g=q(n.get("barMinWidth")||(r1(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap"),_=n.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:ep(a),stackId:jb(n)})}),jP(e)}function jP(r){var t={};M(r,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 f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var v=n.barMinWidth;v&&(l[u].minWidth=v);var c=n.barGap;c!=null&&(s.gap=c);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return M(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Pt(a).length;s=Math.max(35-l*4,15)+"%"}var u=q(s,o),f=q(n.gap,1),h=n.remainedWidth,v=n.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),M(a,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,v--}else{var S=c;m&&m<S&&(S=Math.min(m,h)),_&&_>S&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var d=0,p;M(a,function(y,m){y.width||(y.width=c),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;M(a,function(y,m){e[i][m]=e[i][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function JP(r,t,e){if(r&&t){var n=r[ep(t)];return n}}function tR(r,t){var e=Jb(r,t),n=t1(e);M(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=jb(i),u=n[ep(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function eR(r){return{seriesType:r,plan:Ud(),reset:function(t){if(e1(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Pi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),v=a.isHorizontal(),c=rR(i,a),d=r1(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&Gr(b*3),w=d&&l&&Gr(b*3),T=d&&Gr(b),D=n.master.getRect(),A=v?D.width:D.height,C,L=S.getStore(),I=0;(C=_.next())!=null;){var P=L.get(h?g:o,C),R=L.get(s,C),E=c,O=void 0;h&&(O=+P-L.get(o,C));var k=void 0,z=void 0,V=void 0,G=void 0;if(v){var W=n.dataToPoint([P,R]);if(h){var Z=n.dataToPoint([O,R]);E=Z[0]}k=E,z=W[1]+m,V=W[0]-E,G=y,Math.abs(V)<p&&(V=(V<0?-1:1)*p)}else{var W=n.dataToPoint([R,P]);if(h){var Z=n.dataToPoint([R,O]);E=Z[1]}k=W[0]+m,z=E,V=y,G=W[1]-E,Math.abs(G)<p&&(G=(G<=0?-1:1)*p)}d?(x[I]=k,x[I+1]=z,x[I+2]=v?V:G,w&&(w[I]=v?D.x:k,w[I+1]=v?z:D.y,w[I+2]=A),T[C]=C):S.setItemLayout(C,{x:k,y:z,width:V,height:G}),I+=3}d&&S.setLayout({largePoints:x,largeDataIndices:T,largeBackgroundPoints:w,valueAxisHorizontal:v})}}}}}}function e1(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function r1(r){return r.pipelineContext&&r.pipelineContext.large}function rR(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var nR=function(r,t,e,n){for(;e<n;){var i=e+n>>>1;r[i][1]<t?e=i+1:n=i}return e},n1=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="time",n}return t.prototype.getLabel=function(e){var n=this.getSetting("useUTC");return tf(e.value,cy[TI(Po(this._minLevelUnit))]||cy.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return CI(e,n,i,o,a)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=[];if(!n)return a;var o=this.getSetting("useUTC"),s=ou(i[1],o);a.push({value:i[0],time:{level:0,upperTimeUnit:s,lowerTimeUnit:s}});var l=hR(this._minLevelUnit,this._approxInterval,o,i,this._getExtentSpanWithBreaks(),this._brkCtx);a=a.concat(l);var u=ou(i[1],o);a.push({value:i[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var f=wi.length-1,h=0;return M(a,function(v){f=Math.min(f,dt(wi,v.time.upperTimeUnit)),h=Math.max(h,v.time.level)}),a},t.prototype.calcNiceExtent=function(e){var n=this.getExtent();if(n[0]===n[1]&&(n[0]-=Ve,n[1]+=Ve),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]-Ve}this._innerSetExtent(n[0],n[1]),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,n,i){e=e||10;var a=this._getExtentSpanWithBreaks();this._approxInterval=a/e,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var o=al.length,s=Math.min(nR(al,this._approxInterval,0,o),o-1);this._interval=al[s][1],this._intervalPrecision=jo(this._interval),this._minLevelUnit=al[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return xt(e)?e:+Ra(e)},t.prototype.contain=function(e){return Jd(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t})(In),al=[["second",Md],["minute",Ad],["hour",Lo],["quarter-day",Lo*6],["half-day",Lo*12],["day",Ve*1.2],["half-week",Ve*3.5],["week",Ve*7],["month",Ve*31],["quarter",Ve*95],["half-year",hy/2],["year",hy]];function iR(r,t,e,n){return Yc(new Date(t),r,n).getTime()===Yc(new Date(e),r,n).getTime()}function aR(r,t){return r/=Ve,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function oR(r){var t=30*Ve;return r/=t,r>6?6:r>3?3:r>2?2:1}function sR(r){return r/=Lo,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function bm(r,t){return r/=t?Ad:Md,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function lR(r){return PS(r)}function uR(r,t,e){var n=Math.max(0,dt(wi,t)-1);return Yc(new Date(r),wi[n],e).getTime()}function fR(r,t){var e=new Date(0);e[r](1);var n=e.getTime();e[r](1+t);var i=e.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function hR(r,t,e,n,i,a){var o=1e4,s=SI,l=0;function u(I,P,R,E,O,k,z){for(var V=fR(O,I),G=P,W=new Date(G);G<R&&G<=n[1]&&(z.push({value:G}),!(l++>o));)if(W[O](W[E]()+I),G=W.getTime(),a){var Z=a.calcNiceTickMultiple(G,V);Z>0&&(W[O](W[E]()+Z*I),G=W.getTime())}z.push({value:G,notAdd:!0})}function f(I,P,R){var E=[],O=!P.length;if(!iR(Po(I),n[0],n[1],e)){O&&(P=[{value:uR(n[0],I,e)},{value:n[1]}]);for(var k=0;k<P.length-1;k++){var z=P[k].value,V=P[k+1].value;if(z!==V){var G=void 0,W=void 0,Z=void 0,rt=!1;switch(I){case"year":G=Math.max(1,Math.round(t/Ve/365)),W=Ax(e),Z=MI(e);break;case"half-year":case"quarter":case"month":G=oR(t),W=Dd(e),Z=Dx(e);break;case"week":case"half-week":case"day":G=aR(t),W=Id(e),Z=Ix(e),rt=!0;break;case"half-day":case"quarter-day":case"hour":G=sR(t),W=Ld(e),Z=Lx(e);break;case"minute":G=bm(t,!0),W=Pd(e),Z=Px(e);break;case"second":G=bm(t,!1),W=Rd(e),Z=Rx(e);break;case"millisecond":G=lR(t),W=Ed(e),Z=Ex(e);break}V>=n[0]&&z<=n[1]&&u(G,z,V,W,Z,rt,E),I==="year"&&R.length>1&&k===0&&R.unshift({value:R[0].value-G})}}for(var k=0;k<E.length;k++)R.push(E[k])}}for(var h=[],v=[],c=0,d=0,p=0;p<s.length;++p){var g=Po(s[p]);if(wI(s[p])){f(s[p],h[h.length-1]||[],v);var y=s[p+1]?Po(s[p+1]):null;if(g!==y){if(v.length){d=c,v.sort(function(I,P){return I.value-P.value});for(var m=[],_=0;_<v.length;++_){var S=v[_].value;(_===0||v[_-1].value!==S)&&(m.push(v[_]),S>=n[0]&&S<=n[1]&&c++)}var b=i/t;if(c>b*1.5&&d>b/1.5||(h.push(m),c>b||r===s[p]))break}v=[]}}}for(var x=kt(U(h,function(I){return kt(I,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(I){return I.length>0}),w=[],T=x.length-1,p=0;p<x.length;++p)for(var D=x[p],A=0;A<D.length;++A){var C=ou(D[A].value,e);w.push({value:D[A].value,time:{level:T-p,upperTimeUnit:C,lowerTimeUnit:C}})}w.sort(function(I,P){return I.value-P.value});for(var L=[],p=0;p<w.length;++p)(p===0||w[p].value!==w[p-1].value)&&L.push(w[p]);return L}kn.registerClass(n1);var cv=Xt,cR=Math.floor,vR=Math.ceil,ol=Math.pow,sl=Math.log,i1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new In,e}return t.prototype.getTicks=function(e){e=e||{};var n=this._extent.slice(),i=this._originalScale.getExtent(),a=r.prototype.getTicks.call(this,e),o=this.base;return this._originalScale._innerGetBreaks(),U(a,function(s){var l=s.value,u=null,f=ol(o,l);l===n[0]&&this._fixMin?u=i[0]:l===n[1]&&this._fixMax&&(u=i[1]);var h;return u!=null&&(f=Th(f,u)),{value:f,break:h}},this)},t.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},t.prototype.setExtent=function(e,n){this._originalScale.setExtent(e,n);var i=fv(this.base,[e,n]);r.prototype.setExtent.call(this,i[0],i[1])},t.prototype.getExtent=function(){var e=this.base,n=r.prototype.getExtent.call(this);n[0]=ol(e,n[0]),n[1]=ol(e,n[1]);var i=this._originalScale.getExtent();return this._fixMin&&(n[0]=Th(n[0],i[0])),this._fixMax&&(n[1]=Th(n[1],i[1])),n},t.prototype.unionExtentFromData=function(e,n){this._originalScale.unionExtentFromData(e,n);var i=fv(this.base,e.getApproximateExtent(n),!0);this._innerUnionExtent(i)},t.prototype.calcNiceTicks=function(e){e=e||10;var n=this._extent.slice(),i=this._getExtentSpanWithBreaks();if(!(!isFinite(i)||i<=0)){var a=LM(i),o=e/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[cv(vR(n[0]/a)*a),cv(cR(n[1]/a)*a)];this._interval=a,this._intervalPrecision=jo(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=sl(e)/sl(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=sl(e)/sl(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),ol(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t})(In);function Th(r,t){return cv(r,wr(t))}kn.registerClass(i1);var dR=(function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,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"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;Q(o)?this._modelMinNum=ll(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=ll(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(Q(s)?this._modelMaxNum=ll(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=ll(t,s)),i)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=H(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Dr(u[0],1),Dr(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?i?0:NaN:e-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 h=Wr(s)||Wr(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){this[gR[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=pR[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),pR={min:"_determinedMin",max:"_determinedMax"},gR={min:"_dataMin",max:"_dataMax"};function a1(r,t,e){var n=r.rawExtentInfo;return n||(n=new dR(r,t,e),r.rawExtentInfo=n,n)}function ll(r,t){return t==null?null:Wr(t)?NaN:r.parse(t)}function o1(r,t){var e=r.type,n=a1(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=Jb("bar",o),l=!1;if(M(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=t1(s),f=yR(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function yR(r,t,e,n){var i=e.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=JP(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;M(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;M(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,v=f/h-f;return t+=v*(l/u),r-=v*(s/u),{min:r,max:t}}function vv(r,t){var e=t,n=o1(r,e),i=n.extent,a=e.get("splitNumber");r instanceof i1&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(f1(e)),r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function s1(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new tp({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new n1({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(kn.getClass(t)||In)}}function mR(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function za(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=xI(t);return function(i,a){return r.scale.getFormattedLabel(i,a,e)}}else{if(X(t))return function(i){var a=r.scale.getLabel(i),o=t.replace("{value}",a??"");return o};if(Q(t)){if(r.type==="category")return function(i,a){return t(gu(r,i),i.value-r.scale.getExtent()[0],null)};var n=au();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),t(gu(r,i),a,o)}}else return function(i){return r.scale.getLabel(i)}}}function gu(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function rp(r){var t=r.get("interval");return t??"auto"}function l1(r){return r.type==="category"&&rp(r.getLabelModel())===0}function u1(r,t){var e={};return M(r.mapDimensionsAll(t),function(n){e[Kb(r,n)]=!0}),Pt(e)}function _R(r,t,e){t&&M(u1(t,e),function(n){var i=t.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}function Ca(r){return r==="middle"||r==="center"}function Jo(r){return r.getShallow("show")}function f1(r){var t=r.get("breaks",!0);t==null}var np=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),wm=[],SR={registerPreprocessor:Hb,registerProcessor:Wb,registerPostInit:yP,registerPostUpdate:mP,registerUpdateLifecycle:Kd,registerAction:Lr,registerCoordinateSystem:_P,registerLayout:SP,registerVisual:Bi,registerTransform:bP,registerLoading:Ub,registerMap:xP,registerImpl:Q2,PRIORITY:fP,ComponentModel:mt,ComponentView:$t,SeriesModel:Yt,ChartView:Vt,registerComponentModel:function(r){mt.registerClass(r)},registerComponentView:function(r){$t.registerClass(r)},registerSeriesModel:function(r){Yt.registerClass(r)},registerChartView:function(r){Vt.registerClass(r)},registerCustomSeries:function(r,t){},registerSubTypeDefaulter:function(r,t){mt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){wM(r,t)}};function ue(r){if(H(r)){M(r,function(t){ue(t)});return}dt(wm,r)>=0||(wm.push(r),Q(r)&&(r={install:r}),r.install(SR))}var xR=wt(),ko=wt(),ur={estimate:1,determine:2};function yu(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function h1(r,t){var e=U(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function bR(r,t){var e=r.getLabelModel().get("customValues");if(e){var n=za(r),i=r.scale.getExtent(),a=h1(r,e),o=kt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:U(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?TR(r,t):MR(r)}function wR(r,t,e){var n=r.getTickModel().get("customValues");if(n){var i=r.scale.getExtent(),a=h1(r,n);return{ticks:kt(a,function(o){return o>=i[0]&&o<=i[1]})}}return r.type==="category"?CR(r,t):{ticks:U(r.scale.getTicks(e),function(o){return o.value})}}function TR(r,t){var e=r.getLabelModel(),n=c1(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:n}function c1(r,t,e){var n=DR(r),i=rp(t),a=e.kind===ur.estimate;if(!a){var o=d1(n,i);if(o)return o}var s,l;Q(i)?s=y1(r,i):(l=i==="auto"?IR(r,e):i,s=g1(r,l));var u={labels:s,labelCategoryInterval:l};return a?e.out.noPxChangeTryDetermine.push(function(){return dv(n,i,u),!0}):dv(n,i,u),u}function CR(r,t){var e=AR(r),n=rp(t),i=d1(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),Q(n))a=y1(r,n,!0);else if(n==="auto"){var s=c1(r,r.getLabelModel(),yu(ur.determine));o=s.labelCategoryInterval,a=U(s.labels,function(l){return l.tickValue})}else o=n,a=g1(r,o,!0);return dv(e,n,{ticks:a,tickCategoryInterval:o})}function MR(r){var t=r.scale.getTicks(),e=za(r);return{labels:U(t,function(n,i){return{formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var AR=v1("axisTick"),DR=v1("axisLabel");function v1(r){return function(e){return ko(e)[r]||(ko(e)[r]={list:[]})}}function d1(r,t){for(var e=0;e<r.list.length;e++)if(r.list[e].key===t)return r.list[e].value}function dv(r,t,e){return r.list.push({key:t,value:e}),e}function IR(r,t){if(t.kind===ur.estimate){var e=r.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return ko(r).autoInterval=e,!0}),e}var n=ko(r).autoInterval;return n??(ko(r).autoInterval=r.calculateCategoryInterval(t))}function LR(r,t){var e=t.kind,n=RR(r),i=za(r),a=(n.axisRotate-n.labelRotate)/180*Math.PI,o=r.scale,s=o.getExtent(),l=o.count();if(s[1]-s[0]<1)return 0;var u=1,f=40;l>f&&(u=Math.max(1,Math.floor(l/f)));for(var h=s[0],v=r.dataToCoord(h+1)-r.dataToCoord(h),c=Math.abs(v*Math.cos(a)),d=Math.abs(v*Math.sin(a)),p=0,g=0;h<=s[1];h+=u){var y=0,m=0,_=nd(i({value:h}),n.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var S=p/c,b=g/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(e===ur.estimate)return t.out.noPxChangeTryDetermine.push(Y(PR,null,r,x,l)),x;var w=p1(r,x,l);return w??x}function PR(r,t,e){return p1(r,t,e)==null}function p1(r,t,e){var n=xR(r.model),i=r.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-e)<=1&&a>t&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=e,n.lastAutoInterval=t,n.axisExtent0=i[0],n.axisExtent1=i[1]}function RR(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function g1(r,t,e){var n=za(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=l1(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);c&&d-l!==a[1]&&p(a[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function y1(r,t,e){var n=r.scale,i=za(r),a=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Tm=[0,1],ip=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return IS(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(i.parse(t)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Cm(n,i.count())),St(t,Tm,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Cm(n,i.count()));var a=St(t,n,Tm,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=wR(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),i=n.ticks,a=U(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return ER(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=U(n,function(a){return U(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(t){return t=t||yu(ur.determine),bR(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(t){return t=t||yu(ur.determine),LR(this,t)},r})();function Cm(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function ER(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.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;M(t,function(c){c.coord-=u/2,c.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var h=a[0]>a[1];v(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&v(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),v(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&v(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function v(c,d){return c=Xt(c),d=Xt(d),h?c>d:c<d}}function m1(r,t,e,n,i,a,o,s){var l=i-r,u=a-t,f=e-r,h=n-t,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,d=c/v;d*=v;var p=o[0]=r+d*f,g=o[1]=t+d*h;return Math.sqrt((p-i)*(p-i)+(g-a)*(g-a))}var pn=new ht,Nt=new ht,Jt=new ht,gn=new ht,Sr=new ht,mu=[],ve=new ht;function kR(r,t){if(t<=180&&t>0){t=t/180*Math.PI,pn.fromArray(r[0]),Nt.fromArray(r[1]),Jt.fromArray(r[2]),ht.sub(gn,pn,Nt),ht.sub(Sr,Jt,Nt);var e=gn.len(),n=Sr.len();if(!(e<.001||n<.001)){gn.scale(1/e),Sr.scale(1/n);var i=gn.dot(Sr),a=Math.cos(t);if(a<i){var o=m1(Nt.x,Nt.y,Jt.x,Jt.y,pn.x,pn.y,mu);ve.fromArray(mu),ve.scaleAndAdd(Sr,o/Math.tan(Math.PI-t));var s=Jt.x!==Nt.x?(ve.x-Nt.x)/(Jt.x-Nt.x):(ve.y-Nt.y)/(Jt.y-Nt.y);if(isNaN(s))return;s<0?ht.copy(ve,Nt):s>1&&ht.copy(ve,Jt),ve.toArray(r[1])}}}}function OR(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,pn.fromArray(r[0]),Nt.fromArray(r[1]),Jt.fromArray(r[2]),ht.sub(gn,Nt,pn),ht.sub(Sr,Jt,Nt);var n=gn.len(),i=Sr.len();if(!(n<.001||i<.001)){gn.scale(1/n),Sr.scale(1/i);var a=gn.dot(t),o=Math.cos(e);if(a<o){var s=m1(Nt.x,Nt.y,Jt.x,Jt.y,pn.x,pn.y,mu);ve.fromArray(mu);var l=Math.PI/2,u=Math.acos(Sr.dot(t)),f=l+u-e;if(f>=l)ht.copy(ve,Jt);else{ve.scaleAndAdd(Sr,s/Math.tan(Math.PI/2-f));var h=Jt.x!==Nt.x?(ve.x-Nt.x)/(Jt.x-Nt.x):(ve.y-Nt.y)/(Jt.y-Nt.y);if(isNaN(h))return;h<0?ht.copy(ve,Nt):h>1&&ht.copy(ve,Jt)}ve.toArray(r[1])}}}}function Ch(r,t,e,n){var i=e==="normal",a=i?r:r.ensureState(e);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?r.useStyle(s):a.style=s}function BR(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var i=uc(n[0],n[1]),a=uc(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*e,s=yf([],n[1],n[0],o/i),l=yf([],n[1],n[2],o/a),u=yf([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)r.lineTo(n[f][0],n[f][1])}function _1(r,t,e){var n=r.getTextGuideLine(),i=r.getTextContent();if(!i){n&&r.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=i.ignore,l=0;l<Wo.length;l++){var u=Wo[l],f=t[u],h=u==="normal";if(f){var v=f.get("show"),c=h?s:et(i.states[u]&&i.states[u].ignore,s);if(c||!et(v,o)){var d=h?n:n&&n.states[u];d&&(d.ignore=!0),n&&Ch(n,!0,u,f);continue}n||(n=new fr,r.setTextGuideLine(n),!h&&(s||!o)&&Ch(n,!0,"normal",t.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),Ch(n,!1,u,f)}}if(n){gt(n.style,e),n.style.fill=null;var p=a.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=BR}}function S1(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},n=0;n<ye.length;n++){var i=ye[n];e[i]=r.getModel([i,t])}return e}var Mm=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],NR=1,_u=2,x1=NR|_u;function Su(r,t,e){e=e||x1,t?r.dirty|=e:r.dirty&=~e}function b1(r,t){return t=t||x1,r.dirty==null||!!(r.dirty&t)}function Ln(r){if(r)return b1(r)&&w1(r,r.label,r),r}function w1(r,t,e){var n=t.getComputedTransform();r.transform=xd(r.transform,n);var i=r.localRect=Zo(r.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=e&&e.marginForce,l=e&&e.minMarginForce,u=e&&e.marginDefault,f=a.__marginType;f==null&&u&&(o=u,f=ha.textMargin);for(var h=0;h<4;h++)Mh[h]=f===ha.minMargin&&l&&l[h]!=null?l[h]:s&&s[h]!=null?s[h]:o?o[h]:0;f===ha.textMargin&&nu(i,Mh,!1,!1);var v=r.rect=Zo(r.rect,i);return n&&v.applyTransform(n),f===ha.minMargin&&nu(v,Mh,!1,!1),r.axisAligned=Sd(n),(r.label=r.label||{}).ignore=t.ignore,Su(r,!1),Su(r,!0,_u),r}var Mh=[0,0,0,0];function zR(r,t,e){return r.transform=xd(r.transform,e),r.localRect=Zo(r.localRect,t),r.rect=Zo(r.rect,t),e&&r.rect.applyTransform(e),r.axisAligned=Sd(e),r.obb=void 0,(r.label=r.label||{}).ignore=!1,r}function VR(r,t){if(r){r.label.x+=t.x,r.label.y+=t.y,r.label.markRedraw();var e=r.transform;e&&(e[4]+=t.x,e[5]+=t.y);var n=r.rect;n&&(n.x+=t.x,n.y+=t.y);var i=r.obb;i&&i.fromBoundingRect(r.localRect,e)}}function Am(r,t){for(var e=0;e<Mm.length;e++){var n=Mm[e];r[n]==null&&(r[n]=t[n])}return Ln(r)}function Dm(r){var t=r.obb;return(!t||b1(r,_u))&&(r.obb=t=t||new cx,t.fromBoundingRect(r.localRect,r.transform),Su(r,!1,_u)),t}function FR(r,t,e,n,i){var a=r.length,o=hn[t],s=ba[t];if(a<2)return!1;r.sort(function(w,T){return w.rect[o]-T.rect[o]});for(var l=0,u,f=!1,h=0;h<a;h++){var v=r[h],c=v.rect;u=c[o]-l,u<0&&(c[o]-=u,v.label[o]-=u,f=!0),l=c[o]+c[s]}var d=r[0],p=r[a-1],g,y;m(),g<0&&b(-g,.8),y<0&&b(y,.8),m(),_(g,y,1),_(y,g,-1),m(),g<0&&x(-g),y<0&&x(y);function m(){g=d.rect[o]-e,y=n-p.rect[o]-p.rect[s]}function _(w,T,D){if(w<0){var A=Math.min(T,-w);if(A>0){S(A*D,0,a);var C=A+w;C<0&&b(-C*D,1)}else b(-w*D,1)}}function S(w,T,D){w!==0&&(f=!0);for(var A=T;A<D;A++){var C=r[A],L=C.rect;L[o]+=w,C.label[o]+=w}}function b(w,T){for(var D=[],A=0,C=1;C<a;C++){var L=r[C-1].rect,I=Math.max(r[C].rect[o]-L[o]-L[s],0);D.push(I),A+=I}if(A){var P=Math.min(Math.abs(w)/A,T);if(w>0)for(var C=0;C<a-1;C++){var R=D[C]*P;S(R,0,C+1)}else for(var C=a-1;C>0;C--){var R=D[C-1]*P;S(-R,C,a)}}}function x(w){var T=w<0?-1:1;w=Math.abs(w);for(var D=Math.ceil(w/(a-1)),A=0;A<a-1;A++)if(T>0?S(D,0,A+1):S(-D,a-A-1,a),w-=D,w<=0)return}return f}function GR(r){var t=[];r.sort(function(u,f){return(f.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||f.priority-u.priority});function e(u){if(!u.ignore){var f=u.ensureState("emphasis");f.ignore==null&&(f.ignore=!1)}u.ignore=!0}for(var n=0;n<r.length;n++){var i=Ln(r[n]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,l=0;l<t.length;l++)if(ap(i,t[l],null,{touchThreshold:.05})){s=!0;break}s?(e(a),o&&e(o)):t.push(i)}}}function ap(r,t,e,n){return!r||!t||r.label&&r.label.ignore||t.label&&t.label.ignore||!r.rect.intersect(t.rect,e,n)?!1:r.axisAligned&&t.axisAligned?!0:Dm(r).intersect(Dm(t),e,n)}function Im(r,t,e){var n=or.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",r)),n.width=i*e,n.height=a*e,n}var Ah=(function(r){B(t,r);function t(e,n,i){var a=r.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||Kl,typeof e=="string"?o=Im(e,n,i):j(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(aS(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 e=this.dpr;this.domBack=Im("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new ot(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new ot(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,b=1/0,x=0,w=0;w<o.length;++w){var T=o[w];if(T.intersect(m)){var D=new ot(0,0,0,0);D.copy(T),D.union(m),o[w]=D,S=!0;break}else if(l){u.copy(m),u.union(T);var A=m.width*m.height,C=T.width*T.height,L=u.width*u.height,I=L-A-C;I<b&&(b=I,x=w)}}if(l&&(o[x].union(m),S=!0),!S){var _=new ot(0,0,0,0);_.copy(m),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var v=e[h];if(v){var c=v.shouldBePainted(i,a,!0,!0),d=v.__isRendered&&(v.__dirty&Me||!c)?v.getPrevPaintRect():null;d&&f(d);var p=c&&(v.__dirty&Me||!v.__isRendered)?v.getPaintRect():null;p&&f(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var v=n[h],c=v&&v.shouldBePainted(i,a,!0,!0);if(v&&(!c||!v.__zr)&&v.__isRendered){var d=v.getPrevPaintRect();d&&f(d)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var y=h+1;y<o.length;)o[h].intersect(o[y])?(g=!0,o[h].union(o[y]),o.splice(y,1)):y++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=n+"px"),a.width=e*i,a.height=n*i,s&&(s.width=e*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!e,f=this.lastFrameAlpha,h=this.dpr,v=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var c=this.domBack;function d(p,g,y,m){if(o.clearRect(p,g,y,m),n&&n!=="transparent"){var _=void 0;if(Ou(n)){var S=n.global||n.__width===y&&n.__height===m;_=S&&n.__canvasGradient||ev(o,n,{x:0,y:0,width:y,height:m}),n.__canvasGradient=_,n.__width=y,n.__height=m}else iC(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=rv(o,n,{dirty:function(){v.setUnpainted(),v.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(p,g,y,m),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(c,p,g,y,m),o.restore())}!i||u?d(0,0,s,l):i.length&&M(i,function(p){d(p.x*h,p.y*h,p.width*h,p.height*h)})},t})(Ze),Lm=1e5,ai=314159,ul=.01,HR=.001;function WR(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function UR(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var YR=(function(){function r(t,e,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=F({},n||{}),this.dpr=n.devicePixelRatio||Kl,this._singleCanvas=a,this.root=t;var o=t.style;o&&(aS(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var f=t,h=f.width,v=f.height;n.width!=null&&(h=n.width),n.height!=null&&(v=n.height),this.dpr=n.devicePixelRatio||1,f.width=h*this.dpr,f.height=v*this.dpr,this._width=h,this._height=v;var c=new Ah(f,this,this.dpr);c.__builtin__=!0,c.initContext(),l[ai]=c,c.zlevel=ai,s.push(ai),this._domRoot=t}else{this._width=Js(t,0,n),this._height=Js(t,1,n);var u=this._domRoot=UR(this._width,this._height);t.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,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=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(Lm)),a||(a=n.ctx,a.save()),gi(a,s,i,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(Lm)},r.prototype.paintOne=function(t,e){Mb(t,e)},r.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,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;Ul(function(){l._paintList(t,e,n,i)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(ai).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},r.prototype._doPaintList=function(t,e,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 f=!0,h=!1,v=function(p){var g=a[p],y=g.ctx,m=o&&g.createRepaintRects(t,e,c._width,c._height),_=n?g.__startIndex:g.__drawIndex,S=!n&&g.incremental&&Date.now,b=S&&Date.now(),x=g.zlevel===c._zlevelList[0]?c._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,x,m);else if(_===g.__startIndex){var w=t[_];(!w.incremental||!w.notClear||n)&&g.clear(!1,x,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,D=function(I){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(T=_;T<g.__endIndex;T++){var R=t[T];if(R.__inHover&&(h=!0),i._doPaintEl(R,g,o,I,P,T===g.__endIndex-1),S){var E=Date.now()-b;if(E>15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=c.dpr,C=0;C<m.length;++C){var L=m[C];y.save(),y.beginPath(),y.rect(L.x*A,L.y*A,L.width*A,L.height*A),y.clip(),D(L),y.restore()}else y.save(),D(),y.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(f=!1)},c=this,d=0;d<a.length;d++)v(d);return ct.wxa&&M(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:f,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,n,i,a,o){var s=e.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(gi(s,t,a,o),t.setPrevPaintRect(l))}else gi(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ai);var n=this._layers[t];return n||(n=new Ah("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?ft(n,this._layerConfig[t],!0):this._layerConfig[t-ul]&&ft(n,this._layerConfig[t-ul],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},r.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[t]&&WR(e)){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]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,v){h.__dirty=h.__used=!1});function e(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}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,f=void 0;s!==u&&(s=u,o=0),i.incremental?(f=this.getLayer(u+HR,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?ul:0),this._needsManuallyCompositing),f.__builtin__||Kv("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),i.__dirty&Me&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,M(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?ft(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+ul){var o=this._layers[a];ft(o,n[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(dt(n,t),1))},r.prototype.resize=function(t,e){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),e!=null&&(i.height=e),t=Js(a,0,i),e=Js(a,1,i),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(ai).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[ai].dom;var e=new Ah("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,a=e.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.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 f=s[l];gi(n,f,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function ZR(r){r.registerPainter("canvas",YR)}var XR="expandAxisBreak",$R=null;function qR(){return $R}var KR=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return U(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),kt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),pv=["x","y"];function Pm(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var QR=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=pv,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!Pm(e)||!Pm(n))){var i=e.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 f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-i[0]*f,c=o[1]-a[0]*h,d=this._transform=[f,0,0,h,v,c];this._invTransform=Pa([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new ot(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return pe(i,e,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(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(e[0]),u=a.parse(e[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(e,n,i){if(i=i||[],this._invTransform)return pe(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-e,o=Math.min(i[0],i[1])-e,s=Math.max(n[0],n[1])-a+e,l=Math.max(i[0],i[1])-o+e;return new ot(a,o,s,l)},t})(KR),jR=(function(r){B(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(ip),T1={left:0,right:0,top:0,bottom:0},xu=["25%","25%"],JR=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,n){var i=Na(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&e.outerBounds&&Dn(e.outerBounds,i)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Dn(this.option.outerBounds,e.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:T1,outerBoundsContain:"all",outerBoundsClampWidth:xu[0],outerBoundsClampHeight:xu[1],backgroundColor:N.color.transparent,borderWidth:1,borderColor:N.color.neutral30},t})(mt),yn=Math.PI,tE=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],eE=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ts=wt(),C1=wt(),M1=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,i=this.recordMap,a=i[e]||(i[e]=[]);return a[n]||(a[n]={ready:{}})},r})();function rE(r,t,e,n){var i=e.axis,a=t.ensureRecord(e),o=[],s,l=op(r.axisName)&&Ca(r.nameLocation);M(n,function(d){var p=Ln(d);if(!(!p||p.label.ignore)){o.push(p);var g=a.transGroup;l&&(g.transform?Pa(eo,g.transform):td(eo),p.transform&&wo(eo,eo,p.transform),ot.copy(fl,p.localRect),fl.applyTransform(eo),s?s.union(fl):ot.copy(s=new ot(0,0,0,0),fl))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",f=a.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var h=i.getExtent(),v=Math.min(h[0],h[1]),c=Math.max(h[0],h[1])-v;s.union(new ot(v,0,c,1))}a.stOccupiedRect=s,a.labelInfoList=o}var eo=Fe(),fl=new ot(0,0,0,0),A1=function(r,t,e,n,i,a){if(Ca(r.nameLocation)){var o=a.stOccupiedRect;o&&D1(zR({},o,a.transGroup.transform),n,i)}else I1(a.labelInfoList,a.dirVec,n,i)};function D1(r,t,e){var n=new ht;ap(r,t,n,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&VR(t,n)}function I1(r,t,e,n){for(var i=ht.dot(n,t)>=0,a=0,o=r.length;a<o;a++){var s=r[i?a:o-1-a];s.label.ignore||D1(s,e,n)}}var Ar=(function(){function r(t,e,n,i){this.group=new yt,this._axisModel=t,this._api=e,this._local={},this._shared=i||new M1(A1),this._resetCfgDetermined(n)}return r.prototype.updateCfg=function(t){var e=this._cfg.raw;e.position=t.position,e.labelOffset=t.labelOffset,this._resetCfgDetermined(e)},r.prototype.__getRawCfg=function(){return this._cfg.raw},r.prototype._resetCfgDetermined=function(t){var e=this._axisModel,n=e.getDefaultOption?e.getDefaultOption():{},i=et(t.axisName,e.get("name")),a=e.get("nameMoveOverlap");(a==null||a==="auto")&&(a=et(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:et(t.nameDirection,1),tickDirection:et(t.tickDirection,1),labelDirection:et(t.labelDirection,1),labelOffset:et(t.labelOffset,0),silent:et(t.silent,!0),axisName:i,nameLocation:_n(e.get("nameLocation"),n.nameLocation,"end"),shouldNameMoveOverlap:op(i)&&a,optionHideOverlap:e.get(["axisLabel","hideOverlap"]),showMinorTicks:e.get(["minorTick","show"])};this._cfg=o;var s=new yt({x:o.position[0],y:o.position[1],rotation:o.rotation});s.updateTransform(),this._transformGroup=s;var l=this._shared.ensureRecord(e);l.transGroup=this._transformGroup,l.dirVec=new ht(Math.cos(-o.rotation),Math.sin(-o.rotation))},r.prototype.build=function(t,e){var n=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),M(nE,function(i){t[i]&&iE[i](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,e||{})}),this},r.innerTextLayout=function(t,e,n){var i=LS(e-t),a,o;return Vo(i)?(o=n>0?"top":"bottom",a="center"):Vo(i-yn)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<yn?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),nE=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],iE={axisLine:function(r,t,e,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,f=[l[0],0],h=[l[1],0],v=f[0]>h[0];u&&(pe(f,f,u),pe(h,h,u));var c=F({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:c};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())qR().buildAxisBreakLine(n,i,a,d);else{var p=new lr(F({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},d));Yo(p.shape,p.style.lineWidth),p.anid="line",i.add(p)}var g=n.get(["axisLine","symbol"]);if(g!=null){var y=n.get(["axisLine","symbolSize"]);X(g)&&(g=[g,g]),(X(y)||xt(y))&&(y=[y,y]);var m=of(n.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];M([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(b,x){if(g[x]!=="none"&&g[x]!=null){var w=le(g[x],-_/2,-S/2,_,S,c.stroke,!0),T=b.r+b.offset,D=v?h:f;w.attr({rotation:b.rotate,x:D[0]+T*Math.cos(r.rotation),y:D[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),i.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,n,i,a,o,s){var l=Em(t,i,s);l&&Rm(r,t,e,n,i,a,o,ur.estimate)},axisTickLabelDetermine:function(r,t,e,n,i,a,o,s){var l=Em(t,i,s);l&&Rm(r,t,e,n,i,a,o,ur.determine);var u=lE(r,i,a,n);sE(r,t.labelLayoutList,u),uE(r,i,a,n,r.tickDirection)},axisName:function(r,t,e,n,i,a,o,s){var l=e.ensureRecord(n);t.nameEl&&(i.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(op(u)){var f=r.nameLocation,h=r.nameDirection,v=n.getModel("nameTextStyle"),c=n.get("nameGap")||0,d=n.axis.getExtent(),p=n.axis.inverse?-1:1,g=new ht(0,0),y=new ht(0,0);f==="start"?(g.x=d[0]-p*c,y.x=-p):f==="end"?(g.x=d[1]+p*c,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+h*c,y.y=h);var m=Fe();y.transform(zu(m,m,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*yn/180);var S,b;Ca(f)?S=Ar.innerTextLayout(r.rotation,_??r.rotation,h):(S=aE(r.rotation,f,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=v.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,D=Xr(r.raw.nameTruncateMaxWidth,w.maxWidth,b),A=s.nameMarginLevel||0,C=new Tt({x:g.x,y:g.y,rotation:S.rotation,silent:Ar.isLabelSilent(n),style:Wt(v,{text:u,font:x,overflow:"truncate",width:D,ellipsis:T,fill:v.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(ps({el:C,componentModel:n,itemName:u}),C.__fullText=u,C.anid="name",n.get("triggerEvent")){var L=Ar.makeAxisEventDataBase(n);L.targetType="axisName",L.name=u,vt(C).eventData=L}a.add(C),C.updateTransform(),t.nameEl=C;var I=l.nameLayout=Ln({label:C,priority:C.z2,defaultAttr:{ignore:C.ignore},marginDefault:Ca(f)?tE[A]:eE[A]});if(l.nameLocation=f,i.add(C),C.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=e.ensureRecord(n);e.resolveAxisNameOverlap(r,e,n,I,y,P)}}}};function Rm(r,t,e,n,i,a,o,s){P1(t)||fE(r,t,i,s,n,o);var l=t.labelLayoutList;hE(r,n,l,a),r.rotation;var u=r.optionHideOverlap;oE(n,l,u),u&&GR(kt(l,function(f){return f&&!f.label.ignore})),rE(r,e,n,l)}function aE(r,t,e,n){var i=LS(e-r),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Vo(i-yn/2)?(o=l?"bottom":"top",a="center"):Vo(i-yn*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<yn*1.5&&i>yn/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function oE(r,t,e){if(l1(r.axis))return;function n(s,l,u){var f=Ln(t[l]),h=Ln(t[u]);if(!(!f||!h)){if(s===!1||f.suggestIgnore){So(f.label);return}if(h.suggestIgnore){So(h.label);return}var v=.1;if(!e){var c=[0,0,0,0];f=Am({marginForce:c},f),h=Am({marginForce:c},h)}ap(f,h,null,{touchThreshold:v})&&So(s?h.label:f.label)}}var i=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]),o=t.length;n(i,0,1),n(a,o-1,o-2)}function sE(r,t,e){r.showMinorTicks||M(t,function(n){if(n&&n.label.ignore)for(var i=0;i<e.length;i++){var a=e[i],o=C1(a),s=ts(n.label);if(o.tickValue!=null&&!o.onBand&&o.tickValue===s.tickValue){So(a);return}}})}function So(r){r&&(r.ignore=!0)}function L1(r,t,e,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(pe(o,o,t),pe(s,s,t));var f=new lr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Yo(f.shape,f.style.lineWidth),f.anid=i+"_"+r[l].tickValue,a.push(f);var h=C1(f);h.onBand=!!r[l].onBand,h.tickValue=r[l].tickValue}return a}function lE(r,t,e,n){var i=n.axis,a=n.getModel("axisTick"),o=a.get("show");if(o==="auto"&&(o=!0,r.raw.axisTickAutoShow!=null&&(o=!!r.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel("lineStyle"),l=r.tickDirection*a.get("length"),u=i.getTicksCoords(),f=L1(u,e.transform,l,gt(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)t.add(f[h]);return f}function uE(r,t,e,n,i){var a=n.axis,o=n.getModel("minorTick");if(!(!r.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var l=o.getModel("lineStyle"),u=i*o.get("length"),f=gt(l.getLineStyle(),gt(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),h=0;h<s.length;h++)for(var v=L1(s[h],e.transform,u,f,"minorticks_"+h),c=0;c<v.length;c++)t.add(v[c])}}function Em(r,t,e){if(P1(r)){var n=r.axisLabelsCreationContext,i=n.out.noPxChangeTryDetermine;if(e.noPxChange){for(var a=!0,o=0;o<i.length;o++)a=a&&i[o]();if(a)return!1}i.length&&(t.remove(r.labelGroup),gv(r,null,null,null))}return!0}function fE(r,t,e,n,i,a){var o=i.axis,s=Xr(r.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new yt;e.add(l);var u=yu(n);if(!s||o.scale.isBlank()){gv(t,[],l,u);return}var f=i.getModel("axisLabel"),h=o.getViewLabels(u),v=(Xr(r.raw.labelRotate,f.get("rotate"))||0)*yn/180,c=Ar.innerTextLayout(r.rotation,v,r.labelDirection),d=i.getCategories&&i.getCategories(!0),p=[],g=i.get("triggerEvent"),y=1/0,m=-1/0;M(h,function(S,b){var x,w=o.scale.type==="ordinal"?o.scale.getRawOrdinalNumber(S.tickValue):S.tickValue,T=S.formattedLabel,D=S.rawLabel,A=f;if(d&&d[w]){var C=d[w];j(C)&&C.textStyle&&(A=new Dt(C.textStyle,f,i.ecModel))}var L=A.getTextColor()||i.get(["axisLine","lineStyle","color"]),I=A.getShallow("align",!0)||c.textAlign,P=et(A.getShallow("alignMinLabel",!0),I),R=et(A.getShallow("alignMaxLabel",!0),I),E=A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||c.textVerticalAlign,O=et(A.getShallow("verticalAlignMinLabel",!0),E),k=et(A.getShallow("verticalAlignMaxLabel",!0),E),z=10+(((x=S.time)===null||x===void 0?void 0:x.level)||0);y=Math.min(y,z),m=Math.max(m,z);var V=new Tt({x:0,y:0,rotation:0,silent:Ar.isLabelSilent(i),z2:z,style:Wt(A,{text:T,align:b===0?P:b===h.length-1?R:I,verticalAlign:b===0?O:b===h.length-1?k:E,fill:Q(L)?L(o.type==="category"?D:o.type==="value"?w+"":w,b):L})});V.anid="label_"+w;var G=ts(V);if(G.break=S.break,G.tickValue=w,G.layoutRotation=c.rotation,ps({el:V,componentModel:i,itemName:T,formatterParamsExtra:{isTruncated:function(){return V.isTruncated},value:D,tickIndex:b}}),g){var W=Ar.makeAxisEventDataBase(i);W.targetType="axisLabel",W.value=D,W.tickIndex=b,S.break&&(W.break={start:S.break.parsedBreak.vmin,end:S.break.parsedBreak.vmax}),o.type==="category"&&(W.dataIndex=w),vt(V).eventData=W,S.break&&vE(i,a,V,S.break)}p.push(V),l.add(V)});var _=U(p,function(S){return{label:S,priority:ts(S).break?S.z2+(m-y+1):S.z2,defaultAttr:{ignore:S.ignore}}});gv(t,_,l,u)}function P1(r){return!!r.labelLayoutList}function gv(r,t,e,n){r.labelLayoutList=t,r.labelGroup=e,r.axisLabelsCreationContext=n}function hE(r,t,e,n){var i=t.get(["axisLabel","margin"]);M(e,function(a,o){var s=Ln(a);if(s){var l=s.label,u=ts(l);s.suggestIgnore=l.ignore,l.ignore=!1,Ac(Or,cE),Or.x=t.axis.dataToCoord(u.tickValue),Or.y=r.labelOffset+r.labelDirection*i,Or.rotation=u.layoutRotation,n.add(Or),Or.updateTransform(),n.remove(Or),Or.decomposeTransform(),Ac(l,Or),l.markRedraw(),Su(s,!0),Ln(s)}})}var Or=new _t,cE=new _t;function op(r){return!!r}function vE(r,t,e,n){e.on("click",function(i){var a={type:XR,breaks:[{start:n.parsedBreak.breakOption.start,end:n.parsedBreak.breakOption.end}]};a[r.axis.dim+"AxisIndex"]=r.componentIndex,t.dispatchAction(a)})}function bu(r,t,e){e=e||{};var n=t.axis,i={},a=n.getAxesOnZeroOf()[0],o=n.position,s=a?"onZero":o,l=n.dim,u=[r.x,r.x+r.width,r.y,r.y+r.height],f={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,v=l==="x"?[u[2]-h,u[3]+h]:[u[0]-h,u[1]+h];if(a){var c=a.toGlobalCoord(a.dataToCoord(0));v[f.onZero]=Math.max(Math.min(c,v[1]),v[0])}i.position=[l==="y"?v[f[s]]:u[0],l==="x"?v[f[s]]:u[3]],i.rotation=Math.PI/2*(l==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=d[o],i.labelOffset=a?v[f[o]]-v[f.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Xr(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var p=t.get(["axisLabel","rotate"]);return i.labelRotate=s==="top"?-p:p,i.z2=1,i}function dE(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function km(r){var t={xAxisModel:null,yAxisModel:null};return M(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,ee).models[0];t[n]=a}),t}function pE(r,t,e,n,i,a){for(var o=bu(r,e),s=!1,l=!1,u=0;u<t.length;u++)uv(t[u].getOtherAxis(e.axis).scale)&&(s=l=!0,e.axis.type==="category"&&e.axis.onBand&&(l=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=l,o.defaultNameMoveOverlap=a,new Ar(e,n,o,i)}function gE(r,t,e){var n=bu(t,e);r.updateCfg(n)}function R1(r,t,e){var n=In.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,{expandToNicedExtent:!0}),o=i.length-1,s=n.getInterval.call(e),l=o1(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;r.type==="log"&&(u=fv(r.base,u,!0)),r.setBreaksFromOption(f1(t)),r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var c=n.getInterval.call(r),d=u[0],p=u[1];if(f&&h)c=(p-d)/o;else if(f)for(p=u[0]+c*o;p<u[1]&&isFinite(p)&&isFinite(u[1]);)c=wh(c),p=u[0]+c*o;else if(h)for(d=u[1]-c*o;d>u[0]&&isFinite(d)&&isFinite(u[0]);)c=wh(c),d=u[1]-c*o;else{var g=r.getTicks().length-1;g>o&&(c=wh(c));var y=c*o;p=Math.ceil(u[1]/c)*c,d=Xt(p-y),d<0&&u[0]>=0?(d=0,p=Xt(y)):p>0&&u[1]<=0&&(p=0,d=-Xt(y))}var m=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;n.setExtent.call(r,d+c*m,p+c*_),n.setInterval.call(r,c),(m||_)&&n.setNiceExtent.call(r,d+c,p-c)}var Om=[[3,1],[0,2]],yE=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=pv,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Pt(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],d=c.model,p=c.scale;uv(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(c):(vv(p,d),uv(p)&&(s=c))}f.length&&(s||(s=f.pop(),vv(s.scale,s.model)),M(f,function(g){R1(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};M(n.x,function(o){Bm(n,"y",o,a)}),M(n.y,function(o){Bm(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=Ie(t,e),a=this._rect=ie(t.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(yv(o,a),!n){var u=SE(a,s,o,l,e),f=void 0;if(l)mv?(mv(this._axesList,a),yv(o,a)):f=Vm(a.clone(),"axisLabel",null,a,o,u,i);else{var h=xE(t,a,i),v=h.outerBoundsRect,c=h.parsedOuterBoundsContain,d=h.outerBoundsClamp;v&&(f=Vm(v,c,d,a,o,u,i))}E1(a,o,ur.determine,null,f,i)}M(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}j(t)&&(e=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===e)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,n=t.xAxisModel||e&&e.getReferringComponents("xAxis",ee).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",ee).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,dt(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}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,M(s.x,function(f,h){M(s.y,function(v,c){var d="x"+h+"y"+c,p=new QR(d);p.master=i,p.model=t,i._coordsMap[d]=p,i._coordsList.push(p),p.addAxis(f),p.addAxis(v)})});function u(f){return function(h,v){if(Dh(h,t)){var c=h.get("position");f==="x"?c!=="top"&&c!=="bottom"&&(c=o.bottom?"top":"bottom"):c!=="left"&&c!=="right"&&(c=o.left?"right":"left"),o[c]=!0;var d=new jR(f,s1(h),[0,0],h.get("type"),c),p=d.type==="category";d.onBand=p&&h.get("boundaryGap"),d.inverse=h.get("inverse"),h.axis=d,d.model=h,d.grid=a,d.index=v,a._axesList.push(d),s[f][v]=d,l[f]++}}}},r.prototype._updateScale=function(t,e){M(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(dE(i)){var a=km(i),o=a.xAxisModel,s=a.yAxisModel;if(!Dh(o,e)||!Dh(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),f=l.getAxis("x"),h=l.getAxis("y");n(u,f),n(u,h)}},this);function n(i,a){M(u1(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],n=[];return M(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);dt(e,a)<0&&e.push(a),dt(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}},r.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,a){var o=new r(i,t,e);o.name="grid_"+a,o.resize(i,e,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){RI({targetModel:i,coordSysType:"cartesian2d",coordSysProvider:a});function a(){var o=km(i),s=o.xAxisModel,l=o.yAxisModel,u=s.getCoordSysModel(),f=u.coordinateSystem;return f.getCartesian(s.componentIndex,l.componentIndex)}}),n},r.dimensions=pv,r})();function Dh(r,t){return r.getCoordSysModel()===t}function Bm(r,t,e,n){e.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Nm(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&Nm(i[u])&&!n[f(i[u])]){a=i[u];break}a&&(n[f(a)]=!0);function f(h){return h.dim+"_"+h.index}}function Nm(r){return r&&r.type!=="category"&&r.type!=="time"&&mR(r)}function mE(r,t){var e=r.getExtent(),n=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+t}:function(i){return n-i+t},r.toLocalCoord=r.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}function yv(r,t){M(r.x,function(e){return zm(e,t.x,t.width)}),M(r.y,function(e){return zm(e,t.y,t.height)})}function zm(r,t,e){var n=[0,e],i=r.inverse?1:0;r.setExtent(n[i],n[1-i]),mE(r,t)}var mv;function _E(r){mv=r}function Vm(r,t,e,n,i,a,o){E1(n,i,ur.estimate,t,!1,o);var s=[0,0,0,0];u(0),u(1),f(n,0,NaN),f(n,1,NaN);var l=eS(s,function(v){return v>0})==null;return nu(n,s,!0,!0,e),yv(i,n),l;function u(v){M(i[hn[v]],function(c){if(Jo(c.model)){var d=a.ensureRecord(c.model),p=d.labelInfoList;if(p)for(var g=0;g<p.length;g++){var y=p[g],m=c.scale.normalize(ts(y.label).tickValue);m=v===1?1-m:m,f(y.rect,v,m),f(y.rect,1-v,NaN)}var _=d.nameLayout;if(_){var m=Ca(d.nameLocation)?.5:NaN;f(_.rect,v,m),f(_.rect,1-v,NaN)}}})}function f(v,c,d){var p=r[hn[c]]-v[hn[c]],g=v[ba[c]]+v[hn[c]]-(r[ba[c]]+r[hn[c]]);p=h(p,1-d),g=h(g,d);var y=Om[c][0],m=Om[c][1];s[y]=Ae(s[y],p),s[m]=Ae(s[m],g)}function h(v,c){return v>0&&!Wr(c)&&c>1e-4&&(v/=c),v}}function SE(r,t,e,n,i){var a=new M1(bE);return M(e,function(o){return M(o,function(s){if(Jo(s.model)){var l=!n;s.axisBuilder=pE(r,t,s.model,i,a,l)}})}),a}function E1(r,t,e,n,i,a){var o=e===ur.determine;M(t,function(u){return M(u,function(f){Jo(f.model)&&(gE(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[hn[1-u]]=r[ba[u]]<=a.refContainer[ba[u]]*.5?0:1-u===1?2:1}M(t,function(u,f){return M(u,function(h){Jo(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function xE(r,t,e){var n,i=r.get("outerBoundsMode",!0);i==="same"?n=t.clone():(i==null||i==="auto")&&(n=ie(r.get("outerBounds",!0)||T1,e.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||dt(["all","axisLabel"],a)<0?o="all":o=a;var s=[Dc(et(r.get("outerBoundsClampWidth",!0),xu[0]),t.width),Dc(et(r.get("outerBoundsClampHeight",!0),xu[1]),t.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var bE=function(r,t,e,n,i,a){var o=e.axis.dim==="x"?"y":"x";A1(r,t,e,n,i,a),Ca(r.nameLocation)||M(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&I1(s.labelInfoList,s.dirVec,n,i)})};function wE(){_E(TE)}function TE(r,t){M(r,function(e){if(!e.model.get(["axisLabel","inside"])){var n=CE(e);if(n){var i=e.isHorizontal()?"height":"width",a=e.model.get(["axisLabel","margin"]);t[i]-=n[i]+a,e.position==="top"?t.y+=n.height+a:e.position==="left"&&(t.x+=n.width+a)}}})}function CE(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var n,i,a=e.getExtent();e instanceof tp?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=za(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;f<i;f+=u){var h=n?n[f]:{value:a[0]+f},v=s(h,f),c=o.getTextRect(v),d=p(c,o.get("rotate")||0);l?l.union(d):l=d}return l;function p(g,y){var m=y*Math.PI/180,_=g.width,S=g.height,b=_*Math.abs(Math.cos(m))+Math.abs(S*Math.sin(m)),x=_*Math.abs(Math.sin(m))+Math.abs(S*Math.cos(m)),w=new ot(g.x,g.y,b,x);return w}}var ME=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return Ni(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,i){return i.point(n.getItemLayout(e))},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:N.color.primary}},universalTransition:{divideShape:"clone"}},t})(Yt);function sp(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=Ta(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<e.length;o++)a.push(Ta(r,t,e[o]));return a.join(" ")}}function k1(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!H(t))return t+"";for(var n=[],i=0;i<e.length;i++){var a=r.getDimensionIndex(e[i]);a>=0&&n.push(t[a])}return n.join(" ")}var lp=(function(r){B(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o,s){this.removeAll();var l=le(e,-1,-1,2,2,null,s);l.attr({z2:et(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=AE,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Mn(this.childAt(0))},t.prototype.downplay=function(){An(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=t.getSymbolZ2(e,n),f=o!==this._symbolType,h=a&&a.disableAnimation;if(f){var v=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,u,v)}else{var c=this.childAt(0);c.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?c.attr(d):Et(c,d,s,n),qr(c)}if(this._updateCommon(e,n,l,i,a),f){var c=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,zt(c,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,v,c,d,p,g,y;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,v=a.focus,c=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,y=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),d=_.get("disabled"),p=Te(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=of(e.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(n,"style"),w=x.fill;if(s instanceof Xe){var T=s.style;s.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(F({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(n,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var C=o&&o.useNameLabel;Ue(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:x.opacity});function L(R){return C?e.getName(R):sp(e,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),ne(this,v,c,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=vt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ru(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ru(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return af(e.getItemVisual(n,"symbolSize"))},t.getSymbolZ2=function(e,n){return e.getItemVisual(n,"z2")},t})(yt);function AE(r,t){this.parent.drift(r,t)}function Ih(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Fm(r){return r!=null&&!j(r)&&(r={isIgnore:r}),r||{}}function Gm(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Te(t),cursorStyle:t.get("cursor")}}var up=(function(){function r(t){this.group=new yt,this._SymbolCtor=t||lp}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Fm(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Gm(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var v=f(h);if(Ih(t,v,h,e)){var c=new o(t,h,l,u);c.setPosition(v),t.setItemGraphicEl(h,c),n.add(c)}}).update(function(h,v){var c=a.getItemGraphicEl(v),d=f(h);if(!Ih(t,d,h,e)){n.remove(c);return}var p=t.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==p)n.remove(c),c=new o(t,h,l,u),c.setPosition(d);else{c.updateData(t,h,l,u);var y={x:d[0],y:d[1]};s?c.attr(y):Et(c,y,i)}n.add(c),t.setItemGraphicEl(h,c)}).remove(function(h){var v=a.getItemGraphicEl(h);v&&v.fadeOut(function(){n.remove(v)},i)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Gm(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Fm(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=e.getItemLayout(a);if(Ih(e,o,a,n)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){Oa(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},n.hostModel)}):e.removeAll()},r})(),O1=4,DE=(function(){function r(){}return r})(),IE=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new DE},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]<O1,f=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var v=i[h++],c=i[h++];isNaN(v)||isNaN(c)||f&&!f.contain(v,c)||(s.x=v-a[0]/2,s.y=c-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,n=e.points,i=e.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(e,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 f=u*2,h=a[f]-s/2,v=a[f+1]-l/2;if(e>=h&&n>=v&&e<=h+s&&n<=v+l)return u}return-1},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(e=i[0],n=i[1],a.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v<i.length;){var c=i[v++],d=i[v++];l=Math.min(c,l),f=Math.max(c,f),u=Math.min(d,u),h=Math.max(d,h)}e=this._rect=new ot(l-o/2,u-s/2,f-l+o,h-u+s)}return e},t})(bt),LE=(function(){function r(){this.group=new yt}return r.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;e=new Float32Array(e.buffer,a,i)}n.setShape("points",e),n.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],a=e.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,e,n)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new IE({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=le(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<O1;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=vt(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(f){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})();function fp(r,t){return{seriesType:r,plan:Ud(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(i){var s=U(i.dimensions,function(c){return n.mapDimension(c)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Pi(n,s[0])&&(s[0]=u),Pi(n,s[1])&&(s[1]=u);var f=n.getStore(),h=n.getDimensionIndex(s[0]),v=n.getDimensionIndex(s[1]);return l&&{progress:function(c,d){for(var p=c.end-c.start,g=o&&Gr(p*l),y=[],m=[],_=c.start,S=0;_<c.end;_++){var b=void 0;if(l===1){var x=f.get(h,_);b=i.dataToPoint(x,null,m)}else y[0]=f.get(h,_),y[1]=f.get(v,_),b=i.dataToPoint(y,null,m);o?(g[S++]=b[0],g[S++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var PE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,n,i){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,i){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=fp("").reset(e,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new LE:new up,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Vt),_v=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ee).models[0]},t.type="cartesian2dAxis",t})(mt);fe(_v,np);var B1={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:N.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:N.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:N.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[N.color.backgroundTint,N.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:N.color.neutral00,borderColor:N.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},RE=ft({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},B1),hp=ft({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:N.color.axisMinorSplitLine,width:1}}},B1),EE=ft({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},hp),kE=gt({logBase:10},hp);const N1={category:RE,value:hp,time:EE,log:kE};var OE={value:1,category:1,time:1,log:1};function Sv(r,t,e,n){M(OE,function(i,a){var o=ft(ft({},N1[a],!0),n,!0),s=(function(l){B(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=Xo(this),c=v?Na(f):{},d=h.getTheme();ft(f,d.get(a+"Axis")),ft(f,this.getDefaultOption()),f.type=Hm(f),v&&Dn(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=hv.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){return{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Hm)}function Hm(r){return r.type||(r.data?"category":"value")}function BE(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return NE(e,r,t),e.seriesInvolved&&VE(e,r),e}function NE(r,t,e){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];M(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=es(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",n);if(M(s.getAxes(),at(p,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var v=h.get("trigger")==="axis",c=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(v||c)&&M(d.baseAxes,at(p,c?"cross":!0,v)),c&&M(d.otherAxes,at(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",i),S=_.get("show");if(!(!S||S==="auto"&&!g&&!xv(_))){y==null&&(y=_.get("triggerTooltip")),_=g?zE(m,h,i,t,g,y):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=es(m.model),T=y||b||m.type==="category",D=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:xv(_),seriesModels:[],linkGroup:null};u[w]=D,r.seriesInvolved=r.seriesInvolved||T;var A=FE(a,m);if(A!=null){var C=o[A]||(o[A]={axesInfo:{}});C.axesInfo[w]=D,C.mapper=a[A].mapper,D.linkGroup=C}}}})}function zE(r,t,e,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};M(s,function(v){l[v]=J(o.get(v))}),l.snap=r.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 f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&>(u,h.textStyle)}}return r.model.getModel("axisPointer",new Dt(l,e,n))}function VE(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||M(r.coordSysAxesInfo[es(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function FE(r,t){for(var e=t.model,n=t.dim,i=0;i<r.length;i++){var a=r[i]||{};if(Lh(a[n+"AxisId"],e.id)||Lh(a[n+"AxisIndex"],e.componentIndex)||Lh(a[n+"AxisName"],e.name))return i}}function Lh(r,t){return r==="all"||H(r)&&dt(r,t)>=0||r===t}function GE(r){var t=cp(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=xv(e);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 cp(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[es(r)]}function HE(r){var t=cp(r);return t&&t.axisPointerModel}function xv(r){return!!r.get(["handle","show"])}function es(r){return r.type+"||"+r.id}var Wm={},z1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i,a){this.axisPointerClass&&GE(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},t.prototype.updateAxisPointer=function(e,n,i,a){this._doUpdateAxisPointerClass(e,i,!1)},t.prototype.remove=function(e,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(e,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=HE(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,n){Wm[e]=n},t.getAxisPointerClass=function(e){return e&&Wm[e]},t.type="axis",t})($t),bv=wt();function WE(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.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 f=s.length,h=bv(r).splitAreaColors,v=it(),c=0;if(h)for(var d=0;d<u.length;d++){var p=h.get(u[d].tickValue);if(p!=null){c=(p+(f-1)*d)%f;break}}var g=i.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=H(s)?s:[s];for(var d=1;d<u.length;d++){var m=i.toGlobalCoord(u[d].coord),_=void 0,S=void 0,b=void 0,x=void 0;i.isHorizontal()?(_=g,S=l.y,b=m-_,x=l.height,g=_+b):(_=l.x,S=g,b=l.width,x=m-S,g=S+x);var w=u[d-1].tickValue;w!=null&&v.set(w,c),t.add(new _t({anid:w!=null?"area_"+w:null,shape:{x:_,y:S,width:b,height:x},style:gt({fill:s[c]},y),autoBatch:!0,silent:!0})),c=(c+1)%f}bv(r).splitAreaColors=v}}}function UE(r){bv(r).splitAreaColors=null}var YE=["splitArea","splitLine","minorSplitLine","breakArea"],V1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!Jo(e)){this._axisGroup.add(e.axis.axisBuilder.group),M(YE,function(l){e.get([l,"show"])&&ZE[l](this,this._axisGroup,e,e.getCoordSysModel(),i)},this);var s=a&&a.type==="changeAxisOrder"&&a.isInitSort;s||_d(o,this._axisGroup,e),r.prototype.render.call(this,e,n,i,a)}},t.prototype.remove=function(){UE(this)},t.type="cartesianAxis",t})(z1),ZE={splitLine:function(r,t,e,n,i){var a=e.axis;if(!a.scale.isBlank()){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=o.get("showMinLine")!==!1,f=o.get("showMaxLine")!==!1;l=H(l)?l:[l];for(var h=n.coordinateSystem.getRect(),v=a.isHorizontal(),c=0,d=a.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),p=[],g=[],y=s.getLineStyle(),m=0;m<d.length;m++){var _=a.toGlobalCoord(d[m].coord);if(!(m===0&&!u||m===d.length-1&&!f)){var S=d[m].tickValue;v?(p[0]=_,p[1]=h.y,g[0]=_,g[1]=h.y+h.height):(p[0]=h.x,p[1]=_,g[0]=h.x+h.width,g[1]=_);var b=c++%l.length,x=new lr({anid:S!=null?"line_"+S:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:gt({stroke:l[b]},y),silent:!0});Yo(x.shape,y.lineWidth),t.add(x)}}}},minorSplitLine:function(r,t,e,n,i){var a=e.axis,o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=n.coordinateSystem.getRect(),u=a.isHorizontal(),f=a.getMinorTicksCoords();if(f.length)for(var h=[],v=[],c=s.getLineStyle(),d=0;d<f.length;d++)for(var p=0;p<f[d].length;p++){var g=a.toGlobalCoord(f[d][p].coord);u?(h[0]=g,h[1]=l.y,v[0]=g,v[1]=l.y+l.height):(h[0]=l.x,h[1]=g,v[0]=l.x+l.width,v[1]=g);var y=new lr({anid:"minor_line_"+f[d][p].tickValue,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:v[0],y2:v[1]},style:c,silent:!0});Yo(y.shape,c.lineWidth),t.add(y)}},splitArea:function(r,t,e,n,i){WE(r,t,e,n)},breakArea:function(r,t,e,n,i){e.axis.scale}},F1=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(V1),XE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=F1.type,e}return t.type="yAxis",t})(V1),$E=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,n){this.group.removeAll(),e.get("show")&&this.group.add(new _t({shape:e.coordinateSystem.getRect(),style:gt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})($t),Um={offset:0};function G1(r){r.registerComponentView($E),r.registerComponentModel(JR),r.registerCoordinateSystem("cartesian2d",yE),Sv(r,"x",_v,Um),Sv(r,"y",_v,Um),r.registerComponentView(F1),r.registerComponentView(XE),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function qE(r){ue(G1),r.registerSeriesModel(ME),r.registerChartView(PE),r.registerLayout(fp("scatter"))}var KE=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return Ni(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new yt,i=le("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=le(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=N.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})(Yt);function H1(r,t,e){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=QE(i,e),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=U(r.dimensions,function(d){return t.mapDimension(d)}),v=!1,c=t.getCalculationInfo("stackResultDimension");return Pi(t,h[0])&&(v=!0,h[0]=c),Pi(t,h[1])&&(v=!0,h[1]=c),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!v,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function QE(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:xt(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function W1(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function jE(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function JE(r,t,e,n,i,a,o,s){for(var l=jE(r,t),u=[],f=[],h=[],v=[],c=[],d=[],p=[],g=H1(i,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_<l.length;_++){var S=l[_],b=!0,x=void 0,w=void 0;switch(S.cmd){case"=":x=S.idx*2,w=S.idx1*2;var T=y[x],D=y[x+1],A=m[w],C=m[w+1];(isNaN(T)||isNaN(D))&&(T=A,D=C),u.push(T,D),f.push(A,C),h.push(e[x],e[x+1]),v.push(n[w],n[w+1]),p.push(t.getRawIndex(S.idx1));break;case"+":var L=S.idx,I=g.dataDimsForPoint,P=i.dataToPoint([t.get(I[0],L),t.get(I[1],L)]);w=L*2,u.push(P[0],P[1]),f.push(m[w],m[w+1]);var R=W1(g,i,t,L);h.push(R[0],R[1]),v.push(n[w],n[w+1]),p.push(t.getRawIndex(L));break;case"-":b=!1}b&&(c.push(S),d.push(d.length))}d.sort(function(lt,Ct){return p[lt]-p[Ct]});for(var E=u.length,O=Gr(E),k=Gr(E),z=Gr(E),V=Gr(E),G=[],_=0;_<d.length;_++){var W=d[_],Z=_*2,rt=W*2;O[Z]=u[rt],O[Z+1]=u[rt+1],k[Z]=f[rt],k[Z+1]=f[rt+1],z[Z]=h[rt],z[Z+1]=h[rt+1],V[Z]=v[rt],V[Z+1]=v[rt+1],G[_]=c[W]}return{current:O,next:k,stackedOnCurrent:z,stackedOnNext:V,status:G}}var an=Math.min,on=Math.max;function Ci(r,t){return isNaN(r)||isNaN(t)}function wv(r,t,e,n,i,a,o,s,l){for(var u,f,h,v,c,d,p=e,g=0;g<n;g++){var y=t[p*2],m=t[p*2+1];if(p>=i||p<0)break;if(Ci(y,m)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=a;continue}if(o>0){for(var b=p+a,x=t[b*2],w=t[b*2+1];x===y&&w===m&&g<n;)g++,b+=a,p+=a,x=t[b*2],w=t[b*2+1],y=t[p*2],m=t[p*2+1],_=y-u,S=m-f;var T=g+1;if(l)for(;Ci(x,w)&&T<n;)T++,b+=a,x=t[b*2],w=t[b*2+1];var D=.5,A=0,C=0,L=void 0,I=void 0;if(T>=n||Ci(x,w))c=y,d=m;else{A=x-u,C=w-f;var P=y-u,R=x-y,E=m-f,O=w-m,k=void 0,z=void 0;if(s==="x"){k=Math.abs(P),z=Math.abs(R);var V=A>0?1:-1;c=y-V*k*o,d=m,L=y+V*z*o,I=m}else if(s==="y"){k=Math.abs(E),z=Math.abs(O);var G=C>0?1:-1;c=y,d=m-G*k*o,L=y,I=m+G*z*o}else k=Math.sqrt(P*P+E*E),z=Math.sqrt(R*R+O*O),D=z/(z+k),c=y-A*o*(1-D),d=m-C*o*(1-D),L=y+A*o*D,I=m+C*o*D,L=an(L,on(x,y)),I=an(I,on(w,m)),L=on(L,an(x,y)),I=on(I,an(w,m)),A=L-y,C=I-m,c=y-A*k/z,d=m-C*k/z,c=an(c,on(u,y)),d=an(d,on(f,m)),c=on(c,an(u,y)),d=on(d,an(f,m)),A=y-c,C=m-d,L=y+A*z/k,I=m+C*z/k}r.bezierCurveTo(h,v,c,d,y,m),h=L,v=I}else r.lineTo(y,m)}u=y,f=m,p+=a}return g}var U1=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),tk=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new U1},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Ci(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Ci(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=wv(e,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(e,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ii.CMD,s,l,u=n==="x",f=[],h=0;h<a.length;){var v=a[h++],c=void 0,d=void 0,p=void 0,g=void 0,y=void 0,m=void 0,_=void 0;switch(v){case o.M:s=a[h++],l=a[h++];break;case o.L:if(c=a[h++],d=a[h++],_=u?(e-s)/(c-s):(e-l)/(d-l),_<=1&&_>=0){var S=u?(d-l)*_+l:(c-s)*_+s;return u?[e,S]:[S,e]}s=c,l=d;break;case o.C:c=a[h++],d=a[h++],p=a[h++],g=a[h++],y=a[h++],m=a[h++];var b=u?Zl(s,c,p,y,e,f):Zl(l,d,g,m,e,f);if(b>0)for(var x=0;x<b;x++){var w=f[x];if(w<=1&&w>=0){var S=u?te(l,d,g,m,w):te(s,c,p,y,w);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t})(bt),ek=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(U1),rk=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new ek},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Ci(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Ci(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=wv(e,i,o,s,s,1,n.smooth,l,n.connectNulls);wv(e,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,e.closePath()}},t})(bt);function Y1(r,t,e,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,f=e.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new _t({shape:{x:o,y:s,width:l,height:u}});if(t){var v=r.getBaseAxis(),c=v.isHorizontal(),d=v.inverse;c?(d&&(h.shape.x+=l),h.shape.width=0):(d||(h.shape.y+=u),h.shape.height=0);var p=Q(i)?function(g){i(g,h)}:null;zt(h,{shape:{width:l,height:u,x:o,y:s}},e,null,n,p)}return h}function Z1(r,t,e){var n=r.getArea(),i=Xt(n.r0,1),a=Xt(n.r,1),o=new sr({shape:{cx:Xt(r.cx,1),cy:Xt(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,zt(o,{shape:{endAngle:n.endAngle,r:a}},e)}return o}function nk(r,t,e,n,i){if(r){if(r.type==="polar")return Z1(r,t,e);if(r.type==="cartesian2d")return Y1(r,t,e,n,i)}else return null;return null}function Ma(r,t){return r.type===t}function Ym(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function Zm(r){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i))}return[[t,e],[n,i]]}function Xm(r,t){var e=Zm(r),n=e[0],i=e[1],a=Zm(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 $m(r){return xt(r)?r:r?.5:0}function ik(r,t,e){if(!e.valueDim)return[];for(var n=t.count(),i=Gr(n*2),a=0;a<n;a++){var o=W1(e,r,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function sn(r,t,e,n,i){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],f=[],h=[],v=[];if(i){for(l=0;l<r.length;l+=2){var c=t||r;!isNaN(c[l])&&!isNaN(c[l+1])&&v.push(r[l],r[l+1])}r=v}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],f[0]=r[l],f[1]=r[l+1],s.push(f[0],f[1]),n){case"end":u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1]);break;case"middle":var d=(f[o]+h[o])/2,p=[];u[o]=p[o]=d,u[1-o]=f[1-o],p[1-o]=h[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function ak(r,t){var e=[],n=r.length,i,a;function o(f,h,v){var c=f.coord,d=(v-c)/(h.coord-c),p=KC(d,[f.color,h.color]);return{coord:v,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>t){a?e.push(o(a,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),a=l}return e}function ok(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.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=U(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=ak(u,i==="x"?e.getWidth():e.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=v[0].coord-d,g=v[c-1].coord+d,y=g-p;if(y<.001)return"transparent";M(v,function(_){_.offset=(_.coord-p)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new Ku(0,0,0,0,v,!0);return m[i]=p,m[i+"2"]=g,m}}}function sk(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(i&&lk(a,t))){var o=t.mapDimension(a.dim),s={};return M(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function lk(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.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(lp.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function uk(r,t){return isNaN(r)||isNaN(t)}function fk(r){for(var t=r.length/2;t>0&&uk(r[t*2-2],r[t*2-1]);t--);return t-1}function qm(r,t){return[r[t*2],r[t*2+1]]}function hk(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[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 X1(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<ye.length;t++)if(r.get([ye[t],"endLabel","show"]))return!0;return!1}function Ph(r,t,e,n){if(Ma(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=X1(n)?function(c,d){r._endLabelOnDuring(c,d,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),f=Y1(t,e,n,function(){var c=r._endLabel;c&&e&&s.originalX!=null&&c.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=f.shape,v=Math.max(h.width,h.height);u?(h.y-=v,h.height+=v*2):(h.x-=v,h.width+=v*2)}return l&&l(1,f),f}else return Z1(t,e,n)}function ck(r,t){var e=t.getBaseAxis(),n=e.isHorizontal(),i=e.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var vk=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new yt,n=new up;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=e,this._changePolyState=Y(this._changePolyState,this)},t.prototype.render=function(e,n,i){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),f=s.getLayout("points")||[],h=a.type==="polar",v=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,y=!n.ssr&&e.get("animation"),m=!u.isEmpty(),_=u.get("origin"),S=H1(a,s,_),b=m&&ik(a,s,S),x=e.get("showSymbol"),w=e.get("connectNulls"),T=x&&!h&&sk(e,s,a),D=this._data;D&&D.eachItemGraphicEl(function(lt,Ct){lt.__temp&&(o.remove(lt),D.setItemGraphicEl(Ct,null))}),x||c.remove(),o.add(g);var A=h?!1:e.get("step"),C;a&&a.getArea&&e.get("clip",!0)&&(C=a.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var L=ok(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&v.type===a.type&&A===this._step))x&&c.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(lt){return[f[lt*2],f[lt*2+1]]}}),y&&this._initSymbolLabelAnimation(s,a,C),A&&(b&&(b=sn(b,f,a,A,w)),f=sn(f,null,a,A,w)),d=this._newPolyline(f),m?p=this._newPolygon(f,b):p&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,Li(L)),g.setClipPath(Ph(this,a,!0,e));else{m&&!p?p=this._newPolygon(f,b):p&&!m&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,Li(L));var I=g.getClipPath();if(I){var P=Ph(this,a,!1,e);zt(I,{shape:P.shape},e)}else g.setClipPath(Ph(this,a,!0,e));x&&c.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(lt){return[f[lt*2],f[lt*2+1]]}}),(!Ym(this._stackedOnPoints,b)||!Ym(this._points,f))&&(y?this._doUpdateAnimation(s,b,a,i,A,_,w):(A&&(b&&(b=sn(b,f,a,A,w)),f=sn(f,null,a,A,w)),d.setShape({points:f}),p&&p.setShape({points:f,stackedOnPoints:b})))}var R=e.getModel("emphasis"),E=R.get("focus"),O=R.get("blurScope"),k=R.get("disabled");if(d.useStyle(gt(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),De(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=d.getState("emphasis").style;z.lineWidth=+d.style.lineWidth+1}vt(d).seriesIndex=e.seriesIndex,ne(d,E,O,k);var V=$m(e.get("smooth")),G=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:G,connectNulls:w}),p){var W=s.getCalculationInfo("stackedOnSeries"),Z=0;p.useStyle(gt(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),W&&(Z=$m(W.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:Z,smoothMonotone:G,connectNulls:w}),De(p,e,"areaStyle"),vt(p).seriesIndex=e.seriesIndex,ne(p,E,O,k)}var rt=this._changePolyState;s.eachItemGraphicEl(function(lt){lt&&(lt.onHoverStateChange=rt)}),this._polyline.onHoverStateChange=rt,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){vt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=Ai(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 f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=e.get("zlevel")||0,c=e.get("z")||0;u=new lp(o,s),u.x=f,u.y=h,u.setZ(v,c);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=c,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Vt.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=Ai(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 Vt.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;Yg(this._polyline,e),n&&Yg(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new tk({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new rk({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,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=e.hostModel,f=u.get("animationDuration");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=Q(h)?h(null):h;e.eachItemGraphicEl(function(c,d){var p=c;if(p){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,b=n.pointToCoord(g);a?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=i;a?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=Q(h)?h(d):f*w+v,D=p.getSymbolPath(),A=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(X1(e)){var o=e.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 Tt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=fk(l);f>=0&&(Ue(s,Te(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?k1(o,c):sp(o,h)},enableTextSetter:!0},ck(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),v=i.hostModel,c=v.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=hk(h,S,w),D=T.range,A=D[1]-D[0],C=void 0;if(A>=1){if(A>1&&!c){var L=qm(h,D[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(C=v.getRawValue(D[0]))}else{var L=f.getPointOn(S,w);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=v.getRawValue(D[0]),P=v.getRawValue(D[1]);o&&(C=VS(i,d,I,P,T.t))}a.lastFrameIndex=D[0]}else{var R=e===1||a.lastFrameIndex>0?D[0]:0,L=qm(h,R);o&&(C=v.getRawValue(R)),u.attr({x:L[0]+b,y:L[1]+x})}if(o){var E=gs(u);typeof E.setLabelText=="function"&&E.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,v=JE(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),c=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=sn(v.stackedOnCurrent,v.current,i,o,l),c=sn(v.current,null,i,o,l),g=sn(v.stackedOnNext,v.next,i,o,l),p=sn(v.next,null,i,o,l)),Xm(c,p)>3e3||f&&Xm(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:p}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),Et(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:d}),f.stopAnimation(),Et(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;T<m.length;T++){var D=m[T].el,A=m[T].ptIdx*2;D.x=w[A],D.y=w[A+1],D.markRedraw()}})},t.prototype.remove=function(e){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})(Vt),dk={average:function(r){for(var t=0,e=0,n=0;n<r.length;n++)isNaN(r[n])||(t+=r[n],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},pk=function(r){return Math.round(r.length/2)};function $1(r){return{seriesType:r,reset:function(t,e,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),f=l.getExtent(),h=n.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/c)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/c));var d=void 0;X(a)?d=dk[a]:Q(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/c,d,pk))}}}}}function gk(r){r.registerChartView(vk),r.registerSeriesModel(KE),r.registerLayout(fp("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$1("line"))}var Tv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Ni(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(i)M(a.getAxes(),function(v,c){if(v.type==="category"&&n!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[c],y=n[c]==="x1"||n[c]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[c]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;b<d.length;b++){var x=d[b].coord,w=b===d.length-1?d[b-1].tickValue+S:d[b].tickValue;if(w===g){_=x;break}else if(w<g)m=x;else if(m!=null&&w>g){_=(x+m)/2;break}b===1&&(S=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/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})(Yt);Yt.registerClass(Tv);var yk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Ni(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 e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,i){return i.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Ba(Tv.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:N.color.primary,borderWidth:2}},realtimeSort:!1}),t})(Tv),mk=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),wu=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new mk},t.prototype.buildPath=function(e,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,f=n.startAngle,h=n.endAngle,v=n.clockwise,c=Math.PI*2,d=v?h-f<c:f-h<c;d||(f=h-(v?c:-c));var p=Math.cos(f),g=Math.sin(f),y=Math.cos(h),m=Math.sin(h);d?(e.moveTo(p*o+i,g*o+a),e.arc(p*u+i,g*u+a,l,-Math.PI+f,f,!v)):e.moveTo(p*s+i,g*s+a),e.arc(i,a,s,f,h,!v),e.arc(y*u+i,m*u+a,l,h-Math.PI*2,h-Math.PI,!v),o!==0&&e.arc(i,a,o,h,f,v)},t})(bt);function _k(r,t){t=t||{};var e=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return Ql(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,f=u.cx,h=u.cy,v=u.r,c=u.r0,d=(v+c)/2,p=u.startAngle,g=u.endAngle,y=(p+g)/2,m=e?Math.abs(v-c)/2:0,_=Math.cos,S=Math.sin,b=f+v*_(p),x=h+v*S(p),w="left",T="top";switch(s){case"startArc":b=f+(c-l)*_(y),x=h+(c-l)*S(y),w="center",T="top";break;case"insideStartArc":b=f+(c+l)*_(y),x=h+(c+l)*S(y),w="center",T="bottom";break;case"startAngle":b=f+d*_(p)+hl(p,l+m,!1),x=h+d*S(p)+cl(p,l+m,!1),w="right",T="middle";break;case"insideStartAngle":b=f+d*_(p)+hl(p,-l+m,!1),x=h+d*S(p)+cl(p,-l+m,!1),w="left",T="middle";break;case"middle":b=f+d*_(y),x=h+d*S(y),w="center",T="middle";break;case"endArc":b=f+(v+l)*_(y),x=h+(v+l)*S(y),w="center",T="bottom";break;case"insideEndArc":b=f+(v-l)*_(y),x=h+(v-l)*S(y),w="center",T="top";break;case"endAngle":b=f+d*_(g)+hl(g,l+m,!0),x=h+d*S(g)+cl(g,l+m,!0),w="left",T="middle";break;case"insideEndAngle":b=f+d*_(g)+hl(g,-l+m,!0),x=h+d*S(g)+cl(g,-l+m,!0),w="right",T="middle";break;default:return Ql(n,i,a)}return n=n||{},n.x=b,n.y=x,n.align=w,n.verticalAlign=T,n}}function Sk(r,t,e,n){if(xt(n)){r.setTextConfig({rotation:n});return}else if(H(t)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=e(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:r.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),r.setTextConfig({rotation:f})}function hl(r,t,e){return t*Math.sin(r)*(e?-1:1)}function cl(r,t,e){return t*Math.cos(r)*(e?1:-1)}function yi(r,t,e){var n=r.get("borderRadius");if(n==null)return e?{cornerRadius:0}:null;H(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(n,function(a){return Dr(a,i)})}}var Rh=Math.max,Eh=Math.min;function xk(r,t){var e=r.getArea&&r.getArea();if(Ma(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(e.x-=i,e.width+=i*2):(e.y-=i,e.height+=i*2)}}return e}var bk=(function(r){B(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,n,i,a){this._model=e,this._removeOnRenderedListener(i),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,n,i):this._renderNormal(e,n,i,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,n){this._progressiveEls=[],this._incrementalRenderLarge(e,n)},t.prototype.eachRendered=function(e){Oa(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e,n,i,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),h;u.type==="cartesian2d"?h=f.isHorizontal():u.type==="polar"&&(h=f.dim==="angle");var v=e.isAnimationEnabled()?e:null,c=wk(e,u);c&&this._enableRealtimeSort(c,s,i);var d=e.get("clip",!0)||c,p=xk(u,s);o.removeClipPath();var g=e.get("roundCap",!0),y=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),_=m.get("borderRadius")||0,S=[],b=this._backgroundEls,x=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function T(C){var L=vl[u.type](s,C);if(!L)return null;var I=Lk(u,h,L);return I.useStyle(m.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),S[C]=I,I}s.diff(l).add(function(C){var L=s.getItemModel(C),I=vl[u.type](s,C,L);if(I&&(y&&T(C),!(!s.hasValue(C)||!t0[u.type](I)))){var P=!1;d&&(P=Km[u.type](p,I));var R=Qm[u.type](e,s,C,I,h,v,f.model,!1,g);c&&(R.forceLabelAnimation=!0),e0(R,s,C,L,I,e,h,u.type==="polar"),x?R.attr({shape:I}):c?jm(c,v,R,I,C,h,!1,!1):zt(R,{shape:I},e,C),s.setItemGraphicEl(C,R),o.add(R),R.ignore=P}}).update(function(C,L){var I=s.getItemModel(C),P=vl[u.type](s,C,I);if(P){if(y){var R=void 0;b.length===0?R=T(L):(R=b[L],R.useStyle(m.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",_):R.setShape("cornerRadius",_),S[C]=R);var E=vl[u.type](s,C),O=K1(h,E,u);Et(R,{shape:O},v,C)}var k=l.getItemGraphicEl(L);if(!s.hasValue(C)||!t0[u.type](P)){o.remove(k);return}var z=!1;d&&(z=Km[u.type](p,P),z&&o.remove(k));var V=k&&(k.type==="sector"&&g||k.type==="sausage"&&!g);if(V&&(k&&pa(k,e,L),k=null),k?qr(k):k=Qm[u.type](e,s,C,P,h,v,f.model,!0,g),c&&(k.forceLabelAnimation=!0),w){var G=k.getTextContent();if(G){var W=gs(G);W.prevValue!=null&&(W.prevValue=W.value)}}else e0(k,s,C,I,P,e,h,u.type==="polar");x?k.attr({shape:P}):c?jm(c,v,k,P,C,h,!0,w):Et(k,{shape:P},e,C,null),s.setItemGraphicEl(C,k),k.ignore=z,o.add(k)}}).remove(function(C){var L=l.getItemGraphicEl(C);L&&pa(L,e,C)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new yt);D.removeAll();for(var A=0;A<S.length;++A)D.add(S[A]);o.add(D),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(e,n,i){this._clear(),n0(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,n){this._removeBackground(),n0(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var n=e.get("clip",!0)&&nk(e.coordinateSystem,!1,e),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(e,n,i){var a=this;if(n.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,e,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,n,i){var a=[];return e.each(e.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:U(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,n,i){for(var a=i.scale,o=e.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:n(e.indexOfRawIndex(f));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,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(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,i,a){if(this._isOrderChangedWithinSameData(e,n,i)){var o=this._dataSort(e,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(e,n,i){var a=n.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){pa(a,e,vt(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})(Vt),Km={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,a=r.y+r.height,o=Rh(t.x,r.x),s=Eh(t.x+t.width,i),l=Rh(t.y,r.y),u=Eh(t.y+t.height,a),f=s<o,h=u<l;return t.x=f&&o>i?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var i=Eh(t.r,r.r),a=Rh(t.r0,r.r0);t.r=i,t.r0=a;var o=i-a<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},Qm={cartesian2d:function(r,t,e,n,i,a,o,s,l){var u=new _t({shape:F({},n),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=i?"height":"width";f[h]=0}return u},polar:function(r,t,e,n,i,a,o,s,l){var u=!i&&l?wu:sr,f=new u({shape:n,z2:1});f.name="item";var h=q1(i);if(f.calculateTextPosition=_k(h,{isRoundCap:u===wu}),a){var v=f.shape,c=i?"r":"endAngle",d={};v[c]=i?n.r0:n.startAngle,d[c]=n[c],(s?Et:zt)(f,{shape:d},a)}return f}};function wk(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function jm(r,t,e,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?Et:zt)(e,{shape:l},t,i,null);var f=t?r.baseAxis.model:null;(o?Et:zt)(e,{shape:u},f,i)}function Jm(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var Tk=["x","y","width","height"],Ck=["cx","cy","r","startAngle","endAngle"],t0={cartesian2d:function(r){return!Jm(r,Tk)},polar:function(r){return!Jm(r,Ck)}},vl={cartesian2d:function(r,t,e){var n=r.getItemLayout(t);if(!n)return null;var i=e?Ak(e,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(r,t,e){var n=r.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 Mk(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function q1(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function e0(r,t,e,n,i,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=yi(n.getModel("itemStyle"),f,!0);F(f,h),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=n.getShallow("cursor");v&&r.attr("cursor",v);var c=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",d=Te(n);Ue(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:sp(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,Sk(r,g==="outside"?c:g,q1(o),n.get(["label","rotate"]))}xx(p,d,a.getRawValue(e),function(m){return k1(t,m)});var y=n.getModel(["emphasis"]);ne(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),De(r,n),Mk(i)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function Ak(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.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 Dk=(function(){function r(){}return r})(),r0=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new Dk},t.prototype.buildPath=function(e,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<i.length;f+=3)l[a]=u,l[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],e.rect(s[0],s[1],l[0],l[1])},t})(bt);function n0(r,t,e,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var f=new r0({shape:{points:u},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new r0({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,vt(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",i0),h.on("mousemove",i0)),e&&e.push(h)}var i0=Yd(function(r){var t=this,e=Ik(t,r.offsetX,r.offsetY);vt(t).dataIndex=e>=0?e:null},30,!1);function Ik(r,t,e){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f<h;f++){var v=f*3;if(l[n]=u,l[i]=a[v+2],s[n]=a[v+n],s[i]=a[v+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function K1(r,t,e){if(Ma(e,"cartesian2d")){var n=t,i=e.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=e.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function Lk(r,t,e){var n=r.type==="polar"?sr:_t;return new n({shape:K1(t,e,r),silent:!0,z2:0})}function Pk(r){r.registerChartView(bk),r.registerSeriesModel(yk),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,at(tR,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,eR("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,$1("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}var a0=Math.PI*2,dl=Math.PI/180;function Rk(r,t,e){t.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=BI(n,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,h=o.viewRect,v=-n.get("startAngle")*dl,c=n.get("endAngle"),d=n.get("padAngle")*dl;c=c==="auto"?v-a0:-c*dl;var p=n.get("minAngle")*dl,g=p+d,y=0;i.each(a,function(O){!isNaN(O)&&y++});var m=i.getSum(a),_=Math.PI/(m||y)*2,S=n.get("clockwise"),b=n.get("roseType"),x=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var T=S?1:-1,D=[v,c],A=T*d/2;ud(D,!S),v=D[0],c=D[1];var C=Q1(n);C.startAngle=v,C.endAngle=c,C.clockwise=S,C.cx=s,C.cy=l,C.r=u,C.r0=f;var L=Math.abs(c-v),I=L,P=0,R=v;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(O,k){var z;if(isNaN(O)){i.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?z=m===0&&x?_:O*_:z=L/y,z<g?(z=g,I-=g):P+=O;var V=R+T*z,G=0,W=0;d>z?(G=R+T*z/2,W=G):(G=R+A,W=V-A),i.setItemLayout(k,{angle:z,startAngle:G,endAngle:W,clockwise:S,cx:s,cy:l,r0:f,r:b?St(O,w,[f,u]):u}),R=V}),I<a0&&y)if(I<=.001){var E=L/y;i.each(a,function(O,k){if(!isNaN(O)){var z=i.getItemLayout(k);z.angle=E;var V=0,G=0;E<d?(V=v+T*(k+1/2)*E,G=V):(V=v+T*k*E+A,G=v+T*(k+1)*E-A),z.startAngle=V,z.endAngle=G}})}else _=I/P,R=v,i.each(a,function(O,k){if(!isNaN(O)){var z=i.getItemLayout(k),V=z.angle===g?g:O*_,G=0,W=0;V<d?(G=R+T*V/2,W=G):(G=R+A,W=R+T*V-A),z.startAngle=G,z.endAngle=W,R+=T*V}})})}var Q1=wt();function uf(r){return{seriesType:r,reset:function(t,e){var n=e.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 Ek=Math.PI/180;function o0(r,t,e,n,i,a,o,s,l,u){if(r.length<2)return;function f(p){for(var g=p.rB,y=g*g,m=0;m<p.list.length;m++){var _=p.list[m],S=Math.abs(_.label.y-e),b=n+_.len,x=b*b,w=Math.sqrt(Math.abs((1-S*S/y)*x)),T=t+(w+_.len2)*i,D=T-_.label.x,A=_.targetTextWidth-D*i;j1(_,A,!0),_.label.x=T}}function h(p){for(var g={list:[],maxY:0},y={list:[],maxY:0},m=0;m<p.length;m++)if(p[m].labelAlignTo==="none"){var _=p[m],S=_.label.y>e?y:g,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*i,w=n+_.len,T=Math.abs(x)<w?Math.sqrt(b*b/(1-x*x/w/w)):w;S.rB=T,S.maxY=b}S.list.push(_)}f(g),f(y)}for(var v=r.length,c=0;c<v;c++)if(r[c].position==="outer"&&r[c].labelAlignTo==="labelLine"){var d=r[c].label.x-u;r[c].linePoints[1][0]+=d,r[c].label.x=u}FR(r,1,l,l+o)&&h(r)}function kk(r,t,e,n,i,a,o,s){for(var l=[],u=[],f=Number.MAX_VALUE,h=-Number.MAX_VALUE,v=0;v<r.length;v++){var c=r[v].label;kh(r[v])||(c.x<t?(f=Math.min(f,c.x),l.push(r[v])):(h=Math.max(h,c.x),u.push(r[v])))}for(var v=0;v<r.length;v++){var d=r[v];if(!kh(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var c=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?c.x<t?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+i-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?c.x<t?g=f-o-d.bleedMargin:g=o+i-h-d.bleedMargin:c.x<t?g=c.x-o-d.bleedMargin:g=o+i-c.x-d.bleedMargin,d.targetTextWidth=g,j1(d,g,!1)}}o0(u,t,e,n,1,i,a,o,s,h),o0(l,t,e,n,-1,i,a,o,s,f);for(var v=0;v<r.length;v++){var d=r[v];if(!kh(d)&&d.linePoints){var c=d.label,p=d.linePoints,y=d.labelAlignTo==="edge",m=c.style.padding,_=m?m[1]+m[3]:0,S=c.style.backgroundColor?0:_,b=d.rect.width+S,x=p[1][0]-p[2][0];y?c.x<t?p[2][0]=o+d.edgeDistance+b+d.labelDistance:p[2][0]=o+i-d.edgeDistance-b-d.labelDistance:(c.x<t?p[2][0]=c.x+d.labelDistance:p[2][0]=c.x-d.labelDistance,p[1][0]=p[2][0]+x),p[1][1]=p[2][1]=c.y}}}function j1(r,t,e){if(r.labelStyleWidth==null){var n=r.label,i=n.style,a=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,f=a.width+(o?0:l);if(t<f||e){if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var v=t-l,c=t<f?v:e?v>r.unconstrainedWidth?null:v:null;n.setStyle("width",c)}J1(a,n)}}}function J1(r,t){s0.rect=r,w1(s0,t,Ok)}var Ok={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},s0={};function kh(r){return r.position==="center"}function Bk(r){var t=r.getData(),e=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*Ek,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}t.each(function(x){var w=t.getItemGraphicEl(x),T=w.shape,D=w.getTextContent(),A=w.getTextGuideLine(),C=t.getItemModel(x),L=C.getModel("label"),I=L.get("position")||C.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=q(L.get("edgeDistance"),u),O=L.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var k=C.getModel("labelLine"),z=k.get("length");z=q(z,u);var V=k.get("length2");if(V=q(V,u),Math.abs(T.endAngle-T.startAngle)<o){M(D.states,c),D.ignore=!0,A&&(M(A.states,c),A.ignore=!0);return}if(d(D)){var G=(T.startAngle+T.endAngle)/2,W=Math.cos(G),Z=Math.sin(G),rt,lt,Ct,Ot;n=T.cx,i=T.cy;var ut=I==="inside"||I==="inner";if(I==="center")rt=T.cx,lt=T.cy,Ot="center";else{var tt=(ut?(T.r+T.r0)/2*W:T.r*W)+n,pt=(ut?(T.r+T.r0)/2*Z:T.r*Z)+i;if(rt=tt+W*3,lt=pt+Z*3,!ut){var K=tt+W*(z+l-T.r),nt=pt+Z*(z+l-T.r),Rt=K+(W<0?-1:1)*V,Mt=nt;R==="edge"?rt=W<0?f+E:f+u-E:rt=Rt+(W<0?-P:P),lt=Mt,Ct=[[tt,pt],[K,nt],[Rt,Mt]]}Ot=ut?"center":R==="edge"?W>0?"right":"left":W>0?"left":"right"}var It=Math.PI,Ft=0,he=L.get("rotate");if(xt(he))Ft=he*(It/180);else if(I==="center")Ft=0;else if(he==="radial"||he===!0){var Qr=W<0?-G+It:-G;Ft=Qr}else if(he==="tangential"&&I!=="outside"&&I!=="outer"){var Pr=Math.atan2(W,Z);Pr<0&&(Pr=It*2+Pr);var Ts=Z>0;Ts&&(Pr=It+Pr),Ft=Pr-It}if(a=!!Ft,D.x=rt,D.y=lt,D.rotation=Ft,D.setStyle({verticalAlign:"middle"}),ut){D.setStyle({align:Ot});var pf=D.states.select;pf&&(pf.x+=D.x,pf.y+=D.y)}else{var df=new ot(0,0,0,0);J1(df,D),e.push({label:D,labelLine:A,position:I,len:z,len2:V,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ht(W,Z),linePoints:Ct,textAlign:Ot,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:O,rect:df,unconstrainedWidth:df.width,labelStyleWidth:D.style.width})}w.setTextConfig({inside:ut})}}),!a&&r.get("avoidLabelOverlap")&&kk(e,n,i,l,u,v,f,h);for(var p=0;p<e.length;p++){var g=e[p],y=g.label,m=g.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:g.textAlign}),_&&(M(y.states,c),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(m){var b=g.linePoints;_||!b?(M(m.states,c),m.ignore=!0):(kR(b,g.minTurnAngle),OR(b,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:b}),y.__hostTarget.textGuideLineConfig={anchor:new ht(b[0][0],b[0][1])})}}}var Nk=(function(r){B(t,r);function t(e,n,i){var a=r.call(this)||this;a.z2=2;var o=new Tt;return a.setTextContent(o),a.updateData(e,n,i,!0),a}return t.prototype.updateData=function(e,n,i,a){var o=this,s=e.hostModel,l=e.getItemModel(n),u=l.getModel("emphasis"),f=e.getItemLayout(n),h=F(yi(l.getModel("itemStyle"),f,!0),f);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var v=s.getShallow("animationType");s.ecModel.ssr?(zt(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):v==="scale"?(o.shape.r=f.r0,zt(o,{shape:{r:f.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),zt(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,Et(o,{shape:{endAngle:f.endAngle}},s,n))}else qr(o),Et(o,{shape:h},s,n);o.useStyle(e.getItemVisual(n,"style")),De(o,l);var c=(f.startAngle+f.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(c)*d,g=Math.sin(c)*d,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,e,n),o.ensureState("emphasis").shape=F({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},yi(u.getModel("itemStyle"),f)),F(o.ensureState("select"),{x:p,y:g,shape:yi(l.getModel(["select","itemStyle"]),f)}),F(o.ensureState("blur"),{shape:yi(l.getModel(["blur","itemStyle"]),f)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&F(m.ensureState("select"),{x:p,y:g}),F(_.ensureState("select"),{x:p,y:g}),ne(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,f=l&&l.opacity;Ue(a,Te(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:f,defaultText:e.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var v=o.get(["label","position"]);if(v!=="outside"&&v!=="outer")a.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new fr,this.setTextGuideLine(c)),_1(this,S1(o),{stroke:u,opacity:_n(s.get(["lineStyle","opacity"]),f,1)})}},t})(sr),zk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,i,a){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h<o.count();++h)f=o.getItemLayout(h);f&&(u=f.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var v=Q1(e),c=new sr({shape:J(v)});c.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,l.add(c)}o.diff(s).add(function(d){var p=new Nk(o,d,u);o.setItemGraphicEl(d,p),l.add(p)}).update(function(d,p){var g=s.getItemGraphicEl(p);g.updateData(o,d,u),g.off("click"),l.add(g),o.setItemGraphicEl(d,g)}).remove(function(d){var p=s.getItemGraphicEl(d);pa(p,e,d)}).execute(),Bk(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t})(Vt);function bs(r,t,e){t=H(t)&&{coordDimensions:t}||F({encodeDefine:r.getEncode()},t);var n=r.getSource(),i=lf(n,t).dimensions,a=new Zr(i,r);return a.initData(n,e),a}var vp=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r})(),Vk=wt(),tw=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new vp(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return bs(this,{coordDimensions:["value"],encodeDefaulter:at(Ux,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),i=Vk(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=AM(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Go(e,"labelLine",["show"]);var n=e.labelLine,i=e.emphasis.labelLine;n.show=n.show&&e.label.show,i.show=i.show&&e.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})(Yt);II({fullType:tw.type,getCoord2:function(r){return r.getShallow("center")}});function Fk(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(xt(o)&&!isNaN(o)&&o<0)})}}}function Gk(r){r.registerChartView(zk),r.registerSeriesModel(tw),b2("pie",r.registerAction),r.registerLayout(at(Rk,"pie")),r.registerProcessor(uf("pie")),r.registerProcessor(Fk("pie"))}function Hk(r){r.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){var a=i.getIndicatorAxes();M(a,function(o,s){e.each(e.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var f=i.dataToPoint(l,s);n[u][s]=l0(f)?f:u0(i)})}),e.each(function(o){var s=eS(n[o],function(l){return l0(l)})||u0(i);n[o].push(s.slice()),e.setItemLayout(o,n[o])})}})}function l0(r){return!isNaN(r[0])&&!isNaN(r[1])}function u0(r){return[r.cx,r.cy]}function Wk(r){var t=r.polar;if(t){H(t)||(t=[t]);var e=[];M(t,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],H(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):e.push(n)}),r.polar=e}M(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var Uk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=this._data;function u(v,c){var d=v.getItemVisual(c,"symbol")||"circle";if(d!=="none"){var p=af(v.getItemVisual(c,"symbolSize")),g=le(d,-1,-1,2,2),y=v.getItemVisual(c,"symbolRotate")||0;return g.attr({style:{strokeNoScale:!0},z2:100,scaleX:p[0]/2,scaleY:p[1]/2,rotation:y*Math.PI/180||0}),g}}function f(v,c,d,p,g,y){d.removeAll();for(var m=0;m<c.length-1;m++){var _=u(p,g);_&&(_.__dimIdx=m,v[m]?(_.setPosition(v[m]),wd[y?"initProps":"updateProps"](_,{x:c[m][0],y:c[m][1]},e,g)):_.setPosition(c[m]),d.add(_))}}function h(v){return U(v,function(c){return[a.cx,a.cy]})}s.diff(l).add(function(v){var c=s.getItemLayout(v);if(c){var d=new Ir,p=new fr,g={shape:{points:c}};d.shape.points=h(c),p.shape.points=h(c),zt(d,g,e,v),zt(p,g,e,v);var y=new yt,m=new yt;y.add(p),y.add(d),y.add(m),f(p.shape.points,c,m,s,v,!0),s.setItemGraphicEl(v,y)}}).update(function(v,c){var d=l.getItemGraphicEl(c),p=d.childAt(0),g=d.childAt(1),y=d.childAt(2),m={shape:{points:s.getItemLayout(v)}};m.shape.points&&(f(p.shape.points,m.shape.points,y,s,v,!1),qr(g),qr(p),Et(p,m,e),Et(g,m,e),s.setItemGraphicEl(v,d))}).remove(function(v){o.remove(l.getItemGraphicEl(v))}).execute(),s.eachItemGraphicEl(function(v,c){var d=s.getItemModel(c),p=v.childAt(0),g=v.childAt(1),y=v.childAt(2),m=s.getItemVisual(c,"style"),_=m.fill;o.add(v),p.useStyle(gt(d.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),De(p,d,"lineStyle"),De(g,d,"areaStyle");var S=d.getModel("areaStyle"),b=S.isEmpty()&&S.parentModel.isEmpty();g.ignore=b,M(["emphasis","select","blur"],function(w){var T=d.getModel([w,"areaStyle"]),D=T.isEmpty()&&T.parentModel.isEmpty();g.ensureState(w).ignore=D&&b;var A=d.getModel([w,"lineStyle"]).getLineStyle();p.ensureState(w).style=A;var C=T.getAreaStyle();g.ensureState(w).style=C;var L=d.getModel([w,"itemStyle"]).getItemStyle();y.eachChild(function(I){I.ensureState(w).style=J(L)})}),g.useStyle(gt(d.getModel("areaStyle").getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var x=d.getModel("emphasis");y.eachChild(function(w){if(w instanceof Xe){var T=w.style;w.useStyle(F({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},m))}else w.useStyle(m),w.setColor(_),w.style.strokeNoScale=!0;var D=s.getStore().get(s.getDimensionIndex(w.__dimIdx),c);(D==null||isNaN(D))&&(D=""),Ue(w,Te(d),{labelFetcher:s.hostModel,labelDataIndex:c,labelDimIndex:w.__dimIdx,defaultText:D,inheritColor:_,defaultOpacity:m.opacity})}),ne(v,x.get("focus"),x.get("blurScope"),x.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t})(Vt),Yk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new vp(Y(this.getData,this),Y(this.getRawData,this))},t.prototype.getInitialData=function(e,n){return bs(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(e),u=l===""?this.name:l,f=cb(this,e);return Ye("section",{header:u,sortBlocks:!0,blocks:U(s,function(h){var v=a.get(a.mapDimension(h.dim),e);return Ye("nameValue",{markerType:"subItem",markerColor:f,name:h.name,value:v,sortParam:v})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(U(i.dimensions,function(u){return n.mapDimension(u)}),e),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})(Yt),ro=N1.value;function pl(r,t){return gt({show:t},r)}var Zk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){var e=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"]),f=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),v=this.get("triggerEvent"),c=U(this.get("indicator")||[],function(d){d.max!=null&&d.max>0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=gt({color:d.color},l));var g=ft(J(d),{boundaryGap:e,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:p,triggerEvent:v},!1);if(X(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else Q(f)&&(g.name=f(g.name,g));var m=new Dt(g,null,this.ecModel);return fe(m,np.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},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:N.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ft({lineStyle:{color:N.color.neutral20}},ro.axisLine),axisLabel:pl(ro.axisLabel,!1),axisTick:pl(ro.axisTick,!1),splitLine:pl(ro.splitLine,!0),splitArea:pl(ro.splitArea,!0),indicator:[]},t})(mt),Xk=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=this.group;a.removeAll(),this._buildAxes(e,i),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,n){var i=e.coordinateSystem,a=i.getIndicatorAxes(),o=U(a,function(s){var l=s.model.get("showName")?s.name:"",u=new Ar(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});M(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var n=e.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),d=H(v)?v:[v],p=H(c)?c:[c],g=[],y=[];function m(R,E,O){var k=O%E.length;return R[k]=R[k]||[],k}if(a==="circle")for(var _=i[0].getTicksCoords(),S=n.cx,b=n.cy,x=0;x<_.length;x++){if(f){var w=m(g,d,x);g[w].push(new ds({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var w=m(y,p,x);y[w].push(new Xu({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,D=U(i,function(R,E){var O=R.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),U(O,function(k){return n.coordToPoint(k.coord,E)})}),A=[],x=0;x<=T;x++){for(var C=[],L=0;L<i.length;L++)C.push(D[L][x]);if(C[0]&&C.push(C[0].slice()),f){var w=m(g,d,x);g[w].push(new fr({shape:{points:C}}))}if(h&&A){var w=m(y,p,x-1);y[w].push(new Ir({shape:{points:C.concat(A)}}))}A=C.slice().reverse()}var I=l.getLineStyle(),P=u.getAreaStyle();M(y,function(R,E){this.group.add(Hc(R,{style:gt({stroke:"none",fill:p[E%p.length]},P),silent:!0}))},this),M(g,function(R,E){this.group.add(Hc(R,{style:gt({fill:"none",stroke:d[E%d.length]},I),silent:!0}))},this)},t.type="radar",t})($t),$k=(function(r){B(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return t})(ip),qk=(function(){function r(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=U(t.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new $k(o,new In);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(t,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},r.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e],i=n.angle,a=this.cx+t*Math.cos(i),o=this.cy-t*Math.sin(i);return[a,o]},r.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var a=Math.atan2(-n,e),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var f=this._indicatorAxes[u],h=Math.abs(a-f.angle);h<o&&(s=f,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(t,e){var n=Ie(t,e).refContainer,i=t.get("center"),a=Math.min(n.width,n.height)/2;this.cx=q(i[0],n.width)+n.x,this.cy=q(i[1],n.height)+n.y,this.startAngle=t.get("startAngle")*Math.PI/180;var o=t.get("radius");(X(o)||xt(o))&&(o=[0,o]),this.r0=q(o[0],a),this.r=q(o[1],a),M(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)},r.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;M(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();M(n,function(f){f.scale.unionExtentFromData(u,u.mapDimension(f.dim))})}},this);var a=i.get("splitNumber"),o=new In;o.setExtent(0,a),o.setInterval(1),M(n,function(s,l){R1(s.scale,s.model,o)})},r.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},r.create=function(t,e){var n=[];return t.eachComponent("radar",function(i){var a=new r(i,t,e);n.push(a),i.coordinateSystem=a}),t.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},r.dimensions=[],r})();function Kk(r){r.registerCoordinateSystem("radar",qk),r.registerComponentModel(Zk),r.registerComponentView(Xk),r.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(n){e.setItemVisual(n,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function Qk(r){ue(Kk),r.registerChartView(Uk),r.registerSeriesModel(Yk),r.registerLayout(Hk),r.registerProcessor(uf("radar")),r.registerPreprocessor(Wk)}var dp=wt();function jk(r,t,e){dp(r)[t]=e}function Jk(r,t,e){var n=dp(r),i=n[t];i===e&&(n[t]=null)}function f0(r,t){return!!dp(r)[t]}Lr({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},re);var tO={axisPointer:1,tooltip:1,brush:1};function ew(r,t,e){var n=t.getComponentByElement(r.topTarget);if(!n||n===e||tO.hasOwnProperty(n.mainType))return!1;var i=n.coordinateSystem;if(!i||i.model===e)return!1;var a=wa(n),o=wa(e);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var pp=(function(r){B(t,r);function t(e){var n=r.call(this)||this;n._zr=e;var i=Y(n._mousedownHandler,n),a=Y(n._mousemoveHandler,n),o=Y(n._mouseupHandler,n),s=Y(n._mousewheelHandler,n),l=Y(n._pinchHandler,n);return n.enable=function(u,f){var h=f.zInfo,v=wa(h.component),c=v.z,d=v.zlevel,p={component:h.component,z:c,zlevel:d,z2:et(h.z2,-1/0)},g=F({},f.triggerInfo);this._opt=gt(F({},f),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:p,triggerInfo:g}),u==null&&(u=!0),(!this._enabled||this._controlType!==u)&&(this._enabled=!0,this.disable(),(u===!0||u==="move"||u==="pan")&&(io(e,"mousedown",i,p),io(e,"mousemove",a,p),io(e,"mouseup",o,p)),(u===!0||u==="scale"||u==="zoom")&&(io(e,"mousewheel",s,p),io(e,"pinch",l,p)))},n.disable=function(){this._enabled=!1,ao(e,"mousedown",i),ao(e,"mousemove",a),ao(e,"mouseup",o),ao(e,"mousewheel",s),ao(e,"pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,n,i){var a=this._opt,o=a.zInfoParsed;if(ew(e,a.api,o.component))return!1;var s=a.triggerInfo,l=s.roamTrigger,u=!1;return l==="global"&&(u=!0),u||(u=s.isInSelf(e,n,i)),u&&s.isInClip&&!s.isInClip(e,n,i)&&(u=!1),u},t.prototype._decideCursorStyle=function(e,n,i,a){var o=e.target;if(!o&&this._checkPointer(e,n,i))return"grab";if(a)return o&&o.cursor||"default"},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(Yp(e)||no(e))){for(var n=e.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=e.offsetX,a=e.offsetY;this._checkPointer(e,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var n=this._zr;if(!(e.gestureEvent==="pinch"||f0(n,"globalPan")||no(e))){var i=e.offsetX,a=e.offsetY;if(!this._dragging||!zl("moveOnMouseMove",e,this._opt)){var o=this._decideCursorStyle(e,i,a,!1);o&&n.setCursorStyle(o);return}n.setCursorStyle("grabbing");var s=this._x,l=this._y,u=i-s,f=a-l;this._x=i,this._y=a,this._opt.preventDefaultMouseMove&&$r(e.event),e.__ecRoamConsumed=!0,h0(this,"pan","moveOnMouseMove",e,{dx:u,dy:f,oldX:s,oldY:l,newX:i,newY:a,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!no(e)){var n=this._zr;if(!Yp(e)){this._dragging=!1;var i=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);i&&n.setCursorStyle(i)}}},t.prototype._mousewheelHandler=function(e){if(!no(e)){var n=zl("zoomOnMouseWheel",e,this._opt),i=zl("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),v=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(f0(this._zr,"globalPan")||no(e))){var n=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,n,i,a,o){e._checkPointer(a,o.originX,o.originY)&&($r(a.event),a.__ecRoamConsumed=!0,h0(e,n,i,a,o))},t})(Ze);function no(r){return r.__ecRoamConsumed}var eO=wt();function ff(r){var t=eO(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function io(r,t,e,n){for(var i=ff(r),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:e,zInfoParsed:n}),rO(r,t)}function ao(r,t,e){for(var n=ff(r),i=n.roam[t]||[],a=0;a<i.length;a++)if(i[a].listener===e){i.splice(a,1),i.length||nO(r,t);return}}function rO(r,t){var e=ff(r);e.uniform[t]||r.on(t,e.uniform[t]=function(n){var i=e.roam[t];if(i)for(var a=0;a<i.length;a++)i[a].listener(n)})}function nO(r,t){var e=ff(r),n=e.uniform;n[t]&&(r.off(t,n[t]),n[t]=null)}function h0(r,t,e,n,i){i.isAvailableBehavior=Y(zl,null,e,n),r.trigger(t,i)}function zl(r,t,e){var n=e[r];return!r||n&&(!X(n)||t.event[n+"Key"])}function iO(r,t,e){var n=r.target;n.x+=t,n.y+=e,n.dirty()}function aO(r,t,e,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;o*=t,o=gp(o,a);var s=o/r.zoom;r.zoom=o,rw(i,e,n,s),i.dirty()}function oO(r,t,e,n,i,a){var o=new ot(0,0,0,0);n.enable(r.get("roam"),{api:t,zInfo:{component:r},triggerInfo:{roamTrigger:r.get("roamTrigger"),isInSelf:function(u,f,h){return o.copy(e.getBoundingRect()),o.applyTransform(e.getComputedTransform()),o.contain(f,h)},isInClip:function(u,f,h){return!0}}}),i.zoomLimit=r.get("scaleLimit");var s=r.coordinateSystem;i.zoom=s?s.getZoom():1;var l=r.subType+"Roam";n.off("pan").off("zoom").on("pan",function(u){iO(i,u.dx,u.dy),t.dispatchAction({seriesId:r.id,type:l,dx:u.dx,dy:u.dy})}).on("zoom",function(u){aO(i,u.scale,u.originX,u.originY),t.dispatchAction({seriesId:r.id,type:l,zoom:u.scale,originX:u.originX,originY:u.originY}),t.updateLabelLayout()})}function c0(r,t){return r.pointToProjected?r.pointToProjected(t):r.pointToData(t)}function sO(r,t,e){var n=r.getZoom(),i=r.getCenter(),a=t.zoom,o=r.projectedToPoint?r.projectedToPoint(i):r.dataToPoint(i);return t.dx!=null&&t.dy!=null&&(o[0]-=t.dx,o[1]-=t.dy,r.setCenter(c0(r,o))),a!=null&&(a=gp(n*a,e)/n,rw(r,t.originX,t.originY,a),r.updateTransform(),r.setCenter(c0(r,o)),r.setZoom(a*n)),{center:r.getCenter(),zoom:r.getZoom()}}function rw(r,t,e,n){r.x-=(t-r.x)*(n-1),r.y-=(e-r.y)*(n-1),r.scaleX*=n,r.scaleY*=n}function gp(r,t){if(t){var e=t.min||0,n=t.max||1/0;r=Math.max(Math.min(n,r),e)}return r}var v0=pe,lO=(function(r){B(t,r);function t(e,n){var i=r.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new ci,i._rawTransformable=new ci,i.name=e,i._opt=n,i}return t.prototype.setBoundingRect=function(e,n,i,a){return this._rect=new ot(e,n,i,a),this._updateCenterAndZoom(),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,n,i,a){this._transformTo(e,n,i,a),this._viewRect=new ot(e,n,i,a)},t.prototype._transformTo=function(e,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new ot(e,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e){var n=this._opt;n&&n.api&&n.ecModel&&n.ecModel.getShallow("legacyViewCoordSysCenterBase")&&e&&(e=[q(e[0],n.api.getWidth()),q(e[1],n.api.getWidth())]),this._centerOption=J(e),this._updateCenterAndZoom()},t.prototype.setZoom=function(e){this._zoom=gp(e||1,this.zoomLimit),this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),n=e.x+e.width/2,i=e.y+e.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 e=this._centerOption,n=this._rect;e&&n&&(this._center=[q(e[0],n.width,n.x),q(e[1],n.height,n.y)]);var i=this._rawTransformable.getLocalTransform(),a=this._roamTransformable,o=this.getDefaultCenter(),s=this.getCenter(),l=this.getZoom();s=pe([],s,i),o=pe([],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 e=this._roamTransformable,n=this._rawTransformable;n.parent=e,e.updateTransform(),n.updateTransform(),ed(this.transform||(this.transform=[]),n.transform||Fe()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],Pa(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,n=this._roamTransformable,i=new ci;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?v0(i,e,a):uC(i,e)},t.prototype.pointToData=function(e,n,i){i=i||[];var a=this.invTransform;return a?v0(i,e,a):(i[0]=e[0],i[1]=e[1],i)},t.prototype.convertToPixel=function(e,n,i){var a=d0(n);return a===this?a.dataToPoint(i):null},t.prototype.convertFromPixel=function(e,n,i){var a=d0(n);return a===this?a.pointToData(i):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t})(ci);function d0(r){var t=r.seriesModel;return t?t.coordinateSystem:null}var He=wt();function nw(r){var t=r.mainData,e=r.datas;e||(e={main:t},r.datasAttr={main:"data"}),r.datas=r.mainData=null,iw(t,e,r),M(e,function(n){M(t.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,at(uO,r))})}),t.wrapMethod("cloneShallow",at(hO,r)),M(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,at(fO,r))}),We(e[t.dataType]===t)}function uO(r,t){if(dO(this)){var e=F({},He(this).datas);e[this.dataType]=t,iw(t,e,r)}else yp(t,this.dataType,He(this).mainData,r);return t}function fO(r,t){return r.struct&&r.struct.update(),t}function hO(r,t){return M(He(t).datas,function(e,n){e!==t&&yp(e.cloneShallow(),n,t,r)}),t}function cO(r){var t=He(this).mainData;return r==null||t==null?t:He(t).datas[r]}function vO(){var r=He(this).mainData;return r==null?[{data:r}]:U(Pt(He(r).datas),function(t){return{type:t,data:He(r).datas[t]}})}function dO(r){return He(r).mainData===r}function iw(r,t,e){He(r).datas={},M(t,function(n,i){yp(n,i,r,e)})}function yp(r,t,e,n){He(e).datas[t]=r,He(r).mainData=e,r.dataType=t,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=r),r.getLinkedData=cO,r.getLinkedDataAll=vO}var pO=(function(){function r(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(t,e,n){Q(t)&&(n=e,e=t,t=null),t=t||{},X(t)&&(t={order:t});var i=t.order||"preorder",a=this[t.attr||"children"],o;i==="preorder"&&(o=e.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(t,e,n);i==="postorder"&&e.call(n,this)},r.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var a=n[e].getNodeById(t);if(a)return a}},r.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var a=n[e].contains(t);if(a)return a}},r.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},r.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},r.prototype.getDescendantIndices=function(){var t=[];return this.eachNode(function(e){t.push(e.dataIndex)}),t},r.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},r.prototype.setLayout=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},r.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},r.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},r})(),aw=(function(){function r(t){this.type="tree",this._nodes=[],this.hostModel=t}return r.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},r.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},r.prototype.getNodeById=function(t){return this.root.getNodeById(t)},r.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(var n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(t,e,n){var i=new r(e),a=[],o=1;s(t);function s(f,h){var v=f.value;o=Math.max(o,H(v)?v.length:1),a.push(f);var c=new pO(ge(f.name,""),i);h?gO(c,h):i.root=c,i._nodes.push(c);var d=f.children;if(d)for(var p=0;p<d.length;p++)s(d[p],c)}i.root.updateDepthAndHeight(0);var l=lf(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new Zr(l,e);return u.initData(a),n&&n(u),nw({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r})();function gO(r,t){var e=t.children;r.parentNode!==t&&(e.push(r),r.parentNode=t)}function rs(r,t,e){if(r&&dt(t,r.type)>=0){var n=e.getData().tree.root,i=r.targetNode;if(X(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function ow(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function mp(r,t){var e=ow(r);return dt(e,t)>=0}function _p(r,t){for(var e=[];r;){var n=r.dataIndex;e.push({name:r.name,dataIndex:n,value:t.getRawValue(n)}),r=r.parentNode}return e.reverse(),e}var p0=["treemapZoomToNode","treemapRender","treemapMove"];function yO(r){for(var t=0;t<p0.length;t++)r.registerAction({type:p0[t],update:"updateView"},re);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,n){n.eachComponent({mainType:"series",subType:"treemap",query:e},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=rs(e,s,a);if(l){var u=a.getViewRoot();u&&(e.direction=mp(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function sw(r){var t=r.getData(),e=t.tree,n={};e.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=XI(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var mO=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,n){var i={name:e.name,children:e.data};lw(i);var a=e.levels||[],o=this.designatedVisualItemStyle={},s=new Dt({itemStyle:o},this,n);a=e.levels=_O(a,n);var l=U(a||[],function(h){return new Dt(h,s,n)},this),u=aw.createTree(i,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var d=u.getNodeByDataIndex(c),p=d?l[d.depth]:null;return v.parentModel=p||s,v})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return Ye("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=_p(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},F(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var n=this._idIndexMap;n||(n=this._idIndexMap=it(),this._idIndexMapCount=0);var i=n.get(e);return i==null&&n.set(e,i=this._idIndexMapCount++),i},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){sw(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:N.size.l,top:N.size.xxxl,right:N.size.l,bottom:N.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:N.size.m,emptyItemWidth:25,itemStyle:{color:N.color.backgroundShade,textStyle:{color:N.color.secondary}},emphasis:{itemStyle:{color:N.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:N.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:N.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})(Yt);function lw(r){var t=0;M(r.children,function(n){lw(n);var i=n.value;H(i)&&(i=i[0]),t+=i});var e=r.value;H(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),H(r.value)?r.value[0]=e:r.value=e}function _O(r,t){var e=Ut(t.get("color")),n=Ut(t.get(["aria","decal","decals"]));if(e){r=r||[];var i,a;M(r,function(s){var l=new Dt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=e.slice()),!a&&n&&(o.decal=n.slice()),r}}var SO=8,g0=8,Oh=5,xO=(function(){function r(t){this.group=new yt,t.add(this.group)}return r.prototype.render=function(t,e,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"),f=l.getModel(["itemStyle","textStyle"]),h=Ie(t,e).refContainer,v={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},c={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=ie(v,h);this._prepare(n,c,u),this._renderContent(t,c,d,s,l,u,f,i),Od(o,v,h)}},r.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var a=ge(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+SO*2,e.emptyItemWidth);e.totalWidth+=s+g0,e.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(t,e,n,i,a,o,s,l){for(var u=0,f=e.emptyItemWidth,h=t.get(["breadcrumb","height"]),v=e.totalWidth,c=e.renderList,d=a.getModel("itemStyle").getItemStyle(),p=c.length-1;p>=0;p--){var g=c[p],y=g.node,m=g.width,_=g.text;v>n.width&&(v-=m-f,m=f,_=null);var S=new Ir({shape:{points:bO(u,0,m,h,p===c.length-1,p===0)},style:gt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:Wt(o,{text:_})}),textConfig:{position:"inside"},z2:vs*1e4,onclick:at(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Wt(s,{text:_}),S.ensureState("emphasis").style=d,ne(S,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(S),wO(S,t,y),u+=m+g0}},r.prototype.remove=function(){this.group.removeAll()},r})();function bO(r,t,e,n,i,a){var o=[[i?r:r-Oh,t],[r+e,t],[r+e,t+n],[i?r:r-Oh,t+n]];return!a&&o.splice(2,0,[r+e+Oh,t+n/2]),!i&&o.push([r,t+n/2]),o}function wO(r,t,e){vt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&_p(e,t)}}var TO=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,n,i,a){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:a}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){e--,e<=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},r})();function CO(){return new TO}var Cv=yt,y0=_t,m0=3,_0="label",S0="upperLabel",MO=vs*10,AO=vs*2,DO=vs*3,si=Di([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),x0=function(r){var t=si(r);return t.stroke=t.fill=t.lineWidth=null,t},Tu=wt(),IO=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._state="ready",e._storage=oo(),e}return t.prototype.render=function(e,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(dt(o,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=rs(a,s,e),u=a&&a.type,f=e.layoutInfo,h=!this._oldTree,v=this._storage,c=u==="treemapRootToNode"&&l&&v?{rootNodeGroup:v.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,d=this._giveContainerGroup(f),p=e.get("animation"),g=this._doRender(d,e,c);p&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(d,g,e,c):g.renderFinally(),this._resetController(i),this._renderBreadcrumb(e,i,l)}},t.prototype._giveContainerGroup=function(e){var n=this._containerGroup;return n||(n=this._containerGroup=new Cv,this._initEvents(n),this.group.add(n)),n.x=e.x,n.y=e.y,n},t.prototype._doRender=function(e,n,i){var a=n.getData().tree,o=this._oldTree,s=oo(),l=oo(),u=this._storage,f=[];function h(m,_,S,b){return LO(n,l,u,i,s,f,m,_,S,b)}p(a.root?[a.root]:[],o&&o.root?[o.root]:[],e,a===o||!o,0);var v=g(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var c=this.seriesModel.layoutInfo,d=a.root.getLayout();d.width===c.width&&d.height===c.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:v,renderFinally:y};function p(m,_,S,b,x){b?(_=m,M(m,function(D,A){!D.isRemoved()&&T(A,A)})):new xs(_,m,w,w).add(T).update(T).remove(at(T,null)).execute();function w(D){return D.getId()}function T(D,A){var C=D!=null?m[D]:null,L=A!=null?_[A]:null,I=h(C,L,S,x);I&&p(C&&C.viewChildren||[],L&&L.viewChildren||[],I,b,x+1)}}function g(m){var _=oo();return m&&M(m,function(S,b){var x=_[b];M(S,function(w){w&&(x.push(w),Tu(w).willDelete=!0)})}),_}function y(){M(v,function(m){M(m,function(_){_.parent&&_.parent.remove(_)})}),M(f,function(m){m.invisible=!0,m.dirty()})}},t.prototype._doAnimation=function(e,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(Q(o)?0:o)||0,u=(Q(s)?null:s)||"cubicOut",f=CO();M(n.willDeleteEls,function(h,v){M(h,function(c,d){if(!c.invisible){var p=c.parent,g,y=Tu(p);if(a&&a.direction==="drillDown")g=p===a.rootNodeGroup?{shape:{x:0,y:0,width:y.nodeWidth,height:y.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var m=0,_=0;y.willDelete||(m=y.nodeWidth/2,_=y.nodeHeight/2),g=v==="nodeGroup"?{x:m,y:_,style:{opacity:0}}:{shape:{x:m,y:_,width:0,height:0},style:{opacity:0}}}g&&f.add(c,g,l,0,u)}})}),M(this._storage,function(h,v){M(h,function(c,d){var p=n.lastsForAnimation[v][d],g={};p&&(c instanceof yt?p.oldX!=null&&(g.x=c.x,g.y=c.y,c.x=p.oldX,c.y=p.oldY):(p.oldShape&&(g.shape=F({},c.shape),c.setShape(p.oldShape)),p.fadein?(c.setStyle("opacity",0),g.style={opacity:1}):c.style.opacity!==1&&(g.style={opacity:1})),f.add(c,g,l,0,u))})},this),this._state="animating",f.finished(Y(function(){this._state="ready",n.renderFinally()},this)).start()},t.prototype._resetController=function(e){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 pp(e.getZr()),i.on("pan",Y(this._onPan,this)),i.on("zoom",Y(this._onZoom,this))),i.enable(o.get("roam"),{api:e,zInfo:{component:o},triggerInfo:{roamTrigger:o.get("roamTrigger"),isInSelf:function(s,l,u){var f=n._containerGroup;return f?f.getBoundingRect().contain(l-f.x,u-f.y):!1}}}),a.zoomLimit=o.get("scaleLimit"),a.zoom=o.get("zoom")},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if(this._state!=="animating"&&(Math.abs(e.dx)>m0||Math.abs(e.dy)>m0)){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+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},t.prototype._onZoom=function(e){var n=e.originX,i=e.originY,a=e.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 ot(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=a,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var d=h/f.zoom;f.zoom=h;var p=this.seriesModel.layoutInfo;n-=p.x,i-=p.y;var g=Fe();_a(g,g,[-n,-i]),lS(g,g,[d,d]),_a(g,g,[n,i]),l.applyTransform(g),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(e){var n=this;e.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),f=l.get("target",!0)||"blank";u&&su(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,n,i){var a=this;i||(i=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new xO(this.group))).render(e,n,i.node,function(o){a._state!=="animating"&&(mp(e.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=oo(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,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(e,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})(Vt);function oo(){return{nodeGroup:[],background:[],content:[]}}function LO(r,t,e,n,i,a,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,d=f.height,p=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),D=v.getModel(["select","itemStyle"]),A=x.get("borderRadius")||0,C=lt("nodeGroup",Cv);if(!C)return;if(l.add(C),C.x=f.x||0,C.y=f.y||0,C.markRedraw(),Tu(C).nodeWidth=c,Tu(C).nodeHeight=d,f.isAboveViewRoot)return C;var L=lt("background",y0,u,AO);L&&V(C,L,b&&f.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Uo(C)&&di(C,!1),L&&(di(L,!E),h.setItemGraphicEl(o.dataIndex,L),zc(L,O,R));else{var k=lt("content",y0,u,DO);k&&G(C,k),L.disableMorphing=!0,L&&Uo(L)&&di(L,!1),di(C,!E),h.setItemGraphicEl(o.dataIndex,C);var z=v.getShallow("cursor");z&&k.attr("cursor",z),zc(C,O,R)}return C;function V(ut,tt,pt){var K=vt(tt);if(K.dataIndex=o.dataIndex,K.seriesIndex=r.seriesIndex,tt.setShape({x:0,y:0,width:c,height:d,r:A}),g)W(tt);else{tt.invisible=!1;var nt=o.getVisual("style"),Rt=nt.stroke,Mt=x0(x);Mt.fill=Rt;var It=si(w);It.fill=w.get("borderColor");var Ft=si(T);Ft.fill=T.get("borderColor");var he=si(D);if(he.fill=D.get("borderColor"),pt){var Qr=c-2*p;Z(tt,Rt,nt.opacity,{x:p,y:0,width:Qr,height:S})}else tt.removeTextContent();tt.setStyle(Mt),tt.ensureState("emphasis").style=It,tt.ensureState("blur").style=Ft,tt.ensureState("select").style=he,Oc(tt)}ut.add(tt)}function G(ut,tt){var pt=vt(tt);pt.dataIndex=o.dataIndex,pt.seriesIndex=r.seriesIndex;var K=Math.max(c-2*p,0),nt=Math.max(d-2*p,0);if(tt.culling=!0,tt.setShape({x:p,y:p,width:K,height:nt,r:A}),g)W(tt);else{tt.invisible=!1;var Rt=o.getVisual("style"),Mt=Rt.fill,It=x0(x);It.fill=Mt,It.decal=Rt.decal;var Ft=si(w),he=si(T),Qr=si(D);Z(tt,Mt,Rt.opacity,null),tt.setStyle(It),tt.ensureState("emphasis").style=Ft,tt.ensureState("blur").style=he,tt.ensureState("select").style=Qr,Oc(tt)}ut.add(tt)}function W(ut){!ut.invisible&&a.push(ut)}function Z(ut,tt,pt,K){var nt=v.getModel(K?S0:_0),Rt=ge(v.get("name"),null),Mt=nt.getShallow("show");Ue(ut,Te(v,K?S0:_0),{defaultText:Mt?Rt:null,inheritColor:tt,defaultOpacity:pt,labelFetcher:r,labelDataIndex:o.dataIndex});var It=ut.getTextContent();if(It){var Ft=It.style,he=Bu(Ft.padding||0);K&&(ut.setTextConfig({layoutRect:K}),It.disableLabelLayout=!0),It.beforeUpdate=function(){var Pr=Math.max((K?K.width:ut.shape.width)-he[1]-he[3],0),Ts=Math.max((K?K.height:ut.shape.height)-he[0]-he[2],0);(Ft.width!==Pr||Ft.height!==Ts)&&It.setStyle({width:Pr,height:Ts})},Ft.truncateMinChar=2,Ft.lineOverflow="truncate",rt(Ft,K,f);var Qr=It.getState("emphasis");rt(Qr?Qr.style:null,K,f)}}function rt(ut,tt,pt){var K=ut?ut.text:null;if(!tt&&pt.isLeafRoot&&K!=null){var nt=r.get("drillDownIcon",!0);ut.text=nt?nt+" "+K:K}}function lt(ut,tt,pt,K){var nt=m!=null&&e[ut][m],Rt=i[ut];return nt?(e[ut][m]=null,Ct(Rt,nt)):g||(nt=new tt,nt instanceof ka&&(nt.z2=PO(pt,K)),Ot(Rt,nt)),t[ut][y]=nt}function Ct(ut,tt){var pt=ut[y]={};tt instanceof Cv?(pt.oldX=tt.x,pt.oldY=tt.y):pt.oldShape=F({},tt.shape)}function Ot(ut,tt){var pt=ut[y]={},K=o.parentNode,nt=tt instanceof yt;if(K&&(!n||n.direction==="drillDown")){var Rt=0,Mt=0,It=i.background[K.getRawIndex()];!n&&It&&It.oldShape&&(Rt=It.oldShape.width,Mt=It.oldShape.height),nt?(pt.oldX=0,pt.oldY=Mt):pt.oldShape={x:Rt,y:Mt,width:0,height:0}}pt.fadein=!nt}}function PO(r,t){return r*MO+t}var ns=M,RO=j,Cu=-1,Qt=(function(){function r(t){var e=t.mappingMethod,n=t.type,i=this.option=J(t);this.type=n,this.mappingMethod=e,this._normalizeData=OO[e];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[e],e==="piecewise"?(Bh(i),EO(i)):e==="category"?i.categories?kO(i):Bh(i,!0):(We(e!=="linear"||i.dataExtent),Bh(i))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return Y(this._normalizeData,this)},r.listVisualTypes=function(){return Pt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,n){j(t)?M(t,e,n):e.call(n,t)},r.mapVisual=function(t,e,n){var i,a=H(t)?[]:j(t)?{}:(i=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(t){var e={},n;return t&&ns(r.visualHandlers,function(i,a){t.hasOwnProperty(a)&&(e[a]=t[a],n=!0)}),n?e:null},r.prepareVisualTypes=function(t){if(H(t))t=t.slice();else if(RO(t)){var e=[];ns(t,function(n,i){e.push(i)}),t=e}else return[];return t.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,n){for(var i,a=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||X(l)&&l===t+"")return o;n&&v(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],f=u.interval,h=u.close;if(f){if(f[0]===-1/0){if(yl(h[1],t,f[1]))return o}else if(f[1]===1/0){if(yl(h[0],f[0],t))return o}else if(yl(h[0],f[0],t)&&yl(h[1],t,f[1]))return o;n&&v(f[0],o),n&&v(f[1],o)}}if(n)return t===1/0?e.length-1:t===-1/0?0:i;function v(c,d){var p=Math.abs(c-t);p<a&&(a=p,i=d)}},r.visualHandlers={color:{applyVisual:so("color"),getColorMapper:function(){var t=this.option;return Y(t.mappingMethod==="category"?function(e,n){return!n&&(e=this._normalizeData(e)),xo.call(this,e)}:function(e,n,i){var a=!!i;return!n&&(e=this._normalizeData(e)),i=Af(e,t.parsedVisual,i),a?i:Ur(i,"rgba")},this)},_normalizedToVisual:{linear:function(t){return Ur(Af(t,this.option.parsedVisual),"rgba")},category:xo,piecewise:function(t,e){var n=Av.call(this,e);return n==null&&(n=Ur(Af(t,this.option.parsedVisual),"rgba")),n},fixed:li}},colorHue:gl(function(t,e){return xn(t,e)}),colorSaturation:gl(function(t,e){return xn(t,null,e)}),colorLightness:gl(function(t,e){return xn(t,null,null,e)}),colorAlpha:gl(function(t,e){return xS(t,e)}),decal:{applyVisual:so("decal"),_normalizedToVisual:{linear:null,category:xo,piecewise:null,fixed:null}},opacity:{applyVisual:so("opacity"),_normalizedToVisual:Mv([0,1])},liftZ:{applyVisual:so("liftZ"),_normalizedToVisual:{linear:li,category:li,piecewise:li,fixed:li}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);n("symbol",i)},_normalizedToVisual:{linear:b0,category:xo,piecewise:function(t,e){var n=Av.call(this,e);return n==null&&(n=b0.call(this,t)),n},fixed:li}},symbolSize:{applyVisual:so("symbolSize"),_normalizedToVisual:Mv([0,1])}},r})();function EO(r){var t=r.pieceList;r.hasSpecialVisual=!1,M(t,function(e,n){e.originIndex=n,e.visual!=null&&(r.hasSpecialVisual=!0)})}function kO(r){var t=r.categories,e=r.categoryMap={},n=r.visual;if(ns(t,function(o,s){e[o]=s}),!H(n)){var i=[];j(n)?ns(n,function(o,s){var l=e[s];i[l??Cu]=o}):i[Cu]=n,n=uw(r,i)}for(var a=t.length-1;a>=0;a--)n[a]==null&&(delete e[t[a]],t.pop())}function Bh(r,t){var e=r.visual,n=[];j(e)?ns(e,function(a){n.push(a)}):e!=null&&n.push(e);var i={color:1,symbol:1};!t&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),uw(r,n)}function gl(r){return{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);n("color",r(e("color"),i))},_normalizedToVisual:Mv([0,1])}}function b0(r){var t=this.option.visual;return t[Math.round(St(r,[0,1],[0,t.length-1],!0))]||{}}function so(r){return function(t,e,n){n(r,this.mapValueToVisual(t))}}function xo(r){var t=this.option.visual;return t[this.option.loop&&r!==Cu?r%t.length:r]}function li(){return this.option.visual[0]}function Mv(r){return{linear:function(t){return St(t,r,this.option.visual,!0)},category:xo,piecewise:function(t,e){var n=Av.call(this,e);return n==null&&(n=St(t,r,this.option.visual,!0)),n},fixed:li}}function Av(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var n=Qt.findPieceIndex(r,e),i=e[n];if(i&&i.visual)return i.visual[this.type]}}function uw(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=U(t,function(e){var n=Ge(e);return n||[0,0,0,1]})),t}var OO={linear:function(r){return St(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Qt.findPieceIndex(r,t,!0);if(e!=null)return St(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??Cu},fixed:re};function yl(r,t,e){return r?t<=e:t<e}var BO="itemStyle",fw=wt();const NO={seriesType:"treemap",reset:function(r){var t=r.getData().tree,e=t.root;e.isRemoved()||hw(e,{},r.getViewRoot().getAncestors(),r)}};function hw(r,t,e,n){var i=r.getModel(),a=r.getLayout(),o=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(BO),l=zO(s,t,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),f=s.get("borderColor"),h=s.get("borderColorSaturation"),v;h!=null&&(v=w0(l),f=VO(h,v)),u.stroke=f;var c=r.viewChildren;if(!c||!c.length)v=w0(l),u.fill=v;else{var d=FO(r,i,a,s,l,c);M(c,function(p,g){if(p.depth>=e.length||p===e[p.depth]){var y=GO(i,l,p,g,d,n);hw(p,y,e,n)}})}}}function zO(r,t,e){var n=F({},t),i=e.designatedVisualItemStyle;return M(["color","colorAlpha","colorSaturation"],function(a){i[a]=t[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function w0(r){var t=Nh(r,"color");if(t){var e=Nh(r,"colorAlpha"),n=Nh(r,"colorSaturation");return n&&(t=xn(t,null,null,n)),e&&(t=xS(t,e)),t}}function VO(r,t){return t!=null?xn(t,null,null,r):null}function Nh(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function FO(r,t,e,n,i,a){if(!(!a||!a.length)){var o=zh(t,"color")||i.color!=null&&i.color!=="none"&&(zh(t,"colorAlpha")||zh(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var f=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new Qt(h);return fw(v).drColorMappingBy=f,v}}}function zh(r,t){var e=r.get(t);return H(e)&&e.length?{name:t,range:e}:null}function GO(r,t,e,n,i,a){var o=F({},t);if(i){var s=i.type,l=s==="color"&&fw(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var is=Math.max,Mu=Math.min,T0=Xr,Sp=M,cw=["itemStyle","borderWidth"],HO=["itemStyle","gapWidth"],WO=["upperLabel","show"],UO=["upperLabel","height"];const YO={seriesType:"treemap",reset:function(r,t,e,n){var i=r.option,a=Ie(r,e).refContainer,o=ie(r.getBoxLayoutParams(),a),s=i.size||[],l=q(T0(o.width,s[0]),a.width),u=q(T0(o.height,s[1]),a.height),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],v=rs(n,h,r),c=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,d=r.getViewRoot(),p=ow(d);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?QO(r,v,d,l,u):c?[c.width,c.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),vw(d,m,!1,0),_=d.getLayout(),Sp(p,function(b,x){var w=(p[x+1]||d).getValue();b.setLayout(F({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(jO(o,c,v),!0),r.setLayoutInfo(o),dw(S,new ot(-o.x,-o.y,e.getWidth(),e.getHeight()),p,d,0)}};function vw(r,t,e,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(cw),u=s.get(HO)/2,f=pw(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),i=is(i-2*v,0),a=is(a-v-c,0);var d=i*a,p=ZO(r,s,d,t,e,n);if(p.length){var g={x:v,y:c,width:i,height:a},y=Mu(i,a),m=1/0,_=[];_.area=0;for(var S=0,b=p.length;S<b;){var x=p[S];_.push(x),_.area+=x.getLayout().area;var w=KO(_,y,t.squareRatio);w<=m?(S++,m=w):(_.area-=_.pop().getLayout().area,C0(_,y,g,u,!1),y=Mu(g.width,g.height),_.length=_.area=0,m=1/0)}if(_.length&&C0(_,y,g,u,!0),!e){var T=s.get("childrenVisibleMin");T!=null&&d<T&&(e=!0)}for(var S=0,b=p.length;S<b;S++)vw(p[S],t,e,n+1)}}}function ZO(r,t,e,n,i,a){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return r.viewChildren=[];o=kt(o,function(c){return!c.isRemoved()}),$O(o,s);var u=qO(t,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=XO(t,e,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var f=0,h=o.length;f<h;f++){var v=o[f].getValue()/u.sum*e;o[f].setLayout({area:v})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function XO(r,t,e,n,i){if(!n)return e;for(var a=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/e*t<a&&(s=l,e-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),e}function $O(r,t){return t&&r.sort(function(e,n){var i=t==="asc"?e.getValue()-n.getValue():n.getValue()-e.getValue();return i===0?t==="asc"?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}),r}function qO(r,t,e){for(var n=0,i=0,a=t.length;i<a;i++)n+=t[i].getValue();var o=r.get("visualDimension"),s;return!t||!t.length?s=[NaN,NaN]:o==="value"&&e?(s=[t[t.length-1].getValue(),t[0].getValue()],e==="asc"&&s.reverse()):(s=[1/0,-1/0],Sp(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 KO(r,t,e){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;a<s;a++)o=r[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=r.area*r.area,u=t*t*e;return l?is(u*n/l,l/(u*i)):1/0}function C0(r,t,e,n,i){var a=t===e.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=e[s[a]],f=t?r.area/t:0;(i||f>e[l[o]])&&(f=e[l[o]]);for(var h=0,v=r.length;h<v;h++){var c=r[h],d={},p=f?c.getLayout().area/f:0,g=d[l[o]]=is(f-2*n,0),y=e[s[a]]+e[l[a]]-u,m=h===v-1||y<p?y:p,_=d[l[a]]=is(m-2*n,0);d[s[o]]=e[s[o]]+Mu(n,g/2),d[s[a]]=u+Mu(n,_/2),u+=m,c.setLayout(d,!0)}e[s[o]]+=f,e[l[o]]-=f}function QO(r,t,e,n,i){var a=(t||{}).node,o=[n,i];if(!a||a===e)return o;for(var s,l=n*i,u=l*r.option.zoomToNodeRatio;s=a.parentNode;){for(var f=0,h=s.children,v=0,c=h.length;v<c;v++)f+=h[v].getValue();var d=a.getValue();if(d===0)return o;u*=f/d;var p=s.getModel(),g=p.get(cw),y=Math.max(g,pw(p));u+=4*g*g+(3*g+y)*Math.pow(u,.5),u>mg&&(u=mg),a=s}u<l&&(u=l);var m=Math.pow(u/l,.5);return[n*m,i*m]}function jO(r,t,e){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!e)return n;var i=e.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:r.width/2-o[0],y:r.height/2-o[1]}}function dw(r,t,e,n,i){var a=r.getLayout(),o=e[i],s=o&&o===r;if(!(o&&!s||i===e.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var l=new ot(t.x-a.x,t.y-a.y,t.width,t.height);Sp(r.viewChildren||[],function(u){dw(u,l,e,n,i+1)})}}function pw(r){return r.get(WO)?r.get(UO):0}function JO(r){r.registerSeriesModel(mO),r.registerChartView(IO),r.registerVisual(NO),r.registerLayout(YO),yO(r)}var M0=lr.prototype,Vh=$u.prototype,gw=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})();(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(gw);function Fh(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var tB=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-line",n}return t.prototype.getDefaultStyle=function(){return{stroke:N.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new gw},t.prototype.buildPath=function(e,n){Fh(n)?M0.buildPath.call(this,e,n):Vh.buildPath.call(this,e,n)},t.prototype.pointAt=function(e){return Fh(this.shape)?M0.pointAt.call(this,e):Vh.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var n=this.shape,i=Fh(n)?[n.x2-n.x1,n.y2-n.y1]:Vh.tangentAt.call(this,e);return jv(i,i)},t})(bt),Gh=["fromSymbol","toSymbol"];function A0(r){return"_"+r+"Type"}function D0(r,t,e){var n=t.getItemVisual(e,r);if(!n||n==="none")return n;var i=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=af(i),u=of(o||0,l);return n+l+u+(a||"")+(s||"")}function I0(r,t,e){var n=t.getItemVisual(e,r);if(!(!n||n==="none")){var i=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=af(i),u=of(o||0,l),f=le(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,f.name=r,f}}function eB(r){var t=new tB({name:"line",subPixelOptimize:!0});return Dv(t.shape,r),t}function Dv(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var rB=(function(r){B(t,r);function t(e,n,i){var a=r.call(this)||this;return a._createLine(e,n,i),a}return t.prototype._createLine=function(e,n,i){var a=e.hostModel,o=e.getItemLayout(n),s=e.getItemVisual(n,"z2"),l=eB(o);l.shape.percent=0,zt(l,{z2:et(s,0),shape:{percent:1}},a,n),this.add(l),M(Gh,function(u){var f=I0(u,e,n);this.add(f),this[A0(u)]=D0(u,e,n)},this),this._updateCommonStl(e,n,i)},t.prototype.updateData=function(e,n,i){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(n),l={shape:{}};Dv(l.shape,s),Et(o,l,a,n),M(Gh,function(u){var f=D0(u,e,n),h=A0(u);if(this[h]!==f){this.remove(this.childOfName(u));var v=I0(u,e,n);this.add(v)}this[h]=f},this),this._updateCommonStl(e,n,i)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,n,i){var a=e.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,f=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,v=i&&i.focus,c=i&&i.blurScope;if(!i||e.hasItemOption){var d=e.getItemModel(n),p=d.getModel("emphasis");s=p.getModel("lineStyle").getLineStyle(),l=d.getModel(["blur","lineStyle"]).getLineStyle(),u=d.getModel(["select","lineStyle"]).getLineStyle(),h=p.get("disabled"),v=p.get("focus"),c=p.get("blurScope"),f=Te(d)}var g=e.getItemVisual(n,"style"),y=g.stroke;o.useStyle(g),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,M(Gh,function(x){var w=this.childOfName(x);if(w){w.setColor(y),w.style.opacity=g.opacity;for(var T=0;T<ye.length;T++){var D=ye[T],A=o.getState(D);if(A){var C=A.style||{},L=w.ensureState(D),I=L.style||(L.style={});C.stroke!=null&&(I[w.__isEmptyBrush?"stroke":"fill"]=C.stroke),C.opacity!=null&&(I.opacity=C.opacity)}}w.markRedraw()}},this);var m=a.getRawValue(n);Ue(this,f,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(x,w){return a.getFormattedLabel(x,w,e.dataType)}},inheritColor:y||N.color.neutral99,defaultOpacity:g.opacity,defaultText:(m==null?e.getName(n):isFinite(m)?Xt(m):m)+""});var _=this.getTextContent();if(_){var S=f.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=S.get("position")||"middle";var b=S.get("distance");H(b)||(b=[b,b]),_.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),ne(this,v,c,h)},t.prototype.highlight=function(){Mn(this)},t.prototype.downplay=function(){An(this)},t.prototype.updateLayout=function(e,n){this.setLinePoints(e.getItemLayout(n))},t.prototype.setLinePoints=function(e){var n=this.childOfName("line");Dv(n.shape,e),n.dirty()},t.prototype.beforeUpdate=function(){var e=this,n=e.childOfName("fromSymbol"),i=e.childOfName("toSymbol"),a=e.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=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),h=l.pointAt(u),v=oS([],h,f);jv(v,v);function c(A,C){var L=A.__specifiedRotation;if(L==null){var I=l.tangentAt(C);A.attr("rotation",(C===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else A.attr("rotation",L)}if(n&&(n.setPosition(f),c(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(h),c(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var d=void 0,p=void 0,g=a.__labelDistance,y=g[0]*o,m=g[1]*o,_=u/2,S=l.tangentAt(_),b=[S[1],-S[0]],x=l.pointAt(_);b[1]>0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0]<f[0]&&(T=Math.PI+T),a.rotation=T}var D=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":D=-m,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":D=m,p="top";break;default:D=0,p="middle"}switch(a.__position){case"end":a.x=v[0]*y+h[0],a.y=v[1]*m+h[1],d=v[0]>.8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":a.x=-v[0]*y+f[0],a.y=-v[1]*m+f[1],d=v[0]>.8?"right":v[0]<-.8?"left":"center",p=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*w+f[0],a.y=f[1]+D,d=S[0]<0?"right":"left",a.originX=-y*w,a.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=x[0],a.y=x[1]+D,d="center",a.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*w+h[0],a.y=h[1]+D,d=S[0]>=0?"right":"left",a.originX=y*w,a.originY=-D;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||d})}},t})(yt),nB=(function(){function r(t){this.group=new yt,this._LineCtor=t||rB}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=t,a||i.removeAll();var o=L0(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=L0(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function n(s){!s.isGroup&&!iB(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var a=e.getItemLayout(i);if(Hh(a)){var o=new this._LineCtor(e,i,this._seriesScope);o.traverse(n),this.group.add(o),e.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){Oa(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,n){var i=t.getItemLayout(e);if(Hh(i)){var a=new this._LineCtor(t,e,n);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,n,i,a){var o=t.getItemGraphicEl(n);if(!Hh(e.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(e,i,a):o=new this._LineCtor(e,i,a),e.setItemGraphicEl(i,o),this.group.add(o)},r})();function iB(r){return r.animators&&r.animators.length>0}function L0(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Te(t)}}function P0(r){return isNaN(r[0])||isNaN(r[1])}function Hh(r){return r&&!P0(r[0])&&!P0(r[1])}function ta(r){return"_EC_"+r}var aB=(function(){function r(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(t,e){t=t==null?""+e:""+t;var n=this._nodesMap;if(!n[ta(t)]){var i=new ui(t,e);return i.hostGraph=this,this.nodes.push(i),n[ta(t)]=i,i}},r.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},r.prototype.getNodeById=function(t){return this._nodesMap[ta(t)]},r.prototype.addEdge=function(t,e,n){var i=this._nodesMap,a=this._edgesMap;if(xt(t)&&(t=this.nodes[t]),xt(e)&&(e=this.nodes[e]),t instanceof ui||(t=i[ta(t)]),e instanceof ui||(e=i[ta(e)]),!(!t||!e)){var o=t.id+"-"+e.id,s=new yw(t,e,n);return s.hostGraph=this,this._directed&&(t.outEdges.push(s),e.inEdges.push(s)),t.edges.push(s),t!==e&&e.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},r.prototype.getEdge=function(t,e){t instanceof ui&&(t=t.id),e instanceof ui&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},r.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&t.call(e,n[a],a)},r.prototype.eachEdge=function(t,e){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(e,n[a],a)},r.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof ui||(e=this._nodesMap[ta(e)]),!!e){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,e,null))for(var s=[e];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var f=u[o],h=f.node1===l?f.node2:f.node1;if(!h.__visited){if(t.call(i,h,l))return;s.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var t=this.data,e=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;e.filterSelf(function(s){var l=i[e.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=e.count();a<o;a++)i[e.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var t=new r(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[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},r})(),ui=(function(){function r(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=t??"",this.dataIndex=e??-1}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,n=e.data.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},r.prototype.getTrajectoryDataIndices=function(){for(var t=it(),e=it(),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++,e.set(u.dataIndex,!0);for(var f=u.inEdges,h=0,v=f.length,c=void 0,d=void 0;h<v;h++)c=f[h],d=c.dataIndex,d>=0&&!t.hasKey(d)&&(t.set(d,!0),o.push(c.node1))}for(l=0;l<s.length;){var p=s[l];l++,e.set(p.dataIndex,!0);for(var g=p.outEdges,h=0,y=g.length,m=void 0,_=void 0;h<y;h++)m=g[h],_=m.dataIndex,_>=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),yw=(function(){function r(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=n??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,n=e.edgeData.getItemModel(this.dataIndex);return n.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=it(),e=it();t.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,e.set(o.dataIndex,!0);for(var s=o.inEdges,l=0,u=s.length,f=void 0,h=void 0;l<u;l++)f=o.inEdges[l],h=f.dataIndex,h>=0&&!t.hasKey(h)&&(t.set(h,!0),n.push(f.node1))}for(a=0;a<i.length;){var v=i[a];a++,e.set(v.dataIndex,!0);for(var c=v.outEdges,l=0,u=c.length,d=void 0,p=void 0;l<u;l++)d=v.outEdges[l],p=d.dataIndex,p>=0&&!t.hasKey(p)&&(t.set(p,!0),i.push(d.node2))}return{edge:t.keys(),node:e.keys()}},r})();function mw(r,t){return{getValue:function(e){var n=this[r][t];return n.getStore().get(n.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,n){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,n)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,n){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,n)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}fe(ui,mw("hostGraph","data"));fe(yw,mw("hostGraph","edgeData"));function oB(r,t,e,n,i){for(var a=new aB(n),o=0;o<r.length;o++)a.addNode(Xr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<t.length;o++){var f=t[o],h=f.source,v=f.target;a.addEdge(h,v,u)&&(l.push(f),s.push(Xr(ge(f.id,null),h+" > "+v)),u++)}var c=e.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar"||c==="matrix")d=Ni(r,e);else{var p=_s.get(c),g=p?p.dimensions||[]:[];dt(g,"value")<0&&g.concat(["value"]);var y=lf(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new Zr(y,e),d.initData(r)}var m=new Zr(["value"],e);return m.initData(l,s),i&&i(d,m),nw({mainData:d,struct:a,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var sB=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),lB=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="pointer",n}return t.prototype.getDefaultShape=function(){return new sB},t.prototype.buildPath=function(e,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),f=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(n.x+i(l)*s,n.y+a(l)*s),e.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),e.lineTo(n.x-i(l)*s,n.y-a(l)*s),e.lineTo(u,f)},t})(bt);function uB(r,t){var e=r.get("center"),n=t.getWidth(),i=t.getHeight(),a=Math.min(n,i),o=q(e[0],t.getWidth()),s=q(e[1],t.getHeight()),l=q(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function ml(r,t){var e=r==null?"":r+"";return t&&(X(t)?e=t.replace("{value}",e):Q(t)&&(e=t(r))),e}var fB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),o=uB(e,i);this._renderMain(e,n,i,a,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,n,i,a,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),v=h.get("roundCap"),c=v?wu:sr,d=h.get("show"),p=h.getModel("lineStyle"),g=p.get("width"),y=[u,f];ud(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;d&&b<a.length;b++){var x=Math.min(Math.max(a[b][0],0),1);f=u+m*x;var w=new c({shape:{startAngle:_,endAngle:f,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-g,r:o.r},silent:!0});w.setStyle({fill:a[b][1]}),w.setStyle(p.getLineStyle(["color","width"])),S.push(w),_=f}S.reverse(),M(S,function(D){return s.add(D)});var T=function(D){if(D<=0)return a[0][1];var A;for(A=0;A<a.length;A++)if(a[A][0]>=D&&(A===0?0:a[A-1][0])<D)return a[A][1];return a[A-1][1]};this._renderTicks(e,n,i,T,o,u,f,l,g),this._renderTitleAndDetail(e,n,i,T,o),this._renderAnchor(e,o),this._renderPointer(e,n,i,T,o,u,f,l,g)},t.prototype._renderTicks=function(e,n,i,a,o,s,l,u,f){for(var h=this.group,v=o.cx,c=o.cy,d=o.r,p=+e.get("min"),g=+e.get("max"),y=e.getModel("splitLine"),m=e.getModel("axisTick"),_=e.getModel("axisLabel"),S=e.get("splitNumber"),b=m.get("splitNumber"),x=q(y.get("length"),d),w=q(m.get("length"),d),T=s,D=(l-s)/S,A=D/b,C=y.getModel("lineStyle").getLineStyle(),L=m.getModel("lineStyle").getLineStyle(),I=y.get("distance"),P,R,E=0;E<=S;E++){if(P=Math.cos(T),R=Math.sin(T),y.get("show")){var O=I?I+f:f,k=new lr({shape:{x1:P*(d-O)+v,y1:R*(d-O)+c,x2:P*(d-x-O)+v,y2:R*(d-x-O)+c},style:C,silent:!0});C.stroke==="auto"&&k.setStyle({stroke:a(E/S)}),h.add(k)}if(_.get("show")){var O=_.get("distance")+I,z=ml(Xt(E/S*(g-p)+p),_.get("formatter")),V=a(E/S),G=P*(d-x-O)+v,W=R*(d-x-O)+c,Z=_.get("rotate"),rt=0;Z==="radial"?(rt=-T+2*Math.PI,rt>Math.PI/2&&(rt+=Math.PI)):Z==="tangential"?rt=-T-Math.PI/2:xt(Z)&&(rt=Z*Math.PI/180),rt===0?h.add(new Tt({style:Wt(_,{text:z,x:G,y:W,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):h.add(new Tt({style:Wt(_,{text:z,x:G,y:W,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:G,originY:W,rotation:rt}))}if(m.get("show")&&E!==S){var O=m.get("distance");O=O?O+f:f;for(var lt=0;lt<=b;lt++){P=Math.cos(T),R=Math.sin(T);var Ct=new lr({shape:{x1:P*(d-O)+v,y1:R*(d-O)+c,x2:P*(d-w-O)+v,y2:R*(d-w-O)+c},silent:!0,style:L});L.stroke==="auto"&&Ct.setStyle({stroke:a((E+lt/b)/S)}),h.add(Ct),T+=A}T-=A}else T+=D}},t.prototype._renderPointer=function(e,n,i,a,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),b=+e.get("max"),x=[S,b],w=[s,l];function T(A,C){var L=m.getItemModel(A),I=L.getModel("pointer"),P=q(I.get("width"),o.r),R=q(I.get("length"),o.r),E=e.get(["pointer","icon"]),O=I.get("offsetCenter"),k=q(O[0],o.r),z=q(O[1],o.r),V=I.get("keepAspect"),G;return E?G=le(E,k-P/2,z-R,P,R,null,V):G=new lB({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:z}}),G.rotation=-(C+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function D(A,C){var L=g.get("roundCap"),I=L?wu:sr,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(A+1)*R,O=P?o.r:o.r-A*R,k=new I({shape:{startAngle:s,endAngle:C,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:O}});return P&&(k.z2=St(m.get(_,A),[S,b],[100,0],!0)),k}(y||p)&&(m.diff(v).add(function(A){var C=m.get(_,A);if(p){var L=T(A,s);zt(L,{rotation:-((isNaN(+C)?w[0]:St(C,x,w,!0))+Math.PI/2)},e),h.add(L),m.setItemGraphicEl(A,L)}if(y){var I=D(A,s),P=g.get("clip");zt(I,{shape:{endAngle:St(C,x,w,P)}},e),h.add(I),Ec(e.seriesIndex,m.dataType,A,I),d[A]=I}}).update(function(A,C){var L=m.get(_,A);if(p){var I=v.getItemGraphicEl(C),P=I?I.rotation:s,R=T(A,P);R.rotation=P,Et(R,{rotation:-((isNaN(+L)?w[0]:St(L,x,w,!0))+Math.PI/2)},e),h.add(R),m.setItemGraphicEl(A,R)}if(y){var E=c[C],O=E?E.shape.endAngle:s,k=D(A,O),z=g.get("clip");Et(k,{shape:{endAngle:St(L,x,w,z)}},e),h.add(k),Ec(e.seriesIndex,m.dataType,A,k),d[A]=k}}).execute(),m.each(function(A){var C=m.getItemModel(A),L=C.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(p){var E=m.getItemGraphicEl(A),O=m.getItemVisual(A,"style"),k=O.fill;if(E instanceof Xe){var z=E.style;E.useStyle(F({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},O))}else E.useStyle(O),E.type!=="pointer"&&E.setColor(k);E.setStyle(C.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",a(St(m.get(_,A),x,[0,1],!0))),E.z2EmphasisLift=0,De(E,C),ne(E,I,P,R)}if(y){var V=d[A];V.useStyle(m.getItemVisual(A,"style")),V.setStyle(C.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,De(V,C),ne(V,I,P,R)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,n){var i=e.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"),f=le(s,n.cx-o/2+q(l[0],n.r),n.cy-o/2+q(l[1],n.r),o,o,null,u);f.z2=i.get("showAbove")?1:0,f.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,n,i,a,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),h=+e.get("max"),v=new yt,c=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Tt({silent:!0}),d[y]=new Tt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new yt,b=a(St(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+q(w[0],o.r),D=o.cy+q(w[1],o.r),A=c[y];A.attr({z2:g?0:2,style:Wt(x,{x:T,y:D,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(A)}var C=m.getModel("detail");if(C.get("show")){var L=C.get("offsetCenter"),I=o.cx+q(L[0],o.r),P=o.cy+q(L[1],o.r),R=q(C.get("width"),o.r),E=q(C.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,A=d[y],k=C.get("formatter");A.attr({z2:g?0:2,style:Wt(C,{x:I,y:P,text:ml(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:O})}),xx(A,{normal:C},_,function(V){return ml(V,k)}),p&&rI(A,y,l,e,{getFormattedLabel:function(V,G,W,Z,rt,lt){return ml(lt?lt.interpolatedValue:_,k)}}),S.add(A)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=d},t.type="gauge",t})(Vt),hB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,n){return bs(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,N.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:N.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:N.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:N.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:N.color.neutral00,borderWidth:0,borderColor:N.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:N.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:N.color.transparent,borderWidth:0,borderColor:N.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:N.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(Yt);function cB(r){r.registerChartView(fB),r.registerSeriesModel(hB)}var vB=["itemStyle","opacity"],dB=(function(r){B(t,r);function t(e,n){var i=r.call(this)||this,a=i,o=new fr,s=new Tt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return t.prototype.updateData=function(e,n,i){var a=this,o=e.hostModel,s=e.getItemModel(n),l=e.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(vB);f=f??1,i||qr(a),a.useStyle(e.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,zt(a,{style:{opacity:f}},o,n)):Et(a,{style:{opacity:f},shape:{points:l.points}},o,n),De(a,s),this._updateLabel(e,n),ne(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=e.hostModel,l=e.getItemModel(n),u=e.getItemLayout(n),f=u.label,h=e.getItemVisual(n,"style"),v=h.fill;Ue(o,Te(l),{labelFetcher:e.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:e.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var c=l.getModel("label"),d=c.get("color"),p=d==="inherit"?v:null;i.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var g=f.linePoints;a.setShape({points:g}),i.textGuideLineConfig={anchor:g?new ht(g[0][0],g[0][1]):null},Et(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),_1(i,S1(l),{stroke:v})},t})(Ir),pB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new dB(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,l),s.add(f),a.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);pa(u,e,l)}).execute(),this._data=a},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})(Vt),gB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new vp(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,n){return bs(this,{coordDimensions:["value"],encodeDefaulter:at(Ux,this)})},t.prototype._defaultLabelLine=function(e){Go(e,"labelLine",["show"]);var n=e.labelLine,i=e.emphasis.labelLine;n.show=n.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var n=this.getData(),i=r.prototype.getDataParams.call(this,e),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,e)/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:N.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:N.color.primary}}},t})(Yt);function yB(r,t){for(var e=r.mapDimension("value"),n=r.mapArray(e,function(l){return l}),i=[],a=t==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return Q(t)?i.sort(t):t!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function mB(r){var t=r.hostModel,e=t.get("orient");r.each(function(n){var i=r.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,f=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,v,c,d;if(f)o==="insideLeft"?(v=(u[0][0]+u[3][0])/2+5,c=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(v=(u[1][0]+u[2][0])/2-5,c=(u[1][1]+u[2][1])/2,h="right"):(v=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,c=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),d=[[v,c],[v,c]];else{var p=void 0,g=void 0,y=void 0,m=void 0,_=s.get("length");o==="left"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,y=p-_,v=y-5,h="right"):o==="right"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,y=p+_,v=y+5,h="left"):o==="top"?(p=(u[3][0]+u[0][0])/2,g=(u[3][1]+u[0][1])/2,m=g-_,c=m-5,h="center"):o==="bottom"?(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,m=g+_,c=m+5,h="center"):o==="rightTop"?(p=e==="horizontal"?u[3][0]:u[1][0],g=e==="horizontal"?u[3][1]:u[1][1],e==="horizontal"?(m=g-_,c=m-5,h="center"):(y=p+_,v=y+5,h="top")):o==="rightBottom"?(p=u[2][0],g=u[2][1],e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p+_,v=y+5,h="bottom")):o==="leftTop"?(p=u[0][0],g=e==="horizontal"?u[0][1]:u[1][1],e==="horizontal"?(m=g-_,c=m-5,h="center"):(y=p-_,v=y-5,h="right")):o==="leftBottom"?(p=e==="horizontal"?u[1][0]:u[3][0],g=e==="horizontal"?u[1][1]:u[2][1],e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p-_,v=y-5,h="right")):(p=(u[1][0]+u[2][0])/2,g=(u[1][1]+u[2][1])/2,e==="horizontal"?(m=g+_,c=m+5,h="center"):(y=p+_,v=y+5,h="left")),e==="horizontal"?(y=p,v=y):(m=g,c=m),d=[[p,g],[y,m]]}l.label={linePoints:d,x:v,y:c,verticalAlign:"middle",textAlign:h,inside:f}})}function _B(r,t){r.eachSeriesByType("funnel",function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),o=Ie(e,t),s=ie(e.getBoxLayoutParams(),o.refContainer),l=e.get("orient"),u=s.width,f=s.height,h=yB(n,a),v=s.x,c=s.y,d=l==="horizontal"?[q(e.get("minSize"),f),q(e.get("maxSize"),f)]:[q(e.get("minSize"),u),q(e.get("maxSize"),u)],p=n.getDataExtent(i),g=e.get("min"),y=e.get("max");g==null&&(g=Math.min(p[0],0)),y==null&&(y=p[1]);var m=e.get("funnelAlign"),_=e.get("gap"),S=l==="horizontal"?u:f,b=(S-_*(n.count()-1))/n.count(),x=function(R,E){if(l==="horizontal"){var O=n.get(i,R)||0,k=St(O,[g,y],d,!0),z=void 0;switch(m){case"top":z=c;break;case"center":z=c+(f-k)/2;break;case"bottom":z=c+(f-k);break}return[[E,z],[E,z+k]]}var V=n.get(i,R)||0,G=St(V,[g,y],d,!0),W;switch(m){case"left":W=v;break;case"center":W=v+(u-G)/2;break;case"right":W=v+u-G;break}return[[W,E],[W+G,E]]};a==="ascending"&&(b=-b,_=-_,l==="horizontal"?v+=u:c+=f,h=h.reverse());for(var w=0;w<h.length;w++){var T=h[w],D=h[w+1],A=n.getItemModel(T);if(l==="horizontal"){var C=A.get(["itemStyle","width"]);C==null?C=b:(C=q(C,u),a==="ascending"&&(C=-C));var L=x(T,v),I=x(D,v+C);v+=C+_,n.setItemLayout(T,{points:L.concat(I.slice().reverse())})}else{var P=A.get(["itemStyle","height"]);P==null?P=b:(P=q(P,f),a==="ascending"&&(P=-P));var L=x(T,c),I=x(D,c+P);c+=P+_,n.setItemLayout(T,{points:L.concat(I.slice().reverse())})}}mB(n)})}function SB(r){r.registerChartView(pB),r.registerSeriesModel(gB),r.registerLayout(_B),r.registerProcessor(uf("funnel"))}var xB=.3,bB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._dataGroup=new yt,e._initialized=!1,e}return t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.dimensions,h=E0(e);s.diff(l).add(v).update(c).remove(d).execute();function v(g){var y=R0(s,o,g,f,u);Wh(y,s,g,h)}function c(g,y){var m=l.getItemGraphicEl(y),_=_w(s,g,f,u);s.setItemGraphicEl(g,m),Et(m,{shape:{points:_}},e,g),qr(m),Wh(m,s,g,h)}function d(g){var y=l.getItemGraphicEl(g);o.remove(y)}if(!this._initialized){this._initialized=!0;var p=wB(u,e,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(p)}this._data=s},t.prototype.incrementalPrepareRender=function(e,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=E0(n),u=this._progressiveEls=[],f=e.start;f<e.end;f++){var h=R0(a,this._dataGroup,f,s,o);h.incremental=!0,Wh(h,a,f,l),u.push(h)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t})(Vt);function wB(r,t,e){var n=r.model,i=r.getRect(),a=new _t({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),zt(a,{shape:{width:i.width,height:i.height}},t,e),a}function _w(r,t,e,n){for(var i=[],a=0;a<e.length;a++){var o=e[a],s=r.get(r.mapDimension(o),t);TB(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function R0(r,t,e,n,i){var a=_w(r,e,n,i),o=new fr({shape:{points:a},z2:10});return t.add(o),r.setItemGraphicEl(e,o),o}function E0(r){var t=r.get("smooth",!0);return t===!0&&(t=xB),t=Fo(t),Wr(t)&&(t=0),{smooth:t}}function Wh(r,t,e,n){r.useStyle(t.getItemVisual(e,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var i=t.getItemModel(e),a=i.getModel("emphasis");De(r,i,"lineStyle"),ne(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function TB(r,t){return t==="category"?r==null:r==null||isNaN(r)}var CB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.getInitialData=function(e,n){return Ni(null,this,{useEncodeDefaulter:Y(MB,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){e===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})(Yt);function MB(r){var t=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(t){var e={};return M(t.dimensions,function(n){var i=AB(n);e[n]=i}),e}}function AB(r){return+r.replace("dim","")}var DB=["lineStyle","opacity"],IB={seriesType:"parallel",reset:function(r,t){var e=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,a){e.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(DB,!0);u!=null&&(l=u)}var f=a.ensureUniqueItemVisual(s,"style");f.opacity=l},i.start,i.end)}}}};function LB(r){PB(r),RB(r)}function PB(r){if(!r.parallel){var t=!1;M(r.series,function(e){e&&e.type==="parallel"&&(t=!0)}),t&&(r.parallel=[{}])}}function RB(r){var t=Ut(r.parallelAxis);M(t,function(e){if(j(e)){var n=e.parallelIndex||0,i=Ut(r.parallel)[n];i&&i.parallelAxisDefault&&ft(e,i.parallelAxisDefault,!1)}})}var EB=5,kB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){this._model=e,this._api=i,this._handlers||(this._handlers={},M(OB,function(a,o){i.getZr().on(o,this._handlers[o]=Y(a,this))},this)),Ss(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,n){qo(this,"_throttledDispatchExpand"),M(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(F({type:"parallelAxisExpand"},e))},t.type="parallel",t})($t),OB={mousedown:function(r){Uh(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var t=this._mouseDownPoint;if(Uh(this,"click")&&t){var e=[r.offsetX,r.offsetY],n=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2);if(n>EB)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Uh(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=e.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function Uh(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var BB=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var n=this.option;e&&ft(n,e,!0),this._initDimensions()},t.prototype.contains=function(e,n){var i=e.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},t.prototype.setAxisExpand=function(e){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){e.hasOwnProperty(n)&&(this.option[n]=e[n])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[],i=kt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);M(i,function(a){e.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})(mt),NB=(function(r){B(t,r);function t(e,n,i,a,o){var s=r.call(this,e,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})(ip);function Pn(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=ea(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=ea(s,[0,o]),i=a=ea(s,[i,a]),n=0}t[0]=ea(t[0],e),t[1]=ea(t[1],e);var l=Yh(t,n);t[n]+=r;var u=i||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=ea(t[n],f);var h;return h=Yh(t,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-n]=t[n]+l.sign*i),h=Yh(t,n),a!=null&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t}function Yh(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function ea(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Zh=M,Sw=Math.min,xw=Math.max,k0=Math.floor,zB=Math.ceil,O0=Xt,VB=Math.PI,FB=(function(){function r(t,e,n){this.type="parallel",this._axesMap=it(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return r.prototype._init=function(t,e,n){var i=t.dimensions,a=t.parallelAxisIndex;Zh(i,function(o,s){var l=a[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new NB(o,s1(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],s=t[a];return o>=n&&o<=n+e.axisLength&&s>=i&&s<=i+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var i=n.getData();Zh(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),vv(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var n=Ie(t,e).refContainer;this._rect=ie(t.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,n=["x","y"],i=["width","height"],a=t.get("layout"),o=a==="horizontal"?0:1,s=e[i[o]],l=[0,s],u=this.dimensions.length,f=_l(t.get("axisExpandWidth"),l),h=_l(t.get("axisExpandCount")||0,[0,u]),v=t.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=t.get("axisExpandWindow"),d;if(c)d=_l(c[1]-c[0],l),c[1]=c[0]+d;else{d=_l(f*(h-1),l);var p=t.get("axisExpandCenter")||k0(u/2);c=[f*p-d/2],c[1]=c[0]+d}var g=(s-d)/(u-h);g<3&&(g=0);var y=[k0(O0(c[0]/f,1))+1,zB(O0(c[1]/f,1))-1],m=g/f*c[0];return{layout:a,pixelDimIndex:o,layoutBase:e[n[o]],layoutLength:s,axisBase:e[n[1-o]],axisLength:e[i[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;e.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Zh(n,function(o,s){var l=(i.axisExpandable?HB:GB)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},f={horizontal:VB/2,vertical:0},h=[u[a].x+t.x,u[a].y+t.y],v=f[a],c=Fe();zu(c,c,v),_a(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,n,i){n==null&&(n=0),i==null&&(i=t.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];M(o,function(g){s.push(t.mapDimension(g)),l.push(a.get(g).model)});for(var u=this.hasAxisBrushed(),f=n;f<i;f++){var h=void 0;if(!u)h="normal";else{h="active";for(var v=t.getValues(s,f),c=0,d=o.length;c<d;c++){var p=l[c].getActiveState(v[c]);if(p==="inactive"){h="inactive";break}}}e(h,f)}},r.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,a=t.length;i<a;i++)e.get(t[i]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(t,e){var n=this._axesLayout[e];return Yr([t,0],n.transform)},r.prototype.getAxisLayout=function(t){return J(this._axesLayout[t])},r.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l,u="slide",f=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),v=h[0]!=null;if(f)v&&f&&s<a*h[0]?(u="jump",l=s-a*h[2]):v&&f&&s>a*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?Pn(l,i,o,"all"):u="none";else{var c=i[1]-i[0],d=o[1]*s/c;i=[xw(0,d-c/2)],i[1]=Sw(o[1],i[0]+c),i[0]=i[1]-c}return{axisExpandWindow:i,behavior:u}},r})();function _l(r,t){return Sw(xw(r,t[0]),t[1])}function GB(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function HB(r,t){var e=t.layoutLength,n=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,l=a,u=!1,f;return r<o[0]?(s=r*a,f=a):r<=o[1]?(s=t.axisExpandWindow0Pos+r*n-t.axisExpandWindow[0],l=n,u=!0):(s=e-(i-1-r)*a,f=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:f}}function WB(r,t){var e=[];return r.eachComponent("parallel",function(n,i){var a=new FB(n,r,t);a.name="parallel_"+i,a.resize(n,t),n.coordinateSystem=a,a.model=n,e.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",ee).models[0];n.coordinateSystem=i.coordinateSystem}}),e}var UB={create:WB},Iv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return t.prototype.getAreaSelectStyle=function(){return Di([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var n=this.activeIntervals=J(e);if(n)for(var i=n.length-1;i>=0;i--)Fr(n[i])},t.prototype.getActiveState=function(e){var n=this.activeIntervals;if(!n.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=e&&e<=n[a][1])return"active";return"inactive"},t})(mt);fe(Iv,np);var Ri=!0,as=Math.min,Aa=Math.max,YB=Math.pow,ZB=1e4,XB=6,$B=6,B0="globalPan",qB={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},KB={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},N0={brushStyle:{lineWidth:2,stroke:N.color.backgroundTint,fill:N.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},QB=0,bw=(function(r){B(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new yt,n._uid="brushController_"+QB++,M(iN,function(i,a){this._handlers[a]=Y(i,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||jk(n,B0,this._uid),M(this._handlers,function(i,a){n.on(a,i)}),this._brushType=e.brushType,this._brushOption=ft(J(N0),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;Jk(e,B0,this._uid),M(this._handlers,function(n,i){e.off(i,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};M(e,function(i){n[i.panelId]=J(i)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=U(e,function(v){return ft(J(N0),v,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new xs(i,e,u,l).add(f).update(f).remove(h).execute(),this;function l(v,c){return(v.id!=null?v.id:n+c)+"-"+v.brushType}function u(v,c){return l(v.__brushOption,c)}function f(v,c){var d=e[v];if(c!=null&&i[c]===s)a[v]=i[c];else{var p=a[v]=c!=null?(i[c].__brushOption=d,i[c]):Tw(o,ww(o,d));xp(o,p)}}function h(v){i[v]!==s&&o.group.remove(i[v])}},t.prototype.unmount=function(){return this.enableBrush(!1),Lv(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t})(Ze);function ww(r,t){var e=hf[t.brushType].createCover(r,t);return e.__brushOption=t,Mw(e,t),r.group.add(e),e}function Tw(r,t){var e=bp(t);return e.endCreating&&(e.endCreating(r,t),Mw(t,t.__brushOption)),t}function Cw(r,t){var e=t.__brushOption;bp(t).updateCoverShape(r,t,e.range,e)}function Mw(r,t){var e=t.z;e==null&&(e=ZB),r.traverse(function(n){n.z=e,n.z2=e})}function xp(r,t){bp(t).updateCommon(r,t),Cw(r,t)}function bp(r){return hf[r.__brushOption.brushType]}function wp(r,t,e){var n=r._panels;if(!n)return Ri;var i,a=r._transform;return M(n,function(o){o.isTargetByCursor(t,e,a)&&(i=o)}),i}function Aw(r,t){var e=r._panels;if(!e)return Ri;var n=t.__brushOption.panelId;return n!=null?e[n]:Ri}function Lv(r){var t=r._covers,e=t.length;return M(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function Ei(r,t){var e=U(r._covers,function(n){var i=n.__brushOption,a=J(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function jB(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],i=e[0]-n[0],a=e[1]-n[1],o=YB(i*i+a*a,.5);return o>XB}function Dw(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function Iw(r,t,e,n){var i=new yt;return i.add(new _t({name:"main",style:Tp(e),silent:!0,draggable:!0,cursor:"move",drift:at(z0,r,t,i,["n","s","w","e"]),ondragend:at(Ei,t,{isEnd:!0})})),M(n,function(a){i.add(new _t({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:at(z0,r,t,i,a),ondragend:at(Ei,t,{isEnd:!0})}))}),i}function Lw(r,t,e,n){var i=n.brushStyle.lineWidth||0,a=Aa(i,$B),o=e[0][0],s=e[1][0],l=o-i/2,u=s-i/2,f=e[0][1],h=e[1][1],v=f-a+i/2,c=h-a+i/2,d=f-o,p=h-s,g=d+i,y=p+i;Br(r,t,"main",o,s,d,p),n.transformable&&(Br(r,t,"w",l,u,a,y),Br(r,t,"e",v,u,a,y),Br(r,t,"n",l,u,g,a),Br(r,t,"s",l,c,g,a),Br(r,t,"nw",l,u,a,a),Br(r,t,"ne",v,u,a,a),Br(r,t,"sw",l,c,a,a),Br(r,t,"se",v,c,a,a))}function Pv(r,t){var e=t.__brushOption,n=e.transformable,i=t.childAt(0);i.useStyle(Tp(e)),i.attr({silent:!n,cursor:n?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?Rv(r,a[0]):tN(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?KB[s]+"-resize":null})})}function Br(r,t,e,n,i,a,o){var s=t.childOfName(e);s&&s.setShape(rN(Cp(r,t,[[n,i],[n+a,i+o]])))}function Tp(r){return gt({strokeNoScale:!0},r.brushStyle)}function Pw(r,t,e,n){var i=[as(r,e),as(t,n)],a=[Aa(r,e),Aa(t,n)];return[[i[0],a[0]],[i[1],a[1]]]}function JB(r){return bi(r.group)}function Rv(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Qu(e[t],JB(r));return n[i]}function tN(r,t){var e=[Rv(r,t[0]),Rv(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function z0(r,t,e,n,i,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=Rw(t,i,a);M(n,function(u){var f=qB[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(Pw(s[0][0],s[1][0],s[0][1],s[1][1])),xp(t,e),Ei(t,{isEnd:!1})}function eN(r,t,e,n){var i=t.__brushOption.range,a=Rw(r,e,n);M(i,function(o){o[0]+=a[0],o[1]+=a[1]}),xp(r,t),Ei(r,{isEnd:!1})}function Rw(r,t,e){var n=r.group,i=n.transformCoordToLocal(t,e),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function Cp(r,t,e){var n=Aw(r,t);return n&&n!==Ri?n.clipPath(e,r._transform):J(e)}function rN(r){var t=as(r[0][0],r[1][0]),e=as(r[0][1],r[1][1]),n=Aa(r[0][0],r[1][0]),i=Aa(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:i-e}}function nN(r,t,e){if(!(!r._brushType||aN(r,t.offsetX,t.offsetY))){var n=r._zr,i=r._covers,a=wp(r,t,e);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===Ri||s.panelId===a.panelId)&&hf[s.brushType].contain(i[o],e[0],e[1]))return}a&&n.setCursorStyle("crosshair")}}function Ev(r){var t=r.event;t.preventDefault&&t.preventDefault()}function kv(r,t,e){return r.childOfName("main").contain(t,e)}function Ew(r,t,e,n){var i=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),jB(r)||i){if(a&&!i){o.brushMode==="single"&&Lv(r);var l=J(o);l.brushType=V0(l.brushType,a),l.panelId=a===Ri?null:a.panelId,i=r._creatingCover=ww(r,l),r._covers.push(i)}if(i){var u=hf[V0(r._brushType,a)],f=i.__brushOption;f.range=u.getCreatingRange(Cp(r,i,r._track)),n&&(Tw(r,i),u.updateCommon(r,i)),Cw(r,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&wp(r,t,e)&&Lv(r)&&(s={isEnd:n,removeOnClick:!0});return s}function V0(r,t){return r==="auto"?t.defaultBrushType:r}var iN={mousedown:function(r){if(this._dragging)F0(this,r);else if(!r.target||!r.target.draggable){Ev(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=wp(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,n=this.group.transformCoordToLocal(t,e);if(nN(this,r,n),this._dragging){Ev(r);var i=Ew(this,r,n,!1);i&&Ei(this,i)}},mouseup:function(r){F0(this,r)}};function F0(r,t){if(r._dragging){Ev(t);var e=t.offsetX,n=t.offsetY,i=r.group.transformCoordToLocal(e,n),a=Ew(r,t,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&Ei(r,a)}}function aN(r,t,e){var n=r._zr;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var hf={lineX:G0(0),lineY:G0(1),rect:{createCover:function(r,t){function e(n){return n}return Iw({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=Dw(r);return Pw(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){Lw(r,t,e,n)},updateCommon:Pv,contain:kv},polygon:{createCover:function(r,t){var e=new yt;return e.add(new fr({name:"main",style:Tp(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ir({name:"main",draggable:!0,drift:at(eN,r,t),ondragend:at(Ei,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:Cp(r,t,e)})},updateCommon:Pv,contain:kv}};function G0(r){return{createCover:function(t,e){return Iw({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=Dw(t),n=as(e[0][r],e[1][r]),i=Aa(e[0][r],e[1][r]);return[n,i]},updateCoverShape:function(t,e,n,i){var a,o=Aw(t,e);if(o!==Ri&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),Lw(t,e,l,i)},updateCommon:Pv,contain:kv}}function kw(r){return r=Mp(r),function(t){return gx(t,r)}}function Ow(r,t){return r=Mp(r),function(e){var n=t??e,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function Bw(r,t,e){var n=Mp(r);return function(i,a){return n.contain(a[0],a[1])&&!ew(i,t,e)}}function Mp(r){return ot.create(r)}var oN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){r.prototype.init.apply(this,arguments),(this._brushController=new bw(n.getZr())).on("brush",Y(this._onBrush,this))},t.prototype.render=function(e,n,i,a){if(!sN(e,n,a)){this.axisModel=e,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new yt,this.group.add(this._axisGroup),!!e.get("show")){var s=uN(e,n),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,h=e.axis.dim,v=l.getAxisLayout(h),c=F({strokeContainThreshold:f},v),d=new Ar(e,i,c);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(c,u,e,s,f,i),_d(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=ot.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:kw(h),isTargetByCursor:Bw(h,s,a),getLinearBrushOtherExtent:Ow(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(lN(i))},t.prototype._onBrush=function(e){var n=e.areas,i=this.axisModel,a=i.axis,o=U(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})($t);function sN(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function lN(r){var t=r.axis;return U(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function uN(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var fN={type:"axisAreaSelect",event:"axisAreaSelected"};function hN(r){r.registerAction(fN,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(n){n.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(n){n.setAxisExpand(t)})})}var cN={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Nw(r){r.registerComponentView(kB),r.registerComponentModel(BB),r.registerCoordinateSystem("parallel",UB),r.registerPreprocessor(LB),r.registerComponentModel(Iv),r.registerComponentView(oN),Sv(r,"parallel",Iv,cN),hN(r)}function vN(r){ue(Nw),r.registerChartView(bB),r.registerSeriesModel(CB),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,IB)}var dN=(function(){function r(){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 r})(),pN=(function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new dN},t.prototype.buildPath=function(e,n){var i=n.extent;e.moveTo(n.x1,n.y1),e.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(e.lineTo(n.x2+i,n.y2),e.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(e.lineTo(n.x2,n.y2+i),e.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),e.closePath()},t.prototype.highlight=function(){Mn(this)},t.prototype.downplay=function(){An(this)},t})(bt),gN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new yt,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,n){this._controller=new pp(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,n,i){var a=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,f=l.height,h=e.getData(),v=e.getData("edge"),c=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,i),oO(e,i,s,this._controller,this._controllerHost),o.eachEdge(function(d){var p=new pN,g=vt(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),b=d.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),D=d.node2.getModel(),A=D.get("localX"),C=D.get("localY"),L=d.getLayout(),I,P,R,E,O,k,z,V;p.shape.extent=Math.max(1,L.dy),p.shape.orient=c,c==="vertical"?(I=(x!=null?x*u:S.x)+L.sy,P=(w!=null?w*f:S.y)+S.dy,R=(A!=null?A*u:T.x)+L.ty,E=C!=null?C*f:T.y,O=I,k=P*(1-_)+E*_,z=R,V=P*_+E*(1-_)):(I=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+L.sy,R=A!=null?A*u:T.x,E=(C!=null?C*f:T.y)+L.ty,O=I*(1-_)+R*_,k=P,z=I*_+R*(1-_),V=E),p.setShape({x1:I,y1:P,x2:R,y2:E,cpx1:O,cpy1:k,cpx2:z,cpy2:V}),p.useStyle(m.getItemStyle()),H0(p.style,c,d);var G=""+y.get("value"),W=Te(y,"edgeLabel");Ue(p,W,{labelFetcher:{getFormattedLabel:function(lt,Ct,Ot,ut,tt,pt){return e.getFormattedLabel(lt,Ct,"edge",ut,_n(tt,W.normal&&W.normal.get("formatter"),G),pt)}},labelDataIndex:d.dataIndex,defaultText:G}),p.setTextConfig({position:"inside"});var Z=y.getModel("emphasis");De(p,y,"lineStyle",function(lt){var Ct=lt.getItemStyle();return H0(Ct,c,d),Ct}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var rt=Z.get("focus");ne(p,rt==="adjacency"?d.getAdjacentDataIndices():rt==="trajectory"?d.getTrajectoryDataIndices():rt,Z.get("blurScope"),Z.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new _t({shape:{x:y!=null?y*u:p.x,y:m!=null?m*f:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Ue(b,Te(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),De(b,g),s.add(b),h.setItemGraphicEl(d.dataIndex,b),vt(b).dataType="node";var x=_.get("focus");ne(b,x==="adjacency"?d.getAdjacentDataIndices():x==="trajectory"?d.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(d,p){var g=h.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:h.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){a._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(yN(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,n){var i=e.layoutInfo,a=i.width,o=i.height,s=e.coordinateSystem=new lO(null,{api:n,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t})(Vt);function H0(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var n=e.node1.getVisual("color"),i=e.node2.getVisual("color");X(n)&&X(i)&&(r.fill=new Ku(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function yN(r,t,e){var n=new _t({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return zt(n,{shape:{width:r.width+20}},t,e),n}var mN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){var i=e.edges||e.links||[],a=e.data||e.nodes||[],o=e.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 Dt(o[l],this,n));var u=oB(a,i,this,!0,f);return u.data;function f(h,v){h.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(c.parentModel=m)}return c}),v.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(c.parentModel=_)}return c})}},t.prototype.setNodePosition=function(e,n){var i=this.option.data||this.option.nodes,a=i[e];a.localX=n[0],a.localY=n[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,n,i){function a(c){return isNaN(c)||c==null}if(i==="edge"){var o=this.getDataParams(e,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ye("nameValue",{name:u,value:l,noValue:a(l)})}else{var f=this.getGraph().getNodeByIndex(e),h=f.getLayout().value,v=this.getDataParams(e,i).data.name;return Ye("nameValue",{name:v!=null?v+"":null,value:h,noValue:a(h)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,n){var i=r.prototype.getDataParams.call(this,e,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(e),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:N.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:N.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(Yt);function _N(r,t){r.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=Ie(e,t).refContainer,o=ie(e.getBoxLayoutParams(),a);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,h=u.edges;xN(f);var v=kt(f,function(g){return g.getLayout().value===0}),c=v.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");SN(f,h,n,i,s,l,c,d,p)})}function SN(r,t,e,n,i,a,o,s,l){bN(r,t,e,i,a,s,l),MN(r,t,a,i,n,o,s),ON(r,s)}function xN(r){M(r,function(t){var e=wn(t.outEdges,Au),n=wn(t.inEdges,Au),i=t.getValue()||0,a=Math.max(e,n,i);t.setLayout({value:a},!0)})}function bN(r,t,e,n,i,a,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v<t.length;v++)s[v]=1;for(var v=0;v<r.length;v++)l[v]=r[v].inEdges.length,l[v]===0&&u.push(r[v]);for(var c=-1;u.length;){for(var d=0;d<u.length;d++){var p=u[d],g=p.hostGraph.data.getRawDataItem(p.dataIndex),y=g.depth!=null&&g.depth>=0;y&&g.depth>c&&(c=g.depth),p.setLayout({depth:y?g.depth:h},!0),a==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;m<p.outEdges.length;m++){var _=p.outEdges[m],S=t.indexOf(_);s[S]=0;var b=_.node2,x=r.indexOf(b);--l[x]===0&&f.indexOf(b)<0&&f.push(b)}}++h,u=f,f=[]}for(var v=0;v<s.length;v++)if(s[v]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=c>h-1?c:h-1;o&&o!=="left"&&wN(r,o,a,w);var T=a==="vertical"?(i-e)/w:(n-e)/w;CN(r,T,a)}function zw(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function wN(r,t,e,n){if(t==="right"){for(var i=[],a=r,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 f=l.inEdges[u];i.indexOf(f.node1)<0&&i.push(f.node1)}}a=i,i=[],++o}M(r,function(h){zw(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else t==="justify"&&TN(r,n)}function TN(r,t){M(r,function(e){!zw(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function CN(r,t,e){M(r,function(n){var i=n.getLayout().depth*t;e==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function MN(r,t,e,n,i,a,o){var s=AN(r,o);DN(s,t,e,n,i,o),Xh(s,i,e,n,o);for(var l=1;a>0;a--)l*=.99,IN(s,l,o),Xh(s,i,e,n,o),kN(s,l,o),Xh(s,i,e,n,o)}function AN(r,t){var e=[],n=t==="vertical"?"y":"x",i=QM(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),M(i.keys,function(a){e.push(i.buckets.get(a))}),e}function DN(r,t,e,n,i,a){var o=1/0;M(r,function(s){var l=s.length,u=0;M(s,function(h){u+=h.getLayout().value});var f=a==="vertical"?(n-(l-1)*i)/u:(e-(l-1)*i)/u;f<o&&(o=f)}),M(r,function(s){M(s,function(l,u){var f=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:f},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:f},!0))})}),M(t,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function Xh(r,t,e,n,i){var a=i==="vertical"?"x":"y";M(r,function(o){o.sort(function(p,g){return p.getLayout()[a]-g.getLayout()[a]});for(var s,l,u,f=0,h=o.length,v=i==="vertical"?"dx":"dy",c=0;c<h;c++)l=o[c],u=f-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]+l.getLayout()[v]+t;var d=i==="vertical"?n:e;if(u=f-t-d,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[a]+l.getLayout()[v]+t-f,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[a]}})}function IN(r,t,e){M(r.slice().reverse(),function(n){M(n,function(i){if(i.outEdges.length){var a=wn(i.outEdges,LN,e)/wn(i.outEdges,Au);if(isNaN(a)){var o=i.outEdges.length;a=o?wn(i.outEdges,PN,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(a-Rn(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Rn(i,e))*t;i.setLayout({y:l},!0)}}})})}function LN(r,t){return Rn(r.node2,t)*r.getValue()}function PN(r,t){return Rn(r.node2,t)}function RN(r,t){return Rn(r.node1,t)*r.getValue()}function EN(r,t){return Rn(r.node1,t)}function Rn(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Au(r){return r.getValue()}function wn(r,t,e){for(var n=0,i=r.length,a=-1;++a<i;){var o=+t(r[a],e);isNaN(o)||(n+=o)}return n}function kN(r,t,e){M(r,function(n){M(n,function(i){if(i.inEdges.length){var a=wn(i.inEdges,RN,e)/wn(i.inEdges,Au);if(isNaN(a)){var o=i.inEdges.length;a=o?wn(i.inEdges,EN,e)/o:0}if(e==="vertical"){var s=i.getLayout().x+(a-Rn(i,e))*t;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Rn(i,e))*t;i.setLayout({y:l},!0)}}})})}function ON(r,t){var e=t==="vertical"?"x":"y";M(r,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[e]-a.node2.getLayout()[e]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[e]-a.node1.getLayout()[e]})}),M(r,function(n){var i=0,a=0;M(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),M(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function BN(r){r.eachSeriesByType("sankey",function(t){var e=t.getGraph(),n=e.nodes,i=e.edges;if(n.length){var a=1/0,o=-1/0;M(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),M(n,function(s){var l=new Qt({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&M(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function NN(r){r.registerChartView(gN),r.registerSeriesModel(mN),r.registerLayout(_N),r.registerVisual(BN),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){n.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,n){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(i){var a=i.coordinateSystem,o=sO(a,t,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var zN=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,i=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.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"],f=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],v=u[1-f],c=[i,a],d=c[f].get("type"),p=c[1-f].get("type"),g=t.data;if(g&&l){var y=[];M(g,function(S,b){var x;H(S)?(x=S.slice(),S.unshift(b)):H(S.value)?(x=F({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:lv(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:lv(p),dimsDef:m.slice()}];return bs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:at(Wx,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),Vw=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}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:N.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}},animationDuration:800},t})(Yt);fe(Vw,zN,!0);var VN=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var f=a.getItemLayout(u),h=W0(f,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!a.hasValue(u)){o.remove(h);return}var v=a.getItemLayout(u);h?(qr(h),Fw(v,h,a,u)):h=W0(v,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=a},t.prototype.remove=function(e){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},t.type="boxplot",t})(Vt),FN=(function(){function r(){}return r})(),GN=(function(r){B(t,r);function t(e){var n=r.call(this,e)||this;return n.type="boxplotBoxPath",n}return t.prototype.getDefaultShape=function(){return new FN},t.prototype.buildPath=function(e,n){var i=n.points,a=0;for(e.moveTo(i[a][0],i[a][1]),a++;a<4;a++)e.lineTo(i[a][0],i[a][1]);for(e.closePath();a<i.length;a++)e.moveTo(i[a][0],i[a][1]),a++,e.lineTo(i[a][0],i[a][1])},t})(bt);function W0(r,t,e,n,i){var a=r.ends,o=new GN({shape:{points:i?HN(a,n,r):a}});return Fw(r,o,t,e,i),o}function Fw(r,t,e,n,i){var a=e.hostModel,o=wd[i?"initProps":"updateProps"];o(t,{shape:{points:r.ends}},a,n),t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.z2=100;var s=e.getItemModel(n),l=s.getModel("emphasis");De(t,s),ne(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function HN(r,t,e){return U(r,function(n){return n=n.slice(),n[t]=e.initBaseline,n})}var Oo=M;function WN(r){var t=UN(r);Oo(t,function(e){var n=e.seriesModels;n.length&&(YN(e),Oo(n,function(i,a){ZN(i,e.boxOffsetList[a],e.boxWidthList[a])}))})}function UN(r){var t=[],e=[];return r.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=dt(e,i);a<0&&(a=e.length,e[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(n)}),t}function YN(r){var t=r.axis,e=r.seriesModels,n=e.length,i=r.boxWidthList=[],a=r.boxOffsetList=[],o=[],s;if(t.type==="category")s=t.getBandWidth();else{var l=0;Oo(e,function(d){l=Math.max(l,d.getData().count())});var u=t.getExtent();s=Math.abs(u[1]-u[0])/l}Oo(e,function(d){var p=d.get("boxWidth");H(p)||(p=[p,p]),o.push([q(p[0],s)||0,q(p[1],s)||0])});var f=s*.8-2,h=f/n*.3,v=(f-h*(n-1))/n,c=v/2-f/2;Oo(e,function(d,p){a.push(c),c+=h+v,i.push(Math.min(Math.max(v,o[p][0]),o[p][1]))})}function ZN(r,t,e){var n=r.coordinateSystem,i=r.getData(),a=e/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),f=i.mapDimensionsAll(l[s]);if(u==null||f.length<5)return;for(var h=0;h<i.count();h++){var v=i.get(u,h),c=_(v,f[2],h),d=_(v,f[0],h),p=_(v,f[1],h),g=_(v,f[3],h),y=_(v,f[4],h),m=[];S(m,p,!1),S(m,g,!0),m.push(d,p,y,g),b(m,d),b(m,y),b(m,c),i.setItemLayout(h,{initBaseline:c[s],ends:m})}function _(x,w,T){var D=i.get(w,T),A=[];A[o]=x,A[s]=D;var C;return isNaN(x)||isNaN(D)?C=[NaN,NaN]:(C=n.dataToPoint(A),C[o]+=t),C}function S(x,w,T){var D=w.slice(),A=w.slice();D[o]+=a,A[o]-=a,T?x.push(D,A):x.push(A,D)}function b(x,w){var T=w.slice(),D=w.slice();T[o]-=a,D[o]+=a,x.push(T,D)}}function XN(r,t){t=t||{};for(var e=[],n=[],i=t.boundIQR,a=i==="none"||i===0,o=0;o<r.length;o++){var s=Fr(r[o].slice()),l=Ff(s,.25),u=Ff(s,.5),f=Ff(s,.75),h=s[0],v=s[s.length-1],c=(i??1.5)*(f-l),d=a?h:Math.max(h,l-c),p=a?v:Math.min(v,f+c),g=t.itemNameFormatter,y=Q(g)?g({value:o}):X(g)?g.replace("{value}",o+""):o+"";e.push([y,d,l,u,f,p]);for(var m=0;m<s.length;m++){var _=s[m];if(_<d||_>p){var S=[y,_];n.push(S)}}}return{boxData:e,outliers:n}}var $N={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==ae){var n="";de(n)}var i=XN(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function qN(r){r.registerSeriesModel(Vw),r.registerChartView(VN),r.registerLayout(WN),r.registerTransform($N)}var KN=256,QN=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=or.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),c=t.length;h.width=e,h.height=n;for(var d=0;d<c;++d){var p=t[d],g=p[0],y=p[1],m=p[2],_=i(m);v.globalAlpha=_,v.drawImage(s,g-f,y-f)}if(!h.width||!h.height)return h;for(var S=v.getImageData(0,0,h.width,h.height),b=S.data,x=0,w=b.length,T=this.minOpacity,D=this.maxOpacity,A=D-T;x<w;){var _=b[x+3]/256,C=Math.floor(_*(KN-1))*4;if(_>0){var L=o(_)?l:u;_>0&&(_=_*A+T),b[x++]=L[C],b[x++]=L[C+1],b[x++]=L[C+2],b[x++]=L[C+3]*_*256}else x+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=or.createCanvas()),e=this.pointSize+this.blurSize,n=e*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=N.color.neutral99,i.beginPath(),i.arc(-e,e,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),t},r.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r})();function jN(r,t,e){var n=r[1]-r[0];t=U(t,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[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&&e[s]}}function JN(r,t){var e=r[1]-r[0];return t=[(t[0]-r[0])/e,(t[1]-r[0])/e],function(n){return n>=t[0]&&n<=t[1]}}function U0(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var tz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,i,0,e.getData().count()):U0(o)&&this._renderOnGeo(o,e,a,i)},t.prototype.incrementalPrepareRender=function(e,n,i){this.group.removeAll()},t.prototype.incrementalRender=function(e,n,i,a){var o=n.coordinateSystem;o&&(U0(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Oa(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,n,i,a,o){var s=e.coordinateSystem,l=Ma(s,"cartesian2d"),u=Ma(s,"matrix"),f,h,v,c;if(l){var d=s.getAxis("x"),p=s.getAxis("y");f=d.getBandWidth()+.5,h=p.getBandWidth()+.5,v=d.scale.getExtent(),c=p.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),x=Te(e),w=e.getModel("emphasis"),T=w.get("focus"),D=w.get("blurScope"),A=w.get("disabled"),C=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],L=i;L<a;L++){var I=void 0,P=y.getItemVisual(L,"style");if(l){var R=y.get(C[0],L),E=y.get(C[1],L);if(isNaN(y.get(C[2],L))||isNaN(R)||isNaN(E)||R<v[0]||R>v[1]||E<c[0]||E>c[1])continue;var O=s.dataToPoint([R,E]);I=new _t({shape:{x:O[0]-f/2,y:O[1]-h/2,width:f,height:h},style:P})}else if(u){var k=s.dataToLayout([y.get(C[0],L),y.get(C[1],L)]).rect;if(Wr(k.x))continue;I=new _t({z2:1,shape:k,style:P})}else{if(isNaN(y.get(C[1],L)))continue;var z=s.dataToLayout([y.get(C[0],L)]),k=z.contentRect||z.rect;if(Wr(k.x)||Wr(k.y))continue;I=new _t({z2:1,shape:k,style:P})}if(y.hasItemOption){var V=y.getItemModel(L),G=V.getModel("emphasis");m=G.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),T=G.get("focus"),D=G.get("blurScope"),A=G.get("disabled"),x=Te(V)}I.shape.r=b;var W=e.getRawValue(L),Z="-";W&&W[2]!=null&&(Z=W[2]+""),Ue(I,x,{labelFetcher:e,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:Z}),I.ensureState("emphasis").style=m,I.ensureState("blur").style=_,I.ensureState("select").style=S,ne(I,T,D,A),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),g.add(I),y.setItemGraphicEl(L,I),this._progressiveEls&&this._progressiveEls.push(I)}},t.prototype._renderOnGeo=function(e,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new QN;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=e.getViewRect().clone(),h=e.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),c=Math.max(f.y,0),d=Math.min(f.width+f.x,a.getWidth()),p=Math.min(f.height+f.y,a.getHeight()),g=d-v,y=p-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,D){var A=e.dataToPoint([w,T]);return A[0]-=v,A[1]-=c,A.push(D),A}),S=i.getExtent(),b=i.type==="visualMap.continuous"?JN(S,i.option.range):jN(S,i.getPieceList(),i.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new Xe({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(x)},t.type="heatmap",t})(Vt),ez=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Ni(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=_s.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.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:N.color.primary}}},t})(Yt);function rz(r){r.registerChartView(tz),r.registerSeriesModel(ez)}var nz=2,iz=4,Y0=(function(r){B(t,r);function t(e,n,i,a){var o=r.call(this)||this;o.z2=nz,o.textConfig={inside:!0},vt(o).seriesIndex=n.seriesIndex;var s=new Tt({z2:iz,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,n,i,a),o}return t.prototype.updateData=function(e,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;vt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),h=F({},f);h.label=null;var v=n.getVisual("style");v.lineJoin="bevel";var c=n.getVisual("decal");c&&(v.decal=vu(c,o));var d=yi(l.getModel("itemStyle"),h,!0);F(h,d),M(ye,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=yi(S,h);b&&(_.shape=b)}),e?(s.setShape(h),s.shape.r=f.r0,zt(s,{shape:{r:f.r}},i,n.dataIndex)):(Et(s,{shape:h},i),qr(s)),s.useStyle(v),this._updateLabel(i);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var g=u.get("focus"),y=g==="relative"?iS(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;ne(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){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),f=Math.sin(l),h=this,v=h.getTextContent(),c=this.node.dataIndex,d=a.get("minAngle")/180*Math.PI,p=a.get("show")&&!(d!=null&&Math.abs(s)<d);v.ignore=!p,M(Wo,function(y){var m=y==="normal"?i.getModel("label"):i.getModel([y,"label"]),_=y==="normal",S=_?v:v.ensureState(y),b=e.getFormattedLabel(c,y);_&&(b=b||n.node.name),S.style=Wt(m,{},null,y!=="normal",!0),b&&(S.style.text=b);var x=m.get("show");x!=null&&!_&&(S.ignore=!x);var w=g(m,"position"),T=_?h:h.states[y],D=T.style.fill;T.textConfig={outsideFill:m.get("color")==="inherit"?D:null,inside:w!=="outside"};var A,C=g(m,"distance")||0,L=g(m,"align"),I=g(m,"rotate"),P=Math.PI*.5,R=Math.PI*1.5,E=dn(I==="tangential"?Math.PI/2-l:l),O=E>P&&!Vo(E-P)&&E<R;w==="outside"?(A=o.r+C,L=O?"right":"left"):!L||L==="center"?(s===2*Math.PI&&o.r0===0?A=0:A=(o.r+o.r0)/2,L="center"):L==="left"?(A=o.r0+C,L=O?"right":"left"):L==="right"&&(A=o.r-C,L=O?"left":"right"),S.style.align=L,S.style.verticalAlign=g(m,"verticalAlign")||"middle",S.x=A*u+o.cx,S.y=A*f+o.cy;var k=0;I==="radial"?k=dn(-l)+(O?Math.PI:0):I==="tangential"?k=dn(Math.PI/2-l)+(O?Math.PI:0):xt(I)&&(k=I*Math.PI/180),S.rotation=dn(k)});function g(y,m){var _=y.get(m);return _??a.get(m)}v.dirtyStyle()},t})(sr),Ov="sunburstRootToNode",Z0="sunburstHighlight",az="sunburstUnhighlight";function oz(r){r.registerAction({type:Ov,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},n);function n(i,a){var o=rs(t,[Ov],i);if(o){var s=i.getViewRoot();s&&(t.direction=mp(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:Z0,update:"none"},function(t,e,n){t=F({},t),e.eachComponent({mainType:"series",subType:"sunburst",query:t},i);function i(a){var o=rs(t,[Z0],a);o&&(t.dataIndex=o.node.dataIndex)}n.dispatchAction(F(t,{type:"highlight"}))}),r.registerAction({type:az,update:"updateView"},function(t,e,n){t=F({},t),n.dispatchAction(F(t,{type:"downplay"}))})}var sz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i,a){var o=this;this.seriesModel=e,this.api=i,this.ecModel=n;var s=e.getData(),l=s.tree.root,u=e.getViewRoot(),f=this.group,h=e.get("renderLabelForZeroData"),v=[];u.eachNode(function(m){v.push(m)});var c=this._oldChildren||[];d(v,c),y(l,u),this._initEvents(),this._oldChildren=v;function d(m,_){if(m.length===0&&_.length===0)return;new xs(_,m,S,S).add(b).update(b).remove(at(b,null)).execute();function S(x){return x.getId()}function b(x,w){var T=x==null?null:m[x],D=w==null?null:_[w];p(T,D)}}function p(m,_){if(!h&&m&&!m.getValue()&&(m=null),m!==l&&_!==l){if(_&&_.piece)m?(_.piece.updateData(!1,m,e,n,i),s.setItemGraphicEl(m.dataIndex,_.piece)):g(_);else if(m){var S=new Y0(m,e,n,i);f.add(S),s.setItemGraphicEl(m.dataIndex,S)}}}function g(m){m&&m.piece&&(f.remove(m.piece),m.piece=null)}function y(m,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,n,i):(o.virtualPiece=new Y0(m,e,n,i),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=e.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";su(u,f)}}i=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Ov,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="sunburst",t})(Vt),lz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,n){var i={name:e.name,children:e.data};Gw(i);var a=this._levelModels=U(e.levels||[],function(l){return new Dt(l,this,n)},this),o=aw.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=a[h.depth];return v&&(u.parentModel=v),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=_p(i,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var n=this.getRawData().tree.root;(!e||e!==n&&!n.contains(e))&&(this._viewRoot=n)},t.prototype.enableAriaDecal=function(){sw(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})(Yt);function Gw(r){var t=0;M(r.children,function(n){Gw(n);var i=n.value;H(i)&&(i=i[0]),t+=i});var e=r.value;H(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),H(r.value)?r.value[0]=e:r.value=e}var X0=Math.PI/180;function uz(r,t,e){t.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");H(a)||(a=[0,a]),H(i)||(i=[i,i]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=q(i[0],o),f=q(i[1],s),h=q(a[0],l/2),v=q(a[1],l/2),c=-n.get("startAngle")*X0,d=n.get("minAngle")*X0,p=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&Hw(g,m);var _=0;M(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-h)/(w||1),D=n.get("clockwise"),A=n.get("stillShowZeroSum"),C=D?1:-1,L=function(E,O){if(E){var k=O;if(E!==p){var z=E.getValue(),V=S===0&&A?b:z*b;V<d&&(V=d),k=O+C*V;var G=E.depth-y-(x?-1:1),W=h+T*G,Z=h+T*(G+1),rt=n.getLevelModel(E);if(rt){var lt=rt.get("r0",!0),Ct=rt.get("r",!0),Ot=rt.get("radius",!0);Ot!=null&&(lt=Ot[0],Ct=Ot[1]),lt!=null&&(W=q(lt,l/2)),Ct!=null&&(Z=q(Ct,l/2))}E.setLayout({angle:V,startAngle:O,endAngle:k,clockwise:D,cx:u,cy:f,r0:W,r:Z})}if(E.children&&E.children.length){var ut=0;M(E.children,function(tt){ut+=L(tt,O+ut)})}return k-O}};if(x){var I=h,P=h+T,R=Math.PI*2;p.setLayout({angle:R,startAngle:c,endAngle:c+R,clockwise:D,cx:u,cy:f,r0:I,r:P})}L(g,c)})}function Hw(r,t){var e=r.children||[];r.children=fz(e,t),e.length&&M(r.children,function(n){Hw(n,t)})}function fz(r,t){if(Q(t)){var e=U(r,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 e.sort(function(i,a){return t(i.params,a.params)}),U(e,function(i){return r[i.index]})}else{var n=t==="asc";return r.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 hz(r){var t={};function e(n,i,a){if(n.depth===0)return N.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&&X(s)&&(s=mc(s,(n.depth-1)/(a-1)*.5)),s}r.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=e(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");F(u,l)})})}function cz(r){r.registerChartView(sz),r.registerSeriesModel(lz),r.registerLayout(at(uz,"sunburst")),r.registerProcessor(at(uf,"sunburst")),r.registerVisual(hz),oz(r)}var fi=wt(),$0=J,$h=Y,vz=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,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,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new yt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var v=at(q0,e,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,e)}Q0(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.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=cp(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=fi(t).pointerEl=new wd[a.type]($0(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=fi(t).labelEl=new Tt($0(e.label));t.add(a),K0(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=fi(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=fi(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),K0(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.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=ju(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){$r(u.event)},onmousedown:$h(this._onHandleDragMove,this,0,0),drift:$h(this._onHandleDragMove,this),ondragend:$h(this._onHandleDragEnd,this)}),n.add(i)),Q0(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");H(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Ss(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){q0(this._axisPointerModel,!e&&this._moveAnimation,this._handle,qh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(qh(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(qh(i)),fi(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),qo(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r})();function q0(r,t,e,n){Ww(fi(e).lastProp,n)||(fi(e).lastProp=n,t?Et(e,n,r):(e.stopAnimation(),e.attr(n)))}function Ww(r,t){if(j(r)&&j(t)){var e=!0;return M(t,function(n,i){e=e&&Ww(r[i],n)}),!!e}else return r===t}function K0(r,t){r[t.get(["label","show"])?"show":"hide"]()}function qh(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function Q0(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}function dz(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function pz(r,t,e,n,i){var a=e.get("value"),o=Uw(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=ms(s.get("padding")||0),u=s.getFont(),f=nd(o,u),h=i.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],d=i.align;d==="right"&&(h[0]-=v),d==="center"&&(h[0]-=v/2);var p=i.verticalAlign;p==="bottom"&&(h[1]-=c),p==="middle"&&(h[1]-=c/2),gz(h,v,c,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Wt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function gz(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Uw(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:gu(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};M(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),X(o)?a=o.replace("{value}",a):Q(o)&&(a=o(s))}return a}function Yw(r,t,e){var n=Fe();return zu(n,n,e.rotation),_a(n,n,e.position),Yr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function yz(r,t,e,n,i,a){var o=Ar.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),pz(t,n,i,a,{position:Yw(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function mz(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function _z(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var Sz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=j0(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var v=dz(a),c=xz[u](s,h,f);c.style=v,e.graphicKey=c.type,e.pointer=c}var d=bu(l.getRect(),i);yz(n,e,d,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=bu(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=Yw(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=j0(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:c,tooltipOption:d[f]}},t})(vz);function j0(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var xz={line:function(r,t,e){var n=mz([t,e[0]],[t,e[1]],J0(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:_z([t-n/2,e[0]],[n,i],J0(r))}}};function J0(r){return r.dim==="x"?0:1}var bz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}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:N.color.border,width:1,type:"dashed"},shadowStyle:{color:N.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:N.color.neutral00,padding:[5,7,5,7],backgroundColor:N.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:N.color.accent40,throttle:40}},t})(mt),Hr=wt(),wz=M;function Zw(r,t,e){if(!ct.node){var n=t.getZr();Hr(n).records||(Hr(n).records={}),Tz(n,t);var i=Hr(n).records[r]||(Hr(n).records[r]={});i.handler=e}}function Tz(r,t){if(Hr(r).initialized)return;Hr(r).initialized=!0,e("click",at(t_,"click")),e("mousemove",at(t_,"mousemove")),e("globalout",Mz);function e(n,i){r.on(n,function(a){var o=Az(t);wz(Hr(r).records,function(s){s&&i(s,a,o.dispatchAction)}),Cz(o.pendings,t)})}}function Cz(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function Mz(r,t,e){r.handler("leave",null,e)}function t_(r,t,e,n){t.handler(r,e,n)}function Az(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function Bv(r,t){if(!ct.node){var e=t.getZr(),n=(Hr(e).records||{})[r];n&&(Hr(e).records[r]=null)}}var Dz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Zw("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(e,n){Bv("axisPointer",n)},t.prototype.dispose=function(e,n){Bv("axisPointer",n)},t.type="axisPointer",t})($t);function Xw(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Ai(a,r);if(o==null||o<0||H(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,d=a.mapDimension(v),p=[];p[c]=a.get(d,o),p[1-c]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(U(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var e_=wt();function Iz(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||Y(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Vl(i)&&(i=Xw({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Vl(i),u=a.axesInfo,f=s.axesInfo,h=n==="leave"||Vl(i),v={},c={},d={list:[],map:{}},p={showPointer:at(Pz,c),showTooltip:at(Rz,d)};M(s.coordSysMap,function(y,m){var _=l||y.containPoint(i);M(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=Bz(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(i)),T!=null&&r_(S,T,p,!1,v)}})});var g={};return M(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&M(_.axesInfo,function(S,b){var x=c[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,n_(S),n_(y)))),g[y.key]=w}})}),M(g,function(y,m){r_(f[m],y,p,!0,v)}),Ez(c,f,v),kz(d,i,r,o),Oz(f,o,e),v}}function r_(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=Lz(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function Lz(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return M(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,e);v=c.dataIndices,h=c.nestestValue}else{if(v=l.indicesOfNearest(n,f[0],r,e.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,i=h,a.length=0),M(v,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function Pz(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function Rz(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=es(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Ez(r,t,e){var n=e.axesInfo=[];M(t,function(i,a){var o=i.axisPointerModel.option,s=r[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 kz(r,t,e,n){if(Vl(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function Oz(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=e_(n)[i]||{},o=e_(n)[i]={};M(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&M(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];M(a,function(u,f){!o[f]&&l.push(u)}),M(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Bz(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function n_(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function Vl(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function $w(r){z1.registerAxisPointerClass("CartesianAxisPointer",Sz),r.registerComponentModel(bz),r.registerComponentView(Dz),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!H(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=BE(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Iz)}function Nz(r){ue(G1),ue($w)}var i_=["x","y","radius","angle","single"],zz=["cartesian2d","polar","singleAxis"];function Vz(r){var t=r.get("coordinateSystem");return dt(zz,t)>=0}function mn(r){return r+"Axis"}function Fz(r,t){var e=it(),n=[],i=it();r.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(v,c){var d=e.get(v);d&&d[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(e.get(h)||e.set(h,[]))[v]=!0})}return n}function qw(r){var t=r.ecModel,e={infoList:[],infoMap:it()};return r.eachTargetAxis(function(n,i){var a=t.getComponent(mn(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var Kh=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),os=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,i){var a=a_(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=a_(e);ft(this.option,e,!0),ft(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;M([["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 e=this.get("orient",!0),n=this._targetAxisInfoMap=it(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return M(i_,function(i){var a=this.getReferringComponents(mn(i),$M);if(a.specified){n=!0;var o=new Kh;M(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,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(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var h=u[0];if(h){var v=new Kh;if(v.add(h.componentIndex),e.set(f,v),a=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",ee).models[0];c&&M(u,function(d){h.componentIndex!==d.componentIndex&&c===d.getReferringComponents("grid",ee).models[0]&&v.add(d.componentIndex)})}}}a&&M(i_,function(u){if(a){var f=i.findComponents({mainType:mn(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new Kh;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.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(e){var n=this._rangePropMode,i=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[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 e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(mn(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){M(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(mn(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;M([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;M(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__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})(mt);function a_(r){var t={};return M(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var Gz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(os),Ap=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i,a){this.dataZoomModel=e,this.ecModel=n,this.api=i},t.type="dataZoom",t})($t),Hz=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t})(Ap),aa=M,o_=Fr,Wz=(function(){function r(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(Vz(e)){var n=mn(this._dimName),i=e.getReferringComponents(n,ee).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return J(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;aa(["start","end"],function(v,c){var d=t[v],p=t[v+"Value"];a[c]==="percent"?(d==null&&(d=o[c]),p=i.parse(St(d,o,e))):(u=!0,p=p==null?e[c]:i.parse(p),d=St(p,e,o)),l[c]=p==null||isNaN(p)?e[c]:p,s[c]=d==null||isNaN(d)?o[c]:d}),o_(l),o_(s);var f=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(v,c,d,p,g){var y=g?"Span":"ValueSpan";Pn(0,v,d,"all",f["min"+y],f["max"+y]);for(var m=0;m<2;m++)c[m]=St(v[m],d,p,!0),g&&(c[m]=i.parse(c[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Uz(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;aa(i,function(l){var u=l.getData(),f=u.mapDimensionsAll(n);if(f.length){if(a==="weakFilter"){var h=u.getStore(),v=U(f,function(c){return u.getDimensionIndex(c)},u);u.filterSelf(function(c){for(var d,p,g,y=0;y<f.length;y++){var m=h.get(v[y],c),_=!isNaN(m),S=m<o[0],b=m>o[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(d=!0),b&&(p=!0)}return g&&d&&p})}else aa(f,function(c){if(a==="empty")l.setData(u=u.map(c,function(p){return s(p)?p:NaN}));else{var d={};d[c]=o,u.selectRange(d)}});aa(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;aa(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=St(n[0]+o,n,[0,100],!0):a!=null&&(o=St(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=IS(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r})();function Uz(r,t,e){var n=[1/0,-1/0];aa(e,function(o){_R(n,o.getData(),t)});var i=r.getAxisModel(),a=a1(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Yz={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(mn(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Wz(i,a,s,r),e.push(o.__dzAxisProxy))});var n=it();return M(e,function(i){M(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Zz(r){r.registerAction("dataZoom",function(t,e){var n=Fz(e,t);M(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var s_=!1;function Dp(r){s_||(s_=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Yz),Zz(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Xz(r){r.registerComponentModel(Gz),r.registerComponentView(Hz),Dp(r)}var rr=(function(){function r(){}return r})(),Kw={};function lo(r,t){Kw[r]=t}function Qw(r){return Kw[r]}var $z=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;M(this.option.feature,function(n,i){var a=Qw(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),ft(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:N.color.border,borderRadius:0,borderWidth:0,padding:N.size.m,itemSize:15,itemGap:N.size.s,showTitle:!0,iconStyle:{borderColor:N.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:N.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(mt);function jw(r,t){var e=ms(t.get("padding")),n=t.getItemStyle(["color","opacity"]);n.fill=t.get("backgroundColor");var i=new _t({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var qz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),h=[];M(u,function(m,_){h.push(_)}),new xs(this._featureNames||[],h).add(v).update(v).remove(at(v,null)).execute(),this._featureNames=h;function v(m,_){var S=h[m],b=h[_],x=u[S],w=new Dt(x,e,e.ecModel),T;if(a&&a.newTitle!=null&&a.featureName===S&&(x.title=a.newTitle),S&&!b){if(Kz(S))T={onclick:w.option.onclick,featureName:S};else{var D=Qw(S);if(!D)return;T=new D}f[S]=T}else if(T=f[b],!T)return;T.uid=ys("toolbox-feature"),T.model=w,T.ecModel=n,T.api=i;var A=T instanceof rr;if(!S&&b){A&&T.dispose&&T.dispose(n,i);return}if(!w.get("show")||A&&T.unusable){A&&T.remove&&T.remove(n,i);return}c(w,T,S),w.setIconStatus=function(C,L){var I=this.option,P=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[C]=L,P[C]&&(L==="emphasis"?Mn:An)(P[C])},T instanceof rr&&T.render&&T.render(w,n,i,a)}function c(m,_,S){var b=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),w=_ instanceof rr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},D,A;X(w)?(D={},D[S]=w):D=w,X(T)?(A={},A[S]=T):A=T;var C=m.iconPaths={};M(D,function(L,I){var P=ju(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var R=P.ensureState("emphasis");R.style=x.getItemStyle();var E=new Tt({style:{text:A[I],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:Sx({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},n)},ignore:!0});P.setTextContent(E),ps({el:P,componentModel:e,itemName:I,formatterParamsExtra:{title:A[I]}}),P.__title=A[I],P.on("mouseover",function(){var O=x.getItemStyle(),k=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:x.get("textFill")||O.fill||O.stroke||N.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||k}),E.ignore=!e.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",I])!=="emphasis"&&i.leaveEmphasis(this),E.hide()}),(m.get(["iconStatus",I])==="emphasis"?Mn:An)(P),o.add(P),P.on("click",Y(_.onclick,_,n,i,I)),C[I]=P})}var d=Ie(e,i).refContainer,p=e.getBoxLayoutParams(),g=e.get("padding"),y=ie(p,d,g);Ti(e.get("orient"),o,e.get("itemGap"),y.width,y.height),Od(o,p,d,g),o.add(jw(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=m.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!Q(w)&&_){var T=w.style||(w.style={}),D=nd(_,Tt.makeFont(T)),A=m.x+o.x,C=m.y+o.y+s,L=!1;C+D.height>i.getHeight()&&(b.position="top",L=!0);var I=L?-5-D.height:s+10;A+D.width/2>i.getWidth()?(b.position=["100%",I],T.align="right"):A-D.width/2<0&&(b.position=[0,I],T.align="left")}})},t.prototype.updateView=function(e,n,i,a){M(this._features,function(o){o instanceof rr&&o.updateView&&o.updateView(o.model,n,i,a)})},t.prototype.remove=function(e,n){M(this._features,function(i){i instanceof rr&&i.remove&&i.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){M(this._features,function(i){i instanceof rr&&i.dispose&&i.dispose(e,n)})},t.type="toolbox",t})($t);function Kz(r){return r.indexOf("my")===0}var Qz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var i=this.model,a=i.get("name")||e.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)||e.get("backgroundColor")||N.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=ct.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,d=o?decodeURIComponent(v[1]):v[1];c&&(d=window.atob(d));var p=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',T=window.open();T.document.write(w),T.document.title=a}},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:N.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t})(rr),l_="__ec_magicType_stack__",jz=[["line","bar"],["stack"]],Jz=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),i={};return M(e.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(u_[i]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,d=u_[i](v,c,h,a);d&&(gt(d,h.option),s.series.push(d));var p=h.coordinateSystem;if(p&&p.type==="cartesian2d"&&(i==="line"||i==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,ee).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=i==="bar"}}};M(jz,function(h){dt(h,i)>=0&&M(h,function(v){a.setIconStatus(v,"normal")})}),a.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=i;i==="stack"&&(u=ft({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t})(rr),u_={line:function(r,t,e,n){if(r==="bar")return ft({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return ft({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var i=e.get("stack")===l_;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),ft({id:t,stack:i?"":l_},n.get(["option","stack"])||{},!0)}};Lr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var cf=new Array(60).join("-"),Da=" ";function tV(r){var t={},e=[],n=[];return r.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 e.push(i)}else e.push(i)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function eV(r){var t=[];return M(r,function(e,n){var i=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(U(e.series,function(c){return c.name})),l=[i.model.getCategories()];M(e.series,function(c){var d=c.getRawData();l.push(c.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Da)],f=0;f<l[0].length;f++){for(var h=[],v=0;v<l.length;v++)h.push(l[v][f]);u.push(h.join(Da))}t.push(u.join(`
|
|
36
|
-
`))}),t.join(`
|
|
37
|
-
|
|
38
|
-
`+cf+`
|
|
39
|
-
|
|
40
|
-
`)}function rV(r){return U(r,function(t){var e=t.getRawData(),n=[t.name],i=[];return e.each(e.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=e.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+Da:"")+i.join(Da))}),n.join(`
|
|
41
|
-
`)}).join(`
|
|
42
|
-
|
|
43
|
-
`+cf+`
|
|
44
|
-
|
|
45
|
-
`)}function nV(r){var t=tV(r);return{value:kt([eV(t.seriesGroupByCategoryAxis),rV(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
|
46
|
-
|
|
47
|
-
`+cf+`
|
|
48
|
-
|
|
49
|
-
`),meta:t.meta}}function Du(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function iV(r){var t=r.slice(0,r.indexOf(`
|
|
50
|
-
`));if(t.indexOf(Da)>=0)return!0}var Nv=new RegExp("["+Da+"]+","g");function aV(r){for(var t=r.split(/\n+/g),e=Du(t.shift()).split(Nv),n=[],i=U(e,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=Du(t[a]).split(Nv);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 oV(r){for(var t=r.split(/\n+/g),e=Du(t.shift()),n=[],i=0;i<t.length;i++){var a=Du(t[i]);if(a){var o=a.split(Nv),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 f=0;f<o.length;f++)l.push(+o[f]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:e,data:n}}function sV(r,t){var e=r.split(new RegExp(`
|
|
51
|
-
*`+cf+`
|
|
52
|
-
*`,"g")),n={series:[]};return M(e,function(i,a){if(iV(i)){var o=aV(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=oV(i);n.series.push(o)}}),n}var lV=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,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")||N.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"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),v=a.get("contentToOption"),c=nV(e);if(Q(h)){var d=h(n.getOption());X(d)?u.innerHTML=d:ma(d)&&u.appendChild(d)}else{f.readOnly=a.get("readOnly");var p=f.style;p.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",p.color=a.get("textColor"),p.borderColor=a.get("textareaBorderColor"),p.backgroundColor=a.get("textareaColor"),f.value=c.value,u.appendChild(f)}var g=c.meta,y=document.createElement("div");y.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),S=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var b=this;function x(){i.removeChild(o),b._dom=null}vc(_,"click",x),vc(S,"click",function(){if(v==null&&h!=null||v!=null&&h==null){x();return}var w;try{Q(v)?w=v(u,n.getOption()):w=sV(f.value,g)}catch(T){throw x(),new Error("Data view format error "+T)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),x()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=m,!a.get("readOnly")&&y.appendChild(S),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},t.prototype.remove=function(e,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,n){this.remove(e,n)},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:N.color.background,textColor:N.color.primary,textareaColor:N.color.background,textareaBorderColor:N.color.border,buttonColor:N.color.accent50,buttonTextColor:N.color.neutral00};return n},t})(rr);function uV(r,t){return U(r,function(e,n){var i=t&&t[n];if(j(i)&&!H(i)){var a=j(e)&&!H(e);a||(e={value:e});var o=i.name!=null&&e.name==null;return e=gt(e,i),o&&delete e.name,e}else return e})}Lr({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];M(r.newOption.series,function(n){var i=t.getSeriesByName(n.name)[0];if(!i)e.push(F({type:"scatter"},n));else{var a=i.get("data");e.push({name:n.name,data:uV(n.data,a)})}}),t.mergeOption(gt({series:e},r.newOption))});var Jw=M,tT=wt();function fV(r,t){var e=Ip(r);Jw(t,function(n,i){for(var a=e.length-1;a>=0;a--){var o=e[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();e[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),e.push(t)}function hV(r){var t=Ip(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return Jw(e,function(i,a){for(var o=t.length-1;o>=0;o--)if(i=t[o][a],i){n[a]=i;break}}),n}function cV(r){tT(r).snapshots=null}function vV(r){return Ip(r).length}function Ip(r){var t=tT(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var dV=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){cV(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t})(rr);Lr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var pV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],eT=(function(){function r(t,e,n){var i=this;this._targetInfoList=[];var a=f_(e,t);M(gV,function(o,s){(!n||!n.include||dt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Qh[n.brushType](0,a,i);n.__rangeOffset={offset:d_[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){M(t,function(i){var a=this.findTargetInfo(i,e);a&&a!==!0&&M(a.coordSyses,function(o){var s=Qh[i.brushType](1,o,i.range,!0);n(i,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){M(t,function(n){var i=this.findTargetInfo(n,e);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Qh[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?d_[n.brushType](a.values,o.offset,yV(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return U(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:kw(i),isTargetByCursor:Bw(i,t,n.coordSysModel),getLinearBrushOtherExtent:Ow(i)}})},r.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return i===!0||i&&dt(i.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=f_(e,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<h_.length;l++)if(h_[l](i,o))return o}return!0},r})();function zv(r){return r[0]>r[1]&&r.reverse(),r}function f_(r,t){return Ao(r,t,{includeMainTypes:pV})}var gV={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=it(),o={},s={};!e&&!n&&!i||(M(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),M(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),M(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];M(u.getCartesians(),function(h,v){(dt(e,h.getAxis("x").model)>=0||dt(n,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:c_.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){M(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:c_.geo})})}},h_=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&e&&(i=e.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],c_={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(bi(r)),t}},Qh={lineX:at(v_,0),lineY:at(v_,1),rect:function(r,t,e,n){var i=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),a=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[zv([i[0],a[0]]),zv([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=U(e,function(o){var s=r?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 v_(r,t,e,n){var i=e.getAxis(["x","y"][r]),a=zv(U([0,1],function(s){return t?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var d_={lineX:at(p_,0),lineY:at(p_,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return U(r,function(n,i){return[n[0]-e[0]*t[i][0],n[1]-e[1]*t[i][1]]})}};function p_(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function yV(r,t){var e=g_(r),n=g_(t),i=[e[0]/n[0],e[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function g_(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Vv=M,mV=WM("toolbox-dataZoom_"),_V=(function(r){B(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,i,a){this._brushController||(this._brushController=new bw(i.getZr()),this._brushController.on("brush",Y(this._onBrush,this)).mount()),bV(e,n,this,a,i),xV(e,n)},t.prototype.onclick=function(e,n,i){SV[i].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new eT(Lp(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),fV(a,i),this._dispatchZoomAction(i);function s(u,f,h){var v=f.getAxis(u),c=v.model,d=l(u,c,a),p=d.findRepresentativeAxisProxy(c).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(h=Pn(0,h.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(i[d.id]={dataZoomId:d.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var d=c.getAxisModel(u,f.componentIndex);d&&(v=c)}),v}},t.prototype._dispatchZoomAction=function(e){var n=[];Vv(e,function(i,a){n.push(J(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:N.color.backgroundTint}};return n},t})(rr),SV={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(hV(this.ecModel))}};function Lp(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function xV(r,t){r.setIconStatus("back",vV(t)>1?"emphasis":"normal")}function bV(r,t,e,n,i){var a=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new eT(Lp(r),t,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}UI("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),i=[],a=Lp(n),o=Ao(r,a);Vv(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Vv(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:mV+u+h};v[f]=h,i.push(v)}return i});function wV(r){r.registerComponentModel($z),r.registerComponentView(qz),lo("saveAsImage",Qz),lo("magicType",Jz),lo("dataView",lV),lo("dataZoom",_V),lo("restore",dV),ue(Xz)}var TV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}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:N.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:N.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:N.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:N.color.tertiary,fontSize:14}},t})(mt);function rT(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function nT(r){if(ct.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e<n;e++)if(r[e]in t)return r[e]}}var iT=nT(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),CV=nT(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function aT(r,t){if(!r)return t;t=Ox(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function MV(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var AV=aT(CV,"transition"),Pp=aT(iT,"transform"),DV="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(ct.transform3dSupported?"will-change:transform;":"");function IV(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function LV(r,t,e){if(!X(e)||e==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");t=Li(t);var a=IV(e),o=Math.max(Math.round(i)*1.5,6),s="",l=Pp+":",u;dt(["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 f=u*Math.PI/180,h=o+i,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*i)/2+Math.SQRT2*i-(v-h)/2)*100)/100;s+=";"+a+":-"+c+"px";var d=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function PV(r,t,e){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return e&&(i=" "+r/2+"s "+n,a="opacity"+i+",visibility"+i),t||(i=" "+r+"s "+n,a+=(a.length?",":"")+(ct.transformSupported?""+Pp+i:",left"+i+",top"+i)),AV+":"+a}function y_(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!ct.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=ct.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+Pp+":"+o+";":[["top",0],["left",0],[iT,o]]}function RV(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var i=et(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),M(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function EV(r,t,e,n){var i=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),h=r.getModel("textStyle"),v=vb(r,"html"),c=u+"px "+f+"px "+s+"px "+l;return i.push("box-shadow:"+c),t&&a>0&&i.push(PV(a,e,n)),o&&i.push("background-color:"+o),M(["width","color","radius"],function(d){var p="border-"+d,g=Ox(p),y=r.get(g);y!=null&&i.push(p+":"+y+(d==="color"?"":"px"))}),i.push(RV(h)),v!=null&&i.push("padding:"+ms(v).join("px ")+"px"),i.join(";")+";"}function m_(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&gC(r,o,e,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var kV=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,ct.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=e.appendTo,o=a&&(X(a)?document.querySelector(a):ma(a)?a:Q(a)&&a(t.getDom()));m_(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,f=i.painter.getViewportRoot();Ee(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=MV(e,"position"),i=e.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")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=DV+EV(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+y_(a[0],a[1],!0)+("border-color:"+Li(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(X(a)&&n.get("trigger")==="item"&&!rT(n)&&(s=LV(n,i,a)),X(t))o.innerHTML=t+s;else if(t){o.innerHTML="",H(t)||(t=[t]);for(var l=0;l<t.length;l++)ma(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)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var n=this._styleCoord;if(m_(n,this._zr,this._container,t,e),n[0]!=null&&n[1]!=null){var i=this.el.style,a=y_(n[0],n[1]);M(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;this._enableDisplayTransition?(e.visibility="hidden",e.opacity="0"):e.display="none",ct.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Y(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;yC(t&&t.painter&&t.painter.getViewportRoot(),this._container);var e=this.el;if(e){e.onmouseenter=e.onmousemove=e.onmouseleave=null;var n=e.parentNode;n&&n.removeChild(e)}this.el=this._container=null},r})(),OV=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),S_(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,n,i,a){var o=this;j(t)&&de(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Tt({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:vb(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),M(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),M(["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})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=__(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},r.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;S_(i,this._zr,t,e),t=i[0],e=i[1];var a=n.style,o=un(a.borderWidth||0),s=__(a);n.x=t+o+s.left,n.y=e+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(Y(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function un(r){return Math.max(0,r)}function __(r){var t=un(r.shadowBlur||0),e=un(r.shadowOffsetX||0),n=un(r.shadowOffsetY||0);return{left:un(t-e),right:un(t+e),top:un(t-n),bottom:un(t+n)}}function S_(r,t,e,n){r[0]=e,r[1]=n,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var BV=new _t({shape:{x:-1,y:-1,width:2,height:2}}),NV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){if(!(ct.node||!n.getDom())){var i=e.getComponent("tooltip"),a=this._renderMode=KM(i.get("renderMode"));this._tooltipContent=a==="richText"?new OV(n):new kV(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,n,i){if(!(ct.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Ss(this,"_updatePosition",50,"fixRate"):qo(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,n=e.get("triggerOn");Zw("itemTooltip",this._api,Y(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 e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.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(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||ct.node||!i.getDom())){var o=x_(a,i);this._ticket="";var s=a.dataByCoordSys,l=GV(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 f=BV;f.x=a.x,f.y=a.y,f.update(),vt(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,i,a))return;var h=Xw(a,n),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.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(e,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(x_(a,i))},t.prototype._manuallyAxisShowTip=function(e,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 f=u.getData(),h=uo([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){var s=vt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;ca(i,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(vt(f).dataIndex!=null?l=f:vt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=Y(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=uo([n.tooltipOption],a),l=this._renderMode,u=[],f=Ye("section",{blocks:[],noHeader:!0}),h=[],v=new ch;M(e,function(m){M(m.dataByAxis,function(_){var S=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=Uw(b,S.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=Ye("section",{header:x,noHeader:!xr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),M(_.seriesDataIndices,function(T){var D=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,C=D.getDataParams(A);if(!(C.dataIndex<0)){C.axisDim=_.axisDim,C.axisIndex=_.axisIndex,C.axisType=_.axisType,C.axisId=_.axisId,C.axisValue=gu(S.axis,{value:b}),C.axisValueLabel=x,C.marker=v.makeTooltipMarker("item",Li(C.color),l);var L=Ry(D.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=uo([D],a).get("valueFormatter");w.blocks.push(P?F({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(C)}})}})}),f.blocks.reverse(),h.reverse();var c=n.position,d=s.get("order"),p=zy(f,v,l,d,i.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?`
|
|
53
|
-
|
|
54
|
-
`:"<br/>",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,v)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=vt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,d=e.positionDefault,p=uo([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new ch;y.marker=m.makeTooltipMarker("item",Li(y.color),c);var _=Ry(u.formatTooltip(f,!1,h)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?zy(b?F({valueFormatter:b},x):x,m,c,S,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),i({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=this._renderMode==="html",o=vt(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=J(l),l.content=_e(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var c=e.positionDefault,d=uo(h,this._tooltipModel,c?{position:c}:null),p=d.get("content"),g=Math.random()+"",y=new ch;this._showOrMove(d,function(){var m=J(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,n,y)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var v=e.get("formatter");l=l||e.get("position");var c=n,d=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(v)if(X(v)){var g=e.ecModel.get("useUTC"),y=H(i)?i[0]:i,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=tf(y.axisValue,c,g)),c=Bx(c,i,!0)}else if(Q(v)){var _=Y(function(S,b){S===this._ticket&&(h.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,h,i,u))},this);this._ticket=a,c=v(i,a,_)}else c=v;h.setContent(c,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(e,n,i,a,o){if(i==="axis"||H(n))return{color:a||o};if(!H(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var h=o.getSize(),v=e.get("align"),c=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),H(n))i=q(n[0],u),a=q(n[1],f);else if(j(n)){var p=n;p.width=h[0],p.height=h[1];var g=ie(p,{width:u,height:f});i=g.x,a=g.y,v=null,c=null}else if(X(n)&&l){var y=FV(n,d,h,e.get("borderWidth"));i=y[0],a=y[1]}else{var y=zV(i,a,o,u,f,v?null:20,c?null:20);i=y[0],a=y[1]}if(v&&(i-=b_(v)?h[0]/2:v==="right"?h[0]:0),c&&(a-=b_(c)?h[1]/2:c==="bottom"?h[1]:0),rT(e)){var y=VV(i,a,o,u,f);i=y[0],a=y[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&M(i,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&M(u,function(v,c){var d=h[c]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&M(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&M(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){ct.node||!n.getDom()||(qo(this,"_updatePosition"),this._tooltipContent.dispose(),Bv("itemTooltip",n))},t.type="tooltip",t})($t);function uo(r,t,e){var n=t.ecModel,i;e?(i=new Dt(e,n,n),i=new Dt(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Dt&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(i=new Dt(o,i,n)))}return i}function x_(r,t){return r.dispatchAction||Y(t.dispatchAction,t)}function zV(r,t,e,n,i,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function VV(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function FV(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+f/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+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function b_(r){return r==="center"||r==="middle"}function GV(r,t,e){var n=od(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Ea(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=vt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function HV(r){ue($w),r.registerComponentModel(TV),r.registerComponentView(NV),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},re),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},re)}var w_=M;function T_(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function C_(r,t,e){var n={};return w_(t,function(a){var o=n[a]=i();w_(r[a],function(s,l){if(Qt.isValidType(l)){var u={type:l,visual:s};e&&e(u,a),o[l]=new Qt(u),l==="opacity"&&(u=J(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Qt(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function WV(r,t,e){var n;M(e,function(i){t.hasOwnProperty(i)&&T_(t[i])&&(n=!0)}),n&&M(e,function(i){t.hasOwnProperty(i)&&T_(t[i])?r[i]=J(t[i]):delete r[i]})}function UV(r,t,e,n){var i={};return M(r,function(a){var o=Qt.prepareVisualTypes(t[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(b){return bb(s,h,b)}function f(b,x){x2(s,h,b,x)}for(var h,v=s.getStore();(h=o.next())!=null;){var c=s.getRawDataItem(h);if(!(c&&c.visualMap===!1))for(var d=n!=null?v.get(l,h):h,p=e(d),g=t[p],y=i[p],m=0,_=y.length;m<_;m++){var S=y[m];g[S]&&g[S].applyVisual(d,u,f)}}}}}var YV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:N.size.m,backgroundColor:N.color.transparent,borderColor:N.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:N.color.primary},subtextStyle:{fontSize:12,color:N.color.quaternary}},t})(mt),ZV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=et(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Tt({style:Wt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=e.get("subtext"),c=new Tt({style:Wt(s,{text:v,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,c.silent=!p&&!g,d&&f.on("click",function(){su(d,"_"+e.get("target"))}),p&&c.on("click",function(){su(p,"_"+e.get("subtarget"))}),vt(f).eventData=vt(c).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),v&&a.add(c);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ie(e,i),S=ie(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.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 b={align:l,verticalAlign:u};f.setStyle(b),c.setStyle(b),y=a.getBoundingRect();var x=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new _t({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(T)}},t.type="title",t})($t);function XV(r){r.registerComponentModel(YV),r.registerComponentView(ZV)}function oT(r,t){if(!r)return!1;for(var e=H(r)?r:[r],n=0;n<e.length;n++)if(e[n]&&e[n][t])return!0;return!1}function Sl(r){Go(r,"label",["show"])}var xl=wt(),En=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e.preventAutoZ=!0,e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},t.prototype.isAnimationEnabled=function(){if(ct.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,n){this._mergeOption(e,n,!1,!1)},t.prototype._mergeOption=function(e,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=xl(s)[o];if(!l||!l.data){xl(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&Sl(l),M(l.data,function(f){f instanceof Array?(Sl(f[0]),Sl(f[1])):Sl(f)}),u=this.createMarkerModelFromSeries(l,this,n),F(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),xl(s)[o]=u},this)},t.prototype.formatTooltip=function(e,n,i){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return Ye("section",{header:this.name,blocks:[Ye("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,n){var i=Hd.prototype.getDataParams.call(this,e,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},t.getMarkerModelFromSeries=function(e,n){return xl(e)[n]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t})(mt);fe(En,Hd.prototype);var $V=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,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})(En);function qV(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function KV(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function bl(r,t,e,n,i,a,o){var s=[],l=Pi(t,i),u=l?t.getCalculationInfo("stackResultDimension"):i,f=Iu(t,u,r),h=t.hostModel,v=h.indicesOfNearest(e,u,f)[0];s[a]=t.get(n,v),s[o]=t.get(u,v);var c=t.get(i,v),d=wr(t.get(i,v));return d=Math.min(d,20),d>=0&&(s[o]=+s[o].toFixed(d)),[s,c]}var wl={min:at(bl,"min"),max:at(bl,"max"),average:at(bl,"average"),median:at(bl,"median")};function Fv(r,t){if(t){var e=r.getData(),n=r.coordinateSystem,i=n&&n.dimensions;if(!KV(t)&&!H(t.coord)&&H(i)){var a=sT(t,e,n,r);if(t=J(t),t.type&&wl[t.type]&&a.baseAxis&&a.valueAxis){var o=dt(i,a.baseAxis.dim),s=dt(i,a.valueAxis.dim),l=wl[t.type](e,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||!H(i)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&wl[t.type]){var f=n.getOtherAxis(u);f&&(t.value=Iu(e,e.mapDimension(f.dim),t.type))}}else for(var h=t.coord,v=0;v<2;v++)wl[h[v]]&&(h[v]=Iu(e,e.mapDimension(i[v]),h[v]));return t}}function sT(r,t,e,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,i.valueAxis=e.getAxis(QV(n,i.valueDataDim)),i.baseAxis=e.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=e.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function QV(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Gv(r,t){return r&&r.containData&&t.coord&&!qV(t)?r.containData(t.coord):!0}function lT(r,t){return r?function(e,n,i,a){var o=a<2?e.coord&&e.coord[a]:e.value;return ya(o,t[a])}:function(e,n,i,a){return ya(e.value,t[a])}}function Iu(r,t,e){if(e==="average"){var n=0,i=0;return r.each(t,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var jh=wt(),uT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=it()},t.prototype.render=function(e,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){jh(s).keep=!1}),n.eachSeries(function(s){var l=En.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!jh(s).keep&&a.group.remove(s.group)}),jV(n,o,this.type)},t.prototype.markKeep=function(e){jh(e).keep=!0},t.prototype.toggleBlurSeries=function(e,n){var i=this;M(e,function(a){var o=En.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?ex(l):dd(l))})}})},t.type="marker",t})($t);function jV(r,t,e){r.eachSeries(function(n){var i=En.getMarkerModelFromSeries(n,e),a=t.get(n.id);if(i&&a&&a.group){var o=wa(i),s=o.z,l=o.zlevel;bd(a.group,s,l)}})}function M_(r,t,e){var n=t.coordinateSystem,i=e.getWidth(),a=e.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:i,h=u?o?o.height:0:a,v=u&&o?o.x:0,c=u&&o?o.y:0,d,p=q(l.get("x"),f)+v,g=q(l.get("y"),h)+c;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(t.getMarkerPosition)d=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var y=r.get(n.dimensions[0],s),m=r.get(n.dimensions[1],s);d=n.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var JV=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,n,i){n.eachSeries(function(a){var o=En.getMarkerModelFromSeries(a,"markPoint");o&&(M_(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},t.prototype.renderSeries=function(e,n,i,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new up),h=t5(o,e,n);n.setData(h),M_(n.getData(),e,a),h.each(function(v){var c=h.getItemModel(v),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(Q(d)||Q(p)||Q(g)||Q(y)){var _=n.getRawValue(v),S=n.getDataParams(v);Q(d)&&(d=d(_,S)),Q(p)&&(p=p(_,S)),Q(g)&&(g=g(_,S)),Q(y)&&(y=y(_,S))}var b=c.getModel("itemStyle").getItemStyle(),x=c.get("z2"),w=nf(l,"color");b.fill||(b.fill=w),h.setItemVisual(v,{z2:et(x,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){vt(c).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||e.get("silent")},t.type="markPoint",t})(uT);function t5(r,t,e){var n;r?n=U(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return F(F({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,e),a=U(e.get("data"),at(Fv,t));r&&(a=kt(a,at(Gv,r)));var o=lT(!!r,n);return i.initData(a,null,o),i}function e5(r){r.registerComponentModel($V),r.registerComponentView(JV),r.registerPreprocessor(function(t){oT(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var r5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,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})(En),Tl=wt(),n5=function(r,t,e,n){var i=r.getData(),a;if(H(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=Xr(n.yAxis,n.xAxis);else{var u=sT(n,i,t,r);s=u.valueAxis;var f=Kb(i,u.valueDataDim);l=Iu(i,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=J(n),d={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,d.coord[v]=1/0;var p=e.get("precision");p>=0&&xt(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=l,a=[c,d,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var g=[Fv(r,a[0]),Fv(r,a[1]),F({},a[2])];return g[2].type=g[2].type||null,ft(g[2],g[0]),ft(g[2],g[1]),g};function Lu(r){return!isNaN(r)&&!isFinite(r)}function A_(r,t,e,n){var i=1-r,a=n.dimensions[r];return Lu(t[i])&&Lu(e[i])&&t[r]===e[r]&&n.getAxis(a).containData(t[r])}function i5(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,n=t[1].coord;if(e&&n&&(A_(1,e,n,r)||A_(0,e,n,r)))return!0}return Gv(r,t[0])&&Gv(r,t[1])}function Jh(r,t,e,n,i){var a=n.coordinateSystem,o=r.getItemModel(t),s,l=q(o.get("x"),i.getWidth()),u=q(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=a.dimensions,h=r.get(f[0],t),v=r.get(f[1],t);s=a.dataToPoint([h,v])}if(Ma(a,"cartesian2d")){var c=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;Lu(r.get(f[0],t))?s[0]=c.toGlobalCoord(c.getExtent()[e?0:1]):Lu(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var a5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,n,i){n.eachSeries(function(a){var o=En.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Tl(o).from,u=Tl(o).to;l.each(function(f){Jh(l,f,!0,a,i),Jh(u,f,!1,a,i)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,n,i,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new nB);this.group.add(f.group);var h=o5(o,e,n),v=h.from,c=h.to,d=h.line;Tl(n).from=v,Tl(n).to=c,n.setData(d);var p=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");H(p)||(p=[p,p]),H(g)||(g=[g,g]),H(y)||(y=[y,y]),H(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),d.each(function(S){var b=d.getItemModel(S),x=b.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]);var w=b.get("z2");x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:et(w,0),fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:x})}),f.updateData(d),h.line.eachItemGraphicEl(function(S){vt(S).dataModel=n,S.traverse(function(b){vt(b).dataModel=n})});function _(S,b,x){var w=S.getItemModel(b);Jh(S,b,x,e,a);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=nf(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:et(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:et(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:et(w.get("symbolSize"),g[x?0:1]),symbol:et(w.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||e.get("silent")},t.type="markLine",t})(uT);function o5(r,t,e){var n;r?n=U(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return F(F({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,e),a=new Zr(n,e),o=new Zr([],e),s=U(e.get("data"),at(n5,t,r,e));r&&(s=kt(s,at(i5,r)));var l=lT(!!r,n);return i.initData(U(s,function(u){return u[0]}),null,l),a.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function s5(r){r.registerComponentModel(r5),r.registerComponentView(a5),r.registerPreprocessor(function(t){oT(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var l5=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Hv=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),H(n)&&M(n,function(a,o){X(a)&&(a={type:a}),n[o]=ft(a,l5(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<e.length;i++){var a=e[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var n=[],i=[];e.eachRawSeries(function(l){var u=l.name;i.push(u);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,v=h.getAllNames();e.isSeriesFiltered(l)||(i=i.concat(v)),v.length?n=n.concat(v):f=!0}else f=!0;f&&ad(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=it(),s=U(a,function(l){return(X(l)||xt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new Dt(l,this,this.ecModel))},this);this._data=kt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;M(a,function(o){n[o.get("name")]=!1})}n[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var n=this.option.selected;n.hasOwnProperty(e)||(n[e]=!0),this[n[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,n=this.option.selected;M(e,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,n=this.option.selected;M(e,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(e){var n=this.option.selected;return!(n.hasOwnProperty(e)&&!n[e])&&dt(this._availableNames,e)>=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:N.size.m,align:"auto",backgroundColor:N.color.transparent,borderColor:N.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:N.color.disabled,inactiveBorderColor:N.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:N.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:N.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:N.color.tertiary,borderWidth:1,borderColor:N.color.border},emphasis:{selectorLabel:{show:!0,color:N.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(mt),ra=at,Wv=M,Cl=yt,fT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Cl),this.group.add(this._selectorGroup=new Cl),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,i,l,s,u);var f=Ie(e,i).refContainer,h=e.getBoxLayoutParams(),v=e.get("padding"),c=ie(h,f,v),d=this.layoutInner(e,o,c,a,l,u),p=ie(gt({width:d.width,height:d.height},h),f,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=jw(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this.getContentGroup(),f=it(),h=n.get("selectedMode"),v=n.get("triggerEvent"),c=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&c.push(d.id)}),Wv(n.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===`
|
|
55
|
-
`)){var m=new Cl;m.newline=!0,u.add(m);return}var _=i.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,p,d,n,e,b,w,x,h,a);T.on("click",ra(D_,y,null,a,c)).on("mouseover",ra(Uv,_.name,null,a,c)).on("mouseout",ra(Yv,_.name,null,a,c)),i.ssr&&T.eachChild(function(D){var A=vt(D);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),v&&T.eachChild(function(D){g.packEventData(D,n,_,p,y)}),f.set(y,!0)}else i.eachRawSeries(function(D){var A=this;if(!f.get(y)&&D.legendVisualProvider){var C=D.legendVisualProvider;if(!C.containName(y))return;var L=C.indexOfName(y),I=C.getItemVisual(L,"style"),P=C.getItemVisual(L,"legendIcon"),R=Ge(I.fill);R&&R[3]===0&&(R[3]=.2,I=F(F({},I),{fill:Ur(R,"rgba")}));var E=this._createItem(D,y,p,d,n,e,{},I,P,h,a);E.on("click",ra(D_,null,y,a,c)).on("mouseover",ra(Uv,null,y,a,c)).on("mouseout",ra(Yv,null,y,a,c)),i.ssr&&E.eachChild(function(O){var k=vt(O);k.seriesIndex=D.seriesIndex,k.dataIndex=p,k.ssrType="legend"}),v&&E.eachChild(function(O){A.packEventData(O,n,D,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype.packEventData=function(e,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};vt(e).eventData=s},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();Wv(e,function(u){var f=u.type,h=new Tt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var v=n.getModel("selectorLabel"),c=n.getModel(["emphasis","selectorLabel"]);Ue(h,{normal:v,emphasis:c},{defaultText:u.title}),eu(h)})},t.prototype._createItem=function(e,n,i,a,o,s,l,u,f,h,v){var c=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=u5(f,a,l,u,c,g,v),b=new Cl,x=a.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(f5({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),C=n;X(A)&&A?C=A.replace("{name}",n??""):Q(A)&&(C=A(n));var L=g?x.getTextColor():a.get("inactiveColor");b.add(new Tt({style:Wt(x,{text:C,x:T,y:p/2,fill:L,align:D,verticalAlign:"middle"},{inheritColor:L})}));var I=new _t({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&ps({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(b),eu(b),b.__legendDataIndex=i,b},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ti(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ti("horizontal",u,e.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?c[p]+=f[g]+d:h[p]+=v[g]+d,c[1-p]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})($t);function u5(r,t,e,n,i,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Wv(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:vu(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:e).opacity),s(u,n);var v=t.getModel("lineStyle"),c=v.getLineStyle();if(s(c,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),c.stroke==="auto"&&(c.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function f5(r){var t=r.icon||"roundRect",e=le(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=N.color.neutral00,e.style.lineWidth=2),e}function D_(r,t,e,n){Yv(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Uv(r,t,e,n)}function hT(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;n<i&&!(e=t[n].states.emphasis);)n++;return e&&e.hoverLayer}function Uv(r,t,e,n){hT(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:n})}function Yv(r,t,e,n){hT(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:n})}function h5(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function fo(r,t,e){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];e.eachComponent({mainType:"legend",query:t},function(s){n?s[r]():s[r](t.name),I_(s,i),a.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){M(i,function(l,u){s[l?"select":"unSelect"](u)}),I_(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function I_(r,t){var e=t||{};return M(r.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
56
|
-
`||i==="")){var a=r.isSelected(i);nr(e,i)?e[i]=e[i]&&a:e[i]=a}}),e}function c5(r){r.registerAction("legendToggleSelect","legendselectchanged",at(fo,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",at(fo,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",at(fo,"inverseSelect")),r.registerAction("legendSelect","legendselected",at(fo,"select")),r.registerAction("legendUnSelect","legendunselected",at(fo,"unSelect"))}function cT(r){r.registerComponentModel(Hv),r.registerComponentView(fT),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,h5),r.registerSubTypeDefaulter("legend",function(){return"plain"}),c5(r)}var v5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,n,i){var a=Na(e);r.prototype.init.call(this,e,n,i),L_(this,e,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),L_(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Ba(Hv.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:N.color.accent50,pageIconInactiveColor:N.color.accent10,pageIconSize:15,pageTextStyle:{color:N.color.tertiary},animationDurationUpdate:800}),t})(Hv);function L_(r,t,e){var n=r.getOrient(),i=[1,1];i[n.index]=0,Dn(t,e,{type:"box",ignoreSize:!!i})}var P_=yt,tc=["width","height"],ec=["x","y"],d5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new P_),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new P_)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,n,i,a,o,s,l);var f=this._controllerGroup,h=n.get("pageIconSize",!0),v=H(h)?h:[h,h];d("pagePrev",0);var c=n.getModel("pageTextStyle");f.add(new Tt({name:"pageText",style:{text:"xx/xx",fill:c.getTextColor(),font:c.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=ju(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:Y(u._pageGo,u,y,n,a)},{x:-v[0]/2,y:-v[1]/2,width:v[0],height:v[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=tc[u],h=ec[u],v=tc[1-u],c=ec[1-u];o&&Ti("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=J(i);o&&(y[f]=i[f]-p[f]-d);var m=this._layoutContentAndController(e,a,y,u,f,v,c,h);if(o){if(s==="end")g[u]+=m[f]+d;else{var _=p[f]+d;g[u]-=_,m[h]-=_}m[f]+=p[f]+d,g[1-u]+=m[c]+m[v]/2-p[v]/2,m[v]=Math.max(m[v],p[v]),m[c]=Math.min(m[c],p[c]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,n,i,a,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,v=this._controllerGroup;Ti(e.get("orient"),f,e.get("itemGap"),a?i.width:null,a?null:i.height),Ti("horizontal",v,e.get("pageButtonItemGap",!0));var c=f.getBoundingRect(),d=v.getBoundingRect(),p=this._showController=c[o]>i[o],g=[-c.x,-c.y];n||(g[a]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=et(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=i[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=c[s]/2-d[s]/2,f.setPosition(g),h.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=p?i[o]:c[o],b[s]=Math.max(c[s],d[s]),b[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=i[o],p){var x={x:0,y:0};x[o]=Math.max(i[o]-d[o]-_,0),x[s]=b[s],h.setClipPath(new _t({shape:x})),h.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&Et(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),b},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;M(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=n[h]!=null,c=i.childOfName(f);c&&(c.setStyle("fill",v?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=tc[o],l=ec[o],u=this._findTargetItemIndex(n),f=i.children(),h=f[u],v=f.length,c=v?1:0,d={contentPosition:[i.x,i.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=S(h);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+a||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i<m.i&&(m=y,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=y.i),++d.pageCount,++d.pageIndex),y=_;return d;function S(x){if(x){var w=x.getBoundingRect(),T=w[l]+x[l];return{s:T,e:T+w[s],i:x.__legendDataIndex}}}function b(x,w){return x.e>=w&&x.s<=w+a}},t.prototype._findTargetItemIndex=function(e){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===e&&(n=s)}),n??a},t.type="legend.scroll",t})(fT);function p5(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function g5(r){ue(cT),r.registerComponentModel(v5),r.registerComponentView(d5),p5(r)}function y5(r){ue(cT),ue(g5)}var m5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Ba(os.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(os),Rp=wt();function _5(r,t,e){Rp(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function S5(r,t){for(var e=Rp(r).coordSysRecordMap,n=e.keys(),i=0;i<n.length;i++){var a=n[i],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||vT(e,o))}}}function vT(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function x5(r,t){var e={model:t,containsPoint:at(w5,t),dispatchAction:at(b5,r),dataZoomInfoMap:null,controller:null},n=e.controller=new pp(r.getZr());return M(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function b5(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function w5(r,t,e,n){return r.coordinateSystem.containPoint([e,n])}function T5(r,t,e){var n,i="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return r.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:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function C5(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=Rp(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=it());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=qw(a);M(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,x5(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=it());f.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){vT(i,a);return}var f=T5(l,a,e);o.enable(f.controlType,f.opt),Ss(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var M5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,n,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),_5(i,e,{pan:Y(rc.pan,this),zoom:Y(rc.zoom,this),scrollMove:Y(rc.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){S5(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(Ap),rc={zoom:function(r,t,e,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=nc[t](null,[n.originX,n.originY],o,e,r),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 f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Pn(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:R_(function(r,t,e,n,i,a){var o=nc[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:R_(function(r,t,e,n,i,a){var o=nc[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function R_(r){return function(t,e,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,n,i);if(Pn(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var nc={grid:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,n,i){var a=e.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function A5(r){Dp(r),r.registerComponentModel(m5),r.registerComponentView(M5),C5(r)}var D5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Ba(os.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:N.color.accent10,borderRadius:0,backgroundColor:N.color.transparent,dataBackground:{lineStyle:{color:N.color.accent30,width:.5},areaStyle:{color:N.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:N.color.accent40,width:.5},areaStyle:{color:N.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:N.color.neutral00,borderColor:N.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:N.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:N.color.tertiary},brushSelect:!0,brushStyle:{color:N.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:N.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(os),ho=_t,I5=1,ic=30,L5=7,co="horizontal",E_="vertical",P5=5,R5=["line","bar","candlestick","scatter"],E5={easing:"cubicOut",duration:100,delay:0},k5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,n){this.api=n,this._onBrush=Y(this._onBrush,this),this._onBrushEnd=Y(this._onBrushEnd,this)},t.prototype.render=function(e,n,i,a){if(r.prototype.render.apply(this,arguments),Ss(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.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(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){qo(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new yt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,i=e.get("brushSelect"),a=i?L5:0,o=Ie(e,n).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===co?{right:o.width-s.x-s.width,top:o.height-ic-l-a,width:s.width,height:ic}:{right:l,top:s.y,width:ic,height:s.height},f=Na(e.option);M(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=u[v])});var h=ie(f,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===E_&&this._size.reverse()},t.prototype._positionGroup=function(){var e=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===co&&!o?{scaleY:l?1:-1,scaleX:1}:i===co&&o?{scaleY:l?1:-1,scaleX:-1}:i===E_&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=e.get("brushSelect");i.add(new ho({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ho({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Y(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 e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,i=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(e.thisDim),v=o.getDataExtent(l),c=(v[1]-v[0])*.3;v=[v[0]-c,v[1]+c];var d=[0,n[1]],p=[0,n[0]],g=[[n[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=n[0]/(h[1]-h[0]),S=e.thisAxis.type==="time",b=-m,x=Math.round(o.count()/n[0]),w;o.each([e.thisDim,l],function(L,I,P){if(x>0&&P%x){S||(b+=m);return}b=S?(+L-h[0])*_:b+m;var R=I==null||isNaN(I)||I==="",E=R?0:St(I,v,d,!0);R&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!R&&w&&(g.push([b,0]),y.push([b,0])),R||(g.push([b,E]),y.push([b,E])),w=R}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var T=this.dataZoomModel;function D(L){var I=T.getModel(L?"selectedDataBackground":"dataBackground"),P=new yt,R=new Ir({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new fr({shape:{points:f},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(E),P}for(var A=0;A<3;A++){var C=D(A===1);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!i&&!(n!==!0&&dt(R5,u.get("type"))<0)){var f=a.getComponent(mn(o),s).axis,h=O5(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h);var d=u.getData().mapDimension(o);i={thisAxis:f,series:u,thisDim:d,otherDim:h,otherAxisInverse:v}}},this)},this),i}},t.prototype._renderHandle=function(){var e=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,f=l.get("borderRadius")||0,h=l.get("brushSelect"),v=n.filler=new ho({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new ho({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:I5,fill:N.color.transparent}})),M([0,1],function(_){var S=l.get("handleIcon");!fu[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=le(S,-1,0,2,2,null,!0);b.attr({cursor:B5(this._orient),draggable:!0,drift:Y(this._onDragMove,this,_),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=q(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),eu(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(i[_]=b);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(a[_]=new Tt({silent:!0,invisible:!C,style:Wt(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var c=v;if(h){var d=q(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new _t({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=n.moveHandleIcon=le(l.get("moveHandleIcon"),-g/2,-g/2,g,g,N.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));c=n.moveZone=new _t({invisible:!0,shape:{y:s[1]-m,height:d+m}}),c.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:"default",drift:Y(this._onDragMove,this,"all"),ondragstart:Y(this._showDataInfo,this,!0),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[St(e[0],[0,100],n,!0),St(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Pn(n,a,o,i.get("zoomLock")?"all":e,s.minSpan!=null?St(s.minSpan,l,o,!0):null,s.maxSpan!=null?St(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Fr([St(a[0],o,l,!0),St(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,i=this._handleEnds,a=Fr(i.slice()),o=this._size;M([0,1],function(c){var d=n.handles[c],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:i[c]+(c?-1:1),y:o[1]/2-p/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]],f=0;f<l.length;f++){var h=l[f],v=h.getClipPath();v||(v=new _t,h.setClipPath(v)),v.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){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,f=this._range,h=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var v=Fr(this._handleEnds.slice());c.call(this,0),c.call(this,1);function c(d){var p=bi(i.handles[d].parent,this.group),g=Qu(d===0?"right":"left",p),y=this._handleWidth/2+P5,m=Yr([v[d]+(d===0?-y:y),this._size[1]/2],p);a[d].setStyle({x:m[0],y:m[1],verticalAlign:o===co?"middle":g,align:o===co?g:"center",text:s[d]})}},t.prototype._formatLabel=function(e,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=e==null||isNaN(e)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(a)?a(e,s):X(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||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(e,n,i,a){this._dragging=!0,$r(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Yr([n,i],o,!0),l=this._updateInterval(e,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 e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.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(e){var n=e.offsetX,i=e.offsetY;this._brushStart=new ht(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){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();Pn(0,l,o,0,u.minSpan!=null?St(u.minSpan,s,o,!0):null,u.maxSpan!=null?St(u.maxSpan,s,o,!0):null),this._range=Fr([St(l[0],o,s,!0),St(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&($r(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new ho({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(e,n),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?E5:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=qw(this.dataZoomModel).infoList;if(!e&&n.length){var i=n[0].model.coordinateSystem;e=i.getRect&&i.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(Ap);function O5(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function B5(r){return r==="vertical"?"ns-resize":"ew-resize"}function N5(r){r.registerComponentModel(D5),r.registerComponentView(k5),Dp(r)}function z5(r){ue(A5),ue(N5)}var dT={get:function(r,t,e){var n=J((V5[r]||{})[t]);return e&&H(n)?n[n.length-1]:n}},V5={color:{active:["#006edd","#e0ffff"],inactive:[N.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]}},k_=Qt.mapVisual,F5=Qt.eachVisual,G5=H,O_=M,H5=Fr,W5=St,Pu=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.optionUpdated=function(e,n){var i=this.option;!n&&WV(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var n=this.stateList;e=Y(e,this),this.controllerVisuals=C_(this.option.controller,n,e),this.targetVisuals=C_(this.option.target,n,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,n=this.option.seriesIndex;n==null&&e==null&&(n="all");var i=Ea(this.ecModel,"series",{index:n,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(i,function(a){return a.componentIndex})},t.prototype.eachTargetSeries=function(e,n){M(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&e.call(n,a)},this)},t.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(i){i===e&&(n=!0)}),n},t.prototype.formatValueText=function(e,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],H(e)&&(e=e.slice(),u=!0);var f=n?e:u?[h(e[0]),h(e[1])]:h(e);if(X(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(Q(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?i[0]+" "+f[1]:e[1]===s[1]?i[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,n=H5([e.min,e.max]);this._dataExtent=n},t.prototype.getDataDimensionIndex=function(e){var n=this.option.dimension;if(n!=null)return e.getDimensionIndex(n);for(var i=e.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});ft(a,i),ft(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(h){G5(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:e.get("gradientColor")}}function u(h,v,c){var d=h[v],p=h[c];d&&!p&&(p=h[c]={},O_(d,function(g,y){if(Qt.isValidType(y)){var m=dT.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";O_(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&J(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&J(c)||(s?m[0]:[m[0],m[0]])),_.symbol=k_(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;F5(S,function(x){x>b&&(b=x)}),_.symbolSize=k_(S,function(x){return W5(x,[0,b],[0,m[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(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){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:N.color.transparent,borderColor:N.color.borderTint,contentColor:N.color.theme[0],inactiveColor:N.color.disabled,borderWidth:0,padding:N.size.m,textGap:10,precision:0,textStyle:{color:N.color.secondary}},t})(mt),B_=[20,140],U5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=B_[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=B_[1])},t.prototype._resetRange=function(){var e=this.getExtent(),n=this.option.range;!n||n.auto?(e.auto=1,this.option.range=e):H(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],e[0]),n[1]=Math.min(n[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(e){var n=this.option.controller[e].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),n=Fr((this.get("range")||[]).slice());return n[0]>e[1]&&(n[0]=e[1]),n[1]>e[1]&&(n[1]=e[1]),n[0]<e[0]&&(n[0]=e[0]),n[1]<e[0]&&(n[1]=e[0]),n},t.prototype.getValueState=function(e){var n=this.option.range,i=this.getExtent(),a=et(this.option.unboundedRange,!0);return(a&&n[0]<=i[0]||n[0]<=e)&&(a&&n[1]>=i[1]||e<=n[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},t.prototype.getVisualMeta=function(e){var n=N_(this,"outOfRange",this.getExtent()),i=N_(this,"inRange",this.option.range.slice()),a=[];function o(c,d){a.push({value:c,color:e(c,d)})}for(var s=0,l=0,u=i.length,f=n.length;l<f&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var h=1;l<f;l++)(!i.length||i[i.length-1]<n[l])&&(h&&(a.length&&o(a[a.length-1].value,"outOfRange"),h=0),o(n[l],"outOfRange"));var v=a.length;return{stops:a,outerColors:[v?a[0].color:"transparent",v?a[v-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Ba(Pu.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:N.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:N.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:N.color.shadow}}),t})(Pu);function N_(r,t,e){if(e[0]===e[1])return e.slice();for(var n=200,i=(e[1]-e[0])/n,a=e[0],o=[],s=0;s<=n&&a<e[1];s++)o.push(a),a+=i;return o.push(e[1]),o}var pT=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,n){this.ecModel=e,this.api=n},t.prototype.render=function(e,n,i,a){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,n,i,a)},t.prototype.renderBackground=function(e){var n=this.visualMapModel,i=ms(n.get("padding")||0),a=e.getBoundingRect();e.add(new _t({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(e,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(c){return s[c]}function f(c,d){s[c]=d}var h=o.controllerVisuals[a||o.getValueState(e)],v=Qt.prepareVisualTypes(h);return M(v,function(c){var d=h[c];i.convertOpacityToAlpha&&c==="opacity"&&(c="colorAlpha",d=h.__alphaForOpacity),Qt.dependsOn(c,n)&&d&&d.applyVisual(e,u,f)}),s[n]},t.prototype.positionGroup=function(e){var n=this.visualMapModel,i=this.api,a=Ie(n,i).refContainer;Od(e,n.getBoxLayoutParams(),a)},t.prototype.doRender=function(e,n,i,a){},t.type="visualMap",t})($t),z_=[["left","right","width"],["top","bottom","height"]];function gT(r,t,e){var n=r.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=z_[o],l=[0,null,10],u={},f=0;f<3;f++)u[z_[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:n[s[f]];var h=[["x","width",3],["y","height",0]][o],v=ie(u,a,n.padding);return s[(v.margin[h[2]]||0)+v[h[0]]+v[h[1]]*.5<a[h[1]]*.5?0:1]}function Fl(r,t){return M(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var mr=St,Y5=M,V_=Math.min,ac=Math.max,Z5=12,X5=6,$5=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,n){r.prototype.init.call(this,e,n),this._hoverLinkFromSeriesMouseOver=Y(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Y(this._hideIndicator,this)},t.prototype.doRender=function(e,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,n=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(n);var i=e.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(e,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,f=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),h=this._applyTransform(i===0?"bottom":"top",u),v=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Tt({style:Wt(c,{x:f[0],y:f[1],verticalAlign:c.get("verticalAlign")||(v==="horizontal"?"middle":h),align:c.get("align")||(v==="horizontal"?h:"center"),text:a})}))}},t.prototype._renderBar=function(e){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=gT(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),f=new yt;u.add(f),f.add(i.outOfRange=F_()),f.add(i.inRange=F_(null,s?H_(this._orient):null,Y(this._dragHandle,this,"all",!1),Y(this._dragHandle,this,"all",!0))),f.setClipPath(new _t({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=n.textStyleModel.getTextRect("国"),v=ac(h.width,h.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,v,o),this._createHandle(n,u,1,a,v,o)),this._createIndicator(n,u,a,v,o),e.add(u)},t.prototype._createHandle=function(e,n,i,a,o,s){var l=Y(this._dragHandle,this,i,!1),u=Y(this._dragHandle,this,i,!0),f=Dr(e.get("handleSize"),a[0]),h=le(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),v=H_(this._orient);h.attr({cursor:v,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){$r(y.event)}}),h.x=a[0]/2,h.useStyle(e.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),di(h,!0),n.add(h);var c=this.visualMapModel.textStyleModel,d=new Tt({cursor:v,draggable:!0,drift:l,onmousemove:function(y){$r(y.event)},ondragend:u,style:Wt(c,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[f,0],g=this._shapes;g.handleThumbs[i]=h,g.handleLabelPoints[i]=p,g.handleLabels[i]=d},t.prototype._createIndicator=function(e,n,i,a,o){var s=Dr(e.get("indicatorSize"),i[0]),l=le(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Xe){var f=l.style;l.useStyle(F({image:f.image,x:f.x,y:f.y,width:f.width,height:f.height},u))}else l.useStyle(u);n.add(l);var h=this.visualMapModel.textStyleModel,v=new Tt({silent:!0,invisible:!0,style:Wt(h,{x:0,y:0,text:""})});this.group.add(v);var c=[(o==="horizontal"?a/2:X5)+i[0]/2,0],d=this._shapes;d.indicator=l,d.indicatorLabel=v,d.indicatorLabelPoint=c,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(e,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():G_(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,n=this._dataInterval=e.getSelected(),i=e.getExtent(),a=[0,e.itemSize[1]];this._handleEnds=[mr(n[0],i,a,!0),mr(n[1],i,a,!0)]},t.prototype._updateInterval=function(e,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];Pn(n,a,o,e,0);var s=i.getExtent();this._dataInterval=[mr(a[0],o,s,!0),mr(a[1],o,s,!0)]},t.prototype._updateView=function(e){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=e?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(e,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Ku(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,n){var i=100,a=[],o=(e[1]-e[0])/i;a.push({color:this.getControllerVisual(e[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=e[0]+o*s;if(l>e[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(e[1],"color",n),offset:1}),a},t.prototype._createBarPoints=function(e,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-n[1],e[1]]]},t.prototype._createBarGroup=function(e){var n=this._orient,i=this.visualMapModel.get("inverse");return new yt(n==="horizontal"&&!i?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),f=this._applyTransform("left",i.mainGroup);Y5([0,1],function(h){var v=o[h];v.setStyle("fill",n.handlesColor[h]),v.y=e[h];var c=mr(e[h],[0,l[1]],u,!0),d=this.getControllerVisual(c,"symbolSize");v.scaleX=v.scaleY=d/l[0],v.x=l[0]-d/2;var p=Yr(i.handleLabelPoints[h],bi(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[h].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(e,"color",v),d=this.getControllerVisual(e,"symbolSize"),p=mr(e,s,u,!0),g=l[0]-d/2,y={x:h.x,y:h.y};h.y=p,h.x=g;var m=Yr(f.indicatorLabelPoint,bi(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:p,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var D={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(w,D),_.animateTo(T,D)}else h.attr(w),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var C=0;C<A.length;C++)this.api.enterBlur(A[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(n){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,a=e._applyTransform([n.offsetX,n.offsetY],e._shapes.mainGroup,!0,!0);a[1]=V_(ac(0,a[1]),i[1]),e._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();e=V_(ac(o[0],e),o[1]);var l=q5(i,s,o),u=[e-l,e+l],f=mr(e,o,s,!0),h=[mr(u[0],o,s,!0),mr(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,c=[];(n||G_(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=ZM(v,c);this._dispatchHighDown("downplay",Fl(d[0],i)),this._dispatchHighDown("highlight",Fl(d[1],i))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var n;if(ca(e.target,function(l){var u=vt(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 e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.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 e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Fl(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,n,i,a){var o=bi(n,a?null:this.group);return H(e)?Yr(e,o,i):Qu(e,o,i)},t.prototype._dispatchHighDown=function(e,n){n&&n.length&&this.api.dispatchAction({type:e,batch:n})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t})(pT);function F_(r,t,e,n){return new Ir({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(i){$r(i.event)},ondragend:n})}function q5(r,t,e){var n=Z5/2,i=r.get("hoverLinkDataSize");return i&&(n=mr(i,t,e,!0)/2),n}function G_(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function H_(r){return r==="vertical"?"ns-resize":"ew-resize"}var K5={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Q5=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},j5=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(n){var i=r.pipelineContext;!n.isTargetSeries(r)||i&&i.large||e.push(UV(n.stateList,n.targetVisuals,Y(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),n=[];t.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var a=i.getVisualMeta(Y(J5,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(e);o>=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function J5(r,t,e,n){for(var i=t.targetVisuals[n],a=Qt.prepareVisualTypes(i),o={color:nf(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],f=i[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,h,v)}return o.color;function h(c){return o[c]}function v(c,d){o[c]=d}}var W_=M;function tF(r){var t=r&&r.visualMap;H(t)||(t=t?[t]:[]),W_(t,function(e){if(e){na(e,"splitList")&&!na(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var n=e.pieces;n&&H(n)&&W_(n,function(i){j(i)&&(na(i,"start")&&!na(i,"min")&&(i.min=i.start),na(i,"end")&&!na(i,"max")&&(i.max=i.end))})}})}function na(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var U_=!1;function yT(r){U_||(U_=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(K5,Q5),M(j5,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(tF))}function eF(r){r.registerComponentModel(U5),r.registerComponentView($5),yT(r)}var rF=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],nF[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=J(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=U(this._pieceList,function(l){return l=J(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,n={},i=Qt.listVisualTypes(),a=this.isCategory();M(e.pieces,function(s){M(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),M(n,function(s,l){var u=!1;M(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&M(this.stateList,function(f){(e[f]||(e[f]={}))[l]=dT.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,n){var i=this.option,a=this._pieceList,o=(n?i:e).selected||{};if(i.selected=o,M(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),i.selectedMode==="single"){var s=!1;M(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=J(e)},t.prototype.getValueState=function(e){var n=Qt.findPieceIndex(e,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Qt.findPieceIndex(l,i);f===e&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},t.prototype.getRepresentValue=function(e){var n;if(this.isCategory())n=e.value;else if(e.value!=null)n=e.value;else{var i=e.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(f,h){var v=a.getRepresentValue({interval:f});h||(h=a.getValueState(v));var c=e(v,h);f[0]===-1/0?i[0]=c:f[1]===1/0?i[1]=c:n.push({value:f[0],color:c},{value:f[1],color:c})}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 M(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},t.type="visualMap.piecewise",t.defaultOption=Ba(Pu.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})(Pu),nF={splitNumber:function(r){var t=this.option,e=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(e)!==a&&e<5;)e++;t.precision=e,a=+a.toFixed(e),t.minOpen&&r.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;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),_g(r),M(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;M(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),Y_(t,r)},pieces:function(r){var t=this.option;M(t.pieces,function(e,n){j(e)||(e={value:e});var i={text:"",index:n};if(e.label!=null&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.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],f=[],h=0;h<2;h++){for(var v=[["gte","gt","min"],["lte","lt","max"]][h],c=0;c<3&&o[h]==null;c++)o[h]=e[v[c]],s[h]=l[c],f[h]=c===2;o[h]==null&&(o[h]=u[h])}f[0]&&o[1]===1/0&&(s[0]=0),f[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Qt.retrieveVisuals(e),r.push(i)},this),Y_(t,r),_g(r),M(r,function(e){var n=e.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,i)},this)}};function Y_(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var iF=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,f=Xr(n.get("showLabel",!0),!u),h=!n.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),M(l.viewPieceList,function(v){var c=v.piece,d=new yt;d.onclick=Y(this._onItemClick,this,c),this._enableHoverLink(d,v.indexInModelPieceList);var p=n.getRepresentValue(c);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],h),f){var g=this.visualMapModel.getValueState(p),y=a.get("align")||o;d.add(new Tt({style:Wt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:c.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:et(a.get("opacity"),g==="outOfRange"?.5:1)}),silent:h}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),Ti(n.get("orient"),e,n.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,n){var i=this;e.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:Fl(s.findTargetDataIndices(n),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,n=e.option;if(n.orient==="vertical")return gT(e,this.api,e.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},t.prototype._renderEndsText=function(e,n,i,a,o){if(n){var s=new yt,l=this.visualMapModel.textStyleModel;s.add(new Tt({style:Wt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,n=U(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=e.get("text"),a=e.get("orient"),o=e.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},t.prototype._createItemSymbol=function(e,n,i,a){var o=le(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,e.add(o)},t.prototype._onItemClick=function(e){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=J(i.selected),s=n.getSelectedMapKey(e);a==="single"||a===!0?(o[s]=!0,M(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})(pT);function aF(r){r.registerComponentModel(rF),r.registerComponentView(iF),yT(r)}function oF(r){ue(eF),ue(aF)}var sF=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,n,i){r.prototype.init.call(this,e,n,i),this._sourceManager=new ob(this),By(this)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),By(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:ar},t})(mt),lF=(function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t})($t);function uF(r){r.registerComponentModel(sF),r.registerComponentView(lF)}ue([ZR,Pk,gk,Gk,qE,SB,cB,Qk,NN,cz,JO,rz,qN,vN,Nz,HV,y5,z5,wV,XV,uF,oF,s5,e5,Nw,wE]);const Ep="wildo";function mT(r){return r.length}function Je(r,t){return typeof document>"u"?t:getComputedStyle(document.documentElement).getPropertyValue(r).trim()||t}function kp(){if(typeof document>"u")return!1;const r=document.documentElement;return r.classList.contains("dark")||r.getAttribute("data-theme")==="dark"}function _T(r,t){return fn(Je(r,t))}function fn(r){return r.startsWith("#")||r.startsWith("rgb")?r:/^[\d.]+\s+[\d.]+\s+[\d.]+$/.test(r)?`oklch(${r})`:/^\d/.test(r)?`hsl(${r.replace(/\s+/g,", ")})`:r}function fF(){return{...Gl}}function hF(r){const t=r??Gl,e=kp(),n=fn(Je("--background","#ffffff")),i=fn(Je("--foreground","#0a0a0a")),a=fn(Je("--muted-foreground","#737373")),o=fn(Je("--border","#e5e5e5")),s=fn(Je("--surface-raised",Je("--popover","#ffffff"))),l=fn(Je("--surface-raised-foreground",Je("--popover-foreground","#0a0a0a"))),u=Je("--radius","0.5rem"),f=parseFloat(u)*(u.includes("rem")?16:1),h=e?t.colorShadeDark:t.colorShadeLight,v=K_(),c=Q_(mT(v),{shade:h,palette:v}),d=t.axis.splitLineType==="none"?{show:!1}:{lineStyle:{color:o,type:t.axis.splitLineType}},p=t.typography??Gl.typography,g=p.axisLabelFontSize;return{color:c,backgroundColor:"transparent",textStyle:{color:i,fontFamily:"inherit"},title:{textStyle:{color:i,fontSize:p.titleFontSize,fontWeight:p.titleFontWeight},subtextStyle:{color:a,fontSize:p.subtitleFontSize}},legend:{textStyle:{color:a,fontSize:p.legendFontSize}},tooltip:{backgroundColor:s,borderColor:o,borderWidth:t.tooltip.borderWidth,borderRadius:f,textStyle:{color:l,fontSize:p.tooltipFontSize},extraCssText:t.tooltip.extraCss},axisPointer:{lineStyle:{color:o},crossStyle:{color:o}},categoryAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:d},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:a,fontSize:g},nameTextStyle:{color:a,fontSize:p.axisNameFontSize},splitLine:d},timeAxis:{axisLine:{show:t.axis.showAxisLine,lineStyle:{color:o}},axisTick:{show:t.axis.showTicks,lineStyle:{color:o}},axisLabel:{color:a,fontSize:g},splitLine:d},line:{smooth:!1,symbol:"circle",symbolSize:t.series.pointSize,lineStyle:{width:t.series.lineWidth}},bar:{itemStyle:{borderRadius:t.series.barBorderRadius},emphasis:{itemStyle:{color:"inherit"}}},pie:{itemStyle:{borderColor:n,borderWidth:t.series.pieBorderWidth},label:{color:i,textBorderWidth:0,textBorderColor:"transparent"}},scatter:{symbolSize:t.series.pointSize},radar:{axisLine:{lineStyle:{color:o}},splitLine:{lineStyle:{color:o}},splitArea:{show:!1}},gauge:{axisLine:{lineStyle:{color:[[1,o]]}}},dataZoom:{backgroundColor:"transparent",borderColor:o,fillerColor:fn(Je("--muted","#f5f5f5")),handleColor:a,textStyle:{color:a}}}}function Z_(r){const t=hF(r);qd(Ep,t)}function cF(){return Ep}function vF(r){const t=kp(),e=r??Gl,n=t?e.colorShadeDark:e.colorShadeLight,i=K_();return Q_(mT(i),{shade:n,palette:i})}function dF(r){const t=Ht.useRef(void 0),e=kp();Ht.useMemo(()=>{Z_(r)},[r,e]);const n=Ht.useCallback(()=>{Z_(r)},[r]),i=Ht.useCallback(()=>{clearTimeout(t.current),t.current=setTimeout(n,50)},[n]);return Ht.useEffect(()=>{n();const a=new MutationObserver(()=>{i()});return a.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme","style"]}),()=>{a.disconnect(),clearTimeout(t.current)}},[n,i]),{themeName:Ep}}const pF={[Va.INFO]:{token:"--info",fallback:"#3b82f6"},[Va.SUCCESS]:{token:"--success",fallback:"#22c55e"},[Va.WARNING]:{token:"--warning",fallback:"#f59e0b"},[Va.ERROR]:{token:"--destructive",fallback:"#ef4444"},[Va.NEUTRAL]:{token:"--muted-foreground",fallback:"#737373"}};function X_(r){const{token:t,fallback:e}=pF[AT(r)];return _T(t,e)}function gF(r,t,e){const n={},i={},a={},s=t(r.dataQuery.mainResourceType)?.mainSchema;if(!s)return{colors:n,order:i,labels:a};const l=TT(s);for(const u of r.dataQuery.dimensions){const f=l[u.field];if(!f)continue;const h=CT(f);h.length>0&&(i[u.ref]=h),h.length>0&&e&&(a[u.ref]=Object.fromEntries(h.map(p=>[p,e(r.dataQuery.mainResourceType,u.field,p,f)])));const v=MT(f);if(!v)continue;const c={};for(const[p,g]of Object.entries(v.values??{})){const y=g?.color??v.defaultColor;y&&(c[p]=X_(y))}const d=v.defaultColor?X_(v.defaultColor):void 0;(Object.keys(c).length>0||d)&&(n[u.ref]={values:c,defaultColor:d})}return{colors:n,order:i,labels:a}}function On(r){return r.definition.dataQuery.dimensions[0]?.ref??""}function Mi(r,t){return r.map(e=>e[t])}function Ru(r,t){return r.map(e=>{const n=e[t];if(n==null)return null;const i=typeof n=="number"?n:Number(n);return Number.isFinite(i)?i:null})}function ki(r,t,e){return r.style?.color??e[t%e.length]}function yF(r,t,e){const n=new Map(e.map((i,a)=>[i,a]));return r.map((i,a)=>({row:i,originalIndex:a})).sort((i,a)=>{const o=n.get(String(i.row[t]))??1/0,s=n.get(String(a.row[t]))??1/0;return o!==s?o-s:i.originalIndex-a.originalIndex}).map(({row:i})=>i)}function ST(r,t,e){const n=new Set;for(const a of r){const o=a[t];o!=null&&n.add(String(o))}let i=Array.from(n);if(e.splitConfig?.exclude){const a=new Set(e.splitConfig.exclude);i=i.filter(o=>!a.has(o))}if(e.splitConfig?.order){const a=new Map(e.splitConfig.order.map((o,s)=>[o,s]));i.sort((o,s)=>{const l=a.get(o)??1/0,u=a.get(s)??1/0;return l===u?o.localeCompare(s):l-u})}return i}function Op(r,t,e,n,i){return e.splitConfig?.colorMap?.[r]??i?.values[r]??i?.defaultColor??n[t%n.length]}function ws(r,t,e,n){if(e?.definition.i18n?.splitValueKeys){const i=e.definition.i18n.splitValueKeys[r];if(i){const a=e.t(i);if(a!==i)return a}}return t.splitConfig?.labelMap?.[r]??(n?e?.dimensionEnumLabels?.[n]?.[r]:void 0)??r}function qe(r,t){if(r.nameKey&&t){const e=t(r.nameKey);if(e!==r.nameKey)return e}return r.name}function vf(r,t,e,n){const i=Mi(r,t);return{type:"category",data:n?i.map(a=>n[String(a)]??a):i,axisLabel:{hideOverlap:e?.axis.hideOverlap??!0}}}function ss(r,t){if(t.length===0)return!1;const e=new Map(r.definition.dataQuery.measures.map(n=>[n.ref,n]));return t.every(n=>{const i=e.get(n.measureRef)?.aggregate;return i===Bp.COUNT||i===Bp.COUNT_DISTINCT})}function ls(r,t,e){return{type:"value",name:r,nameLocation:t?.axis.yAxisNameLocation??"middle",nameGap:t?.axis.yAxisNameGap??50,...e?.integerValued?{minInterval:1}:{}}}function us(r){return r.response.queryMeta?.resolvedTimezone??"UTC"}function Ia(r,t,e){if(r==null)return"";const n=r instanceof Date?r:new Date(r);if(isNaN(n.getTime()))return String(r);const i=e||"UTC",a=new Intl.DateTimeFormat("en-US",{timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(n),o=v=>a.find(c=>c.type===v)?.value??"",s=o("year"),l=o("month"),u=o("day"),f=o("hour"),h=o("minute");switch(t){case Nr.YEAR:return s;case Nr.QUARTER:return`${s}-Q${Math.floor((Number(l)-1)/3)+1}`;case Nr.MONTH:return`${s}-${l}`;case Nr.HOUR:return`${s}-${l}-${u} ${f}:00`;case Nr.MINUTE:return`${s}-${l}-${u} ${f}:${h}`;case Nr.WEEK:case Nr.DAY:default:return`${s}-${l}-${u}`}}function fs(r){if(r!==Nr.DAY&&r!==Nr.WEEK)return;const t=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"});return e=>{const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return n?t.format(new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3])))):e}}function mF(r,t){const e=new Set,n=[];for(const i of r){const a=i[t];if(a==null)continue;const o=a instanceof Date?a.toISOString():String(a);e.has(o)||(e.add(o),n.push(o))}return n}function _F(r,t,e,n,i){const a=mF(r,t),o=fs(e);return{type:"category",data:a.map(s=>Ia(s,e,n)),axisLabel:{hideOverlap:i?.axis.hideOverlap??!0,...o?{formatter:o}:{}}}}function Zv(r){return!!r._filled}function SF(r){return r.some(Zv)}function xF(r,t,e=!1){const n=r?.responsive,i=n?.smallMaxWidth??400,a=n?.mediumMaxWidth??799,o=n?.smallGridPadding??{top:20,right:10,bottom:20,left:30},s=n?.mediumGridPadding??{left:50,right:20,bottom:40},l=n?.hideLegendOnSmall??!0;return[{query:{maxWidth:i},option:{legend:{show:!l},...t?{grid:o,xAxis:{axisLabel:{rotate:n?.smallAxisLabelRotate??45,fontSize:n?.smallFontSize??10}}}:{},...e&&l?{series:[{label:{position:"inside",formatter:"{d}%"},labelLine:{show:!1}}]}:{}}},{query:{minWidth:i,maxWidth:a},option:{legend:{orient:"horizontal",bottom:0},...t?{grid:s,xAxis:{axisLabel:{fontSize:n?.mediumFontSize??11}}}:{}}}]}function Eu(r,t){const e=t.style;e&&(e.lineWidth!=null&&(r.lineStyle={...r.lineStyle||{},width:e.lineWidth}),e.lineType&&(r.lineStyle={...r.lineStyle||{},type:e.lineType}),e.areaOpacity!=null&&(r.areaStyle={opacity:e.areaOpacity}),e.smooth!=null&&(r.smooth=e.smooth),e.barWidth!=null&&(r.barWidth=e.barWidth),e.opacity!=null&&(r.opacity=e.opacity),e.pointSize!=null&&(r.symbolSize=e.pointSize,e.pointSize===0&&(r.showSymbol=!1)),e.pointShape&&(r.symbol=e.pointShape),e.connectNulls!=null&&(r.connectNulls=e.connectNulls),e.step&&(r.step=e.step),(e.showLabel!=null||e.labelPosition||e.labelFormatter)&&(r.label={...r.label||{},...e.showLabel!=null?{show:e.showLabel}:{},...e.labelPosition?{position:e.labelPosition}:{},...e.labelFormatter?{formatter:e.labelFormatter}:{}}),e.emphasisScale!=null&&(r.emphasis={...r.emphasis||{},scale:e.emphasisScale}),e.markLines?.length&&(r.markLine={silent:!0,data:e.markLines.map(n=>{if(n.type)return{type:n.type,...n.label?{label:{formatter:n.label}}:{},...n.color?{lineStyle:{color:n.color,type:n.lineType??"dashed"}}:{lineStyle:{type:n.lineType??"dashed"}}};const i={};return n.yValue!=null&&(i.yAxis=n.yValue),n.xValue!=null&&(i.xAxis=n.xValue),n.label&&(i.label={formatter:n.label}),i.lineStyle={color:n.color,type:n.lineType??"dashed"},i})}),e.markPoints?.length&&(r.markPoint={data:e.markPoints.map(n=>({...n.type?{type:n.type}:{},...n.label?{label:{formatter:n.label}}:{},...n.symbol?{symbol:n.symbol}:{},...n.symbolSize?{symbolSize:n.symbolSize}:{}}))}))}class bF{supportedTypes=[st.BAR,st.HORIZONTAL_BAR,st.GROUPED_BAR,st.STACKED_BAR,st.WATERFALL];build(t,e){const n=On(t),i=t.definition.chartType,a=i===st.HORIZONTAL_BAR,o=i===st.STACKED_BAR,s=i===st.WATERFALL,l=t.definition.chartTypeConfig??{};if(s)return this.buildWaterfall(t,e,n,l);const u=t.definition.i18n?.yAxisLabelKey?(()=>{const b=t.t(t.definition.i18n.yAxisLabelKey);return b!==t.definition.i18n.yAxisLabelKey?b:void 0})():void 0,f=ls(u,t.chartStylePreset,{integerValued:ss(t,e)}),h=Mi(t.response.data,n).map(String),v=[...new Set(h)],c=t.definition.dataQuery.dimensions[0],d=!!c?.timeGranularity,p=b=>Ia(b,c?.timeGranularity,us(t)),g=e.some(b=>b.splitByDimension),y=d?fs(c?.timeGranularity):void 0,m={hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...y?{formatter:y}:{}},_=g?{type:"category",data:d?v.map(p):v.map(b=>t.dimensionEnumLabels?.[n]?.[b]??b),axisLabel:m}:d?{type:"category",data:Mi(t.response.data,n).map(p),axisLabel:m}:vf(t.response.data,n,t.chartStylePreset,t.dimensionEnumLabels?.[n]),S=[];for(let b=0;b<e.length;b++){const x=e[b];if(x.splitByDimension){const w=ST(t.response.data,x.splitByDimension,x);for(let T=0;T<w.length;T++){const D=w[T],A=new Map;for(const I of t.response.data)if(String(I[x.splitByDimension])===D){const P=String(I[n]),R=I[x.measureRef];A.set(P,typeof R=="number"?R:Number(R)||0)}const C=v.map(I=>A.get(I)??null),L={type:"bar",name:ws(D,x,t,x.splitByDimension),data:C,itemStyle:{color:Op(D,T,x,t.colorPalette,t.dimensionEnumColors[x.splitByDimension])},stack:o?"stack":void 0,...l.barGap!=null?{barGap:l.barGap}:{},...l.barCategoryGap!=null?{barCategoryGap:l.barCategoryGap}:{}};Eu(L,x),S.push(L)}}else{const w=Ru(t.response.data,x.measureRef),T=t.dimensionEnumColors[n],D=T?w.map((C,L)=>{const I=T.values[h[L]]??T.defaultColor;return I!=null?{value:C,itemStyle:{color:I}}:C}):w,A={type:"bar",name:qe(x,t.t),data:D,itemStyle:{color:ki(x,b,t.colorPalette)},stack:o?"stack":void 0,yAxisIndex:x.yAxisIndex,...l.barGap!=null?{barGap:l.barGap}:{},...l.barCategoryGap!=null?{barCategoryGap:l.barCategoryGap}:{}};Eu(A,x),S.push(A)}}return{series:S,xAxis:a?f:_,yAxis:a?_:f}}buildWaterfall(t,e,n,i){const a=e[0];if(!a)return{series:[]};const o=t.definition.dataQuery.dimensions[0],s=Mi(t.response.data,n),l=o?.timeGranularity?s.map(b=>Ia(b,o.timeGranularity,us(t))):s,u=o?.timeGranularity?fs(o.timeGranularity):void 0,f=Ru(t.response.data,a.measureRef),h=[],v=[],c=[];let d=0;for(let b=0;b<f.length;b++){const x=f[b];x>=0?(h.push(d),v.push(x),c.push("-")):(h.push(d+x),v.push("-"),c.push(Math.abs(x))),d+=x}const p=t.colorPalette,g=i.waterfall,y=g?.gainColor??p[0]??"#5470c6",m=g?.lossColor??"#ee6666",_=(g?.gainLabelKey?(()=>{const b=t.t(g.gainLabelKey);return b!==g.gainLabelKey?b:void 0})():void 0)??g?.gainLabel??"Increase",S=(g?.lossLabelKey?(()=>{const b=t.t(g.lossLabelKey);return b!==g.lossLabelKey?b:void 0})():void 0)??g?.lossLabel??"Decrease";return{series:[{type:"bar",name:"__waterfall_base",stack:"waterfall",data:h,itemStyle:{color:"transparent",borderColor:"transparent"},emphasis:{itemStyle:{color:"transparent",borderColor:"transparent"}},tooltip:{show:!1},legendHoverLink:!1},{type:"bar",name:_,stack:"waterfall",data:v,itemStyle:{color:y}},{type:"bar",name:S,stack:"waterfall",data:c,itemStyle:{color:m}}],xAxis:{type:"category",data:l,axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...u?{formatter:u}:{}}},yAxis:{type:"value"}}}}class wF{supportedTypes=[st.LINE,st.AREA,st.STACKED_AREA,st.STEP_LINE];_t;build(t,e){this._t=t.t;const n=On(t),i=t.definition.chartType,a=i===st.AREA||i===st.STACKED_AREA,o=i===st.STACKED_AREA,s=i===st.STEP_LINE,l=t.definition.chartTypeConfig??{},u=t.definition.dataQuery.dimensions[0],f=!!u?.timeGranularity,h=Mi(t.response.data,n).map(String),v=[...new Set(h)],d=e.some(b=>b.splitByDimension)?v:h,p=fs(u?.timeGranularity),g=f?{type:"category",data:d.map(b=>Ia(b,u?.timeGranularity,us(t))),axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...p?{formatter:p}:{}}}:vf(t.response.data,n,t.chartStylePreset,t.dimensionEnumLabels?.[n]),y=t.definition.i18n?.yAxisLabelKey?(()=>{const b=t.t(t.definition.i18n.yAxisLabelKey);return b!==t.definition.i18n.yAxisLabelKey?b:void 0})():void 0,m=ls(y,t.chartStylePreset,{integerValued:ss(t,e)}),_=SF(t.response.data),S=[];for(let b=0;b<e.length;b++){const x=e[b];if(x.splitByDimension){const w=ST(t.response.data,x.splitByDimension,x);for(let T=0;T<w.length;T++){const D=w[T],A=Op(D,T,x,t.colorPalette,t.dimensionEnumColors[x.splitByDimension]),C=ws(D,x,t,x.splitByDimension),{realValues:L,filledValues:I}=this.buildCategorySplitDataWithOverlay(t,x,n,D,v),P=this.buildLineItem(C,L,A,a,o,s,x,l);if(S.push(P),I.some(R=>R!==null)){const R=this.buildDashedOverlayItem(C,I,A,a,o,s,x,l);S.push(R)}}}else{const w=ki(x,b,t.colorPalette),T=qe(x,t.t);if(_){const{realValues:D,filledValues:A}=this.buildDensifiedValueSeries(t.response.data,n,x.measureRef,v),C=this.buildLineItem(T,D,w,a,o,s,x,l);if(C.yAxisIndex=x.yAxisIndex,C.connectNulls=x.style?.connectNulls??!1,S.push(C),A.some(L=>L!==null)){const L=this.buildDashedOverlayItem(T,A,w,a,o,s,x,l);L.yAxisIndex=x.yAxisIndex,L.connectNulls=!1,S.push(L)}}else{const D=Ru(t.response.data,x.measureRef),A=this.buildLineItem(T,D,w,a,o,s,x,l);A.yAxisIndex=x.yAxisIndex,S.push(A)}}}return{series:S,xAxis:g,yAxis:m}}buildLineItem(t,e,n,i,a,o,s,l){const u=l.symbolVisibilityThreshold??30,f={type:"line",name:t,data:e,itemStyle:{color:n},lineStyle:{color:n},showSymbol:e.length<=u};return this.applyLineVariant(f,i,a,o,s),Eu(f,s),f}buildDashedOverlayItem(t,e,n,i,a,o,s,l){const u=l.densifiedOverlay,f=l.densifiedOverlayNameKey?(()=>{const v=this._t?.(l.densifiedOverlayNameKey);return v&&v!==l.densifiedOverlayNameKey?v:"(filled)"})():"(filled)",h={type:"line",name:t?`${t} ${f}`:f,data:e,itemStyle:{color:n,opacity:u?.itemOpacity??.4},lineStyle:{color:n,type:u?.lineType??"dashed",opacity:u?.lineOpacity??.5,width:u?.lineWidth??1},showSymbol:u?.showSymbol??!1,legendHoverLink:!1,emphasis:{disabled:!0}};return(i||a)&&(h.areaStyle={opacity:u?.areaOpacity??.1}),a&&(h.stack="stack"),o&&(h.step=s.style?.step??"start"),h}buildDensifiedValueSeries(t,e,n,i){const a=new Map,o=new Map;for(const u of t){const f=String(u[e]),h=u[n];a.set(f,h==null?null:typeof h=="number"?h:Number(h)),o.set(f,Zv(u))}const s=[],l=[];for(let u=0;u<i.length;u++){const f=i[u],h=a.get(f)??null;if(o.get(f)??!1)s.push(null),l.push(h);else{s.push(h);const c=u>0&&(o.get(i[u-1])??!1),d=u<i.length-1&&(o.get(i[u+1])??!1);l.push(c||d?h:null)}}return{realValues:s,filledValues:l}}buildCategorySplitDataWithOverlay(t,e,n,i,a){const o=new Map,s=new Map;for(const f of t.response.data)if(String(f[e.splitByDimension])===i){const h=String(f[n]),v=f[e.measureRef];o.set(h,typeof v=="number"?v:Number(v)||0),s.set(h,Zv(f))}const l=[],u=[];for(let f=0;f<a.length;f++){const h=a[f],v=o.get(h)??null;if(s.get(h)??!1)l.push(null),u.push(v);else{l.push(v);const d=f>0&&(s.get(a[f-1])??!1),p=f<a.length-1&&(s.get(a[f+1])??!1);u.push(d||p?v:null)}}return{realValues:l,filledValues:u}}applyLineVariant(t,e,n,i,a){e&&(t.areaStyle={opacity:a.style?.areaOpacity??.3}),n&&(t.stack="stack",t.areaStyle={opacity:a.style?.areaOpacity??.3}),i&&(t.step=a.style?.step??"start")}}class TF{supportedTypes=[st.PIE,st.DONUT];build(t,e){const n=On(t),i=t.definition.chartType===st.DONUT,a=t.definition.chartTypeConfig??{},o=e[0];if(!o)return{series:[]};const s=a.itemNameFallbackKey?(()=>{const g=t.t(a.itemNameFallbackKey);return g!==a.itemNameFallbackKey?g:void 0})():void 0,l=t.dimensionEnumColors[n];let u=t.response.data.map((g,y)=>{const m=s?`${s} ${y}`:`Item ${y}`,_=String(g[n]??m),S=typeof g[o.measureRef]=="number"?g[o.measureRef]:Number(g[o.measureRef])||0;return{name:ws(_,o,t,n),value:S,_rawName:_,itemStyle:{color:Op(_,y,o,t.colorPalette,l)}}});if(o.splitConfig?.exclude){const g=new Set(o.splitConfig.exclude);u=u.filter(y=>!g.has(y._rawName))}if(o.splitConfig?.order){const g=new Map(o.splitConfig.order.map((y,m)=>[y,m]));u.sort((y,m)=>{const _=g.get(y._rawName)??1/0,S=g.get(m._rawName)??1/0;return _===S?y._rawName.localeCompare(m._rawName):_-S})}const f=u.map(({_rawName:g,...y})=>y),h=i?["40%","70%"]:"70%",v=a.radius??h,c=t.definition.appearance?.emphasisShadow,d=t.chartStylePreset.emphasis;return{series:[{type:"pie",name:qe(o,t.t),data:f,radius:v,...a.center?{center:a.center}:{},...a.startAngle!=null?{startAngle:a.startAngle}:{},...a.minAngle!=null?{minAngle:a.minAngle}:{},...a.roseType?{roseType:a.roseType}:{},...a.borderWidth!=null||a.borderColor?{itemStyle:{...a.borderWidth!=null?{borderWidth:a.borderWidth}:{},...a.borderColor?{borderColor:a.borderColor}:{}}}:{},avoidLabelOverlap:!0,labelLayout:{hideOverlap:!0},label:{show:a.showLabel??!0,formatter:a.labelFormatter??"{b}: {d}%",...a.labelPosition?{position:a.labelPosition}:{}},labelLine:{show:a.showLabel??!0},emphasis:{scale:!1,itemStyle:{color:"inherit",shadowBlur:c?.blur??d?.shadowBlur??10,shadowOffsetX:c?.offsetX??d?.shadowOffsetX??0,shadowColor:c?.color??d?.shadowColor??"rgba(0, 0, 0, 0.2)"}}}]}}}class CF{supportedTypes=[st.SCATTER,st.BUBBLE];build(t,e){const n=t.definition.dataQuery.dimensions,i=n[0]?.ref??"",a=t.definition.chartType===st.BUBBLE,o=t.definition.chartTypeConfig??{},[s,l]=o.bubbleSizeRange??[4,60],u=n[0],f=u?.timeGranularity!=null,h=u?.timeGranularity,v=us(t),c=[];for(let g=0;g<e.length;g++){const y=e[g],m=t.response.data.map(S=>{const x=[f?Ia(S[i],h,v):S[i],S[y.measureRef]];if(a&&t.definition.dataQuery.measures.length>1){const w=t.definition.dataQuery.measures[1]?.ref;w&&x.push(S[w])}return x}),_={type:"scatter",name:qe(y,t.t),data:m,itemStyle:{color:ki(y,g,t.colorPalette)},...o.symbolShape?{symbol:o.symbolShape}:{},symbolSize:a?S=>Math.min(Math.max(Number(S[2])||10,s),l):y.style?.pointSize??8};c.push(_)}const d=!f&&t.response.data.length>0&&t.response.data.every(g=>{const y=g[i];return typeof y=="number"||typeof y=="string"&&y.trim()!==""&&Number.isFinite(Number(y))}),p=f?_F(t.response.data,i,h,v,t.chartStylePreset):d?{type:"value"}:vf(t.response.data,i,t.chartStylePreset,t.dimensionEnumLabels?.[i]);return{series:c,xAxis:p,yAxis:ls(void 0,t.chartStylePreset,{integerValued:ss(t,e)})}}}class MF{supportedTypes=[st.GAUGE];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=qe(n,t.t),o=t.response.data[0],s=o&&Number(o[n.measureRef])||0;return{series:[{type:"gauge",name:a,data:[{value:s,name:a}],min:i.min??0,max:i.max??100,...i.splitNumber!=null?{splitNumber:i.splitNumber}:{},...i.radius?{radius:i.radius}:{},...i.startAngle!=null?{startAngle:i.startAngle}:{},...i.endAngle!=null?{endAngle:i.endAngle}:{},...i.pointer?{pointer:{...i.pointer.show!=null?{show:i.pointer.show}:{},...i.pointer.length?{length:i.pointer.length}:{},...i.pointer.width!=null?{width:i.pointer.width}:{}}}:{},...i.axisLineWidth||i.axisLineColors?{axisLine:{lineStyle:{...i.axisLineWidth?{width:i.axisLineWidth}:{},...i.axisLineColors?{color:i.axisLineColors}:{}}}}:{},detail:{formatter:i.detailFormatter??"{value}",fontSize:i.detailFontSize??20},progress:{show:i.showProgress??!0}}]}}}class AF{supportedTypes=[st.FUNNEL];build(t,e){const n=On(t),i=e[0];if(!i)return{series:[]};const a=t.definition.chartTypeConfig??{},o=t.response.data.map(u=>({name:ws(String(u[n]??""),i,t,n),value:typeof u[i.measureRef]=="number"?u[i.measureRef]:Number(u[i.measureRef])||0})),s=a.sort??"descending";return{series:[{type:"funnel",name:qe(i,t.t),data:o,left:a.left??"10%",width:a.width??"80%",label:{show:a.showLabel??!0,position:a.labelPosition??"inside"},gap:a.gap??2,sort:s,...a.funnelAlign?{funnelAlign:a.funnelAlign}:{},...a.minSize?{minSize:a.minSize}:{},...a.maxSize?{maxSize:a.maxSize}:{}}]}}}class DF{supportedTypes=[st.RADAR];build(t,e){const n=On(t),i=t.definition.chartTypeConfig??{},a=t.response.data.map(s=>({name:ws(String(s[n]??""),e[0],t,n)})),o=[];for(let s=0;s<e.length;s++){const l=e[s],u=t.response.data.map(f=>{const h=f[l.measureRef];return typeof h=="number"?h:Number(h)||0});o.push({value:u,name:qe(l,t.t),areaStyle:{opacity:i.areaOpacity??.2},lineStyle:{color:ki(l,s,t.colorPalette)},itemStyle:{color:ki(l,s,t.colorPalette)}})}return{series:[{type:"radar",data:o}],radar:{indicator:a,shape:i.shape??"polygon",...i.center?{center:i.center}:{},...i.radius?{radius:i.radius}:{},...i.startAngle!=null?{startAngle:i.startAngle}:{},...i.nameGap!=null?{nameGap:i.nameGap}:{},splitArea:{show:i.showSplitArea??!1}}}}}class IF{supportedTypes=[st.SANKEY];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=t.definition.dataQuery.dimensions,o=a[0]?.ref??"",s=a[1]?.ref??o,l=n.measureRef,u=new Set,f=[];for(const c of t.response.data){const d=String(c[o]??""),p=String(c[s]??""),g=Number(c[l])||0;u.add(d),u.add(p),f.push({source:d,target:p,value:g})}const h=Array.from(u).map(c=>({name:c})),v={type:"sankey",name:qe(n,t.t),layout:"none",emphasis:{focus:i.emphasisFocus??"adjacency"},...i.nodeWidth!=null?{nodeWidth:i.nodeWidth}:{},...i.nodeGap!=null?{nodeGap:i.nodeGap}:{},...i.orient?{orient:i.orient}:{},...i.draggable!=null?{draggable:i.draggable}:{},...i.labelPosition?{label:{position:i.labelPosition}}:{},data:h,links:f};return n.style?.color&&(v.itemStyle={color:n.style.color}),{series:[v]}}}class LF{supportedTypes=[st.SUNBURST,st.TREEMAP];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=t.definition.dataQuery.dimensions,o=n.measureRef,s=a.map(h=>h.ref),l=this.buildTree(t.response.data,s,o),u=t.definition.chartType===st.SUNBURST,f={type:u?"sunburst":"treemap",name:qe(n,t.t),data:l};if(u){const[h,v]=i.sunburstRadius??["15%","90%"];f.radius=[h,v],f.sort=void 0,f.emphasis={focus:i.sunburstEmphasisFocus??"ancestor"};const c=parseFloat(h)||15,p=(parseFloat(v)||90)-c,g=`${Math.round(c+p*.33)}%`,y=`${Math.round(c+p*.73)}%`,m=i.sunburstLevels;f.levels=[{},{r0:h,r:g,label:{rotate:m?.level1LabelRotate??"tangential"}},{r0:g,r:y,label:{align:m?.level2LabelAlign??"right"}},{r0:y,r:v,label:{position:m?.level3LabelPosition??"outside",padding:m?.level3LabelPadding??3,silent:!1}}]}else f.leafDepth=i.treemapLeafDepth??(s.length>1?2:1),f.visibleMin=i.treemapVisibleMin??300,f.label={show:i.treemapShowLabel??!0,formatter:i.treemapLabelFormatter??"{b}"},f.upperLabel={show:i.treemapShowUpperLabel??!0,height:i.treemapUpperLabelHeight??30},f.breadcrumb={show:i.showBreadcrumb??!0};return{series:[f]}}buildTree(t,e,n){if(e.length===0)return[];if(e.length===1)return t.map(a=>({name:String(a[e[0]]??""),value:Number(a[n])||0}));const i=new Map;for(const a of t){let o=null;for(let s=0;s<e.length;s++){const l=String(a[e[s]]??""),u=s===e.length-1;if(s===0){if(!i.has(l)){const h={name:l,children:[]};i.set(l,{node:h,childMap:new Map})}o=i.get(l).node}else if(o)if(o.children||(o.children=[]),u)o.children.push({name:l,value:Number(a[n])||0});else{const f=o.children.find(h=>h.name===l);if(f)o=f;else{const h={name:l,children:[]};o.children.push(h),o=h}}}}return Array.from(i.values()).map(a=>a.node)}}class PF{supportedTypes=[st.HEATMAP];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=t.definition.dataQuery.dimensions,o=a[0]?.ref??"",s=a[1]?.ref??o,l=n.measureRef,u=[...new Set(t.response.data.map(x=>String(x[o]??"")))],f=[...new Set(t.response.data.map(x=>String(x[s]??"")))],h=new Map(u.map((x,w)=>[x,w])),v=new Map(f.map((x,w)=>[x,w]));let c=1/0,d=-1/0;const p=[];for(const x of t.response.data){const w=h.get(String(x[o]??""))??0,T=v.get(String(x[s]??""))??0,D=Number(x[l])||0;p.push([w,T,D]),D<c&&(c=D),D>d&&(d=D)}c===1/0&&(c=0),d===-1/0&&(d=0),c===d&&(d=c+1);const g=t.definition.appearance?.emphasisShadow,y=t.chartStylePreset.emphasis,m={type:"heatmap",name:n.name,data:p,label:{show:i.showLabel??!0},emphasis:{itemStyle:{shadowBlur:g?.blur??y?.shadowBlur??10,shadowColor:g?.color??y?.shadowColor??"rgba(0, 0, 0, 0.5)"}}},_=i.visualMapOrient??"horizontal",S=i.visualMapPosition??"bottom",b=i.showSplitArea??!0;return{series:[m],xAxis:{type:"category",data:u,splitArea:{show:b}},yAxis:{type:"category",data:f,splitArea:{show:b}},visualMap:{min:i.visualMapMin??c,max:i.visualMapMax??d,calculable:i.visualMapCalculable??!0,orient:_,...i.visualMapInRange?{inRange:{color:i.visualMapInRange}}:{},..._==="horizontal"?{left:"center",[S]:0}:{top:"center",[S]:0}}}}}class RF{supportedTypes=[st.BOXPLOT];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=On(t),o=Mi(t.response.data,a),s=t.definition.dataQuery.measures,l=s.length>=5;let u;if(l){const v=d=>s.find(p=>d.some(g=>p.ref.toLowerCase().endsWith(`_${g}`)||p.label?.toLowerCase()===g)),c=(()=>{const d=v(["min"]),p=v(["q1","lower_quartile"]),g=v(["median","med","p50"]),y=v(["q3","upper_quartile"]),m=v(["max"]);return d&&p&&g&&y&&m?[d,p,g,y,m]:s.slice(0,5)})();u=t.response.data.map(d=>c.map(p=>Number(d[p.ref])||0))}else u=t.response.data.map(v=>{const c=v[n.measureRef];if(Array.isArray(c))return this.computeBoxplotStats(c.map(Number).filter(p=>!isNaN(p)));const d=Number(c)||0;return[d,d,d,d,d]});const f=qe(n,t.t);return{series:[{type:"boxplot",name:f,data:u}],xAxis:{type:"category",data:o,boundaryGap:i.boundaryGap??!0,axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0}},yAxis:{type:"value",name:f}}}computeBoxplotStats(t){if(t.length===0)return[0,0,0,0,0];const e=[...t].sort((u,f)=>u-f),n=e.length,i=e[0],a=e[n-1],o=this.percentile(e,50),s=this.percentile(e,25),l=this.percentile(e,75);return[i,s,o,l,a]}percentile(t,e){const n=e/100*(t.length-1),i=Math.floor(n),a=Math.ceil(n);if(i===a)return t[i];const o=n-i;return t[i]+o*(t[a]-t[i])}}class EF{supportedTypes=[st.PARALLEL];build(t,e){const n=e[0];if(!n)return{series:[]};const i=t.definition.chartTypeConfig??{},a=t.definition.dataQuery.measures,o=On(t),s=a.map((c,d)=>({dim:d,name:c.label||c.ref})),l=t.response.data.map(c=>a.map(d=>Number(c[d.ref])||0)),u=t.response.data.map(c=>String(c[o]??"")),f=ki(n,0,t.colorPalette),h=i.layoutMargins;return{series:[{type:"parallel",name:qe(n,t.t),data:l.map((c,d)=>({value:c,name:u[d]})),lineStyle:{width:i.lineWidth??2,opacity:i.lineOpacity??.6,color:f},emphasis:{lineStyle:{width:i.emphasisLineWidth??4,opacity:i.emphasisOpacity??1}}}],parallelAxis:s,parallel:{left:h?.left??"5%",right:h?.right??"13%",bottom:h?.bottom??"10%",top:h?.top??"10%"}}}}function kF(r){switch(r){case st.LINE:case st.STEP_LINE:case st.AREA:case st.STACKED_AREA:return"line";case st.SCATTER:case st.BUBBLE:return"scatter";case st.BAR:case st.HORIZONTAL_BAR:case st.GROUPED_BAR:case st.STACKED_BAR:case st.WATERFALL:default:return"bar"}}class OF{supportedTypes=[st.COMPOSED];build(t,e){const n=On(t),i=[];let a=!1;for(let c=0;c<e.length;c++){const d=e[c],p=kF(d.chartType),g=ki(d,c,t.colorPalette),y=Ru(t.response.data,d.measureRef),m={type:p,name:qe(d,t.t),data:y,itemStyle:{color:g},yAxisIndex:d.yAxisIndex??0};(d.chartType===st.AREA||d.chartType===st.STACKED_AREA)&&(m.areaStyle={opacity:d.style?.areaOpacity??.3}),(d.chartType===st.STACKED_BAR||d.chartType===st.STACKED_AREA)&&(m.stack="composed_stack"),d.chartType===st.STEP_LINE&&(m.step=d.style?.step??"start"),Eu(m,d),(d.yAxisIndex??0)>0&&(a=!0),i.push(m)}const o=t.definition.dataQuery.dimensions[0],s=fs(o?.timeGranularity),l=o?.timeGranularity?{type:"category",data:Mi(t.response.data,n).map(c=>Ia(c,o.timeGranularity,us(t))),axisLabel:{hideOverlap:t.chartStylePreset.axis.hideOverlap??!0,...s?{formatter:s}:{}}}:vf(t.response.data,n,t.chartStylePreset,t.dimensionEnumLabels?.[n]),u=t.definition.i18n?.yAxisLabelKey?(()=>{const c=t.t(t.definition.i18n.yAxisLabelKey);return c!==t.definition.i18n.yAxisLabelKey?c:void 0})():void 0,f=e.filter(c=>(c.yAxisIndex??0)===0),h=e.filter(c=>(c.yAxisIndex??0)>0),v=[ls(u,t.chartStylePreset,{integerValued:ss(t,f)})];if(a){const c=t.definition.i18n?.yAxisSecondaryLabelKey?(()=>{const p=t.t(t.definition.i18n.yAxisSecondaryLabelKey);return p!==t.definition.i18n.yAxisSecondaryLabelKey?p:void 0})():void 0,d=ls(c,t.chartStylePreset,{integerValued:ss(t,h)});d.position="right",d.splitLine={show:!1},v.push(d)}return{series:i,xAxis:l,yAxis:v.length===1?v[0]:v}}}const BF=[new bF,new wF,new TF,new CF,new MF,new AF,new DF,new IF,new LF,new PF,new RF,new EF,new OF],xT=new Map;for(const r of BF)for(const t of r.supportedTypes)xT.set(t,r);const $_=new Set(["pie","donut","funnel","radar","sankey","sunburst","treemap","gauge","heatmap"]),NF=new Set(["pie","donut","funnel","sankey"]);function zF(r,t,e){const n={...r.gridPadding};if(e&&e>1&&(n.bottom=Math.max(n.bottom,r.multiSeriesLegendBottomPadding??50)),t?.gridPadding){const i=t.gridPadding;i.top!==void 0&&(n.top=i.top),i.right!==void 0&&(n.right=i.right),i.bottom!==void 0&&(n.bottom=i.bottom),i.left!==void 0&&(n.left=i.left)}return n}const VF=r=>r;function FF(r,t,e={width:800,height:400},n,i=VF,a={colors:{},order:{},labels:{}}){const o=n??fF(),s=r.appearance,l=r.i18n,u=r.dataQuery.dimensions[0]?.ref,f=u?a.order[u]:void 0,h=Array.isArray(r.dataQuery.orderBy)&&r.dataQuery.orderBy.length>0,v=u&&f&&!h?{...t,data:yF(t.data,u,f)}:t,c=s?.colorPalette?.length?s.colorPalette:vF(o),d=r.chartType,p=xT.get(d);if(!p)return console.warn(`EChartsOptionBuilder: no builder for chart type '${d}'`),{series:[]};const g={definition:r,response:v,containerSize:e,colorPalette:c,chartStylePreset:o,t:i,dimensionEnumColors:a.colors,dimensionEnumLabels:a.labels},y=p.build(g,r.series),m=NF.has(d)||r.series.length>1||r.series.some(O=>O.splitByDimension),_=s?.showLegend??m,S=s?.showTooltip??!0,b=zF(o,s,r.series.length),x=s?.animated??o.animation.enabled,w=s?.animationDuration??o.animation.durationMs,T=s?.animationEasing??o.animation.easing;let D="transparent";s?.background&&(D=s.background==="surface"?_T("--background","#ffffff"):s.background);const A=s?.title,C=l?.titleKey?q_(i,l.titleKey,A?.text):A?.text,L=l?.subtitleKey?q_(i,l.subtitleKey,A?.subtext):A?.subtext,I=s?.tooltip,P=$_.has(d)?"item":"axis",R=s?.legend,E={series:y.series,...C?{title:{text:C,...L?{subtext:L}:{},left:A?.left??"left",...A?.top!=null?{top:A.top}:{},...A?.textAlign?{textAlign:A.textAlign}:{},textStyle:{fontSize:o.typography.titleFontSize,fontWeight:o.typography.titleFontWeight},subtextStyle:{fontSize:o.typography.subtitleFontSize}}}:{},tooltip:S?{trigger:I?.trigger??P,confine:I?.confine??!0,...I?.formatter?{formatter:I.formatter}:{},...I?.axisPointerType&&I.axisPointerType!=="none"?{axisPointer:{type:I.axisPointerType}}:{}}:{show:!1},legend:{show:_,type:R?.type??"scroll",...R?.position==="top"?{top:0}:R?.position==="left"?{left:0,orient:"vertical"}:R?.position==="right"?{right:0,orient:"vertical"}:{bottom:0},...R?.orient?{orient:R.orient}:{},...R?.itemGap!=null?{itemGap:R.itemGap}:{},...R?.pageSize!=null?{pageSize:R.pageSize}:{},...$_.has(d)?{}:{data:y.series.map(O=>O.name).filter(O=>typeof O=="string"&&!O.startsWith("__"))}},grid:{...b,containLabel:!0},...D!=="transparent"?{backgroundColor:D}:{},animation:x,animationDuration:w,animationEasing:T,media:xF(o,!!(y.xAxis||y.yAxis),d===st.PIE||d===st.DONUT)};if(s?.toolbox?.show){const O=s.toolbox;E.toolbox={show:!0,right:O.right??10,top:O.top??10,feature:{...O.saveAsImage?{saveAsImage:{type:"png"}}:{},...O.dataView?{dataView:{readOnly:!0}}:{},...O.restore?{restore:{}}:{},...O.magicType?.length?{magicType:{type:O.magicType}}:{}}}}if(s?.dataZoom?.enabled){const O=s.dataZoom,k=O.type??["slider"],z=[];for(const V of k){const G={type:V,start:O.start??0,end:O.end??100};(O.axis==="both"||O.axis==="x"||!O.axis)&&z.push({...G,xAxisIndex:0}),(O.axis==="both"||O.axis==="y")&&z.push({...G,yAxisIndex:0})}E.dataZoom=z}y.xAxis&&(E.xAxis=y.xAxis),y.yAxis&&(E.yAxis=y.yAxis),y.radar&&(E.radar=y.radar);for(const[O,k]of Object.entries(y))!["series","xAxis","yAxis","radar"].includes(O)&&!O.startsWith("_")&&(E[O]=k);return E}function q_(r,t,e){const n=r(t);return n!==t?n:e}const GF=({option:r,theme:t,className:e,style:n,notMerge:i=!0,lazyUpdate:a=!1,onChartReady:o})=>{const s=Ht.useRef(null),l=Ht.useRef(null),u=Ht.useRef(r);u.current=r;const f=Ht.useRef(o);f.current=o,Ht.useEffect(()=>{const v=s.current;if(!v)return;const c=pP(v,t);return l.current=c,u.current&&c.setOption(u.current,{notMerge:i,lazyUpdate:a}),f.current?.(c),()=>{c.dispose(),l.current=null}},[t]);const h=Ht.useRef(!0);return Ht.useEffect(()=>{if(h.current){h.current=!1;return}const v=l.current;v&&!v.isDisposed()&&r&&v.setOption(r,{notMerge:i,lazyUpdate:a})},[r,i,a]),oi.jsx("div",{ref:s,className:e,style:n})},UF=({viewRef:r,document:t,viewDefinition:e,runtimeDescriptor:n,contextResourceIdentifiers:i,urlParamValues:a,inputs:o,className:s="",width:l="100%",height:u=400,localErrorOnly:f=!1})=>{const{registry:h}=DT(),{getChartStylePreset:v,isDark:c}=IT(),d=v(),{t:p,isReady:g}=Np({component:LT.HIGH_LEVEL_VIEWS_CHART}),y=Ht.useRef(null),m=Ht.useRef(null);dF(d);const _=Ht.useMemo(()=>e?void 0:PT({viewRef:r,registry:h}),[e,r,h]),S=e??_?.chartView,b=Ht.useMemo(()=>n??(_?RT({identity:_.identity,chartView:_.chartView,contextResourceIdentifiers:i??{}}):void 0),[n,_,i]),x=HT({surfaceDefinition:S,chartDefinition:t,runtimeDescriptor:b,explicitContextResourceIdentifiers:i,explicitInputs:o,urlParamValues:a}),w=x?.chartDefinition,{data:T,loading:D,error:A,refetch:C}=BT(w,x?.executionChartRef,x?.resolvedInputs,x?.contextResourceIdentifiers,a,f),L=Ht.useCallback(k=>{if(y.current?.disconnect(),y.current=null,!k)return;const z=new ResizeObserver(()=>{const V=m.current?.getEchartsInstance?.();V&&!V.isDisposed?.()&&V.resize()});z.observe(k),y.current=z},[]),I=Ht.useCallback(k=>{m.current={getEchartsInstance:()=>k}},[]),{tResourceFieldEnumValue:P,isReady:R}=Np({resource:w?.dataQuery.mainResourceType}),E=Ht.useMemo(()=>w?gF(w,k=>h.resourceConfigurations[k],P):{colors:{},order:{},labels:{}},[w,h,c,P,R]),O=Ht.useMemo(()=>w&&T&&T.data.length>0?FF(w,T,void 0,d,p,E):null,[w,T,d,p,E]);return w?D&&!T?oi.jsx(kT,{height:u}):A?oi.jsx(NT,{error:A,onRetry:C}):O?!g||!R?null:oi.jsx("div",{ref:L,className:OT("chart-view",s),style:{width:l,height:u,position:"relative"},children:oi.jsx(GF,{option:O,theme:cF(),style:{width:"100%",height:"100%"},notMerge:!0,lazyUpdate:!1,onChartReady:I},c?"dark":"light")}):oi.jsx(zT,{}):oi.jsx(ET,{viewKind:"chart",viewRef:r})};export{UF as ChartView,UF as default};
|